Skip to content

Instantly share code, notes, and snippets.

View qti3e's full-sized avatar
😃

Parsa qti3e

😃
View GitHub Profile
@awjuliani
awjuliani / Q-Net Learning Clean.ipynb
Created August 25, 2016 20:30
Basic Q-Learning algorithm using Tensorflow
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mika76
mika76 / dataview-polyfill.js
Created September 26, 2015 21:27
DataView (and ArrayBuffer) polyfill that works in any engine (including old IE).
void function(global){
if ('DataView' in global && 'ArrayBuffer' in global) {
return;
}
var hide = (function(){
// check if we're in ES5
if (typeof Object.getOwnPropertyNames === 'function' && !('prototype' in Object.getOwnPropertyNames)) {
var hidden = { enumerable: false };
@SimonMarquis
SimonMarquis / PreventScreenshot.java
Created October 21, 2016 08:23
Prevent screenshot on Activity, Dialog, Surface, etc.
import android.app.Activity;
import android.app.Dialog;
import android.app.Fragment;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
/**
@rodyhaddad
rodyhaddad / timeago.filter.js
Created June 30, 2013 21:04
timeago filter for angularjs
.filter("timeago", function () {
//time: the time
//local: compared to what time? default: now
//raw: wheter you want in a format of "5 minutes ago", or "5 minutes"
return function (time, local, raw) {
if (!time) return "never";
if (!local) {
(local = Date.now())
}
#sudo sysctl -w net.inet.ip.portrange.first=32768
sudo sysctl -w net.inet.ip.portrange.first=12000
sudo sysctl -w net.inet.tcp.msl=1000
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000
@ry
ry / orig.js
Created January 19, 2018 04:56
import { grad, linspace, plot } from "propel";
f = x => x.tanh();
x = linspace(-4, 4, 200);
plot(x, f(x),
x, grad(f)(x),
x, grad(grad(f))(x),
x, grad(grad(grad(f)))(x),
x, grad(grad(grad(grad(f))))(x))