I use Jenkins as CI server.
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 <libguile.h> | |
int main(int argc, char** argv) { | |
SCM func; | |
scm_init_guile(); | |
scm_c_primitive_load("c_call_guile.scm"); | |
func = scm_variable_ref(scm_c_lookup("show-me")); | |
scm_call_0(func); |
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
function foo() { | |
let p = new Promise(function(resolve, reject) { | |
setTimeout(function() { | |
console.log('foo'); | |
resolve('foo111'); | |
}, 1000); | |
}); | |
return p; | |
} |
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
;;;;;; iteration in common lisp | |
;;;; do | |
;; `do` is like `if` in c | |
(do ((x 1 (+ x 1)) | |
(y 1 (* y 2))) | |
((> x 5) y) ;; when x is bigger than 5, return y | |
(print y) |
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
#!/usr/bin/env python | |
import cProfile | |
def main(): | |
for i in range(100000000): | |
i / 5.53892138021312312 * 23.23123121321321312 | |
print(i) | |
cProfile.run("main()") |
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
(require '(clojure [string :as string] | |
[walk :as walk])) | |
;; page 236 on <Clojure Programming> | |
(defmacro reverse-it [form] | |
(walk/postwalk #(if (symbol? %) | |
(symbol (string/reverse (name %))) | |
%) | |
form)) |
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
(fn reduction1 | |
([f col] | |
(reduction1 f (f (first col)) (rest col))) | |
([f val col] | |
(if (empty? col) | |
(list val) | |
(cons val (lazy-seq (reduction1 f (f val (first col)) (rest col))))))) |
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
h1 h2 { | |
font-family: Monaco; | |
font-style: Normal; | |
} | |
h1 { | |
font-size: 15px; | |
} | |
h2 { |
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
#!/usr/bin/env python | |
list_in_list = [[1,2,3], [2,2,2], [1,2,3]] | |
try: | |
dist_list = list(set(list_in_list)) | |
except TypeError: | |
print("list in list") |
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
#!/usr/bin/env python | |
#coding: utf-8 | |
import os | |
import sys | |
# 好吧其实我现在写这种短代码不太考虑怎么写的好了,不过还是有个人习惯在里面 | |
EXTS = ['cc', 'java', 'cpp', 'c', 'py', 'cxx', 'hs', 'lisp', 'scm', 'el', 'clj'] |
NewerOlder