This is just a mirror of https://web-artanis.com/scheme.html (I found their syntax highlighting difficult to read).
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
;;; -*- Mode:Lisp; Syntax:ANSI-Common-Lisp; Package: ASDF-USER -*- | |
(in-package :asdf-user) | |
(defsystem :my-new-system | |
:description "" | |
:author "Ed L <edward@elangley.org>" | |
:license "MIT" | |
:depends-on (#:alexandria | |
#:uiop | |
#:serapeum |
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
(xhtmlambda::def-element <::request) | |
(defun post-to-endpoint (xml) | |
(let ((drakma:*text-content-types* (acons "application" "xml" drakma:*text-content-types*))) | |
(drakma:http-request *endpoint* | |
:basic-authorization (list *api-key* "X") | |
:method :post | |
:content (with-output-to-string (s) | |
(format s "~w" xml))))) |
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
""" | |
Example of using sub-parser, sub-commands and sub-sub-commands :-) | |
""" | |
import argparse | |
def main(args): | |
""" | |
Just do something |
** Big picture of the Zig caching system. **
This is a big picture of the Zig caching system,
mostly motivated for me to understand the necessary bits to solve
ziglang/zig#11643.
It reflects the status quo of commit fcfeafe99a3ecc694a3475735c81a0d75b6da6d0.
The core logic is defined in src/Cache.zig
.
zig-cache/h
contains the manifest files with varying content.
Manifest files hold relevant data from the compilation to decide,
if the files at the used paths have changed (ie from editing or git).
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
;; this location is "~/.pudb-bp" in older versions of pudb | |
(setq pudb-bp-file (expand-file-name "~/.config/pudb/saved-breakpoints")) | |
(defun pudb-add-breakpoint () | |
(interactive) | |
(append-to-file | |
(concat "b " buffer-file-name ":" | |
(nth 1 (split-string (what-line))) "\n") | |
nil pudb-bp-file)) | |
(define-key py-mode-map (kbd "C-c C-t") 'pudb-add-breakpoint) |
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
''' | |
Convenience utility for connecting to a bitcoind instance through RPC. | |
''' | |
# W.J. van der Laan 2021 :: SPDX-License-Identifier: MIT | |
import base64 | |
import decimal | |
from http import HTTPStatus | |
import http.client | |
import json | |
import logging |
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 python3 | |
# Copyright 2021 aiotter | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 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
(use-srfis '(1 69)) | |
(read-hash-extend #\# | |
(lambda (c port) | |
(define ht (make-hash-table eqv?)) | |
(define (ht-ref key) | |
(hash-table-ref ht key (lambda () | |
(define sym (gensym)) | |
(hash-table-set! ht key sym) | |
sym))) | |
(define (hash-key x) |
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
RESULTS = {} | |
def add_and_store(a, b, name): | |
"""Process and save to DB""" | |
result = a + b | |
RESULTS[name] = result | |
def add(a, b): |