Skip to content

Instantly share code, notes, and snippets.

#pragma warning disable CS1998
// ReSharper disable ConvertClosureToMethodGroup
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UseObjectOrCollectionInitializer
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantAssignment
// ReSharper disable RedundantLambdaSignatureParentheses
// ReSharper disable UnusedParameter.Local
// ReSharper disable VariableHidesOuterVariable
using System;
#pragma warning disable CS1998
// ReSharper disable ConvertClosureToMethodGroup
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UseObjectOrCollectionInitializer
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantAssignment
using System;
using System.Numerics;
using System.Collections.Generic;
namespace NetLib.Generated;
---
- interface:
name: hypercosm.object.v1.0.0
methods:
- listInterfaces:
- array[string]
- release
- interface:
name: hypercosm.root.v0.1.0
---
- interface:
name: hypercosm.object.v1.0.0
methods:
- listInterfaces:
- array[string]
- release
- interface:
name: hypercosm.root.v0.1.0
.sidenotes {
background: url(https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=Checkvist);
background-position-y: top;
background-repeat: no-repeat;
padding-top: 150px;
}
#pragma once
#include <boost/preprocessor.hpp>
#include "repr.h"
#define EXTERNAL_INIT ~~external-init~~
#define IF_NOT_EXTERNAL_INIT(elem, x) BOOST_PP_IIF(BOOST_PP_IS_BEGIN_PARENS(elem), BOOST_PP_IDENTITY(x), BOOST_PP_EMPTY)()
#define CONTAINS_EXTERNAL_INIT_OP(s, state, elem) BOOST_PP_OR(state, BOOST_PP_NOT(BOOST_PP_IS_BEGIN_PARENS(elem)))
#define CONTAINS_EXTERNAL_INIT(seq) BOOST_PP_SEQ_FOLD_LEFT(CONTAINS_EXTERNAL_INIT_OP, 0, seq)
import os, struct, sys
def main(fn, odir):
fp = file(fn, 'rb')
fp.seek(0, 2)
flen = fp.tell()
fp.seek(flen - 10, 0)
n, n2 = struct.unpack('<II', fp.read(8))
assert n <= flen and n2 <= flen
n3 = flen - n - n2 - 22

Keybase proof

I hereby claim:

  • I am daeken on github.
  • I am daeken (https://keybase.io/daeken) on keybase.
  • I have a public key whose fingerprint is 37D1 4DC5 8309 0F35 04E0 FA4E 1963 F804 8E4B 346C

To claim this, I am signing this object:

import tensorflow as tf
from tensorflow.keras import layers
from glob import glob
batchSize = 100
def toTimeDomain(x):
rpart = tf.slice(x, [0, 0], [batchSize, 512 * 9])
ipart = tf.slice(x, [0, 512 * 9], [batchSize, 512 * 9])
complex = tf.complex(rpart, ipart)
import random, struct
from glob import glob
import numpy as np
import scipy.io.wavfile as wavfile
allSources = []
for fn in glob('sourceAudio/*.wav'):
fdata = wavfile.read(fn)[1] / 32768.
if len(fdata) == 512:
allSources.append(fdata)