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 requests | |
import bs4 | |
import csv | |
URL = 'http://www.dllr.state.md.us/employment/warn.shtml' | |
warn_page = requests.get(URL) | |
soup = bs4.BeautifulSoup(warn_page.text, 'html.parser') | |
table = soup.find('table') | |
rows = table.find_all('tr') |
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 csv | |
from collections import OrderedDict | |
CLEANED_DICT = OrderedDict() | |
METADATA_FIELDS = ['districtID','district','schoolID','school'] | |
VALUE_FIELDS = [] | |
with open('schools.csv') as csvfile: | |
reader = csv.DictReader(csvfile) | |
for row in reader: |
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
bible_objects = ['seed', 'gold', 'resin', 'onyx', 'fruit', 'fig leaves', 'fruit', 'vegetables', 'portion of meat', 'ark', 'olive leaf', 'burnt offerings', 'wine', 'bricks', 'silver', 'gold', 'tents', 'bread', 'wine', 'heifer carcass', 'goat carcass', 'ram carcass', 'brazier', 'torch', 'flour', 'curds', 'milk', 'veal', 'bread', 'one thousand silver shekels', 'food', 'skin of water', 'wood', 'knife', 'burnt offering', 'four hundred silver shekels', 'jar', 'gold nose ring', 'gold bracelets', 'straw', 'fodder', 'gold and silver jewellery', 'clothing', 'bread', 'lentil stew', 'quiver', 'bow', 'clothes', 'goatskins', 'bread', 'food', 'wine', 'stone', 'oil', 'mandrake plants', 'poplar branches', 'almond branches', 'watering troughs', 'tent', 'gods', 'saddle', 'stone', 'stones', 'food', 'one hundred pieces of silver', 'tent', 'altar', 'idols', 'earring', 'stone', 'oil', 'ornamented robe', 'food', 'spices', 'balm', 'myrrh', 'twenty shekels', 'clothes', 'goat carcass', 'sackcloth', 'clothes', 'veil', 'seal', 'cord', 's |
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
[{"key":1,"value":{"City":"Kansas City","Team Name":"Royals"}},{"key":2,"value":{"City":"Detroit","Team Name":"Tigers"}},{"key":3,"value":{"City":"Minnesota","Team Name":"Twins"}}] |
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="image-gif-wrapper"> | |
<img class="lazy-load" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" width="600" data-src="https://assets.opennews.org/img/loops/gif-placeholder.png" rel:animated_src="https://assets.opennews.org/img/loops/Phenakistoscope_12.gif"> | |
</div> | |
<script src="https://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/blazy/latest/blazy.min.js"></script> | |
<script src="https://assets.opennews.org/js/libgif_wtf.js"></script> | |
<style> | |
.jsgif { |
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
War On Christmas | |
Glow | |
Cambian | |
Somnambulance | |
Long March | |
Seperate But Equal | |
Peterson | |
Thompson | |
Twelve Days Awake | |
Everyone Gets Shot |
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
git config --global alias.amend 'commit --amend --no-edit' |
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 datetime | |
import dateutil.parser | |
from django import forms | |
class FuzzyDateTimeField(forms.Field): | |
''' | |
Like a DateTimeField, but uses dateutil.parser to parse datetime. | |
http://www.djangosnippets.org/snippets/1422/ | |
''' |
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
{ | |
"geometry": { | |
"type": "MultiPolygon", | |
"coordinates": [ | |
[ | |
[ | |
[ | |
-117.604044, | |
47.615714 | |
], |
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
{ | |
"release": { | |
"id": "acs2012_5yr", | |
"name": "ACS 2012 5-year", | |
"years": "2008-2012" | |
}, | |
"tables": { | |
"B01001": { | |
"title": "Sex by Age", | |
"universe": "Total Population", |
NewerOlder