Skip to content

Instantly share code, notes, and snippets.

View maulberto3's full-sized avatar

Mauricio maulberto3

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mandieq
mandieq / selector_heatmap.py
Created September 20, 2018 15:58
Heatmap example - python / dash
import plotly.plotly as py
import plotly.graph_objs as go
import plotly.figure_factory as ff
import plotly.offline as offline
import pandas as pd
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
@kauffmanes
kauffmanes / install_anaconda.md
Last active November 27, 2025 21:47
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog, too.

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Ana
@mwaskom
mwaskom / palettes.png
Last active September 19, 2025 16:43
Show all seaborn palettes and simulate what they look like with various color vision deficiencies. (The 10-element seaborn palettes will be part of the forthcoming 0.9 release).
palettes.png
def model(data):
alpha = torch.tensor(6.0)
beta = torch.tensor(10.0)
pay_probs = pyro.sample('pay_probs', dist.Beta(alpha, beta).expand(3).independent(1))
normalized_pay_probs = pay_probs / torch.sum(pay_probs)
with pyro.iarange('data_loop', len(data)):
pyro.sample('obs', dist.Categorical(probs=normalized_pay_probs), obs=data)

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@ByungSunBae
ByungSunBae / Continuous_A2C_test.py
Created December 28, 2017 15:07
A2C with continuous action space test
import tensorflow as tf
from tensorflow import layers
from tensorflow.contrib.layers import xavier_initializer
import gym
import numpy as np
from collections import deque
from collections import namedtuple
@calclavia
calclavia / keras_pg.py
Created June 6, 2017 18:48
Monte Carlo Policy Gradient in Keras
import gym
import numpy as np
from keras.models import Model
from keras.layers import *
from keras import backend as K
from collections import deque
def one_hot(index, categories):