Skip to content

Instantly share code, notes, and snippets.

View jiegec's full-sized avatar
❤️

Chen jiegec

❤️
View GitHub Profile
@jiegec
jiegec / keybase.md
Created November 30, 2017 04:09
Prove that I am jiegec on github and keybase.

Keybase proof

I hereby claim:

  • I am jiegec on github.
  • I am jiegec (https://keybase.io/jiegec) on keybase.
  • I have a public key ASDSHq7bWCl7yCwLjKKga4dR-yY6o5G8pmINPXvRiBmQpgo

To claim this, I am signing this object:

(import hy)
(def py-eval (get __builtins__ "eval"))
(defn stringify [form &optional debug]
"Convert a FORM to a string."
(when debug (print (.format "{0}: {1}" form (type form))))
(cond
[(isinstance form hy.models.expression.HyExpression)
(+ "(" (.join " " (list-comp (stringify x debug) [x form])) ")")]
@jiegec
jiegec / numpy.diff
Created August 18, 2015 11:51
numpy build fix in Mac OS X
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py
index b48e422..4311758 100644
--- a/numpy/distutils/command/build_ext.py
+++ b/numpy/distutils/command/build_ext.py
@@ -46,10 +46,14 @@ class build_ext (old_build_ext):
self.fcompiler = None
def finalize_options(self):
- incl_dirs = self.include_dirs
+ if isinstance(self.include_dirs, str):
@jiegec
jiegec / versions.gradle
Last active August 29, 2015 14:00
A simple gradle script for choosing correct version of ForgeGradle
minecraftVersion = '1.6.4'
forgeVersion = '9.11.1.964'
def versions = forgeVersion.split('\\.')
def fourth = Integer.valueOf(versions[3])
if(fourth >= 1048) {
forgeGradleVersion = '1.2-SNAPSHOT'
}else if(fourth >= 967) {
forgeGradleVersion = '1.1-SNAPSHOT'
}else if(fourth == 965 || fourth < 960){