_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 |
|---|---|---|---|---|---|---|---|---|
9d921d23ff27e51c5a53f95bd448859900d7e7fa238889f6d0efd515bdb737db | samply/blaze | graphql_test.clj | (ns blaze.fhir.operation.graphql-test
(:require
[blaze.db.api-stub :refer [mem-node-system with-system-data]]
[blaze.executors :as ex]
[blaze.fhir.operation.graphql :as graphql]
[blaze.fhir.operation.graphql.test-util :refer [wrap-error]]
[blaze.log]
[blaze.middleware.fhir.db :refer [wrap-db]]... | null | https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/operation-graphql/test/blaze/fhir/operation/graphql_test.clj | clojure | (ns blaze.fhir.operation.graphql-test
(:require
[blaze.db.api-stub :refer [mem-node-system with-system-data]]
[blaze.executors :as ex]
[blaze.fhir.operation.graphql :as graphql]
[blaze.fhir.operation.graphql.test-util :refer [wrap-error]]
[blaze.log]
[blaze.middleware.fhir.db :refer [wrap-db]]... | |
a6a0c537471ea18d1c444cf9c7dcbc010c4e19f6a95ce43662751495f839aa78 | metaocaml/ber-metaocaml | variant.ml | (* TEST
* expect
*)
PR#6394
module rec X : sig
type t = int * bool
end = struct
type t = A | B
let f = function A | B -> 0
end;;
[%%expect{|
Lines 3-6, characters 6-3:
3 | ......struct
4 | type t = A | B
5 | let f = function A | B -> 0
6 | end..
Error: Signature mismatch:
Modules do not match:
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-misc/variant.ml | ocaml | TEST
* expect
PR#7838 |
PR#6394
module rec X : sig
type t = int * bool
end = struct
type t = A | B
let f = function A | B -> 0
end;;
[%%expect{|
Lines 3-6, characters 6-3:
3 | ......struct
4 | type t = A | B
5 | let f = function A | B -> 0
6 | end..
Error: Signature mismatch:
Modules do not match:
sig type t = X.t = A... |
45b37f0db9c6e328d15d99cb349a0798a90f020e00cde8e708a414ea0711e1c5 | MercuryTechnologies/ghc-specter | GHCCore.hs | module GHCSpecter.Render.Components.GHCCore (
renderTopBind,
) where
import Concur.Core (Widget)
import Data.List qualified as L
import Data.Text qualified as T
import GHCSpecter.Data.GHC.Core (
Alt (..),
AltCon (..),
Bind (..),
Expr (..),
Id (..),
Literal (..),
)
import GHCSpecter.Render.Util (divClass... | null | https://raw.githubusercontent.com/MercuryTechnologies/ghc-specter/d911e610e0ee0fb43497dad9e762fec2abbf9e08/daemon/src/GHCSpecter/Render/Components/GHCCore.hs | haskell | suppress type, i.e. drop
TODO: handle this correctly and customizable.
simplify as curry
special treatment for readability
ignore Coercion for now
TODO: will be available as user asks.
ignore Type for now
TODO: will be available as user asks. | module GHCSpecter.Render.Components.GHCCore (
renderTopBind,
) where
import Concur.Core (Widget)
import Data.List qualified as L
import Data.Text qualified as T
import GHCSpecter.Data.GHC.Core (
Alt (..),
AltCon (..),
Bind (..),
Expr (..),
Id (..),
Literal (..),
)
import GHCSpecter.Render.Util (divClass... |
f9a9c9721daa2676b3d4fbf56b2334f2ece44ffa33add4d6bdd94360755f5679 | andorp/bead | EmailTemplate.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE CPP #
module Bead.View.EmailTemplate
( EmailTemplate
, emailTemplate
, runEmailTemplate
, RegTemplate(..)
, ForgottenPassword(..)
, Template
, registration
, forgottenPassword
#ifdef TEST
, runEmailTemplateTests
#endif
) where
import Data.Data
import q... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/EmailTemplate.hs | haskell | # LANGUAGE DeriveDataTypeable #
Email template is a function to an IO String computation
Interpretation: The email template is applied to a value
and produces a string value with the field filled up
the values from the given type.
| Produces a IO String computation, that represents the
evaluated template substitu... | # LANGUAGE CPP #
module Bead.View.EmailTemplate
( EmailTemplate
, emailTemplate
, runEmailTemplate
, RegTemplate(..)
, ForgottenPassword(..)
, Template
, registration
, forgottenPassword
#ifdef TEST
, runEmailTemplateTests
#endif
) where
import Data.Data
import qualified Data.Text.Lazy as DTL
impor... |
576a4b1adef7acdd41dc90533133e76ea7e1105118604240c8e57d3cae8699a9 | alanz/ghc-exactprint | Undefined8.hs | # LANGUAGE QuasiQuotes , TypeFamilies , PackageImports #
module Text.Markdown.Pap.Parser (
parseMrd
) where
import Control.Arrow
import "monads-tf" Control.Monad.State
import "monads-tf" Control.Monad.Error
import Data.Maybe
import Data.Char
import Text.Papillon
import Text.Markdown.Pap.Text
parseMrd :: String ... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/Undefined8.hs | haskell | # LANGUAGE QuasiQuotes , TypeFamilies , PackageImports #
module Text.Markdown.Pap.Parser (
parseMrd
) where
import Control.Arrow
import "monads-tf" Control.Monad.State
import "monads-tf" Control.Monad.Error
import Data.Maybe
import Data.Char
import Text.Papillon
import Text.Markdown.Pap.Text
parseMrd :: String ... | |
0e9396d05cfc10794a8381ffd7306b189e8c676d8181482cb219f361ddd994fa | kupl/LearnML | patch.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((aexp : aexp), (x : string)) : aexp =
match aexp with
| Const i -> Const 0
| Var k -> if k != x then Const 0 else Const 1
| Power (k, i) ->
if k != x then Const 0 else Time... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub63/patch.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((aexp : aexp), (x : string)) : aexp =
match aexp with
| Const i -> Const 0
| Var k -> if k != x then Const 0 else Const 1
| Power (k, i) ->
if k != x then Const 0 else Time... | |
632d5f658bb11ee1d76ce73b60820ed49594b6fe29daf1bbeb12d7fe1f9b6cb2 | Smoltbob/Caml-Est-Belle | bsyntax.ml | open Printf;;
open List;;
* This module defines the type of the AST as well as functions
to display it .
to display it.*)
type t =
| Int of int
| Float of float
| Neg of Id.t
| Add of Id.t * t
| Sub of Id.t * t
| Land of Id.t * t
| Var of Id.t
| Eq of Id.t * t
| Call of Id.t *... | null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/compiler/bsyntax.ml | ocaml | | LetCls of Id.t * t * asmt
| Additional case for parenthesis ? Don't think so ?
We will need the name, arguments and return type for functions
Once we implement functions we will have a list
* Prints the functions arguments. They are stored in a list.
@param argu the list of arguments
* Prints expressions ... | open Printf;;
open List;;
* This module defines the type of the AST as well as functions
to display it .
to display it.*)
type t =
| Int of int
| Float of float
| Neg of Id.t
| Add of Id.t * t
| Sub of Id.t * t
| Land of Id.t * t
| Var of Id.t
| Eq of Id.t * t
| Call of Id.t *... |
d6076f1e900fe1d5bdc84554e6f23ed3e2960854800f622616f1ce9c2aed5405 | janestreet/base | float0.ml | open! Import
(* Open replace_polymorphic_compare after including functor instantiations so they do not
shadow its definitions. This is here so that efficient versions of the comparison
functions are available within this module. *)
open! Float_replace_polymorphic_compare
let ceil = Stdlib.ceil
let floor = Stdli... | null | https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/float0.ml | ocaml | Open replace_polymorphic_compare after including functor instantiations so they do not
shadow its definitions. This is here so that efficient versions of the comparison
functions are available within this module.
Raise in case of a negative modulus, as does Int.( % ).
Produce a non-negative result in analogy... | open! Import
open! Float_replace_polymorphic_compare
let ceil = Stdlib.ceil
let floor = Stdlib.floor
let mod_float = Stdlib.mod_float
let modf = Stdlib.modf
let float_of_string = Stdlib.float_of_string
let float_of_string_opt = Stdlib.float_of_string_opt
let nan = Stdlib.nan
let infinity = Stdlib.infinity
let neg_inf... |
163537eedecbc6b605ced98b14ac3a891168f43e528fef2ed0bd23813b7ac36f | dinosaure/multipart_form | multipart_form.mli | (** {1 Multipart-form.}
The MIME type [multipart/form-data] is used to express values submitted
through a [<form>]. This module helps the user to extract these values from
an input. *)
module Field_name : sig
type t = private string
val compare : t -> t -> int
val equal : t -> t -> bool
val capital... | null | https://raw.githubusercontent.com/dinosaure/multipart_form/98b8951bee66fe70c9793f9d3ca6d3957447defe/lib/multipart_form.mli | ocaml | * {1 Multipart-form.}
The MIME type [multipart/form-data] is used to express values submitted
through a [<form>]. This module helps the user to extract these values from
an input.
* [of_string str] returns the [Content-Type] value from a string
which come from your HTTP stack. {b NOTE}: the string {b ... |
module Field_name : sig
type t = private string
val compare : t -> t -> int
val equal : t -> t -> bool
val capitalize : t -> t
val canonicalize : t -> t
val of_string : string -> (t, [> `Msg of string ]) result
val of_string_exn : string -> t
val v : string -> t
val prefixed_by : string -> t -> bool... |
fc88c748b7ced789abd0cfe39a3b92ad724ab9a118412973e8afd6d7a08f9b54 | inhabitedtype/ocaml-aws | addTagsToResource.ml | open Types
open Aws
type input = AddTagsToResourceMessage.t
type output = unit
type error = Errors_internal.t
let service = "rds"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region))... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/addTagsToResource.ml | ocaml | open Types
open Aws
type input = AddTagsToResourceMessage.t
type output = unit
type error = Errors_internal.t
let service = "rds"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region))... | |
3045833c16a41d8dd950123bbda37ed08e01e0685bc544758a0e01010f00d69f | rtoy/cmucl | vm-macs.lisp | ;;; -*- Package: VM -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/compiler/generic/vm-macs.lisp $")
;;;
;... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/generic/vm-macs.lisp | lisp | -*- Package: VM -*-
**********************************************************************
**********************************************************************
This file contains some macros and constants that are object-format
specific or are used for defining the object format.
Other random stuff.
... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/compiler/generic/vm-macs.lisp $")
Written by and .
(in-package "VM")
(intl:textdomain "cmucl")
PAD - DATA - BLOCK -- Internal Interfa... |
3fbd2cef500577dd52c9ed87b5f6db1f00852b0d21879a0fec1cd155c2699925 | mcandre/genetics | HelloGenetics.hs | {-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import System.Random as Rand
import Genetics
import Control.Monad (replicateM)
target :: String
target = "Hello World!"
generations :: Int
generations = (2 :: Int) ^ (16 :: Int)
randomIndex... | null | https://raw.githubusercontent.com/mcandre/genetics/02426bd4087e8913ae24d813d2260d7d7079a8a0/src/HelloGenetics.hs | haskell | # LANGUAGE TypeSynonymInstances # | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import System.Random as Rand
import Genetics
import Control.Monad (replicateM)
target :: String
target = "Hello World!"
generations :: Int
generations = (2 :: Int) ^ (16 :: Int)
randomIndex :: IO Int
randomIndex = getStdRandom ... |
05e38f810c4e7d45cee9b1fe6b5917a2adccfecb30416c3d9aee89908bc11633 | ekmett/category-extras | State.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Indexed.State
Copyright : ( C ) 2008
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
Portability : portable ( although the MTL i... | null | https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Monad/Indexed/State.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Monad.Indexed.State
License : BSD-style (see the file LICENSE)
Stability : experimental
--------------------------------------------------------------------------
Indexed State Monad | Copyright : ( C ) 2008
Maintainer : < >
Portability : portable ( although the MTL instances are n't ! )
module Control.Monad.Indexed.State
( IxMonadState(..)
, imodify
, igets
, IxStateT(..)
, IxState(..)
) where
import Control.Applicative
import Control.Category.Hask
import Control . Ca... |
c9796fa0f23ce4503cf7105f6de9c7af242fa8d78b2958d5cf4f76ff30ff9dad | typelead/eta | tc033.hs | module ShouldSucceed where
data Twine = Twine2 Twist
data Twist = Twist2 Twine
type F = Twine
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc033.hs | haskell | module ShouldSucceed where
data Twine = Twine2 Twist
data Twist = Twist2 Twine
type F = Twine
| |
9fe60dc2429eb050f9cdf9f4595db8334011b0ed3e1ca122019ef2ffca58fc14 | shirok/Gauche | flonum.scm | ;;;
scheme.flonum - Flonums ( )
;;;
Copyright ( c ) 2019 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copyri... | null | https://raw.githubusercontent.com/shirok/Gauche/88b013677a57614a05b2c1d0167dfb7059d457d3/ext/scheme/flonum.scm | scheme |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in b... | scheme.flonum - Flonums ( )
Copyright ( c ) 2019 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
Originally... |
2476ff7d7b70f18b8c9fe5d11113067ebceed884a095f8d66e7fcd02f3795bf8 | xapi-project/xenopsd | bootloader.mli |
* 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/xenopsd/f4da21a4ead7c6a7082af5ec32f778faf368cf1c/lib/bootloader.mli | ocaml | * Raised when we can't parse the output of the bootloader
* Raised when we can't parse the error from the bootloader
* Raised when the bootloader returns an error
* Raised when an unknown bootloader is used
* Extract the default kernel from the disk
* Delete the extracted kernel |
* 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... |
52dd5f112f87b786f217759e0fe003b5ad3a3b2a7a422c09ba9a65ae8686259d | starburstdata/metabase-driver | unprepare.clj | ;;
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 the License is distributed on... | null | https://raw.githubusercontent.com/starburstdata/metabase-driver/7cfdf39bf3afd47405d6a98d746fa169ec3101bc/drivers/starburst/src/metabase/driver/implementation/unprepare.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... |
distributed under the License is distributed on an " AS IS " BASIS ,
(ns metabase.driver.implementation.unprepare"Unprepare implementation for Starburst driver."
(:require [buddy.core.codecs :as codecs]
[java-time :as t]
[metabase.driver.sql.util :as sql.u]
[metabase.driver.sql... |
876f44ddcd68ed4b7b24cdc6a8022d2fb97446b8d974aa6c74182e31db2f9c05 | BoeingX/haskell-programming-from-first-principles | SemigroupExercisesSpec.hs | module Monoid.ChapterExercises.SemigroupExercisesSpec where
import Test.Hspec
import Test.QuickCheck
import Monoid.ChapterExercises.SemigroupExercises
semigroupAssoc :: (Eq m, Semigroup m) => m -> m -> m -> Bool
semigroupAssoc a b c = (a <> (b <> c)) == ((a <> b) <> c)
spec :: Spec
spec = do
describe "Test Semig... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/test/Monoid/ChapterExercises/SemigroupExercisesSpec.hs | haskell | module Monoid.ChapterExercises.SemigroupExercisesSpec where
import Test.Hspec
import Test.QuickCheck
import Monoid.ChapterExercises.SemigroupExercises
semigroupAssoc :: (Eq m, Semigroup m) => m -> m -> m -> Bool
semigroupAssoc a b c = (a <> (b <> c)) == ((a <> b) <> c)
spec :: Spec
spec = do
describe "Test Semig... | |
99f4078e64199d286776fde314ae0686f59e06880fb6c9cea6f0e8e8415d2f60 | racket/plai | test-framework.rkt | #lang plai/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 28)
(halt-on-errors #t)
(test/value=? 12 12)
| null | https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/test-framework.rkt | racket | #lang plai/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 28)
(halt-on-errors #t)
(test/value=? 12 12)
| |
65a7bfb36389b32c963332891353ca91a915729db82acbcf48814e05f443e480 | IxpertaSolutions/freer-effects | State.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module Tests.State (tests)
where
import Prelude ((+))
import Control.Applicative (pure)
import Control.Monad ((>>))
import Data.Eq ((==))
import Data.Function (($), (.))
import Data.Int (Int)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Quic... | null | https://raw.githubusercontent.com/IxpertaSolutions/freer-effects/39a7e62cc049d43d36ece4ac24ba19e545f0b726/tests/Tests/State.hs | haskell | Destroy the previous state. | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module Tests.State (tests)
where
import Prelude ((+))
import Control.Applicative (pure)
import Control.Monad ((>>))
import Data.Eq ((==))
import Data.Function (($), (.))
import Data.Int (Int)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Quic... |
e265921a51e51034d8167f45febfbf52b55c436dac7e8a97ac19b925a05cb9c2 | thheller/shadow-cljsjs | sw.cljs | (ns cljsjs.moment.locale.sw
(:require ["moment/locale/sw"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/sw.cljs | clojure | (ns cljsjs.moment.locale.sw
(:require ["moment/locale/sw"]))
| |
76966a214b31b36a64258595bd19e6bca198447c4790d7c2c7f92aa61d038535 | SKS-Keyserver/sks-keyserver | cMarshal.mli | val marshal_string :
< upcast : #Channel.out_channel_obj; write_byte : int -> unit;
write_char : char -> unit; write_float : float -> unit;
write_int : int -> unit; write_int32 : int32 -> unit;
write_int64 : int64 -> unit; write_string : string -> unit;
write_string_pos : buf:string -> pos:int -> len:... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/cMarshal.mli | ocaml | val marshal_string :
< upcast : #Channel.out_channel_obj; write_byte : int -> unit;
write_char : char -> unit; write_float : float -> unit;
write_int : int -> unit; write_int32 : int32 -> unit;
write_int64 : int64 -> unit; write_string : string -> unit;
write_string_pos : buf:string -> pos:int -> len:... | |
52b7eff9323999597ef6e48fc7aa7b7f12593b7d5660699997f138b35881caec | jyh/metaprl | hol_core.mli |
* HOL theory .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2004 Mojave Group , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publi... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/hol/hol_core.mli | ocaml | !
* @docoff
*
* -*-
* Local Variables:
* Caml-master: "compile"
* End:
* -*-
|
* HOL theory .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2004 Mojave Group , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publi... |
76752d54d5181e911dad5bbac7f90e0393c74c433c856d727b30e73b4f786f02 | inaka/beam_olympics | bo_stats_SUITE.erl | -module(bo_stats_SUITE).
-author('').
-export([all/0]).
-export([init_per_suite/1, end_per_suite/1]).
-export([ initial_stats/1
, players_playing/1
]).
-type config() :: proplists:proplist().
-spec all() -> [atom()].
all() -> [initial_stats, players_playing].
-spec init_per_suite(config()) -> config... | null | https://raw.githubusercontent.com/inaka/beam_olympics/9b16afd54f25c0996430139e9646c3cfdfbdf86b/test/bo_stats_SUITE.erl | erlang | -module(bo_stats_SUITE).
-author('').
-export([all/0]).
-export([init_per_suite/1, end_per_suite/1]).
-export([ initial_stats/1
, players_playing/1
]).
-type config() :: proplists:proplist().
-spec all() -> [atom()].
all() -> [initial_stats, players_playing].
-spec init_per_suite(config()) -> config... | |
33c3d54a798f45b50b4ce677513061fd697232483742868fa30bff1fdfd2581e | nd/sicp | 4.11.scm | (define (make-binding var val) (cons var val))
(define (binding-var binding) (car binding))
(define (binding-val binding) (cdr binding))
(define (set-binding-val! binding value) (set-cdr! binding value))
(define (make-frame bindings) (list bindings))
(define (frame-bindings frame) (car frame))
(define (set-frame-bindi... | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch04/4.11.scm | scheme | (define (make-binding var val) (cons var val))
(define (binding-var binding) (car binding))
(define (binding-val binding) (cdr binding))
(define (set-binding-val! binding value) (set-cdr! binding value))
(define (make-frame bindings) (list bindings))
(define (frame-bindings frame) (car frame))
(define (set-frame-bindi... | |
6c22939dc9365cada4030c390e9fba15f6defb1f8fe83413d09e64ab4327ed84 | BU-CS320/Fall-2018 | Lang0Test.hs | module Lang0Test where
import Data.Char
import Test.Tasty (testGroup)
import Test.Tasty.HUnit (assertEqual, assertBool, testCase)
import Test.Tasty.QuickCheck
import Lang0(Ast(AstInt,Plus), eval)
import Lang0Parser(unsafeParser, parser)
-- if some hero wants to write these for all data, I'm sure the clas... | null | https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week7/hw/tests/Lang0Test.hs | haskell | if some hero wants to write these for all data, I'm sure the class will appreciate it!
See: -quickcheck-tutorial-generators
TODO: your tests here
| module Lang0Test where
import Data.Char
import Test.Tasty (testGroup)
import Test.Tasty.HUnit (assertEqual, assertBool, testCase)
import Test.Tasty.QuickCheck
import Lang0(Ast(AstInt,Plus), eval)
import Lang0Parser(unsafeParser, parser)
instance Arbitrary Ast where
arbitrary = sized arbitrarySizedAs... |
b74d5ec12f503db5d25a7340594327e49ce705578e85a562c6117fcf42cad4e2 | skypher/paktahn | tests.lisp | (defpackage :paktahn-tests
(:use :cl :paktahn :fiveam)
(:export #:run!))
(in-package :paktahn-tests)
;; It will make sense to split this up into several suites as we get more tests.
i.e. ( libalpm , pkgbuild , customizepkg , argv , etc )
(def-suite :pak)
(in-suite :pak)
(test t-is-not-null
(is (not (null t)... | null | https://raw.githubusercontent.com/skypher/paktahn/ab2d3f91675bd658f7eec9186d3fd6db588ef413/tests/tests.lisp | lisp | It will make sense to split this up into several suites as we get more tests. | (defpackage :paktahn-tests
(:use :cl :paktahn :fiveam)
(:export #:run!))
(in-package :paktahn-tests)
i.e. ( libalpm , pkgbuild , customizepkg , argv , etc )
(def-suite :pak)
(in-suite :pak)
(test t-is-not-null
(is (not (null t))))
|
df683841ddcc5cbc5a8b2655cb8fb0dec05668aecdb9bd40eed60ce286ece80a | andrejbauer/clerical | type.ml | (* Value types *)
type valty =
| Boolean
| Integer
| Real
(* Command types *)
type cmdty =
| Data of valty
| Command
(* Function types *)
type funty = valty list * cmdty
(** Print a value type *)
let print_valty dt ppf =
match dt with
| Boolean -> Format.fprintf ppf "boolean"
| Integer -> Format.fpri... | null | https://raw.githubusercontent.com/andrejbauer/clerical/6916f1de50f812921fe187bdaec830e06f4dcde8/src/type.ml | ocaml | Value types
Command types
Function types
* Print a value type
* Print a command type | type valty =
| Boolean
| Integer
| Real
type cmdty =
| Data of valty
| Command
type funty = valty list * cmdty
let print_valty dt ppf =
match dt with
| Boolean -> Format.fprintf ppf "boolean"
| Integer -> Format.fprintf ppf "integer"
| Real -> Format.fprintf ppf "real"
let print_cmdty t ppf =
ma... |
0ff6dabc13ee01ab967620a19d2dc1f6c05d3ddb27e98c01ed1b6c51de21a66d | patricoferris/ocaml-ipld | test.ml | let ipld = Alcotest.testable Ipld.pp Stdlib.( = )
let cbor =
Alcotest.testable
(fun ppf v -> Fmt.pf ppf "%s" (CBOR.Simple.to_diagnostic v))
Stdlib.( = )
let read_file fpath =
let ic = open_in fpath in
let rec read acc =
try read (input_line ic :: acc)
with End_of_file -> List.rev acc |> String.c... | null | https://raw.githubusercontent.com/patricoferris/ocaml-ipld/84a035dd42b9392a0cb9070ee3ddf18816fce8c1/test/dag-cbor/test.ml | ocaml | CBOR is having a hard time of integers | let ipld = Alcotest.testable Ipld.pp Stdlib.( = )
let cbor =
Alcotest.testable
(fun ppf v -> Fmt.pf ppf "%s" (CBOR.Simple.to_diagnostic v))
Stdlib.( = )
let read_file fpath =
let ic = open_in fpath in
let rec read acc =
try read (input_line ic :: acc)
with End_of_file -> List.rev acc |> String.c... |
c17155634613345baa3cc2bee428613fdaf83973adfd24003a97fc51113473ab | geophf/1HaskellADay | Exercise.hs | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2018.M04.D11.Exercise where
-
Like we 've done before , we need to download packets of information ( articles )
and ( eventually ) store those articles , but also store the packet information
that we used to download the articles
see also : Y2017.M12.D20.E... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M04/D11/Exercise.hs | haskell | }
(I call it Protec for 'reasons' ... yes, I'm weird)
Note, we want to insert a Stamped Protec at the time of insert, hint-hint
insert the above value. What value do you get in return?
we'll do article insertion from Protec values and article-packet join later | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2018.M04.D11.Exercise where
-
Like we 've done before , we need to download packets of information ( articles )
and ( eventually ) store those articles , but also store the packet information
that we used to download the articles
see also : Y2017.M12.D20.E... |
5a4034123fc77d6e50955ea93e01be203c0409977cc4136792181c542268582e | dhess/hpio | MockSpec.hs | # OPTIONS_GHC -fno - warn - incomplete - patterns -fno - warn - incomplete - uni - patterns #
{-# LANGUAGE OverloadedStrings #-}
module Test.System.GPIO.Linux.Sysfs.MockSpec (spec) where
import Protolude hiding (readFile, writeFile)
import GHC.IO.Exception (IOErrorType(..))
import System.GPIO.Linux.Sysfs.Mock
import ... | null | https://raw.githubusercontent.com/dhess/hpio/27004ef379db5d35e240222d6ba4cf91da9ec14d/test/Test/System/GPIO/Linux/Sysfs/MockSpec.hs | haskell | # LANGUAGE OverloadedStrings #
Note: most interesting cases are already checked by the
tests in 'SysfsGpioMockSpec.hs' and it would be a bit silly
to try to test them here due to the amount of setup
required to get the filesystem into the necessary state.
(We would basically end up rewriting large chunks of the
S... | # OPTIONS_GHC -fno - warn - incomplete - patterns -fno - warn - incomplete - uni - patterns #
module Test.System.GPIO.Linux.Sysfs.MockSpec (spec) where
import Protolude hiding (readFile, writeFile)
import GHC.IO.Exception (IOErrorType(..))
import System.GPIO.Linux.Sysfs.Mock
import System.GPIO.Types (Pin(..), PinValu... |
b67bd5de39fd605e5f1ffb5ad54d62e749b85ab5f0160dc5a61324e590029a5b | bsansouci/reasonglexampleproject | jpgmark.ml | (***********************************************************************)
(* *)
CamlImages
(* *)
(* ... | null | https://raw.githubusercontent.com/bsansouci/reasonglexampleproject/4ecef2cdad3a1a157318d1d64dba7def92d8a924/vendor/camlimages/test/jpgmark.ml | ocaml | *********************************************************************
Jun Furuse
... | CamlImages
Copyright 1999 - 2013 ,
$ I d : test.ml , v 1.32.2.1 2010/05/13 13:14:47 furuse Exp $
let dump path =
Format.eprintf "File: %s@." path;
let markers = Jpeg.read_markers path in
prerr_endlin... |
6d02fbc176cb36d0dbbbb2a2471a0da4b67a03b56e6b4c45267818c62f9d3799 | metabase/metabase | expressions_test.clj | (ns metabase.query-processor-test.expressions-test
"Tests for expressions (calculated columns)."
(:require
[clojure.test :refer :all]
[java-time :as t]
[medley.core :as m]
[metabase.driver :as driver]
[metabase.models.field :refer [Field]]
[metabase.query-processor :as qp]
[metabase.test :as mt... | null | https://raw.githubusercontent.com/metabase/metabase/32854d3cb630cc406ab251e55d3688c3c8c1509f/test/metabase/query_processor_test/expressions_test.clj | clojure | bigquery doesn't let you have hypthens in field, table, etc names
+----------------------------------------------------------------------------------------------------------------+
| HANDLING NULLS AND ZEROES |
+-------------------... | (ns metabase.query-processor-test.expressions-test
"Tests for expressions (calculated columns)."
(:require
[clojure.test :refer :all]
[java-time :as t]
[medley.core :as m]
[metabase.driver :as driver]
[metabase.models.field :refer [Field]]
[metabase.query-processor :as qp]
[metabase.test :as mt... |
e03c61bbad857b5361de968ed7f302fc4bb50c680f5fdce59b6c67826d4ea60f | singnet/snet-minting-policy | WritePlutus.hs | import Cardano.Api
import Cardano.Api.Shelley
import qualified Cardano.Ledger.Alonzo.Data as Alonzo
import OnChain . LockingScript
( apiExampleUntypedPlutusLockingScript ,
-- untypedLockingScriptAsShortBs,
-- )
import OnChain . MintingScript ( apiExamplePlutusMintingScript , curSymbol )
import OnChain .... | null | https://raw.githubusercontent.com/singnet/snet-minting-policy/1eb6ce64d408318e715d809cbe2e32a302aaabeb/pab/WritePlutus.hs | haskell | untypedLockingScriptAsShortBs,
) | import Cardano.Api
import Cardano.Api.Shelley
import qualified Cardano.Ledger.Alonzo.Data as Alonzo
import OnChain . LockingScript
( apiExampleUntypedPlutusLockingScript ,
import OnChain . MintingScript ( apiExamplePlutusMintingScript , curSymbol )
import OnChain . SimpleMintingScript ( serialisedScript )
i... |
258be461c000735cf1fd34ef0ff01639188a556562e881d5d4f6da2dc7d811e6 | ahrefs/atd | unique_name.mli | (**
Functions to translate an identifier into one that's not reserved
or already taken.
When necessary, identifiers are modified by adding prefixes or suffixes
that are compatible with Python syntax.
Important terminology:
- source space: ideal set of unique identifiers
- destination space: set o... | null | https://raw.githubusercontent.com/ahrefs/atd/1f2b3bcc54d14159a5e25e9b23b5c9bed163721c/atd/src/unique_name.mli | ocaml | *
Functions to translate an identifier into one that's not reserved
or already taken.
When necessary, identifiers are modified by adding prefixes or suffixes
that are compatible with Python syntax.
Important terminology:
- source space: ideal set of unique identifiers
- destination space: set of ... |
type t
* Initialize the translation tables by specifying the set of identifiers
already reserved in the destination space .
[ reserved_identifiers ] are forbidden identifiers , i.e. we guarantee
that a translation will never return one of these .
[ safe_prefix ] is a prefix that will be added... |
5cb9f2e63bbbe7cd5f55742cc69c9b42575afcdc594c45ca401e7c256b7a33b4 | adetokunbo/tmp-proc | Server.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamType... | null | https://raw.githubusercontent.com/adetokunbo/tmp-proc/0bb91505f24084ae488af274459fa49c87912033/tmp-proc-example/src/TmpProc/Example2/Server.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
* Server implementation
| Runs 'waiApp' on the given port.
| Runs 'waiApp' using defaults for local development.
| R... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
|
Copyright : ( c ) 2020 - 20... |
1ac857d7cc19b1dc1b2cb15a92b0d0272a5232d89e97c9766dc1f208c2182a14 | Airini/FEECa | FiniteElementTest.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module FEECa.FiniteElementTest where
import Control.Monad ( liftM )
import FEECa.Internal.Form hiding ( inner )
import FEECa.Internal.Spaces
import qualified FEECa.Internal.MultiIndex as MI
import qualified FEECa.I... | null | https://raw.githubusercontent.com/Airini/FEECa/3ffae7177fca159d965b70e3763a20ab84cd8a8b/tests/FEECa/FiniteElementTest.hs | haskell | # LANGUAGE TypeSynonymInstances #
------------------------------------------------------------------------------
Random Finite Element Space
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Whitney Forms
-----... | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances #
module FEECa.FiniteElementTest where
import Control.Monad ( liftM )
import FEECa.Internal.Form hiding ( inner )
import FEECa.Internal.Spaces
import qualified FEECa.Internal.MultiIndex as MI
import qualified FEECa.Internal.Vector as V
import qualif... |
5b7aaaee264d1a536f07bb7a90319e16811011b625cddf82cd0568719d7cc6ca | txyyss/Project-Euler | Euler089.hs | The rules for writing Roman numerals allow for many ways of writing
-- each number (see About Roman Numerals...). However, there is always
-- a "best" way of writing a particular number.
-- For example, the following represent all of the legitimate ways of
writing the number sixteen :
IIIIIIIIIIIIIIII
VIIIIII... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler089.hs | haskell | each number (see About Roman Numerals...). However, there is always
a "best" way of writing a particular number.
For example, the following represent all of the legitimate ways of
XVI
The last example being considered the most efficient, as it uses
the least number of numerals.
descending units and obey the subt... | The rules for writing Roman numerals allow for many ways of writing
writing the number sixteen :
IIIIIIIIIIIIIIII
VIIIIIIIIIII
VVIIIIII
XIIIIII
VVVI
The 11 K text file , roman.txt ( right click and ' Save Link / Target
As ... ' ) , contains one thousand numbers written in valid , but not
necessa... |
8fcd7e96470cb879daf14fc7a39716db878442d1ff656001af28a28b895693fb | 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 eval (f : formula) : bool =
match f with
| True -> true
| ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub51/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 eval (f : formula) : bool =
match f with
| True -> true
| ... | |
b3d6fc68b7f3886a1b6094d35a30e4359826aceb6b74349d9ec0b0df7e59f291 | Simre1/haskell-game | TypeErrors.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module TypeErrors where
-- $setup
-- >>> default ()
-- >>> :m +Polysemy
-- >>> :m +Polysemy.Output
-- >>> :m +Polysemy.Reader
-- >>> :m +Polysemy.Resource
-- >>> :m +Polysemy.State
-- >>> :m +Polysemy.Trace
-- >>> :m +Data.Maybe
------------------------------------... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/test/TypeErrors.hs | haskell | $setup
>>> default ()
>>> :m +Polysemy
>>> :m +Polysemy.Output
>>> :m +Polysemy.Reader
>>> :m +Polysemy.Resource
>>> :m +Polysemy.State
>>> :m +Polysemy.Trace
>>> :m +Data.Maybe
------------------------------------------------------------------------------
|
>>> :{
foo :: Sem r ()
foo = put ()
:}
...
..... | # OPTIONS_GHC -fno - warn - missing - signatures #
module TypeErrors where
... Ambiguous use of effect ' State '
ambiguousMonoState = ()
foo = put 5
... Ambiguous use of effect ' State '
ambiguousPolyState = ()
... ' Reader ' is higher - order , but ' interpret ' can help only
... with first - order ... |
942d45b4685ee93857cbbe7b991033b0dc74b7b631065dabe3108106ffc2960b | nasa/Common-Metadata-Repository | service.clj | (ns cmr.ingest.services.ingest-service.service
(:require
[cmr.common.util :refer [defn-timed]]
[cmr.common.services.errors :as errors]
[cmr.common-app.services.kms-fetcher :as kms-fetcher]
[cmr.common.validations.core :as cm-validation]
[cmr.ingest.services.messages :as msg]
[cmr.ingest.validation.v... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/cbf54cc6757640f99b63bac18f63f7686ec21162/ingest-app/src/cmr/ingest/services/ingest_service/service.clj | clojure | (ns cmr.ingest.services.ingest-service.service
(:require
[cmr.common.util :refer [defn-timed]]
[cmr.common.services.errors :as errors]
[cmr.common-app.services.kms-fetcher :as kms-fetcher]
[cmr.common.validations.core :as cm-validation]
[cmr.ingest.services.messages :as msg]
[cmr.ingest.validation.v... | |
777da259305e03ac4d6a2946b41210cdb304b103d5b33ba4959c88560c615072 | yomimono/stitchcraft | embellish_stitch.ml | open Cmdliner
let corner =
let doc = "Corner border image (oriented to upper-left corner)." in
Arg.(value & opt file "corner.pattern" & info ["corner"] ~docv:"CORNER" ~doc)
let rotate_corners =
let doc = "Rotate the corner image 90 degrees clockwise for each corner \
going clockwise from the upper left." in... | null | https://raw.githubusercontent.com/yomimono/stitchcraft/f2920cb13be030fecab1d23d9320ace051767158/embellish/src/embellish_stitch.ml | ocaml | open Cmdliner
let corner =
let doc = "Corner border image (oriented to upper-left corner)." in
Arg.(value & opt file "corner.pattern" & info ["corner"] ~docv:"CORNER" ~doc)
let rotate_corners =
let doc = "Rotate the corner image 90 degrees clockwise for each corner \
going clockwise from the upper left." in... | |
e9defde719a3f6dcb1e11321737c89cc23b06a42215411db26f13494a355f367 | chaoxu/mgccl-haskell | mgap.hs | import Data.List
import Rosalind
main :: IO ()
main = do s <- getLine
t <- getLine
print $ length s + length t - (2 * length (lcs s t))
| null | https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/rosalind/mgap.hs | haskell | import Data.List
import Rosalind
main :: IO ()
main = do s <- getLine
t <- getLine
print $ length s + length t - (2 * length (lcs s t))
| |
85ad955a7e6e99b6b4eaa26b875c99ca9112dcd6ffea7ff3f298772c0ee718ee | goldfirere/thesis | Sec211.hs | Adapted from 's ICFP ' 13 paper .
# LANGUAGE TypeInType , RebindableSyntax #
module Sec211 where
import Effects
import Effect.State
import Data.Nat
import Prelude ( Show, Ord(..), otherwise, foldl, flip )
data Tree a = Leaf
| Node (Tree a) a (Tree a)
deriving Show
tag :: Tree a -> Eff m '[STATE Na... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/effects/Sec211.hs | haskell | Adapted from 's ICFP ' 13 paper .
# LANGUAGE TypeInType , RebindableSyntax #
module Sec211 where
import Effects
import Effect.State
import Data.Nat
import Prelude ( Show, Ord(..), otherwise, foldl, flip )
data Tree a = Leaf
| Node (Tree a) a (Tree a)
deriving Show
tag :: Tree a -> Eff m '[STATE Na... | |
2c372c21f02edf007865c4c740780c11a70c01112dfb98a3cbc89822f05a710b | Andromedans/andromeda | syntax.mli | * Annotated abstract syntax for type theory .
type name = string
type label = string
(** We use de Bruijn indices *)
type variable = Common.debruijn
type ty = ty' * Position.t
and ty' =
| Type
| El of term
| RecordTy of (label * (name * ty)) list
| Prod of name * ty * ty
| Id of ty * term * term
and ter... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/archive/old-andromeda/syntax.mli | ocaml | * We use de Bruijn indices
*******************************
Construction helper functions
*******************************
******
Code
******
* Anonymous identifier
* alpha equality of terms, ignoring hints
* alpha equality of types, ignoring hints inside terms
* [shift delta term] shifts the free variables in [t... | * Annotated abstract syntax for type theory .
type name = string
type label = string
type variable = Common.debruijn
type ty = ty' * Position.t
and ty' =
| Type
| El of term
| RecordTy of (label * (name * ty)) list
| Prod of name * ty * ty
| Id of ty * term * term
and term = term' * Position.t
and term'... |
03af9e1ee6306e5305a18199e9ec3762925e0319d55e2573e8107c4ac3c6914a | ftovagliari/ocamleditor | dialog_goto.ml | [@@@warning "-48"]
open GdkKeysyms
let show ~view () =
try begin
let w = GWindow.window
~title: "Go to..."
~resizable:false
~type_hint:`DIALOG
~allow_grow:false
~allow_shrink:false
~position:`CENTER_ALWAYS
~modal:true () in
Gmisclib.Window.GeometryMemo.... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/otherwidgets/dialog_goto.ml | ocaml | [@@@warning "-48"]
open GdkKeysyms
let show ~view () =
try begin
let w = GWindow.window
~title: "Go to..."
~resizable:false
~type_hint:`DIALOG
~allow_grow:false
~allow_shrink:false
~position:`CENTER_ALWAYS
~modal:true () in
Gmisclib.Window.GeometryMemo.... | |
0cbab18944d31c611802cffa85e42f4355efe9e0d70bdf5777df5f14d2332e9b | atomvm/atomvm_mqtt_client | mqtt_client_example.erl | %%
Copyright ( c ) 2021 dushin.net
%% 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 License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in wr... | null | https://raw.githubusercontent.com/atomvm/atomvm_mqtt_client/b41c1cba1d8bb999edec9361dfe643c521a930cd/examples/mqtt_client_example/src/mqtt_client_example.erl | erlang |
All rights reserved.
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 ... | Copyright ( c ) 2021 dushin.net
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mqtt_client_example).
-export([start/0]).
start() ->
ok = start_network(maps:get(sta, config:get())),
Start the MQTT client .
... |
adacf9b4321cd6ae5e6b7b15f33820e92f43ef81c9d14bbbedabf64dd7535eb7 | emqx/mria | mria_lb.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 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 o... | null | https://raw.githubusercontent.com/emqx/mria/80625f5654e4b3f434a9daf93a1f482c86b32ee4/src/mria_lb.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 ) 2021 - 2023 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 ,
status of core nodes in case we need to RPC to one of them .
-module(mria_lb).
-behaviour(gen... |
b466c1de69d9180419e9255b75f387f23b388a706a0190d08f7addc5c5e7cde1 | outergod/cl-heredoc | heredoc.lisp | ;;;; cl-heredoc - heredoc.lisp
Copyright ( C ) 2010 < >
;;;; This file is part of cl-heredoc.
;;;; cl-heredoc is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
;;;; (... | null | https://raw.githubusercontent.com/outergod/cl-heredoc/a8c8a3557bb6b4854adff86f10182c22e6676ac8/src/heredoc.lisp | lisp | cl-heredoc - heredoc.lisp
This file is part of cl-heredoc.
cl-heredoc is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
cl-heredoc is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied ... | Copyright ( C ) 2010 < >
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 :cl-heredoc)
(defun read-until-match (stream terminal)
"read-until-match stream terminal => string
Read characters from STREAM until... |
275e8539e18f59c5c0cbe9cf3d5296566368143b7759e923e8976f09459d7bce | grzm/awyeah-api | ec2.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns ^:skip-wiki com.grzm.awyeah.protocols.ec2
"Impl, don't call directly."
(:require
[com.grzm.awyeah.protocols :as aws.protocols]
[com.grzm.awyeah.protocols.query :as query]
[com.grzm.awyeah.shape :as shape]
[com.grzm.awyeah.util :as util]))
... | null | https://raw.githubusercontent.com/grzm/awyeah-api/1810bf624da2be58c77813106a1d51e32db11690/src/com/grzm/awyeah/protocols/ec2.clj | clojure | All rights reserved. | Copyright ( c ) Cognitect , Inc.
(ns ^:skip-wiki com.grzm.awyeah.protocols.ec2
"Impl, don't call directly."
(:require
[com.grzm.awyeah.protocols :as aws.protocols]
[com.grzm.awyeah.protocols.query :as query]
[com.grzm.awyeah.shape :as shape]
[com.grzm.awyeah.util :as util]))
(set! *warn-on-reflectio... |
457abbebd9c50000819924e4b3b17c3730db1087bcce8ff272d2fcc488b91155 | tanakh/Peggy | Loc.hs | # LANGUAGE TemplateHaskell , QuasiQuotes , FlexibleContexts #
import Text.Peggy
data Number = Number SrcLoc Int deriving (Show)
[peggy|
nums :: [Number]
= num*
num ::: Number
= [0-9]+ { Number $p (read $1) }
|]
main :: IO ()
main =
case parseString nums "" "12 2434 \n 3 4 576" of
Left err -> print err
... | null | https://raw.githubusercontent.com/tanakh/Peggy/78280548d137c9ada703de0e4c9af1cd3cb8f728/example/Loc.hs | haskell | # LANGUAGE TemplateHaskell , QuasiQuotes , FlexibleContexts #
import Text.Peggy
data Number = Number SrcLoc Int deriving (Show)
[peggy|
nums :: [Number]
= num*
num ::: Number
= [0-9]+ { Number $p (read $1) }
|]
main :: IO ()
main =
case parseString nums "" "12 2434 \n 3 4 576" of
Left err -> print err
... | |
30c542a833c4e6d307d5a700a452759b2a2a649b39e5f30fed58beedfe9a8e3d | janestreet/lwt-async | lwt_log_rules.mli | Lightweight thread library for
* Interface Lwt_log_rules
* Copyright ( C ) 2010 < >
*
* 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 exceptions... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/logger/lwt_log_rules.mli | ocaml | * Logging rules parsing
* [parse lexbuf] returns the list of rules contained in
[lexbuf] or None in case of parsing error | Lightweight thread library for
* Interface Lwt_log_rules
* Copyright ( C ) 2010 < >
*
* 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 exceptions... |
447b9e9bb2086a33e1c01768d254f4627b5eaa2385c99ec42cb97e4ffe681e16 | RolfRolles/PandemicML | IDAHotKey.ml | (* IDAHotKey.ml *)
let int2fn = Hashtbl.create 16
let str2int = Hashtbl.create 16
let num = ref 0
let invoke i =
let fn = try Hashtbl.find int2fn i with Not_found -> (fun () -> ()) in
fn ()
let _ = Callback.register "HotkeyCallback" invoke
let register hk fn =
let b = IDA.add_ocaml_hotkey hk !num in
... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/IDA/IDAHotKey.ml | ocaml | IDAHotKey.ml | let int2fn = Hashtbl.create 16
let str2int = Hashtbl.create 16
let num = ref 0
let invoke i =
let fn = try Hashtbl.find int2fn i with Not_found -> (fun () -> ()) in
fn ()
let _ = Callback.register "HotkeyCallback" invoke
let register hk fn =
let b = IDA.add_ocaml_hotkey hk !num in
Hashtbl.replace int... |
52031f835dab62eb4abbbc735130f9e2629b8c5afcf6acc8cedd39cfcc837cb9 | Palmik/data-store | B01.hs | {-# LANGUAGE DeriveDataTypeable #-}
# OPTIONS_GHC -fno - warn - orphans #
module IS.B01
where
import Control.DeepSeq (NFData(rnf))
import Common
import Data.Data
import qualified Data.IxSet as I
import Data.IxSet ((@=), (@>=))
type IS = I.IxSet C01
newtype D1 = D1 Int deriving (Eq, Ord, Typeable)
newtype ... | null | https://raw.githubusercontent.com/Palmik/data-store/20131a9d6d310c29b57fd9e3b508f0335e1113b4/benchmarks/src/IS/B01.hs | haskell | # LANGUAGE DeriveDataTypeable # | # OPTIONS_GHC -fno - warn - orphans #
module IS.B01
where
import Control.DeepSeq (NFData(rnf))
import Common
import Data.Data
import qualified Data.IxSet as I
import Data.IxSet ((@=), (@>=))
type IS = I.IxSet C01
newtype D1 = D1 Int deriving (Eq, Ord, Typeable)
newtype D2 = D2 Int deriving (Eq, Ord , Type... |
cf76d255ae19bbd8af14cb0b1182587b7458bcf9174b1106d056cca51dc0916a | mpickering/apply-refact | Naming11.hs | case_foo = 1 | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Naming11.hs | haskell | case_foo = 1 | |
3fdd20821fd2fa3c8a0b2128636f314bee0857cb2096b93ced351c2bd9677293 | rongarret/ergolib | hashlib.lisp |
; Requires libssl-dev
(require :ergolib)
(require :rffi)
(require :cl+ssl)
(deftype u8 () '(unsigned-byte 8))
(define-method (hash (v vector) hashfn hashsize)
(bb
(for b in v do (assert (typep b 'u8)))
s (bytes-to-string v :latin1)
:mv (v p) (make-heap-ivector hashsize 'u8)
(funcall hashfn s (length s... | null | https://raw.githubusercontent.com/rongarret/ergolib/757e67471251ed1329e5c35c008fb69964567994/layer1/hashlib.lisp | lisp | Requires libssl-dev
NOTE: only SHA1 is actually used at the moment |
(require :ergolib)
(require :rffi)
(require :cl+ssl)
(deftype u8 () '(unsigned-byte 8))
(define-method (hash (v vector) hashfn hashsize)
(bb
(for b in v do (assert (typep b 'u8)))
s (bytes-to-string v :latin1)
:mv (v p) (make-heap-ivector hashsize 'u8)
(funcall hashfn s (length s) p)
(prog1 (copy-s... |
dde1c6f74fa8cb968c0493b71e63c2bfcfcf509bc526b2d9cf2af404d727d636 | kumarshantanu/dime | service.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/dime/5c3b8330ddab69ebefaa56dd9bfa2ff97b55c8a8/test/foo/service.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 LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns foo.service
(:require
[dime.core :as di]
[dime.util :as du]))
(defn find-items
"This has an implicit inject name, hence will be overridden by the explicit one in foo.db namespace."
[item-ids]
:mock-items)
(def recommend-products nil)
(defn ^{:exp... |
d46017d4028e054dc9cf930379aa18b4c3a7c30d6beb20c0e42869559aae4156 | input-output-hk/cardano-ledger | Slot.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Cardano.Ledger.Slot (
SlotNo (..),
Duration (..),
(-*),
(+*),
(*-),
EpochNo (..),
EpochSize (..),
EpochInfo,
-- Block number
BlockNo (..),
epochInfoEpoch,
epochInfoFi... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-core/src/Cardano/Ledger/Slot.hs | haskell | Block number
| Subtract a duration from a slot | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Cardano.Ledger.Slot (
SlotNo (..),
Duration (..),
(-*),
(+*),
(*-),
EpochNo (..),
EpochSize (..),
EpochInfo,
BlockNo (..),
epochInfoEpoch,
epochInfoFirst,
epochInfoSi... |
5a0d82e4d9cb9a0604c914bc42258a9185c81288a9ea0de83a1490896a180498 | tfausak/factory | Widget.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{- |
The core data type for this example application.
-}
module Factory.Types.Widget where
import Data.Aeson as Aeson
import qualified GHC.Generics as GHC
import qualified Data.Text as Text
{- |
A widget. Who knows what it does.
-}
data Widget = Wid... | null | https://raw.githubusercontent.com/tfausak/factory/27025465dc0045d43d8db1769bcc665fb55ee62e/library/Factory/Types/Widget.hs | haskell | # LANGUAGE DeriveAnyClass #
|
The core data type for this example application.
|
A widget. Who knows what it does.
^ The name of this widget. | # LANGUAGE DeriveGeneric #
module Factory.Types.Widget where
import Data.Aeson as Aeson
import qualified GHC.Generics as GHC
import qualified Data.Text as Text
data Widget = Widget
} deriving (Aeson.FromJSON, Aeson.ToJSON, Eq, GHC.Generic, Read, Show)
|
88ce08914c6ef5cfebc1f91bf7eaaf1063f6963cf92d6ef631cdeeb1f56f8ffb | paurkedal/ocaml-mediawiki-api | mwapi_login.mli | Copyright ( C ) 2013 - -2016 Petter A. Urkedal < >
*
* This library 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 , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-mediawiki-api/6a1c1043a8ad578ea321a314fbe0a12a8d0933cf/lib/mwapi_login.mli | ocaml | Copyright ( C ) 2013 - -2016 Petter A. Urkedal < >
*
* This library 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 , either version 3 of the License , or ( at your
* option ) any la... | |
74acf9b3061a7e0469344f8193187c71df6b19457d6bc60d6330b536212b5571 | na4zagin3/satyrographos | command_opam_install__library_recursive.ml | module StdList = List
open Satyrographos_testlib
open TestLib
open Shexp_process
let satyristes =
{|
(version "0.0.2")
(library
(name "grcnum")
(version "0.2")
(sources
((package "grcnum.satyh" "./grcnum.satyh")
(font "grcnum-font.ttf" "./font.ttf")
(hash "fonts.satysfi-hash" "./fonts.satysfi-has... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/test/testcases/command_opam_install__library_recursive.ml | ocaml | module StdList = List
open Satyrographos_testlib
open TestLib
open Shexp_process
let satyristes =
{|
(version "0.0.2")
(library
(name "grcnum")
(version "0.2")
(sources
((package "grcnum.satyh" "./grcnum.satyh")
(font "grcnum-font.ttf" "./font.ttf")
(hash "fonts.satysfi-hash" "./fonts.satysfi-has... | |
823677e396fa9e1681555cfcfd2f0ae084142af8343f3385cf56a6391cd59e77 | basho/riak_core | riak_core_new_claim.erl | %% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. 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... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_new_claim.erl | erlang | -------------------------------------------------------------------
riak_core: Core Riak Application
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
sp... | Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. 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
... |
24c8345fe65469492de818de31301c8932e3193f58d609a52ddcb255128ffae3 | Decentralized-Pictures/T4L3NT | test_ssh_agent.ml | open Rresult
open Ledgerwallet_ssh_agent
let test_open_close () =
let h = Hidapi.open_id_exn ~vendor_id:0x2C97 ~product_id:0x1005 in
Hidapi.close h
let test_ping () =
let h = Hidapi.open_id_exn ~vendor_id:0x2C97 ~product_id:0x1005 in
match Ledgerwallet.Transport.ping h with
| Result.Ok () -> Hidapi.close h
... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/vendors/ocaml-ledger-wallet/test/test_ssh_agent.ml | ocaml | open Rresult
open Ledgerwallet_ssh_agent
let test_open_close () =
let h = Hidapi.open_id_exn ~vendor_id:0x2C97 ~product_id:0x1005 in
Hidapi.close h
let test_ping () =
let h = Hidapi.open_id_exn ~vendor_id:0x2C97 ~product_id:0x1005 in
match Ledgerwallet.Transport.ping h with
| Result.Ok () -> Hidapi.close h
... | |
70aeb1c955357c2d1553a8b4e1f07e015bec0d3503deb4480ba087e4b8ecfbe4 | michalkonecny/aern2 | Statements.hs | module ERC.Statements where
import Prelude
import AERN2.Kleenean
import ERC.Monad
import ERC.Variables
import ERC.Logic
import ERC.Integer
return_ :: ERC s a -> ERC s a
return_ = id
while_ :: ERC s KLEENEAN -> ERC s a -> ERC s ()
while_ condERC doAction = aux
where
aux =
do
cond <- condERC
case con... | null | https://raw.githubusercontent.com/michalkonecny/aern2/e5a5c69a8f90cb4ede5fce023ca660fbafda08a9/aern2-erc/src/ERC/Statements.hs | haskell | module ERC.Statements where
import Prelude
import AERN2.Kleenean
import ERC.Monad
import ERC.Variables
import ERC.Logic
import ERC.Integer
return_ :: ERC s a -> ERC s a
return_ = id
while_ :: ERC s KLEENEAN -> ERC s a -> ERC s ()
while_ condERC doAction = aux
where
aux =
do
cond <- condERC
case con... | |
c0f8226a312a8482e0afa01ecde3af1a3b69a5bcdd0c3d44f787119466d6eb5b | GaloisInc/HaLVM | Memory.hs | BANNERSTART
- Copyright 2006 - 2008 , Galois , Inc.
- This software is distributed under a standard , three - clause BSD license .
-- - Please see the file LICENSE, distributed with this software, for specific
-- - terms and conditions.
Author : < >
BANNEREND
|A low - level module for dealing with unpriv... | null | https://raw.githubusercontent.com/GaloisInc/HaLVM/3ec1d7e4b6bcb91304ba2bfe8ee280cb1699f24d/src/HALVMCore/Hypervisor/Memory.hs | haskell | - Please see the file LICENSE, distributed with this software, for specific
- terms and conditions.
including allocating pages, granting access to pages to other domains, and
mapping the grants of other domains.
* Types and conversions for dealing with memory.
* Routines for creating, destroying, and modifying pa... | BANNERSTART
- Copyright 2006 - 2008 , Galois , Inc.
- This software is distributed under a standard , three - clause BSD license .
Author : < >
BANNEREND
|A low - level module for dealing with unprivileged Xen memory operations ,
module Hypervisor.Memory(
PFN, MFN
, VPtr, MPtr
... |
0a624528759e0ad4fa801c5a453722a0c9318d6b07954cfba7d0ecb324cf0fba | ucsd-progsys/liquidhaskell | RIO.hs | {-@ LIQUID "--expect-any-error" @-}
# LANGUAGE CPP #
module RIO where
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
-- THE REST OF THIS FILE IS SAFE; just adding this to trigger an error to appease the "neg" gods.
@ : : @
silly_buggy_incr :: Int -> Int
silly_buggy_incr x = x - 1
@ data RIO ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/benchmarks/icfp15/neg/RIO.hs | haskell | @ LIQUID "--expect-any-error" @
THE REST OF THIS FILE IS SAFE; just adding this to trigger an error to appease the "neg" gods.
@ qualif Papp4(v:a, x:b, y:c, z:d, p:Pred a b c d) : papp4(p, v, x, y, z) @
Test Cases:
* TestM (Basic)
* TwiceM
* WhileM | # LANGUAGE CPP #
module RIO where
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
@ : : @
silly_buggy_incr :: Int -> Int
silly_buggy_incr x = x - 1
@ data RIO a < p : : World - > Bool , q : : World - > a - > World - > Bool >
= RIO ( rs : : ( xxx : World < p > - > ( a , World)<\w - > {... |
58ba744343cfbc11f7c6c62d386c0e704c78de721cf8e3652f7b4cdd1d3c7b1f | amnh/PCG | Encodable.hs | -----------------------------------------------------------------------------
-- |
-- Module : Bio.Character.Encodable
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Export of coded characters
--
--... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Character/Encodable.hs | haskell | ---------------------------------------------------------------------------
|
Module : Bio.Character.Encodable
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
Export of coded characters
--------------------------------------------------------------------------... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
module Bio.Character.Encodable
( AmbiguityGroup()
, AlignmentContext(..)
, ContinuousCharacter()
, DecodableStream(..)
, DynamicCharacter(..)
, DynamicCharacterElement()
, StaticCharacter()
, StaticCharacterBlock()
, EncodedAmbiguityGroupContainer(..)... |
fd90bc71f54c7c15cd64762759445a76900e5007688b6dacf3330a659a727c9c | kupl/LearnML | patch.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 eval_exp (e : exp) : int =
match e with
| Num x -> x
| Plu... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub24/patch.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 eval_exp (e : exp) : int =
match e with
| Num x -> x
| Plu... | |
599d487d34d726a20e734bdc70d6604109686eb756aad618699054455c6e35ed | slyrus/abcl | gentemp.lisp | ;;; gentemp.lisp
;;;
Copyright ( C ) 2003 - 2005
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
... | null | https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/gentemp.lisp | lisp | gentemp.lisp
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright ( C ) 2003 - 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
... |
dbd41d5d98e3463d0fa9064dcb1c3464af54ae1953760919eb47e91a1d5cc254 | atlas-engineer/nyxt | mode.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt)
(defclass mode-class (user-class)
((toggler-command-p ; TODO: Rename to `togglable-p'?
:initform (list t)
:initarg :toggler-command-p
:type (cons boolean null)
:documen... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/fa3b0e7f977427ff2e2dabb1fab1cff15e2e5ad1/source/mode.lisp | lisp | TODO: Rename to `togglable-p'?
Using class-direct-slots here because `enable' will cascade to parent modes anyway.
FIXME: An easier way to initialize slots given initargs?
TODO: Maybe use writer methods, if present? It implies a risk of
runtime actions on not-yet-fully-initialized mode instances
(because enable i... | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt)
(defclass mode-class (user-class)
:initform (list t)
:initarg :toggler-command-p
:type (cons boolean null)
:documentation "Whether to define a toggler command for the defined mode.")))
(ex... |
aa4880dbe69eaf5fc4184d317f5ff60e62bba43f978f31a5107863c72536c79e | omcljs/om | tempid.cljc | (ns om.tempid
#?(:clj (:import [java.io Writer])))
;; =============================================================================
;; ClojureScript
#?(:cljs
(deftype TempId [^:mutable id ^:mutable __hash]
Object
(toString [this]
(pr-str this))
IEquiv
(-equiv [this other]
(and (... | null | https://raw.githubusercontent.com/omcljs/om/3a1fbe9c0e282646fc58550139b491ff9869f96d/src/main/om/tempid.cljc | clojure | =============================================================================
ClojureScript
============================================================================= | (ns om.tempid
#?(:clj (:import [java.io Writer])))
#?(:cljs
(deftype TempId [^:mutable id ^:mutable __hash]
Object
(toString [this]
(pr-str this))
IEquiv
(-equiv [this other]
(and (instance? TempId other)
(= (. this -id) (. other -id))))
IHash
(-hash [this]... |
ce6e4cef790b845fc3c51fbe2a475d6e82ca845e719eac5c2133d40bd35a7591 | calyau/maxima | sinint.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/src/sinint.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
This basicall... |
(in-package :maxima)
(macsyma-module sinint)
(load-macsyma-macros ratmac)
(declare-top (special genvar checkfactors
exp var $factorflag $logabs $expop $expon
$keepfloat ratform rootfactor pardenom $algebraic
wholepart parnumer varlist logptdx switch1))
(defun rootfac (q)
(prog (nthdq nthd... |
70581a4898e7830360f1c7597ba70216dd9858668453b20ed1cb2fcbd3dd2312 | tezos-commons/baseDAO | LambdaTreasuryDAO.hs | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
# OPTIONS_GHC -Wno - orphans #
module Test.Ligo.LambdaTreasuryDAO
( test_LambdaTreasuryDAO
) where
import Prelude
import Data.Map qualified as Map
import Data.Set qualified as S
import Test.Tasty (TestTree)
im... | null | https://raw.githubusercontent.com/tezos-commons/baseDAO/c8cc03362b64e8f27432ec70cdb4c0df82abff35/haskell/test/Test/Ligo/LambdaTreasuryDAO.hs | haskell | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
# OPTIONS_GHC -Wno - orphans #
module Test.Ligo.LambdaTreasuryDAO
( test_LambdaTreasuryDAO
) where
import Prelude
import Data.Map qualified as Map
import Data.Set qualified as S
import Test.Tasty (TestTree)
im... | |
dbbccb91758a03a659850ee6d8026d0e5da7976e2b6f8a4f3ade270261da36d7 | facebook/flow | comment_test.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/parser_utils/output/__tests__/js_layout_generator/comment_test.ml | ocaml | Line with single newline
Block with no newline
Block with single newline
Multiple leading comments
After node with no newline
After node with single newline
After line with single newline
After block with no newline
After block with single newline
Body without leading comment separated by space
Bod... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
7227c66b0f4cdd1db3beb706295b4b72edbb88ebc8153606d1e0aeec3f3a0c60 | pirapira/coq2rust | program.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/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/pretyping/program.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Errors
open Util... |
f004e9712887b3928f2cadb0a43a52c7e0243fb676803f98b11ae5524560b39f | Dasudian/DSDIN | dsdc_db_backends.erl |
-module(dsdc_db_backends).
-export([ accounts_backend/0
, calls_backend/0
, channels_backend/0
, contracts_backend/0
, ns_backend/0
, ns_cache_backend/0
, oracles_backend/0
, oracles_cache_backend/0
]).
%% Callbacks for dsdu_mp_trees_db
-export([ db_co... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdcore/src/dsdc_db_backends.erl | erlang | Callbacks for dsdu_mp_trees_db
===================================================================
API
===================================================================
===================================================================
=================================================================== |
-module(dsdc_db_backends).
-export([ accounts_backend/0
, calls_backend/0
, channels_backend/0
, contracts_backend/0
, ns_backend/0
, ns_cache_backend/0
, oracles_backend/0
, oracles_cache_backend/0
]).
-export([ db_commit/2
, db_get/2
... |
93f7ea3463c37eb19e43c88de16534a7e8032a9f67b4b80674551856d36d7328 | zotonic/zotonic | m_mqtt_ticket.erl | @author < >
2020
%% @doc Handle tickets for out of band MQTT actions via controller_mqtt_transport.
Copyright 2020
%%
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/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/models/m_mqtt_ticket.erl | erlang | @doc Handle tickets for out of band MQTT actions via controller_mqtt_transport.
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, eit... | @author < >
2020
Copyright 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(m_mqtt_ticket).
-behaviour(zotonic_model).
-export([
m_get/3,
m_post/3,
m_delete/3,
new_ticket/1,
... |
230059964371844968cff4d2a4770c42493c8b098ac1337db938681408d50d9f | glondu/belenios | languages.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/d00a6d82506ad539f384f6dd5658c13c191a257c/src/web/common/languages.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
9c704f8d26cd889cac9bbed24b86558dd63d8b82325b390c33d9d47111f12fd5 | mathiasbourgoin/SPOC | Kirc.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * , et ( 2012 )
*
*
*
* This software is a computer program whose purpose is to allow
* GPU programming with the OCaml language .
*
... | null | https://raw.githubusercontent.com/mathiasbourgoin/SPOC/ddfde5bdb089f519457c7bb0a2cb1469d71d00fb/SpocLibs/Sarek/Kirc.ml | ocaml | <---
<---
in
external from SPOC
"sspoc_var"^(string_of_int i)^
let s = (load_file "kirc_kernel.ptx") in
kir#run a b q dev;
"spoc_var"^(string_of_int i)^
todo
todo | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * , et ( 2012 )
*
*
*
* This software is a computer program whose purpose is to allow
* GPU programming with the OCaml language .
*
... |
439c8557876b493e6ccfbd78ca97a229fc44031ded2a06e3e9f874f6f78103d4 | niconaus/pcode-interpreter | WordString.hs | |
Module : WordString
Description : Word8 string helper functions
Copyright : ( c ) , 2022
Maintainer :
Stability : experimental
This module defines several helper functions to perform operations on strings
Module : WordString
Description : Word8 string helper functions
Copyright ... | null | https://raw.githubusercontent.com/niconaus/pcode-interpreter/1e8053226e658b4c609470836b867c231f8c756d/WordString.hs | haskell | Unsigned addition
Sign extension
From and to Word | |
Module : WordString
Description : Word8 string helper functions
Copyright : ( c ) , 2022
Maintainer :
Stability : experimental
This module defines several helper functions to perform operations on strings
Module : WordString
Description : Word8 string helper functions
Copyright ... |
3f793228133e99a843b11e9b408d93d6d686fd032f731462eeecf619c67eccae | Clojure2D/clojure2d-examples | ray.clj | (ns rt4.the-next-week.ch07b.ray
(:require [fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol RayProto
(at [ray t]))
(defrecord Ray [origin direction ^double time]
RayProto
(at [_ t] (v/ad... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch07b/ray.clj | clojure | (ns rt4.the-next-week.ch07b.ray
(:require [fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol RayProto
(at [ray t]))
(defrecord Ray [origin direction ^double time]
RayProto
(at [_ t] (v/ad... | |
f4219cdf00302278745c4ab922b2accdc4f73295dc09942ba7f728765fe0d974 | programaker-project/Programaker-Core | automate_rest_api_programs_specific.erl | %%% @doc
%%% REST endpoint to manage knowledge collections.
%%% @end
-module(automate_rest_api_programs_specific).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
, content_types_accepted/2
, delete_resource/2
]).
... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_programs_specific.erl | erlang | @doc
REST endpoint to manage knowledge collections.
@end
CORS
Authentication
Don't do authentication if it's just asking for options
Non matching username
Get handler
PATCH handler
DELETE handler
Converters |
-module(automate_rest_api_programs_specific).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
, content_types_accepted/2
, delete_resource/2
]).
-export([ to_json/2
, accept_json_program/2
]).
-inc... |
ff4f795dc52dc2105cf80f4fde3e23413e6c5730eb4f44b2edbd23f17eb53f8e | m4dc4p/haskelldb | PostgreSQL.hs | -----------------------------------------------------------
-- |
Module : Database . HaskellDB.Sql . PostgreSQL
Copyright : 2006
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- SQL generation for PostgreSQL.
--
-------------------... | null | https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/src/Database/HaskellDB/Sql/PostgreSQL.hs | haskell | ---------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : non-portable
SQL generation for PostgreSQL.
--------------------------------------------------------- | Module : Database . HaskellDB.Sql . PostgreSQL
Copyright : 2006
Maintainer :
module Database.HaskellDB.Sql.PostgreSQL (generator) where
import Database.HaskellDB.Sql
import Database.HaskellDB.Sql.Default
import Database.HaskellDB.Sql.Generate
import Database.HaskellDB.FieldType
import Databas... |
93d71e2c86b64cc67f4edf274b5b9c935ce5cac0c9d56a1f89864258f57e68e0 | racket/swindle | tool.rkt | Written by is Life ! ( )
Add the Swindle languages to
#lang mzscheme
(require mzlib/unit
drscheme/tool
mzlib/class
mzlib/list
mred
net/sendurl
string-constants)
(provide tool@)
(define tool@
(unit (import drscheme:tool^) (export drscheme:tool-export... | null | https://raw.githubusercontent.com/racket/swindle/122e38efb9842394ef6462053991efb4bd0edf3b/tool.rkt | racket | Swindle languages
this is called with the value port, so copy the usual swindle
handlers to this port
then use them instead of the default pretty print | Written by is Life ! ( )
Add the Swindle languages to
#lang mzscheme
(require mzlib/unit
drscheme/tool
mzlib/class
mzlib/list
mred
net/sendurl
string-constants)
(provide tool@)
(define tool@
(unit (import drscheme:tool^) (export drscheme:tool-export... |
d032293dcde07cdac5c144c1d14d372f2447beeef5e34ff65cd13aa55d55922c | cdepillabout/world-peace | Product.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAG... | null | https://raw.githubusercontent.com/cdepillabout/world-peace/0596da67d792ccf9f0ddbe44b5ce71b38cbde020/src/Data/WorldPeace/Product.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
$setup
>>> -- :set -XDataKinds
-----------
Product --
-----------
| An extensible product type. This is similar to
instead of a sum type.
| This type class provides a way to turn a tuple into a 'Product'.
| Convert a tuple into a 'Product'.... | # LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGU... |
b4dc269bd8c95d5ab5197eb8436832b20d6920e2d262d1fce10090736cbe93b1 | TorXakis/TorXakis | Sqatt.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 GeneralizedNewtypeDeriving #... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/test/sqatt/src/Sqatt.hs | haskell | # LANGUAGE OverloadedStrings #
| Integration test utilities.
* Testing
* Benchmarking
* Logging
* Re-exports
* Data structures for specifying examples
| Name of the example.
| Action to run before testing the example.
| Paths to the files containing the commands that will be passed to the
order of ... |
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 GeneralizedNewtypeDeriving #... |
391c0ec57684f1815eee36cf63e699f7d79c68e27ffef4ffb235ee41c7a08a08 | SKS-Keyserver/sks-keyserver | request.ml | (***********************************************************************)
(* request.ml *)
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/request.ml | ocaml | *********************************************************************
request.ml
redistribute it and/or modify it under ... | Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published by the Free Software Foundation ; either
version 2 of the License , or... |
a5d762a9565705b7bb7337b616dcb65b8ab3b8f6f67385557e1535ed1776f149 | superhuman/rxxr2 | PatternParser.ml | type token =
| Regex of ((int * int) * ParsingData.regex)
| Mod of (int)
| Eos
open Parsing;;
let _ = parse_error;;
# 2 "PatternParser.mly"
© Copyright University of Birmingham , UK
open ParsingData
(* validate backreference *)
let re_evaluate_backref (i, pos) gcount =
let rec rebuild r clist npos = match ... | null | https://raw.githubusercontent.com/superhuman/rxxr2/0eea5e9f0e0cde6c39e0fc12614f64edb6189cd5/code/PatternParser.ml | ocaml | validate backreference
Mod
Entry parse | type token =
| Regex of ((int * int) * ParsingData.regex)
| Mod of (int)
| Eos
open Parsing;;
let _ = parse_error;;
# 2 "PatternParser.mly"
© Copyright University of Birmingham , UK
open ParsingData
let re_evaluate_backref (i, pos) gcount =
let rec rebuild r clist npos = match clist with
[] -> r
|c... |
e728bc7d63bd76a199c60356e46997f46d11d433fc7f4ddf9e2175118a934a36 | bbss/cljsc2 | layer_selection.cljs | (ns cljsc2.cljs.ui.layer_selection
(:require [fulcro.client.dom :as dom]
[cljsc2.cljs.material_ui :refer [ui-button]]
[cljsc2.cljs.ui.fulcro :refer [input-with-label]]
[fulcro.client.primitives :as prim :refer [defsc]]
[fulcro.ui.form-state :as fs]))
(def feature-layer... | null | https://raw.githubusercontent.com/bbss/cljsc2/70e720f5bae9b58248df86f3f50d855878ae4f49/src/cljsc2/cljs/ui/layer_selection.cljs | clojure | (ns cljsc2.cljs.ui.layer_selection
(:require [fulcro.client.dom :as dom]
[cljsc2.cljs.material_ui :refer [ui-button]]
[cljsc2.cljs.ui.fulcro :refer [input-with-label]]
[fulcro.client.primitives :as prim :refer [defsc]]
[fulcro.ui.form-state :as fs]))
(def feature-layer... | |
f4c11cb84ad9653f7f943033ad8766e6355f24b0fc85a4bfd510d50709e022d9 | ghadishayban/pex | pex_test.clj | (ns com.champbacon.pex-test
(:require [clojure.test :refer :all]
[com.champbacon.pex :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/ghadishayban/pex/aa3255f6aa9086ca867d0ff401b8bbb2a306d86c/test/com/champbacon/pex_test.clj | clojure | (ns com.champbacon.pex-test
(:require [clojure.test :refer :all]
[com.champbacon.pex :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
668fd3de9b01a2c19fdeda7d1c035c2472e347f518996db477e5d2ae35ec8d4b | OCamlPro/liquidity | liquidMichelineTypes.ml | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/without-dune-network/liquidMichelineTypes.ml | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
d037ca75237226bbdb306e52127494a2a2399d2edfcca3b4bed9efeea48dd079 | uwplse/synapse | search.rkt | #lang racket
(require "search-worker.rkt" "../engine/metasketch.rkt" "solver+.rkt" "verifier.rkt" "util.rkt"
"../bv/lang.rkt"
"../../benchmarks/all.rkt" "../metasketches/imetasketch.rkt"
"log.rkt"
(only-in rosette/solver/solution model)
rosette/solver/kodkod/kodkod (rename-... | null | https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/opsyn/engine/search.rkt | racket | This procedure implements the top-level search over a metasketch.
* metasketch : constant? is the metasketch over which to search.
* threads : natural/c is the number of threads to run in parallel.
* timeout : natural/c is the timeout for individual sketches in the
The list must be sorted and increasing, an... | #lang racket
(require "search-worker.rkt" "../engine/metasketch.rkt" "solver+.rkt" "verifier.rkt" "util.rkt"
"../bv/lang.rkt"
"../../benchmarks/all.rkt" "../metasketches/imetasketch.rkt"
"log.rkt"
(only-in rosette/solver/solution model)
rosette/solver/kodkod/kodkod (rename-... |
3e392a28f0ff5b3e9d9d68f40cdd1d5d00b7082d50cfd67f7c1734b2de780177 | clojurewerkz/statistiker | kmeans_test.clj | (ns clojurewerkz.statistiker.clustering.kmeans-test
(:require [clojure.test :refer :all]
[clojurewerkz.statistiker.clustering.kmeans :refer :all]))
(deftest cluster-test
(let [c (cluster [(with-meta [1 1 1] {:a 1}) [2 2 2] [3 3 3]
[50 50 50] [51 51 51] [53 53 53]]
... | null | https://raw.githubusercontent.com/clojurewerkz/statistiker/f056f68c975cf3d6e0f1c8212aef9114d4eb657c/test/clj/clojurewerkz/statistiker/clustering/kmeans_test.clj | clojure | (ns clojurewerkz.statistiker.clustering.kmeans-test
(:require [clojure.test :refer :all]
[clojurewerkz.statistiker.clustering.kmeans :refer :all]))
(deftest cluster-test
(let [c (cluster [(with-meta [1 1 1] {:a 1}) [2 2 2] [3 3 3]
[50 50 50] [51 51 51] [53 53 53]]
... | |
98624abd9cc5dfed3493175ffd0c1981dad62824a87d70880621e161dcce8d82 | aristidb/aws | DeleteAccessKey.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Aws.Iam.Commands.DeleteAccessKey
( DeleteAccessKey(..)
, DeleteAccessKeyResponse(..)
) where
import Aws.Core
import Aws.Iam.Core
import ... | null | https://raw.githubusercontent.com/aristidb/aws/a99113ed7768f9758346052c0d8939b66c6efa87/Aws/Iam/Commands/DeleteAccessKey.hs | haskell | | Deletes the access key associated with the specified user.
<>
^ ID of the access key to be deleted.
^ User name with which the access key is associated. | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Aws.Iam.Commands.DeleteAccessKey
( DeleteAccessKey(..)
, DeleteAccessKeyResponse(..)
) where
import Aws.Core
import Aws.Iam.Core
import ... |
3e6e448361cf6e117a26fcb5eb2eb11bde701005d6f14028f42a0096e7dde373 | adamwalker/clash-utils | IIRFilter.hs | --Infinite impulse response filters
module Clash.DSP.IIRFilter (
iirDirectI,
iirDirectII,
iirTransposedI,
iirTransposedII
) where
import Clash.Prelude
{- | Direct form I: <> -}
iirDirectI
:: (HiddenClockResetEnable dom, Num a, KnownNat n, NFDataX a)
=> Vec (n + 2) a -- ^ Numerator coeffici... | null | https://raw.githubusercontent.com/adamwalker/clash-utils/375c61131e21e9a239b80bdb929ae77f156d056f/src/Clash/DSP/IIRFilter.hs | haskell | Infinite impulse response filters
| Direct form I: <>
^ Numerator coefficients
^ Denominator coefficients
^ Input enable
^ Input sample
^ Output sample
^ Numerator coefficients
^ Denominator coefficients
^ Input enable
^ Input sample
^ Output sample
| Transposed form I: <>
^ Numerator coefficients
^ Den... | module Clash.DSP.IIRFilter (
iirDirectI,
iirDirectII,
iirTransposedI,
iirTransposedII
) where
import Clash.Prelude
iirDirectI
:: (HiddenClockResetEnable dom, Num a, KnownNat n, NFDataX a)
iirDirectI coeffsN coeffsD en x = res
where
res = fir + iir
fir = dotP (map pure... |
e3f4613c356c646609cd0ade6881e886e977dee91a2ea8e14cb20652346577b9 | FranklinChen/hugs98-plus-Sep2006 | BCC.hs | module Data.Graph.Inductive.Query.BCC(
bcc
) where
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Query.DFS
import Data.Graph.Inductive.Query.ArtPoint
------------------------------------------------------------------------------
-- Given a graph g, this function computes the subgraphs which are
... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/fgl/Data/Graph/Inductive/Query/BCC.hs | haskell | ----------------------------------------------------------------------------
Given a graph g, this function computes the subgraphs which are
g's connected components.
----------------------------------------------------------------------------
--------------------------------------------------------------------------... | module Data.Graph.Inductive.Query.BCC(
bcc
) where
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Query.DFS
import Data.Graph.Inductive.Query.ArtPoint
gComponents :: DynGraph gr => gr a b -> [gr a b]
gComponents g = map (\(x,y)-> mkGraph x y) (zip ln le)
where ln = map (\x->[(... |
2beddcb15579e1197470d9d48430c0baa1f77b34b6319d0303ef0f36cfac2731 | weavejester/flupot | dom.clj | (ns flupot.dom
(:refer-clojure :exclude [map meta time])
(:require [clojure.core :as core]
[clojure.string :as str]
[flupot.core :as flupot]
[flupot.core.parsing :as p]))
(def tags
'[a abbr address area article aside audio b base bdi bdo big blockquote body br
button canva... | null | https://raw.githubusercontent.com/weavejester/flupot/59f96a563436589d1f41fe74192bbbb0f1d25a5e/src/flupot/dom.clj | clojure | (ns flupot.dom
(:refer-clojure :exclude [map meta time])
(:require [clojure.core :as core]
[clojure.string :as str]
[flupot.core :as flupot]
[flupot.core.parsing :as p]))
(def tags
'[a abbr address area article aside audio b base bdi bdo big blockquote body br
button canva... | |
9846d375bda7812295b8a31695090a2ddd9689c8cfe6f5b722f813f5fb0e576f | theoremoon/silk | typ.ml | open Error
type typ =
|UnitT
|IntT
|BoolT
|VarT of string
|FunT of typ * typ
let is_funt t =
match t with
|FunT(_, _) -> true
|_ -> false
let arg_type funt =
match funt with
|FunT(argt, _) -> argt
|_ -> raise (TypeError "function type requried")
let ret_type funt =
match funt with
|FunT(_,... | null | https://raw.githubusercontent.com/theoremoon/silk/b3c913cfebad03fc180f41695ca8c6e5dcbd2867/typ.ml | ocaml | open Error
type typ =
|UnitT
|IntT
|BoolT
|VarT of string
|FunT of typ * typ
let is_funt t =
match t with
|FunT(_, _) -> true
|_ -> false
let arg_type funt =
match funt with
|FunT(argt, _) -> argt
|_ -> raise (TypeError "function type requried")
let ret_type funt =
match funt with
|FunT(_,... | |
94a12edab7b6bca039f0bac4e49dad83a07d717e2d5de51e2914137c94df2241 | fossas/fossa-cli | NimbleLock.hs | # LANGUAGE LambdaCase #
module Strategy.Nim.NimbleLock (
analyze,
analyze',
-- * for testing
NimbleLock (..),
PackageName (..),
NimPackage (..),
NimbleDownloadMethod (..),
NimbleDump (..),
NimbleRequire (..),
buildGraph,
) where
import Algebra.Graph.AdjacencyMap qualified as AM
import Control.Eff... | null | https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/Nim/NimbleLock.hs | haskell | * for testing
| Represents nimble lock file.
Reference: -lang/nimble#nimble-lock
Name of the package.
Version of the packages.
The URL of the repository of the package.
The download method: git or hg according to the type of the repository at url.
The revision at which the dependency is locked.
The direct depe... | # LANGUAGE LambdaCase #
module Strategy.Nim.NimbleLock (
analyze,
analyze',
NimbleLock (..),
PackageName (..),
NimPackage (..),
NimbleDownloadMethod (..),
NimbleDump (..),
NimbleRequire (..),
buildGraph,
) where
import Algebra.Graph.AdjacencyMap qualified as AM
import Control.Effect.Diagnostics (
... |
829278bece4a30dd6fb0a0a04c586925670147d05ad952d43d00ed81fbb99322 | workframers/stillsuit | project.clj | (defproject com.workframe/stillsuit "0.19.0-SNAPSHOT"
:description "lacinia-datomic interface library"
:url ""
:scm {:name "git" :url ""}
:pedantic? :warn
:min-lein-version "2.8.1"
:license {:name "Apache 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.10.0" :scope "provided"]
... | null | https://raw.githubusercontent.com/workframers/stillsuit/f73d87d97971b458a4f717fccfa2445dc82f9b72/project.clj | clojure | Make sure we're up to date
Merge develop into master
Update version to non-snapshot version, commit change to master, tag
All done | (defproject com.workframe/stillsuit "0.19.0-SNAPSHOT"
:description "lacinia-datomic interface library"
:url ""
:scm {:name "git" :url ""}
:pedantic? :warn
:min-lein-version "2.8.1"
:license {:name "Apache 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.10.0" :scope "provided"]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.