Skip to content

Instantly share code, notes, and snippets.

View msikma's full-sized avatar
๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ

Michiel Sikma msikma

๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ
View GitHub Profile
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 = 'ใใฆ'
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:
\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"
}
#!/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
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)))
% 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
$ 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
$ ./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'
$ ./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'
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