Skip to content

Instantly share code, notes, and snippets.

View marcromeyn's full-sized avatar

Marc Romeyn marcromeyn

View GitHub Profile
@marcromeyn
marcromeyn / top_50.json
Created November 14, 2017 13:46
Sample response from Spotify
{
"collaborative" : false,
"description" : "Your daily update of the most played tracks right now.",
"external_urls" : {
"spotify" : "http://open.spotify.com/user/spotifycharts/playlist/37i9dQZEVXbMDoHDwVN2tF"
},
"followers" : {
"href" : null,
"total" : 10837848
},
@marcromeyn
marcromeyn / data.json
Last active November 14, 2017 12:53
top_tracks
{
"data":[
{
"image":"assets/img/0.jpg",
"track": "Rockstar",
"artist": "Post Malone & 21 Savage",
"num_listeners": 50000
},
{
"image":"assets/img/1.jpg",
$(document).ready(function() {
function titleModified(titleEl) {
alert("Title modifed");
alert(titleEl.text)
}
var titleEl = document.getElementsByTagName("title")[0];
var docEl = document.documentElement;
def save_file(filepath):
f = h5py.File(filepath, 'w')
f.attrs['nb_documents'] = len(self.layers)
for k, l in enumerate(self.layers):
g = f.create_group('doc_{}'.format(k))
weights = l.get_weights()
g.attrs['nb_params'] = len(weights)
for n, param in enumerate(weights):
param_name = 'param_{}'.format(n)
param_dset = g.create_dataset(param_name, param.shape,
@marcromeyn
marcromeyn / gist:083187aec94a035868e7
Last active August 29, 2015 14:23
Zeppelin Notebook
// Cell 1:
import sys.process._
import org.json4s.jackson.JsonMethods._
import org.json4s.native.Serialization._
import org.json4s.{DefaultFormats, _}
import org.joda.time.format.DateTimeFormat
import org.joda.time.DateTime
val jobQuery = "*"
{
"courseId":10,
"endpoints": {
"succes": "some endpoint",
"failure": "some other endpoint"
},
"settings":{
"diverse":true,
"iterations": 50,
// if global weights are provided we discard the local ones
{
"courseId":10,
"settings":{
"diverse":true
},
"students":[
{
"id":1,
"name":"Bram",
"mandatory": true,