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
| alias linux='docker run -ti -w /opt -v .:/opt ubuntu bash' |
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
| #!/usr/bin/env python3 | |
| import time | |
| import random | |
| from pywebio import start_server, config | |
| from pywebio.output import * | |
| from pywebio.session import run_js, local as session_local | |
| from stuff import WORDLIST | |
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
| #!/usr/bin/env python3 | |
| import json | |
| import requests | |
| from pywebio import start_server | |
| from pywebio.output import put_table | |
| from pywebio.input import select | |
| url = "https://api.coincap.io/v2/assets" | |
| dic = {} |
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 openai | |
| from pywebio import start_server | |
| from pywebio.output import put_table | |
| from pywebio.input import input | |
| openai.api_key = '' | |
| def openai_response(name, question): | |
| response = openai.ChatCompletion.create( |
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 collections import defaultdict | |
| import subprocess | |
| basedir = "/Users/user/Desktop/files" | |
| dict1 = defaultdict(list) | |
| dict2 = {} | |
| count = 0 | |
| output = subprocess.check_output(['find', basedir, '-type', 'f'], text=True) |
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
| #!/usr/bin/env python3 | |
| import random | |
| # base numbers, 5 numbers picks all unique, range is (1-69) | |
| nums_range = 69 | |
| nums_count = 5 | |
| nums = [] | |
| # powerball, 1 numbers picked, range is (1-26) |
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
| #!/usr/bin/python3 | |
| import roman | |
| errmsg = '\nOnly whole numbers or Roman Numerals between 1 and 3999 excepted\n' | |
| number = input('Enter a number between 1 and 3999 in either Integer or Roman Numeral format> ') | |
| if number.isalpha(): | |
| try: | |
| print(roman.fromRoman(number.upper())) | |
| except roman.InvalidRomanNumeralError: |
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
| user nginx; | |
| worker_processes auto; | |
| error_log /var/log/nginx/error.log notice; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
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
| #!/usr/bin/env python3 | |
| import requests, json | |
| jsn = {"model": "llama3","prompt": "hi","stream": False} | |
| response = requests.post('http://localhost:11434/api/generate', json=jsn) |