Skip to content

Instantly share code, notes, and snippets.

View seowcy's full-sized avatar
💭
Available

Seow Chun Yong seowcy

💭
Available
View GitHub Profile
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
import sys
import random
DEFAULT_WORDLIST = "wordlist_10000.txt"
def load_wordlist(filename):
try:
with open(filename, 'r') as f:
wordlist = [word.strip().lower() for word in f.read().split('\n') if len(word.strip().lower()) in [8, 9, 10]]
"""
Script for comparing spam classification with a bag-of-words model constructed with and without hashing. You'll need to download a copy of the dataset from http://plg.uwaterloo.ca/~gvcormac/treccorpus07/about.html .
Copyright 2016 Ronald J. Nowling
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@seowcy
seowcy / gist:18cbbd72556b9b105eb627bc5d0efeef
Created March 5, 2019 03:18
Master node error message
[2019-03-04T19:01:12,558][WARN ][o.e.x.s.t.n.SecurityNetty4ServerTransport] [node_2] send message failed [channel: NettyTcpChannel{localAddress=/192.168.10.21:9300, remoteAddress=/192.168.10.24:58352}]
java.nio.channels.ClosedChannelException: null
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source) ~[?:?]
@seowcy
seowcy / gist:1143496427e09cc1330576d93b51421e
Created March 5, 2019 03:16
node_5 failed to send join request to master
[2019-03-06T02:22:18,190][INFO ][o.e.e.NodeEnvironment ] [node_5] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [174.8gb], net total_space [192.7gb], types [ext4]
[2019-03-06T02:22:18,193][INFO ][o.e.e.NodeEnvironment ] [node_5] heap size [1015.6mb], compressed ordinary object pointers [true]
[2019-03-06T02:22:18,197][INFO ][o.e.n.Node ] [node_5] node name [node_5], node ID [HUrmoO3eStOS1EwtHnazbw]
[2019-03-06T02:22:18,197][INFO ][o.e.n.Node ] [node_5] version[6.5.4], pid[2392], build[default/tar/d2ef93d/2018-12-17T21:17:40.758843Z], OS[Linux/4.15.0-43-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_191/25.191-b12]
[2019-03-06T02:22:18,197][INFO ][o.e.n.Node ] [node_5] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow