Skip to content

Instantly share code, notes, and snippets.

View beeb's full-sized avatar
🦀

Valentin B. beeb

🦀
View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@fnky
fnky / ANSI.md
Last active June 7, 2025 23:13
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
class SingleAttention(Layer):
def __init__(self, d_k, d_v):
super(SingleAttention, self).__init__()
self.d_k = d_k
self.d_v = d_v
def build(self, input_shape):
self.query = Dense(self.d_k, input_shape=input_shape, kernel_initializer='glorot_uniform', bias_initializer='glorot_uniform')
self.key = Dense(self.d_k, input_shape=input_shape, kernel_initializer='glorot_uniform', bias_initializer='glorot_uniform')
self.value = Dense(self.d_v, input_shape=input_shape, kernel_initializer='glorot_uniform', bias_initializer='glorot_uniform')
@Cybergrany
Cybergrany / WeightedMultiParameterHyperOptLoss.py
Last active April 9, 2022 22:45
WeightedMultiparameterHyperOptLoss.py V 0.3
"""
WeightedMultiparameterHyperOptLoss.py V 0.3
-by Cybergrany
A loss function for Freqtrade's hyperopt feature, which allowes the user
to choose weights, which influence how much each parameter affects the objective.
For example, if I want quick trades and don't care too much about risk, I would
give more weight to trades and less to the sortino.
Most of the code here is based on existing freqtrade code, namely the sortino
function and max drawdown calculations. I've just added a way to incorporate
@hrkrshnn
hrkrshnn / generic.org
Last active March 19, 2025 23:52
Some generic writeup about common gas optimizations, etc.

Upgrade to at least 0.8.4

Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!

The advantages of versions 0.8.* over <0.8.0 are:

  • Safemath by default from 0.8.0 (can be more gas efficient than some library based safemath).
  • Low level inliner from 0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
{
{
"key": "v",
"command": "dance.modes.set",
"args": { "input": "extend-select" },
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": "escape",
"command": "dance.modes.set.normal",
@repi
repi / crate-health.md
Last active July 30, 2024 17:22
Guidelines on evaluating health & quality of third-party crates at Embark

What to evaluate and consider before adding usage of new third-party crates.

These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.

This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.

Legend: 🔒 Must have, ⭐️ Should have, 👍 Nice to have, ℹ️ Info

@bdmorin
bdmorin / mocha_kagi.css
Created June 25, 2024 18:31
catppuccin mocha for kagi
/* Catppuccin Mocha Theme for Kagi */
.search-input-container {
position: relative;
width: 100%;
color: #d9e0ee;
background-color: #1e1e2e;
border-radius: 2rem !important;
border: 1px solid #f5c2e7 !important;
transition-duration: 0.2s;