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
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
#!/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
\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
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
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
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 = 'ใใฆ' |
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
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) + 'ใงใใ') |
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
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) + 'ใงใใ') |
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 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__': |