This post for Kiheon, Han.
""" | |
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) |
#include <math.h> | |
#include <stdio.h> | |
struct Q { float x, y, z, w; }; | |
float dot(Q l, Q r) | |
{ | |
return l.x * r.x + l.y * r.y + l.z * r.z + l.w * r.w; | |
} |
local function getOS() | |
local raw_os_name, raw_arch_name = '', '' | |
-- LuaJIT shortcut | |
if jit and jit.os and jit.arch then | |
raw_os_name = jit.os | |
raw_arch_name = jit.arch | |
else | |
-- is popen supported? | |
local popen_status, popen_result = pcall(io.popen, "") |
by xero updated 10.29.24
#!/usr/bin/env python | |
# encoding: utf-8 | |
def hash_djb2(s): | |
hash = 5381 | |
for x in s: | |
hash = (( hash << 5) + hash) + ord(x) | |
return hash & 0xFFFFFFFF | |
#!/bin/sh | |
#/ Usage: btsync-secret [option]... | |
#/ A Bittorrent Sync Secret Generator | |
set -e | |
h_flag=false | |
v_flag=false | |
e_flag=false | |
n_flag=false | |
c_flag=false |
LAV Splitter is used to fetch network data in some media players (e.g. MPC-HC). The LAV buffer (aka packets queue) is not measured in data volume, but rather in packets (or frames, not sure here). Anyway, since the network throughput is limited by data volume, the number of packets in queue is multiplied by factor variable, which is bigger the higher quality video you are playing. This provides variable length buffer, however you can't really control the size and if you got slow WiFi you might have experienced choppy playback.
The following guide changes the way LAV buffer works by eliminating packet limits and putting the infamous "Maximum Queue Memory" settings in charge (you might have tried to increase this settings from default 256 MB to no avail as many have before you).
###32-bit instructions
- Open the
mpc-hc/LAVFilters/LAVSplitter.ax
file in [HEX editor][hxd] of your choice.