I hereby claim:
- I am MarcScott on github.
- I am mscott (https://keybase.io/mscott) on keybase.
- I have a public key whose fingerprint is BF39 BD54 4BAD AD04 410E 7072 8FD2 2F44 58EC C456
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Check for Homebrew, | |
# Install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Update homebrew recipes | |
brew update |
name = input("What's your name? ") | |
age = int(input("Hi " + name + ". How old are you? ")) | |
print("So on your next birthday you'll be " +(str(age+1))) |
#!/bin/bash | |
#My setup script for minimal use of Ubuntu Server as desktop os | |
#Setup wireless interfaces | |
read -p "Enter SSID: " SSID | |
read -p "Enter PSK: " PSK | |
sudo tee /etc/wpa_supplicant/wpa_supplicant.conf <<EOL | |
ctrl_interface=/run/wpa_supplicant | |
EOL |
#!/bin/sh | |
echo "Raspi-Config steps" | |
sudo raspi-config nonint set_camera 1 | |
sudo raspi-config nonint do_i2c 0 | |
sudo sh -c "printf '@lxterminal -e \"/home/pi/edu-install.sh\"' >> .config/lxsession/LXDE-pi/autostart" | |
cat > /home/pi/edu-install.sh << EOL | |
set -e |
#!/bin/bash | |
echo 'Please ensure your Weather Station HAT is connected to you Raspberry Pi, with the battery installed.' | |
echo 'Please ensure your Raspberry Pi is connected to the Internet' | |
## Check ready to start | |
echo 'Press any key to continue' | |
read -n 1 -s | |
## Update and upgrade - especially important for old NOOBS installs and I2C integration |
# Need to install the following | |
# sudo apt-get install xautomation | |
from subprocess import Popen, PIPE | |
from time import sleep | |
enter_sequence = '''key Return | |
''' | |
define :riff1 do | |
with_bpm 120 do | |
play 50 | |
play 55 | |
sleep 1 | |
play 53 | |
play 58 | |
sleep 1 | |
play 55, release: 1.5 | |
play 60, release: 1.5 |
## Requires pythonosc - sudo pip3 install python-osc | |
## PYTHON FILE | |
from pythonosc import osc_message_builder | |
from pythonosc import udp_client | |
sender = udp_client.SimpleUDPClient('127.0.0.1', 4559) | |
sender.send_message('/play_this', 60) ##play note 60 | |
## SONIC PI FILE | |
set_sched_ahead_time! 0 |
from picamera import PiCamera | |
from datetime import datetime | |
slack_token = "" | |
sc = SlackClient(slack_token) | |
users = requests.get('https://slack.com/api/users.list',params={'token':slack_token}).json() | |
camera = PiCamera() | |
camera.start_preview() |