Skip to content

Instantly share code, notes, and snippets.

View JesperDramsch's full-sized avatar
🤓
This mind is intentionally left blank.

Jesper Dramsch JesperDramsch

🤓
This mind is intentionally left blank.
View GitHub Profile
@JesperDramsch
JesperDramsch / organize.py
Last active April 3, 2024 13:42 — forked from sqordfish/organize.py
Python script for organizing files in windows into multiple folders by file type. I made this primarily to organize my downloads folder.
# Author: Jacob Rust
# Modified: Jesper Dramsch
# Date: 7/8/2013
# Description:This script organizes downloaded files into separate folders depending
# on the file type. This was made for windows systems.
# Download directory should be the first command line argument
# New file types can be added to the dictionary in the main method
# Usage: python organize.py
import hashlib
@JesperDramsch
JesperDramsch / create_readme_shields.py
Last active January 20, 2023 17:08
Simple script to create shields to view notebooks on Colab, Gradient, and AWS Studio
from pathlib import Path
## replace these
user = "jesperdramsch"
folder = "notebooks"
repo = "euroscipy-2022-ml-for-science-reproducibility-tutorial"
## Add a Binder link once
print(f"https://mybinder.org/v2/gh/{user}/{repo}/HEAD", "\n")
/* @theme dramsch */
@import 'uncover';
:root {
--color-background: #eee;
--color-background-code: #ddd;
--color-background-header: #222;
--color-background-paginate: rgba(128, 128, 128, 0.05);
--color-foreground: #111;
@JesperDramsch
JesperDramsch / Update_Filters.gs
Last active October 23, 2021 23:45
Automatically Update GMail Filter When Assigning Label
function Intialize() {
return;
}
function Install() {
ScriptApp.newTrigger("updateFilter")
.timeBased().everyMinutes(10).create();
}
@JesperDramsch
JesperDramsch / news-feeds-eradicator-linkedin.user.js
Last active February 17, 2024 14:31 — forked from miglen/news-feeds-eradicator-linkedin.user.js
News Feed Eradicator for LinkedIn
// ==UserScript==
// @name News Feed Eradicator for LinkedIn
// @namespace http://miglen.com/
// @version 0.5
// @description News Feed Eradicator for LinkedIn
// @author Miglen Evlogiev (hi@miglen.com)
// @match https://www.linkedin.com/feed/
// @grant none
// @downloadURL https://gist.github.com/JesperDramsch/839365c85133927f694bf5113c77a2f1/raw/news-feeds-eradicator-linkedin.user.js
// @updateURL https://gist.github.com/JesperDramsch/839365c85133927f694bf5113c77a2f1/raw/news-feeds-eradicator-linkedin.user.js
@JesperDramsch
JesperDramsch / MakeMediumReadadableUserscript.user.js
Created August 4, 2020 16:02 — forked from luke3butler/MakeMediumReadadableUserscript.user.js
Userscript version of the MMRA (Make Medium Readable Again) Chrome extension
// ==UserScript==
// @name Make Medium Readable Userscript
// @namespace http://make.medium.readable.again
// @version 0.1
// @description https://github.com/thebaer/MMRA
// @author luke3butler (Credits to Matt Baer)
// @match *://*/*
// @grant none
// ==/UserScript==
@JesperDramsch
JesperDramsch / expat_keplergl.json
Last active February 24, 2020 16:27
KeplerGL Experiment with country rank by year for expats
{
"datasets": [
{
"version": "v1",
"data": {
"id": "vvzpce4kr",
"label": "Top Expat Destinations.csv",
"color": [
143,
47,
@JesperDramsch
JesperDramsch / keras.telegram_callback.py
Created March 27, 2018 07:40
Small script to add keras push notifications to Telegram.
import telegram_send
telegram_send.configure('~/.telegram/.conf')
class TelegramCallback(keras.callbacks.Callback):
def on_train_begin(self, logs={}):
telegram_send.send(["Starting Training"])
def on_train_end(self, logs={}):
telegram_send.send(["Training Finished"])
def on_batch_end(self, batch, logs={}):
telegram_send.send(["Loss: {:.8f} | Metrics: {:.5f}".format(logs.get('loss'),logs.get('acc'))])
@JesperDramsch
JesperDramsch / .htaccess
Last active August 29, 2015 14:26
Block Semalt / Referral Spam on Websites
# MODIFIED FROM PERISHABLE PRESS ULTIMATE REFERRER BLACKLIST
# https://perishablepress.com/4g-ultimate-referrer-blacklist/
# This is a modified referrer blacklist from http://brassblogs.com/blog/htaccess-and-spam by JesperDramsch
# This blacklist is ready to use in your site's root htaccess file
# Edit the first two lines with your specific domain information
# Check http://brassblogs.com/blog/htaccess-and-spam for updates and include my additions
# Analytics Spam Blocker - Start
<IfModule mod_rewrite.c>
@JesperDramsch
JesperDramsch / Docs_Temp_Import
Created August 23, 2014 12:26
Google Docs Temperature of Tomorrow
=ImportXML("http://api.openweathermap.org/data/2.5/forecast/daily?q=Hamburg,de&mode=xml&units=metric&cnt=2";"//time[last()]/temperature/@day")