_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
6d54ed496494d1d62704dff497ef5f88fddf5408901787ae9c1748c7cae65505
mtgred/netrunner
lobby_chat.cljs
(ns nr.lobby-chat (:require [nr.avatar :refer [avatar]] [nr.translations :refer [tr]] [nr.ws :as ws] [reagent.core :as r] [reagent.dom :as rdom])) (defn send-message [state current-game] (let [text (:msg @state)] (when (and (string? text) (not-empty text)) (ws/ws-send! [:lobby/say {:gameid...
null
https://raw.githubusercontent.com/mtgred/netrunner/42c5ecc6a7c69c173822c0e9ef1a8d09b02b5bdc/src/cljs/nr/lobby_chat.cljs
clojure
(ns nr.lobby-chat (:require [nr.avatar :refer [avatar]] [nr.translations :refer [tr]] [nr.ws :as ws] [reagent.core :as r] [reagent.dom :as rdom])) (defn send-message [state current-game] (let [text (:msg @state)] (when (and (string? text) (not-empty text)) (ws/ws-send! [:lobby/say {:gameid...
575f50131068b9f01767faf244265f1d70790cbdb7aee81d52ecf651013ab920
malcolmreynolds/GSLL
vector-standard-deviation.lisp
Regression test VECTOR - STANDARD - DEVIATION for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST VECTOR-STANDARD-DEVIATION (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 26.815303904668458d0) (MULTIPLE-VALUE-LIST ...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/vector-standard-deviation.lisp
lisp
Regression test VECTOR - STANDARD - DEVIATION for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST VECTOR-STANDARD-DEVIATION (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 26.815303904668458d0) (MULTIPLE-VALUE-LIST ...
7a6fcb5d3a524eaad9e30587d57552e0cef7f6d550ca1c9bcfb97296668e4ee0
elm-lang/elm-make
Package.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Pipeline.Crawl.Package where import Control.Arrow (second) import Control.Monad.Except (liftIO, throwError) import qualified Data.Map as Map import qualified Data.Text as Text import qualified Elm.Compiler as Compiler import qualified Elm.Compiler.Module ...
null
https://raw.githubusercontent.com/elm-lang/elm-make/1fa57acfafa9a6baa1fc99a8df312f2e8144debd/src/Pipeline/Crawl/Package.hs
haskell
# LANGUAGE OverloadedStrings # STATE and ENVIRONMENT DEPTH FIRST SEARCH find all paths that match the unvisited module name see if we found a unique path for the name FIND LOCAL FILE PATH FOREIGN MODULES -- which ones are available, who exposes them?
# OPTIONS_GHC -Wall # module Pipeline.Crawl.Package where import Control.Arrow (second) import Control.Monad.Except (liftIO, throwError) import qualified Data.Map as Map import qualified Data.Text as Text import qualified Elm.Compiler as Compiler import qualified Elm.Compiler.Module as Module import qualified Elm.Pack...
f1f50f9661d2fe31180aa67b6d2306af057a0411df5c60bc5cdbefd7a6ae2dd0
theodormoroianu/SecondYearCourses
HaskellChurchMonad_20210415135448.hs
module HaskellChurchMonad where A boolean is any way to choose between two alternatives newtype CBool t = CBool {cIf :: t -> t -> t} toBool :: CBool Bool -> Bool toBool b = cIf b True False The boolean constant true always chooses the first alternative cTrue :: CBool t cTrue = CBool $ \t f -> t The boolean consta...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurchMonad_20210415135448.hs
haskell
The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply it on them. A natural nu...
module HaskellChurchMonad where A boolean is any way to choose between two alternatives newtype CBool t = CBool {cIf :: t -> t -> t} toBool :: CBool Bool -> Bool toBool b = cIf b True False The boolean constant true always chooses the first alternative cTrue :: CBool t cTrue = CBool $ \t f -> t The boolean consta...
4c5567dd160729add62508211a3503a5b9f940a38a4a8fb3503c0841574262de
screenshotbot/screenshotbot-oss
css-package.lisp
;; Copyright 2018-Present Modern Interpreters Inc. ;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :build-utils/css-package (:use :cl :asdf :alexandria) (:import...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/0dc4627a08a251f86f306a47098e8ff8463146cb/src/build-utils/css-package.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. choco install sass
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :build-utils/css-package (:use :cl :asdf :alexandria) (:import-from :build-utils/js-package :web-ass...
e7e9cd6e664780dff049807aa1510d879fee25fe38a3af96ecd1fff4d217e06c
timbertson/opam2nix
main.mli
(* intentionally left empty *)
null
https://raw.githubusercontent.com/timbertson/opam2nix/36b7627a8409f28aae295f9a0f8a9a8d143a0f14/src/main.mli
ocaml
intentionally left empty
ed303d49f56673f5422bbf3a18b89627a765f274ded84ff39f1c0b112c65a1ae
typelead/etlas
PreExistingComponent.hs
-- | See <-proposals/blob/backpack/proposals/0000-backpack.rst> module Distribution.Backpack.PreExistingComponent ( PreExistingComponent(..), ipiToPreExistingComponent, ) where import Prelude () import Distribution.Compat.Prelude import Distribution.Backpack.ModuleShape import Distribution.Backpack import Dis...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Backpack/PreExistingComponent.hs
haskell
| See <-proposals/blob/backpack/proposals/0000-backpack.rst> | Stripped down version of 'LinkedComponent' for things we don't need to know how to build. munged to @z-pkg-z-lib@, but we still want to use it when we see | The actual name of the component. | Convert an 'InstalledPackageInfo' into a 'PreExistingCompo...
module Distribution.Backpack.PreExistingComponent ( PreExistingComponent(..), ipiToPreExistingComponent, ) where import Prelude () import Distribution.Compat.Prelude import Distribution.Backpack.ModuleShape import Distribution.Backpack import Distribution.Types.ComponentId import Distribution.Types.MungedPack...
11ca10704b722db2136d405af6614aaff43f7111d023546962a0b59b86af05ca
Enucatl/polygen
main.ml
* * main.ml : main code * * Alvise Spano ' ( 2002 - 03 ) * Polygen * main.ml: main code * * Alvise Spano' (2002-03) *) open Printf open List open Prelude open Prelude open Absyn open Check open Pre open Gen open Err open Io (* argument parsing *) type mode = Check | Prep...
null
https://raw.githubusercontent.com/Enucatl/polygen/447c424e3720c6d9151332e573a184722fe41e06/src/main.ml
ocaml
argument parsing auxiliary stuff main load complied or source grammar generate store compiled grammar main code
* * main.ml : main code * * Alvise Spano ' ( 2002 - 03 ) * Polygen * main.ml: main code * * Alvise Spano' (2002-03) *) open Printf open List open Prelude open Prelude open Absyn open Check open Pre open Gen open Err open Io type mode = Check | Preprocess | Generate let...
57b283e25399ab9401af3f31901324e438c9b81f0785edac97ae999007c3450e
hexlet-codebattle/battle_asserts
missing_third_angle.clj
(ns battle-asserts.issues.missing-third-angle (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["math"]) (def description {:en "2 out of 3 angles are given in a triangle, in degrees. Write a function that classifies the missing angle as \"acute\", \"right\", or \"obtu...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/cbaa4900c49ae698bc6f9ea0c08c3019c388e9ff/src/battle_asserts/issues/missing_third_angle.clj
clojure
(ns battle-asserts.issues.missing-third-angle (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["math"]) (def description {:en "2 out of 3 angles are given in a triangle, in degrees. Write a function that classifies the missing angle as \"acute\", \"right\", or \"obtu...
ca4637a7906fd8b851f4cffb4b60d4352e2d4ce8e51e47e66901f0943d1ac24d
NelosG/fp-tests
T5.hs
module HW2.T5 * EvaluationError (..) , ExceptState (..) -- * map functions , eval , joinExceptState , mapExceptState , modifyExceptState , wrapExceptState ) where import HW2.T1 (Annotated ((:#)), Except (Error, Success)) import HW2.T4 (Expr (Op, Val), Prim (Abs, Add, Div, Mul, Sgn, Sub)) data...
null
https://raw.githubusercontent.com/NelosG/fp-tests/3dca9fc604f6adc499e50829adab7ff0365a585f/hw2/src/HW2/T5.hs
haskell
* map functions
module HW2.T5 * EvaluationError (..) , ExceptState (..) , eval , joinExceptState , mapExceptState , modifyExceptState , wrapExceptState ) where import HW2.T1 (Annotated ((:#)), Except (Error, Success)) import HW2.T4 (Expr (Op, Val), Prim (Abs, Add, Div, Mul, Sgn, Sub)) data ExceptState e s a = ES...
658e2ce1313f3062be45e3d36c8f053bb8f88bf619dac6a74ef4a0408ffa468b
Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator
MonadSpec.hs
{-# LANGUAGE OverloadedStrings #-} module OpenAPI.Generate.MonadSpec where import Control.Monad.Reader import Data.Bifunctor import Data.GenValidity.Text () import Data.List import qualified Data.Map as Map import qualified Data.Text as T import Data.Validity.Text () import qualified OpenAPI.Generate.Log as OAL impor...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/f3b4cb29bd0e921352b4cd0ced924556f191d613/openapi3-code-generator/test/OpenAPI/Generate/MonadSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module OpenAPI.Generate.MonadSpec where import Control.Monad.Reader import Data.Bifunctor import Data.GenValidity.Text () import Data.List import qualified Data.Map as Map import qualified Data.Text as T import Data.Validity.Text () import qualified OpenAPI.Generate.Log as OAL import OpenAPI.Generate.Monad import qua...
a4ca4bdbc6eb6cf7a2c1d54c189e6d43e7de66af12c9c346b4ed1cb2c6feac8e
osa1/StrictCore
Simplify.hs
-- This is where we experiment with program transformation ideas. module StrictCore.Simplify ( simplifyPgm , initSimplEnv ) where -------------------------------------------------------------------------------- import Coercion import Id import Outputable import Type hiding (substTy) import VarEnv import Stric...
null
https://raw.githubusercontent.com/osa1/StrictCore/f546099a0d345bc32297cd212edaf5197251886f/src/StrictCore/Simplify.hs
haskell
This is where we experiment with program transformation ideas. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ not sure what to d...
module StrictCore.Simplify ( simplifyPgm , initSimplEnv ) where import Coercion import Id import Outputable import Type hiding (substTy) import VarEnv import StrictCore.Syntax import Data.Bifunctor (second) import Prelude hiding (id) data SimplEnv = SimplEnv { seTvSubst :: TyVarEnv Type , seCvSubst ...
afb5b6932feea2c739144ab2dd272c75ca3b6ea1272c6d8839ae563532b8d9b7
AshleyYakeley/Truth
Database.hs
module Pinafore.Storage.Database where import Pinafore.Base import Pinafore.Storage.Table import Shapes data TripleTable t where TriplePredicate :: TripleTable Predicate TripleSubject :: TripleTable Entity TripleValue :: TripleTable Entity instance Show (TripleTable t) where show TriplePredicate = "p...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/7b22fdc3e003241fd246c6989ee2aa162060466e/Pinafore/pinafore-base/lib/Pinafore/Storage/Database.hs
haskell
module Pinafore.Storage.Database where import Pinafore.Base import Pinafore.Storage.Table import Shapes data TripleTable t where TriplePredicate :: TripleTable Predicate TripleSubject :: TripleTable Entity TripleValue :: TripleTable Entity instance Show (TripleTable t) where show TriplePredicate = "p...
a3cda26333b6eb2418cd3513f4aed1259477fd31c9f740128100cca12d18c6bd
arttuka/reagent-material-ui
single_input_date_range_field_pro.cljs
(ns reagent-mui.x.single-input-date-range-field-pro "Imports @mui/x-date-pickers-pro/SingleInputDateRangeField as a Reagent component. Original documentation is at -pickers/single-input-date-range-field/ ." (:require [reagent.core :as r] ["@mui/x-date-pickers-pro/SingleInputDateRangeField" :as MuiSin...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/4fc4b44891919d2b84160eb411d52227dd89e0a5/src/x/reagent_mui/x/single_input_date_range_field_pro.cljs
clojure
(ns reagent-mui.x.single-input-date-range-field-pro "Imports @mui/x-date-pickers-pro/SingleInputDateRangeField as a Reagent component. Original documentation is at -pickers/single-input-date-range-field/ ." (:require [reagent.core :as r] ["@mui/x-date-pickers-pro/SingleInputDateRangeField" :as MuiSin...
6427b48b36dc5bbcd5b99cdc56f887d92e57bdbf7e0732b7f98f011484164378
UnixJunkie/rankers
common.ml
Copyright ( C ) 2019 , laboratory , Department of Bioscience and Bioinformatics , Faculty of Computer Science and Systems Engineering , Kyushu Institute of Technology , 680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan . Yamanishi laboratory, Department of Bioscience and Bioin...
null
https://raw.githubusercontent.com/UnixJunkie/rankers/4844aacfc4738abb7120d5c72ff9351b979e3878/src/common.ml
ocaml
functionalities common to several modules KDE/PDE at test_mol ranking score using KDE variables to monitor optimization progress we don't have a gradient => _gradient best AUC seen up to now local optimizer that will be passed to the global one local, gradient-free I don't set parameter bounds on the l...
Copyright ( C ) 2019 , laboratory , Department of Bioscience and Bioinformatics , Faculty of Computer Science and Systems Engineering , Kyushu Institute of Technology , 680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan . Yamanishi laboratory, Department of Bioscience and Bioin...
fecd56f437c56782ede7c57ddd61aa40f9c9eeae83dd43ca1aa0328c37e678de
sdiehl/llvm-codegen
Foreign.hs
# LANGUAGE ScopedTypeVariables # Adapted from 's old bindings module LLVM.Codegen.Foreign where import Foreign.Ptr(alignPtr, Ptr) import Foreign.Storable(Storable(poke, sizeOf, alignment)) import Foreign.Marshal.Alloc(allocaBytes) import Foreign.Marshal.Array(allocaArray, pokeArray) withPtr :: Storable a => a ->...
null
https://raw.githubusercontent.com/sdiehl/llvm-codegen/6a88ecb4bc5af53491e5013d6a61181a2eeb41df/src/LLVM/Codegen/Foreign.hs
haskell
# LANGUAGE ScopedTypeVariables # Adapted from 's old bindings module LLVM.Codegen.Foreign where import Foreign.Ptr(alignPtr, Ptr) import Foreign.Storable(Storable(poke, sizeOf, alignment)) import Foreign.Marshal.Alloc(allocaBytes) import Foreign.Marshal.Array(allocaArray, pokeArray) withPtr :: Storable a => a ->...
7918b59409431cff39aae4fd5099e3616c6cac8b09be39ccc03b1cd6499afb79
zxymike93/SICP
235.rkt
#lang sicp ;; 不使用 enumerate-tree 的方法 ;; (define (count-leaves t) ;; (accumulate + 0 ;; (map (lambda (node) ;; (if (not (pair? node)) ;; 1 ;; (count-leaves node))) ;; t))) ;; 估值过程 ( count - leaves...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter2/235.rkt
racket
不使用 enumerate-tree 的方法 (define (count-leaves t) (accumulate + (map (lambda (node) (if (not (pair? node)) 1 (count-leaves node))) t))) 估值过程 tests
#lang sicp 0 ( count - leaves ( ( 1 2 ) ( 3 4 ) ) ) ( accumulate + 0 ( cons ( count - leaves ( 1 2 ) ) ( count - leaves ( 3 4 ) ) ) ) ( accumulate + 0 ( cons ( accumulate + 0 ( cons 1 ( count - leaves ( 2 ) ) ) ) ...
87f8bfead2ca0196b6b4c377b39a9e06ee80e1279ce5064fb857dc1d1ed2d424
jrclogic/SMCDEL
LetterPassing.hs
module SMCDEL.Examples.LetterPassing where import Data.List (sort) import SMCDEL.Language import SMCDEL.Symbolic.S5 hiding (announce) import SMCDEL.Translations.S5 (booloutof) import SMCDEL.Other.Planning explain :: Prp -> String explain (P k) | odd k = "at " ++ show ((k + 1) `div` 2) | otherwise =...
null
https://raw.githubusercontent.com/jrclogic/SMCDEL/10bd5ba2f1f3cc85e4b0f23d5eddbb26f05df5bf/src/SMCDEL/Examples/LetterPassing.hs
haskell
ensure addprops does not overlap with vocabOf (letterStartFor n) publicly pass the letter from i to j: privately tell j who the receiver is:
module SMCDEL.Examples.LetterPassing where import Data.List (sort) import SMCDEL.Language import SMCDEL.Symbolic.S5 hiding (announce) import SMCDEL.Translations.S5 (booloutof) import SMCDEL.Other.Planning explain :: Prp -> String explain (P k) | odd k = "at " ++ show ((k + 1) `div` 2) | otherwise =...
1049e7fd236facc9058a7058b906b534a920d4d09b572982aa3ea00c6c506b3d
40ants/reblocks-ui
form.lisp
(defpackage #:reblocks-ui/form (:use #:cl) (:import-from #:log4cl) (:import-from #:reblocks/actions #:make-action-url #:make-action) (:import-from #:reblocks/html #:with-html) (:import-from #:reblocks/request #:get-path) (:import-from #:reblock...
null
https://raw.githubusercontent.com/40ants/reblocks-ui/4adb19f23601de14e16e09c5cbb09ddf7daf062e/src/form.lisp
lisp
Here we'll close the popup and execute the real submit code. It should be executed only when user hits "OK" button (:h1 confirm-question) A hashmap with placeholders widgets We need this wrapper to handle form errors Here we want to log all unusual exception only, because FORM-ERROR conditions are signaled w...
(defpackage #:reblocks-ui/form (:use #:cl) (:import-from #:log4cl) (:import-from #:reblocks/actions #:make-action-url #:make-action) (:import-from #:reblocks/html #:with-html) (:import-from #:reblocks/request #:get-path) (:import-from #:reblock...
0e8b6775165b5bdf807f2ed5bf865a761697f07e13e5e6eca9ae442bba505ccc
nikodemus/SBCL
array.lisp
;;;; array operations for the PPC VM This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and ...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/ppc/array.lisp
lisp
array operations for the PPC VM more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Allocator for the array header. Additional accessors and setters for the array header. Bounds checking routi...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") (define-vop (make-array-header) (:translate make-array-header) (:policy :fast-safe) (:args (ty...
e02846c26d83ca70840a93d02a967d09b6fe85ccb04c51152f84701e4eaba99a
avsm/eeww
arch.ml
# 2 "asmcomp/amd64/arch.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/asmcomp/amd64/arch.ml
ocaml
************************************************************************ OCaml ...
# 2 "asmcomp/amd64/arch.ml" , projet Cristal , INRIA Rocquencourt Copyright 2000 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let command_line_options = [ "-fPIC", Arg.Set Clflags.pic_code, " Ge...
fbf206c7c1a9980cdb42657bba74ecbef1850519646e12b8fc07d8914fa163e5
amnh/poy5
alphabet.mli
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/alphabet.mli
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
b937875aadbfa35d9ac6756fabb88df82c2b4309f164dfc37f245e705a7d6af8
herd/herdtools7
target.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b70415f92cc358fc0e8453a042f9890b93b5217c/litmus/target.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2014 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
c7f04ede8785e674c6171d8c202f1bcdeb2a26dd1385d7d4ad78905b30a1a72e
haskell-tools/haskell-tools
TypeApp.hs
# LANGUAGE FlexibleContexts , TypeOperators # module TypeApp where import Definitions * FlexibleContexts , FlexibleContexts * f = foo {-* FlexibleContexts *-} * FlexibleContexts , FlexibleContexts , FlexibleContexts , TypeOperators * g = foo {-* FlexibleConte...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/FlexibleContextsTest/TypeApp.hs
haskell
* FlexibleContexts * * FlexibleContexts *
# LANGUAGE FlexibleContexts , TypeOperators # module TypeApp where import Definitions * FlexibleContexts , FlexibleContexts * * FlexibleContexts , FlexibleContexts , FlexibleContexts , TypeOperators *
8f76798d43b8254a2040699a2a15f10c69f90e90bb82568e07eef55536e88310
setzer22/jena-clj
core_test.clj
(ns jena-clj.core-test (:require [clojure.test :refer :all] [sparql.core :refer :all])) "TODO: Add tests" (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/setzer22/jena-clj/3720efbe77dccd53a5a90c4cd5707398a7e6abba/test/jena_clj/core_test.clj
clojure
(ns jena-clj.core-test (:require [clojure.test :refer :all] [sparql.core :refer :all])) "TODO: Add tests" (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
a5ceacde89973a3f3ed94b2d337988f93739e43504a567df13123b6348e1131f
wilkerlucio/pathom-viz
worker.cljs
(ns com.wsscode.pathom.viz.electron.renderer.worker (:require [com.wsscode.async.processing :as wap] [com.wsscode.transito :as wt] [com.wsscode.async.async-cljs :refer [go-promise <! go <? <!p <?maybe]] [com.wsscode.pathom3.connect.operation :as pco] [com.wsscode.pathom...
null
https://raw.githubusercontent.com/wilkerlucio/pathom-viz/e1951a10074074cc8dd7bd70e5b600f14b070e9e/src/electron/com/wsscode/pathom/viz/electron/renderer/worker.cljs
clojure
(ns com.wsscode.pathom.viz.electron.renderer.worker (:require [com.wsscode.async.processing :as wap] [com.wsscode.transito :as wt] [com.wsscode.async.async-cljs :refer [go-promise <! go <? <!p <?maybe]] [com.wsscode.pathom3.connect.operation :as pco] [com.wsscode.pathom...
aba97d6fb6790cb05fa7b7b5183ddfc5be61c36632ccabd1314025399708dbe1
mokus0/hs-hdf5
File.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleInstances # module Bindings.HDF5.File ( AccFlags(..) , ObjType(..) , Scope(..) , isHDF5 , File , createFile , openFile , reopenFile , flushFile , closeFile , mountFile , unmountFile , getF...
null
https://raw.githubusercontent.com/mokus0/hs-hdf5/196e0d714a34e97358be9a907af0b93b4c7922e3/src/Bindings/HDF5/File.hs
haskell
, get_mdc_config , get_mdc_hit_rate , get_mdc_size , reset_mdc_hit_rate_stats , set_mdc_config TODO: determine whether all of these are valid for _both_ create and open. any that are not should be converted to Bool inputs to the corresponding function. It very well may be best to separate several...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleInstances # module Bindings.HDF5.File ( AccFlags(..) , ObjType(..) , Scope(..) , isHDF5 , File , createFile , openFile , reopenFile , flushFile , closeFile , mountFile , unmountFile , getF...
741f720ff0c212a320e86386d04f050fe419ecc79b454e4c5354a465d4d2b38f
ranjitjhala/brick-tac-toe
Player.hs
module Model.Player where import Model.Board ( ) ) ------------------------------------------------------------------------------- -- | Players and Strategies --------------------------------------------------- ------------------------------------------------------------------------------- data Player = Player ...
null
https://raw.githubusercontent.com/ranjitjhala/brick-tac-toe/51fde4eb4807aa9d500df84293b85ffa1535b436/src/Model/Player.hs
haskell
----------------------------------------------------------------------------- | Players and Strategies --------------------------------------------------- ----------------------------------------------------------------------------- ^ current cursor ^ current board ^ naught or cross ^ next move
module Model.Player where import Model.Board ( ) ) data Player = Player { plName :: String , plStrat :: Strategy } human :: Player human = Player "human" (\p _ _ -> return p) rando :: Player rando = Player "machine" randomStrategy randomStrategy :: a -> Board -> b -> IO Pos randomStrategy _ b _ = ...
94cf71f312665240038d52fc1ac2b01332e860bab69c9f3e60df11c2984e3ad5
ranjitjhala/haddock-annot
Constraints.hs
----------------------------------------------------------------------------- -- | Module : Distribution . Client . Dependency . . Constraints Copyright : ( c ) 2008 -- License : BSD-like -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- A set of satisfiable d...
null
https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/cabal-install-0.10.3/Distribution/Client/Dependency/TopDown/Constraints.hs
haskell
--------------------------------------------------------------------------- | License : BSD-like Maintainer : Stability : provisional Portability : portable A set of satisfiable dependencies (package version constraints). --------------------------------------------------------------------------- |...
Module : Distribution . Client . Dependency . . Constraints Copyright : ( c ) 2008 module Distribution.Client.Dependency.TopDown.Constraints ( Constraints, empty, choices, isPaired, constrain, Satisfiable(..), conflicting, ) where import Distribution.Client.Dependency.TopDown.Types...
021c949d7932ff2697a9a3afceb706ec835de8b6bc2d5580c9319af8cb8adf87
cxphoe/SICP-solutions
3.80.rkt
(define (RLC R L C dt) (lambda (vc0 il0) (define v (integral (delay dv) vc0 dt)) (define dv (scale-stream i (/ -1 C))) (define i (integral (delay di) il0 dt)) (define di (add-streams (scale-stream v (/ 1 L)) (scale-stream i (/ (- R) L)))) (cons v i)))
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/5.Stream/3.80.rkt
racket
(define (RLC R L C dt) (lambda (vc0 il0) (define v (integral (delay dv) vc0 dt)) (define dv (scale-stream i (/ -1 C))) (define i (integral (delay di) il0 dt)) (define di (add-streams (scale-stream v (/ 1 L)) (scale-stream i (/ (- R) L)))) (cons v i)))
a77592f4a3e513a37c4d3a82d47eaabdfd03cf0fb94721f2c6e58b13867fc3b4
oakes/Nightmod
overlay.clj
(ns nightmod.overlay (:require [nightmod.docs :as docs] [nightmod.repl :as repl] [nightcode.editors :as editors] [nightcode.ui :as ui] [nightcode.utils :as nc-utils] [nightmod.screens :as screens] [nightmod.utils :as u] [seesaw.core :...
null
https://raw.githubusercontent.com/oakes/Nightmod/e1145a49d96c5322aaf4bdd5493ae14a7f0c0f8a/src/clojure/nightmod/overlay.clj
clojure
(ns nightmod.overlay (:require [nightmod.docs :as docs] [nightmod.repl :as repl] [nightcode.editors :as editors] [nightcode.ui :as ui] [nightcode.utils :as nc-utils] [nightmod.screens :as screens] [nightmod.utils :as u] [seesaw.core :...
fed06be9aa8ddca45d8a3d5d353fafca36e320e4ee410b16bec78047a178b011
sid5432/cljotdr
supparams.clj
(ns cljotdr.supparams (:require [cljotdr.utils :refer :all]) (:gen-class)) (defn- fields [fmtno] (list "supplier", ; ............. 0 ................. 1 ............. 2 ............... 3 ........... 4 ............. 5 "other", ; ................ 6 ) ) (defn- read-field [raf fmtno field] ...
null
https://raw.githubusercontent.com/sid5432/cljotdr/26141424a889b347864b5170a6ad7f9085fceca7/src/cljotdr/supparams.clj
clojure
............. 0 ................ 6 map doall let if do if get block header if let if process each field return recur let if loop ======================================================== write header let if loop (println "\tDEBUG: " bname " block: loop finished") (println "Old block size " (get-...
(ns cljotdr.supparams (:require [cljotdr.utils :refer :all]) (:gen-class)) (defn- fields [fmtno] (list ................. 1 ............. 2 ............... 3 ........... 4 ............. 5 ) ) (defn- read-field [raf fmtno field] (get-string raf) ) (defn- dump "dump results to screen" [...
fd2ad9865ce1d7ba7500bf7178bdad21ee03bbbaa0745950cae1efe0fbbbbe40
yapsterapp/er-cassandra
lookup_table_helpers.clj
(ns er-cassandra.migrations.lookup-table-helpers (:require [clojure.set :as set] [er-cassandra.record :as r] [prpr.promise :refer [ddo]] [prpr.stream :as stream])) (defn populate-lookup-table [cassandra {source-name :name source-columns :columns :as source-table} {lookup-name :name lo...
null
https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/migrations/lookup_table_helpers.clj
clojure
(ns er-cassandra.migrations.lookup-table-helpers (:require [clojure.set :as set] [er-cassandra.record :as r] [prpr.promise :refer [ddo]] [prpr.stream :as stream])) (defn populate-lookup-table [cassandra {source-name :name source-columns :columns :as source-table} {lookup-name :name lo...
60198e6643bb70c0a5063be92cc503206eb4b426353d0936808775004e1da42b
Nutr1t07/wl-bot
Main.hs
{-# LANGUAGE OverloadedStrings #-} import Control.Concurrent ( forkIO ) import Control.Exception ( SomeException , try ) import Control.Lens ( (^.) ) i...
null
https://raw.githubusercontent.com/Nutr1t07/wl-bot/985e27caf2d492c32e5e73b64f0bc5f718e72c76/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # config <- liftIO $ do r <- try $ Wreq.post ((oriConfig ^. mirai_server) <> "verify") case r of Right r' -> case decodeSessionKey $ r' ^. responseBody of Nothing -> Just key -> do _ <- Wreq.post ((oriConfig ^. mirai_server) <> "verify") $ p...
import Control.Concurrent ( forkIO ) import Control.Exception ( SomeException , try ) import Control.Lens ( (^.) ) import Control.Monad ...
70b948c5cda322113f99ac8798ad2dba43dea870fa2a38ca6a904ee8d86a5464
mishadoff/project-euler
problem004.clj
(ns project-euler.problem004) (defn palindrome? [s] (= s (reverse s))) (defn palindrome-number? [n] (palindrome? (seq (str n)))) Elapsed time : 297.596835 msecs (defn euler-004 [] (reduce max (filter palindrome-number? (for [i (range 100 1000) j (range i 1000)] (* i j)))))
null
https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem004.clj
clojure
(ns project-euler.problem004) (defn palindrome? [s] (= s (reverse s))) (defn palindrome-number? [n] (palindrome? (seq (str n)))) Elapsed time : 297.596835 msecs (defn euler-004 [] (reduce max (filter palindrome-number? (for [i (range 100 1000) j (range i 1000)] (* i j)))))
ff682f34e5213a3507e6f6c4488966718aa46b1abae0dde81ab793b08eb6baee
UnkindPartition/tasty
failing-pattern-test.hs
import Test.Tasty import Test.Tasty.Options import Test.Tasty.HUnit import Data.Typeable import System.Random import Control.Monad (replicateM) import Control.Monad.State (State, state, evalState) newtype Seed = Seed Int deriving Typeable instance IsOption Seed where defaultValue = Seed 0 parseValue = fmap Seed...
null
https://raw.githubusercontent.com/UnkindPartition/tasty/164cdc88a7c341e10719385f046ddadb8feac826/core-tests/failing-pattern-test.hs
haskell
import Test.Tasty import Test.Tasty.Options import Test.Tasty.HUnit import Data.Typeable import System.Random import Control.Monad (replicateM) import Control.Monad.State (State, state, evalState) newtype Seed = Seed Int deriving Typeable instance IsOption Seed where defaultValue = Seed 0 parseValue = fmap Seed...
b835fd2ab7c81aa22893573ea195ee599462cc53deb174f56d91ceaf8822d3c9
diku-dk/futhark
Pretty.hs
# OPTIONS_GHC -fno - warn - orphans # -- | Futhark prettyprinter. This module defines 'Pretty' instances for the AST defined in " Language . . Syntax " . module Language.Futhark.Pretty ( prettyString, prettyTuple, leadingOperator, IsName (..), Annot (..), ) where import Control.Monad import Da...
null
https://raw.githubusercontent.com/diku-dk/futhark/cbb1453dd7df80372ef2bc4de1f5e8a948baa377/src/Language/Futhark/Pretty.hs
haskell
| Futhark prettyprinter. This module defines 'Pretty' instances language. This is used instead of a mere 'Pretty' instance because depending on whether the FUTHARK_COMPILER_DEBUGGING environment with the tag. To avoid erroneously using the 'Pretty' instance for language (as an orphan instance). | Depending on ...
# OPTIONS_GHC -fno - warn - orphans # for the AST defined in " Language . . Syntax " . module Language.Futhark.Pretty ( prettyString, prettyTuple, leadingOperator, IsName (..), Annot (..), ) where import Control.Monad import Data.Char (chr) import Data.Functor import Data.List (intersperse) imp...
06151375ab31cb88b530fdff1655f1fc68fff566ec45e271ce07c8919060a73d
wdebeaum/step
workgroup.lisp
;;;; ;;;; W::WORKGROUP ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::WORKGROUP (SENSES ((LF-PARENT ONT::social-group) (TEMPL count-pred-templ) (meta-data :origin caloy2 :entry-date 20050522 :change-date nil :comments meeting-understanding) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/workgroup.lisp
lisp
W::WORKGROUP
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::WORKGROUP (SENSES ((LF-PARENT ONT::social-group) (TEMPL count-pred-templ) (meta-data :origin caloy2 :entry-date 20050522 :change-date nil :comments meeting-understanding) ) ) ) ))
4ee2581a288a9d14fe7aa87204d4f14aa3bd1c87d041a5f865e5f0ec355a223b
mitchellwrosen/hspolls
Throw.hs
# LANGUAGE UndecidableInstances # module Hp.Eff.Throw ( ThrowEffect(..) , throw , runThrow ) where import Hp.Eff.FirstOrder (FirstOrderEffect(..)) import Control.Effect import Control.Effect.Carrier import Control.Effect.Sum import qualified Control.Effect.Error as Error data ThrowEffect (e :: Type) (m ::...
null
https://raw.githubusercontent.com/mitchellwrosen/hspolls/22efea743194ade091f7daa112a2d9ce985a4500/src/Hp/Eff/Throw.hs
haskell
# LANGUAGE UndecidableInstances # module Hp.Eff.Throw ( ThrowEffect(..) , throw , runThrow ) where import Hp.Eff.FirstOrder (FirstOrderEffect(..)) import Control.Effect import Control.Effect.Carrier import Control.Effect.Sum import qualified Control.Effect.Error as Error data ThrowEffect (e :: Type) (m ::...
67ba7f7be9654de513a3145150e455c9ed27c8a1374483e62a98a823d7601090
kupl/LearnML
patch.ml
type btree = Empty | Node of (int * btree * btree) let rec mem (n : int) (tree : btree) : bool = match tree with | Empty -> false | Node (x, left, right) -> if n = x then true else if mem n left = true then mem n left else mem n right
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/mem/sub8/patch.ml
ocaml
type btree = Empty | Node of (int * btree * btree) let rec mem (n : int) (tree : btree) : bool = match tree with | Empty -> false | Node (x, left, right) -> if n = x then true else if mem n left = true then mem n left else mem n right
7bde7624cf4523cfd0027b0ecb7acb83b3a7cb96716f64bfc62b324f4c79b981
unisonweb/unison
Blank.hs
module Unison.Blank where import Unison.Prelude loc :: Recorded loc -> loc loc (Placeholder loc _) = loc loc (Resolve loc _) = loc nameb :: Blank loc -> Maybe String nameb (Recorded (Placeholder _ n)) = Just n nameb (Recorded (Resolve _ n)) = Just n nameb _ = Nothing data Recorded loc = -- A user-provided named p...
null
https://raw.githubusercontent.com/unisonweb/unison/7843e48cddbe46436bffb5a2e1bb5fb444f55302/unison-core/src/Unison/Blank.hs
haskell
A user-provided named placeholder A name to be resolved with type-directed name resolution.
module Unison.Blank where import Unison.Prelude loc :: Recorded loc -> loc loc (Placeholder loc _) = loc loc (Resolve loc _) = loc nameb :: Blank loc -> Maybe String nameb (Recorded (Placeholder _ n)) = Just n nameb (Recorded (Resolve _ n)) = Just n nameb _ = Nothing data Recorded loc Placeholder loc String ...
2ecef95f3a2136970d2fe5105798e3a148826e9e2ac069042c2b27a36bf2ff85
exoscale/clojure-kubernetes-client
v1beta1_json_schema_props.clj
(ns clojure-kubernetes-client.specs.v1beta1-json-schema-props (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1beta1-json-schema-props :refer :all] [clojure-kubernetes-client.specs.v1beta1-json-schema-pr...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_json_schema_props.clj
clojure
(ns clojure-kubernetes-client.specs.v1beta1-json-schema-props (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1beta1-json-schema-props :refer :all] [clojure-kubernetes-client.specs.v1beta1-json-schema-pr...
bf79d42850d4eb11cfeab26199a031db7473277d88c95541f9f86d04744e2c87
ucsd-progsys/lh-plugin-demo
Client.hs
{-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} {-@ LIQUID "--no-termination" @-} module Demo.Client where import Language.Haskell.Liquid.Equational import Demo.Lib bump :: Int -> Int bump n = if n > 0 then incr n else 0 data Simple = A | B | C {-@ reflect test @-} test :: Simple -> Maybe Bool...
null
https://raw.githubusercontent.com/ucsd-progsys/lh-plugin-demo/8867be15a91b519fbdfa585db201e54679768ea2/src/Demo/Client.hs
haskell
@ LIQUID "--reflection" @ @ LIQUID "--ple" @ @ LIQUID "--no-termination" @ @ reflect test @
module Demo.Client where import Language.Haskell.Liquid.Equational import Demo.Lib bump :: Int -> Int bump n = if n > 0 then incr n else 0 data Simple = A | B | C test :: Simple -> Maybe Bool test A = Just True test _ = Nothing @ : : { test A = = Just True } @ testProof :: Proof testProof = test A ==. Just Tr...
5ac00a34849aa370141726882068671076312d29ea38b89f1c76acb6bb2cbf44
appleby/99-lisp-problems
p48.lisp
( * * ) Truth tables for logical expressions ( 3 ) . ;;;; problem P47 in such a way that the logical expression ;;;; may contain any number of logical variables. Define table in a way that ( table ) prints the truth table for the expression , which contains the logical variables enumerated ;;;; in List. ;;;...
null
https://raw.githubusercontent.com/appleby/99-lisp-problems/a12b2a585ac5af06f456f844d308bbada78e647c/p48.lisp
lisp
may contain any number of logical variables. Define table in a in List. Example: * (table '(A B C) '((A and (B or C)) equ ((A and B) or (A and C)))). true true true true true true nil true true nil true true true nil nil true nil true true true nil true nil true nil nil true true nil nil nil true Every r...
( * * ) Truth tables for logical expressions ( 3 ) . problem P47 in such a way that the logical expression way that ( table ) prints the truth table for the expression , which contains the logical variables enumerated (in-package :99-problems) (defun n-tuples (n values) (if (= n 0) '(()) (loo...
0df077efbc944adcde04fd8d652e786dacb39c489797a4ae5e806f366beb7eaa
xtdb/xtdb
walkthrough.clj
load a repl with the latest xtdb - core dependency , e.g. using clj : $ clj -Sdeps ' { : { com.xtdb/xtdb-core { : mvn / version " RELEASE " } } } ' (ns walkthrough.xtdb-standalone (:require [xtdb.api :as xt]) (:import (xtdb.api IXtdb))) this in - memory configuration is the easiest way to try XTDB , no ne...
null
https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/docs/example/repl-walkthrough/walkthrough.clj
clojure
transaction containing a `put` operation, optionally specifying a valid time id id transaction containing a `match` operation check old version put new version if it matches transaction containing a `delete` operation, historical versions remain transaction containing an `evict` operation, historical data is de...
load a repl with the latest xtdb - core dependency , e.g. using clj : $ clj -Sdeps ' { : { com.xtdb/xtdb-core { : mvn / version " RELEASE " } } } ' (ns walkthrough.xtdb-standalone (:require [xtdb.api :as xt]) (:import (xtdb.api IXtdb))) this in - memory configuration is the easiest way to try XTDB , no ne...
4064b6c70916f71be06e0abe85f0529ce6f6ba07f2498bbafaca12e619a31e03
davexunit/guile-2d
coroutine.scm
(use-modules (2d agenda) (2d coroutine) (2d game) (2d scene) (2d sprite) (2d stage) (2d vector2)) (define (enter sprite) ;; Simple script that moves the sprite to a random location every second . (agenda-schedule (colambda () (...
null
https://raw.githubusercontent.com/davexunit/guile-2d/83d9dfab5b04a337565cb2798847b15e4fbd7786/examples/coroutine.scm
scheme
Simple script that moves the sprite to a random location every
(use-modules (2d agenda) (2d coroutine) (2d game) (2d scene) (2d sprite) (2d stage) (2d vector2)) (define (enter sprite) second . (agenda-schedule (colambda () (while #t (set-sprite-position! sprite (vector...
c83f75c205e52ec62c10bcc3cb1138833e64ca7b76ab0de4e7863a9847360bd9
db48x/xe2
derelict.lisp
(in-package :void) ;;; Infested oxygenless ships (defcell bulkhead (name :initform "Bulkhead") (tile :initform "grayplate") (categories :initform '(:opaque :obstacle)) (descriptions :initform "It's a bulkhead.")) (defcell corridor (name :initform "Airless Corridor") (tile :initform "grayplate-dark") (...
null
https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/void/derelict.lisp
lisp
Infested oxygenless ships Oxygen tank replenishes your air The obelix patrollers randomly sprinkle some fire around edges The derelict freighter. create airless corridor space create walls create border around world drop wall blocks ("pallets") don't wall in the player drop groups of boxes drop enemies dr...
(in-package :void) (defcell bulkhead (name :initform "Bulkhead") (tile :initform "grayplate") (categories :initform '(:opaque :obstacle)) (descriptions :initform "It's a bulkhead.")) (defcell corridor (name :initform "Airless Corridor") (tile :initform "grayplate-dark") (categories :initform '(:magneti...
5cb41c26b836ef037c6d51062445e2c60e2bbb4b6e14f898fa82ab39b2af2041
erlang/erlide_kernel
erlide_dialyze.erl
%% Author: jakob Created : 17 feb 2010 -module(erlide_dialyze). %% %% Include files %% -define(DEBUG , 1 ) . -include("erlide_dbglog.hrl"). -include_lib("kernel/include/file.hrl"). %% %% Exported Functions %% -export([dialyze/5, format_warnings/1, check_plt/1]). %% %% API Functions %% dialyz...
null
https://raw.githubusercontent.com/erlang/erlide_kernel/f3628a75061156e6239c636f6f45fbcf17b608fc/common/apps/erlide_tools/src/erlide_dialyze.erl
erlang
Author: jakob Include files Exported Functions API Functions Local Functions
Created : 17 feb 2010 -module(erlide_dialyze). -define(DEBUG , 1 ) . -include("erlide_dbglog.hrl"). -include_lib("kernel/include/file.hrl"). -export([dialyze/5, format_warnings/1, check_plt/1]). dialyze(Files, PltFiles, Includes, FromSource, NoCheckPLT) -> From = case FromSource of ...
b67fa6c084e1ec0e450d46f8d2d8b13d385bfdb82e51d41078ce1886ce5e21a3
stevenvar/OMicroB
temp2.ml
let%node min(a,b) ~return:c = c = if a < b then a else b let%node max(a,b) ~return:c = c = if a > b then a else b * calcul de la proportion ( en % ) * let%node update_prop (wtemp,ctemp) ~return:(prop) = delta = min (10,max (-10,wtemp-ctemp)); delta2 = if delta < 0 then (-delta * delta) else (delta*delta); ...
null
https://raw.githubusercontent.com/stevenvar/OMicroB/453e078ca3c67eddaa1e2dc07fc5564839261c64/tests/tempereuse/temp2.ml
ocaml
let%node min(a,b) ~return:c = c = if a < b then a else b let%node max(a,b) ~return:c = c = if a > b then a else b * calcul de la proportion ( en % ) * let%node update_prop (wtemp,ctemp) ~return:(prop) = delta = min (10,max (-10,wtemp-ctemp)); delta2 = if delta < 0 then (-delta * delta) else (delta*delta); ...
3172cabfc2fda11ffdef777e3782f7b29d028fbce1b8df3613bd02b34d020136
LdBeth/CLFSWM
xmms.lisp
;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Music Player Daemon (MPD) interface ;;; ------------------------------------------------------------...
null
https://raw.githubusercontent.com/LdBeth/CLFSWM/4e936552d1388718d2947a5f6ca3eada19643e75/contrib/xmms.lisp
lisp
-------------------------------------------------------------------------- CLFSWM - FullScreen Window Manager -------------------------------------------------------------------------- Documentation: Music Player Daemon (MPD) interface -------------------------------------------------------------------------- ...
( C ) 2015 < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . Documentation : Handle the XMMS player This code needs xmmsctrl . (in...
3c8723b5e667b460c8fe95aac4fc19b6c60a74332c9b087487ffb8d6709c34e3
haskell-tls/hs-tls
Benchmarks.hs
{-# LANGUAGE BangPatterns #-} module Main where import Connection import Certificate import PubKey import Gauge.Main import Control.Concurrent.Chan import Network.TLS import Network.TLS.Extra.Cipher import Data.X509 import Data.X509.Validation import Data.Default.Class import Data.IORef import qualified Data.ByteStri...
null
https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/core/Benchmarks/Benchmarks.hs
haskell
# LANGUAGE BangPatterns # our parameters at each iteration unfortunately not sure the number actually make sense for anything. improve .. Resumption and a larger message can be a demonstration of the symmetric
module Main where import Connection import Certificate import PubKey import Gauge.Main import Control.Concurrent.Chan import Network.TLS import Network.TLS.Extra.Cipher import Data.X509 import Data.X509.Validation import Data.Default.Class import Data.IORef import qualified Data.ByteString as B import qualified Data....
5f7494c0e89acebaeecd1d5f26dbcd709a0169bb1cc6f08cdddd6b18f95103c1
mwand/5010-examples
wall.rkt
#lang racket (require "interfaces.rkt") (require 2htdp/image) (provide Wall%) ;;; The Wall% class (define Wall% (class* object% (SWidgetPublisher<%>) (init-field [pos INITIAL-WALL-POSITION]) ; the x position of the wall ; is the wall selected? Default is false. (init-field [selected? ...
null
https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/11-7-separate-files/wall.rkt
racket
The Wall% class the x position of the wall is the wall selected? Default is false. if the wall is selected, the x position of the last button-down event near the wall, otherwise can be any value. the list of registered listeners ListOf(WidgetListener<%>) WidgetListener<%> -> Int EFFECT: registers th...
#lang racket (require "interfaces.rkt") (require 2htdp/image) (provide Wall%) (define Wall% (class* object% (SWidgetPublisher<%>) (init-field [selected? false]) (init-field [saved-mx 0]) (field [listeners empty]) (super-new) (define/public (register b) ...
5af77ab6703b0a09e473f114778b1d160c0a9b90224d432f06af9006ab2605c1
haskell-tools/haskell-tools
PatternSynonymTypeSig_res.hs
# LANGUAGE PatternSynonyms # module Refactor.RenameDefinition.PatternSynonymTypeSig where data Type = App String [Type] pattern ArrowAppl :: Type -> Type -> Type pattern ArrowAppl t1 t2 = App "->" [t1, t2]
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/RenameDefinition/PatternSynonymTypeSig_res.hs
haskell
# LANGUAGE PatternSynonyms # module Refactor.RenameDefinition.PatternSynonymTypeSig where data Type = App String [Type] pattern ArrowAppl :: Type -> Type -> Type pattern ArrowAppl t1 t2 = App "->" [t1, t2]
50597549eeff6ec28f0cc28ea270183f9c272495fb7f49e86c37c8c78e41f102
agda/agda2hs
ScopedTypeVariables.hs
# LANGUAGE ScopedTypeVariables # module ScopedTypeVariables where foo :: forall a . Eq a => a -> Bool foo x = it x == x where it :: a -> a it = const x bar :: forall a b . a -> b -> (b -> b) -> b bar x y f = baz y where baz :: b -> b baz z = f (f z)
null
https://raw.githubusercontent.com/agda/agda2hs/037b8b8980254ff110733ff205e7d60e412287e3/test/golden/ScopedTypeVariables.hs
haskell
# LANGUAGE ScopedTypeVariables # module ScopedTypeVariables where foo :: forall a . Eq a => a -> Bool foo x = it x == x where it :: a -> a it = const x bar :: forall a b . a -> b -> (b -> b) -> b bar x y f = baz y where baz :: b -> b baz z = f (f z)
a93bef22a143b5f84cd79fa1277f17c079a2c8b0049fd887a0b9b83b70fe622f
fmi/fp2015
version2-problem4.rkt
#lang racket (require rackunit) (require rackunit/text-ui) (define (sum ns) (apply + ns)) (define (zip-with f xs ys) (map f xs ys)) (define (zip xs ys) (zip-with cons xs ys)) (define (fst pair) (car pair)) (define (snd pair) (cdr pair)) (define (id x) x) (define (compose f g) (lambda (x) (f (g x...
null
https://raw.githubusercontent.com/fmi/fp2015/ea2ea5448c6c054b00c280590e2e56ee782278e9/exam1/version2-problem4.rkt
racket
#lang racket (require rackunit) (require rackunit/text-ui) (define (sum ns) (apply + ns)) (define (zip-with f xs ys) (map f xs ys)) (define (zip xs ys) (zip-with cons xs ys)) (define (fst pair) (car pair)) (define (snd pair) (cdr pair)) (define (id x) x) (define (compose f g) (lambda (x) (f (g x...
95e65cb404aa16013f4aeda5431d1f09d4f09fec63717988e01f3005fe628ed9
clj-commons/useful
bean.clj
(ns flatland.useful.bean "Modify bean attributes in clojure." (:require [clojure.string :as s]) (:import (java.beans Introspector PropertyDescriptor) (java.lang.reflect Method))) (defn- property-key [^PropertyDescriptor property] (keyword (-> property .getName (s/replac...
null
https://raw.githubusercontent.com/clj-commons/useful/dc5cdebf8983a2e2ea24ec8951fbb4dfb037da45/src/flatland/useful/bean.clj
clojure
(ns flatland.useful.bean "Modify bean attributes in clojure." (:require [clojure.string :as s]) (:import (java.beans Introspector PropertyDescriptor) (java.lang.reflect Method))) (defn- property-key [^PropertyDescriptor property] (keyword (-> property .getName (s/replac...
4f81543990a06055bfe6531c7e2a6dfeb64d7cc65efcd908b584af20eea13149
YoEight/eventstore
Integration.hs
{-# LANGUAGE OverloadedStrings #-} -------------------------------------------------------------------------------- -- | -- Module : Test.Integration Copyright : ( C ) 2017 -- License : (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- Portability : non-portable -- Main integration ent...
null
https://raw.githubusercontent.com/YoEight/eventstore/8ca0f72acfc85b97de0a1862d38ee6e9f2ae2e4c/tests/Test/Integration.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ | Module : Test.Integration License : (see the file LICENSE) Stability : provisional Portability : non-portable ------------------------------------------------------------------------------ ------------...
Copyright : ( C ) 2017 Maintainer : < > Main integration entry point . module Test.Integration (tests) where import Database.EventStore.Internal.Test import Test.Tasty import Test.Tasty.Hspec import qualified Test.Integration.Tests as Tests tests :: IO [TestTree] tests = testSpecs Tests.spec
e906b66cdf8c92e0629d026d1c04badc35e2130415973b505a193dde52ae5cba
project-oak/hafnium-verification
CallFlags.mli
* Copyright ( c ) 2009 - 2013 , Monoidics ltd . * 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) 2009-2013, Monoidics ltd. * Copyright (c) Facebook, In...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/IR/CallFlags.mli
ocaml
* The Smallfoot Intermediate Language: Call Flags * Flags for a procedure call * Default value where all fields are set to false
* Copyright ( c ) 2009 - 2013 , Monoidics ltd . * 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) 2009-2013, Monoidics ltd. * Copyright (c) Facebook, In...
ff260648ba693804b05ec263884bf74a48c4d21fd24436c02606fae7073f4077
ubf/ubf-abnf
abnf_rfc5234_core.erl
%%% Description: rfc5234_core module %%%------------------------------------------------------------------- -module(abnf_rfc5234_core). NOTE the following two lines -compile({parse_transform,abnf_contract_parser}). -add_contract("./test/eunit/rfc5234_core").
null
https://raw.githubusercontent.com/ubf/ubf-abnf/2b203b46d272476cba7780f4961e7ce3c718796f/test/eunit/abnf_rfc5234_core.erl
erlang
Description: rfc5234_core module -------------------------------------------------------------------
-module(abnf_rfc5234_core). NOTE the following two lines -compile({parse_transform,abnf_contract_parser}). -add_contract("./test/eunit/rfc5234_core").
0ae5b29a46da0ef53bd847626d84f4f96eb4869a72fb5a84c61cb36ed11863c5
nyu-acsys/drift
fold_left.ml
let rec fold_left (f:int->int->int) acc xs = match xs with [] -> acc | x::xs' -> fold_left f (f acc x) xs' let rec make_list n = if n < 0 then [] else n :: make_list (n - 1) let add x y = x + y let main (n:int) (m:int) = if n > 0 then let xs = make_list n in assert (fold_left add m xs >= m) ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DOrder/list/fold_left.ml
ocaml
let rec fold_left (f:int->int->int) acc xs = match xs with [] -> acc | x::xs' -> fold_left f (f acc x) xs' let rec make_list n = if n < 0 then [] else n :: make_list (n - 1) let add x y = x + y let main (n:int) (m:int) = if n > 0 then let xs = make_list n in assert (fold_left add m xs >= m) ...
53da1e6bb2cc8bb31acd72553769995ae935cf07366cd22cdea90eb6327cc049
0x0f0f0f/yasih
LispParser.hs
module Yasih.LispParser where import Yasih.LispTypes import Control.Monad import Control.Monad.Except import Data.Ratio import Data.Complex import Data.Array import Data.IORef import Numeric import Text.Parsec.Char import Text.ParserCombinators.Parsec -- |Parse an expression Parse and evaluate a LispVal returning...
null
https://raw.githubusercontent.com/0x0f0f0f/yasih/d7cedc4e5b4ea5c6c59d2799bbd37524969f2467/src/Yasih/LispParser.hs
haskell
|Parse an expression |Parse a single expression |Parse multiple expressions | Discard leading whitespace |Parser to ignore whitespace |Parse a boolean value |Parse a string |Same as parseDoubleSign but fail if sign is not found |Parse a Number |Convert a LispVal Float or Integer to Haskell Double |Parse a Co...
module Yasih.LispParser where import Yasih.LispTypes import Control.Monad import Control.Monad.Except import Data.Ratio import Data.Complex import Data.Array import Data.IORef import Numeric import Text.Parsec.Char import Text.ParserCombinators.Parsec Parse and evaluate a LispVal returning a monadic value readOrT...
2bcda64a93703e55111b4e0dfcf92b76a34f7924069451a7133eab7cd98612ef
ddmcdonald/sparser
ha.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- copyright ( c ) 1992 - 1995,2020 -- all rights reserved ;;; ;;; File: "HA" ;;; Module: "objects/traces/" Version : July 2020 original flags defined 5/91 . Started adding on / off routines 7/12/95 . ;; Added seg.compl. flags 12/1...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/objects/traces/ha.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "HA" Module: "objects/traces/" Added seg.compl. flags 12/12/95 ---------------- rule induction ---------------- Called from induction-sweep Called from induction-sweep Called from induction-sweep Called from induction-sweep Called f...
copyright ( c ) 1992 - 1995,2020 -- all rights reserved Version : July 2020 original flags defined 5/91 . Started adding on / off routines 7/12/95 . (in-package :sparser) (defvar *trace-induction-sweep* nil) (defvar *trace-induction-triggers* nil) (defun trace-induction-sweep () (setq *trace-ind...
24e97d92b1191ae9c9913c9bf3e20104ef57516b0d619253e26e2e73be432a6f
emhoracek/smooch
WebSpec.hs
{-# LANGUAGE OverloadedStrings #-} module WebSpec (spec) where import Control.Monad (void) import Test.Hspec import Test.Hspec.Fn import Common import Users.Model spec :: Spec spec = fnTests $ do describe "/login" $ do it "should login the user" $ do let...
null
https://raw.githubusercontent.com/emhoracek/smooch/b863a25376caffe7e195c55cc7441c977277d8a7/app/tests/WebSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module WebSpec (spec) where import Control.Monad (void) import Test.Hspec import Test.Hspec.Fn import Common import Users.Model spec :: Spec spec = fnTests $ do describe "/login" $ do it "should login the user" $ do let newUser = NewUser "new" "" "pass" ...
8c152e16d34823816a470b5f7d749208e822d603453d48e077a00070895a3800
bsansouci/bsb-native
my_std.mli
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/my_std.mli
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . Original author : exception Exit_OK exception E...
578c12d4f17afe5651d0a44944038c6dc5124c64dccdd3772fbb1bd7c3a36325
adventuring/tootsville.net
items.lisp
;;;; -*- lisp -*- ;;; src / items.lisp is part of ;;; Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) . ;;; This program is Free Software : you can redistribute it and/or modify it under the term...
null
https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/items.lisp
lisp
-*- lisp -*- © 2018 - 2021 The either version 3 of This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more det...
src / items.lisp is part of Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) . This program is Free Software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License the License , or ( at your option ) any later version . You shoul...
a8b7227a7eefcae8b1a74ee0e8eeec6f617e1a160a07cf2bb628f1e1acd43114
Swirrl/cubiql
project.clj
(defproject swirrl/cubiql "0.7.0-SNAPSHOT" :description "Query RDF Datacubes with GraphQL" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [com.walmartlabs/lacinia "0.23.0-rc-1"] [com.walmartlabs/lacini...
null
https://raw.githubusercontent.com/Swirrl/cubiql/bd09e1b3a2e3ece3a3e52cb5d06ce95d64b09ed7/project.clj
clojure
logging configuration ["vcs" "push"]
(defproject swirrl/cubiql "0.7.0-SNAPSHOT" :description "Query RDF Datacubes with GraphQL" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [com.walmartlabs/lacinia "0.23.0-rc-1"] [com.walmartlabs/lacini...
5d3b827442aee1be614838d0ef5e82577135d67b001f80ba77d269ff3e7606f6
8c6794b6/guile-tjit
t-mod-01.scm
;;; Loop with modulo, with positive divident and postive divisor. (define (loop n x) (let lp ((n n) (acc '())) (if (= n 0) acc (lp (- n 1) (cons (modulo n x) acc))))) (loop 100 17)
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-mod-01.scm
scheme
Loop with modulo, with positive divident and postive divisor.
(define (loop n x) (let lp ((n n) (acc '())) (if (= n 0) acc (lp (- n 1) (cons (modulo n x) acc))))) (loop 100 17)
d93c265cd222d52cdd177b9c4445079769b552b1f54fc337b086025db97cc026
janestreet/memtrace_viewer_with_deps
regexp.ml
open! Core let%expect_test _ = (* A literal match shouldn't succeed here! *) print_string "[a] (regexp)"; [%expect {| [a] (regexp) |}]; (* Only mismatched lines are replaced *) print_endline "hello world"; print_endline "a"; [%expect {| goodbye.* (regexp) [a] (regexp) |}] ;;
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_expect/negative-tests/regexp.ml
ocaml
A literal match shouldn't succeed here! Only mismatched lines are replaced
open! Core let%expect_test _ = print_string "[a] (regexp)"; [%expect {| [a] (regexp) |}]; print_endline "hello world"; print_endline "a"; [%expect {| goodbye.* (regexp) [a] (regexp) |}] ;;
225e89e250f2bfe10510d3fda186c7d924dea107b8be8e48afe77af8e665d070
K2InformaticsGmbH/imem
imem_if_csv.erl
-module(imem_if_csv). -behavior(gen_server). -include("imem.hrl"). -include("imem_if.hrl"). -include("imem_if_csv.hrl"). -include_lib("kernel/include/file.hrl"). -define(CSV_BLOCK_SIZE,?GET_CONFIG(csvBlockSize , [ ] , 4096 , " Minimum number of bytes to read for guessing csv paramaters " ) ) . -define(CSV_MAX_LIN...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/src/imem_if_csv.erl
erlang
CSV escape of " specially treated , {<<"skip123">>,skip,123} gen_server Functions applied with Common Test case re:run(Subject, Pattern, [global]) of nomatch -> 0; {match, Les} -> length(Les) end. last file read completely open next file enough for now but keep next file open to read open next file...
-module(imem_if_csv). -behavior(gen_server). -include("imem.hrl"). -include("imem_if.hrl"). -include("imem_if_csv.hrl"). -include_lib("kernel/include/file.hrl"). -define(CSV_BLOCK_SIZE,?GET_CONFIG(csvBlockSize , [ ] , 4096 , " Minimum number of bytes to read for guessing csv paramaters " ) ) . -define(CSV_MAX_LIN...
c735bcc90a44c4d7cb99c1fdf166ddc3c0a771052e68a2aab335857672264ec4
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163618.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163618.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always chooses the first alternativ...
cadd49cdaa62e4469721978cfa9a9293fb5c69c9d214e3ad31e59e3f4fb2716b
AdRoll/rebar3_format
rebar3_ast_formatter.erl
@doc Default formatter for modules that use the AST to pretty - print code -module(rebar3_ast_formatter). -include_lib("kernel/include/file.hrl"). -export([format/3]). -callback format(erl_syntax:forms(), [pos_integer()], rebar3_formatter:opts()) -> string(). %% @doc Format a file. Appl...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/7292c4e309491a19294ec5b2ff0b86a98b01d72c/src/rebar3_ast_formatter.erl
erlang
@doc Format a file. Use <code>Opts</code> to configure the formatter. arity qualifiers in it were sorted. This function checks whether the option was the export list to have changed. Thankfully, sorting the export list of both before raising an error. @doc Removes line numbers from ASTs to all...
@doc Default formatter for modules that use the AST to pretty - print code -module(rebar3_ast_formatter). -include_lib("kernel/include/file.hrl"). -export([format/3]). -callback format(erl_syntax:forms(), [pos_integer()], rebar3_formatter:opts()) -> string(). Apply formatting rules to a...
e7a872fa08f157dc0acf661ca8b6d3fd3f7dcadf74f36bbbe85b5b3ab298f3d8
fp-works/2019-winter-Haskell-school
Golf.hs
# OPTIONS_GHC -Wall # module Golf where import Data.List.HT import Data.Foldable (fold) skips :: [a] -> [[a]] skips [] = [] skips list@(x : _) = fmap (\(_, index) -> drop 1 . sieve index $ (x : list)) . zip list $ [1..] getSecondIfMax :: (Integer, Integer, Integer) -> [Integer] -> [Integer] getSecondIfMax (a, b, c) l...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week3/stevemao/Golf.hs
haskell
# OPTIONS_GHC -Wall # module Golf where import Data.List.HT import Data.Foldable (fold) skips :: [a] -> [[a]] skips [] = [] skips list@(x : _) = fmap (\(_, index) -> drop 1 . sieve index $ (x : list)) . zip list $ [1..] getSecondIfMax :: (Integer, Integer, Integer) -> [Integer] -> [Integer] getSecondIfMax (a, b, c) l...
75c86a86cca152cc6fe8cace891ed9c66dc57f5412099ab4a8e9e8760fa5a5f9
opencog/pln
icr-rb.scm
URE Configuration file for producing Inference Control Rules ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Load required modules and utils ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-modules (opencog)) (use-modules (opencog ure)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Define inference control rule-base sy...
null
https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/examples/pln/inference-control-meta-learning/icr-rb.scm
scheme
Load required modules and utils ;; Define inference control rule-base system ;; Define icr-bc to evaluation inference control rule implication scope link based on evidence Define pre-processing rule-base to produce antecedants then used by icr-rb Load rules ;; Load the rules. Either w.r.t this file path ...
URE Configuration file for producing Inference Control Rules (use-modules (opencog)) (use-modules (opencog ure)) (define icr-rb (ConceptNode "icr-rb")) (define (icr-bc . args) (apply cog-bc (cons icr-rb args))) (define pp-icr-rb (ConceptNode "pp-icr-rb")) (define (pp-icr-bc . args) (apply cog-bc (cons pp-icr...
d93229fabd927daf0cfef182874de57a57edb229cc6d83e91f6228001859d892
CatalaLang/catala
catala_web_interpreter.ml
open Catala_utils open Driver open Js_of_ocaml let _ = Js.export_all (object%js method interpret (contents : Js.js_string Js.t) (scope : Js.js_string Js.t) (language : Js.js_string Js.t) (trace : bool) = driver (Contents (Js.to_string content...
null
https://raw.githubusercontent.com/CatalaLang/catala/07edff2cd2371581ba0e5664aa32bcf06650bd0e/compiler/catala_web_interpreter.ml
ocaml
open Catala_utils open Driver open Js_of_ocaml let _ = Js.export_all (object%js method interpret (contents : Js.js_string Js.t) (scope : Js.js_string Js.t) (language : Js.js_string Js.t) (trace : bool) = driver (Contents (Js.to_string content...
73ab7bfea55e8253365b18b0696ffab958314d3cdf27d3202f96057151c559b5
threatgrid/ctim
coa_test.clj
(ns ctim.generators.coa-test (:require [clj-momo.test-helpers.core :as mth] [clojure.test :refer [use-fixtures]] [clojure.test.check.clojure-test :refer [defspec]] [ctim.schemas.coa :as coa] [ctim.test-helpers [core :as th] [properties :as prop...
null
https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/test/ctim/generators/coa_test.clj
clojure
New COA
(ns ctim.generators.coa-test (:require [clj-momo.test-helpers.core :as mth] [clojure.test :refer [use-fixtures]] [clojure.test.check.clojure-test :refer [defspec]] [ctim.schemas.coa :as coa] [ctim.test-helpers [core :as th] [properties :as prop...
01f8ac460dcaf29058ff47f51e9fd2b88ee59f53acdcd91c8974d2a15a7e8fbc
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
Application.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema Application module StripeAPI.Types.Application where import qualified Cont...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/Application.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema Application | Defines the object schema located at @components.schemas.application@ in the specification. | id: Unique identifier for the object. Constraints: | name: The name of the application. Constraints: ...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.Application where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import qualified Data....
74bc20ab11929d1c8a1dd72f9957876d80df67fd5042d72ab946c7bcd7d995fd
maximedenes/native-coq
tactics.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tactics/tactics.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Main tactics. * [intro_avoiding i...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Names ...
7b7cbdc900daedf6afdd225f3842fcd1b78f166711080f1c652d7cf231f9fca3
melange-re/melange
test_formatter.ml
let f () = format_of_string "%d%s"
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_formatter.ml
ocaml
let f () = format_of_string "%d%s"
0d9ddec8f9a7f4ab45d540fe94137a4f239e249547faeb8cc2597453eae64d9c
reborg/reclojure
node.clj
(ns reclojure.lang.node (:require [reclojure.lang.protocols.node :as node] [reclojure.lang.box] [clojure.tools.logging :as log] [reclojure.lang.util :as util]) (:import [reclojure.lang.box Box] [java.util.concurrent.atomic AtomicReference]) (:refer-clojure :exclude [...
null
https://raw.githubusercontent.com/reborg/reclojure/c8aae4cc384d59262569cbc9c332e08619f292ef/src/reclojure/lang/node.clj
clojure
if else else
(ns reclojure.lang.node (:require [reclojure.lang.protocols.node :as node] [reclojure.lang.box] [clojure.tools.logging :as log] [reclojure.lang.util :as util]) (:import [reclojure.lang.box Box] [java.util.concurrent.atomic AtomicReference]) (:refer-clojure :exclude [...
e179ecbd58ed274de3cc951c478a42972718bc4672ebdd2708c16ac77e71847d
cse-bristol/110-thermos-ui
zoom_to_selection_control.cljs
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-frontend.zoom-to-selection-control (:require [thermos-frontend.editor-state :as state] [thermos-specs.candidate :as cand...
null
https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/e13b96329f3c95e5a10bae431e8ae9bccdb475f4/src/thermos_frontend/zoom_to_selection_control.cljs
clojure
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-frontend.zoom-to-selection-control (:require [thermos-frontend.editor-state :as state] [thermos-specs.candidate :as cand...
e87a70cb83a0e228fab68f6d25e1895e6c4a90406744b1bb6d0921caf95c75c6
monadbobo/ocaml-core
core_int64.mli
include Int_intf.S with type t = int64 val of_int : int -> t val to_int : t -> int option val of_float : float -> t val to_float : t -> float val of_int32 : int32 -> t val of_nativeint : nativeint -> t val bits_of_float : float -> t val float_of_bits : t -> float val to_int32 : t -> int32 option val to_nativeint : t...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/core_int64.mli
ocaml
include Int_intf.S with type t = int64 val of_int : int -> t val to_int : t -> int option val of_float : float -> t val to_float : t -> float val of_int32 : int32 -> t val of_nativeint : nativeint -> t val bits_of_float : float -> t val float_of_bits : t -> float val to_int32 : t -> int32 option val to_nativeint : t...
c00878fde43e2d811161af9ae2e6c6985f13064365f9c631d7058c3b4b2e2e82
clckwrks/clckwrks
Route.hs
# LANGUAGE FlexibleContexts , RecordWildCards , OverloadedStrings # module Clckwrks.Route where import Clckwrks import Clckwrks.Acid (GetEnableOpenId(..)) import Clckwrks.Admin.Route (routeAdmin) import Clckwrks.BasicTemplate (basicTemplate) import Clckwrks.Monad (calcTLSBaseURI,...
null
https://raw.githubusercontent.com/clckwrks/clckwrks/dd4ea1e2f41066aa5779f1cc22f3b7a0ca8a0bed/Clckwrks/Route.hs
haskell
# LANGUAGE FlexibleContexts , RecordWildCards , OverloadedStrings # module Clckwrks.Route where import Clckwrks import Clckwrks.Acid (GetEnableOpenId(..)) import Clckwrks.Admin.Route (routeAdmin) import Clckwrks.BasicTemplate (basicTemplate) import Clckwrks.Monad (calcTLSBaseURI,...
3966e0d56ad62629989335f6f72c28f1828374489a20447f5f403a9a31c8afb3
penpot/penpot
tasks_gc.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.tasks.tasks-gc "A maintenance task that performs a cleanup of already executed tasks from the data...
null
https://raw.githubusercontent.com/penpot/penpot/b2b224e5a73cfd5a5642e050e731bb401732f6f1/backend/src/app/tasks/tasks_gc.clj
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.tasks.tasks-gc "A maintenance task that performs a cleanup of already executed tasks from the database table." (:require [app....
2c69a7159fafc720854f030880508d9e4ba1b1da17e80b0a6eae396830c14aab
Odie/gd-edit
db_query.clj
(ns gd-edit.db-query (:require [clj-fuzzy.metrics :as metrics] [clojure.string :as str] [gd-edit.utils :as u])) (defn pair-has-key [name] given a a pair of items , where the first item is presumably the key of some hashmap ;; Answer if the key contains a string (fn [pair] (-> (...
null
https://raw.githubusercontent.com/Odie/gd-edit/abc91b6350ca0faa60e6b448cdfaddf056dafa04/src/gd_edit/db_query.clj
clojure
Answer if the key contains a string We're walking over the query predicates query item Is the query predicate actually another sequence of predicates? If not, we assume this is a single predicate Execute it as is Otherwise, we have a sequence of predicates that this kv-pair must all satisfy This means we can c...
(ns gd-edit.db-query (:require [clj-fuzzy.metrics :as metrics] [clojure.string :as str] [gd-edit.utils :as u])) (defn pair-has-key [name] given a a pair of items , where the first item is presumably the key of some hashmap (fn [pair] (-> (first pair) (str/lower-case) ...
b65d61ffaee560044ce2c09b0e654df55eade90e0a0fdace70c939c707dee3cb
facebookincubator/hsthrift
TimeSecTest.hs
Copyright ( c ) Facebook , Inc. and its affiliates . module TimeSecTest (main) where import Test.HUnit import TestRunner import Data.Aeson import Util.TimeSec jsonTest :: Test jsonTest = TestLabel "Aeson instances" $ TestCase $ do assertEqual "toJSON" (Number 123) (toJSON $ Time 123) assertEqual "fromJSON" (...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/tests/TimeSecTest.hs
haskell
Copyright ( c ) Facebook , Inc. and its affiliates . module TimeSecTest (main) where import Test.HUnit import TestRunner import Data.Aeson import Util.TimeSec jsonTest :: Test jsonTest = TestLabel "Aeson instances" $ TestCase $ do assertEqual "toJSON" (Number 123) (toJSON $ Time 123) assertEqual "fromJSON" (...
d216d58e006b6ed05a355176d5a50914175b46cacdca3178c43befa491db31a8
danieljharvey/mimsa
Prim.hs
# LANGUAGE DerivingStrategies # module Calc.Types.Prim ( Prim (..), ) where import qualified Prettyprinter as PP data Prim = PInt Integer | PBool Bool deriving stock (Eq, Ord, Show) instance PP.Pretty Prim where pretty (PInt i) = PP.pretty i pretty (PBool b) = PP.pretty b
null
https://raw.githubusercontent.com/danieljharvey/mimsa/c5bcab3e9f961216cea540edb95a8a66db773980/llvm-calc2/src/Calc/Types/Prim.hs
haskell
# LANGUAGE DerivingStrategies # module Calc.Types.Prim ( Prim (..), ) where import qualified Prettyprinter as PP data Prim = PInt Integer | PBool Bool deriving stock (Eq, Ord, Show) instance PP.Pretty Prim where pretty (PInt i) = PP.pretty i pretty (PBool b) = PP.pretty b
5fc96410f078f5732000abcfa61bd215c15faeffdfc974b3f190b726d4690873
xvw/preface
seq.ml
module Invariant_suite = Preface.Qcheck.Invariant.Suite (Req.Seq) (Preface.Seq.Invariant) (Sample.Int) (Sample.String) (Sample.Float) module Functor_suite = Preface.Qcheck.Functor.Suite (Req.Seq) (Preface.Seq.Functor) (Sample.Int) (Sample.String) (Sample.Float) module Alt_suite = Preface.Qcheck....
null
https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/test/preface_laws_test/seq.ml
ocaml
module Invariant_suite = Preface.Qcheck.Invariant.Suite (Req.Seq) (Preface.Seq.Invariant) (Sample.Int) (Sample.String) (Sample.Float) module Functor_suite = Preface.Qcheck.Functor.Suite (Req.Seq) (Preface.Seq.Functor) (Sample.Int) (Sample.String) (Sample.Float) module Alt_suite = Preface.Qcheck....
567d9256e3359003d8b5f651016066eacf5dfc15feb4fa6897f961262e1e2da4
mentat-collective/Leva.cljs
core.cljs
(ns leva.core "Reagent components and utilities exposing the [hooks](-intro.html) declared by the [Leva]() components GUI. These components make it easy to synchronize state through Clojure's atom interface instead of [React hooks](-intro.html) and callbacks." (:require ["leva" :as l] ["react...
null
https://raw.githubusercontent.com/mentat-collective/Leva.cljs/0c58443158b068a00200a41ea89fd00af20ae761/src/leva/core.cljs
clojure
## Special Input Constructors if false it won't render. This section defines the top-level components available for customizing and declaring elements of the global panel and any subpanels you might create. NOTE that if we want to add a hook deps array here, we can conj it onto the end of the vector returned by ...
(ns leva.core "Reagent components and utilities exposing the [hooks](-intro.html) declared by the [Leva]() components GUI. These components make it easy to synchronize state through Clojure's atom interface instead of [React hooks](-intro.html) and callbacks." (:require ["leva" :as l] ["react...
1cb06dfcf9a07d2e374452674d9ce64fead462e66364c983df53b1a68cfb57b8
Introduction-to-Functional-Programming/simple_exercises
sr_formatter.erl
%%% @doc Formatter to integrate with < a target="_blank " href=" / old - reliable / > . -module(sr_formatter). -behaviour(rebar3_formatter). -export([init/2, format_file/3]). -type state() :: #{opts := proplists:proplist()}. %% @doc Initialize the formatter and generate a state that will be passed in when %...
null
https://raw.githubusercontent.com/Introduction-to-Functional-Programming/simple_exercises/674cc97ac01df41179fdd9a7af0743f6dfa0f780/adolfont/exercism/erlang/accumulate/_build/default/plugins/rebar3_format/src/formatters/sr_formatter.erl
erlang
@doc Formatter to integrate with @doc Initialize the formatter and generate a state that will be passed in when calling other callbacks. @todo Actually implement what @dtip pointed to on If we're running outside the context of rebar3, we can't pre-process the opts with steamroller. We just pray for th...
< a target="_blank " href=" / old - reliable / > . -module(sr_formatter). -behaviour(rebar3_formatter). -export([init/2, format_file/3]). -type state() :: #{opts := proplists:proplist()}. -spec init(rebar3_formatter:opts(), undefined | rebar_state:t()) -> state(). init(Opts, undefined) -> #{opts => pars...
4a0456229d783093f9fca5e34b7c5b2630293d54eb24f76361705c1de729ccfb
crategus/cl-cffi-gtk
gdk.cairo.lisp
;;; ---------------------------------------------------------------------------- gdk.cairo.lisp ;;; The documentation of this file is taken from the 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GDK library . ;;; See <>. The API documentation of the Lisp binding is available ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gdk/gdk.cairo.lisp
lisp
---------------------------------------------------------------------------- See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (at your option) any later versi...
gdk.cairo.lisp The documentation of this file is taken from the 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GDK library . available from < -cffi-gtk/ > . Copyright ( C ) 2012 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesse...
d0fdf99f030491dab85551bf2e7e482730f769bfd69345a77c0909ecbb84e448
askvortsov1/nittany_market
util.ml
open! Core open! Bonsai_web let product_path pid = Printf.sprintf "/products/%d" pid let category_path cname = Printf.sprintf "/browse/%s" cname let edit_listing_path pid = Printf.sprintf "/edit_listing/%d" pid let date_of_epoch stamp = let default_stamp = match stamp with Some s -> s | None -> 0 in let stamp_spa...
null
https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/frontend/util.ml
ocaml
open! Core open! Bonsai_web let product_path pid = Printf.sprintf "/products/%d" pid let category_path cname = Printf.sprintf "/browse/%s" cname let edit_listing_path pid = Printf.sprintf "/edit_listing/%d" pid let date_of_epoch stamp = let default_stamp = match stamp with Some s -> s | None -> 0 in let stamp_spa...
7e326b63b3536bcfe4fd74be342a6c15b7dc648241475341ee4778d85afadf73
devn/codeq-playground
core_test.clj
(ns codeq-playground.core-test (:use clojure.test codeq-playground.core)) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/devn/codeq-playground/d03450d9aea6ee827fd60ac7e29b3c2995fbdbb6/test/com/thinkslate/codeq_playground/core_test.clj
clojure
(ns codeq-playground.core-test (:use clojure.test codeq-playground.core)) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
3698cfbcdee8da74fa4e063dd561aa1cf1168ad20cc914dfb2f0a90aade4e66e
FreeProving/free-compiler
Parsec.hs
# OPTIONS_GHC -Wno - orphans # | This module contains utility functions for working with the Parsec -- library. module FreeC.Util.Parsec where import Data.Composition ( (.:) ) import Text.Parsec ( Parsec ) import qualified Text.Parsec as Parsec import qualified Text.Parse...
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Util/Parsec.hs
haskell
library. The error message can quote source code from the given source files. The error message can quote source code from the given source files. | Runs the given parser on the given input and reports a fatal error if there is a parse error. ^ The file to parse. ^ The token stream to parse. ^ The par...
# OPTIONS_GHC -Wno - orphans # | This module contains utility functions for working with the Parsec module FreeC.Util.Parsec where import Data.Composition ( (.:) ) import Text.Parsec ( Parsec ) import qualified Text.Parsec as Parsec import qualified Text.Parsec.Error as ...
c369935f10f2ab95a1c77c80670db019f98797274cbc6c9e9256e684a68760ce
monadbobo/ocaml-core
host_and_port.mli
open Std_internal type t val create : host:string -> port:int -> t val host : t -> string val port : t -> int val tuple : t -> string * int include Identifiable with type t := t
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/host_and_port.mli
ocaml
open Std_internal type t val create : host:string -> port:int -> t val host : t -> string val port : t -> int val tuple : t -> string * int include Identifiable with type t := t
a8ef64b307dbc0fb4f7201331d422af632c2a2d4b60d0778ad60bdc002971ade
ExternalReality/SednaDBXML
SednaBindings.hs
module Database.SednaBindings ( sednaBegin , sednaCloseConnection , sednaCommit , sednaConnect , sednaEndLoadData , sednaExecute , sednaExecuteLong , sednaGetConnectionAttr , sednaGetData , sednaGetLastErrorCode , sednaGetLastErrorMsg , sednaGetResult , sednaNext ...
null
https://raw.githubusercontent.com/ExternalReality/SednaDBXML/1e9537274e67a498545ebc84073eb59c18bb0ffb/src/Database/SednaBindings.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
module Database.SednaBindings ( sednaBegin , sednaCloseConnection , sednaCommit , sednaConnect , sednaEndLoadData , sednaExecute , sednaExecuteLong , sednaGetConnectionAttr , sednaGetData , sednaGetLastErrorCode , sednaGetLastErrorMsg , sednaGetResult , sednaNext ...
7722315816b0f5b1e35bfb123750a6f779c7559efd499c22f3cfe2204ed7a6ff
tsloughter/kuberl
kuberl_v1_custom_resource_definition_names.erl
-module(kuberl_v1_custom_resource_definition_names). -export([encode/1]). -export_type([kuberl_v1_custom_resource_definition_names/0]). -type kuberl_v1_custom_resource_definition_names() :: #{ 'categories' => list(), 'kind' := binary(), 'listKind' => binary(), 'plural' := binary(), 's...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_custom_resource_definition_names.erl
erlang
-module(kuberl_v1_custom_resource_definition_names). -export([encode/1]). -export_type([kuberl_v1_custom_resource_definition_names/0]). -type kuberl_v1_custom_resource_definition_names() :: #{ 'categories' => list(), 'kind' := binary(), 'listKind' => binary(), 'plural' := binary(), 's...
c532c042d5f0cfaf1a1babdd019401308a1fff87da494b96687309e433ae6b13
NorfairKing/validity
Time.hs
# OPTIONS_GHC -fno - warn - dodgy - exports # # OPTIONS_GHC -fno - warn - orphans # module Data.Validity.Time ( module X, ) where import qualified Data.Validity.Time.Calendar as X () import qualified Data.Validity.Time.Clock as X () import qualified Data.Validity.Time.Format as X () import qualified Data.Validity...
null
https://raw.githubusercontent.com/NorfairKing/validity/1c3671a662673e21a1c5e8056eef5a7b0e8720ea/validity-time/src/Data/Validity/Time.hs
haskell
# OPTIONS_GHC -fno - warn - dodgy - exports # # OPTIONS_GHC -fno - warn - orphans # module Data.Validity.Time ( module X, ) where import qualified Data.Validity.Time.Calendar as X () import qualified Data.Validity.Time.Clock as X () import qualified Data.Validity.Time.Format as X () import qualified Data.Validity...
4bfad59a668780acdd4fbd897715cc3b1abb091e9178d9f13861300ed33bd10f
hjcapple/reading-sicp
fibonacci.scm
#lang racket ;; P24 - [1.2.2 树形递归] (define (fib n) (cond ((= n 0) 0) ((= n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) (define (fib-2 n) (define (fib-iter a b count) (if (= count 0) b (fib-iter (+ a b) a (- count 1)))) (fib-iter 1 0 n)) ;;;;;;;;;;;...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/fibonacci.scm
scheme
P24 - [1.2.2 树形递归]
#lang racket (define (fib n) (cond ((= n 0) 0) ((= n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) (define (fib-2 n) (define (fib-iter a b count) (if (= count 0) b (fib-iter (+ a b) a (- count 1)))) (fib-iter 1 0 n)) (require rackunit) (define (for-l...
f518bd2973d8a558ef53fd984f605d37f5044e7721f12084be958eb94916940d
nomasystems/npqueue
npqueue_partition_srv_SUITE.erl
Copyright 2022 Nomasystems , S.L. %% 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 distri...
null
https://raw.githubusercontent.com/nomasystems/npqueue/7935ad7437b3ae3e7e585a01c56ca06f4172f7c4/test/npqueue_partition_srv_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 or implied. See the License for the specific language governing perm...
Copyright 2022 Nomasystems , S.L. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(npqueue_partition_srv_SUITE). -compile([export_all, nowarn_export_all]). all() -> [ handle_unmatched_call, han...
75153705c8792ed934d13b7aacea58610a86fc7008fdcfe7e150452f0942bee7
martinkersner/cl-ml
utils.lisp
, 2016/09/01 ;;;; ;;;; Auxiliary functions. ;;;; Probably some of them are going to be moved to more appropriate places. ;;; Compute entropy of given list. ;;; Created for decision trees algorithm. TODO unit tests ! (defun entropy (lst) (let ((ht (make-hash-table :test 'equal)) (key-exist nil) ...
null
https://raw.githubusercontent.com/martinkersner/cl-ml/f6263b9fb4abd1e069e892a595fe85fbfa5f9c9f/utils.lisp
lisp
Auxiliary functions. Probably some of them are going to be moved to more appropriate places. Compute entropy of given list. Created for decision trees algorithm. Count number of occurences of all items from original list. Extract only number of occurences. Compute entropy. Created for decision trees algorithm....
, 2016/09/01 TODO unit tests ! (defun entropy (lst) (let ((ht (make-hash-table :test 'equal)) (key-exist nil) (value nil) (count-lst nil) (tmp-sum nil) (tmp-div nil)) (mapcar #'(lambda (item) (progn (multiple-value-setq (value key-...