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 array | |
class vector(): | |
def __init__(self, d): | |
if type(d) is int: | |
self.data = array.array('f', [0]*d) | |
elif type(d) is list: | |
self.data = array.array('f', d) | |
else: |
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
function r = rt60(s, Fs) | |
% rt60 (s, Fs) : determine reverberation time from signal s with sampling | |
% frequency Fs (44100 Hz for most wav's). | |
t = (0:(length(s)-1))'/Fs; | |
dt = 1/Fs; | |
s2 = abs(s); | |
s2 = s.^2; | |
s2db = 10*log10(s2/max(s2)); |
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
__author__="vanne" | |
__date__ ="$16.2.2010 22:02:26$" | |
from pyglet.gl import * | |
import pyglet | |
from pyglet.window import * | |
from pyglet import image | |
import 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
<html> | |
<head> | |
</head> | |
<body> | |
<!-- we will add our HTML content here --> | |
<script type="text/javascript" src="parser.js"></script> | |
<script type="text/javascript"> | |
function myParser(){ | |
/* create a Date object using the system clock */ | |
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 time | |
import urllib | |
import sys | |
__author__="vanne" | |
__date__ ="$3.3.2010 22:18:10$" | |
class ProxyTest: | |
# 192.168.11.5 is a virtual box running ubuntu and squid | |
proxies = {'http': 'http://192.168.11.5:3128'} | |
testurl = "http://farm3.static.flickr.com/2739/4358723026_84d9045990_o.jpg"; |
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 socket | |
import sys | |
host = sys.argv[1] | |
maxport = int(sys.argv[2]) | |
for k in range(1, maxport): | |
try: | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.settimeout(0.5) |
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 | |
import sys | |
import socket | |
line = sys.stdin.readline() | |
lasthost = "" | |
while len(line) != 0: | |
mylist = line.split() | |
if mylist[0] == lasthost: |
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
/* | |
* File: main.cpp | |
* Author: vanne | |
* | |
* Created on December 22, 2010, 10:00 PM | |
*/ | |
#include <cstdlib> | |
#include <iostream> | |
#include <vector> |
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
# run in paraview programmable source | |
import math | |
pdo = self.GetOutput() | |
myPts = vtk.vtkPoints() | |
myData = vtk.vtkDoubleArray() | |
myData.SetName("MyData") | |
myData.SetNumberOfComponents(2) |
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
function onOpen() { | |
// create menu entry for starting calFetch script | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [{name: "Get calendar entries", functionName: "calFetch"}]; | |
ss.addMenu("Calendar", menuEntries); | |
} | |
function calFetch() { | |
// get calendar entries and show them and total times |
OlderNewer