Skip to content

Instantly share code, notes, and snippets.

def log_mel_spectrogram(
audio: Union[str, np.ndarray, torch.Tensor],
n_mels: int = 80,
padding: int = 0,
device: Optional[Union[str, torch.device]] = None,
):
"""
Compute the log-Mel spectrogram of
Parameters
⚡ scala -classpath /Users/jz/.ivy2/cache/com.google.guava/guava/bundles/guava-21.0.jar
Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112).
Type in expressions for evaluation. Or try :help.
scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._
scala> val cl = new java.net.URLClassLoader(global.classPath.asURLs.toArray, null)
@libratiger
libratiger / idea
Created November 27, 2016 17:14 — forked from phdoerfler/idea
Open IDEA applications based on project type from the command line!
#!/usr/bin/env bash
IDEA=''
PROJECT_DIR=''
function main() {
openIdea "$@"
}
function openIdea() {
class NativePostReceiveMethod extends PostReceiveMethod {
//....
private boolean success = false;
public NativePostReceiveMethod(NativeRdmaJVerbs paramNativeRdmaJVerbs, MemoryBufferPool paramMemoryBufferPool, QueuePair paramQueuePair, List<ReceiveWorkRequest> paramList) throws IOException {
this.verbsImpl = paramNativeRdmaJVerbs;
this.memAlloc = paramMemoryBufferPool;
this.wrNatList = new LinkedList();
this.sgeNatList = new LinkedList();
class NativePostReceiveMethod extends PostReceiveMethod {
//....
private boolean success = false;
public NativePostReceiveMethod(NativeRdmaJVerbs paramNativeRdmaJVerbs, MemoryBufferPool paramMemoryBufferPool, QueuePair paramQueuePair, List<ReceiveWorkRequest> paramList) throws IOException {
this.verbsImpl = paramNativeRdmaJVerbs;
this.memAlloc = paramMemoryBufferPool;
this.wrNatList = new LinkedList();
this.sgeNatList = new LinkedList();
@libratiger
libratiger / quicksort_non_recursive.cpp
Last active August 29, 2015 14:07
快排的非递归版本
int partition(vector<int> &v, int low, int high)
{
int pivot = v[low];
while(low < high)
{
while( (pivot <= v[high]) && low < high)
{
high --;
}
v[low] = v[high];
#!/bin/bash
#------------------------------------------------------------------------------
# Name: sbtmkdirs
# Purpose: Create an SBT project directory structure with a few simple options.
# Author: Alvin Alexander, http://alvinalexander.com
# Info: http://alvinalexander.com/sbtmkdirs
# License: Creative Commons Attribution-ShareAlike 2.5 Generic
# http://creativecommons.org/licenses/by-sa/2.5/
#------------------------------------------------------------------------------
@libratiger
libratiger / kmeans.scala
Created July 15, 2014 15:01
验证Spark version1.0.1的Kmeans算法是否修复的代码
package mllib
import scala.util.Random
import org.jblas.DoubleMatrix
import org.apache.spark.SparkContext
import org.apache.spark.rdd._
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext._
package mliib
import scala.util.Random
import org.jblas.DoubleMatrix
import org.apache.spark._
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD
import org.apache.spark.mllib.regression.LabeledPoint
package mllib
import scala.util.Random
import org.jblas.DoubleMatrix
import org.apache.spark.SparkContext
import org.apache.spark.rdd._
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext._