This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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' |
NewerOlder