Skip to content

Instantly share code, notes, and snippets.

View Rowing0914's full-sized avatar
💭
Studying

Norio Kosaka Rowing0914

💭
Studying
View GitHub Profile
@andrewliao11
andrewliao11 / noisy-cem-rl.py
Created January 31, 2017 16:40
implement noisy cross entropy method for rl
# modified from https://gist.github.com/sorenbouma/6502fbf55ecdf988aa247ef7f60a9546
import gym
import numpy as np
import matplotlib.pyplot as plt
env = gym.make('CartPole-v0')
env.render(close=True)
#vector of means(mu) and standard dev(sigma) for each paramater
mu=np.random.uniform(size=env.observation_space.shape)
sigma=np.random.uniform(low=0.001,size=env.observation_space.shape)
@kkweon
kkweon / DQN.keras.py
Created April 1, 2017 21:49
DQN Keras Example
import numpy as np
import gym
import random
from collections import deque
from keras.layers import Input, Activation, Dense, Flatten, RepeatVector, Reshape
from keras.layers.convolutional import Conv2D
from keras.models import Model
from keras import backend as K
@ZWMiller
ZWMiller / streamAudio.py
Created June 19, 2017 16:36
Using Python to plot the current microphone's input and the Fourier Transform
try:
import pyaudio
import numpy as np
import pylab
import matplotlib.pyplot as plt
from scipy.io import wavfile
import time
import sys
import seaborn as sns
except:
@namoshizun
namoshizun / naive_gp.py
Created July 8, 2017 00:16
simple gaussian process
"""
Implement a very simple gaussian process for regression task.
Credit : http://katbailey.github.io/post/gaussian-processes-for-dummies/
"""
import numpy as np
import matplotlib.pyplot as pl
def prepare_data(n, fn):
@zakkak
zakkak / .git-commit-template
Last active January 15, 2026 01:04 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@gustavohenrique
gustavohenrique / pre-sharedkey-aes.py
Created September 13, 2017 17:52
An example using Python3 and AES criptography
import sys
import base64
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key):
self.bs = 16
self.cipher = AES.new(key, AES.MODE_ECB)
@kyamagu
kyamagu / demo.ipynb
Last active February 24, 2025 17:02
Dataset class for Automatic Understanding of Image and Video Advertisements (CVPR 2017) http://people.cs.pitt.edu/~kovashka/ads/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shreydesai
shreydesai / dotproduct_attention.py
Created February 4, 2019 22:10
PyTorch Scaled Dot Product Attention
import torch
import torch.nn as nn
import numpy as np
class DotProductAttention(nn.Module):
def __init__(self, query_dim, key_dim, value_dim):
super().__init__()
self.scale = 1.0/np.sqrt(query_dim)

Screen Quick Reference

Wait a minute, why would anyone use 'screen', and what is it anyway?

Well, because it's both AWESOME and FUN!!

It lets you keep your own session running on all the servers you already use, and chances are, it's probably already installed and waiting for you! (since 1987!)

Basic

| Description | Command |

@Rowing0914
Rowing0914 / main.py
Last active October 27, 2019 09:14
First/Second/Third order Taylor Approximation of f(x) = x ** 3
import numpy as np
from autograd import grad
import matplotlib.pyplot as plt
def f(x):
return x ** 3
def f_first(x):
return 3 * x ** 2