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
| Debugger entered--Lisp error: (file-error "https://melpa.org/packages/archive-contents" "Not implemented") | |
| signal(file-error ("https://melpa.org/packages/archive-contents" "Not implemented")) | |
| url-insert-file-contents("https://melpa.org/packages/archive-contents") | |
| package--download-one-archive(("melpa" . "https://melpa.org/packages/") "archive-contents") | |
| #[0 "\301\300\302\"\207" [("melpa" . "https://melpa.org/packages/") package--download-one-archive "archive-contents"] 3 "\n\n(fn)"]() | |
| funcall(#[0 "\301\300\302\"\207" [("melpa" . "https://melpa.org/packages/") package--download-one-archive "archive-contents"] 3 "\n\n(fn)"]) | |
| package-refresh-contents() | |
| (progn (package-refresh-contents) (require-package package min-version t)) | |
| (if (or (assoc package package-archive-contents) no-refresh) (package-install package) (progn (package-refresh-contents) (require-package package min-version t))) | |
| (if (package-installed-p package min-version) t (if (or (assoc package package-archive-contents) no-refresh) |
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
| # Ignore everything | |
| * | |
| # But not these files | |
| !.gitignore | |
| !*.hs | |
| # Even if they are in subdirectories | |
| !*/ |
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
| *.aux | |
| *.glo | |
| *.idx | |
| *.log | |
| *.toc | |
| *.ist | |
| *.acn | |
| *.acr | |
| *.alg | |
| *.bbl |
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
| sigma = 0.3 | |
| mu = 0.06 | |
| N = 1000 | |
| flag = 0 | |
| lambda = c(0.01, 0.05, 0.1, 0.5, 1) | |
| xs = c(5) | |
| Xs = matrix(5, nrow = 5, ncol = N) | |
| zs = rnorm(N) | |
| for (i in 2:N) | |
| { |
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
| // ==UserScript== | |
| // @name Clean Wikipedia | |
| // @namespace en.wikipedia.org/wiki/* | |
| // @include about:newtab | |
| // @version 1 | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== | |
| current = window.location.pathname.toString(); |
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
| let Y_l[1 ... Y.length] and Y_r[1 ... Y.length] be new arrays | |
| Y_l.length = 0 | |
| Y_r.length = 0 | |
| for i = 1 to Y.length | |
| if Y[i] belongs to P_r | |
| Y_l.length++ | |
| Y_l[Y_l.length] = Y[i] | |
| else | |
| Y_r.length++ | |
| Y_r[Y_r.length] = Y[i] |
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
| # Program to find the sum of first n natural numbers, where the user will input n, the program uses a loop even though there is a closed form answer. # | |
| .data | |
| cmd_prompt: | |
| .asciiz "Enter a positive integer: " | |
| ans_cmd: | |
| .asciiz "The answer is: " | |
| .text | |
| main: | |
| #Prompt | |
| li $v0, 4 |
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
| #Program that will ask the name of the user and later print Hello, followed by name # | |
| .data | |
| name_prompt: | |
| .asciiz "Enter your name " | |
| salute: | |
| .asciiz "Hello, " | |
| name: | |
| .space 20 | |
| .text |
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
| generate X from distribution g | |
| generate U from Unif[0,1] | |
| if U <= f(X)/cg(X) | |
| return X | |
| otherwise | |
| go to Step 1 |
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
| while(X>1) | |
| generate U1, U2 in Unif[0,1] | |
| U1 <- 2*U1 - 1 | |
| U2 <- 2*U2 - 1 | |
| X <- U1^2 + U2^2 | |
| end | |
| Y <- sqrt(-2log X /X) | |
| Z1 <- U1Y | |
| Z2 <- U2Y | |
| return Z1, Z2 |
NewerOlder