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 urllib2, json, pprint, re, datetime | |
import mwparserfromhell | |
def _parseDate(wikiDate): | |
''' Parse a mediawiki date template -- assumes years, month, day | |
Input: | |
a mwparser object containing just the date to be parsed | |
Returns: | |
datetime.date object of the date | |
''' |
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
from __future__ import division | |
from random import random | |
import numpy as np | |
import pandas as pd | |
''' | |
Use regret-matching algorithm to play Scissors-Rock-Paper. | |
''' | |
class RPS: |
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
{ | |
"python": { | |
"library": "import json\ndef black_reformat(cell_text):\n import black\n import re\n cell_text = re.sub('^%', '#%#', cell_text, flags=re.M)\n try:\n reformated_text = black.format_str(cell_text, 88)\n except TypeError:\n reformated_text = black.format_str(cell_text, mode=black.FileMode(line_length=88))\n return re.sub('^#%#', '%', reformated_text, flags=re.M)", | |
"prefix": "print(json.dumps(black_reformat(u", | |
"postfix": ")))" | |
}, | |
"r": { | |
"library": "library(formatR)\nlibrary(jsonlite)", | |
"prefix": "cat(toJSON(paste(tidy_source(text=", | |
"postfix": ", output=FALSE)[['text.tidy']], collapse='\n')))" |
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
{"ISO 693-3":"aaa","Language Name":"Ghotuo","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaa"} | |
{"ISO 693-3":"aab","Language Name":"Arum","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aab"} | |
{"ISO 693-3":"aac","Language Name":"Ari","Language Family":"Trans-New Guinea","Subgrouping":"Gogodala-Suki","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aac"} | |
{"ISO 693-3":"aad","Language Name":"Amal","Language Family":"Sepik","Subgrouping":"Iwam","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aad"} | |
{"ISO 693-3":"aaf","Language Name":"Aranadan","Language Family":"Dravidian","Subgrouping":"Southern","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaf"} | |
{"ISO 693-3":"aai","Language Name":"Miniafia Oyan","Language Family":"Austronesian","Subgrouping":"Malayo-Pol |
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
height: 750 |
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
""" | |
This module implements class LatexItems which is useful as an alternative | |
to manim's BulletedList. | |
Unless BulletedList, LatexItems uses standard latex itemize environment to | |
typeset the text and the bullets. The width of the paragraphs can be customized | |
as well as the kind of environment (itemize, enumerate, or description) | |
""" | |
from manim import Tex, TexTemplate |
Install Package Control for easy package management.
- Open the console with
Ctrl+`
- Paste in the following:
Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.