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
samuel@samuel-XPS-13-9360:~/code/memory-game$ buildozer android clean | |
# Check configuration tokens | |
# Ensure build layout | |
# Check configuration tokens | |
# Run '/usr/bin/python -m pythonforandroid.toolchain clean_builds --color=always --storage-dir=/home/samuel/code/memory-game/.buildozer/android/platform/build' | |
# Cwd /home/samuel/code/memory-game/.buildozer/android/platform/python-for-android-new-toolchain | |
# Run '/usr/bin/python -m pythonforandroid.toolchain clean_dists --color=always --storage-dir=/home/samuel/code/memory-game/.buildozer/android/platform/build' | |
# Cwd /home/samuel/code/memory-game/.buildozer/android/platform/python-for-android-new-toolchain | |
samuel@samuel-XPS-13-9360:~/code/memory-game$ buildozer android debug deploy run | |
# Check configuration tokens |
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
import kivy | |
from kivy.clock import Clock | |
from kivy.app import App | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.uix.label import Label | |
from kivy.uix.textinput import TextInput | |
def on_enter(instance): | |
print '============== still in "global?" on_enter() ====================' |
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
(defun s-trim-left (s) | |
"Remove whitespace at the beginning of S." | |
(if (string-match "\\`[ \t\n\r]+" s) | |
(replace-match "" t t s) | |
s)) | |
(defun first-word (s) | |
(let ((s-trim (s-trim-left s))) | |
(car (split-string s-trim " ")))) |
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
;;clojure-code | |
(:require [compojure.core :refer :all] | |
[trads.layout :as layout] | |
[trads.util :as util] | |
[monger.core :as mg] | |
[selmer.filters :as selm]) | |
(selm/add-filter! :get-name #((first %) (second %))) |
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
(defun get-back-char () | |
(buffer-substring-no-properties (- (point) 6) (point))) | |
(defun del-backward () | |
(interactive) | |
(let ((text-back (get-back-char))) | |
(do | |
(message "test") | |
(if (string= text-back "lambda") | |
(delete-backward-char 6) |
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
(defparameter *maths-functions* (list)) | |
(defmacro defun-maths (func-name args core) | |
"appends the code of func-name into maths-functions." | |
`(progn | |
(push (list :name (quote ,func-name) :variable (quote ,args) :core (quote ,core)) *maths-functions*) | |
(defun ,func-name ,args ,core))) | |
(defun get-source (func-name) | |
(car (remove-if-not (lambda (f) (eql (getf f :name) func-name)) *maths-functions* |
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
(defparameter *maths-functions* (list)) | |
(defmacro defun-maths (func-name args core) | |
"appends the code of func-name into maths-functions." | |
`(progn | |
(push (list (quote ,func-name) (quote ,@args) (quote ,core)) *maths-functions*) | |
(defun ,func-name ,args ,core))) | |
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
(defparameter *maths-functions* (list)) | |
(defmacro defun-maths (func-name args core) | |
"appends the code of func-name into maths-functions." | |
`(progn | |
(push (list (quote ,func-name) (quote ,@args) (quote ,core)) *maths-functions*) | |
(defun ,func-name ,args ,core))) |
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
(defun eq-assoc (assoc-a assoc-b) | |
(and (equal (length assoc-a) (length assoc-b)) | |
(reduce (lambda (accum pair) | |
(and accum | |
(equal pair (assoc (car pair) assoc-b)))) | |
assoc-a | |
:initial-value t))) | |
(defun group (list) | |
(let ((even t)) |
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
(ns newton-raphson.core) | |
;;utility function for list manipulation | |
(defn keep-list [expr] | |
(if (and (coll? expr) (not (= 1 (count expr)))) (list expr) expr)) | |
(defn to-list [expr] | |
(cond (list? expr) expr | |
(coll? expr) (seq expr) |
NewerOlder