_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 |
|---|---|---|---|---|---|---|---|---|
199fa40e975e783de7fbe526ac779e76fd2b963f5a24571dcc82dd6175cf883d | jeromesimeon/Galax | factorize_unique.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/factorization/factorize_unique.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : factorize_unique.mli , v 1.3 2007/02/01 22:08:46 simeon Exp $
type binding_list = (Xquery_common_ast.cvname * Xquery_common_ast.cvname) list
val factorize_unique_with_context : binding_list -> Xquery_core_ast.acexpr -> Xquery_core_... |
d4c7a47d833230488a5d8359c3891bbc3607e6b0eb56f0828940e4f48fbca09a | fbellomi/crossclj | annotate_loops.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/fbellomi/crossclj/7630270ebe9ea3df89fe3d877b2571e6eae1062b/src/cloned/clojure/tools/analyzer/passes/jvm/annotate_loops.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns cloned.clojure.tools.analyzer.passes.jvm.annotate-loops
(:require [cloned.clojure.tools.analyzer.ast :refer [update-children]]))
(defmulti annotate-loops
"Adds a :loops field to nodes that represent a code path that
might be visited more than once becaus... |
90051ab310459e8e70331293159f1e27d8945445e2971ee98f4ab1bc8b8f3b8b | input-output-hk/nix-tools | Plan.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
module Cabal2Nix.Plan
where
import Cabal2Nix.Util ( quoted
, bindPath
)
import Data.HashMap.S... | null | https://raw.githubusercontent.com/input-output-hk/nix-tools/1d0000ca59c7c14896469e39e5a3a13f8cc400c0/lib/Cabal2Nix/Plan.hs | haskell | # LANGUAGE OverloadedStrings #
Can be: rNUM, cabal file sha256, or "default" | # LANGUAGE NamedFieldPuns #
module Cabal2Nix.Plan
where
import Cabal2Nix.Util ( quoted
, bindPath
)
import Data.HashMap.Strict ( HashMa... |
dd8f1b775043e2880bf7b5085c4cc9c61607db226a8e4aae208f837c629cad52 | tonyg/kali-scheme | vector.scm | Copyright ( c ) 1994 . See file COPYING .
(define-polymorphic-scheme-primop make-vector allocate
(lambda (call)
(make-pointer-type (node-type (call-arg call 1)))))
(define-polymorphic-scheme-primop vector-ref read
(lambda (call)
(pointer-type-to (node-type (call-arg call 0)))))
(define-nonsimple-sc... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/primop/vector.scm | scheme | We delete the length argument because we don't need it. This is allowable
because trivial calls can't have WRITE side effects.
Remove an unecessary coercion on the dispatch-value, if possible. | Copyright ( c ) 1994 . See file COPYING .
(define-polymorphic-scheme-primop make-vector allocate
(lambda (call)
(make-pointer-type (node-type (call-arg call 1)))))
(define-polymorphic-scheme-primop vector-ref read
(lambda (call)
(pointer-type-to (node-type (call-arg call 0)))))
(define-nonsimple-sc... |
6cc283e76e45bc0b10aeaddbd73b922ac2715e97d93d5d6025d8abe272634cfd | facebookarchive/pfff | style_codemap.mli |
val font_size_filename_cursor_device_world: int
val size_font_multiplier_of_categ :
font_size_real:float -> Highlight_code.category option -> float
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/web/code_map/style_codemap.mli | ocaml |
val font_size_filename_cursor_device_world: int
val size_font_multiplier_of_categ :
font_size_real:float -> Highlight_code.category option -> float
| |
b65a7afb8ffa6cba4057c688a76ed6f1c199b0f2225bd19590a5f5ec42eaff8b | wfnuser/sicp-solutions | e2-20.scm | (define (same-parity . numbers)
(let ((first (car numbers)) (rest (cdr numbers)))
(if (odd? first)
(filter odd? numbers)
(filter even? numbers)
)
)
)
(same-parity 1)
(same-parity 1 2 3 4 5 6 7)
(same-parity 2 3 4 5 6 7) | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch2/e2-20.scm | scheme | (define (same-parity . numbers)
(let ((first (car numbers)) (rest (cdr numbers)))
(if (odd? first)
(filter odd? numbers)
(filter even? numbers)
)
)
)
(same-parity 1)
(same-parity 1 2 3 4 5 6 7)
(same-parity 2 3 4 5 6 7) | |
230f294d78151a507e020761f2f1ba6c401e668891ec031d8c101aa7548fa349 | OCADml/OCADml | affine2.mli | (** A 2d affine transformation matrix. *)
type row = float * float * float
type t = Gg.m3
* @inline
(** {1 Construction} *)
* [ v e00 e01 e02 e10 e21 e22 ]
Create a 2d affine matrix from elements in row major order .
Create a 2d affine matrix from elements in row major order. *)
val v : float -> floa... | null | https://raw.githubusercontent.com/OCADml/OCADml/f8cd87da86cd5ea4c31ec169c796640ffdc6bdee/lib/affine2.mli | ocaml | * A 2d affine transformation matrix.
* {1 Construction}
* {2 Construction by Rows}
* {1 Element Accessors}
* {1 Transforms}
* [translation v]
Create a 2d affine transformation matrix from the xy translation vector [v].
* [rotate ?about r]
Create an affine transformation matrix that applies a rotation of... |
type row = float * float * float
type t = Gg.m3
* @inline
* [ v e00 e01 e02 e10 e21 e22 ]
Create a 2d affine matrix from elements in row major order .
Create a 2d affine matrix from elements in row major order. *)
val v : float -> float -> float -> float -> float -> float -> float -> float -> float -... |
cbcf30e8271bd19026421c1659f01ec26007a03a29fc57dd2ade45cba7f1c8e0 | OCamlPro/ocp-build | ocpp_version.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-pp/compat/4.08.0/ocpp_version.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
module OcpCompat = struct
module Bytes = Bytes
module Buffer = Buffer
module String = struct
include String
let set = Bytes.set
end
end
module String... |
44f493a80f24d663cb344332ec61fb50846f1516cf2a0346a7ce9069ad0fe235 | ConferOpenSource/refurb | Backup.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Refurb.Run.Backup where
import ClassyPrelude
import Control.Monad.Base (liftBase)
import Control.Monad.Logger (logInfo, logError)
import qualified Database.PostgreSQL.Simple as PG
import Re... | null | https://raw.githubusercontent.com/ConferOpenSource/refurb/733355ebdefd15bb995fa4c033b04b6e2e49f6a4/src/Refurb/Run/Backup.hs | haskell | # LANGUAGE OverloadedStrings #
max compression
"custom" format - custom to pg_dump / pg_restore | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Refurb.Run.Backup where
import ClassyPrelude
import Control.Monad.Base (liftBase)
import Control.Monad.Logger (logInfo, logError)
import qualified Database.PostgreSQL.Simple as PG
import Refurb.Run.Internal (MonadRefurb, con... |
a35758122f77ee27da7aca67d443d6e3e33f8a0ba5be7d8f3d78045deda31488 | vouillon/osm | projection.ml | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... | null | https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/database/projection.ml | ocaml | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... | |
dae078c616154b14a6fc4d7fe9d6c344d679f26d73f227bf8f212f4da94e0185 | philopon/apiary | MongoDB.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE DataKinds #
module Web.Apiary.MongoDB
( MongoDB, MongoDBConfig(..), MongoQuery
-- * initializer
, initMongoDB, initHerokuMongoDB
-- * query
... | null | https://raw.githubusercontent.com/philopon/apiary/7da306fcbfcdec85d073746968298de4540d7235/apiary-mongoDB/src/Web/Apiary/MongoDB.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types #
* initializer
* query
* reexports
| initialize MongoDB extension using heroku service.
compatible:
* MongoHQ
* MongoLab
* MongoSoup
| query using 'MongoDBConfig' settings.
if you want to access other db, other accessmode, please use 'useDb' or 'access... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
module Web.Apiary.MongoDB
( MongoDB, MongoDBConfig(..), MongoQuery
, initMongoDB, initHerokuMongoDB
, access
, module Data.Bson
, module Database.MongoDB.Connection
, module Database.Mon... |
45f05a9a0c9ac50df4d22e61a3d1f975c5dd32590c36b62b4aa353819ab26104 | s-expressionists/Ecclesia | argcount.lisp | (cl:in-package #:ecclesia)
(defun check-argcount (form min-argcount max-argcount)
(when (< (length (cdr form)) min-argcount)
(error 'invalid-number-of-arguments
:form form
:min-argcount min-argcount
:max-argcount max-argcount))
(when (and (not (null max-argcount))
(> (length (cdr form)) max-a... | null | https://raw.githubusercontent.com/s-expressionists/Ecclesia/9fa25d8f67c69d6641d04eed7f22cc4cdd7c2d47/argcount.lisp | lisp | (cl:in-package #:ecclesia)
(defun check-argcount (form min-argcount max-argcount)
(when (< (length (cdr form)) min-argcount)
(error 'invalid-number-of-arguments
:form form
:min-argcount min-argcount
:max-argcount max-argcount))
(when (and (not (null max-argcount))
(> (length (cdr form)) max-a... | |
b51396237849bb91cc0e31bd1099d9d825f9282fd78de7b154f84a05e0904937 | lesguillemets/sicp-haskell | 1.24.hs | import System.Random
import Timer
main = do
g <- getStdGen
let fP = fastPrime g 100
searchPrimeF = searchPrimeWith fP 3 :: Integer -> [Integer]
mapM (timeIt "done" . searchPrimeF) (take 10 $ iterate (*10) 100)
>>= mapM_ print
searchPrimeWith :: (Integral a) => (a -> Bool) -> Int -> a -> ... | null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect2/1.24.hs | haskell | I believe this is not very haskell-ish. | import System.Random
import Timer
main = do
g <- getStdGen
let fP = fastPrime g 100
searchPrimeF = searchPrimeWith fP 3 :: Integer -> [Integer]
mapM (timeIt "done" . searchPrimeF) (take 10 $ iterate (*10) 100)
>>= mapM_ print
searchPrimeWith :: (Integral a) => (a -> Bool) -> Int -> a -> ... |
484bc41a78f625fef6be23afb4da1618d5ad456bf4dcfe624758d7708c7510d0 | mattmundell/nightshade | call.lisp | ;;; The VM definition of function call for the x86.
(in-package "X86")
;;;; Interfaces to IR2 conversion.
Standard - Argument - Location -- Interface
;;;
Return a wired TN describing the N'th full call argument passing
;;; location.
;;;
(def-vm-support-routine standard-argument-location (n)
(declare (typ... | null | https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/x86/call.lisp | lisp | The VM definition of function call for the x86.
Interfaces to IR2 conversion.
location.
Always wire the return PC location to the stack in its standard
location.
No problems.
If standard is true, then use the standard (full call) location,
otherwise use any legal location.
No problems.
Similar to Make... |
(in-package "X86")
Standard - Argument - Location -- Interface
Return a wired TN describing the N'th full call argument passing
(def-vm-support-routine standard-argument-location (n)
(declare (type unsigned-byte n))
(if (< n register-arg-count)
(make-wired-tn *any-primitive-type* descriptor-reg-s... |
0f170ad1fc3b897aef89fbdea9ff1c62e503e5046f828f607ae9895593e16ad5 | wargrey/schema | info.rkt | #lang info
(define collection 'use-pkg-name)
(define pkg-desc "A data modeling tool for Typed Racket")
(define pkg-authors '(wargrey))
(define version "1.0")
(define deps '("base" "db-lib" "typed-racket-lib" "typed-racket-more"))
(define build-deps '("scribble-lib" "racket-doc"))
(define test-omit-paths 'all)
(defin... | null | https://raw.githubusercontent.com/wargrey/schema/4824a1fecea1dc557941b08f05a457da9f628f78/info.rkt | racket | #lang info
(define collection 'use-pkg-name)
(define pkg-desc "A data modeling tool for Typed Racket")
(define pkg-authors '(wargrey))
(define version "1.0")
(define deps '("base" "db-lib" "typed-racket-lib" "typed-racket-more"))
(define build-deps '("scribble-lib" "racket-doc"))
(define test-omit-paths 'all)
(defin... | |
81bdddf28e5f963fa1ceeda7a21d8abf072b1c83d951615feeac8daf3f921f0b | manuel-serrano/bigloo | socket.scm | ;;;; s e r v e r . s c m -- A simple sever
;;;;
Copyright © 1993 - 1996 / ESSI < >
;;;;
;;;; Permission to use, copy, and/or distribute this software and its
;;;; documentation for any purpose and without fee is hereby granted, provided
;;;; that both the above copyright notice and this permiss... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/examples/Socket/socket.scm | scheme | s e r v e r . s c m -- A simple sever
Permission to use, copy, and/or distribute this software and its
documentation for any purpose and without fee is hereby granted, provided
that both the above copyright notice and this permission notice appear in
all copies and derived works. Fees for distri... | Copyright © 1993 - 1996 / ESSI < >
copyright notices of these softwares are placed in the file COPYRIGHTS
Author : [ ]
Creation date : 4 - Feb-1995 18:17
Last file update : 12 - Feb-1995 11:57
(module socket)
(define s1 (make-server-socket))
(define s2 #unspecified)
(dynamic-wind
... |
9ed44aa71389af0274d2750f3283759cc7dd33de914e37a12e63e77833bf6867 | janestreet/merlin-jst | extend_main.mli | open Extend_protocol
module Description : sig
type t
val make_v0 : name:string -> version:string -> t
end
module Utils : sig
val notify : string -> unit
val debug : string -> unit
end
module Reader : sig
type t
val make_v0 : (module Reader.V0) -> t
end
module Handshake : sig
val magic_number : string
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/extend/extend_main.mli | ocaml | * The main entry point of an extension. | open Extend_protocol
module Description : sig
type t
val make_v0 : name:string -> version:string -> t
end
module Utils : sig
val notify : string -> unit
val debug : string -> unit
end
module Reader : sig
type t
val make_v0 : (module Reader.V0) -> t
end
module Handshake : sig
val magic_number : string
... |
81b3e8fc8839492bdcc6c3a5e47f6d5314f38d8ea6396ea122e7bf325587b0b1 | janestreet/ppx_typed_fields | typed_deriver_variants.ml | open Base
open Import
open Ppxlib
open Typed_deriver_intf
open Type_kind_intf
open Variant_kind_generator_intf
let gen_sig_t ~loc ~params =
let open (val Ast_builder.make loc) in
let unique_id =
Type_kind_intf.generate_unique_id (Type_kind_intf.generate_core_type_params params)
in
let t_params = params @ [... | null | https://raw.githubusercontent.com/janestreet/ppx_typed_fields/bc1f1a11457a6d1bea9c582c5de79edc92023ae6/src/typed_deriver_variants.ml | ocaml | *
Generates a partial signature without the upper level t and without the upper level
variant.
Disables unused type warning.
* Generates a list of type declarations for for each anonymous record in the constructor.
* Generates a list of type declarations for for each tuple in the constructor. | open Base
open Import
open Ppxlib
open Typed_deriver_intf
open Type_kind_intf
open Variant_kind_generator_intf
let gen_sig_t ~loc ~params =
let open (val Ast_builder.make loc) in
let unique_id =
Type_kind_intf.generate_unique_id (Type_kind_intf.generate_core_type_params params)
in
let t_params = params @ [... |
96b48e351ddf4e9cf8e0e310c772faafedad3ac7c36e2cae5d173a2b2341c00e | AbstractMachinesLab/caramel | format_.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocamlformat-0.17.0/vendor/ocamlformat_support/format_.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let id x = x
module Size : sig
type t
val to_int : t -> int
val of_int : int -> t
val zero :... |
6a90aa3382251290473755018667d273a696ba88a3d37e34d99ec04fc10b1ff6 | divs1210/xodarap | test_utils.clj | (ns xodarap.test-utils
(:require [xodarap.core :refer [defrec defrec- rec]]))
(defrec fact
"test fn"
[n]
(if (< n 2)
1
(*' n (rec (fact (dec n))))))
(defrec- private-fact [n]
(fact n))
| null | https://raw.githubusercontent.com/divs1210/xodarap/4c1d763e190c471b1cdfc7e069924135837e8267/test/xodarap/test_utils.clj | clojure | (ns xodarap.test-utils
(:require [xodarap.core :refer [defrec defrec- rec]]))
(defrec fact
"test fn"
[n]
(if (< n 2)
1
(*' n (rec (fact (dec n))))))
(defrec- private-fact [n]
(fact n))
| |
82941f0c01cba0e3f07362c1954cf7d482476be92ee46e4c91de095ee0f0e148 | NorfairKing/the-notes | Macro.hs | module Functions.Order.Macro where
import Functions.Application.Macro (fn)
import Macro.Math
import Macro.MetaMacro
import Types
-- * Conjunctive order
cordsign :: Note -> Note
cordsign = overset bullet
cord :: Note -- ^ The order sign
-> Note
-> Note
-> Note
c... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Functions/Order/Macro.hs | haskell | * Conjunctive order
^ The order sign
* Regions
| Fixed point region
| Ascending region
| Descending region
* Extreme fixed points
| Least fixed point
| Greatest fixed point
* Galois connections
| A galois connection
^ bottom function
^ top function
^ 'from' lattice
^ 'to' lattice
| A galois insertion
^... | module Functions.Order.Macro where
import Functions.Application.Macro (fn)
import Macro.Math
import Macro.MetaMacro
import Types
cordsign :: Note -> Note
cordsign = overset bullet
-> Note
-> Note
-> Note
cord o = binop $ cordsign o
(<=-) :: Note -> Note -> Not... |
9e622cd72c2eddbb805f83f0d77de6dd25e410564d8a01386776393670bfc511 | IanConnolly/distributed-process-aws | ScaleFib.hs | # LANGUAGE TemplateHaskell #
import System.Environment (getArgs)
import System.Random (randomIO)
import Control.Monad (forM)
import Control.Monad.IO.Class (liftIO)
import Control.Distributed.Process
( Process
, NodeId
, SendPort
, newChan
, sendChan
, spawn
, receiveChan
, spawnLocal
)
import Control.... | null | https://raw.githubusercontent.com/IanConnolly/distributed-process-aws/60eb2b68de410e1511845943d44aecafca83a713/demos/ScaleFib.hs | haskell | # LANGUAGE TemplateHaskell #
import System.Environment (getArgs)
import System.Random (randomIO)
import Control.Monad (forM)
import Control.Monad.IO.Class (liftIO)
import Control.Distributed.Process
( Process
, NodeId
, SendPort
, newChan
, sendChan
, spawn
, receiveChan
, spawnLocal
)
import Control.... | |
96a58b5bc87a258593d1721958f34278214f7bcfd24c4e69e48cbda97fa7b575 | exoscale/clojure-kubernetes-client | v2beta1_object_metric_source.clj | (ns clojure-kubernetes-client.specs.v2beta1-object-metric-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-label-selector :refer :all]
[clojure-kubernetes-client.specs.v2beta1-cross-version-object-reference :refer :all]
... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v2beta1_object_metric_source.clj | clojure | (ns clojure-kubernetes-client.specs.v2beta1-object-metric-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-label-selector :refer :all]
[clojure-kubernetes-client.specs.v2beta1-cross-version-object-reference :refer :all]
... | |
f6344ece6e88511789efe4a33fead5b6471901a63b5b2b642d3135f5f5de9a74 | GaloisInc/what4 | Alt.hs | -- | Like "Test.Tasty.Hedgehog", but instead exposing an alternative
-- implementation of 'testProperty' that does not induce deprecation warnings.
module Test.Tasty.Hedgehog.Alt
( module TTH
, testProperty
) where
import Data.String (IsString(fromString))
import Hedgehog (Property)
import Test.Tasty (TestName, ... | null | https://raw.githubusercontent.com/GaloisInc/what4/835238d87500d48c3b0ae9121f2b484b71faa8b5/what4/test/hedgehog/Test/Tasty/Hedgehog/Alt.hs | haskell | | Like "Test.Tasty.Hedgehog", but instead exposing an alternative
implementation of 'testProperty' that does not induce deprecation warnings.
Note that @tasty-hedgehog@'s version of 'testProperty' has been deprecated
represent the name of a top-level 'Property' value to run in the event that
that it tests as top... | module Test.Tasty.Hedgehog.Alt
( module TTH
, testProperty
) where
import Data.String (IsString(fromString))
import Hedgehog (Property)
import Test.Tasty (TestName, TestTree)
import Test.Tasty.Hedgehog as TTH hiding (testProperty)
| Create a ' T.TestTree ' from .
in favor of ' testPropertyNamed ' , who... |
81b71fcb7d048edeb33a344b3cebc1da6385e1a7c144746defed6c150686c47b | mirage/irmin | content_addressable_intf.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-git/content_addressable_intf.ml | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 " AND... | |
3dc07c1ad3a36f3118893da6081b0a849d45d0827863c71b65f4bd38667958bd | jagajaga/FP-Course-ITMO | Main.hs | # LANGUAGE TypeApplications #
module Main where
import Criterion.Main (bench, bgroup, defaultMain, nf)
import qualified Data.List as Stl
import qualified ArrayInsertionSort as Arr
import qualified ListInsertionSort as Lst
import qualified VecInsertionSort as Vec
main :: IO ()
main = defaultMain $
let testList = [... | null | https://raw.githubusercontent.com/jagajaga/FP-Course-ITMO/1417c4e929050518f8ad1e56008f061af204825b/lecture-10-sorts/insertion-sort-comparison/bench/Main.hs | haskell | # LANGUAGE TypeApplications #
module Main where
import Criterion.Main (bench, bgroup, defaultMain, nf)
import qualified Data.List as Stl
import qualified ArrayInsertionSort as Arr
import qualified ListInsertionSort as Lst
import qualified VecInsertionSort as Vec
main :: IO ()
main = defaultMain $
let testList = [... | |
058024cb03509954f067d1c66df3fd6aa1597d7ed412511741b3be06267daf94 | mbutterick/quad | draw.rkt | #lang debug racket
(require "struct.rkt"
"string.rkt"
"debug.rkt"
"attrs.rkt"
quad/quad
sugar/coerce
quad/position
pitfall)
(provide (all-defined-out))
(define q:draw (make-quad #:type draw-quad))
(define (draw-line q doc)
(define x1 (quad-ref q :x1 0... | null | https://raw.githubusercontent.com/mbutterick/quad/395447f35c2fb9fc7b6199ed185850906d80811d/quadwriter/draw.rkt | racket | #lang debug racket
(require "struct.rkt"
"string.rkt"
"debug.rkt"
"attrs.rkt"
quad/quad
sugar/coerce
quad/position
pitfall)
(provide (all-defined-out))
(define q:draw (make-quad #:type draw-quad))
(define (draw-line q doc)
(define x1 (quad-ref q :x1 0... | |
1fe2242e49ae693211305bfee50a8c003b9e7c47220aea414b7256a4a7b94afc | Lovesan/bike | windows-forms.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2019 , < lovesan.ru at gmail.com >
;;; 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, inclu... | null | https://raw.githubusercontent.com/Lovesan/bike/695a555c6b76e12361a8ad54791ca6cb7221868a/examples/windows-forms.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2019 , < lovesan.ru at gmail.com >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI... |
1893a9ac34dc3d472bdf2aa562a61d1de46d8f94d987f17876ac8640fae60323 | nwf/dyna | NoBackend.hs | ---------------------------------------------------------------------------
-- | A backend that does no code generation.
--
-- It is anticipated that this will be useful for debugging the earlier
-- stages of the compiler.
--
-- XXX Add a self-test that all primOps modes are supported by other
-- backends.
-- Header m... | null | https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/Backend/NoBackend.hs | haskell | -------------------------------------------------------------------------
| A backend that does no code generation.
It is anticipated that this will be useful for debugging the earlier
stages of the compiler.
XXX Add a self-test that all primOps modes are supported by other
backends.
Header material ... |
module Dyna.Backend.NoBackend (noBackend, primPossible) where
import Control.Lens
import Control.Monad
import qualified Data.Maybe as MA
import qualified Data.Map as M
import qualified Data.Set as S
import Dyna.Analysis.ANF
impor... |
91b57f49f9f8cc3e2e501c8140454e8b3634c95ff64bb926e2e281d002209f2f | Simre1/haskell-game | Prelude.hs | | This module re - exports the apecs prelude with STM versions .
module Apecs.STM.Prelude
( System
, module Apecs.STM
, module Apecs
) where
import Apecs hiding (EntityCounter, Global, Map, System, Unique,
makeWorld, newEntity)
import Apecs.STM
type Syste... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/apecs/apecs-stm/src/Apecs/STM/Prelude.hs | haskell | | This module re - exports the apecs prelude with STM versions .
module Apecs.STM.Prelude
( System
, module Apecs.STM
, module Apecs
) where
import Apecs hiding (EntityCounter, Global, Map, System, Unique,
makeWorld, newEntity)
import Apecs.STM
type Syste... | |
3be3cec6f090550a0886de82be4376f62f356894a8da3df5d7ac9a9687647110 | eareese/htdp-exercises | 098-ufo-stop.rkt | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
Exercise 98 . Design the function si - game - over ? for use as the stop - when handler . The game stops if the UFO lands or if the missile hits the UFO . For both conditions , we recommend that you check for proximity of one object to another .
The st... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/098-ufo-stop.rkt | racket | constants
canvas
used by in-reach?
Structure type definitions
si-game-over?
SIGS -> Boolean
- when the UFO lands
- when the missile hits the UFO
ufo has landed!
missile hit!
in-reach?
Posn Posn -> Boolean
si-render-final
SIGS -> Image | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
Exercise 98 . Design the function si - game - over ? for use as the stop - when handler . The game stops if the UFO lands or if the missile hits the UFO . For both conditions , we recommend that you check for proximity of one object to another .
The st... |
c36a22f37686e102ce9208bf120f7022cd946c9b5e28c0733babb3111e8189b4 | emqx/emqttb | emqttb_scenario_pubsub_forward.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the L... | null | https://raw.githubusercontent.com/emqx/emqttb/a9cb23d3829f1e43f9f32485f3171223df8e3451/src/scenarios/emqttb_scenario_pubsub_forward.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqttb_scenario_pubsub_forward).
-behavior(emqttb_scenario).
First all subscribers connect a... |
d6862e2ff0425ba0a17b0409c76b3eaef0ab16f06fb9e78ad52fcae8122997ac | onedata/op-worker | atm_audit_log_store_container_iterator.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module provides `atm_store_co... | null | https://raw.githubusercontent.com/onedata/op-worker/34607258e1b3fca71a1b0da2a0bc5f0134fe878e/src/modules/automation/store/container/audit_log/atm_audit_log_store_container_iterator.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module provides `atm_store_container_iterator` functionality for
`atm_audit_log_store_container`.
@end
-------------------------------------------------------------... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(atm_audit_log_store_container_iterator).
-author("Michal Stanisz").
-behaviour(atm_store_container_iterator).
-behaviour(persistent_record).
-include_lib("ctool/include/errors.hrl").
-exp... |
3080438fb4c51ea3704c2f172898c25c15ebcd97d068fc3659e78e0510b2d821 | elarous/O2SN | subs.cljs | (ns o2sn.signup.subs
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:signup/email
(fn [db _]
(get-in db [:signup-form :email :value])))
(reg-sub
:signup/username
(fn [db _]
(get-in db [:signup-form :username :value])))
(reg-sub
:signup/password
(fn [db _]
(get-in db [:signup-form :password :... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/signup/subs.cljs | clojure | (ns o2sn.signup.subs
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:signup/email
(fn [db _]
(get-in db [:signup-form :email :value])))
(reg-sub
:signup/username
(fn [db _]
(get-in db [:signup-form :username :value])))
(reg-sub
:signup/password
(fn [db _]
(get-in db [:signup-form :password :... | |
41ac0c3de8603c152b6acbfb4d7473b9d9bdea584defae75b6075b970f3ca799 | stylewarning/cl-permutation | package.lisp | ;;;; tests/package.lisp
;;;;
Copyright ( c ) 2014 - 2016
(fiasco:define-test-package #:cl-permutation-tests
(:use #:cl)
(:nicknames #:perm-tests)
(:use #:fiasco
#:cl-permutation
#:cl-permutation-examples)
;; suite.lisp
(:export
#:run-tests))
| null | https://raw.githubusercontent.com/stylewarning/cl-permutation/631b17541ad9fb5e2fbf89b09bc0d5a98d718e1c/tests/package.lisp | lisp | tests/package.lisp
suite.lisp | Copyright ( c ) 2014 - 2016
(fiasco:define-test-package #:cl-permutation-tests
(:use #:cl)
(:nicknames #:perm-tests)
(:use #:fiasco
#:cl-permutation
#:cl-permutation-examples)
(:export
#:run-tests))
|
281d09a07350daa15e5140f76940636172fcedf700ad7ef1d071dc0a6bfb9381 | cbaggers/varjo | discard.lisp | (in-package :vari.glsl)
(in-readtable fn:fn-reader)
;;------------------------------------------------------------
Switch
;; {TODO} check keys
(v-defspecial discard ()
:return
(let* ((discarded (type-spec->type 'v-discarded (flow-id!)))
(type-set (make-type-set discarded)))
(assert (typep (stage en... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/vari.glsl/special-operators/discard.lisp | lisp | ------------------------------------------------------------
{TODO} check keys
------------------------------------------------------------ | (in-package :vari.glsl)
(in-readtable fn:fn-reader)
Switch
(v-defspecial discard ()
:return
(let* ((discarded (type-spec->type 'v-discarded (flow-id!)))
(type-set (make-type-set discarded)))
(assert (typep (stage env) 'fragment-stage) ()
'discard-not-in-fragment-stage
:stage... |
9da986210aaf5b0b2fb6286d5939ae34a2fb45e71b2b08240e5afe81a9fb746f | konn/subcategories | Applicative.hs | # LANGUAGE EmptyCase , StandaloneDeriving , TupleSections #
# LANGUAGE CPP #
# LANGUAGE UndecidableSuperClasses #
# OPTIONS_GHC -Wno - orphans #
module Control.Subcategory.Applicative
( CApplicative(..), defaultRightApply, defaultLeftApply, CApp(..)
) where
import Control.Subcategory.Alternati... | null | https://raw.githubusercontent.com/konn/subcategories/eb04c6ab36c7a1aff11e35f3493f7c6f54706057/src/Control/Subcategory/Applicative.hs | haskell | # INLINE (<.>) #
# INLINE (<. ) #
# INLINE ( .>) #
# INLINE (<.>) #
# INLINE (<.) #
# INLINE (.>) #
# INLINE (<.>) #
# INLINE (<.) #
# INLINE (.>) #
# INLINE (<.>) #
# INLINE (<.) #
# INLINE (.>) #
# INLINE (<.>) #
# INLINE (<.) #
# INLINE (.>) #
# INLINE (<.>) #
# INLINE (<.) #
# INLINE (.>) #
# INLINE (<.>) #
# INLIN... | # LANGUAGE EmptyCase , StandaloneDeriving , TupleSections #
# LANGUAGE CPP #
# LANGUAGE UndecidableSuperClasses #
# OPTIONS_GHC -Wno - orphans #
module Control.Subcategory.Applicative
( CApplicative(..), defaultRightApply, defaultLeftApply, CApp(..)
) where
import Control.Subcategory.Alternati... |
d7f61ec67f1e8924329f01d3d7660966e642139bc9e550aefd743bc31c33dfa5 | input-output-hk/plutus | Subst.hs | -- editorconfig-checker-disable-file
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module PlutusIR.Subst
( fvTerm
, ftvTerm
, fvBinding
, ftvBinding
, ftvTy
, vTerm
, tvTerm
, tvTy
) where
import PlutusCore.Core (typeTyVars)
... | null | https://raw.githubusercontent.com/input-output-hk/plutus/59aeb3e666d00be762d68d87f5e4803eedaf75d2/plutus-core/plutus-ir/src/PlutusIR/Subst.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE RankNTypes #
| Get all the free term variables in a PIR term.
| Get all the free type variables in a PIR term.
sound because the subterms and subtypes are disjoint
| Get all the free variables in a PIR single let-binding.
| Get all the free type variables in a... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module PlutusIR.Subst
( fvTerm
, ftvTerm
, fvBinding
, ftvBinding
, ftvTy
, vTerm
, tvTerm
, tvTy
) where
import PlutusCore.Core (typeTyVars)
import PlutusCore.Core qualified as PLC
import PlutusCore.Subst (ftvTy, ft... |
de8c4ced15e280d402858a64eb73c2abdece90b3f2c932e3edee923ab5d6c842 | tejasbubane/haskell-book-code | exercises.hs | module Main where
import System.Environment (getArgs)
import Data.Char (ord, chr)
import System.IO (stdin, stdout, stderr, hGetLine, hPutStr, hWaitForInput)
-- Since nothing mentioned about keyword in the exercise description
-- using my own hardcoded keyword
keyword :: String
keyword = "haskell"
alphaIndex :: Char ... | null | https://raw.githubusercontent.com/tejasbubane/haskell-book-code/deaac8ab4db0ae8692d0278826528bb8a746ed82/ch-29/exercises.hs | haskell | Since nothing mentioned about keyword in the exercise description
using my own hardcoded keyword
Assumption input is smallcase alphabets only
Usage:
Compile so that we can pass the CLI arguments
Run the generated executable (timeout in milliseconds)
./exercises -t 5000 -e
or without the -t option
Skipping the ... | module Main where
import System.Environment (getArgs)
import Data.Char (ord, chr)
import System.IO (stdin, stdout, stderr, hGetLine, hPutStr, hWaitForInput)
keyword :: String
keyword = "haskell"
alphaIndex :: Char -> Int
alphaIndex x = ord x - 97
bound :: Int -> Int
bound i
| i > upperBound = lowerBound + (i - up... |
36f66188a29ec3c78d21ef40b81bc9b5c3d1114d7f6a228f20b80ddb4d79abd0 | ndmitchell/supero | AccRev.hs |
module Test.Jail.AccRev(test) where
#include "Include.hs"
#if MAIN
test = (uncurry root, ("test", "more"))
#endif
root xs ys = rev xs ys
rev acc xs = case xs of
[] -> acc
y:ys -> rev (y: jail acc) ys
| null | https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/supero4/Test/Jail/AccRev.hs | haskell |
module Test.Jail.AccRev(test) where
#include "Include.hs"
#if MAIN
test = (uncurry root, ("test", "more"))
#endif
root xs ys = rev xs ys
rev acc xs = case xs of
[] -> acc
y:ys -> rev (y: jail acc) ys
| |
ecad6db55b6701fd561cb93907799aea1a504544a1a0513755465b300f46fcef | inria-parkas/sundialsml | test_nvector_mpimanyvector_serial.ml | -----------------------------------------------------------------
* Programmer(s ): @ SMU
* -----------------------------------------------------------------
* OCaml port : , , Sep 2021 .
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/examples/nvector/mpimanyvector/test_nvector_mpimanyvector_serial.ml | ocaml | ----------------------------------------------------------------------
* Main NVector Testing Routine
* --------------------------------------------------------------------
check input and set vector length
Test subvector accessors
Standard vector operation tests
Fused and vector array operations tests (disab... | -----------------------------------------------------------------
* Programmer(s ): @ SMU
* -----------------------------------------------------------------
* OCaml port : , , Sep 2021 .
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright... |
915f24b1e366b70dcb7e0e3a6fab0fa36803b9c1a2596917521c739fc1627e75 | daveliepmann/vdquil | figure13.clj | , Chapter 4 ( Time Series ) , figure 13 :
;; Unboxed plot with reverse-color gridlines
Converted from Processing to Quil as an exercise by
(ns vdquil.chapter4.figure13
(:use [quil.core]
[vdquil.util]
[vdquil.chapter4.ch4data]))
(def current-column (atom 0))
(defn get-current-column
"Ke... | null | https://raw.githubusercontent.com/daveliepmann/vdquil/f40788ff7634870a9a5f1dc4ca3df8543beaf00b/src/vdquil/chapter4/figure13.clj | clojure | Unboxed plot with reverse-color gridlines
Draw year labels
Draw reverse-color grid lines
Draw volume labels
Draw major tick mark
Center vertically
Align the "0" label by the bottom: | , Chapter 4 ( Time Series ) , figure 13 :
Converted from Processing to Quil as an exercise by
(ns vdquil.chapter4.figure13
(:use [quil.core]
[vdquil.util]
[vdquil.chapter4.ch4data]))
(def current-column (atom 0))
(defn get-current-column
"Key handling function `switch-data-set` increme... |
919a714d25dee0ac592a0803f69a3f39f43f2b74909a5b0dd0689555e96c4c8e | Frozenlock/bacure | core.clj | (ns bacure.test.core
(:require [bacure.core :as b]
[bacure.local-device :as ld]
[clojure.test :refer :all]))
(deftest device-lifecycle
(testing "Boot and terminate a local BACnet device"
(ld/with-temp-devices
(let [id 1332]
(b/boot-up! {:device-id id})
(is (.isInit... | null | https://raw.githubusercontent.com/Frozenlock/bacure/2d743492f7865d8c61313f4d73818c3d1ee462de/test/bacure/test/core.clj | clojure | (ns bacure.test.core
(:require [bacure.core :as b]
[bacure.local-device :as ld]
[clojure.test :refer :all]))
(deftest device-lifecycle
(testing "Boot and terminate a local BACnet device"
(ld/with-temp-devices
(let [id 1332]
(b/boot-up! {:device-id id})
(is (.isInit... | |
407127f070427e77d791a32fe3a98feb43f5568bff9ba1041d150d504cd2661f | twosigma/waiter | semaphore_test.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/8d3cdaed90078c188095ae1e65714edc72f9122c/waiter/test/waiter/util/semaphore_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.util.semaphore-test
(:require [clojure.test :refer :all]
[waiter.util.semaphore :refer :all])
(:import (waiter.util.semaphore NonBlockingSemaphore)))
(deftest test-counting-se... |
7847c4ca675de539931758802dc3eee46f0b6d61939167f1f252f31b1c877ab9 | leo-project/leo_storage | leo_storage_app.erl | %%======================================================================
%%
%% LeoFS Storage
%%
Copyright ( c ) 2012 - 2016 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%... | null | https://raw.githubusercontent.com/leo-project/leo_storage/9bd2bb0b7cedcdbe1bf0b5c4dcf708be16664d2a/src/leo_storage_app.erl | erlang | ======================================================================
LeoFS Storage
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 g... | Copyright ( c ) 2012 - 2016 Rakuten , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(leo_storage_app).
-behaviou... |
f42b749b52bb1cc4aafda884a99d1c0228dcf5d955df15220067a172bc42ffa2 | plumatic/grab-bag | hockey_crashes.clj | (ns dashboard.data.hockey-crashes
"API Client for hockey app crash reporting."
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.error :as err]
[plumbing.json :as json]
[plumbing.time :as time]
[web.client :as client]
[dashboard.data.core :as data]))
(s/defn ^:always-validate crashes... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/dashboard/src/clj/dashboard/data/hockey_crashes.clj | clojure | (ns dashboard.data.hockey-crashes
"API Client for hockey app crash reporting."
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.error :as err]
[plumbing.json :as json]
[plumbing.time :as time]
[web.client :as client]
[dashboard.data.core :as data]))
(s/defn ^:always-validate crashes... | |
138e7dc1e9cc4e547ae187c14c0a5ef18938702b4b6fed5e5a199ea58bb27738 | mistupv/cauder | mergesort.erl | %Works only with compiler optimizations disabled
-module(mergesort).
-export([mergesort/1, mergesort/2]).
mergesort(L) ->
mergesort(L, none).
mergesort([], Parent) ->
send_return([], Parent);
mergesort([X], Parent) ->
send_return([X], Parent);
mergesort(L, Parent) ->
Half = length(L) div 2,
L1 = ... | null | https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/examples/mergesort.erl | erlang | Works only with compiler optimizations disabled
Correct
false -> [H1 | merge([H2 | T1], T2)]; % Incorrect
take(N,[H|T])->[H | take(N-1, T)]. % Correct |
-module(mergesort).
-export([mergesort/1, mergesort/2]).
mergesort(L) ->
mergesort(L, none).
mergesort([], Parent) ->
send_return([], Parent);
mergesort([X], Parent) ->
send_return([X], Parent);
mergesort(L, Parent) ->
Half = length(L) div 2,
L1 = take(Half, L),
L2 = last(length(L) - Half, L)... |
0c8e4fca41f5f10345d90f9d74e7408f03349da221e7300b862cbe21cc80955c | 8c6794b6/guile-tjit | t-f64-05.scm | ;;; Combination of f64 binary operations.
(define (loop n)
(let lp ((n n) (acc 1.0))
(if (= n 0)
acc
(lp (- n 1) (/ (+ (- (/ (* (+ acc 0.001) 1.011) 0.998) 0.001)
(+ (* (/ (- acc 0.002) 0.999) 1.009) 0.002)
(* (+ (- (/ acc 0.997) 0.002) 0.002) 0... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-f64-05.scm | scheme | Combination of f64 binary operations. |
(define (loop n)
(let lp ((n n) (acc 1.0))
(if (= n 0)
acc
(lp (- n 1) (/ (+ (- (/ (* (+ acc 0.001) 1.011) 0.998) 0.001)
(+ (* (/ (- acc 0.002) 0.999) 1.009) 0.002)
(* (+ (- (/ acc 0.997) 0.002) 0.002) 0.003)
(/ (- (+ (... |
ad03ac75021896f5252390fc5a664dffe0df1aa83cdaefa6a33835012a8427c4 | BumblebeeBat/PinkFairy | serve.erl | -module(serve).
-export([start/1, pw/0, pw/1]).
start(Port) ->
io:fwrite("start server\n"),
D_internal = [
{'_', [
{"/:file", main_handler, []},
{"/", internal_handler, []}
]}
],
D = [
{'_', [
{"/:file", external_handler, []},
{"/", handler, []}
]}
],
Dispatch_internal... | null | https://raw.githubusercontent.com/BumblebeeBat/PinkFairy/33d595d735d6b1119732984e894ed6aea2b6cb6a/src/networking/serve.erl | erlang | -module(serve).
-export([start/1, pw/0, pw/1]).
start(Port) ->
io:fwrite("start server\n"),
D_internal = [
{'_', [
{"/:file", main_handler, []},
{"/", internal_handler, []}
]}
],
D = [
{'_', [
{"/:file", external_handler, []},
{"/", handler, []}
]}
],
Dispatch_internal... | |
76a510e51d0f3cd0e69ab407bf82eb203acf72c2d5a1d129909c40c7e8595084 | janestreet/ppx_typed_fields | unit_kind_generator.ml | open Ppxlib
type t = core_type
(* The structure items will be inserted after the type type
definitions and before any other items.*)
let extra_structure_items_to_insert loc =
let open (val Ast_builder.make loc) in
[ [%stri
let unreachable_code = function
| (_ : _ typed__t) -> .
;;]
]
;;
let co... | null | https://raw.githubusercontent.com/janestreet/ppx_typed_fields/bc1f1a11457a6d1bea9c582c5de79edc92023ae6/src/unit_kind_generator.ml | ocaml | The structure items will be inserted after the type type
definitions and before any other items. | open Ppxlib
type t = core_type
let extra_structure_items_to_insert loc =
let open (val Ast_builder.make loc) in
[ [%stri
let unreachable_code = function
| (_ : _ typed__t) -> .
;;]
]
;;
let constructor_declarations ~loc:_ ~elements_to_convert:_ ~core_type_params:_ = []
let names_list ~loc ~eleme... |
a30dbfcca05e9a14c449c17323014077ad9282c5cde691af567e1efe3635d124 | v-kolesnikov/sicp | 1_30_test.clj | (ns sicp.chapter01.1-30-test
(:require [clojure.test :refer :all]
[sicp.test-helper :refer :all]
[sicp.chapter01.1-30 :refer :all]))
(deftest test-sum
(assert-equal 21 (sum (fn [x] x) 1 inc 6))
(assert-equal 36 (sum (fn [x] (* x x x)) 1 inc 3)))
| null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_30_test.clj | clojure | (ns sicp.chapter01.1-30-test
(:require [clojure.test :refer :all]
[sicp.test-helper :refer :all]
[sicp.chapter01.1-30 :refer :all]))
(deftest test-sum
(assert-equal 21 (sum (fn [x] x) 1 inc 6))
(assert-equal 36 (sum (fn [x] (* x x x)) 1 inc 3)))
| |
594b6931a1b4db504eeaa0ebefd28080a7249723ef37cb368fd1b4eccf03d9b3 | mstksg/auto | Auto.hs | -- |
-- Module : Control.Auto
-- Description : Main entry point to the /auto/ library.
-- Copyright : (c) Justin Le 2015
License : MIT
Maintainer :
-- Stability : unstable
-- Portability : portable
--
-- This module serves as the main entry point for the library; these are
-- all basically re-expor... | null | https://raw.githubusercontent.com/mstksg/auto/75b73aa6a6815a9dc404e8ceca28218a70b954e9/src/Control/Auto.hs | haskell | |
Module : Control.Auto
Description : Main entry point to the /auto/ library.
Copyright : (c) Justin Le 2015
Stability : unstable
Portability : portable
This module serves as the main entry point for the library; these are
all basically re-exports. The re-exports are chosen so you can start
doing "n... | License : MIT
Maintainer :
module Control.Auto (
Auto
, Auto'
, Blip
, Interval
, Interval'
, stepAuto
, stepAuto'
, evalAuto
, evalAuto'
, streamAuto
, streamAuto'
, stepAutoN
, stepAutoN'
* *
, encodeAuto
, decodeAuto
, readAuto
, writeAuto
, unserialize
, force... |
e3b653d3fefa0396e72c2544da447c2351ad19f983ff4caf64506c7d6b3a28b2 | input-output-hk/project-icarus-importer | Discovery.hs | module Pos.Discovery
( module Pos.Discovery.Model.Class
, module Pos.Discovery.Model.Neighbours
) where
import Pos.Discovery.Model.Class
import Pos.Discovery.Model.Neighbours | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/infra/Pos/Discovery.hs | haskell | module Pos.Discovery
( module Pos.Discovery.Model.Class
, module Pos.Discovery.Model.Neighbours
) where
import Pos.Discovery.Model.Class
import Pos.Discovery.Model.Neighbours | |
2afd4ba92bbc71ed44540e6552fabb8b2dd0726125ba937c2438a8545824d6d0 | tatut/ripley | collection.clj | (ns ripley.live.collection
"A live component that handles a collection of entities.
Optimizes rerenders to changed entities only."
(:require [ripley.html :as h]
[ripley.impl.output :refer [render-to-string]]
[ripley.live.protocols :as p]
[clojure.set :as set]
[cloju... | null | https://raw.githubusercontent.com/tatut/ripley/c6d1b5501830446b7a2d6d7bbfe09f75410d864e/src/ripley/live/collection.clj | clojure | Read the collection source
If list of old keys (minus removed) differs
from list of new keys (minus additions), we need
to send a child order patch.
Cleanup components that were removed
Set child order for existing children (if changed)
and add any new ones
Send update if needed to existing item
Added, render ... | (ns ripley.live.collection
"A live component that handles a collection of entities.
Optimizes rerenders to changed entities only."
(:require [ripley.html :as h]
[ripley.impl.output :refer [render-to-string]]
[ripley.live.protocols :as p]
[clojure.set :as set]
[cloju... |
91a6448927dc1ea1a979d9925996f86eb7a0a83685342b32e7b768142b1b0049 | jordanthayer/ocaml-search | run.ml | (* Stored version of a run *)
(* construct the display window *)
let run_window = ignore(GtkMain.Main.init());
GWindow.window ~border_width:10 ~title:"Run Data"
~deletable:false ~width:200 ~height:200 ()
(* construct the container widget *)
let val_table = GPack.table ~columns:2 ~rows:3 ~row_spacings:10
~col_... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search_vis/run.ml | ocaml | Stored version of a run
construct the display window
construct the container widget
add all of the things into the container widget
***************************************** Structs *******************
* Loads a recorded grid run
[tr_file] True heuristics file
[ex_file] records node expansions of th... |
let run_window = ignore(GtkMain.Main.init());
GWindow.window ~border_width:10 ~title:"Run Data"
~deletable:false ~width:200 ~height:200 ()
let val_table = GPack.table ~columns:2 ~rows:3 ~row_spacings:10
~col_spacings:50 ~packing:run_window#add ()
let data_lbls =
ignore(GMisc.label ~text:"Step"
~packin... |
4e63d865648337d9b29a93b8b4eff561aa61721a3c97bd49835061df52001b3d | sorenmacbeth/flambo | kryo.clj | ;; ## Utilities and macros for dealing with kryo
;;
(ns flambo.kryo
(:import [org.apache.spark SparkEnv]
[org.apache.spark.serializer SerializerInstance]
[java.nio ByteBuffer]
[scala.reflect ClassTag$]))
(set! *warn-on-reflection* true)
;; lol scala
(def ^:no-doc OBJECT-CLASS-TAG (.... | null | https://raw.githubusercontent.com/sorenmacbeth/flambo/9c61467697547c5fe3d05070be84cd2320cb53ce/src/clojure/flambo/kryo.clj | clojure | ## Utilities and macros for dealing with kryo
lol scala | (ns flambo.kryo
(:import [org.apache.spark SparkEnv]
[org.apache.spark.serializer SerializerInstance]
[java.nio ByteBuffer]
[scala.reflect ClassTag$]))
(set! *warn-on-reflection* true)
(def ^:no-doc OBJECT-CLASS-TAG (.apply ClassTag$/MODULE$ java.lang.Object))
(defn ^bytes serializ... |
27b048d9840d7dca431dac2ae5e8155368f20610b96892e33b730083a8bd9a03 | OCamlPro/drom | main.ml | !{header-ml}
module Gsl = !(lib-name:alpha:cap)
let () =
let order = 10 in
let f x = if x < 0.5 then 0. else 1. in
let cs = Gsl.Functions.Gsl_cheb.make ~a:0. ~b:1. f order in
let x = 0.3 in
let y = Gsl.Functions.Gsl_cheb.eval cs x in
Printf.printf
"Evaluation of Chebishev series at order %d for x = %.... | null | https://raw.githubusercontent.com/OCamlPro/drom/7bc86026e0e170f1a468b437d369aefc5dbea5d7/src/drom_lib/share/drom/skeletons/packages/ctypes_drv/main.ml | ocaml | !{header-ml}
module Gsl = !(lib-name:alpha:cap)
let () =
let order = 10 in
let f x = if x < 0.5 then 0. else 1. in
let cs = Gsl.Functions.Gsl_cheb.make ~a:0. ~b:1. f order in
let x = 0.3 in
let y = Gsl.Functions.Gsl_cheb.eval cs x in
Printf.printf
"Evaluation of Chebishev series at order %d for x = %.... | |
ebead3bcf8663f13e7591a8b6f36a095ef378f202881f0dab39f25a07ea2149b | sharplispers/montezuma | token-stream.lisp | (in-package #:montezuma)
;; TODO: Port to flexi-streams
(defclass token-stream ()
())
(defgeneric next-token (token-stream)
(:documentation "Retrieve the next token from TOKEN-STREAM."))
| null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/analysis/token-stream.lisp | lisp | TODO: Port to flexi-streams | (in-package #:montezuma)
(defclass token-stream ()
())
(defgeneric next-token (token-stream)
(:documentation "Retrieve the next token from TOKEN-STREAM."))
|
5535e3bc3a8e47b7092fc15cb16943493836f9a43f51a657dbc8fb3df5297abf | archaelus/erlmail | smtpd_sup.erl | %%%---------------------------------------------------------------------------------------
@author < > [ ]
2006 - 2007 Simple Enigma , Inc. All Rights Reserved .
@doc SMTPD supervisor definition file
@reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</... | null | https://raw.githubusercontent.com/archaelus/erlmail/fe69b0e936f1512b4f349666e56c31c0af7b672c/src/smtpd_sup.erl | erlang | ---------------------------------------------------------------------------------------
@reference See <a href="" target="_top">ErlMail Google Code Repository</a> for more information
@version 0.0.6
@end
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... | @author < > [ ]
2006 - 2007 Simple Enigma , Inc. All Rights Reserved .
@doc SMTPD supervisor definition file
@reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</a > for more information
@since 0.0.5
The MIT License
Copyright ( c ) 2007 ... |
da61ca505c9170132ed389507962bff84e739b496e5e9af588e594768ac1982a | ComputerScienceHouse/csh-eval | ldapImport.hs | module LdapImport
where
import CSH.LDAP
import CSH.Eval.Model
import CSH.Eval.Cacheable.Prim
import CSH.Eval.Cacheable.Make
import Data.UUID
import Data.Maybe
import Data.ByteString.Char8 as B
import Data.Text as T
import Ldap.Client.Search
import System.Log.Logger
ldapImport = withConfig $ \l -> do
lgr <- getRoot... | null | https://raw.githubusercontent.com/ComputerScienceHouse/csh-eval/d2d4bac07bfbfcdb58aa01694d422f326bd3d414/ldapImport.hs | haskell | module LdapImport
where
import CSH.LDAP
import CSH.Eval.Model
import CSH.Eval.Cacheable.Prim
import CSH.Eval.Cacheable.Make
import Data.UUID
import Data.Maybe
import Data.ByteString.Char8 as B
import Data.Text as T
import Ldap.Client.Search
import System.Log.Logger
ldapImport = withConfig $ \l -> do
lgr <- getRoot... | |
b7f3fe057c7729328c6542c4c19d872342d6d0a66f51fa4c4fc3ada1b2ca6cf6 | lspitzner/exference | SearchTree.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
module Language.Haskell.Exference.Core.SearchTree
( SearchTree
, SearchTreeValue
, SearchTreeBuilder
, initialSearchTreeBuilder
, buildSearchTree
, filterSearchTreeN
, filterSearchTreeProcessedN
, takeSearchTree
)... | null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/src/Language/Haskell/Exference/Core/SearchTree.hs | haskell | # LANGUAGE RankNTypes #
total number of children
number of processed children
expression
id, parentid, expr,
processed list
removes all nodes that have less than n total nodes (incl. self)
removes all nodes that have less than n total nodes (incl. self)
limits depth of tree | # LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
module Language.Haskell.Exference.Core.SearchTree
( SearchTree
, SearchTreeValue
, SearchTreeBuilder
, initialSearchTreeBuilder
, buildSearchTree
, filterSearchTreeN
, filterSearchTreeProcessedN
, takeSearchTree
)
where
import Language.... |
189ac7625b686d4bbaab48de48157e3fe2f86b99361d912c305d21a2fecf412b | kaizhang/Taiji | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
module Bio.Pipeline.Utils where
import Bio.Data.Experiment.Types
import Control.Lens
import qualified Data.Text as T
-- | Get the prefix of a filename, e.g., "path/xxx.txt" -> "path/xxx"
getPrefix :: T.Text -> T.Text
getPrefix x = if suffix == "g... | null | https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/bio-pipelines/src/Bio/Pipeline/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
| Get the prefix of a filename, e.g., "path/xxx.txt" -> "path/xxx" |
module Bio.Pipeline.Utils where
import Bio.Data.Experiment.Types
import Control.Lens
import qualified Data.Text as T
getPrefix :: T.Text -> T.Text
getPrefix x = if suffix == "gz"
then T.init $ fst $ T.breakOnEnd "." $ T.init prefix
else T.init prefix
where
(prefix, s... |
ec8924e4f382229bcb8fa44724b9124f2f697797a6f8121fc7e193df675696c7 | SahilKang/cl-rdkafka | producer.lisp | Copyright ( C ) 2018 - 2020 < >
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka 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
;;; (at your option) any l... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/4d0b6f7f9b102769cb91a020e4e192a2ea066e0b/test/high-level/producer.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka 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 PURPOS... | Copyright ( C ) 2018 - 2020 < >
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)
(defpackage #:test/high-level/producer
(:use #:... |
4005a37c5b56df51b4f453f84da374d08993d51d1fe52f3881017a761daee2af | peterhil/btrie | btrie.lisp | -*- coding : utf-8 ; mode : Lisp ; syntax : ANSI - Common - Lisp -*-
;;;
;;; -------------------------------------------------------------------------
;;; Branch trie - a generic trie implementation with branch widths
;;; -------------------------------------------------------------------------
;;;
Copyright ( c ) ... | null | https://raw.githubusercontent.com/peterhil/btrie/50e933c77b45f45506c86ca9530f3cac952388b9/btrie.lisp | lisp | mode : Lisp ; syntax : ANSI - Common - Lisp -*-
-------------------------------------------------------------------------
Branch trie - a generic trie implementation with branch widths
-------------------------------------------------------------------------
Redistribution and use in source and binary forms, wi... | Copyright ( c ) 2010 - 2012 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:cl-user)
(defpackage #:nu.composed.btrie
(:documentation "Branch trie – an implementation of tries with branc... |
66f85cfa7c822b207ec793c3003a451d69dfef9c8e3a36af5e9d12ec600a77f7 | igorhvr/bedlam | misc.scm | (define <object>)
(define-generic initialize)
(define (initialize-classes)
(set! <object> (make-class-helper '<object> 'sisc.oo.object-type '() '()))
(add-method initialize (method ((<object> _)) (void))))
(define (make class . args)
(let ([obj ((class-constructor class))])
(apply initialize obj args)
... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/modules/oo/misc.scm | scheme | we don't need a type-of-hook because objects are records and hence
the existing record hook is sufficient
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the Lic... | (define <object>)
(define-generic initialize)
(define (initialize-classes)
(set! <object> (make-class-helper '<object> 'sisc.oo.object-type '() '()))
(add-method initialize (method ((<object> _)) (void))))
(define (make class . args)
(let ([obj ((class-constructor class))])
(apply initialize obj args)
... |
39788ab794b0b82d8fe0cb1dc5f90e7f56e03f4606bf2ed75c56751bc79e35b7 | fcracker79/aws-lambda-haskell-url-shortener | URLGenerator.hs | module URLGenerator
( allocateURL
, getURL) where
import KeyGenerator
import DynamoDB
import Data.HashMap.Strict
import Network.AWS.DynamoDB
import Control.Lens
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.AWS
import Control.Monad.Catch
import Control.Monad.IO.Unlift
import Dat... | null | https://raw.githubusercontent.com/fcracker79/aws-lambda-haskell-url-shortener/3c1692a10ab5f92bfd31070c15ac663edd88fa2a/src/URLGenerator.hs | haskell | module URLGenerator
( allocateURL
, getURL) where
import KeyGenerator
import DynamoDB
import Data.HashMap.Strict
import Network.AWS.DynamoDB
import Control.Lens
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.AWS
import Control.Monad.Catch
import Control.Monad.IO.Unlift
import Dat... | |
6505ca1ca7779dbf3b45cc12f7935b668575b9f5135c06c5dbd69e87e7af3ec7 | c4-project/c4f | storelike.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz_actions/test/storelike.mli | ocaml | * Test helpers for storelike action tests
* [prepare_fuzzer_state] populates the fuzzer state with some test data. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
41640e0bdb3ca2b83ed9075eb3770b9599f4828c7b203c5a8eafa07615f86583 | TyOverby/mono | interfaces_tests.ml | (* Typechecking this code is a compile-time check that the specific interfaces have not
drifted apart from each other. *)
open Base
module _ : sig
open Set
type ('a, 'b) t
include
Accessors2
with type ('a, 'b) t := ('a, 'b) t
with type ('a, 'b) tree := ('a, 'b) Set.Using_comparator.Tree.t
w... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/test/interfaces_tests.ml | ocaml | Typechecking this code is a compile-time check that the specific interfaces have not
drifted apart from each other. |
open Base
module _ : sig
open Set
type ('a, 'b) t
include
Accessors2
with type ('a, 'b) t := ('a, 'b) t
with type ('a, 'b) tree := ('a, 'b) Set.Using_comparator.Tree.t
with type ('a, 'b) named := ('a, 'b) Set.Named.t
include
Creators_generic
with type ('a, 'b, 'c) options := ('a, 'b... |
d1a562d7bbcd96534ba021ca80e7b82bde6ad757c6f2c6e8de1f541640c13cbd | blindglobe/clocc | symbols.lisp | ;;; based on v1.7 -*- mode: lisp -*-
(in-package :cl-user)
(check-for-bug :symbols-legacy-4
(symbol-name (quote xyz))
"XYZ")
(check-for-bug :symbols-legacy-8
(let ((*gensym-counter* 32))
(gensym)
(prin1-to-string (gensym "FOO-")))
"#:FOO-33")
(check-for-bug :symbols-legacy-14
(let ((*gensym-counter... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/tools/ansi-test/symbols.lisp | lisp | based on v1.7 -*- mode: lisp -*-
check the symbols in the COMMON-LISP package | (in-package :cl-user)
(check-for-bug :symbols-legacy-4
(symbol-name (quote xyz))
"XYZ")
(check-for-bug :symbols-legacy-8
(let ((*gensym-counter* 32))
(gensym)
(prin1-to-string (gensym "FOO-")))
"#:FOO-33")
(check-for-bug :symbols-legacy-14
(let ((*gensym-counter* 32))
(gensym)
(prin1-to-str... |
0e0d32fedae37171a0d0699c2e30335d0e673ee609985453933fe791116a983d | coalton-lang/coalton | diff.lisp | (cl:in-package #:small-coalton-programs)
;;;; This program computes symbolic derivatives of simple
;;;; expressions. It uses a new Symbol data type for demonstration
;;;; purposes.
(coalton-toplevel
(define-type Symbol
(Symbol String))
(define (symbol-name sym)
(match sym
((Symbol s) s)))
(defin... | null | https://raw.githubusercontent.com/coalton-lang/coalton/803475823391d8e5a6f6886b68f168557ebea325/examples/small-coalton-programs/src/diff.lisp | lisp | This program computes symbolic derivatives of simple
expressions. It uses a new Symbol data type for demonstration
purposes. | (cl:in-package #:small-coalton-programs)
(coalton-toplevel
(define-type Symbol
(Symbol String))
(define (symbol-name sym)
(match sym
((Symbol s) s)))
(define-instance (Eq Symbol)
(define (== a b)
(== (symbol-name a) (symbol-name b))))
(define-type Expr
(EConst Integer)
(EV... |
7f7035df75e472b84d15d3d06d6c84c312ae323b8e43e13f7a4abad6fb1944a3 | acieroid/pcesk | store.ml | open Address
open Lattice
(* The store binds addresses to (possibly multiple) abstract values, stored
* inside a lattice *)
module type STORE =
functor (Addr : ADDRESS) ->
functor (Lattice : LATTICE) -> sig
type content = Lattice.t
type t
(* The empty store *)
val empty : t
(* Lookup a value... | null | https://raw.githubusercontent.com/acieroid/pcesk/f5bd9b6ad00b5d3753c79621f53825cb0e6cc3f5/store/store.ml | ocaml | The store binds addresses to (possibly multiple) abstract values, stored
* inside a lattice
The empty store
Lookup a value at an address in the store and return it.
Raise a Not_found exception if it does not exists
Add a new value into the store
Update a value from the store. Raise Not_found if nothing... | open Address
open Lattice
module type STORE =
functor (Addr : ADDRESS) ->
functor (Lattice : LATTICE) -> sig
type content = Lattice.t
type t
val empty : t
val lookup : t -> Addr.t -> content
val alloc : t -> Addr.t -> content -> t
val update : t -> Addr.t -> content -> t
Join two sto... |
714925d14b15eb3172835465545244a528ee1d3b6f46d9ca1909a36915412bf3 | backtracking/cfrac | cfrac.mli | (**************************************************************************)
(* *)
Copyright ( C )
(* *)
(* This software is free software;... | null | https://raw.githubusercontent.com/backtracking/cfrac/89900c62bb441bbb0d16f5c44bd5b8d2c5c8a6f4/cfrac.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C )
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
* Classical Continued Fractions .
This module implements classical continued fractions , which means
it... |
74f8c17fe323a8787ee417e6e211a17b60d95d709a88f6b187332dcb426124f2 | aeternity/aeternity | aecore_sup.erl | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%=============================================================================
2018 , Aeternity Anstalt
%%% @doc
%%% Supervisor for the core application
%%%
%%% Full supervision tree is
%%%```
aecore_sup
%%% (one_for_one)
%%% |
%%% ... | null | https://raw.githubusercontent.com/aeternity/aeternity/b3ac8399e94f8c5e4b756dbfc89402a70b86c3e5/apps/aecore/src/aecore_sup.erl | erlang | -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
=============================================================================
@doc
Supervisor for the core application
Full supervision tree is
```
(one_for_one)
|
-----------------------------------------
| ... | 2018 , Aeternity Anstalt
aecore_sup
| aec_metrics aec_keys aec_tx_pool |
-module(aecore_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-include("blocks.hrl").
-define(SERVER, ?MODULE).
-define(CHILD(Mod,N,Type), {Mod,{Mod,start_link,[]},permanent,N,Type,[M... |
6e2544df20043a43d2397f0c91b4d1a43a586a96f7d594988e36c167951acf0d | gonimo/gonimo | Impl.hs | {-# LANGUAGE RecursiveDo #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Gonimo.Client.Subscriber.Impl ( module Gonimo.Client.Subscriber
, Model (..)
, HasModel
, _server
... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/Subscriber/Impl.hs | haskell | # LANGUAGE RecursiveDo #
| Constraint on needed dependencies.
| Constraint for our return value.
Auto generated lenses:
Lenses for Model t: | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Gonimo.Client.Subscriber.Impl ( module Gonimo.Client.Subscriber
, Model (..)
, HasModel
, _server
, _auth
... |
2bd2a252c4897ba1078a1c00b71c544a14caea563a32e1d309ddb9705cb259cf | quoll/kiara | core_schema.clj | (ns kiara.core-schema
"Contains core schema for storing RDF in Datomic"
(:require [datomic.api :refer [q] :as d]
[datomic.function :as dfn])
(:import [java.util Date UUID]
[java.net URI]
[java.math BigDecimal BigInteger]
[datomic Peer]))
(def type-attributes
"Maps d... | null | https://raw.githubusercontent.com/quoll/kiara/a6598ef0cebe83afcca3b1c6f23eb8a857f6eda1/src/kiara/core_schema.clj | clojure | (ns kiara.core-schema
"Contains core schema for storing RDF in Datomic"
(:require [datomic.api :refer [q] :as d]
[datomic.function :as dfn])
(:import [java.util Date UUID]
[java.net URI]
[java.math BigDecimal BigInteger]
[datomic Peer]))
(def type-attributes
"Maps d... | |
0d5d1268b79d28491b92149567d863ab2ab54b7188920bbc6ed4c9e3e3aeaebd | ghcjs/ghcjs-dom | HTMLLabelElement.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.HTMLLabelElement
(js_getForm, getForm, js_setHtmlFor, setHtmlFor, js_getHtmlFor,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLLabelElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.HTMLLabelElement
(js_getForm, getForm, js_setHtmlFor, setHtmlFor, js_getHtmlFor,
getHtmlFor, js_getControl, getControl, HTMLLabelElement(..),
gTypeHTMLLabelElement)
... |
792a266c865e267d6a359236b8fc8e933978f325dda1964684709633c707526a | haskoin/secp256k1-haskell | Internal.hs | |
Module : Crypto . Secp256k1.Internal
License : UNLICENSE
Maintainer : < >
Stability : experimental
Portability : POSIX
The API for this module may change at any time . This is an internal module only
exposed for hacking and experimentation .
Module : Crypto.Secp256k1.Interna... | null | https://raw.githubusercontent.com/haskoin/secp256k1-haskell/09ee105f450e836350d943cbbe215889a65dce57/src/Crypto/Secp256k1/Internal.hs | haskell | ^ message, data
^ data
^ message, data
^ data
^ encoded public key array
^ size of encoded public key array
^ array for encoded public key, must be large enough
^ size of encoded public key, will be updated
^ size of encoded signature
^ array for encoded signature, must be large enough
^ size of encoded sign... | |
Module : Crypto . Secp256k1.Internal
License : UNLICENSE
Maintainer : < >
Stability : experimental
Portability : POSIX
The API for this module may change at any time . This is an internal module only
exposed for hacking and experimentation .
Module : Crypto.Secp256k1.Interna... |
bb486900404ace056de51f87eb6e5d83cd039bc236b672451949460bfc46d6d0 | janestreet/learn-ocaml-workshop | import.ml | open! Base
(* this is hard-coded so that we can refer to in in a few places in the code *)
let pixels_per_square = 28
| null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-lumines/lib/import.ml | ocaml | this is hard-coded so that we can refer to in in a few places in the code | open! Base
let pixels_per_square = 28
|
153af09fdf142e73fb9cb8517e1eab448cae4d36f9ba1131d9d08fe86c716f85 | esl/MongooseIM | mod_shared_roster_ldap.erl | %%%-------------------------------------------------------------------
File :
%%% Author : Realloc <>
< >
< >
%%% Description : LDAP shared roster management
Created : 5 Mar 2005 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2013 ProcessOne
%%%
%%% This program is fr... | null | https://raw.githubusercontent.com/esl/MongooseIM/dda03c16c83f5ea9f5c9b87c3b36c989813b9250/src/mod_shared_roster_ldap.erl | erlang | -------------------------------------------------------------------
Author : Realloc <>
Description : LDAP shared roster management
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but... | File :
< >
< >
Created : 5 Mar 2005 by < >
ejabberd , Copyright ( C ) 2002 - 2013 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GN... |
199bbcd08ef4c522df7bb5206c97ea6f7876ade93aacf1134b391d744657fac4 | LexiFi/menhir | Drop.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/Drop.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
7fbd11d2e88c5d14fc51d242dd073ba973b7c24c751660d67be09bc43ac30ff1 | chessai/freq | Main.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Monad (forever)
import Data.ByteString (ByteString)
import Data.Char (ord)
import Data.Word (Word8)
import Freq
import Hedgehog
import qualified Data.ByteString as B
import qualified Hedgehog.Gen as Gen
import qua... | null | https://raw.githubusercontent.com/chessai/freq/cb92881f923f43c3caf69cfa9dd9c162ea1f321c/test/Main.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings # |
module Main (main) where
import Control.Monad (forever)
import Data.ByteString (ByteString)
import Data.Char (ord)
import Data.Word (Word8)
import Freq
import Hedgehog
import qualified Data.ByteString as B
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import qualified Data.List as List... |
24b264ad0f3e97a2b8d0e96ae43dd2b3951af341dfeaf5e5a3d7184a2ef39ac6 | gelisam/objc2java | Extract.hs | -- | Primitive combinators from which more complex extractors can be built.
module Data.Extract where
import Prelude (Eq, Bool (..), Maybe (..), ($), fmap, curry)
import qualified Prelude (fst, snd)
import Control.Category ((.))
import Control.Isomorphism.Partial.Constructors (just, cons)
import Control.Isomorphism.P... | null | https://raw.githubusercontent.com/gelisam/objc2java/1fb19b3b46c1aed9a099a48911c104848baf12b9/src/Data/Extract.hs | haskell | | Primitive combinators from which more complex extractors can be built.
$setup
>>> let extract_head = Extract $ inverse cons
| An extractor, which invertibly extracts a value of type @a@ out of an
environment of type @e@.
True
| Extract a value out of the environment.
>>> extract extract_head [1,2,3]
Ju... | module Data.Extract where
import Prelude (Eq, Bool (..), Maybe (..), ($), fmap, curry)
import qualified Prelude (fst, snd)
import Control.Category ((.))
import Control.Isomorphism.Partial.Constructors (just, cons)
import Control.Isomorphism.Partial.Prim
import Text.Syntax.Classes (ProductFunctor (..))
import Control... |
9714dcec258c132fa7bd49e77e56863bd061927a328a3779b591a83f8a227224 | gar1t/erlang-cli | sample_cli.erl | -module(sample_cli).
-export([main/1]).
main(Args) ->
Parser = sample_parser(),
handle_parsed(cli:parse_args(Args, Parser)).
handle_parsed({{ok, print_help}, P}) ->
cli:print_help(P);
handle_parsed({{ok, print_version}, P}) ->
cli:print_version(P);
handle_parsed({{ok, Parsed}, _P}) ->
handle_args... | null | https://raw.githubusercontent.com/gar1t/erlang-cli/4f2b097c43a6959f842969c036e2816e8626fabb/src/sample_cli.erl | erlang | -module(sample_cli).
-export([main/1]).
main(Args) ->
Parser = sample_parser(),
handle_parsed(cli:parse_args(Args, Parser)).
handle_parsed({{ok, print_help}, P}) ->
cli:print_help(P);
handle_parsed({{ok, print_version}, P}) ->
cli:print_version(P);
handle_parsed({{ok, Parsed}, _P}) ->
handle_args... | |
0ca3f2184631cf699a0de9296e4a99b3ad7e162bc4ffb257ed0ce6436b88f974 | roosta/herb | container.cljs | (ns site.components.container
(:require [herb.core :refer [<class]]
[garden.units :refer [rem em px]]
[reagent.core :as r]))
(defn container-style
[]
^{:media {{:screen :only :min-width (em 32)} {:width (rem 33)}
{:screen :only :min-width (em 52)} {:width (rem 53)}}}
{:margi... | null | https://raw.githubusercontent.com/roosta/herb/64afb133a7bf51d7171a3c5260584c09dbe4e504/site/src/site/components/container.cljs | clojure | (ns site.components.container
(:require [herb.core :refer [<class]]
[garden.units :refer [rem em px]]
[reagent.core :as r]))
(defn container-style
[]
^{:media {{:screen :only :min-width (em 32)} {:width (rem 33)}
{:screen :only :min-width (em 52)} {:width (rem 53)}}}
{:margi... | |
3cd4e55c370d87b94407cd0e9b64d170e3e985e7f098dbba99e5cc90a21ee734 | aroemers/mount-lite | common_deps.clj | (ns mount.extensions.common-deps
"A namespace used by graph-related extensions, such as explicit-deps
and namespace-deps."
(:require [mount.lite :as mount]
[mount.utils :as utils]))
(defn- transitive
"Given a graph and a node, returns all the transitive nodes."
[graph node]
(loop [unexpanded (g... | null | https://raw.githubusercontent.com/aroemers/mount-lite/f75a4592c256e1d97b79458a342acc9754270622/src/mount/extensions/common_deps.clj | clojure | (ns mount.extensions.common-deps
"A namespace used by graph-related extensions, such as explicit-deps
and namespace-deps."
(:require [mount.lite :as mount]
[mount.utils :as utils]))
(defn- transitive
"Given a graph and a node, returns all the transitive nodes."
[graph node]
(loop [unexpanded (g... | |
ffb8527fb11085450c63bb3b7ae2091b4067c79533efa5aed15c16469e865442 | zotonic/zotonic | z_datetime.erl | @author < >
2009 - 2022
%% @doc Utility functions for datetime handling and representation.
Copyright 2009 - 2022
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%%... | null | https://raw.githubusercontent.com/zotonic/zotonic/4c158e4f7b80784058cabff186cfd7a3dcc7005a/apps/zotonic_core/src/support/z_datetime.erl | erlang | @doc Utility functions for datetime handling and representation.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or ... | @author < >
2009 - 2022
Copyright 2009 - 2022
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_datetime).
-author("Marc Worrell <").
-export([
format/2,
format/3,
format_utc/2,
forma... |
9fbf4d41045da51ed9d7daaa6ad6e8ce165ce5e63c6b6374e019d15c52b61cc0 | byteally/dbrecord | Schema.hs | # OPTIONS_GHC -Wno - dodgy - exports #
module DBRecord.Schema
( DbK (..)
, Col (..)
, col
, Database (..)
, Table (..)
, Schema (..)
, UDType (..)
, module DBRecord.Internal.DBTypeValidation
, tabName
, def
, end
, dbDefaults
, c... | null | https://raw.githubusercontent.com/byteally/dbrecord/991efe9a293532ee9242b3e9a26434cf16f5b2a0/dbrecord/src/DBRecord/Schema.hs | haskell | # OPTIONS_GHC -Wno - dodgy - exports #
module DBRecord.Schema
( DbK (..)
, Col (..)
, col
, Database (..)
, Table (..)
, Schema (..)
, UDType (..)
, module DBRecord.Internal.DBTypeValidation
, tabName
, def
, end
, dbDefaults
, c... | |
9bd32e1ac1f0f04e06466e9aa78a5c72bd5f049751d0bda2a2dd8c9363fac47b | sgbj/MaximaSharp | affine.lisp | (in-package :maxima)
(load (combine-path *maxima-sharedir* "affine" "affine.system"))
(mk:compile-system "affine" :load-source-if-no-binary t)
;;; affine.lisp ends here
| null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/affine/affine.lisp | lisp | affine.lisp ends here | (in-package :maxima)
(load (combine-path *maxima-sharedir* "affine" "affine.system"))
(mk:compile-system "affine" :load-source-if-no-binary t)
|
50bbbc97980fffa8c74e4615d5dd0c6419082a32bae351d076592c94aa78d1a8 | namenu/advent-of-code | day21.clj | (ns aoc.year2018.day21
(:refer-clojure :exclude [load])
(:require [clojure.java.io :as io]
[aoc.year2018.device :refer :all]))
(def input (->> (-> "year2018/day21.in" io/resource slurp)))
(defn part1 []
(loop [m (input->device input)]
(if (= (:ip m) 28)
(:registers m)
(recur (exec m... | null | https://raw.githubusercontent.com/namenu/advent-of-code/83f8cf05931f814dab76696bf46fec1bb1276fac/2018/clojure/src/aoc/year2018/day21.clj | clojure | (ns aoc.year2018.day21
(:refer-clojure :exclude [load])
(:require [clojure.java.io :as io]
[aoc.year2018.device :refer :all]))
(def input (->> (-> "year2018/day21.in" io/resource slurp)))
(defn part1 []
(loop [m (input->device input)]
(if (= (:ip m) 28)
(:registers m)
(recur (exec m... | |
f45468c7848daa0a1b23b3f95e37a5846993ccd9915abc892b682e03b9d5ea01 | input-output-hk/plutus | THReader.hs | # LANGUAGE TemplateHaskell #
module Data.Aeson.THReader where
import Data.Aeson
import Language.Haskell.TH.Syntax
import Language.Haskell.TH.Syntax.Compat
import TH.RelativePaths
readJSONFromFile :: (FromJSON a, Lift a) => String -> SpliceQ a
readJSONFromFile name = liftSplice $ do
contents <- qReadFileLBS name
... | null | https://raw.githubusercontent.com/input-output-hk/plutus/9ec9cb8d17dc5cced88fff7256e5cb601f39af2c/plutus-core/plutus-core/src/Data/Aeson/THReader.hs | haskell | # LANGUAGE TemplateHaskell #
module Data.Aeson.THReader where
import Data.Aeson
import Language.Haskell.TH.Syntax
import Language.Haskell.TH.Syntax.Compat
import TH.RelativePaths
readJSONFromFile :: (FromJSON a, Lift a) => String -> SpliceQ a
readJSONFromFile name = liftSplice $ do
contents <- qReadFileLBS name
... | |
2edcdbba06b54b80daf6ba3d44ae31321acfc7a6079f6cc435c406917c69bf60 | TorXakis/TorXakis | TestHelperFuncContent.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/behave/test/TestHelperFuncContent.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------
Helper Functions
-------------------------------------------------------------------------
different length
different
Set would be better -> Position in list is irrelevant
IsConst... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module TestHelperFuncContent
where
impo... |
9300978dfc3addadbd2625110089bc4e8dd14d0285e725cdd1fb8891885a79d4 | pmai/sha3 | common.lisp | SHA3 --- Secure Hash Algorithm 3 ( Keccak ) Implementation
;;;;
Copyright ( C ) 2012 -- 2018 PMSF IT Consulting .
;;;;
;;;; 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... | null | https://raw.githubusercontent.com/pmai/sha3/92e0e0b916502085932e15a27525922135d9d065/common.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED,... | SHA3 --- Secure Hash Algorithm 3 ( Keccak ) Implementation
Copyright ( C ) 2012 -- 2018 PMSF IT Consulting .
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do ... |
c0aa1d11a15c2763880aec34ecf0353c6931e67c93bde5f729b5d42d3007096a | cedlemo/OCaml-GI-ctypes-bindings-generator | License.ml | open Ctypes
open Foreign
type t = Unknown | Custom | Gpl_2_0 | Gpl_3_0 | Lgpl_2_1 | Lgpl_3_0 | Bsd | Mit_x11 | Artistic | Gpl_2_0_only | Gpl_3_0_only | Lgpl_2_1_only | Lgpl_3_0_only | Agpl_3_0 | Agpl_3_0_only
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Unknown
else if v = Unsigned.UInt32.of_int 1 then C... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/License.ml | ocaml | open Ctypes
open Foreign
type t = Unknown | Custom | Gpl_2_0 | Gpl_3_0 | Lgpl_2_1 | Lgpl_3_0 | Bsd | Mit_x11 | Artistic | Gpl_2_0_only | Gpl_3_0_only | Lgpl_2_1_only | Lgpl_3_0_only | Agpl_3_0 | Agpl_3_0_only
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Unknown
else if v = Unsigned.UInt32.of_int 1 then C... | |
afeee1e8736d3da7611b9784cce40b58376696e1933f2af49a37db91051518b3 | mithrandi/ssh-key-generator | Types.hs | module SSH.Types
( getWord32be'
, putWord32be'
, getString
, putString
, runStrictGet
, runStrictPut
) where
import Control.Applicative ((<$>))
import Data.Binary.Get (Get, getWord32be, getByteString, runGet)
import Data.Binary.Put (Put, pu... | null | https://raw.githubusercontent.com/mithrandi/ssh-key-generator/23e6c26f5c2b4b368c78ff3901e39ca626911978/SSH/Types.hs | haskell | module SSH.Types
( getWord32be'
, putWord32be'
, getString
, putString
, runStrictGet
, runStrictPut
) where
import Control.Applicative ((<$>))
import Data.Binary.Get (Get, getWord32be, getByteString, runGet)
import Data.Binary.Put (Put, pu... | |
0410f9c4e8db24fb46588c7f98ae5cee56883f5cfacd0c619a0131000f19b93a | binaryage/chromex | proxy.clj | (ns chromex.app.proxy
"Use the chrome.proxy API to manage Chrome's proxy settings. This API relies on the ChromeSetting prototype of the type API
for getting and setting the proxy configuration.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/proxy.clj | clojure | -- properties -------------------------------------------------------------------------------------------------------------
-- events -----------------------------------------------------------------------------------------------------------------
docs: /#tapping-events
-- convenience -----------------------------... | (ns chromex.app.proxy
"Use the chrome.proxy API to manage Chrome's proxy settings. This API relies on the ChromeSetting prototype of the type API
for getting and setting the proxy configuration.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:... |
311f31a1b3f1bff83ce10c2b5128cc800ed5f74cf769996c1ae600ab42a1865d | fpco/stackage-server | Diff.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ViewPatterns #
module Stackage.Snapshot.Diff
( getSnapshotDiff
, snapshotDiff
, SnapshotDiff()
, toDiffList
, toVersionedDiffList
, VersionChange(..)
, WithSnapshotNames(.... | null | https://raw.githubusercontent.com/fpco/stackage-server/b707b5a0d72c44a3134a305b628c3f0b28db2697/src/Stackage/Snapshot/Diff.hs | haskell | | Versions of a package as it occurs in the listings provided to `snapshotDiff`.
Would be represented with `These v1 v2` if the package is present in both listings, | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ViewPatterns #
module Stackage.Snapshot.Diff
( getSnapshotDiff
, snapshotDiff
, SnapshotDiff()
, toDiffList
, toVersionedDiffList
, VersionChange(..)
, WithSnapshotNames(.... |
4cef1e1df83007d71d2bc12931e595344c954077140d90e3fe6933d354fd472f | RefactoringTools/HaRe | C2.hs | module LiftToToplevel.C2 (module LiftToToplevel.D2, module LiftToToplevel.C2) where
import LiftToToplevel.D2
anotherFun (x:xs) = x^4 + anotherFun xs
anotherFun [] = 0
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftToToplevel/C2.hs | haskell | module LiftToToplevel.C2 (module LiftToToplevel.D2, module LiftToToplevel.C2) where
import LiftToToplevel.D2
anotherFun (x:xs) = x^4 + anotherFun xs
anotherFun [] = 0
| |
f548ddca5a8d016617f748f59ed62f242b853ab7e2cbd52477a74d9492977d89 | shayne-fletcher/zen | id_of_test.ml | type t = A [@id 2] | B of int [@id 4] [@@id_of]
module M = struct
type t =
| Foo of int [@id 42]
| Bar [@id 43] [@@id_of]
module N = struct
type t = Baz [@id 8] | Quux of string * int [@id 7] [@@id_of]
module Q = struct
type t = U [@id 0] [@@id_of]
end
end
end
let _ = Printf.printf "Id o... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/ppx_id_of/v2/app/id_of_test.ml | ocaml | type t = A [@id 2] | B of int [@id 4] [@@id_of]
module M = struct
type t =
| Foo of int [@id 42]
| Bar [@id 43] [@@id_of]
module N = struct
type t = Baz [@id 8] | Quux of string * int [@id 7] [@@id_of]
module Q = struct
type t = U [@id 0] [@@id_of]
end
end
end
let _ = Printf.printf "Id o... | |
0eb9361942e1671af1ccacfd19feaf0a6398c7b1bcd3395259f7548374b93da4 | ernw/ss7MAPer | ss7MAPer_sup.erl | -module(ss7MAPer_sup).
-author('Daniel Mende <>').
-behaviour(supervisor).
%% API
-export([start_link/1]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
~ -define(CHILD(I , Type ) , { I , { I , start_link , [ ] } , permanent , 5000 , Type , [ I ] } ) .
%% =========... | null | https://raw.githubusercontent.com/ernw/ss7MAPer/5f9e784380b0fcb4fc85c96aab3161890388b443/src/ss7MAPer_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | -module(ss7MAPer_sup).
-author('Daniel Mende <>').
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
~ -define(CHILD(I , Type ) , { I , { I , start_link , [ ] } , permanent , 5000 , Type , [ I ] } ) .
start_link(Configfile) ->
supervisor:start_link(?MODULE, [Configfile]).
init(Configfile) ... |
be4e12fb98e1d1485855f96578e4499489556d5a750898fb41ad2efe515870dd | michaelw/cl-dot | list-example-old.lisp | (in-package cl-dot)
Conses
(defmethod object-node ((object cons))
(make-instance 'node :attributes (list :label "cell \\N"
:shape :box)))
(defmethod object-points-to ((object cons))
(list (car object)
(make-instance 'attributed
:object (cdr... | null | https://raw.githubusercontent.com/michaelw/cl-dot/d32808109952faf8e4d342c0ff4f5a2587b315cb/examples/list-example-old.lisp | lisp | Symbols | (in-package cl-dot)
Conses
(defmethod object-node ((object cons))
(make-instance 'node :attributes (list :label "cell \\N"
:shape :box)))
(defmethod object-points-to ((object cons))
(list (car object)
(make-instance 'attributed
:object (cdr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.