Skip to content

Instantly share code, notes, and snippets.

🌍
AI vs Climate Change

Victor Schmidt vict0rsch

🌍
AI vs Climate Change
Block or report user

Report or block vict0rsch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vict0rsch
vict0rsch / labels_to_shields.py
Last active Apr 12, 2019
Produce shields from settings.yml to include as images into Readme.md
View labels_to_shields.py
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
@vict0rsch
vict0rsch / github_labels_to_yaml_settings.js
Last active Apr 11, 2019
Get all labels + colors + description on your repository's `labels` section into a Project-Bot compatible settings.yml file
View github_labels_to_yaml_settings.js
// 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 / streaming_multilabel_f1_score.py
Last active Sep 7, 2019
Streaming and Multilabel F1 score in Tensorflow
View streaming_multilabel_f1_score.py
# 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
View gist:d398d816c4f99e79bac9cd5d2a6c4900
Verifying my Blockstack ID is secured with the address 1DK3VpnQHPmtHDFW8gR2TiXUTbmTx4CbSX https://explorer.blockstack.org/address/1DK3VpnQHPmtHDFW8gR2TiXUTbmTx4CbSX
You can’t perform that action at this time.