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 convert_base(number: int | str, from_base: int, to_base: int): | |
number = int(str(number), from_base) | |
r = [] | |
while number > 0: | |
module = number % to_base | |
number = number // to_base | |
r.append(module) | |
return r[::-1] or [0] |
This file has been truncated, but you can view the full 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
{ | |
"items": [ | |
{ | |
"title": "Macaw parrot feeding on a branch", | |
"description": "Macaw parrot of red, blue and green colors, feeding on a tree branch, in captivity on a sunny day.", | |
"url": "https://mixkit.co/free-stock-video/macaw-parrot-feeding-on-a-branch-4669/", | |
"tags": [ | |
"Animal", | |
"Bird", | |
"Branch", |
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
{ | |
"items": [ | |
{ | |
"title": "Little birds singing in the trees", | |
"tags": [ | |
"Animals", | |
"Bird", | |
"Forest", | |
"Morning" | |
], |
This file has been truncated, but you can view the full 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
{ | |
"abandon": [ | |
["verb", "to give (oneself) over to something especially unrestrainedly", "More than ready to abandon himself to a life of complete idleness for the duration of his vacation", ["indulge", "surrender"], ["deny", "forego"], ["bask", "deliver", "give up", "luxuriate", "overdo", "overindulge", "revel", "roll", "wallow", "yield"]], | |
["verb", "to cause to remain behind", "Abandoned the group that he had been hiking with and struck out on his own", ["forsake", "leave"], ["have", "hold", "keep", "own", "possess", "reclaim", "retain", "withhold"], ["abjure", "cut off", "deliver", "desert", "discard", "disown", "disregard", "ditch", "dump", "escape", "fling", "forget", "give up", "hand over", "ignore", "jettison", "junk", "maroon", "neglect", "quit", "reject", "relinquish", "renounce", "repudiate", "retreat (from)", "sacrifice", "scrap", "separate (from)", "shed", "shuck (off)", "strand", "surrender", "take off (from)", "throw away", "throw out", "vacate", "walk away from", "walk out o |
This file has been truncated, but you can view the full 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
{ | |
"abandon": [ | |
["verb", "to give (oneself) over to something especially unrestrainedly", "More than ready to abandon himself to a life of complete idleness for the duration of his vacation", ["indulge"], ["deny"], ["deliver"]], | |
["verb", "to cause to remain behind", "Abandoned the group that he had been hiking with and struck out on his own", ["leave"], ["hold", "keep", "own", "possess", "retain"], ["deliver", "desert", "discard", "dump", "escape", "forget", "ignore", "neglect", "reject", "sacrifice", "shed", "strand"]], | |
["verb", "to put an end to (something planned or previously agreed to)", "The bad weather forced NASA to abandon the launch", ["cancel"], ["continue", "keep"], ["end", "halt", "interrupt", "recall", "reverse", "suspend", "terminate", "withdraw"]], | |
["verb", "to stop doing (something) permanently", "Marriage customs that were abandoned decades ago", [], ["continue", "keep", "maintain"], ["cease", "conclude", "end", "expire", "halt", "pause", "terminate"]], | |
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 glob | |
import os | |
import numpy as np | |
from PIL import Image | |
def crop_image(img): | |
mask = img < 230 | |
mask = mask.any(2) |
This file has been truncated, but you can view the full 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
{ | |
"abandon": [ | |
["transitive verb", "to leave (someone or something) with no intention of returning or taking up possession again", "They abandoned the old car in the ditch", ["desert", "reject"], ["keep", "retain"], ["drop", "leave"]], | |
["transitive verb", "to give up (a structure or place) by withdrawing from it", "The captain gave the order to abandon the ship", [], [], ["surrender"]], | |
["transitive verb", "to allow (oneself) to be taken over completely by emotions or impulses", "As the fire approached, many abandoned themselves to hysteria", ["surrender"], ["compose"], []], | |
["noun", "freedom from restraint or inhibition", "He rode the horse with reckless abandon", ["freedom"], ["restraint"], ["enthusiasm"]], | |
["noun", "a state in which emotions or impulses control one completely", "She shrieked and waved her arms in abandon", ["surrender"], [], []] | |
], | |
"ability": [ | |
["noun", "the capacity or power to do something; quality of being able", "Most birds ha |
This file has been truncated, but you can view the full 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
{ | |
"abandon": [ | |
["transitive verb", "to leave (someone or something) with no intention of returning or taking up possession again", "They abandoned the old car in the ditch", ["desert", "forsake", "reject", "turn one's back on"], ["keep", "re-claim", "retain"], ["drop", "jettison", "leave", "maroon", "repudiate"]], | |
["transitive verb", "to give up (a structure or place) by withdrawing from it", "The captain gave the order to abandon the ship", ["forsake"], ["re-claim"], ["give up", "relinquish", "scuttle", "surrender", "turn one's back on"]], | |
["transitive verb", "to stop pursuing (an activity, goal, or the like); give up; relinquish", "He abandoned his dream of becoming an actor", ["forsake", "give up", "relinquish"], [], ["renounce"]], | |
["transitive verb", "to allow (oneself) to be taken over completely by emotions or impulses", "As the fire approached, many abandoned themselves to hysteria", ["surrender"], ["compose", "recompose"], []], | |
["noun", "freedom from restrai |
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 paramiko | |
HOST = 'hostname' | |
USER = 'root' | |
PORT = 22 | |
PASSWORD = 'password' | |
COMMANDS = r""" | |
cd /root/tmp_dir | |
source venv/bin/activate |
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 traceback | |
import librosa.feature | |
import soundfile as sf | |
def auto_cut_mp3_file(src_filepath: str, | |
dest_filepath: str, | |
duration_in_seconds: float, | |
sample_rate: int = 22050, |
NewerOlder