Skip to content

Instantly share code, notes, and snippets.

tonyromarock

Block or report user

Report or block tonyromarock

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tonyromarock
tonyromarock / demo_code.js
Last active Apr 8, 2016
Creating a simple scene using enchant.js
View demo_code.js
enchant();
window.onload = function () {
var game = new Core(400, 320);
game.width = 400;
game.height = 320;
game.preload('http://ratherreadblog.com/runnerdemo/images/WalkingBlob.png',
'http://ratherreadblog.com/runnerdemo/images/window.png',
'http://ratherreadblog.com/runnerdemo/images/background.png');
game.fps = 10;
@tonyromarock
tonyromarock / QueenGame.html
Created Mar 13, 2016
The Eight Queens Puzzle made with EaselJS
View QueenGame.html
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Dorsa' rel='stylesheet' type='text/css'>
<script src="http://code.createjs.com/easeljs-0.8.1.min.js"></script>
<script>
var stage;
var chessBoard = [];
var Reds = []; // holds the index of the red marked fields
@tonyromarock
tonyromarock / queens-solver.py
Last active Mar 13, 2016
Using Python-Constraint to solve the eight queens puzzle
View queens-solver.py
#!/usr/bin/env python2
from constraint import *
problem = Problem()
cols = range(1,9) # these are the variables
rows = range(1,9) # these are the domains
problem.addVariables(cols, rows) # adding multiple variables at once
# that each queen has to be in a separate column is
@tonyromarock
tonyromarock / bmp_producer.py
Created Jan 24, 2016
Converting MNIST data set into grayscale images.
View bmp_producer.py
#! /usr/bin/python
# Creating gray scale BMP images
# 28 by 28 images (Total pixels: 784)
import struct, array, os
from numpy import genfromtxt
def main():
@tonyromarock
tonyromarock / NBA_stats_mining.py
Last active Apr 27, 2018
Scrapping NBA player stats from stats.nba.com
View NBA_stats_mining.py
import requests
import csv
import sys
# get me all active players
url_allPlayers = ("http://stats.nba.com/stats/commonallplayers?IsOnlyCurrentSeason"
"=0&LeagueID=00&Season=2015-16")
#request url and parse the JSON
You can’t perform that action at this time.