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
\documentclass{article} | |
\usepackage{graphicx} | |
\usepackage{fullpage} | |
\usepackage{amsmath} | |
\usepackage{cancel} | |
\usepackage{wrapfig}` | |
\title{Title\\\small{Author}} | |
\begin{document} | |
\maketitle | |
\setlength{\parindent}{0cm} |
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
# Here is a fun language thing I made for parallel for loops. The syntax is: | |
# parallelFor(sequence, i, numProcs): | |
# do something with sequence[i] | |
# Which gets translated by this code: | |
template parallelFor*[T](data:openarray[T], i:expr, numProcs:int, body : stmt) : stmt {.immediate.} = | |
let numOpsPerThread = (data.len/numProcs).toInt |
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 os | |
proc shell*(cmd: string) = | |
if os.execShellCmd(cmd) != 0: | |
raise newException(EOS, cmd & " returned error code 1") | |
proc fexists*(fname: string) : bool = | |
try: discard Open(fname) | |
except EIO: return false | |
return true |
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 +BundleInstall! +BundleClean +qall | |
" ,,w smart jumping! | |
set nofoldenable | |
Bundle 'zah/nimrod.vim' | |
colorscheme peaksea | |
UnBundle 'AutoClose' | |
UnBundle 'spf13/vim-autoclose' | |
"set mouse=c " Disable cursor positioning by mouse | |
execute "set colorcolumn=" . join(range(81,335), ',') | |
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
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
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed. | |
* | |
* If you are unfamiliar with LESS, you can read more about it here: | |
* http://www.lesscss.org | |
*/ |
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 memfiles, strutils | |
proc firstChar*(s: pointer; c,n: int) : pointer {.importc: "memchr", | |
header: "<string.h>"} | |
type TEntry* = tuple[start: TAddress, numChars: int] | |
proc skipToChar*(e:TEntry, c: int): TEntry = | |
let caddr = cast[TAddress](firstChar(cast[pointer](e.start), c, e.numChars)) | |
if caddr > 0: |
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
module.exports = | |
activate: -> | |
atom.workspaceView.command "wrap-lines:wrap", => @wrap() | |
atom.workspaceView.command "wrap-lines:unwrap", => @unwrap() | |
wrap: -> | |
editor = atom.workspace.activePaneItem | |
selection = editor.getSelection() | |
stext = selection.getText() |
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
killall -9 sshfs | |
umount mydir | |
sshfs user@host:path -oauto_cache,reconnect,volname=mydir |
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
# Your keymap | |
# | |
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors | |
# to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# | |
# Here's an example taken from Atom's built-in keymap: |
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 fastentries | |
iterator fastaEntries*(fname: string) : tuple[name,s:string] = | |
for entryInfo in entriesMapped(fname, sep=int('>')): | |
let seqInfo = entryInfo.skipToChar(10) | |
let s = seqInfo.toGCString(skipNewline=true, upper=true) | |
var nameInfo : TEntry = (entryInfo.start, seqInfo.start - entryInfo.start) | |
let name = nameInfo.toGCString | |
yield (name, s) |
OlderNewer