Skip to content

Instantly share code, notes, and snippets.

View davoudarsalani's full-sized avatar

Davoud Arsalani davoudarsalani

View GitHub Profile
@Alireza2n
Alireza2n / django-simple-captcha-ajax-refresh-button.js
Last active September 3, 2023 19:21
django-simple-captcha ajax refresh button
/*
* Credits go to https://stackoverflow.com/a/20371801/8504344, https://stackoverflow.com/users/179024/mw
*/
$(document).ready(function () {
// Add refresh button after field (this can be done in the template as well)
$('img.captcha').after(
$('<a href="#void" class="captcha-refresh"><i class="fa fa-refresh"></i></a>')
);
// Click-handler for the refresh-link
@mixxorz
mixxorz / waveform.py
Last active January 19, 2023 15:46
Generate waveform images from audio files
# Requires pydub (with ffmpeg) and Pillow
#
# Usage: python waveform.py <audio_file>
import sys
from pydub import AudioSegment
from PIL import Image, ImageDraw
@moeseth
moeseth / waveform.py
Created October 12, 2015 08:19
Create Soundcloud style waveform from Audio in Python
from pydub import AudioSegment
from matplotlib import pyplot as plot
from PIL import Image, ImageDraw
import numpy as np
import os
src = "./test.mp3"
audio = AudioSegment.from_file(src)
data = np.fromstring(audio._data, np.int16)
@jacurtis
jacurtis / regex.md
Last active April 5, 2023 14:42
Most Useful Regex's

Useful Regular Expressions

These are the most useful Regular Expressions that I find myself using on a regular basis


URLs

Test to see if a string is a valid website address or not.

All URLs
@rxaviers
rxaviers / gist:7360908
Last active May 18, 2024 17:57
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: