_id
stringlengths
64
64
repository
stringlengths
6
84
name
stringlengths
4
110
content
stringlengths
0
248k
license
null
download_url
stringlengths
89
454
language
stringclasses
7 values
comments
stringlengths
0
74.6k
code
stringlengths
0
248k
c141f182392c3f5d161be637c8e6210138d00c252506b9f35a2d8a6124f26700
privet-kitty/cl-competitive
persistent-segment-tree.lisp
(defpackage :cp/persistent-segment-tree (:use :cl) (:export #:psegtree #:make-psegtree #:psegtree-fold #:psegtree-update #:%psegtree-update!) (:documentation "Provides persistent segment tree.")) (in-package :cp/persistent-segment-tree) ;; TODO: ;; - abstraction ;; - test ;; - linear-time initialization (deftyp...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/6b54a014397b4b5da77617288887fa0d95a3fdbe/module/persistent-segment-tree.lisp
lisp
TODO: - abstraction - test - linear-time initialization
(defpackage :cp/persistent-segment-tree (:use :cl) (:export #:psegtree #:make-psegtree #:psegtree-fold #:psegtree-update #:%psegtree-update!) (:documentation "Provides persistent segment tree.")) (in-package :cp/persistent-segment-tree) (deftype index () '(integer 0 #.(floor most-positive-fixnum 2))) (declaim ...
255aeeda31935136794d747fc13cf684d2ff1201988874e0fcfb377e69ffff5d
elastic/eui-cljs
types.cljs
(ns eui.services.types (:require ["@elastic/eui/lib/services/theme/types.js" :as eui])) (def COLOR_MODES_STANDARD eui/COLOR_MODES_STANDARD) (def COLOR_MODES_INVERSE eui/COLOR_MODES_INVERSE)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/services/types.cljs
clojure
(ns eui.services.types (:require ["@elastic/eui/lib/services/theme/types.js" :as eui])) (def COLOR_MODES_STANDARD eui/COLOR_MODES_STANDARD) (def COLOR_MODES_INVERSE eui/COLOR_MODES_INVERSE)
c8c47e34dfe4862357381b089732f35e97b37b3d5588ba70a629883cf0d8b664
devn/yokogiri
core.clj
(ns yokogiri.test.core (:use [yokogiri.core]) (:use [midje.sweet])) (fact "These tests need to be improved, but they're better than nothing." true => true) (facts "yokogiri.core/make-client" (fact "It can create a client" (let [simple-client (make-client)] simple-client => truthy (class ...
null
https://raw.githubusercontent.com/devn/yokogiri/6a5f49a2dfe73917205e451bdfd6ad2844cf8892/test/yokogiri/test/core.clj
clojure
(ns yokogiri.test.core (:use [yokogiri.core]) (:use [midje.sweet])) (fact "These tests need to be improved, but they're better than nothing." true => true) (facts "yokogiri.core/make-client" (fact "It can create a client" (let [simple-client (make-client)] simple-client => truthy (class ...
1d2c8ada2f904acbcaca324bb0a9e00fe44926faf49ca47288a8cdf4790b9487
williamleferrand/accretio
ys_stripe.ml
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
null
https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/client/ys_stripe.ml
ocaml
"usd", // String currency that the token was created in true, // Boolean of whether this token was created with a live or test API key : "token", // String identifier of the type of object, always "token" used : false,
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
6f6eb2ce71275f64ab05dbcc59004f0ce3176ec7542e72274aa117bc95b83d64
fourmolu/fourmolu
output-True.hs
import Foo import Foo.Inner import Bar import Baz type Foo = Int type Foo2 = Double type Bar = Int type Bar2 = Double
null
https://raw.githubusercontent.com/fourmolu/fourmolu/c47d1b68d7af393f1a1a32d0a77b85df0656f6d8/data/fourmolu/respectful/output-True.hs
haskell
import Foo import Foo.Inner import Bar import Baz type Foo = Int type Foo2 = Double type Bar = Int type Bar2 = Double
5fac5b20fe22113ffa6b54a76aa883bef640b0f766f0c562b42e9cfcacad952f
elaforge/karya
Patch.hs
Copyright 2017 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Ness.Multiplate.Patch where import qualified Util.Control import qualified Synth.Shared.Control as Control import Ness.Multiplate instruments :: [Instrument] instrumen...
null
https://raw.githubusercontent.com/elaforge/karya/a6638f16da9f018686023977c1292d6ce5095e28/Ness/Multiplate/Patch.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2017 module Ness.Multiplate.Patch where import qualified Util.Control import qualified Synth.Shared.Control as Control import Ness.Multiplate instruments :: [Instrument] instruments = [instrument1] c_x, c_y :: Control.Control c_x = "x" c_y = "y" c_duration :: Control.Control c_duration = "...
4b11e83251f814f4785e388d7978637b80427c84bdc4fbfcc0a4d0a17d160f1a
nygge/pran
pran_sdp.erl
%%%------------------------------------------------------------------- %%% File : pran_sip.erl Author : < > Description : SDP decoder for PRAN . %%% Created : 8 Dec 2010 by < > %%%------------------------------------------------------------------- -module(pran_sdp). %% API -export([decode/3]). %%===...
null
https://raw.githubusercontent.com/nygge/pran/2baf7f79720ebf40f5b18364127a6209515c7c91/src/pran_sdp.erl
erlang
------------------------------------------------------------------- File : pran_sip.erl ------------------------------------------------------------------- API ==================================================================== API ==================================================================== -----------...
Author : < > Description : SDP decoder for PRAN . Created : 8 Dec 2010 by < > -module(pran_sdp). -export([decode/3]). decode(Payload, Stack, _Opts) -> try rfc4566:decode('session-description',Payload) of {ok, PDU, <<>>} -> {[{sdp,PDU}|Stack],<<>>,done}; {[{sdp,PDU}|Stack],More,done}; f...
7b7cde9bc63cf278ecb52f298d5555ed120b1c56bdeea72d8c664f4b00a3e5cf
binaryage/chromex
windows.clj
(ns chromex.app.windows "Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser. * available since Chrome 36 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/windows.clj
clojure
-- properties ------------------------------------------------------------------------------------------------------------- typically the window 'on top'. unspecified properties are unchanged. -- events -----------------------------------------------------------------------------------------------------------------...
(ns chromex.app.windows "Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser. * available since Chrome 36 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer...
c813b849c895bb6f8af0a88dfd3a4493cce90385ae8040005a16c1949c142b6c
finnishtransportagency/harja
atom.clj
(ns harja.atom "Apureita atomeille." (:refer-clojure :exclude [run!]) (:require [cljs.analyzer] [reagent.ratom :refer [run!]] [taoensso.truss :refer [have have?]])) (defn- validit-optiot? [optiot] (or (nil? optiot) (and (have? map? optiot) (every? #{:odota :nil-kun-haku...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljs/harja/atom.clj
clojure
(ns harja.atom "Apureita atomeille." (:refer-clojure :exclude [run!]) (:require [cljs.analyzer] [reagent.ratom :refer [run!]] [taoensso.truss :refer [have have?]])) (defn- validit-optiot? [optiot] (or (nil? optiot) (and (have? map? optiot) (every? #{:odota :nil-kun-haku...
289c49a0bdd22761501afe2d5dba5b5dcf88bb1a1742cc4c721e1017237e4b19
tonymorris/geo-osm
OriginL.hs
-- | Values with a @origin@ optional string accessor. module Data.Geo.OSM.Lens.OriginL where import Control.Lens.Lens class OriginL a where originL :: Lens' a (Maybe String)
null
https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Lens/OriginL.hs
haskell
| Values with a @origin@ optional string accessor.
module Data.Geo.OSM.Lens.OriginL where import Control.Lens.Lens class OriginL a where originL :: Lens' a (Maybe String)
7e9457c3f7655ed0b78f8b5f7c8900d59922e0d69faf0aa774d5ad34300f92a3
lancelet/wgpu-hs
WGPUSamplerBindingType.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # -- This file was generated by wgpu-raw-hs-codegen on: 2021 - 08 - 25T10:02:03.522705 -- Using wgpu-native git hash: b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu - native ( ) m...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/42d7931cdd793970bf4844906b382d908bbb196f/wgpu-raw-hs/src/WGPU/Raw/Generated/Enum/WGPUSamplerBindingType.hs
haskell
This file was generated by wgpu-raw-hs-codegen on: Using wgpu-native git hash:
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # 2021 - 08 - 25T10:02:03.522705 b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu - native ( ) module WGPU.Raw.Generated.Enum.WGPUSamplerBindingType where import Data.Word (Word32)...
d6cfaf1cadaa4bfcdbbc4f5fdbca03d2744e7bcaf4dfd8bec2d953e4cb863e7f
skynet-gh/skylobby
util.cljs
(ns skylobby.util (:require ["dayjs" :as dayjs] ["dayjs/plugin/utc" :as utc] [clojure.edn :as edn] [clojure.string :as string] [reitit.frontend.easy :as rfe])) (.extend dayjs utc) (defn get-server-key [server-url username] (str username "@" server-url)) (defn params-server-key [parameters] ...
null
https://raw.githubusercontent.com/skynet-gh/skylobby/e25c88d149c298326ec8a32306a86485c2324fd8/src/cljs/skylobby/util.cljs
clojure
string colors reverse r and b
(ns skylobby.util (:require ["dayjs" :as dayjs] ["dayjs/plugin/utc" :as utc] [clojure.edn :as edn] [clojure.string :as string] [reitit.frontend.easy :as rfe])) (.extend dayjs utc) (defn get-server-key [server-url username] (str username "@" server-url)) (defn params-server-key [parameters] ...
8e84f08e3b4a4caba91b3205a0c049d76071276ef874ca05b3aa1b32a1fb045d
hopbit/sonic-pi-snippets
vol05.sps
# key: vol05 # point_line: 2 # point_index: 0 # -- set_volume! 0.5
null
https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/volume/vol05.sps
scheme
# key: vol05 # point_line: 2 # point_index: 0 # -- set_volume! 0.5
eea8e530c0d25a46a6075af593beb8cf8671556a5a2e7368a44bb229ddb6f655
BinaryAnalysisPlatform/bap
bap_c_size.ml
open Core_kernel[@@warning "-D"] open Bap.Std open Bap_c_data open Bap_c_type type real_size = [`r32 | `r64 | `r128] type 'a unqualified = (no_qualifier, 'a) spec type bits = Int.t let next_multitude_of ~n x = (x + (n-1)) land (lnot (n-1)) let padding alignment offset = let align = Size.in_bits alignment in (a...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/f26063f9b89572f3aa5098dc8960bc754a855137/lib/bap_c/bap_c_size.ml
ocaml
approximation
open Core_kernel[@@warning "-D"] open Bap.Std open Bap_c_data open Bap_c_type type real_size = [`r32 | `r64 | `r128] type 'a unqualified = (no_qualifier, 'a) spec type bits = Int.t let next_multitude_of ~n x = (x + (n-1)) land (lnot (n-1)) let padding alignment offset = let align = Size.in_bits alignment in (a...
7463068721147bd1b609e404f8193bc8137d8efb898b651a02f98d8ac12559d6
eugeneia/athens
digest.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- ;;;; digest.lisp -- common functions for hashing (in-package :crypto) ;;; defining digest (hash) functions (eval-when (:compile-toplevel :load-toplevel) (defconstant +buffer-size+ (* 128 1024)) EVAL - WHEN (deftype buffer-index () `(integer 0 (,+buffer-size+))) (d...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/ironclad-v0.40/src/digests/digest.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*- digest.lisp -- common functions for hashing defining digest (hash) functions Storing a length at the end of the hashed data is very common and can be a small bottleneck when generating lots of hashes over small quantities of data. We assume that the appropriate locations...
(in-package :crypto) (eval-when (:compile-toplevel :load-toplevel) (defconstant +buffer-size+ (* 128 1024)) EVAL - WHEN (deftype buffer-index () `(integer 0 (,+buffer-size+))) (defun update-digest-from-stream (digest stream &key buffer (start 0) end) (cond ((subtypep (stream-element-type stream) '(unsign...
7302fe3258ad544985a9bdfa3e0234825be02de90e7944396951f0a253a6a5f4
andrejbauer/plzoo
eval.ml
(** Evaluation rules, small-step operational semantics. This module is for demonstration purposes only. It is inefficient and not used by the toplevel, which compiles programs to "machine" language, see modules Machine and Compile. *) open Syntax (** [is_value e] returns true, if program [e] is a value. *) ...
null
https://raw.githubusercontent.com/andrejbauer/plzoo/ae6041c65baf1eebf65a60617819efeb8dcd3420/src/miniml_error/eval.ml
ocaml
* Evaluation rules, small-step operational semantics. This module is for demonstration purposes only. It is inefficient and not used by the toplevel, which compiles programs to "machine" language, see modules Machine and Compile. * [is_value e] returns true, if program [e] is a value. * An exception indicat...
open Syntax let is_value = function | Int _ | Bool _ | Fun _ | Abort -> true | Var _ | Times _ | Division _ | Plus _ | Minus _ | Equal _ | Less _ | If _ | Apply _ -> false exception Value exception Runtime let rec eval1 = function | Var _ -> raise Runtime | Int _ | Bool _ | Fun _ -> raise Value | Divis...
c2c0086738ed4733cca0f6637bc9eea92a569882e5b5440dccaa265b9ee5f8c5
bufferswap/ViralityEngine
meta-graphs.lisp
;; The graph forms go through this transformation: 1 ) define - graph - > metagraph storage of forms only 2 ) parsing of raw forms into AST 0 3 ) .. N ) Repeated transforming AST X to AST X+1 N+1 ) Production of concrete categorical class from last AST . ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; M...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/flux/meta-graphs.lisp
lisp
The graph forms go through this transformation: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The single database of all define-graph forms key: category type-name value: hash-table value2: metagraph-definition A raw and unprocessed define-graph form and the...
1 ) define - graph - > metagraph storage of forms only 2 ) parsing of raw forms into AST 0 3 ) .. N ) Repeated transforming AST X to AST X+1 N+1 ) Production of concrete categorical class from last AST . Meta graph management (defclass metagraph () ((%metagraphs-by-category :reader metagraphs-by-category ...
6b45a7468e3f894202b5969bb64a8aa4db8e9e012f5eb6594e34940d6e5053ac
xsc/invariant
project.clj
(defproject invariant "0.1.5-SNAPSHOT" :description "Invariants on Clojure Data Structures" :url "" :license {:name "MIT License" :url "" :year 2016 :key "mit"} :dependencies [[org.clojure/clojure "1.9.0-alpha14" :scope "provided"] [com.rpl/specter "1.0.0"]] ...
null
https://raw.githubusercontent.com/xsc/invariant/45425bcc69d0bc896efd5307a640dbdb06b61797/project.clj
clojure
(defproject invariant "0.1.5-SNAPSHOT" :description "Invariants on Clojure Data Structures" :url "" :license {:name "MIT License" :url "" :year 2016 :key "mit"} :dependencies [[org.clojure/clojure "1.9.0-alpha14" :scope "provided"] [com.rpl/specter "1.0.0"]] ...
510f07a6aa39c5dcbd5f6db1588cefd799c19a9f0b1ef0d304833ea22110f608
mariachris/Concuerror
test_after_spawns.erl
-module(test_after_spawns). -export([test_after_spawns/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. test_after_spawns() -> Parent = self(), spawn(fun() -> Parent ! one end), spawn(fun() -> Parent ! two end), spawn(fun() -> Parent ! one end), One = receive_or_fail(1), Tw...
null
https://raw.githubusercontent.com/mariachris/Concuerror/87e63f10ac615bf2eeac5b0916ef54d11a933e0b/testsuite/suites/dpor/src/test_after_spawns.erl
erlang
-module(test_after_spawns). -export([test_after_spawns/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. test_after_spawns() -> Parent = self(), spawn(fun() -> Parent ! one end), spawn(fun() -> Parent ! two end), spawn(fun() -> Parent ! one end), One = receive_or_fail(1), Tw...
78233fcc5cf3f980979f80cc6262cccf1b352669d181c10e95b6a3bced39c0da
PrecursorApp/precursor
ab.cljs
(ns frontend.ab (:require [goog.net.Cookies] [goog.testing.PseudoRandom] [goog.crypt.Md5])) (def cookie-name "ab_test_user_seed") (defn ^:export get-user-seed [] (.get (goog.net.Cookies. js/document) cookie-name)) (defn set-user-seed! [] (let [random-seed (str (Math/random))] (.set ...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/ab.cljs
clojure
(ns frontend.ab (:require [goog.net.Cookies] [goog.testing.PseudoRandom] [goog.crypt.Md5])) (def cookie-name "ab_test_user_seed") (defn ^:export get-user-seed [] (.get (goog.net.Cookies. js/document) cookie-name)) (defn set-user-seed! [] (let [random-seed (str (Math/random))] (.set ...
94a271f961448fd549a202e44b849d4065724e6c2964c7d227b94e99dd74d0c6
yetanalytics/xapipe
async_test.clj
(ns com.yetanalytics.xapipe.util.async-test (:require [clojure.test :refer :all] [com.yetanalytics.xapipe.util.async :refer :all] [clojure.core.async :as a] [com.yetanalytics.xapipe.test-support :as sup])) (use-fixtures :once (sup/instrument-fixture)) (deftest batch-filter-test ...
null
https://raw.githubusercontent.com/yetanalytics/xapipe/2c068c1768f7f2ce02f3fd0f2300c9a3203c6f7c/src/test/com/yetanalytics/xapipe/util/async_test.clj
clojure
impossible!
(ns com.yetanalytics.xapipe.util.async-test (:require [clojure.test :refer :all] [com.yetanalytics.xapipe.util.async :refer :all] [clojure.core.async :as a] [com.yetanalytics.xapipe.test-support :as sup])) (use-fixtures :once (sup/instrument-fixture)) (deftest batch-filter-test ...
a7c41e2f607fb63de15c307caa73a17be3de464fe654f32282c520e3ba1ec75e
froggey/Mezzano
virtualbox.lisp
Supervisor - side driver for VirtualBox Guest Integration (defpackage :mezzano.supervisor.virtualbox (:use :cl) (:local-nicknames (:sup :mezzano.supervisor) (:pci :mezzano.supervisor.pci) (:sys.int :mezzano.internals)) (:export #:virtualbox-graphics-update-framebuffer ...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/supervisor/virtualbox.lisp
lisp
Header. total size. return code reserved reserved bit 0 says "guest supports (and wants) absolute mouse" Screen size has changed. Resize the display and send an event to the listener thread to update the video framebuffer. Provided mouse coordinates are scaled to [0,#xFFFF], scale them back to the screen ge...
Supervisor - side driver for VirtualBox Guest Integration (defpackage :mezzano.supervisor.virtualbox (:use :cl) (:local-nicknames (:sup :mezzano.supervisor) (:pci :mezzano.supervisor.pci) (:sys.int :mezzano.internals)) (:export #:virtualbox-graphics-update-framebuffer ...
e99b369111ee4630d3ae3efe2f4dbf94c08a0fc8869e56bc9514525d5c40dad8
Liutos/Project-Euler
pro22.lisp
(ql:quickload "cl-ppcre") (defun name-score (name-word pos) (* pos (apply #'+ (map 'list #'(lambda (c) (1+ (- (char-code c) (char-code #\A)))) name-word)))) (defun pro22 () (with-open-file (stream "names.txt") (let ((name-list (sort (cl-ppcre:split "," (read-line stream)) ...
null
https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/lisp/pro22.lisp
lisp
(ql:quickload "cl-ppcre") (defun name-score (name-word pos) (* pos (apply #'+ (map 'list #'(lambda (c) (1+ (- (char-code c) (char-code #\A)))) name-word)))) (defun pro22 () (with-open-file (stream "names.txt") (let ((name-list (sort (cl-ppcre:split "," (read-line stream)) ...
0b7294080f07722706d68d527d652c51297c03044c9830c933382e49d08f550c
GillianPlatform/Gillian
parser_state.ml
let procs_with_no_paths = ref SS.empty let preds_with_no_paths = ref SS.empty let lemmas_with_no_paths = ref SS.empty let internal_file = ref false let reset () = procs_with_no_paths := SS.empty; preds_with_no_paths := SS.empty; lemmas_with_no_paths := SS.empty; internal_file := false
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/GillianCore/GIL_Parser/parser_state.ml
ocaml
let procs_with_no_paths = ref SS.empty let preds_with_no_paths = ref SS.empty let lemmas_with_no_paths = ref SS.empty let internal_file = ref false let reset () = procs_with_no_paths := SS.empty; preds_with_no_paths := SS.empty; lemmas_with_no_paths := SS.empty; internal_file := false
2d41947cf52c57a698a4cfedbdbe0695e20d4a106499e3631f1b5995512a1b59
privet-kitty/cl-competitive
complex-pack.lisp
(defpackage :cp/test/complex-pack (:use :cl :fiveam :cp/complex-pack) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/complex-pack) (in-suite base-suite) (define-complex-pack node (slot1 1) (slot2 12) (slot3 34) (slot4 56)) (define-complex-pack nnode (slot1 1) (slot2 12) (slot3 49) (slot4 62)) (te...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/complex-pack.lisp
lisp
(defpackage :cp/test/complex-pack (:use :cl :fiveam :cp/complex-pack) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/complex-pack) (in-suite base-suite) (define-complex-pack node (slot1 1) (slot2 12) (slot3 34) (slot4 56)) (define-complex-pack nnode (slot1 1) (slot2 12) (slot3 49) (slot4 62)) (te...
1729e4bfeef3fd9222b12cb4decd3b006a5a9c422e7283565f19e7cd4658b0af
ljosa/cl-png
wrappers.lisp
(in-package #:png) (flag "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include") (flag "-I/opt/local/include") (include "png.h") (defwrapper* "get_png_libpng_ver_string" :string () "return PNG_LIBPNG_VER_STRING;")
null
https://raw.githubusercontent.com/ljosa/cl-png/11b965fe378fd0561abe3616b18ff03af5179648/wrappers.lisp
lisp
(in-package #:png) (flag "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include") (flag "-I/opt/local/include") (include "png.h") (defwrapper* "get_png_libpng_ver_string" :string () "return PNG_LIBPNG_VER_STRING;")
b449e74433f1c3180f3528f59ad83270ad538241a1e73ad02fddcc244cf2f358
hbr/albatross
test_builder.ml
open Fmlib open Alba_core open Build_expression module Pretty_printer = Pretty_printer.Pretty (String_printer) module Term_print = Context.Pretty (Pretty_printer) module Expression = Ast.Expression module Expression_parser = Parser_lang.Make (Expression) module Error_print = Build_problem.Print (Pretty_printer) ...
null
https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/albalib/test_builder.ml
ocaml
Ambiguous Expressions Propositions
open Fmlib open Alba_core open Build_expression module Pretty_printer = Pretty_printer.Pretty (String_printer) module Term_print = Context.Pretty (Pretty_printer) module Expression = Ast.Expression module Expression_parser = Parser_lang.Make (Expression) module Error_print = Build_problem.Print (Pretty_printer) ...
3acf3a5e84affc7311ed7da28526e94263e192973d93e5540520886ed477ec63
darkleaf/publicator
post_queries_test.clj
(ns publicator.persistence.post-queries-test (:require [clojure.test :as t] [publicator.utils.test.instrument :as instrument] [publicator.use-cases.test.factories :as factories] [publicator.domain.test.fakes.password-hasher :as fakes.password-hasher] [publicator.domain.test.fakes.id-generator :as fakes...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/persistence/test/publicator/persistence/post_queries_test.clj
clojure
(ns publicator.persistence.post-queries-test (:require [clojure.test :as t] [publicator.utils.test.instrument :as instrument] [publicator.use-cases.test.factories :as factories] [publicator.domain.test.fakes.password-hasher :as fakes.password-hasher] [publicator.domain.test.fakes.id-generator :as fakes...
1d933b554515d376725d8ada4bf62bd14137a523e3be20dfae8ca3cbf5e825fd
mgritter/aoc-lh
Main.hs
module Main (main) where import Prelude hiding (abs) import LoadLines import Data.List.Split import qualified Data.Set as Set import Data.Maybe @ data Voxel = Point { xCoord : : Int , yCoord : : Int , zCoord : : Int } @ data Voxel = Point { xCoord :: Int, yCoord :: Int, zCoord :: Int } @-} dat...
null
https://raw.githubusercontent.com/mgritter/aoc-lh/bc68992834ab357e7e822fe4291bf95a59e8cf65/2022/day18/Main.hs
haskell
@ inline abs @ using (Point x1 y1 z1) (Point x2 y2 z2) resulted in an invalid specification @ inline inBounds @ findConnectedComponent generator connected neighborhood starting point returns the connected component @ lazy dfs @ FIXME: how can we check inBounds b v2??? Answer: filter isn't smart en...
module Main (main) where import Prelude hiding (abs) import LoadLines import Data.List.Split import qualified Data.Set as Set import Data.Maybe @ data Voxel = Point { xCoord : : Int , yCoord : : Int , zCoord : : Int } @ data Voxel = Point { xCoord :: Int, yCoord :: Int, zCoord :: Int } @-} dat...
526f32755cf5d3687ba7723b0e22c552f72680939804c578b30b35a1575828c9
aryx/yacfe
oarray.ml
open Common open Osequence growing array ? initialise with None , * and generate exception when not defined or have an arraydefault * update : can use ? * and generate exception when not defined or have an arraydefault * update: can use dynArray ? *) (* !!take care!!, this is not a pure data structure...
null
https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/commons_ocollection/oarray.ml
ocaml
!!take care!!, this is not a pure data structure method create: int -> 'a -> 'o = raise Todo method put: make more explicit the fact that array do side effect
open Common open Osequence growing array ? initialise with None , * and generate exception when not defined or have an arraydefault * update : can use ? * and generate exception when not defined or have an arraydefault * update: can use dynArray ? *) class ['a] oarray n el = object(o: 'o) inherit ['...
04fb35a8a3c6e3ec8a6606b7a1c1c324e86344ebe897afda4d3892fb1fde4072
clojure/clojurescript
alpha.cljs
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/cljs/cljs/spec/gen/alpha.cljs
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns cljs.spec.gen.alpha (:refer-clojure :exclude [boolean cat hash-map list map not-empty set vector char double int keyword symbol string uuid delay shuffle]) (:require-macros [cljs.core :as c] [cljs.spec.gen.alpha :as ge...
17edf9f34c983b5f86566848e2cecf3f3d2a9cd077a0617a6e91ce917a8466e3
huangjs/cl
code-kb.lisp
(in-package :cs325-user) (unuse-package :frames) (unuse-package :mops) (defvar *code-kb*) (setq *code-kb* '( (programming-language) (lisp-language (programming-language) (name "Lisp") (run-time-types "yes")) (common-lisp (lisp-language) (name "Common Lisp") ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/code-kb.lisp
lisp
(get-filler name role) => filler (add-concept concept) => concept (remove-concept name) => concept
(in-package :cs325-user) (unuse-package :frames) (unuse-package :mops) (defvar *code-kb*) (setq *code-kb* '( (programming-language) (lisp-language (programming-language) (name "Lisp") (run-time-types "yes")) (common-lisp (lisp-language) (name "Common Lisp") ...
4fde6817cdb46361851c8c4f76f04c54101e943e0a020e06b93b4bc1007c040f
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Distance.IT.Corpus ( corpus ) where import Data.Str...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Distance/IT/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Distance.IT.Corpus ( corpus ) where import Data.String import Prelude import Duckling.Distance.Types import Duckling.Locale import Duckling.Resolve import Duckling.Testing.Types context :: Context context = testContext {locale = makeLocale IT ...
a5ee49196dcd5946fa995d71a18930469044ffc5f268840987a902763e5d7a41
EarnestResearch/yambda
Main.hs
module Main where import AWS.Lambda.Event.Kinesis import AWS.Lambda.Handler import Control.Monad.Logger main :: IO () main = runStderrLoggingT $ handler echo echo :: Applicative m => KinesisDataStreamsEvent -> m KinesisDataStreamsEvent echo = pure
null
https://raw.githubusercontent.com/EarnestResearch/yambda/b1f45e42447c08d7da4b3f470bdb849c9ea1b200/examples/kinesis/Main.hs
haskell
module Main where import AWS.Lambda.Event.Kinesis import AWS.Lambda.Handler import Control.Monad.Logger main :: IO () main = runStderrLoggingT $ handler echo echo :: Applicative m => KinesisDataStreamsEvent -> m KinesisDataStreamsEvent echo = pure
c1c2a04e5b34ebbc08d47316707a86aa8a7b17407b70df498692ad651e8b9c86
racket/games
parcheesi.rkt
(module parcheesi racket (require racket/unit racket/class "admin-gui.rkt") (provide game@) (define game@ (unit (import) (export) (new gui-game%))))
null
https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/parcheesi/parcheesi.rkt
racket
(module parcheesi racket (require racket/unit racket/class "admin-gui.rkt") (provide game@) (define game@ (unit (import) (export) (new gui-game%))))
5e103be6e0afeaeae8973af5e20cdbf4ce779a15b7b0f1032236f60e794599ef
mbj/stratosphere
Domain.hs
module Stratosphere.VoiceID.Domain ( module Exports, Domain(..), mkDomain ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.VoiceID.Domain.ServerSideEncryptionConfigurationProperty as Exports import St...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/voiceid/gen/Stratosphere/VoiceID/Domain.hs
haskell
# SOURCE #
module Stratosphere.VoiceID.Domain ( module Exports, Domain(..), mkDomain ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data Domain = Domain ...
0dc1252eecf8386a5c56503b174f76c1abf4777d4eb90de7e633edbb61237b4e
KeliLanguage/compiler
Module.hs
module Module where import qualified Ast.Verified as V import Env type ModuleName = String data Module = Module { moduleName :: ModuleName, moduleFilepath :: String, moduleImported :: [Module], moduleEnv :: Env, moduleDecls :: [V.Decl] } deriving (Show) ...
null
https://raw.githubusercontent.com/KeliLanguage/compiler/5cc5f2314fa0e0863a49c504cdb115d799f382f6/src/Module.hs
haskell
module Module where import qualified Ast.Verified as V import Env type ModuleName = String data Module = Module { moduleName :: ModuleName, moduleFilepath :: String, moduleImported :: [Module], moduleEnv :: Env, moduleDecls :: [V.Decl] } deriving (Show) ...
99bc25749d4eeef28ff76bc27e9e9dcf5857e7bf9ed8b99c287fde310e189931
fukamachi/cl-line-bot-sdk
echo.lisp
(let ((asdf:*central-registry* (cons (make-pathname :directory (butlast (pathname-directory (or *load-pathname* *compile-file-pathname*)))) asdf:*central-registry*))) (ql:quickload '(:clack :lack-request :linebot) :silent t)) (defparameter lineb...
null
https://raw.githubusercontent.com/fukamachi/cl-line-bot-sdk/2f8660035eb7babe5bfe637f6de4be2500e1268f/examples/echo.lisp
lisp
(let ((asdf:*central-registry* (cons (make-pathname :directory (butlast (pathname-directory (or *load-pathname* *compile-file-pathname*)))) asdf:*central-registry*))) (ql:quickload '(:clack :lack-request :linebot) :silent t)) (defparameter lineb...
a06e130845c2db536195ca4e9f7139057ab70ab270f8a354ac170db8cdc696ff
PseudoPower/AFSM
Clock.hs
----------------------------------------------------------------------------- Copyright : ( c ) , 2016 , License : MIT License -- -- Maintainer : -- Stability : experimental -- Portability : portable ----------------------------------------------------------------------------- {-# LANGUAGE ...
null
https://raw.githubusercontent.com/PseudoPower/AFSM/9d6ace9d279992a18f44856058040a0ef391abd6/examples/SM/Clock.hs
haskell
--------------------------------------------------------------------------- Maintainer : Stability : experimental Portability : portable --------------------------------------------------------------------------- # LANGUAGE Arrows #
Copyright : ( c ) , 2016 , License : MIT License module Main where import Control.Arrow import Control.AFSM import Control.AFSM.Draft.SMMonoid import Control.AFSM.Draft.SMP secondSF :: Int -> SMP Int (Int, Bool) secondSF init = toSMP "secondSF" $ simpleSM (\s x -> let s' = mod (s+x) 60000; y =...
61c0ba102a340a6efdb044831e62f66371f2370dfa1cbfc00d57cbbac9bd83e1
amnh/poy5
xMLGB.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2011 , , , Ward Wheeler and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/parser/xMLGB.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2011 , , , Ward Wheeler and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
2a4a86830d3f0bee86e5d029df0aaa10068bd093b59737b34876d56ac0d96a38
ghc/testsuite
WarnMinimalFail2.hs
module WarnMinimalFail2 where global :: Int global = 0 class Foo a where local :: a {-# MINIMAL global #-}
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/warnings/minimal/WarnMinimalFail2.hs
haskell
# MINIMAL global #
module WarnMinimalFail2 where global :: Int global = 0 class Foo a where local :: a
99e580c498fa6aae19cc5a181cfcf69395058a477ba8f6689a27d2e1f5aa0559
vereis/jarlang
gen_event.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2017 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/src/erl/lib/stdlib/gen_event.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2017 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(gen_event). Modified by . Re - written by with new functional interface ! Modified by Martin - uses...
2611da5ec38850e9fb64cd781a9b748db9aded83be78b1b87340cd7f05dc1189
astrada/ocaml-extjs
ext_dd_StatusProxy.mli
* A specialized floating Component that supports a d ... { % < p > A specialized floating Component that supports a drop status icon , < a href="#!/api / Ext.dom . Layer " rel="Ext.dom . Layer " class="docClass">Ext . > styles and auto - repair . This is the default drag proxy used by all Ext.dd components....
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_dd_StatusProxy.mli
ocaml
* {% <p>Force the Layer to sync its shadow and shim positions to the element</p> %} * [of_configs c] casts a config object [c] to an instance of class [t] * [to_configs o] casts instance [o] of class [t] to a config object
* A specialized floating Component that supports a d ... { % < p > A specialized floating Component that supports a drop status icon , < a href="#!/api / Ext.dom . Layer " rel="Ext.dom . Layer " class="docClass">Ext . > styles and auto - repair . This is the default drag proxy used by all Ext.dd components....
7cd6c588bb05c0d81654521372f5c43d320a8c0ca195428d37f56f4c76cd7da8
egonSchiele/salty
JsSpec.hs
# LANGUAGE QuasiQuotes # module JsSpec where import Text.RawString.QQ import Test.HUnit import Parser import Types import ToJs -- so it prints multi-line strings on multiple lines for gods sake -- assertEqual_ expected actual = assertBool (expected == actual) failureMsg -- where failureMsg = "expected:\n" ++ expec...
null
https://raw.githubusercontent.com/egonSchiele/salty/c7f0a6d8726888e60f67477423a12764b6009b76/test/JsSpec.hs
haskell
so it prints multi-line strings on multiple lines for gods sake assertEqual_ expected actual = assertBool (expected == actual) failureMsg where failureMsg = "expected:\n" ++ expected ++"\nbut got actual:\n" ++ actual ++ "\n" operations function definitions no visibility (public/private) for functions in global ...
# LANGUAGE QuasiQuotes # module JsSpec where import Text.RawString.QQ import Test.HUnit import Parser import Types import ToJs matches str1 str2 = TestCase $ assertEqual "" str2 (saltyToJs 0 str1) saltyBlob = [r| isSafe str lists := lists.any(l -> l.isBlocked(str)) isBlocked str := do return @list.any(ter...
607ecf1137cda44143d914633aa990942c8ff8b1633b56522061e3876d94a582
MaskRay/OJHaskell
day-1-a-chessboard-game.hs
import Control.Monad import Data.Functor import qualified Data.Vector as V import qualified Data.Vector.Mutable as MV n = 23 nim = do a <- MV.new $ n*n let f x y | x < 0 || y < 0 = return False | otherwise = not <$> MV.unsafeRead a (n*x+y) forM_ [0..n-1+n-1] $ \i -> forM_ [0..n-1] $ \j -> ...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/HackerRank/contests/5-days-of-game-theory/day-1-a-chessboard-game.hs
haskell
import Control.Monad import Data.Functor import qualified Data.Vector as V import qualified Data.Vector.Mutable as MV n = 23 nim = do a <- MV.new $ n*n let f x y | x < 0 || y < 0 = return False | otherwise = not <$> MV.unsafeRead a (n*x+y) forM_ [0..n-1+n-1] $ \i -> forM_ [0..n-1] $ \j -> ...
a2c1d809ae427f0bde1647ef222590d920301673efdb88bf7d77e96f4285ec2d
wies/grasshopper
symbolTbl.ml
open Util type t = (Grass.ident Grass.IdMap.t) list let empty = [Grass.IdMap.empty] let push tbl = Grass.IdMap.empty :: tbl let pop tbl = List.tl tbl let add tbl name id = Grass.IdMap.add name id (List.hd tbl) :: List.tl tbl let remove tbl name = Grass.IdMap.remove name (List.hd tbl) :: List.tl tbl ...
null
https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/util/symbolTbl.ml
ocaml
open Util type t = (Grass.ident Grass.IdMap.t) list let empty = [Grass.IdMap.empty] let push tbl = Grass.IdMap.empty :: tbl let pop tbl = List.tl tbl let add tbl name id = Grass.IdMap.add name id (List.hd tbl) :: List.tl tbl let remove tbl name = Grass.IdMap.remove name (List.hd tbl) :: List.tl tbl ...
49fb7c4337f7154fe7085b8478fecd2333c886bb83c05d822346ce678b32df6d
vascokk/NumEr
numer_helpers.erl
-module(numer_helpers). -include("include/numer.hrl"). BLAS helpers -export([sum_by_cols/1, gemv/6, saxpy/3, gemm/7, smm/2, m2v/1, v2m/2, transpose/1]). %% Kernels helpers -export([sigmoid/1, tanh/1, log/1]). -export([zeros/1, zeros/2, ones/1, ones/...
null
https://raw.githubusercontent.com/vascokk/NumEr/0d22c31633ef2ab43dde50809a9dbbb6a736f5b7/src/numer_helpers.erl
erlang
Kernels helpers rows A columns A rows A columns A num cols transpose_op(A) num cols transpose_op(A) and rows transpose_op(B) rows A columns A
-module(numer_helpers). -include("include/numer.hrl"). BLAS helpers -export([sum_by_cols/1, gemv/6, saxpy/3, gemm/7, smm/2, m2v/1, v2m/2, transpose/1]). -export([sigmoid/1, tanh/1, log/1]). -export([zeros/1, zeros/2, ones/1, ones/2]). -type transpo...
3b8ed32fda3d98bd26dbe6c6c592a2fe4ab618f2696799d5bcb48cae43831123
yzh44yzh/erma
where_tests.erl
-module(where_tests). -include("erma.hrl"). -include_lib("eunit/include/eunit.hrl"). where_test_() -> test_utils:generate( [{ %% {select, [], "post", [{where, [{'or', [{"title", like, "%funny%"}, {"subject", like, "%funny%"}, ...
null
https://raw.githubusercontent.com/yzh44yzh/erma/454f127fcf6df0407de2f357f40a1d57f016d694/test/where_tests.erl
erlang
tests for custom operators, see PostgreSQL manual for more examples: -array.html
-module(where_tests). -include("erma.hrl"). -include_lib("eunit/include/eunit.hrl"). where_test_() -> test_utils:generate( [{ {select, [], "post", [{where, [{'or', [{"title", like, "%funny%"}, {"subject", like, "%funny%"}, {"content"...
9bf23746f0eed31ed40cf4e9bb1ceb212d8bf00f152c9cf407efe7a3d495e2f6
opencog/pln
ppc-kb.scm
;; Knowledge-base about preproof and anything else we need to post - process the trace atomspace before handing it to the process in charge of producing inference control rules . stands for ;; post-process corpus. ;; ;; Actually these are moved in there own files, namely, and-bit-prior.scm , proof-is-preproof.sc...
null
https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/examples/pln/inference-control-meta-learning/ppc-kb.scm
scheme
Knowledge-base about preproof and anything else we need to post-process corpus. Actually these are moved in there own files, namely, preproof-expander-is-preproof to be processed individually as to speed up ppc inferences.
post - process the trace atomspace before handing it to the process in charge of producing inference control rules . stands for and-bit-prior.scm , proof-is-preproof.scm and
a98c74ea7bc972dd9738a03956c564f7dea7e5bb9fb591e25959d61ab4efacd0
ocaml-bench/orun
reports.ml
open Printf open Common let css = {| .outer-container { max-width: 1700px; margin: 0 auto } .gray-row { background-color: rgb(250, 250, 250) } .hotspot-row { padding: 15px; } .source_code { font-family: Menlo, Monaco, Consolas, "Courier New"; font-size: 14pt; } |} let common_header n...
null
https://raw.githubusercontent.com/ocaml-bench/orun/6b0d0a748d46b0228b7cda440e2a8027b050a2b1/bin/reports.ml
ocaml
let common_footer = "</div></div></body></html>"
open Printf open Common let css = {| .outer-container { max-width: 1700px; margin: 0 auto } .gray-row { background-color: rgb(250, 250, 250) } .hotspot-row { padding: 15px; } .source_code { font-family: Menlo, Monaco, Consolas, "Courier New"; font-size: 14pt; } |} let common_header n...
ec72fe4e4da31ef7622f4a887608d984a07a5668d9e0070eb40df8d88f4aea3c
janestreet/jsonaf
expert.ml
module List = ListLabels type 'number t = [ `Null | `False | `True | `String of string | `Number of 'number | `Object of (string * 'number t) list | `Array of 'number t list ] module Parser = struct open Angstrom let ws = skip_while (function | '\x20' | '\x0a' | '\x0d' | '\x09' -> true ...
null
https://raw.githubusercontent.com/janestreet/jsonaf/45c4ebabd03dc099e6de76714d86c53e0879558c/kernel/src/expert.ml
ocaml
strictly speaking, we should only allow '-' or '0' .. '9' to start numbers. need to eta-expand to avoid the value restriction
module List = ListLabels type 'number t = [ `Null | `False | `True | `String of string | `Number of 'number | `Object of (string * 'number t) list | `Array of 'number t list ] module Parser = struct open Angstrom let ws = skip_while (function | '\x20' | '\x0a' | '\x0d' | '\x09' -> true ...
45ba23860e0745d0af4a5e93b6b592b3f3ff8e03e27798a4e78f2bb036a7cb3a
arlicle/ablog
common.cljc
(ns markdown.common (:require [clojure.string :as string])) (declare ^{:dynamic true} *substring*) (def ^:dynamic *inhibit-separator* nil) (def escape-delimiter (str (char 254) (char 491))) (defn gen-token [n] (str escape-delimiter n escape-delimiter)) (defn freeze-string "Freezes an output string. Converts...
null
https://raw.githubusercontent.com/arlicle/ablog/36a9bf8c6319097353d9a1808f05b6d686a079d6/markdown/cljc/markdown/common.cljc
clojure
screws up ClojureScript compiling "))) allow char seq or string Skip the buf->string->buf conversions in the common case. kept around just in case third party code depends on this. We do not need to process the id string, HTML5 ids can contain anything except the space character. (#the-id-attribute) ")) "\"")) ...
(ns markdown.common (:require [clojure.string :as string])) (declare ^{:dynamic true} *substring*) (def ^:dynamic *inhibit-separator* nil) (def escape-delimiter (str (char 254) (char 491))) (defn gen-token [n] (str escape-delimiter n escape-delimiter)) (defn freeze-string "Freezes an output string. Converts...
3b8d7a5e6346850090a1655a31db8c8822deb5e018b2821998091909c7e131ee
nunchaku-inria/nunchaku
Paradox.ml
(* This file is free software, part of nunchaku. See file "license" for more details. *) open Nunchaku_core module T = FO_tptp module Res = Problem.Res module E = CCResult module S = Scheduling module Pa = Nunchaku_parsers module A = Pa.TPTP_model_ast type term = FO_tptp.term type ty = FO_tptp.ty type problem = FO_...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/backends/Paradox.ml
ocaml
This file is free software, part of nunchaku. See file "license" for more details. parse a model from paradox' output [s] skip full line [s']: part of [s] between the model markers [s] is the output of paradox, parse a result from it use a temporary file for calling paradox print the problem call paradox...
open Nunchaku_core module T = FO_tptp module Res = Problem.Res module E = CCResult module S = Scheduling module Pa = Nunchaku_parsers module A = Pa.TPTP_model_ast type term = FO_tptp.term type ty = FO_tptp.ty type problem = FO_tptp.problem type model = (T.term, T.ty) Model.t let name = "paradox" let section = Util...
c426a85ecb2ea5063d26c5feb1ea9b9b709f8c25ce6ff298059b2dfca789fb14
nomeata/arbtt
LockFile.hs
# LANGUAGE CPP # module LockFile where import System.Directory import System.Exit import System.IO import System.IO.Error #ifdef WIN32 import System.Win32.Mutex import Control.Monad (unless) #else import System.Posix.IO #endif -- | This is very raw, someone ought to improve this lockFile filename' = do filename ...
null
https://raw.githubusercontent.com/nomeata/arbtt/fe8d7e407a8b1e3cac87e4a082977cf4ce753d7c/src/LockFile.hs
haskell
| This is very raw, someone ought to improve this
# LANGUAGE CPP # module LockFile where import System.Directory import System.Exit import System.IO import System.IO.Error #ifdef WIN32 import System.Win32.Mutex import Control.Monad (unless) #else import System.Posix.IO #endif lockFile filename' = do filename <- canonicalizePath filename' #ifdef WIN32 succes...
9362d42e0682175b57bdd3a9cb1bc2ee19dd4af55b000f2bfca271d311151e0d
lettier/webviewhs
how-do-i-communicate-with-haskell-from-javascript.hs
webviewhs ( C ) 2018 lettier.com webviewhs (C) 2018 David Lettier lettier.com -} # LANGUAGE OverloadedStrings , DeriveGeneric , QuasiQuotes # OverloadedStrings , DeriveGeneric , QuasiQuotes #-} import GHC.Generics import Data.Text import Data.Text.Encoding import Data.Byt...
null
https://raw.githubusercontent.com/lettier/webviewhs/21ddd4b4872b2e7eb50c9735e70cfbdedf2c6c1a/examples-light/how-do-i-communicate-with-haskell-from-javascript.hs
haskell
This function runs before the loop. This function runs after the loop. This function runs every window loop. Return True to continue the loop or False to exit the loop. runJavaScript' returns either True on success or False on failure.
webviewhs ( C ) 2018 lettier.com webviewhs (C) 2018 David Lettier lettier.com -} # LANGUAGE OverloadedStrings , DeriveGeneric , QuasiQuotes # OverloadedStrings , DeriveGeneric , QuasiQuotes #-} import GHC.Generics import Data.Text import Data.Text.Encoding import Data.Byt...
edabe9cb34618bc1c5c33b95ae428be937e2efa1b7c73e085776048d8e51d120
haskell-works/hw-json
CursorSpec.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} # OPTIONS_GHC -fno - warn - missing - signatures # module HaskellWorks.Da...
null
https://raw.githubusercontent.com/haskell-works/hw-json/371d20c836dba90271d62d736f2b51b9cf418ea6/test/HaskellWorks/Data/Json/Standard/CursorSpec.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # # OPTIONS_GHC -fno - warn - missing - signatures # module HaskellWorks.Data.Json.Standard.CursorSpec(spec) where import HaskellWorks.Data.Json.Standard.GenCur...
ef518b2d3a25679e677ff7210b0e3990cc352d95c6968f3f53148e3786a4c60f
erlang/corba
cosTime.erl
%%-------------------------------------------------------------------- %% %% %CopyrightBegin% %% Copyright Ericsson AB 2000 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain ...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/cosTime/src/cosTime.erl
erlang
-------------------------------------------------------------------- %CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY...
Copyright Ericsson AB 2000 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(cosTime). -include("cosTimeApp.hrl"). --------------- EXPORTS------------------------------------- cosT...
c8e15aedaa9dfe9f76dfeed2e2f089c2c5dd9f627fb6774b3990f8123da90337
Factual/sosueme
druid.clj
(ns sosueme.druid (require [sosueme.hawaii :as hi] [sosueme.net :as net]) (use [clj-time.core :only [default-time-zone]] [clj-time.format :only [formatter unparse]] [clj-time.local :only [local-now]])) (def TIME-FORMAT (formatter "yyMMdd-HHmmss" (default-time-zone))) (def MILL-FORMAT (form...
null
https://raw.githubusercontent.com/Factual/sosueme/1c2e9b7eb4df8ae67012dc2a398b4ec63c9bd6cd/src/sosueme/druid.clj
clojure
TODO: research the worst case of no good local hostname
(ns sosueme.druid (require [sosueme.hawaii :as hi] [sosueme.net :as net]) (use [clj-time.core :only [default-time-zone]] [clj-time.format :only [formatter unparse]] [clj-time.local :only [local-now]])) (def TIME-FORMAT (formatter "yyMMdd-HHmmss" (default-time-zone))) (def MILL-FORMAT (form...
5c5b421203e37e4cbd773fd3c2ed656989f3afe14179495217435f5e56bfc73b
thheller/shadow-cljs
devtools_test.clj
(ns shadow.cljs.devtools_test (:require [clojure.java.io :as io] [clojure.java.shell :refer (sh)] [clojure.data.json :as json] [clojure.pprint :refer (pprint)] [clojure.test :refer :all] [clojure.walk :as walk] [clojure.repl :as repl] [cljs.externs :as externs] [cljs.analyzer :as a...
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/repl/shadow/cljs/devtools_test.clj
clojure
this should be useful for some devtools removal in production (set! (.-stripNameSuffixes co) #{"logger" "logger_"}) :infer-externs true :externs-sources [(SourceFile/fromFile (io/file "src/test/test.externs.js"))] (api/flush-unoptimized) ;; doesn't work (api/flush-modules-to-disk) :externs ["test.externs.js"] :...
(ns shadow.cljs.devtools_test (:require [clojure.java.io :as io] [clojure.java.shell :refer (sh)] [clojure.data.json :as json] [clojure.pprint :refer (pprint)] [clojure.test :refer :all] [clojure.walk :as walk] [clojure.repl :as repl] [cljs.externs :as externs] [cljs.analyzer :as a...
bdb6d64fe10d62883a56d1b2a1a283eb2f7bbfa8f58f6b31feea0878d64e9328
AshleyYakeley/Truth
Property.hs
module Pinafore.Language.Value.Property where import Changes.Core import Data.Shim import Pinafore.Base import Pinafore.Language.Value.Attribute import Pinafore.Language.Value.FiniteSetModel import Pinafore.Language.Value.WholeModel import Shapes newtype LangProperty (a :: (Type, Type)) (b :: (Type, Type)) = MkLa...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/f567d19253bb471cbd8c39095fb414229b27706a/Pinafore/pinafore-language/lib/Pinafore/Language/Value/Property.hs
haskell
module Pinafore.Language.Value.Property where import Changes.Core import Data.Shim import Pinafore.Base import Pinafore.Language.Value.Attribute import Pinafore.Language.Value.FiniteSetModel import Pinafore.Language.Value.WholeModel import Shapes newtype LangProperty (a :: (Type, Type)) (b :: (Type, Type)) = MkLa...
251d047356752fbbf6d210245af574f487dd26ff3d72ae68e118d655fda062ea
nominolo/lambdachine
Bc0006.hs
# LANGUAGE NoImplicitPrelude , MagicHash , BangPatterns # -- RUN: %bc_vm_chk CHECK : @Result@ IND - > GHC.Types . I#`con_info 0x000000000000002a -- Currently fails with No instance for ( GHC.Num . ) -- arising from the literal `42' Possible fix : add an instance declaration for ( GHC.Num . ) In the expre...
null
https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Bc/Bc0006.hs
haskell
RUN: %bc_vm_chk Currently fails with arising from the literal `42' XFAIL: *
# LANGUAGE NoImplicitPrelude , MagicHash , BangPatterns # CHECK : @Result@ IND - > GHC.Types . I#`con_info 0x000000000000002a No instance for ( GHC.Num . ) Possible fix : add an instance declaration for ( GHC.Num . ) In the expression : 42 In an equation for ` test ' : test = 42 module Bc.Bc0006 where i...
47396153747ff33eefa668a508503324d472854323832cb85236c71a7b15220b
zadean/xqerl
xqldb_mem_nodes.erl
Copyright ( c ) 2018 - 2020 . SPDX - FileCopyrightText : 2022 % SPDX - License - Identifier : Apache-2.0 %% ==================================================================== %% This module is for building in-memory XML nodes from the DB, XQuery or file. %% ===========================================...
null
https://raw.githubusercontent.com/zadean/xqerl/06c651ec832d0ac2b77bef92c1b4ab14d8da8883/src/xqldb_mem_nodes.erl
erlang
==================================================================== This module is for building in-memory XML nodes from the DB, XQuery or file. ==================================================================== ==================================================================== API functions ===============...
Copyright ( c ) 2018 - 2020 . SPDX - FileCopyrightText : 2022 SPDX - License - Identifier : Apache-2.0 -module(xqldb_mem_nodes). -compile({no_auto_import, [element/2]}). -include("xqerl_db.hrl"). -export([ innermost/1, outermost/1 ]). -export([ parse_file/1, parse_list/2, parse...
1cd6aac377041670b4f7c03c15cf1f2519a0f5a45862f722a5b44ed96f839bb8
facebook/infer
ClosureSpecialization.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/be0473c7a54fa0f577b84243be5c58afe33a5fdd/infer/src/absint/ClosureSpecialization.mli
ocaml
same representation for both args and captured variables
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
2996ba2ae40a5372e8300958c5eaa30ba01e93745a44b01417fc42804d733dac
gojek/ziggurat
dead_set.clj
(ns ziggurat.messaging.dead-set (:require [ziggurat.messaging.consumer :as consumer] [ziggurat.messaging.producer :as producer] [clojure.tools.logging :as log])) (defn replay "Gets the message from the queue and puts them to instant queue" [count-of-message topic-entity channel] (log/de...
null
https://raw.githubusercontent.com/gojek/ziggurat/03558181d76d6dd2dc0591be3940970dfb6b04f8/src/ziggurat/messaging/dead_set.clj
clojure
(ns ziggurat.messaging.dead-set (:require [ziggurat.messaging.consumer :as consumer] [ziggurat.messaging.producer :as producer] [clojure.tools.logging :as log])) (defn replay "Gets the message from the queue and puts them to instant queue" [count-of-message topic-entity channel] (log/de...
1297115c19b059694e9f487cbedd6120aba17c1dcfbe0c83b9613fc6293c3abb
haskell-works/hw-koans
Applicative.hs
# LANGUAGE TemplateHaskell # module Check.Applicative where import Hedgehog import Hedgehog.Extra import qualified Hedgehog.Gen as G import qualified Hedgehog.Range as R import qualified Koan.Applicative as K instance K.Applicative Maybe where pure = Just Nothing <*> _ = Nothing _ <*> Nothing = Nothing ...
null
https://raw.githubusercontent.com/haskell-works/hw-koans/a807e72513d91ddf1c8aa445371b94bb169f22fd/test/Check/Applicative.hs
haskell
# LANGUAGE TemplateHaskell # module Check.Applicative where import Hedgehog import Hedgehog.Extra import qualified Hedgehog.Gen as G import qualified Hedgehog.Range as R import qualified Koan.Applicative as K instance K.Applicative Maybe where pure = Just Nothing <*> _ = Nothing _ <*> Nothing = Nothing ...
907a685eb90040df974e2b55e44db9f5db284e65988a1ce8107b02b09d8e1d2e
facebook/duckling
MN_XX.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory . -------------...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/MN_XX.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant --------------------------------------------------------------- Auto-generated by regenClassifiers DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W...
Copyright ( c ) 2016 - present , Facebook , Inc. of patent rights can be found in the PATENTS file in the same directory . @generated module Duckling.Ranking.Classifiers.MN_XX (classifiers) where import Data.String import Prelude import qualified Data.HashMap.Strict as HashMap import Duckling.Ranking.Types cla...
3844bf55a62cf603649770015bf0d22e781d6d80be192c300f4c24b2868a770b
0zat/gen-bs
internal_code.ml
let internal_use_code = " type _baseClass " let variadic_callback_code = " (* variadic callback code *) type ('a, 'b) variadic_arity8 = 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 * 'b constraint 'a = 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 type ('a, 'b) variadic_arity7 = 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * ...
null
https://raw.githubusercontent.com/0zat/gen-bs/20348991775d9ef3974c3b824968a0ab219502a8/src/intermediate/js_to_bs/predefined_code/internal_code.ml
ocaml
variadic callback code
let internal_use_code = " type _baseClass " let variadic_callback_code = " type ('a, 'b) variadic_arity8 = 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 * 'b constraint 'a = 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 type ('a, 'b) variadic_arity7 = 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'b * 'b constraint 'a...
732a4e8c2571af1a0174a26518d83902edaaa53c92d56ca4a2f6c899b31371d3
stuart-robinson/clojure-serverless-demo
events.cljs
(ns clojure-serverless-demo.events (:require [re-frame.core :as re-frame] [clojure-serverless-demo.db :as db] [clojure-serverless-demo.config :as config] [ajax.core :refer [GET POST]])) (re-frame/reg-event-db ::initialize-db (fn [_ _] db/default-db)) (re-frame/reg-event-db ...
null
https://raw.githubusercontent.com/stuart-robinson/clojure-serverless-demo/d8d046bd79ccfe3dcea8823e8eddc3cb78a9f732/src/cljs/clojure_serverless_demo/events.cljs
clojure
(ns clojure-serverless-demo.events (:require [re-frame.core :as re-frame] [clojure-serverless-demo.db :as db] [clojure-serverless-demo.config :as config] [ajax.core :refer [GET POST]])) (re-frame/reg-event-db ::initialize-db (fn [_ _] db/default-db)) (re-frame/reg-event-db ...
0e441e8df3710b2c79d4184e98a0fbb4a9a65d8d57a8dd6c8fc7abdfb530a002
oreillymedia/etudes-for-erlang
weather.erl
-module(weather). -behaviour(gen_server). -include_lib("xmerl/include/xmerl.hrl"). -export([start_link/0]). % convenience call for startup -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). % gen_server callbacks -export([connect/1, ...
null
https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch11-03/weather.erl
erlang
convenience call for startup gen_server callbacks wrapper functions macro that just defines this module as server Wrapper to hide internal details when getting a weather report Wrapper to hide internal details when getting a list of recently used stations. convenience method for startup gen_server callbacks w...
-module(weather). -behaviour(gen_server). -include_lib("xmerl/include/xmerl.hrl"). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, -export([connect/1, report/1, @doc Connect to a named server connect(ServerName) -> Result = net_adm:ping(Serve...
3337622c85083d1163d0eb04c42c7091e14c96f06691ceff7bda158ca5180ba1
robert-strandh/Cluster
test.lisp
(in-package :cluster-test) ;;; Test instructions with an opcode of #x83 and where the first operand is a 32 - bit GPR between 1 and 7 . (defun run-test-83-reg-1 (mnemonic extension reg imm) (let ((x (make-instance 'cluster:code-command :mnemonic mnemonic :operands (list (make-instance 'cluster:gpr-o...
null
https://raw.githubusercontent.com/robert-strandh/Cluster/9010412a2d2109d3eb6e607bd62cc0c482adac81/Test/test.lisp
lisp
Test instructions with an opcode of #x83 and where the Test instructions with an opcode of #x83 and where the Rex prefix Test instructions with an opcode of #x83 and where the Test instructions with an opcode of #x83 and where the Rex prefix Test instructions with an opcode of #x83 and where the Rex prefix Tes...
(in-package :cluster-test) first operand is a 32 - bit GPR between 1 and 7 . (defun run-test-83-reg-1 (mnemonic extension reg imm) (let ((x (make-instance 'cluster:code-command :mnemonic mnemonic :operands (list (make-instance 'cluster:gpr-operand :code-number reg :size 32) (make-instan...
860b9d9b5faa3feb2d07295b41de91e91c0b7a928193989ab04ead91ff78c789
ghc/ghc
Unfold.hs
( c ) The University of Glasgow 2006 ( c ) The AQUA Project , Glasgow University , 1994 - 1998 Core - syntax unfoldings Unfoldings ( which can travel across module boundaries ) are in Core syntax ( namely ) . The type @Unfolding@ sits ` ` above '' simply - Core - expressions unfoldings , capturing ` ...
null
https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/Core/Unfold.hs
haskell
# LANGUAGE BangPatterns # Abstract types | Unfolding options ^ Threshold above which unfoldings are not *created* ^ Threshold above which unfoldings are not *inlined* ^ Discount for lambdas that are used (applied) ^ Discount for dictionaries ^ Force inlining in many more cases ^ Don't consider depth up to x ^ ...
( c ) The University of Glasgow 2006 ( c ) The AQUA Project , Glasgow University , 1994 - 1998 Core - syntax unfoldings Unfoldings ( which can travel across module boundaries ) are in Core syntax ( namely ) . The type @Unfolding@ sits ` ` above '' simply - Core - expressions unfoldings , capturing ` ...
459866efc38989151ab457cd58f23196e6e7bb9bf8cddb4e47fc24ebc012c499
SRI-CSL/f3d
cvv-basics.lisp
(in-package :lisptk) (defmacro with-cvv-items (items panel &body body) `(symbol-macrolet ,(loop for item-spec in items for var = (if (consp item-spec) (first item-spec) item-spec) for item-name = (if (consp item-spec) (or (second item-spec) var) var) collect `(,var (cvv-i...
null
https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-tk/lisp-tk/tkmin/cvv-basics.lisp
lisp
****************** CVV-PANEL CLASS ****************** (format t "set-item-value ~a ~A~%" name value) ****************** CVV-ITEM CLASS ****************** is this really needed? (type-of thing ) ( widget thing ) ; ; ( or ( name thing ) ( cadr ( choice thing ) ) ) (%pointer thing )))
(in-package :lisptk) (defmacro with-cvv-items (items panel &body body) `(symbol-macrolet ,(loop for item-spec in items for var = (if (consp item-spec) (first item-spec) item-spec) for item-name = (if (consp item-spec) (or (second item-spec) var) var) collect `(,var (cvv-i...
6fc07325c3b622f7010abbdd1d345a7381c06265d63e096446568e80ee57009d
liqd/thentos
Main.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # -- | usage: "$0 [target_path]" -- -- (I tried to use packages purescript, language-javascript, and language-purescript, but it was a -- lot easier to do just stupid pattern match...
null
https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/refresh-i18n/src/Main.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # | usage: "$0 [target_path]" (I tried to use packages purescript, language-javascript, and language-purescript, but it was a lot easier to do just stupid pattern matching on the source files without any parsing.) | Load a text file and collect all te...
# LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Main where import Control.Exception (assert) import Control.Monad (void) import Data.Function (on) import Data.Functor.Infix ((<$$>)) import Data.List (sort, groupBy) import Data.Maybe (listToMaybe, catMaybes) import Data.Monoid ((<>)) import D...
cf78087b22bc2112e3ac6320378ef011103f7158b588348746e4bcd539a62df0
facundominguez/stitch-lh
Map.hs
# LANGUAGE LambdaCase # # OPTIONS_GHC -fplugin = LiquidHaskell # # OPTIONS_GHC -fenable - rewrite - rules -Wno - inline - rule - shadowing # ----------------------------------------------------------------------------- -- | -- Module : Language.Stitch.LH.Data.Map Copyright : ( C ) 2021 -- License : ...
null
https://raw.githubusercontent.com/facundominguez/stitch-lh/c411889d2816954e69e8fda1671711b9ed2600cc/src/Language/Stitch/LH/Data/Map.hs
haskell
--------------------------------------------------------------------------- | Module : Language.Stitch.LH.Data.Map License : BSD-style (see LICENSE) Stability : experimental An interface of maps that can be used in reflected definitions I'm keeping it for now, just for the record. The ability to ...
# LANGUAGE LambdaCase # # OPTIONS_GHC -fplugin = LiquidHaskell # # OPTIONS_GHC -fenable - rewrite - rules -Wno - inline - rule - shadowing # Copyright : ( C ) 2021 with LH . It is not currently used in the rest of stitch - lh , but module Language.Stitch.LH.Data.Map ( module Language.Stitch.LH.Data.Map ...
29ea310b4adb05d5abb7b5a66692418018c5f7c1d5d052efb507993aa74edb74
serokell/log-warper
Terminal.hs
-- | Module : System . Wlog . Terminal Copyright : ( c ) , 2016 -- License : GPL-3 (see the file LICENSE) Maintainer : > -- Stability : experimental Portability : POSIX , GHC -- -- Logging functionality. This module is wrapper over -- < hslogger>, -- which allows to keep logger name in mona...
null
https://raw.githubusercontent.com/serokell/log-warper/a6dd74a1085e8c6d94a4aefc2a036efe30f6cde5/src/System/Wlog/Terminal.hs
haskell
| License : GPL-3 (see the file LICENSE) Stability : experimental Logging functionality. This module is wrapper over < hslogger>, which allows to keep logger name in monadic context. | This function initializes global logging system for terminal output. At high level, it sets severity which will be used ...
Module : System . Wlog . Terminal Copyright : ( c ) , 2016 Maintainer : > Portability : POSIX , GHC module System.Wlog.Terminal ( initTerminalLogging ) where import Universum import Data.Time (UTCTime) import System.Wlog.Formatter (stdoutFormatter) import System.Wlog.IOLogger (r...
78d8f27cd0071829b0e3530f5f5601a4ceb092388b632b7b28415ef6e8dfcbb4
ragkousism/Guix-on-Hurd
cve.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/cve.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 , 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-cve) #:use-module (guix cve) #:use-module (srfi srfi-1) #:use-module (srfi srfi-...
f211076d05941adb882a1dc0a966053b7eb7992e15acae687a3d789dbd1e778b
bitnomial/bitcoind-rpc
Generator.hs
# LANGUAGE NumericUnderscores # module Bitcoin.Core.Test.Generator ( testGenerator, ) where import Bitcoin.Core.RPC (BitcoindClient) import qualified Bitcoin.Core.RPC as RPC import Bitcoin.Core.Regtest ( generateWithTransactions, runBitcoind, withBitcoind, ) import Control.Concurrent (threadDelay) im...
null
https://raw.githubusercontent.com/bitnomial/bitcoind-rpc/c9c95b08c4adc479fba94e4e8a5bc5518dfb6a0f/bitcoind-regtest/test/Bitcoin/Core/Test/Generator.hs
haskell
# LANGUAGE NumericUnderscores # module Bitcoin.Core.Test.Generator ( testGenerator, ) where import Bitcoin.Core.RPC (BitcoindClient) import qualified Bitcoin.Core.RPC as RPC import Bitcoin.Core.Regtest ( generateWithTransactions, runBitcoind, withBitcoind, ) import Control.Concurrent (threadDelay) im...
9062c7470e6df80aa1d60e19f0a03fd7ec6efed24d15211efaca0c29f7364b2b
webyrd/n-grams-for-synthesis
130.body.scm
Copyright ( C ) ( 2016 ) . ;;; ;;; 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,...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-130/srfi/130.body.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or Software is furnished to do so, subject to the following conditions...
Copyright ( C ) ( 2016 ) . files ( the " Software " ) , to deal in the Software without sell copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , For convenient inte...
9b18ed3b72925d3e2ba7f98ee4ebb2d561a737831c56c6b0c5684d0a943d004d
Xylios13/archigd
dom-ino-house.rkt
#lang racket (require "main.rkt") ( define landing - width 2.5 ) (define (left-corner-points pt width length) (list pt (+x pt width) (+xy pt width length) (+y pt length))) (define (dom-ino-shape pt width length [landing-width 2.5]) (define sub-div (/ length 3)) (list pt (+x pt width) (+xy pt wi...
null
https://raw.githubusercontent.com/Xylios13/archigd/2276679ae60858f80efdf286fdd9fb38663e2269/archicad/testing%20examples/dom-ino-house.rkt
racket
landing-width) (for ([wall-index (walls (cons (last points) points) lvl)]) landing - width ) (send (delete-levels)(building (u0) 32 16 2))
#lang racket (require "main.rkt") ( define landing - width 2.5 ) (define (left-corner-points pt width length) (list pt (+x pt width) (+xy pt width length) (+y pt length))) (define (dom-ino-shape pt width length [landing-width 2.5]) (define sub-div (/ length 3)) (list pt (+x pt width) (+xy pt wi...
a46e814a3299d1d6a86762ac61e0a8dc716ed3fc0615db853a290a6728d08925
clojure-interop/java-jdk
Binding.clj
(ns javax.xml.ws.Binding "The Binding interface is the base interface for JAX-WS protocol bindings." (:refer-clojure :only [require comment defn ->]) (:import [javax.xml.ws Binding])) (defn get-handler-chain "Gets a copy of the handler chain for a protocol binding instance. If the returned chain is modif...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/ws/Binding.clj
clojure
(ns javax.xml.ws.Binding "The Binding interface is the base interface for JAX-WS protocol bindings." (:refer-clojure :only [require comment defn ->]) (:import [javax.xml.ws Binding])) (defn get-handler-chain "Gets a copy of the handler chain for a protocol binding instance. If the returned chain is modif...
1e0f64a484be6ec1a2662e5bcf7b52b23e3042b436e4c84fe495420d702fdcde
google/ormolu
proc-applications.hs
{-# LANGUAGE Arrows #-} foo x = proc a -> a -< x bar f x = proc ( y, z, w ) -> f -- The value -< ( x, -- Foo w, -- Bar ) baz x = proc a -> a -<< x
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/arrow/proc-applications.hs
haskell
# LANGUAGE Arrows # The value Foo Bar
foo x = proc a -> a -< x bar f x = proc ( y, z, w -< ( ) baz x = proc a -> a -<< x
90f2245b6f6da41562db8cf176622505fabe911beedf40ed49e674c8020881e8
rkallos/wrek
wrek_reuse_sandbox_vert.erl
-module(wrek_reuse_sandbox_vert). -behaviour(wrek_vert). -export([run/2]). run([Who], Pid) -> {ok, Dir} = wrek_vert:reuse_sandbox(Pid, Who), wrek_vert:notify(Pid, {dir, Dir}), {ok, #{dir => Dir}}.
null
https://raw.githubusercontent.com/rkallos/wrek/3859e9efdf21227e6e8e0ea81095b229eceb6641/test/verts/wrek_reuse_sandbox_vert.erl
erlang
-module(wrek_reuse_sandbox_vert). -behaviour(wrek_vert). -export([run/2]). run([Who], Pid) -> {ok, Dir} = wrek_vert:reuse_sandbox(Pid, Who), wrek_vert:notify(Pid, {dir, Dir}), {ok, #{dir => Dir}}.
f38c019bb5c7cba610990aadd5034f7b3d30d7156d6efc83c91383706fac5b2b
gar1t/lambdapad
index.erl
-module(index). data(_) -> {eterm, "hello.config"}. site(_) -> [{"site/index.html", {string, "<html>{{ msg }}</html>"}}].
null
https://raw.githubusercontent.com/gar1t/lambdapad/483b67694723923a82fc699aa37d580d035bd420/samples/hello_eterm/index.erl
erlang
-module(index). data(_) -> {eterm, "hello.config"}. site(_) -> [{"site/index.html", {string, "<html>{{ msg }}</html>"}}].
bca0eade5a1a8f33acd87e13951af81024d6afcb8806e6061fa94f1b08de2b53
lasp-lang/partisan
partisan_plumtree_backend.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2017 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/lasp-lang/partisan/744a53c848cee54cf7c9b7d15e153c4dbd28f42e/src/partisan_plumtree_backend.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2017 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY using the ` broadcast_hear...
072936ca9c1ede54bef0c3b156aaedaff2742d425c3378da1ff17a43ae34ebaa
LeventErkok/linearEqSolver
Setup.hs
----------------------------------------------------------------------------- -- | -- Module : Main Copyright : ( c ) -- License : BSD3 -- Maintainer : -- Stability : experimental -- -- Setup module for the linearEqSolver library ----------------------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/linearEqSolver/118d0b261e263fc9b5a026626af7d1e613cb65f7/Setup.hs
haskell
--------------------------------------------------------------------------- | Module : Main License : BSD3 Maintainer : Stability : experimental Setup module for the linearEqSolver library ---------------------------------------------------------------------------
Copyright : ( c ) # OPTIONS_GHC -Wall # module Main(main) where import Distribution.Simple main :: IO () main = defaultMain
f57163af2ab2d6dc15f2006d9199ddeb397b3f081fb872b4ff5802209bb2725e
rajasegar/cl-djula-tailwind
tailwind-flexbox-grid.lisp
(defpackage cl-djula-tailwind.flexbox-grid (:use :cl :cl-djula-tailwind.utils) (:export :*flexbox-grid*)) (in-package cl-djula-tailwind.flexbox-grid) (defvar *flex-basis* '(("basis-0" . ((".basis-0" :flex-basis "0px"))) ("basis-1" . ((".basis-1" :flex-basis "0.25rem"))) ("basis-2" . ((...
null
https://raw.githubusercontent.com/rajasegar/cl-djula-tailwind/6356bc02399cc299801fb6b56a9817d4827a9f95/src/tailwind-flexbox-grid.lisp
lisp
(defpackage cl-djula-tailwind.flexbox-grid (:use :cl :cl-djula-tailwind.utils) (:export :*flexbox-grid*)) (in-package cl-djula-tailwind.flexbox-grid) (defvar *flex-basis* '(("basis-0" . ((".basis-0" :flex-basis "0px"))) ("basis-1" . ((".basis-1" :flex-basis "0.25rem"))) ("basis-2" . ((...
9aedeb45e46fa5949a64251a344ae51f86308737a00474a2d6d902bd5ac0f1d3
zikajk/pg_copycat
core.clj
(ns pg-copycat.core (:gen-class) (:require [clojure.string :refer [join]] [pg-copycat.doctor :refer [check-installed]] [pg-copycat.export :as export] [pg-copycat.import :as import] [clojure.term.colors :as c] [pg-copycat.utils :refer [connected? valid-bucket?]] [clojure.tools.cli :refer [parse-...
null
https://raw.githubusercontent.com/zikajk/pg_copycat/6a6eb2ca8ef8b510de73636611a74691bc239755/src/pg_copycat/core.clj
clojure
(ns pg-copycat.core (:gen-class) (:require [clojure.string :refer [join]] [pg-copycat.doctor :refer [check-installed]] [pg-copycat.export :as export] [pg-copycat.import :as import] [clojure.term.colors :as c] [pg-copycat.utils :refer [connected? valid-bucket?]] [clojure.tools.cli :refer [parse-...
6fca66b09c0cfa9d631f90e8aa4af70cba44ff73fc0c7596fc578a402713cffe
clojure/core.typed.runtime.jvm
ast_utils.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/clojure/core.typed.runtime.jvm/10cf4b7ca8c3bef1b3fc6ea94940f501d52654a3/src/main/clojure/clojure/core/typed/ast_utils.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns ^:no-doc ^:skip-wiki clojure.core.typed.ast-utils (:require [clojure.core.typed.current-impl :as impl] [clojure.core.typed.contract-utils :as con] [clojure.core.typed.coerce-utils :as coerce])) AST ops ( emit - form - fn [ Any - > Any ] ) ...
531ab74eec1d01bf7671990b2359c4c679a109ef88f9362238a8ba25e96723b6
kanaka/bartender
util.cljc
(ns rend.util) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defn deep-merge [& maps] (apply merge-with (fn [x y] (if (map? y) (deep-merge x y) y)) maps)) (defn merge-test-state [cur-state & new-states] (loop [cur-state cur-state new-states new-states] (let [[new-state & rest-st...
null
https://raw.githubusercontent.com/kanaka/bartender/4357fde74adb228a3cd3fcc12cae4926da899b4e/src/rend/util.cljc
clojure
iter counts per run no-failure runs failure runs largest html size for each run largest html size of each no-failure runs
(ns rend.util) (defn deep-merge [& maps] (apply merge-with (fn [x y] (if (map? y) (deep-merge x y) y)) maps)) (defn merge-test-state [cur-state & new-states] (loop [cur-state cur-state new-states new-states] (let [[new-state & rest-states] new-states new-log (merge (:log cur-state) ...
84d1dfaa92acf8d6b2d6b0135829c355f8104be88eb6ad086721a4e7ab650691
Helium4Haskell/helium
ExprEnumTo.hs
module ExprEnumTo where f = [ 13 , 15 .. "aap" ]
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Examples/ExprEnumTo.hs
haskell
module ExprEnumTo where f = [ 13 , 15 .. "aap" ]
457e59a8d8b1454ed8c962c2e242fd90343093186e8beb35b0ef50b08e34aab0
ice1000/learn
tiny-three-pass-compiler_flymake.hs
module TinyThreePassCompiler where import Data.List.Split import Data.List data AST = Imm Int | Arg Int | Add AST AST | Sub AST AST | Mul AST AST | Div AST AST deriving (Eq, Show) -- data Production = Token | Expression AST | Term ...
null
https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/tiny-three-pass-compiler_flymake.hs
haskell
compile :: String -> [String] (==>) Nothing _ = No errors extract Nothing = No errors collapse pass2 = undefined pass3 :: AST -> [String] pass3 = undefined
module TinyThreePassCompiler where import Data.List.Split import Data.List data AST = Imm Int | Arg Int | Add AST AST | Sub AST AST | Mul AST AST | Div AST AST deriving (Eq, Show) data Production = Token | Expression AST | Term AST...
8c3af08f54a904a5b78beb5566a7d375b316cf8ba85755dad9a34b249409be78
ocaml/ocaml-lsp
main.ml
open Stdune module Cli = Lsp.Cli let () = Printexc.record_backtrace true; let version = ref false in let read_dot_merlin = ref false in let arg = Lsp.Cli.Arg.create () in let spec = [ ("--version", Arg.Set version, "print version") ; ( "--fallback-read-dot-merlin" , Arg.Set read_dot_merlin ...
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/5571db3def623ce7784a15ffdfab7948bd297237/ocaml-lsp-server/bin/main.ml
ocaml
open Stdune module Cli = Lsp.Cli let () = Printexc.record_backtrace true; let version = ref false in let read_dot_merlin = ref false in let arg = Lsp.Cli.Arg.create () in let spec = [ ("--version", Arg.Set version, "print version") ; ( "--fallback-read-dot-merlin" , Arg.Set read_dot_merlin ...
5b806391c7be35785ed81b478669981daf6ca2565cb25ea42705cec50db235e1
314eter/ocaml-hpack
gen_huffman.ml
type node = { mutable id : int; mutable accept : bool; left : child; right : child; transitions : (int * bool * char option) array; } and child = Node of node | Symbol of char | Missing let make_node ?(left=Missing) ?(right=Missing) () = { id = 0; accept = false; left; right; transitions = Array.make 16 (2...
null
https://raw.githubusercontent.com/314eter/ocaml-hpack/d94ef6b9a9bacf7282fc4e9c89acb4df5b02924d/util/gen_huffman.ml
ocaml
type node = { mutable id : int; mutable accept : bool; left : child; right : child; transitions : (int * bool * char option) array; } and child = Node of node | Symbol of char | Missing let make_node ?(left=Missing) ?(right=Missing) () = { id = 0; accept = false; left; right; transitions = Array.make 16 (2...
0404c5c0056fc911a7779212fdb523cf3da509d737445d9e7fc19c7f25e08458
tommaisey/aeon
local-in.help.scm
;; (local-in num-channels rate) Define and read from buses local to a ;; num-channels - the number of channels of local buses. Localin defines buses that are local to the SynthDef . These are ;; like the global buses, but are more convenient if you want to ;; implement a self contained effect that uses a feedba...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/io/local-in.help.scm
scheme
(local-in num-channels rate) num-channels - the number of channels of local buses. like the global buses, but are more convenient if you want to implement a self contained effect that uses a feedback processing local-out.
Define and read from buses local to a Localin defines buses that are local to the SynthDef . These are loop . There can only be one audio rate and one control rate Localin per SynthDef . The audio can be written to the bus using (let* ((a0 (mul (decay (impulse ar 0.3 0) 0.1) (mul (white-noise ar) 0.2))...
fa7e4abef872f33e61b299591b719157e91d24345f80dbd1f8e5800751cc0269
pink-gorilla/goldly
lazy.cljs
(ns page.lazy (:require [ui.highlightjs :refer [highlightjs]] [cljs-libs.helper :refer [add-page-test]])) (defn lazy-page [_r] [:div.bg-red-200.w-screen.h-screen.p-5 [:p.text-blue-500.text-xxl "show code in highlightjs. highlightjs is lazy."] [:p "goto your browser devtools and check what it does"] ...
null
https://raw.githubusercontent.com/pink-gorilla/goldly/302b51553e0f18909d9f04da1c405d58a0920b03/goldly-test/src/demo/page/lazy.cljs
clojure
(ns page.lazy (:require [ui.highlightjs :refer [highlightjs]] [cljs-libs.helper :refer [add-page-test]])) (defn lazy-page [_r] [:div.bg-red-200.w-screen.h-screen.p-5 [:p.text-blue-500.text-xxl "show code in highlightjs. highlightjs is lazy."] [:p "goto your browser devtools and check what it does"] ...
6bb6ac9843a2527c7377b42bc14569dc2003656b37545dee99ce00b3b6d24226
binsec/binsec
suid.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/smt/suid.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
6da1c5538aa25330fcabdc7e04643a6983c8cdfbfda154cd938a33695ffad69d
Helium4Haskell/helium
Lambda3.hs
module Lambda3 where main :: Int main = (\_ -> 4) 1
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/Lambda3.hs
haskell
module Lambda3 where main :: Int main = (\_ -> 4) 1
7bb5f1791cba1ea9a6fb67010eb748ddf270652590e5c3782a431b6e32fab92d
bobzhang/ocaml-book
first.ml
open Printf open Camlp4.PreCast let pr = Gram.Entry.print let expr = Gram.Entry.mk "expr" let test = Gram.Entry.of_parser "test" (fun strm -> match Stream.npeek 2 strm with | [_ ; KEYWORD "xyzzy", _ ] -> raise Stream.Failure | _ -> ()) let _ = begin EXTEND Gram GLOBAL:expr ; g : [[ "plugh" ]...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/camlp4/explict_back_track/first.ml
ocaml
open Printf open Camlp4.PreCast let pr = Gram.Entry.print let expr = Gram.Entry.mk "expr" let test = Gram.Entry.of_parser "test" (fun strm -> match Stream.npeek 2 strm with | [_ ; KEYWORD "xyzzy", _ ] -> raise Stream.Failure | _ -> ()) let _ = begin EXTEND Gram GLOBAL:expr ; g : [[ "plugh" ]...
422e3b4590a63b66a7ee660c7068133f9cf87022fe526041e4b1927cc2ce3e54
cl-axon/cl-aima
minimax.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*- File: search/algorithms/minimax Deciding What Move to Make in a Game by Minimax or Alpha - Beta Search ;;; The minimax decision procedure returns the optimal move in the game ;;; using exhaustive generation of the entire game tree. Implementation ;;; uses the fact that ...
null
https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/search/algorithms/minimax.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; -*- File: search/algorithms/minimax The minimax decision procedure returns the optimal move in the game using exhaustive generation of the entire game tree. Implementation uses the fact that the evaluation and utility functions return a list of values from the point of view of...
Deciding What Move to Make in a Game by Minimax or Alpha - Beta Search (defun minimax-decision (state game) "Return the best action, according to backed-up evaluation. Searches the whole game tree, all the way down to the leaves. This takes too much time for all but the simplest games, but it is guarante...
c172fe84c6645adf18ad59e2fdb2c6bea097a5e420e5b94b8c893212170df5fa
cyga/real-world-haskell
Carrier.hs
file : import qualified Data.Map as M type PersonName = String type PhoneNumber = String type BillingAddress = String data MobileCarrier = Honest_Bobs_Phone_Network | Morrisas_Marvelous_Mobiles | Petes_Plutocratic_Phones deriving (Eq, Ord) findCarrierBil...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch14/Carrier.hs
haskell
file : import qualified Data.Map as M type PersonName = String type PhoneNumber = String type BillingAddress = String data MobileCarrier = Honest_Bobs_Phone_Network | Morrisas_Marvelous_Mobiles | Petes_Plutocratic_Phones deriving (Eq, Ord) findCarrierBil...