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 для пользователей с русско-английской клавиатурой | |
" Как правило, русскоязычных (duh) | |
" Минималистичная, минимум плагинов, но с развёрнутым описанием каждой функции, настройки и команды | |
" Работает для Vim 8.*, скомпилированного по максимуму. | |
" Чистый конфиг, без использования менеджеров плагинов. | |
" Цветовые схемы вручную копировал в папку ~/.vim/ | |
" Также, ручками добавил | |
" lightline и NERDTree в ~/.vim/pack/plugins/start, |
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
#!/usr/bin/env bash | |
## | |
# 0. (A must) Leave a star on this GIST :P | |
# 1. Clone/download/copy-paste the this script | |
# 2. Give it rights to execute: `chmod +x d.sh` | |
# 3. Move it somewhere on your PATH and (optionally) rename it on the fly: `mv d.sh /usr/local/bin/d` | |
# 4. Now run it from anywhere: `d` or `d.sh` (if you didn't rename your file) | |
# 5. ??? | |
# 6. Hooray! You're inside the container! Enjoy your stay & mess around as much as you want! |
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
#!/usr/bin/env julia | |
## | |
# A small script, written in Julia, which allows usage of 'and' and 'or' keywords instead of '&&' and '||' infix operators in Julia programs. | |
# Made out of desperation after reading this discussion: https://github.com/JuliaLang/julia/issues/5238 | |
# Notice, that run.jl **doesn't** modify the original file. | |
# | |
# Use it simply so: | |
# $> julia run.jl <filename> | |
# or by giving the file execution rights and then running: |
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
# Simplest way of using https://sdkman.io/ under Fish Shell: | |
# Add the snippet from the file below to your ~/.config/fish/config.fish and call it a day! | |
# Note: while this trick works, it doesn't give you auto-completion options. | |
function sdk | |
bash -c "source '$HOME/.sdkman/bin/sdkman-init.sh'; sdk $argv[2..-1]" | |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
;; my_addr(MYADDR) get_jwa_method_id(103289) args(2) master_code ret(1) master_data | |
;; RUNVM +1 +4 +32 | |
;; address exitcode c4' c5' | |
slice vm::invoke_get_addr(cell master_code, cell master_data) asm | |
"MYADDR // mc md my_addr" | |
"103829 PUSHINT // mc md my_addr get_jwa_method_id" | |
"2 PUSHINT // mc md my_addr get_jwa_method_id args" | |
"2 3 BLKSWAP // my_addr get_jwa_method_id args mc md" | |
"1 PUSHINT // my_addr get_jwa_method_id args mc md ret" |
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
const std = @import("std"); | |
const Build = std.Build; | |
pub fn build(b: *Build) void { | |
const target = b.standardTargetOptions(.{}); | |
const optimize = b.standardOptimizeOption(.{}); | |
// Instead of using the classic b.addExecutable, we use a custom rule | |
// to compile with Zig, then optimize with LLVM. | |
const exe = addLLvmExecutable(b, .{ |