Skip to content

Instantly share code, notes, and snippets.

View saml's full-sized avatar

Sam Lee saml

  • New York, NY
View GitHub Profile
@saml
saml / filter-select.txt
Last active December 20, 2018 16:03
carving video out
[0:v]select='between(t,9.795990,10.296860)+between(t,11.538400,14.988400)+between(t,16.614200,22.491310)+between(t,24.577700,26.490350)+between(t,27.752800,30.000000)',setpts=N/(FRAME_RATE*TB)[v];
[0:a]aselect='between(t,9.795990,10.296860)+between(t,11.538400,14.988400)+between(t,16.614200,22.491310)+between(t,24.577700,26.490350)+between(t,27.752800,30.000000)',asetpts=N/(FRAME_RATE*TB)[a]
#!/bin/bash
prog="$(basename "$0")"
count="$(pkill --signal 0 -c "$prog")"
if [[ "$count" = "1" ]]
then
notify-send 'I will notify you after 20 mins'
sleep $(( 20 * 60 ))
notify-send -u critical 'Look away for 20 seconds'
else
from contextlib import contextmanager
import logging
_log = logging.getLogger(__name__)
class MyFilter:
def __init__(self, **kwargs):
self.kwargs = kwargs
import logging
logging.basicConfig(level='DEBUG')
_log = logging.getLogger(__name__)
class Ctx:
def __init__(self, d):
self.d = d
def keys(self):
return self.d.keys()
def __getitem__(self, item):
return self.d[item]
local mouseX = 0;
local mouseY = 0;
local function onTick(event)
local x;
local y;
x, y = mp.get_mouse_pos();
if x ~= mouseX or y ~= mouseY then
print(x, y);
def myfunc():
print('in my func')
with open('testhelper.py', 'r') as f:
yield f
with myfunc() as f:
for line in f:
print(line)
# -*- coding:utf-8 -*-
import logging
from kombu import Connection, Queue, Exchange
from kombu.mixins import ConsumerMixin
_log = logging.getLogger(__name__)
logging.basicConfig(level='DEBUG', format='%(asctime)s %(levelname)s %(name)s %(lineno)d %(process)d %(processName)s %(message)s')
project/__init.py
project/apppackage/__init__.py
project/apppackage/pylintrc
project/tests/__init__.py
project/tests/pylintrc
cd project/
pylint tests apppackage
I feel nothing at all even when I see you.
I feel nothing at all even when you're around.
That's cause I saw you walking with another man.
That's cause I saw you walking around.
Let's run to the waters that's where you lie float around.
Let's run to the waters that's where you're washed away.
G C/G D/G G G/F# Em A C D
너와 단둘이 마주앉아서 커피 한잔을 나눠마시며 할말이 없는 뻘쭘한 침묵이 난 얼마나 할말이 많았는데
C D/C Bm Em
넌 어디에 살고있는지. 어떤삶을 여태 살아왔는지
Am D7 D/C
어떨때빵 터지는지 어떨때시 무룩한지
G/B E Am D D/C G/B E F#m B E
그댄 어떤 남잘 좋아 하는지 속으로만 되뇌이다 커피가 식고 시간이 흘러 늙었어