Skip to content

Instantly share code, notes, and snippets.

View Rowing0914's full-sized avatar
💭
Studying

Norio Kosaka Rowing0914

💭
Studying
View GitHub Profile
@saratrajput
saratrajput / mujoco_py_install_instructions.md
Created January 27, 2022 08:26
Mujoco and Mujoco-py Installation Instructions

Mujoco and Mujoco-py Installation Instructions

The steps are taken from this video and document with some small changes.

Steps

  1. Install Anaconda. Download it from this link.
cd Downloads/
sudo chmod +x Anaconda3-2021.11-Linux-x86_64.sh
./Anaconda3-2021.11-Linux-x86_64.sh
@jeffshee
jeffshee / installation.txt
Last active April 30, 2021 05:27
Ubuntu 20.04 dualboot setup + ML
# Resources
https://phoenixnap.com/kb/install-ubuntu-20-04
https://rufus.ie
# Steps
0. In Windows, shrink the disk partition to create free space for dual boot.
(Refer: https://www.linuxtechi.com/dual-boot-ubuntu-20-04-lts-along-with-windows-10/)
1. Restart. In BIOS, disable Secure Boot.
2. (Optional) Check if Windows boot successfully after Secure Boot is disabled. (It should!)
3. Restart. Boot the Ubuntu installer by either changing or overridding the boot order in BIOS.
@Guitaricet
Guitaricet / reproducibility.md
Last active August 12, 2024 19:41
Notes on reproducibility in PyTorch

Reproducibility

ML experiments may be very hard to reproduce. You have a lot of hyperparameters, different dataset splits, different ways to preprocess your data, bugs, etc. Ideally, you should log data split (already preprocessed), all hyperparameters (including learning rate scheduling), the initial state of your model and optimizer, random seeds used for initialization, dataset shuffling and all of your code. Your GPU is also should be in deterministic mode (which is not the default mode). For every single model run. This is a very hard task. Different random seed can significantly change your metrics and even GPU-induced randomness can be important. We're not solving all of these problems, but we need to address at least what we can handle.

For every result you report in the paper you need (at least) to:

  1. Track your model and optimizer hyperparameters (including learning rate schedule)
  2. Save final model parameters
  3. Report all of the parameters in the pap
@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

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 |

@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)
@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.
@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)
@zakkak
zakkak / .git-commit-template
Last active May 15, 2024 00:06 — 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
@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):