It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
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
| I'm broken. Please show this to someone who can fix can fix | |
| -- | |
| I dddon't go any higher than filll. | |
| -- | |
| Things are pretty mixed up, but I think the worst is over. | |
| -- | |
| Sorry, I don't know how to help in this situation. | |
| Maybe you should try asking a human? | |
| -- | |
| If you really absolutely need more capacity, |
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
| exec("\n".join(l[:len(l)//2+1].strip().replace("X"," "*4)for l in"""ni l rof)4*" ","X"(ecalper.)(pirts.]1+2//)l(nel:[l(nioj."n\"(cexe | |
| import sysys tropmi | |
| for l in sys.stdin.readlines():)(senildaer.nidts.sys ni l rof | |
| XL=l.rstrip("\\n");print(L==L[::-1])]1-::[L==L(tnirp;)"n\\"(pirtsr.l=LX | |
| ))]1-:1[)"n\"(tilps.""".split("\n")[1:-1])) |
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
| sage: %paste | |
| def cgfh(cg_plus_fh): | |
| for cg in range(1, cg_plus_fh): | |
| fh = cg_plus_fh - cg | |
| for c in divisors(cg): | |
| for f in divisors(fh): | |
| yield (c, cg//c, f, fh//f) | |
| for r in range(1, 99, 2): | |
| cg_plus_fh = (101^2 - r^2)/4 |
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
| \documentclass[12pt]{standalone} | |
| \usepackage{tgtermes} | |
| \usepackage{tgheros} | |
| \usepackage[T1]{fontenc} | |
| \usepackage{tikz} | |
| \usetikzlibrary{arrows} | |
| \usetikzlibrary{arrows.meta} | |
| \usetikzlibrary{calc} |
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
| moved to: https://github.com/blabber/mastodoji |
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 random | |
| import math | |
| class Num(object): | |
| def __init__(self, val): | |
| self.value = val | |
| self.bit = False | |
| def __repr__(self): | |
| return str(self.value) | |
| def __abs__(self): | |
| return self |
With NLTK version 3.1 and Stanford NER tool 2015-12-09, it is possible to hack the StanfordNERTagger._stanford_jar to include other .jar files that are necessary for the new tagger.
First set up the environment variables as per instructed at https://github.com/nltk/nltk/wiki/Installing-Third-Party-Software
- Go to System Preferences -> Keyboard -> Modifier Keys...
- Change “Caps Lock” to “No action”
- Install Seil
- Change the Caps Lock key in Seil to keyCode 80 (F19)
- Install Karabiner
- Open Karabiner and go to Misc & Uninstall -> Open private.xml
- Copy the contents of this gist's example to the XML file and save
- In Karabiner, go to Change Keys -> Reload XML
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://geekgirl.io/concurrent-http-requests-with-python3-and-asyncio/ | |
| Concurrent HTTP Requests with Python3 and asyncio | |
| My friend who is a data scientist had wipped up a script that made lots (over 27K) of queries to the Google Places API. The problem was that it was synchronous and thus took over 2.5hours to complete. | |
| Given that I'm currently attending Hacker School and get to spend all day working on any coding problems that interests me, I decided to go about trying to optimise it. | |
| I'm new to Python so had to do a bit of groundwork first to determine which course of action was best. |
NewerOlder