Skip to content

Instantly share code, notes, and snippets.

View jreyes1108's full-sized avatar

Juan Reyes jreyes1108

  • UCSD
  • La Jolla, CA.
View GitHub Profile
@jreyes1108
jreyes1108 / gist:5558442
Created May 11, 2013 00:44
Set environment for ANF students.
#
# Automatic configuration of environment for the students.
#
function mkerr() {
echo
echo "ERROR: $1" 1>&2
echo "See your local admins or email anf-admins@ucsd.edu for further assistance."
echo
}
@jreyes1108
jreyes1108 / test.xpy
Created October 25, 2012 02:49
Antelope origin subset and print
PF=
MAN1=
BIN=test
include $(ANTELOPEMAKE)
@jreyes1108
jreyes1108 / gfplot.py
Created February 2, 2012 18:29 — forked from mattkoes/gfplot.py
plot greens functions
# Read local GreensFunction file
# and plot the traces.
#
# Original: Matthew Koessler
# Updated 2/1/12: Juan Reyes jreyes1108 _ at _ gmail.com
#
# To run: % python gfplot.py ~/path_to_file/GreensFunctionFile.gn [GFF2.gn] [GFF3.gn]
from string import *
import os
@jreyes1108
jreyes1108 / gist:1097626
Created July 21, 2011 16:55
nees python problem
>>> import antelope.datascope
import antelope # directory /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope
# /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/__init__.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/__init__.py
import antelope # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/__init__.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/datascope.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/datascope.py
import antelope.datascope # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/datascope.pyc
dlopen("/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/antelope/_datascope.so", 2);
invalid license code
@jreyes1108
jreyes1108 / VIMRC
Created November 8, 2010 21:46
vimrc config file for VI
" VIMRC
"
" To use: copy to ~/.vimrc
"
"
" Last updated: 6/2009
" Author: Juan C. Reyes
" reyes@ucsd.edu
"
: # use perl
eval 'exec $ANTELOPE/bin/perl -S $0 "$@"'
if 0;
#
# Script to test elog fucntions
# in Antelope's Perl interface to Datascope.
# Juan C. Reyes
# reyes@ucsd.edu
#
% Plot SQLstream detections
% Juan C. Reyes
% reyes@ucsd.edu
%
% Load data exported by SQLstream signal detector
% into local variables and plot.
% To Run: plot.m file.data
@jreyes1108
jreyes1108 / unauthorized ssh attempts
Created November 18, 2009 22:05
unauthorized ssh attempts
#!/bin/sh
(
#whitelist="127.0.0.1 192.168.110.1 `host test.net.com | sed -e 's/[^0-9]*//'`"
whitelist="127.0.0.1"
sed -e '/sshd\[[0-9]*\]: Failed password/!d' \
-e 's/.*Failed password for.*from //' \
-e 's/ port.*//' /var/log/secure.log | sort | uniq -c | \
while read info; do
set -- $info
@jreyes1108
jreyes1108 / amqp_consumer.py
Created October 16, 2009 20:09
Antelope 2 AMQP
#!/usr/bin/env python
"""
Read messages from the AMQP server using py-amqplib
2009-09-15 Juan Reyes <reyes@ucsd.edu>
"""
from amqplib import client_0_8 as amqp