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 argparse | |
import os | |
import imageio | |
from skimage import measure | |
import numpy as np | |
def parse_args(): | |
parser = argparse.ArgumentParser(description='Script to add a color border to semantic images.') | |
parser.add_argument('image', type=str, default="", help="Input image to convert") |
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/env python3 | |
# -*- coding: utf-8 -*- | |
# Script adapted from https://gist.github.com/wngreene/835cda68ddd9c5416defce876a4d7dd9 | |
# for use in Python 3. | |
"""Extract images from a rosbag. | |
""" | |
import os |
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
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; |
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
<!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 |
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/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 |
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 | |
# Creating gray scale BMP images | |
# 28 by 28 images (Total pixels: 784) | |
import struct, array, os | |
from numpy import genfromtxt | |
def main(): |
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 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 |