Skip to content

Instantly share code, notes, and snippets.

View taliesinb's full-sized avatar

Taliesin Beynon taliesinb

View GitHub Profile
@taliesinb
taliesinb / math-unicode-symbols.txt
Last active July 24, 2023 11:40
List of useful mathematical unicode symbols
ALMOST EQUAL TO ≈
ANGLE ∠
ASTERISK OPERATOR ∗
ASYMPTOTICALLY EQUAL TO ≃
BALLOT X ✗
BLACK RIGHTWARDS ARROWHEAD ➤
BLACK SQUARE ■
BOTTOM SQUARE BRACKET ⎵
CHECK MARK ✓
CIRCLED PLUS ⊕
~/git/MXNet make scalapkg feature/arange_inference M 22:52
Makefile:276: WARNING: Significant performance increases can be achieved by installing and enabling gperftools or jemalloc development packages
(cd /Users/taliesinb/git/MXNet/scala-package; \
mvn package -Posx-x86_64-cpu,scala-2.11 -Dcxx="g++" \
-Dbuild.platform="osx-x86_64-cpu" \
-Dcflags="-DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -DNDEBUG=1 -I/Users/taliesinb/git/MXNet/3rdparty/mshadow/ -I/Users/taliesinb/git/MXNet/3rdparty/dmlc-core/include -fPIC -I/Users/taliesinb/git/MXNet/3rdparty/tvm/nnvm/include -I/Users/taliesinb/git/MXNet/3rdparty/dlpack/include -I/Users/taliesinb/git/MXNet/3rdparty/tvm/include -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -mf16c -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -I/System/Library/Framewo
@taliesinb
taliesinb / MLPrintf.c
Created March 17, 2016 05:47
Allows LibraryLink projects to call MLPrintf to print straight to a Mathematica notebook, using ordinary printf formatting. Super useful to debug LibraryLink projects live while working with them.
#include <cstdarg>
#include <stdio.h>
#include <stdarg.h>
WolframLibraryData logLibData = NULL;
void MLPrintString(const char* str) {
if (!logLibData) return;
MLINK link = logLibData->getWSLINK(logLibData);
MLPutFunction(link, "EvaluatePacket", 1);
@taliesinb
taliesinb / gist:5848321
Created June 24, 2013 07:28
List of 'essential functions' that every Mathematica programmer should know
Equal
SameQ
MatchQ
MemberQ
Take
Drop
Head
Most
Rest
Part
@taliesinb
taliesinb / slider.html
Created April 25, 2013 23:34
Easily create jquery-based slider animations from Mathematica. Get "slider.m" and then try: exportSlider[Table[Plot[Sin[x]+Sin[(b/10)x+b],{x,1,100},ImageSize->500,AspectRatio->.4,PlotRange->{{0,100},{-2,2}}],{b,1,20,1}]] That will rasterize the graphics expressions and create a composite jpg in Directory[] with a unique name, and return a snippe…
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" >
<title>Slider example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/blitzer/jquery-ui.css" type="text/css" media="all" />
</head>
@taliesinb
taliesinb / split_test.go
Created May 29, 2012 00:54
Benchmarking SplitByte implementations from https://gist.github.com/2821937, the proper way
package split
import "testing"
var long []byte
const sz = 24
const runs = 32
func init() {
@taliesinb
taliesinb / main.go
Created May 29, 2012 00:53
Benchmarking SplitByte implementations from https://gist.github.com/2821937
package main
import "split"
import "time"
func main() {
long := make([]byte, 2 << 24)
for i := uint(1); i < 23; i++ {
@taliesinb
taliesinb / split.go
Created May 29, 2012 00:50
Some implementations of SplitByte
package split
import "bytes"
func CountByte(s []byte, c byte) int {
count := 0
i := 0
for i < len(s) {
if s[i] != c {
o := bytes.IndexByte(s[i:], c)
@taliesinb
taliesinb / split.go
Created May 29, 2012 00:50
Some implementations of SplitByte
package split
import "bytes"
func CountByte(s []byte, c byte) int {
count := 0
i := 0
for i < len(s) {
if s[i] != c {
o := bytes.IndexByte(s[i:], c)
@taliesinb
taliesinb / InboxReader.java
Created June 12, 2011 16:18
Use JavaMail to download email headers from GMail and spit out TSV
import java.util.Properties;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.NoSuchProviderException;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.FetchProfile;
public class InboxReader