Skip to content

Instantly share code, notes, and snippets.


Dan Ofer ddofer

View GitHub Profile
ddofer /
Created Dec 1, 2020 — forked from jackd/
tensorflow graphics keras port for PR #155

Get my forked tensorflow graphics repo and switch to appropriate branch

git clone
cd graphics
git checkout sparse-feastnet
pip install -e .
cd ..

Get this gist:

ddofer /
Last active Apr 22, 2020
Get list of chemical elements from Wikipedia + Pandas
import pandas as pd
# read wikipedia html table with info on all elemetns, including symbols, names, properties:
df_base = pd.read_html("")[0]
element_full_names = df_base["List of chemical elements"]["Element"][:-1] # last row is comments
element_full_names =list(element_full_names.apply(lambda x: x[0],axis=1).values) # get individual names out of wrapped list format
# element_full_names.to_csv("names_of_elements.csv",index=False)
ddofer / freqLabs.R
Created Aug 9, 2017
Filter lab tests for tests that occured for at least K users distinctly, and then filter by the most frequent (non distinct) labs. R
View freqLabs.R
#get most frequent lab tests, for distinct patients.
#Filter for distinct by user:
# data.labs =
# data.labs.userDistinct = subset(,select=c("guid_tz","kod_bdika")) #ORIG
# data.labs.userDistinct= unique(data.labs.userDistinct) #ORIG
data.labs.userDistinct= unique(data.labs,by="guid_tz") #changed
ddofer /
Last active Aug 29, 2015 — forked from syhw/
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams