This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package newPointer | |
import "reflect" | |
// Just do not forget to cast it back | |
// Example : | |
// var a := getNewPointerForValue(int32(12)).(*int32) | |
// Uses reflection. | |
// Slower, but who cares. Postgres and network are the real bottleneck. | |
func GetNewPointerForValue(value interface{}) interface{} { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import datetime | |
import piexif | |
filepath = os.path.abspath(".") | |
# Find files with `screenshot` in the name. | |
files = [f for f in os.listdir(filepath) if "screenshot" in f and f.endswith(".jpg")] | |
print(files) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Générateur de jours ouvrés français en python | |
""" | |
def easter_date(year): | |
""" | |
Calcule la date du jour de Pâques d'une année donnée | |
Voir https://github.com/dateutil/dateutil/blob/master/dateutil/easter.py | |
:return: datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DO NOT INCLUDE THIS COMMENT (this is not valid JSON) | |
# You can use this Gist to quicky setup an Anaconda workspace within VS Code on Windows | |
# Requirement : please first install the extension "Shell launcher" by Daniel Imms | |
# Usage : | |
# -Press Ctrl+Shift+P or F1 key to enter the VS Code prompt | |
# -Enter "Shell Launcher" | |
# -Select "Shell Launcher launch" | |
# -Select what you want : "Anaconda", "Git bash", or "Notebook" | |
{ |