Skip to content

Instantly share code, notes, and snippets.

@quinor
quinor / GCFW_combining.txt
Last active January 22, 2020 18:51 — forked from 12345ieee/GC2_formulae.txt
GCFW combining formulae
Gem combination:
Grade difference = 0:
gem.damageMin 0.83 0.71 0.9 * rand()
gem.damageMax 0.87 0.71 1.8 * rand()
gem.slowPower 0.81 0.35
gem.poisonDamage 0.96 0.85
gem.critHitChance 0.81 0.35
gem.critHitMultiplier 0.88 0.5
gem.manaGainPerHit 0.88 0.5
@quinor
quinor / callprintf.c
Created April 7, 2019 20:55
zso_small_3
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
const char code[] = {
0x55, 0x48, 0x89, 0xe5, 0x48, 0x83, 0xec, 0x30,
0x89, 0x7d, 0xfc, 0x48, 0xb8, 0xbe, 0xba, 0xfe,
0xca, 0xbe, 0xba, 0xfe, 0xca, 0x48, 0x89, 0x45,
0xf0, 0x48, 0xb8, 0xef, 0xbe, 0xad, 0xde, 0xef,
0xbe, 0xad, 0xde, 0x48, 0x89, 0x45, 0xe8, 0x48,
@quinor
quinor / layers.py
Last active March 14, 2018 19:59
MLP mnist numpy code
import numpy as np
class Layer:
every = []
def __init__(self):
self._result = None
Layer.every.append(self)
@classmethod
def clean_all(cls):
@quinor
quinor / fail.cpp
Created September 3, 2017 18:14
tgui fail
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <TGUI/TGUI.hpp>
#include <vector>
#include <string>
#include <algorithm>
const int PANEL_HEIGHT = 120;
tgui::Theme::Ptr theme;
clang++ -fcolor-diagnostics -o .build/release/tools/tsp_art.o -MMD -Wall -Wextra -std=c++14 -O3 -DNDEBUG -Ideps/include -Iinclude -c tools/tsp_art.cc
In file included from tools/tsp_art.cc:1:
In file included from include/FunctionAPI/Graph.hh:4:
In file included from include/FunctionAPI/Image.hh:4:
In file included from include/Image/ImageTools.hh:7:
In file included from include/Image/MultiViewer.hh:9:
In file included from deps/include/boost/optional.hpp:15:
deps/include/boost/optional/optional.hpp:369:35: error: no matching constructor for initialization of 'value_type' (aka 'std::pair<block_impl::DataInput<sf::Texture>, block_impl::DataInput<std::__cxx11::basic_string<char> > >')
::new (m_storage.address()) value_type( boost::forward<Args>(args)... ) ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
U __cxa_allocate_exception
U __cxa_throw
0000000000000000 V DW.ref.__gxx_personality_v0
0000000000000000 r GCC_except_table0
0000000000000204 r GCC_except_table4
0000000000000310 r GCC_except_table8
U __gxx_personality_v0
0000000000000000 r .LCPI0_0
0000000000000004 r .LCPI0_1
0000000000000008 r .LCPI0_2
U __cxa_allocate_exception
U __cxa_throw
0000000000000000 V DW.ref.__gxx_personality_v0
0000000000000000 r GCC_except_table0
0000000000000204 r GCC_except_table4
0000000000000310 r GCC_except_table8
U __gxx_personality_v0
0000000000000000 r .LCPI0_0
0000000000000004 r .LCPI0_1
0000000000000008 r .LCPI0_2
0000000000000000 W _ZN10block_impl11DataPromiseIN2sf7TextureEE6updateEm
0000000000000000 W _ZN10block_impl11DataPromiseIN2sf7TextureEE8get_dataEv
0000000000000000 W _ZN10block_impl11DataPromiseIN2sf7TextureEE9timestampEv
0000000000000000 W _ZN10block_impl9DataInputIN2sf7TextureEE6updateEm
0000000000000000 W _ZN10block_impl9DataInputIN2sf7TextureEE9timestampEv
U _ZN10ImageMixin11image_saverERN10block_impl11DataPromiseIN2sf7TextureEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
U _ZN10ImageMixin15image_maximizerERN10block_impl11DataPromiseIN2sf7TextureEEEi
U _ZN10ImageMixin19image_normalizationERN10block_impl11DataPromiseIN2sf7TextureEEEf
U _ZN10ImageMixin20image_filter_inverseERN10block_impl11DataPromiseIN2sf7TextureEEE
U _ZN10ImageMixin22image_filter_grayscaleERN10block_impl11DataPromiseIN2sf7TextureEEE
0000000000035500 T _ZN2sf6Shader10setUniformERKSsb
0000000000035310 T _ZN2sf6Shader10setUniformERKSsf
0000000000035410 T _ZN2sf6Shader10setUniformERKSsi
0000000000035190 T _ZN2sf6Shader10setUniformERKSsNS0_18CurrentTextureTypeE
0000000000035640 T _ZN2sf6Shader10setUniformERKSsRKNS_4priv6MatrixILm3ELm3EEE
0000000000035510 T _ZN2sf6Shader10setUniformERKSsRKNS_4priv6MatrixILm4ELm4EEE
0000000000035cf0 T _ZN2sf6Shader10setUniformERKSsRKNS_4priv7Vector4IbEE
0000000000035d20 T _ZN2sf6Shader10setUniformERKSsRKNS_4priv7Vector4IfEE
0000000000035bf0 T _ZN2sf6Shader10setUniformERKSsRKNS_4priv7Vector4IiEE
0000000000037be0 T _ZN2sf6Shader10setUniformERKSsRKNS_7TextureE
[31/43] link .build/release/executables/tsp_art
FAILED: .build/release/executables/tsp_art
clang++ -fcolor-diagnostics -L.build/release/lib -Ldeps/lib .build/release/tools/tsp_art.o -o .build/release/executables/tsp_art -lsfml-graphics -lsfml-window -lsfml-system -ltspart
.build/release/tools/tsp_art.o: In function `ImageMultiViewer<2, 2>::ImageMultiViewer()':
tools/tsp_art.cc:(.text._ZN16ImageMultiViewerILi2ELi2EEC2Ev[_ZN16ImageMultiViewerILi2ELi2EEC2Ev]+0x4ce): undefined reference to `sf::Font::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
.build/release/tools/tsp_art.o: In function `ImageMultiViewer<2, 2>::compute()':
tools/tsp_art.cc:(.text._ZN16ImageMultiViewerILi2ELi2EE7computeEv[_ZN16ImageMultiViewerILi2ELi2EE7computeEv]+0xb2): undefined reference to `sf::String::String(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::locale const&)'
tools/tsp_art.cc:(.text._ZN16ImageMultiViewerILi2ELi2EE7computeEv[_Z