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 numpy as np | |
import matplotlib | |
import scipy | |
from scipy.optimize import curve_fit | |
#matplotlib,pgetu,emcee,astropy,warnings | |
#from scipy import ndimage,optimize; from scipy.optimize import fmin | |
import matplotlib.pyplot as plt | |
import sys | |
import datetime | |
import matplotlib.dates as mdates |
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
def match(path, expr): | |
names = expr.split('.')[1:] | |
curr_name = 0 | |
curr_path = 0 | |
wildpath = False | |
while curr_path < len(path): | |
el = path[curr_path] | |
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
# See below for algorithm details | |
# https://web.archive.org/web/20160418004149/http://freespace.virgin.net/hugo.elias/graphics/x_water.htm | |
// GRID_MAX refers to the maximum position of an LED via map_led_to_point | |
#define LED_GRID_MAX_Y 65 | |
#define LED_GRID_MAX_X 255 | |
// Number to shift right by to get to ripple grid | |
#define GRID_COARSE 4 |
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 a library of functions called 'pygame' | |
import pygame | |
import numpy as np | |
# Width and height of display | |
WIDTH = 255>>0 | |
HEIGHT = 65>>0 | |
# Downscale to ripple grid | |
SHFT = 2 |
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
<json> ::= <primitive> | <container> | |
<primitive> ::= <number> | <string> | <boolean> | |
; Where: | |
; <number> is a valid real number expressed in one of a number of given formats | |
; <string> is a string of valid characters enclosed in quotes | |
; <boolean> is one of the literal strings 'true', 'false', or 'null' (unquoted) | |
<container> ::= <object> | <array> | |
<array> ::= '[' [ <json> *(', ' <json>) ] ']' ; A sequence of JSON values separated by commas |
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
======================================== | |
A simple solution | |
======================================== | |
How To Make Your Own VR Headset | |
First, let's start with the basics. It's not a bad idea to make your own headset. The best way to make it is to buy an Oculus Rift. | |
======================================== |
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 numpy as np | |
import tensorflow as tf | |
""" | |
# Generate some random data | |
# data = n x m, n = num examples, m = number features | |
# labels = n x c, n = num examples, c = number classes | |
""" | |
KARPATHY_CONST = 0.00025 |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
[ExecuteInEditMode] | |
public class DynBoneCopy : MonoBehaviour { | |
public DynamicBone template; | |
public bool Make_Permenant; |
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
def combine_weights(in_list): | |
""" | |
Returns a 1D tensor of the input list of (nested lists of) tensors, useful | |
for doing things like comparing current weights with old weights for EWC. | |
1.) For all elements in input list, (ln 3) | |
if a list combine it recursively | |
else leave it alone | |
2.) From resulting list, get all non-none elements and flatten them (ln 2) | |
3.) If resulting list is empty return None (ln 1) |
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
from __future__ import division | |
import numpy as np | |
import tensorflow as tf | |
# Launch the graph | |
config = tf.ConfigProto() | |
config.gpu_options.allow_growth=True | |
with tf.Session(config=config) as sess: | |
NUM_EXAMPLES = 8096 |
NewerOlder