Skip to content

Instantly share code, notes, and snippets.

View sinbrive's full-sized avatar

sinbrive sinbrive

View GitHub Profile
@sinbrive
sinbrive / python_simple_webserver.py
Created April 23, 2020 09:51 — forked from bgulla/python_simple_webserver.py
Python Webserver that serves up a flat HTML file.
#!/usr/bin/python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from time import gmtime, strftime
import sys,random,socket
PORT_NUMBER = 8000
HOSTNAME = socket.gethostname()
if len(sys.argv) > 1:
@sinbrive
sinbrive / PY0101EN-3-4-Classes.ipynb
Created April 23, 2020 09:30 — forked from rahulchinta97/PY0101EN-3-4-Classes.ipynb
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// --------------------------------------------------------------------------- Motors
// These are the pins to the the motor drive chip for the left wheel
int motor_left[] = {12, 13};
// These are the pins to the the motor drive chip for the right wheel
int motor_right[] = {6, 7};
// --------------------------------------------------------------------------- Setup
void setup() {
Serial.begin(9600);
@sinbrive
sinbrive / sprintf.ino
Created May 27, 2017 14:00 — forked from philippbosch/sprintf.ino
sprintf() in Arduino code
unsigned int i = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
char buffer[50];
sprintf(buffer, "the current value is %d", i++);
Serial.println(buffer);