# Connect to contaner shell
docker exec -it container_name /bin/bash
# create backup tar file
pg_dump -U postgres -W -F t postgres > /bb_backup.tar
# empty password
# copy file from container
docker cp container_name:file_name.tar . # note . at the end for file location
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 pathlib | |
| import sqlite3 | |
| target_path = "" | |
| movie_list = [] | |
| tv_list = [] | |
| collection_list = [] | |
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 requests_html import HTMLSession | |
| import json | |
| session = HTMLSession() | |
| server_ip = '' # input server ip address. Add port if necessary | |
| endpoints = { | |
| "children": f"http://{server_ip}/api/children/", | |
| "changes": f"http://{server_ip}/api/changes/", |
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
| # Script to sort json file by Key "name" value | |
| import json | |
| from pathlib import Path | |
| def write_json(data, filename): | |
| """Write new JSON file | |
| Args: | |
| data (dict): Dict data to write to JSON file |
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 pprint import pprint | |
| SM = { | |
| "instagram": r"instagram.com", | |
| "facebook": r"facebook.com", | |
| "twitter": r"twitter.com", | |
| "youtube": r"youtube.com", | |
| "snapchat": r"snapchat.com" | |
| } |
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
| #!/usr/bin/env python | |
| # Send DDE Execute command to running program | |
| # https://code.activestate.com/recipes/577654-dde-client/ | |
| from ctypes import POINTER, WINFUNCTYPE, c_char_p, c_void_p, c_int, c_ulong, c_char_p | |
| from ctypes.wintypes import BOOL, DWORD, BYTE, INT, LPCWSTR, UINT, ULONG | |
| # DECLARE_HANDLE(name) typedef void *name; | |
| HCONV = c_void_p # = DECLARE_HANDLE(HCONV) | |
| HDDEDATA = c_void_p # = DECLARE_HANDLE(HDDEDATA) |
List of scary movies involving Christmas. Based on reddit list @ The Ultimate List of Creepmas Movies. So far.
- A Christmas Carol
- A Cadaver Christmas (2011)
- A Christmas Horror Story (2015)
- A Christmas Tale (2005)
- All the Creatures Were Stirring (2018)
- All Through the House (2015)
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
| def table_extract(table): | |
| """ | |
| Extracts data from a table in an HTML document. | |
| Args: | |
| table (HTML element): The table element to extract data from. | |
| Returns: | |
| list of dict: A list of dictionaries, where each dictionary represents a row in the table. | |
| The keys of the dictionaries are the headers of the table, and the values are the cell values. |
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
| /********* Edit Option List ************* | |
| Usage for | |
| - TYPE: Morpheus API | |
| - Request Options >> Option List: Plans | |
| *****************************************/ | |
| // Translation Script (transform api data object) | |
| for (var x = 0; x < data.length; x++) { | |
| results.push({name:data[x].name, value:data[x].id}); | |
| } |
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
| user_profile_a = { | |
| "user_id": 4095, | |
| "username": "dev_alex", | |
| "role": "maintainer", | |
| "is_active": True, | |
| "notifications_enabled": False | |
| } | |
| user_profile_b = { | |
| "user_id": 4095, |