Skip to content

Instantly share code, notes, and snippets.

View adaam's full-sized avatar
😍
Beautiful World

Adam Chen adaam

😍
Beautiful World
  • Knowtions research
  • Taipei, Taiwan
View GitHub Profile
@tracek
tracek / librosa_parallel.py
Created February 19, 2019 06:24
Running librosa parallel for loops with multiprocessing and joblib
# The script illustartes stunning difference on my machine with processing of signal with multiprocessing and joblib.
# The slowness of multiprocessing is likely caused by oversubscription
import time
import numpy as np
import librosa
from joblib import Parallel, delayed
from functools import partial
from multiprocessing import Pool
@ipbastola
ipbastola / jq to filter by value.md
Last active April 25, 2024 17:14
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@coingraham
coingraham / testses.sh
Last active March 6, 2024 02:11
Test AWS SES from the CLI Command Line
# Connect to AWS SES
openssl s_client -crlf -quiet -connect email-smtp.us-east-1.amazonaws.com:465
openssl s_client -crlf -quiet -starttls smtp -connect email-smtp.us-east-1.amazonaws.com:25
# SMTP commands
EHLO 2ndwatch.com
AUTH LOGIN
# Username by 'echo -n [accesskey] | base64'
skdfjlskdflskj
@ashrithr
ashrithr / readme.md
Last active December 7, 2022 01:47
Installing ELK on a single machine

Installing ELK (CentOS)

This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.

I. Install JDK

rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
@yhsiang
yhsiang / main.ls
Created April 16, 2014 15:38
this script help you stream any content to youtube with youtube live streaming api, Here example is "Sky new" you can find rtmp url below. http://yhsiang.logdown.com/posts/2014/04/16/stream-to-youtube-with-live-streaming-api
require! <[googleapis request moment readline fluent-ffmpeg]>
rl = readline.create-interface do
input: process.stdin
output: process.stdout
video-id =''
stream-id = ''
stream-url = ''