Skip to content

Instantly share code, notes, and snippets.

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

Michiel Sikma msikma

๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ
View GitHub Profile
% 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
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)))
#!/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
\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"
}
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:
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 = 'ใใฆ'
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_type == ADJ_I:
suffix = 'ใใฆ'
cheap = Word(id=1153670) # ๅฎ‰ใ„
white = Word(id=1474910) # ็™ฝใ„
present = Phrase(cheap, white, tense=TENSE_PRESENT)
past = Phrase(cheap, white, tense=TENSE_PAST)
past_neg = Phrase(cheap, white, tense=TENSE_PAST, polarity=POLARITY_NEG)
# ใ“ใ‚Œใฏๅฎ‰ใใฆใ€็™ฝใ„ใงใ™ใ€‚
print('ใ“ใ‚Œใฏ' + str(present) + 'ใงใ™ใ€‚')
cheap = Word(id=1153670) # ๅฎ‰ใ„
yummy = Word(id=1486650) # ใŠใ„ใ—ใ„
present = Phrase(cheap, yummy, tense=TENSE_PRESENT)
past = Phrase(cheap, yummy, tense=TENSE_PAST)
past_neg = Phrase(cheap, yummy, tense=TENSE_PAST, polarity=POLARITY_NEG)
# ็‰›ไธผใฏๅฎ‰ใใฆใ€็พŽๅ‘ณใ—ใ„ใงใ™ใ€‚
print('็‰›ไธผใฏ' + str(present) + 'ใงใ™ใ€‚')
import requests
import json
import calendar
from datetime import datetime, timedelta
# https://api.slack.com/docs/oauth-test-tokens
_token = 'token'
_domain = 'hma'
if __name__ == '__main__':