Skip to content

Instantly share code, notes, and snippets.

View scajanus's full-sized avatar

Sakari Cajanus scajanus

View GitHub Profile
@scajanus
scajanus / SuggestWord.vim
Created September 25, 2013 10:37
Function to call spelling suggestions for VIM
func! SuggestWord()
setlocal spell
norm z=
endfunc
nnoremap <Leader>s? :call SuggestWord()<CR>
@scajanus
scajanus / gist:6653641
Created September 21, 2013 19:57
New options and plugins for Vim?
vim-eunuch
@scajanus
scajanus / Latex-table
Created September 18, 2013 06:54
Example of latex table with centering
\begin{table}[h!]
\caption{Base frequencies\vspace{2pt}}
\centering
\begin{tabular}{llr}
\toprule
base (upper strand) & base (lower strand) & frequecny \\
\hline
A & T & 14 \\
C & G & 16 \\
G & C & 12 \\
@scajanus
scajanus / ManglePaste
Last active December 22, 2015 23:29
Mangles contents of a register to be pasted
function! ManglePaste(register, pasteType)
let l:registerContents = getreg(a:register)
call setreg(a:register, substitute(getreg(a:register), 'a', 'b', ""))
execute "normal! \"" . a:register . pasteType
call setreg(a:register, registerContents)
endfunction
nnoremap p :call ManglePaste(v:register, 'p')<CR>
nnoremap P :call ManglePaste(v:register, 'P')<CR>
To realize the value of the data rather than focus on merely carefully curating
and storing it, it is important to remember why it was gathered. The people
working with the data should keep in mind that the end-goal is to gain new,
actionable insight that will help business by guiding actions that should,
eventually, show in the bottom line. \citet{barton2012making} suggest that the
most effective approach to building a model starts with identifying the
business opportunity, rather than starting with the data. This sentiment is
mirrored in the \emph{Virtuous cycle of data
mining}~\citep{berry1997data,berry2004data}, shown in
figure~\ref{fig:virtuous}, where the first step is identifying the business
13:48 sakkemo │ kattelen pyöriä
13:48 sakkemo │ :S
13:48 bettilan+│ pyöriä?! voi sakari :D
13:48 sakkemo │ juup
13:48 sakkemo │ tol maantiepyörällä ei oikein kehtoo kauppareissuja yms ajaa
13:48 sakkemo │ ei oo hirveen hyvä
13:48 sakkemo │ sellaseen
13:49 bettilan+│ njepa
" define a new highlight group (NOTE: if put in .vimrc, loading of the colorscheme will override this! i.e. set colorscheme before adding new highlight groups):
hi MyHighlightGroup ctermbg=15 guibg=#ffaaaa
" useful mappings (for visual and single line):
vnoremap <Leader>h :<C-u>exec "silent call matchadd('MyHighlightGroup', '\\%" . line("'<") ."l\\_.*\\%" .line("'>") . "l" . "')"<CR>
nnoremap <Leader>h :exec "silent call matchadd('MyHighlightGroup', '\\%" . line(".") . "l.*')"<CR>
nnoremap <Leader>c :call clearmatches()<CR>
syn match base "#script\s\+.*$"
hi link base normal
syn match var "#script\s\+\({\zs.*\ze}\|\zs\S*\ze\)\s\+{" containedin=base contained
hi link var Constant
syn match shellCmd "\({.*}\s\+{\zs.*\ze}\|{\zs.*\ze}\|.\+\s\+{\zs.*\ze}\)" containedin=base contained
hi link shellCmd Statement
Lähettäjä: inkubio-vituttaa-bounces@list.ayy.fi [inkubio-vituttaa-bounces@list.ayy.fi] k&#228;ytt&#228;j&#228;n inkubio-vituttaa@list.ayy.fi [inkubio-vituttaa@list.ayy.fi] puolesta
Lähetetty: 21. maaliskuuta 2013 21:48
Vastaanottaja: inkubio-vituttaa@list.ayy.fi
Aihe: Re: [Avautumisia] Fwd: [Noppa] T-61.5010: T-61.5010 assignment: deadline extension, and further instructions
Hei, OP täällä!
Aivan ensinnäkin kiitos kaikista viesteistä. Vituttaa-lista ei pettänyt
minua tälläkään kertaa, vaan paskamyrskyhän tästä nousi. Kuitenkin
suurimman osan viesteistä argumentointi oli hieman "ontuvaa", joten en
Alkuperäisellä Noppasivullahan tosiaan lukee koskien alkuperäistä deadlinea: "Reports submitted after the final deadline will be rejected. If you have a very good reason that causes you to miss the final deadline you can request an extension. The extension must be requested well in advance before the deadline. Otherwise, the extension will be refused." Mielestäni tämä on varsin yksiselitteisesti ilmaistu, eikä tosiaan ole kovin mielekästä, että kurssihenkilökunta itse menee rikkomaan tätä.
Lisäksi, Nopassa ilmoitetaan, että kurssityö arvostellaan kuukauden kuluessa deadlinesta, eli tämän pitäisi tapahtua 17.4. mennessä. Tässä uudessa mailissa ilmoitetaan, että lopullinen arvostelu ja tulokset tulevat 19.4. mennessä. Ennen ainakin oli 30 päivää aikaa suorituksista arvostelun julkaisemiseen, ja nykyisin ainakin tenteissä tämä on enää 4 viikkoa, eli molemmilla tavoilla rajat paukkuvat. Tällä uudella, mielivaltaisella deadlinella ei tietenkään tätä sääntöä rikota, mutta jos tätä uutta deadlinea pidetään lähtökoh