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> | |
# include <stdlib.h> | |
# include <time.h> | |
int random_in_range (unsigned int min, unsigned int max) | |
{ | |
int range = max - min, | |
remainder = RAND_MAX % range, | |
bucket = RAND_MAX / range; |
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
JCompileLoad@" | |
import java.io.*; | |
import java.nio.ByteBuffer; | |
import java.nio.MappedByteBuffer; | |
import java.nio.channels.FileChannel; | |
import java.nio.channels.FileChannel.MapMode; | |
import java.util.Arrays; | |
public class EntireTableReader{ | |
public static float[] getFloatTable(String filename, int rowByteCount, int rowChunkSize) |
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
(* Mathematica Package *) | |
BeginPackage["SimpleOO`"] | |
(* Exported symbols added here with SymbolName::usage *) | |
Object; |
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
(* Mathematica Package *) | |
BeginPackage["RawVCS`", { "RuleTreeInfo`", "GithubGistClient`", "FileInfo`", "GithubGistProjectInfo`", "OO`", "OO`Methods`", "OO`Errors`"}] | |
(* Exported symbols added here with SymbolName::usage *) | |
RawVCS; | |
Begin["`Private`"] (* Begin Private Context *) |
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
(* Mathematica Package *) | |
BeginPackage["GithubGistProjectInfo`", { "RuleTreeInfo`", "OO`", "OO`Methods`", "OO`Errors`"}] | |
(* Exported symbols added here with SymbolName::usage *) | |
GithubGistProjectInfo; | |
Begin["`Private`"] (* Begin Private Context *) | |
join = Function[{dir, file}, FileNameJoin[{dir, file}]]; |
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
(* Mathematica Package *) | |
BeginPackage["FileInfo`", {"OO`","OO`Methods`","OO`Errors`", "RuleTreeInfo`"}] | |
(* Exported symbols added here with SymbolName::usage *) | |
FileInfo; | |
Begin["`Private`"] (* Begin Private Context *) | |
join = Function[{dir, file}, FileNameJoin[{dir, file}]]; |
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
(* ::Package:: *) | |
(*......................................................................*) | |
(* :Title: PackageManipulations *) | |
(* :Author: Leonid B.Shifrin *) |
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
(* Mathematica Package *) | |
BeginPackage["GithubGistClient`"] | |
(* Exported symbols added here with SymbolName::usage *) | |
(* TODO: | |
1. Make this OO | |
2. Get rid of curl |
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
(* Mathematica Package *) | |
BeginPackage["RuleTreeInfo`", { "OO`"}] | |
(* Exported symbols added here with SymbolName::usage *) | |
RuleTreeInfo; | |
Begin["`Private`"] (* Begin Private Context *) | |
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) 2012 Leonid Shifrin | |
This project is licensed under the MIT license, | |
http://opensource.org/licenses/MIT | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation |