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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>video & canvas example</title> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.4.0/brython.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.4.0/brython_stdlib.js"></script> | |
</head> | |
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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>video & canvas example</title> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.4.0/brython.min.js"></script> | |
</head> | |
<body onload="brython()"> | |
<h1>Brython video & canvas example</h1> |
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> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.min.js"></script> | |
<script type="text/javascript" | |
src="https://cdn.rawgit.com/brython-dev/brython/master/www/src/brython.js"> | |
</script> | |
<script src="https://cdn.rawgit.com/brython-dev/brython/master/www/src/brython_stdlib.js"></script> | |
</head> | |
<body onload="brython(1)"> |
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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Camera with mediaDevice</title> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.4.0/brython.min.js"></script> | |
</head> | |
<body onload="brython()"> | |
<h1>Brython webcam example</h1> |
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 browser | |
from browser import html, document | |
aa = document['main'] | |
videotag = html.VIDEO(id='video', width='320', height='240') | |
aa.html = "" | |
aa <= videotag | |
from javascript import JSObject |
This file has been truncated, but you can view the full file.
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
// brython.js brython.info | |
// version [3, 3, 0, 'alpha', 0] | |
// implementation [3, 3, 5, 'dev', 0] | |
// version compiled from commented, indented source files at | |
// github.com/brython-dev/brython | |
!function(r,n){"use strict";function t(r,n,t,e){for(t=void 0!==t?t:0,e=void 0!==e?e:r.length;e>t;){var c=e+t>>1;r[c]>n?e=c:t=c+1}return t}function e(r){if(35>r)return r;var n=t(K,r);return L[n]}function c(r){var n=t(M,r);return N[n]}function u(r){switch(r.charCodeAt(0)){case 9:case 10:case 11:case 12:case 13:case 28:case 29:case 30:case 31:case 32:case 133:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8232:case 8233:case 8239:case 8287:case 12288:return!0}return!1}function a(r){var n;return r>=1114112?n=0:(n=e(r>>J),n=c((n<<J)+(r&(1<<J)-1))),y[n]}function i(r,n){for(var t="",e=0;n>e;e++)t+=String.fromCharCode(I[r+e]);return t}function o(r){var n=r.charCodeAt(0),t=a(n);return 0!=(t[H]&T)}function f(r){var n=r.charCodeAt(0),t=a(n);retu |
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 browser import document, window, html | |
try: | |
document["main"] | |
except(KeyError): | |
document["add_main"].click() | |
element = document["main"] | |
element.style.width = "800px" |
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
#!/bin/bash | |
PB_TOKEN=your_pushbullet_api_key | |
PB_TITLE=title | |
PB_BODY=body | |
wget -q -O - --header 'Access-Token: $PB_TOKEN' --header="Content-Type: application/json" https://api.pushbullet.com/v2/pushes \ | |
--post-data="{\"type\": \"note\", \"title\": \"${PB_TITLE}\", \"body\": \"${PB_BODY}\"}" > /dev/null 2&>1 |
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
# encode from binary file to base64txt | |
powershell -C "& {$outpath = (Join-Path (pwd) 'out_base64.txt'); $inpath = (Join-Path (pwd) 'data.jpg'); [IO.File]::WriteAllText($outpath, ([convert]::ToBase64String(([IO.File]::ReadAllBytes($inpath)))))}" | |
# decode from base64txt to binary file | |
powershell -C "& {$outpath = (Join-Path (pwd) 'outdata2.jpg'); $inpath = (Join-Path (pwd) 'out_base64.txt'); [IO.File]::WriteAllBytes($outpath, ([convert]::FromBase64String(([IO.File]::ReadAllText($inpath)))))}" |
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
#!/bin/bash | |
PATH=/root/bin:$PATH | |
## for linux | |
#nowId_now=`curl -s "http://192.168.1.153:64210/status/boxStatusListGet" | jq -r ".tvTimerInfoStatus.nowId"` | |
#schedule=`curl -s "http://192.168.1.153:64220/schedule/reservedListGet?searchCriteria=0&filter=0&startingIndex=0&requestedCount=0&sortCriteria=1"` | |
## for openwrt | |
nowId_now=`wget -q -O - "http://192.168.1.153:64210/status/boxStatusListGet" | JSON.sh -l | sed "s/\"//g" | grep -F '[tvTimerInfoStatus,nowId]' | cut -f2` | |
schedule=`wget -q -O - "http://192.168.1.153:64220/schedule/reservedListGet?searchCriteria=0&filter=0&startingIndex=0&requestedCount=0&sortCriteria=1"` |