The robot.py
program from the original gist can be run by requesting:
https://www.pythonanywhere.com/gists/5502596/robot.py/ipython3/
#!/bin/bash | |
# This is a draft but it works | |
# FIRST (I don't even know if it works but we'll assume yes) | |
# sudo launchctl list | |
# sudo launchctl disable system/netbiosd | |
# sudo launchctl disable system/parsecd | |
# sudo launchctl disable system/parentalcontrols.check | |
# sudo launchctl disable system/airportd |
_BUCKET_NAME="foo.example.com" | |
_POLICY=$(cat <<EOT | |
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadForGetBucketObjects", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], |
The robot.py
program from the original gist can be run by requesting:
https://www.pythonanywhere.com/gists/5502596/robot.py/ipython3/
sudo /bin/env bash |
After you made some cool games or apps with Pythonista, you may want to make it run as a standaone app on iPad/iPhone and possibly share it on the AppStore. This how-to tells you how to do it.
See: `Jekyll & Liquid Cheatsheet.md` |
#!/bin/sh -- | |
# Get the local ngrok public URL, which includes the hostname, extracted using jq | |
# Inspiration: https://gist.github.com/rjz/af40158c529d7c407420fc0de490758b#gistcomment-2594627 | |
curl --silent http://127.0.0.1:4040/api/tunnels | jq -r '.tunnels[0].public_url' |
#!/bin/sh | |
awk 'function wl() { | |
rate=64000; | |
return (rate/160)*(0.87055^(int(rand()*10)))}; | |
BEGIN { | |
srand(); | |
wla=wl(); | |
while(1) { | |
wlb=wla; | |
wla=wl(); |
import boto3 | |
import os | |
from contextlib import closing | |
from botocore.exceptions import ClientError | |
def object_exists(s3, bucket, key): | |
try: | |
boto3.resource('s3').Object(bucket, key).load() | |
return True |