There are various test suites under src/test
- cljs
- cljs_cli
- clojure
- self
(ns express | |
"Ligweight interface to requirejs." | |
(:refer-clojure :exclude [set get]) | |
(:require [cljs.nodejs :as node])) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Constants | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(def ^{:doc "Global express import." |
#!/bin/sh | |
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
-- another way of waiting until an app is running | |
on waitUntilRunning(appname, delaytime) | |
repeat until my appIsRunning(appname) | |
tell application "Messages" to close window 1 | |
delay delaytime | |
end repeat |
import os | |
import shutil | |
def remove_folders_recursively(start_path, folder_names, exclude_path): | |
for root, dirs, files in os.walk(start_path, topdown=True): | |
# Skip the excluded directory | |
dirs[:] = [d for d in dirs if os.path.join(root, d) != exclude_path] | |
for dir_name in dirs: |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;
import torch | |
import torch.nn.functional as F | |
import coremltools as ct | |
from torch import Tensor | |
from torch import nn | |
from typing import Dict | |
from typing import Optional | |
from ane_transformers.reference.layer_norm import LayerNormANE as LayerNormANEBase | |
from coremltools.models.neural_network.quantization_utils import quantize_weights |
hs.loadSpoon('SpoonInstall') | |
spoon.SpoonInstall.use_syncinstall = true | |
Install = spoon.SpoonInstall | |
log = hs.logger.new('init', 5) | |
-- function debugUI(msg, table) | |
-- log:d(msg) | |
-- log:d(hs.inspect(table)) | |
-- end |
This guide is for achieving PCI-Passthrough with Intel 7700k and AMD RX 580. My host OS is Manjaro KDE edition, and guest is Windows 10.
Device Type | Device |
---|---|
CPU | Intel Core i7-7700K |
Motherboard | ASUS Prime Z270P |
RAM | Corsair Vengeance (DDR4 3000 MHz) |
GPU (Host) | Intel HD Graphics |
As of IPython 5, readline
is no longer used to interpret keystrokes.
Instead, the pure-python library prompt_toolkit
is used.
Getting vim mode in IPython is straightforward. First, edit
~/.ipython/profile_default/ipython_config.py
and add the following line:
c.TerminalInteractiveShell.editing_mode = 'vi'
Lisp interpreter in 90 lines of C++ | |
I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second. | |
Just for fun I wondered if I could write one in C++. My goals would be | |
1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly... | |
2. ...in no more than 90 lines of C++. | |
Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake! |