Skip to content

Instantly share code, notes, and snippets.

View odigity's full-sized avatar

Ofer Nave odigity

View GitHub Profile
---=---------=--------------------------------:::::::--------::::-::::--------------------
---=---------=-------------------------:-------::::::--------:::---:----------------------
---=---------=----------------------------:---:::::--------::::---------------------------
---=---------=---------------------------:------::----------------------------------------
---=---------=----------------------------------------------------------------------------
---=---------=-----------------------------+=------------------------------------------=--
---=---------------------------------------====----------------------------------------=--
---=--------**+----------------------------=---==-----------------------::-----:-------=--
---=---------=+=====----=--==-====+==========----================++=====::-------------=--
---=----------===---====+==-----::--::---------------------------*+---=+::::-----------=--
@odigity
odigity / 1_overview.txt
Last active March 13, 2022 19:42
GraphQL Cheat Sheet (not yet updated for 2021)
┌────────────────────────────┐
• Overview
• Types
• Server Examples
• Client Examples
• Responses
• Errors & Non-Nullability
• Subscriptions
@odigity
odigity / 1_notes.txt
Last active October 4, 2023 18:11
Celery Settings Primer
References
───────────────────────────────────────────────────────────────────────────
https://docs.celeryproject.org/en/stable/history/whatsnew-4.0.html#lowercase-setting-names
https://docs.celeryproject.org/en/stable/userguide/configuration.html#new-lowercase-settings
https://docs.celeryproject.org/en/stable/django/first-steps-with-django.html
https://github.com/celery/celery/blob/master/docs/conf.py#L53 # list of deprecated settings
───────────────────────────────────────────────────────────────────────────
Names
@odigity
odigity / prune.py
Created April 18, 2020 23:18
remove frames that should have been skipped by the Faceswap -een arg
#!/usr/bin/env python3
import argparse
import re
import os
import os.path
def frame_of( filename ):
return int(re.search( '_(\d+)_\d+\.png$', filename ).group(1))
@odigity
odigity / fsat.py
Created April 17, 2020 23:57
A tool for viewing/modifying the basename inside a Faceswap alignments.fsa file.
#!/usr/bin/env python3
import argparse
import pickle
import re
import zlib
def readfrom( fsafile ):
return pickle.loads(
zlib.decompress(
@odigity
odigity / Convert
Created February 13, 2020 06:18
Faceswap GUI
┌─ Data ─────────────────────────────────────────────────────────────────────┐
│ Input Dir [ ] │
│ Output Dir [ ] │
│ Alignments [ ] │
│ Reference Video [ ] │
│ Model Dir [ ] │
└────────────────────────────────────────────────────────────────────────────┘
┌─ Plugins ──────────────────────────────────────────────────────────────────┐
│ ┌─ Color Adjustment ─────────────────────────────────────────────────────┐ │
│ │ < > None <*> Avg-Color < > Color-Transfer │ │
@odigity
odigity / console.log
Created May 23, 2019 00:59
Apollo GraphQL Tutorial -- Server -- npm install
ofer@borg:~/src/tmp/apollo/fullstack-tutorial/start/server$ npm install
npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
> sqlite3@4.0.8 install /home/ofer/src/tmp/apollo/fullstack-tutorial/start/server/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
[sqlite3] Success: "/home/ofer/src/tmp/apollo/fullstack-tutorial/start/server/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" is installed via remote
@odigity
odigity / knex.js
Last active February 2, 2021 14:34
Wrapping a unit test in a transaction for easy cleanup with Knex.js
#!/usr/bin/node
const Promise = require('bluebird')
const config = require('./config.json')
const knex = require('./lib/knex')(config.database).connection()
const mock = () => ({ user_id: Math.floor(Math.random() * 999) + 1, payload_type: 'foo', attributes: JSON.stringify({}) })
const before = (t) => {
@odigity
odigity / Bluebird.txt
Created May 22, 2017 04:56
A Snapshot of my Bluebird.js Cheat Sheet.
┌──────────┐
──┤ Overview ├─────────────────────────────────────────────────────────────────
└──────────┘
$ npm install --save bluebird
const Promise = require('bluebird')
@odigity
odigity / README.md
Last active May 11, 2017 03:21
The Case for Stargate

Please allow me to make the case for why I believe you should give the Stargate TV series a chance.

tl;dr (Short Version)

Why:

  • consistent characters
  • strong continuity
  • constant world-building
  • more real science than Star Trek
  • zero-tolerance policy for mysticism