Skip to content

Instantly share code, notes, and snippets.

View rafeekpro's full-sized avatar

Rafal Lagowski rafeekpro

View GitHub Profile
import requests
import json
domain = "https://mydomain.com"
useragent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'
s = requests.Session()
url = 'https://sitereview.bluecoat.com/resource/lookup'
postData = {'url': domain, 'captcha': ''}
@rafeekpro
rafeekpro / adult_test.py
Last active March 9, 2019 11:30
Basic analysis of adult income
import pandas as pd
import numpy as np
np.random.seed(2019)
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.model_selection import cross_val_score
from sklearn.metrics import accuracy_score, f1_score
@rafeekpro
rafeekpro / centos_python_env_setup
Last active May 20, 2016 08:31 — forked from iDevPy/centos_python_env_setup
CentOS 7: Install Python 3.5.1, pip, virtualenv, and virtualenvwrapper on CentOS. Run this script as "root (sudo su -)" without sudo.
#!/bin/bash
#####################################################################
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
# Copyright (C) 2015 Ivan Rivera
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
def store_dir
"#{Rails.root}/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end