_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
5516f8834d85118235fd9a7e3e97dd64b2c7c4803bbd5f9b19e5e1fdc120e7e4
Clozure/ccl
input.lisp
-*- Log : hemlock.log ; Package : Hemlock - Internals -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; #+CMU (ext:file-comment "$Header$")...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/input.lisp
lisp
Package : Hemlock - Internals -*- ********************************************************************** ********************************************************************** mechanism. routines for method dispatching: GET-KEY-EVENT UNGET-KEY-EVENT LISTEN-EDITOR-INPUT CLEAR-EDITOR-INPUT e...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . #+CMU (ext:file-comment "$Header$") This file contains the code that handles input to Hemlock . (in-package :hemlock-internals) INPUT - WAITING is exported solely as a hack ...
050c28c8a6b55f40a37ce01386130340f748489c867073a4336eb9232af959f6
wadehennessey/wcl
formats.lisp
Copyright 1989,1990 by the Massachusetts Institute of Technology , Cambridge , Massachusetts . (in-package "XP") ---- PRETTY PRINTING FORMATS ---- (defun pretty-array (xp array) (cond ((vectorp array) (pretty-vector xp array)) ((zerop (array-rank array)) (write-string++ "#0A " xp 0 4) (w...
null
https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/cl/pprint/formats.lisp
lisp
because they are exported functions. Although idiosyncratic, I have found this very useful to avoid large indentations when printing out code. THE FOLLOWING STUFF SETS UP THE DEFAULT *PRINT-PPRINT-DISPATCH* This is an attempt to specify a correct format for every form that does not just get printed out like an ...
Copyright 1989,1990 by the Massachusetts Institute of Technology , Cambridge , Massachusetts . (in-package "XP") ---- PRETTY PRINTING FORMATS ---- (defun pretty-array (xp array) (cond ((vectorp array) (pretty-vector xp array)) ((zerop (array-rank array)) (write-string++ "#0A " xp 0 4) (w...
9651c94b3c9c3701e7d3fa8f50a6707ff4a7550fc93deca356d83458515b5bdd
scrintal/heroicons-reagent
arrow_up_right.cljs
(ns com.scrintal.heroicons.mini.arrow-up-right) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrow_up_right.cljs
clojure
(ns com.scrintal.heroicons.mini.arrow-up-right) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 ...
40042c36d2c69d10b2c74cc652ee462aeb794cdd9dc97a2b64756f948ae0f472
timothypratley/justice
core_test.cljc
(ns justice.core-test (:require [clojure.test :refer [deftest is testing]] [datascript.core :as d] [justice.core :as j])) (deftest register-rule-test (testing "registering rules" (j/register-rule 'test-registration/ancestor '[?x] '(or (:entity/parent ?x) (justice.core-test/ancesto...
null
https://raw.githubusercontent.com/timothypratley/justice/d2561d42cab73b8a0920f716326e41212d50a274/test/justice/core_test.cljc
clojure
(ns justice.core-test (:require [clojure.test :refer [deftest is testing]] [datascript.core :as d] [justice.core :as j])) (deftest register-rule-test (testing "registering rules" (j/register-rule 'test-registration/ancestor '[?x] '(or (:entity/parent ?x) (justice.core-test/ancesto...
b37ac0c58fdb0c41514bf18a363db61c5ae4ef55f5e9b7f44b4ace47acb86f8f
nixeagle/cl-irc
eliza-rules.lisp
(in-package :eliza) (defparameter *viewpoint* '((I . you) (you . me) (me . you) (am . are) (yourself . myself) (your . my) (my . your))) (defparameter *eliza-rules* '((((?* ?x) hello (?* ?y)) (How do you do. I am a bot.)) (((?* ?x) fuck (?* ?y)) (|That's| not very polite)) (((?* ?x) shit (?* ?...
null
https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/tags/pre_mode_tracking/example/eliza-rules.lisp
lisp
(in-package :eliza) (defparameter *viewpoint* '((I . you) (you . me) (me . you) (am . are) (yourself . myself) (your . my) (my . your))) (defparameter *eliza-rules* '((((?* ?x) hello (?* ?y)) (How do you do. I am a bot.)) (((?* ?x) fuck (?* ?y)) (|That's| not very polite)) (((?* ?x) shit (?* ?...
f43b323739bc43f4b800f350378192ec72536408dd73140811c490e29e000a3b
into-docker/clj-docker-client
requests.clj
This file is part of clj - docker - client . ; clj - docker - client is free software : you can redistribute it and/or modify ; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ; (at your option) any later ver...
null
https://raw.githubusercontent.com/into-docker/clj-docker-client/cd397291568b75320331f03e07519b9a0948080d/src/clj_docker_client/requests.clj
clojure
it under the terms of the GNU Lesser General Public License as published by (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ## Helpers
This file is part of clj - docker - client . clj - docker - client is free software : you can redistribute it and/or modify the Free Software Foundation , either version 3 of the License , or clj - docker - client is distributed in the hope that it will be useful , You should have received a copy of...
dc6c4b3be6504164902233481e52c2280d504ab10193389d81a6b851e26d4ef0
amperity/dialog
file_test.clj
(ns dialog.output.file-test (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.test :refer [deftest testing is]] [dialog.output.file :as file])) (defn- test-file "Create a File object for a test log file. Does not actually create a file on disk." [] (let [path "target/test/...
null
https://raw.githubusercontent.com/amperity/dialog/078d297e0ac4f35f0db6e652b770121f60cee5de/test/dialog/output/file_test.clj
clojure
(ns dialog.output.file-test (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.test :refer [deftest testing is]] [dialog.output.file :as file])) (defn- test-file "Create a File object for a test log file. Does not actually create a file on disk." [] (let [path "target/test/...
e3fbc1bfb5c9bf7c41b9285fd0e897a975755fd6d870f21073eedc0d41e04998
freizl/dive-into-haskell
tutorial8.hs
Informatics 1 - Functional Programming -- Tutorial 8 -- Week 10 - due : 29/30 Nov. import Data.List import Test.QuickCheck -- Type declarations type FSM q = ([q], Alphabet, q, [q], [Transition q]) type Alphabet = [Char] type Transition q = (q, Char, q) -- Example machines m1 :: FSM Int m1 = ([0,1,2,3,4], ...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/lectures/informatics1-FP/tutorials/tutorial8/tutorial8.hs
haskell
Tutorial 8 Type declarations Example machines OPTIONAL MATERIAL ------------------------------------
Informatics 1 - Functional Programming Week 10 - due : 29/30 Nov. import Data.List import Test.QuickCheck type FSM q = ([q], Alphabet, q, [q], [Transition q]) type Alphabet = [Char] type Transition q = (q, Char, q) m1 :: FSM Int m1 = ([0,1,2,3,4], ['a','b'], 0, [4], [(0,'a',1), (0,'...
3e691cbe39d46534d3425b2d2b9eef2ef78a2fc5992e9e79d28249bd3b6dd5a0
project-oak/hafnium-verification
symb.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/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/bufferoverrun/symb.mli
ocaml
* [obj_path] represents the varaible name object when a method of which is called at the [cs] callsite.
* 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 ...
c08e30612a799c8185a09e3312b6064ebf31159686964618547e7a1af695d5b9
yihuang/haskell-snippets
game-of-life.hs
# LANGUAGE FlexibleContexts # import Data.List import Data.Array.IArray type Size = (Int, Int) type WorldArray = Array (Int, Int) Life data Life = Alive | Dead deriving (Eq) instance Show Life where show Alive = "O" show Dead = "*" newtype World = World { arr :: WorldArray } instance Show World where sho...
null
https://raw.githubusercontent.com/yihuang/haskell-snippets/52d60453030eaa4f1bcf6b6a91064701dc66ded8/game-of-life.hs
haskell
# LANGUAGE FlexibleContexts # import Data.List import Data.Array.IArray type Size = (Int, Int) type WorldArray = Array (Int, Int) Life data Life = Alive | Dead deriving (Eq) instance Show Life where show Alive = "O" show Dead = "*" newtype World = World { arr :: WorldArray } instance Show World where sho...
b376b739e3f0c72b15e3ac9294da824b4c340dafb91686cf81409eec71f6a60e
MastodonC/witan.ui
icons.clj
(ns witan.ui.style.icons (:require [garden.color :refer [rgba]] [garden.units :refer [px]] [witan.ui.style.colour :as c :refer [icon-colour]])) (def style [[:.material-icons {:font-size (px 32)}] [:.material-icons.md-t {:font-size (px 10)}] [:.material-icons.md-s {:font-si...
null
https://raw.githubusercontent.com/MastodonC/witan.ui/5ea6baaff52824ac61737911dd2c11b451157bad/src/styles/witan/ui/style/icons.clj
clojure
(ns witan.ui.style.icons (:require [garden.color :refer [rgba]] [garden.units :refer [px]] [witan.ui.style.colour :as c :refer [icon-colour]])) (def style [[:.material-icons {:font-size (px 32)}] [:.material-icons.md-t {:font-size (px 10)}] [:.material-icons.md-s {:font-si...
7b56ed18c9c9643141fd0d9a44393d4a240cb2cdca2d45399a44f189d55f2ee0
fukamachi/mito
sql-parse.lisp
(defpackage #:mito.migration.sql-parse (:use #:cl #:esrap) (:shadow #:space) (:export #:parse-statements)) (in-package #:mito.migration.sql-parse) (defrule end (~ "END")) (defrule begin-end (and (~ "BEGIN") (+ (or quoted-symbol quoted-string begin-end case-end if-end (not end))) end) (:destructure (b ...
null
https://raw.githubusercontent.com/fukamachi/mito/2fbfc8aa6f9e3e8029bf09888c74b9af98dad341/src/migration/sql-parse.lisp
lisp
))) (? #\;)
(defpackage #:mito.migration.sql-parse (:use #:cl #:esrap) (:shadow #:space) (:export #:parse-statements)) (in-package #:mito.migration.sql-parse) (defrule end (~ "END")) (defrule begin-end (and (~ "BEGIN") (+ (or quoted-symbol quoted-string begin-end case-end if-end (not end))) end) (:destructure (b ...
577891ddd1c608a60c4d18d6af2620a6915471c9ed38065eac91eec2f08435a5
facebookarchive/pfff
graph_code_lisp.mli
val build: ?verbose:bool -> Common.dirname -> Common.filename list -> Graph_code.graph
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_lisp/analyze/graph_code_lisp.mli
ocaml
val build: ?verbose:bool -> Common.dirname -> Common.filename list -> Graph_code.graph
e036fd8ef74c69a0b0fdeabfb06c5fd17ec8cf0861d26c14d7d7b797cf85a672
ctford/Idris-Elba-Dev
Primitives.hs
# LANGUAGE RankNTypes , ScopedTypeVariables , PatternGuards # module Idris.Primitives(primitives, Prim(..)) where import Idris.AbsSyntax import IRTS.Lang import Idris.Core.TT import Idris.Core.Evaluate import Data.Bits import Data.Word import Data.Int import Data.Char import Data.Function (on) import Data.Vector.Un...
null
https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/Idris/Primitives.hs
haskell
operators Conversions Streams TODO: Ensure this reduces TODO: Ensure this reduces
# LANGUAGE RankNTypes , ScopedTypeVariables , PatternGuards # module Idris.Primitives(primitives, Prim(..)) where import Idris.AbsSyntax import IRTS.Lang import Idris.Core.TT import Idris.Core.Evaluate import Data.Bits import Data.Word import Data.Int import Data.Char import Data.Function (on) import Data.Vector.Un...
66b13f4dedbf5acd9f39d9d72db63a71cb6cceb6c5c1e4dc9d17062ad298815a
FranklinChen/hugs98-plus-Sep2006
Context.hs
-------------------------------------------------------------------------------- -- | -- Module : Sound.OpenAL.ALC.Context Copyright : ( c ) 2003 - 2005 -- License : BSD-style (see the file libraries/OpenAL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : portable -- ...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenAL/Sound/OpenAL/ALC/Context.hs
haskell
------------------------------------------------------------------------------ | Module : Sound.OpenAL.ALC.Context License : BSD-style (see the file libraries/OpenAL/LICENSE) Maintainer : Stability : provisional Portability : portable have to set the current context accordingly. Application...
Copyright : ( c ) 2003 - 2005 This module corresponds to section 6.2 ( Managing Rendering Contexts ) of the OpenAL Specification and Reference ( version 1.1 ) . All operations of the AL core API affect a current AL context . Within the scope of AL , the ALC is implied - it is not visible as a handle or...
d1a96eb68c225c927461af51589695fc0bb2fc4576651619b697cec277fce83f
logicmoo/wam_common_lisp
sanity-test-5.lisp
(defmacro alpha (x y) `(beta ,x ,y)) ;; ALPHA (defmacro beta (x y) `(gamma ,x ,y)) ;; BETA (defmacro delta (x y) `(gamma ,x ,y)) ;; EPSILON (defmacro expand (form &environment env) (multiple-value-bind (expansion expanded-p) (macroexpand form env) `(values ',expansion ',expanded-p))) ;; EX...
null
https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/t/sanity-test-5.lisp
lisp
ALPHA BETA EPSILON EXPAND EXPAND-1 (prolog-call "lisp")
(defmacro expand (form &environment env) (multiple-value-bind (expansion expanded-p) (macroexpand form env) (defmacro expand-1 (form &environment env) (multiple-value-bind (expansion expanded-p) (macroexpand-1 form env) (print '(foo)) (print "EOF") (- #-:allegro 1 #+:allegro -1 0 1)
4488dcdae2ae185f481c3fc1ae425367b403bf14a932c7b2eab69bf003e10b63
platbox/epgsql_utils
epgsql_utils_model_tests.erl
%% %% epgsql_utils_model tests -module(epgsql_utils_model_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib("epgsql_utils/include/epgsql_utils_model.hrl"). -compile({parse_transform, epgsql_utils_model}). -export([pack/2]). -export([unpack/2]). -record(dancer, { id::key(pos_integer()), name::str...
null
https://raw.githubusercontent.com/platbox/epgsql_utils/98b9915b18050e60dd4f1a119d4b754b7184b034/test/epgsql_utils_model_tests.erl
erlang
epgsql_utils_model tests
-module(epgsql_utils_model_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib("epgsql_utils/include/epgsql_utils_model.hrl"). -compile({parse_transform, epgsql_utils_model}). -export([pack/2]). -export([unpack/2]). -record(dancer, { id::key(pos_integer()), name::string(), age::non_neg_integer...
7ca385aabed5ae506926b686a5cdaeeef8cdceb4f71d8fa94f81733d61051830
janestreet/merlin-jst
tast_mapper.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_flambda/typing/tast_mapper.ml
ocaml
************************************************************************ OCaml ...
, LexiFi Copyright 2015 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes open Typedtree type mapper = { binding_op: mapper -> binding_op -> binding_op; c...
c58fbd6c5b320cd88aeb68c548c49fd1d2465891c1ccabd465068c429999f119
input-output-hk/cardano-ledger
AlonzoAPI.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE Typ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/da48c5ba96b72426a51f36507d49604505fc96a7/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoAPI.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Test.Cardano.Ledger.Examples.AlonzoAP...
7c47632804f1127944e352743620c96216d166c59a453e95c1d72996caba0aab
Bodigrim/text-rope
Main.hs
-- | Copyright : ( c ) 2021 - 2022 Licence : BSD3 Maintainer : < > module Main ( main ) where import qualified CharLines import qualified CharRope import qualified MixedRope import qualified Utf16Lines import qualified Utf16Rope import Prelude () import Data.Function (($)) import System.IO (...
null
https://raw.githubusercontent.com/Bodigrim/text-rope/8939b8a451f62c49b3696f8eb3776c9cb38f449f/test/Main.hs
haskell
|
Copyright : ( c ) 2021 - 2022 Licence : BSD3 Maintainer : < > module Main ( main ) where import qualified CharLines import qualified CharRope import qualified MixedRope import qualified Utf16Lines import qualified Utf16Rope import Prelude () import Data.Function (($)) import System.IO (IO) i...
764a02ea2dbf8ba6cc0d05dae710cb3b657a604c87554de2a25f5ea42d4b254b
kdltr/chicken-core
chicken.condition.import.scm
;;;; chicken.condition.import.scm - import library for "chicken.condition" module ; Copyright ( c ) 2017 - 2021 , The CHICKEN Team ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redistrib...
null
https://raw.githubusercontent.com/kdltr/chicken-core/b2e6c5243dd469064bec947cb3b49dafaa1514e5/chicken.condition.import.scm
scheme
chicken.condition.import.scm - import library for "chicken.condition" module All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice...
Copyright ( c ) 2017 - 2021 , The CHICKEN Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE...
fc9380a279cdfcfb5abfde67e0b2420e1b8950720ba94eb6430edf902e150f9e
YoEight/eventstore
Logger.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # -------------------------------------------------------------------------------- -- | -- Module : Database.EventStore.Internal.Logger Copyright : ( C ) 2017 -- License : (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- P...
null
https://raw.githubusercontent.com/YoEight/eventstore/8ca0f72acfc85b97de0a1862d38ee6e9f2ae2e4c/Database/EventStore/Internal/Logger.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ | Module : Database.EventStore.Internal.Logger License : (see the file LICENSE) Stability : provisional Portability : non-portable ------------------------------------------------------------------------...
# LANGUAGE RecordWildCards # Copyright : ( C ) 2017 Maintainer : < > module Database.EventStore.Internal.Logger ( LoggerRef , LoggerFilter(..) , newLoggerRef , loggerCallback , module Control.Monad.Logger , module Data.String.Interpolate.IsString , module System.Log.FastLogger ) where impor...
f2a71d24f139e7570d27b92fe14ce3b6cddb315a90ac110fb2fb471ea44e083a
weblocks-framework/weblocks
html-parts.lisp
(in-package :weblocks-util) (wexport '(*parts-md5-hash* *parts-md5-context-hash* *process-html-parts-p* get-html-part get-html-part-context get-html-part-children nested-html-part reset-html-parts-set update-html-parts-connections get-html-parts-root-hash) '(t util)) (defvar *parts-md5-hash*) (setf (document...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/utils/html-parts.lisp
lisp
Removing messy items Remove empty strings from html part children Remove empty string html parts
(in-package :weblocks-util) (wexport '(*parts-md5-hash* *parts-md5-context-hash* *process-html-parts-p* get-html-part get-html-part-context get-html-part-children nested-html-part reset-html-parts-set update-html-parts-connections get-html-parts-root-hash) '(t util)) (defvar *parts-md5-hash*) (setf (document...
a533c110fab79cf25c787abc7013a7a8f658fc7e8945fc3fe9778abcc748270b
matterhorn-chat/matterhorn
ChannelListWindow.hs
module Matterhorn.State.ChannelListWindow ( enterChannelListWindowMode , channelListSelectDown , channelListSelectUp , channelListPageDown , channelListPageUp ) where import Prelude () import Matterhorn.Prelude import qualified Brick.Widgets.List as L import qualified Data.Vector as V...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/State/ChannelListWindow.hs
haskell
^ The channels to exclude from the results ^ The scope to search ^ The connection session ^ The search string | Move the selection up in the channel list window by a page of channels (channelListPageSize). | Move the selection down in the channel list window by a page of channels (channelListPageSize). | Trans...
module Matterhorn.State.ChannelListWindow ( enterChannelListWindowMode , channelListSelectDown , channelListSelectUp , channelListPageDown , channelListPageUp ) where import Prelude () import Matterhorn.Prelude import qualified Brick.Widgets.List as L import qualified Data.Vector as V...
5f09a9fdbddce95ca460d0f5e3e84848a4fd914ba52e82542f2243df228abc80
Clozure/ccl
font.lisp
-*- Log : hemlock.log ; Package : Hemlock - Internals -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; #+CMU (ext:file-comment "$Header$")...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/src/font.lisp
lisp
Package : Hemlock - Internals -*- ********************************************************************** ********************************************************************** This file contains various functions that make up the user interface to fonts. Creating, Deleting, and Moving.
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . #+CMU (ext:file-comment "$Header$") Written by Modified by toward Hemlock running under X. (in-package :hemlock-internals) (defun new-font-region (buffer start-mark en...
df9e6284719c69ed7a53167cff85ec6001c2db2a3c051a33a826213397677cfd
NinjaTrappeur/KeyWar
Update.hs
module Update ( updateWorld ) where import Data.Maybe (maybeToList) import Control.Monad (filterM, unless) import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TChan (tryReadTChan) import Data.StateVar (get) import GHC.Float ...
null
https://raw.githubusercontent.com/NinjaTrappeur/KeyWar/967db7880d715605bf9ab0de43e39f85153b9318/src/Update.hs
haskell
module Update ( updateWorld ) where import Data.Maybe (maybeToList) import Control.Monad (filterM, unless) import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TChan (tryReadTChan) import Data.StateVar (get) import GHC.Float ...
f735e4010ecd3b8fae78657b90dd84975e2fb88c3454e033ca26b19b35e35530
input-output-hk/cardano-sl
CreationSpec.hs
-- | Specification of 'Pos.Chain.Block.Creation' module. module Test.Pos.Block.Logic.CreationSpec ( spec ) where import Universum import Data.Default (def) import Serokell.Data.Memory.Units (Byte, Gigabyte, convertUnit, fromBytes) import Test...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/generator/test/Test/Pos/Block/Logic/CreationSpec.hs
haskell
| Specification of 'Pos.Chain.Block.Creation' module. Sampling the minimum empty block size combinations of empty constructors and there's no out-of-box block, some -- 431b. in bytes bytes; this is *completely* independent of encoding used. bytes.
module Test.Pos.Block.Logic.CreationSpec ( spec ) where import Universum import Data.Default (def) import Serokell.Data.Memory.Units (Byte, Gigabyte, convertUnit, fromBytes) import Test.Hspec (Spec, describe, runIO) import Test.Hspe...
e75d349d9a53aa9cbc2194dcec0ceeb9df3e72d3ecf21e8dfb4096d60eb7c561
zalando-stups/pierone
pierone_test.clj
(ns org.zalando.stups.pierone.pierone-test (:require [org.zalando.stups.pierone.test-data :as d] [org.zalando.stups.pierone.test-utils :as u] [org.zalando.stups.pierone.api :refer :all] [org.zalando.stups.pierone.sql :as sql] [clojure.test :refer :all] [ches...
null
https://raw.githubusercontent.com/zalando-stups/pierone/e35dc665f1e0e155152f1fcd5d0b301f85d71f50/test/org/zalando/stups/pierone/pierone_test.clj
clojure
tag root image as regular tag tag alt image as snapshot tag reverse image search check tag list for not existing artifact -> not ok check stats endpoint kio is the only artifact regular tag and snapshot tag Push a v2 image stop
(ns org.zalando.stups.pierone.pierone-test (:require [org.zalando.stups.pierone.test-data :as d] [org.zalando.stups.pierone.test-utils :as u] [org.zalando.stups.pierone.api :refer :all] [org.zalando.stups.pierone.sql :as sql] [clojure.test :refer :all] [ches...
d6b7b406abf2872b68dc1d488455e3dcf8511bfcc42a249dc89ebe91e148c137
ruricolist/serapeum
docs.lisp
(in-package #:cl-user) (defpackage #:serapeum.docs (:use #:cl #:alexandria #:serapeum) (:import-from #:swank/backend #:find-source-location) (:export #:render-function-reference-as-markdown #:update-function-reference)) (in-package #:serapeum.docs) (defun ungensym (s) "If S is a gensym, chop the number...
null
https://raw.githubusercontent.com/ruricolist/serapeum/d98b4863d7cdcb8a1ed8478cc44ab41bdad5635b/docs.lisp
lisp
Table of contents Each file. Keep long arg lists from overflowing. Each definition. If packages aren't provided, consider there is only
(in-package #:cl-user) (defpackage #:serapeum.docs (:use #:cl #:alexandria #:serapeum) (:import-from #:swank/backend #:find-source-location) (:export #:render-function-reference-as-markdown #:update-function-reference)) (in-package #:serapeum.docs) (defun ungensym (s) "If S is a gensym, chop the number...
571c1250477e14a739bc820cbebf4648e132efe583c2f1d1e6b0d1491e87340c
aleator/Simple-SVM
Simple.hs
# LANGUAGE ScopedTypeVariables , TupleSections , ViewPatterns , RecordWildCards , FlexibleInstances , ForeignFunctionInterface # RecordWildCards, FlexibleInstances, ForeignFunctionInterface #-} ------------------------------------------------------------------------------- -- | Module ...
null
https://raw.githubusercontent.com/aleator/Simple-SVM/591b86e645e04ac8e7b73246e9a6b573840fb251/AI/SVM/Simple.hs
haskell
----------------------------------------------------------------------------- | License : BSD3 Important TODO-items: * Handle the issue of crashing the system by passing vectors of dimension to the SVMs * Split this library into high and low level parts * Saving and loading SVMs ------------------------...
# LANGUAGE ScopedTypeVariables , TupleSections , ViewPatterns , RecordWildCards , FlexibleInstances , ForeignFunctionInterface # RecordWildCards, FlexibleInstances, ForeignFunctionInterface #-} Module : Bindings . SVM Copyright : ( c ) 2011 Maintainer : Ville Tirronen < > ...
4cfd6964a754c33d752d5c7b1de5d03f1895faacc7bab00c33c6a2d3da31894c
mbattyani/cl-pdf
pdf-patches.lisp
(in-package :pdf) these patches permit operation without libgz ;;; [for example, on a PC/ms windows] ;;; -------------------------------------------------- for : (defmethod write-object ((obj pdf-stream) &optional root-level) #+(or Lispworks Allegro) (when (and (> (length (content obj)) +min-size-for-compr...
null
https://raw.githubusercontent.com/mbattyani/cl-pdf/dbafd62afcb2d2e9164054c72612763721297d59/contrib/pdf-patches.lisp
lisp
[for example, on a PC/ms windows] -------------------------------------------------- -------------------------------------------------- For cl-zlib-small.lisp This variable may remain nil, if the load fails result of successful load is non-nil
(in-package :pdf) these patches permit operation without libgz for : (defmethod write-object ((obj pdf-stream) &optional root-level) #+(or Lispworks Allegro) (when (and (> (length (content obj)) +min-size-for-compression+) *libgz-loaded*) (setf (content obj) (compress-string (content obj))) (...
810b7682ee888506848d9606b5949eb4292823c0714edbeecb89e57608b364ba
brick-lang/kiln
basic.ml
(** Identity function *) let id x = x (** Constant function *) let const x _ = x let seq _ x = x (** Function composition *) (* OCaml doesn't let us use the (.) operator, so I just use ( *.* ), *) (* which has a higher precedence than "@@" and "|>" *) let ( <.> ) f g = fun x -> f (g x) * Flip takes its ( first )...
null
https://raw.githubusercontent.com/brick-lang/kiln/21ec6fe8dfd2a807e514c9a794abbf48a7836ab3/util/basic.ml
ocaml
* Identity function * Constant function * Function composition OCaml doesn't let us use the (.) operator, so I just use ( *.* ), which has a higher precedence than "@@" and "|>" let (@@) f x = f x
let id x = x let const x _ = x let seq _ x = x let ( <.> ) f g = fun x -> f (g x) * Flip takes its ( first ) two arguments in the reverse order of f let flip f x y = f y x let flip2 f y z x = f x y z let flip3 f x y z w = f w x y z * The application operator . It 's redundant , but in language grammars ( like f...
1df85afd7c4c1e0ee8d5aafa184ce27fda71ac17aaa291c80beab01da0cc7cec
GaloisInc/ivory-rtverification
Setup.hs
module Main(main) where import Distribution.Simple import System.Process import System.IO main :: IO () main = do let hooks = simpleUserHooks { preBuild = \_ _ mkData } defaultMainWithHooks hooks mkdata :: IO HookedBuildInfo let base = "examples/sample" let out = "/tmp/" ++ base ++ ".cpp" rawSystem "gcc" ...
null
https://raw.githubusercontent.com/GaloisInc/ivory-rtverification/b4c50f85aea48be2fe26fb3310e01b68b3d163af/rtv-lib/src/Ivory/RTVerification/Setup.hs
haskell
module Main(main) where import Distribution.Simple import System.Process import System.IO main :: IO () main = do let hooks = simpleUserHooks { preBuild = \_ _ mkData } defaultMainWithHooks hooks mkdata :: IO HookedBuildInfo let base = "examples/sample" let out = "/tmp/" ++ base ++ ".cpp" rawSystem "gcc" ...
1bf286c30487021ac35ba2e999f30fa8ea20583ceb627634a497054fcb273547
juspay/atlas
Person.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you m...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Storage/Tabular/Person.hs
haskell
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you m...
c4ea542d42e196e94e2ef018555eaf53a1f1f0992d7370209c19dcf57299e4f3
cunger/pythia
QuestionAnswering.clj
(ns core.definitions.QuestionAnswering (:require [core.nlu.context.short_term_memory :as stm] [core.data.LambdaRDF :refer :all]) (:import [core.data.LambdaRDF Term Triple Not And Filter Quant Sel Condition Ask Select])) (defn gimme [pred] (let [v (make-var "v" (stm/get-fresh!))] (Select. v (pred...
null
https://raw.githubusercontent.com/cunger/pythia/f58e35395968d4c46aef495fd363c26b1102003c/src/core/definitions/QuestionAnswering.clj
clojure
(ns core.definitions.QuestionAnswering (:require [core.nlu.context.short_term_memory :as stm] [core.data.LambdaRDF :refer :all]) (:import [core.data.LambdaRDF Term Triple Not And Filter Quant Sel Condition Ask Select])) (defn gimme [pred] (let [v (make-var "v" (stm/get-fresh!))] (Select. v (pred...
e6a63b43f879d03fe331d3e25c8f9bf4645fb22a585aa02ebb8c0152df5ee58d
conal/shaped-types
Misc.hs
{-# LANGUAGE CPP #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # {-# LANGUAGE LambdaCase #-} # LANGUAGE EmptyCase # # OPTIONS_GHC -Wall # { - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP { - # OPTIONS_GHC -fno - warn - unused - binds # - } -- TEMP # OPTIONS_GHC -fno - war...
null
https://raw.githubusercontent.com/conal/shaped-types/3778974bca793fa810195546e0d4362151aa9a6b/src/ShapedTypes/Misc.hs
haskell
# LANGUAGE CPP # # LANGUAGE LambdaCase # TEMP TEMP -------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental Miscellany -------------------------------------------------------------------- TODO: explicit exports | Add ...
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE EmptyCase # # OPTIONS_GHC -Wall # # OPTIONS_GHC -fno - warn - orphans # Module : . Misc Copyright : ( c ) 2016 Conal Elliott { - # OPTIONS_GHC -fplugin - opt = ReificationRules . Plugin : trace # - } { - # OPTIONS_GHC -ddump -...
3fdfe787f27c898f0ad63792981c8a4ff9b2e287514c269e50512af59afcf687
AndrasKovacs/ELTE-func-lang
Notes04.hs
# LANGUAGE DeriveFunctor # import Prelude hiding (Foldable(..)) -- Foldable, lista + fa feladatok ------------------------------------------------------------ -- osztály fold-olható típusokra -- emlékezzünk: lista foldr :: (a -> b -> b) -> b -> [a] -> b class Foldable f where foldr :: (a -> b -> b) -> b -> f a -> ...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-1/lectures/Notes04.hs
haskell
Foldable, lista + fa feladatok ---------------------------------------------------------- osztály fold-olható típusokra emlékezzünk: lista foldr :: (a -> b -> b) -> b -> [a] -> b instance-okkal! üres-e? Példa: mconcat' ["foo", "bar"] = "foobar" csaló verzió ($ a) <$> ff == [10,20,30,600]
# LANGUAGE DeriveFunctor # import Prelude hiding (Foldable(..)) class Foldable f where foldr :: (a -> b -> b) -> b -> f a -> b 1 . Írd meg a következő instance - okat . data Two a = Two a a deriving (Show) data Three a = Three a a a deriving (Show) data Id a = Id a deriving (Show) data Const a b = Const a deri...
dbca1bd4731524db8b1146ae93813d791c6f67000fb1c05d0c8459b58f3da09b
antoniogarrote/levanzo
indexing_test.clj
(ns levanzo.indexing-test (:require [clojure.test :refer :all] [levanzo.hydra :as hydra] [levanzo.namespaces :refer [xsd] :as lns] [levanzo.payload :as payload] [levanzo.routing :as routing] [levanzo.indexing :as indexing] [clojure.string :as str...
null
https://raw.githubusercontent.com/antoniogarrote/levanzo/53a8fa134099b3ad6310bfc3493cc1fb9eb38f2f/test/levanzo/indexing_test.clj
clojure
handlers filters tests
(ns levanzo.indexing-test (:require [clojure.test :refer :all] [levanzo.hydra :as hydra] [levanzo.namespaces :refer [xsd] :as lns] [levanzo.payload :as payload] [levanzo.routing :as routing] [levanzo.indexing :as indexing] [clojure.string :as str...
b2717d52812abffcc86f5713042ba2be573b77764ac6f9e233a54babb02e0748
ninenines/cowboy
stream_handler_SUITE.erl
Copyright ( c ) 2017 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/stream_handler_SUITE.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2017 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(stream_handler_SUITE). -compile(export_all). -compil...
01ade95c07d7f6051cc95461f5c50b8ddb5d9b93916fbe0f778a2924432f2294
cloudant-labs/couchdb-erlfdb
erlfdb_tuple.erl
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 applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/cloudant-labs/couchdb-erlfdb/510664facbc28c946960db2d12b3baf33923f4ea/src/erlfdb_tuple.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(erlfdb_tuple). -export([ pack/1, pack/2, pack_vs/1, pack_vs/2, unpack/1, unpack/2, range/1, range/2, compare/2...
e198a8c7fb9fbd30815dead009779fb1ecb48b09e61a1d3a49620a85c24635be
airalab/hs-web3
Key.hs
{-# LANGUAGE GADTs #-} # LANGUAGE RecordWildCards # -- | -- Module : Network.Polkadot.Storage.Key Copyright : 2016 - 2021 -- License : Apache-2.0 -- -- Maintainer : -- Stability : experimental -- Portability : portable -- -- When you use the Substrate RPC to access a storage item, ...
null
https://raw.githubusercontent.com/airalab/hs-web3/a63bb5f23185aa605a200cc46266d418903593b9/packages/polkadot/src/Network/Polkadot/Storage/Key.hs
haskell
# LANGUAGE GADTs # | Module : Network.Polkadot.Storage.Key License : Apache-2.0 Maintainer : Stability : experimental Portability : portable When you use the Substrate RPC to access a storage item, you only need to provide the key associated with that item. ^ Wrapped type should ...
# LANGUAGE RecordWildCards # Copyright : 2016 - 2021 module Network.Polkadot.Storage.Key where import Codec.Scale (encode) import Codec.Scale.Class (Encode (..)) import Control.Arrow ((&&&)) import Data.ByteString ...
ae6227eaf40e56f64d0de9d6c4aa941b1b76850f430bc280994b135e1e317cf2
msakai/toysolver
SAT2MIS.hs
# OPTIONS_GHC -Wall # # LANGUAGE TypeFamilies # module ToySolver.Converter.SAT2MIS ( -- * SAT to independent set problem conversion satToIS , SAT2ISInfo * 3 - SAT to independent set problem conversion , sat3ToIS , SAT3ToISInfo * Maximum independent problem to MaxSAT / PB problem conversion , is2pb...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/Converter/SAT2MIS.hs
haskell
* SAT to independent set problem conversion ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----------------------------------------------------...
# OPTIONS_GHC -Wall # # LANGUAGE TypeFamilies # module ToySolver.Converter.SAT2MIS ( satToIS , SAT2ISInfo * 3 - SAT to independent set problem conversion , sat3ToIS , SAT3ToISInfo * Maximum independent problem to MaxSAT / PB problem conversion , is2pb , mis2MaxSAT , IS2SATInfo ) where import ...
aaff659b62c9f22e097567ed5802fc71ccf0f9b03044c94c94fbf62c46cbec78
uw-unsat/serval
movzx.rkt
#lang racket/base (require "lib.rkt") (define tests (x86-suite "MOVZX" movzx-r32-r/m8 movzx-r64-r/m8 movzx-r32-r/m16 movzx-r64-r/m16 )) (module+ test (time (run-tests tests)))
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/test/x86/movzx.rkt
racket
#lang racket/base (require "lib.rkt") (define tests (x86-suite "MOVZX" movzx-r32-r/m8 movzx-r64-r/m8 movzx-r32-r/m16 movzx-r64-r/m16 )) (module+ test (time (run-tests tests)))
508eb160a1fe3053418dc802d4be1686643a130761e39bab27519943561eb73c
coowry/baleen
prop_basic_validation.erl
-module(prop_basic_validation). -include_lib("proper/include/proper.hrl"). -import(baleen, [validate/2, valid/0, invalid/0, to_integer/0, to_float/0]). %%%%%%%%%%%%%%%%%% %%% Properties %%% %%%%%%%%%%%%%%%%%% prop_valid() -> ?FORALL(Data, term(), begin {ok, Data} == baleen:validate(valid(), Da...
null
https://raw.githubusercontent.com/coowry/baleen/debb641617c59d5d042b16442db1fd9e69e17cfb/test/prop_basic_validation.erl
erlang
Properties %%%
-module(prop_basic_validation). -include_lib("proper/include/proper.hrl"). -import(baleen, [validate/2, valid/0, invalid/0, to_integer/0, to_float/0]). prop_valid() -> ?FORALL(Data, term(), begin {ok, Data} == baleen:validate(valid(), Data) end). prop_invalid() -> ?FORALL(Data, te...
b042d9ce36971c92515ff1e871e06916c20184fdf5e430d541242c46eb075284
oscoin/oscoin
Internal.hs
# LANGUAGE UndecidableInstances # module Oscoin.Node.Mempool.Internal * Mempool , lookup , member , insert , insertMany , removeTxs , size , elems , toList ) where import Oscoin.Prelude hiding (toList) import qualified Oscoin.Prelude as Prelude import O...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Node/Mempool/Internal.hs
haskell
Mempool -------------------------------------------------------------------- | A map of transaction keys to transactions. | Lookup a transaction in a mempool. | Check for key membership. | Add a transaction to a mempool. | Add multiple transactions to a mempool. | Remove multiple transactions from a mempool.
# LANGUAGE UndecidableInstances # module Oscoin.Node.Mempool.Internal * Mempool , lookup , member , insert , insertMany , removeTxs , size , elems , toList ) where import Oscoin.Prelude hiding (toList) import qualified Oscoin.Prelude as Prelude import O...
fc2ab64ae10c024be7554be6a23966f3d14e7b875af392da9a73e7295019e221
binaryage/chromex
chrome_event_channel.cljs
(ns chromex.chrome-event-channel (:require [chromex.protocols.chrome-event-channel :refer [IChromeEventChannel]] [chromex.protocols.chrome-event-subscription] [cljs.core.async.impl.protocols :as core-async])) (deftype ChromeEventChannel [chan ^:mutable subscriptions] IChromeEventChannel ...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/lib/chromex/chrome_event_channel.cljs
clojure
(ns chromex.chrome-event-channel (:require [chromex.protocols.chrome-event-channel :refer [IChromeEventChannel]] [chromex.protocols.chrome-event-subscription] [cljs.core.async.impl.protocols :as core-async])) (deftype ChromeEventChannel [chan ^:mutable subscriptions] IChromeEventChannel ...
06714e42dfea4fec6ac35f3da93003f45f560c4bdbc3080215c7bd71478f8aff
ashinn/chibi-scheme
mapping.scm
Copyright ( C ) ( 2016 , 2017 ) . All Rights ;; Reserved. ;; 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 us...
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/146/mapping.scm
scheme
Reserved. 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 sell copies furnished to do so, subject to the following co...
Copyright ( C ) ( 2016 , 2017 ) . All Rights files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ...
7a1e7eb77a621a7bd55a4537d426e46c3bbe01fc500312308e62bee2750ed41e
paurkedal/ocaml-caqti
caqti_pool_sig.mli
Copyright ( C ) 2017 - -2020 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , w...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/38dde943979b69241d22abb0678ae57a854c7258/caqti/lib/caqti_pool_sig.mli
ocaml
* Resource pool signature. * {b Internal:} [create alloc free] is a pool of resources allocated by [alloc] and freed by [free]. This is primarily intended for implementing the [connect_pool] functions. @param max_size The maximum number of allocated resources. @param max_idle_size ...
Copyright ( C ) 2017 - -2020 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , w...
e92b6b4c4be5518c5d330e44eef1ec463b3f088d5588bf28fd03f3f4c108d7d5
robertaarcoverde/practicing-haskell
huffman_coding.hs
----------------------------------------------------------------------------- | The Huffman Coding - This is a implementation of the Huffman coding algorithm . ----------------------------------------------------------------------------- | The Huffman Coding - This is a Haskell implementation of the H...
null
https://raw.githubusercontent.com/robertaarcoverde/practicing-haskell/160ea48e7f9b68c8a5e94d69787306cb40c72d10/huffman_coding.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- ----------------------------------------------------------------------------} --------------------------------------------------------------------------- ------------...
| The Huffman Coding - This is a implementation of the Huffman coding algorithm . | The Huffman Coding - This is a Haskell implementation of the Huffman coding algorithm. First we define our data structures : a simple binary tree ( holding values on the leaves only ) and a pair we call , that asso...
02d703619fd3ce756866eec4816c7fbbf66cc9cf468480116eba13c57b764c5d
hedgehogqa/haskell-hedgehog
Exception.hs
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - incomplete - patterns # module Test.Example.Exception where import qualified Data.List as List import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Prelude hiding (maximum, filter) filter :: ...
null
https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog/3d4dde46e15ab25a10cac0deff03bae10ecacc4e/hedgehog-example/src/Test/Example/Exception.hs
haskell
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - incomplete - patterns # module Test.Example.Exception where import qualified Data.List as List import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Prelude hiding (maximum, filter) filter :: ...
d0e2f6d7df1e1c00420f39f5351873001fda8ce2dd15f30880b645f9cb0d2396
baryluk/ex11
example28.erl
-module(example28). Copyright ( C ) 2004 by ( ) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There i...
null
https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/widgets/example28.erl
erlang
All rights reserved. The copyright holder hereby grants the rights of usage, distribution and modification of this software to everyone and for any purpose, as long as this license and the copyright notice above are preserved and not modified. There is no warranty for this software. width height, lines X pos o...
-module(example28). Copyright ( C ) 2004 by ( ) started 2004 - 04 - 22 by ( ) erlPoint 3456789012345678901234567890123456789012345678901234567890123456789012345678 3456789012345678901234567890123456789012345678901234567890123456789012345 -export([start/0, start/1]). -import(sw, [xStart/1]). -import(ex1...
7e9fbfd7ad321701abfb946a4fd29661033fcab9cafb1f675df7c28fca95fe5f
AndrasKovacs/ELTE-func-lang
Notes06.hs
# language InstanceSigs # {-# language DeriveFunctor, DeriveFoldable, DeriveTraversable #-} Applicative Foldable / Lista monád Parser monád -------------------------------------------------------------------------------- import Control.Monad newtype State s a = State {runState :: s -> (a, s)} deriving F...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/525e024a09f695b1b705fcdd2c624da7d22fb45f/2021-22-1/ea/Notes06.hs
haskell
# language DeriveFunctor, DeriveFoldable, DeriveTraversable # ------------------------------------------------------------------------------ ugyanaz mint " return " " ap " ugyanaz mint "return" használjuk pure-t return helyett (csak historikus, hogy külön van a kettő) "ap" (a -> b) -> f a -> f b (a -> b -> c)...
# language InstanceSigs # Applicative Foldable / Lista monád Parser monád import Control.Monad newtype State s a = State {runState :: s -> (a, s)} deriving Functor instance Applicative (State s) where pure = return (<*>) = ap instance Monad (State s) where return :: a -> State s a return a = ...
71f60dc1b50bcb8ec6f2cd0af63731856418c61132d9c077ba54ded186f4a5de
logicmoo/wam_common_lisp
fngen.lisp
-*-Mode : LISP ; Package : PCL ; ; Syntax : Common - lisp -*- ;;; ;;; ************************************************************************* Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . ;;; All rights reserved. ;;; ;;; Use and copying of this software and preparation of derivative w...
null
https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/fngen.lisp
lisp
Package : PCL ; ; Syntax : Common - lisp -*- ************************************************************************* All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this States export control laws. warra...
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . software or derivative works must comply with all applicable United This software is made available AS IS , and Xerox Corporation makes no CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd . Palo Alto , CA 94304 ( o...
e690d8e2ef382e7530ffbe54c3282f47cb5a1832fef89d801eb180e855dabbd6
sgbj/MaximaSharp
polyb.lisp
;;; -*- mode: lisp; package: cl-maxima; syntax: common-lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;;;; Copyright ( c ) 1984 by , University of Texas ; ; ; ; ; ;;; All rights reserved ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/affine/polyb.lisp
lisp
-*- mode: lisp; package: cl-maxima; syntax: common-lisp -*- ;;;;; ; ; ; ; All rights reserved ;;;;; see polyd.lisp for current def relat (dot-simps $dot_simplifications)) ($sort...
(in-package :maxima) (defun $circle_times (&rest l) (case (length l) (0 1) (1 (car l)) (2 (let (firs sec (u (car l)) (v (second l))) (setq firs (sub* (mul* (nth 1 u) (nth 1 v)) (mul* (nth 2 u) (nth 2 v)))) (setq sec (add* (mul* (nth 1 u) (nth 2 v)) (mul* (nth 2 u) (nth 1 v)))) (list...
5654ba565bd0bb746837af86022a67cef88c8dd394890aeeda4262b0cf76f4f1
ayamada/copy-of-svn.tir.jp
misc.scm
#!/usr/bin/env gosh ;;; coding: euc-jp ;;; -*- scheme -*- ;;; vim:set ft=scheme ts=8 sts=2 sw=2 et: $ Id$ ;;; note : このモジュールは、一つのモジュールにまとめる前の、 ;;; 一時的な状態の関数等を保存するモジュールとする。 (define-module tir.misc ;(use srfi-2) ; and-let* (export hes html-tree-make make-webpage-main cgi-metavariables->ht...
null
https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir01/tags/0.0.2/lib/tir/misc.scm
scheme
coding: euc-jp -*- scheme -*- vim:set ft=scheme ts=8 sts=2 sw=2 et: note : このモジュールは、一つのモジュールにまとめる前の、 一時的な状態の関数等を保存するモジュールとする。 (use srfi-2) ; and-let* ---- tir.cgi? cgi-mainの代わりに使えるwebpage-main関数を生成する高階関数。 キーワード引数としてencodingとon-errorを指定する事。 procは、通常のtext.treeの代わりに、以下のようなlistを返す事。 '( :http-header (...
#!/usr/bin/env gosh $ Id$ (define-module tir.misc (export hes html-tree-make make-webpage-main cgi-metavariables->html make-view-cgi-metavariables-thunk number->string-japanese-weekday number->string-japanese-wday time->japanese-date-string )) (select-module tir.misc) (u...
4b617f1563980d729f4090ad8be79da7661f97ed2a3b0843f80455b53b854316
mirage/ocaml-matrix
logout.ml
open Matrix_common module Logout = struct module Query = Empty.Query module Request = Empty.Json module Response = Empty.Json end module Logout_all = struct module Query = Empty.Query module Request = Empty.Json module Response = Empty.Json end
null
https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/lib/matrix-ctos/logout.ml
ocaml
open Matrix_common module Logout = struct module Query = Empty.Query module Request = Empty.Json module Response = Empty.Json end module Logout_all = struct module Query = Empty.Query module Request = Empty.Json module Response = Empty.Json end
1eceb85e33cc2ee37e83e65fb157629f0b74efb7aadaf06b7068a973dbbbbe68
BekaValentine/SimpleFP-v2
Parser.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances #-} -- | This module defines how to parser a program in the simply typed lambda calculus w/ non - parametric user defined types ( eg , ) . module Poly.Core.Parser where import Utils.ABT import Utils.Vars impor...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Poly/Core/Parser.hs
haskell
# LANGUAGE TypeSynonymInstances # | This module defines how to parser a program in the simply typed lambda Type parsers Term parsers | A convenience function that will parse or return the parse error string.
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # calculus w/ non - parametric user defined types ( eg , ) . module Poly.Core.Parser where import Utils.ABT import Utils.Vars import Poly.Core.ConSig import Poly.Core.Term import Poly.Core.Type import Poly.Core.Program import Control.Applicativ...
a6617c1f6e02ffd4d9e10f9600546c3fa9621d556b35533d21ccd649cdfce8a0
stritzinger/opcua
opcua_keychain_default.erl
-module(opcua_keychain_default). -behavior(gen_server). %%% INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -include_lib("kernel/include/logger.hrl"). %%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% API functions -export([start_link/1]). %% Keych...
null
https://raw.githubusercontent.com/stritzinger/opcua/a9802f829f80e6961871653f4d3c932f9496ba99/src/opcua_keychain_default.erl
erlang
INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% API functions Keychain functions Behaviour gen_server callback functions API FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % %...
-module(opcua_keychain_default). -behavior(gen_server). -include_lib("kernel/include/logger.hrl"). -export([start_link/1]). -export([lookup/2]). -export([info/1]). -export([certificate/2]). -export([public_key/2]). -export([private_key/2]). -export([add_certificate/2]). -export([add_private/1]). -export([trust...
ca8674055c9bd95f3d2ee3752d2077e9a7768a8029b7017ed9ed98778e255fe6
ragkousism/Guix-on-Hurd
shells.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > Copyright © 2014 , 2015 < > Copyright © 2014 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2017 < > Copyright © 2017 ng0 < > ;;; ;;; This file is part of GNU Guix. ;;; G...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/shells.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 © 2013 < > Copyright © 2014 , 2015 < > Copyright © 2014 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2017 < > Copyright © 2017 ng0 < > under the terms of the GNU General Public License as published by You should have received a copy...
f0e5c80bf2c7190986dafc69ecc6f29f29240da335b5689dcf4ef647700d6c9c
ygrek/mldonkey
gnutellaMain.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 2 of the License , or ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/gnutella/gnutellaMain.ml
ocaml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 2 of the License , or ...
adc58b85c0caedee4ddfbc6ae6db8303585ea64f8da7d5a157b1a2d6bf151e6b
onyx-platform/learn-onyx
challenge_5_4_test.clj
(ns workshop.jobs.challenge-5-4-test (:require [clojure.test :refer [deftest is]] [onyx.test-helper :refer [with-test-env feedback-exception!]] [workshop.challenge-5-4 :as c] [workshop.workshop-utils :as u] [onyx.api])) ;; The final feature of flow conditions that we'l...
null
https://raw.githubusercontent.com/onyx-platform/learn-onyx/6bf1936f35d26e3c8cf171b5971e1bc95e82b3c8/test/workshop/jobs/challenge_5_4_test.clj
clojure
The final feature of flow conditions that we'll cover are key exclusions. Sometimes, you'll want to convey some information from a function to a flow condition predicate that doesn't need to be sent downstream. In the example below, we're going to route users to different tasks based on their age. Their age is on...
(ns workshop.jobs.challenge-5-4-test (:require [clojure.test :refer [deftest is]] [onyx.test-helper :refer [with-test-env feedback-exception!]] [workshop.challenge-5-4 :as c] [workshop.workshop-utils :as u] [onyx.api])) ` lein test workshop.jobs.challenge-5 - 4 - tes...
a8bf7f931e46a47b1563b9da1fedafe43c590cab8965d67d87e32461eecc2a3b
nixeagle/nisp
util.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*- (in-package :functional-tests) ;;; Definition taken from reading on lisp (defun single (1ist) "Return t if input is a list of one element. Example: (single 5) => NIL (single t) => NIL (single (list t)) => T (sing...
null
https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/functional-tests/util.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*- Definition taken from reading on lisp
(in-package :functional-tests) (defun single (1ist) "Return t if input is a list of one element. Example: (single 5) => NIL (single t) => NIL (single (list t)) => T (single (list \"Something\")) => T " (and (consp 1ist) (not (last 1ist))))
51b2a09b79d818b5a619833746c3f36afaa3d5d862c4b2a1adff631a028edb98
dbasch/base58
project.clj
(defproject base58 "0.1.0" :description "Bitcoin Base58 encoding and decoding." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"]])
null
https://raw.githubusercontent.com/dbasch/base58/9d7cd1081c8fdee293f11a69b751f84c5d4ffe10/project.clj
clojure
(defproject base58 "0.1.0" :description "Bitcoin Base58 encoding and decoding." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"]])
250c0549c0dab7af2ccbaa219bab050ee0c02d45e7070a2c2561da5283827624
nasa/Common-Metadata-Repository
providers.clj
(ns cmr.metadata-db.data.oracle.providers "Functions for saving, retrieving, deleting providers." (:require [clojure.java.jdbc :as j] [clojure.pprint :refer [pprint pp]] [cmr.common.log :refer [debug info warn error]] [cmr.common.util :as cutil] [cmr.metadata-db.data.oracle.concept-tables :as ct] ...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/f189d55ded0c235f19fbfc3597e772e22e4498ad/metadata-db-app/src/cmr/metadata_db/data/oracle/providers.clj
clojure
from search. access-control-app listens for :provider-delete messages and handles deleting the relevant records from Elastic. Delete the variable associations related to the provider via variable Delete the variable associations related to the provider via collection Delete variables of the provider Delete the se...
(ns cmr.metadata-db.data.oracle.providers "Functions for saving, retrieving, deleting providers." (:require [clojure.java.jdbc :as j] [clojure.pprint :refer [pprint pp]] [cmr.common.log :refer [debug info warn error]] [cmr.common.util :as cutil] [cmr.metadata-db.data.oracle.concept-tables :as ct] ...
a8ab11f623dacea9994735fbd56ff6ad703e1c86eaa8c21dc6c2ce0794a3f5e7
Naupio/pitcp
pitcp_acceptor.erl
-module(pitcp_acceptor). -author("Naupio Z.Y. Huang"). -behaviour(gen_server). -export([start_link/7]). %% gen_server call_back function -export([code_change/3, handle_call/3, handle_cast/2, handle_info/2, init/1, terminate/2]). -define(SERVER, ?MODULE). -define(TABLE, ?SERVER). start_link(Ref, NumIndex, Liste...
null
https://raw.githubusercontent.com/Naupio/pitcp/59a7da3a8980695f8efdb3697b026ab0f42754cb/apps/pitcp/src/pitcp_acceptor.erl
erlang
gen_server call_back function
-module(pitcp_acceptor). -author("Naupio Z.Y. Huang"). -behaviour(gen_server). -export([start_link/7]). -export([code_change/3, handle_call/3, handle_cast/2, handle_info/2, init/1, terminate/2]). -define(SERVER, ?MODULE). -define(TABLE, ?SERVER). start_link(Ref, NumIndex, ListenSocket, ProMod, ProModOpt, O...
b77253de138346148262220426be23da69c412306ce479cbdb4e183b7876b459
magnars/what-the-emacsd
core.clj
(ns what-the-emacsd.core (:require [ring.middleware.content-type :refer [wrap-content-type]] [stasis.core :as stasis] [optimus.assets :as assets] [optimus.prime :as optimus] [optimus.optimizations :as optimizations] [optimus.strategies :refer [serve-live-ass...
null
https://raw.githubusercontent.com/magnars/what-the-emacsd/df4fc396b079e17e476336b497f4e9a38f09a977/src/what_the_emacsd/core.clj
clojure
(ns what-the-emacsd.core (:require [ring.middleware.content-type :refer [wrap-content-type]] [stasis.core :as stasis] [optimus.assets :as assets] [optimus.prime :as optimus] [optimus.optimizations :as optimizations] [optimus.strategies :refer [serve-live-ass...
62400b0f84624521f9f21220b1d9a26680c9bd961675885d916930e7705ecc44
jacekschae/learn-re-frame-course-files
log_in.cljs
(ns app.auth.views.log-in) (defn log-in [] [:div "log-in"])
null
https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/12-page-nav/src/app/auth/views/log_in.cljs
clojure
(ns app.auth.views.log-in) (defn log-in [] [:div "log-in"])
b3004b6383efc859dc5a6a3ec293a20501267800fe35c7710debe29160fae2bd
triffon/fp-2022-23
12.count-atoms.rkt
#lang racket (require rackunit rackunit/text-ui) # # # Задача 12 атоми . (define (count-atoms dl) 'тук) (run-tests (test-suite "count-atoms tests" (check-eq? (count-atoms '((1 2 3) (4) ((5 6) ((7))))) 7) (check-eq? (count-atoms '()) 0) (check-eq? (count-atoms '((((((((100))))))))) 1)) 'verbo...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/7778490adf231f7c5f1caf797c6e6c4f467e6329/exercises/cs2/05.scheme.fold-deeplists/12.count-atoms.rkt
racket
#lang racket (require rackunit rackunit/text-ui) # # # Задача 12 атоми . (define (count-atoms dl) 'тук) (run-tests (test-suite "count-atoms tests" (check-eq? (count-atoms '((1 2 3) (4) ((5 6) ((7))))) 7) (check-eq? (count-atoms '()) 0) (check-eq? (count-atoms '((((((((100))))))))) 1)) 'verbo...
db5cc5e2c058c1fabb3d1abbcf166c792dd1b5f6ad3da228bdafdd401871f015
reflectionalist/S9fES
string-translate.scm
Scheme 9 from Empty Space , Function Library By , 2010 ; Placed in the Public Domain ; ( string - translate string1 string2 string3 ) = = > string ; Translate STRING1 by replacing each instance of a character ; that occurs in STRING2 by the character at the corresponding position in STRING3 . STRING -...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/string-translate.scm
scheme
Placed in the Public Domain that occurs in STRING2 by the character at the corresponding but returns a fresh string. Example: (string-translate "a:b:c" ":" "-") ==> "a-b-c" (string-translate "hello, world!" "abcdefghijklmnopqrstuvwxyz"
Scheme 9 from Empty Space , Function Library By , 2010 ( string - translate string1 string2 string3 ) = = > string Translate STRING1 by replacing each instance of a character position in STRING3 . STRING - TRANSLATE does not alter STRING1 " " ) = = > " uryyb , jbeyq ! " (define ...
d173f42b6a57b354e6c829614f19c80452dc0a65b2517b4d2697be28a5a42002
apache/couchdb-mochiweb
mochiweb_http.erl
@author < > 2007 Mochi Media , Inc. %% %% 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/apache/couchdb-mochiweb/53114ba91470e1b9d90e3f6fb663ff6bba43619a/src/mochiweb_http.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright noti...
@author < > 2007 Mochi Media , Inc. to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
2a63d7791152c6edb141dce4c8a9b6221fe569eb3e814b36a403a5adf003c71a
default-kramer/fission-flare
frame.rkt
#lang typed/racket (provide make-first-frame next-frame frame-do-action frame-apply-action frame-extra-occs frame-time-remaining frame-fast-forward frame-catch-up frame-waiting? ) (require "data.rkt" "state.rkt" "../typed-utils.rkt") (define default-timing (let ([fps 30] [falling...
null
https://raw.githubusercontent.com/default-kramer/fission-flare/56969185f9daf8788698b93a5cd01823fdd7b4c2/src/core/frame.rkt
racket
Almost every time we advance to a new frame, we want to keep track of any events that were generated. This will be a common return value: There are probably a couple of initial values we could use for `info` here; '(falling) is one that works. Check whether time attack time has expired. This can only happen durin...
#lang typed/racket (provide make-first-frame next-frame frame-do-action frame-apply-action frame-extra-occs frame-time-remaining frame-fast-forward frame-catch-up frame-waiting? ) (require "data.rkt" "state.rkt" "../typed-utils.rkt") (define default-timing (let ([fps 30] [falling...
bd724935d0ca411e028c5793ba3c0ec4c3e973a688d7bd6e58cd9c84c9a7100f
damianfral/ghcaniuse
Types.hs
# LANGUAGE DeriveGeneric # module GHCanIUse.Types where import BasicPrelude import Data.Aeson import Data.Text (pack) import Data.Time.Calendar (Day (..), showGregorian) import GHC.Generics import Text.Parsec data GHCRelease = GHCRelease { rele...
null
https://raw.githubusercontent.com/damianfral/ghcaniuse/2ac70a2e71918e8e58f324ca1f034daa4a79acba/src/GHCanIUse/Types.hs
haskell
# LANGUAGE DeriveGeneric # module GHCanIUse.Types where import BasicPrelude import Data.Aeson import Data.Text (pack) import Data.Time.Calendar (Day (..), showGregorian) import GHC.Generics import Text.Parsec data GHCRelease = GHCRelease { rele...
e58f9a1c0f40c571839626c46c3747c8bed219193e7e607fdb52e94c45503bbf
emqx/emqx
emqx_batch_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_batch_SUITE.erl
erlang
-------------------------------------------------------------------- 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 ...
Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_batch_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("eu...
5ef3baf2bbed5fd594f6a6c08fb37580bf808d70fbcc1b463cada668939c1811
epiccastle/bbssh
test_host_key.clj
(ns bb-test.test-host-key (:require [bb-test.docker :as docker] [clojure.test :refer [is deftest]])) (deftest host-key (docker/cleanup) (docker/build {:root-password "root-access-please"}) (docker/start {:ssh-port 9876}) #_(let [agent (agent/new) kp (keys/create-key-pair agent :rsa-nopas...
null
https://raw.githubusercontent.com/epiccastle/bbssh/89dd42e7a73488dee042f622a92d5ded22ffa9b7/test/bb_test/test_host_key.clj
clojure
(ns bb-test.test-host-key (:require [bb-test.docker :as docker] [clojure.test :refer [is deftest]])) (deftest host-key (docker/cleanup) (docker/build {:root-password "root-access-please"}) (docker/start {:ssh-port 9876}) #_(let [agent (agent/new) kp (keys/create-key-pair agent :rsa-nopas...
17a98f0b89b9f0f52db27fb57cdb5734500cabf5ec4b427dd4d83fce0d118738
zyrolasting/polyglot
entry.rkt
#lang racket/base (require raco/command-name racket/cmdline racket/function racket/path racket/vector unlike-assets/logging unlike-assets file-watchers "../../main.rkt" "build.rkt" "develop.rkt" "publish.rkt" "start.rkt" "demo.rkt" "shared.rkt") (show-debug? #f) (show-colors? ...
null
https://raw.githubusercontent.com/zyrolasting/polyglot/d27ca7fe90fd4ba2a6c5bcd921fce89e72d2c408/polyglot-lib/polyglot/private/cli/entry.rkt
racket
#lang racket/base (require raco/command-name racket/cmdline racket/function racket/path racket/vector unlike-assets/logging unlike-assets file-watchers "../../main.rkt" "build.rkt" "develop.rkt" "publish.rkt" "start.rkt" "demo.rkt" "shared.rkt") (show-debug? #f) (show-colors? ...
bed3240cfc396db48bf1348d1766e3f6fa1e62b8f8f5f7473fc443e0a371f26c
locusmath/locus
object.clj
(ns locus.hyper.quiver.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/hyper/quiver/object.clj
clojure
the concrete category of sets and multivalued functions. Hyperquivers are one of the most basic examples of hypercopresheaves, which are functors to the allegory Rel of sets and with a set of edges where the source, target, and other components of the edges can target vertices. In accordance with this interpretatio...
(ns locus.hyper.quiver.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :...
71907f4dfa7ab0d00ef6095a4816c05ee514dd7c184588f92d5cc2a682e40841
fourmolu/fourmolu
strictness-four-out.hs
data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/data/gadt/strictness-four-out.hs
haskell
# UNPACK # # UNPACK #
data Foo a where
a659ef123453622326e2a91cd5180d2d6a98fc297303c3aa358ba9c31c51355e
eeng/mercurius
simulation.clj
(ns mercurius.simulation.adapters.processes.simulation (:require [clojure.spec.alpha :as s] [mercurius.accounts.domain.entities.user :refer [new-user]] [mercurius.trading.domain.entities.ticker :as ticker] [mercurius.wallets.domain.entities.wallet :as wallet :refer [available-balan...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/simulation/adapters/processes/simulation.clj
clojure
(ns mercurius.simulation.adapters.processes.simulation (:require [clojure.spec.alpha :as s] [mercurius.accounts.domain.entities.user :refer [new-user]] [mercurius.trading.domain.entities.ticker :as ticker] [mercurius.wallets.domain.entities.wallet :as wallet :refer [available-balan...
0de964ed8a866d5e50ee5419cfb98f4a27b361b00603b25547fe4a5f9648c275
basho/riak_cs_core
riak_cs_xml.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. 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 . Y...
null
https://raw.githubusercontent.com/basho/riak_cs_core/d4059c90393df2ad1377396fdbb40c8f16d531bb/src/riak_cs_xml.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 permiss...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. 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 ...
f482d46a7945996238cd3f69fd8512b7f3c9a4cbf317c8b0ae8d789f51309fca
sky-big/RabbitMQ
pg_local.erl
This file is a copy of pg2.erl from the R13B-3 Erlang / OTP %% distribution, with the following modifications: %% 1 ) Process groups are node - local only . %% 2 ) Groups are created / deleted implicitly . %% 3 ) ' join ' and ' leave ' are asynchronous . %% 4 ) the type specs of the exported non - callback fu...
null
https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/pg_local.erl
erlang
distribution, with the following modifications: extracted into a separate, guarded section, and rewritten in old-style spec syntax, for better compatibility with older removed. %CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with t...
This file is a copy of pg2.erl from the R13B-3 Erlang / OTP 1 ) Process groups are node - local only . 2 ) Groups are created / deleted implicitly . 3 ) ' join ' and ' leave ' are asynchronous . 4 ) the type specs of the exported non - callback functions have been versions of Erlang / OTP . The remaining...
ee5667e5550f5fb5633d1eb32e75abb8770f55e8393cfebade8d5dbd1a7130d3
schemedoc/implementation-metadata
bit.scm
(title "BIT") (person "Danny Dubé") (person "Marc Feeley") (academy "Universite de Montreal") (paper (type phdthesis) (title "Un système de programmation Scheme pour micro-contrôleur") (author "Danny Dubé") (year "1997") (url "/~dadub100/files/memoire.pdf")) (paper (type article) (title "Un GC temps réel semi...
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/bit.scm
scheme
(title "BIT") (person "Danny Dubé") (person "Marc Feeley") (academy "Universite de Montreal") (paper (type phdthesis) (title "Un système de programmation Scheme pour micro-contrôleur") (author "Danny Dubé") (year "1997") (url "/~dadub100/files/memoire.pdf")) (paper (type article) (title "Un GC temps réel semi...
c16e4368f81a12a372766ec036d313c1e827762d3cdea7904e4fcb60d3a0e774
nuprl/gradual-typing-performance
manual-scheme.rkt
#lang racket/base (require "../decode.rkt" "../struct.rkt" "../scheme.rkt" "../search.rkt" "../basic.rkt" (only-in "../core.rkt" style style-properties) "manual-style.rkt" "manual-utils.rkt" ;; used via datum->syntax "on-demand.rkt" (for-s...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/scribble/private/manual-scheme.rkt
racket
used via datum->syntax We know that the context is irrelvant Context may be relevant: We want to remove lexical context from identifiers that correspond to module names, but keep context for `lib' or `planet' (which are rarely used)
#lang racket/base (require "../decode.rkt" "../struct.rkt" "../scheme.rkt" "../search.rkt" "../basic.rkt" (only-in "../core.rkt" style style-properties) "manual-style.rkt" "on-demand.rkt" (for-syntax racket/base) (for-label racket/base)) ...
32b8f02c1efb2602ec903706aace5e86de3e682b52552383a3f24433f6613fcd
dpiponi/Moodler
sum.hs
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane sum9 <- new' "sum" container7 <- container' "panel_int_add.png" (x+(0.0), y+(0.0)) (Inside root) plugin10 <- plugin' (sum9 ! "signal1") (x+(-60.0), y+(24.0)) (Outside container7) setColour plugin10 "#sample" ...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/sum.hs
haskell
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane sum9 <- new' "sum" container7 <- container' "panel_int_add.png" (x+(0.0), y+(0.0)) (Inside root) plugin10 <- plugin' (sum9 ! "signal1") (x+(-60.0), y+(24.0)) (Outside container7) setColour plugin10 "#sample" ...
eccd9a6296a38ec9b696faeb03e054020e7c7d7371bfc27b9cf46829f7d08952
input-output-hk/cardano-wallet
KnownEras.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # -- | Copyright : © 2020 - 2022 IOHK -- License: Apache-2.0 -- -- A type list of known eras, useful for indexed-by-era operations. module C...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/d4b30de073f2b5eddb25bf12c2453abb42e8b352/lib/wallet/src/Cardano/Wallet/Read/Eras/KnownEras.hs
haskell
| License: Apache-2.0 A type list of known eras, useful for indexed-by-era operations.
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # Copyright : © 2020 - 2022 IOHK module Cardano.Wallet.Read.Eras.KnownEras ( KnownEras , knownEraIndices ) where import Prelude...
36c99952d7f2e95d22b43150c2c8c4ac80856255411a320d12cf85bf7fcf2b6e
Bodigrim/poly
Multi.hs
-- | -- Module: Data.Poly.Multi Copyright : ( c ) 2020 Licence : BSD3 Maintainer : < > -- Sparse multivariate polynomials with ' ' instance . -- @since 0.5.0.0 # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE PatternSynonyms #-} module Data.Poly.Multi ( Multi...
null
https://raw.githubusercontent.com/Bodigrim/poly/6c90b18f7cbbf3a4d5d1e25a05fe4aca2b4d31fa/src/Data/Poly/Multi.hs
haskell
| Module: Data.Poly.Multi # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2020 Licence : BSD3 Maintainer : < > Sparse multivariate polynomials with ' ' instance . @since 0.5.0.0 # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Data.Poly.Multi ( MultiPoly , VMultiPoly , UMultiPoly , unMultiPoly , toMultiPoly , monomi...
6d2f021cc42e0ecaf76e26d3bc1f1209f09a6f27f4271d29e235dd828ae7582a
ijvcms/chuanqi_dev
merge_lib.erl
%%%------------------------------------------------------------------- %%% @author qhb ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 13 . 六月 2016 下午4:13 %%%------------------------------------------------------------------- -module(merge_lib). -include("common.hrl"). -include("cache.hrl"). -include("db_...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/merge/merge_lib.erl
erlang
------------------------------------------------------------------- @author qhb @doc @end ------------------------------------------------------------------- API GEN API 启动全部任务 开始多线程执行任务 处理任务 角色 账号 仇人 好友 帮会 邮件 红包 特武 clear_ets() -> ets:delete(?ETS_MERGE_PLAYER_NAME), ets:delete(?ETS_MERGE_GUILD), ets:delete...
( C ) 2016 , < COMPANY > Created : 13 . 六月 2016 下午4:13 -module(merge_lib). -include("common.hrl"). -include("cache.hrl"). -include("db_record.hrl"). -include("record.hrl"). -define(PAGE_SIZE, 50). -define(TIMER_FRAME, 2). -define(THREAD_NUM, 10). -define(ETS_MERGE_PLAYER, ets_merge_player). -define(ETS_MERGE_PLAY...
46a0711e8fe7e8b1adb24970a6efa1dabd7017938043c0e28240120b2de4f591
haskell-works/hw-prim
Head.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module HaskellWorks.Data.Head ( Container(..) , Head(..) ) where import Data.Int import Data.Word import HaskellWorks.Data.Container import Prelude hiding (head) import qualified...
null
https://raw.githubusercontent.com/haskell-works/hw-prim/aff74834cd2d3fb0eb4994b24b2d1cdef1e3e673/src/HaskellWorks/Data/Head.hs
haskell
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module HaskellWorks.Data.Head ( Container(..) , Head(..) ) where import Data.Int import Data.Word import HaskellWorks.Data.Container import Prelude hiding (head) import qualified...
bab1a54b58744f0932ee7b22bbdcdeca51bb483d82e9e710b479c53939581b58
alanz/ghc-exactprint
T9238.hs
compareDouble :: Double -> Double -> Ordering compareDouble x y = case (isNaN x, isNaN y) of (True, True) -> EQ (True, False) -> LT (False, True) -> GT (False, False) -> -- Make -0 less than 0 case (x == 0, y == 0, isNegativeZero x, isNegativeZero y) of ...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T9238.hs
haskell
Make -0 less than 0
compareDouble :: Double -> Double -> Ordering compareDouble x y = case (isNaN x, isNaN y) of (True, True) -> EQ (True, False) -> LT (False, True) -> GT (False, False) -> case (x == 0, y == 0, isNegativeZero x, isNegativeZero y) of (True, True, True, False) -> L...
945b0bd51ec17202bd0ead721cec13fe7f33da7b1c12c16b84efbb29b63ec42a
stevenvar/OMicroB
window.ml
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/stevenvar/OMicroB/99a2e781f9511137090aaba3c09e2e920c0dbc77/src/simulators/circuit/window.ml
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . open Printf;; type window = { win_width : int; win_height : int; win_bgcolor : Color.t; win_title : string; } let window = ref None;; let text_color c = let b = c mod...
e54bedf47870f14668c5b47fc7d2708032e0dc1589b36a390a257e47025287e9
ankushdas/Nomos
Ast.ml
open Sexplib.Std module R = Arith type ext = Mark.ext option (* optional extent (source region info) *) [@@deriving sexp] type potential = | Arith of R.arith (* p,q, potential for work *) | Star (* potential to be inferred *) [@@deriving sexp] (* Functional Types *) (* Ses...
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/nomos/nomos-lib/Ast.ml
ocaml
optional extent (source region info) p,q, potential for work potential to be inferred Functional Types Session Types l,k for internal and external choice v, for types defined with v = A f, for processes defined with f = P channel name with modes +{...} &{...} A *[m] B A -o[m] B |> A or |{p}...
open Sexplib.Std module R = Arith [@@deriving sexp] type potential = [@@deriving sexp] [@@deriving sexp] type func_tp = | Integer | Boolean | String | Address | ListTP of func_tp * potential | Arrow of func_tp * func_tp | VarT of string [@@deriving sexp] type mode = Shared | Linear | Transa...
0ed19f41cbb57ca0aae22652ce9bfdb673d3bf03828376d096b7429210756c92
runeksvendsen/bitcoin-payment-channel
Main.hs
# LANGUAGE CPP , BangPatterns # module Main where import qualified PaymentChannel.Test as Pay import Criterion.Main import Test.QuickCheck (sample') #if !MIN_VERSION_bytestring(0,10,0) instance NFData B.ByteString #endif payCount = 1000 :: Integer main :: IO () main = do (arbPair,_) <- fmap head $ sample' $ Pa...
null
https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/bench/Main.hs
haskell
# LANGUAGE CPP , BangPatterns # module Main where import qualified PaymentChannel.Test as Pay import Criterion.Main import Test.QuickCheck (sample') #if !MIN_VERSION_bytestring(0,10,0) instance NFData B.ByteString #endif payCount = 1000 :: Integer main :: IO () main = do (arbPair,_) <- fmap head $ sample' $ Pa...
b5557903bc97c21c9310d0702615c5f7f6474b3371d53b30d1750fbb2a8bf94a
ghcjs/ghcjs
t5237.hs
{-# LANGUAGE BangPatterns #-} module Main (main) where -- Test that the rewrite rules for small exponents fire (#5237). -- If they don't fire, this will allocate much. fun :: Double -> Double fun x = go 0 1.0 where go !acc z | x < z = acc | otherwise = go (acc + 1/z^4) (z+1.0) main :: IO () main ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/perf/t5237.hs
haskell
# LANGUAGE BangPatterns # Test that the rewrite rules for small exponents fire (#5237). If they don't fire, this will allocate much.
module Main (main) where fun :: Double -> Double fun x = go 0 1.0 where go !acc z | x < z = acc | otherwise = go (acc + 1/z^4) (z+1.0) main :: IO () main = print (fun 1e7)
7fd3bb7a9af9fb3832fdda01f9fd49377516a4d3bb20983ce86c059447aa3159
cljspad/cljspad
right_pane.cljs
(ns cljspad.right-pane (:require [cljspad.editor :as editor] [cljspad.util :as util] [nextjournal.clojure-mode.keymap :as keymap] [clojure.string :as str] [rehook.core :as rehook] [rehook.dom :refer-macros [defui]] [rehook.util :as rehook.util] ...
null
https://raw.githubusercontent.com/cljspad/cljspad/f59ca0b8562e996cea36842427e74a57d4d2de48/src/cljspad/right_pane.cljs
clojure
\"></iframe>") \"></iframe>") Adapted from -mode/blob/master/demo/src/nextjournal/clojure_mode/demo.cljs#L131
(ns cljspad.right-pane (:require [cljspad.editor :as editor] [cljspad.util :as util] [nextjournal.clojure-mode.keymap :as keymap] [clojure.string :as str] [rehook.core :as rehook] [rehook.dom :refer-macros [defui]] [rehook.util :as rehook.util] ...
6cfc878945e09c43e10956fc010c85d38cbd5c78aad114cb1e0dc9315c8de586
cram2/cram
selecting-process-modules.lisp
;;; Copyright ( c ) 2017 , < > < > < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; ...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_tutorials/cram_beginner_tutorial/src/selecting-process-modules.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redi...
Copyright ( c ) 2017 , < > < > < > * Neither the name of the Institute for Artificial Intelligence/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE C...
9e065349564623f0f40053ad124e1d019f9a855c7469a294f00954138277c9b9
unnohideyuki/bunny
sample162.hs
f g x y = do g (x + y) g (x * y) main = f print 2 3
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample162.hs
haskell
f g x y = do g (x + y) g (x * y) main = f print 2 3
292d19ca34d3f83a058d6c39cc7841ff01862b4009215bb7f309e9d12dd9bf3a
wpfjtmwls/TensorFlOcaml
check.ml
(* File used to import dependencies when compiling *) open Owl (* Graph *) open Tf open Tfchain open Tfgraph open Tfgraphst open Tfnode (* File io *) open Fileio (* Tests *) open Alexnet open Jaynet open Mnistnet (* Other *) let x = "wow"
null
https://raw.githubusercontent.com/wpfjtmwls/TensorFlOcaml/aa08d5da1f622e40dc0002e3879aab70b928e132/check.ml
ocaml
File used to import dependencies when compiling Graph File io Tests Other
open Owl open Tf open Tfchain open Tfgraph open Tfgraphst open Tfnode open Fileio open Alexnet open Jaynet open Mnistnet let x = "wow"
16e28070c004cdc219bb6dffd59a518a6008ef4913b21068a11487a41eb92233
clojure/data.xml
dom.cljs
Copyright ( c ) and contributors . 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 t...
null
https://raw.githubusercontent.com/clojure/data.xml/12cc9934607de6cb4d75eddb1fcae30829fa4156/src/main/clojure/clojure/data/xml/js/dom.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 ) and contributors . All rights reserved . (ns clojure.data.xml.js.dom (:require [clojure.data.xml.name :refer [qname-uri qname-local qname xmlns-uri]] [clojure.data.xml.node :as node])) (def doc (.. (js/DOMParser.) (parseFromString "<d />" "text/xml"))) (defn text-node "Create ...
6a2aec9a7c1ab230816574b3f590e2ce08e3e9d2c305a2f3f0a18b543ce56b84
dimitri/pginstall
github.lisp
;;; Parse github repositories information ;;; (in-package #:pginstall.common) (defun parse-extension-uri (uri) "Parse given URI as a github http project uri" (let ((uri (puri:parse-uri uri))) (when (string= "github.com" (puri:uri-host uri)) (destructuring-bind (abs user repo) (puri:uri-parsed-path uri...
null
https://raw.githubusercontent.com/dimitri/pginstall/66e4274fc544c48be03c719f8d3f03955649a994/src/common/github.lisp
lisp
Parse github repositories information (in-package #:pginstall.common) (defun parse-extension-uri (uri) "Parse given URI as a github http project uri" (let ((uri (puri:parse-uri uri))) (when (string= "github.com" (puri:uri-host uri)) (destructuring-bind (abs user repo) (puri:uri-parsed-path uri) ...
d8ef5f144be2f65cb9e2a87e357ad0f40e90cb00dbdde1cc9e6eb39d1af09269
funcatron/tron
shared.clj
(ns funcatron.tron.substrate.shared (:import (funcatron.abstractions ContainerSubstrate))) (defmulti ^ContainerSubstrate dispatch-substrate "A multi-method that dispatches to the right substrate provider" (fn [opts] (-> opts :options :substrate_type)) )
null
https://raw.githubusercontent.com/funcatron/tron/cfe0c227f9c3ad88b3d072b0319954786afb5f15/src/clojure/funcatron/tron/substrate/shared.clj
clojure
(ns funcatron.tron.substrate.shared (:import (funcatron.abstractions ContainerSubstrate))) (defmulti ^ContainerSubstrate dispatch-substrate "A multi-method that dispatches to the right substrate provider" (fn [opts] (-> opts :options :substrate_type)) )
1b865049f84199d8b8acb123c1898ed93edb3f9cc0b05a0d709328126700137e
plumatic/grab-bag
weight_vector.clj
(ns flop.weight-vector (:use plumbing.core) (:require [hiphip.double :as d] [plumbing.io :as io] [flop.array :as fa] [flop.map :as fm]) (:import [flop IWeightVector LongDoubleFeatureVector] [gnu.trove TLongDoubleHashMap])) (set! *warn-on-reflection* true) (deftype SparseWeightVector [^TLongDou...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/flop/src/flop/weight_vector.clj
clojure
TODO: this should be areduce now.
(ns flop.weight-vector (:use plumbing.core) (:require [hiphip.double :as d] [plumbing.io :as io] [flop.array :as fa] [flop.map :as fm]) (:import [flop IWeightVector LongDoubleFeatureVector] [gnu.trove TLongDoubleHashMap])) (set! *warn-on-reflection* true) (deftype SparseWeightVector [^TLongDou...