Skip to content

Instantly share code, notes, and snippets.

View martinxyz's full-sized avatar

Martin Renold martinxyz

  • Switzerland
  • 00:23 (UTC +02:00)
View GitHub Profile
@jk
jk / kagi-summarizer-bookmarklet.js
Created February 12, 2023 12:23
Kagi Universal Summarizer Bookmarklet for every Browser that supports it
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://labs.kagi.com/ai/sum?url='+encodeURIComponent(q),'Kagi Universal Summarizer','toolbar=no,width=710,height=685'));
@youheiakimoto
youheiakimoto / ddcma.py
Last active April 19, 2023 08:00
dd-CMA: CMA-ES with diagonal decoding
import warnings
from collections import deque
import math
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
class DdCma:
"""dd-CMA: CMA-ES with diagonal decoding [1]
@nicksam112
nicksam112 / keras_es.py
Last active November 28, 2020 16:02
Evolution Strategies with Keras
#Evolution Strategies with Keras
#Based off of: https://blog.openai.com/evolution-strategies/
#Implementation by: Nicholas Samoray
#README
#Meant to be run on a single machine
#APPLY_BIAS is currently not working, keep to False
#Solves Cartpole as-is in about 50 episodes
#Solves BipedalWalker-v2 in about 1000
@njp947
njp947 / CMA-ES10.py
Last active October 18, 2018 07:00
CMA-ES 10.0
import argparse
import numpy
import keras
import gym
import cma
parser = argparse.ArgumentParser()
parser.add_argument("environment")
args = parser.parse_args()
@karpathy
karpathy / gist:587454dc0146a6ae21fc
Last active July 11, 2024 10:36
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@akumria
akumria / find-forks.py
Last active March 9, 2024 01:39
A quick way to find all the forks of a particular github project. see: https://github.com/akumria/findforks for a version which works now
#!/usr/bin/env python
import os
import urllib2
import json
import subprocess
user=None
repo=None