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
" Plugins | |
call plug#begin('~/.local/share/nvim/plugged') | |
"" theme / colorscheme | |
Plug 'joshdick/onedark.vim' | |
"" fancy status bar | |
Plug 'itchyny/lightline.vim' |
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
use std::cell::RefCell; | |
use std::rc::Rc; | |
//use std::ops::{Deref, DerefMut}; | |
use std::clone::Clone; | |
struct SimContext { | |
modules: Vec<Module<ModuleInterface>> | |
} | |
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
static INPUT_STRING: &'static str = "626 2424 2593 139 2136 163 1689 367 2235 125 2365 924 135 2583 1425 2502 | |
183 149 3794 5221 5520 162 5430 4395 2466 1888 3999 3595 195 181 6188 4863 | |
163 195 512 309 102 175 343 134 401 372 368 321 350 354 183 490 | |
2441 228 250 2710 200 1166 231 2772 1473 2898 2528 2719 1736 249 1796 903 | |
3999 820 3277 3322 2997 1219 1014 170 179 2413 183 3759 3585 2136 3700 188 | |
132 108 262 203 228 104 205 126 69 208 235 311 313 258 110 117 | |
963 1112 1106 50 186 45 154 60 1288 1150 986 232 872 433 48 319 | |
111 1459 98 1624 2234 2528 93 1182 97 583 2813 3139 1792 1512 1326 3227 | |
371 374 459 83 407 460 59 40 42 90 74 163 494 250 488 444 |
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
fn main() { | |
let input_str = "8789382321573427567542547165869751253948652973493212365865746629944298942598285368427811992521691827434494352311944363682185994633915444617454729229165624148542754499834428283444638936182824252426433228229168579352421416361878599196268857915722682724427119883677628657413414672747181492551736868392658741841769855619964542531657841929294536783269377285717812121553465924328742447418161663286939585299383675756696632283355664352734843314528831759819556793353272319954522311189363931925833382225959825228334685332622248746374496246443184187486179494179392289882933919414577226419364174562438941826681971742557864459945674775827156923362492432547116535298713361298257352496674252385739523399229482142188724178585251996421945884485435654748472729842326374666646952171763582837887818431716368412156758517789846193775756964473668448542895342152869597276884197319766313238338922474381498299758561617551228576437319459133355562888171129939116949726676569142389992918319971634125489776494912272194777 |
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
" Vim Plugin manager | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'xolox/vim-misc' | |
Plugin 'xolox/vim-notes' | |
Plugin 'SirVer/ultisnips' |
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
BIN := ue | |
SRC := main.c | |
CFLAGS += -Wall -Wextra -Werror -Os -std=gnu11 -g3 | |
LDFLAGS += | |
INCLUDES += | |
LIBS += |
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
#![feature(unsafe_destructor)] | |
use std::rc::Rc; | |
use std::cell::RefCell; | |
struct Object { | |
sub: RefCell<Option<Rc<Object>>> | |
} |
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
#![feature(unsafe_destructor)] | |
trait CallbackListener { | |
fn done(&self, uint , String); | |
} | |
struct Callback<T> { | |
listener: T, | |
fired: bool |
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
from numpy import * | |
from scipy.fftpack import fft, fftfreq, fftshift | |
import matplotlib.pyplot as plt | |
# Number of samples | |
N = 500 | |
# Sample spacing | |
T = 1.0 / 800.0 | |
# plots |
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
BIN := Numeric.dll | |
SRC := Numeric.cpp | |
CFLAGS += -Wall -Wextra -Werror -O2 -std=c++11 -g3 -DBUILD_DLL | |
LDFLAGS += -shared -Wl,--out-implib,lib$(subst .dll,.lib,$(BIN)) | |
LDFLAGS += -Wl,--add-stdcall-alias | |
LDFLAGS += -Wl,--leading-underscore | |
LDFLAGS += -Wl,--output-def,$(subst .dll,.def,$(BIN)) | |
INCLUDES += -I./inc |
NewerOlder