This file contains hidden or 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
| module ActiveRecord | |
| class SchemaDumper | |
| def dump(stream) | |
| header(stream) | |
| extensions(stream) | |
| enums(stream) | |
| tables(stream) | |
| trailer(stream) | |
| stream | |
| end |
This file contains hidden or 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
| #!/bin/zsh | |
| # | |
| # Highlight a given file and copy it as RTF. | |
| # | |
| # Simon Olofsson <simon@olofsson.de> | |
| # | |
| set -o errexit | |
| set -o nounset |
This file contains hidden or 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 pymongo | |
| cl = pymongo.MongoClient() | |
| db = cl.ner-dict | |
| db = cl['ner-dict'] | |
| c = db.dict | |
| c.count | |
| c.count() | |
| qs = c.find() |
This file contains hidden or 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
| class Vocabulary | |
| # @param [String] file_name Path to a word2vec vocabulary binary file | |
| def initialize(file_name) | |
| @file_name = file_name | |
| @size = 0 | |
| @vocabulary = {} | |
| @word_count = 0 | |
| read_file | |
| end |
This file contains hidden or 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
| for f in `ls *.zip`; do unzip "$f" -d "${f%.zip}"; done |
NewerOlder