Skip to content

Instantly share code, notes, and snippets.

View fernandozamoraj's full-sized avatar

Fernando Zamora fernandozamoraj

View GitHub Profile
@fernandozamoraj
fernandozamoraj / program1.pde
Created January 26, 2017 06:38
A binary search tree using processing language
/*
Author: Fernando Zamora
Description:
In this program I will attempt to draw out a binary search tree from 16 random values
*/
# coding: utf-8
class Node:
def __init__(self, data, parent):
self.left = None
self.data = data
self.right = None
self.parent = parent
def __repr__(self):
n = 'Node: '
# coding: utf-8
from random import randint
class Card:
suit_strings = ['','D', 'H', 'C', 'S']
face_strings = ['', 'A', '2', '3', '4', '5', '6', '7', 'J', 'Q', 'K']
def __init__(self, face, suit):
self.face = face
self.suit = suit
import sys
import _winreg
#this checker only works on a windows box... i tested it on my windows 7 64bit box
#this script displays the history of your wifi connections... or better said
#all the wifi connections that you have previously used
def val2addr(val):
addr = ''
for ch in val:
import httplib2
import webbrowser
import random
from BeautifulSoup import BeautifulSoup, SoupStrainer
#########################################################
#
# Extract all the hyperlinks from the given URL
#
#########################################################
@fernandozamoraj
fernandozamoraj / getlinks
Last active September 13, 2015 21:21
get links from a url
@fernandozamoraj
fernandozamoraj / jumpingavatar
Created March 12, 2015 03:36
jump simple game
function Avatar(scene){
var JUMP_FORCE = 14;
var sprite = new Sprite(scene, "./img/image.png", 150, 150);
var jumping = false;
sprite.init = function(){
this.setSpeed(0);
};
@fernandozamoraj
fernandozamoraj / gist:7411021edbf0f36ba098
Last active January 23, 2019 21:23
fzj_message_receiver_arduino_sketch
/*
fzj_msg_sender
converts bytes into binary digits and sends them out
by Fernando Zamora
*/
const int MAX_MESSAGE_BIT_SIZE = 128; //nice even sixteen bytes of data
const int MAX_MESSAGE_CHAR_SIZE = 16; //nice even sixteen bytes of data
const int DELAY = 10;
@fernandozamoraj
fernandozamoraj / gist:9dcb7cb1801c99a2220a
Created February 3, 2015 22:36
smallest_universal_kata
import java.util.Random;
public class SnippyMain {
public static void main(String args[]){
System.out.println("Hello World");
SnippyMain snippy = new SnippyMain();
String who = "";
@fernandozamoraj
fernandozamoraj / gist:530ee4e4fd0d5d413dbb
Last active August 29, 2015 14:14
fzj_msg_sender_arduino
/*
fzj_msg_sender
converts bytes into binary digits and sends them out
by Fernando Zamora
*/
const int MAX_MESSAGE_BIT_SIZE = 128; //nice even sixteen bytes of data
const int MAX_MESSAGE_CHAR_SIZE = 16; //nice even sixteen bytes of data
const int DELAY = 1;