Skip to content

Instantly share code, notes, and snippets.

@zaman
zaman / sendmail.py
Created December 8, 2012 02:53
send email with python
#!/usr/bin/python
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders
import os
gmail_user = "[email protected]"
@zaman
zaman / gist:3145554
Created July 19, 2012 17:39
cherry get and post
import cherrypy
import simplejson
class Root(object):
@cherrypy.expose
def update(self):
cl = cherrypy.request.headers['Content-Length']
rawbody = cherrypy.request.body.read(int(cl))
body = simplejson.loads(rawbody)
@zaman
zaman / gist:3145224
Created July 19, 2012 16:48
markdown klavuzu
http://www.darkcoding.net/software/markdown-quick-reference/
Headers
# Level one header #
Level one header
### Level three header ###
Level three header
@zaman
zaman / gist:2508990
Created April 27, 2012 12:58
definicion de proyecto
queramos crear un infrastructure de telecommunicaciones entre tres edificio. Hemos examinado Real Decreto 346/2011. Porque tenemos que cumplir sus normas. hemos localizado RITI, RITS y la antena en el medio edificio. Entonces hemos diseñado como nos se puede distribuir a otro edificio. Tubo de telefono e internet conectarse a RITI. y RITS recibir la señal de RTV. Tenemos que conectar RITI y RITS mutuamente. Un tubo conectarse a Edificio Lateral Izquierdo y un tubo conectarse a Edificio Lateral Derecho traves de RITS. Entonces hemos dibujado planes para cada plantas y localizado todos elementos. Hemos examinado los datos tecnicos por cada componente. Hemos buscado costo de cada componente y calculamos presupuesto total.
function [x,it,err] = newton1(x0,tol,fname,fpname)
% Newton's metod
% alt a) |f(x^k)| <= tol
it = 0;
x = x0;
fx = feval(fname , x);
fpx = feval(fpname, x);
err = abs(fx);
function [x,iter] = gaussseidel(A,b,tol,max)
% Usage: [x,iter] = gaussseidel(A,b,tol,max)
% Uses Jacobi iteration to solve Ax = b
% Input variables:
% A = matrix
% b = rhs
% tol = l2 tolerance on residue
% max = maximum allowable number of iterations
% Output variables:
% x = solution
function [x,iter] = gaussseidel(A,b,tol,max)
% Usage: [x,iter] = gaussseidel(A,b,tol,max)
% Uses Jacobi iteration to solve Ax = b
% Input variables:
% A = matrix
% b = rhs
% tol = l2 tolerance on residue
% max = maximum allowable number of iterations
% Output variables:
% x = solution
function x = jacobi ( A, b, xold, TOL, Nmax )
%JACOBI approximate the solution of the linear system Ax = b by applying
% the Jacobi method (simultaneous relaxation)
%
% calling sequences:
% x = jacobi ( A, b, xold, TOL, Nmax )
% jacobi ( A, b, xold, TOL, Nmax )
%
% inputs:
@zaman
zaman / priority_queue.py
Created November 23, 2011 03:39
oncelikli kuyruk
#!/usr/bin/python
#-*-coding:utf-8-*-
class oncelikli_kuyruk:
def __init__(self):
self.items = []
def peek(self):
return self.items[0]

Analog Output

Çıkış verisi için DAQ kartlarının çoklu analog kanalları vardır.

Library (Kütüphane)

Data Acquisition Toolbox

Not: 64 bit analog Windows sistemlerde legacy interface (miras arayüzü) kullanmayınız. Veri toplama ve veri oluşturmada session-based interface (oturum tabanlı arayüz) kullanınız.