python: basics 
get all the processes on system


import sys
my_process = os.popen("ps -ef")
for program in my_process.readlines():
print program[:-1]


make list from processes / per line, separate fields to list, print one field from lists


import os
import sys
import strings
my_process = os.popen("ps -ef")
for program in my_process.readlines():
program = program[:-1].split()
program[7]


write as function, return all programs running


import os
import sys
import strings

def list_programs():
list = []
for program in os.popen("ps -ef").readlines():
program = program[:-1].split()
list.append(program[7])
return list

if __name__ == "__main__":
for pgm in list_programs():
print pgm



using classess


class acl:
readgroups = []
def readwho(self):
print self.readgroups

newc = acl()
newc.readgroups = [ "aaaa" ]
newc.readwho()
['aaaa']


nesting classess


class allattrs(acl,version):
''' just a class '''
ou = allattrs()
ou.version="2"
ou.version
'2'




[ add comment ]   |  [ 0 trackbacks ]   |  permalink
py: regular expressions in python 

>>> import re
>>> ip = re.compile('(\d{1,3})\.(\d+)\.(\d+)\.(\d+)'



>>> x = ip.search('ip: 5.6.7.8')
>>> x is None
False

>>> x = ip.match('ip: 5.6.7.8')
>>> x is None
True



>>> x.groups()
...
('5', '6', '7', '8')



>>> x.group()[2]
'6'

>>> x.group(2)
'6'



[ add comment ]   |  [ 0 trackbacks ]   |  permalink
Various synthetisers - schemes  
http://rubidium.dyndns.org/cag/

Temperature compensated antilog circuit
http://www.seekic.com/circuit_diagram/B ... ERTER.html

A BJT is a Current Operated Transistor
http://www.learnabout-electronics.org/b ... ors_06.php


[ add comment ]   |  [ 0 trackbacks ]   |  permalink
ICL8049 
http://pdf.dzsc.com/BCJ/ICL8049BCJE.pdf

[ add comment ]   |  [ 0 trackbacks ]   |  permalink
DPP 
http://www.epravo.cz/top/clanky/dohoda- ... 79929.html

[ add comment ]   |  [ 0 trackbacks ]   |  permalink
REMOTE_USER, REMOTE_HOST 
http://www.perlfect.com/articles/cgi_env.shtml

$ENV{'REMOTE_USER'} will get the user id.



[ add comment ]   |  [ 0 trackbacks ]   |  permalink
Split or Bi-polar Power Supply 
http://www.qrp.pops.net/af-amp-2008.asp
http://www.scienceprog.com/dual-polarit ... ly-source/

LM317 Calculator V2.0
http://www.whatcircuits.com/lm317-calculator-v2/


[ add comment ]   |  [ 0 trackbacks ]   |  permalink
Voltage Controlled Filter 
http://fluxmonkey.com/electronoize/opampFilter.htm


[ add comment ]   |  [ 0 trackbacks ]   |  permalink
Review: 7 password managers for Windows, Mac OS X, iOS, and Android 
http://www.infoworld.com/d/security/rev ... oid-189597



[ add comment ]   |  [ 0 trackbacks ]   |  permalink
LM317 / LM338 / LM350 Voltage/Current Regulator Calculator 
http://diyaudioprojects.com/Technical/V ... Regulator/

[ add comment ]   |  [ 0 trackbacks ]   |  permalink

<<First <Back | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Next> Last>>