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 backend.core | |
(:require ["sequelize" :refer (Sequelize DataTypes)] | |
[cljs.core.async :refer [go]] | |
[cljs.core.async.interop :refer-macros [<p!]] | |
["express" :as express])) | |
(def port 1337) | |
(defn env [x & [default]] | |
(or (aget (.. js/process -env) x) default)) |
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 treemacs-toggle-maybe () | |
(require 'treemacs) | |
(if (eq last-command 'treemacs) | |
(set-frame-parameter (selected-frame) 'treemacs-forced-p | |
(not (frame-parameter (selected-frame) 'treemacs-forced-p))) | |
(unless (frame-parameter (selected-frame) 'treemacs-forced-p) | |
(if (seq-find | |
(lambda (x) | |
(with-current-buffer (window-buffer x) | |
(derived-mode-p 'text-mode 'prog-mode))) |
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-modules | |
(guix gexp) | |
(guix download) | |
((guix licenses) #:prefix license:) | |
(guix packages) | |
(guix git-download) | |
(guix download) | |
(guix utils) | |
(guix build-system guile) | |
(gnu packages guile) |
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-modules (srfi srfi-69)) | |
#| | |
(hash (list 1 2)) => 1690321764596975924 | |
(hash (list 2 1)) => 1690321764596975924 | |
(hash (vector 1 2)) => 2121270931541232526 | |
(hash (vector 2 1)) => 1271456826911243416 | |
|# | |
(define (hash-table-deep-hash table) |
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-modules (ice-9 pretty-print)) | |
;; Helper methods for maintaining comments and whitespace. | |
(define (copy-line-comment) | |
(let ((char (read-char))) | |
(if (not (eof-object? char)) | |
(if (eq? char #\newline) | |
(newline) | |
(begin (write-char char) (copy-line-comment)))))) | |
(define (maintain-empty-lines) |
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-lambda.scm | |
;; | |
;; This syntax was inspired by arc and Clojure's anonymous procedure | |
;; syntax. | |
;; | |
;; #.\ (+ %1 %2) -> (lambda (%1 %2) (+ %1 %2)) | |
;; #.\ (+ % %%) -> (lambda (% %%) (+ % %%)) | |
;; | |
;; The .\ is supposed to approximate the lowercase lambda character in | |
;; ascii. |
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 cryptogroups.groups | |
(:require [clojure.set :as set])) | |
(defn pow | |
[x n] | |
(Math/pow x n)) | |
(defrecord Z [N]) | |
(defrecord Z* [N]) |
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
;; Paredit's bindings set to be called with SPC + l as prefix | |
(map! | |
:map paredit-mode-map | |
:leader (:prefix ("l" . "Lisps") | |
:nvie "f" #'paredit-forward | |
:nvie "b" #'paredit-backward | |
:nie "k" #'paredit-kill-region | |
:nie "s" #'paredit-splice-sexp | |
:nie "(" #'paredit-wrap-round |
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
# Source https://github.com/oranmor/russian_obscenity | |
# основной фильтр | |
- '(?:\w*(?:[хxh](?:[уyu][иiu])|[пnp][еиeiu](?:[з3z][дd]|[дd](?:[еаоeoa0][рpr]|[рpr]))|[бb6][лl]я[дd]|[оo0][хxh][уyu][еe]|[мm][уyu][дd][еоиаeioau0]|[дd][еe][рpr][ьb]|[гrg][аоoa0][вbv][нhn]|[уyu][еёe][бb6])|[хxh][\W_]*(?:[уyu][\W_]*[йиеёяeiju])|[пnp][\W_]*[еиeiu][\W_]*(?:[з3z][\W_]*[дd]|[дd][\W_]*(?:[еаоeoa0][\W_]*[рpr]|[рpr]))|[бb6][\W_]*[лl][\W_]*я[\W_]*[дd]|[оo0][\W_]*[хxh][\W_]*[уyu][\W_]*[еe]|[мm][\W_]*[уyu][\W_]*[дd][\W_]*[еоиаeioau0]|[дd][\W_]*[еe][\W_]*[рpr][\W_]*[ьb]|[гrg][\W_]*[аоoa0][\W_]*[вbv][\W_]*[нhn]|[уyu][\W_]*[еёe][\W_]*[бb6]|[ёеe][бb6])\w+' | |
# жоп* | |
- 'ж[\W_]*(?:[оo0][\W_]*[пnp][\W_]*(?:[аa]|[oо0](?:[\W_]*[хxh])?|[уеыeyiuё]|[оo0][\W_]*[йj])\w*)' | |
# дерьмо | |
- '[дd][\W_]*[еe][\W_]*[рpr][\W_]*(?:[ьb][\W_]*)?[мm][\W_]*[оуеаeoya0u](?:[\W_]*[мm])?' | |
# чмо, чмырь | |
- '[чc][\W_]*[мm][\W_]*(?:[оo0]|[ыi][\W_]*[рpr][\W_]*[еиьяeibu])' | |
# сука, сучка |
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 symbolic-system.utils | |
(:require [clojure.math.numeric-tower :as math])) | |
(defn symbolic-enumeration-system->decimal-number | |
"Translates symbolic enumeration system element that consists of distinct strings to decimal number based on number of elements in the system. System elements must be given in descending order" | |
[x system] | |
{:pre [(spec/and | |
(spec/valid? (spec/coll-of string?) x) | |
(spec/valid? (spec/coll-of string?) system) | |
(spec/valid? not-empty system) |
NewerOlder