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
find /run/media/ryansb -maxdepth 1 -type d | sed 1d |while read line | |
do | |
echo "$line" | |
rm -r $line/* | |
cp -r /home/ryansb/IGIC/*.pdf $line | |
chmod 777 $line/* | |
umount $line | |
done | |
echo "Done!" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from os import mkdir | |
from os import getcwd | |
from os.path import exists | |
DATA = open('/home/ryansb/random_corpus').read() | |
COUNTER = 0 |
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 PIL | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
font = ImageFont.truetype("/usr/share/fonts/dejavu/DejaVuSans.ttf", 75) | |
namelist = [ | |
# names go here | |
] |
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
def fpo(opt): | |
def fakereturn(noop): | |
return opt.pop(0) | |
return fakereturn | |
mock (pythong.project.prompt_optionlist = fpo(["Development Status", None, "Operating Systems", "Linux", "Fedora"])) | |
from pythong.classifiers import CLASSIFIERS | |
assert(recurse_prompt(CLASSIFIERS) == "Operating Systems :: Linux :: Fedora") |
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
sudo yum install -y gcc curl-devel | |
sudo yum localinstall -y http://pkgs.repoforge.org/htop/htop-1.0.2-1.el6.rf.x86_64.rpm | |
wget https://www.schneier.com/code/skein.zip | |
unzip skein.zip | |
cd NIST/CD/Optimized_64bit |
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 json | |
import urllib2 | |
import pygal | |
# construct our API URL with type parameter set to 'alltimesum' | |
apiurl = 'http://mcsafetyfeed.org/api/counts.php?type=alltimesum' | |
# retrieve the JSON object via the API URL | |
data = json.load( urllib2.urlopen( apiurl ) ) |
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
#!/bin/bash | |
set -e | |
if [ -z $2 ] | |
then | |
TYPE=users | |
else | |
TYPE=orgs | |
fi |
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
#!/bin/bash | |
set -e | |
cd backups | |
USERS=`python -c "import requests | |
for u in requests.get('https://api.github.com/orgs/FOSSRIT/public_members').json(): | |
print u['login']"` | |
for user in $USERS |
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
#!/bin/bash | |
set -e | |
echo $(echo -n [ | |
for csha in $(git rev-list master) | |
do | |
echo -n " | |
{\"author\": \"`git log --pretty=format:'%an <%ae>' -n1 $csha`\", | |
\"files\": [`for i in $(git ls-tree --name-only -r $csha); do echo -n \\\"$i\\\", ; done`] | |
}," |
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 json | |
from collections import defaultdict | |
gitinfo = json.loads(raw_input()) | |
files_by_user = defaultdict(set) | |
users_by_file = defaultdict(set) | |
for commit in gitinfo: | |
for f in commit['files']: |
OlderNewer