Skip to content

Instantly share code, notes, and snippets.

View vict0rsch's full-sized avatar
🌍
AI vs Climate Change

Victor Schmidt vict0rsch

🌍
AI vs Climate Change
View GitHub Profile
Verifying my Blockstack ID is secured with the address 1DK3VpnQHPmtHDFW8gR2TiXUTbmTx4CbSX https://explorer.blockstack.org/address/1DK3VpnQHPmtHDFW8gR2TiXUTbmTx4CbSX
@vict0rsch
vict0rsch / streaming_multilabel_f1_score.py
Last active March 16, 2021 03:17
Streaming and Multilabel F1 score in Tensorflow
# From my blog post: http://vict0rsch.github.io/2018/06/06/tensorflow-streaming-multilabel-f1/
import tensorflow as tf
import numpy as np
from tensorflow.python.ops import variable_scope
from tensorflow.python.ops import array_ops
from tensorflow.python.framework import ops
from sklearn.metrics import f1_score
@vict0rsch
vict0rsch / github_labels_to_yaml_settings.js
Last active April 11, 2019 21:45
Get all labels + colors + description on your repository's `labels` section into a Project-Bot compatible settings.yml file
// Just run this whole script in your browser's console on the appropriate webpage
// For instance on https://github.com/facebook/create-react-app/labels
// 1
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function (element) {
labels.push({
name: `"${element.textContent.trim()}"`,
// using style.backgroundColor might returns "rgb(...)"
@vict0rsch
vict0rsch / labels_to_shields.py
Last active April 12, 2019 04:02
Produce shields from settings.yml to include as images into Readme.md
from pathlib import Path
if __name__ == "__main__":
labels_path = Path() / "labels.yml"
if labels_path.exists():
with labels_path.open() as f:
lines = f.readlines()
shields = []
names = []
i = 1
[Info - 5:00:33 PM] Analysis cache path: /Users/victor/Library/Caches/Microsoft/Python Language Server
[Info - 5:00:33 PM] Microsoft Python Language Server version 0.4.114.0
[Info - 5:00:33 PM] Workspace root: /Users/victor/Documents/ccai/github/omnigan
[Info - 5:00:34 PM] GetCurrentSearchPaths /Users/victor/Documents/ccai/github/omnigan/omnienv/bin/python
[Info - 5:00:34 PM] Interpreter search paths:
[Info - 5:00:34 PM] /Users/victor/.pyenv/versions/3.7.4/lib/python3.7
[Info - 5:00:34 PM] /Users/victor/.pyenv/versions/3.7.4/lib/python3.7/lib-dynload
[Info - 5:00:34 PM] /Users/victor/Documents/ccai/github/omnigan/omnienv/lib/python3.7/site-packages
[Info - 5:00:34 PM] User search paths:
[Info - 5:00:37 PM] Initializing for /Users/victor/Documents/ccai/github/omnigan/omnienv/bin/python
[Info - 1:16:10 PM] Analysis cache path: /Users/victor/Library/Caches/Microsoft/Python Language Server
[Info - 1:16:10 PM] Microsoft Python Language Server version 0.4.127.0
[Info - 1:16:10 PM] Workspace root: /Users/victor/Documents/Experiments/torch
[Info - 1:16:11 PM] GetCurrentSearchPaths /Users/victor/Documents/Experiments/torch/nndebug/bin/python
[Info - 1:16:11 PM] Interpreter search paths:
[Info - 1:16:11 PM] /Users/victor/.pyenv/versions/3.6.9/lib/python3.6
[Info - 1:16:11 PM] /Users/victor/.pyenv/versions/3.6.9/lib/python3.6/lib-dynload
[Info - 1:16:11 PM] /Users/victor/Documents/Experiments/torch/nndebug/lib/python3.6/site-packages
[Info - 1:16:11 PM] User search paths:
[Info - 1:16:14 PM] Initializing for /Users/victor/Documents/Experiments/torch/nndebug/bin/python
[Info - 11:44:14 PM] Analysis cache path: /Users/victor/Library/Caches/Microsoft/Python Language Server
[Info - 11:44:14 PM] Microsoft Python Language Server version 0.5.10.0
[Info - 11:44:14 PM] Workspace root: /Users/victor/Documents/Experiments/torch
[Info - 11:44:14 PM] GetCurrentSearchPaths /Users/victor/Documents/Experiments/torch/nndebug/bin/python
[Info - 11:44:14 PM] Interpreter search paths:
[Info - 11:44:14 PM] /Users/victor/.pyenv/versions/3.6.9/lib/python3.6
[Info - 11:44:14 PM] /Users/victor/.pyenv/versions/3.6.9/lib/python3.6/lib-dynload
[Info - 11:44:14 PM] /Users/victor/Documents/Experiments/torch/nndebug/lib/python3.6/site-packages
[Info - 11:44:14 PM] User search paths:
[Info - 11:44:18 PM] Initializing for /Users/victor/Documents/Experiments/torch/nndebug/bin/python
[
{
"key": "ctrl+shift+left",
"command": "workbench.action.previousEditor"
},
{
"key": "ctrl+alt+cmd+5",
"command": "-workbench.action.previousEditor"
},
{
from pathlib import Path
import re
from rstcloth.rstcloth import RstCloth
if __name__ == "__main__":
conf = Path() / "conf.txt"
clusterdest = Path() / "clusterconf.rst"
clouddest = Path() / "cloudconf.rst"
with conf.open("r") as f:
lines = [l.strip() for l in f.readlines()]
@vict0rsch
vict0rsch / doudou-web.md
Created March 4, 2020 13:51
Ressources Doudou