This file contains 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 RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
PIN=18 | |
GPIO.setup(PIN, GPIO.OUT) | |
GPIO.output(PIN, 1) | |
time.sleep(0.1) | |
GPIO.output(PIN, 0) | |
GPIO.cleanup() |
This file contains 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
from flask import Flask, redirect, url_for | |
import os | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return """ | |
<html><head><title>HDMI switcher</title><style> | |
.btn { |
This file contains 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 sys | |
if (len(sys.argv)<2): | |
print "Usage: python pidgey.py targetxp" | |
exit(0) | |
target_xp = int(sys.argv[1]) | |
print "Target XP ", target_xp |
This file contains 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
<?php | |
header("Content-type: application/json"); | |
$lang = "en"; | |
$dir = "/var/www/html/talkdata/"; | |
$text = $_GET['t']; | |
$m = urlencode($text); | |
$filename = $lang . "-". $m . ".mp3"; | |
$file = $dir.$filename; | |
if (!file_exists($file)) { | |
$mp3 = file_get_contents( |
This file contains 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
<html> | |
<head> | |
<title>Talk</title> | |
<script src="jquery-3.3.1.min.js"></script> | |
</head> | |
<body> | |
Say | |
<form onsubmit="return say();"> | |
<input type="text" style="font-size: 72pt; background: #eeeeee" id="t" size=30 > | |
</form> |
OlderNewer