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 json | |
from collections import Counter | |
import requests as req | |
SNIPE_HEADER = { | |
"Accept": "application/json", | |
"Authorization": "Bearer ", # after ther space in "Bearer " paste your API key | |
} |
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
#!/bin/bash | |
#/ Usage: snipeit.sh [-vh] | |
#/ | |
#/ Install Snipe-IT open source asset management. | |
#/ | |
#/ OPTIONS: | |
#/ -v | --verbose Enable verbose output. | |
#/ -h | --help Show this message. | |
# Added Pop!_OS and Mint to the install script. |
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 pyautogui | |
pyautogui.click(1059, 217) | |
pyautogui.sleep(1) | |
pyautogui.write('data to find', interval=0.1) | |
pyautogui.sleep(1) | |
pyautogui.press('tab') | |
pyautogui.press('space') | |
# Show Table |
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
# Video @ https://www.youtube.com/watch?v=kqa-BYI46ss | |
# Author: The Nerdy Dev | |
quiz_data = [ | |
{ | |
"question": "What color is the sky?", | |
"answer": "blue" | |
}, | |
{ | |
"question": "What color is the grass?", |
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
# https://www.reddit.com/r/learnpython/comments/nmhlsm/reddit_post/ | |
# try this. | |
import psycopg2 | |
class Database: | |
def __init__(self, db): | |
connection = psycopg2.connect(host="localhost", database="test", user="postgres", password="password") | |
self.cur = self.conn.cursor() | |
self.cur.execute("CREATE TABLE IF NOT EXISTS parts (id INTEGER PRIMARY KEY, part text,customer text, retailer text, price text)") |