Skip to content

Instantly share code, notes, and snippets.

View rsnemmen's full-sized avatar

Rodrigo Nemmen rsnemmen

View GitHub Profile
@NathanGiesbrecht
NathanGiesbrecht / noip2.service
Last active June 26, 2024 15:32
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`
@KristoforMaynard
KristoforMaynard / imayavi.py
Last active June 6, 2019 08:45
Mayavi tools for ipython notebooks
# -*- coding: utf-8 -*-
"""Make Mayavi plots inline to ipython notebooks
Imports mayavi and mlab and adds them to interpreter namespace. Loading
this extension also sets up inline matplotlib (aka `%matpotlib inline`)
and sets offscreen rendering on linux.
Note:
Offscreen rendering on OS X doesn't seem to work, but on linux,
inline plots don't work without offscreen rendering. "Don't work"
@zonca
zonca / ipcluster_run_commands.py
Created February 14, 2014 02:01
Submit non-python commands to a running IPython cluster
import sys
from IPython.parallel import Client
def run_command(command):
import subprocess
subprocess.Popen(command, shell = True)
try:
filename = sys.argv[1]
except:
@mattbierbaum
mattbierbaum / setup.py
Created September 2, 2011 20:39
Simple SWIG/numpy example
from distutils.core import setup, Extension
import numpy
import os
os.environ['CC'] = 'g++';
setup(name='matt_simple_test', version='1.0', ext_modules =[Extension('_simple',
['simple.cc', 'simple.i'], include_dirs = [numpy.get_include(),'.'])])
@sixtenbe
sixtenbe / analytic_wfm.py
Last active May 27, 2024 01:24 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See