Skip to content

Instantly share code, notes, and snippets.

View lue's full-sized avatar

Sasha Kaurov lue

View GitHub Profile
@lue
lue / rename.py
Created March 12, 2021 21:55
renaming files for TexturePacker
import glob
import os
curdir = os.getcwd()
dirs = [ name for name in os.listdir('./') if os.path.isdir(os.path.join('./', name)) ]
for j in range(len(dirs)):
os.chdir(curdir)
os.chdir(dirs[j])
@lue
lue / Multiple nodes
Last active April 26, 2018 03:10
Scaling
2
+---------------------------------------------+------------+------------+
| Total wallclock time elapsed since start | 71.7s | |
| | | |
| Section | no. calls | wall time | % of total |
+---------------------------------+-----------+------------+------------+
| Assembly | 33 | 64.3s | 90% |
| Output | 8 | 1.57s | 2.2% |
| Solve | 33 | 2.3s | 3.2% |
| setup | 1 | 1.88s | 2.6% |
@lue
lue / Makefile.local
Created February 22, 2018 15:01
fastpm makefile
#
# Pick the MPI C compiler
CC = mpicc
#
#
# cc flag to enable OPENMP
#
OPENMP = -fopenmp
#
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
dat=np.genfromtxt('dos_ocd_ioeu_eur_sr-qc2.hg19.ch.fl.all.out.dosage.gz.noqc.Indels-removed.5132ind.0.6info_0.8cert.pruned2.evec', dtype=None, skiprows=1)
fam=np.genfromtxt('dos_ocd_ioeu_eur_sr-qc2.hg19.ch.fl.all.out.dosage.gz.noqc.Indels-removed.5132ind.0.6info_0.8cert.fam', dtype=None)
sex=fam['f4']
stat=fam['f5']
@lue
lue / paper_plot.py
Last active October 2, 2015 16:58
Difference in 21cm power spectrum with and without inner structure
from prettyfigure.style import *
define_figure_style()
data = np.load('temp.npz')
pkdata = data['pkdata']
pkdata_corrected = data['pkdata_corrected']
pkdata_other = data['pkdata_other']
pkdata_b = data['pkdata_b']
slice1 = data['slice1']
slice2 = data['slice2']