This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Karl's solution from "translation" | |
# | |
# Write a Python program | |
import random | |
# to guess a (random) number between 1 and 100. | |
secret = random.randint(1,100) | |
howmany = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ix $ git status ~/Projects/MAT201B/mat201b2017 (master) | |
On branch master | |
Your branch is up-to-date with 'origin/master'. | |
nothing to commit, working tree clean | |
ix $ ~/Projects/MAT201B/mat201b2017 (master) | |
ix $ ~/Projects/MAT201B/mat201b2017 (master) | |
ix $ ~/Projects/MAT201B/mat201b2017 (master) | |
ix $ ~/Projects/MAT201B/mat201b2017 (master) | |
ix $ ~/Projects/MAT201B/mat201b2017 (master) | |
ix $ cd student/mert.toka/ ~/Projects/MAT201B/mat201b2017 (master) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6.c; | |
# see https://en.wikipedia.org/wiki/Single-precision_floating-point_format | |
sub float(Buf $b) returns Rat { | |
my Int $i = $b[3]+<24 +| $b[2]+<16 +| $b[1]+<8 +| $b[0]; | |
my Int $sign-bit = ($i +& 0b10000000_00000000_00000000_00000000) +> 31; | |
my Int $exponent = ($i +& 0b01111111_10000000_00000000_00000000) +> 23; | |
my Int $fraction = ($i +& 0b00000000_01111111_11111111_11111111); | |
my $thing = ((-1)**$sign-bit) * (1 + $fraction / (2**23)) * (2**($exponent - 127)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ix $ zef install --force Net::OSC ~ (master) | |
===> Searching for: Net::OSC | |
===> Testing: Net::OSC:ver('0.2.0') | |
===SORRY!=== Error while compiling /Users/*****/.zef/store/Net-OSC.git/0fce4750f4721f7ac54d8b8484d7be0806d3374d/lib/Net/OSC/Bundle.pm6 (Net::OSC::Bundle) | |
Undeclared routines: | |
pack-uint32 used at line 68 | |
unpack-uint32 used at line 74 | |
t/OSC/Bundle.t ...... Dubious, test returned 1 | |
No subtests run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script started on Tue Sep 12 11:33:03 2017 | |
]1337;RemoteHost=ky@ix]1337;CurrentDir=/Users/ky/Projects/cuttlebone/openpgm/openpgm/pgm]1337;ShellIntegrationVersion=5;shell=fish]1337;RemoteHost=ky@ix]1337;CurrentDir=/Users/ky/Projects/cuttlebone/openpgm/openpgm/pgm]0;fish /Users/ky/Projects/cuttlebone/openpgm/openpgm/pgm[30m(B[m[?2004h]0;fish /Users/ky/Projects/cuttlebone/openpgm/openpgm/pgm[30m(B[m[38;5;237m⏎(B[m ⏎ [2K]133;D;0]133;Aix $ ]133;B[K[74C[32m~/Projects/cuttlebone/openpgm/openpgm/pgm[30m(B[m (master) [79C [5Cs[73C[32m~/Projects/cuttlebone/openpgm/openpgm/pgm[30m(B[m (master) [79C [6C[73C[32m~/Projects/cuttlebone/openpgm/openpgm/pgm[30m(B[m (master) [79C [6C[38;2;220;50;47ms[73C[30m(B[m[32m~/Projects/cuttlebone/openpgm/openpgm/pgm[30m(B[m (master) [79C [6C[38;2;147;161;161mcript[68C[30m(B[m[32m~/Proj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scons: warning: BuildDir() and the build_dir keyword have been deprecated; | |
use VariantDir() and the variant_dir keyword instead. | |
File "/Users/ky/Projects/cuttlebone/openpgm/openpgm/pgm/SConstruct", line 237, in <module> | |
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wunavailable-declarations'? [-Wunknown-warning-option] | |
In file included from checksum.c:40: | |
In file included from include/impl/framework.h:30: | |
In file included from include/pgm/atomic.h:46: | |
include/pgm/types.h:96:10: warning: keyword is hidden by macro definition [-Wkeyword-macro] | |
# define restrict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN SCRIPT: Building file alloGLV/examples/appGUI.cpp. | |
Allosystem: GLV Library NOT found. Not building alloGLV. | |
Alloaudio: Gamma not found. Not building Alloaudio. | |
Cuttlebone required to build AlloSphere. Not found! | |
Using AlloSystem Run facilties. | |
----Building /tmp/AlloSystem/alloGLV/examples/appGUI.cpp | |
Not building GAMMA and no usable GAMMA binary found. Not linking application to GAMMA | |
Not building GLV and no usable GLV binary found. Not linking application to GLV | |
Not building Cuttlebone and no usable Cuttlebone binary found. Not linking application to Cuttlebone | |
Not building alloGLV and no usable alloGLV binary found. Not linking application to alloGLV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# == 0 ]; then | |
echo "pass file to run" | |
echo "ex) ./run.sh src/main.cpp" | |
exit 1 | |
fi | |
INITIALDIR=${PWD} # gives absolute path | |
# echo "Script executed from: ${INITIALDIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "allocore/io/al_App.hpp" | |
using namespace al; | |
using namespace std; | |
struct MyApp : App, osc::PacketHandler { | |
MyApp() { | |
initWindow(); | |
initAudio(); | |
// I listen on 60777 | |
oscRecv().open(60777, "", 0.016, Socket::UDP); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
struct Grain { | |
vector<float> data; | |
unsigned size; | |
void setGrain(unsigned start, unsigned end, vector<float>& sound, | |
vector<float>& window) { | |
size = end - start; |
OlderNewer