Skip to content

Instantly share code, notes, and snippets.

Platform is Linux
Engine version is release-20191117
Using SDL 2 with OpenGL renderer
Desktop resolution: 1366x768
No custom resolution provided, using desktop resolution
Using resolution: 1366x768
Using window scale 1.00
OpenGL version: 4.5 (Core Profile) Mesa 19.1.6
Using default sound device
Internal mods:
it works
@kvalv
kvalv / .py
Created October 31, 2018 17:42
import matplotlib.pyplot as plt
import numpy as np
import seaborn
def stack_plot(stacks, bars, xlabels=None, title=None):
'''
stacks: np.array of shape (N, K)
bars: np.array of shape (N,)
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 1.52% of 0.66 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.00 0.66 main [1]
0.00 0.65 1/1 rasterise(Mesh, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int) [2]
0.00 0.01 1/1 loadOBJ(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) [20]
@kvalv
kvalv / .cpp
Created September 14, 2018 15:11
#include <vector>
#include <iostream>
union sse_float4 {
float __attribute__ ((vector_size (16))) vector;
float elements[4];
};
int main() {
sse_float4 fa;
@kvalv
kvalv / .cpp
Created September 14, 2018 15:09
#include <vector>
#include <iostream>
union sse_float4 {
float __attribute__ ((vector_size (16))) vector;
float elements[4];
};
int main() {
sse_float4 fa;
@kvalv
kvalv / .rkt
Created September 2, 2018 18:13
#lang racket
(require racket/draw)
(require threading)
(define seq "F+-[F]")(define delta-rot (* (/ pi 180) 90)) ; 29 degrees
(define d 10)
(define (pop lst)
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
if [ x$1 == "x--help" ]; then
cat <<EOF
Usage: $0 [subreddit] [past]
subreddit: string, any subreddit with images
past: day|week|month|year
EOF
fi
# filename, my_score, optimal_value, n_jobs, n_machines
[['data/JSPLIB/instances/abz5', 1288, 1234.0, 10, 10],
['data/JSPLIB/instances/abz6', 1006, 943.0, 10, 10],
['data/JSPLIB/instances/abz7', 785, 656.0, 20, 15],
['data/JSPLIB/instances/abz8', 824, nan, 20, 15],
['data/JSPLIB/instances/abz9', 852, nan, 20, 15],
['data/JSPLIB/instances/ft06', 60, 55.0, 6, 6],
['data/JSPLIB/instances/ft10', 1062, 930.0, 10, 10],
['data/JSPLIB/instances/ft20', 1272, 1165.0, 20, 5],