This file contains 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
# Prerequisite: | |
# Install ffmpeg / ffplay from https://evermeet.cx/ffplay/ | |
from pydub import AudioSegment | |
from pydub.playback import play | |
audio_in_file = "in_sine.wav" | |
audio_out_file = "out_sine.wav" | |
# create 1 sec of silence audio segment | |
one_sec_segment = AudioSegment.silent(duration=1000) #duration in milliseconds |
This file contains 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
// Tested on Android Nougat. Should work on previous versions of Android. | |
// It's ugly but should get the job done | |
/** | |
* Set the color of the handles when you select text in a | |
* {@link android.widget.EditText} or other view that extends {@link TextView}. | |
* | |
* @param view | |
* The {@link TextView} or a {@link View} that extends {@link TextView}. | |
* @param color |
This file contains 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
# This script snippet comes from https://www.tensorflow.org/lite/models/convert/metadata_writer_tutorial#audio_classifiers | |
# Before running check out this prerequisites: | |
# https://www.tensorflow.org/lite/models/convert/metadata_writer_tutorial#prerequisites | |
# pip install tflite-support-nightly | |
from tflite_support.metadata_writers import audio_classifier | |
from tflite_support.metadata_writers import metadata_info | |
from tflite_support.metadata_writers import writer_utils | |
import sys |
This file contains 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
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" |
This file contains 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
/** | |
* Get SHA256 from PackageManager / PackageInfo / Signatures | |
*/ | |
fun printSignature() { | |
val packageManager: PackageManager = CONTEXT.getPackageManager() | |
val signature: Array<Signature> = packageManager.getPackageInfo("YOUR PACKAGE_NAME, LIKE com.xx.yy.zz", PackageManager.GET_SIGNATURES).signatures | |
signature.asIterable().forEach { | |
Log.i("SHA256", getFingerprint(it)) | |
} |
This file contains 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
# Use this segment in your workflow yml for deleting a GitHub package version | |
# Search and find these variables and replace with yours. | |
# ---------------- | |
# In step: Get packages list, set your own values for: | |
# YOUR ID OR YOUR ORG ID | |
# YOUR REPO NAME | |
# | |
# In step: Define version to delete, set your own version number to delete: | |
# 0.0.1 | |
# ---------------- |