Skip to content

Instantly share code, notes, and snippets.

@blueintegral
blueintegral / gist:7416f9303d89570b458a
Created Mar 11, 2016
Solving the pip install error with msvc9compiler
View gist:7416f9303d89570b458a
Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\>cd "Program Files (x86)\Microsoft Visual Studio 9.0"
C:\Program Files (x86)\Microsoft Visual Studio 9.0>cd VC
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>cd bin
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>cd amd64
View gist:9339804
### Keybase proof
I hereby claim:
* I am blueintegral on github.
* I am hunter (https://keybase.io/hunter) on keybase.
* I have a public key whose fingerprint is DECD 24A6 5BB9 7D5E 12B9 CCAE C5B3 F178 DF88 9B2F
To claim this, I am signing this object:
@blueintegral
blueintegral / ball_sense.c
Created Jan 19, 2014
Robocup ball sense code with added LFSR and debug stuff
View ball_sense.c
#include <board.h>
#include "main.h"
#include "status.h"
#include "timer.h"
#include "ball_sense.h"
#include "adc.h"
//How much ambient IR light we can handle
//FIXME This number is arbitrary and needs to be chosen experimentally
@blueintegral
blueintegral / gist:6263391
Created Aug 18, 2013
Hardcoded value version of DIY CyberGlove Arduino code
View gist:6263391
float analog0;
float analog1;
float analog2;
float analog3;
float analog0_close;
float analog1_close;
float analog2_close;
float analog3_close;
@blueintegral
blueintegral / gist:6263384
Created Aug 18, 2013
DIY CyberGlove Arduino code
View gist:6263384
float analog0;
float analog1;
float analog2;
float analog3;
float analog0_close;
float analog1_close;
float analog2_close;
float analog3_close;
float analog0_open;
float analog1_open;
@blueintegral
blueintegral / index.html
Created May 23, 2013
Cosmic Microwave Background mapping - Maps an image taken by the Planck Survey onto a sphere.
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Planck Cosmic Microwave Background</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
@blueintegral
blueintegral / threading_demo.c
Created Jan 15, 2013
Demonstrates effect of threading by calculating perfect numbers (an integer equal to the sum of its integer divisors with no remainders) and primes under 1,000,000 with and without threads.
View threading_demo.c
// Perfect.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include "Windows.h"
#include "LIMITS.h"
static HANDLE Thread_mutex;
int prime_count1;
int prime_count2;
int prime_count3;
int prime_count4;
@blueintegral
blueintegral / parity.asm
Last active Dec 11, 2015
Compute parity of a number
View parity.asm
#Hunter Scott
#Version for MARS
#declare and reserve space for data and variables after .data
.data
#string constant
title: .asciiz "Program computes the pariety of number"
prompt: .asciiz "Input a number please: "
o_title: .asciiz "The pariety is "
# newline junk
newline: .byte 10,13,00,00
@blueintegral
blueintegral / sierpinski.m
Created Jan 15, 2013
Simple recursive Sierpinski triangle generator I wrote for MATLAB
View sierpinski.m
function sierpinski(pair1,pair2,pair3)
X = (((pair1(1)-pair2(1))^2)+((pair1(2)-pair2(2))^2))^(1/2);
Y = (((pair3(1)-pair2(1))^2)+((pair3(2)-pair2(2))^2))^(1/2);
Z = (((pair3(1)-pair1(1))^2)+((pair3(2)-pair1(2))^2))^(1/2);
if X >= 0.1 && Y >= 0.1 && Z >= 0.1
x = [pair1(1) pair2(1) pair3(1) pair1(1)];
y = [pair1(2) pair2(2) pair3(2) pair1(2)];
for index = 1:length(pair1)
A(index) = (pair2(index)+pair3(index))/2;
B(index) = (pair1(index)+pair3(index))/2;