Skip to content

Instantly share code, notes, and snippets.

:octocat:
Loading...

impshum

:octocat:
Loading...
Block or report user

Report or block impshum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@impshum
impshum / return_user_input_from_dict.py
Last active Mar 14, 2020
Return user input from dictionary
View return_user_input_from_dict.py
things = {
'1': 'one',
'2': 'two',
'3': 'three',
'0': 'EXIT'
}
def menu(options, menu_text):
while 1:
for k, v in options.items():
@impshum
impshum / changer.py
Last active Mar 14, 2020
Change colour of screen thingy with pywebview
View changer.py
import webview
class Api:
def __init__(self):
self.recording = False
def record(self):
if not self.recording:
self.recording = True
View tweepy_dl_conf.ini
[TWITTER]
twitter_consumer_key = XXXX
twitter_consumer_secret = XXXX
twitter_access_token = XXXX
twitter_access_token_secret = XXXX
View inviter.py
import configparser
import praw
import pickledb
import time
import sys
from requests import get
import datetime
ignore = ['-en-', 'trite_username', '0imp', '1uvx', '--og', 'Mr_E']
View scrape.py
from bs4 import BeautifulSoup
from requests import get
import csv
def main(query, max_pages, outfile):
query = query.replace(' ', '%20')
page = 1
next = True
with open(outfile, 'w+') as csv_file:
View scrape_ebay.py
from bs4 import BeautifulSoup
from requests import get
from fake_useragent import UserAgent
import csv
max_pages = 2
products_per_page = 100
min_price = 10
max_price = 100
@impshum
impshum / alacalc.py
Created Jun 28, 2019
Alacalc session python
View alacalc.py
import requests
data = {
'email': 'XXXX',
'api_access_key': 'XXXX'
}
s = requests.Session()
s.post('https://www.alacalc.com/api/v1/sessions', data=data)
View config.ini
[REDDIT]
username = XXXX
password = XXXX
client_id = XXXX
client_secret = XXXX
View meh.py
import configparser
config = configparser.ConfigParser()
config.read('config.ini')
reddit_user = config.get('REDDIT', 'username')
reddit_pass = config.get('REDDIT', 'password')
client_id = config.get('REDDIT', 'client_id')
client_secret = config.get('REDDIT', 'client_secret')
View blockstack
Verifying that "impshum.id" is my Blockstack ID. https://explorer.blockstack.org/name/impshum.id
You can’t perform that action at this time.