Skip to content

Instantly share code, notes, and snippets.

Volodymyr wowkin2

  • Ukraine
Block or report user

Report or block wowkin2

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
@wowkin2
wowkin2 / url_parser.py
Last active Mar 4, 2019
Python parser of all non-commented links from html document.
View url_parser.py
import re
content = '''
<img src="/images/lol/hallo.png" />
/images/lol/hallo.png
/images/lol/hallo.png
//example.com/images/lol/hallo.png
http://example.com/images/lol/hallo.png
https://example.com/images/lol/hallo.png
<!-- /images/lol/commented.png -->
@wowkin2
wowkin2 / haveibeenpwned_password.py
Created Jan 22, 2019
API to check password on HaveIBeenPwned service
View haveibeenpwned_password.py
import hashlib
import requests
import getpass
def test_pw(byte_string):
hasher = hashlib.sha1()
hasher.update(byte_string)
digest = hasher.hexdigest().upper()
print(f'Hash: {digest[:5]}, {digest[5:]}')
print(f'GET https://api.pwnedpasswords.com/range/{digest[:5]}')
@wowkin2
wowkin2 / async_tcp_scan.py
Created Dec 26, 2018 — forked from 0xpizza/async_tcp_scan.py
TCP Network scanner using asyncio for Python 3.7
View async_tcp_scan.py
#!/usr/bin/python3.7
import asyncio
import ipaddress
import re
import sys
MAX_NUMBER_WORKERS = 200
@wowkin2
wowkin2 / dijkstra.py
Created Oct 7, 2018 — forked from mdsrosa/dijkstra.py
Modified Python implementation of Dijkstra's Algorithm (https://gist.github.com/econchick/4666413)
View dijkstra.py
from collections import defaultdict, deque
class Graph(object):
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
@wowkin2
wowkin2 / Readme.md
Last active Jun 12, 2019
Solution: "Exceeded 4 calls per second for api client" Python Shopify API - shopify_python_api
View Readme.md

Solution for API call limit "shopify_python_api"

If you are using Python Shopify API and getting following error
"Exceeded 4 calls per second for api client. Reduce request rates to resume uninterrupted service."
but want your script to continue working with some timeout after that,
you can use following script from shopify_limits_patch.py.

For that just copy shopify_limits_patch.py to your project and import shopify_limits_patch.

Or if you want to call it implicitly import it, remove last line patch_shopify_with_limits()
and call it before all your shopify calls.

View aes_encryption.py
import base64
from Crypto.Cipher import AES
class AESCipher(object):
BS = 16
def __init__(self, key):
self.key = key
@wowkin2
wowkin2 / aes_example_in_python.py
Created May 4, 2018 — forked from dokenzy/aes_example_in_python.py
AES Encrytion Example in Python
View aes_example_in_python.py
#-*- coding: utf-8 -*-
# Python 3.4
# author: http://blog.dokenzy.com/
# date: 2015. 4. 8
# References
# http://www.imcore.net/encrypt-decrypt-aes256-c-objective-ios-iphone-ipad-php-java-android-perl-javascript/
# http://stackoverflow.com/questions/12562021/aes-decryption-padding-with-pkcs5-python
# http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256
@wowkin2
wowkin2 / client.py
Last active Apr 23, 2018
Solution to benchmark blocking and non-blocking http-requests using aiohttp session, requests and requests in async executor.
View client.py
import time
import asyncio
import concurrent.futures
import requests
URL_SESSION = 'http://localhost:8061/session'
URL_REQUESTS = 'http://localhost:8061/requests'
URL_REQUESTS_EXECUTOR = 'http://localhost:8061/requests_executor'
@wowkin2
wowkin2 / Email Server (Windows Only).md
Created Jan 17, 2018 — forked from raelgc/Email Server (Windows Only).md
Setup a Local Only Email Server (Windows Only)
View Email Server (Windows Only).md
@wowkin2
wowkin2 / gist:dc30a3f12abc77f2afc750fbe3464d3b
Created Aug 18, 2017 — forked from rchrd2/gist:6179550
How to link django-social-auth with google-api-python-client I am creating a gist, because this took me way to long to figure out. Maybe it can save you some time!
View gist:dc30a3f12abc77f2afc750fbe3464d3b
import httplib2
from apiclient.discovery import build
from oauth2client.client import AccessTokenCredentials
def connect_helper(user):
c = user.social_auth.get(provider='google-oauth2')
access_token = c.tokens['access_token']
credentials = AccessTokenCredentials(access_token, 'my-user-agent/1.0')
http = httplib2.Http()
You can’t perform that action at this time.