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
# grub.cfg | |
# it lets you boot linux from iso directly | |
# the files tree is at the end of file | |
# last modified: 2016-03-07 | |
set timeout=30 | |
set defaut=0 | |
set fallback=1 # what's it? | |
set pager=1 # what's it? |
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
00 01 10 11 | |
00000 NUL Spc @ ` | |
00001 SOH ! A a | |
00010 STX " B b | |
00011 ETX # C c | |
00100 EOT $ D d | |
00101 ENQ % E e | |
00110 ACK & F f | |
00111 BEL ' G g | |
01000 BS ( H h |
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
/* Don't overcomplicate. */ | |
/* Don't construct unnecessary objects. */ | |
/* Stack is for everything. */ | |
#include <bits/stdc++.h> | |
#include <experimental/optional> | |
#include <experimental/any> | |
using namespace std; | |
using namespace std::experimental; |
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
highlight ImplReminder ctermfg=red | |
match ImplReminder /\/\/ IMPLEMENT ME/ | |
autocmd FileType cpp nnoremap <F12> :0r ~/gcj/.template.cc<CR>/IMPLEMENT ME<CR> |
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
#include <array> | |
#include <future> | |
#include <iostream> | |
#include <list> | |
#include <mutex> | |
#include <vector> | |
namespace list { | |
template<class ElemT> | |
class list_base { |
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 Data.List.Utils (merge) | |
import Data.List.Split (chunksOf) | |
import Control.Monad (join) | |
import Control.Arrow -- (***) | |
import Data.List (sort) | |
dat = [4,3,2,4,5,6,3,22,4,6,2,1,10,1234,12351,2134,51] :: [Int] | |
makePair :: [[t]] -> ([t], [t]) |
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
#include <algorithm> | |
#include <vector> | |
#include <list> | |
#include <iostream> | |
using elem_t = uint64_t; | |
std::list<elem_t> msort(std::vector<elem_t>::iterator begin, std::vector<elem_t>::iterator end) { | |
if (end - begin == 1) { | |
return std::list<elem_t>(begin, end); |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using elem_t = uint64_t; | |
template<class Container> | |
void qsort(const typename Container::iterator begin, const typename Container::iterator end) { | |
if (end - begin <= 1) { | |
return; |
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 Data.Maybe | |
import Data.Functor | |
data Tree a = Node a (Maybe (Tree a)) (Maybe (Tree a)) | |
deriving Show | |
instance Functor Tree where | |
fmap f (Node x left right) = Node (f x) (left >>= return . fmap f) (right >>= return . fmap f) | |
main = print $ fmap (2*) (Node 2 (Just $ Node 10 Nothing Nothing) Nothing) |
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
/* Ilya Pikulin, 2017 | |
* | |
* This is a generic implementation of quicksort. | |
*/ | |
#include <algorithm> | |
#include <iostream> | |
#include <random> | |
#include <forward_list> | |
// #include <array> |
OlderNewer