- 1h
- 4h
- 1d
- 3d
- 1w
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
def get_bucket(): | |
return 'your bucket key' | |
def get_key(): | |
return 'get cache key' | |
def use_cache(f): | |
@wraps(f) | |
def decorated_function(*args, **kwargs): | |
client = boto3.client('s3') |
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
Searcher({ | |
baseUrl: String, | |
queries: Array<String>, | |
executeQuery: Function(Driver): Driver, | |
pages: 3, | |
goToNextPage: Function(Driver): NextPageDriver | |
scraper: Scraper, | |
}) | |
Scraper({ |
To allow make file auto completion just add the snippet here to your bash profile or .zshrc https://stackoverflow.com/a/38415982/965352
If you use zshell, you might have to add this before the the snippet.
autoload -U bashcompinit
bashcompinit
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 { UserComp, OtherPersonComp } from './components'; | |
const PersonComp = ({ InnerComp, person }) => { | |
return <section> | |
<InnerComp person={person}> | |
</section>; | |
} | |
const mapState = (state) => ({ | |
InnerComp: state.person.isUser ? UserComp : OtherPersonComp, |
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
i = 0 | |
def multiply(a, b): | |
i = i + 1 | |
print(i) | |
return a * b | |
def memoize_multiply(a, b): | |
# do stuff here | |
return multiply(a, b) |
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
/* Bills */ | |
{ | |
"2017-SB-0149": { | |
"id": "2017-SB-0149", | |
"sponsors": ["goeff-hansen"], | |
"categories": [ | |
{ | |
"name": "Appropriations: zero budget", | |
"url": "yadda yadda" | |
},{ |
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
// Sentence predictor | |
// Given some data | |
let data = 'A Stop on the Salt Route 1000 B.C. As they rounded a bend in the path that ran beside the river, Lara recognized the silhouette of a fig tree atop a nearby hill. The weather was hot and the days were long. The fig tree was in full leaf, but not yet bearing fruit. Soon Lara spotted other landmarks—an outcropping of limestone beside the path that had a silhouette like a mans face, a marshy spot beside the river where the waterfowl were easily startled, a tall tree that looked like a man with his arms upraised. They were drawing near to the place where there was an island in the river. The island was a good spot to make camp. They would sleep on the island tonight. Lara had been back and forth along the river path many times in her short life. Her people had not created the path—it had always been there, like the river—but their deerskin-shod feet and the wooden wheels of their handcarts kept the path well worn. Laras people were salt traders, and their livel |
Bill summarization with gensim
Following this tutorial
- Take whole bills
- Summarize into layman readable content
- Summarize changes
NewerOlder