Skip to content

Instantly share code, notes, and snippets.

View SpotlightKid's full-sized avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@josephernest
josephernest / wavfile.py
Last active March 17, 2024 02:54
wavfile.py (enhanced)
# wavfile.py (Enhanced)
# Date: 20190213_2328 Joseph Ernest
#
# URL: https://gist.github.com/josephernest/3f22c5ed5dabf1815f16efa8fa53d476
# Source: scipy/io/wavfile.py
#
# Added:
# * read: also returns bitrate, cue markers + cue marker labels (sorted), loops, pitch
# See https://web.archive.org/web/20141226210234/http://www.sonicspot.com/guide/wavefiles.html#labl
# * read: 24 bit & 32 bit IEEE files support (inspired from wavio_weckesser.py from Warren Weckesser)
@ju2wheels
ju2wheels / Dockerfile
Last active March 9, 2024 13:37
Docker Dockerfile reference template
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.
@jiffyclub
jiffyclub / jdutil.py
Created October 18, 2011 02:03
Functions for converting dates to/from JD and MJD
"""
Functions for converting dates to/from JD and MJD. Assumes dates are historical
dates, including the transition from the Julian calendar to the Gregorian
calendar in 1582. No support for proleptic Gregorian/Julian calendars.
:Author: Matt Davis
:Website: http://github.com/jiffyclub
"""
# coding=UTF-8
import nltk
from nltk.corpus import brown
# This is a fast and simple noun phrase extractor (based on NLTK)
# Feel free to use it, just keep a link back to this post
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/
# Create by Shlomi Babluki
# May, 2013
@SpotlightKid
SpotlightKid / aescrypt.py
Created September 3, 2014 18:29
Encrypt/decrypt files with symmetric AES cipher-block chaining (CBC) mode.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Encrypt/decrypt files with symmetric AES cipher-block chaining (CBC) mode.
Usage:
File Encryption:
aescrypt.py [-f] infile [outfile]

The reStructuredText Cheat Sheet: Syntax Reminders

Info

See <http://docutils.sf.net/rst.html> for introductory docs.

Author

David Goodger <goodger@python.org>

Date

$Date: 2013-02-20 01:10:53 +0000 (Wed, 20 Feb 2013) $

Revision

$Revision: 7612 $

Description

This is a "docinfo block", or bibliographic field list

Note

If you are reading this as HTML, please read

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
<head>
<title><xsl:value-of select="/rss/channel/title"/> RSS Feed</title>
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-language" content="en_US" />
@Michal-Szczepaniak
Michal-Szczepaniak / client.nim
Created October 20, 2021 18:17
Nim async UDP server discovery and TCP server connection
import asyncnet, asyncdispatch, nativesockets
proc discover(): Future[string] {.async.} =
let socket = newAsyncSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
socket.setSockOpt(OptReuseAddr, true)
socket.setSockOpt(OptReusePort, true)
socket.setSockOpt(OptBroadcast, true)
await socket.sendTo("255.255.255.255", Port(12346), $0b10)
var data = await socket.recvFrom(15)
@dhilowitz
dhilowitz / wavecuepoint.c
Last active April 29, 2023 22:01 — forked from jimmcgowan/wavecuepoint.c
This code reads a .wav file and a text file containing marker locations (specified as frame indexes, one per line) and creates a new .wav file with embedded cue points for each location. The code is standard, portable C.
//
// wavecuepoint.c
// Created by Jim McGowan on 29/11/12.
// Turned into command-line utility by David Hilowitz on 19/11/16.
// jim@bleepsandpops.com
// jim@malkinware.com
//
// This function reads a .wav file and a text file containing marker locations (specified as frame indexes, one per line)
// and creates a new .wav file with embedded cue points for each location. The code is standard, portable C.
//
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'threading_design.ui'
#
# Created: Thu Aug 6 13:47:18 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui