I hereby claim:
- I am cpebble on github.
- I am cpebble (https://keybase.io/cpebble) on keybase.
- I have a public key ASCOI8lX3x0I7cAWNVTkIoVEpScBOoaw-NDEQxet2JNxMAo
To claim this, I am signing this object:
| import torch.multiprocessing as mp | |
| mp.set_sharing_strategy("file_system") | |
| class InMemoryMap(Dataset): | |
| def __init__(self, | |
| ds, | |
| gpu=False): | |
| self.ds = ds | |
| self.device = torch.device("cuda:0" if gpu else "cpu") | |
| self.samples = None |
I hereby claim:
To claim this, I am signing this object:
| function iota (n) { // Pretty genius implementation | |
| return [...Array(n).keys()] | |
| } | |
| function fizzbuzz (n) { | |
| return iota(30).map( x => | |
| (x % 15 === 0 ? "fizzbuzz" : x % 3 == 0 ? "fizz" : x % 5 == 0 ? "buzz" : x.toString()) | |
| ) | |
| } |
| test |
| call plug#begin('~/.local/share/nvim/plugged') | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'sjl/badwolf' | |
| Plug 'morhetz/gruvbox' | |
| Plug 'iCyMind/NeoSolarized' | |
| Plug 'scrooloose/syntastic' | |
| Plug 'scrooloose/nerdtree' | |
| Plug 'lervag/vimtex', { 'for': 'tex'} | |
| Plug 'KeitaNakamura/tex-conceal.vim', {'for': 'tex'} | |
| Plug 'Valloric/YouCompleteMe' |
| module Testing | |
| /// <summary>En funktion der tager en tuple med tests. | |
| /// Understøtter også to pointers med til succeser og fejltagelser </summary> | |
| /// <remarks></remarks> | |
| /// <param name='func'>En testfunction</param> | |
| /// <param name='funcName'>Funktionsnavnet der bliver testet</param> | |
| /// <param name='tests'>Tuple med tests</param> | |
| /// <param name='succPointer'>Pointer der inkrementeres når en test består</param> | |
| /// <param name='succPointer'>Pointer der inkrementeres når en test fejler</param> | |
| /// <returns>Unit; Printer, men returner intet</returns> |
| from random import randint | |
| # Lad os lige lave noget data | |
| data = [randint(-100, 100) for _ in range(100)] | |
| # map | |
| data_mapped = map(lambda a: a**2, data) | |
| # Og med builtins | |
| data_mapped_2 = [] | |
| for a in data: |
| #define _POSIX_C_SOURCE 1 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <signal.h> | |
| #include <string.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| #include <assert.h> | |
| // |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| echo Fetching reddit links | |
| postJSON=$(curl -s 'https://www.reddit.com/r/wallpapers.json?limit=100' -A "Wallpaper fetcher by /u/cpcp800") | |
| # OMG fucking sed horrorbeast no judging | |
| resolutions=$(resolutions | sed 's/.*\([0-9][0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]\+\).*/\1/') | |
| echo JSON Fetched | |
| parseJSON () { | |
| echo $postJSON | jq --arg HEIGHT "$1" --arg WIDTH "$2" '.data.children[] | |
| | select( |