Skip to content

Instantly share code, notes, and snippets.

@kerbeh
kerbeh / greenscren.md
Created September 25, 2018 00:17
Greenscreen chroma key with FFmpeg

##FFmpeg greenscreen process

ffmpeg -hwaccel videotoolbox -i background.jpg -i out.mp4 -filter_complex "[1:v]colorkey=0x34d454:0.3:0.15[ckout];[0:v][ckout]overlay[despill];[despill] despill=green[colorspace];[colorspace]format=yuv420p[out]" -map "[out]" output.mp4

###Explanation

*hwaccel enable hardware accelartion profile videotoolbok is avlaiable on my mac for this codec *-i is the input, the greenscreen video is second and the background image is first *-filter_complex chains up the filters in a string *colorkey provides the color of the green screen in hex, the threshold to match (higher is more) and the blend (higher is more)

@suvojit-0x55aa
suvojit-0x55aa / label_smoothing.py
Created September 30, 2019 07:55
Label Smoothing in Pytorch
import torch
import torch.nn as nn
class LabelSmoothing(nn.Module):
"""
NLL loss with label smoothing.
"""
def __init__(self, smoothing=0.0):
"""
Constructor for the LabelSmoothing module.
@sundowndev
sundowndev / GoogleDorking.md
Last active April 20, 2024 03:08
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
/** !
* Floyd-Warshall example
*
* @author Jacob Smith
* @file floyd-warshall.c
* @date Fri Apr 19 21:06:53 MDT 2024
*/
// Standard library
#include <stdio.h>
@liuran001
liuran001 / config.yaml
Last active April 20, 2024 03:05
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.4.1-231211
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
# 虚空终端 (Clash Meta) Docs 地址: https://wiki.metacubex.one
@ih2502mk
ih2502mk / list.md
Last active April 20, 2024 03:05
Quantopian Lectures Saved
@disler
disler / README.md
Last active April 20, 2024 03:05
Personal AI Assistant: 'Ada' - v0

This is not working complete code.

This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

Stay focused, keep building.

@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@xrman
xrman / gist:4468f545b169969466bceb694d742dad
Created March 12, 2019 21:47
FastStone Capture Full Serial Key
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@safa-dayo
safa-dayo / sd-webui-forge-google-colab-setup.sh
Last active April 20, 2024 02:59
Stable Diffusion web UI Forge(最新版)をGoogle Colabで起動するためのコマンドです。現在はまだ開発中(ベータ版)であることに注意してください。
#@title Stable Diffusion web UI Forge(最新版)をGoogle Colabで起動するためのコマンド
#@markdown ## このColabノートブックについて
#@markdown [Stable Diffusion web UI Forge](https://github.com/lllyasviel/stable-diffusion-webui-forge) をGoogle Colabで起動するためのノートブックとなります。
#@markdown 利用したいモデルや拡張機能、LoRAなどにチェックを入れた上で実行ボタンを押すことで、設定した内容でStable Diffusion web UIが起動します。
#@markdown また各項目には公式ページへのリンクをつけています。利用の際は公式ページよりライセンスなどを確認した上でご利用ください。
### Stable Diffusion web UIインストール