Skip to content

Instantly share code, notes, and snippets.

param(
[Parameter(Mandatory)]
[string]$BaseModel,
[Parameter(Mandatory)]
[string]$ConfigFile,
[Parameter(Mandatory)]
[string]$LoraName,
[string]$MixedPrecision = 'bf16',
[int]$MaxSteps = 2000,
DATE_MATCHER='2021-(06|07|08)'
# get the list of mods that depend on redscript and sort them by downloads within given time range
curl -s https://www.nexusmods.com/cyberpunk2077/mods/1511 \
| xidel -se '//td[@class="table-require-name"]/a/@href' \
| tee mods.txt \
| awk -F / '{printf "https://staticstats.nexusmods.com/mod_monthly_stats/3333/%s.json\n", $NF}' \
| parallel -j1 curl -s @- \
| jq --arg DATE_MATCHER $DATE_MATCHER '.mod_daily_counts | to_entries | map(select(.key | match($DATE_MATCHER, "g"))) | map(.value) | add' \
> dlds.txt
@jac3km4
jac3km4 / Fold.purs
Last active December 29, 2018 13:56
Typesafe CSS stylesheets with purescript-react
module Fold where
import Prelude
import Record (get)
import Data.Symbol (class IsSymbol, SProxy(..))
import Prim.Row (class Cons)
import Type.Row (class RowToList, Cons, Nil, RLProxy(..), kind RowList)
class Step stepper (lbl :: Symbol) val step | val -> step where
step :: stepper -> (SProxy lbl) -> val -> step