Skip to content

Instantly share code, notes, and snippets.

View 7flash's full-sized avatar
🎯
Focusing

Igor Berlenko 7flash

🎯
Focusing
  • Telegram @galaxygur
View GitHub Profile
import { parse, type Literal } from 'acorn';
import { type Node } from 'estree-walker';
import { walk } from 'zimmerframe';
const ast = parse(output, {
ecmaVersion: 2022,
sourceType: 'module',
sourceFile: full_path,
});
@nateraw
nateraw / stable_diffusion_walk.py
Created August 18, 2022 05:59
Walk between stable diffusion text prompts
"""
Built on top of this gist by @karpathy:
https://gist.github.com/karpathy/00103b0037c5aaea32fe1da1af553355
stable diffusion dreaming over text prompts
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stable_diffusion_walk.py --prompts "['blueberry spaghetti', 'strawberry spaghetti']" --seeds 243,523 --name berry_good_spaghetti
@karpathy
karpathy / stablediffusionwalk.py
Last active October 1, 2024 09:56
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@rgbatty
rgbatty / obsidian-wsl-linking.sh
Created March 22, 2022 05:38
Obsidian WSL Linking
#!/bin/bash
echo "Starting Windows configuration"
WIN_USERPATH=$(wslpath $(wslvar USERPROFILE))
WIN_OBSIDIAN=$WIN_USERPATH/Documents/obsidian
WIN_VAULTSDIR=$WIN_OBSIDIAN/vaults
WSL_OBSIDIAN=~/obsidian
if [ ! -d "$WIN_VAULTSDIR" ]; then
@creotip
creotip / installApps.sh
Created November 4, 2017 11:09 — forked from anonymous/installApps.sh
Solus OS Automatic installation of stuff for developers
sudo eopkg install -y git
sudo eopkg install -y atom
sudo eopkg it gnome-tweak-tool
apm install color-picker file-icons minimap
apm install linter-csslint linter-eslint linter-js-yaml
sudo eopkg it -y neofetch
sudo eopkg bi --ignore-safety https://raw.githubusercontent.com/solus-project/3rd-party/master/network/web/browser/google-chrome-stable/pspec.xml
sudo eopkg it -y google-chrome-*.eopkg;sudo rm google-chrome-*.eopkg
@marjoballabani
marjoballabani / Nodejs-deap-learning.md
Last active November 17, 2017 14:54
Nodejs in deep

Nodej in deep

This article is for those who have basic knowledge of javascript

Javascript aside

Javascript thinks you should know to make sure you understand nodejs properly

  1. With functions you can do everythink you can do with other types because functions are First-Type
  2. Objects are a collection of name/value pairs
@GLMeece
GLMeece / latency_numbers.md
Last active May 22, 2024 15:57
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@jameswomack
jameswomack / npm-update.js
Created October 13, 2016 19:40
Building an npm update string generator
function makeObjectIterable (foo) {
foo[Symbol.iterator] = function* () {
yield* Object.keys(foo).map(function (name) {
return [name, foo[name]]
})
}
return foo
}
@hiiamyes
hiiamyes / use-asyncawait.js
Created September 13, 2016 17:36
bed crawler
let moment = require('moment');
let cheerio = require('cheerio');
let async = require('asyncawait/async');
let await = require('asyncawait/await');
let rp = require('request-promise');
const URL = 'https://npm.cpami.gov.tw/bed_1.aspx';
const getASPState = () => {
return new Promise( (resolve, reject) => {
@artjomb
artjomb / CryptoJS_byteArrayWordArrayConversions.js
Last active January 9, 2024 16:43
Convert a byte array to a word array and back in CryptoJS-compatible fashion
function byteArrayToWordArray(ba) {
var wa = [],
i;
for (i = 0; i < ba.length; i++) {
wa[(i / 4) | 0] |= ba[i] << (24 - 8 * i);
}
return CryptoJS.lib.WordArray.create(wa, ba.length);
}