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
""" | |
No Copyright. Public Domain. | |
Version: 1.0.4 | |
Known Issues: Common home folders like Documents, Music, Videos, arem missing. | |
""" | |
from functools import lru_cache | |
from contextlib import suppress | |
import sys | |
from uuid import UUID | |
from pathlib import Path |
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
""" | |
No Copyright by the way. | |
Usage: | |
0. Have two terminals | |
1. In the first terminal run `test.py` | |
2. In the second terminal run `test.py a` | |
3. Magic! If you don't see anything, the arbitrary port 12025 may be in use so use another port | |
Practical applications (requires more than just copy pasting this code): | |
- Simple message queueing: |
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
""" | |
Supports: MyMonero | |
Instructions (terminal, assuming you have python installed): | |
pip install cryptography | |
python[3] monero_wallet_decryption.py [path_to_wallet_dir] | |
License: Public Domain | |
You are permitted to run/edit/use any or all of this code without attribution. | |
Free implies that there are no warranties. |
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 requests | |
import os | |
from contextlib import suppress | |
from subprocess import Popen, PIPE, DEVNULL, CREATE_NEW_PROCESS_GROUP, CREATE_NO_WINDOW | |
from requests import Session | |
import platform | |
from getpass import getpass | |
from pathlib import Path | |
from requests.auth import HTTPDigestAuth | |
from pprint import pprint |
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 requests | |
import concurrent.futures | |
def get_todo(i, optional_arg=None): | |
if i < 1: raise ValueError | |
r = requests.get(f'https://jsonplaceholder.typicode.com/todos/{i}') | |
return r.json() | |
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
from glob import glob | |
import io | |
import os | |
import time | |
import uuid | |
from zipfile import ZipFile | |
# third party libraries | |
import jwt # PyJWT | |
import requests | |
# get API keys from https://addons.mozilla.org/developers/addon/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
import os | |
import pythoncom | |
import win32com | |
import win32com.client as client | |
from shutil import copyfile, rmtree | |
import threading | |
from contextlib import suppress | |
wdFormatPDF = 17 |
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
javers Javers = JaversBuilder.javers() | |
// ... | |
// ignore Entity/Key Object | |
.registerEntity(EntityDefinitionBuilder.entityDefiniition(Square.class) | |
.withIdPropertyName("key") | |
.withIgnoredProperties("lastUpdate", "comments") | |
.build()) | |
// ignore Value Object | |
.registerValueObject(new ValueObjectDefinitioin(Vertex.class, Arrays.asList("lastUpdate", "comments")) | |
// you can use both multiple times |
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
// ... | |
Diff diff = differ.compare(left, right); | |
List<Change> changes = new ArrayList<>(diff.getChanges()); | |
List<Change> ignoredChanges = diff.getPropertyChanges("comments"); | |
for (Change ignoreChange : ignoredChanges) { | |
changes.remove(ignoreChange); | |
} | |
// ... |
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
package com.elijahlopez.examples; | |
import java.awt.Color; | |
import java.util.Date; | |
// e.g. Class Vertex - modifiable source code | |
public class Vertex { | |
@DiffIgnore | |
Date lastUpdated; |