code stringlengths 3 6.57k |
|---|
time3_trans() |
stop_sirene1() |
stop_sirene2() |
disable_all_timers() |
delete_current_music() |
print("State is not 4, will do nothing") |
time2_trans() |
start_sirene2() |
Timer(t4_5,time3_trans) |
start() |
print("State is not 2, will do nothing") |
time1_trans() |
start_sirene1() |
Timer(t2_4,time2_trans) |
start() |
print("State is not 1, will do nothing") |
btn_trans(a,edge) |
print("Button: %s , edge: %s, state: %d" % (str(a) |
str(edge) |
Timer(t1_2,time1_trans) |
start() |
and (state is 1 or state is 4 or state is 2) |
disable_all_timers() |
stop_sirene1() |
stop_sirene2() |
play_next() |
tell_gobbelz("Cannot play next song. Sorry:(") |
tell_gobbelz("Bailing out") |
sys.exit(1) |
print("button released while removing music, all fine") |
print("this should never happen") |
disable_all_timers() |
print("disabling all the timers") |
timer.cancel() |
print("timer canceled") |
start_sirene1() |
print("start Sirene 1") |
RPIO.output(loud1, True) |
start_sirene2() |
print("starting Sirene 2") |
RPIO.output(loud2, True) |
stop_sirene1() |
print("stopping Sirene 1") |
RPIO.output(loud1, False) |
stop_sirene2() |
print("stopping Sirene 2") |
RPIO.output(loud2, False) |
play_radio() |
r.get_current() |
get("file", "") |
print("will not skip own sender") |
print("playing radio") |
tell_gobbelz("Starting Radio Stream") |
r.add_song("http://ice.somafm.com/groovesalad") |
r.play_last() |
play_next() |
print ("playing next song") |
is_last_song() |
Exception("Last song in playlist") |
r.next_song() |
print("no next song, starting radio") |
play_radio() |
is_last_song() |
r.get_current() |
r.get_last() |
delete_current_music() |
print("delete current music") |
r.get_current() |
print("Nothing is running, bailing out") |
delete_remote_file(current) |
play_next() |
delete_remote_file(current) |
sftp_delete_remote_file(current["file"]) |
say_song_killed(current.get("Title", "Unbekannter Title") |
current.get("Artist", "Unbekannter Kuenstler") |
print("Cannot delete remote file! ( %s ) |
str(e) |
sftp_delete_remote_file(f) |
paramiko.Transport((host, port) |
transport.connect(username=username, password=passwd) |
paramiko.SFTPClient.from_transport(transport) |
print(sftp.stat('%s/%s'%(base_path,f) |
print(sftp.unlink('%s/%s' % (sftp_base_path, f) |
sftp.close() |
transport.close() |
say_song_killed(name, author) |
tell_gobbelz('%s von %s wurde vernichtet!' % (name, author) |
tell_gobbelz(text) |
json.dumps(data) |
init_state() |
print("initializing relaxxapi") |
relaxx(relaxxurl="http://lounge.mpd.shack/") |
tell_gobbelz("EM PE DE unreachable!") |
tell_gobbelz("Bailing out") |
sys.exit(1) |
print("adding interrupt") |
RPIO.add_interrupt_callback(button,callback=btn_trans,pull_up_down=RPIO.PUD_DOWN) |
print ("Start Interrupt handler") |
RPIO.wait_for_interrupts() |
Thread(target=start_hal,args=(hal_speed,) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.