Skip to content

Instantly share code, notes, and snippets.

View jerielizabeth's full-sized avatar

Jeri Elizabeth jerielizabeth

View GitHub Profile
<section class="block">
<h2>some header </h2>
<p>Some text</p>
<a href="#">Read More</a>
</section>
<section class="block">
<h2>another header </h2>
<p>Some text</p>
<a href="#">Read More</a>
.block {
width: 30%;
float:left;
background-color: gray;
margin: 10px;
}
.navigation {
background-color:green;
width: 33%;
import nltk
with open('sample.txt', 'r') as f:
sample = f.read()
sentences = nltk.sent_tokenize(sample)
tokenized_sentences = [nltk.word_tokenize(sentence) for sentence in sentences]
tagged_sentences = [nltk.pos_tag(sentence) for sentence in tokenized_sentences]
chunked_sentences = nltk.batch_ne_chunk(tagged_sentences, binary=True)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jerielizabeth
jerielizabeth / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jerielizabeth
jerielizabeth / header.php
Created February 24, 2015 23:13
search_form parameters
<?php echo search_form(array('show_advanced' => true, 'submit_value' => 'Lucky', 'form_attributes' => array('role' => 'search', 'class' => 'form'))); ?>
@jerielizabeth
jerielizabeth / gist:4008975
Created November 3, 2012 21:48
Install beautiful Soup
pip install beautifulsoup4
@jerielizabeth
jerielizabeth / gist:4009376
Created November 3, 2012 23:55
original html file for 43rd congress search
<!-- saved from url=(0053)http://bioguide.congress.gov/biosearch/biosearch1.asp -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Congressional Biographical Directory</title></head>
<body background="./43rd-congress_files/paper1.gif" text="#000000">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td width="100%" valign="TOP" bgcolor="#990000"><center><img src="./43rd-congress_files/topbanner.jpg" border="0"></center></td>
</tr></tbody></table>
@jerielizabeth
jerielizabeth / gist:4009383
Created November 3, 2012 23:58
names and emails, 43rd congress
"ADAMS, George Madison",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000035
"ALBERT, William Julian",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000074
"ALBRIGHT, Charles",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000077
"ALCORN, James Lusk",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000079
"ALLISON, William Boyd",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000160
"AMES, Adelbert",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000172
"ANTHONY, Henry Bowen",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000262
"ARCHER, Stevenson",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000274
"ARMSTRONG, Moses Kimball",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000283
"ARTHUR, William Evans",http://bioguide.congress.gov/scripts/biodisplay.pl?index=A000304
@jerielizabeth
jerielizabeth / script.py
Created November 4, 2012 00:40
BeautifulSoup Script
from bs4 import BeautifulSoup
soup = BeautifulSoup (open("43rd-congress.html"))
final_link = soup.p.a
final_link.decompose()
clean_list = []
links = soup.find_all('a')
for link in links: