Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph Constantakis jconst

View GitHub Profile
View tictactoe.py
X = 'X'
O = 'O'
theBoard = [[None for _ in range(3)] for _ in range(3)]
def owner(line):
return reduce(lambda acc,cur: acc if acc == cur else None, line, line[0])
def diags(board):
return [[x[i] for i, x in enumerate(board)],
[x[i] for i, x in enumerate(reversed(board))]]
View Audiobus.swift
//
// Audiobus.swift
// AudioKit
//
// Created by Daniel Clelland on 2/06/16.
// Updated for AudioKit 3 by Aurelius Prochazka.
//
// Copyright © 2016 AudioKit. All rights reserved.
//
View Matrix.swift
import Foundation
public struct Matrix<Scalar: CustomStringConvertible> {
public let width: Int
public let height: Int
public var grid: [Scalar]
}
// MARK: - Creating matrices
@jconst
jconst / jhPitchShift.cpp
Created Feb 26, 2018
Implementation of "Ocean" pitch-shifting method via a modified version of smbPitchShift.cpp
View jhPitchShift.cpp
// Modified version of SMB's pitch shift to use the algorithm described in
// Nicolas Juillerat & Beat Hirsbrunner's 2010 paper "LOW LATENCY AUDIO PITCH
// SHIFTING IN THE FREQUENCY DOMAIN".
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <Accelerate/Accelerate.h>
You can’t perform that action at this time.