View module7-9.cpp
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
#include <iostream> | |
void banner(); | |
void m7_t1(); | |
void m7_t2(); | |
void m7_t3(); | |
void m8_t1(); | |
void m8_t2(); | |
void m8_t3(); |
View gist:a552f03b61ebefbe135dea8fcbea568f
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 G | |
import time | |
G.setmode(G.BCM) | |
G.setwarnings(False) | |
G.setup(7, G.OUT) | |
G.setup(25, G.IN, pull_up_down=G.PUD_UP) | |
toggle = 1 | |
data = 1 |
View apache2.conf
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
DefaultRuntimeDir ${APACHE_RUN_DIR} | |
PidFile ${APACHE_PID_FILE} | |
Timeout 300 | |
KeepAlive On | |
MaxKeepAliveRequests 100 | |
KeepAliveTimeout 5 | |
User ${APACHE_RUN_USER} | |
Group ${APACHE_RUN_GROUP} | |
HostnameLookups Off |
View mqtt.py
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 thread, mosquitto, random, time | |
# mosquitto reference and download can be found here: http://mosquitto.org/documentation/python/ | |
class mqtt(): | |
def __init__(self, broker = "127.0.0.1", port = 1883, clientID = None): | |
self.__broker = broker | |
self.__port = port | |
self._client = None | |
self.__subscriptionsList = [] | |
self.__pendingSubscriptionsList = [] |
View student_database_with_python.py
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
#!/usr/bin/python3 | |
# Import statements for libraries | |
import time | |
import MySQLdb | |
# Variable placeholders | |
Done = False |
View keysight_psu_01.py
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
#!/usr/bin/env python | |
import visa | |
rm = visa.ResourceManager() | |
rm.list_resources() | |
inst = rm.open_resource('TCPIP0::192.168.5.185::5025::SOCKET') | |
# print(inst.query("*IDN?")) |
View bbc_microbit_remote.py
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
""" | |
@file bbc_tx | |
@brief BBC microbit Receiver By Inderpreet Singh | |
""" | |
import radio | |
import random | |
from microbit import * #import display, Image, button_a, sleep, button_b, | |
music = False | |
lights = False |
NewerOlder