Skip to content

Instantly share code, notes, and snippets.

View Steve-Tech's full-sized avatar
📚
Studying

Stephen Horvath Steve-Tech

📚
Studying
View GitHub Profile
@Steve-Tech
Steve-Tech / README.md
Last active December 14, 2023 09:30
ARC Reactor, CLI Monitoring for Intel Arc (requires xpu-smi)

ARC Reactor

ARC Reactor is a simple monitoring script with an epic name for Intel ARC GPUs, it provides an interface similar to xpu-smi stats but with the blank values removed for easier viewing and will refresh every second. However, ARC Reactor still requires xpu-smi to be installed, as it uses xpu-smi dump to collect the information.

Usage

usage: arc-reactor.py [-h] [-d DEVICE] [-m METRICS] [-i I] [-n N] [-c]

options:
@Steve-Tech
Steve-Tech / JGINYUE X99-D8.conf
Created July 4, 2022 05:16
JGINYUE X99-D8 lm-sensors config
chip "nct6779-isa-0a20"
label fan2 "CPU0_FAN"
label fan1 "CPU1_FAN"
label in0 "+12V"
label in3 "+3.3V"
label in7 "3VSB"
label in8 "VBAT"
label in9 "VTT"
label in2 "AVCC"
label temp7 "CPU_PECI"
@Steve-Tech
Steve-Tech / ESP32-MCPWM.ino
Created June 22, 2022 01:23
ESP32 MCPWM Timer Sync Offset
/*
* ESP32 MCPWM Timer Sync Offset
* by Steve-Tech
* Creates an output like
* _ _
* TIMER0: | |___| |___|; or 10001000
* _ _ | | | |
* TIMER1: ___| |___| |_; or 00100010
*
* Sources:
@Steve-Tech
Steve-Tech / README.md
Last active March 4, 2022 10:42
Python Gaugan Web API

Interact with the GauGAN2 web demo using python

Inspired by DoodleChaos who would've made something similar for this video.

Usage

Import with from gaugan import gaugan

<> = optional argument

gaugan(input png name, <output jpg name>, <caption>)

@Steve-Tech
Steve-Tech / cloudflare-ddns-upnp.py
Created July 1, 2021 13:25
Cloudflare DDNS with UPnP support
#!/usr/bin/python3
#
# Original Code: https://github.com/timothymiller/cloudflare-ddns
# Cloudflare DDNS with UPnP Support
# Tested on a Telstra Smart Modem, will most likely need configuration on other modems.
# upnpclient could possibly be used to find the location/url and things
#
import requests, json, sys, signal, os, time, threading
from xml.etree import ElementTree
@Steve-Tech
Steve-Tech / QSS_API.py
Last active August 24, 2021 10:04
QNAP Switch System Python API Query
import requests
from base64 import b64encode
class QSS:
def __init__(self, baseurl, **kwargs):
self.baseurl = baseurl
self.session = requests.Session()
self.autologin = kwargs.get('autologin', False) # Keyword to check every request if logged in
self.username = kwargs.get('username', None) # Can be used instead of login function
self.password = kwargs.get('password', None)
@Steve-Tech
Steve-Tech / TASS_Scraper.py
Last active August 13, 2021 07:59
Python TASS Scraper
import requests
class TASS:
def __init__(self, baseurl):
self.baseurl = baseurl
self.session = requests.Session()
def login(self, username, password):
url = self.baseurl + "remote-json.cfm?do=ui.web.user.loginAttempt"
@Steve-Tech
Steve-Tech / gpt_2_simple.py
Created June 15, 2020 10:44
A gpt_2_simple script for finishing a paragraph.
import gpt_2_simple as gpt2
choose_model = int(input("Choose Model 0 - 124M, 1 - 335M, 2 - 774M, 3 - 1158M: "))
model_name = ["124M", "355M", "774M", "1558M"][choose_model]
if input("Download Model [y/N]: ").lower() == 'y':
gpt2.download_gpt2(model_name=model_name)
if input("Use CPU [y/N]: ").lower() == 'y':
from os import environ
@Steve-Tech
Steve-Tech / Modem-InfluxDB.py
Last active June 28, 2020 06:41
Telstra Smart Modem Stats to InfluxDB
import telstra_smart_modem
from telstra_smart_modem.base import ModemBase, HTTP_TIMEOUT
import bs4
import re
import json
from time import sleep
from datetime import datetime
from influxdb import InfluxDBClient
IP = "192.168.0.1"
import os
import subprocess
dirs = []
for i in os.listdir('.'):
if os.path.isdir(i):
dirs += [i]
for i in dirs: