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
#!/bin/python3 | |
import sys | |
import os | |
import zipfile | |
import re | |
search_dir = os.path.expanduser(sys.argv[1]) | |
extract_dir = os.path.expanduser(sys.argv[2]) | |
regex = re.compile('(.+) - (.+)\.zip$') |
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
# There exists a library called "Bento", which is more sophisticated, | |
# but feel free to use this as a reference or just drop it into your code, if you don't care about errors | |
defmodule Bencode do | |
@spec parse_dictionary(binary()) :: {map(), binary()} | |
def parse_dictionary("d" <> rest), do: do_parse_dictionary(rest, %{}) | |
@spec parse_list(binary()) :: {list(), binary()} | |
def parse_list("l" <> data), do: do_parse_list(data, []) | |
@spec parse_integer(binary()) :: {integer(), binary()} |
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
defmodule Sumofdivided do | |
def sum_of_divided(lst) do | |
table = :ets.new(:results, [{:write_concurrency, true}, :public, :ordered_set]) | |
lst | |
|> Task.async_stream(&insert_divs(&1, table), timeout: :infinity, ordered: false) | |
|> Stream.run() | |
:ets.tab2list(table) |
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
# Keyboard mashing | |
tags = ~w(faoshd foasidf oasidfh oaidsf aosifhasodi faosdfaosdfasodfjasldfd noasdfn 1234234 oasdinf oasnfoasdifnoisdfnof) | |
defmodule Popper do | |
def pop_by(list, fun, default \\ nil) do | |
result = Enum.find(list, default, fun) | |
{result, List.delete(list, result)} | |
end |
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 mapleader ="," | |
call plug#begin('~/.config/nvim/plugged') | |
Plug 'tpope/vim-surround' | |
Plug 'scrooloose/nerdtree' | |
Plug 'junegunn/goyo.vim' | |
Plug 'PotatoesMaster/i3-vim-syntax' | |
Plug 'jreybert/vimagit' | |
" Plug 'LukeSmithxyz/vimling' | |
Plug 'kien/ctrlp.vim' |
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
defmodule Nostrum.Commander do | |
@params [ | |
:arguments, | |
:channel, | |
:channel_permissions, | |
:dm_channel, | |
:guild, | |
:me, | |
:message, | |
:permissions, |
This file has been truncated, but you can view the full file.
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
ERROR: ld.so: object '/home/awlex/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. | |
ERROR: ld.so: object '/home/awlex/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. | |
ERROR: ld.so: object '/home/awlex/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. | |
ERROR: ld.so: object '/home/awlex/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. | |
15979.458:0008:0009:trace:module:load_builtin_callback loaded ntdll.dll 0x1106f0 0x7bc10000 | |
15979.458:0008:0009:trace:module:load_builtin_dll Trying built-in L"kernel32.dll" | |
15979.458:0008:0009:trace:module:load_dll looking for L"ntdll.dll" in L"" | |
15979.458:0008:0009:trace:module:load_dll Found L"C:\\windows\\system32\\ntdll.dll" for L"ntdll.dll" at 0x7bc10000, |
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
#app-mount { | |
/* Shinobu */ | |
/* background-image: url("https://www.walldevil.com/wallpapers/a91/shinobu-oshino-bakemonogatari.jpg"); */ | |
/* Megumin */ | |
background-image: url('https://images3.alphacoders.com/704/704387.png'); | |
background-size: cover; | |
} |
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
import sys | |
import os.path | |
from multiprocessing import Pool | |
def wline(file_, text=""): | |
file_.write("%s\n" % text) | |
def _read_till_next_tag(file_, tag="", ignore_empty=True): | |
lines = [] |