_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 |
|---|---|---|---|---|---|---|---|---|
8ee391d08f00562d52f893df8d793fdb0ae876ff23e1a8abb39287fb9d3edd3f | Bodigrim/ntru | EES541EP1.hs | |
NTRU cryptographic system using the EES541EP1 parameter set , for use at the 112 - bit security level .
NTRU cryptographic system using the EES541EP1 parameter set, for use at the 112-bit security level.
-}
module Math.NTRU.EES541EP1 (keyGen, encrypt, decrypt) where
import qualified Math.NTRU as NTRU
| G... | null | https://raw.githubusercontent.com/Bodigrim/ntru/1974391559eb49ee1960db423b667867dfce946b/src/Math/NTRU/EES541EP1.hs | haskell | ^ A list of ASCII values representing the message
^ A list of numbers representing the public key
^ A list of numbers representing the ciphertext
^ A list of numbers representing the private key
^ A list of numbers representing the public key
^ A list of numbers representing the ciphertext
^ A list of numbers re... | |
NTRU cryptographic system using the EES541EP1 parameter set , for use at the 112 - bit security level .
NTRU cryptographic system using the EES541EP1 parameter set, for use at the 112-bit security level.
-}
module Math.NTRU.EES541EP1 (keyGen, encrypt, decrypt) where
import qualified Math.NTRU as NTRU
| G... |
cc03595562faf8c56e56cd10eaac4d7ea338fe4632ff7d484387065dcc443b8b | Lupino/haskell-periodic | Server.hs | {-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
module Periodic.Server
( startServer
) where
import Control.Monad (void)
import Data.Binary.Get (getWord32be, runGet)
import Data.ByteString (ByteString)
import D... | null | https://raw.githubusercontent.com/Lupino/haskell-periodic/a95b184a255da4cfefb32f15b4892541a11a57a0/periodic-server/src/Periodic/Server.hs | haskell | # LANGUAGE RecordWildCards # | # LANGUAGE ScopedTypeVariables #
module Periodic.Server
( startServer
) where
import Control.Monad (void)
import Data.Binary.Get (getWord32be, runGet)
import Data.ByteString (ByteString)
import Data.ByteString.Lazy (fromStri... |
de6dc6405966f0c9b6ead99f804c16b62f44e5c56bef117c07f5192ecebab4d0 | gbour/wave | wave_access_log.erl | %%
Wave - MQTT Broker
Copyright ( C ) 2014 - 2016 -
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , version 3 of the License .
%%
%% This program is distribut... | null | https://raw.githubusercontent.com/gbour/wave/fe5b78408a7c6e723b19cd454068958058e5e072/apps/wave/src/wave_access_log.erl | erlang |
This program is free software: you can redistribute it and/or modify
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
along with this program. If not, see ... | Wave - MQTT Broker
Copyright ( C ) 2014 - 2016 -
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , version 3 of the License .
GNU Affero General Public License for more details .
You should have received a copy of the GNU Affero Ge... |
8b8248065f67c4330d06b0b45032f6efc258d43654b48d36767f2c30caaa4e27 | bobbae/gosling-emacs | ll-window.ml | ;****************************************************************
;* File: ll-window.ml *
;* Last modified on Fri Apr 18 12:16:02 1986 by roberts *
;* ----------------------------------------------------------- *
;* This package has the responsibility for maintaini... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/ll-window.ml | ocaml | ;****************************************************************
;* File: ll-window.ml *
;* Last modified on Fri Apr 18 12:16:02 1986 by roberts *
;* ----------------------------------------------------------- *
;* This package has the responsibility for maintaini... | |
8eb73a2535590f389d06b043a3c874284a53a9a4b666f5698c96c8e90117006f | pa-ba/compdata | Comp.hs | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances ,
FlexibleContexts , UndecidableInstances , TypeOperators , ScopedTypeVariables ,
TypeSynonymInstances #
FlexibleContexts, UndecidableInstances, TypeOperators, ScopedTypeVariables,
TypeSynonymInstances #-}
module Param.DataTypes.Comp ... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/benchmark/Param/DataTypes/Comp.hs | haskell | import Data.Comp.Arbitrary ()
import Test.QuickCheck.Property
base values | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances ,
FlexibleContexts , UndecidableInstances , TypeOperators , ScopedTypeVariables ,
TypeSynonymInstances #
FlexibleContexts, UndecidableInstances, TypeOperators, ScopedTypeVariables,
TypeSynonymInstances #-}
module Param.DataTypes.Comp ... |
41e2e3f3b1e39cad22f99e574f7313e88fda725170a006946d333b4c6a208409 | diku-dk/futhark | DataDependencies.hs | -- | Facilities for inspecting the data dependencies of a program.
module Futhark.Analysis.DataDependencies
( Dependencies,
dataDependencies,
findNecessaryForReturned,
)
where
import Data.List qualified as L
import Data.Map.Strict qualified as M
import Futhark.IR
| A mapping from a variable name @v@ , t... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/Analysis/DataDependencies.hs | haskell | | Facilities for inspecting the data dependencies of a program.
| Compute the data dependencies for an entire body.
| @findNecessaryForReturned p merge deps@ computes which of the
of that parameter is live after the loop. @deps@ is the data
dependencies of the loop body. This is computed by straightforward
fixp... | module Futhark.Analysis.DataDependencies
( Dependencies,
dataDependencies,
findNecessaryForReturned,
)
where
import Data.List qualified as L
import Data.Map.Strict qualified as M
import Futhark.IR
| A mapping from a variable name @v@ , to those variables on which
the value of @v@ is dependent . The ... |
9f3b7b3f6ad1effe6d57d8fae7b2e6ddeefcaeb6d0bfeebe67647b183245de37 | supki/liblastfm | TasteometerSpec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Xml.TasteometerSpec (spec) where
import Data.Text (Text)
import Lastfm
import qualified Lastfm.Tasteometer as Taste
import Test.Hspec
import Text.Xml.Lens
import SpecHelper
spec :: Spec
spec = do
it ... | null | https://raw.githubusercontent.com/supki/liblastfm/754be163c4ce14c9b4819f1359b5f95a0f91a29d/test/api/Xml/TasteometerSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Xml.TasteometerSpec (spec) where
import Data.Text (Text)
import Lastfm
import qualified Lastfm.Tasteometer as Taste
import Test.Hspec
import Text.Xml.Lens
import SpecHelper
spec :: Spec
spec = do
it "compare" $
publicly (Taste.com... |
0b66f329eab7a13638f9e93e5ac5e196f1657d75265ee94b3efad725c6b10008 | nmunro/cl-tutorials | main.lisp | (defpackage hangman/tests/main
(:use :cl
:hangman
:rove))
(in-package :hangman/tests/main)
;; NOTE: To run this test file, execute `(asdf:test-system :hangman)' in your Lisp.
(deftest test-target-1
(testing "should (= 1 1) to be true"
(ok (= 1 1))))
| null | https://raw.githubusercontent.com/nmunro/cl-tutorials/e42f879edb01456f3cf0d159b0042e8e61f1b02e/3-hangman/tests/main.lisp | lisp | NOTE: To run this test file, execute `(asdf:test-system :hangman)' in your Lisp. | (defpackage hangman/tests/main
(:use :cl
:hangman
:rove))
(in-package :hangman/tests/main)
(deftest test-target-1
(testing "should (= 1 1) to be true"
(ok (= 1 1))))
|
5f4cbae5aec17020c1a44ee5f2dfe34239100ab10581597d30dbb0ee25fd9064 | bcc32/projecteuler-ocaml | bench_is_prime.ml | open! Core
open! Import
let%bench_fun ("is_prime cached" [@indexed n = [ 10; 100; 1_000; 10_000 ]]) =
ignore (Number_theory.Int.is_prime n : bool);
fun () -> Number_theory.Int.is_prime n
;;
| null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/647a1db1caaf919a1c506c213a2e7948ac3ea63c/bench/src/bench_is_prime.ml | ocaml | open! Core
open! Import
let%bench_fun ("is_prime cached" [@indexed n = [ 10; 100; 1_000; 10_000 ]]) =
ignore (Number_theory.Int.is_prime n : bool);
fun () -> Number_theory.Int.is_prime n
;;
| |
c47654a6c116db6bca75236b941f5f8d0819798ff3eaeb9129ac8fa35fb7823d | iu-parfunc/haskell_dsl_tour | OverloadingFeldspar.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE RebindableSyntax #
module OverloadingFeldspar where
import Feldspar.GADT
import Feldspar.InterpGADT
import Prelude (Int,(*),(+),fromInteger, return,(>>))
import qualified Prelude as P
x :: Exp () Int
x = 3 + 4
type EBool e = Exp e (Int -> Int -... | null | https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/front_end/overloading/OverloadingFeldspar.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE RebindableSyntax #
module OverloadingFeldspar where
import Feldspar.GADT
import Feldspar.InterpGADT
import Prelude (Int,(*),(+),fromInteger, return,(>>))
import qualified Prelude as P
x :: Exp () Int
x = 3 + 4
type EBool e = Exp e (Int -> Int -... | |
3542197334c64eae488959ddcdccb44bec87b8379c22aa60fc06f8e56a4574e3 | missingfaktor/akar | combinators.clj | (ns akar.combinators
(:require [akar.patterns :refer [!fail !bind !pred !any]]
[akar.internal.utilities :refer :all]
[akar-commons.miscellaneous :refer :all]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Combinators to compose a number of patterns into on... | null | https://raw.githubusercontent.com/missingfaktor/akar/66403b735cafab4e9fb971b4bf56e899ee84962f/akar-core/src/akar/combinators.clj | clojure |
Combinators corresponding to common pattern operations
"Further" combinators
matched by other patterns. What follows are a set of combinators that support such
"furthering", and related features.
Aliases for succinctness in direct use | (ns akar.combinators
(:require [akar.patterns :refer [!fail !bind !pred !any]]
[akar.internal.utilities :refer :all]
[akar-commons.miscellaneous :refer :all]))
Combinators to compose a number of patterns into one
(def !and
(variadic-reductive-function
:zero !any
:combine (fn [!p1... |
704fc03a6259bfca8167df872472b55a66501f4832c1aafc06689d367c266189 | dstarcev/stepic-haskell | Task13.hs | module Module4.Task13 where
data Person = Person {
firstName :: String,
lastName :: String,
age :: Int } deriving Show
abbrFirstName :: Person -> Person
abbrFirstName p@Person{ firstName = (x:_:_) } = p { firstName = x : "." }
abbrFirstName p = p
| null | https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module4/Task13.hs | haskell | module Module4.Task13 where
data Person = Person {
firstName :: String,
lastName :: String,
age :: Int } deriving Show
abbrFirstName :: Person -> Person
abbrFirstName p@Person{ firstName = (x:_:_) } = p { firstName = x : "." }
abbrFirstName p = p
| |
956dfc84d08fa52a8538b3020dea37c331d81c332843f983660093248fb1461f | dannypsnl/scheme-to-arm64 | scheme.rkt | #lang nanopass
(provide E
scm/Final
unparse-scm/Final)
(define (constant? x)
(or (integer? x) (char? x) (boolean? x)))
(define-language scm
(terminals (symbol [name])
(constant [c])
(vector [v])
(string [s]))
(Expr [e body]
c
v
s
... | null | https://raw.githubusercontent.com/dannypsnl/scheme-to-arm64/7be6aaf2d5c3b45cffb98750b43d48df23550c50/lang/scheme.rkt | racket | list and pair
logical
comparison operators
type check
string
vector
make-closure stores function and environment
convert free-vars in body by using reference to $env | #lang nanopass
(provide E
scm/Final
unparse-scm/Final)
(define (constant? x)
(or (integer? x) (char? x) (boolean? x)))
(define-language scm
(terminals (symbol [name])
(constant [c])
(vector [v])
(string [s]))
(Expr [e body]
c
v
s
... |
6dcc0473e8c5b82ebf0272cfc4f70fd16ecf3171d8b1b67832006451853c6e58 | PLSysSec/lio | Error.hs | # LANGUAGE Trustworthy #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ExistentialQuantification #
{- |
This module exports exception types thrown in response to label
failures. In addition, it provides 'withContext', a function that
annotates any exceptions in the 'AnyLabelError' hierarchy that are
thrown within a... | null | https://raw.githubusercontent.com/PLSysSec/lio/622a3e7bc86a3b42ab4ce8be954064a5f142247a/lio/LIO/Error.hs | haskell | # LANGUAGE DeriveDataTypeable #
|
This module exports exception types thrown in response to label
failures. In addition, it provides 'withContext', a function that
annotates any exceptions in the 'AnyLabelError' hierarchy that are
thrown within a given scope. These annotations should be used to add
function names t... | # LANGUAGE Trustworthy #
# LANGUAGE ExistentialQuantification #
module LIO.Error (
Annotatable(..), withContext
, AnyLabelError(..), lerrToException, lerrFromException
, GenericPrivDesc(..), LabelError(..), labelError, labelErrorP
, InsufficientPrivs(..), insufficientPrivs
, ResultExceedsLabel(..)
) wh... |
494209c51a14253ea1621ce55ea5dfcd969e713883710ce7edbddaf27a100b1a | gfour/gic | digits_of_e1.hs | module Main where
main :: IO ()
main = putStrLn (show result)
eContFrac :: [Int]
eContFrac = 2 : (aux 2);
aux :: Int -> [Int]
aux n = 1 : (n : (1 : (aux (n+2)))) ;
-- Output a digit if we can
ratTrans :: Int -> Int -> Int -> Int -> [Int] -> [Int]
ratTrans a b c d xs =
case xs of
[] -> []
h : tl -> if (((si... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Data/digits_of_e1.hs | haskell | Output a digit if we can | module Main where
main :: IO ()
main = putStrLn (show result)
eContFrac :: [Int]
eContFrac = 2 : (aux 2);
aux :: Int -> [Int]
aux n = 1 : (n : (1 : (aux (n+2)))) ;
ratTrans :: Int -> Int -> Int -> Int -> [Int] -> [Int]
ratTrans a b c d xs =
case xs of
[] -> []
h : tl -> if (((signum1 c == signum1 d) || (ab... |
dda286777a4a6db71223f5883687e2bd5a4f2e856f140790c6c21387aebd1986 | McCLIM/McCLIM | seos-baseline.lisp | (in-package #:clim-demo)
(define-application-frame seos-baseline ()
()
(:menu-bar seos-command-table)
(:pane :application
:width 400
:height 400
:display-function #'display
:end-of-line-action :allow
:end-of-page-action :allow
:text-margins '(:left (:absolute... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Examples/seos-baseline.lisp | lisp | (run-frame-top-level (make-application-frame 'seos-baseline)) | (in-package #:clim-demo)
(define-application-frame seos-baseline ()
()
(:menu-bar seos-command-table)
(:pane :application
:width 400
:height 400
:display-function #'display
:end-of-line-action :allow
:end-of-page-action :allow
:text-margins '(:left (:absolute... |
a6e486afc85c0d46d2ab7b0f58cbd0e987fbf75ed1e5c836618a550fdf13bf78 | simonmar/haxl-icfp14-sample-code | MockData.hs | # LANGUAGE ExistentialQuantification , GADTs , StandaloneDeriving #
module MockData (requestVal) where
import Types
import Data.Time.Clock
import Data.Time.Calendar
requestVal :: Request a -> a
requestVal r = case r of
FetchPosts -> map PostId postids
FetchPostInfo (PostId n) -> postinfos !! ... | null | https://raw.githubusercontent.com/simonmar/haxl-icfp14-sample-code/31859f50e0548f3e581acd26944ceb00953f2c42/MockData.hs | haskell | # LANGUAGE ExistentialQuantification , GADTs , StandaloneDeriving #
module MockData (requestVal) where
import Types
import Data.Time.Clock
import Data.Time.Calendar
requestVal :: Request a -> a
requestVal r = case r of
FetchPosts -> map PostId postids
FetchPostInfo (PostId n) -> postinfos !! ... | |
56bfddf2d81d11109b02e7d7eed4d4018a63e8dfb05de85eb2ed5c5a4ccb9846 | BinaryAnalysisPlatform/bap | arm_helpers.ml | open Core_kernel[@@warning "-D"]
let sexpable_of_string t_of_sexp name =
try Some (t_of_sexp @@ Sexp.of_string name)
with Sexp.Of_sexp_error _ -> None
| null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/arm/arm_helpers.ml | ocaml | open Core_kernel[@@warning "-D"]
let sexpable_of_string t_of_sexp name =
try Some (t_of_sexp @@ Sexp.of_string name)
with Sexp.Of_sexp_error _ -> None
| |
f0770d5c62b3433d2400e9b50bd574626d91e36b089087dc2cc259ef60e84b3c | cyga/real-world-haskell | A.hs | -- file: ch25/A.hs
import System.Environment
import Text.Printf
main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
mean :: [Double] -> Double
mean xs = sum xs / fromIntegral (length xs)
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch25/A.hs | haskell | file: ch25/A.hs | import System.Environment
import Text.Printf
main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
mean :: [Double] -> Double
mean xs = sum xs / fromIntegral (length xs)
|
5be187f0357a9bb8decb34dc0a430e45ad371ace97763edfdf4f239dec9ef920 | technion/erlvulnscan | recaptcha.erl | -module(recaptcha).
-define(RECAPTHA_API_URL, "").
-export([verify/2]).
-spec verify_live(binary(), binary(), string()) -> atom().
verify_live(RemoteIP, Captcha, Key) ->
URL = ?RECAPTHA_API_URL ++ "?"
"secret=" ++ Key ++ "&"
"remoteip=" ++ binary_to_list(RemoteIP) ++ "&"
"response=" ++ binary_to_list(C... | null | https://raw.githubusercontent.com/technion/erlvulnscan/8d109c49c8ecf331a4a859296e9fafd57aa458cd/src/recaptcha.erl | erlang | -module(recaptcha).
-define(RECAPTHA_API_URL, "").
-export([verify/2]).
-spec verify_live(binary(), binary(), string()) -> atom().
verify_live(RemoteIP, Captcha, Key) ->
URL = ?RECAPTHA_API_URL ++ "?"
"secret=" ++ Key ++ "&"
"remoteip=" ++ binary_to_list(RemoteIP) ++ "&"
"response=" ++ binary_to_list(C... | |
a1268aabd251048a102a9979e7485eab6759d47f0e2a3b159c4d75c397287832 | thiagozg/GitHubJobs-Clojure-Service | http_config.clj | (ns github-jobs.di.http-config
(:require [github-jobs.service :as service]
[io.pedestal.http :as http]
[io.pedestal.http :as server]))
(defn provides
[environment]
(-> {:env environment
::http/routes service/routes
::http/type :jetty
::... | null | https://raw.githubusercontent.com/thiagozg/GitHubJobs-Clojure-Service/9b17da56ebe773f6aed96337ac516307d91a1403/src/github_jobs/di/http_config.clj | clojure | (ns github-jobs.di.http-config
(:require [github-jobs.service :as service]
[io.pedestal.http :as http]
[io.pedestal.http :as server]))
(defn provides
[environment]
(-> {:env environment
::http/routes service/routes
::http/type :jetty
::... | |
fd1308a3e66344b53db8d6ec4199114383fd6cb1a05c1e345aa6fcf858119840 | bennn/dissertation | moment.rkt | #lang typed/racket/base
;; Moments in time
;; Need the requires on top to stop syntax errors; opaques must
;; come lexically before their use
(require
require-typed-check
"../base/types.rkt"
"gregor-adapter.rkt"
racket/match
(only-in racket/math exact-round)
"tzinfo-adapter.rkt"
)
(require/typed/check "hm... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/gregor/typed/moment.rkt | racket | Moments in time
Need the requires on top to stop syntax errors; opaques must
come lexically before their use
-----------------------------------------------------------------------------
/contract
(parameter/c tz/c)]
(->i ([year exact-integer?])
[day (year month) (day-of-month/c year month)]
#:tz [tz ... | #lang typed/racket/base
(require
require-typed-check
"../base/types.rkt"
"gregor-adapter.rkt"
racket/match
(only-in racket/math exact-round)
"tzinfo-adapter.rkt"
)
(require/typed/check "hmsn.rkt"
[NS/SECOND Natural]
)
(require/typed/check "datetime.rkt"
[datetime (->* (Natural) (Month Natural Natu... |
ee5010fce5765e95e1fdcc43736ee80714b9ce9cfae90569cb8f010d6e9f0c57 | cmsc430/www | regexp.rkt | #lang racket
(provide accepts)
type Regexp =
| ' zero
| ' one
| ` ( char , )
| ` ( times , Regexp , Regexp )
| ` ( plus , Regexp , Regexp )
| ` ( star , Regexp )
;; Regexp String -> Boolean
(define (accepts r s)
(matcher r (string->list s) (λ (cs) (empty? cs))))
Regexp ( ) ( ( ) - > Bool ) - >... | null | https://raw.githubusercontent.com/cmsc430/www/fcc64c41d1b96cce6dbda49509d2f2ab8ee9f404/langs/loot/regexp.rkt | racket | Regexp String -> Boolean | #lang racket
(provide accepts)
type Regexp =
| ' zero
| ' one
| ` ( char , )
| ` ( times , Regexp , Regexp )
| ` ( plus , Regexp , Regexp )
| ` ( star , Regexp )
(define (accepts r s)
(matcher r (string->list s) (λ (cs) (empty? cs))))
Regexp ( ) ( ( ) - > Bool ) - > Bool
(define (matcher r cs ... |
21b27d87a9f6ca3560fb3a28bb7a44fec6e58cd34c9b4d6ed80330047a980edf | hopv/MoCHi | ModelCheck.ml | open Util
open Mochi_util
open CEGAR_syntax
open CEGAR_type
open CEGAR_util
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
type filename = string
type node = UnitNode | BrNode | LineNode of int | EventNode of string
type counterexample =
| CESafety of TrecsInterface.counterexampl... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/ModelCheck.ml | ocaml | open Util
open Mochi_util
open CEGAR_syntax
open CEGAR_type
open CEGAR_util
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
type filename = string
type node = UnitNode | BrNode | LineNode of int | EventNode of string
type counterexample =
| CESafety of TrecsInterface.counterexampl... | |
6970b4be68924fadde514078fc275d19118262a085a033f60f6bc7465842da61 | mirage/irmin-watcher | polling.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/mirage/irmin-watcher/753084ba383ca5d1ea30b3bf89c8757a782d213c/src/polling.mli | ocaml | * [v] is [with_delay !default_polling_time]. | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) 2... |
98ce410f77ee5b4b23f7cffa4e49676c89faacc97c9b80625b4d227d832791cb | coccinelle/coccinelle | check_reachability.ml |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/2df29c1740c8639d181e83eb58b36599686a0b62/engine/check_reachability.ml | ocaml | ----------------------------------------------------------------
code to check for ambiguities
no point to search if no path, and the presence of after
in the AF formula can make things slow
let gt = !Flag_ctl.graphical_trace in
Flag_ctl.graphical_trace := "";
Flag_ctl.graphical_trace := gt... |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... |
36eeff395c485060f76df0b003b3c0c2f74531a6e20e8f8714f1f9c4e5882121 | diku-dk/futhark | LowerAllocations.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeFamilies #
-- | This pass attempts to lower allocations as far towards the bottom of their
-- body as possible.
module Futhark.Pass.LowerAllocations
( lowerAllocationsSeqMem,
lowerAllocationsGPUMem,
lowe... | null | https://raw.githubusercontent.com/diku-dk/futhark/174e8d862def6f52d5c9a36fa3aa6e746049776e/src/Futhark/Pass/LowerAllocations.hs | haskell | # LANGUAGE ConstraintKinds #
| This pass attempts to lower allocations as far towards the bottom of their
body as possible.
| The input stms
| The allocations currently being lowered
| The other statements processed so far | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeFamilies #
module Futhark.Pass.LowerAllocations
( lowerAllocationsSeqMem,
lowerAllocationsGPUMem,
lowerAllocationsMCMem,
)
where
import Control.Monad.Reader
import Data.Function ((&))
import Data.Map qualified as M
import Data.Sequen... |
fcf7c1983e6aa6a476848c899fbf1e475908e49a235502d715f7a0f94b766914 | mck-/Open-VRP | conditions.lisp | ;; Error condition definitions
;; -------------------------
(in-package :open-vrp.util)
lib / lists.lisp
(define-condition unaccepted-predicate (error)
((pred :initarg :pred :reader pred))
(:report "Accepts only #'> or #'<."))
(define-condition index-out-of-bounds (error)
((index :initarg :index :reader inde... | null | https://raw.githubusercontent.com/mck-/Open-VRP/408cb67063474ab61ddfc1631b5ac39714f2535e/lib/conditions.lisp | lisp | Error condition definitions
-------------------------
lib/constraints.lisp
lib/init-macros.lisp
lib/draw-solution.lisp
lib/read-test-case.lisp |
(in-package :open-vrp.util)
lib / lists.lisp
(define-condition unaccepted-predicate (error)
((pred :initarg :pred :reader pred))
(:report "Accepts only #'> or #'<."))
(define-condition index-out-of-bounds (error)
((index :initarg :index :reader index)
(ls :initarg :ls :reader ls)))
(define-condition list... |
8366e4da31beffd4a7fa0dfc8804204481aa70b269557aa68e1a522e8bc5b4ac | monadbobo/ocaml-core | field.mli | (** OCaml record field. *)
(* ['record] is the type of the record. ['field] is the type of the
values stored in the record field with name [name]. *)
type ('record, 'field) t = {
name : string;
setter : ('record -> 'field -> unit) option;
getter : ('record -> 'field);
fset : ('record -> 'field -> 'record... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/fieldslib/lib/field.mli | ocaml | * OCaml record field.
['record] is the type of the record. ['field] is the type of the
values stored in the record field with name [name]. |
type ('record, 'field) t = {
name : string;
setter : ('record -> 'field -> unit) option;
getter : ('record -> 'field);
fset : ('record -> 'field -> 'record);
}
val name : (_, _) t -> string
val get : ('r, 'a) t -> 'r -> 'a
val fset : ('r, 'a) t -> 'r -> 'a -> 'r
val setter : ('r, 'a) t -> ('r -> 'a -> unit... |
ea9948012efc71c1ef705e8e4e60f634c889f0656428f18533b6ba1f20fda3d5 | clojure-interop/java-jdk | SynthTableHeaderUI.clj | (ns javax.swing.plaf.synth.SynthTableHeaderUI
"Provides the Synth L&F UI delegate for
JTableHeader."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.synth SynthTableHeaderUI]))
(defn ->synth-table-header-ui
"Constructor."
(^SynthTableHeaderUI []
(new SynthTableHeaderUI )))
... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/synth/SynthTableHeaderUI.clj | clojure | (ns javax.swing.plaf.synth.SynthTableHeaderUI
"Provides the Synth L&F UI delegate for
JTableHeader."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.synth SynthTableHeaderUI]))
(defn ->synth-table-header-ui
"Constructor."
(^SynthTableHeaderUI []
(new SynthTableHeaderUI )))
... | |
8035e7ad0ad59487c87a3fdbfa6a7f5e2ed3e2ae53d54ad2deed76dfb4bdbcc0 | Decentralized-Pictures/T4L3NT | time_repr.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/time_repr.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
e07730aed36ed7755af05e1d987582accde15f4c7d2e12614f5633f7d5cb9230 | wenkokke/fgg-gen | Base.hs | {-# OPTIONS -fno-warn-partial-type-signatures #-}
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE EmptyDataDeriving #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE PatternSynonyms #-}
# LANGUAGE PartialTypeSignatures #
{-# LANGUA... | null | https://raw.githubusercontent.com/wenkokke/fgg-gen/2beadebaf7d46b947c1deb7b6e4b2c0084251343/src/Language/FGG/DeBruijn/Base.hs | haskell | # OPTIONS -fno-warn-partial-type-signatures #
# LANGUAGE EmptyDataDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE PatternSynonyms #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
** Programs
** Type declara... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
module Language.FGG.DeBruijn.Base where
import Control.Enumerable
import Data.Bifunctor
import Languag... |
cbc7c37151bf65addb305f061337b33530c4a9157899927d1b394ce0fe541715 | namin/propagators | load.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 Massachusetts Institute of Technology .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you ... | null | https://raw.githubusercontent.com/namin/propagators/ae694dfe680125e53a3d49e5e91c378f2d333937/core/load.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2009 Massachusetts Institute of Technology .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should ... |
9fe8f4ccb3e1efe51da6a92db6a4aadb3a3b339759f689d8e561b1b0c19ba555 | ddmcdonald/sparser | post-trans-mods.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
Copyright ( c ) 2017 SIFT LLC . All Rights Reserved
;;;
;;; File: "post-trans-mod"
;;; Module: "grammar/model/sl/biology/
version : May 2017
Broken out from phenomena 5/10/17
;; Contains post-translational modifications; phosphorylation... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/grammar/model/sl/biology/post-trans-mods.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
File: "post-trans-mod"
Module: "grammar/model/sl/biology/
Contains post-translational modifications; phosphorylation; ubiquitination; and post-translational modifications with IDs
---------------------------------
post-translational-modific... | Copyright ( c ) 2017 SIFT LLC . All Rights Reserved
version : May 2017
Broken out from phenomena 5/10/17
(in-package :sparser)
" It is interesting that various stimuli provoke EGF receptor tyrosine phosphorylation by two distinct means . " )
(define-category post-translational-modification :specializes caused... |
13ab80f00dd5692fb8312581ccb34d8180cbf3e19d2aaf0b7761cb4aaa7eee3f | gator1/jepsen | kafka_test.clj | (ns jepsen.kafka-test
(:require [clojure.test :refer :all]
[jepsen.core :as jepsen]
[jepsen.kafka :as kafka]))
(deftest kafka-test
(is (:valid? (:results (jepsen/run! (kafka/kafka-test "2.12" "0.10.2.0"))))))
| null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/kafka/test/jepsen/kafka_test.clj | clojure | (ns jepsen.kafka-test
(:require [clojure.test :refer :all]
[jepsen.core :as jepsen]
[jepsen.kafka :as kafka]))
(deftest kafka-test
(is (:valid? (:results (jepsen/run! (kafka/kafka-test "2.12" "0.10.2.0"))))))
| |
4fc29eddae3ce31657e5c9c415e9aaf74bd7b6a469b3b51edec9655aba603deb | metabase/metabase | date_bucketing_test.clj | (ns metabase.query-processor-test.date-bucketing-test
"The below tests cover the various date bucketing/grouping scenarios that we support. There are are always two
timezones in play when querying using these date bucketing features. The most visible is how timestamps are returned
to the user. With no report time... | null | https://raw.githubusercontent.com/metabase/metabase/f827b28e5cd3a6eff8bce08780d48bb9b825a654/test/metabase/query_processor_test/date_bucketing_test.clj | clojure | TIMEZONE FIXME — currently broken for Snowflake. UNIX timestamps are interpreted as being in the report timezone
rather than UTC.
re-parse them or do anything smart with them; we just return them directly. This is less than ideal.
TIMEZONE FIXME
When the reporting timezone is applied, the same datetime value is re... | (ns metabase.query-processor-test.date-bucketing-test
"The below tests cover the various date bucketing/grouping scenarios that we support. There are are always two
timezones in play when querying using these date bucketing features. The most visible is how timestamps are returned
to the user. With no report time... |
abe8967babb7ad43c60195ad6984e53a7f207c96bdc18150fc6ac953314ec2b5 | guildhall/guile-sly | fps.scm |
Copyright ( C ) 2013 , 2014 >
;;;
;;; This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; This program is ... | null | https://raw.githubusercontent.com/guildhall/guile-sly/92f5f21da76986c5b606b36afc4bb984cc63da5b/sly/fps.scm | scheme |
This program is free software: you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General P... |
Copyright ( C ) 2013 , 2014 >
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU General Public License
Frames per second counter .
(define-module (sly fps)
#:use-module (sly g... |
9e370e11c5e6f2def3c38fd0877964d55a210ae0b610a533e563acfd24880658 | janestreet/async_extra | async_bus.mli | (** Async operations on {{!Core.Bus}[Core.Bus]}. *)
open! Core
open! Async_kernel
open! Import
(** [pipe1_exn t] returns a pipe of updates from [t] by subscribing to [t]. Closing the
pipe unsubscribes from [t]. Closing [t] closes the pipe. Calling [pipe1_exn] on a
closed bus always returns an empty pipe. ... | null | https://raw.githubusercontent.com/janestreet/async_extra/581ea77ab9a2ac8d3cbbbcfc0bd8421d0b5342e2/async_bus/src/async_bus.mli | ocaml | * Async operations on {{!Core.Bus}[Core.Bus]}.
* [pipe1_exn t] returns a pipe of updates from [t] by subscribing to [t]. Closing the
pipe unsubscribes from [t]. Closing [t] closes the pipe. Calling [pipe1_exn] on a
closed bus always returns an empty pipe. [pipe1_exn] raises in the same circumstances
as... |
open! Core
open! Async_kernel
open! Import
val pipe1_exn
: ('a -> unit, [> read ]) Bus.t
-> Source_code_position.t
-> 'a Pipe.Reader.t
val pipe1_filter_map_exn
: ('a -> unit, [> read ]) Bus.t
-> Source_code_position.t
-> f:('a -> 'b option)
-> 'b Pipe.Reader.t
module First_arity : sig
type (_, _, ... |
2b3ad90ce9a9fe84ea5a833c24dac8ee5846bce8a886410616d0ea742edacd87 | tonyg/kali-scheme | eval2.scm |
(define-local-syntax (define-primitive id nargs)
(let ((args (reverse (list-tail '(z y x) (- '3 nargs)))))
`(define (,id . ,args)
(call-primitively ,id . ,args))))
(define-primitive ashr 2)
(define high-bits ashr)
| null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/test/eval2.scm | scheme |
(define-local-syntax (define-primitive id nargs)
(let ((args (reverse (list-tail '(z y x) (- '3 nargs)))))
`(define (,id . ,args)
(call-primitively ,id . ,args))))
(define-primitive ashr 2)
(define high-bits ashr)
| |
e459a5408b9de73468b443edcd7bb1fd6c7bd3d9affc8f057268fcbb21af6b02 | archaelus/tsung | mochiweb_xpath.erl | %% mochiweb_html_xpath.erl
@author
created on < 2008 - 04 - 29 >
%%
XPath interpreter , navigate 's html structs
Only a subset of is implemented , see what is supported in test.erl
-module(mochiweb_xpath).
-export([execute/2,execute/3,compile_xpath/1]).
internal data
-record(ctx, {
root,
c... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/lib/mochiweb_xpath.erl | erlang | mochiweb_html_xpath.erl
the default set of functions.
@type XPath = compiled_xpath() | string()
@type Doc = node()
@type Results = [node()] | binary() | boolean() | number()
using the default set of functions plus the user-supplied ones.
@see mochiweb_xpath_functions.erl to see how to write functions
... | @author
created on < 2008 - 04 - 29 >
XPath interpreter , navigate 's html structs
Only a subset of is implemented , see what is supported in test.erl
-module(mochiweb_xpath).
-export([execute/2,execute/3,compile_xpath/1]).
internal data
-record(ctx, {
root,
ctx,
functions
}).
... |
7e91e5c3a5a1c3d45ef91c742c2cf992ffc2f3e4a633fb5e0497da2d2f752ec9 | Quid2/zm | K20ffacc8f8c9.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.ZM.ADT.LeastSignificantFirst.K20ffacc8f8c9 (LeastSignificantFirst(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
newtype LeastSignificantFirst a = LeastSignifi... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/ZM/ADT/LeastSignificantFirst/K20ffacc8f8c9.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # | module Test.ZM.ADT.LeastSignificantFirst.K20ffacc8f8c9 (LeastSignificantFirst(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
newtype LeastSignificantFirst a = LeastSignificantFirst a
deriving (Prelude.Eq, Prelude.Ord, Prelude.Show, G... |
1e86f3d5658ec7992e6e14f4e0386199e2f4a36bd1105c0694b10dd6b326d1f8 | fare/lisp-interface-library | stateful-map.lisp | (uiop:define-package :lil/test/stateful-map
(:import-from :pure)
(:use :stateful :lil/test/base :lil/transform/mutating-map :lil/interface/base
:cl :uiop :fare-utils :hu.dwim.stefil)
(:import-from :lil/test/pure-map))
(in-package :lil/test/stateful-map)
(declaim (optimize (speed 1) (debug 3) (space 3)))
... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/test/stateful-map.lisp | lisp | TODO: test each and every function in the API
TODO: add more tests
TODO: add more tests
(X 'join/list)
TODO: add tests
TODO: add more tests | (uiop:define-package :lil/test/stateful-map
(:import-from :pure)
(:use :stateful :lil/test/base :lil/transform/mutating-map :lil/interface/base
:cl :uiop :fare-utils :hu.dwim.stefil)
(:import-from :lil/test/pure-map))
(in-package :lil/test/stateful-map)
(declaim (optimize (speed 1) (debug 3) (space 3)))
... |
71a9abbe564703cf7193ae6d15aa317099124158e6eda7fdcc6ef4112397a85a | gedge-platform/gedge-platform | rabbit_amqp1_0_message.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_amqp1_0_message).
-export([assemb... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_message.erl | erlang |
ignore delivery annotations for now
TODO: handle "rejected" error
Everything else we will leave as-is. We still have to parse the
sections one-by-one, however, to see when we hit the footer or
whatever comes next.
pertaining to body sections, that is:
We allow any number of each kind, in any permutation.
-----... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_amqp1_0_message).
-export([assemble/1, ... |
e54e0cfa08044957cd6ab9fb57e6938b74bcf613357917de2e3f49107f5f9fdf | facebookarchive/hs-zstd | Types.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in
-- the LICENSE file in the root directory of this source tree. An
additional grant of patent rights can be found in the PATENTS file
-- in the same directory.
{-# LANGUAG... | null | https://raw.githubusercontent.com/facebookarchive/hs-zstd/ae7f174bb614a2fb71cfbb36e93a136ff9430fd7/Codec/Compression/Zstd/Types.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in
the LICENSE file in the root directory of this source tree. An
in the same directory.
# LANGUAGE BangPatterns #
|
Module : Codec.Compression.Zstd.Types
License : BSD3
Maintainer :
Stability : experimental
| ... | Copyright ( c ) 2016 - present , Facebook , Inc.
additional grant of patent rights can be found in the PATENTS file
Copyright : ( c ) 2016 - present , Facebook , Inc. All rights reserved .
Portability : GHC
Types supporting zstd compression and decompression .
module Codec.Compression.Zstd.Types
(
... |
fc980087ea894af6d1df873b27efdb4331578124d6eb7aa75a5ada7d932f9bf6 | LambdaScientist/CLaSH-by-example | SimulateDesign.hs | -- CONVERTED
import ClocksAndRegisters . TestClks_n_regs_4
import qualified ClocksAndRegisters . Models . Clks_n_regs_4 as CR
import ClocksAndRegisters . TestDflop_en_clr
import ClocksAndRegisters . Models . Dflop_en_clr
import ClocksAndRegisters . TestDflop_sync_enable
import ClocksAndRegisters . Models ... | null | https://raw.githubusercontent.com/LambdaScientist/CLaSH-by-example/e783cd2f2408e67baf7f36c10398c27036a78ef3/HaskellClashExamples/src/SimulateDesign.hs | haskell | CONVERTED
------------ DEAD ------------------------------------------------------------
------------ END DEAD --------------------------------------------------------
import ModularDesign.TestModular1
import ModularDesign.Models.Modular1
import ModularDesign.Models.Modular2
import SAFE.CommonClash
topEntity = CR... | import ClocksAndRegisters . TestClks_n_regs_4
import qualified ClocksAndRegisters . Models . Clks_n_regs_4 as CR
import ClocksAndRegisters . TestDflop_en_clr
import ClocksAndRegisters . Models . Dflop_en_clr
import ClocksAndRegisters . TestDflop_sync_enable
import ClocksAndRegisters . Models . Dflop_sync_... |
5b707c5cd25e80ab53d92f14613298453848c60020d594064437423f21bd9a9f | diagrams/diagrams-cairo | Reflect.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
d = unitSquare <> reflectAbout (P (1/2,1/2)) (-2,-1) unitSquare
main = defaultMain (pad 1.1 d) | null | https://raw.githubusercontent.com/diagrams/diagrams-cairo/533e4f4f18f961543bb1d78493c750dec45fd4a3/test/Reflect.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
d = unitSquare <> reflectAbout (P (1/2,1/2)) (-2,-1) unitSquare
main = defaultMain (pad 1.1 d) | |
9b8d1062dcc526ee24017d3abec5a12caa9b80753355f835b9d679ff367fbded | JacquesCarette/Drasil | MakeString.hs | -- | Defines types and functions for generating Makefiles.
module Build.Drasil.Make.MakeString where
-- * Types
-- | Type synonym for variable names.
type VarName = String
-- | Type synonym for variable values.
type VarVal = String
^ A string for Makefiles .
| Mv MVar -- ^ Holds a Makefile variable... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/92dddf7a545ba5029f99ad5c5eddcd8dad56a2d8/code/drasil-build/lib/Build/Drasil/Make/MakeString.hs | haskell | | Defines types and functions for generating Makefiles.
* Types
| Type synonym for variable names.
| Type synonym for variable values.
^ Holds a Makefile variable.
^ Implicit OS.
^ Independent of OS.
* Functions
| Renders variables. Takes in a function for the variable, and the type of variable.
| Constructor... | module Build.Drasil.Make.MakeString where
type VarName = String
type VarVal = String
^ A string for Makefiles .
^ Concatenates two ' MakeString 's .
instance Semigroup MakeString where
(<>) = Mc
instance Monoid MakeString where
mempty = Mr ""
| For creating Makefile variables .
^ Operating System spec... |
161207a8bfe77770eda0d138731fe94e79dfe2bc1e2f41949f067015b284588f | reynir/ocaml-ssh-agent | util.ml | let cstruct_of_array arr =
let r = Cstruct.create (Array.length arr) in
Array.iteri (fun idx v -> Cstruct.set_uint8 r idx v) arr;
r
let id_sha1 = [|
type Sequence , length 0x21 ( 33 )
type Sequence , length 0x09
type OID , length 0x05
0x2b; 0x0e; 0x03; 0x02; 0x1a; (* id-sha1 OID *)
0x05; 0x00; (* NULL ... | null | https://raw.githubusercontent.com/reynir/ocaml-ssh-agent/574cf846d52c061efae20a238209ce25327ceb51/src/util.ml | ocaml | id-sha1 OID
NULL
id-sha256
NULL
id-sha512
NULL | let cstruct_of_array arr =
let r = Cstruct.create (Array.length arr) in
Array.iteri (fun idx v -> Cstruct.set_uint8 r idx v) arr;
r
let id_sha1 = [|
type Sequence , length 0x21 ( 33 )
type Sequence , length 0x09
type OID , length 0x05
string , length 0x14 ( 20 ) , followed by sha1 hash
|] |> cstruct_of_... |
d9d3762c68e32ba5862188f4def5180746ce366549c0532574cfbaa56a187942 | era-platform/cene-for-racket | main.rkt | #lang parendown/slash racket/base
; cene
;
A Racket library with entrypoints to the Cene programming language .
Copyright 2018 - 2020 , 2022 The Era Authors
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
; you may not use this file except in compliance with the License.
; You ma... | null | https://raw.githubusercontent.com/era-platform/cene-for-racket/a7eff215758fe228735f41a349f3b7475cc0e652/cene-lib/main.rkt | racket | cene
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,
either express or implied. See the License for the specific
language governing permissions and limitations under the L... | #lang parendown/slash racket/base
A Racket library with entrypoints to the Cene programming language .
Copyright 2018 - 2020 , 2022 The Era Authors
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND ,
(require cene/private/shim)
(... |
4243a8fa37c08a2b6c5f1d3543305f56bdfc9c4d72644e17dc6b7eb1cc9dc4bb | cedlemo/OCaml-Notty-introduction | basics_I_string.ml | open Notty
open Notty_unix
(* ocamlbuild -pkg notty -pkg notty.unix basics_I_string.native *)
let () =
I.string A.(fg lightred) "Wow!"
|> eol
|> Notty_unix.output_image
| null | https://raw.githubusercontent.com/cedlemo/OCaml-Notty-introduction/9295b43382354c504d5efcad3ba56cff6f34d2eb/basics_I_string.ml | ocaml | ocamlbuild -pkg notty -pkg notty.unix basics_I_string.native | open Notty
open Notty_unix
let () =
I.string A.(fg lightred) "Wow!"
|> eol
|> Notty_unix.output_image
|
ff7c702f8295eced2f1a3f9d32d0858583dd6be7a04e70f083aee5b535c2bff6 | tyage/tiny-c | Asm.hs | module Asm where
import Data.List
import Control.Applicative hiding (Const)
import Control.Monad.State
import Type
import Show
genAsmLabel :: State AsmEnvironment Label
genAsmLabel = do
env <- get
put $ env { asmLabelCounter = (asmLabelCounter env) + 1 }
return $ "L" ++ show (asmLabelCounter env)
putReturnLab... | null | https://raw.githubusercontent.com/tyage/tiny-c/92aed366ad4e610b3daf15c9fccf4d5b6f3ba6ad/task8/Asm.hs | haskell | module Asm where
import Data.List
import Control.Applicative hiding (Const)
import Control.Monad.State
import Type
import Show
genAsmLabel :: State AsmEnvironment Label
genAsmLabel = do
env <- get
put $ env { asmLabelCounter = (asmLabelCounter env) + 1 }
return $ "L" ++ show (asmLabelCounter env)
putReturnLab... | |
ec89b0d56caa01d49ef361a102d7d60dee7f5d439a2d38dfbc8e66ebbf0ef54e | mariachris/Concuerror | ets_delete.erl | -module(ets_delete).
-export([ets_delete/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
ets_delete() ->
ets:new(table, [public, named_table]),
spawn(fun() ->
ets:insert(table, {key, value})
end),
ets:delete(table),
receive
deadlock -> ok
en... | null | https://raw.githubusercontent.com/mariachris/Concuerror/87e63f10ac615bf2eeac5b0916ef54d11a933e0b/testsuite/suites/dpor/src/ets_delete.erl | erlang | -module(ets_delete).
-export([ets_delete/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
ets_delete() ->
ets:new(table, [public, named_table]),
spawn(fun() ->
ets:insert(table, {key, value})
end),
ets:delete(table),
receive
deadlock -> ok
en... | |
78ea252d6618b02dd1558e24fcacbcfaf6bfa3fb131acb7029ee5d6cac14de29 | robert-strandh/SICL | map-local-instructions.lisp | (cl:in-package #:cleavir-ir)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Function MAP - LOCAL - INSTRUCTIONS
;;;
Traverse an instruction graph in depth first order . The traversal
;;; starts from an ENTER-INSTRUCTION, and does not descend into
;;; enclosed functions; thus all instr... | null | https://raw.githubusercontent.com/robert-strandh/SICL/a7d7b08607834198588e440693fa7d6b743e52c1/Code/Cleavir/Intermediate-representation/map-local-instructions.lisp | lisp |
starts from an ENTER-INSTRUCTION, and does not descend into
enclosed functions; thus all instructions mapped have the input
ENTER as their owner, and all reachable instructions with the
ENTER as their owner are mapped.
Function FILTER-LOCAL-INSTRUCTIONS
Return, in some arbitrary order, a list of all local i... | (cl:in-package #:cleavir-ir)
Function MAP - LOCAL - INSTRUCTIONS
Traverse an instruction graph in depth first order . The traversal
(defun map-local-instructions (function enter-instruction)
(let ((visited-instructions (make-hash-table :test #'eq))
(instructions-to-process '()))
(flet ((register-i... |
58b71c717efa0e651f42398160789bec8cb876a804ad1ecce1e3d2d339a2844b | songyahui/AlgebraicEffect | discard_continuation.ml | effect Zero: int
let rec times lst =
match lst with
| [] -> 1
| 0 :: rest -> perform Zero
| v :: rest -> v * times rest
let handler () =
match times [1;2;3;4;5] with
| v -> v
| effect Zero k -> 0
let main =
print_string (string_of_int (handler ()) ^ "\n") | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/sp_tests/discard_continuation.ml | ocaml | effect Zero: int
let rec times lst =
match lst with
| [] -> 1
| 0 :: rest -> perform Zero
| v :: rest -> v * times rest
let handler () =
match times [1;2;3;4;5] with
| v -> v
| effect Zero k -> 0
let main =
print_string (string_of_int (handler ()) ^ "\n") | |
1e0ce804dde003596996c5080e3a13b218cc3f031e86439746aaf3600124a9cb | orivej/pzmq | compat.lisp | (in-package #:pzmq)
(defun sendmsg (socket msg &key dontwait sndmore)
"Send a message part on a socket."
(msg-send msg socket :dontwait dontwait :sndmore sndmore))
(defun recvmsg (socket msg &key dontwait)
"Receive a message part from a socket."
(msg-recv msg socket :dontwait dontwait))
(defun init (io-threa... | null | https://raw.githubusercontent.com/orivej/pzmq/91dd3a891e639f41d44bfb5f449daf0fcd408e29/compat.lisp | lisp | (in-package #:pzmq)
(defun sendmsg (socket msg &key dontwait sndmore)
"Send a message part on a socket."
(msg-send msg socket :dontwait dontwait :sndmore sndmore))
(defun recvmsg (socket msg &key dontwait)
"Receive a message part from a socket."
(msg-recv msg socket :dontwait dontwait))
(defun init (io-threa... | |
431e9c2fddeabff727971cd3002fedd58f08ce9197a2883aa7389550eb066177 | cabol/gen_buffer | gen_buffer_dist_SUITE.erl | -module(gen_buffer_dist_SUITE).
-include_lib("common_test/include/ct.hrl").
%% Common Test
-export([
all/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2
]).
%% Common Test Cases
-include_lib("mixer/include/mixer.hrl").
-mixin([
{gen_buffer_test_cases, [
t_eval/1,
t_e... | null | https://raw.githubusercontent.com/cabol/gen_buffer/35dbe556f84bc84e10527ecb0c98228815064d9d/test/gen_buffer_dist_SUITE.erl | erlang | Common Test
Common Test Cases
Test Cases
===================================================================
Common Test
===================================================================
===================================================================
Tests Cases
==============================================... | -module(gen_buffer_dist_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2
]).
-include_lib("mixer/include/mixer.hrl").
-mixin([
{gen_buffer_test_cases, [
t_eval/1,
t_eval_error/1,
t_send_and_recv_err... |
5e6b174130d1f4cc4752c458aa3d177fc46ae1f1bddb46d760e753dc166b3970 | goldfirere/units | NoVector.hs | # OPTIONS_GHC -fno - warn - type - defaults -fno - warn - missing - signatures #
module Tests.Compile.NoVector where
import Data.Metrology
import Data.Metrology.SI
x = 5 % Meter
y = 2 % Second
vel = x |/| y
| null | https://raw.githubusercontent.com/goldfirere/units/0ffc07627bb6c1eacd60469fd9366346cbfde334/units-test/Tests/Compile/NoVector.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults -fno - warn - missing - signatures #
module Tests.Compile.NoVector where
import Data.Metrology
import Data.Metrology.SI
x = 5 % Meter
y = 2 % Second
vel = x |/| y
| |
c51b1887f1ecc79e4bbf13f5f8165f0e25ae35df6484323127d9a3861dcb9b0f | dgtized/shimmers | graph_test.cljc | (ns shimmers.math.graph-test
(:require
[clojure.test :as t :refer [deftest is] :include-macros true]
[loom.graph :as lg]
[shimmers.math.graph :as sut]
[thi.ng.geom.vector :as gv]))
;; a - b f
;; \
;; | e |
;; \
;; d - c g
(def points (map gv/vec2 [[0 0] [1 0] [1 1] [0 1] [0.5 0.5] [2 0] [2 1]]))... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/test/shimmers/math/graph_test.cljc | clojure | a - b f
\
| e |
\
d - c g
b-e and d-e only touch at e, so by current definition they are planar,
but this definition is debatable. | (ns shimmers.math.graph-test
(:require
[clojure.test :as t :refer [deftest is] :include-macros true]
[loom.graph :as lg]
[shimmers.math.graph :as sut]
[thi.ng.geom.vector :as gv]))
(def points (map gv/vec2 [[0 0] [1 0] [1 1] [0 1] [0.5 0.5] [2 0] [2 1]]))
(def graph
(let [[a b c d] points]
(sut/ed... |
3a019a81fd64a981e31d695e7304b571c0dc25c16c2c2b33bc3b3ce259e54ef2 | UnBParadigmas2022-1/2022.1_G3_Funcional_ProjetoPacman | Djikstra.hs | module Algorithms.Djikstra (djikstraPath) where
import Data.Heap ( insert, null, view, empty, MinPrioHeap )
import Data.List ( (\\) )
import Graphics.Gloss ( Point )
import Game.Map
( freeAdjsPoints, generateNext, mapaAtual, point2Index )
import Types ( Mapa, MultValor )
calcCaminho :: Mapa -> [MultValor] -> Poi... | null | https://raw.githubusercontent.com/UnBParadigmas2022-1/2022.1_G3_Funcional_ProjetoPacman/ea190f2b1c38591c7c4becfc550eeaf1ec1b94c3/app/Algorithms/Djikstra.hs | haskell | module Algorithms.Djikstra (djikstraPath) where
import Data.Heap ( insert, null, view, empty, MinPrioHeap )
import Data.List ( (\\) )
import Graphics.Gloss ( Point )
import Game.Map
( freeAdjsPoints, generateNext, mapaAtual, point2Index )
import Types ( Mapa, MultValor )
calcCaminho :: Mapa -> [MultValor] -> Poi... | |
548419b3c31a8a8e3d8c734c1d654fdbd0f84f8291263632fac0e395c0a030e0 | semaj/hask-raft | Server.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Server where
import Message
import Utils
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.List
import Data.Aeson
import Data.Maybe
import Data.Time
import System.Random
imp... | null | https://raw.githubusercontent.com/semaj/hask-raft/c5bd63e30d504db757fccdc0e586ca1a843cac2b/Server.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
ID
The other server IDs
The hashmap of keys & values
Messages to send this round
Server -> Next message to send (not heartbeat!)
Server -> Last time we sent a message (not heartbeat!)
Followers/Candidates store this so when a leader is elected, flush
Our ... | # LANGUAGE RecordWildCards #
module Server where
import Message
import Utils
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.List
import Data.Aeson
import Data.Maybe
import Data.Time
import System.Random
import Debug.Trace
data ServerState = Follower | Candidate | Leader... |
c23d20875f23b036c08707059f9a24d1589a69fa004631161324178413833366 | haskell-github/github | CommitComments.hs | module CommitComments where
import qualified Github.Repos.Commits as Github
import Data.List
import Data.Maybe (maybe)
main = do
possibleComments <- Github.commitCommentsFor "thoughtbot" "paperclip" "41f685f6e01396936bb8cd98e7cca517e2c7d96b"
case possibleComments of
(Left error) -> putStrLn $ "Error: " ++ ... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Repos/Commits/CommitComments.hs | haskell | module CommitComments where
import qualified Github.Repos.Commits as Github
import Data.List
import Data.Maybe (maybe)
main = do
possibleComments <- Github.commitCommentsFor "thoughtbot" "paperclip" "41f685f6e01396936bb8cd98e7cca517e2c7d96b"
case possibleComments of
(Left error) -> putStrLn $ "Error: " ++ ... | |
d73421118dd029f041b8a871e19b84b7d68c41ebf5c5ae145e29994e3d14e6ad | sbcl/sbcl | compiler-slow.pure.lisp | (with-test (:name (compile eval the type-error))
(checked-compile-and-assert (:optimize :safe)
'(lambda (v)
(list (the fixnum (the (real 0) (eval v)))))
((0.1) (condition 'type-error))
((-1) (condition 'type-error))))
(defun pick-acceptable-default (specifier)
(let ((parse (sb-kernel:specifi... | null | https://raw.githubusercontent.com/sbcl/sbcl/db5f383e5fc0fbe0155dc557ba6ac5ed77fd8a8f/tests/compiler-slow.pure.lisp | lisp | (format t "~&testcase: ~s~%" specifier)
KLUDGE
Floats duplicated here to ensure we get newly created instances
Test all permutations of different types | (with-test (:name (compile eval the type-error))
(checked-compile-and-assert (:optimize :safe)
'(lambda (v)
(list (the fixnum (the (real 0) (eval v)))))
((0.1) (condition 'type-error))
((-1) (condition 'type-error))))
(defun pick-acceptable-default (specifier)
(let ((parse (sb-kernel:specifi... |
bda930969b94aba42663deffc39263f8ae053914825ab6ad40eb6de2149de779 | cirodrig/triolet | Parser.hs | {-# OPTIONS #-}
-----------------------------------------------------------------------------
-- |
Module : Language . Python . Version3.Parser
Copyright : ( c ) 2009
-- License : BSD-style
Maintainer :
-- Stability : experimental
Portability : ghc
--
A parser for Python version 3.x progr... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Language/Python/Version3/Parser.hs | haskell | # OPTIONS #
---------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
modules, statements, and expressions. The parsers produce comment tokens
in addition to the abstract syntax tree.
See:
* <> for an overview of the language.
* <> fo... | Module : Language . Python . Version3.Parser
Copyright : ( c ) 2009
Maintainer :
Portability : ghc
A parser for Python version 3.x programs . Parsers are provided for
module Language.Python.Version3.Parser (
parseModule,
parseStmt,
parseExpr) where
import Language.Python.Version3.Pars... |
052d0336966a864e4092bbb1465a759a01dba11cd5b7274e754cbf122ae30d6a | input-output-hk/plutus | Pairs.hs | module Benchmarks.Pairs (makeBenchmarks) where
import Common
import Generators
import PlutusCore
import Criterion.Main
import System.Random (StdGen)
-- The pair projection operations should be constant time, but we check that by
-- giving it a list of pairs whose components are of increasing size.
benchPairOp :: S... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/plutus-core/cost-model/budgeting-bench/Benchmarks/Pairs.hs | haskell | The pair projection operations should be constant time, but we check that by
giving it a list of pairs whose components are of increasing size. | module Benchmarks.Pairs (makeBenchmarks) where
import Common
import Generators
import PlutusCore
import Criterion.Main
import System.Random (StdGen)
benchPairOp :: StdGen -> DefaultFun -> Benchmark
benchPairOp gen fun =
createOneTermBuiltinBench fun [integer, bytestring] pairs
where pairs = zip ints by... |
bf01dae148e8b81cbb66bead36f2147371e55b127ea39f22fc11ee9a5c9e37d0 | modular-macros/ocaml-macros | attr_helper.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/parsing/attr_helper.ml | ocaml | ************************************************************************
OCaml
... | , Jane Street Europe
Copyright 2015 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Parsetree
type error =
| Multiple_attributes of string
| No_payload_expected of stri... |
53afbc0da059d9c904468e09a23381cf76a56141c64aba5914fcc063e05c9120 | bmeurer/ocamljit2 | equations.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/misc-kb/equations.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Terms
type rule =
{ n... |
d90801bdb6bb0222326ba6db9c3f7b9b11acee59e3fa35cd8bda22528c4d2322 | green-labs/gosura | node.clj | (ns gosura.helpers.node
(:require [camel-snake-kebab.core :as csk]
[com.walmartlabs.lacinia.schema :as schema]))
(defn tag-with-subtype
[{:keys [subtype] :as row} subtype->node-type]
(let [node-type (get subtype->node-type subtype)]
(-> row
(assoc :node-type node-type)
(schema/tag... | null | https://raw.githubusercontent.com/green-labs/gosura/94f9dc493424668b7c5c8d497049d86d1b752305/src/gosura/helpers/node.clj | clojure | (ns gosura.helpers.node
(:require [camel-snake-kebab.core :as csk]
[com.walmartlabs.lacinia.schema :as schema]))
(defn tag-with-subtype
[{:keys [subtype] :as row} subtype->node-type]
(let [node-type (get subtype->node-type subtype)]
(-> row
(assoc :node-type node-type)
(schema/tag... | |
3589174318d3d9a75a9949789f4128c7e1e54130eff40ce574bb0a0544f4079e | exercism/common-lisp | pythagorean-triplet.lisp | (defpackage :pythagorean-triplet
(:use :cl)
(:export :triplets-with-sum))
(in-package :pythagorean-triplet)
(defun triplets-with-sum (n))
| null | https://raw.githubusercontent.com/exercism/common-lisp/196a0e72bd57b42e16ff8a70ba1e67d20350b725/exercises/practice/pythagorean-triplet/pythagorean-triplet.lisp | lisp | (defpackage :pythagorean-triplet
(:use :cl)
(:export :triplets-with-sum))
(in-package :pythagorean-triplet)
(defun triplets-with-sum (n))
| |
0946ca33c7a3fe61e07c5c93f466cc79cd0cbb93ede4e8ee467fa1d3d3549d45 | exoscale/clojure-kubernetes-client | v1_subject.clj | (ns clojure-kubernetes-client.specs.v1-subject
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-subject-data v1-subject)
(def v1-subject-data
{
(ds/opt :apiGroup) string?
(ds/req :kind) string?
(ds/req :name) string?
(... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_subject.clj | clojure | (ns clojure-kubernetes-client.specs.v1-subject
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-subject-data v1-subject)
(def v1-subject-data
{
(ds/opt :apiGroup) string?
(ds/req :kind) string?
(ds/req :name) string?
(... | |
91a833099baef9f32e05a348085ab18b431c786bc0f719977ba928ff82d36db2 | mfikes/fifth-postulate | ns199.cljs | (ns fifth-postulate.ns199)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns199.cljs | clojure | (ns fifth-postulate.ns199)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
c8436843442b0f3754011676b77d2951abe2a52a650f5bd3f270311bd7a3242e | anik545/OwlPPL | test_empirical.ml | open Ppl
open Core
let todo () = ()
let test_disc =
Samples.(add_sample (add_sample (add_sample (add_sample empty 1) 2) 3) 1)
let test_cont = CSamples.from_dist (normal 0. 1.)
let d_pdf () =
let f = Samples.to_pdf test_disc in
let g = Samples.get_prob test_disc in
Alcotest.(check (list (float 0.000001)))
... | null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/test/unit_tests/test_empirical.ml | ocaml | let g = CSamples.to_cdf test_cont in
("cdf", `Quick, todo);
("adding samples", `Quick, c_more_samples); | open Ppl
open Core
let todo () = ()
let test_disc =
Samples.(add_sample (add_sample (add_sample (add_sample empty 1) 2) 3) 1)
let test_cont = CSamples.from_dist (normal 0. 1.)
let d_pdf () =
let f = Samples.to_pdf test_disc in
let g = Samples.get_prob test_disc in
Alcotest.(check (list (float 0.000001)))
... |
7247ecaca570f6986585c6466fcab387e024f6a4bc69ec8e7e66f196d0372234 | microsoft/SLAyer | CounterExample.mli | Copyright ( c ) Microsoft Corporation . All rights reserved .
* Generation of counter - example trace for sdvdefect viewer
val disprove : Analysis.t -> bool
| null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/CounterExample.mli | ocaml | Copyright ( c ) Microsoft Corporation . All rights reserved .
* Generation of counter - example trace for sdvdefect viewer
val disprove : Analysis.t -> bool
| |
9b3c035822ecf751637c04b9373256751263b3a5aa82681e8c0c7fd00cf151f4 | tweag/webauthn | WebAuthn.hs | # OPTIONS_GHC -Wno - missing - import - lists #
-- | Stability: provisional
--
-- This is the main module of the library. It re-exports the most commonly
-- needed modules and should be the only module considered stable. The
-- following sections give an overview of how a web application can use the
exported symbols... | null | https://raw.githubusercontent.com/tweag/webauthn/349a2b408a79107d9f07c017b72b03c9c306e5fa/src/Crypto/WebAuthn.hs | haskell | | Stability: provisional
This is the main module of the library. It re-exports the most commonly
needed modules and should be the only module considered stable. The
following sections give an overview of how a web application can use the
allows the creation and use of public key-based credentials for the purpos... | # OPTIONS_GHC -Wno - missing - import - lists #
exported symbols to make use of the WebAuthn standard .
= = WebAuthn basics
For a web application the [ WebAuthn standard]( / TR / webauthn-2/ )
The WebAuthn standard usually involves three different devices , each of which
can be [ WebAuthn conformant]( / TR /... |
099ac6de6f3e42995157459132840668ebc5af9aea3db65f9a27f884daee4572 | ktakashi/sagittarius-scheme | document.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; text/markdown/parser/document.scm - Document parser
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. R... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/7aa51b5eb02e520b0902350251c4f5c3b3395990/sitelib/text/markdown/parser/document.scm | scheme | coding : utf-8 -*-
text/markdown/parser/document.scm - Document parser
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 lis... | Copyright ( c ) 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
#!nounbound
(library (text markdown parser document... |
91c6703e1041d7bd1f874f9b54ff70a2090874e808aa6347c6179e17544e2aff | fyquah/hardcaml_zprize | top.mli | * Instantiate the parallel NTT cores along with the load and store state machines .
Exposes AXI streaming interfaces .
Exposes AXI streaming interfaces. *)
open! Base
open Hardcaml
module Make (Config : Top_config.S) : sig
module Four_step : module type of Hardcaml_ntt.Four_step.Make (Config)
module A... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/zprize/ntt/hardcaml/src/top.mli | ocaml | * Begin processing a pass.
* Low while a pass is running. | * Instantiate the parallel NTT cores along with the load and store state machines .
Exposes AXI streaming interfaces .
Exposes AXI streaming interfaces. *)
open! Base
open Hardcaml
module Make (Config : Top_config.S) : sig
module Four_step : module type of Hardcaml_ntt.Four_step.Make (Config)
module A... |
934f01e2d0962eecd7c356f27a3adaa7c4d26635774a8cb1b73808870fb949d7 | mflatt/not-a-box | wrap.rkt | #lang racket/base
(require '#%linklet
(for-syntax racket/base))
(provide unwrap unwrap-list
wrap-pair? wrap-null? wrap-car wrap-cdr wrap-list?
wrap-eq? wrap-equal?
in-wrap-list)
;; ----------------------------------------
;; Get `correlated?` and `correlated-e` reflectively, so th... | null | https://raw.githubusercontent.com/mflatt/not-a-box/b6c1af4fb0eb877610a3a20b5265a8c8d2dd28e9/schemify/wrap.rkt | racket | ----------------------------------------
Get `correlated?` and `correlated-e` reflectively, so that this
module can be flattened by the expander to a linklet that doesn't
refer to syntax primitives
----------------------------------------
outer bindings
outer check
loop bindings
pos check
inner bindings
pre g... | #lang racket/base
(require '#%linklet
(for-syntax racket/base))
(provide unwrap unwrap-list
wrap-pair? wrap-null? wrap-car wrap-cdr wrap-list?
wrap-eq? wrap-equal?
in-wrap-list)
(define kernel-table (primitive-table '#%kernel))
(define correlated?
(or (and kernel-table
... |
3b4bc3b013b198ff90bc21f765d44c1936a69261229cac380e73bbefda873c0b | haskell-mafia/projector | Backend.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Projector.Html.Backend (
Backend (..)
, checkModule
, runPredicates
) where
import qualified Data.Map.Strict as M
import P
import Projector.Core
import Projector.Html.Data.Backend
import Projec... | null | https://raw.githubusercontent.com/haskell-mafia/projector/6af7c7f1e8a428b14c2c5a508f7d4a3ac2decd52/projector-html/src/Projector/Html/Backend.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
Per-backend warnings and linting | # LANGUAGE NoImplicitPrelude #
module Projector.Html.Backend (
Backend (..)
, checkModule
, runPredicates
) where
import qualified Data.Map.Strict as M
import P
import Projector.Core
import Projector.Html.Data.Backend
import Projector.Html.Data.Module
import ... |
f1c6caa6a03bc87d9305787ca384719e75d6017abd5f0c9d0be107c69e2edc7c | ulisses/Static-Code-Analyzer | Ops.hs | {-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Syntax.Ops
Copyright : ( c ) 2008
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
Portability : ghc
--
Unary , binary and asssignme... | null | https://raw.githubusercontent.com/ulisses/Static-Code-Analyzer/4c3f6423d43e1bccb9d1cf04e74ae60d9170186f/Analyzer/language-c-0.3.2.1/src/Language/C/Syntax/Ops.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
Module : Language.C.Syntax.Ops
License : BSD-style
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
* Assignment operators
... | Copyright : ( c ) 2008
Portability : ghc
Unary , binary and asssignment operators . Exported via AST .
module Language.C.Syntax.Ops (
CAssignOp(..),
CUnaryOp(..),
CBinaryOp(..),
)
where
import Data.Generics
| C assignment operators ( )
data CAssignOp = CAssignOp
| CMulAssOp
... |
1276413ae89fd3709cce99c26e60e9fd6e411e8ccb717cdace602133d55d7e77 | alexander-yakushev/ns-graph | ns_graph.clj | (ns leiningen.ns-graph
"Leiningen plugin."
(:require [ns-graph.core :as core]
[ns-graph.plugin :as plugin]
[leiningen.core.main :as main])
(:import clojure.lang.ExceptionInfo))
(defn ns-graph [project & _]
(let [opts (merge {:name (str (:name project))
:source-paths... | null | https://raw.githubusercontent.com/alexander-yakushev/ns-graph/608515958701edcd50c9a101d198bf38a16a2339/src/leiningen/ns_graph.clj | clojure | (ns leiningen.ns-graph
"Leiningen plugin."
(:require [ns-graph.core :as core]
[ns-graph.plugin :as plugin]
[leiningen.core.main :as main])
(:import clojure.lang.ExceptionInfo))
(defn ns-graph [project & _]
(let [opts (merge {:name (str (:name project))
:source-paths... | |
80a07072aa8dfcc3020f500e666549bfcec60bc5d1fe12c3959fc9f40bf79354 | hadolint/hadolint | DL3007Spec.hs | module Hadolint.Rule.DL3007Spec (spec) where
import Data.Default
import Helpers
import Test.Hspec
spec :: SpecWith ()
spec = do
let ?config = def
describe "DL3007 - Using latest is prone to errors if the image will ever up\
\date. Pin the version explicitly to a release tag." $ do
it "explicit la... | null | https://raw.githubusercontent.com/hadolint/hadolint/43d2bfe9f71dea9ddd203d5bdbd2cc1fb512e4dd/test/Hadolint/Rule/DL3007Spec.hs | haskell | module Hadolint.Rule.DL3007Spec (spec) where
import Data.Default
import Helpers
import Test.Hspec
spec :: SpecWith ()
spec = do
let ?config = def
describe "DL3007 - Using latest is prone to errors if the image will ever up\
\date. Pin the version explicitly to a release tag." $ do
it "explicit la... | |
53ddee1b3982a1588b2ae8e860a65ad92e089f3ac6b1a1365da9f1a9946b717b | dannypsnl/k | bool.rkt | #lang k/base
(provide (data-out Bool)
not)
(data Bool : Type
[true : Bool]
[false : Bool])
(def (not [b : Bool]) : Bool
[false => true]
[true => false])
(data True? : (-> Bool Type)
[true? : (True? true)])
| null | https://raw.githubusercontent.com/dannypsnl/k/2b5f5066806a5bbd0733b781a2ed5fce6956a4f5/k-lib/k/data/bool.rkt | racket | #lang k/base
(provide (data-out Bool)
not)
(data Bool : Type
[true : Bool]
[false : Bool])
(def (not [b : Bool]) : Bool
[false => true]
[true => false])
(data True? : (-> Bool Type)
[true? : (True? true)])
| |
e4a87f359341dc3e980e762e89fbd6618e7466b20db20ef25aff47489eb18f57 | fragnix/fragnix | Data.Text.Internal.Encoding.Utf32.hs | # LANGUAGE Haskell98 #
# LINE 1 " Data / Text / Internal / Encoding / Utf32.hs " #
-- |
-- Module : Data.Text.Internal.Encoding.Utf32
Copyright : ( c ) 2008 , 2009 ,
( c ) 2009 , 2010 ,
( c ) 2009
--
-- License : BSD-style
-- Maintainer :
-- Stability : experiment... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Text.Internal.Encoding.Utf32.hs | haskell | |
Module : Data.Text.Internal.Encoding.Utf32
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
/Warning/: this is an internal module, and does not have a stable
API or name. Functions in this module may not check or enforce
preconditions expected by public modules.... | # LANGUAGE Haskell98 #
# LINE 1 " Data / Text / Internal / Encoding / Utf32.hs " #
Copyright : ( c ) 2008 , 2009 ,
( c ) 2009 , 2010 ,
( c ) 2009
module Data.Text.Internal.Encoding.Utf32
(
validate
) where
import Data.Word (Word32)
validate :: Word32 -> Bool... |
a99f6fe3a2e38b8215499920f858b3ac2719a09a6a5983286e4ceb59735f74ac | cobbpg/lafonten | SimpleDistanceField.hs | # LANGUAGE ParallelListComp , OverloadedStrings , TypeOperators , DataKinds #
module LambdaCube.Font.SimpleDistanceField
( fontRenderer
, sampleDistance
) where
import Data.ByteString (ByteString)
import Data.Vect
import qualified Data.Trie as T
import qualified Data.Vector.Storable as SV
import ... | null | https://raw.githubusercontent.com/cobbpg/lafonten/2d95172085d44ce3eedef5e50e7d4df693f4562a/src/lib/LambdaCube/Font/SimpleDistanceField.hs | haskell | | A font renderer that uses a basic distance field to create curves that remain sharp even when magnified. The type of the
| A fragment shader snippet to sample the distance field. Takes the texture slot name and the uv coordinates as parameters. | # LANGUAGE ParallelListComp , OverloadedStrings , TypeOperators , DataKinds #
module LambdaCube.Font.SimpleDistanceField
( fontRenderer
, sampleDistance
) where
import Data.ByteString (ByteString)
import Data.Vect
import qualified Data.Trie as T
import qualified Data.Vector.Storable as SV
import ... |
c652bc2b56f86977a46f3a5261b186f063603ec6b149ca8bd3a43315c1f3bbcb | dgiot/dgiot | td_sup.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT 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... | null | https://raw.githubusercontent.com/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/apps/dgiot_tdengine/src/pools/td_sup.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 ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(td_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Name) ... |
bb7a063b46bff6b878a1a07715c6d51709b5723651f76fd9094dd52fc196ae3a | flavioc/cl-hurd | dir-unlink.lisp |
(in-package :hurd-translator)
(def-fs-interface :dir-unlink ((port port)
(name :string))
(with-lookup protid port
(let* ((node (get-node protid))
(user (get-user protid))
(found-node (directory-lookup *translator*
node... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/translator/interfaces/dir-unlink.lisp | lisp |
(in-package :hurd-translator)
(def-fs-interface :dir-unlink ((port port)
(name :string))
(with-lookup protid port
(let* ((node (get-node protid))
(user (get-user protid))
(found-node (directory-lookup *translator*
node... | |
01d8989357dc66e57e80fc9bd503be59b41db721a5f37e57fbde0d5a82de35ec | ocurrent/ocaml-docs-ci | storage.ml | module Base = struct
type repository = HtmlRaw of Epoch.t | Linked of Epoch.t | Compile | Prep
let generation_folder stage generation = Fpath.(v ("epoch-" ^ Epoch.digest stage generation))
let folder = function
| HtmlRaw generation -> Fpath.(generation_folder `Html generation / "html-raw")
| Linked gene... | null | https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/cb5d4a54a7fd9883aec066b4bd1fcb50ca42e7bc/src/lib/storage.ml | ocaml | module Base = struct
type repository = HtmlRaw of Epoch.t | Linked of Epoch.t | Compile | Prep
let generation_folder stage generation = Fpath.(v ("epoch-" ^ Epoch.digest stage generation))
let folder = function
| HtmlRaw generation -> Fpath.(generation_folder `Html generation / "html-raw")
| Linked gene... | |
daa1798aa5f512fbd3178def72e4292f41a7e89768e59cfef3fbc284277c356c | gdamore/tree-sitter-d | shebang.scm | ==================
Shebang
==================
#!/bin/sh
---
(source_file (shebang))
===================
Shebang + Directive
===================
#!/bin/sh
# something
# line 3
---
(source_file (shebang) (directive) (directive))
| null | https://raw.githubusercontent.com/gdamore/tree-sitter-d/d7b3cc1f9f1f59518457696a8547e0e1bb1a64b4/test/corpus/shebang.scm | scheme | ==================
Shebang
==================
#!/bin/sh
---
(source_file (shebang))
===================
Shebang + Directive
===================
#!/bin/sh
# something
# line 3
---
(source_file (shebang) (directive) (directive))
| |
d552a3a5c173f29b017de7da0788e794cafcd05ff1aabeae20c80ddcfa47ef16 | felipereigosa/mock-mechanics | core.clj | (ns mockmechanics.core
(:require [mockmechanics.library.vector :as vector]))
(load "world")
(load "analytic-geometry")
(load "camera")
(load "transforms")
(load "window")
(load "picture")
(load "debug")
(load "synthesizer")
(load "miscellaneous")
(load "output")
(load "parts")
(load "collision")
(load "weld-optimiz... | null | https://raw.githubusercontent.com/felipereigosa/mock-mechanics/9ec779f2458b08809d6bf76910675266be0674de/src/mockmechanics/core.clj | clojure | (:forces-active? @world) | (ns mockmechanics.core
(:require [mockmechanics.library.vector :as vector]))
(load "world")
(load "analytic-geometry")
(load "camera")
(load "transforms")
(load "window")
(load "picture")
(load "debug")
(load "synthesizer")
(load "miscellaneous")
(load "output")
(load "parts")
(load "collision")
(load "weld-optimiz... |
14e40f6bb759d6316862b4569627f9b081998912bd72c5a0d4864a81de73d8e0 | cedlemo/OCaml-GI-ctypes-bindings-generator | Fixed.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_fixed_new" (void @-> returning (ptr Widget.t_typ))
let move =
foreign "gtk_fixed_move" (t_typ @-> ptr Widget.t_typ @-> int32_t @-> int32_t @-> returning (void))
let put =
foreign "gtk_fixed_put" (t_typ @-> ptr Widg... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Fixed.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_fixed_new" (void @-> returning (ptr Widget.t_typ))
let move =
foreign "gtk_fixed_move" (t_typ @-> ptr Widget.t_typ @-> int32_t @-> int32_t @-> returning (void))
let put =
foreign "gtk_fixed_put" (t_typ @-> ptr Widg... | |
7cb58a6968a6e6e85790a67781045c78f9c0042cd1710e1b834ffb786082808b | neonsquare/mel-base | message-cache.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Copyright ( c ) 2004 , < > .
;;; All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistribution... | null | https://raw.githubusercontent.com/neonsquare/mel-base/7edc8fb94f30d29637bae0831c55825b0021e0f8/protocols/message-cache.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list... |
Copyright ( c ) 2004 , < > .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :mel.internal)
(defclass message-cache-mixin ()
((message-cache :accessor message-cache)))
(defclass hash-table-message-cache... |
297762e57ec1c5d9366265582ae689ae7c57963c618dbc9a1001291bfddc4919 | fosskers/aura | Test.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Linux.Arch.Aur
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Test.Tasty
import Test.Tasty.HUnit
---
suite :: Manager -> TestTree
suite m = testGroup "RPC Calls"
[ testCase "info on existing package" $ infoTest m
, testCase "info on n... | null | https://raw.githubusercontent.com/fosskers/aura/08cd46eaa598094f7395455d66690d3d8c59e965/haskell/aur/tests/Test.hs | haskell | # LANGUAGE OverloadedStrings #
- |
module Main where
import Linux.Arch.Aur
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Test.Tasty
import Test.Tasty.HUnit
suite :: Manager -> TestTree
suite m = testGroup "RPC Calls"
[ testCase "info on existing package" $ infoTest m
, testCase "info on nonexistant package" $ infoTest' m
, t... |
69ed2417a210978bac4673f276c64d27ca72c86089e5b04ac6266dbfbb7a00ee | purcell/adventofcode2016 | Day23.hs | module Main where
import AdventOfCode
import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Map (Map)
import Data.Foldable (toList)
import qualified Data.Map as M
import Data.Sequence (Seq)
import qualified Data.Sequence as Sq
newtype Reg =
Reg Char
deriving (Eq, Show)
data Value
= LitVal !Int
... | null | https://raw.githubusercontent.com/purcell/adventofcode2016/081f30de4ea6b939e6c3736d83836f4dd72ab9a2/src/Day23.hs | haskell | module Main where
import AdventOfCode
import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Map (Map)
import Data.Foldable (toList)
import qualified Data.Map as M
import Data.Sequence (Seq)
import qualified Data.Sequence as Sq
newtype Reg =
Reg Char
deriving (Eq, Show)
data Value
= LitVal !Int
... | |
ab595f9a054d0425a47a4e52b3dca01d7514dfd6e78dad22c77575fd0494b356 | hexlet-basics/exercises-clojure | test.clj | (ns cond-test
(:require [test-helper :refer [assert-solution]]
[index :refer [programmer-level]]))
(assert-solution
[[3] [18] [40]]
["junior" "middle" "senior"]
programmer-level)
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/20-logic/40-cond/test.clj | clojure | (ns cond-test
(:require [test-helper :refer [assert-solution]]
[index :refer [programmer-level]]))
(assert-solution
[[3] [18] [40]]
["junior" "middle" "senior"]
programmer-level)
| |
4799d17717c220dd7e83a85d9d022941b069af4f63d07e1868ebf577a23b0758 | duo-lang/duo-lang | Minimize.hs | module TypeAutomata.Minimize ( minimize ) where
import Data.Graph.Inductive.Graph ( lab, lpre, nodes, Graph(labEdges), Node )
import Data.List (partition, sort)
import Data.Maybe (fromMaybe, catMaybes, fromJust)
import Data.Set (Set)
import Data.Set qualified as S
import qualified Data.Map as M
import Syntax.RST.Typ... | null | https://raw.githubusercontent.com/duo-lang/duo-lang/62305c16e219477d6e33287a7752c258b5342c3e/src/TypeAutomata/Minimize.hs | haskell | map a pair of a node and an edge label to the node's predecessors along the label
find all predecessors with connecting edge labelled by specified label
with simplifications found in
𝐿 ← {𝐹}
while there exists 𝐴 ∈ 𝐿 do
𝐿 ← 𝐿 ⧵ {𝐴}
for each 𝑥 ∈ Σ do
𝑥 (𝐴)
if 𝑌 ∈ 𝐿 then
else... | module TypeAutomata.Minimize ( minimize ) where
import Data.Graph.Inductive.Graph ( lab, lpre, nodes, Graph(labEdges), Node )
import Data.List (partition, sort)
import Data.Maybe (fromMaybe, catMaybes, fromJust)
import Data.Set (Set)
import Data.Set qualified as S
import qualified Data.Map as M
import Syntax.RST.Typ... |
20f4dbf106e852742b3d03346d64604820f17c176b484ba9d937b3a273f2a2f8 | wdebeaum/step | whiz.lisp | ;;;;
;;;; W::whiz
;;;;
(define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::whiz
(wordfeats (W::morph (:forms (-vb) :past W::whizzed :ing W::whizzing)))
(SENSES
((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date nil :comments nil :vn ("run-51.3.2"))
(LF-... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/whiz.lisp | lisp |
W::whiz
like stroll,walk |
(define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::whiz
(wordfeats (W::morph (:forms (-vb) :past W::whizzed :ing W::whizzing)))
(SENSES
((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date nil :comments nil :vn ("run-51.3.2"))
(LF-PARENT ONT::move-rapidl... |
6e9c060c0c2863905cecf3420e3e356a43a0a934cbd736e0e49efe64ae2d9bbc | ermine/xmpp | lwt_test.ml | open StanzaError
module PlainSocket =
struct
open Lwt
type 'a z = 'a Lwt.t
type fd = Lwt_unix.file_descr
type socket = fd
let get_fd fd = fd
let open_connection sockaddr =
let fd = Lwt_unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
Lwt_unix.connect fd sockaddr >>= fun () ->
return fd
... | null | https://raw.githubusercontent.com/ermine/xmpp/85f31c5aaac6e3b5042694ff33ac8afdfb845c06/tests/lwt_test.ml | ocaml | open StanzaError
module PlainSocket =
struct
open Lwt
type 'a z = 'a Lwt.t
type fd = Lwt_unix.file_descr
type socket = fd
let get_fd fd = fd
let open_connection sockaddr =
let fd = Lwt_unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
Lwt_unix.connect fd sockaddr >>= fun () ->
return fd
... | |
3d6d1de425c3cb1d2ae2c13a559c4fa851865e7bedd083da69d5ee76ebe5acc3 | Clojure2D/clojure2d-examples | bvh.clj | (ns rt4.the-next-week.ch04b.bvh
(:require [rt4.the-next-week.ch04b.hittable :as hittable]
[rt4.the-next-week.ch04b.aabb :as aabb]
[rt4.the-next-week.ch04b.interval :as interval]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch04b/bvh.clj | clojure | (ns rt4.the-next-week.ch04b.bvh
(:require [rt4.the-next-week.ch04b.hittable :as hittable]
[rt4.the-next-week.ch04b.aabb :as aabb]
[rt4.the-next-week.ch04b.interval :as interval]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-... | |
0bd85f1d8fbab8fa812605b4044202c42a6e62e065ecf355f77ba078da49c876 | KaroshiBee/weevil | mdb_stepper_config.ml | module Client_context = Tezos_client_base.Client_context
module Client_context_unix = Tezos_client_base_unix.Client_context_unix
open Mdb_import.Tez
TODO make sure to link with correct protocol modules and mockup maker
type t = {
chain_id:Chain_id.t;
rpc_context:Env.Updater.rpc_context;
unix_mockup:Client_con... | null | https://raw.githubusercontent.com/KaroshiBee/weevil/ddb8d0fa8618db3ed2a7eaf4f635200e7a1cc8b6/bin/weevil_mdb_011/src/mdb_stepper_config.ml | ocaml | `Successor_level is safer?
TODO not sure about this fitness | module Client_context = Tezos_client_base.Client_context
module Client_context_unix = Tezos_client_base_unix.Client_context_unix
open Mdb_import.Tez
TODO make sure to link with correct protocol modules and mockup maker
type t = {
chain_id:Chain_id.t;
rpc_context:Env.Updater.rpc_context;
unix_mockup:Client_con... |
94d1791d85c5a31c9d197c45d2de5de512bde56bf95867ce0c8699c2a86e6aef | michiakig/LispInSmallPieces | chap8d.scm | $ I d : chap8d.scm , v 4.1 2006/11/24 18:41:05 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest ve... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap8d.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
variant of chap8c.scm for th... | $ I d : chap8d.scm , v 4.1 2006/11/24 18:41:05 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
(define (meaning e r tail?)
(if (atom? e)
(if (symbol?... |
5c6b48a4a1b9f1b49e6f7b3c73bc27dfa7f6659653e12c60085c81eb29ace06b | martinsumner/leveled | perf_SUITE.erl | -module(perf_SUITE).
-include_lib("common_test/include/ct.hrl").
-include("include/leveled.hrl").
-export([all/0]).
-export([bigpcl_bucketlist/1
]).
all() -> [bigpcl_bucketlist].
bigpcl_bucketlist(_Config) ->
%%
In OTP 22 + there appear to be issues with anonymous functions which
%% have a... | null | https://raw.githubusercontent.com/martinsumner/leveled/ed0301e2cfc767b6b65947e8283235b0b25ebf02/test/end_to_end/perf_SUITE.erl | erlang |
have a reference to loop state, requiring a copy of all the loop state
to be made when returning the function.
This test creates alarge loop state on the leveled_penciller to prove
this.
The problem can be resolved simply by renaming the element of the loop
state using within the anonymous function.
The fold ... | -module(perf_SUITE).
-include_lib("common_test/include/ct.hrl").
-include("include/leveled.hrl").
-export([all/0]).
-export([bigpcl_bucketlist/1
]).
all() -> [bigpcl_bucketlist].
bigpcl_bucketlist(_Config) ->
In OTP 22 + there appear to be issues with anonymous functions which
RootPath = testut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.