Skip to content

Instantly share code, notes, and snippets.

View omarayad1's full-sized avatar

Omar H. Ayad omarayad1

View GitHub Profile

Keybase proof

I hereby claim:

  • I am omarayad1 on github.
  • I am omarayad (https://keybase.io/omarayad) on keybase.
  • I have a public key ASDFi044UOAvYNN3fyDYZJHTrbxw2pGUm9u17NC_H3SIKAo

To claim this, I am signing this object:

from requests import get,post
from json import loads
PORT = "5000"
HOST = "localhost"
get_request_content = get('http://'+HOST+':'+PORT+'/hello').content
print "response data: ", loads(get_request_content)['content']
post_request_content = post('http://'+HOST+':'+PORT+'/incr', data={"num":548}).content
from requests import get,post
from json import loads
PORT = "5000"
HOST = "localhost"
get_request_content = get('http://'+HOST+':'+PORT+'/hello').content
print "response data: ", loads(get_request_content)['content']
post_request_content = post('http://'+HOST+':'+PORT+'/incr', data={"num":548}).content
int curr = 0;
void setup() {
for (int i=0; i<5; i++){
pinMode(i, OUTPUT);
}
digitalWrite(4, HIGH);
delay(5000);
}
void loop() {
@omarayad1
omarayad1 / bare.tex
Created February 6, 2015 12:58
Basic LaTeX snippet for fast use on new LaTeX Documents
\documentclass{article}
\begin{document}
\title{Lorem Ipsum}
\author{Omar H. Ayad
900112630}
\date{\today}
\maketitle
from bs4 import BeautifulSoup
import requests
import os
import tarfile
import sys
try:
os.makedirs('archive')
except OSError:
pass
@omarayad1
omarayad1 / arduino_object_counter.ino
Last active August 29, 2015 14:01
code uploaded in the arduino so it can increment the 7-segment display each time it detects an infra-red light
int num=0;
int flag=0;
char * p[]={"1101111", //0
"1000100", //1
"1110011", //2
"1110110",//3
"1011100",//4
"0111110",//5
"0111111",//6
"1100100",//7