Affiliates
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 sys | |
def load_answers(answer_filename): | |
answers = {} | |
lines = open(answer_filename).readlines() | |
for line in lines: | |
problem, answer = line.strip().split(': ') | |
answers[int(problem)] = answer | |
return answers |
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
* http://rosalind.info/ |
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
Current translation websites: | |
* http://pe-cn.github.io/ - Chinese - Github.io (Markdown + HTML problems) - https://github.com/PE-CN/PE-CN.github.io (mostly by https://github.com/sx349) | |
* https://marhale3.github.io/ - Persian - Github.io (Markdown + very little HTML) - https://github.com/marhale3/marhale3.github.io (mostly by https://github.com/marhale3) | |
* http://muratcorlu.com/euler/ - Turkish - Github.io (Markdown + very little HTML) - https://github.com/muratcorlu/euler/tree/gh-pages -- based on the Persian translation | |
* http://euler.jakumo.org/ - Russian - HTML - https://github.com/jakumo/euler-translates (mostly by https://github.com/stumbler) | |
* http://projekteuler.de/ - German - Bootstrap | |
* http://euler.synap.co.kr/ - Korean - PHP | |
* http://projecteuler.radumurzea.net/ - Romanian - PHP - https://github.com/SoboLAN/projecteuler-ro - downloads problem JSON data from http://projekteuler.de/problems/ - stores English & translation in `sql/data.sql` | |
* http://odz.sakura.ne.jp/projecteuler/ - Japanese - PukiWiki |
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 os | |
family = os.environ.get('FAMILY', 'wikipedia') | |
mylang = os.environ.get('LANGUAGE', 'en') | |
if os.environ.get('TRAVIS_REPO_SLUG', None) == 'wikimedia/pywikibot-core': | |
usernames[family][mylang] = 'Pywikibot-test' | |
usernames['wikipedia']['en'] = 'Pywikibot-test' | |
password_file = os.path.expanduser('~/.pywikibot/passwordfile') |
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
# -*- coding: utf-8 -*- | |
""" | |
Get a github user's fork of a gist. | |
Given a starting gist id, traverse the forks to find | |
a gist for the github username provided in the first | |
parameter of the command line. | |
""" | |
import json | |
import urllib2 |
If someone forks a gist and you'd like to merge their changes. Do this:
-
clone your repo, I use the name of the gist
git clone git://gist.github.com/1163142.git gist-1163142
-
add a remote for the forked gist, I'm using the name of my fellow developer
git remote add aaron git://gist.github.com/1164196.git
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 | |
""" | |
Print out a report of Wikipedia articles you've visited using your Google Chrome history database. | |
The output is in Markdown, and you'll need to shutdown Chrome before you run this or else the | |
database will be locked. | |
""" | |
import os | |
import re |
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
family = 'wikipedia' | |
mylang = 'en' | |
usernames['wikipedia']['en'] = 'JVbot-test' |
NewerOlder