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 tempfile | |
import urllib.request as urlreq | |
train_file = tempfile.NamedTemporaryFile() | |
test_file = tempfile.NamedTemporaryFile() | |
urlreq.urlretrieve("https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data", train_file.name) | |
urlreq.urlretrieve("https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.test", test_file.name) | |
import pandas as pd | |
CSV_COLUMNS = [ | |
"age", "workclass", "fnlwgt", "education", "education_num", |
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
{"lastUpload":"2017-09-07T00:38:49.350Z","extensionVersion":"v2.8.3"} |
I hereby claim:
- I am coconuthack on github.
- I am dijonkock (https://keybase.io/dijonkock) on keybase.
- I have a public key ASDild67dSBn5_nsVLCOGG8v1N-JqOCNX1xRPjqmI8S40Ao
To claim this, I am signing this object:
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
<div class="def-panel" id="UDDIV_1"> | |
<div id="UDDIV_2"> | |
<div id="UDDIV_4"> | |
Top Definition | |
</div> | |
<div class="share small-6 columns" id="UDDIV_5"> | |
<a href="" target="_blank" id="UDA_6"> | |
<i class="svgicon svgicon-ud_twitter" id="UDI_7"> | |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" id="UDsvg_8"><path d="M7.3 8c5.4 2.8 9.9 2.6 9.9 2.6s-1.7-6.2 3.6-8.9 9 1.9 9 1.9.9-.3 1.6-.5c.7-.3 1.7-.7 1.7-.7l-1.6 3 2.5-.3s-.3.5-1.3 1.4l-1.4 1.4s.4 7.4-3.4 13.1c-3.8 5.7-8.7 9.1-15.9 9.9C4.9 31.6.2 28.6.2 28.6s3.1-.2 5.1-1 4.9-2.8 4.9-2.8-4.1-1.3-5.5-2.7c-1.5-1.4-1.8-2.3-1.8-2.3l4-.1s-4.2-2.3-5.4-4.1S0 12.1 0 12.1l3.1 1.3S.5 9.8.2 7s.5-4.3.5-4.3S1.9 5.2 7.3 8z" id="UDpath_9"></path></svg> | |
</i> |
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
/** | |
* TOC.js: create a table of contents for a document. | |
* | |
* This module registers an anonymous function that runs automatically | |
* when the document finishes loading. When it runs, the function first | |
* looks for a document element with an id of "TOC". If there is no | |
* such element it creates one at the start of the document. | |
* | |
* Next, the function finds all <h1> through <h6> tags, treats them as | |
* section titles, and creates a table of contents within the TOC |
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 Google CLass Gist | |
#hello.py program | |
#!/usr/bin/python | |
# import modules used here -- sys is a very standard one | |
import sys | |
# Gather our code in a main() function | |
def main(): |
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
//Eloquent javascript - CH12 | |
//Functions relating to the DOM | |
//Helper functions form other chapters | |
function escapeHTML(text) { | |
var replacements = [["&", "&"], ["\"", """], | |
["<", "<"], [">", ">"]]; | |
forEach(replacements, function(replace) { | |
text = text.replace(replace[0], replace[1]); | |
}); |
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
//EloquentJS CH10 Regex | |
var slash = /\//; | |
show("AC/DC".search(slash)); //-> 2 | |
var asteriskOrBrace = /[\{\*]/;//finds any of the '{' or '*' chars | |
var story = | |
"We noticed the *giant sloth*, hanging from a giant branch."; | |
show(story.search(asteriskOrBrace)); //-> 15 |
NewerOlder