$ sudo gitlab-runner status
gitlab-runner: Service is not running.
$ journalctl -r -u gitlab-runner
FATAL: Service run failed error=chdir /var/lib/gitlab-runner: no such file or directory
export CC=/usr/bin/gcc-13 # Or any other C compiler | |
export CXX=/usr/bin/g++-13 | |
export LOCAL_PRE={local dir} | |
export CFLAGS="-I${LOCAL_PRE}/include $CFLAGS" | |
# In the SQLite source folder: | |
./configure --prefix=${LOCAL_PRE} | |
make -j 4 | |
make install |
from typing import NamedTuple | |
from pathlib import Path | |
from argparse import ArgumentParser | |
from shutil import move | |
from imghdr import what | |
from hashlib import sha1 | |
import cv2 | |
ext_map = { | |
'jpeg': 'jpg', |
import json | |
import re | |
from pathlib import Path | |
from argparse import ArgumentParser | |
from asyncio import run, gather, Semaphore, TimeoutError | |
from aiohttp import ClientSession, ClientError | |
from aiofile import AIOFile | |
from bs4 import BeautifulSoup | |
-- Make japanese candles from raw trades | |
SELECT t.tm AS time, a.price AS open, t.lp AS low, t.hp AS high, b.price AS close | |
FROM ( | |
SELECT toStartOfHour(time) AS tm, MIN(price) AS lp, MAX(price) AS hp, MIN(id) AS lid, MAX(id) AS hid | |
FROM binance_cfx_usdt_trades GROUP BY toStartOfHour(time) | |
) AS t | |
INNER JOIN binance_cfx_usdt_trades AS a ON a.id = t.lid | |
INNER JOIN binance_cfx_usdt_trades AS b ON b.id = t.hid | |
ORDER BY t.tm | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Numeric (showHex) | |
import Data.Text (pack) | |
import Control.Monad.IO.Class | |
import Data.Aeson | |
import Network.HTTP.Req |
#!/bin/sh | |
# Usage: sh wg.sh number endpoint:35053 public_key | |
sudo apt update | |
sudo apt install -y openresolv wireguard | |
umask 077 | |
wg genkey > privatekey | |
pk=`cat privatekey` |
def gst_src(size=-1, rate=30, number=0): | |
w, h = size | |
appsink = ' ! '.join([ | |
f'video/x-raw(memory:NVMM), width={w}, height={h}, format=(string)NV12, framerate=(fraction){rate}/1', | |
'nvvidconv', f'video/x-raw, width=(int){w}, height=(int){h}, format=(string)BGRx', | |
'videoconvert ! appsink' | |
]) | |
return ' ! '.join([ | |
'nvarguscamerasrc', | |
#'tee name=t', # Source and tee |
# From https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/ | |
#Install dependencies: | |
sudo apt install nasm | |
# Download ffnvcodec: | |
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git | |
cd nv-codec-headers | |
# Check ffnvcodec versions and select version |
#!/bin/sh | |
# Make RTSP stream | |
src/gst-rtsp-server-1.16.1/examples/test-launch "( v4l2src ! video/x-raw,format=YUY2,width=640,height=480 ! videoconvert ! video/x-raw,format=I420 ! videoconvert ! x264enc qp-min=18 speed-preset=superfast ! h264parse ! rtph264pay name=pay0 pt=96 config-interval=1 )" | |
# Write to file | |
gst-launch-1.0 -e v4l2src ! video/x-raw,format=YUY2,width=640,height=480 ! \ | |
videoconvert ! queue ! x264enc qp-min=18 ! h264parse ! video/x-h264,stream-format="avc",alignment="au" ! mp4mux fragment-duration=10 ! filesink location=test.mp4 |