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 pyowm import OWM | |
from time import time | |
KEY = 'Your Key' | |
owm = OWM(KEY) | |
mgr = owm.weather_manager() | |
observation = mgr.forecast_at_place('London,GB', '3h') | |
weathers = observation.forecast.weathers |
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/sh | |
echo | |
echo Brownsoft Incorporated - CSGO Auto launcher | |
echo ------------------------------------------- | |
echo | |
key=`cat /home/mjs/key.txt` | |
gamemode="" | |
gametype="" | |
echo "Step 1 - select your game type. Default is 'Classic casual'." |
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 pyaudio | |
import numpy as np | |
from time import sleep | |
CHUNK = 2**11 | |
RATE = 44100 | |
audio=pyaudio.PyAudio() | |
stream=audio.open(format=pyaudio.paInt16,channels=1,rate=RATE,input=True, | |
frames_per_buffer=CHUNK) |
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
angle=0 | |
function setup() { | |
createCanvas(600, 600, WEBGL); | |
} | |
function draw() { | |
background(0); | |
push(); | |
rotateX(angle) |
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
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Use the systemd-boot EFI boot loader. | |
boot.loader.systemd-boot.enable = true; |
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 guizero import App, Waffle | |
from time import sleep | |
from random import randint | |
app = App() | |
gun = """........................................................ | |
.........................*.............................. | |
.......................*.*.............................. | |
.............**......**............**................... |
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 os | |
from glob import glob | |
import re | |
from pprint import pprint | |
import itertools | |
PROJECT = "santa-detector" | |
PROJECT_DIR = "/home/mjs/WIP/copy/" | |
preamble_ingredient="""Could I get a copy edit on this resource please? |
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
## Functions for each gate. | |
def NAND(A, B): | |
if A == False: | |
return True | |
elif B == False: | |
return True | |
else: | |
return False |
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
Edits for Diagrams | |
1. The diagram on [this page](https://www.futurelearn.com/courses/physical-computing-raspberry-pi-python/1/steps/161874) needs changing. Your house circuit uses AC, so the diagram is factually inaccurate. I thin the internals of a torch would be better. Perhaps show 2 batteries and a switch connected to the lamp. | |
![image](https://media1.britannica.com/eb-media/49/160449-049-B0977C93.jpg) | |
1. The diagram and animations on https://www.futurelearn.com/courses/physical-computing-raspberry-pi-python/1/steps/161840#fl-comments show a single battery. This should really be 2 batteries in series (the +ve of the first connected to the -ve of the second). This will provide 3V which is enough to light an LED. | |
1. Can they also be edited so that the wires connect to the little bump on the +ve end of the battery |
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 requests | |
import string | |
import re | |
from collections import Counter | |
cnt = Counter() | |
pp = requests.get('http://www.gutenberg.org/files/1342/1342-0.txt').text | |
ss = requests.get('http://www.gutenberg.org/cache/epub/161/pg161.txt').text | |
def only_letters(book): |