Skip to content

Instantly share code, notes, and snippets.

View CamilleMo's full-sized avatar

Camille Moatti CamilleMo

View GitHub Profile
@CamilleMo
CamilleMo / config.lua
Last active May 18, 2023 12:42
my Lunar Vim config
-- paste the default config before this comment
-- perso
-- copilot https://medium.com/aimonks/a-guide-to-integrating-lunarvim-github-copilot-61d92f764913
lvim.plugins = {
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
},
{
@CamilleMo
CamilleMo / gist:563d315109bd6b222cfb0a6a182cd6a1
Created January 24, 2020 19:19
How to display nice tree with Git
git config --global alias.tree 'log --graph --full-history --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset"'
Then:
git tree
@CamilleMo
CamilleMo / Dockerfile
Last active January 11, 2020 19:04
Custom Dockerfile adds jupytext and graphviz # docker # graphviz # jupytext # dot # dockerfile
# Copyright (c) Camille Moatti.
# Distributed under the terms of the BSD License.
ARG BASE_CONTAINER=jupyter/datascience-notebook
FROM $BASE_CONTAINER
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python-pydot \
@CamilleMo
CamilleMo / mkDocsMermaid.md
Last active January 11, 2020 19:14
How to create a mkdocs site with mermaid

Install MkDocs

pip install mkdocs

Activate Mermaid

Add the javascript file in the yml :

site_name: My Docs 
@CamilleMo
CamilleMo / Bayesian_VaR.ipynb
Created June 18, 2017 10:52
Bayesian VaR with PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
#Input array
X=np.array([[1,0,1,0],[1,0,1,1],[0,1,0,1]])
#Output
y=np.array([[1],[1],[0]])
#Sigmoid Function
def sigmoid (x):
@CamilleMo
CamilleMo / configuration.ini
Last active February 6, 2019 11:02
A starting point
[DEFAULT]
ServerAliveInterval = 45
Compression = yes
CompressionLevel = 9
ForwardX11 = yes
[bitbucket.org]
User = hg
[topsecret.server.com]
@CamilleMo
CamilleMo / ExWorkflow.txt
Created May 12, 2017 04:54
Express Workflow
npm install express-generator -g
express --view=pug passport-local-express
J’ai eu un problème d’autorisations sur /usr/local :
réglé grace à : sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
install dependencies:
@CamilleMo
CamilleMo / apply.py
Created April 25, 2017 13:16
Apply method with Pandas
df['CDM'] = None
# La fonction ci-dessous va servir à mapper les CDM
def f(x):
portfolio_code = x['account_name_2']
asset_class = x['major_asset_type']
if 'BT ' in x['security_name'] : return 0 # pour les billets de treso
if 'ECP ' in x['security_name'] : return 0 # pour les billets de treso
if 'CD ' in x['security_name'] : return 0 # pour les billets de treso
if 'ETF' in x['security_name'] : return 0 # pour les ETF
@CamilleMo
CamilleMo / Data_analysis_workflow.ipynb
Created March 15, 2017 11:05
Proper way to start a Data / ML project
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.