Skip to content

Instantly share code, notes, and snippets.

View floringogianu's full-sized avatar
🐳
Chasing Moby-Dick

Florin Gogianu floringogianu

🐳
Chasing Moby-Dick
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@floringogianu
floringogianu / matplotlib Border Removal.ipynb
Created June 6, 2020 13:22 — forked from kylemcdonald/matplotlib Border Removal.ipynb
How to (mostly) remove all borders and padding with matplotlib.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@floringogianu
floringogianu / mle_vs_beta.ipynb
Created May 27, 2020 18:58
Some small experiment.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@floringogianu
floringogianu / exact_pg.py
Created July 18, 2019 06:24 — forked from pierrelux/exact_pg.py
Exact Policy Gradient in jax, demonstrated in figure 2d of Dadashi et al. (2019)
import jax
import jax.numpy as np
from jax import grad, jit
from jax.scipy.special import logsumexp
def dadashi_fig2d():
""" Figure 2 d) of
''The Value Function Polytope in Reinforcement Learning''
by Dadashi et al. (2019) https://arxiv.org/abs/1901.11524
@floringogianu
floringogianu / bibtex.png
Created August 13, 2018 12:02 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@floringogianu
floringogianu / Deep-Recurrent-Q-Network.ipynb
Created August 8, 2018 09:16 — forked from awjuliani/Deep-Recurrent-Q-Network.ipynb
An implementation of a Deep Recurrent Q-Network in Tensorflow.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@floringogianu
floringogianu / conda-env-autodetect.plugin.zsh
Last active July 18, 2018 03:18
zsh plugin for autodetecting conda environments based on a .venv file in your project
# conda-env-autodetect.plugin.zsh
# Copy this file to ~/.oh-my-zsh/plugins/conda-env-autodetect/
# And make sure you have a .venv file with your env's name in your
# preject's root folder.
_conda_env_auto_activate() {
if [ -f ".venv" ]; then
# check conda is active
@floringogianu
floringogianu / CMakeError.log
Created May 1, 2018 17:40
Error log for ViZDoom
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/fgogianu/tools/pip_packages/ViZDoom/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_3eed9/fast"
/usr/bin/make -f CMakeFiles/cmTC_3eed9.dir/build.make CMakeFiles/cmTC_3eed9.dir/build
make[1]: Entering directory '/home/fgogianu/tools/pip_packages/ViZDoom/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3eed9.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_3eed9.dir/CheckSymbolExists.c.o -c /home/fgogianu/tools/pip_packages/ViZDoom/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_3eed9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3eed9.dir/link.txt --verbose=1
@floringogianu
floringogianu / failed_build_log
Created April 25, 2018 07:30
Pytorch 0.4.0 build fail
[ 50%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THCS/ATen_generated_THCSparse.cu.o
[ 50%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/cuda/ATen_generated_CUDAHalf.cu.o
[ 50%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/cuda/detail/ATen_generated_IndexUtils.cu.o
[ 50%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/native/cuda/ATen_generated_Distributions.cu.o
[ 51%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/native/cuda/ATen_generated_Embedding.cu.o
[ 51%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/native/cuda/ATen_generated_EmbeddingBag.cu.o
[ 51%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/native/cuda/ATen_generated_RoiPooling.cu.o
[ 51%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/native/cuda/ATen_generated_SparseMM.cu.o
/home/florin/Tools/pytorch40/aten/src/ATen/native/cuda/Embedding.cu(37): warning: function "__any"
/usr/local/cuda/include/device_atomic_functions.h(180): here was
@floringogianu
floringogianu / null.py
Created December 8, 2017 15:53 — forked from fish830617/null.py
Calculate the null space of a matrix by QR factorization.
# null.py
import numpy as np
from scipy.linalg import qr
def qr_null(A, tol=None):
Q, R, P = qr(A.T, mode='full', pivoting=True)
tol = np.max(A) * np.finfo(R.dtype).eps if tol is None else tol
rnk = min(A.shape) - np.abs(np.diag(R))[::-1].searchsorted(tol)
return Q[:, rnk:].conj()