This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in `grep -o '\..*png' myreport.txt`; do cp $f ../Public/myproject/ ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def e_sh(str) | |
str.to_s.gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/n, '\\') | |
end | |
input = STDIN.read | |
footnotes = input.scan(/\(\*(.*?)\*\)/m) | |
# existing = input.scan(/^\[\^fn(\d+)\]: /i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
""" | |
brute force get title of web page | |
usage: getTitle.py url | |
Gordon Meyer January 1, 2013 | |
www.gordonmeyer.com | |
""" | |
# modules used | |
import urllib2, urlparse, string, os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy.fft import fft, ifft, fft2, ifft2, fftshift | |
import numpy as np | |
def fft_convolve2d(x,y): | |
""" 2D convolution, using FFT""" | |
fr = fft2(x) | |
fr2 = fft2(np.flipud(np.fliplr(y))) | |
m,n = fr.shape | |
cc = np.real(ifft2(fr*fr2)) | |
cc = np.roll(cc, -m/2+1,axis=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# ----------------------------------------------------------------------------- | |
# Copyright INRIA | |
# Contributors: Nicolas P. Rougier ([email protected]) | |
# | |
# DANA is a computing framework for the simulation of distributed, | |
# asynchronous, numerical and adaptive models. | |
# | |
# This software is governed by the CeCILL license under French law and abiding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Datos iniciales | |
% | |
% Script para analizar el cambio de los esfuerzos normal y cortante | |
% en un plano oblicuo bajo carga axial | |
A_0 = 1; % Area de la seccion transversal | |
P = 1; % Fuerza externa | |
% La variacion en theta desde un corte transversal (0º - 0 rad) | |
% a un corte longitudinal (90º - pi/2 rad) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theta = 60 | |
beta = 18.02 | |
// Omega en radianes | |
w = 1500*2*%pi/60 | |
// Analisis de velocidades | |
// | |
// V_A = V_B + V_A/B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Python file uses the following encoding: utf-8 | |
import re, subprocess, os, shlex | |
from string import Template | |
class REMatcher(object): | |
def __init__(self, matchstring): | |
self.matchstring = matchstring | |
def match(self,regexp): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
with open('papers.csv','r') as f: | |
sheet = csv.reader(f) | |
papers = [] | |
for row in sheet: | |
# Every row is a list, thus I concatenate all to form a single list | |
papers = papers + row | |
# remove blank spaces | |
papers = filter(None,papers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from datetime import date | |
import sys | |
now = date.today() | |
inputDate= sys.argv[1].split() | |
day = int(inputDate[0]) | |
month = int(inputDate[1]) |
OlderNewer