Skip to content

Instantly share code, notes, and snippets.


Felipe S. S. Schneider schneiderfelipe

View GitHub Profile
schneiderfelipe /
Last active Aug 9, 2021
A call for strong typing
use cursive::{
views::{Dialog, TextView},
trait Store<State, Action> {
fn dispatch(&mut self, action: Action);
fn get_state(&self) -> State;
View @munrolled.nim.c
/* Generated by Nim Compiler v1.4.8 */
/* (c) 2021 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -fmax-errors=3 -O3 -fno-strict-aliasing -fno-ident -I/home/schneider/.choosenim/toolchains/nim-1.4.8/lib -I/home/schneider/Dropbox/unrolled/src -o /home/schneider/.cache/nim/unrolled_r/@munrolled.nim.c.o /home/schneider/.cache/nim/unrolled_r/@munrolled.nim.c */
#define NIM_INTBITS 64
/* section: NIM_merge_HEADERS */
View unrolled.js
/* Generated by the Nim Compiler v1.4.8 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
function toJSStr(s_1455096) {
var Tmp5;
var Tmp7;
var result_1455097 = null;
schneiderfelipe /
Last active Sep 6, 2018
Proposals for a todo command line application that does topological sorting.
$ issue create # checks TODO.txt in current or ancestor directory
(B) My issue #1 +Project
$ # Syntax from
$ issue create
(A) Done after:#1
$ issue work 1
$ issue close 1
class Note:
Abstract representation of a musical note.
note : `str`, `int`, `Note`
String representing note (e.g. 'C3', 'Ab', 'F#', etc.) or another `Note` object.
schneiderfelipe /
Last active Aug 29, 2018
API proposal for pyrrole
class pyrrole.ChemicalEquation:
pyrrole.atoms.create_data is useful for producing data objects (receives iterables or mappings of pyrrole.atoms.Atoms):
>>> r = pyr.ChemicalEquation("A <=> B + C", pyr.atoms.create_data([pyr.atoms.read_cclib("path/to/A.out", "A"),
... pyr.atoms.read_cclib("path/to/B.out", "B"),
... pyr.atoms.read_cclib("path/to/C.out", "C")]))
import pandas as pd
import pyrrole as pyr
from matplotlib import pyplot as plt
# if you want a single molecule
# pyr.Atoms(series)
# pyr.Atoms(dataframe["A"])
View pnictogen nosetests
running nosetests
running egg_info
writing requirements to pnictogen.egg-info/requires.txt
writing pnictogen.egg-info/PKG-INFO
writing top-level names to pnictogen.egg-info/top_level.txt
writing dependency_links to pnictogen.egg-info/dependency_links.txt
writing entry points to pnictogen.egg-info/entry_points.txt
reading manifest file 'pnictogen.egg-info/SOURCES.txt'
reading manifest template ''
writing manifest file 'pnictogen.egg-info/SOURCES.txt'
#!/usr/bin/env python
import numpy as np
from matplotlib import pyplot as plt
def dihedral_pot(phi, v_barrier=1., n=3., phase=0., divider=1.):
return v_barrier * (1. + np.cos(n * phi - phase)) / divider
schneiderfelipe /
Last active Jul 26, 2016
Calculates centroids and points above and below a series of rings in a molecule. Useful for NICS calculations.
#!/usr/bin/env python
import sys
from pybel import readfile
import numpy as np
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit("Expecting one argument. Abort.")