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
const PiCamera = require('pi-camera'); | |
function getRandomInt(max) { | |
return Math.floor(Math.random() * Math.floor(max)); | |
} | |
setInterval(function() { | |
var path = './' + getRandomInt(500) + '.jpg'; |
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 | |
infile="TestClipTwoMin.mp4" | |
datafile="TestClipTwoMinData.csv" | |
crfs=("18" "19" "20" "21" "22" "23" "24" "25" "26" "27") | |
presets=("ultrafast" "superfast" "veryfast" "faster" "fast" "medium" "slow" "slower" "veryslow") | |
echo 'CRF,Preset,Time (Secs),Size (MB)' >> "$datafile" |
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 python3 | |
import math | |
import sys | |
import youtube_dl | |
BEST_FORMAT = "bestvideo+bestaudio/best" |
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 | |
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n" | |
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist | |
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist | |
echo "\n\n--- Done! ---\n\n" |
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 <stdio.h> | |
int movingAvg(int *ptrArrNumbers, long *ptrSum, int pos, int len, int nextNum) | |
{ | |
//Subtract the oldest number from the prev sum, add the new number | |
*ptrSum = *ptrSum - ptrArrNumbers[pos] + nextNum; | |
//Assign the nextNum to the position in the array | |
ptrArrNumbers[pos] = nextNum; | |
//return the average | |
return *ptrSum / len; |
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
// Copyright (c) 2014, Jan Winkler <winkler@cs.uni-bremen.de> | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the |
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
inline void HSI2RGB(double h, double s, double i, double* r, double* g, double* b) | |
{ | |
double x = i * (1 - s); | |
if(h < 2 * M_PI / 3) | |
{ | |
double y = i * (1 + (s * cos(h)) / (cos(M_PI / 3 - h))); | |
double z = 3 * i - (x + y); | |
*b = x; *r = y; *g = z; | |
} | |
else if(h < 4 * M_PI / 3) |
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
-/macro fio-dec system, june 1963 | |
007652 640500 szm=sza sma-szf | |
007652 650500 spq=szm i | |
007652 761200 clc=cma+cla-opr | |
- define senseswitch A | |
- repeat 3, A=A+A | |
- szs A | |
- term | |
- define init A,B | |
- law B |
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
-/macro fio-dec system, june 1963 | |
007652 640500 szm=sza sma-szf | |
007652 650500 spq=szm i | |
007652 761200 clc=cma+cla-opr | |
- define senseswitch A | |
- repeat 3, A=A+A | |
- szs A | |
- term | |
- define init A,B | |
- law B |