This file contains 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 | |
# Before running make file executable: | |
# chmod +x decompile.sh | |
# And check Android SDK version (in this case it is - 33.0.1) | |
# Create directory | |
mkdir "decompiled" |
This file contains 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 rospy | |
from std_srvs.srv import Empty | |
def reset_world(): | |
""" | |
Reset Gazebo world to restore initial position | |
""" | |
rospy.wait_for_service('/gazebo/reset_world') |
This file contains 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
$('.right').each(function(a, b){ | |
var value = $(this).html(); | |
if (value !== undefined) { | |
var red = 255 - parseInt(value.slice(0, -1)) * 2; | |
var green = 0 + parseInt(value.slice(0, -1)) * 2; | |
var color = 'rgb(' + red + ', ' + green + ', 0)'; | |
$(this).css('background', color); | |
console.log(value, color); |
This file contains 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 os | |
CRLF = b'\r\n' | |
LF = b'\n' | |
allowed_extensions = [ | |
'gitignore', 'Procfile', 'Docker', | |
'txt', 'md', 'ini', 'json', 'yaml', # NOTE: do not add csv, they can be huge | |
'js', 'css', 'scss', 'html', 'htm', 'svg', |
This file contains 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 ssl | |
import socket | |
import asyncio | |
import logging | |
import collections | |
import time | |
from asyncio import sslproto | |
from email._header_value_parser import get_addr_spec, get_angle_addr | |
from email.errors import HeaderParseError |
This file contains 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
/** | |
Following script will parse all photos on imageshack.com | |
and will prepare list of files with appropriate names (like it they were originally) | |
to be downloaded on the next step | |
Scroll till the end of the page, so all images will be lazy-loaded. | |
Press F12 in browser copy-paste following code and press Enter. | |
Copy result and add it to the following Python script. | |
**/ | |
var data = []; |
This file contains 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 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 --> |
This file contains 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 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]}') |
This file contains 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.7 | |
import asyncio | |
import ipaddress | |
import re | |
import sys | |
MAX_NUMBER_WORKERS = 200 |
This file contains 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, deque | |
class Graph(object): | |
def __init__(self): | |
self.nodes = set() | |
self.edges = defaultdict(list) | |
self.distances = {} | |
def add_node(self, value): |
NewerOlder