Skip to content

Instantly share code, notes, and snippets.

View thiagopbueno's full-sized avatar

Thiago P. Bueno thiagopbueno

View GitHub Profile
@cwillmor
cwillmor / ells.pde
Created January 25, 2021 02:50
ells.pde (L-tiling clock in processing)
// ell clock https://twitter.com/cwillmore/status/1353435612636803073
// developed with processing 3.5.4 (processing.org)
// TODO:
// - motion blur
// - ripple update of ells - one only starts rotating when it has room to (<< ... <> ... >>)
static final int DEPTH = 3;
static final int N = 1 << (DEPTH + 1);
static final int FRAME_RATE = 30;
static final float DT = 1 / (float)FRAME_RATE;
@paseaf
paseaf / code_smells_and_solutions.md
Last active July 19, 2024 08:44
Code Smells and Solutions

Definition (Code Smells) Code smells are common code anti-patterns which could and should be refactored.

This doc is summarized from Martin Flower's book Refactoring (the 2nd Edition).

Refactoring is all about Change

  • You may inverse previous refactorings as software grows
  • You may change names of a function/parameter/varible/... as you learn

How to use this doc

Go to a section of code smell, and the refactoring techniques to that smell are written in Pascal Case under the Solution section. Refer to the book's catalog to get detailed examples and explainations for each refactoring technique.

Table of Code Smells

@elliottslaughter
elliottslaughter / test_cores.py
Last active June 29, 2020 05:59
Reproducer for TensorFlow CPU usage
from __future__ import print_function
import argparse
import time
import numpy as np
import tensorflow as tf
from tensorflow.python.client import timeline
parser = argparse.ArgumentParser()
@avalcarce
avalcarce / README.md
Created March 8, 2017 09:27
Solving Acrobot-v1 with Double DQN and Prioritized Experience Replay (with proportional prioritization)

Synopsis

This is a Deep Reinforcement Learning solution to the Acrobot-v1 environment in OpenAI's Gym. This code uses Tensorflow to model a value function for a Reinforcement Learning agent. I've run it with Tensorflow 1.0 on Python 3.5 under Windows 7.

The algorithm is a Double Deep Q Network (DQN) with Prioritized Experience Replay (PER), where the proportional prioritization variant has been implemented. All hyper parameters have been chosen by hand based on several experiments. However, the learning rate, the priorization exponent alpha and the initial importance sampling exponen beta0 have been optained via Bayesian optimization with Scikit-Optimize.

The hyperparameters are:

@thiagopbueno
thiagopbueno / CUDD-ADD
Last active May 15, 2019 21:30
Using CUDD library to manipulate algebraic decision diagrams (ADDs)
CC=g++
CCFLAGS=-Wall -Wextra -ansi -pedantic -std=c++11
CUDD=/usr/local/CUDD/cudd-3.0.0
INCLUDE=-I$(CUDD)/cudd -I$(CUDD)/cplusplus
LIBS=$(CUDD)/cudd/.libs/libcudd.a
cudd: main.o
$(CC) -o $@ $^ $(LIBS)
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 15, 2025 05:09
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@filmgirl
filmgirl / el-capitan-install-usb
Last active November 30, 2019 04:05
Create Bootable USB Drive for OS X El Capitan
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction
@berlinbrown
berlinbrown / gist:4583728
Created January 21, 2013 05:05
Simplest Possible Web Crawler with C++
//============================================================================
// Name : OctaneCrawler.cpp
// Author : Berlin Brown (berlin dot brown at gmail.com)
// Version :
// Copyright : Copyright Berlin Brown 2012-2013
// License : BSD
// Description : This is the simplest possible web crawler in C++
// Uses boost_regex and boost_algorithm
//============================================================================
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 9, 2025 18:09
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx