This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# script is used to send keyboard strokes WASD (2 sec) to run in circles in LEGO FORTINTE | |
# after 40 times it presses F5 to eat some food (bind this to USE and select slot with FOOD in interface) | |
import ctypes | |
from ctypes import wintypes | |
import time | |
from time import sleep | |
import random | |
user32 = ctypes.WinDLL('user32', use_last_error=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from struct import unpack | |
from scipy import interpolate | |
from PIL import Image | |
import numpy | |
import scipy | |
import sys | |
class Filter: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# | |
# Docin document downloader | |
# | |
# Valid as of 2022-16-08 | |
# | |
############################################################################### | |
import argparse | |
import os | |
from types import SimpleNamespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# variance calculation algorithm for two datasets of different lengths is taken from | |
# Chan, Tony F.; Golub, Gene H.; LeVeque, Randall J. (1979), "Updating Formulae and a Pairwise Algorithm for Computing Sample Variances." (PDF), Technical Report STAN-CS-79-773, Department of Computer Science, Stanford University. | |
# http://i.stanford.edu/pub/cstr/reports/cs/tr/79/773/CS-TR-79-773.pdf | |
import os, sys | |
import numpy as np | |
import tifffile as tiff # pip install tifffile | |
TIF_FOLDER = 'img' | |
EXT = '.tiff' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% script to read https://github.com/zhouhaoyi/ETDataset | |
clear all; clc; | |
fileName = 'ETTm1.csv'; | |
fileID = fopen(fileName); | |
C = textscan(fileID,'%s %f %f %f %f %f %f %f %f %f', 'HeaderLines',1, 'Delimiter',','); | |
fclose(fileID); | |
A = cell2mat(C(:,2:7)); | |
T = datetime(cell2mat(C{1}) , 'InputFormat','yyyy-MM-dd HH:mm:ss'); | |
OT = cell2mat(C(:,8)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cuts video to frames with defined stepsize | |
import numpy as np | |
import cv2 | |
import os, sys, glob | |
from pathlib import Path | |
from argparse import ArgumentParser | |
DEFAULT_VIDEO_FNAME = Path('_input/saved_utv_8_1.mkv') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ms.avi = Avengers: Infinity war | |
ffmpeg -ss 2:11:55 -i Ms.avi -r 1/1 Palette.png | |
ffmpeg -y -ss 2:11:38 -t 43 -i Ms.avi -filter_complex "fps=8,scale=420:-1:flags=lanczos,subtitles=Ms.srt:force_style='Fontsize=32',palettegen" palette.png | |
ffmpeg -y -ss 2:11:38 -t 43 -i Ms.avi -i palette.png -filter_complex "fps=8,scale=420:-1:flags=lanczos,subtitles=Ms.srt:force_style='Fontsize=32'[x];[x][1:v]paletteuse" output.gif | |
Ms.srt | |
0 | |
00:00:06,300 --> 00:00:07,800 | |
МУЦАРАЕВА ВКЛЮЧИ |