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
# pip install PyGithub | |
from github import Github | |
g = Github("username", "password") | |
for users in g.search_users("language name", location="location name"): | |
print(users) |
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 yagmail | |
import csv | |
import logging | |
""" | |
requirements: | |
pip install yagmail | |
pip install keyrings.alt | |
""" |
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 os | |
import json | |
import subprocess | |
from flask import Flask | |
from flask import render_template | |
app = Flask(__name__) | |
####################### | |
""" |
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 csv | |
import jsonlines | |
#import pprint | |
# open the file and put it in a list | |
with jsonlines.open("github_emails_data.jl") as f: | |
json_file = [line for line in f] | |
#print(pprint.pprint(json_file)) |
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 requests | |
import json | |
import pprint | |
def user_name(json_string): | |
user = json.loads(str(json_string)) | |
return user.get("login") | |
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
''' | |
taken from the raymond hettingers take on threading https://dl.dropboxusercontent.com/u/3967849/pyru/_build/html/threading.html | |
''' | |
import threading, time, random, queue | |
########################################################################################## | |
# Fuzzing is a technique for amplifying race condition errors to make them more visible | |
FUZZ = True |
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
a=1 | |
function nolocal { | |
a=2 | |
} | |
nolocal | |
echo $a # output 2 |
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
a=1 | |
function nolocal { | |
echo $1 | |
} | |
echo $(nolocal 2) # output 2 | |
echo $a # output 1 |
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
function last_difference | |
{ | |
grep -n "${pattern}" "${parse_file}" \ | |
| tail -1 | awk '{print $1}' |\ | |
cut -d ":" -f1 | |
} | |
function all_differences | |
{ |
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
bash-4.2$ x=10 | |
bash-4.2$ echo $((x+1)) | |
11 | |
bash-4.2$ y="10" | |
bash-4.2$ echo $((y+1)) | |
11 |
OlderNewer