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>)
/* | |
* Steve's Piano even though it's more of a keyboard. | |
* Wiring Diagram at https://steve.jas-team.net/howto/arduino/piano/ | |
* By Steve | |
*/ | |
#include "pitches.h" //Got this from https://www.arduino.cc/en/Tutorial/ToneMelody but should be included here | |
//Declaring Variables although they don't vary | |
const int KeyPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; //An Array for the pins of the keys |
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 |
import os | |
import subprocess | |
dirs = [] | |
for i in os.listdir('.'): | |
if os.path.isdir(i): | |
dirs += [i] | |
for i in dirs: |
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 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 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 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) |
#!/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 |
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>)
/* | |
* ESP32 MCPWM Timer Sync Offset | |
* by Steve-Tech | |
* Creates an output like | |
* _ _ | |
* TIMER0: | |___| |___|; or 10001000 | |
* _ _ | | | | | |
* TIMER1: ___| |___| |_; or 00100010 | |
* | |
* Sources: |