Interact with the GauGAN2 web demo using python
Inspired by DoodleChaos who would've made something similar for this video.
Import with from gaugan import gaugan
<> = optional argument
gaugan(input png name, <output jpg name>, <caption>)
| 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" |
| /* | |
| * ESP32 MCPWM Timer Sync Offset | |
| * by Steve-Tech | |
| * Creates an output like | |
| * _ _ | |
| * TIMER0: | |___| |___|; or 10001000 | |
| * _ _ | | | | | |
| * TIMER1: ___| |___| |_; or 00100010 | |
| * | |
| * Sources: |
Inspired by DoodleChaos who would've made something similar for this video.
Import with from gaugan import gaugan
<> = optional argument
gaugan(input png name, <output jpg name>, <caption>)
| #!/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 |
| 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) |
| 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" | |
| 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 |
| 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: |
| import requests | |
| import re | |
| session = requests.Session() | |
| # This isn't your Telstra ID but rather the Fon credentials found in the Telstra Air app, you can also find this in the network tab of inspect element when logging in normally. | |
| anid = "[email protected]" | |
| anidpassword = "" | |
| try: login = re.findall(r'<LoginURL>(.*)</LoginURL>', session.get("http://msftconnecttest.com/redirect").text)[0] # Get the Telstra Air login URL |