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
| function [y, indexy] = myinterpolate(x, N, a_x, b_x) | |
| a=a_x; | |
| b=b_x; | |
| x_axis=a:b; | |
| x_axis_exp=a:length(x_axis)*N; | |
| x_axis_norm=1:length(x_axis_exp); | |
| y=[]; | |
| indexy=[]; |
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
| => Booting WEBrick | |
| => Rails 3.2.12 application starting in development on http://0.0.0.0:3000 | |
| => Call with -d to detach | |
| => Ctrl-C to shutdown server | |
| [2013-07-07 20:44:19] INFO WEBrick 1.3.1 | |
| [2013-07-07 20:44:19] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin11.0.1] | |
| [2013-07-07 20:44:19] INFO WEBrick::HTTPServer#start: pid=67911 port=3000 | |
| Started GET "/contracts/77/edit" for 127.0.0.1 at 2013-07-07 20:44:23 -0700 |
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
| module reg_file | |
| #(parameter addWidth=5, dataWidth=32) | |
| (data_out_1, data_out_2, addr_1, addr_2, | |
| addr_3, data_in_3, clk, we3); | |
| input [addWidth-1:0] addr_1, addr_2, addr_3; | |
| input [dataWidth-1:0] data_in_3; | |
| input clk; | |
| input we3; | |
| output [dataWidth-1:0] data_out_1, data_out_2; |
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
| w = logspace(-1,5,50); | |
| for i = 1:length(w) | |
| if (w(i) <= 36) | |
| magn(i) = 20*log10(w(i)) + 20*log10(92) | |
| elseif (w(i) <= 1800) | |
| magn(i) = 20*log10(w(i)) + 20*log10(92) -20*log10(w(i)/36) | |
| elseif (w(i) <=100000) | |
| magn(i) = 20*log10(w(i)) + 20*log10(92) -20*log10(w(i)/36) -20*log10(w(i)/1800) | |
| else |
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
| # Helps visualize the steps of Viterbi. | |
| def print_dptable(V): | |
| print "", | |
| for i in range(len(V)): print "%7d" % i, | |
| for y in V[0].keys(): | |
| print "%.5s: " % y, | |
| for t in range(len(V)): | |
| print "%.7s" % ("%f" % V[t][y]), |
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
| input clk, reset, | |
| input [5:0] Opcode, Funct, | |
| input zero, | |
| output reg MemToReg, | |
| output reg RegDst, | |
| output reg IorD, | |
| output reg PCSrc, | |
| output reg ALUSrcA, | |
| output reg [1:0] ALUSrcB, | |
| output reg IRWrite, |
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
| module FSM | |
| (input clk, input RESET, input din, output pe); | |
| //state declartion | |
| reg [1:0] state_reg, next_state; //2 bits for 3 states - not one-hot encoding | |
| parameter zero=0; | |
| parameter one=1; | |
| parameter _edge=2; |
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 | |
| ## WARNING: This file is generated | |
| #!/usr/bin/env python | |
| """Create a "virtual" Python installation | |
| """ | |
| # If you change the version here, change it in setup.py | |
| # and docs/conf.py as well. | |
| __version__ = "1.7.2" # following best practices | |
| virtualenv_version = __version__ # legacy, again |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; |
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
| #include <stdio.h> | |
| int main( int argc, char *argv[]) | |
| { | |
| int i; | |
| int max=atoi( argv[1] ); | |
| printf("generating primes up to %d\n",max); | |
| int nums[max]; | |