Skip to content

Instantly share code, notes, and snippets.

View agush22's full-sized avatar

Agustín Leñero agush22

View GitHub Profile
https://deepmind.com/research/publications/wavenet-generative-model-raw-audio
https://openai.com/blog/jukebox/
https://github.com/ibab/tensorflow-wavenet
https://github.com/openai/jukebox
http://libgen.rs/book/index.php?md5=F7806C6B8E41BE5DBCB53BD4F8BD09A0#
@agush22
agush22 / script.js
Last active May 4, 2021 21:11
memory_game
// JavaScript
//Globala variabler
var allCards; // Array med nummer
var cardsElems; // Array med alla bilder
var cardsCounter; // Räknare för antal vända kort
var points; // Räknare för antal poäng
var card1; // Variabel för vänt kort nummer 1
var card2; // Variabel för vänt kort nummer 2
var turns; // Variabel för antal kort som vänts
require 'sinatra'
require 'json'
require 'securerandom'
helpers do
def protected!
return if authorized?
headers['WWW-Authenticate'] = 'Basic realm="Restricted Area"'
halt 401, "Not authorized"
end
rollbar-26d2aff8b95f49f853acff84ac76168dbc744382655f14cfadfd78c59f4c8462.js:1 Uncaught ReferenceError: ReactOnRails encountered an error while rendering component: PreplacementStreamApp.Original message: defaultPagingParams is not defined
at new t (application_static-b8bcef644154448d7a508fb2b35c7576f5243c7608828c9762a0eb9c82f52c28.js:57)
at d._constructComponentWithoutOwner (application_static-b8bcef644154448d7a508fb2b35c7576f5243c7608828c9762a0eb9c82f52c28.js:4)
at d._constructComponent (application_static-b8bcef644154448d7a508fb2b35c7576f5243c7608828c9762a0eb9c82f52c28.js:4)
at d.mountComponent (application_static-b8bcef644154448d7a508fb2b35c7576f5243c7608828c9762a0eb9c82f52c28.js:4)
at Object.mountComponent (application_static-b8bcef644154448d7a508fb2b35c7576f5243c7608828c9762a0eb9c82f52c28.js:2)
at mountChildren (application_static-b8bcef644154448d7a508fb2b35c7576f5243c7608828c9762a0eb9c82f52c28.js:3)
at m._createInitialChildren (application_static-b8bcef644154448d7a508fb2b35c7
#First submission
def missingNumbersOne(arr, brr)
# Complete this function
result = []
arr.each do |x|
brr.delete_at(brr.find_index(x))
end
brr.sort.uniq
end
require 'benchmark'
def steps_each(arr_a, arr_b)
h_a = arr_a.to_h
h_b = arr_b.to_h
result = []
h_a.keys.each do |k|
if h_b.member?(k)
result << [k, 'update', h_b[k]] if h_b[k] != h_a[k]
@agush22
agush22 / flatten.rb
Last active April 6, 2016 16:17
Flatten arrays
require 'minitest/autorun'
require 'minitest/pride'
def flatten(array, res = [])
array.each do |el|
if el.kind_of? Array
flatten(el, res)
else
res << el
end
.half-circle {
width: 10px;
height: 20px;
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
border: 5px solid gray;
border-left: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@agush22
agush22 / funcs.rb
Created January 6, 2013 06:34
Flip a number without changing it to string
def flipnum num
res = 0
mag = magnitude(num)
neg = true if num < 0
num = num.abs
while num > 0
mag -= 1
res += (num % 10)* 10 ** mag
num = num/10
end
@agush22
agush22 / herokus.rb
Created August 18, 2012 05:52
Simple SSH key switcher for multiple Heroku accounts
#!/usr/bin/env ruby
require 'fileutils'
class Switcher
include FileUtils
home = File.expand_path('~/')+"/"
@@dir = home+".ssh/"
@@current = home + ".switcher"
def switch_accounts(account)