View unicodeToAscii.py
# Turn a Unicode string to plain ASCII, thanks to
# http://stackoverflow.com/a/518232/2809427
def unicodeToAscii(s):
return ''.join(
c for c in unicodedata.normalize('NFD', s)
if unicodedata.category(c) != 'Mn'
)
View android-perm-desc.json
{
"find accounts on the device": "Allows the app to get the list of accounts known by the device. This may include any accounts created by applications you have installed.",
"read your text messages (sms or mms)": "Allows the app to read SMS messages stored on your device or SIM card. This allows the app to read all SMS messages, regardless of content or confidentiality.",
"receive text messages (sms)": "Allows the app to receive and process SMS messages. This means the app could monitor or delete messages sent to your device without showing them to you.",
"send sms messages": "Allows the app to send SMS messages. This may result in unexpected charges. Malicious apps may cost you money by sending messages without your confirmation.",
"edit your text messages (sms or mms)": "Allows the app to write to SMS messages stored on your device or SIM card. Malicious apps may delete your messages.",
"read the contents of your usb storage": "Allows the app to read the contents of your USB storage.",
"modif
View apkpure_crawler.py
import sqlite3
from sqlite3 import Error
from tqdm import tqdm
import requests
import urllib.request
from pyquery import PyQuery as pq
from os.path import join
from requests import HTTPError
import time
View change_pixel.py
import scipy.misc
def change_pixel(img, new_name):
"""
Args: img, numpy array
Returns:
new_img
View AnnotatedReview.py
class AnnotatedReview:
def __init__(self, sentence, feature_list, opinion_list):
self.sentence = sentence
self.feature_list = feature_list
self.opinion_list = opinion_list
def __str__(self):
return self.sentence
def __repr__(self):
View sniffer.py
from scapy.all import *
import atexit
#
packet_stats = {}
def print_stats():
print("\npacket statistics")
print(packet_stats)
View send-packet.py
from scapy.all import *
def main():
"""
"""
packet = IP(dst="192.168.100.123")/TCP()/"from scapy packet"
send(packet)
def packet_with_seq_n():
View ovs-example.md

install openvswitch 2.4

uninstall ovs-2.5

sudo apt autoremove  openvswitch-common openvswitch-switch-dpdk openvswitch-dbg openvswitch-pki openvswitch-ipsec openvswitch-switch openvswitch-switch-dpdk openvswitch-ipsec openvswitch-test openvswitch-testcontroller openvswitch-vtep

download source code

wget http://openvswitch.org/releases/openvswitch-2.4.0.tar.gz

unpack and compile

View install.md

Install vim vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

config vimrc

add following into ~/.vimrc

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
View hunspell_config.md

install hunspell

brew install hunspell find the dictionary

en dictionary

then move dictionary to ~/Library/Spelling, thus hunspell can find it. using hunspell -D list search directories.