View base.c
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 "msp430fg4618.h" | |
#include "stdio.h" | |
void Init_UART(void); | |
void OUTA_UART(unsigned char A); | |
unsigned char INCHAR_UART(void); | |
void Init_LCD(void); | |
unsigned char *LCDSeg = (unsigned char *) &LCDM3; | |
unsigned char LCDSegments[17] = {0x5F,0x06,0x6B,0x2F,0x36,0x3D,0x7D,0x07,0x7F,0x37,0x77,0x7C,0x59,0x6E,0x79,0x71,0x20}; |
View HTU21D.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/python | |
import struct, array, time, io, fcntl | |
I2C_SLAVE=0x0703 | |
HTU21D_ADDR = 0x40 | |
CMD_READ_TEMP_HOLD = "\xE3" | |
CMD_READ_HUM_HOLD = "\xE5" | |
CMD_READ_TEMP_NOHOLD = "\xF3" | |
CMD_READ_HUM_NOHOLD = "\xF5" | |
CMD_WRITE_USER_REG = "\xE6" |
View gist:a8bfd0e3ce898a1ab1a0
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
mkdir code-for-america | |
cd code-for-america | |
echo "# road event-app-api" >> README.md | |
git init | |
git add . | |
git commit -m 'init commit' | |
git remote add origin https://github.com/cforlando/road-event-app-api.git | |
git push -u origin master | |
View gist:0f5f5845ffef9841da8b
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
package main; | |
import java.util.Comparator; | |
/** | |
* Created by charles on 4/19/15. | |
*/ | |
public class Job implements Comparable<Job>{ | |
String id; | |
int arrives, burst, elapsed; |
View gist:4ad600d44192b0e2899a
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
tatic public void RR(Processor proc) { | |
System.out.printf("%d processes\n",proc.ready_queue.size()); | |
System.out.println("Using Round-Robin"); | |
System.out.printf("Quantum %d",proc.quantum); | |
int rt = 0; | |
Job current; | |
current = proc.ready_queue.peekFirst(); |
View schema
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 sqlite3 | |
db = sqlite3.connect('agralert.db') | |
db.execute("CREATE TABLE agr (id INTEGER PRIMARY KEY, lat REAL, long REAL, title TEXT)") | |
db.execute("INSERT INTO agr (lat,long,title) VALUES (45.4,50.23, 'CHEESE')") | |
db.commit() |