if the project nidaba is to at first produce a list of "worst posts" to hammer down next or something similar, then it can be that surprisingly few features will do already
@JonClements for example our spam filter on twitter was 0.9393 ham , 0.7718 spam labelled correctly for features that did not include the actual tweet words in any way
@Peter I've seen that before and, depending on how it works, it could actually be used in my research. Use it to remove the magnetic scattering from my atomic structure work :p
I thought the statistics package was just for a good set of basics. When you start getting into percentiles you're starting to get into distributions and more advanced stuff. Though it has been a long time since I read the pep so I may be mistaken.
In any case, scipy.stats is your friend :P
"I can't share example data for security reasons" ...well I can't answer your question for "security reasons".
Ah ok. Wasn't sure whether it meant something in Finnish like "Ztane (noun) - Person who doesn't like Python 2 and thinks everyone should upgrade to Python 3 immediately."
Guys, does anyone know what 00 bytes in x86 assembly mean? Like I have RET instruction and then it seems to be a few zeros before anything meaningful starts again. Can this by some kind of padding?
I dimly recall an article by Raymond Chen, discussing internal practices of Windows executables.
One such practice is to put no-ops between functions. They do this so that later they can hand-edit the instructions to add additional commands, without having to reposition any later blocks.
You can use translate to directly change a letter to a different letter:
old = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
new = 'bcdefghijklmnopqrstuvwxyzaBCDEFGHIJKLMNOPQRSTUVWXYZA'
# Create a translate table.
trans = str.maketrans(old, new)
# Translate your string using trans
pri...
It's one of mine though so I feel bad promoting it (as such I won't vote)
from itertools import chain
def merge_dicts(*dicts):
all_keys = set().union(*dicts)
return {
key: list(chain.from_iterable(d.get(key, ()) for d in dicts))
for key in all_keys
}
@Ffisegydd you can nick that - ignore the fact my editor has lost my settings again...