Skip to content

Instantly share code, notes, and snippets.

{ lib
, stdenv
, fetchFromGitHub
, flatbuffers
, libb2
, libuv
, lmdb
, openssl
, perl
, perlPackages
@tim-tx
tim-tx / full_latex_document.ipynb
Created July 28, 2022 01:16
Example of building an entire latex document in a jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tim-tx
tim-tx / qutebrowser_remap.py
Created August 14, 2021 00:45
Remap qutebrowser default keybindings to colemak
qwerty_to_colemak = {
'Q': 'Q',
'W': 'W',
'E': 'F',
'R': 'P',
'T': 'G',
'Y': 'J',
'U': 'L',
'I': 'U',
'O': 'Y',
@tim-tx
tim-tx / subs.py
Created August 4, 2021 20:11
Get YouTube subscriptions
# -*- coding: utf-8 -*-
# Sample Python code for youtube.subscriptions.list
# See instructions for running these code samples locally:
# https://developers.google.com/explorer-help/guides/code_samples#python
import os
import json
import google_auth_oauthlib.flow
@tim-tx
tim-tx / maloja.service
Created July 10, 2021 16:46
Maloja systemd.service file
[Unit]
Description=Maloja self-hosted music scrobble database
Documentation=https://github.com/krateng/maloja
After=network.target
[Service]
Type=forking
Environment=HOME=/dev/null
SuccessExitStatus=1
ExecStart=/usr/local/bin/maloja start
@tim-tx
tim-tx / keymap.c
Created May 9, 2021 19:03 — forked from BundleOfJoysticks/keymap.c
QMK Alt-Tab macro
#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab
enum macro_keycodes {
KC_ALT_TAB
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_MUTE, KC_ESC, KC_MPLY, \
MO(1), KC_UP, ALT_TAB, \
@tim-tx
tim-tx / .emacs
Created February 4, 2019 21:00
.emacs
;;;;;;;;;;;;;;;;
;; ELPA setup ;;
;;;;;;;;;;;;;;;;
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
import skimage.exposure as skex
import cellprofiler
from cellprofiler.image import Image
adj = skex.adjust_sigmoid(cp_image_in.get_image(),cutoff=0.001,gain=30)
adj = skex.equalize_adapthist(adj)
cp_image_out = Image(adj,parent_image=cp_image_in)
@tim-tx
tim-tx / RunScript.py
Created September 14, 2018 20:50 — forked from bennihepp/RunScript.py
CellProfiler module to execute small python scripts
'''<b>RunScript</b> - an easy way to write scripts for CellProfiler
<hr>
This module allows you to write small python scripts that are run as part
of the CellProfiler pipeline.
'''
#################################
#
# Imports from useful Python libraries
#
#################################