_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
dfca41908130404c3c6f7ce87db98f798387f10f212811d4422441696439d536
inaka/lsl
lsl_core_SUITE.erl
-module(lsl_core_SUITE). -author(''). -export([all/0]). -export([ invalid_board/1 , valid_board/1 , play_out_of_bounds/1 , play_in_bounds/1 , cant_cross_crossed/1 , with_just_one_left_won/1 , with_no_sticks_left_lost/1 , undo/1 , pretty_print/1 ])...
null
https://raw.githubusercontent.com/inaka/lsl/fdb5690fa51bc2f7fe8b50a22caca78fd9d8a7a5/test/lsl_core_SUITE.erl
erlang
-module(lsl_core_SUITE). -author(''). -export([all/0]). -export([ invalid_board/1 , valid_board/1 , play_out_of_bounds/1 , play_in_bounds/1 , cant_cross_crossed/1 , with_just_one_left_won/1 , with_no_sticks_left_lost/1 , undo/1 , pretty_print/1 ])...
7846b6f978af5372714eca58d407e166c94c7cbe5ee945a6feb7ef7b6d7b845c
lispcord/lispcord
ratelimits.lisp
(in-package :lispcord.ratelimits) (defparameter *ratelimitlimits* (make-hash-table :test #'equal) "Am i taking the piss on discord with those names? Yes") (defparameter *ratelimitsrems* (make-hash-table :test #'equal) "The keys are the routes") (defparameter *ratelimitsresets* (make-hash-table :test #'equa...
null
https://raw.githubusercontent.com/lispcord/lispcord/448190cc503a0d7e59bdc0ffddb2e9dba0a706af/src/ratelimits.lisp
lisp
we get <.<
(in-package :lispcord.ratelimits) (defparameter *ratelimitlimits* (make-hash-table :test #'equal) "Am i taking the piss on discord with those names? Yes") (defparameter *ratelimitsrems* (make-hash-table :test #'equal) "The keys are the routes") (defparameter *ratelimitsresets* (make-hash-table :test #'equa...
ca887898bd76e78a0b82400976ca50085df7cda69261e7f54b28e634a50adcea
cbiffle/cfm
Beh.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE BinaryLiterals # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module RTL.Beh where import Clash.Prelude hiding (cycle) import Data.Tuple (swap) import Control.Lens import Control.Monad.State import Control.Monad....
null
https://raw.githubusercontent.com/cbiffle/cfm/4d35a5055c1313172089d0e57ff56bc058f1759d/rtl/src/RTL/Beh.hs
haskell
load literal push data stack flush old T value pop data stack " push return stack Bit 7: T -> N Bit 5: N -> [T]
# LANGUAGE NoImplicitPrelude # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE BinaryLiterals # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module RTL.Beh where import Clash.Prelude hiding (cycle) import Data.Tuple (swap) import Control.Lens import Control.Monad.State import Control.Monad....
13a68aa78866565e8560a2c9daddafce6da7c3514f0cd14b580158f6cf5f504e
tgass/macbeth
Result.hs
module Macbeth.Fics.Api.Result ( Result(..), GameResult(..), toString ) where import Macbeth.Fics.Api.Api data Result = Result { gameId :: GameId , playerW :: String , playerB :: String , reason :: String , result :: GameResult } deriving (Show, Eq) toString :: Result -> String toString r = show (r...
null
https://raw.githubusercontent.com/tgass/macbeth/c64b3cc9b641444688b14a2838ee554932f0e9e6/macbeth-fics/src/Macbeth/Fics/Api/Result.hs
haskell
module Macbeth.Fics.Api.Result ( Result(..), GameResult(..), toString ) where import Macbeth.Fics.Api.Api data Result = Result { gameId :: GameId , playerW :: String , playerB :: String , reason :: String , result :: GameResult } deriving (Show, Eq) toString :: Result -> String toString r = show (r...
2e5fe08a947b35498671f908ffc5211662f6c95e7d81a2c58b9790cd6a96134b
agda/agda
RTE.hs
# LANGUAGE PolyKinds # module MAlonzo.RTE where import Unsafe.Coerce import qualified GHC.Exts as GHC (Any) import Data.Char import qualified Data.Word type AgdaAny = GHC.Any -- Special version of coerce that plays well with rules. {-# INLINE [1] coe #-} coe :: a -> b coe = unsafeCoerce {-# RULES "coerce-id" forall...
null
https://raw.githubusercontent.com/agda/agda/c7083badc01c49eb224dbc79f130dbcc693342e0/src/data/MAlonzo/src/MAlonzo/RTE.hs
haskell
Special version of coerce that plays well with rules. # INLINE [1] coe # # RULES "coerce-id" forall (x :: a) . coe x = x # \xFFFD, so to keep strings isomorphic to list of characters we do the same for characters. Words -- # INLINE rem64 # # INLINE lt64 # Support for musical coinduction.
# LANGUAGE PolyKinds # module MAlonzo.RTE where import Unsafe.Coerce import qualified GHC.Exts as GHC (Any) import Data.Char import qualified Data.Word type AgdaAny = GHC.Any coe :: a -> b coe = unsafeCoerce Builtin QNames . data QName = QName { nameId, moduleId :: Integer, qnameString :: String, qnameFixity :: ...
7d0e6a171900653894bba7f75281853a42e28e9b90f29644571e6c332505e915
jlollis/sicp-solutions
1.07.scm
#lang sicp Exercise 1.7 The good - enough ? test used in computing square roots will not be very effective for finding the square roots of very small numbers . ; Also, in real computers, arithmetic operations are almost always performed with limited precision. This makes our test inadequate for very large ; numbers....
null
https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Chapter%201%20Exercises/1.07.scm
scheme
Also, in real computers, arithmetic operations are almost always performed with limited precision. This makes our test inadequate for very large numbers. Explain these statements, with examples showing how the test fails for small and large numbers. An alternative strategy for implementing Design a square-root proce...
#lang sicp Exercise 1.7 The good - enough ? test used in computing square roots will not be very effective for finding the square roots of very small numbers . good - enough ? is to watch how guess changes from one iteration to the next and to stop when the change is a very small fraction of the guess . (define ...
1e0563088bf8903ef0b4e322ffe4a4c85743f5acd1c8823220b72d48bece275c
melisgl/micmac
test-game-theory.lisp
(in-package :micmac.game-theory) (defun test-find-nash-equilibrium () (flet ((foo (payoff oddments-1* oddments-2* value*) (multiple-value-bind (oddments-1 oddments-2 value) (find-nash-equilibrium payoff) (assert (equal (coerce oddments-1 'list) (coer...
null
https://raw.githubusercontent.com/melisgl/micmac/cff0a60475da131e56397d361f85eaae74d3c2e4/test/test-game-theory.lisp
lisp
(in-package :micmac.game-theory) (defun test-find-nash-equilibrium () (flet ((foo (payoff oddments-1* oddments-2* value*) (multiple-value-bind (oddments-1 oddments-2 value) (find-nash-equilibrium payoff) (assert (equal (coerce oddments-1 'list) (coer...
2d0b8d030fc7b684fd10661771536d88b978f795e144dee53620665aa48dd6a5
cram2/cram
event-protocol.lisp
Copyright ( c ) 2011 , < > ;;; 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 o...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_occasions_events/src/event-protocol.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Red...
Copyright ( c ) 2011 , < > * Neither the name of the Intelligent Autonomous Systems Group/ 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 COPYRIGHT OWNER OR ...
82be42cd3c9d3344e03da89a24c7d02c64b423365dbe948576fecbee5329936b
jlouis/graphql-erlang
schema_pet.erl
-module(schema_pet). -export([inject/0]). inject() -> TestField = {input_object, #{ id => <<"InputTest">>, description => ["Input Object for testing uniqueness"], fields => #{ field => #{ type => 'Bool!', ...
null
https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/test/schema_pet.erl
erlang
-module(schema_pet). -export([inject/0]). inject() -> TestField = {input_object, #{ id => <<"InputTest">>, description => ["Input Object for testing uniqueness"], fields => #{ field => #{ type => 'Bool!', ...
9b3049a7f91c78dbf3af3b6fd8170e1cf1a08bc749ee7e58b1a401fca6393804
openmusic-project/openmusic
colorize-lisp-examples.lisp
This is code was taken from and is a quick hack to colorize lisp examples in the html generated by Texinfo . ;;; It is not general-purpose utility, though it could easily be ;;; turned into one. ;;;; colorize-package.lisp (defpackage :colorize (:use :common-lisp) (:export :scan-string :format-scan :html-colo...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/foreign-interface/ffi/CFFI/doc/colorize-lisp-examples.lisp
lisp
It is not general-purpose utility, though it could easily be turned into one. colorize-package.lisp border : 0px ; margin : 0px ; } text - decoration : none ; border : 0px ; margin : 0px ; } text - decoration : none ; border : 0px ; margin : 0px ; } text - decoration : none ; border : 0px ; margin : 0px ; } tex...
This is code was taken from and is a quick hack to colorize lisp examples in the html generated by Texinfo . (defpackage :colorize (:use :common-lisp) (:export :scan-string :format-scan :html-colorization :find-coloring-type :autodetect-coloring-type :coloring-types :scan :scan-any :adv...
ad2d41384d23c81a50c210fa2ae14bda9a3b1ca6de25eadafa1ae134b622f6c4
gelisam/giggles-is-you
Angle.hs
-- | Geometric functions concerning angles. If not otherwise specified, all angles are in radians. module Graphics.Gloss.Geometry.Angle ( degToRad , radToDeg , normalizeAngle ) where -- | Convert degrees to radians degToRad :: Float -> Float degToRad d = d * pi / 180 # INLINE degToRad # ...
null
https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Geometry/Angle.hs
haskell
| Geometric functions concerning angles. If not otherwise specified, all angles are in radians. | Convert degrees to radians | Convert radians to degrees
module Graphics.Gloss.Geometry.Angle ( degToRad , radToDeg , normalizeAngle ) where degToRad :: Float -> Float degToRad d = d * pi / 180 # INLINE degToRad # radToDeg :: Float -> Float radToDeg r = r * 180 / pi # INLINE radToDeg # | Normalize an angle to be between 0 and 2*pi rad...
485eda38f2a4463e9b544bef2e9e4d6e22dd9f25b90dba5d73cb0a0ca6fcb20b
jsarracino/spyder
Specs.hs
# LANGUAGE LambdaCase # module Language.Spyder.Translate.Specs ( prefixApps , specToBoogie , dimVars , inlineApps , fillForeach , renamePrev , updatePrevs ) where import qualified Language.Boogie.AST as BST import qualified Language.Boogie.Position as Pos import Language.Spyder.AST.Spec import Languag...
null
https://raw.githubusercontent.com/jsarracino/spyder/a2f6d08eb2a3907d31a89ae3d942b50aaba96a88/Language/Spyder/Translate/Specs.hs
haskell
recur x@RelIndex{} = x TODO: only works if both are the same dimension. also, we don't currently have binops over arrays. similar to renamePrev, but in this case, we're updating a (possibly bare) prev to the variable version e.g. updatePrev prev(foo,0) => prev_var(prev_foo,0,idx) vs renamePrev prev(foo,0) => prev...
# LANGUAGE LambdaCase # module Language.Spyder.Translate.Specs ( prefixApps , specToBoogie , dimVars , inlineApps , fillForeach , renamePrev , updatePrevs ) where import qualified Language.Boogie.AST as BST import qualified Language.Boogie.Position as Pos import Language.Spyder.AST.Spec import Languag...
cee4edfb5b779567990d4554e22ea966f9e8eaa5f9c5f4f12aba9fafd4d4fc5f
WormBase/wormbase_rest
protein.clj
(ns rest-api.classes.protein (:require [rest-api.classes.gene.widgets.external-links :as external-links] [rest-api.classes.protein.widgets.overview :as overview] [rest-api.classes.protein.widgets.location :as location] [rest-api.classes.protein.widgets.sequences :as sequences] [rest-api.classes.pr...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/protein.clj
clojure
(ns rest-api.classes.protein (:require [rest-api.classes.gene.widgets.external-links :as external-links] [rest-api.classes.protein.widgets.overview :as overview] [rest-api.classes.protein.widgets.location :as location] [rest-api.classes.protein.widgets.sequences :as sequences] [rest-api.classes.pr...
ea8c5dc98d75dce582b7bb6d5661eff5941de7728c3ec6ef6d2c3d2312929d97
Feldspar/feldspar-language
ValueInfo.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/ValueInfo.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...
e3f9057907933665a8360d80941a744dfa2655cb64a22841ad36c717357d8fe9
cpsc411/cpsc411-pub
a6-progs.rkt
#lang racket/base (require racket/match) (provide (all-defined-out)) ;; generated from the reference solution ( for / list ( [ pass ( drop ( drop - right ( current - pass - list ) 2 ) 2 ) ] ) (for/list ([i values-lang-v6-programs]) ((apply compose (reverse (takef (current-pas...
null
https://raw.githubusercontent.com/cpsc411/cpsc411-pub/757ececf84d54d86cfa0c2c6c84f1456c8765db9/cpsc411-lib/cpsc411/test-suite/public/a6-progs.rkt
racket
generated from the reference solution
#lang racket/base (require racket/match) (provide (all-defined-out)) ( for / list ( [ pass ( drop ( drop - right ( current - pass - list ) 2 ) 2 ) ] ) (for/list ([i values-lang-v6-programs]) ((apply compose (reverse (takef (current-pass-list) (...
288d438441145f1652e2126b40ded63826a15f8c8f6fb72b78f07f7c543cf75c
spechub/Hets
Logic.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE FunctionalDependencies # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE ExistentialQuantification # # LANGUAGE MonoLocalBinds # | Module : ./Logic / Logic.hs D...
null
https://raw.githubusercontent.com/spechub/Hets/4cedaf8dbdb8909955e0066b465c331973043bbf/Logic/Logic.hs
haskell
# LANGUAGE DeriveDataTypeable # | Stability of logic implementations | shortcut for class constraints | shortcut for class constraints | shortcut for class constraints with equality | maps from a to a | the name of a logic. Define instances like "data CASL = CASL deriving (Show, Typeable, Data)" default im...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE FunctionalDependencies # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE ExistentialQuantification # # LANGUAGE MonoLocalBinds # | Module : ./Logic / Logic.hs Description : central interface ( t...
f3e3c8c7f72ef4fa843c4522699545a00fa49bed8bf2f0beb5ceb6bf6b7e1757
music-suite/music-preludes
Standard.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # ------------------------------------------------------------------------------------ -- | Copyright : ( c ) 2012 -- -- License : BSD-style -- Maintainer : -- Stability : exper...
null
https://raw.githubusercontent.com/music-suite/music-preludes/2512b7dba62b4adadd04c01772046a3c09be72d7/src/Music/Prelude/Standard.hs
haskell
# LANGUAGE DeriveDataTypeable # ---------------------------------------------------------------------------------- | License : BSD-style Stability : experimental Standard music representation. ----------------------------------------------------------------------------------- show _ = ""
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # Copyright : ( c ) 2012 Maintainer : Portability : non - portable ( TF , ) module Music.Prelude.Standard ( module Music.Pitch, module Music.Dynamics, module Music.Articulation, module Music....
cac41a455967ca0ead26bb6f5edde5551a8c8858fab2d7bbdf6facce34524ab1
kuhumcst/DanNet
client.cljs
(ns dk.cst.dannet.web.client "The central namespace of the frontend app." (:require [rum.core :as rum] [reitit.frontend :as rf] [reitit.frontend.easy :as rfe :refer [href]] [reitit.frontend.history :as rfh] [dk.cst.dannet.web.components :as com] [dk.cst.da...
null
https://raw.githubusercontent.com/kuhumcst/DanNet/00f088341b68d7bf94b90bc690eb049627799229/src/main/dk/cst/dannet/web/client.cljs
clojure
Other routes bypass the frontend routing entirely, e.g. /download/... Please refer to /doc/web.md to see how routing is meant to work. keep up-to-date
(ns dk.cst.dannet.web.client "The central namespace of the frontend app." (:require [rum.core :as rum] [reitit.frontend :as rf] [reitit.frontend.easy :as rfe :refer [href]] [reitit.frontend.history :as rfh] [dk.cst.dannet.web.components :as com] [dk.cst.da...
ee7ba40dd978d4c0964a158337ca31b6adf7cab1b1891290425aa4c8d087ab02
herbelin/coq-hh
lemmas.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/toplevel/lemmas.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * A hook start_proof calls on the ty...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Dec...
7a0565a6b871579919d54f6119ce5736b150c20fd161297cc9380d8b7b0fe8f4
ocaml/ocamlfind
fl_metascanner.mli
(* $Id$ * ---------------------------------------------------------------------- * *) * Parses META files open Fl_metatoken type formal_pred = [ `Pred of string (** Positive occurence of a formal predicate var *) | `NegPred of string (** Negative occurence of a formal predicate var *) ] type fla...
null
https://raw.githubusercontent.com/ocaml/ocamlfind/00b1b75b4f0c75387d38530cbc6eeb3148a08b3b/src/findlib/fl_metascanner.mli
ocaml
$Id$ * ---------------------------------------------------------------------- * * Positive occurence of a formal predicate var * Negative occurence of a formal predicate var * The name of the defined variable * The flavour of the definition * The formal predicates of the def * The value assigned to the variab...
* Parses META files open Fl_metatoken type formal_pred = ] type flavour = [ `BaseDef | `Appendix ] * [ ` BaseDef ] refers to META definitions using the " = " operator , * and [ ` Appendix ] refers to definitions using the " + = " operator . * and [`Appendix] refers to definitions usin...
6f04081ae7689595a3222ea503c23f933086c09fcd1203759f60d5395c00f7d7
valderman/haste-compiler
LocalStorage.hs
{-# LANGUAGE OverloadedStrings #-} | Basic bindings to HTML5 WebStorage . module Haste.LocalStorage (setItem, getItem, removeItem) where import Haste import Haste.Prim.Foreign import Haste.Serialize import Haste.JSON -- | Locally store a serializable value. setItem :: Serialize a => JSString -> a -> IO () setItem k ...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/haste-lib/src/Haste/LocalStorage.hs
haskell
# LANGUAGE OverloadedStrings # | Locally store a serializable value. | Load a serializable value from local storage. Will fail if the given key does not exist or if the value stored at the key does not match the requested type. | Remove a value from local storage.
| Basic bindings to HTML5 WebStorage . module Haste.LocalStorage (setItem, getItem, removeItem) where import Haste import Haste.Prim.Foreign import Haste.Serialize import Haste.JSON setItem :: Serialize a => JSString -> a -> IO () setItem k = store k . encodeJSON . toJSON store :: JSString -> JSString -> IO () stor...
1cee9f2dfc260722fc32d4d2c8a7a29d715d05882fb75d095b6cff61621f5d86
Rhywun/get-programming-with-haskell
Lib.hs
module Lib ( cheaperPizza , describePizza ) where type Size = Double area :: Size -> Double area size = pi * (size / 2) ^ 2 type Cost = Double type Pizza = (Size, Cost) costPerSqIn :: Pizza -> Double costPerSqIn (size, cost) = cost / area size cheaperPizza :: Pizza -> Pizza -> Pizza cheaperPizza p1 p2 = cas...
null
https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit06/Lesson35/pizzas/src/Lib.hs
haskell
module Lib ( cheaperPizza , describePizza ) where type Size = Double area :: Size -> Double area size = pi * (size / 2) ^ 2 type Cost = Double type Pizza = (Size, Cost) costPerSqIn :: Pizza -> Double costPerSqIn (size, cost) = cost / area size cheaperPizza :: Pizza -> Pizza -> Pizza cheaperPizza p1 p2 = cas...
bcc22f3630f52e6ca56f95f4b0501e5ae0d8625fa059ff3706a0cbdca914d57d
rtoy/ansi-cl-tests
defgeneric-method-combination-or.lsp
;-*- Mode: Lisp -*- Author : Created : Sat May 24 21:31:55 2003 Contains : Tests of with : method - combination OR (in-package :cl-test) (declaim (special *x*)) (compile-and-load "defgeneric-method-combination-aux.lsp") (deftest defgeneric-method-combination.or.1 (let ((*x* nil) (fn ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/defgeneric-method-combination-or.lsp
lisp
-*- Mode: Lisp -*-
Author : Created : Sat May 24 21:31:55 2003 Contains : Tests of with : method - combination OR (in-package :cl-test) (declaim (special *x*)) (compile-and-load "defgeneric-method-combination-aux.lsp") (deftest defgeneric-method-combination.or.1 (let ((*x* nil) (fn (eval '(defgeneric ...
f88d91e09ded2f5401c9ff45b05cf573daf549520fccabaf6c67f1afc9be7a58
Tyruiop/syncretism
core.cljs
(ns synfron.core (:require [goog.dom :as gdom] [reagent.dom :as rdom] [synfron.state :as state] [synfron.ui :as ui])) (comment (when (.-serviceWorker js/navigator) (.addEventListener js/window "load" (fn [] (-> js/navigator .-serviceWorker (.register "/sw...
null
https://raw.githubusercontent.com/Tyruiop/syncretism/eb317eea9611f8a71111427495aebcf718f97c6c/syncretism-frontend/src/main/synfron/core.cljs
clojure
(ns synfron.core (:require [goog.dom :as gdom] [reagent.dom :as rdom] [synfron.state :as state] [synfron.ui :as ui])) (comment (when (.-serviceWorker js/navigator) (.addEventListener js/window "load" (fn [] (-> js/navigator .-serviceWorker (.register "/sw...
9facba061e98ab952a160d903ff08a3efc2d7c9f484e8ac490db8b4ea61a4c2a
ghc/packages-Cabal
PkgconfigVersion.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE StandaloneDeriving # module UnitTests.Distribution.PkgconfigVersion (pkgconfigVersionTests) where import Test.Tasty import Test.Tasty.QuickCheck import Distribution.Parsec (eitherParsec) import Distribution.Pretty import Distribution.Types.PkgconfigV...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/tests/UnitTests/Distribution/PkgconfigVersion.hs
haskell
# LANGUAGE DeriveDataTypeable #
# LANGUAGE StandaloneDeriving # module UnitTests.Distribution.PkgconfigVersion (pkgconfigVersionTests) where import Test.Tasty import Test.Tasty.QuickCheck import Distribution.Parsec (eitherParsec) import Distribution.Pretty import Distribution.Types.PkgconfigVersionRange import Test.QuickCheck....
63fd7a4ffbd3350288e6f80bda3d4e0eda2f1d96a83d8eb681e3f9f67d37b1bd
input-output-hk/cardano-sl
Mode.hs
# LANGUAGE DataKinds # | Constraints for LRC ; a restricted version of ` WorkMode ` . module Pos.DB.Lrc.Mode ( LrcMode ) where import Universum import UnliftIO (MonadUnliftIO) import Pos.DB.Class (MonadDB, MonadGState) import Pos.DB.Lrc.Context (HasLrcContext...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/db/src/Pos/DB/Lrc/Mode.hs
haskell
# LANGUAGE DataKinds # | Constraints for LRC ; a restricted version of ` WorkMode ` . module Pos.DB.Lrc.Mode ( LrcMode ) where import Universum import UnliftIO (MonadUnliftIO) import Pos.DB.Class (MonadDB, MonadGState) import Pos.DB.Lrc.Context (HasLrcContext...
4549390fc19a7eff8d9ee96be022b819c28bdee60aa147053f44c43c89447d72
monadbobo/ocaml-core
handler.mli
(** A handler is a continuation that captures the current async execution context. It can be scheduled for future invocation by installing it in a deferred. *) type 'a t (** [create k] creates a handler by coupling the continuation [k] together with the evaluation context that is current at the time [create] ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/core/lib/handler.mli
ocaml
* A handler is a continuation that captures the current async execution context. It can be scheduled for future invocation by installing it in a deferred. * [create k] creates a handler by coupling the continuation [k] together with the evaluation context that is current at the time [create] is called. Whene...
type 'a t val create : ('a -> unit) -> 'a t val prepend : 'a t -> f:('b -> 'a) -> 'b t val filter : 'a t -> f:('a -> bool) -> 'a t val install : 'a t -> 'a Deferred.t -> (unit -> unit) val schedule : 'a t -> 'a -> unit
f6723e6a1a3ee9781bf6b2c80befb099934d5830483911adef5a6ec526d4b232
khibino/haskell-relational-record
ArrowQuery.hs
# LANGUAGE FlexibleContexts # module ArrowQuery ( module Database.Relational.Query, query, queryMaybe, query', queryMaybe', wheres, having, groupBy, placeholder, relation, relation', aggregateRelation, aggregateRelation', QuerySimple, QueryAggregate, ) where import Control.Arrow import Database.Record i...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/doc/slide/haskell-hackathon-201412/ArrowQuery.hs
haskell
# LANGUAGE FlexibleContexts # module ArrowQuery ( module Database.Relational.Query, query, queryMaybe, query', queryMaybe', wheres, having, groupBy, placeholder, relation, relation', aggregateRelation, aggregateRelation', QuerySimple, QueryAggregate, ) where import Control.Arrow import Database.Record i...
bc2d8627daa8de2ed0cc953619dd5a768de0f134ececd7486662a69dc79b3072
solita/mnt-teet
index_commands.clj
(ns teet.admin.index-commands (:require [teet.db-api.core :as db-api :refer [defcommand]] [teet.meta.meta-model :as meta-model] [datomic.client.api :as d] [clj-time.core :as t] [clj-time.coerce :as c] [teet.util.coerce :as cc] [teet.util.date :as...
null
https://raw.githubusercontent.com/solita/mnt-teet/2dcdad70d4dcf33eef56650f8f6d3fa9f7756cec/app/backend/src/clj/teet/admin/index_commands.clj
clojure
(ns teet.admin.index-commands (:require [teet.db-api.core :as db-api :refer [defcommand]] [teet.meta.meta-model :as meta-model] [datomic.client.api :as d] [clj-time.core :as t] [clj-time.coerce :as c] [teet.util.coerce :as cc] [teet.util.date :as...
29acf58620e219140d3aa9ab0bd6ed213741577fabf7d65e25d83713b3c5a57e
CloudI/CloudI
parse_trans.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% -------------------------------------------------- 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 L...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_parse_trans/src/parse_trans.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 permissions and limi...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- 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 @aut...
556e17f4bf170a63e6dbcca6c8d9a682a86f33f1f135b75b1884e7280a41496c
psilord/option-9
constants.lisp
(in-package #:option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) ;; I do some velocity computations for constants at compile time in macros.. (eval-when (:compile-toplevel :load-toplevel :execute) Timestep simulation variables for fixed , but uncoupled , time steps . simulati...
null
https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/constants.lisp
lisp
I do some velocity computations for constants at compile time in macros.. Because I'm using a fixed timestep, figure out the incremental rate for the fixed update hertz I am using. Return the value as a slice of *dt*. These are just named constants not per hz or anything if the argument is a literal keyword, we w...
(in-package #:option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) (eval-when (:compile-toplevel :load-toplevel :execute) Timestep simulation variables for fixed , but uncoupled , time steps . simulation frequency in Hertz (defparameter *hz* 60d0) a single unit of time in s...
9a5ba754a8a6824a53c3c26a9c4c7c11fa0c1742226351c9386212393fbf2c96
AlexeyRaga/azure-functions-haskell-worker
Blob.hs
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE StrictData #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Azure.Functions.Bindings.Blob ( ConnectionName(..) , ...
null
https://raw.githubusercontent.com/AlexeyRaga/azure-functions-haskell-worker/a2fd35c5c4661e6255016bc004681c451b8beb46/azure-functions-worker/src/Azure/Functions/Bindings/Blob.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # # LANGUAGE StrictData #
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Azure.Functions.Bindings.Blob ( ConnectionName(..) , BlobBinding(..) , BlobContent(..) , Blob(..) ) where import Azure.Functions.Bindings.Class import ...
ab9a24a1b2752a62dfc3396f2014c8f978a0c9ca16480edb8456ba1bcfdfffbc
andorp/bead
Registration.hs
# LANGUAGE CPP # module Bead.Persistence.SQL.Registration where import Database.Persist.Sql import qualified Bead.Domain.Entities as Domain import qualified Bead.Domain.Relationships as Domain import Bead.Persistence.SQL.Class import Bead.Persistence.SQL.Entities #ifdef TEST import ...
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/Persistence/SQL/Registration.hs
haskell
* Registration Save the user registration information which is created at the time, when the user starts a new registration Loads the user registration
# LANGUAGE CPP # module Bead.Persistence.SQL.Registration where import Database.Persist.Sql import qualified Bead.Domain.Entities as Domain import qualified Bead.Domain.Relationships as Domain import Bead.Persistence.SQL.Class import Bead.Persistence.SQL.Entities #ifdef TEST import ...
656e2c7f22efa09620f256146fda30be5cddda35ef676717efa445fcfe53ea19
clojure/tools.nrepl
load_file.clj
(ns ^{:author "Chas Emerick"} clojure.tools.nrepl.middleware.load-file (:require [clojure.tools.nrepl.middleware.interruptible-eval :as eval] [clojure.tools.nrepl.transport :as t]) (:import clojure.tools.nrepl.transport.Transport) (:use [clojure.tools.nrepl.middleware :as middleware :only (set-de...
null
https://raw.githubusercontent.com/clojure/tools.nrepl/d4bb14e841b453721f009f4e9e0e9b2742b4bdc2/src/main/clojure/clojure/tools/nrepl/middleware/load_file.clj
clojure
size limitations (cannot eval an expression larger than some size into an expression to be evaluated doesn't work see and below are cleaned up on subsequent loads *ns* is always 'user' after loading a file, so *remove it to avoid confusing tools that assume any *:ns always reports *ns*
(ns ^{:author "Chas Emerick"} clojure.tools.nrepl.middleware.load-file (:require [clojure.tools.nrepl.middleware.interruptible-eval :as eval] [clojure.tools.nrepl.transport :as t]) (:import clojure.tools.nrepl.transport.Transport) (:use [clojure.tools.nrepl.middleware :as middleware :only (set-de...
842765c410f9301b7a251b871109035d3a4ab1a6ea9265c279754db786e11722
fwcd/curry-language-server
Deps.hs
module Curry.LanguageServer.CPM.Deps (invokeCPMDeps) where import Curry.LanguageServer.CPM.Monad import Curry.LanguageServer.CPM.Process (invokeCPM) import Data.Either.Combinators (rightToMaybe) import Data.Maybe (mapMaybe) import Text.Parsec (Parsec, noneOf, spaces, string, many, parse) type Parser a = Parsec String...
null
https://raw.githubusercontent.com/fwcd/curry-language-server/09a58095248aa0dd6b6a2f23ded5a790f2531d86/src/Curry/LanguageServer/CPM/Deps.hs
haskell
| Finds the dependencies (name-version) in the project with the given path.
module Curry.LanguageServer.CPM.Deps (invokeCPMDeps) where import Curry.LanguageServer.CPM.Monad import Curry.LanguageServer.CPM.Process (invokeCPM) import Data.Either.Combinators (rightToMaybe) import Data.Maybe (mapMaybe) import Text.Parsec (Parsec, noneOf, spaces, string, many, parse) type Parser a = Parsec String...
f08479ba8f0baa16be398265bee240296abad06d36550a4381e9cca4244d3561
elben/planjure
appstate.cljs
(ns planjure.appstate (:require [om.core :as om :include-macros true] [planjure.plan :as plan] [cljs.core.async :refer [put! chan]])) (def app-state (atom {:world (plan/random-world 20 20) :setup {:start [0 0] :finish [19 19]} Replan on world change ? :path [] :...
null
https://raw.githubusercontent.com/elben/planjure/61cb0cb808ae8d79ac9f9e61ffff3c43b3d6611d/src/cljs/planjure/appstate.cljs
clojure
Mark visited nodes on canvas? Cost of last plan
(ns planjure.appstate (:require [om.core :as om :include-macros true] [planjure.plan :as plan] [cljs.core.async :refer [put! chan]])) (def app-state (atom {:world (plan/random-world 20 20) :setup {:start [0 0] :finish [19 19]} Replan on world change ? :path [] :...
d3ef088b543b67c9043c2f686d8f6c0cf7c5ea4298f3e31472aecdfcfd1ddc72
camllight/camllight
frx_widget.mli
value version : string ;; value resizeable : support__widget -> unit ;;
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/frx/frx_widget.mli
ocaml
value version : string ;; value resizeable : support__widget -> unit ;;
079664e8728c7d321cb244e95dedd47665cc94e5d07b9c0bc8b936b143698c03
marcoheisig/adventofcode
day-02.lisp
(defpackage :adventofcode-2020-day-2 (:use :cl)) (in-package :adventofcode-2020-day-2) (defun map-input (function) (with-open-file (stream "input" :direction :input) (loop for line = (read-line stream nil nil) while line do (multiple-value-bind (start end starts ends) (cl-ppcre:scan "([0-9]+)-...
null
https://raw.githubusercontent.com/marcoheisig/adventofcode/e96a0da17cd79f424af984ed2648b49ffdacb893/2020/day-02/day-02.lisp
lisp
(defpackage :adventofcode-2020-day-2 (:use :cl)) (in-package :adventofcode-2020-day-2) (defun map-input (function) (with-open-file (stream "input" :direction :input) (loop for line = (read-line stream nil nil) while line do (multiple-value-bind (start end starts ends) (cl-ppcre:scan "([0-9]+)-...
6f1403ee9d357b815c5d55be9e5f99bbd9bf11cdc8f661dc35388f4586be3a85
haskell/cabal
Log.hs
module Distribution.Solver.Modular.Log ( displayLogMessages , SolverFailure(..) ) where import Prelude () import Distribution.Solver.Compat.Prelude import Distribution.Solver.Types.Progress import Distribution.Solver.Modular.Dependency import Distribution.Solver.Modular.Message import Distribution.Solver...
null
https://raw.githubusercontent.com/haskell/cabal/6896c6aa0e4804913aaba0bbbe00649e18f17bb8/cabal-install-solver/src/Distribution/Solver/Modular/Log.hs
haskell
| Information about a dependency solver failure. | Postprocesses a log file. This function discards all log messages and avoids calling 'showMessages' if the log isn't needed (specified by 'keepLog'), for efficiency.
module Distribution.Solver.Modular.Log ( displayLogMessages , SolverFailure(..) ) where import Prelude () import Distribution.Solver.Compat.Prelude import Distribution.Solver.Types.Progress import Distribution.Solver.Modular.Dependency import Distribution.Solver.Modular.Message import Distribution.Solver...
5f439dfcd6510e0a42565d26dad6bde367a8c8fef2942edd0e5c0b935ab71a0a
phoe-trash/gateway
standard-crown.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; GATEWAY " phoe " Herda 2016 ;;;; standard-crown.lisp (in-package #:gateway) (defclass standard-crown (crown) ((%library :accessor %library) (%inactive-players :accessor inactive-players :initform ()) (%inactive-players-l...
null
https://raw.githubusercontent.com/phoe-trash/gateway/a8d579ccbafcaee8678caf59d365ec2eab0b1a7e/_old/classes/standard-crown.lisp
lisp
GATEWAY standard-crown.lisp `((clean-connections :lock ,(n-lock crown) :getter ,(curry #'n-connections crown) (clean-connections :lock ,(e-lock crown) :getter ,(curry #'e-connections crown) (clean-connections :lock ,(i-lock crown) :getter ,(cur...
" phoe " Herda 2016 (in-package #:gateway) (defclass standard-crown (crown) ((%library :accessor %library) (%inactive-players :accessor inactive-players :initform ()) (%inactive-players-lock :accessor inactive-players-lock :initform (%crown-lock "inactive-players")) (%queue :...
394b490ea63f260f67d0bf8b6771fc2d7540a89acbfe5e82685308997b89f9e6
OCamlPro/ocaml-top
completion.ml
(**************************************************************************) (* *) (* Copyright 2013 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/OCamlPro/ocaml-top/8515c086e5891fdf86fee29f7153794d2513d551/src/completion.ml
ocaml
************************************************************************ Copyright 2013 OCamlPro All rights reserved. This...
the GNU Public License version 3.0 . open Tools.Ops module OBuf = OcamlBuffer let is_prefix_char = let chars = List.map int_of_char ['.';'_';'\''] in fun gchar -> Glib.Unichar.isalnum gchar || List.mem gchar chars let utfify msg = Add some nicer - looking chars ...
6b7844337e8c3066d3c8b97e901cf3224c0149df2c2187b9b240c6974d104d9c
cbiffle/cfm
TestUtil.hs
# LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeApplications # module RTL.TestUtil where import Clash.Prelude import Data.Maybe (isNothing) import Control.Lens hiding (op) import Test.Hspec import Test.QuickCheck hiding ((.&.)) import CFM.Inst import RTL.CoreInterface...
null
https://raw.githubusercontent.com/cbiffle/cfm/4d35a5055c1313172089d0e57ff56bc058f1759d/rtl/test/RTL/TestUtil.hs
haskell
ignore simultaneous loads/stores ignore simultaneous loads/stores
# LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeApplications # module RTL.TestUtil where import Clash.Prelude import Data.Maybe (isNothing) import Control.Lens hiding (op) import Test.Hspec import Test.QuickCheck hiding ((.&.)) import CFM.Inst import RTL.CoreInterface...
034b9dc3e45224f93d7eeee23b273728d8304fa14b7cdadb2bdc9ed6f494d199
keithj/cl-sam
package.lisp
;;; Copyright ( c ) 2009 - 2013 . All rights reserved . ;;; This file is part of cl - sam . ;;; ;;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; ...
null
https://raw.githubusercontent.com/keithj/cl-sam/03321f3c06765bb1fbb92a16878cb390c954bbfb/src/package.lisp
lisp
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 PARTICULAR PURPOSE. See the GNU General Publ...
Copyright ( c ) 2009 - 2013 . All rights reserved . This file is part of cl - sam . it under the terms of the GNU 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 General Public License (in-package :cl-user...
ac542b1685c05e63a19e66cc4b560c3cd17bcfb73e26f75637d3219f74b86e36
Phantas0s/sokoban
hud.cljc
(ns sokoban.hud) #?(:clj (defn update-hud! [{:keys [level] :as state}])) #?(:cljs (defn update-hud! [{:keys [level] :as state}] (let [el-level (.getElementById js/document "hud-level")] (set! (.-innerHTML el-level) level))))
null
https://raw.githubusercontent.com/Phantas0s/sokoban/b481314b5544c30f43ecfadcb0edeb2db44669e6/src/sokoban/hud.cljc
clojure
(ns sokoban.hud) #?(:clj (defn update-hud! [{:keys [level] :as state}])) #?(:cljs (defn update-hud! [{:keys [level] :as state}] (let [el-level (.getElementById js/document "hud-level")] (set! (.-innerHTML el-level) level))))
03a4f97c36a39f82438950cfb8297832c7909a3d702753c6f233d407068956ec
AshleyYakeley/Truth
Test.hs
module Shapes.Test ( -- * General TestTree , TestName , getTestName , setTestName , repeatedTest , repeatTest , pauseTestOnFailure , testMain , testMainNoSignalHandler , BuildTestTree(..) , ignoreTestBecause , expectFailBecause , failTestBecause , testMa...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/d8e0719c9f032a3cf0ed66dbcfaee80de6ca9b07/Changes/shapes/src/Shapes/Test.hs
haskell
* General * Options * Unit * QuickCheck * Golden | time in ms
module Shapes.Test ( TestTree , TestName , getTestName , setTestName , repeatedTest , repeatTest , pauseTestOnFailure , testMain , testMainNoSignalHandler , BuildTestTree(..) , ignoreTestBecause , expectFailBecause , failTestBecause , testMark , localOpt...
87a49120d8d3d688fe37f784e879a769001e84aa3f745a78ea5cbea4723b93cd
ocaml/oasis-db
Browse.ml
open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml open CalendarLib open ODBPkgVer open OASISTypes open OASISVersion open ODBGettext open Context open Template open Common module MapStringCsl = Map.Make (struct type t = string option ...
null
https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/web/Browse.ml
ocaml
Build a map after extracting categories from package version Email stripping
open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml open CalendarLib open ODBPkgVer open OASISTypes open OASISVersion open ODBGettext open Context open Template open Common module MapStringCsl = Map.Make (struct type t = string option ...
c56bb395c964507708a54d49dcf3cb854b2ef1c509d522561900849123b2d6cf
exoscale/clojure-kubernetes-client
v1_volume_attachment_status.clj
(ns clojure-kubernetes-client.specs.v1-volume-attachment-status (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-volume-error :refer :all] [clojure-kubernetes-client.specs.v1-volume-error :refer :all] ) (:import (j...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_volume_attachment_status.clj
clojure
(ns clojure-kubernetes-client.specs.v1-volume-attachment-status (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-volume-error :refer :all] [clojure-kubernetes-client.specs.v1-volume-error :refer :all] ) (:import (j...
ef7e58284bf6f1b9ed485b88e803128b211db5a4f8b5f51de3736546844e241f
PaulBatchelor/codex
wt5.scm
(define wt5ft #("95c5afd8%" "0a8ae9e9%" "03cd822c%" "42e62539%")) (define (wt5-exp1) (regset (sqlite-open (monolith:mkhome "s/a.db")) 0) (regset (ftlist-new) 1) (ftlist-append (cratewavf (reggetf 0) (vector-ref wt5ft 3)) (reggetf 1)) (ftlist-append (cr...
null
https://raw.githubusercontent.com/PaulBatchelor/codex/e6f6c9613c90b319f07863197498681d723debc2/frags/wt5.scm
scheme
(define wt5ft #("95c5afd8%" "0a8ae9e9%" "03cd822c%" "42e62539%")) (define (wt5-exp1) (regset (sqlite-open (monolith:mkhome "s/a.db")) 0) (regset (ftlist-new) 1) (ftlist-append (cratewavf (reggetf 0) (vector-ref wt5ft 3)) (reggetf 1)) (ftlist-append (cr...
489a9f82417ca2896063815433e5324b54a61df1d27c3117e5f3ab36f76a97cc
haskell/aeson
Generic.hs
Use GHC generics to automatically generate good instances . # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - orphans # module Twitter.Generic ( Metadata(..) , Geo(..) , Story(..) , Result(..) ) where import Prelude.Compat () import Twitter import Twitter.Options import Data.A...
null
https://raw.githubusercontent.com/haskell/aeson/d711df76b826942f4a9e791712512c6b19b8c1c8/examples/src/Twitter/Generic.hs
haskell
Use GHC generics to automatically generate good instances . # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - orphans # module Twitter.Generic ( Metadata(..) , Geo(..) , Story(..) , Result(..) ) where import Prelude.Compat () import Twitter import Twitter.Options import Data.A...
ff0696084557049277857aa644eb9c066eb51563277624a3b8e9f8d8d57f6959
haslab/HAAP
IndentTree.hs
module HAAP.Parse.IndentTree where import Data.Tree import Control.Applicative import Data.Char (isSpace) import Data.Monoid import Text.Parsec hiding (many, optional, (<|>)) import Text.Parsec.Indent parseIndentedForest :: String -> Either ParseError (Forest String) parseIndentedForest = runIndentParser aForest () ...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Parse/IndentTree.hs
haskell
module HAAP.Parse.IndentTree where import Data.Tree import Control.Applicative import Data.Char (isSpace) import Data.Monoid import Text.Parsec hiding (many, optional, (<|>)) import Text.Parsec.Indent parseIndentedForest :: String -> Either ParseError (Forest String) parseIndentedForest = runIndentParser aForest () ...
2955e70ff022d5feb7d66b88adac7f391ab1d2146b85cbdf6d2e1beb7f0c4e14
mirage/irmin
atomic_write_intf.ml
* Copyright ( c ) 2018 - 2022 Tarides < > * * 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 PROVIDED " AS IS...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-pack/atomic_write_intf.ml
ocaml
* A special value that is reserved for use by the implementation of {!Make_persistent} (and must never be passed by the user).
* Copyright ( c ) 2018 - 2022 Tarides < > * * 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 PROVIDED " AS IS...
b1064b1bd9940afd030ed1ac8471c34bbe1266e2187cbcace0f9702fd051f487
hercules-ci/hercules-ci-agent
SimpleProject.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} module Hercules.API.Projects.SimpleProject where import Hercules.API.Accounts.SimpleAccount (SimpleAccount) import Hercules.API.Prelude import Hercules.API.Projects.Project (Project) data SimpleProject = SimpleProject { id :: Id Project, name :: Name Proje...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/8a476e9328d197d0d41872b1674638827e18bae0/hercules-ci-api/src/Hercules/API/Projects/SimpleProject.hs
haskell
# LANGUAGE DeriveAnyClass # | True if no authorization is required for retrieving basic information about a project, such as its existence, name, job statuses etc.
# LANGUAGE DataKinds # module Hercules.API.Projects.SimpleProject where import Hercules.API.Accounts.SimpleAccount (SimpleAccount) import Hercules.API.Prelude import Hercules.API.Projects.Project (Project) data SimpleProject = SimpleProject { id :: Id Project, name :: Name Project, owner :: SimpleAccount, ...
a0c93021ccee00f05ba05e157d0c3ea53907db5ffb27c0cf8a8187b8e1e60221
appleby/Lisp-In-Small-Pieces
variante3.scm
$ I d : variante3.scm , v 1.2 1994/08/21 19:35:09 queinnec Exp $ ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is derived from the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( ...
null
https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/meroonet/variante3.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is derived from the files that accompany the book: The original sources can be downloaded from the author's website at -systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html This file may have been altered from the original in order to...
$ I d : variante3.scm , v 1.2 1994/08/21 19:35:09 queinnec Exp $ LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cambridge University Press ) . By Christian Queinnec < > This file is part of the Meroonet package . First make generic some functio...
73f1f939ad5d0dd05de590d720552dca8ac3080621cbf781275c627534660cce
umd-cmsc330/fall2022
disc4_solution.ml
type 'a tree = | Leaf | Node of 'a tree * 'a * 'a tree let rec map f xs = match xs with [] -> [] | h::t -> (f h)::(map f t) let rec fold f a lst = match lst with []->a |h::t->fold f (f a h) t let rec fold_right f lst a = match lst with []->a |h::t-> f h (fold_right f t a) ...
null
https://raw.githubusercontent.com/umd-cmsc330/fall2022/1af874f6ee419375c572b27df2f46f265c520612/discussions/discussion4/disc4_solution.ml
ocaml
type 'a tree = | Leaf | Node of 'a tree * 'a * 'a tree let rec map f xs = match xs with [] -> [] | h::t -> (f h)::(map f t) let rec fold f a lst = match lst with []->a |h::t->fold f (f a h) t let rec fold_right f lst a = match lst with []->a |h::t-> f h (fold_right f t a) ...
6776b0907e5e8733898a45c9898bc2a9e2791c8f57b39240b222f6d26d35403d
litxio/ptghci
StartPy.hs
{-# LANGUAGE ForeignFunctionInterface, ExtendedDefaultRules #-} module Language.Haskell.PtGhci.StartPy where import Language.Haskell.PtGhci.Prelude hiding (unlines) import Foreign.C.Types import Foreign.C.String import Foreign.Ptr import Foreign.Storable import System.Environment import Control.Concurrent.Async impor...
null
https://raw.githubusercontent.com/litxio/ptghci/405609ae0dd6c9d79564630f7d71dadcc94e0594/src/Language/Haskell/PtGhci/StartPy.hs
haskell
# LANGUAGE ForeignFunctionInterface, ExtendedDefaultRules # | Starts the Python interpreter and hands over control Run the Python interpreter in an OS thread while having this thread listen for an AsyncCancelled exception indicating we should exit. AsyncCanclled exception, so we arrange to handle that exception by ...
module Language.Haskell.PtGhci.StartPy where import Language.Haskell.PtGhci.Prelude hiding (unlines) import Foreign.C.Types import Foreign.C.String import Foreign.Ptr import Foreign.Storable import System.Environment import Control.Concurrent.Async import Control.Concurrent.MVar import System.FilePath import Data.Str...
076fe95e6bb2f73e32d15901f4bee09610c21206bd55b80f9553faf2ffd7f69d
tachukao/ocaml-mlir
registration.ml
open Ctypes module Bindings (F : FOREIGN) = struct open F (* Registers all dialects known to core MLIR with the provided Context. * This is needed before creating IR for these Dialects. *) let register_all_dialects = foreign "mlirRegisterAllDialects" (Typs.Context.t @-> returning void) end
null
https://raw.githubusercontent.com/tachukao/ocaml-mlir/0e65403c994b16c3e01a55e61b4df7f5a1728af3/src/stubs/registration.ml
ocaml
Registers all dialects known to core MLIR with the provided Context. * This is needed before creating IR for these Dialects.
open Ctypes module Bindings (F : FOREIGN) = struct open F let register_all_dialects = foreign "mlirRegisterAllDialects" (Typs.Context.t @-> returning void) end
0a3268bc5d130d98d45961320149aec2fbf379c1742d4c3d336f5e55168614e3
helium/helium-packet-router
hpr_metrics.erl
-module(hpr_metrics). -behavior(gen_server). -include("hpr_metrics.hrl"). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([ start_link/1, observe_packet_up/4 ]). %% -------------------...
null
https://raw.githubusercontent.com/helium/helium-packet-router/777e9aa2e88fe88c12eb6b6c2a58ee42d2bae11a/src/metrics/hpr_metrics.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ -------------------------...
-module(hpr_metrics). -behavior(gen_server). -include("hpr_metrics.hrl"). -export([ start_link/1, observe_packet_up/4 ]). gen_server Function Exports -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3 ]). -define(SERVER, ?MODULE). -record(st...
d1a852c46fe9eeb182ae92ec2d79bd45e78c78c843ce6364c8490aab0909e853
racketscript/racketscript
paramz.rkt
#lang racketscript/boot (require racketscript/interop "lib.rkt") (define Paramz ($/require/* "./paramz.js")) (define+provide parameterization-key #js.Paramz.ParameterizationKey) (define+provide break-enabled-key #js.Paramz.BreakEnabledKey) (define+provide cache-configuration #js.Paramz.BreakEnabledKey) (def...
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/racketscript-compiler/racketscript/compiler/runtime/paramz.rkt
racket
#lang racketscript/boot (require racketscript/interop "lib.rkt") (define Paramz ($/require/* "./paramz.js")) (define+provide parameterization-key #js.Paramz.ParameterizationKey) (define+provide break-enabled-key #js.Paramz.BreakEnabledKey) (define+provide cache-configuration #js.Paramz.BreakEnabledKey) (def...
8f3ad465b40d61381c6ff01d7cf9d6b1657aed849d72da318ae0ac4560767a4f
UU-ComputerScience/uulib
Perms.hs
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # module UU.Parsing.Perms(Perms(), pPerms, pPermsSep, succeedPerms, (~*~), (~$~)) where import UU.Parsing import Data.Maybe -- ======================================================================================= = = = = = PERMUTATIONS = = = = = = ...
null
https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/src/UU/Parsing/Perms.hs
haskell
======================================================================================= =======================================================================================
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # module UU.Parsing.Perms(Perms(), pPerms, pPermsSep, succeedPerms, (~*~), (~$~)) where import UU.Parsing import Data.Maybe = = = = = PERMUTATIONS = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =...
b4d100ce486fa6ca4d0a88f0e9ce2cd1214ac187ecdd7b0eafb49ca3fc4366c1
soegaard/bracket
tagged-begin.rkt
#lang racket (provide tagged-begin) ;;; INTRODUCTION ; This is a little macro that resembles the Common Lisp tagbody construct ; <-2.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/speope_tagbody.html#tagbody> See also " Applications of Continuations " of . ;;; MOTIVATION ; Many algorithms is specified in ...
null
https://raw.githubusercontent.com/soegaard/bracket/3d0ace16cf0dbcee4952fd729796e4362e27faa0/numeric/tagged-begin.rkt
racket
INTRODUCTION This is a little macro that resembles the Common Lisp tagbody construct <-2.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/speope_tagbody.html#tagbody> MOTIVATION Many algorithms is specified in an imperative manner conversion to Scheme tagged-begin is convenient. (tagged-begin (<tag> | <...
#lang racket (provide tagged-begin) See also " Applications of Continuations " of . in the literature [ See Example 5 from Knuth ] . For a no - brain- SYNTAX SEMANTICS that provides functions go and return both of one argument to The rewrite rule is taken from " Applications of Con...
3387f68285cda8c3a14bde0d13d2af539fbdca7c53801e11a746f175acdd3ce3
uim/sigscheme
test-pair.scm
#! /usr/bin/env sscm -C UTF-8 -*- buffer - file - coding - system : utf-8 -*- ;; Filename : test-pair.scm ;; About : unit tests for pairs ;; Copyright ( C ) 2006 YAMAMOTO Kengo < yamaken AT > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > ;; ;; All rights reserved. ;; ;; ...
null
https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/test-pair.scm
scheme
Filename : test-pair.scm About : unit tests for pairs 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. notice, thi...
#! /usr/bin/env sscm -C UTF-8 -*- buffer - file - coding - system : utf-8 -*- Copyright ( C ) 2006 YAMAMOTO Kengo < yamaken AT > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary...
47c2a5998edbf4decb1b452465afc025d54228edbc164a856c97030c6b1ddc14
typelead/etlas
Upload.hs
module Distribution.Client.Upload (upload, uploadDoc, report) where import Distribution.Client.Types ( Username(..), Password(..) , RemoteRepo(..), maybeRepoRemote ) import Distribution.Client.HttpUtils ( HttpTransport(..), remoteRepoTryUpgradeToHttps ) import Distribution.Cli...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/Upload.hs
haskell
> stripExtensions ["tar", "gz"] "foo.tar.gz" Just "foo" > stripExtensions ["tar", "gz"] "foo.gz.tar" Nothing only pass tar.gz files to upload. successfully. save/restore the terminal echoing status (no echoing for entering the password) We don't want to bomb out just because we haven't built any packages from ...
module Distribution.Client.Upload (upload, uploadDoc, report) where import Distribution.Client.Types ( Username(..), Password(..) , RemoteRepo(..), maybeRepoRemote ) import Distribution.Client.HttpUtils ( HttpTransport(..), remoteRepoTryUpgradeToHttps ) import Distribution.Cli...
767a7621075a67e2b9d79929b5f11bb2e24b11cf3e7322c43953da24d93aba0b
anishathalye/knox
info.rkt
#lang info (define compile-omit-paths 'all)
null
https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/test/info.rkt
racket
#lang info (define compile-omit-paths 'all)
2b5205e2ab92045dec8b6a659aa40c6d5e7badffd7fcae99ce270568cc846b1b
lambdaclass/holiday_pinger
hp_request.erl
-module(hp_request). -export([post_json/2, post_json/3, get_json/1, get_json/2]). post_json(Url, Data) -> post_json(Url, Data, []). post_json(Url, Data, Headers) -> request_json(post, Url, Data, Headers). get_json(Url) -> get_json(Url, []). get_json(Url, Headers) -> request_json(...
null
https://raw.githubusercontent.com/lambdaclass/holiday_pinger/a8a6d1e28de57cf24d6205d275981a718305b351/src/hp_request.erl
erlang
internal Passing Data=null to hp_json:encode means the body becomes null. This makes the google
-module(hp_request). -export([post_json/2, post_json/3, get_json/1, get_json/2]). post_json(Url, Data) -> post_json(Url, Data, []). post_json(Url, Data, Headers) -> request_json(post, Url, Data, Headers). get_json(Url) -> get_json(Url, []). get_json(Url, Headers) -> request_json(...
4536b5d14395486048a826392feb8c4e7843055136c8ee2e34f8da18b5f3ea65
erlangonrails/devdb
merle.erl
Copyright 2009 , < > Copyright 2009 , < > %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without %% restriction, including without limitation the rights to use, %% copy, ...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/merle/src/merle.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condit...
Copyright 2009 , < > Copyright 2009 , < > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , @auth...
8e8eae6fef848da7a0b7fa543cefd88a741400ffd9e87f103380d816fbcbcd0b
genmeblog/techtest
columns.clj
(ns techtest.api.columns (:refer-clojure :exclude [group-by]) (:require [tech.ml.dataset :as ds] [tech.ml.dataset.column :as col] [tech.v2.datatype :as dtype] [techtest.api.utils :refer [column-names iterable-sequence?]] [techtest.api.dataset :refer [dataset]] ...
null
https://raw.githubusercontent.com/genmeblog/techtest/4b8111fde17fcffd7f7fb6fa9454d030f1847adc/src/techtest/api/columns.clj
clojure
(ns techtest.api.columns (:refer-clojure :exclude [group-by]) (:require [tech.ml.dataset :as ds] [tech.ml.dataset.column :as col] [tech.v2.datatype :as dtype] [techtest.api.utils :refer [column-names iterable-sequence?]] [techtest.api.dataset :refer [dataset]] ...
82b64652ac0eb1b84838b20967270730ab5c14f3e6e33932b97d273a62ae9ca7
blockchain-unica/defi-workbench
state.ml
module type StateSig = sig type t type collType = Infty | Val of float val empty : t (** [get_wallet a s] is the wallet of address [a] in state [s] Raises: [Not_found] if the wallet is not present *) val get_wallet : Address.t -> t -> Wallet.t (** [get_lp t s] is the LP of token [t] in state [s] ...
null
https://raw.githubusercontent.com/blockchain-unica/defi-workbench/a3606bf425cef8e81d1f12b13dc1410a48f3e860/lib/state.ml
ocaml
* [get_wallet a s] is the wallet of address [a] in state [s] Raises: [Not_found] if the wallet is not present * [get_lp t s] is the LP of token [t] in state [s] Raises: [Not_found] if the LP is not present * [get_price t s] is the price of the token [t] in [s]. The price of all tokens is set to 0. in th...
module type StateSig = sig type t type collType = Infty | Val of float val empty : t val get_wallet : Address.t -> t -> Wallet.t val get_lp : Token.t -> t -> Lp.t val get_price : Token.t -> t -> float * [ add_wallet a bal s ] is the state [ s ] composed with the wallet [ ( a , bal ) ] . Raises...
9c8ca6a1cdc6d0044672ec1fc21cf2e0506bfe308f24090750fd6185df80b540
spechub/Hets
OWL2.hs
| Description : Web Ontology Language OWL2 Copyright : ( c ) of Magdeburg License : GPLv2 or higher , see LICENSE.txt The " OWL2 " directory contains the OWL2 instance of " Logic . Logic " . The data for this instance is found in " OWL2.Logic_OWL2 " . The syntax for OWL2 is repr...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/OWL2.hs
haskell
| Description : Web Ontology Language OWL2 Copyright : ( c ) of Magdeburg License : GPLv2 or higher , see LICENSE.txt The " OWL2 " directory contains the OWL2 instance of " Logic . Logic " . The data for this instance is found in " OWL2.Logic_OWL2 " . The syntax for OWL2 is repr...
fc2e5d88044d716f85c4cd798a8cd11d05db1519faf5188a75b8755cad192097
fulcro-legacy/semantic-ui-wrapper
ui_form_button.cljs
(ns fulcrologic.semantic-ui.collections.form.ui-form-button (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/collections/Form/FormButton" :default FormButton])) (def ui-form-button "Sugar for <Form.Field control={Button} />. Props: - as (custom): An eleme...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/collections/form/ui_form_button.cljs
clojure
(ns fulcrologic.semantic-ui.collections.form.ui-form-button (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/collections/Form/FormButton" :default FormButton])) (def ui-form-button "Sugar for <Form.Field control={Button} />. Props: - as (custom): An eleme...
fa3653428cecb476373b02da7990b8be1c2df6fbbe0a10455b88d13eb89f5e5b
rleonid/oml
class_mean_test.ml
corebuild -package bigarray , dsfo , lacaml , core_bench -I src / scripts / prof class_mean_test.native corebuild -package bigarray,dsfo,lacaml,core_bench -I src/scripts/prof class_mean_test.native *) open Lacaml.D open Core_bench.Std let m_train = Mnist.data `Train |> Mat.transpose_copy let feature_size = 28...
null
https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/scripts/prof/class_mean_test.ml
ocaml
Test THIS vs THIS and THIS and THIS
corebuild -package bigarray , dsfo , lacaml , core_bench -I src / scripts / prof class_mean_test.native corebuild -package bigarray,dsfo,lacaml,core_bench -I src/scripts/prof class_mean_test.native *) open Lacaml.D open Core_bench.Std let m_train = Mnist.data `Train |> Mat.transpose_copy let feature_size = 28...
dbdd1c51386d7c8611013814eef68c865780747a3d42375114a8d72427d154fc
theobat/massalia
TruckInput.hs
# LANGUAGE TypeApplications # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE StandaloneDeriving # # LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # # LANGUAG...
null
https://raw.githubusercontent.com/theobat/massalia/66d65c3431132091107d07e041f33c907f9d08cb/dataseed/MassaliaSchema/Industry/TruckInput.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # chassisFromTuple :: (Int, Int) -> Chassis chassisFromTuple value = case value of _ -> CUnknown
# LANGUAGE TypeApplications # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE PartialTypeSignatures # module MassaliaSchema.Industry.Tru...
723f458f9cf1839fd3a57c8a7336be3aa0735fe603dae4fa790e7ac5eae9c92f
steffan-westcott/clj-otel
otel_sdk.clj
(ns steffan-westcott.clj-otel.sdk.otel-sdk "Programmatic configuration of the OpenTelemetry SDK." (:require [steffan-westcott.clj-otel.api.attributes :as attr] [steffan-westcott.clj-otel.api.otel :as otel] [steffan-westcott.clj-otel.propagator.w3c-baggage :as w3c-baggage] [steffa...
null
https://raw.githubusercontent.com/steffan-westcott/clj-otel/3103cef4a0badf946e1511521ab764202e7eb1f7/clj-otel-sdk/src/steffan_westcott/clj_otel/sdk/otel_sdk.clj
clojure
generally meant for debug logging exporters only. All options other than `:exporters` are ignored when `:batch` is false (default: `true`).
(ns steffan-westcott.clj-otel.sdk.otel-sdk "Programmatic configuration of the OpenTelemetry SDK." (:require [steffan-westcott.clj-otel.api.attributes :as attr] [steffan-westcott.clj-otel.api.otel :as otel] [steffan-westcott.clj-otel.propagator.w3c-baggage :as w3c-baggage] [steffa...
89c9e6d4bfe6512eb101158de8a97fb95553868912dfc5655f760fc03f65e31b
hoelzl/Clicc
ffzsdef.lisp
;;;----------------------------------------------------------------------------- Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany ;;;----------------------------------------------------------------------------- Projekt : APPLY - A Practicable And Portable Lisp Implementation ;;; ...
null
https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/ffzsdef.lisp
lisp
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------------------------------ $Log: ffzsdef.lisp,v $ Call-Out-Functions. Revision 1.10 1993/12/16 16:36:29 pm S...
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany Projekt : APPLY - A Practicable And Portable Lisp Implementation Funktion : das Foreign Function Interface $ Revision : 1.12 $ Revision 1.12 1994/06/07 15:34:57 jh provide eingefuegt . Revision 1.11 1994/04/18 12:11:...
6849fbd8e0a48877515a9fff24fe2bcfec6f1a3ae64c1d1afa1068e53df7f3c2
myuon/Chimera
Core.hs
module Chimera.Engine.Core ( module M ) where import Chimera.Engine.Core.Types as M import Chimera.Engine.Core.Field as M import Chimera.Engine.Core.Layers as M import Chimera.Engine.Core.Menu as M import Chimera.Engine.Core.Util as M
null
https://raw.githubusercontent.com/myuon/Chimera/e4e9db7edc15ef56e54f4629133b615dcbe3e90a/Chimera/Engine/Core.hs
haskell
module Chimera.Engine.Core ( module M ) where import Chimera.Engine.Core.Types as M import Chimera.Engine.Core.Field as M import Chimera.Engine.Core.Layers as M import Chimera.Engine.Core.Menu as M import Chimera.Engine.Core.Util as M
1eed8e4834b6ed1fda6680da5226f195a9ebae2443e4ca72c932470d46c8adc3
xh4/web-toolkit
package.lisp
(in-package :cl-user) (defpackage :html-test (:nicknames :wt.html-test) (:use :cl :html :test) (:shadow :time :map :parse-error) (:export :run!)) (in-package :html-test) (def-suite :html-test)
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/html/package.lisp
lisp
(in-package :cl-user) (defpackage :html-test (:nicknames :wt.html-test) (:use :cl :html :test) (:shadow :time :map :parse-error) (:export :run!)) (in-package :html-test) (def-suite :html-test)
735cd896a6dc9b052591de271cf21ca8fd256fcc8b9ffae9d589c053869fdf49
ParaPhrase/skel
sk_feedback.erl
%%%---------------------------------------------------------------------------- @author < > 2012 University of St Andrews ( See LICENCE ) @headerfile " skel.hrl " %%% %%% @doc This module contains 'feedback' skeleton initialization logic. %%% %%% The Feedback skeleton repeatedly passes output from its inner-...
null
https://raw.githubusercontent.com/ParaPhrase/skel/bf55de94e64354592ea335f4375f4b40607baf43/src/sk_feedback.erl
erlang
---------------------------------------------------------------------------- @doc This module contains 'feedback' skeleton initialization logic. The Feedback skeleton repeatedly passes output from its inner-workflow back into said workflow until a given constraint-checking function fails. === Example === `...
@author < > 2012 University of St Andrews ( See LICENCE ) @headerfile " skel.hrl " Input are above a certain value . If any one element is equal to or -module(sk_feedback). -export([ make/2 ]). -include("skel.hrl"). -spec make(workflow(), filter_fun()) -> maker_fun(). Constraint - che...
df55cf591a01e0bdf4e2a7f066845e07c6730e6a42292dbdce33e4c4010a106e
roman01la/hooks
reagent.cljs
(ns hooks.reagent (:require [hooks.impl] [reagent.ratom])) ;; use-reaction hook (defn use-reaction "Takes Reagent's Reaction, subscribes UI component to changes in the reaction and returns current state value of the reaction" [reaction] (assert (instance? ratom/Reaction reaction) "reaction shou...
null
https://raw.githubusercontent.com/roman01la/hooks/7b26bcb68afdb0991f2efb341cec3d70ef5ba576/src/hooks/reagent.cljs
clojure
use-reaction hook Mocking ratom context This makes sure that watchers added to the `reaction` will be triggered when the `reaction` gets updated. use-subscribe hook
(ns hooks.reagent (:require [hooks.impl] [reagent.ratom])) (defn use-reaction "Takes Reagent's Reaction, subscribes UI component to changes in the reaction and returns current state value of the reaction" [reaction] (assert (instance? ratom/Reaction reaction) "reaction should be an instance of ...
c679d7298c31bb30493421f93d262bf817efc854f69a21d347d44115762cdd2d
cmars/sks-keyserver
armor.ml
(***********************************************************************) (* armor.ml- Conversion to and from ASCII armor *) (* *) Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2...
null
https://raw.githubusercontent.com/cmars/sks-keyserver/d848c4852cb15585525772b6378670f8724a8f39/armor.ml
ocaml
********************************************************************* armor.ml- Conversion to and from ASCII armor redistribute it and/or modify it under ...
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2011 , 2012 , 2013 and Contributors This file is part of SKS . SKS is free software ; you can Public License as published by the Free Software Foundation ; either version 2 of the License , or...
5aab44692d9663944d72f4d4a89910a01caa65e62b036a0d35a4e6f914f375b3
huangjs/cl
dlasr.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/dlasr.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
e231fae585d5a6b310633945fc84f0785a03481641388f51c9752a4c78f97450
haskell-servant/servant
Union.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE ExplicitNamespaces # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LA...
null
https://raw.githubusercontent.com/haskell-servant/servant/a4194dc490c689a5d6ca4baf94ba4c5985b43e15/servant/src/Servant/API/UVerb/Union.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # [world-peace](-peace). | Convenience function to apply a function to an unknown union element using a type class. All elements of the union must have instances in the type class, and the function is applied unconditionally. See also: 'matchUnion'. | Convenienc...
# LANGUAGE DataKinds # # LANGUAGE ExplicitNamespaces # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # Copyright ( c ) 2017 - 20...
2e18cdfa794170b8845e854917806392f5dd1b8f8670c8421640260a0c4950da
optd-dl/grpc-client-erlang-fast
poolManager.erl
@author ydwiner @doc @todo Add description to poolManager . -module(poolManager). %% ==================================================================== %% API functions %% ==================================================================== -export([start/0,create/0,createPool/3,createSubPool/1,etsTimeFun/3]). ...
null
https://raw.githubusercontent.com/optd-dl/grpc-client-erlang-fast/c7ff24b86b941b3cb5bbe8d57a8d73906650ca92/src/poolManager.erl
erlang
==================================================================== API functions ==================================================================== ==================================================================== ====================================================================
@author ydwiner @doc @todo Add description to poolManager . -module(poolManager). -export([start/0,create/0,createPool/3,createSubPool/1,etsTimeFun/3]). -include("../include/lconnect_conf.hrl"). Internal functions start() -> register(poolServer, spawn(poolManager, create, [])), lconnect_ets:createNewTable(se...
99109a9e69c2d1bff0f2f31887fb03a8dba92d812a13d9505fa1f3334cb45c78
xvw/preface
env.mli
(** Building a {!module:Preface_specs.Env}, an [Env transformer]. *) (** {1 Using the minimal definition} Build an {!module-type:Preface_specs.ENV} over an {e Inner} {!module-type:Preface_specs.COMONAD}. *) module Over_comonad (C : Preface_specs.COMONAD) (Env : Preface_specs.Types.T0) : Preface_specs.ENV w...
null
https://raw.githubusercontent.com/xvw/preface/c21649fd00d19d11fa7f25e81f7ed45883a11457/lib/preface_make/env.mli
ocaml
* Building a {!module:Preface_specs.Env}, an [Env transformer]. * {1 Using the minimal definition} Build an {!module-type:Preface_specs.ENV} over an {e Inner} {!module-type:Preface_specs.COMONAD}. * {1 Improving API} If there are complementary implementations to {!module-type:Preface_specs.COMONAD} ...
module Over_comonad (C : Preface_specs.COMONAD) (Env : Preface_specs.Types.T0) : Preface_specs.ENV with type env = Env.t and type 'a comonad = 'a C.t module Functor (F : Preface_specs.FUNCTOR) (Env : Preface_specs.Types.T0) : Preface_specs.FUNCTOR with type 'a t = Env.t * 'a F.t * { 2 Applicative } If ...
ce536936c1706ad80aa49b4b2b28ace7b2e290fae7b07a739538779a9a8a7075
brendanhay/gogol
List.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-youtube/gen/Gogol/YouTube/Search/List.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Retrieves a list of search resources * Resource ** Constructing a Request | A resource alias for @youtube.search.list@ method which the 'YouTubeSearchList' request conforms to. | Retrieves a list of search resources /See:/...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
2a4e46c9bc3607cc10dd3d38444b4b8121813bce7dd46acdc64164ba7b316d69
cardmagic/lucash
regexp.scm
Copyright ( c ) 1993 - 2001 by and . See file COPYING . ; Exports: ; make-regexp ; regexp? ; regexp-match ; regexp-match? ; regexp-match-start ; regexp-match-end ; regexp-option ; The compiled version of the expression is produced when needed. (define-record-type regexp :regexp (really-make-reg...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/rx/regexp.scm
scheme
Exports: make-regexp regexp? regexp-match regexp-match? regexp-match-start regexp-match-end regexp-option The compiled version of the expression is produced when needed. immutable string #f or a c-record Drop the compiled version when resuming. We may be resuming on a different architecture,...
Copyright ( c ) 1993 - 2001 by and . See file COPYING . (define-record-type regexp :regexp (really-make-regexp pattern compiled extended? ignore-case? submatches? newline?) regexp? four flags (ignore-case? regexp-ignore-case?) (submatches? regexp-submatches?) (newline? regexp-newline?)...
1efe2ac0a6d7f94e22bc69fb9694e400cdecf44ef29eb2a541cacccfbd97dfd6
meta-ex/ignite
ambient.clj
(ns meta-ex.ambient (:use [overtone.live] [meta-ex.sets.ignite] [meta-ex.kit.mixer])) (def stream ((:stream-under-bridge atmossy) :loop? true :rate 0.15)) (def bird ((:birdsong atmossy) :loop? true)) (def bubbles1 ((:bubbles1 atmossy) :loop? true)) (def bubbles2 ((:bubbles2 atmossy) :loop? true))...
null
https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/ambient.clj
clojure
(ns meta-ex.ambient (:use [overtone.live] [meta-ex.sets.ignite] [meta-ex.kit.mixer])) (def stream ((:stream-under-bridge atmossy) :loop? true :rate 0.15)) (def bird ((:birdsong atmossy) :loop? true)) (def bubbles1 ((:bubbles1 atmossy) :loop? true)) (def bubbles2 ((:bubbles2 atmossy) :loop? true))...
1a56b0cae9a4087df3eb7eca4ba46cc8ec7b316ea17848de81de5e3c24b821e1
futurice/haskell-mega-repo
Config.hs
# LANGUAGE DataKinds # module Futurice.App.GitHubSync.Config ( Config (..), Pinned (..), ) where import Database.PostgreSQL.Simple (ConnectInfo) import Futurice.EnvConfig import Futurice.Integrations import Futurice.Prelude import Prelude () import Text.Regex.Applicative (RE, match, psym, sym) import ...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/github-sync/src/Futurice/App/GitHubSync/Config.hs
haskell
# LANGUAGE DataKinds # module Futurice.App.GitHubSync.Config ( Config (..), Pinned (..), ) where import Database.PostgreSQL.Simple (ConnectInfo) import Futurice.EnvConfig import Futurice.Integrations import Futurice.Prelude import Prelude () import Text.Regex.Applicative (RE, match, psym, sym) import ...
760c906218402379c1f65e3f97400521f4759e39bacf85e0ccca33aec726bd80
marick/structural-typing
f_misc_condensation.clj
(ns structural-typing.use.condensed-type-descriptions.f-misc-condensation (:require [structural-typing.preds :as pred]) (:use midje.sweet structural-typing.type structural-typing.global-type structural-typing.clojure.core structural-typing.assist.testutil) (:refer-clojure :except [...
null
https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/use/condensed_type_descriptions/f_misc_condensation.clj
clojure
(ns structural-typing.use.condensed-type-descriptions.f-misc-condensation (:require [structural-typing.preds :as pred]) (:use midje.sweet structural-typing.type structural-typing.global-type structural-typing.clojure.core structural-typing.assist.testutil) (:refer-clojure :except [...
46bdeda3be79c65bc69f90615480fca97fd5de9b11e88732491a0812c732ce4d
SimulaVR/godot-haskell
VisualShaderNodeExpression.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualShaderNodeExpression (Godot.Core.VisualShaderN...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeExpression.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualShaderNodeExpression (Godot.Core.VisualShaderN...
87005117df0e10567dd159fd8864437918489182e4f97c1f4319eea981b56157
AccelerateHS/accelerate-examples
Config.hs
# LANGUAGE FlexibleContexts # # LANGUAGE PatternGuards # # LANGUAGE TemplateHaskell # -- -- Configuration parameters -- module Config where import Type import Data.Label import Control.Monad import Prelude as P import Data.Array.Accelerate as...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/fluid/src-acc/Config.hs
haskell
Configuration parameters simulation visualisation extra options to specify initial conditions for command parsing | The set of available command-line options Simulation options Display options Initial conditions Initial conditions ------------------
# LANGUAGE FlexibleContexts # # LANGUAGE PatternGuards # # LANGUAGE TemplateHaskell # module Config where import Type import Data.Label import Control.Monad import Prelude as P import Data.Array.Accelerate as A import Data.Array.Accelerate.IO...
d262a8d533eee2645f2ba8d2cd64d390961bd6199df524120a105ddd9fd8c645
craigl64/clim-ccl
ol-examples.lisp
;; See the file LICENSE for the full license governing this code. ;; (in-package :tk) (defun simple-ol-example () (setq shell (make-instance 'base-window-shell :parent app)) (setq control (make-instance 'control :parent shell :layout-type :fixedcols )) (setq button (make-instance 'menu-butto...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/tk/ol-examples.lisp
lisp
See the file LICENSE for the full license governing this code.
(in-package :tk) (defun simple-ol-example () (setq shell (make-instance 'base-window-shell :parent app)) (setq control (make-instance 'control :parent shell :layout-type :fixedcols )) (setq button (make-instance 'menu-button :parent control :label "foo" :font "-ado...
887ad6b9710abf30d8b58c76f740ded3b198a4b7cf276aa6a3507e57177f507f
bldl/magnolisp
test-assign-2.rkt
#lang magnolisp (typedef int #:: (foreign)) (define (f x y) #:: (export [type (-> int int int)]) (let ([x y] [y x]) (set!-values (x y) (values y x)) x)) (f 5 5) (f 5 6) (f 6 5)
null
https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-assign-2.rkt
racket
#lang magnolisp (typedef int #:: (foreign)) (define (f x y) #:: (export [type (-> int int int)]) (let ([x y] [y x]) (set!-values (x y) (values y x)) x)) (f 5 5) (f 5 6) (f 6 5)
19fafd0a61d6b44cb697447ebde6b8ab6b0b448766b442f5a1e5ba115525847d
Stratus3D/programming_erlang_exercises
on_exit.erl
-module(on_exit). -export([test/0, spawn_and_print_crash/3, test_spawn_and_print_crash/0]). % Function that will be spawned in our test. Automatically kills itself after 5 seconds test() -> receive Msg -> io:write(Msg) after 5000 -> exit(self(), kill) end. % Spawn a process and add an on_e...
null
https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_13/exercise_2/on_exit.erl
erlang
Function that will be spawned in our test. Automatically kills itself after Spawn a process and add an on_exit handler function that prints out the details of the crash The on_exit function that spawns a monitor and calls `Fun` when the process dies Utility function for calculating how long the process lived Fun...
-module(on_exit). -export([test/0, spawn_and_print_crash/3, test_spawn_and_print_crash/0]). 5 seconds test() -> receive Msg -> io:write(Msg) after 5000 -> exit(self(), kill) end. spawn_and_print_crash(Module, Function, Args) -> Pid = spawn(Module, Function, Args), StartTime = now(), ...
4b707c09975010901900dce6833eb0ffeac1cd1f866bb8242ade29cb1a0b2f7a
andreasabel/miniagda
TermCheck1.hs
| Foetus termination checking module TermCheck1 (terminationCheckDecl) where import Abstract import Termination import Data.List as List import qualified Data.Set as Set import Debug.Trace import System terminationCheckDecl :: Declaration -> IO Bool terminationCheckDecl (FunDecl co funs) = do let tl = termin...
null
https://raw.githubusercontent.com/andreasabel/miniagda/d49658464d6a95cd0037b59206a5edb33cc396a7/src/TermCheck1.hs
haskell
pre : all clauses have same pattern length -------------- lexicrophic ordering
| Foetus termination checking module TermCheck1 (terminationCheckDecl) where import Abstract import Termination import Data.List as List import qualified Data.Set as Set import Debug.Trace import System terminationCheckDecl :: Declaration -> IO Bool terminationCheckDecl (FunDecl co funs) = do let tl = termin...
cf580ef760b035e9115724d26e437ef4f62d25525c49675f46e976e0e1dcd4ae
acw/eve
RaceConvert.hs
module RaceConvert where import qualified Data.HashMap.Strict as HM import Data.List(partition) import Data.Scientific(fromFloatDigits) import Data.Text(Text,pack) import Data.Yaml hiding (Value,Null) import qualified Data.Yaml as Y import Database.SQLite processRows :: Row Value -> HM.HashMap Text Y.Value -> HM.Hash...
null
https://raw.githubusercontent.com/acw/eve/95c3a158e181e9708c2f3b5d998512bbc1b06e57/scripts/RaceConvert.hs
haskell
module RaceConvert where import qualified Data.HashMap.Strict as HM import Data.List(partition) import Data.Scientific(fromFloatDigits) import Data.Text(Text,pack) import Data.Yaml hiding (Value,Null) import qualified Data.Yaml as Y import Database.SQLite processRows :: Row Value -> HM.HashMap Text Y.Value -> HM.Hash...
10f2a50fdd45806bff00114a19cb2518ead48e84150ae0cc547624f3941409fe
ltoth/unison
props.mli
Unison file synchronizer : src / props.mli Copyright 1999 - 2010 , ( see COPYING for details ) (* File properties: time, permission, length, etc. *) type t val dummy : t val hash : t -> int -> int val similar : t -> t -> bool val override : t -> t -> t val strip : t -> t val diff : t -> t -> t val toString : t...
null
https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/props.mli
ocaml
File properties: time, permission, length, etc. We are reusing the directory length to store a flag indicating that the directory is unchanged
Unison file synchronizer : src / props.mli Copyright 1999 - 2010 , ( see COPYING for details ) type t val dummy : t val hash : t -> int -> int val similar : t -> t -> bool val override : t -> t -> t val strip : t -> t val diff : t -> t -> t val toString : t -> string val syncedPartsToString : t -> string val s...
da1a9062deaff4a1148c22ea5c4db71613cfe59f2e468d6ca021972873208c2e
kit-ty-kate/labrys
UntypedTree.mli
Copyright ( c ) 2013 - 2017 The Labrys developers . (* See the LICENSE file at the top-level directory. *) type name = Ident.Name.t type pat_vars = Ident.Name.Set.t type index = int type length = int type branch = int type loc = Location.t type foreign_options = PretypedTree.foreign_options = { va_arg : (loc * in...
null
https://raw.githubusercontent.com/kit-ty-kate/labrys/69c1438b4adae487258f11d8c0a7b1365a35364a/src/typing/UntypedTree.mli
ocaml
See the LICENSE file at the top-level directory. TODO: Do we need the default case ?
Copyright ( c ) 2013 - 2017 The Labrys developers . type name = Ident.Name.t type pat_vars = Ident.Name.Set.t type index = int type length = int type branch = int type loc = Location.t type foreign_options = PretypedTree.foreign_options = { va_arg : (loc * index) option; } type ('int, 'float, 'char, 'bytes) ty =...
bb98838bf71a4858e7d1be08f54078ea32cc613e570f9f4025d8abeee21d3967
ethercrow/lightstep-haskell
Main.hs
{-# LANGUAGE OverloadedStrings #-} import qualified Data.ByteString.Lazy.Char8 as LBS import GHC.Stats import LightStep.Diagnostics import LightStep.HighLevel.IO (getEnvConfig, withSingletonLightStep, withSpan) import Network.HTTP.Types import Network.Wai import Network.Wai.Handler.Warp (run) import Network.Wai.Middle...
null
https://raw.githubusercontent.com/ethercrow/lightstep-haskell/f447fd37a6c53dcd38c32c53f71a71386f3e425a/examples/wai/Main.hs
haskell
# LANGUAGE OverloadedStrings #
import qualified Data.ByteString.Lazy.Char8 as LBS import GHC.Stats import LightStep.Diagnostics import LightStep.HighLevel.IO (getEnvConfig, withSingletonLightStep, withSpan) import Network.HTTP.Types import Network.Wai import Network.Wai.Handler.Warp (run) import Network.Wai.Middleware.LightStep robustScalableProdu...
6a6805be92a8627c85638c9b991f577eca88dd476f10ea9c1a75c207194aef85
scrintal/heroicons-reagent
printer.cljs
(ns com.scrintal.heroicons.solid.printer) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M7.875 1.5C6.839 1.5 6 2.34 6 3.375v2.99c-.426.053-.851.11-1.274.174-1.454.218-2.4...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/printer.cljs
clojure
(ns com.scrintal.heroicons.solid.printer) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M7.875 1.5C6.839 1.5 6 2.34 6 3.375v2.99c-.426.053-.851.11-1.274.174-1.454.218-2.4...
2a37260e0d38474f7c0773fcb95fd51e3b0af1d884195d8c02b4b467707ac005
vascokk/rivus_cep
rivus_cep_scanner.erl
-file("/usr/lib/erlang/lib/parsetools-2.0.12/include/leexinc.hrl", 0). %% The source of this file is part of leex distribution, as such it %% has the same Copyright as the other files in the leex %% distribution. The Copyright is defined in the accompanying file COPYRIGHT . However , the resultant scanner generated b...
null
https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/src/rivus_cep_scanner.erl
erlang
The source of this file is part of leex distribution, as such it has the same Copyright as the other files in the leex distribution. The Copyright is defined in the accompanying file property of the creator of the scanner and is not covered by that Copyright. User code. This is placed here to allow extra attribut...
-file("/usr/lib/erlang/lib/parsetools-2.0.12/include/leexinc.hrl", 0). COPYRIGHT . However , the resultant scanner generated by is the -module(rivus_cep_scanner). -export([string/1,string/2,token/2,token/3,tokens/2,tokens/3]). -export([format_error/1]). -file("src/rivus_cep_scanner.xrl", 56). -export([reserved_w...
9890f36ab229c19ead1d2f7b5f141c218df57a72d5d786a32b8891e791a30a4f
larcenists/larceny
lattice.scm
This benchmark was obtained from . 970215 / wdc Added lattice - benchmark . ; 981116 / wdc Replaced lattice-benchmark by main, added apply:+. Given a comparison routine that returns one of ; less ; more ; equal ; uncomparable ; return a new comparison routine that applies to sequences. (define lexico (lamb...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Stress/src/lattice.scm
scheme
981116 / wdc Replaced lattice-benchmark by main, added apply:+. less more equal uncomparable return a new comparison routine that applies to sequences. Select elements of a list which pass some test. Select elements of a list which pass some test and map a function over the result. Note, only efficiency preve...
This benchmark was obtained from . 970215 / wdc Added lattice - benchmark . Given a comparison routine that returns one of (define lexico (lambda (base) (define lex-fixed (lambda (fixed lhs rhs) (define check (lambda (lhs rhs) (if (null? lhs) fixed (let ((probe (base (ca...