This file contains hidden or 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
| import cgi | |
| import cgitb | |
| import sys | |
| import serial | |
| cgitb.enable() | |
| form = cgi.FieldStorage() | |
| led1 = form.getvalue('led1') | |
| b = 0 | |
| if(led1 == "on"): |
This file contains hidden or 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 escpos.printer import Usb | |
| """ Seiko Epson Corp. Receipt Printer (EPSON TM-T88III) """ | |
| p = Usb(0x0456, 0x0808, 0, 0x81, 0x03) | |
| p.text("Hello World\n") | |
| p.text("Yo") |
This file contains hidden or 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
| import React, { Component, lazy } from "react"; | |
| import { Route, BrowserRouter as Router, Switch } from "react-router-dom"; | |
| import "./App.css"; | |
| import Live from "./Views/Live.js"; | |
| import Home from "./Views/Home"; | |
| import Contact from "./Views/contact"; | |
| import Vision from "./Views/Vision"; | |
| import Product from "./Views/Product"; | |
| import Login from "./Views/login"; | |
| import Projects from "./Views/Projects"; |
This file contains hidden or 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
| import ffmpeg | |
| import os | |
| import subprocess | |
| from subprocess import PIPE | |
| def convert_job(job): | |
| tail = os.path.split(job)[1].rstrip(".mp4") | |
| output = subprocess.run( |
This file contains hidden or 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
| { | |
| "pipeline": { | |
| "name": "converter" | |
| }, | |
| "description": "A pipeline that encodes videos", | |
| "input": { | |
| "pfs": { | |
| "glob": "/*", | |
| "repo": "videos" | |
| } |
This file contains hidden or 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 jrottenberg/ffmpeg:4.1 | |
| RUN apt-get update | |
| RUN apt-get install -y python3 | |
| # install python3 | |
| ADD converter.py /converter.py |
This file contains hidden or 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
| import os | |
| import subprocess | |
| from subprocess import PIPE | |
| def split_source(source): | |
| tail = os.path.split(source)[1].rstrip(".mp4") | |
| if not os.path.exists(os.path.join("/pfs/out", tail)): | |
| os.makedirs(os.path.join("/pfs/out", tail)) | |
| subprocess.run( |
This file contains hidden or 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
| { | |
| "pipeline": { | |
| "name": "splitter" | |
| }, | |
| "description": "A pipeline that splits videos into chunks", | |
| "input": { | |
| "pfs": { | |
| "glob": "/*", | |
| "repo": "videos" | |
| } |
This file contains hidden or 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
| import ffmpeg | |
| import os | |
| import subprocess | |
| from subprocess import PIPE | |
| def convert_slice(job): | |
| probe = ffmpeg.probe(job) | |
| movfolder = os.path.split(job)[0].split("/")[3] | |
| tail = os.path.split(job)[1].rstrip(".mp4") |
This file contains hidden or 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
| { | |
| "pipeline": { | |
| "name": "converter" | |
| }, | |
| "description": "A pipeline that converts chunks into encoded chunks", | |
| "input": { | |
| "pfs": { | |
| "glob": "/*/*", | |
| "repo": "splitter" | |
| } |
OlderNewer