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
if self.is_type(ADJ_I): | |
stem_kana = self.conjugations['stem_kana'] | |
stem_kanji = self.conjugations['stem_kanji'] | |
conj = self.conjugations['conj'] | |
suffix = '' | |
next_type = None if next is None else next.get_type() | |
if next.is_type(ADJ_I): | |
suffix = 'ใใฆ' |
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
next_item = Word() | |
# next_item is either a Word object, which has .is_type(), or it's None | |
if next_item is None: | |
# code for situation A | |
elif next_item.is_type('something'): | |
# code for situation B | |
elif next_item.is_type('something_else'): | |
# code for situation C | |
else: |
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
\version "2.18.2" | |
\language "english" | |
% Time signature for the first section, bars 1-7. | |
part-one = { | |
\key g \minor | |
\time 4/4 | |
\tempo "Largo" | |
} |
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
#!/usr/bin/env python3 | |
from bz2 import BZ2Decompressor | |
class BZ2TextFileStreamer: | |
''' | |
Iterates through a bzip2 compressed text file, decoding as it goes along | |
and yielding lines one by one until the end of the file. Since the file | |
is not completely contained in memory, it can be used to decode |
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
include-header = | |
#(define-void-function (parser location)() | |
(define lang "") | |
(define ext ".ily") | |
(if (defined? 'HEADERS-LANG) | |
(set! lang (string-append "-" HEADERS-LANG))) | |
(if (defined? 'HEADERS-EXT) | |
(set! ext (string-append "." HEADERS-EXT))) | |
(ly:parser-include-string parser (format "\\include \"~A~A~A\"\n" "header" lang ext))) |
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
% Ballade No.1 in G Minor, Op.23 (F.Chopin, 1835-1836) | |
% music.ly - main music markup | |
% | |
% (C) 2016, Michiel Sikma <[email protected]> | |
% Licensed under CC BY-SA 4.0. | |
% TODO: | |
% [ ] add fingering | |
% [ ] add all slurs | |
% [ ] remove all fixmes |
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
$ which asdf.py | |
/Users/msikma/.virtualenvs/kc/bin/asdf.py | |
$ which python | |
/Users/msikma/.virtualenvs/kc/bin/python | |
$ cat /Users/msikma/.virtualenvs/kc/bin/asdf.py |
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
$ ./setup.py develop | |
running develop | |
running egg_info | |
writing dependency_links to kanaconv.egg-info/dependency_links.txt | |
writing top-level names to kanaconv.egg-info/top_level.txt | |
writing entry points to kanaconv.egg-info/entry_points.txt | |
writing kanaconv.egg-info/PKG-INFO | |
reading manifest file 'kanaconv.egg-info/SOURCES.txt' | |
writing manifest file 'kanaconv.egg-info/SOURCES.txt' |
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
$ ./setup.py develop | |
running develop | |
running egg_info | |
writing dependency_links to kanaconv.egg-info/dependency_links.txt | |
writing top-level names to kanaconv.egg-info/top_level.txt | |
writing entry points to kanaconv.egg-info/entry_points.txt | |
writing kanaconv.egg-info/PKG-INFO | |
reading manifest file 'kanaconv.egg-info/SOURCES.txt' | |
writing manifest file 'kanaconv.egg-info/SOURCES.txt' |
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
running sdist | |
running egg_info | |
writing kanaconv.egg-info/PKG-INFO | |
writing entry points to kanaconv.egg-info/entry_points.txt | |
writing top-level names to kanaconv.egg-info/top_level.txt | |
writing dependency_links to kanaconv.egg-info/dependency_links.txt | |
reading manifest file 'kanaconv.egg-info/SOURCES.txt' | |
writing manifest file 'kanaconv.egg-info/SOURCES.txt' | |
warning: sdist: standard file not found: should have one of README, README.rst, README.txt |