Skip to content

Instantly share code, notes, and snippets.

View PlumpMath's full-sized avatar
🏠
Pro

PlumpMath

🏠
Pro
View GitHub Profile
#pragma once
// This provides a library for stubbing and mocking C++ code as is. It works by requiring
// explicit hooks to be inserted into the code that is to be mocked. In a regular build,
// these hooks will do nothing. In a testing build, they will expand to calls into the
// framework here to allow the code being executed to be hijacked from outside.
//
// NOTE: Thread-safety! Arranging fakes must be done on a single thread. Using fakes can
// be done from multiple threads concurrently.
//
@PlumpMath
PlumpMath / edit-map.diff
Created April 20, 2017 13:38 — forked from reklis/edit-map.diff
SVG map changes
diff --git a/ElectionMeterDemo/Images/Map.svg b/ElectionMeterDemo/Images/Map.svg
index 46ccbd3..4b73095 100644
--- a/ElectionMeterDemo/Images/Map.svg
+++ b/ElectionMeterDemo/Images/Map.svg
@@ -11,9 +11,10 @@
height="593"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.46"
- sodipodi:docname="United States WIP.svg"
@PlumpMath
PlumpMath / ProcessWrapper.cs
Created April 12, 2017 04:17 — forked from corngood/ProcessWrapper.cs
C# Process wrapper
using System;
using System.Diagnostics;
using System.Linq;
static class Program {
static int Main(string[] args) {
var p = new ProcessStartInfo {
FileName = args[0],
// TODO: quote args
Arguments = String.Join(" ", args.Skip(1).ToArray()),
@PlumpMath
PlumpMath / three.cljs
Created April 11, 2017 17:10 — forked from rm-hull/three.cljs
Simple demonstration of using THREE.js with ClojureScript [from a fork of https://gist.github.com/spacemanaki/1157978], now working with thanks to @seabre
(ns three.demo
(:require [THREE :as THREE]))
(def camera
(THREE/PerspectiveCamera.
75
(/ 800 600)
1
10000))
;;________________
;; 기본키 disable
(define-key org-mode-map [(control tab)] nil)
(define-key org-mode-map [C-<backtab>] nil)
;;___________________________
;; 새로운 C-TAB / C-shift-TAB
(global-set-key [(control tab)] 'next-buffer)
(global-set-key (kbd "C-<backtab>") 'previous-buffer)
;; (import [numpy [*]])
(import numpy)
;; (import math)
(defn python_sum [n]
(setv a (list (range n)))
(setv b (list (range n)))
(setv c [])
(for [i (list (range (len a)))]
def pythonsum(n):
a = list(range(n))
b = list(range(n))
c = []
for i in list(range(len(a))):
a[i] = i ** 2
b[i] = i ** 3
c.append(a[i] + b[i])
return c
import numpy
# import math
# a=3
a3 = numpy.array([[1], [2], [3]])
numpy.ndim(a3)
m1 = numpy.matrix([[1, 2, 3, 4]])