- GitHub Staff
- https://tippybits.com
- @dtaivpp
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
2021-04-30 10:38:14,360 - __main__ - ERROR - HTTPSConnectionPool(host='api-you-want-to-use.com', port=443): Max retries exceeded with url: /ccx/service/customreport2/org/wamitchell/ORG_Network_ID_Validation_-_IT_Location?Effective_as_of_Date=2021-04-30-01%3A00 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)'),)) | |
Traceback (most recent call last): | |
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connectionpool.py", line 706, in urlopen | |
chunked=chunked, | |
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request | |
self._validate_conn(conn) | |
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn | |
conn.connect() | |
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connection.py", line 421, in connect | |
tls_in_tls=tls_in_tls, |
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
# Credit to Mark Brilman https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
# Output Key | |
# pkcs12 is just .pfx | |
openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key] | |
# Output Cert | |
openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt] | |
# Output Decrypted 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/sh | |
# local configuration options | |
# Note: modify at your own risk! If you do/use anything in this | |
# script that is not part of a stable API (relying on files to be in | |
# specific places, specific tools, specific output, etc) there is a | |
# possibility you will end up with a broken system after patching or | |
# upgrading. Changes are not supported unless under direction of | |
# VMware support. |
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
// html has some element with the id heading | |
// <h1 id="heading">IM FADING IN</h1> | |
window.onload = () =>{ | |
heading = document.getElementById("heading"); | |
create_await_chain(heading); | |
} | |
function create_await_chain(fade_object, depth=0){ | |
// Creates a promise chain to slowly load the bar |
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 threading | |
import requests | |
sites = { | |
'site1.com': ['https://site1.com/page1' ...], | |
'site2.com': ['https://site2.com/page1' ...], | |
'site3.com': ['https://site3.com/page1' ...], | |
'site4.com': ['https://site4.com/page1' ...] | |
} |
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 logging | |
import requests | |
logger = logging.getLogger(__name__) | |
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') | |
fileHandle = logging.FileHandler('failed_requests.log') | |
fileHandle.setLevel(logging.WARNING) | |
fileHandle.setFormatter(formatter) | |
logger.addHandler(fileHandle) |
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
string msg ="Imma Message"; | |
this.PublishInfoMessage(msg, | |
Ice.Common.BusinessObjectMessageType.Information, | |
Ice.Bpm.InfoMessageDisplayMode.Individual,"",""); |
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 random | |
from time import time | |
import numpy as np | |
import pandas as pd | |
# Initilize Random | |
random.seed(time()) | |
#### List Tests #### |
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
# Courtesy of https://stackabuse.com/sorting-algorithms-in-python/ | |
def heapify(nums, heap_size, root_index): | |
# Assume the index of the largest element is the root index | |
largest = root_index | |
left_child = (2 * root_index) + 1 | |
right_child = (2 * root_index) + 2 | |
# If the left child of the root is a valid index, and the element is greater | |
# than the current largest element, then update the largest element |
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
# Courtesy of https://stackabuse.com/sorting-algorithms-in-python/ | |
def merge(left_list, right_list): | |
sorted_list = [] | |
left_list_index = right_list_index = 0 | |
# We use the list lengths often, so its handy to make variables | |
left_list_length, right_list_length = len(left_list), len(right_list) | |
for _ in range(left_list_length + right_list_length): |