I hereby claim:
- I am denten on github.
- I am denten (https://keybase.io/denten) on keybase.
- I have a public key whose fingerprint is 1A8E E770 7D12 E21A 74D4 4EF9 0F2F 4130 D9C1 0F89
To claim this, I am signing this object:
| services.udev.extraRules = '' | |
| SUBSYSTEM=="power_supply" | |
| ATTR{status}=="Discharging" | |
| ATTR{capacity}=="[0-5]" | |
| RUN+="/run/current-system/sw/bin/systemctl hibernate" | |
| ''; |
| #!/bin/bash | |
| # this bash script simplifies long pandoc incantations | |
| # sh print.sh [-d|p|m] filename.md | |
| # remember to update the cases with your own paths / pandoc commands | |
| # pass the file name as an argument | |
| if [ $# -eq 0 ] | |
| then | |
| echo "pass the file name" |
I hereby claim:
To claim this, I am signing this object:
| import pymongo | |
| from nltk.data import LazyLoader | |
| from nltk.tokenize import TreebankWordTokenizer | |
| from nltk.util import AbstractLazySequence, LazyMap, LazyConcatenation | |
| class MongoDBLazySequence(AbstractLazySequence): | |
| def __init__(self, host='localhost', port=27017, db='test', collection='corpus', field='text'): | |
| self.conn = pymongo.Connection(host, port) | |
| self.collection = self.conn[db][collection] | |
| self.field = field |
| import pandas as pd | |
| # check out other read methods http://pandas.pydata.org/pandas-docs/stable/io.html | |
| df = pd.read_csv('data/network-csv/network.csv') | |
| df.describe() | |
| df.plot(x='col_name_1', y='col_name_2', style='o') |
| import nltk | |
| wsj = nltk.corpus.treebank.tagged_words(simplify_tags=True) | |
| cdf = nltk.ConditionalFreqDist((tag, word) for (word, tag) in wsj) | |
| wordlist = cdf['VN'].keys() | |
| for ndx, (word, tag) in enumerate(wsj): | |
| if word in wordlist and tag == 'IN': | |
| print wsj_list[ndx-1:ndx+1], ndx, i |
| import nltk | |
| wsj = nltk.corpus.treebank.tagged_words(simplify_tags=True) | |
| cdf = nltk.ConditionalFreqDist((tag, word) for (word, tag) in wsj) | |
| wordlist = cdf['VN'].keys() | |
| # Bug 1: strange iteration exceptions in the for loop | |
| # Solution: wsj is a custom NLTK data type "ConcatenatedCorpusView" | |
| # convert wsj into a native python type "list" for better iteration. |
| Configuration file: /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/_config.yml | |
| Source: /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk | |
| Destination: /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/_site | |
| Generating... Compiling LESS: lessc --yui-compress /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/static/css/style.less /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/_site/static/css/style.css | |
| /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/_plugins/lessjs.rb:45:in `block in generate': LESS compilation error (RuntimeError) | |
| from /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/_plugins/lessjs.rb:24:in `each' | |
| from /home/denten/gDrive/Code/Web/denten.github.io/sbin.dk/_plugins/lessjs.rb:24:in `generate' | |
| from /var/lib/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:227:in `block in generate' | |
| from /var/lib/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:226:in `each' | |
| from /var/lib/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:226:in `genera |
| Columbia's *Record* has recently asked me to define digital humanities for an upcoming issue about the state of the field on campus. My best attempt at it was to write: | |
| Digital humanities are a diverse set of overlapping academic practices which usually include some mixture of 1) computational and otherwise experimental approaches to the study of the human condition; 2) modalities of cultural preservation, content curation, and knowledge design; and finally, 3) social advocacy and professional reform in response to developments in information technology. |