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 | |
| # Use PyMarkovChain to generate markov chains from news articles. | |
| import sys, os | |
| from emissary.models import Article | |
| from pymarkovchain import MarkovChain | |
| mc = MarkovChain(os.getenv('HOME') + os.sep + '.markovdb') | |
| if __name__ == "__main__": | |
| if len(sys.argv) < 3: |
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 | |
| #Print resident set size of a process | |
| ps aux|grep $*|grep -v grep|grep -v bash|awk '{$6=$6/1024; print $6 "MB\t" $11 "\t" $1;}'|sort -n |
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 | |
| import sys | |
| from goose import Goose | |
| import requests | |
| from subprocess import Popen, PIPE | |
| import errno | |
| requests.packages.urllib3.disable_warnings() | |
| def fetch(url): | |
| h={"User-Agent":"aread 0.01"} |
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 | |
| import sys, github3 | |
| def search_github(terms): | |
| data = [] | |
| results = github3.api.search_repositories(' '.join(terms)) | |
| for i in results: | |
| j = i.to_json() | |
| item={} | |
| item['url'] = j['git_url'].encode('ascii','ignore') |
NewerOlder