This file contains hidden or 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
| XVLOG_FILES=xvlog.log xvlog.pb xsim.dir/ | |
| XELAB_FILES=webtalk*.log webtalk*.jou xelab.log xelab.pb .Xil/ | |
| XSIM_FILES=xsim*.log xsim*.jou work.top.wdb | |
| all: xsim.dir/ | |
| xsim.dir/: *.sv | |
| @echo "Parsing HDL" | |
| @xvlog --sv *.sv | |
| @echo "Elaborating design" |
This file contains hidden or 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 | |
| import paramiko | |
| import sys | |
| # LSHW parsing | |
| def ls_parse_branch(lines, depth=1): | |
| data = {} | |
| while len(lines): | |
| line = lines.pop(0) | |
| if line[depth:].startswith(' ') and ':' in line: |
This file contains hidden or 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
| kwilke@kbawx:/tmp$ python test.py http://suchprogramming.com | |
| ERROR: http://suchprogramming.com has content type "text/html; charset=UTF-8" | |
| kwilke@kbawx:/tmp$ python test.py http://suchprogramming.com/wp-content/uploads/2016/03/parity.png | |
| OK! |
This file contains hidden or 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
| ages = {'John': 23, | |
| 'Bailey': 36, | |
| 'George': 12} | |
| for name, age in ages.iteritems(): | |
| print "{0} is {1} years old".format(name, age) |
This file contains hidden or 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 sys | |
| times_to_run = int(sys.argv[1]) | |
| times_ran = 0 | |
| for i in range(0, times_to_run): | |
| times_ran += 1 | |
| print "Did it {0} times!".format(times_ran) |