Skip to content

Instantly share code, notes, and snippets.

View kybr's full-sized avatar

karl yerkes kybr

  • University of California
  • Goleta, California
View GitHub Profile
/* Gamma - Generic processing library
See COPYRIGHT file for authors and license information
Example: Periodic Timing
Author: Lance Putnam, 2015
Description:
This demonstrates how to use a phase accumulator as a periodic timer to trigger
events.
*/
#include <chrono>
#include <iostream>
#include <thread>
int main() {
std::thread t([]() {
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
char* t = nullptr;
t[-1] = 1; // crash, please
});
--
-- NeoVim plugin for C.L.A.V.M.
--
-- Karl Yerkes
-- 2020-10-03
--
local socket = nil -- use the same socket for all
function! SendFile()
let code = join(getline(0, line("$")), "\n")
silent execute "!send-file <<< " . shellescape(code, 1)
" redraw!
endfunction
map <silent> ,h :call SendFile()<CR>
we made 2001 samples in a noisy line from -1 to 1
we found 10 levels of overview
level size
0 1001
1 501
2 251
3 126
4 63
5 32
6 16
cmake --build . --target distributedSketch1_run --config Release -- -j3
[ 1%] Built target glew_s
[ 2%] Built target cuttlebone
[ 13%] Built target Gamma
[ 25%] Built target glfw
[ 25%] Building CXX object /Users/ky/Projects/MAT201B-2019/allolib/build/Release/CMakeFiles/al_spatialaudio.dir/extensions/al/spatialaudio/src/al_Convolver.cpp.o
[ 26%] Building CXX object /Users/ky/Projects/MAT201B-2019/allolib/build/Release/CMakeFiles/al_spatialaudio.dir/extensions/al/spatialaudio/src/al_Decorrelation.cpp.o
@kybr
kybr / wc.cpp
Created January 10, 2019 20:25
// replicate the wc command
//
// 3. accept multiple lines
// 4. accumulate statistics
// 5. test against the wc command
//
#include <iostream>
#include <string>
using namespace std;
#include "everything.h"
using namespace diy;
int main(int argc, char* argv[]) {
float frequency = 220;
float phase = 0;
std::vector<std::string> a(argv, argv + argc);
if (argc > 2) phase = fmod(stof(a[2]), 2.0f);
if (argc > 1) frequency = stof(a[1]);
#include "al/core.hpp"
using namespace al;
using namespace std;
#define N (1000)
#define CLOUD_WIDTH (5.0)
string fullPathOrDie(string fileName, string whereToLook = ".") {
SearchPaths searchPaths;
searchPaths.addSearchPath(whereToLook);
Microsoft (R) COFF/PE Dumper Version 14.15.26732.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file c:\Users\ky\MAT240C-2018\allolib\build\Gamma\lib\Gamma.lib
File Type: LIBRARY
COFF SYMBOL TABLE
000 0105686C ABS notype Static | @comp.id