Skip to content

Instantly share code, notes, and snippets.

@gyglim
gyglim / tensorboard_logging.py
Last active August 23, 2023 21:29
Logging to tensorboard without tensorflow operations. Uses manually generated summaries instead of summary ops
"""Simple example on how to log scalars and images to tensorboard without tensor ops.
License: BSD License 2.0
"""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
@offchan42
offchan42 / Machine Learning Curriculum.md
Last active March 2, 2024 00:02
Machine learning resources and related artificial intelligence concepts.
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@ucaiado
ucaiado / key_binding_user.json
Last active July 7, 2017 16:54
Sublime Configurations
[
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }
]

LINUX - COMMAND LINE

TO COUNT NUMBER OF LINES AND STRING LENGTH

wc -l <filename>  # lines
wc -c 'string'  #length of the string
sed '<lne_number>q;d' <filename> | wc -c  # length of the output string

TO READ A SPECIFIC ROW IN A FILE

ser 'q;d' 
@martinrusev
martinrusev / imap-search
Last active November 4, 2024 12:46
IMAP Search criteria
@cobyism
cobyism / gh-pages-deploy.md
Last active November 11, 2024 00:02
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).