Skip to content

Instantly share code, notes, and snippets.

View louismullie's full-sized avatar

L louismullie

View GitHub Profile
""" Fast algorithm for spectral analysis of unevenly sampled data
The Lomb-Scargle method performs spectral analysis on unevenly sampled
data and is known to be a powerful way to find, and test the
significance of, weak periodic signals. The method has previously been
thought to be 'slow', requiring of order 10(2)N(2) operations to analyze
N data points. We show that Fast Fourier Transforms (FFTs) can be used
in a novel way to make the computation of order 10(2)N log N. Despite
its use of the FFT, the algorithm is in no way equivalent to
<html>
<head>
<link rel="stylesheet" href="http://paperjs.org/assets/css/style.css"/>
<script src="http://paperjs.org/assets/js/jquery.js"></script>
<script src="http://paperjs.org/assets/js/paper.js"></script>
</head>
#
# 'make' build executable file
# 'make clean' removes all .o and executable files
#
# Executables to build
EXEC += primes
EXEC += viewer
# Get the shell name to determine the OS
[ 55.82863151, 16.66016235, 16.56074546, 16.33441199, 15.82131779,
15.95342212, 51.940328, 52.88464823, 50.13112406, 51.89304781,
51.87906225, 68.61583473, 68.30734983, 52.48247675, 36.57984341,
37.0480803, 51.11207517, 51.38769437, 51.70424725, 47.29519627,
46.67505636, 57.30140092, 57.3097789, 57.23021044, 57.2283154 ,
63.80667072, 62.94348524, 67.11220151, 66.9710114, 66.44253374,
65.88567067, 65.63613632, 65.62588087, 65.56545214, 61.20596255,
60.27154371, 60.00053117, 60.26069021, 59.85227016, 60.04045856,
59.63910965, 58.17753978, 58.38615228, 57.75794438, 57.64209471,
61.69872201, 53.56125995, 53.28292422, 53.18253789, 52.97380507,
source :rubygems
gem 'sinatra'
gem 'json'
gem 'omniauth'
gem 'omniauth-oauth2'
gem 'omniauth-github'
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__)
gem 'thin'
background-color: #3B2F63;
background-image: -webkit-radial-gradient(50% top, rgba(84,90,182,0.6) 0%, rgba(84,90,182,0) 75%),-webkit-radial-gradient(right top, #794aa2 0%, rgba(121,74,162,0) 57%);
background-repeat: no-repeat;
background-size: 100% 1000px;
@louismullie
louismullie / gist:9727013
Last active August 29, 2015 13:57
BrookGPU SHA256 (incomplete implementation)
/**
* Aminer - a bitcoin miner for various platforms.
*
* Andreas Rueckert <[email protected]>
*
* A good part of this code is based on the GLSL sha256 code of xaci: https://bitcointalk.org/index.php?topic=4618.msg191488#msg191488
*/
/*
#pragma optionNV looplimit 32768
@louismullie
louismullie / gist:9726991
Last active September 23, 2022 02:39
OpenGL 3.0 SHA256
#version 130
#pragma optionNV(unroll all)
uint ROTLEFT(in uint a, in int b) { return (a << b) | (a >> (32-b)); }
uint ROTRIGHT(in uint a, in int b) { return (a >> b) | (a << (32-b)); }
uint CH(in uint x,in uint y,in uint z) { return (x & y) ^ (~x & z); }
uint MAJ(in uint x,in uint y,in uint z) { return (x & y) ^ (x & z) ^ (y & z); }
uint EP0(in uint x) { return ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22); }
uint EP1(in uint x) { return ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25); }
blake32=(function(){var k,g,r,l,m,o,p,q,t,w,x;x=4*(1<<30);k=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19];m=[0x243F6A88,0x85A308D3,0x13198A2E,0x03707344,0xA4093822,0x299F31D0,0x082EFA98,0xEC4E6C89,0x452821E6,0x38D01377,0xBE5466CF,0x34E90C6C,0xC0AC29B7,0xC97C50DD,0x3F84D5B5,0xB5470917];w=function(i){if(i<0){i+=x}return("00000000"+i.toString(16)).slice(-8)};o=[[16,50,84,118,152,186,220,254],[174,132,249,109,193,32,123,53],[139,12,37,223,234,99,23,73],[151,19,205,235,98,165,4,143],[9,117,66,250,30,203,134,211],[194,166,176,56,212,87,239,145],[92,241,222,164,112,54,41,184],[189,231,28,147,5,79,104,162],[246,158,59,128,44,125,65,90],[42,72,103,81,191,233,195,13]];p=function(a,b,n){var s=q[a]^q[b];q[a]=(s>>>n)|(s<<(32-n))};g=function(i,a,b,c,d){var u=l+o[r][i]%16,v=l+(o[r][i]>>4);a%=4;b=4+b%4;c=8+c%4;d=12+d%4;q[a]+=q[b]+(t[u]^m[v%16]);p(d,a,16);q[c]+=q[d];p(b,c,12);q[a]+=q[b]+(t[v]^m[u%16]);p(d,a,8);q[c]+=q[d];p(b,c,7)};return function(a,b){if(!(b instanceof Array&&b.len
var BLAKE2s = (function () {
function BLAKE2s(digestLength, key) {
if (typeof digestLength === "undefined") { digestLength = 32; }
this.isFinished = false;
this.digestLength = 32;
this.blockLength = 64;
this.iv = [
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
];