Skip to content

Instantly share code, notes, and snippets.

View onyedikachi-david's full-sized avatar

David Anyatonwu onyedikachi-david

View GitHub Profile
@onyedikachi-david
onyedikachi-david / mlx_whisper_realtime.py
Created January 3, 2025 13:24 — forked from simonw/mlx_whisper_realtime.py
mlx-whisper real time audio
# /// script
# dependencies = [
# "SpeechRecognition",
# "mlx-whisper",
# "pyaudio",
# ]
# ///
import speech_recognition as sr
import numpy as np
@onyedikachi-david
onyedikachi-david / firewall.sh
Created October 30, 2024 23:11 — forked from andrasbacsai/firewall.sh
Update a Hetzner Firewall rule with your IP address
#!/bin/bash
# Script to update a firewall rule in a Hetzner Firewall with your current IP address.
# Good if you would like to restrict SSH access only for your current IP address (secure).
#################
# WARNING: This script will overwrite all rules in the firewall rules, so make sure you
# added all the required rules.
# I use a separate firewall rule just for SSH access.
#################
import requests
from flask import Flask
def confidenceToPercent(original, plagiarism):
return (plagiarism / (original + plagiarism)) * 100
def grading(original, plagiarism):
result = confidenceToPercent(original, plagiarism)
return result
import requests
from flask import Flask
def confidenceToPercent(original, plagiarism):
return (plagiarism / (original + plagiarism)) * 100
def grading(original, plagiarism):
result = confidenceToPercent(original, plagiarism)
return result
@onyedikachi-david
onyedikachi-david / blog.md
Last active May 24, 2022 11:20
Arbitary sized tanda club tutorial

Building a Tanda Club DApp using Reach

In this tutorial we will build a simplified version of the Tanda Club DApp using the Reach framework. This will help us learn some of the basics or nessisary features of a Tanda Club DApp. Using Reachs high level features it will be easy to implement a Tanda Club DApp. Reachs linear state allows us to track all users during each phase of the Dapp.

Table of Contents

@onyedikachi-david
onyedikachi-david / blog.md
Created May 23, 2022 16:53
Arbitrary sized tanda club tutorial

‎‎​

{"valueParameterInfo":[["Price",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"The price of the item."}]],"slotParameterDescriptions":[["Payment deadline","The _**buyer**_ must pay the _price_ of the item by this time, otherwise the contract is cancelled."],["Complaint deadline","The _**buyer**_ can only complain until this deadline, otherwise the contract will assume the transaction went smoothly and pay the _**seller**_."],["Complaint response deadline","If the _**buyer**_ complained, the _**seller**_ must respond before this deadline, otherwise the contract will assume there was a problem with the transaction and refund the _**buyer**_."],["Mediation deadline","If the _**buyer**_ and the _**seller**_ disagree, the _**mediator**_ must weigh in before this deadline, otherwise the contract will assume there was a problem with the transaction and refund the _**buyer**_."]],"roleDescriptions":[["Buyer","The buyer of the item."],["Mediator","The mediator decides w