Skip to content

Instantly share code, notes, and snippets.

View zabop's full-sized avatar

Pal Szabo zabop

View GitHub Profile
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 22, 2024 17:14
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@ultragtx
ultragtx / RSI_and_StochRSI.py
Created November 17, 2018 18:30 — forked from so1tsuda/RSI_and_StochRSI.py
Functions that calculate RSI and StochRSI which give the same value as Trading View. I wrote these functions as RSI and StochRSI functions from TA-Lib give different values as TV.
# calculating RSI (gives the same values as TradingView)
# https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas
def RSI(series, period=14):
delta = series.diff().dropna()
ups = delta * 0
downs = ups.copy()
ups[delta > 0] = delta[delta > 0]
downs[delta < 0] = -delta[delta < 0]
ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains
@darrenwiens
darrenwiens / main.py
Created April 6, 2023 20:20
Segment anything API, segments static Mapbox Satellite Image
from fastapi import FastAPI
from pydantic import BaseModel
import torch
import torchvision
import numpy as np
from PIL import Image
import random
import requests
import base64
import io