_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
38a1f348549e8c1b7afbb588ff24438e35a1663c7bf6d60bfebb48d428f760d2
ghc/packages-Cabal
Types.hs
# LANGUAGE DeriveGeneric # ----------------------------------------------------------------------------- -- | Module : Distribution . Client . Init . Types Copyright : ( c ) , 2009 -- License : BSD-like -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Some ...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Client/Init/Types.hs
haskell
--------------------------------------------------------------------------- | License : BSD-like Maintainer : Stability : provisional Portability : portable Some types used by the 'cabal init' command. --------------------------------------------------------------------------- portions of a .cab...
# LANGUAGE DeriveGeneric # Module : Distribution . Client . Init . Types Copyright : ( c ) , 2009 module Distribution.Client.Init.Types where import Distribution.Client.Compat.Prelude import Prelude () import Distribution.Simple.Setup (Flag(..), toFlag ) import Distribution.Types.Dependency as ...
ca0d3e050bf099d761c6f3c20a087095c68f3c2212cde2e55ef68cacc7d7a823
johnlawrenceaspden/hobby-code
macros.clj
Nice macros ;;debugging parts of expressions (defmacro dbg[x] `(let [x# ~x] (println "dbg:" '~x "=" x#) x#)) ;; Examples of dbg (println (+ (* 2 3) (dbg (* 8 9)))) (println (dbg (println "yo"))) (defn factorial[n] (if (= n 0) 1 (* n (dbg (factorial (dec n)))))) (factorial 8) (def integers (iterate inc 0)) (def squ...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/macros.clj
clojure
debugging parts of expressions Examples of dbg can we do it without backquote? hand generated version auto version. note name resolution
Nice macros (defmacro dbg[x] `(let [x# ~x] (println "dbg:" '~x "=" x#) x#)) (println (+ (* 2 3) (dbg (* 8 9)))) (println (dbg (println "yo"))) (defn factorial[n] (if (= n 0) 1 (* n (dbg (factorial (dec n)))))) (factorial 8) (def integers (iterate inc 0)) (def squares (map #(dbg(* % %)) integers)) (def cubes ...
a504d0bb8bec061cf05405b365638271451c48068cba0588b19e83e147f139ce
ninjudd/cake
dependency.clj
by , / December 1 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this ;; distribution. By using this software in any fashion, ...
null
https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/dev/bake/dependency.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
by , / December 1 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse copied from lazytest.dependency (ns bake.dependency "Bidirectional graphs of dependencies and dependent objects." (:use [clojure.set :only (union)]))...
5ff27e03cb069fc0cce0cfd11182c4a990cfe75be33915442ddd229df1fe7a0f
soegaard/remacs
osx-keyboard.rkt
#lang racket/base (provide key-translate make-initial-dead-key-state copy-dead-key-state char->main-char-key+modifiers) (require (for-syntax syntax/parse racket/syntax racket/base)) (require ffi/unsafe ffi/unsafe/objc ffi/unsafe/define mred/private/wx/cocoa/types) ; _NSSt...
null
https://raw.githubusercontent.com/soegaard/remacs/8681b3acfe93335e2bc2133c6f144af9e0a1289e/old/osx-keyboard.rkt
racket
_NSString Bit operations Libraries used already imported Unicode Characters Types from MacTypes.h TEXT INPUT SOURCES Most text input sources are keyboards. Each physical key on a keyboard sends a keycode. A keyboard layout determines which character corresponds to a physical key. Getting the property is done...
#lang racket/base (provide key-translate make-initial-dead-key-state copy-dead-key-state char->main-char-key+modifiers) (require (for-syntax syntax/parse racket/syntax racket/base)) (require ffi/unsafe ffi/unsafe/objc ffi/unsafe/define (define (<< x y) (arithmetic-shift x y)) (de...
554234c3f74700912c8097188f6bc78ef74df1955f1a49e33d57b0085ab5112e
spurious/sagittarius-scheme-mirror
gzip.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; gzip.scm - RFC1952 zlib library ;;; Copyright ( c ) 2010 - 2013 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions ...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/gzip.scm
scheme
coding : utf-8 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. ...
gzip.scm - RFC1952 zlib library Copyright ( c ) 2010 - 2013 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library...
09952278e822dd0d87cb62338516a68a08c0f3beb99ef6d86b88b244a84857c8
takano-akio/fast-builder
map.hs
import Control.Concurrent import Criterion.Main import qualified Data.IntMap as IM import Data.Monoid import qualified Data.ByteString.Builder as Bstr import qualified Data.ByteString.FastBuilder as Fast main :: IO () main = runInUnboundThread $ do let size sz m = bgroup sz [ bench "lazy/fast" $ nf (Fast....
null
https://raw.githubusercontent.com/takano-akio/fast-builder/d499ffb338300c1df5479e3d8918d986803a7243/benchmarks/map.hs
haskell
import Control.Concurrent import Criterion.Main import qualified Data.IntMap as IM import Data.Monoid import qualified Data.ByteString.Builder as Bstr import qualified Data.ByteString.FastBuilder as Fast main :: IO () main = runInUnboundThread $ do let size sz m = bgroup sz [ bench "lazy/fast" $ nf (Fast....
19750de3cc4b3d011baf9afd2815f72ee522fcd3840cf3e2c1e392fb86a49934
ahungry/pseudo
macros.lisp
;; Pseudo - A pseudo 3d multiplayer roguelike Copyright ( C ) 2013 ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your option) any la...
null
https://raw.githubusercontent.com/ahungry/pseudo/a3e6329313e334941f211a991e5853bbe6d247f1/macros.lisp
lisp
Pseudo - A pseudo 3d multiplayer roguelike This program is free software: you can redistribute it and/or modify (at your option) any later version. 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 PART...
Copyright ( C ) 2013 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU Affero General Public License MACRO Definitions (in-package #:pseudo) (defmacro class-to-json (nam...
b80292ae1312f954d3df30fe278dd83260430e9ae35cb8189066d699586a6d1f
melange-re/melange
lam_pass_count.ml
(************************************) (* *) (* OCaml *) (* *) , projet Cristal , INRIA Rocquencourt ...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/core/lam_pass_count.ml
ocaml
********************************** OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 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 . Adapted for Javascript backend : , ...
e1c54815d6e8a81c116c66222d9031ce92eaa474b8c4b1c43d87ca757de0ff55
puppetlabs/puppetdb
server.clj
(ns puppetlabs.puppetdb.http.server "REST server Consolidates our disparate REST endpoints into a single Ring application." (:require [puppetlabs.puppetdb.http :as http] [puppetlabs.puppetdb.middleware :refer [wrap-with-globals wrap-with-metrics...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/http/server.clj
clojure
(ns puppetlabs.puppetdb.http.server "REST server Consolidates our disparate REST endpoints into a single Ring application." (:require [puppetlabs.puppetdb.http :as http] [puppetlabs.puppetdb.middleware :refer [wrap-with-globals wrap-with-metrics...
ce60ff5d43efd4184ee04329a36c0e166c7f5130a031575604e430d541894d26
syntax-objects/syntax-parse-example
3.rkt
#lang racket/base (provide try catch finally try-with try-with*) (require racket/match (for-syntax syntax/parse racket/base)) (begin-for-syntax (define ((invalid-expr name) stx) (raise-syntax-error name "invalid in expression context" stx))) (define-syntax catch (invalid-expr 'catch)) (define-syntax ...
null
https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/try-catch-finally/3.rkt
racket
#lang racket/base (provide try catch finally try-with try-with*) (require racket/match (for-syntax syntax/parse racket/base)) (begin-for-syntax (define ((invalid-expr name) stx) (raise-syntax-error name "invalid in expression context" stx))) (define-syntax catch (invalid-expr 'catch)) (define-syntax ...
e20a92e6b05976f7f53c628b223a13d704958fa5fa4f8f77f28c7d5c7c6c02df
hasktorch/hasktorch
TensorFactories.hs
# LANGUAGE FlexibleContexts # module Torch.TensorFactories where import Foreign.ForeignPtr import System.IO.Unsafe import Torch.Dimname import Torch.Internal.Cast import Torch.Internal.Class (Castable (..)) import qualified Torch.Internal.Const as ATen import qualified Torch.Internal.Managed.Autograd as LibTorch impo...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/4e846fdcd89df5c7c6991cb9d6142007a6bb0a58/hasktorch/src/Torch/TensorFactories.hs
haskell
XXX: We use the torch:: constructors, not at:: constructures, because | aten_impl | shape | opts | output ------------------ Factories -------------------- | sequence of integers defining the shape of the output tensor. | configures the data type, device, layout and other properties of the resulting tensor. | o...
# LANGUAGE FlexibleContexts # module Torch.TensorFactories where import Foreign.ForeignPtr import System.IO.Unsafe import Torch.Dimname import Torch.Internal.Cast import Torch.Internal.Class (Castable (..)) import qualified Torch.Internal.Const as ATen import qualified Torch.Internal.Managed.Autograd as LibTorch impo...
b0c2a239eb9db5b8d71141eedcd8d96e933756f7ed0490179f03ff3a1ba7b7bc
lisp/de.setf.resource
vocabulary.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : common - lisp - user ; -*- 20100513T131615Z00 ;;; from #<doc-node -schema/rdfs-namespace.xml #x26BA2DE6> (in-package :common-lisp-user) (defpackage "-schema#" (:use ) (:nicknames "rdfs") (:export "Class" "comment" ...
null
https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/namespaces/www-w3-org/2000/01/rdf-schema/vocabulary.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : common - lisp - user ; -*- from #<doc-node -schema/rdfs-namespace.xml #x26BA2DE6>
20100513T131615Z00 (in-package :common-lisp-user) (defpackage "-schema#" (:use ) (:nicknames "rdfs") (:export "Class" "comment" "Container" "ContainerMembershipProperty" "Datatype" "domain" "isDefinedBy" "label" "Literal" ...
dc5800789956e3279d4ca7e315c379389bafc6c616489297622727a75857de64
SamB/coq
typeclasses.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/pretyping/typeclasses.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i $Id$ i i i This module defines ty...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Libnames o...
22d876604b8db23ff4f4a2f692fe233ec7cf1655390f4ec12ca688f89dc9f59e
PrincetonUniversity/lucid
Cid.ml
(* Compound Identifiers *) type id = Id.t type t = | Id of id | Compound of id * t We represent " Array.create " as Compound("Array " , I d " create " ) ) (* Constructors *) let rec create ss = match ss with I d ( Id.create " " ) | [s] -> Id (Id.create s) | s :: ss -> Compound (Id.create s, create ss)...
null
https://raw.githubusercontent.com/PrincetonUniversity/lucid/3a8f1638858b180e009a914735e474b7cf01845f/src/lib/frontend/datastructures/Cid.ml
ocaml
Compound Identifiers Constructors Destructors
type id = Id.t type t = | Id of id | Compound of id * t We represent " Array.create " as Compound("Array " , I d " create " ) ) let rec create ss = match ss with I d ( Id.create " " ) | [s] -> Id (Id.create s) | s :: ss -> Compound (Id.create s, create ss) ;; let rec create_ids ids = match ids with...
f4087c1acac7a1ffe4524fb3c0c66b81e0da9b58d9470857887a22dcbbbfb1a6
tilk/yieldfsm
MakeLocalVars.hs
| Copyright : ( C ) 2022 : BSD2 ( see the file LICENSE ) Maintainer : < > This module defines a transformation which ensures that all references to mutable variables are local . Copyright : (C) 2022 Marek Materzok License : BSD2 (see the file LICENSE) Maintainer : Marek Materzok <> ...
null
https://raw.githubusercontent.com/tilk/yieldfsm/bf86708eab22faec90c63cb15b0ac94c7005724b/src/FSM/Process/MakeLocalVars.hs
haskell
| Copyright : ( C ) 2022 : BSD2 ( see the file LICENSE ) Maintainer : < > This module defines a transformation which ensures that all references to mutable variables are local . Copyright : (C) 2022 Marek Materzok License : BSD2 (see the file LICENSE) Maintainer : Marek Materzok <> ...
51d69fe67cea847ee8160cec3718903da7ecc1055fba3d2575b6a166cb6b3462
aengelberg/instagenerate
project.clj
(defproject instagenerate "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [instaparse "1.3.4"] [org.clojure/core.logic "0.8.7"]])
null
https://raw.githubusercontent.com/aengelberg/instagenerate/a04f639c203f8491a6d413b55862cb55226ae455/project.clj
clojure
(defproject instagenerate "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [instaparse "1.3.4"] [org.clojure/core.logic "0.8.7"]])
37366502f84eca9b1e83cdfeb373285da49ad7052455da057ad16501612b33df
shortishly/pgec
pgec_telemetry_resp_metrics.erl
Copyright ( c ) 2023 < > %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under...
null
https://raw.githubusercontent.com/shortishly/pgec/440a0fd7ebd1fe0d5ff4e44723f68fd7ceba88a5/src/pgec_telemetry_resp_metrics.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 permissi...
Copyright ( c ) 2023 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(pgec_telemetry_resp_metrics). -export([handle/4]). -include_lib("kernel/include/logger.hrl"). handle(EventName, #{bytes := N}, _, _)...
415a7a82230be52f351e45f72a96a80f6688cb0a74cb751eabffd7029142f151
bmeurer/ocaml-arm
camlinternalOO.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/camlinternalOO.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ type tag type label type table ...
75b7317310b5b77ea9150fccd2b2d34f6138a7b0f1690d3821b9f3d52de2cf9f
realworldocaml/mdx
mdx_top.mli
* Copyright ( c ) 2017 * Copyright ( c ) 2018 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS P...
null
https://raw.githubusercontent.com/realworldocaml/mdx/4d8e7e8321faeeabe7091fbe2e901e64ab19dc06/lib/top/mdx_top.mli
ocaml
* The type for configuration values. * The type for toplevel directives * [init ()] is a new configuration value. * [eval t p] evaluates the toplevel phrase [p] (possibly spawning on mulitple lines) with the configuration value [t].
* Copyright ( c ) 2017 * Copyright ( c ) 2018 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS P...
4f9d6abe0ce99aa539a9514fd695b8913424473ea568d8a1017188f2d07efbc8
smimram/funk
sound.ml
sound.ml [ part of the funk project ] [ functional kernel , contents : userland sound functions * copyright : ( C ) 2005 by , * email : , * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/smimram/funk/88328dd9087c9097b1bfe2cf5394ba99fa631934/src/userland/sound.ml
ocaml
Speaker and Timer constants Set Timer frequency Enable/disable the internal speaker in timer driven mode Beep during delay milliseconds with frequency freq Hz
sound.ml [ part of the funk project ] [ functional kernel , contents : userland sound functions * copyright : ( C ) 2005 by , * email : , * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
da396ed11f41f7fc51f24289afd44ed699e5825029c68b73b4a7a56e2a2589e6
dalaing/little-languages
Infer.hs
# LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # module Common.Term.Infer ( InferInput(..) , HasInferInput(..) , InferOutput(..) , HasInferOutput(..) , mkIn...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Common/Term/Infer.hs
haskell
possibly replace with Validation / AccValidation?
# LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # module Common.Term.Infer ( InferInput(..) , HasInferInput(..) , InferOutput(..) , HasInferOutput(..) , mkIn...
49bf93f10c5d4935f1d9cd68d7670c0ec2740b07f9c630f1bf7bf3105604dd61
digitallyinduced/ihp
Lockable.hs
module IHP.AuthSupport.Lockable where import IHP.Prelude lock :: forall user. (?modelContext :: ModelContext, CanUpdate user, UpdateField "lockedAt" user user (Maybe UTCTime) (Maybe UTCTime)) => user -> IO user lock user = do now <- getCurrentTime let currentLockedAt :: Maybe UTCTime = getField @"lockedAt" us...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/620482b47e0daf13ed3bdaa83ec2953c55477e6e/IHP/AuthSupport/Lockable.hs
haskell
module IHP.AuthSupport.Lockable where import IHP.Prelude lock :: forall user. (?modelContext :: ModelContext, CanUpdate user, UpdateField "lockedAt" user user (Maybe UTCTime) (Maybe UTCTime)) => user -> IO user lock user = do now <- getCurrentTime let currentLockedAt :: Maybe UTCTime = getField @"lockedAt" us...
440b92155d815f9c9efdeee25dc6aa74382927c9d5ecad5ac7b8fcd9223b73f6
marcoheisig/Typo
upgraded-array-element-ntype.lisp
(in-package #:typo.ntype) (defmethod upgraded-array-element-ntype ((primitive-ntype primitive-ntype)) (primitive-ntype-upgraded-array-element-ntype primitive-ntype)) (defmethod upgraded-array-element-ntype ((ntype ntype)) (primitive-ntype-upgraded-array-element-ntype (ntype-primitive-ntype ntype))) (let ((cac...
null
https://raw.githubusercontent.com/marcoheisig/Typo/88f2708bbb8f8f8ac2dd19cd153a16c06554a6aa/code/ntype/upgraded-array-element-ntype.lisp
lisp
(in-package #:typo.ntype) (defmethod upgraded-array-element-ntype ((primitive-ntype primitive-ntype)) (primitive-ntype-upgraded-array-element-ntype primitive-ntype)) (defmethod upgraded-array-element-ntype ((ntype ntype)) (primitive-ntype-upgraded-array-element-ntype (ntype-primitive-ntype ntype))) (let ((cac...
845390db33451da56838ab74306ca3715e1ec98902166848e9b103b42c285cf6
hexlet-codebattle/battle_asserts
simplified_stairway_to_heaven.clj
(ns battle-asserts.issues.simplified-stairway-to-heaven (:require [clojure.test.check.generators :as gen])) (def level :medium) (def tags ["collections"]) (def description {:en "`N` dicks randomly spread out of `M` stairs, there can be as many dicks as you want on one step. We gotta go down these stairs. ...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/c6304f492c86472b9ddb4332a84a2c510b61af6d/src/battle_asserts/issues/simplified_stairway_to_heaven.clj
clojure
(ns battle-asserts.issues.simplified-stairway-to-heaven (:require [clojure.test.check.generators :as gen])) (def level :medium) (def tags ["collections"]) (def description {:en "`N` dicks randomly spread out of `M` stairs, there can be as many dicks as you want on one step. We gotta go down these stairs. ...
b182446d4993cf62a870b1439ca50513d8464ffcf2f9faf944651a88ebcc9f27
DanielG/cabal-helper
GHC.hs
cabal - helper : Simple interface to Cabal 's configuration state Copyright ( C ) 2018 < > -- SPDX - License - Identifier : Apache-2.0 -- 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...
null
https://raw.githubusercontent.com/DanielG/cabal-helper/0e9df088226d80669dd0882ed743bca871dce61c/src/CabalHelper/Compiletime/Program/GHC.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 -helper/issues/78#issuecomment-557860898
cabal - helper : Simple interface to Cabal 's configuration state Copyright ( C ) 2018 < > SPDX - License - Identifier : Apache-2.0 Licensed under the Apache License , Version 2.0 ( the " License " ) ; | Module : CabalHelper . Compiletime . Program . GHC Description : GHC program interface Lic...
4b2d493f0aee177eb84f67eec683465b4654a4414554815403e0b2fe66e8a887
freizl/dive-into-haskell
NatureNum.hs
module NatureNum where data Nat = Zero | Succ Nat deriving (Eq, Show) natToInteger :: Nat -> Integer natToInteger Zero = 0 natToInteger (Succ s) = 1 + natToInteger s integerToNat :: Integer -> Maybe Nat integerToNat i | i < 0 = Nothing | i == 0 = Just Zero | otherwise = fmap Succ (integerToNat (i - 1)) t1 :...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/12/NatureNum.hs
haskell
module NatureNum where data Nat = Zero | Succ Nat deriving (Eq, Show) natToInteger :: Nat -> Integer natToInteger Zero = 0 natToInteger (Succ s) = 1 + natToInteger s integerToNat :: Integer -> Maybe Nat integerToNat i | i < 0 = Nothing | i == 0 = Just Zero | otherwise = fmap Succ (integerToNat (i - 1)) t1 :...
e6177141fa7db5248df8db2619d63adaf43002198fb0a4c603a4a57ac002dce9
informatica-unica/lip
fun.ml
open FunLib.Types open FunLib.Prettyprint open FunLib.Main (********************************************************************** trace test : (command, n_steps, location, expected value after n_steps) **********************************************************************) let test_trace = [ ("int x; x:=...
null
https://raw.githubusercontent.com/informatica-unica/lip/2ee4e17873a64b04e63ea737a61670ac0766e2d5/imp/fun/test/fun.ml
ocaml
********************************************************************* trace test : (command, n_steps, location, expected value after n_steps) ********************************************************************* actual result
open FunLib.Types open FunLib.Prettyprint open FunLib.Main let test_trace = [ ("int x; x:=51", 2, "x", 51); ("int x; x:=0; x:=x+1", 5, "x", 1); ("int x; int y; x:=0; y:=x+1; x:=y+1", 10, "x", 2); ("int x; int y; x:=0; if x=0 then y:=10 else y:=20", 5, "y", 10); ("int x; int y; x:=1; if x=0 then y:=1...
2d067327837b2184e2ddbe3ebb5d98701e2171c9667a118db98327dc0e3f49fc
fourmolu/fourmolu
warning-pragma-list-multiline-four-out.hs
module Test {-# DEPRECATED [ "This module is deprecated." , "Please use OtherModule instead." ] #-} ( foo, bar, baz, ) where
null
https://raw.githubusercontent.com/fourmolu/fourmolu/45256f146648d8006b5a1244446c4ce6d2debafd/data/examples/module-header/warning-pragma-list-multiline-four-out.hs
haskell
# DEPRECATED [ "This module is deprecated." , "Please use OtherModule instead." ] #
module Test foo, bar, baz, ) where
13dac590f62ce4f2d799dfaf185b203079f33a513ef77d3c2f51468e10a769aa
AbstractMachinesLab/caramel
marg.ml
open Std (** {1 Flag parsing utils} *) type 'a t = string list -> 'a -> (string list * 'a) type 'a table = (string, 'a t) Hashtbl.t let unit f : 'a t = fun args acc -> (args, (f acc)) let param ptype f : 'a t = fun args acc -> match args with | [] -> failwith ("expects a " ^ ptype ^ " argument") | arg :: arg...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/utils/marg.ml
ocaml
* {1 Flag parsing utils}
open Std type 'a t = string list -> 'a -> (string list * 'a) type 'a table = (string, 'a t) Hashtbl.t let unit f : 'a t = fun args acc -> (args, (f acc)) let param ptype f : 'a t = fun args acc -> match args with | [] -> failwith ("expects a " ^ ptype ^ " argument") | arg :: args -> args, f arg acc let unit...
d011f8a503b95997cd7e531ac79f0b15096027bc4ecfb4c56aa9697032234719
mfoemmel/erlang-otp
ts_install.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/test_server/src/ts_install.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1997 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ts_install). -export([install/2, ...
0cc3bc2682e056df9e84e2bd880f653da5dee4e3eacc0b4f590b339f3ca5e9ae
Provisdom/defn-spec
core_test.cljc
(ns defn-spec.core-test #?(:cljs (:require-macros [defn-spec.core-test :refer [is-error-thrown is-exception-thrown without-asserts]])) (:require #?(:cljs [cljs.test :refer-macros [deftest is testing]] :clj [clojure.test :refer [deftest is testing]]) [clojure.spec.alpha :as s] [defn-spec.core :as...
null
https://raw.githubusercontent.com/Provisdom/defn-spec/aabd8bdd3fb3e2eb5b7988803335f62dc76cdc5f/test/defn_spec/core_test.cljc
clojure
These are only expected to pass it orchestra is on the classpath
(ns defn-spec.core-test #?(:cljs (:require-macros [defn-spec.core-test :refer [is-error-thrown is-exception-thrown without-asserts]])) (:require #?(:cljs [cljs.test :refer-macros [deftest is testing]] :clj [clojure.test :refer [deftest is testing]]) [clojure.spec.alpha :as s] [defn-spec.core :as...
dc6bbd7ae75a2ff8446b42355136a7aeb00d4424777ec80ab92677b206f6bfee
janestreet/core
test_avltree.ml
open! Core open Expect_test_helpers_core module Int_option = struct type t = int option [@@deriving equal, sexp_of] end let invariant tree = Avltree.invariant tree ~compare; Avltree.iter tree ~f:(fun ~key ~data -> assert (key = data)) ;; let require_is_absent tree int = require [%here] (not (Avltree.mem tree ~...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_avltree.ml
ocaml
if buggy, this will replace the data with the wrong value
open! Core open Expect_test_helpers_core module Int_option = struct type t = int option [@@deriving equal, sexp_of] end let invariant tree = Avltree.invariant tree ~compare; Avltree.iter tree ~f:(fun ~key ~data -> assert (key = data)) ;; let require_is_absent tree int = require [%here] (not (Avltree.mem tree ~...
0c8fb49646f86dae7954e40f49c4bbd2c2a69cdc9f0b80678e554245997f4960
sealchain-project/sealchain
Core.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} ...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src/Pact/Analyze/Eval/Core.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # # LANGUAGE TypeOperators # | Symbolic evaluation for the functionally pure subset of expressions that | Bound on the size of lists we check. This may be user-configurable in the f...
# LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # options_ghc -fno - warn - redundant - constraints # are shared by all three languages : ' Term ' , ' Prop ' , and ' Invariant ' . module Pact.Analyze.Eval.Core where import ...
601a3c70f36dcd50bc62788e3e53a5c97f28537e9b0e050b381a064748a0604f
TheLortex/mirage-monorepo
mirage_random.ml
* Copyright ( c ) 2011 - 2015 Anil Madhavapeddy < > * Copyright ( c ) 2013 - 2015 < > * Copyright ( c ) 2013 Citrix Systems Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyrigh...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/mirage-random/src/mirage_random.ml
ocaml
* {1 Operations to generate random numbers} * The state of the generator. * [generate ~g n] generates a random buffer of length [n] using [g].
* Copyright ( c ) 2011 - 2015 Anil Madhavapeddy < > * Copyright ( c ) 2013 - 2015 < > * Copyright ( c ) 2013 Citrix Systems Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyrigh...
7eff6492bd650fa1245cd0bc0b2f11199a18090b3b47678ba588c44304ade432
coccinelle/coccinelle
interface_tools.mli
module Option : sig type 'a t = 'a option val map : ('a -> 'b) -> 'a option -> 'b option val equal : ('a -> 'b -> bool) -> 'a option -> 'b option -> bool val exists : ('a -> bool) -> 'a option -> bool val some : 'a -> 'a option val iter : ('a -> unit) -> 'a option -> unit val filter : ('a -> bool) -...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interface_generator/interface_tools.mli
ocaml
val of_command_line : string -> t module Interpreter : sig type t = { command_line : string; version : Version.t; } val of_command_line : string -> t end
module Option : sig type 'a t = 'a option val map : ('a -> 'b) -> 'a option -> 'b option val equal : ('a -> 'b -> bool) -> 'a option -> 'b option -> bool val exists : ('a -> bool) -> 'a option -> bool val some : 'a -> 'a option val iter : ('a -> unit) -> 'a option -> unit val filter : ('a -> bool) -...
7760111d818bed397f092ca252b5bc97fe077f09ef87379c168f2f84b99c7d6b
kmi/irs
new.lisp
Mode : Lisp ; Package : File created in WebOnto (in-package "OCML") (in-ontology cashew-ontology)
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/cashew-ontology/new.lisp
lisp
Package :
File created in WebOnto (in-package "OCML") (in-ontology cashew-ontology)
5364984484dc1db83e918f04f06764d51652b6d3b77ba7b08b6b3be7d22687e5
quephird/fun-with-quil
gingham.clj
(ns fun-with-quil.sketches.gingham (:use quil.core)) (def ^:constant screen-w 1920) (def ^:constant screen-h 1080) (defn make-gingham-fn [g d] "g controls the granularity of the squares d controls the distortion of the resultant image" (fn [x y] (let [s (/ 3.0 (+ y 99.0))] (+ (* (int (rem (* (+ (* ...
null
https://raw.githubusercontent.com/quephird/fun-with-quil/3b3a6885771f5a1a4cffeb8379f05a28048a1616/src/fun_with_quil/sketches/gingham.clj
clojure
(ns fun-with-quil.sketches.gingham (:use quil.core)) (def ^:constant screen-w 1920) (def ^:constant screen-h 1080) (defn make-gingham-fn [g d] "g controls the granularity of the squares d controls the distortion of the resultant image" (fn [x y] (let [s (/ 3.0 (+ y 99.0))] (+ (* (int (rem (* (+ (* ...
39478a8951490d082c8568c0b8acad97ce9a98a2d58f1df907142c3972400a1a
incoherentsoftware/defect-process
Types.hs
module Player.Gun.All.ShardGun.Data.Types ( ShardGunStAttackDescription(..) , ShardGunStImages(..) , ShardGunData(..) ) where import qualified Data.List.NonEmpty as NE import Attack.Description.Types import Configs.All.PlayerGun.ShardGun import Msg.Types import Util import Window.Graphics data ShardG...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/ae362274cca0e59c0fc0dcaee0f0e208db8ccc46/src/Player/Gun/All/ShardGun/Data/Types.hs
haskell
module Player.Gun.All.ShardGun.Data.Types ( ShardGunStAttackDescription(..) , ShardGunStImages(..) , ShardGunData(..) ) where import qualified Data.List.NonEmpty as NE import Attack.Description.Types import Configs.All.PlayerGun.ShardGun import Msg.Types import Util import Window.Graphics data ShardG...
a3f6cae8d7d5540a6374cddc0baef19c4c3d6ea34f363c8150030da04f616ff8
janestreet/core
hashtbl_unit_tests_intf.ml
open! Core * A subset of [ Hashtbl_intf . ] . Leaves out definitions that we do not need to test and that some implementations may not provide . and that some implementations may not provide. *) module type Hashtbl_for_testing = sig type ('a, 'b) t [@@deriving sexp_of] include Hashtbl_intf.Creators...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/hashtbl_unit_tests_intf.ml
ocaml
* Wrap this in a [let%test_module] to ensure the tests get run
open! Core * A subset of [ Hashtbl_intf . ] . Leaves out definitions that we do not need to test and that some implementations may not provide . and that some implementations may not provide. *) module type Hashtbl_for_testing = sig type ('a, 'b) t [@@deriving sexp_of] include Hashtbl_intf.Creators...
8fd8e3b298d120c528685fcdfbd491c16932bd5d07d8c1d4b5879bb4608118dd
tweag/ormolu
lambda-multi-line2.hs
tricky0 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky1 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky2 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/lambda-multi-line2.hs
haskell
tricky0 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky1 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky2 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt
e5af6916ce35f8a3107efa614bc1930952c14271fc527f2287fb89f14571209b
re-ops/re-cog
hostname.clj
(ns re-cog.scripts.hostname (:require [pallet.stevedore :refer (script)])) (defn hostnamectl "sets hostname and hosts file" [hostname fqdn] (script ("sudo" "/usr/bin/hostnamectl" "set-hostname" ~hostname)))
null
https://raw.githubusercontent.com/re-ops/re-cog/316c37fbd9216e722fd5c177a7d729e5518e2427/src/re_cog/scripts/hostname.clj
clojure
(ns re-cog.scripts.hostname (:require [pallet.stevedore :refer (script)])) (defn hostnamectl "sets hostname and hosts file" [hostname fqdn] (script ("sudo" "/usr/bin/hostnamectl" "set-hostname" ~hostname)))
603c29d4c631260ee91f0513a6dc36b8105e9001d474af07554ca261b6857ed9
mokus0/junkbox
proddigits.hs
#!runhaskell - " proddigits.hs " - ( c ) 2007 - - [ 03:05am|mokus > 95657055187 digits in 1e10 ! ( 128.53 TB ) - [ 03:07am|mokus > 90 min cpu time to compute that - [ 03:07am|mokus > ( on my 1.66 GHz G4 ) - - about 1.15657e8 digits in 1e12 ! - about 9.9e101 digits in 10e100 !...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Math/proddigits.hs
haskell
#!runhaskell - " proddigits.hs " - ( c ) 2007 - - [ 03:05am|mokus > 95657055187 digits in 1e10 ! ( 128.53 TB ) - [ 03:07am|mokus > 90 min cpu time to compute that - [ 03:07am|mokus > ( on my 1.66 GHz G4 ) - - about 1.15657e8 digits in 1e12 ! - about 9.9e101 digits in 10e100 !...
09cd4f93555d81b197c9fd42e0e05c06fc17116a27ac38447ace5c5ebe0469da
pink-gorilla/ui-gorilla
sparkline.cljs
(ns demo.notebook.sparkline (:require [ui.spark :as spark])) (defn data [nr] (vec (take nr (repeatedly rand)))) (def data-20 (data 20)) (def data-40 (data 40)) (def data-100 (data 100)) (def data-150 (data 150)) ^:R [:div [spark/line {:data data-20 :limit 20 : width 100 : height 20 : svgWidth 300 : 20 : mar...
null
https://raw.githubusercontent.com/pink-gorilla/ui-gorilla/3cc408b398d30a8e54c15f863fbabece9f036209/src/demo/notebook/sparkline.cljs
clojure
(ns demo.notebook.sparkline (:require [ui.spark :as spark])) (defn data [nr] (vec (take nr (repeatedly rand)))) (def data-20 (data 20)) (def data-40 (data 40)) (def data-100 (data 100)) (def data-150 (data 150)) ^:R [:div [spark/line {:data data-20 :limit 20 : width 100 : height 20 : svgWidth 300 : 20 : mar...
e60a7e35286f8964171ca46b53ec33213a704d1f0b35e1a64bf9e5b966b6e1ad
mzp/coq-ide-for-ios
elim.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/tactics/elim.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Meilleures stratégies mais perte de...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : elim.ml 13323 2010 ...
212c608a4b70c17e8b9340ab5eb39b5057db03380cf76a0e9896c013bb7e855a
Beluga-lang/Beluga
substitution.mli
* Substitutions @author @author Brigitte Pientka *) open Syntax.Int.LF module LF : sig exception NotComposable of string (**************************) (* Explicit substitutions *) (**************************) val id : sub val shift : sub val invShift : sub val bvarSub : int -> sub ->...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/1d39095c99dc255d972a339d447dc04286d8c13f/src/core/substitution.mli
ocaml
************************ Explicit substitutions ************************ ************************* Inverting substitutions ************************* ****************************** Apply contextual substitution ****************************** justCtxVar: id(\psi)
* Substitutions @author @author Brigitte Pientka *) open Syntax.Int.LF module LF : sig exception NotComposable of string val id : sub val shift : sub val invShift : sub val bvarSub : int -> sub -> front val frontSub : front -> sub -> front val decSub : typ_decl -> sub -> typ_decl va...
ea64d0195db25ea2ba443726e1442df4e132513f3727c75edc6bd5a10ef6dc01
Convex-Dev/convex-web
account.clj
(ns convex-web.account (:require [clojure.spec.alpha :as s] [datalevin.core :as d] [convex-web.convex :as convex])) (defn find-all [db] (d/q '[:find [(pull ?e [* {:convex-web.account/faucets [*]}]) ...] :in $ :where [?e :convex-web.account/address]] db)) (defn find-by-address [...
null
https://raw.githubusercontent.com/Convex-Dev/convex-web/c1822a14a0459cf622143af30433d9e9544defed/src/main/clojure/convex_web/account.clj
clojure
(ns convex-web.account (:require [clojure.spec.alpha :as s] [datalevin.core :as d] [convex-web.convex :as convex])) (defn find-all [db] (d/q '[:find [(pull ?e [* {:convex-web.account/faucets [*]}]) ...] :in $ :where [?e :convex-web.account/address]] db)) (defn find-by-address [...
f09a95bb963324d5e2511792ea21fd0efcfe99d77865ba751f32eae3092572fc
ocaml/ood
tool.ml
type metadata = { name : string; source : string; license : string; synopsis : string; description : string; lifecycle : string; } [@@deriving yaml] let path = Fpath.v "data/tools.yml" module Lifecycle = struct type t = [ `Incubate | `Active | `Sustain | `Deprecate ] let to_string = function | `I...
null
https://raw.githubusercontent.com/ocaml/ood/75c4f85e9a8cbe26530301cc14df578f0fc5c494/src/ood-gen/lib/tool.ml
ocaml
type metadata = { name : string; source : string; license : string; synopsis : string; description : string; lifecycle : string; } [@@deriving yaml] let path = Fpath.v "data/tools.yml" module Lifecycle = struct type t = [ `Incubate | `Active | `Sustain | `Deprecate ] let to_string = function | `I...
0539ab893efac9846bfa9ff98fef6f8e83ed52bd9f713170ebc126daacbe88d3
input-output-hk/cardano-sl
Update.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # TODO rename the module / move defintions / whatever . -- It's not about the network at all. module Pos.Listener.Update ( UpdateMode , handleProposal , handleVote ) where import Universum import Fo...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Listener/Update.hs
haskell
# LANGUAGE RankNTypes # It's not about the network at all. so it deserves 'Notice' severity. -------------------------------------------------------------------------- UpdateVote -------------------------------------------------------------------------- ------------------------------------------------------...
# LANGUAGE ScopedTypeVariables # TODO rename the module / move defintions / whatever . module Pos.Listener.Update ( UpdateMode , handleProposal , handleVote ) where import Universum import Formatting (build, sformat, (%)) import UnliftIO (MonadUnliftIO) i...
3cb0da7fe799201b6608b48642b47902ef1de20cfbfd1cfed7f272ee3981d66d
UBTECH-Walker/WalkerSimulationFor2020WAIC
_package_SEAJointState.lisp
(cl:in-package ubt_core_msgs-msg) (cl:export '(HEADER-VAL HEADER NAME-VAL NAME COMMANDED_POSITION-VAL COMMANDED_POSITION COMMANDED_VELOCITY-VAL COMMANDED_VELOCITY COMMANDED_ACCELERATION-VAL COMMANDED_ACCELERATION COMMAND...
null
https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/ubt_core_msgs/msg/_package_SEAJointState.lisp
lisp
(cl:in-package ubt_core_msgs-msg) (cl:export '(HEADER-VAL HEADER NAME-VAL NAME COMMANDED_POSITION-VAL COMMANDED_POSITION COMMANDED_VELOCITY-VAL COMMANDED_VELOCITY COMMANDED_ACCELERATION-VAL COMMANDED_ACCELERATION COMMAND...
3786c470753da9241bf219ad53c1ce2dc42f40e2535b46ec2a3c25816ec58ee0
awakesecurity/spectacle
Mealy.hs
# LANGUAGE TupleSections # {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Control.Mealy Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE -- -- Stability : stable Portability : non - portable ( GHC extensions ) -- -- Mealy machines. -- -- ...
null
https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Control/Mealy.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Module : Control.Mealy Stability : stable Mealy machines. @since 1.0.0 ** Applicative Transformer --------------------------------------------------------------------------------------------------------------------- @since 1.0.0 | Run a mealy machine given an ...
# LANGUAGE TupleSections # Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE Portability : non - portable ( GHC extensions ) module Control.Mealy * Mealy Machines Mealy, runMealy, MealyM (MealyM), runMealyM, arrM, refold, ) where...
91f6bd9ddd7f39decaa84889cfd79b2e941947d2cd0983998774c7b60637c381
ocsigen/js_of_ocaml
test4.ml
(* TEST *) open Effect open Effect.Deep type _ t += Foo : int -> int t let r = try_with perform (Foo 3) { effc = fun (type a) (e : a t) -> match e with | Foo i -> Some (fun (k : (a,_) continuation) -> try_with (continue k) (i+1) { effc = fun (type a) (e : a t) -> ma...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/3a615d693b213140ea8e5c43d5bbe99569bc898d/compiler/tests-ocaml/lib-effects/test4.ml
ocaml
TEST
open Effect open Effect.Deep type _ t += Foo : int -> int t let r = try_with perform (Foo 3) { effc = fun (type a) (e : a t) -> match e with | Foo i -> Some (fun (k : (a,_) continuation) -> try_with (continue k) (i+1) { effc = fun (type a) (e : a t) -> match e with ...
237efbc2dc8d74c0bef225b08947b0bd304698c3e0b51005b1a47ccd9c29786d
karamellpelle/grid
OpenGL.hs
module OpenGL ( #ifdef GRID_PLATFORM_GLFW module OpenGL.GLFW, #endif module Foreign.Storable, module Foreign.Ptr, module Foreign.C, module Foreign.Marshal.Alloc, module Foreign.Marshal.Array, module Data.Word, module Data.Bits, ) where import Foreign.Storable import Foreign.Pt...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/OpenGL.hs
haskell
module OpenGL ( #ifdef GRID_PLATFORM_GLFW module OpenGL.GLFW, #endif module Foreign.Storable, module Foreign.Ptr, module Foreign.C, module Foreign.Marshal.Alloc, module Foreign.Marshal.Array, module Data.Word, module Data.Bits, ) where import Foreign.Storable import Foreign.Pt...
405a98cde4f0fbb70c6243b5bde6057e3fa4d954991332e3316bacb6fc75a162
luqui/experiments
falgebra.hs
# LANGUAGE ConstraintKinds , DeriveFunctor , , DeriveTraversable , FlexibleContexts , FlexibleInstances , GADTs , GeneralizedNewtypeDeriving , MultiParamTypeClasses , PolyKinds , RankNTypes , ScopedTypeVariables , StandaloneDeriving , TupleSections , TypeFamilies , TypeOperators , UndecidableInstances , UndecidableSup...
null
https://raw.githubusercontent.com/luqui/experiments/c0b9153c41507afbfdeb2b32bfc65fd1ac83fb26/falgebra.hs
haskell
F marks that this is to be used as a functor for the purposes of instances. ... etc Unfortunate that we have to mark this specially. We can compose functors too, not just data! For pairs, there is also this. It seems we would need some way to (or many similar treatments) but this is not given by a standard typ...
# LANGUAGE ConstraintKinds , DeriveFunctor , , DeriveTraversable , FlexibleContexts , FlexibleInstances , GADTs , GeneralizedNewtypeDeriving , MultiParamTypeClasses , PolyKinds , RankNTypes , ScopedTypeVariables , StandaloneDeriving , TupleSections , TypeFamilies , TypeOperators , UndecidableInstances , UndecidableSup...
b8632ed415cdf36138899a4419ca74bd5ac29b9532ffac734c868ec6535807fe
immutant/immutant
messaging.clj
Copyright 2014 - 2017 Red Hat , Inc , and individual contributors . ;; 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 ...
null
https://raw.githubusercontent.com/immutant/immutant/6ff8fa03acf73929f61f2ca75446cb559ddfc1ef/messaging/src/immutant/messaging.clj
clojure
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 permiss...
Copyright 2014 - 2017 Red Hat , Inc , and individual contributors . distributed under the License is distributed on an " AS IS " BASIS , (ns immutant.messaging "Easily publish and receive messages containing any type of nested data structure to dynamically-created queues and topics." (:require [immutant.int...
3391fd0ca2e2d1848f1b2f21c660d94c586762894ad48e9bbecbca19346040c1
earl-ducaine/cl-garnet
slider-pix.lisp
(create-instance 'v-slid garnet-gadgets:v-slider (:left 40) (:top 20) (:height 250)) (create-instance 'h-slid-top garnet-gadgets:h-slider (:left 120) (:top 80) (:width 200) (:num-marks 6) (:val-1 0) (:val-2 50) (:scr-trill-p NIL) (:page-trill-p NIL)) (create-instance 'h-slid-bottom garnet-gadgets:h-slider (:l...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/doc/previous-version/src/gadgets/garnet-code/slider-pix.lisp
lisp
(create-instance 'v-slid garnet-gadgets:v-slider (:left 40) (:top 20) (:height 250)) (create-instance 'h-slid-top garnet-gadgets:h-slider (:left 120) (:top 80) (:width 200) (:num-marks 6) (:val-1 0) (:val-2 50) (:scr-trill-p NIL) (:page-trill-p NIL)) (create-instance 'h-slid-bottom garnet-gadgets:h-slider (:l...
8c44355beb3e0181d46c4088b4df12afa32e252d7e811bf5c7c4254fb3e97d81
elldritch/hipsterfy
Jobs.hs
module Hipsterfy.Database.Jobs ( UpdateJobInfo, UpdateJobInfoT (..), UpdateJobInfoF, pUpdateJobInfo, updateJobInfoColumns, ) where import Data.Profunctor.Product.TH (makeAdaptorAndInstance) import Data.Time (UTCTime) import Opaleye.Field (FieldNullable) import Opaleye.SqlTypes (SqlTimestamptz) impo...
null
https://raw.githubusercontent.com/elldritch/hipsterfy/7d455697c1146d89fc6b2f78effe6694efe69120/src/Hipsterfy/Database/Jobs.hs
haskell
module Hipsterfy.Database.Jobs ( UpdateJobInfo, UpdateJobInfoT (..), UpdateJobInfoF, pUpdateJobInfo, updateJobInfoColumns, ) where import Data.Profunctor.Product.TH (makeAdaptorAndInstance) import Data.Time (UTCTime) import Opaleye.Field (FieldNullable) import Opaleye.SqlTypes (SqlTimestamptz) impo...
f5278781c251569720c6f792a03c22f1cc870039d53ef20c308934a88f753d7b
GlideAngle/flare-timing
Ellipsoid.hs
module Ellipsoid.Ellipsoid (units) where import Test.Tasty (TestTree, testGroup) import Ellipsoid.Coincident (coincidentUnits) units :: TestTree units = testGroup "On the WGS84 ellipsoid using Vincenty's solution to the inverse geodetic problem" [ coincidentUnits ]
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/test-suite-zones/Ellipsoid/Ellipsoid.hs
haskell
module Ellipsoid.Ellipsoid (units) where import Test.Tasty (TestTree, testGroup) import Ellipsoid.Coincident (coincidentUnits) units :: TestTree units = testGroup "On the WGS84 ellipsoid using Vincenty's solution to the inverse geodetic problem" [ coincidentUnits ]
1592ca5af8b60dbfe452bef5b334fcefaca614bc97ac9416340580be1f4eaf3a
cffi/cffi
libffi-functions.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; init.lisp --- Load libffi and define basics ;;; Copyright ( C ) 2009 , 2010 , 2011 < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to de...
null
https://raw.githubusercontent.com/cffi/cffi/677cabae64b181330a3bbbda9c11891a2a8edcdc/libffi/libffi-functions.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- init.lisp --- Load libffi and define basics Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
Copyright ( C ) 2009 , 2010 , 2011 < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-pac...
05ad0732494803d60dee9e7d0822179d2500a976194324782d2f95019c9e59f6
ertugrulcetin/ClojureNews
forgot_password.cljs
(ns view.forgot-password) (defn component [forgot-password] [:table [:tbody [:tr [:td]] [:tr [:td "username:"] [:td [:input {:id "forgotPassUsernameId" :name "username" :type "text"}]]] [:tr [:td [:button {:id "forgotPassUsernameButtonId" :on-click (fn [_] ...
null
https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/view/forgot_password.cljs
clojure
(ns view.forgot-password) (defn component [forgot-password] [:table [:tbody [:tr [:td]] [:tr [:td "username:"] [:td [:input {:id "forgotPassUsernameId" :name "username" :type "text"}]]] [:tr [:td [:button {:id "forgotPassUsernameButtonId" :on-click (fn [_] ...
83dfa0754acebbfc87b492879cf0d6f2e8aa2fcf028fc4d173f38415a8572e1c
sgbj/MaximaSharp
gentran.lisp
;******************************************************************************* ;* * * copyright ( c ) 1988 kent state univ . kent , ohio 44242 * ;* ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/contrib/gentran/gentran.lisp
lisp
******************************************************************************* * * * * ******************************************************************************* ...
* copyright ( c ) 1988 kent state univ . kent , ohio 44242 * ( cond ( ( not ( boundp ' * gentran - dir ) ) ( setq * gentran - dir ( " GENTRAN " ) ) ) ) (in-package :maxima) (defvar local-obj-dir) (load (merge-pathnames "convmac.lisp" #-gcl *load-pathname* #+g...
ea08298850c963868d0e6959d488ac2ab867bca51718dcc1b3b2b4d56eea08eb
input-output-hk/project-icarus-importer
Generator.hs
# LANGUAGE TemplateHaskell # module UTxO.Generator ( -- * Inputs -- ** State GenInpState(..) , gisUtxo , initInpState -- ** Generator , RemoveUsedInputs(..) , GenInput , genInput -- * Outputs -- ** Parameters , GenOutParams(..) , defOutParams -- ** State , GenOutState(..) ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/unit/UTxO/Generator.hs
haskell
* Inputs ** State ** Generator * Outputs ** Parameters ** State ** Generator * Transactions ** Parameters ** State ** Generator * Chains ** Params ** Generator * Auxiliary ------------------------------------------------------------------------------ Generate transaction inputs ------------------------...
# LANGUAGE TemplateHaskell # module UTxO.Generator ( GenInpState(..) , gisUtxo , initInpState , RemoveUsedInputs(..) , GenInput , genInput , GenOutParams(..) , defOutParams , GenOutState(..) , gosAvailable , initOutState , GenOutput , genOutput , GenTrParams(..) , defTrParams , GenTrS...
a1905a90cff3577e96fec9def91a11a5bcc2044ef7a3ff89fccdd4e6d1a03b1b
ocaml-flambda/ocaml-jst
misc.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/utils/misc.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the exception Fatal_error let fatal_errorf fmt = Format.kfprintf (fun _ -> raise Fatal_error) For...
85364a2e91e32948f8af357d50e7a84dd2fc54ad60d2cc4fdea362e6d9568279
SnootyMonkey/Falkland-CMS
clean.clj
(ns fcms.db.clean "Remove all data from a Falkland CMS CouchDB database. USE WITH CAUTION!" (:require [com.ashafa.clutch :as clutch] [fcms.resources.common :as common])) (defn- bulk-delete-record [doc] {:_id (:id doc) :_rev (:value doc) :_deleted true}) (defn clean [] (println "FCMS: Cleaning data...
null
https://raw.githubusercontent.com/SnootyMonkey/Falkland-CMS/bd653c23dd458609b652dfac3f0f2f11526f00d1/src/fcms/db/clean.clj
clojure
(ns fcms.db.clean "Remove all data from a Falkland CMS CouchDB database. USE WITH CAUTION!" (:require [com.ashafa.clutch :as clutch] [fcms.resources.common :as common])) (defn- bulk-delete-record [doc] {:_id (:id doc) :_rev (:value doc) :_deleted true}) (defn clean [] (println "FCMS: Cleaning data...
919b9ce0198cfc0aa90492942b3722968a6efd2faaed52e91e3f7affabd0569f
lisp-korea/sicp2014
ex-2-38.scm
ex 2.38 (define (accumulate op init seq) (if (null? seq) init (op (car seq) (accumulate op init (cdr seq))))) (define nil '()) (define (fold-left op initial sequence) (define (iter result rest) (if (null? rest) result (iter (op result (car rest)) (cdr res...
null
https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/vvalkyrie/2.2/ex-2-38.scm
scheme
-- -- => -5
ex 2.38 (define (accumulate op init seq) (if (null? seq) init (op (car seq) (accumulate op init (cdr seq))))) (define nil '()) (define (fold-left op initial sequence) (define (iter result rest) (if (null? rest) result (iter (op result (car rest)) (cdr res...
30197a341854d8d5ab1971115f2fbc3a43e7206da462d39fe08e05717b97dc3a
NorfairKing/validity
Reflexivity.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # module Test.Syd.Validity.Relations.Reflexivity ( reflexiveOnElem, reflexivityOnGen, reflexivity, reflexivityOnArbitrary, ) where import Data.GenValidity import Test.QuickCheck -- | -- -- \[ -- Reflexive(\prec) -- \quad\equiv\quad...
null
https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-sydtest/src/Test/Syd/Validity/Relations/Reflexivity.hs
haskell
| \[ Reflexive(\prec) \quad\equiv\quad \] | A relation | An element | prop> reflexivity ((<=) :: Int -> Int -> Bool) prop> reflexivity ((==) :: Int -> Int -> Bool) prop> reflexivity ((>=) :: Int -> Int -> Bool) prop> reflexivity (Data.List.isPrefixOf :: [Int] -> [Int] -> Bool) prop> reflexivity (Data...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # module Test.Syd.Validity.Relations.Reflexivity ( reflexiveOnElem, reflexivityOnGen, reflexivity, reflexivityOnArbitrary, ) where import Data.GenValidity import Test.QuickCheck \forall a : ( a \prec a ) reflexiveOnElem :: (a -> ...
30e3eda27e65d0ef878440536c2cbeb6d2e02078d97a6f66c3526f45b2117ae6
cacheaudit/cacheaudit
accessAD.mli
Copyright ( c ) 2013 - 2015 , IMDEA Software Institute . (* See ../../LICENSE for authorship and licensing information *) (** Access abstract domain: keeps track of possible access sequences to sets in the cache. Can keep track of all accesses or only to changes by preventing stuttering *) (** Whet...
null
https://raw.githubusercontent.com/cacheaudit/cacheaudit/f0b52f85771ee31fed2a0a84a7e767a9d19e4b15/abstract_domains/cache/accessAD.mli
ocaml
See ../../LICENSE for authorship and licensing information * Access abstract domain: keeps track of possible access sequences to sets in the cache. Can keep track of all accesses or only to changes by preventing stuttering * Whether stuttering should be prevented or not. Default is false.
Copyright ( c ) 2013 - 2015 , IMDEA Software Institute . val no_stuttering : bool ref module Make : functor (C : CacheAD.S) -> CacheAD.S
8638a56af4deda282e7e4091520fec427aea1793442a7de60dfa08b8d65498f4
haskell-hvr/base-noprelude
Prelude.hs
# LANGUAGE NoImplicitPrelude , PackageImports # -- | An extended prelude to avoid typing all the standard default imports. -- The exports are chosen such that the chance for conflicts is low. -- -- This has been taken adapted from -extended module Prelude ( module StdPrelude -- * Control modules , module Contro...
null
https://raw.githubusercontent.com/haskell-hvr/base-noprelude/e5cb48f7f344de339b9ce5e4473dfbd532ba52bc/examples/extended-prelude/src/Prelude.hs
haskell
| An extended prelude to avoid typing all the standard default imports. The exports are chosen such that the chance for conflicts is low. This has been taken adapted from -extended * Control modules Partial * Data modules Partial Partial Partial Partial Partial * Safe * System modules Partial Misc orpha...
# LANGUAGE NoImplicitPrelude , PackageImports # module Prelude ( module StdPrelude , module Control.Applicative , module Control.Monad , module Control.Monad.IO.Class , module Control.Monad.Trans.Class , module Data.Either , module Data.Function , module Data.Maybe , module Data.Ord , module Data...
0bedd97a3fb1f55632643ae1fa6ffcc865dc63b201931ae5f8ecaf5bcf1627b0
Feldspar/feldspar-language
Language.hs
-- Copyright ( c ) 2019 , ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of...
null
https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Core/Language.hs
haskell
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redi...
Copyright ( c ) 2019 , ERICSSON AB * Neither the name of the ERICSSON AB nor the names of its contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIG...
c4a0d2914c64dfcca0e1999170d26d422f603f5050c8a2acbab518dceed0155b
NorfairKing/autodocodec
YamlSpec.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Autodocodec.YamlSpec (spec) where import Autodocodec import Autodocodec.Usage import Autodocodec.Yaml.Encode import qualified Data.Aeson as JSON import Data.Data import Data.GenVal...
null
https://raw.githubusercontent.com/NorfairKing/autodocodec/71c4dcb3c890590cf1a4e42fb9f9f422a7c49ec0/autodocodec-api-usage/test/Autodocodec/YamlSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Autodocodec.YamlSpec (spec) where import Autodocodec import Autodocodec.Usage import Autodocodec.Yaml.Encode import qualified Data.Aeson as JSON import Data.Data import Data.GenValidity import Data.GenValidity.Aeson...
75b5cc6dc3e54aaf40e9088f4acded2fe7a6fff4ecdf3b0434a340971507478d
kelamg/HtDP2e-workthrough
ex64.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex64) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex64.rkt
racket
about the language level of this file in a form that our tools can easily process. Position (posn) -> Natural
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex64) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Manhattan distance measures the manhattan distance of the give...
3a63b73e3ea0b4045760ec0d0b69c82dd23d724e8487b4bd9461f70700097113
fugue/fregot
Capabilities.hs
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Encoding builtin information to a capabilities document . Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stabil...
null
https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Capabilities.hs
haskell
# LANGUAGE OverloadedStrings # TODO (jaspervdj): Expand `static` parts. TODO (jaspervdj): Expand `static` parts.
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Encoding builtin information to a capabilities document . Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stabil...
c433d5ce1514a761085b7de9d6deb8ec1410b0720f1dc55825b21ed7ecc393b3
serokell/ariadne
Eval.hs
module Knit.Eval ( EvalError(..) , EvalT , ExecContext , ComponentExecContext , ComponentCommandExec(..) , ComponentLitToValue(..) , evaluate ) where import Control.Monad.Except import Data.Type.Equality import Knit.Argument import Knit.Prelude import Knit.Pro...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/knit/src/Knit/Eval.hs
haskell
module Knit.Eval ( EvalError(..) , EvalT , ExecContext , ComponentExecContext , ComponentCommandExec(..) , ComponentLitToValue(..) , evaluate ) where import Control.Monad.Except import Data.Type.Equality import Knit.Argument import Knit.Prelude import Knit.Pro...
c8cd31b4f7c525085ebfbd19038282e72da3b03203d871fc0d99d82270d2a39e
rpasta42/ChessKell
Types.hs
module Types ( ChessRet , Piece(..) , OrdPiece(OrdPiece, ordPieceGet) , Color(White, Black) , Position , Coord , BoardPiece(..) , Board(..) , StepFailure(..) , PieceMoves, PieceMoves2 , Move(..) ) where type Position = (Char, Int) type Coord = (Int, Int) type ChessRet a = Either String a data Piece = Pawn | Rook | K...
null
https://raw.githubusercontent.com/rpasta42/ChessKell/1b79ebac26bffcc8d18953f1ede862adec23fee1/Types.hs
haskell
, getPossibleMoveBoards :: Maybe [Board] IsCheckMate has winner color
module Types ( ChessRet , Piece(..) , OrdPiece(OrdPiece, ordPieceGet) , Color(White, Black) , Position , Coord , BoardPiece(..) , Board(..) , StepFailure(..) , PieceMoves, PieceMoves2 , Move(..) ) where type Position = (Char, Int) type Coord = (Int, Int) type ChessRet a = Either String a data Piece = Pawn | Rook | K...
26ab6589110f6183272afe947baf790d2e447b56cdc8ab23aaaa02e4cf66be0b
runexec/Moov
tmdb.clj
;- Copyright ( c ) 2012 and individual contributors . ; ( ) ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: 1 . Redistributions of source code must retain the above copyright ; no...
null
https://raw.githubusercontent.com/runexec/Moov/f18ae6c0d4dec7f3f32bfd8941a0d636eba450a7/src/Moov/tmdb.clj
clojure
- ( ) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer in this position and unchanged. notice, this list of conditions and the followi...
Copyright ( c ) 2012 and individual contributors . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . The name of the author may not be used to endorse or promote products THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS...
913b84b0b81df04d3abbc673a0706706d7fda55df60263d933a7f865a0699a94
sulami/spielwiese
14.hs
#!/usr/bin/env stack -- stack --resolver lts-9.13 --install-ghc runghc module Main where import Data.Bits (xor) import Data.Char (intToDigit, ord) import Numeric (showIntAtBase) main :: IO () main = do input <- getLine let strings = take 128 $ map (\n -> input ++ "-" ++ show n) ([...
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/advent17/14.hs
haskell
stack --resolver lts-9.13 --install-ghc runghc
#!/usr/bin/env stack module Main where import Data.Bits (xor) import Data.Char (intToDigit, ord) import Numeric (showIntAtBase) main :: IO () main = do input <- getLine let strings = take 128 $ map (\n -> input ++ "-" ++ show n) ([0..] :: [Int]) print . sum $ concatMap (map (rea...
0bf471e677378b8cc6ae4f106932640149015a271b124d2d4bc83469cb6d16fd
clojure/core.typed
utils.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/utils.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns ^:skip-wiki clojure.core.typed.checker.utils (:refer-clojure :exclude [defrecord defprotocol]) (:require [clojure.core.typed :as t] [clojure.core.typed.util-vars :as uvs] [clojure.repl :as repl] [clojure.set :as set])) (t/ann subt...
0aa8387a6dd4f15682f92d3d6cd9dda25490b466045f38fa3970b22ea693bfa6
facebook/flow
subst.mli
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/d5f497c24463005d105374f70a8377593f3cd0a3/src/typing/subst.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
6f8977030d33e522bc7ad72a88316dc25e0fb093ad8bf8bd575a01e86e949a98
jellelicht/guix
guix-main.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 , 2015 , 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/emacs/guix-main.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 , 2015 , 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . " name+version     of   packages " pairs . (use-modules (ice-9 vlist) (ice-9 match) (i...
ee4411786b7b457db6c97dd3c761e920fa76f0d713d64cd520cfb02b600c0410
bishboria/learnyouahaskell
8_reverse.hs
main = do line <- getLine if null line then return () else do putStrLn $ reverseWords line main reverseWords :: String -> String reverseWords = unwords . map reverse . words -- recursive function is ok because main is an IO action and the do block inside the else wrap...
null
https://raw.githubusercontent.com/bishboria/learnyouahaskell/d8c7b41398e9672db18c1b1360372fc4a4adefa8/08/8_reverse.hs
haskell
recursive function is ok because main is an IO action
main = do line <- getLine if null line then return () else do putStrLn $ reverseWords line main reverseWords :: String -> String reverseWords = unwords . map reverse . words and the do block inside the else wraps two IO actions into one return in does not exit a f...
e1710722b567ecb95f630c2ca15cfae61c7cf7212ddd738f86c67ea46c5099f2
pirapira/coq2rust
cerrors.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/toplevel/cerrors.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Error report. * General explain f...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * val print_loc : Loc.t -> Pp....
a9de9666267bb6ff75b128e1d51c01e8161927944ba3fcab73fe66e06235f0e0
nikodemus/SBCL
arith.pure.lisp
;;;; arithmetic tests with no side effects This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/arith.pure.lisp
lisp
arithmetic tests with no side effects more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. unlikely that anything with such fundamental arithmet...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (cl:in-package :cl-user) Once upon a time , in the process of porting CMUCL 's SPARC backend to SBCL , multiplications were excitingly broken . While it 's (mac...
ad585d9241c8bffaf81ba24c842807811fb5ad4c5a9af7089dd15524df53e66d
shirok/Gauche
quasi-ints.scm
(define (check-quasi-integer-operations) (print-header "Checking quasi-integer operations...") (check (bitvector= (bitvector-logical-shift (bitvector 1 0 1 1) 2 0) (bitvector 1 1 0 0)) => #t) (check (bitvector= (bitvector-logical-shift (bitvector 1 0 1 1) -2 #t) (bitv...
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/include/test/quasi-ints.scm
scheme
(define (check-quasi-integer-operations) (print-header "Checking quasi-integer operations...") (check (bitvector= (bitvector-logical-shift (bitvector 1 0 1 1) 2 0) (bitvector 1 1 0 0)) => #t) (check (bitvector= (bitvector-logical-shift (bitvector 1 0 1 1) -2 #t) (bitv...
eb8743df9194e7c359c912997e4b5c66c279216d1853f0e3b1e6ec34494d76ba
avatar29A/hs-aitubots-api
FormSwitch.hs
# LANGUAGE DuplicateRecordFields # {-# LANGUAGE OverloadedStrings #-} module FormSwitch where import Aitu.Bot import Aitu.Bot.Types hiding ( InputMediaType(..) ) import Aitu.Bot.Forms import Aitu.Bot.Commands import Aitu.Bot.Widgets import qualified Aitu.Bot...
null
https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/tutorials/simpleui/app/FormSwitch.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DuplicateRecordFields # module FormSwitch where import Aitu.Bot import Aitu.Bot.Types hiding ( InputMediaType(..) ) import Aitu.Bot.Forms import Aitu.Bot.Commands import Aitu.Bot.Widgets import qualified Aitu.Bot.Forms.Content.Content ...
1b37d9f1efab1c2dd921423ce9b92af0297402493ed5a1ce13192ae01a0c9a51
unnohideyuki/bunny
sample209.hs
LT `myeq` LT = True EQ `myeq` EQ = True GT `myeq` GT = True _ `myeq` _ = False main = do print $ LT `myeq` LT print $ EQ `myeq` GT
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample209.hs
haskell
LT `myeq` LT = True EQ `myeq` EQ = True GT `myeq` GT = True _ `myeq` _ = False main = do print $ LT `myeq` LT print $ EQ `myeq` GT
1e68c4942caac8a1735ae64cc1e8581ad439d13e8a5cfb013f091978b3e4508f
argp/bap
ssa_convenience.ml
* Utility functions for SSAs . It 's useful to have these in a separate file so it can use functions from and elsewhere . separate file so it can use functions from Typecheck and elsewhere. *) open Ssa open BatPervasives open Big_int_Z open Big_int_convenience open Type open Typecheck (* exp helpers *) l...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/ssa_convenience.ml
ocaml
exp helpers More convenience functions for building common expressions. * bitwise equality type inference shouldn't be needed when t is specified, but we're paranoid * Duplicate any shared nodes. Useful for using physical location as a unique identity. XXX: I think this would be much faster if we only d...
* Utility functions for SSAs . It 's useful to have these in a separate file so it can use functions from and elsewhere . separate file so it can use functions from Typecheck and elsewhere. *) open Ssa open BatPervasives open Big_int_Z open Big_int_convenience open Type open Typecheck let unknown t s = ...
220fb9383f1c952aec36dd60b0e9bd33d4e1ce15ce1aa893d22ce37ce94fbb32
josefs/Gradualizer
pattern.erl
-module(pattern). -export([pattern_test/1]). -spec pattern_test(integer()) -> {}. pattern_test(1) -> true; pattern_test(_) -> {}.
null
https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/pattern.erl
erlang
-module(pattern). -export([pattern_test/1]). -spec pattern_test(integer()) -> {}. pattern_test(1) -> true; pattern_test(_) -> {}.
162234c465bd911e7ec844b26d9681712c84eae2ab342b0b3194099aa8081725
slepher/astranaut
astranaut_error_SUITE.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2020 , %%% @doc %%% %%% @end Created : 6 Jul 2020 by < > %%%------------------------------------------------------------------- -module(astranaut_error_SUITE). -compile(export_all). -compile(nowarn_export_all). -...
null
https://raw.githubusercontent.com/slepher/astranaut/95445ee8de492ead2cd9d9671095e251e902986b/test/astranaut_error_SUITE.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- -------------------------------------------------------------------- Info = [tuple()] @end -------------------------------------------------------------------- ---------...
@author < > ( C ) 2020 , Created : 6 Jul 2020 by < > -module(astranaut_error_SUITE). -compile(export_all). -compile(nowarn_export_all). -include("rebinding.hrl"). -include_lib("stdlib/include/assert.hrl"). -include_lib("common_test/include/ct.hrl"). -rebinding_all([{clause_pinned, true}]). @spec ...
d8ad01190a033372b9e5bac467f3fdc2131a326b7b54e81e6f5c35c32d0187c6
ghcjs/jsaddle-dom
GlobalCrypto.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.GlobalCrypto (getCrypto, GlobalCrypto(..), gTypeGlobalCrypto, IsGlobalCrypto, toGlobalCrypto) where ...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/GlobalCrypto.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.GlobalCrypto (getCrypto, GlobalCrypto(..), gTypeGlobalCrypto, IsGlobalCrypto, toGlobalCrypto) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromInteg...
d3f3b485ee81a5aa630ec6a2a8ec6f7950aa58ef98f41a399253150eace83f79
roman01la/clojurescript-workshop
core.cljs
;; Vector (def v [1 2 3 4 5]) 4 4 5 [ 1 2 3 4 ] (conj v 6) ;; [1 2 3 4 5 6] [ 2 3 ] ( 2 3 4 5 6 ) (mapv inc v) ;; [2 3 4 5 6] [ 11 12 13 14 15 ] ;; Map (def m {:a 1 :b 2 :c {:d 3 :e 4}}) 1 1 1 3 { : a 1 : b 2 : c { : d 3 : e 4 } : f 5 } { : a 1 : b 2 : c { : d 3 : e 12 } } { : b ...
null
https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/03.data_access_and_transformation/core.cljs
clojure
Vector [1 2 3 4 5 6] [2 3 4 5 6] Map (0 1 2 3 4 5) (1 2 3 4 5 6) (1 3 5) threading last macro
(def v [1 2 3 4 5]) 4 4 5 [ 1 2 3 4 ] [ 2 3 ] ( 2 3 4 5 6 ) [ 11 12 13 14 15 ] (def m {:a 1 :b 2 :c {:d 3 :e 4}}) 1 1 1 3 { : a 1 : b 2 : c { : d 3 : e 4 } : f 5 } { : a 1 : b 2 : c { : d 3 : e 12 } } { : b 2 : c { : d 3 : e 4 } } { : a 1 : b 2 : c { : d 3 : e 5 } } { : a 1...
c4693ecbfa8742f8f03413aa7e2a238743743fdb8a322e67cf5f27c4ffd02f33
kelamg/HtDP2e-workthrough
ex31.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex31) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex31.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex31) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/batch-io) (define (letter-2 fst lst signature-name)...
67747130fc47a2b3928e86120ed51b5d350b77c806747b950da029869d32f714
OlivierSohn/hamazed
Output.hs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} | The functions in this module use < a lockfree , audio - engine > to create the audio signal and output it through the < / portaudio > library . = = = Audio thread isolation from GHC runtime Eventhough dur...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/ea0eb795cab7a3dadd3a0c77465eab358ca5c566/imj-audio/src/Imj/Audio/Output.hs
haskell
# LANGUAGE OverloadedStrings # * Avoiding MIDI jitter * Playing music * Postprocessing * C++ audio-engine implementation details | * initializes the global audio output stream if it is not initialized yet, * then runs the action containing calls to 'play', and possibly reentrant calls to 'usingAudioOutput' ...
# LANGUAGE ForeignFunctionInterface # # LANGUAGE LambdaCase # | The functions in this module use < a lockfree , audio - engine > to create the audio signal and output it through the < / portaudio > library . = = = Audio thread isolation from GHC runtime Eventhough during garbage collection , GHC pauses...
024655f0940b085bd32cc087a9f194a18a35dcdf8de35e39c23f1449ef7861f7
basho/riak_test
verify_dvv_repl.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Basho Technologies , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the Li...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/verify_dvv_repl.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2014 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ( C ) 2014 , Basho Technolog...
5fa109e85a3773272d3a3fedecce3d1fc75bba0b5a3fa9962bc933d7ec9e3479
vbmithr/ocaml-bitcoin
bloom.ml
open Sexplib.Std open Murmur3.Murmur_cstruct open Util let bytes_max = 36000 let funcs_max = 50 let seed_mult = 0xfba4c795l type t = { filter : Bitv.t ; len : int ; nb_funcs : int ; tweak : int32 ; } [@@deriving sexp] let filter_len { filter ; _ } = * Bitv.length filter / 8 * Bitv.length filter / ...
null
https://raw.githubusercontent.com/vbmithr/ocaml-bitcoin/391d7d59461fa73961cc78ff93a8ea8366f24744/src/bloom.ml
ocaml
open Sexplib.Std open Murmur3.Murmur_cstruct open Util let bytes_max = 36000 let funcs_max = 50 let seed_mult = 0xfba4c795l type t = { filter : Bitv.t ; len : int ; nb_funcs : int ; tweak : int32 ; } [@@deriving sexp] let filter_len { filter ; _ } = * Bitv.length filter / 8 * Bitv.length filter / ...
53120b3a4d1395f7bb1e2d5a1941a7f6b322072884c888ffa8ea6b58e4ae6524
threatgrid/ctia
fulltext_search_test.clj
(ns ctia.http.generative.fulltext-search-test (:require [clojure.test :refer [deftest testing is are use-fixtures join-fixtures]] [clojure.test.check.generators :as gen] [ctia.auth.capabilities :as capabilities] [ctia.auth.threatgrid :refer [map->Identity]] [ctia.bundle.core :as bundle] [ctia.http.g...
null
https://raw.githubusercontent.com/threatgrid/ctia/6c11ba6a7c57a44de64c16601d3914f5b0cf308e/test/ctia/http/generative/fulltext_search_test.clj
clojure
remove IDs so it can be used it in Bundle import To generate a bundle that contains only given entity(ies), we're gonna need to generate a complete bundle and remove all other keys from it Every single query gets tested with its own set of generated Bundle data. After the query gets sent, the response results are ...
(ns ctia.http.generative.fulltext-search-test (:require [clojure.test :refer [deftest testing is are use-fixtures join-fixtures]] [clojure.test.check.generators :as gen] [ctia.auth.capabilities :as capabilities] [ctia.auth.threatgrid :refer [map->Identity]] [ctia.bundle.core :as bundle] [ctia.http.g...
610cda3f1d2752cb39426f0ab133b4255d700253c2be0cd934340061bdb554b0
ghc/packages-dph
Benchmarks.hs
{-# OPTIONS -fno-warn-type-defaults #-} module Benchmarks where import Config import BuildBox import Control.Monad import qualified BuildBox.Data.Log as Log | DPH benchmark configuation . benchmarksDPH :: Config -> [Benchmark] benchmarksDPH config -- dot product -------------------------------------------------...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-buildbot/src/Benchmarks.hs
haskell
# OPTIONS -fno-warn-type-defaults # dot product -------------------------------------------------------- sum of squares --------------------------------------------------- evens ------------------------------------------------------------ primes ------------------------------------------------------------ quickso...
module Benchmarks where import Config import BuildBox import Control.Monad import qualified BuildBox.Data.Log as Log | DPH benchmark configuation . benchmarksDPH :: Config -> [Benchmark] benchmarksDPH config = (let run n = bench config ("dph.dotp.vectorised.par.N" ++ show n) ("dph-examples/dist/build/d...
fddcc9b052aa5333af7516531b9b20b18828652bf2080084e1dc0f48b6d6cfaf
ocaml-flambda/flambda-backend
tast_iterator.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/14e94c382a2ea09956a217c1ffb25ad5c24e3c89/ocaml/typing/tast_iterator.ml
ocaml
************************************************************************ OCaml ...
Isaac " " Avram Copyright 2019 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes open Typedtree type iterator = { binding_op: iterator -> binding_op -> unit; ...
3b9cede17fba87c7562fd537985e7231dc595e7607ead774c2bf3ca741b59758
opencog/pln
abduction.scm
;; ============================================================================= ;; AbductionRule ;; ;; <LinkType> ;; A ;; B ;; <LinkType> ;; C ;; B ;; |- ;; <LinkType> ;; A ;; C ;; Due to type system limitations , the rule has been divided into 3 : ;; abduction-inheritance-rule ;; abduction-i...
null
https://raw.githubusercontent.com/opencog/pln/332d2e0dc1ebdcc27b5f0c0e59d3bdebe98aa5ba/opencog/pln/rules/wip/abduction.scm
scheme
============================================================================= AbductionRule <LinkType> A B <LinkType> C B |- <LinkType> A C abduction-inheritance-rule abduction-implication-rule abduction-subset-rule ------------------------------------------------------...
Due to type system limitations , the rule has been divided into 3 : TODO : make BC compatible ( check if the premises could be unordered ) (load "formulas.scm") (define (gen-abduction-rule link-type) (BindLink (VariableList (VariableNode "$A") (VariableNode "$B") (Va...
0779cec027384c63b0828bd74176b22594d25c5e0f6ab4ee95917efefc1ab8f7
tomjaguarpaw/haskell-opaleye
Values.hs
{-# LANGUAGE Arrows #-} # LANGUAGE FlexibleInstances , MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE LambdaCase # module Opaleye.Internal.Values where import Opaleye.Internal.Column (Field_(Column)) import qualified Opaleye.Internal.Column as C import qualified Opaleye.Column as OC imp...
null
https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/6edcc5bd25c05d9a323417d0a5dec19ba0013852/src/Opaleye/Internal/Values.hs
haskell
# LANGUAGE Arrows # Some overlap here with extractAttrPE For rel8 | All fields @NULL@, even though technically the type may forbid that! Used to create such fields when we know we will never look at them expecting to find something non-NULL. { Boilerplate instance definitions. Theoretically, these are derivabl...
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE LambdaCase # module Opaleye.Internal.Values where import Opaleye.Internal.Column (Field_(Column)) import qualified Opaleye.Internal.Column as C import qualified Opaleye.Column as OC import qualified Opaleye.In...
53f8a9721499e8d4a9c519d4a14cd7420779c1cead7ee6ed3d764873c758687c
axelarge/advent-of-code
day14.clj
(ns advent-of-code.y2017.day14 (:require [advent-of-code.support :refer :all] [advent-of-code.y2017.day10 :as day10])) (def test-input "flqrgnkx") (def input "ljoxqyyw") (defn knot-hash [input n] (day10/solve2 (str input "-" n))) (defn to-bit-string [^String hashed] (-> (.toString (BigInteger. hash...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2017/day14.clj
clojure
(ns advent-of-code.y2017.day14 (:require [advent-of-code.support :refer :all] [advent-of-code.y2017.day10 :as day10])) (def test-input "flqrgnkx") (def input "ljoxqyyw") (defn knot-hash [input n] (day10/solve2 (str input "-" n))) (defn to-bit-string [^String hashed] (-> (.toString (BigInteger. hash...
4c8f90741c17555ab589daf4794be60d83f3a0144a8d2c92c91a264b94853b42
processone/xmpp
xmpp_config.erl
%%%------------------------------------------------------------------- @author < > %%% %%% Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved . %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You...
null
https://raw.githubusercontent.com/processone/xmpp/3e0f4b07af708718cf891ca409c0819e60606cf9/src/xmpp_config.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...
@author < > Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(xmpp_config). -export([debug/1, fqdn/1]). -spec fqdn(any()) -> {ok, [binary()]...