Skip to content

Instantly share code, notes, and snippets.

View tcapelle's full-sized avatar
😄
happy

Thomas Capelle tcapelle

😄
happy
View GitHub Profile
def _get_col_idxs(df, cols):
"return cols index to perform iloc"
return [df.columns.get_loc(c) for c in L(cols) if c in df]
def _iloc(df, rows, cols=None):
"Iloc that supports col names"
if isinstance(cols, (tuple, list, str)):
cols = _get_col_idxs(df, cols)
return df.iloc[rows, cols]
return df.iloc[rows, slice(None)]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Basic Linux Setup

This gist aims to setup a LInux machine for python work from scratch.

ZSH

Other terminal app that is plain better.

TMUX

  • start new with session name: tmux new -s myname
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tcapelle
tcapelle / install.md
Last active November 28, 2019 13:34
Installing bifacial Radiance

Quick install :

  1. Installer Radiance et ajouter les binaires au Path de windows. Faire un test simple, ouvrir une terminal (je conseil cmder) et lance la commande:
>>rvu
rvu: fatal - missing octree argument

L'output doit etre rvu: fatal - missing octree argument, ca veut dire que il trouve rvu sur ton path.

  1. Créer un environment sur conda pour travailler sur Radiance
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tcapelle
tcapelle / git.md
Last active June 17, 2019 07:51
Useful commands

Check fiest that a upstream repo is setup here. $ git remote -v Basic commands to sync/merge git with origin.

$ git checkout master
> Switched to branch 'master'

$ git merge upstream/master
> Updating a422352..5fdff0f