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 typing import cast, TypeVar, Union | |
| class IntegerUnderflowError(BfxBaseException): | |
| """ | |
| This error indicates an underflow in one of the integer types defined in bfxapi/utils/integers.py. | |
| """ | |
| pass | |
| class IntegerOverflowflowError(BfxBaseException): |
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, argparse # pip install argparse | |
| def generate(length: int = 64, count: int = 5, options: dict = dict()) -> [str]: | |
| """ | |
| Generates a specific number of strings with a length and composed of a specific number of characters. | |
| Parameters: | |
| length (int): The length of the strings to generate. | |
| count (int): The number of strings to generate. | |
| options (dict): A dictionary containing various options regarding the construction of them. | |
| """ |
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
| const DOMAIN = "https://api.pulsing.io", API = `${DOMAIN}/api`; //https://api.pulsing.io or http://localhost:8000 | |
| const DEFAULT = "pulse-identifier", CONSENT = "pulse-consent"; | |
| const METADATA = "pulse-data-"; | |
| const DELAY = 5000, BUBBLE = 8000, MODAL = 2000; | |
| /* | |
| Normal Usage: <script type="text/javascript" src="pulsing.js" id="pulse"></script> |
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 cv2, argparse # pip install opencv-python argparse | |
| import numpy as np # pip install numpy | |
| BLUR = 21 | |
| CANNY_THRESH = (10, 200) | |
| MASK_DILATE_ITER, MASK_ERODE_ITER = 10, 10 | |
| MASK_COLOR = (0.0, 0.0, 1.0) | |
| def remove_background_from_image(image: str, output: str) -> None: | |
| """ |
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 fetch, { Response } from "node-fetch"; | |
| export const API: string = "http://localhost:8000/api"; // The URL of your API to add to the endpoint of each request | |
| /** | |
| * Send a request using node-fetch and automatically inserting the user's access-token in the Authorization header. | |
| * | |
| * @param url - The URL to send the request to; | |
| * @param method - The verb/method with which to make the request, by default it is set to `"GET"`; | |
| * @param body - The body of the request if necessary, by default it is set to `null`; |
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 moviepy.editor import * # pip install moviepy | |
| import argparse # pip install argparse | |
| def display_text_on_video(video: str, text: str, path: str) -> None: | |
| """ | |
| Show text at the center of a video and save the new video version in a specific location. | |
| Parameters: | |
| video (str): The path of the video to edit | |
| text (str): The text to be overlaid on the video |
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
| const fetch = require("node-fetch"); | |
| export const API = "http://127.0.0.1:8000/api"; // The URL of your API to add to the endpoint of each request | |
| /** | |
| * Send a request using node-fetch and automatically inserting the user's access-token in the Authorization header. | |
| * | |
| * @param url - The URL to send the request to; | |
| * @param method - The verb/method with which to make the request, by default it is set to `"GET"`; | |
| * @param body - The body of the request if necessary, by default it is set to `null`; |
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
| ## | |
| # Creates an alias called "git hist" that outputs a nicely formatted git log. | |
| # Usage is just like "git log" | |
| # Examples: | |
| # git hist | |
| # git hist -5 | |
| # git hist <branch_name> | |
| # git hist <tag_name> -10 | |
| ## | |
| git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |