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
class Test(object): | |
def __init__(s, val): | |
s.val = val | |
def dump(s): | |
print(s.val) | |
a = Test(100) | |
a.dump() |
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
;; python-mode with jedi | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/jedi/emacs-deferred") | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/jedi/emacs-epc") | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/jedi/emacs-ctable") | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/jedi/emacs-jedi") | |
(autoload 'python "python" nil t) | |
(autoload 'jedi "jedi" "Jedi for python" t) | |
(add-hook 'python-mode-hook |
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
if ( ! $?prompt ) then | |
exit 0 | |
endif | |
setenv OLDSHELL $SHELL | |
setenv SHELL /bin/bash | |
exec /bin/bash --login |
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
iochannel = CoramIoChannel(idx=0, datawidth=32) | |
def fib(v): | |
if v <= 0: return 0 | |
if v == 1: return 1 | |
## Recursive call is not supported | |
# return fib(v-1) + fib(v-2) | |
r0 = 0 | |
r1 = 1 | |
for i in range(v-1): |
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 inspect | |
def func(a): | |
return a * a | |
r = inspect.getargspec(func) | |
print(r) |
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
// OK | |
module OnchipRam_OK # | |
( | |
parameter W_D = 32, | |
parameter W_A = 10 | |
) | |
( | |
input CLK, | |
input [W_A-1:0] addr0, | |
input we0, |
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 sys | |
import os | |
from veriloggen import * | |
def mkLed(): | |
m = Module('blinkled') | |
width = m.Parameter('WIDTH', 8) | |
clk = m.Input('CLK') | |
rst = m.Input('RST') | |
led = m.OutputReg('LED', width) |
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
//----------------------------------------------------------------------------- | |
// LedRTL_0x791afe0d4d8c | |
//----------------------------------------------------------------------------- | |
// dump-vcd: False | |
`default_nettype none | |
module LedRTL_0x791afe0d4d8c | |
( | |
input wire [ 0:0] clk, | |
output reg [ 7:0] led, | |
input wire [ 0:0] reset |
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
KERNEL=="ttyUSB*", GROUP="grpname", MODE="0666" |
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
;; Environment dependent settings | |
;;use (eq window-system `name) and (eq emacs-major-version num) | |
(cond | |
((eq window-system nil) | |
(load-file "~/.emacs.d/terminal.el")) | |
((eq window-system `ns) | |
(load-file "~/.emacs.d/cocoa.el")) | |
((eq window-system `mac) | |
(load-file "~/.emacs.d/carbon.el")) | |
((eq window-system `x) |
OlderNewer