then move dictionary to ~/Library/Spelling
, thus hunspell can find it.
using hunspell -D
list search directories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scipy.misc | |
def change_pixel(img, new_name): | |
""" | |
Args: img, numpy array | |
Returns: | |
new_img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.all import * | |
import atexit | |
# | |
packet_stats = {} | |
def print_stats(): | |
print("\npacket statistics") | |
print(packet_stats) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 |
Download from sourceforge
(setq org-pomodoro-audio-player "C:/Applications/mplayer/mplayer.exe ")
Write this code under dotspacemacs/user-config
vlc.exe only work with backslash in windows system, but org-pomodoro
use slash as path separator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import spacy | |
import string | |
import re | |
from nltk.tokenize.stanford_segmenter import StanfordSegmenter | |
from nltk.tokenize import sent_tokenize | |
def remove_nonascii(document): | |
printable = set(string.printable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
""" | |
@param board: the sudoku puzzle | |
@return: nothing | |
""" | |
def solveSudoku(self, board): | |
# write your code here | |
# if not board: return | |
# print('start') | |
empty_cells = self.getEmptyXY(board) |