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
{ | |
"breadcrumbs": [ | |
{ | |
"name": "検索結果 4,000 以上 のうち 1-48件" | |
}, | |
{ | |
"name": "\"roblox\"" | |
} | |
], | |
"products": [ |
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
export PGPORT ?= 4488 | |
PG_PATH ?= $(shell if test -d /usr/lib/postgresql/9.1; then echo /usr/lib/postgresql/9.1; else echo /usr/lib/postgresql/8.4; fi) | |
PG_DIR = ${PWD}/instance/var | |
PG_DATA = ${PG_DIR}/data | |
PG_RUN = ${PG_DIR}/run | |
PG_LOG = ${PG_DIR}/log | |
PG_SOCKET = ${PG_RUN}/.s.PGSQL.${PGPORT} | |
PGPARAMS = -D ${PG_DATA} -o "-F -c unix_socket_directory=${PG_RUN} -c custom_variable_classes='busy' -c busy.active_user=0" -l ${PG_LOG}/pg.log | |
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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
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
{"options": {"A": "ごはん", "C": "やさい", "B": "おにぎり", "D": "くだもの"}, "key": "C. やさい", "stem": "A:「野菜」も食(た)べなさい! B:いや、きらい!"} | |
{"key": "で", "stem": "すしは、て( )食べるものです。"} | |
{"options": {"A": "せんせ", "C": "せっせん", "B": "そんせん", "D": "せんせい"}, "key": "D. せんせい", "stem": "「先生」はどこにいますか?"} | |
{"options": {"A": "ゆうびんきょく", "C": "としょしつ", "B": "ぎんこう", "D": "ほうどうきょく"}, "key": "A. ゆうびんきょく", "stem": "「郵便局」できってを買(か)います。"} | |
{"key": "を", "stem": "すみません。でんわばんごう( )まちがえました。"} | |
{"options": {"A": "鋭ぎ", "C": "脱ぎ", "B": "税ぎ", "D": "脂ぎ"}, "key": "C. 脱ぎ", "stem": "靴を「ぬぎ」なさい。"} | |
{"options": {"A": "の,で", "C": "の,に", "B": "と,で", "D": "と,に"}, "key": "D. と,に", "stem": "きょうしつは一かい( )二かい( )あります。"} | |
{"options": {"A": "くつ", "C": "かばん", "B": "あし", "D": "ずぼん"}, "key": "A. くつ", "stem": "「靴」をはきます。"} | |
{"options": {"A": "から", "C": "だけ", "B": "に", "D": "が"}, "key": "A. から", "stem": "じゅぎょうは10じ( )です。"} | |
{"options": {"A": "より", "C": "しか", "B": "は", "D": "ぐらい"}, "key": "A. より", "stem": "ラーメン( )ごはんのほうがすきです。"} |
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
# Copyright (C) 2013 Wesley Baugh | |
"""Tools for text classification. | |
Extracted from the [infer](https://github.com/bwbaugh/infer) library. | |
""" | |
from __future__ import division | |
import math | |
from collections import defaultdict, namedtuple, Counter | |
from fractions import Fraction |
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 spacy | |
class ColourExtractorStrict: | |
"""Extract colours along with adjectives""" | |
def __init__(self, colours): | |
self.colours = colours | |
self.pos_ok = ['ADJ', 'NOUN'] | |
self.tagger = spacy.load('en') |
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 slytherin(string): | |
"""Convert & return strings in camelCase to snake_case""" | |
tmp = re.sub(pattern=r'(.)([A-Z][a-z]+)', repl=r'\1_\2', string=string) | |
return re.sub(pattern=r'([a-z0-9])([A-Z])', repl=r'\1_\2', string=tmp)\ | |
.lower() |
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
for file in $(find . -type f -print); do zipinfo -m "$file" | awk -v filename="$file" -F ' ' '{ print $4, "\t", $6, "\t", $10, "\t", filename }'; done; |
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
#!/bin/bash | |
for filename in $(find . -type f -print) | |
do | |
du_out=$(du -s $filename) | |
splitted=($(echo ${du_out})) | |
size="${splitted[0]}" | |
abs_path="${splitted[1]}" | |
parent_dir=$(basename $(dirname "$abs_path")) | |
filename=$(basename "$abs_path") |
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
for filename in $(find . -type f -print); do du -s "$filename"; done |
NewerOlder