Skip to content

Instantly share code, notes, and snippets.

View davidawad's full-sized avatar
🇪🇬
البحث عن الحقيقة

David Awad davidawad

🇪🇬
البحث عن الحقيقة
View GitHub Profile
@davidawad
davidawad / README.md
Last active August 29, 2015 14:05
My proof of concept for the webreg scraper that i built with frank porco a while ago.

Proof Of Concept!

This is the html page generated by the javascript html sca ###How It Works### So you have to have webreg open and our javascript applet will let you get a .ical file that you can run on the webreg calendar view so that you can get a .ical file that you can import into google calendar.

###Constraints### it doesn't support campus or room location yet

@davidawad
davidawad / textgame.js
Created August 13, 2014 00:01
This is a very simple text game I made that I might integrate to my website
confirm("Are You Ready?") ;
var age = prompt("Are you age 18 or older");
if(age < 18 ) {
console.log("Sorry, you're too young!") ;
}
else{
console.log("Then brace yourself");
}
console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him") ;
console.log('Batman glares at you.');
@davidawad
davidawad / README.md
Last active August 29, 2015 14:05
Solution to the Is Fibo Challenge on Hackerrank in Python

I'll make this later##

====enjoy====

@davidawad
davidawad / solution.py
Created August 16, 2014 02:52
Solution to project Euler #1 on Hackerrank
buff = int(input())
for i in range(0,buff):
curr = int(input())
j=0
sum=0
while j < curr :
if j%3 == 0 or j%5 == 0 :
sum+=j
j+=1
print (str(sum))
@davidawad
davidawad / README.md
Last active August 29, 2015 14:05
Solution to Project Euler #2 on Hackerrank

#A solution to the Project Euler+ problem #2 on Hackerrank

This one uses Memoization so it's as efficient as possible. Unless it could be better! let me know!

@davidawad
davidawad / solution.py
Created August 16, 2014 04:14
My solution to the Project Euler+ Challenge #3 on Hackerrank
import math
def factor(n):
myList = []
for i in range(1, int(n ** 0.5 + 1)):
if n % i == 0:
if (i != n/i):
myList.append(i)
myList.append(n / i)
else:
@davidawad
davidawad / solution1.py
Created August 16, 2014 19:33
Solutions for the Leibniz Challenge on Hackerrank
exec"print'%.15g'%sum((-1.)**i/(i-~i)for i in range(input()));"*input()
##python 2
@davidawad
davidawad / main.c
Last active August 29, 2015 14:10
linked list prob for stackoverflow
/*
*
* David Awad (ada80)
* Mariam Tsilosani (mt617)
*
* main.c
*
*/
#include <errno.h>
#include <malloc.h>
@davidawad
davidawad / Solution.java
Created December 26, 2014 07:37
Sort of Solution to the Team Formation Challenge on Hackerrank
import java.io.*;
import java.util.*;
public class Solution {
public class Node{
int data;
int size = 1;
Node next;
void append(Node newNode){
if(!newNode){
@davidawad
davidawad / main.py
Created April 1, 2015 04:11
Python Flask O-Auth
# -*- coding: utf-8 -*-
"""
This is a simple Flask app that uses Authomatic to log users in with Facebook Twitter and OpenID.
"""
from flask import Flask, render_template, request, make_response, session
from authomatic.adapters import WerkzeugAdapter
from authomatic import Authomatic
from config import CONFIG