_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 |
|---|---|---|---|---|---|---|---|---|
52682d1e4c1829e3e46d36781a8cc35fa157a1f7770a6f8c3f35105103d51f20 | hemmi/coq2scala | himsg.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/toplevel/himsg.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
let pe = pr_ne_context_of (str "in... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Flags
... |
45b3b52ceb8816f86e1aca816b2722ea1e59c4b1dc9cc212385438925128dd09 | bluelisp/hemlock | interp.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
;;;
;;; ******************************************... | null | https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/interp.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
**********************************************************************
**********************************************************************
This file contains the routines which define hemlock commands and
the command interpreter.
defined in echo.lisp --amb
Key T... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
Written by and .
(in-package :hemlock-internals)
(defun %print-hcommand (obj stream depth)
(declare (ignore depth))
(write-string "#<Hemlock Command \"" stream)
(wri... |
ab26b3d51b6403c2cc79fa4a74cead24c1ee36d756da71fefe908c34fecba468 | senapk/funcional_arcade | 08_cmd.hs | import Data.List ( intercalate )
import Text.Printf ( printf )
process :: String -> String
process line
| cmd == "sum" = show $ int a + int b
| cmd == "half" = fmt2 $ float a / 2
| otherwise = "comando invalido"
where
xs = words line
cmd = head xs
int value = read value :: I... | null | https://raw.githubusercontent.com/senapk/funcional_arcade/9f0ff1a13adb46b7353f9b2e11e653160fbdcf9d/base/500/08_cmd.hs | haskell | import Data.List ( intercalate )
import Text.Printf ( printf )
process :: String -> String
process line
| cmd == "sum" = show $ int a + int b
| cmd == "half" = fmt2 $ float a / 2
| otherwise = "comando invalido"
where
xs = words line
cmd = head xs
int value = read value :: I... | |
9378d77391ea7cd8f6d6abfabf983b6f3ce0313d0e81010f04031a04699c8b72 | tweag/capability | Constraints.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeInType #-}
# LANGUAGE TypeOperators #
-- | This module defines helper types and type families for working with sets of
-- capabilities.
module Capability.Constraints
( All
, Capability
... | null | https://raw.githubusercontent.com/tweag/capability/65271a22ff9c173579f889dc033231f80453b185/src/Capability/Constraints.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE TypeInType #
| This module defines helper types and type families for working with sets of
capabilities.
| A 'Capability' takes a type constructor @Type -> Type@ (e.g., a monad) and
| Type family used used to express a conjunction of constraints over a sing... | # LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Capability.Constraints
( All
, Capability
, Constraint
, Dict(..)
) where
import Data.Constraint (Dict(..))
import Data.Kind (Constraint, Type)
returns a ' Constraint ' . Examples of capabilities includ : @HasReader ... |
8f6e9733cde1e251be497b982173d73624499f799fc5c8da8681d9f1e5207b0c | froggey/Mezzano | local.lisp | ;;;; Simple local file system, based on the automatic persistence system.
(defpackage :mezzano.file-system.local
(:export #:add-local-file-host)
(:use #:cl #:mezzano.file-system))
(in-package :mezzano.file-system.local)
(defvar *illegal-characters* ".<>\\/")
(defclass local-file-host (file-system-host)
((%nam... | null | https://raw.githubusercontent.com/froggey/Mezzano/d506e0c3b9efcddd39155bfdd77d9f025c60930b/file/local.lisp | lisp | Simple local file system, based on the automatic persistence system.
Last element is the name/type/version.
Special-case directory pathnames. The default implementation
uses PROBE-FILE, which tries to open the file. It's not possible
Other versions of this file exist, merge with container.
Assumes that no file wi... |
(defpackage :mezzano.file-system.local
(:export #:add-local-file-host)
(:use #:cl #:mezzano.file-system))
(in-package :mezzano.file-system.local)
(defvar *illegal-characters* ".<>\\/")
(defclass local-file-host (file-system-host)
((%name :initarg :name :reader host-name)
(%root :reader local-host-root)
... |
19f94c8aff09549e7dbd6ae14f9026bcb8059ed72cd472eb87dcae7e4a2f1755 | robx/configurator-pg | Configurator.hs | -- |
-- Module: Data.Configurator
-- Description: A configuration file parser
--
-- A simplified library for reading configuration files
-- in the format of [configurator-ng](-ng).
module Data.Configurator
(
-- * Types
Key
, Value(..)
, Config
-- * Low-level parsing
, load
, Pars... | null | https://raw.githubusercontent.com/robx/configurator-pg/05d56d69478b040cbb2ce23ca599385ae043f183/src/Data/Configurator.hs | haskell | |
Module: Data.Configurator
Description: A configuration file parser
A simplified library for reading configuration files
in the format of [configurator-ng](-ng).
* Types
* Low-level parsing
* High-level parsing
** Value parsers
** Configuration parsers |
module Data.Configurator
(
Key
, Value(..)
, Config
, load
, ParseError(..)
, Parser
, runParser
, bool
, int
, string
, value
, list
, optional
, required
, subassocs
) where
import Data.Configurator.Load (load)
import Data.Configurator.Parser
i... |
dfda3f12ae38767e8c1d1280f4131a5b8fe970755aeb024d6ebbd59bc6fac8df | amuletml/amulet | Span.hs | {-# OPTIONS_GHC -funbox-strict-fields #-}
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
-- | Spans, created by the lexer, represent the length and position of a
-- token (indirectly) for use in error reporting. Spans are kept alive
through much of the compiler runtime , up to Core generation .
module Data.S... | null | https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Data/Span.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
# LANGUAGE DeriveDataTypeable, OverloadedStrings #
| Spans, created by the lexer, represent the length and position of a
token (indirectly) for use in error reporting. Spans are kept alive
^ The span from which a token was parsed.
^ What file name this token came from
^ Starti... |
through much of the compiler runtime , up to Core generation .
module Data.Span
( Span(fileName)
, internal
, mkSpan, mkSpanUnsafe, mkSpan1
, spanStart
, spanEnd
, formatSpan
, includes
) where
import Text.Pretty.Semantic (Pretty(..))
import Text.Pretty
import qualified Data.Text as T
import Data.P... |
5542151670729c7a1d66ffc36732afce957c20ab6e5fb2b9fb50b7cc64505756 | tezos/tezos-mirror | skip_list_benchmarks.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/cdc7a4382ef6dfcd6c73f86d9a29b829b33d18d4/src/proto_016_PtMumbai/lib_benchmarks_proto/skip_list_benchmarks.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
9ce8990245e732b7529fbc459fcc3ef61ca90d95d1f1402eb980f329f180cff9 | TheClimateCorporation/mandoline | dataset_test.clj | (ns io.mandoline.dataset-test
(:require
[clojure.test :refer :all]
[io.mandoline.dataset :as dataset]))
Borrowed from , public domain
(defmacro with-private-fns
"Alias private functions from namespace ns into the current namespace, for the
duration of tests."
[[ns fns] & tests]
"Refers private fn... | null | https://raw.githubusercontent.com/TheClimateCorporation/mandoline/fa26162ef0349ecb71be9d27a46652206f5c1b99/test/io/mandoline/dataset_test.clj | clojure | dimensionless vars are valid
supported types
unsupported types
int vs float
missing value | (ns io.mandoline.dataset-test
(:require
[clojure.test :refer :all]
[io.mandoline.dataset :as dataset]))
Borrowed from , public domain
(defmacro with-private-fns
"Alias private functions from namespace ns into the current namespace, for the
duration of tests."
[[ns fns] & tests]
"Refers private fn... |
f46bb20334c021560ff28e9c0d3c280a77f741179cc1fb7dd5457e6144dfa75e | cdaringe/protohacks | cchar.ml | let is_alpha = function 'a' .. 'z' | 'A' .. 'Z' -> true | _ -> false
let is_digit = function '0' .. '9' -> true | _ -> false
let is_alphanum c = is_alpha c || is_digit c
let is_alphanum_str s = s |> String.to_seq |> Seq.for_all is_alphanum
| null | https://raw.githubusercontent.com/cdaringe/protohacks/7882326a955099c6cab44fbfd339ae5ec6bc5e70/lib/cchar/cchar.ml | ocaml | let is_alpha = function 'a' .. 'z' | 'A' .. 'Z' -> true | _ -> false
let is_digit = function '0' .. '9' -> true | _ -> false
let is_alphanum c = is_alpha c || is_digit c
let is_alphanum_str s = s |> String.to_seq |> Seq.for_all is_alphanum
| |
8d3a42e4721e80b1828156be5259bd5cc626fa721d539affeddfbe48f570d5fe | roburio/letsencrypt-unikernel | unikernel.ml | open Lwt.Infix
let argument_error = 64
module Main (R : Mirage_random.S) (S : Mirage_stack.V4V6) (Http_client: Cohttp_lwt.S.Client) (Http: Cohttp_mirage.Server.S) (C: Mirage_clock.PCLOCK) (Time: Mirage_time.S) = struct
let serve cb =
let callback _ request body = cb request body
and conn_closed _ = ()
... | null | https://raw.githubusercontent.com/roburio/letsencrypt-unikernel/3abeb3e7a386e7bdb39cf6b645db6133ac368a67/unikernel.ml | ocaml | open Lwt.Infix
let argument_error = 64
module Main (R : Mirage_random.S) (S : Mirage_stack.V4V6) (Http_client: Cohttp_lwt.S.Client) (Http: Cohttp_mirage.Server.S) (C: Mirage_clock.PCLOCK) (Time: Mirage_time.S) = struct
let serve cb =
let callback _ request body = cb request body
and conn_closed _ = ()
... | |
6d77fb54dc58a176b8fd5e31b2ffcd98a7dd8abf6c5a8fcd9869161d60cb4287 | Bannerets/camlproto | TestParser.ml | open Parser
let p str = match parse_string str with
| Ok ast -> print_endline @@ Ast.show ast
| Error e -> prerr_endline @@ Err.Parse.show e
let%expect_test "empty file" =
p "";
[%expect {| { constructors = []; functions = [] } |}]
let%expect_test "sections: ---types--- and ---functions---" =
p "
a = A;
--... | null | https://raw.githubusercontent.com/Bannerets/camlproto/de41d876e00d69598dd20ca8953eda17ce999332/src/tl/lib/TestParser.ml | ocaml | TODO:
TODO: | open Parser
let p str = match parse_string str with
| Ok ast -> print_endline @@ Ast.show ast
| Error e -> prerr_endline @@ Err.Parse.show e
let%expect_test "empty file" =
p "";
[%expect {| { constructors = []; functions = [] } |}]
let%expect_test "sections: ---types--- and ---functions---" =
p "
a = A;
--... |
d6f05fce0be1c2dfaea9adba7932b36dd4595a860ca9e26e922af25f7833b4f2 | candera/vmt | repl-server-task.clj | ;; In a separate file because we can't even try to load this if the
version of Clojure is less than 1.8
(defn repl-server-accept
"Override the default so we land in the boot.user namespace instead
of the default (user)."
[]
(clojure.main/repl
:init (fn []
(let [init-ns-sym (or (get-env :repl-se... | null | https://raw.githubusercontent.com/candera/vmt/8cf450e6c34af87d748152afd7f547b92ae9b38e/tools/repl-server-task.clj | clojure | In a separate file because we can't even try to load this if the | version of Clojure is less than 1.8
(defn repl-server-accept
"Override the default so we land in the boot.user namespace instead
of the default (user)."
[]
(clojure.main/repl
:init (fn []
(let [init-ns-sym (or (get-env :repl-server-init-ns) 'boot.user)]
(require init-ns-sym)
... |
bae0e989632bad23d5aa2e1e8c2db0a3259386b3f1013627cb152549a3573992 | tonyg/pi-nothing | install.rkt | #lang racket/base
(provide pre-installer)
(require racket/system)
(define (pre-installer collections-top-path nothingc-path)
(parameterize ((current-directory (build-path nothingc-path "private")))
(system "make")))
| null | https://raw.githubusercontent.com/tonyg/pi-nothing/4b2b59d42babd72cfd007cb71ed295dcdbf53d4a/nothingc/private/install.rkt | racket | #lang racket/base
(provide pre-installer)
(require racket/system)
(define (pre-installer collections-top-path nothingc-path)
(parameterize ((current-directory (build-path nothingc-path "private")))
(system "make")))
| |
04e46ce48bb95f2ec1e5a0f504b69b3201611b2c14fcdf7a67ce0ba6fa42ef0d | NetComposer/nksip | nksip_timers_plugin.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/plugins/nksip_timers_plugin.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nksip_timers_plugin)... |
767bd6e83b520986d6ea9ca9692d366aa5836c4f153d534583004ac1d117a854 | Toxaris/pts | Substitution.hs | module PTS.Syntax.Substitution
( subst
-- , typedSubst
, freshCommonVar
) where
import Data.Set (Set)
import qualified Data.Set as Set
import PTS.Syntax.Algebra
import PTS.Syntax.Names
import PTS.Syntax.Term
import PTS.Dynamics.TypedTerm
-- substitution (generates fresh variables if needed to prevent accide... | null | https://raw.githubusercontent.com/Toxaris/pts/1700024f47bc9d28528b68fc815d2421f5d25b84/src-lib/PTS/Syntax/Substitution.hs | haskell | , typedSubst
substitution (generates fresh variables if needed to prevent accidental capture)
typedAvoidCapture s x xt y t = (x', s') where
x' | x `Set.member` fvt = freshvarl fv x
| otherwise = x
s' | x == x' = s
delete pos annotation here?
typedSubst t x t' = case structure t of
Int i ... | module PTS.Syntax.Substitution
( subst
, freshCommonVar
) where
import Data.Set (Set)
import qualified Data.Set as Set
import PTS.Syntax.Algebra
import PTS.Syntax.Names
import PTS.Syntax.Term
import PTS.Dynamics.TypedTerm
typedAvoidCapture : : TypedTerm m - > Name - > Value m - > Name - > TypedTerm m - > (... |
1e0f597dab49a8f093acc3b7c32849f0b13761bf4f93204fffacadd5a18cc53a | LeventErkok/sbv | QRem.hs | -----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Basics.QRem
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
-- Test suite for Examples.Basics.QRem
------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Basics/QRem.hs | haskell | ---------------------------------------------------------------------------
|
Module : TestSuite.Basics.QRem
License : BSD3
Maintainer:
Stability : experimental
Test suite for Examples.Basics.QRem
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
che... | Copyright : ( c )
module TestSuite.Basics.QRem(tests) where
import Utils.SBVTestFramework
tests :: TestTree
tests =
testGroup "Basics.QRem"
[ testCase "qremW8" (assertIsThm (qrem :: SWord8 -> SWord8 -> SBool))
, testCase "qremI8" (assertIsThm (qrem :: SInt8 -> SInt8 -> SBool))
, testCase... |
640a4c19536f33d7e8f4fe4aca7c63cc5916bb246a63cc62110ed2a0f7753837 | mirage/mirage | mirage_impl_misc.ml | open Functoria
open Astring
open Action.Syntax
let src = Logs.Src.create "mirage" ~doc:"mirage cli tool"
module Log = (val Logs.src_log src : Logs.LOG)
let get_target i = Mirage_key.(get (Functoria.Info.context i) target)
let connect_err name number =
Fmt.str "The %s connect expects exactly %d argument%s" name nu... | null | https://raw.githubusercontent.com/mirage/mirage/377ffb09477594bd960a7c09149207db53c43386/lib/mirage/impl/mirage_impl_misc.ml | ocaml | open Functoria
open Astring
open Action.Syntax
let src = Logs.Src.create "mirage" ~doc:"mirage cli tool"
module Log = (val Logs.src_log src : Logs.LOG)
let get_target i = Mirage_key.(get (Functoria.Info.context i) target)
let connect_err name number =
Fmt.str "The %s connect expects exactly %d argument%s" name nu... | |
4d31d0c46c55df4ceb22f8082d155fc70b3378b202d0fbfba3cd36f74221d4aa | binsec/haunted | taint.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/ai/domains/taint.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
4588685ebfc5ff94b3332eeb6c94cacb7da98ae28d7edeb208c3a97b4f9c9258 | ChrisPenner/grids | NestedLists.hs | # LANGUAGE UndecidableInstances #
# LANGUAGE UndecidableSuperClasses #
module Data.Grid.Internal.NestedLists where
import GHC.TypeNats as N
import Data.Singletons.Prelude
import qualified Data.Vector as V
-- | Computes the level of nesting requried to represent a given grid
... | null | https://raw.githubusercontent.com/ChrisPenner/grids/619c72b1e51f96377845c2a15eb100d8f4185fa1/src/Data/Grid/Internal/NestedLists.hs | haskell | | Computes the level of nesting requried to represent a given grid
dimensionality as a nested list
an instance
| Get the total size of a 'Grid' of the given dimensions
# OVERLAPPING #
# OVERLAPPABLE # | # LANGUAGE UndecidableInstances #
# LANGUAGE UndecidableSuperClasses #
module Data.Grid.Internal.NestedLists where
import GHC.TypeNats as N
import Data.Singletons.Prelude
import qualified Data.Vector as V
> NestedLists [ 2 , 3 ] Int = = [ [ Int ] ]
> NestedLists [ 2 , 3 ... |
81ad394da2a3e71c6dbbd1548ca6d6357e3f07992b452dfc7e6bc8f460a103c3 | garrigue/lablgl | spots.ml | #!/usr/bin/env lablglut
Ported to lablglut by Issac Trotts on We d Aug 7 02:29:51 MDT 2002 .
open Printf
Copyright ( c ) 1994 .
*
* ( c ) Copyright 1993 1994 Silicon Graphics Inc.
* ALL RIGHTS RESERVED
* Permission to use copy modify and distribute this software for
* any purpose ... | null | https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/not_yet_ported/spots.ml | ocaml | Some <math.h> files do not define M_PI...
rotation about each axis
*INDENT-OFF*
*INDENT-ON*
ambient
diffuse
specular
position
direction
exponent cutoff
attenuation
translation
rotation
swing
arc
arc increment
ambient
diffuse
specular
position
direction
exponent cutoff
atte... | #!/usr/bin/env lablglut
Ported to lablglut by Issac Trotts on We d Aug 7 02:29:51 MDT 2002 .
open Printf
Copyright ( c ) 1994 .
*
* ( c ) Copyright 1993 1994 Silicon Graphics Inc.
* ALL RIGHTS RESERVED
* Permission to use copy modify and distribute this software for
* any purpose ... |
c8a35d624556dbcb28f04f48cc17d35045ea25b2518576775b5e72186fe31007 | pauleve/pint | ph_glc.ml |
Copyright or © or Copr . ( 2010 - 2011 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redis... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/phlib/ph_glc.ml | ocaml | *
flooder setup
*
compute strongly connected components
compute value
update cached values of childs
*
* Cutsets
self#debug ();
update conts_flood with new objectives
we assume the minCont grows
^ " ("^string_of_ctx ctx^")");
* return objectives in ms_objs that may avoid the given nodes
the node n with ... |
Copyright or © or Copr . ( 2010 - 2011 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redis... |
78f97bad159305facb8ef5e6bf2a6f6c240e6a4dfddc1e85a3f90e80a96fc985 | simonstl/introducing-erlang-2nd | convert.erl | @author < > [ ]
%% @doc Functions converting velocities among units.
from < a href= " " > Introducing Erlang</a > ,
O'Reilly Media , Inc. , 2012 .
%% @version 0.1
-module(convert).
-export([mps_to_mph/1, mps_to_kph/1]).
%% @doc Converts a velocity given in meters per second to miles per hour.
-spec(mps... | null | https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch02/ex5-docs/convert.erl | erlang | @doc Functions converting velocities among units.
@version 0.1
@doc Converts a velocity given in meters per second to miles per hour.
@doc Converts a velocity given in meters per second to kilometers per hour. | @author < > [ ]
from < a href= " " > Introducing Erlang</a > ,
O'Reilly Media , Inc. , 2012 .
-module(convert).
-export([mps_to_mph/1, mps_to_kph/1]).
-spec(mps_to_mph(number()) -> number()).
mps_to_mph(Mps) -> 2.23693629 * Mps.
-spec(mps_to_kph(number()) -> number()).
mps_to_kph(Mps) -> 3.6 * Mps. |
5c8e9de6ad9b80ed900b19665c98f92a23b41c005170c7afb3c7ae6886b23122 | psg-mit/smooth | OShape.hs | module Types.OShape where
import Prelude hiding (Real, (&&), (||), not, max, min, Ord (..), product, (^))
import FwdMode ((:~>), fstD, sndD, getDerivTower, VectorSpace)
import FwdPSh
import Types.SmoothBool
import Types.Real
type OShape a = a :=> SBool
unitInterval :: OShape DReal g
unitInterval = ArrD $ \_ x -> 0 <... | null | https://raw.githubusercontent.com/psg-mit/smooth/ad43130f3fb6a506a2f998b221d0783ba6c968eb/src/Types/OShape.hs | haskell | module Types.OShape where
import Prelude hiding (Real, (&&), (||), not, max, min, Ord (..), product, (^))
import FwdMode ((:~>), fstD, sndD, getDerivTower, VectorSpace)
import FwdPSh
import Types.SmoothBool
import Types.Real
type OShape a = a :=> SBool
unitInterval :: OShape DReal g
unitInterval = ArrD $ \_ x -> 0 <... | |
03e1cf46fa7869f6df3f81dcb60abf21c49044ab26da67523ae6c51130410672 | spechub/Hets | ParseTPTPAsLibDefn.hs | |
Module : ./SoftFOL / ParseTPTPAsLibDefn.hs
Copyright : ( c ) , DFKI Bremen 2013
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : non - portable ( imports Logic . Logic )
Module : ./SoftFOL/ParseTPTPAsLibDef... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/SoftFOL/ParseTPTPAsLibDefn.hs | haskell | |
Module : ./SoftFOL / ParseTPTPAsLibDefn.hs
Copyright : ( c ) , DFKI Bremen 2013
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : non - portable ( imports Logic . Logic )
Module : ./SoftFOL/ParseTPTPAsLibDef... | |
2bbdce6d9073a40fc75295ede9dc098c06f0391af3eddb3fc18b1e9e1fea0a64 | jfaure/lfvm-stg | Spec.hs | --import Test.Tasty
import Test.Tasty.HUnit
import Test.Framework (defaultMain, testGroup)
import System.Directory
import System.Path.NameManip
import Test.Framework.Providers.Program
import System.Process
import Data.List (sort)
import Debug.Trace
main =
let exampleDir = "examples/"
stgCompiler = "./lfvm"
... | null | https://raw.githubusercontent.com/jfaure/lfvm-stg/6d9ea1f495029ba28b1a10240c92133169e6f885/test/Spec.hs | haskell | import Test.Tasty
Get all [(.out, .stg)] filePairs from a list of files | import Test.Tasty.HUnit
import Test.Framework (defaultMain, testGroup)
import System.Directory
import System.Path.NameManip
import Test.Framework.Providers.Program
import System.Process
import Data.List (sort)
import Debug.Trace
main =
let exampleDir = "examples/"
stgCompiler = "./lfvm"
mkTestCase : : ( Fil... |
538bb5c1a98dc18d75cad84c044fcdc78221f44d25d3238e1321efdf3922e17c | xh4/web-toolkit | lists.lisp | (in-package :alexandria)
(declaim (inline safe-endp))
(defun safe-endp (x)
(declare (optimize safety))
(endp x))
(defun alist-plist (alist)
"Returns a property list containing the same keys and values as the
association list ALIST in the same order."
(let (plist)
(dolist (pair alist)
(push (car pair... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/alexandria-20191227-git/lists.lisp | lisp | elements -- and this is WAY faster on most implementations then declaring
could return the tail without consing up a new list.
a nil tail means an empty result so far
skip over this pair
keep this pair | (in-package :alexandria)
(declaim (inline safe-endp))
(defun safe-endp (x)
(declare (optimize safety))
(endp x))
(defun alist-plist (alist)
"Returns a property list containing the same keys and values as the
association list ALIST in the same order."
(let (plist)
(dolist (pair alist)
(push (car pair... |
46bbf406e33754554a6aed9933a621d494c06eeb112e8326cc96b870b7d2ca57 | bugsbio/lein-tern | migrations.clj | (ns mysql-project.migrations)
(defn configure []
{:db {:classname "com.mysql.jdbc.Driver"
:subprotocol "mysql"
:database "mysql_example_db"
:user "root"
:port "3306"
:password ""}})
| null | https://raw.githubusercontent.com/bugsbio/lein-tern/1496cc11fb343393416cc62fd874cd2fb634b2f3/examples/mysql-project/dev/mysql_project/migrations.clj | clojure | (ns mysql-project.migrations)
(defn configure []
{:db {:classname "com.mysql.jdbc.Driver"
:subprotocol "mysql"
:database "mysql_example_db"
:user "root"
:port "3306"
:password ""}})
| |
792e064dc29de1a9b61a3a92076e33e3912d68c6bbae98559566a2d3d662dc94 | atemerev/erlang_ngondro | notifier.erl | -module(notifier).
-author("atemerev").
-include_lib("n2o/include/n2o.hrl").
-include("../include/state.hrl").
-compile(export_all).
proc(init, P) ->
{ok, P};
proc({notify, Spread}, #pi{state = #notifier_state{last_notify = Last}} = P) ->
Current = misc:timestamp(),
{ok, SpreadThreshold} = application:get_env(s... | null | https://raw.githubusercontent.com/atemerev/erlang_ngondro/5cf9449fdd012c4f090686c2c7f2d0bd295d58c8/src/notifier.erl | erlang | io:format("[~p]", [Spread]), | -module(notifier).
-author("atemerev").
-include_lib("n2o/include/n2o.hrl").
-include("../include/state.hrl").
-compile(export_all).
proc(init, P) ->
{ok, P};
proc({notify, Spread}, #pi{state = #notifier_state{last_notify = Last}} = P) ->
Current = misc:timestamp(),
{ok, SpreadThreshold} = application:get_env(s... |
c0783f639b8f8b06c60e5f4bd755c6127291c77d0e83a7abeac40c60eb9c1269 | ragkousism/Guix-on-Hurd | ghostscript.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2013 , 2015 , 2016 < >
Copyright © 2017 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/ghostscript.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2013 , 2015 , 2016 < >
Copyright © 2017 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If ... |
0e55d85ae08115ea3d8175cd2f35c6876fd83a22d7351904b1988ef2bc0d4d59 | cutsea110/Kestrel | Application.hs | # OPTIONS_GHC -fno - warn - orphans #
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
i... | null | https://raw.githubusercontent.com/cutsea110/Kestrel/9af7f7ab17a15854e21cc6cb25ac922379a97df7/Application.hs | haskell | * for DevelMain
* for GHCI
Import all relevant handler modules here.
the comments there for more details.
| This function allocates resources (such as a database connection pool),
performs initialization and returns a foundation datatype value. This is also
the place to put your migrate statements to have automa... | # OPTIONS_GHC -fno - warn - orphans #
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
, getApplicationRepl
, shutdownApp
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
import Database.Persist.Postgresql ... |
80c3328470e33dbbb5e67cafed6865033346041639bde024e04927a3738ac7cc | piotr-yuxuan/choose-a-new-phone | phone_dialog.cljs | (ns choose-a-new-phone.components.phone-dialog
(:require [choose-a-new-phone.components.progressive-img :refer [progressive-img]]
[choose-a-new-phone.domain :as domain]
[choose-a-new-phone.events.bestbuy :as bestbuy]
[choose-a-new-phone.events.ui :as ui]
[cljs-react-mat... | null | https://raw.githubusercontent.com/piotr-yuxuan/choose-a-new-phone/b66affc9383cb0b0515dfb2f10d90f4964c2b869/src/choose_a_new_phone/components/phone_dialog.cljs | clojure | (ns choose-a-new-phone.components.phone-dialog
(:require [choose-a-new-phone.components.progressive-img :refer [progressive-img]]
[choose-a-new-phone.domain :as domain]
[choose-a-new-phone.events.bestbuy :as bestbuy]
[choose-a-new-phone.events.ui :as ui]
[cljs-react-mat... | |
29e972d04c58cd9225258bc4770318b968d5e62e0e25b1ad3900aec09ab461a4 | varjagg/cl-video | gif.lisp | ;;; Animated GIF processing
One video stream in GIF container
(in-package :cl-video)
(declaim (optimize (speed 3) (safety 1)))
(defclass gif-chunk (chunk)
((strides :accessor strides :initarg :strides)
(pos :reader pos :initarg :pos :type 'fixnum)
(delay :reader delay :initarg :delay)
(span :accessor sp... | null | https://raw.githubusercontent.com/varjagg/cl-video/eb5fbea3592b74cdb0458b7bcdeb70f0423a8183/gif.lisp | lisp | Animated GIF processing
initializing class-allocated slots here | One video stream in GIF container
(in-package :cl-video)
(declaim (optimize (speed 3) (safety 1)))
(defclass gif-chunk (chunk)
((strides :accessor strides :initarg :strides)
(pos :reader pos :initarg :pos :type 'fixnum)
(delay :reader delay :initarg :delay)
(span :accessor span :allocation :class :inita... |
2050dffaa4b4a91fc6f8b23cf2508b9aaf8e4b9f2f4a9ff94d19f2b38729b5ac | cirodrig/triolet | Lexer.hs | {-# OPTIONS #-}
-----------------------------------------------------------------------------
-- |
Module : Language . Python . Version3.Lexer
Copyright : ( c ) 2009
-- License : BSD-style
Maintainer :
-- Stability : experimental
Portability : ghc
--
-- Lexical analysis for Python version 3... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Language/Python/Version3/Lexer.hs | haskell | # OPTIONS #
---------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
Lexical analysis for Python version 3.x programs.
See: <>.
---------------------------------------------------------------------------
* Lexical analysis
^ The input str... | Module : Language . Python . Version3.Lexer
Copyright : ( c ) 2009
Maintainer :
Portability : ghc
module Language.Python.Version3.Lexer (
lex,
lexOneToken,
lexer,
initLexState ) where
import Prelude hiding (lex)
import Language.Python.Version3.Parser.Lexer (lexToken, initStartCodeSt... |
5bad73a932bf51962c8048486b61be9e8525b69b172011379c76104081ebd657 | WormBase/wormbase_rest | feature.clj | (ns rest-api.classes.transposon.widgets.feature
(:require
[datomic.api :as d]
[rest-api.classes.feature.core :as feature]
[rest-api.classes.generic-fields :as generic]))
(defn associated-features [transposon]
(let [db (d/entity-db transposon)
data (->> (d/q '[:find [?f ...]
... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/transposon/widgets/feature.clj | clojure | (ns rest-api.classes.transposon.widgets.feature
(:require
[datomic.api :as d]
[rest-api.classes.feature.core :as feature]
[rest-api.classes.generic-fields :as generic]))
(defn associated-features [transposon]
(let [db (d/entity-db transposon)
data (->> (d/q '[:find [?f ...]
... | |
13ed48fdc30398090b1c0a6f7a35440cdda3b61b2173f9199db054145a418c3d | erlio/vmq_webhooks | webhooks_handler.erl | -module(webhooks_handler).
-include("vmq_webhooks_test.hrl").
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-export([start_endpoint/0,
stop_endpoint/0]).
start_endpoint() ->
Dispatch = cowboy_router:compile(
[{'_', [{"/", ?MODULE, []},
{"/cache... | null | https://raw.githubusercontent.com/erlio/vmq_webhooks/1ffff84f954858b9c183c9e1f3f9b2675955e37f/test/webhooks_handler.erl | erlang | Cowboy callbacks
callbacks for each hook | -module(webhooks_handler).
-include("vmq_webhooks_test.hrl").
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-export([start_endpoint/0,
stop_endpoint/0]).
start_endpoint() ->
Dispatch = cowboy_router:compile(
[{'_', [{"/", ?MODULE, []},
{"/cache... |
9f894a11d170cd0ebf0dfb459bd21189ac1c563d2aceec0496a609e96b8b258b | lockie/racket-engine | sdl-image.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
sdl)
(provide
(all-defined-out))
(define-ffi-definer define-sdl-image (ffi-lib "libSDL2_image"))
(define-sdl-image IMG_Linked_Version (_fun -> _SDL_version-pointer))
(define _IMG_InitFlags
(_bitmask
'(IMG_INIT_JPG = #x00000001
... | null | https://raw.githubusercontent.com/lockie/racket-engine/5ffc2c2ab57cb2795d1fde97fd0f27088171b27c/sdl-image.rkt | racket | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
sdl)
(provide
(all-defined-out))
(define-ffi-definer define-sdl-image (ffi-lib "libSDL2_image"))
(define-sdl-image IMG_Linked_Version (_fun -> _SDL_version-pointer))
(define _IMG_InitFlags
(_bitmask
'(IMG_INIT_JPG = #x00000001
... | |
9e9420a09223bc2f6a9c1a8ce136e3bf2f77cd1ffd6b051955c531bf6919b8df | cyverse-archive/DiscoveryEnvironmentBackend | c187_2014042101.clj | (ns facepalm.c187-2014042101
(:use [korma.core])
(:import [java.util UUID]))
(def ^:private version
"The destination database version."
"1.8.6:20140421.01")
(defn- add-user-preferences-table
[]
(println "\t* adding the user_preferences table")
(exec-raw
"CREATE TABLE user_preferences (
id UUI... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/databases/de-database-schema/src/main/conversions/v1.8.7/c187_2014042101.clj | clojure | (ns facepalm.c187-2014042101
(:use [korma.core])
(:import [java.util UUID]))
(def ^:private version
"The destination database version."
"1.8.6:20140421.01")
(defn- add-user-preferences-table
[]
(println "\t* adding the user_preferences table")
(exec-raw
"CREATE TABLE user_preferences (
id UUI... | |
751c5f9195cb2d24c6db56c4925ae62cff5f573b380a0fede6e48ff5ca4a69ef | skeuchel/needle | Common.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
module Knot.Common
(... | null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/Knot/Common.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
* Source code locations
* Meta-names
| Type for identifiers.
| Types that are essentially identifiers and can be converted back to
'Identifier'.
** Meta-variables
------------------------------------------------------------------------------
** Type names
-------... | # LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
module Knot.Common
( module Knot.Common
, module Control.Applicative
, mod... |
af97b86465e9b9e7d157458a0317962fbe45ee989c19b740e1322b1890f4bc87 | ocamllabs/ocaml-modular-implicits | t173-pushenvacc.ml | open Lib;;
let x = 5 in
let y = 4 in
let z = 3 in
let a = 2 in
let b = 1 in
let f _ = b + a + z + y + x in
if f 0 <> 15 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 24
11 ENVACC1
12 PUSHENVACC2
13 PU... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t173-pushenvacc.ml | ocaml | open Lib;;
let x = 5 in
let y = 4 in
let z = 3 in
let a = 2 in
let b = 1 in
let f _ = b + a + z + y + x in
if f 0 <> 15 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 24
11 ENVACC1
12 PUSHENVACC2
13 PU... | |
594222104d29277f0ff611b27ea5bf816c0d4fa3d343ea4a73c8181777f78bdb | fortytools/holumbus | DMandel.hs | module Holumbus.MapReduce.Examples.MandelbrotSet.DMandel
(
mandelMap
, mandelReduce
)
where
import Holumbus.MapReduce.Examples.MandelbrotSet.SimpleDMapReduceIO
import Holumbus.MapReduce.Examples.MandelbrotSet.ImageTypes
import Holumbus.MapReduce.Examples.MandelbrotSet.ImageMandel
import Control.DeepSeq
type ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Mandelbrot-set/Mandelbrot-set_1/source/Holumbus/MapReduce/Examples/MandelbrotSet/DMandel.hs | haskell | calc the value
type ReduceFunction a k2 v2 v3 = ActionEnvironment -> a -> k2 -> [v2] -> IO (Maybe v3)
| module Holumbus.MapReduce.Examples.MandelbrotSet.DMandel
(
mandelMap
, mandelReduce
)
where
import Holumbus.MapReduce.Examples.MandelbrotSet.SimpleDMapReduceIO
import Holumbus.MapReduce.Examples.MandelbrotSet.ImageTypes
import Holumbus.MapReduce.Examples.MandelbrotSet.ImageMandel
import Control.DeepSeq
type ... |
eba5884da2d81f1af12513d90c1d76ad6b3b9cf5bf8a5c98d59041a924a28e6d | pfdietz/ansi-test | file-length.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Jan 21 06:21:11 2004
;;;; Contains: Tests of FILE-LENGTH
(in-package :cl-test)
(deftest file-length.error.1
(signals-error (file-length) program-error)
t)
(deftest file-length.error.2
(signals-error
(with-open-file (is "file-length.txt" :direction :... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/streams/file-length.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of FILE-LENGTH
Non-error tests | Author :
Created : We d Jan 21 06:21:11 2004
(in-package :cl-test)
(deftest file-length.error.1
(signals-error (file-length) program-error)
t)
(deftest file-length.error.2
(signals-error
(with-open-file (is "file-length.txt" :direction :input)
(file-length is nil))
program-e... |
bec7b67525b5c5c88bdafca1c20cf5e22c72b6bb34d43055abb6243f9008f460 | funkywork/nightmare | handler.mli | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... | null | https://raw.githubusercontent.com/funkywork/nightmare/05858823d01925cb8cb02a6b29ed8a223822a0e8/lib/service/handler.mli | ocaml | * A Handler is just a function that takes a request and returns a response
(wrapped in a promise [Lwt.t]).
* {1 Types} | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... |
99262f83ea1ef164364e3afd76a6afc32d6c5234bf350639b6ff52b7d65cf4c5 | nandor/llir-ocaml | t080-geint.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
if not (0 >= 0) then raise Not_found;;
*
0 CONSTINT 42
... | null | https://raw.githubusercontent.com/nandor/llir-ocaml/9c019f15c444e30c825b1673cbe827e0497868fe/testsuite/tests/tool-ocaml/t080-geint.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
if not (0 >= 0) then raise Not_found;;
*
0 CONSTINT 42
... | |
8d3dc83800f278ea300fad53618a90eab39d5f5949ae08e050d2c53563f9b3a7 | StrykerKKD/Logical | lovers.ml | open Logical
let first_lover_var = "first_lover_var"
let second_lover_var = "second_lover_var"
let loves first_lover second_lover =
Goal.both
(Goal.equal (Value.var first_lover_var) (Value.str first_lover))
(Goal.equal (Value.var second_lover_var) (Value.str second_lover))
let loves_db =
Goal.either_mul... | null | https://raw.githubusercontent.com/StrykerKKD/Logical/bbe349683c6fc9d73c805287839b75e1761fe44b/bin/lovers.ml | ocaml | open Logical
let first_lover_var = "first_lover_var"
let second_lover_var = "second_lover_var"
let loves first_lover second_lover =
Goal.both
(Goal.equal (Value.var first_lover_var) (Value.str first_lover))
(Goal.equal (Value.var second_lover_var) (Value.str second_lover))
let loves_db =
Goal.either_mul... | |
9b8a4cac5dc0f9dd77e3dad7ea230d244bc46f2f402763b548e418ecab61f60c | reanimate/reanimate | doc_parA.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ drawBox `parA` adjustDuration (*2) drawCircle
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_parA.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ drawBox `parA` adjustDuration (*2) drawCircle
|
11e30864cee2e157a9362f7da5547c9606463bfaff4e9a927eb1355b45387928 | duct-framework/module.web | web.clj | (ns duct.middleware.web
(:require [duct.logger :as logger]
[integrant.core :as ig]
[muuntaja.core :as mc]
[muuntaja.middleware :as mm]
[ring.middleware.defaults :refer [wrap-defaults]]
[ring.middleware.stacktrace :refer [wrap-stacktrace]]
[ring.m... | null | https://raw.githubusercontent.com/duct-framework/module.web/bc11c28d81e2aa69c32c542c0f3a276224e72420/src/duct/middleware/web.clj | clojure | (ns duct.middleware.web
(:require [duct.logger :as logger]
[integrant.core :as ig]
[muuntaja.core :as mc]
[muuntaja.middleware :as mm]
[ring.middleware.defaults :refer [wrap-defaults]]
[ring.middleware.stacktrace :refer [wrap-stacktrace]]
[ring.m... | |
65ab5cbc7b945e15959ab362db7c5f2f598b2d95c1c13f8144e2fe04957c5784 | ntoronto/drbayes | parameters.rkt | #lang typed/racket/base
(provide (all-defined-out))
(define set-ensure-unique? #f)
| null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/set/parameters.rkt | racket | #lang typed/racket/base
(provide (all-defined-out))
(define set-ensure-unique? #f)
| |
b51b20d3d4e8e8098db758d3a60ae9e419a498c2a4f7277a6084991b1b0fd49d | jimrthy/frereth | world_test.cljc | (ns shared.world-test
(:require [shared.world :as world]
#?(:clj [clojure.test :as t]
:cljs [cljs.test :as t :include-macros true])))
(t/deftest get-world-in-state
(let [world-map {:a {::world/connection-state 1}
:b {::world/connection-state 1}
:c {:... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/log-viewer/test/cljc/shared/world_test.cljc | clojure | (ns shared.world-test
(:require [shared.world :as world]
#?(:clj [clojure.test :as t]
:cljs [cljs.test :as t :include-macros true])))
(t/deftest get-world-in-state
(let [world-map {:a {::world/connection-state 1}
:b {::world/connection-state 1}
:c {:... | |
fb8e9922b9902efdc3ff95f242db029a36a9445389d2cfb2c99a9ea43c62da0f | hemmi/coq2scala | constrintern.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/interp/constrintern.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Translation from front abstract sy... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Sig... |
0f22fa1fd1192602a5f6dbed18ea9736972c87b118c6222b505f305aa42e6a22 | TrustInSoft/tis-interpreter | sparecode_params.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/sparecode/sparecode_params.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
e17c96376d9186dc528a284cc36a5f3bc551704852abcd0dd9f1aeae0ee766bf | glv/snergly | figwheel.clj | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!
{:figwheel-options {}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel true
:source-paths ["src"]
:compiler {:m... | null | https://raw.githubusercontent.com/glv/snergly/13357edede8f47f4298e62dcb78cf28ea84a1242/script/figwheel.clj | clojure | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!
{:figwheel-options {}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel true
:source-paths ["src"]
:compiler {:m... | |
8a4f979570b4514854ced6609e54997e21b4aa6169c13d3cdd57c9f4e398b4ce | wickedchicken/ocaml_skeleton | calc.ml | The source for our Calc module .
* A .mli file is required export methods etc .
*
* Note that OCaml relies on filenames for module lookup
* This should be named calc.ml
*
* If this resides in a calc/ directory , you must add this line to _ tags :
* " src / calc " : include
*
* If you includ... | null | https://raw.githubusercontent.com/wickedchicken/ocaml_skeleton/cea682c7d9dafc54dc4ec269e0dea770e83a0bd3/src/calc/calc.ml | ocaml | The filename is called Calc and the module in here
* is called Calc... this will yield a full module name of
* Calc.Calc
define an 'add' method | The source for our Calc module .
* A .mli file is required export methods etc .
*
* Note that OCaml relies on filenames for module lookup
* This should be named calc.ml
*
* If this resides in a calc/ directory , you must add this line to _ tags :
* " src / calc " : include
*
* If you includ... |
f6c282e5d9d12b022d412f7b69023b47ad689bd7af92e6710435fe72f9570420 | heraldry/heraldicon | core.cljs | (ns heraldicon.frontend.history.core
(:require
[heraldicon.frontend.component.tree :as tree]
[heraldicon.frontend.history.shared :as shared]
[heraldicon.frontend.js-event :as js-event]
[heraldicon.frontend.language :refer [tr]]
[re-frame.core :as rf]))
(defn register-undoable-path [path]
(swap! shar... | null | https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/frontend/history/core.cljs | clojure | (ns heraldicon.frontend.history.core
(:require
[heraldicon.frontend.component.tree :as tree]
[heraldicon.frontend.history.shared :as shared]
[heraldicon.frontend.js-event :as js-event]
[heraldicon.frontend.language :refer [tr]]
[re-frame.core :as rf]))
(defn register-undoable-path [path]
(swap! shar... | |
dbe7bad545a62a72abd1a5f2c4d8c299dbae5fab32346e6366dd53493a6d1f36 | maitria/packthread | project.clj | (defproject com.maitria/packthread "0.1.11-SNAPSHOT"
:description "Threading macros for working with globs of state"
:url ""
:license {:name "avi license"
:url ""}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/core.match "0.2.1"]]
:profiles {:dev {:dependencies [[midje... | null | https://raw.githubusercontent.com/maitria/packthread/b283c3f3ba439a0d39f53288a4deb274e27345fe/project.clj | clojure | (defproject com.maitria/packthread "0.1.11-SNAPSHOT"
:description "Threading macros for working with globs of state"
:url ""
:license {:name "avi license"
:url ""}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/core.match "0.2.1"]]
:profiles {:dev {:dependencies [[midje... | |
d9e71e21b064e2ae955533a2ece9209fb3c367bc9487bb706edb8d3146200bbf | racket/redex | generators.rkt | #lang racket/base
(require redex/examples/rbtrees
(only-in redex/private/generate-term pick-an-index)
redex/reduction-semantics
racket/match
racket/bool)
(provide (all-defined-out))
(module+ adhoc-mod
(provide generate get-generator type)
(define (get-generator) generate)
(d... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/rbtrees/generators.rkt | racket | #lang racket/base
(require redex/examples/rbtrees
(only-in redex/private/generate-term pick-an-index)
redex/reduction-semantics
racket/match
racket/bool)
(provide (all-defined-out))
(module+ adhoc-mod
(provide generate get-generator type)
(define (get-generator) generate)
(d... | |
7944abdddda13e744a113391d0dc321e051407ccf563f1bc7967c5dc6836a375 | yuce/teacup | teacup_registry.erl | Copyright ( c ) 2016 , < > .
% All rights reserved.
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
% * Redistributions of source code must retain the above copyright
% notice, this list of conditions and the f... | null | https://raw.githubusercontent.com/yuce/teacup/2ab8a3c09b0dc44190c09ff7681bfe7fa8c88506/src/teacup_registry.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in... | Copyright ( c ) 2016 , < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
THEORY OF... |
acdb31d62c9c2d1c6767cc742978d9e693d90a5f1c877bde9ba158c30756c41a | openbadgefactory/salava | email_notifications.clj | (ns salava.mail.email-notifications
(:require [yesql.core :refer [defqueries]]
[clojure.tools.logging :as log]
[clojure.set :refer [rename-keys]]
[clojure.java.jdbc :as jdbc]
[salava.core.helper :refer [dump]]
[slingshot.slingshot :refer :all]
[s... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/mail/email_notifications.clj | clojure | (ns salava.mail.email-notifications
(:require [yesql.core :refer [defqueries]]
[clojure.tools.logging :as log]
[clojure.set :refer [rename-keys]]
[clojure.java.jdbc :as jdbc]
[salava.core.helper :refer [dump]]
[slingshot.slingshot :refer :all]
[s... | |
565306a562172f0568d1119332b92f077485bf99d6ceb3f96240f322102a0f00 | roman01la/clojurescript-workshop | assignment.cljs | Develop ticketing system using multimethods
;; which prints a ticket either for adults or children
;; test
" Adult : "
" Child : "
| null | https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/10.multi_methods/assignment.cljs | clojure | which prints a ticket either for adults or children
test | Develop ticketing system using multimethods
" Adult : "
" Child : "
|
51d6ddcf6485f7fe8b697b592c7ea92f1df1a387567c08378837272b49721ab4 | hyperfiddle/electric | typeahead_ui1.cljc | (ns wip.typeahead-ui1
(:require
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui :as ui]
[clojure.string :as str])
#?(:cljs (:require-macros wip.typeahead-ui1)))
(def data
#?(:clj
[{:name "Alice B"}
{:name "Bob C"}
{:name "Claire D"}
{:name "Da... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/controls/typeahead_ui1.cljc | clojure | uncomment to imitate server lag
react hooks similiarity | (ns wip.typeahead-ui1
(:require
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui :as ui]
[clojure.string :as str])
#?(:cljs (:require-macros wip.typeahead-ui1)))
(def data
#?(:clj
[{:name "Alice B"}
{:name "Bob C"}
{:name "Claire D"}
{:name "Da... |
2116fb00202511b3f9f2f53079be53b721ab9bf3bc9ebf94b23b32043ae989d4 | fjvallarino/monomer | Main.hs | |
Module : Main
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' Generative ' example .
Module : Main
Copyright : (c) 2018 Francisco Vallarino
License : BSD-... | null | https://raw.githubusercontent.com/fjvallarino/monomer/ff2ea3b4140c9648fc338738c5aed8b089c922df/examples/generative/Main.hs | haskell | |
Module : Main
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' Generative ' example .
Module : Main
Copyright : (c) 2018 Francisco Vallarino
License : BSD-... | |
248f4cb86a8bf3c798c961b5368bb07d276c6928e163a2a90dd3b248259bb610 | flipstone/orville | CrudTest.hs | module EntityWrapper.CrudTest where
import qualified Database.Orville.PostgreSQL as O
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (assertEqual, testCase)
import EntityWrapper.Data.Entity (Entity(..))
import EntityWrapper.Data.Virus (bpsVirus, brnVirus)
import EntityWrapper.Schema (schema, virusTa... | null | https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/test/EntityWrapper/CrudTest.hs | haskell |
This value used to be returned by update record. Manually creating
it here for now until that gets sorted out.
| module EntityWrapper.CrudTest where
import qualified Database.Orville.PostgreSQL as O
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (assertEqual, testCase)
import EntityWrapper.Data.Entity (Entity(..))
import EntityWrapper.Data.Virus (bpsVirus, brnVirus)
import EntityWrapper.Schema (schema, virusTa... |
00a926266a995c9c039c00e684c56f148c45de09ecda3561d4c6bc9073a46903 | ocaml-sf/learn-ocaml-corpus | test.ml | open Report
open Test_lib
let rec sample_bt ~balanced sample () =
let rec rew = function
| Empty -> Empty
| Node (l, _, r) -> Node (rew l, sample (), rew r) in
let rec sample_rec level =
if Random.int level = 0 then Empty
else if balanced then
let s = sample_rec (level - 1) in Node (s, sampl... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week3/seq4/ex1/test.ml | ocaml | open Report
open Test_lib
let rec sample_bt ~balanced sample () =
let rec rew = function
| Empty -> Empty
| Node (l, _, r) -> Node (rew l, sample (), rew r) in
let rec sample_rec level =
if Random.int level = 0 then Empty
else if balanced then
let s = sample_rec (level - 1) in Node (s, sampl... | |
6fe56f7540c1521227e2b6461ad703ac36854ec16a691034e6b1e33a1e12bf4a | hatsugai/SyncStitch | main.ml | let () =
Guedra.reg_client
~ppi:!Drive.ppi
~font_name:!Drive.font_name
~font_size:!Drive.font_size
Syncstitch.start;
Drive.drive Drive.RunModeProcessExplorer
| null | https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/main.ml | ocaml | let () =
Guedra.reg_client
~ppi:!Drive.ppi
~font_name:!Drive.font_name
~font_size:!Drive.font_size
Syncstitch.start;
Drive.drive Drive.RunModeProcessExplorer
| |
7b4cbecb3acefcdc01a7e7d6c2b00f6045b43bcb9079e1ef4af5229bcdff3bcd | lexi-lambda/blackboard | style-props.rkt | #lang racket/base
(require racket/contract
"draw/font.rkt"
"style.rkt")
(provide (contract-out
[font (style-property/c font-description?)]
[math-font (style-property/c font-description?)]
[math-depth (style-property/c math-script-depth?)]
[math-shift (style-pr... | null | https://raw.githubusercontent.com/lexi-lambda/blackboard/cfc987e9bb3a357a10d23a44419bbe16215ea656/blackboard-lib/blackboard/private/style-props.rkt | racket | ----------------------------------------------------------------------------- | #lang racket/base
(require racket/contract
"draw/font.rkt"
"style.rkt")
(provide (contract-out
[font (style-property/c font-description?)]
[math-font (style-property/c font-description?)]
[math-depth (style-property/c math-script-depth?)]
[math-shift (style-pr... |
a0fec257feecf2d662debfa73d826e5dbfef467f1857df2228a983bfd743150e | Quid2/zm | Values.hs | {-# LANGUAGE CPP #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Data.Values where
import Control.DeepSeq
import Control.Exception
import qualified Data.ByteString as B
impo... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/Data/Values.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
import Data.Array as A
toList N = []
toList (C h t) = h : (toList t)
toN :: Integer -> N
stream1 = Stream True stream1
Crashes eta
emoji = "\x1F600"
array package
arrayT = ("Array",
nativeList)
| Data with a normal form.
| Evaluate ... | # LANGUAGE ExistentialQuantification #
# LANGUAGE NoMonomorphismRestriction #
module Test.Data.Values where
import Control.DeepSeq
import Control.Exception
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Shor... |
708b8b5c96469ff9bf01a42a0a2b7d1b482bb7038dd117b528a5ea101f4cfb24 | bennn/dissertation | pfds-stream.rkt | #lang typed/racket
(provide empty-stream? empty-stream stream-cons stream-car
stream-cdr stream-append stream-reverse stream
stream->list drop take Stream
#;stream-map #;stream-foldl #;stream-foldr)
(define-type Stream (All (A) (Listof A)))
(define empty-stream null)
(: empty-stream? : (A... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/transient-fast/determinance/eager/pfds-stream.rkt | racket | stream-map #;stream-foldl #;stream-foldr) | #lang typed/racket
(provide empty-stream? empty-stream stream-cons stream-car
stream-cdr stream-append stream-reverse stream
stream->list drop take Stream
(define-type Stream (All (A) (Listof A)))
(define empty-stream null)
(: empty-stream? : (All (A) ((Stream A) -> Boolean)))
(define (empty-strea... |
8dc85bbd3bc1f3e6189048888127898edaa5da42dde6b93116d09527f120f6b3 | codelion/SpinR | label.ml | _ $ I d : label.ml 4527 2012 - 10 - 17 13:08:20Z weissmam $
Copyright ( c ) 2010 - 2012 Technische Universitaet Muenchen , TUM
Copyright ( c ) 2010 - 2012 < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the followin... | null | https://raw.githubusercontent.com/codelion/SpinR/8d3a3d99cf3192a4ede3f326eff0c07c22906dee/label.ml | ocaml | _ $ I d : label.ml 4527 2012 - 10 - 17 13:08:20Z weissmam $
Copyright ( c ) 2010 - 2012 Technische Universitaet Muenchen , TUM
Copyright ( c ) 2010 - 2012 < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the followin... | |
51798b58e775ec685499a6d26de707d5e6f9933f3e1f14790d60f8e9b9f52efe | mbj/mhs | Types.hs | module AWS.Lambda.Runtime.Types where
import AWS.Lambda.Runtime.Prelude
import qualified Data.ByteString as BS
import qualified XRay.TraceHeader as XRay
data Event a = Event
{ body :: a
, requestId :: RequestId
, traceHeader :: XRay.TraceHeader
}
deriving stock Show
newtype RequestId = RequestId... | null | https://raw.githubusercontent.com/mbj/mhs/c2e39c45e645c4597c40953be2c07767bf5001dd/lambda-runtime/src/AWS/Lambda/Runtime/Types.hs | haskell | module AWS.Lambda.Runtime.Types where
import AWS.Lambda.Runtime.Prelude
import qualified Data.ByteString as BS
import qualified XRay.TraceHeader as XRay
data Event a = Event
{ body :: a
, requestId :: RequestId
, traceHeader :: XRay.TraceHeader
}
deriving stock Show
newtype RequestId = RequestId... | |
2b4cb1758750cd7a301a36cb7d6b7f73871915b9d4b9f5fc53bbf60031d6cd6e | koto-bank/lbge | asset-manager.lisp | (in-package :lbge.asset)
(defclass asset-manager ()
((roots
:documentation
"List of asset roots.
An asset root is a pair (name . path), where name is a keyword, and
path is a path to some location (on disk), absolute or relative.
E.g.: (:texture . #P\"assets/textures\")"
:initform (list)
:accessor as... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/base/asset/asset-manager.lisp | lisp | (in-package :lbge.asset)
(defclass asset-manager ()
((roots
:documentation
"List of asset roots.
An asset root is a pair (name . path), where name is a keyword, and
path is a path to some location (on disk), absolute or relative.
E.g.: (:texture . #P\"assets/textures\")"
:initform (list)
:accessor as... | |
1e7e81c58843c8255f5cf119c6546ca526ad9ce564394922136878ef523de925 | elaforge/karya | Solkattu2019.hs | Copyright 2019
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
# LANGUAGE RecordWildCards #
| scores from 2019 .
module Solkattu.Score.Solkattu2019 where
import Prelude hiding ((.), (^), repeat)
import Solkattu.Dsl.Solkattu
... | null | https://raw.githubusercontent.com/elaforge/karya/07bdeac32293a18f9ce982fab18d2802ea26b962/Solkattu/Score/Solkattu2019.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
TODO I think I did this one before
1
2
3 ( v ... )
n d d n nnd d n n
Reduce from both ends:
tat.__.dit.__.kita.ki.na.gu.gu.takita.dinga.tat.__.dit.__.ta.dinga
dit.__.kita.ki.na.gu.gu.takita.di... | Copyright 2019
# LANGUAGE RecordWildCards #
| scores from 2019 .
module Solkattu.Score.Solkattu2019 where
import Prelude hiding ((.), (^), repeat)
import Solkattu.Dsl.Solkattu
c_19_04_15 :: Korvai
c_19_04_15 = date 2019 4 15 $ ganesh $ korvaiS adi mridangam
[ join (dhom.__3)
[... |
7cf0e88749677105561817a7a050f596eb2e46e0950d597892a65216743261dc | nickzuber/infrared | flow_parser_js.ml | *
* Copyright ( c ) 2013 - present , Facebook , Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENS... | null | https://raw.githubusercontent.com/nickzuber/infrared/b67bc728458047650439649605af7a8072357b3c/InfraredParser/flow_parser/lib/flow_parser_js.ml | ocaml | *
* Copyright ( c ) 2013 - present , Facebook , Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENS... | |
0ae19f08cba193fc149714acdececa63e14b4aaec4570eef80e7681aeaee16c5 | nekodjin/HasKalc | Expression.hs | module Parser.Expression where
import Parser.Operator (Operator)
data Expression
= EConst Double
| EOp Expression Operator Expression
deriving ( Show, Eq )
| null | https://raw.githubusercontent.com/nekodjin/HasKalc/2198b16d9d07ff060954a4f3f88991a5da814f97/src/Parser/Expression.hs | haskell | module Parser.Expression where
import Parser.Operator (Operator)
data Expression
= EConst Double
| EOp Expression Operator Expression
deriving ( Show, Eq )
| |
68172749e6afd071eee277e3a997b03fb71a5e6b0716c8f38eb7b17a36dfc962 | malcolmreynolds/GSLL | dirichlet.lisp | ;; Dirichlet distribution
, Sun Oct 29 2006
Time - stamp : < 2009 - 05 - 24 22:55:07EDT dirichlet.lisp >
$ Id$
(in-package :gsl)
;;; /usr/include/gsl/gsl_randist.h
(defmfun sample
((generator random-number-generator) (type (eql 'dirichlet))
&key alpha (theta (vdf (dim0 alpha))))
"gsl_ran_dirichlet... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/random/dirichlet.lisp | lisp | Dirichlet distribution
/usr/include/gsl/gsl_randist.h
theta had better be at least as long as alpha, or they'll be trouble
theta had better be at least as long as alpha, or they'll be trouble
theta had better be at least as long as alpha, or they'll be trouble
Examples and unit test | , Sun Oct 29 2006
Time - stamp : < 2009 - 05 - 24 22:55:07EDT dirichlet.lisp >
$ Id$
(in-package :gsl)
(defmfun sample
((generator random-number-generator) (type (eql 'dirichlet))
&key alpha (theta (vdf (dim0 alpha))))
"gsl_ran_dirichlet"
(((mpointer generator) :pointer)
((dim0 alpha) sizet)
... |
fce51973bd05725afaaeedd5e31f5a1697955a232a2f817a6505b386e255a509 | iand675/hs-opentelemetry | Device.hs | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
|
Module : OpenTelemetry . Resource . Device
Copyright : ( c ) , 2021
License : BSD-3
Description : Not implemented yet
M... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/b08550db292ca0d8b9ce9156988e6d08dd6a2e61/api/src/OpenTelemetry/Resource/Device.hs | haskell | ---------------------------------------------------------------------------
--------------------------------------------------------------------------- |
|
Module : OpenTelemetry . Resource . Device
Copyright : ( c ) , 2021
License : BSD-3
Description : Not implemented yet
Maintainer :
Stability : experimental
Portability : non - portable ( GHC extensions )
Not implemented . Please file a GitHub issue if ... |
80d22b5f5c9688a7551f109cc295618d1f52e2b69a63320e8b0fa7d3f405f1d3 | mvoidex/hsdev | Class.hs | module HsDev.Symbols.Class (
Sourced(..),
sourcedModuleName,
module HsDev.Symbols.Location
) where
import Control.Lens (Lens', Traversal')
import Data.Text (Text)
import HsDev.Symbols.Location
class Sourced a where
sourcedName :: Lens' a Text
sourcedDocs :: Traversal' a Text
sourcedModule :: Lens' a ModuleId... | null | https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/HsDev/Symbols/Class.hs | haskell | module HsDev.Symbols.Class (
Sourced(..),
sourcedModuleName,
module HsDev.Symbols.Location
) where
import Control.Lens (Lens', Traversal')
import Data.Text (Text)
import HsDev.Symbols.Location
class Sourced a where
sourcedName :: Lens' a Text
sourcedDocs :: Traversal' a Text
sourcedModule :: Lens' a ModuleId... | |
091965fdcb11e51e173fcb221e57feebe0d93f3127bf3db43ca63f6a8cf09a0c | ocharles/zero-to-quake-3 | Context.hs | {-# language OverloadedStrings #-}
# language RecordWildCards #
module Quake3.Context ( Context(..), withQuake3Context ) where
-- base
import Control.Monad.IO.Class ( MonadIO, liftIO )
import Data.Traversable ( for )
import qualified Foreign
import qualified Foreign.C
-- managed
import Control.Monad.Managed ( MonadM... | null | https://raw.githubusercontent.com/ocharles/zero-to-quake-3/6fe4ef61955b8a816369cf70c0edd2cacfd911db/src/Quake3/Context.hs | haskell | # language OverloadedStrings #
base
managed
vulkan-api | # language RecordWildCards #
module Quake3.Context ( Context(..), withQuake3Context ) where
import Control.Monad.IO.Class ( MonadIO, liftIO )
import Data.Traversable ( for )
import qualified Foreign
import qualified Foreign.C
import Control.Monad.Managed ( MonadManaged )
sdl2
import qualified SDL
import qualified... |
2d58c048adb1f59bbc100d68d28e7fa3ba67f151d24cf4ce423b21603992882b | tezos/tezos-mirror | test_crouching.ml | * Testing
-------
Component : Remote - signature Backends
Invocation : dune build @src / lib_signer_backends / runtest
Subject : On pseudo - unique names for Ledger Nano S devices .
-------
Component: Remote-signature Backends
Invocation: dune build @src/lib_signe... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/ca6f1c08e5b7f8686cfa1b7a412ea47e018f4260/src/lib_signer_backends/unix/test/test_crouching.ml | ocaml | * Testing
-------
Component : Remote - signature Backends
Invocation : dune build @src / lib_signer_backends / runtest
Subject : On pseudo - unique names for Ledger Nano S devices .
-------
Component: Remote-signature Backends
Invocation: dune build @src/lib_signe... | |
9256be5bc2aa6f0710ba8ab7387b363e2338a85cffcab92dbee5ef2c55c29fe8 | flexsurfer/rn-shadow-steroid | basic.cljs | (ns steroid.rn.components.basic
(:require [reagent.core :as reagent]
["react-native" :as rn]))
(def view (reagent/adapt-react-class rn/View))
(def text (reagent/adapt-react-class rn/Text))
(def image (reagent/adapt-react-class rn/Image))
(def text-input (reagent/adapt-react-class rn/TextInput))
(def scro... | null | https://raw.githubusercontent.com/flexsurfer/rn-shadow-steroid/5dfa3f479a4148ae943b6f45da9c1650a009eef0/src/steroid/rn/components/basic.cljs | clojure | (ns steroid.rn.components.basic
(:require [reagent.core :as reagent]
["react-native" :as rn]))
(def view (reagent/adapt-react-class rn/View))
(def text (reagent/adapt-react-class rn/Text))
(def image (reagent/adapt-react-class rn/Image))
(def text-input (reagent/adapt-react-class rn/TextInput))
(def scro... | |
0607f547bfd901531bdf89e2f72bc5735c3924da5795aeff67806f8df9b4eecf | Kakadu/fp2022 | parser.mli | * Copyright 2022 - 2023 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
val parse : string -> (Ast.expr, string) result
| null | https://raw.githubusercontent.com/Kakadu/fp2022/836230c8130be216d8008c96249b42828b240d7e/SMLEqTypesValRestr/lib/parser.mli | ocaml | * Copyright 2022 - 2023 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
val parse : string -> (Ast.expr, string) result
| |
82d0cf1098c5a798935c546f59fc7db9c27e31ce0adf63daf15d135a4f065285 | juliannagele/ebso | pusharg.ml | Copyright 2018 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... | null | https://raw.githubusercontent.com/juliannagele/ebso/8e516036fcb98074b6be14fc81ae020f76977712/lib/pusharg.ml | ocaml | required for deriving enumerate | Copyright 2018 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... |
871b89df43ab989be01891850b476bf6e59e1fb71537979bd473f9625a31b13d | broadinstitute/wfl | environment.clj | (ns wfl.environment
"Map environment to various values here."
(:require [clojure.data.json :as json]
[clojure.string :as str]
[vault.client.http] ; vault.core needs this
[vault.core :as vault]
[wfl.log :as log]))
(declare getenv)
(defn ^:priv... | null | https://raw.githubusercontent.com/broadinstitute/wfl/ca30908a6b62aa3ea8e5e15c3b410263d0173ee9/api/src/wfl/environment.clj | clojure | vault.core needs this
-- variables used in test code below this line --
| (ns wfl.environment
"Map environment to various values here."
(:require [clojure.data.json :as json]
[clojure.string :as str]
[vault.core :as vault]
[wfl.log :as log]))
(declare getenv)
(defn ^:private vault-secrets
"Return the secrets at `path` in vau... |
0139611eb0477bc619f4e33c29e2053f5c15c5764afee7447c129a020f7d504a | melange-re/melange | ext_file_extensions.ml | type valid_input =
| Ml
| Mli
| Intf_ast
| Impl_ast
| Mlmap
| Cmi
| Cmj
| Unknown
* This is per - file based ,
when [ ocamlc ] [ -c -o another_dir / xx.cmi ]
it will return ( another_dir / xx )
when [ocamlc] [-c -o another_dir/xx.cmi]
it will return (another_dir/xx)
*)
let classi... | null | https://raw.githubusercontent.com/melange-re/melange/a8f6ddf9f46d51ffd1dde6095f655a8ca9fb6aa5/jscomp/ext/ext_file_extensions.ml | ocaml | type valid_input =
| Ml
| Mli
| Intf_ast
| Impl_ast
| Mlmap
| Cmi
| Cmj
| Unknown
* This is per - file based ,
when [ ocamlc ] [ -c -o another_dir / xx.cmi ]
it will return ( another_dir / xx )
when [ocamlc] [-c -o another_dir/xx.cmi]
it will return (another_dir/xx)
*)
let classi... | |
88995543971d31d01616721044102240c201a47fe412026b148cca77baf9ae66 | fulcrologic/statecharts | default_initial_state_spec.cljc | (ns com.fulcrologic.statecharts.algorithms.v20150901.default-initial-state-spec
(:require [com.fulcrologic.statecharts.elements :refer
[state initial parallel final transition raise on-entry on-exit
data-model assign script]]
[com.fulcrologic.statecharts :as sc]
[com... | null | https://raw.githubusercontent.com/fulcrologic/statecharts/dbb4a882e8b292711d543dd699568dd125fc9b14/src/test/com/fulcrologic/statecharts/algorithms/v20150901/default_initial_state_spec.cljc | clojure | (ns com.fulcrologic.statecharts.algorithms.v20150901.default-initial-state-spec
(:require [com.fulcrologic.statecharts.elements :refer
[state initial parallel final transition raise on-entry on-exit
data-model assign script]]
[com.fulcrologic.statecharts :as sc]
[com... | |
480949c12e52b5db464b3c5c7a482ca03d2ee9e7a002beb7082c526d9818e9ce | spwhitton/consfigurator | image.lisp | ;;; Consfigurator -- Lisp declarative configuration management system
Copyright ( C ) 2021 - 2022 < >
;;; This file 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 , or ( at your opt... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/112316504ab81f459a5b00514bd3f9fae968dde0/src/image.lisp | lisp | Consfigurator -- Lisp declarative configuration management system
This file is free software; you can redistribute it and/or modify
either version 3 , or ( at your option )
any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty o... |
Copyright ( C ) 2021 - 2022 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :consfigurator)
(named-readtables:in-readtable :consfigurator)
Remote Lisp images
Remote Lisp images fork right after l... |
1a77683b27017155550abd050ebfc553214585c139b8cca22f54c0b5022586e4 | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-cloudiot/gen/Gogol/CloudIOT/Projects/Locations/Registries/Groups/Devices/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
List devices in a device registry.
* Resource
** Constructing a Request
| A resource alias for @cloudiot.projects.locations.registries.groups.devices.list@ method which the
| List devices in a device registry.
/See:/ 'newCl... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
31353b2b2aafb1fb4152faac86048dfe62060562f80847f8737438214234d5e4 | songyahui/AlgebraicEffect | flip.ml |
effect Choose : int
let choose ()
(*@ requires _^* @*)
(*@ ensures Choose @*)
= perform Choose
let toss ()
(*@ requires _^* @*)
@ ensures ( Choose . Choose ) \/ Choose @
=
let a = choose () in
if a = 0
then let b = choose () in if b = 0 then "heads, heads" else "heads, tails"
else "tails"
: debug th... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/programs.t/flip.ml | ocaml | @ requires _^* @
@ ensures Choose @
@ requires _^* @
@ requires emp, eff(m)= _^* -> A @
@ ensures A @
let () =
List.iter print_endline (all_results toss)
|
effect Choose : int
let choose ()
= perform Choose
let toss ()
@ ensures ( Choose . Choose ) \/ Choose @
=
let a = choose () in
if a = 0
then let b = choose () in if b = 0 then "heads, heads" else "heads, tails"
else "tails"
: debug the if constructs
let all_results m
=
match m () with
| v -> [v]
... |
e5e5aaaade46fe71f775c9acd92311d4df9d1c32148f303d7d8290f54ddedb3b | tari3x/csec-modex | pievent.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/pievent.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
411c3b2c08e3c8282ee58460627248eb9947d16bea62c1da1e0859c866a78311 | the-dr-lazy/cascade | Prelude.hs | |
Module : Cascade . Api . Hedgehog . Gen. Prelude
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCRIPTI... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/test/Cascade/Api/Hedgehog/Gen/Prelude.hs | haskell | |
Module : Cascade . Api . Hedgehog . Gen. Prelude
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCRIPTI... | |
ff30dd59b3f1340b6fbf717b51968432c8d7618baa83daf61faed9da5c465cae | kupl/LearnML | original.ml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec evalexp (f : exp) : int =
match f with
| Num x -> x
| Plus... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub45/original.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec evalexp (f : exp) : int =
match f with
| Num x -> x
| Plus... | |
fa2986f547e4c84132c2361e593b908ffc41844202c324a3b377cf6682bc78fb | c-cube/funarith | Linear_expr.ml |
module Make = Funarith.Linear_expr.Make(Rat_zarith)
module Make_var_gen = Funarith.Linear_expr.Make_var_gen
| null | https://raw.githubusercontent.com/c-cube/funarith/1c86ac45e9608efaa761e3f14455402730885339/src/zarith/Linear_expr.ml | ocaml |
module Make = Funarith.Linear_expr.Make(Rat_zarith)
module Make_var_gen = Funarith.Linear_expr.Make_var_gen
| |
b3fcd012933394d8c150d148ef4128d63f5cf800c1940685540927564a5762db | SKA-ScienceDataProcessor/RC | Maps.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE BangPatterns #-}
{- | Common data structures for naive interpreter -}
module Flow.Run.Maps where
import Control.Monad
import Data.Binary.Get (runGet)
import Data.Binary.Put (runPut)
import Data.Binary
import qualified Data.IntMap as IM
import qualified Data.IntSet ... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS6/dna/flow/Flow/Run/Maps.hs | haskell | # LANGUAGE BangPatterns #
| Common data structures for naive interpreter
| Set of kernels
This is used in interpretation for reasoning about data
dependencies. Note that kernels are synonymous with their output
data, so this also identifies a set of buffers we expect to be
alive.
| Set of domains
Domain depe... | # LANGUAGE ExistentialQuantification #
module Flow.Run.Maps where
import Control.Monad
import Data.Binary.Get (runGet)
import Data.Binary.Put (runPut)
import Data.Binary
import qualified Data.IntMap as IM
import qualified Data.IntSet as IS
import qualified Data.Map.Strict as Map
import qualified Data.ByteString.Lazy... |
6c5a5621b81ad38676e99cef0b1e15a2f041db82223da9924bdc23203afa7607 | lfe/lfe | lfe_docs.erl | Copyright ( c ) 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
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under ... | null | https://raw.githubusercontent.com/lfe/lfe/4c9f2ede47f710dfb0548d4e32793ad5766ca8fa/src/lfe_docs.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2022
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author :
Purpose : Lisp Flavoured Erlang documentation handling .
.
The " Docs " format from EEP 48 : Documentation storage and format
... |
263bb27806b980876e93203c29177c5288fa7e050ce902c8c08ec67280adb906 | typelead/eta | Tc267b.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Tc267b where
import Tc267a
y = S
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc267/Tc267b.hs | haskell | # LANGUAGE DeriveDataTypeable # | module Tc267b where
import Tc267a
y = S
|
5c6eeb08e3f111b066e6d82a5294576ac600e872a58bd0281b8c197cd0d106f7 | Verites/verigraph | CriticalPairAnalysis.hs | # LANGUAGE TupleSections #
module CriticalPairAnalysis
( Options
, options
, execute
) where
import Control.Monad (when)
import Data.Matrix (Matrix)
import qualified Data.Matrix as Matrix
import Data.Maybe... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/CLI/CriticalPairAnalysis.hs | haskell | | Evolutionary Spans to Strings | # LANGUAGE TupleSections #
module CriticalPairAnalysis
( Options
, options
, execute
) where
import Control.Monad (when)
import Data.Matrix (Matrix)
import qualified Data.Matrix as Matrix
import Data.Maybe... |
97c6a696c0402d348b7f6c0ded944c26c75de66f7609fd0009ed60a1805a8846 | racket/typed-racket | object-private.rkt | #lang typed/racket/shallow
;; Expect no shape-check in domain,
;; but yes in the body
(define c%
(class object%
(super-new)
(define/private (g (x : (Listof Symbol))) : Symbol
(car x))))
| null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/unit-tests/shallow-rewrite-expansion/object-private.rkt | racket | Expect no shape-check in domain,
but yes in the body | #lang typed/racket/shallow
(define c%
(class object%
(super-new)
(define/private (g (x : (Listof Symbol))) : Symbol
(car x))))
|
3170117efdbc6946cedcfa98440adc54c1f52e6281b7048323ac85df2ebfb783 | xapi-project/xen-api-libs | close_all_fds_except.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/tests/close_all_fds_except.ml | ocaml | * Test the close_all_fds_except
fds' are the ones we think should be open. open_fds are the ones which actually are
fds is now an array of file descriptor options
close some of the fds
choose some of the fds to keep |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... |
a7c4ae10b14a2f3c144e79067e3b14389b234ff0e180d6df746eabb03279a2ea | richardharrington/robotwar | assembler_test.clj | (ns robotwar.assembler-test
(:use [clojure.string :only [join]]
[clojure.test]
[midje.sweet]
[robotwar.assembler]))
(def line1 "IF DAMAGE # D GOTO MOVE ; comment or something")
(def line2 "AIM-17 TO AIM ; other comment")
(def line3 "IF X<-5 GOTO SCAN ; third comment")... | null | https://raw.githubusercontent.com/richardharrington/robotwar/7f826649dd1a141fdacebb30d843773ceb5fee1f/test/robotwar/assembler_test.clj | clojure | this will be an error: no lower-case
And now for the tests.
| (ns robotwar.assembler-test
(:use [clojure.string :only [join]]
[clojure.test]
[midje.sweet]
[robotwar.assembler]))
(def line1 "IF DAMAGE # D GOTO MOVE ; comment or something")
(def line2 "AIM-17 TO AIM ; other comment")
(def line3 "IF X<-5 GOTO SCAN ; third comment")... |
9d69a79173d56cdcb88b816189e08ce1b9e1d97f3590b9c4444afaa26538a96a | dschrempf/blog | MarkovChainWithMap.hs | -- The skeleton of this file is from
-sequence-from-markov-chain-in-haskell
-- However, it has been refactored quite a bit and comments have been added.
module Main where
import qualified Control.Monad.Random as R
import qualified Data.Map as M
-- | In this example, we handle sentences with words. So our states a... | null | https://raw.githubusercontent.com/dschrempf/blog/c28ca3929ead2562702d80795db46a818bf9ce07/org/Coding/src/MarkovChainWithMap.hs | haskell | The skeleton of this file is from
However, it has been refactored quite a bit and comments have been added.
| In this example, we handle sentences with words. So our states are strings.
For better readability of the code, it is convenient to distinguish between
the source and the target.
(together with an initial... | -sequence-from-markov-chain-in-haskell
module Main where
import qualified Control.Monad.Random as R
import qualified Data.Map as M
type Source = String
type Target = String
| Transition from ' Source ' to ' Target ' observed in a sample .
type Transitions = [(Source, Target)]
| A ' Target ' with associated ... |
a273335a9b63d11bbcf6445daf6d2fc3c9270361285b43d9efe5f0a5699d2a60 | Helium4Haskell/helium | Export7.hs | module Export7(f, f) where
f :: Int
f = 3
main :: Int
main = f | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/exports/Export7.hs | haskell | module Export7(f, f) where
f :: Int
f = 3
main :: Int
main = f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.