Skip to content

Instantly share code, notes, and snippets.

View AhmadMoussa's full-sized avatar
🔮
Hello, is this Turing?

Ahmad Moussa AhmadMoussa

🔮
Hello, is this Turing?
View GitHub Profile
@naotokui
naotokui / audio_lstm_keras.ipynb
Last active June 30, 2019 21:55
Audio generation with LSTM in keras
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naotokui
naotokui / GAN-808_keras.ipynb
Created July 14, 2017 10:17
GAN-based drumloop generation (work in progress)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ialhashim
ialhashim / Upsample.py
Last active October 19, 2020 14:48
Resize or interpolate tensors to any spatial dimension in Keras
import tensorflow as tf
import keras.backend as K
from keras.layers import Lambda
#
# Keras + TensorFlow
# Resize 'tensorA' to be of the same size as 'tensorB' using 'tf.image.resize_bilinear'
# Very useful for skip-connections and 'Concatenate' layers that might complain about being off by one column
# Only works when dimensions are provided since we use ' K.int_shape' that returns the static shape
#
@dreizehnutters
dreizehnutters / p5_scrapper.py
Last active November 5, 2021 13:46
p5.js webeditor scrapper
"""
what:
download all sketches (as .zip) from a given user on p5.js
how:
python <TARGET> [<OUT_DIR>]
who:
@13utters
"""
from sys import argv, exit
from pathlib import Path
@nsbalbi
nsbalbi / donut.pde
Last active July 11, 2022 19:56
Universe in a Donut
// Processing Code By Nicholas Sbalbi (@nsbalbi)
// Twitter post: https://twitter.com/nsbalbi/status/1406696979523047437
// Github gist: https://gist.github.com/nsbalbi/7c09f0101f90c45ecc391e7f64b29c10
// 6-22-2021
// Motion blur via @beesandbombs and inspiration from @etiennejcb
/*
Copyright (c) 2021 Nicholas Sbalbi
Permission is hereby granted, free of charge, to any person obtaining a copy
@antiboredom
antiboredom / index.html
Created December 15, 2014 16:36
A simple example showing how to save animated gifs from p5.js sketches, using https://github.com/jnordberg/gif.js
<html>
<head>
<script src="gif.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/p5.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/addons/p5.dom.js"></script>
<script src="sketch.js"></script>
</head>
<body>
<p>First, allow camera access.<p><p>Then click once to start recording, and another time finish recording and make a gif.</p>
</body>
@sylvainpelissier
sylvainpelissier / pyuac.py
Last active March 20, 2023 23:28 — forked from Preston-Landers/pyuac.py
pyuac - elevate a Python process with UAC on Windows compatible Python 3.
#!/usr/bin/env python
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4
"""User Access Control for Microsoft Windows Vista and higher. This is
only for the Windows platform.
This will relaunch either the current script - with all the same command
line parameters - or else you can provide a different script/program to
run. If the current user doesn't normally have admin rights, he'll be
@jesseengel
jesseengel / rainbowgram.py
Created September 5, 2017 17:10
Script to plot "rainbowgrams" from NSynth (https://arxiv.org/abs/1704.01279)
import os
import librosa
import matplotlib
import matplotlib.pyplot as plt
matplotlib.rcParams['svg.fonttype'] = 'none'
import numpy as np
from scipy.io.wavfile import read as readwav
# Constants

PostSpectacular Manifesto

Literacy

  • Learn by doing
    • Take away a sound understanding of new concepts learned at the end of each activity
    • Transform knowledge into intuition
    • Share your learnings
    • Experiment to avoid/overcome procrastination
  • Go further, Carpe noctem
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);