Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block rebcabin

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
rebcabin /
Created Oct 12, 2018
Minimal Emacs Key Bindings for Mathematica; removed menu conflicts
Menu["Menu for the X Front End",
MenuItem["&Notebook (.nb)", "New"(* , MenuKey["n", Modifiers->{"Control"}] *)],
MenuItem["St&yled Notebook...", FrontEndExecute[{FrontEnd`NotebookOpen[FrontEnd`FindFileOnPath["StylesheetChooser.nb", "PalettePath"]]}]],
MenuItem["Pre&senter Notebook...", FrontEndExecute[{FrontEnd`NotebookOpen[FrontEnd`FindFileOnPath["PresenterNotebookChooser.nb", "PalettePath"]]}]],
rebcabin /
Created Oct 12, 2018
Minimal Emacs Key Bindings for Mathematica
@@resource KeyEventTranslations
(* Modifiers can be "Shift", "Control", "Command", "Option"
For Macintosh: "Command" = Command Key, "Option" = Option Key
For X11: "Command" = Mod1, "Option" = Mod2
For Windows: "Command" = Alt, "Option" = Alt
(* Evaluation *)
rebcabin /
Created Sep 10, 2018 — forked from kn9ts/
GPLv3 explained


TL;DR* Here's what the license entails:

1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
rebcabin /
Created Apr 23, 2018
Hypothesis strategy for random units expressions
import hypothesis.strategies as s
from support.UnitRegistry import units, Q
from pint import UnitRegistry
from pint.errors import UndefinedUnitError
from pprint import PrettyPrinter
pp = PrettyPrinter(indent=2)
def _in_unit_registry(u: str, ureg: UnitRegistry) -> bool:
rebcabin /
Created Apr 3, 2018
Do we render mathjax yet?

$x = \sqrt{y}$

rebcabin / packages.txt
Created Feb 15, 2018
my installed package list with dependencies for working multiple cursors
View packages.txt
ac-ispell 20151031.1926 installed ispell completion source for auto-complete
ace-jump-helm-line 20160918.1136 installed Ace-jump to a candidate in helm window
ace-link 20170925.723 installed Quickly follow links
ace-window 20170801.1334 installed Quickly switch windows.
adaptive-wrap 0.5.1 installed Smart line-wrapping with wrap-prefix
aggressive-indent 20171012.1107 installed Minor mode to aggressively keep your code always indented
auto-compile 20170817.1437 installed automatically compile Emacs Lisp libraries
auto-dictionary 20150410.910 installed automatic dictionary switcher for flyspell
auto-highlight-... 20130313.243 installed Automatic highlighting current symbol minor mode
auto-yasnippet 20160925.225 installed Quickly create disposable yasnippets
rebcabin / .spacemacs
Created Feb 15, 2018
My .spacemacs with working multiple/cursors
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
;; Base distribution to use. This is a layer contained in the directory


rebcabin /
Created Jan 29, 2018 — forked from shanest/
Policy gradients for reinforcement learning in TensorFlow (OpenAI gym CartPole environment)
#!/usr/bin/env python
import gym
import numpy as np
import tensorflow as tf
class PolicyGradientAgent(object):
def __init__(self, hparams, sess):
rebcabin / McBridePatersonSequenceApTypes.hs
Created Jan 18, 2018
Type analysis for McBride's and Paterson's definition of sequence in terms of ap.
View McBridePatersonSequenceApTypes.hs
-- See [McBride & Paterson, Applicative Programming with Effects]
-- (
Analysis of types:
Following, from the paper, the definition of `sequence` in terms of `ap` from
sequence :: [IO a] -> IO [a]
You can’t perform that action at this time.