Skip to content

Instantly share code, notes, and snippets.

View scholi's full-sized avatar

Olivier Scholder scholi

  • Switzerland
View GitHub Profile
@scholi
scholi / rc.lua
Last active August 29, 2015 14:05
Config file for awesome WM
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
@scholi
scholi / FunWAutostereogram.ipynb
Last active May 8, 2017 20:54
Revert 3D-autostereogram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
Ok5BTk9OSVNfVkVSU0lPTjoKMgo6U0NBTklUX1RZUEU6CiAgICAgICAgICAgICAgRkxPQVQgICAgICAgICAgICBNU0JGSVJTVAo6UkVDX0RBVEU6CiAxMC4wMy4yMDE2CjpSRUNfVElNRToKMDk6MzY6MDUKOlJFQ19URU1QOgogICAgICAyOTAuMDAwMDAwMDAwMAo6QUNRX1RJTUU6CiAgICAgICAyNTUuNgo6U0NBTl9QSVhFTFM6CiAgICAgICAyNTYgICAgICAgMjU2CjpTQ0FOX0ZJTEU6Ck46XFNQTV9EYXRhXDIwMTYtMDMtMTBcR29sZCAxMTEgLSBTVE0wMDQuc3htCjpTQ0FOX1RJTUU6CiAgICAgICAgICAgICA0Ljk5MkUtMSAgICAgICAgICAgICA0Ljk5MkUtMQo6U0NBTl9SQU5HRToKICAgICAgICAgICA1LjAwMDAwMEUtNiAgICAgICAgICAgNS4wMDAwMDBFLTYKOlNDQU5fT0ZGU0VUOgogICAgICAgICAgICAgMC4wMDAwMDBFKzAgICAgICAgICAwLjAwMDAwMEUrMAo6U0NBTl9BTkdMRToKICAgICAgICAgICAgMC4wMDBFKzAKOlNDQU5fRElSOgp1cAo6QklBUzoKICAgICAgICAgICAgMi4wMDBFLTEKOlotQ09OVFJPTExFUjoKCU5hbWUJb24JU2V0cG9pbnQJUC1nYWluCUktZ2FpbglULWNvbnN0Cglsb2cgQ3VycmVudAkxCTIuMDAwRS0xMCBBCTIuOTM3RS0xMSBtCTMuODY1RS03IG0vcwk3LjU5OUUtNSBzCjpDT01NRU5UOgppbml0aWFsIHNjYW4KOkRBVEFfSU5GTzoKCUNoYW5uZWwJTmFtZQlVbml0CURpcmVjdGlvbglDYWxpYnJhdGlvbglPZmZzZXQKCTE0CVoJbQlib3RoCTguODIwRS04CTAuMDAwRSswCgkwCUN1cnJlbnQJQQlib3RoCTEuMDAw
@scholi
scholi / mem_watchdog.py
Last active December 20, 2018 12:10
Memory watchdog for python process.
"""
Python 64bit on windows can potentially use all your RAM and freeze your computer.
Here is a small watchdog which will automatically kill the python process which use
the highest amount of RAM if the RAM consumption is higher than 95%
"""
import psutil
import time
import sys
def get_max_ram_proc():