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
#~ Rough code to get you going with Stanford POS Tagger on NLTK. | |
#~ http://netmatrx.com | |
#~ | |
import os | |
#~from nltk.parse import stanford | |
os.environ['JAVAHOME'] = 'C:\Program Files\Java\jdk1.8.0_91' | |
#os.environ['STANFORD_POSTAGGER'] = 'C:\stanford\stanford-postagger-3.6.0.jar' |
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 request as re | |
from bs4 import BeautifulSoup as bs | |
url = '' | |
headers={"User-Agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36"} | |
#headers ={"User-Agent": ""} | |
s = re.Sessions() | |
#then |
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
$(document).ready(function () { | |
//open popup | |
$(".pop").click(function () { | |
$(this).parent().find("form .overlay_form").fadeIn(1000); | |
positionPopup(); | |
}); | |
//close popup | |
$(".close").click(function () { | |
$(".overlay_form").fadeOut(500); |
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
<script> | |
// Popup Window | |
var scrollTop = ''; | |
var newHeight = '100'; | |
$(window).bind('scroll', function() { | |
scrollTop = $( window ).scrollTop(); | |
newHeight = scrollTop + 100; | |
}); | |
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 datetime | |
from datetime import timedelta | |
pdt = datetime.datetime.utcnow() - datetime.timedelta(seconds=25200) | |
""" seconds are equivalent of time difference, utc - 7 = pdt """ |
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 pandas as pd | |
import requests as re | |
import sqlite3 as sql | |
from wordsegment import unigram_counts as uc | |
#globals | |
con = sql.connect("C:\\Users\\win10\\YandexDisk\\apps\\flask\\new_file.sqlite") | |
df0 = pd.read_sql("SELECT * from do_1", con, index_col='host') | |
df = df0.copy() | |
wordniklist = [] |
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
apt-get install python3-pip | |
alias pip=pip3 | |
apt-get install python3-virtualenv | |
#virtualenv can also be installed using | |
pip install --user virtualenv |
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
apt-get install npm | |
apt-get install nodejs-legacy | |
npm install phantomjs-prebuilt | |
apt-get install libfontconfig | |
phantomjs -v |
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
bar = pyprind.ProgBar(len(df.host.tolist())) | |
def check_extensions(domain): | |
ext_taken = {'de':'','uk':'','org':'','net':'','ca':'','info':'','eu':'', | |
'fr':'','es':'','nl':'','biz':'','com':'','host':'','be':'','it':'', | |
'se':'','no':'','jp':'','fi':'','ie':''} | |
de_ = domain + '.de' | |
uk_ = domain + '.co.uk' | |
org_ = domain + '.org' | |
net_ = domain + '.net' |
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
# | |
## aria2 config | |
# | |
# man page = http://aria2.sourceforge.net/manual/en/html/aria2c.html | |
# file path = $HOME/.aria2/aria2.conf | |
# Download Directory: specify the directory all files will be downloaded to. | |
# When this directive is commented out, aria2 will download the files to the | |
# current directory where you execute the aria2 binary. | |
#dir=/some/download/ |
OlderNewer