Skip to content

Instantly share code, notes, and snippets.

@johnayoung
johnayoung / cross_momentum_with_trend_overlay_v1.py
Created May 11, 2024 20:02
cross-sectional-momentum-files
import random
import time
from decimal import Decimal
from typing import Dict, List, Set, Tuple
import numpy as np
from pydantic import Field
from controllers.directional_trading.ema_crossover_v1 import EMACrossoverController, EMACrossoverControllerConfig
from hummingbot.client.config.config_data_types import ClientFieldData
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active January 21, 2025 05:22
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@marckohlbrugge
marckohlbrugge / assistant.rb
Created January 12, 2025 22:56
Overview of my LLM-powered prototype. Very rough code.
# Add these gems to your Gemfile
gem "rails" # not strictly needed, but I use ActiveConcern, etc
gem "raix" # helpful gem to reduce code needed for function calling etc
gem "thor" # to make a CLI app (not needed if you make a web app)
gem "http" # my preferred gem to make API calls
# This is the main app (`app/models/ai_chat/cli.rb`)
module AIChat
class Cli
# Thor
@reisubuntu
reisubuntu / sources.list
Created February 18, 2016 10:24 — forked from pichuang/sources.list
Kali Linux source.list /etc/apt/sources.list
deb http://kali.cs.nctu.edu.tw/ /kali main contrib non-free
deb http://kali.cs.nctu.edu.tw/ /wheezy main contrib non-free
deb http://kali.cs.nctu.edu.tw/kali kali-dev main contrib non-free
deb http://kali.cs.nctu.edu.tw/kali kali-dev main/debian-installer
deb-src http://kali.cs.nctu.edu.tw/kali kali-dev main contrib non-free
deb http://kali.cs.nctu.edu.tw/kali kali main contrib non-free
deb http://kali.cs.nctu.edu.tw/kali kali main/debian-installer
deb-src http://kali.cs.nctu.edu.tw/kali kali main contrib non-free
deb http://kali.cs.nctu.edu.tw/kali-security kali/updates main contrib non-free
deb-src http://kali.cs.nctu.edu.tw/kali-security kali/updates main contrib non-free
@cellularmitosis
cellularmitosis / README.md
Last active January 21, 2025 05:20
Some inexpensive Factorio ship designs

Inexpensive Factorio ship designs

Here's an overview of my Factorio ship designs which can be built inexpensively.

These ships are designed for use within the first four planets.

⭐️ Recommended ships:

  • The Hornet (the cheapest useful ship)
  • The Tanto (a fast, cheap solar ship)
  • The Crockett (the cheapest useful nulear ship)
@Rich-Harris
Rich-Harris / footgun.md
Last active January 21, 2025 05:19
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@Ashton-W
Ashton-W / Issue.md
Last active January 21, 2025 05:15
GitHub Markdown toggle code block
Click to toggle contents of `code`
CODE!

Ruby: The future of frozen string literals

What is a literal?

In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.

Some examples:

7 # integer literal

Learning Plan for Design Patterns and Principles of Good Design

These learning resources primarily focus on programming using Good Design Principles and Design Patterns

  • There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
@JeremyTBradshaw
JeremyTBradshaw / ConvertFrom-SecureStringToPlainText.ps1
Last active January 21, 2025 05:08
For PowerShell 5.1 and older, convert secure strings back to plain text
function ConvertFrom-SecureStringToPlainText ([System.Security.SecureString]$SecureString) {
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto(
[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString)
)
}
New-Alias -Name s2p -Value ConvertFrom-SecureStringToPlainText