_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 |
|---|---|---|---|---|---|---|---|---|
d6ab60698abb65609804de91ecb4698fe0f68ddb94868800b038be03d4219e7e | f-o-a-m/kepler | Types.hs | # OPTIONS_GHC -fno - warn - orphans #
module Nameservice.Modules.Nameservice.Types where
import Data.Aeson as A
import Data.Bifunctor (bimap)
import Data.String.Conversions (cs)
import Data.Text (Text)
import Dat... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-docs/nameservice/src/Nameservice/Modules/Nameservice/Types.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Exceptions
-----------------------------------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
module Nameservice.Modules.Nameservice.Types where
import Data.Aeson as A
import Data.Bifunctor (bimap)
import Data.String.Conversions (cs)
import Data.Text (Text)
import Dat... |
c2da17194bd3e40954d35cffa0dd2a2f94d057d0972681b245c480dd78beb838 | juspay/atlas | Vehicle.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Product/Vehicle.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
76c63de368cba809763ab34b4666c82286d902fd1ef461d457f72ae96d99567f | input-output-hk/ouroboros-network | Unit.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/6fcd153ba865e5efc2c31b547ae07d84a7150f87/ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/Unit.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE RankNTypes #
| Helper function to run the test against the model and translate to something
| Helper function to run the test against the actual chain database and
| SupportsUnitTests for the test expression ne... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeFamilies #
module Test.Ouroboros.Storage.ChainDB.Unit (tests) where
import ... |
4f6ad0810c8e762649721f0ca4f292179e26bc5014a1002a24a2613675d1d659 | amnh/PCG | Internal.hs | # LANGUAGE BlockArguments #
module Benchmarks.Internal where
import Control.DeepSeq
import qualified Criterion.Main as C (bench, bgroup, defaultMain, nf)
import Data.Foldable
import qualified Weigh as W
timeAndWeigh
:: (NFData b)
=> String -- groupName
-> [(String, a -> b)] -- nam... | null | https://raw.githubusercontent.com/amnh/PCG/3a1b6bdde273ed4dc09717623986e1144b006904/lib/core/bench/Benchmarks/Internal.hs | haskell | groupName
name of benchmark and function
input | # LANGUAGE BlockArguments #
module Benchmarks.Internal where
import Control.DeepSeq
import qualified Criterion.Main as C (bench, bgroup, defaultMain, nf)
import Data.Foldable
import qualified Weigh as W
timeAndWeigh
:: (NFData b)
-> IO ()
timeAndWeigh groupName functions testInput =... |
2d368296ad4b799cf8b912bf412f1e133694d2785dc19c788053eab668097e03 | uim/uim | template.scm | Copyright ( c ) 2004 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; 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 ... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/test/template.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
document... | Copyright ( c ) 2004 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
ff95fba3d2bf90c160c52e0bec3a9c3430282f2d436e8c2faef9d19fd4f14d6a | Javran/advent-of-code | Day19.hs | module Javran.AdventOfCode.Y2019.Day19 (
) where
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.IntMap.Strict as IM
import Data.Semigroup
import Javran.AdventOfCode.Prelude
import Javran.AdventOfCode.Y2019.IntCode
{-
Note: unfortunately, the nature of this puzzle is that we
are dealing... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2019/Day19.hs | haskell |
Note: unfortunately, the nature of this puzzle is that we
are dealing with a blackbox that has some obvious properties
(like beams are bounded by straightlines) and this solution is specific
to the input data I received - I'll attempt to write it in a more general
manner but I won't be surprised if it doesn'... | module Javran.AdventOfCode.Y2019.Day19 (
) where
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.IntMap.Strict as IM
import Data.Semigroup
import Javran.AdventOfCode.Prelude
import Javran.AdventOfCode.Y2019.IntCode
data Day19 deriving (Generic)
type Coord = (Int, Int)
probes :: [Int] -> ... |
b06fd10f163a9a7077b071dcd3292dc65172c647d1bffa808e819c8001764d5d | stan-dev/stanc3 | Numbering.ml | open Core_kernel
open Core_kernel.Poly
open Middle
type state_t = Location_span.t list
type map_rect_registration_t = (int * string) list
let no_span_num = 0
let prepare_prog (mir : Program.Typed.t) :
Program.Numbered.t * state_t * map_rect_registration_t =
let label_locations = Queue.create () in
let map_re... | null | https://raw.githubusercontent.com/stan-dev/stanc3/c983e15ea9062515e39659cd46c5c68f0862da8f/src/stan_math_backend/Numbering.ml | ocaml | turn locations into numbers for array printing
map_rect numbering | open Core_kernel
open Core_kernel.Poly
open Middle
type state_t = Location_span.t list
type map_rect_registration_t = (int * string) list
let no_span_num = 0
let prepare_prog (mir : Program.Typed.t) :
Program.Numbered.t * state_t * map_rect_registration_t =
let label_locations = Queue.create () in
let map_re... |
76daf764bcc305fce95dfdad26599f6c7ca481d593c9a9618fd01ea8fdafd43a | exercism/ocaml | test.ml | open OUnit2
open React
open Hangman
(* Assert Equals Int *)
let aei exp got =
assert_equal exp got ~printer:string_of_int
(* Assert Equals String *)
let aes exp got =
assert_equal exp got ~printer:(fun s -> s)
(* Assert Equals Progress *)
let aep exp got =
let string_of_progress = function
| Win -> "Win"
... | null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/hangman/test.ml | ocaml | Assert Equals Int
Assert Equals String
Assert Equals Progress | open OUnit2
open React
open Hangman
let aei exp got =
assert_equal exp got ~printer:string_of_int
let aes exp got =
assert_equal exp got ~printer:(fun s -> s)
let aep exp got =
let string_of_progress = function
| Win -> "Win"
| Lose -> "Lose"
| Busy n -> "Busy " ^ string_of_int n in
assert_equal ... |
0391a344e899403f9f871bd8525c05d7caeea4c633520373274fc5e06c74dbcd | igorhvr/bedlam | xml.scm | The contents of this file are subject to the Mozilla Public License Version
1.1 ( the " License " ) ; you may not use this file except in compliance with
;;; the License. You may obtain a copy of the License at
;;; /
;;;
Software distributed under the License is distributed on an " AS IS " basis ,
;;; WITHOUT WAR... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/opt/sxml/scm/siscweb/xml.scm | scheme | you may not use this file except in compliance with
the License. You may obtain a copy of the License at
/
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
Contributor(s):
Alternatively, the contents of th... | The contents of this file are subject to the Mozilla Public License Version
Software distributed under the License is distributed on an " AS IS " basis ,
The Original Code is SISCweb .
The Initial Developer of the Original Code is .
Portions created by the Initial Developer are Copyright ( C ) 2005 - 2006
... |
8ead433e13537d8ab02154c2318cdf3b2409b80b7ed4373caf30952e90941878 | ucsd-progsys/liquidhaskell | TestM.hs | {-@ LIQUID "--expect-any-error" @-}
module TestM where
import RIO
{-@ LIQUID "--no-termination" @-}
{-@ measure counter1 :: World -> Int @-}
{-@ measure counter2 :: World -> Int @-}
@ incr : : RIO < { \x - > true } , { \w1 x w2 - > x = 5 } > Int @
incr :: RIO Int
incr = undefined
@ incr ' : : RIO < { \x - > true... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/benchmarks/icfp15/neg/TestM.hs | haskell | @ LIQUID "--expect-any-error" @
@ LIQUID "--no-termination" @
@ measure counter1 :: World -> Int @
@ measure counter2 :: World -> Int @ | module TestM where
import RIO
@ incr : : RIO < { \x - > true } , { \w1 x w2 - > x = 5 } > Int @
incr :: RIO Int
incr = undefined
@ incr ' : : RIO < { \x - > true } , { \w1 x w2 - > x < 5 } > Int @
incr' :: RIO Int
incr' = incr >>= return
@ return5 : : : Int | v = 5 } - > RIO < { \y - > true } , { \w1 y w2 - > ... |
8e2b9f36a556ec211fb679ea8d8eb8b191aae2c81e3bc13cea88466a990f522a | ciderpunx/57-exercises-for-programmers | P28SumSpec.hs | module P28SumSpec (main,spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import P28Sum hiding (main)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "sum'" $ do
it "returns zero when called with an empty list" $ do
sum' [] `shouldBe` 0
it "correctly sums a single element li... | null | https://raw.githubusercontent.com/ciderpunx/57-exercises-for-programmers/25958ab80cc3edc29756d3bddd2d89815fd390bf/test/P28SumSpec.hs | haskell | todo: how to test IO? | module P28SumSpec (main,spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import P28Sum hiding (main)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "sum'" $ do
it "returns zero when called with an empty list" $ do
sum' [] `shouldBe` 0
it "correctly sums a single element li... |
a13161ac44b02d78d182cca84ffc4c3401f4859a6d9538342cc1904b6d36811f | Liqwid-Labs/liqwid-libs | Minting.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE RoleAnnotations #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns #
| Module : Plutarch . Context . Minting
Copyright : ( C ) Liqwid Labs 2022
Maintainer : < >
Portability : GHC only
Stability : Experimental
Builder for minting contexts . ' MintingB... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-libs/8165d3a33daa5deb377db854b9c7b62aab9c2897/plutarch-context-builder/src/Plutarch/Context/Minting.hs | haskell | # LANGUAGE RankNTypes #
* Types
* Input
* builder
| @since 1.0.0
| @since 1.1.0
| @since 1.1.0
| @since 1.1.0
| Set CurrencySymbol for building Minting ScriptContext.
@since 1.1.1
| # LANGUAGE RoleAnnotations #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns #
| Module : Plutarch . Context . Minting
Copyright : ( C ) Liqwid Labs 2022
Maintainer : < >
Portability : GHC only
Stability : Experimental
Builder for minting contexts . ' MintingBuilder ' is an instance of '... |
ee78ea19c3bee5243bd1d89a1b1fefaef7f57be846503a9902c11e0ae0fbe74b | mitchellwrosen/planet-mitchell | QSem.hs | module Concurrency.QSem
( -- * QSem
QSem
, newQSem
, waitQSem
, signalQSem
-- * QSemN
, QSemN
, newQSemN
, waitQSemN
, signalQSemN
) where
import Control.Concurrent.QSem
import Control.Concurrent.QSemN
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Concurrency/QSem.hs | haskell | * QSem
* QSemN | module Concurrency.QSem
QSem
, newQSem
, waitQSem
, signalQSem
, QSemN
, newQSemN
, waitQSemN
, signalQSemN
) where
import Control.Concurrent.QSem
import Control.Concurrent.QSemN
|
64886096c06f596b8fce4028e3971af2fb86a709b38621bb09838c87cc90a94d | clj-kondo/clj-kondo | prefixed_libspec.clj | (ns foo.bar.baz)
(defn b [_])
(ns foo.baz)
(defn c [_])
(ns prefixed-libspec
(:require [foo
[bar [baz :as b]]
[baz :as c]]))
(b/b) ;; invalid arity
(c/c) ;; invalid arity
| null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/prefixed_libspec.clj | clojure | invalid arity
invalid arity | (ns foo.bar.baz)
(defn b [_])
(ns foo.baz)
(defn c [_])
(ns prefixed-libspec
(:require [foo
[bar [baz :as b]]
[baz :as c]]))
|
5c4798fca77a0e50e393b4e7c6984c44b215e10b26fea7d0c4cfe023dc2c05f4 | Deducteam/zenon_modulo | lltocoq.mli | Copyright 2004 INRIA
$ I d : lltocoq.mli , v 1.9 2011 - 12 - 28 16:43:33 doligez Exp $
val output :
out_channel ->
Phrase.phrase list ->
Phrase.phrase list ->
Llproof.proof ->
string list
;;
val p_expr : out_channel -> Expr.expr -> unit;;
val pp_expr : out_channel -> Expr.expr -> unit;;
| null | https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/lltocoq.mli | ocaml | Copyright 2004 INRIA
$ I d : lltocoq.mli , v 1.9 2011 - 12 - 28 16:43:33 doligez Exp $
val output :
out_channel ->
Phrase.phrase list ->
Phrase.phrase list ->
Llproof.proof ->
string list
;;
val p_expr : out_channel -> Expr.expr -> unit;;
val pp_expr : out_channel -> Expr.expr -> unit;;
| |
e6c601c2a4649f9b737fc87d37abe7a6eabe4b75f6849d15613c673ffe556bdc | alanz/ghc-exactprint | TH_localname.hs | # LANGUAGE TemplateHaskell #
module TH_localname where
x = \y -> [| y |]
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/TH_localname.hs | haskell | # LANGUAGE TemplateHaskell #
module TH_localname where
x = \y -> [| y |]
| |
a242b003d7a96b1dfc111c08e0bfef8fd759388239ae05d6d195dd8cdff68f2d | OlivierSohn/hamazed | Timing.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE NoImplicitPrelude #
-- | This module handles time constants of the game logic.
module Imj.Game.Hamazed.Timing
( gameMotionPeriod
, GameTime
, initalGameMultiplicator
) where
import Imj.Prelude
import Imj.Timing
{-# INLINE ... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-game-hamazed/src/Imj/Game/Hamazed/Timing.hs | haskell | # OPTIONS_HADDOCK hide #
| This module handles time constants of the game logic.
# INLINE gameMotionPeriod # |
# LANGUAGE NoImplicitPrelude #
module Imj.Game.Hamazed.Timing
( gameMotionPeriod
, GameTime
, initalGameMultiplicator
) where
import Imj.Prelude
import Imj.Timing
| Nominal game period when the associated ' Multiplicator ' is 1 .
gameMotionPeriod :: Time Durat... |
23e2c5a384297ad440093d9fecdd020469c82a8c88423a5a22cb8fe2b58ead1a | dongcarl/guix | cmake.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2017 , 2018 , 2020 < >
Copyright © 2018 Arun Isaac < >
Copyright © 2018 , 2020 < ... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/cmake.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2017 , 2018 , 2020 < >
Copyright © 2018 Arun Isaac < >
Copyright © 2018 , 2020 < >
Copyright © 2019 , 2020 < >
Copyright © 2019 ... |
86fb3f00bc586d4204d73fa6eacbead3106c1f9dd438b7cbaeff54a197f74064 | bnoordhuis/chicken-core | embedded4.scm | ;;; x.scm
(define (bar x) (gc) (* x x))
(define-external (baz (int i)) double
(sqrt i))
(return-to-host)
| null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/tests/embedded4.scm | scheme | x.scm |
(define (bar x) (gc) (* x x))
(define-external (baz (int i)) double
(sqrt i))
(return-to-host)
|
d97e4e2bcd14a495cc5413747b887c20a9203a43442ee61d7bebb28929436e56 | Apress/practical-webdev-haskell | ConfigSpec.hs | module ConfigSpec (spec) where
import ClassyPrelude
import Test.Hspec
import System.Environment
import Config
import qualified Adapter.PostgreSQL.Auth as PG
import qualified Adapter.RabbitMQ.Common as MQ
spec :: Spec
spec = before initEnv $ do
it "should fail if PORT is missing" $ do
unsetEnv "PORT"
void fr... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/12/test/ConfigSpec.hs | haskell | module ConfigSpec (spec) where
import ClassyPrelude
import Test.Hspec
import System.Environment
import Config
import qualified Adapter.PostgreSQL.Auth as PG
import qualified Adapter.RabbitMQ.Common as MQ
spec :: Spec
spec = before initEnv $ do
it "should fail if PORT is missing" $ do
unsetEnv "PORT"
void fr... | |
836e8d08ec0ac195dbe7ad0ebf859c01f7f93476ba5ae523c8a2dfea93b227e0 | burkaydurdu/mock-ui | subs.cljs | (ns mock-ui.subs
(:require
[re-frame.core :refer [reg-sub]]
[mock-ui.util :as util]))
(reg-sub
::active-panel
(fn [db _]
(:active-panel db)))
(reg-sub
::current-user
(fn [db _]
(:current-user db)))
(reg-sub
::token
:<- [::current-user]
(fn [current-user _]
(:token current-user)))
(reg-... | null | https://raw.githubusercontent.com/burkaydurdu/mock-ui/eb92657a33100ca10b80827abf7c7acdf7d397bb/src/mock_ui/subs.cljs | clojure | (ns mock-ui.subs
(:require
[re-frame.core :refer [reg-sub]]
[mock-ui.util :as util]))
(reg-sub
::active-panel
(fn [db _]
(:active-panel db)))
(reg-sub
::current-user
(fn [db _]
(:current-user db)))
(reg-sub
::token
:<- [::current-user]
(fn [current-user _]
(:token current-user)))
(reg-... | |
13578c075f922543aeef12be80d769204320377580a3756b708873902703e510 | jlouis/graphql-erlang | graphql.erl | -module(graphql).
-include_lib("graphql/include/graphql.hrl").
-include("graphql_internal.hrl").
-include("graphql_schema.hrl").
-compile({no_auto_import, [monitor/2]}).
%% GraphQL Documents
-export([
parse/1,
type_check/1, type_check_params/3,
insert_root/1,
validate/1,
... | null | https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/src/graphql.erl | erlang | GraphQL Documents
Early exit
Deferred execution
Schema Definitions
--------------------------------------------------------------------------
--------------------------------------------------------------------------
ERRORS
--------------------------------------------------------------------------
------------... | -module(graphql).
-include_lib("graphql/include/graphql.hrl").
-include("graphql_internal.hrl").
-include("graphql_schema.hrl").
-compile({no_auto_import, [monitor/2]}).
-export([
parse/1,
type_check/1, type_check_params/3,
insert_root/1,
validate/1,
execute/1, execute/2
... |
d74bae55a6fede7e016cf9910f80f7324493bec8c7247155bc45f0960b5780d3 | racket/typed-racket | bad-prop-procedure3.rkt | #;
(exn-pred #rx"expected: a nonnegative integer literal or an annotated lambda")
#lang typed/racket/base
(struct some-struct1 ([a : String] [b : (-> Number Number)]) #:property prop:procedure -1)
| null | https://raw.githubusercontent.com/racket/typed-racket/8b7bd594c66e53beba3d2568ca5ecb28f61c6d96/typed-racket-test/fail/bad-prop-procedure3.rkt | racket | (exn-pred #rx"expected: a nonnegative integer literal or an annotated lambda")
#lang typed/racket/base
(struct some-struct1 ([a : String] [b : (-> Number Number)]) #:property prop:procedure -1)
| |
df14039d59b2584617911304cd9790dc6b60414a3724e11c209e5a13aac102ee | SamirTalwar/advent-of-code | AOC_20_2.hs | {-# OPTIONS -Wall #-}
import Control.Monad (when)
import qualified Data.Foldable as Foldable
import Data.Functor (($>))
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as Text.IO
import Data.Vector (Vector)
import qualified... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/1fc5b63a54b846972b4fc80b18cd4b464d2f930c/2021/AOC_20_2.hs | haskell | # OPTIONS -Wall # |
import Control.Monad (when)
import qualified Data.Foldable as Foldable
import Data.Functor (($>))
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as Text.IO
import Data.Vector (Vector)
import qualified Data.Vector as Vector... |
dec2ad8235790b4c2eaff5df1bc61a848fb2cb832e58756e35c5efe9aeca45ce | mirage/mirage-tcpip | tcpip_stack_socket.mli |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/mirage/mirage-tcpip/4bae5497c5ef76c1dc3532bb0e4d6ad466051c50/src/stack-unix/tcpip_stack_socket.mli | ocaml |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | |
9839a4999e9fef36531ec3464d6ef25973c785ac0535e4bc9b68cafddf9b70e5 | clklein/decompose-plug | desiderata.rkt | #lang racket
(require slideshow)
(provide desiderata)
(define bubbles
`(("Programs"
"look and act like"
"semantic defns,"
("but they " ,(it "run")))
("Support the"
"entire semantics"
"engineering"
"lifecycle")
("Focus on"
"lightweight"
"validation"
"techniques"))... | null | https://raw.githubusercontent.com/clklein/decompose-plug/5bb1acff487d055386c075581b395eb3cfdc12e9/aplas2011-talk/desiderata.rkt | racket | #lang racket
(require slideshow)
(provide desiderata)
(define bubbles
`(("Programs"
"look and act like"
"semantic defns,"
("but they " ,(it "run")))
("Support the"
"entire semantics"
"engineering"
"lifecycle")
("Focus on"
"lightweight"
"validation"
"techniques"))... | |
1bcd5ebff271a5229327fde27c291b28a8e5e051f83b0b140f1ac23059bad1aa | semilin/layoup | Colemak-DH.lisp |
(MAKE-LAYOUT :NAME "Colemak-DH" :MATRIX
(APPLY #'KEY-MATRIX '("qwfpbjluy;" "arstgmneio" "zxcdvkh,./"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/Colemak-DH.lisp | lisp |
(MAKE-LAYOUT :NAME "Colemak-DH" :MATRIX
(APPLY #'KEY-MATRIX '("qwfpbjluy;" "arstgmneio" "zxcdvkh,./"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
c47de4fa5873b21d57834c309d74228ca295fef8698c0889337a0efea67333a6 | sneeuwballen/benchpress | Test_analyze.ml |
open Common
open Test
module Summarize_dirs : sig
type path = string list
type path_opt = path option
val init : path_opt
val string_of_path : path -> string
val merge_path1 : path_opt -> Db.Data.t -> path_opt
(* val setup_fun : Db.t -> unit *)
end = struct
type path = string list
type path_opt ... | null | https://raw.githubusercontent.com/sneeuwballen/benchpress/305163e0de50e9ee5dafe8bc515927dbbfd86b3f/src/core/Test_analyze.ml | ocaml | val setup_fun : Db.t -> unit
split path into components
mismatch
always materialized
) from prover_res where prover=?
and not (res in ('sat','unsat'))
and file_expect in ('sat','unsat'); |}
prover
and improved =
get1_int ~ctx:"get improved results" db
~ty:Db.Ty.(p... |
open Common
open Test
module Summarize_dirs : sig
type path = string list
type path_opt = path option
val init : path_opt
val string_of_path : path -> string
val merge_path1 : path_opt -> Db.Data.t -> path_opt
end = struct
type path = string list
type path_opt = path option
let split_path_ s : pa... |
ae6e24316639558619aeea9870316f8d30fc7288c96b6061c7ad6d51ff828f79 | yawaramin/ocaml_sql_query | sql.mli | Copyright 2022
This file is part of ocaml_sql_query .
ocaml_sql_query 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
la... | null | https://raw.githubusercontent.com/yawaramin/ocaml_sql_query/ac6d0908bf881595c6a58c761e6f105596f94ccd/lib/sql.mli | ocaml | * [exec_script db sql] executes the [sql] script (possibly made up of multiple
statements) in the database [db]. Note that it ignores any rows returned by
any of the statements.
The script {i must not} have a trailing semicolon.
* [transaction db f] runs [f ()] inside a transaction in the [db]. If the
... | Copyright 2022
This file is part of ocaml_sql_query .
ocaml_sql_query 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
la... |
abe26bfa4401b7fa5cbd46592b6ef81c70fe777c244a4013e0de2a78baf2e996 | herd/herdtools7 | emitPrintf.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/litmus/emitPrintf.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2014 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
15d60f1beab8b17a6ae8f48ad58a2af742dc4b75aa22b93c34f426087f2d2c32 | bishboria/learnyouahaskell | 9_more_input_and_more_output.hs | -- Input Redirection
import Control.Monad
import Data.Char
main = forever $ do
l <- getLine
putStrLn $ map toUpper l
run ./9_capslocker < 9_haiku.txt to see the output
-- Getting Strings from Input Streams
-- The lazy version!
import Data.Char
main = do
contents <- getContents
putStr $ map toUppe... | null | https://raw.githubusercontent.com/bishboria/learnyouahaskell/d8c7b41398e9672db18c1b1360372fc4a4adefa8/09/9_more_input_and_more_output.hs | haskell | Input Redirection
Getting Strings from Input Streams
The lazy version!
run ./9_capslocker_stream
run ./9_capslocker_stream_short
Transforming Input
taking string input, transforming with a function and outputting
the result is so common they made a function called interact
run ./9_shortlinesonly_interact
crea... |
import Control.Monad
import Data.Char
main = forever $ do
l <- getLine
putStrLn $ map toUpper l
run ./9_capslocker < 9_haiku.txt to see the output
import Data.Char
main = do
contents <- getContents
putStr $ map toUpper contents
import Data.Char
main = do
contents <- getContents
putStr (... |
7b8f9502df0ef43df84c07d35394c663b685e6833da49a61bf32a2b49405e47d | CyberCat-Institute/open-game-engine | Utils.hs | module Data.Utils where
import Prelude hiding (map)
import Data.HashMap
import Data.Hashable
adjustOrAdd :: (Hashable k, Ord k) => (v -> v) -> v -> k -> Map k v -> Map k v
adjustOrAdd f def = alter (Just . maybe def f)
average :: (Hashable k, Fractional a) => Int -> Map k a -> Map k a
average sampleSize = map (\x -... | null | https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/Data/Utils.hs | haskell | module Data.Utils where
import Prelude hiding (map)
import Data.HashMap
import Data.Hashable
adjustOrAdd :: (Hashable k, Ord k) => (v -> v) -> v -> k -> Map k v -> Map k v
adjustOrAdd f def = alter (Just . maybe def f)
average :: (Hashable k, Fractional a) => Int -> Map k a -> Map k a
average sampleSize = map (\x -... | |
680532a5dcb5553c071516df37565aa006bbfa804b380b9247a71695ceb89468 | qnikst/okasaki | Lazy.hs | module Data.BinomialHeap.Lazy
where
data Tree a = Node Int a [Tree a]
type Heap a = [Tree a]
empty = []
isEmpty h = null h
rank (Node n _ _) = n
root (Node _ x _) = x
link t1@(Node r x1 c1) t2@(Node _ x2 c2)
| x1 <= x2 = Node (r+1) x1 (t2:c1)
| otherwise = Node (r+1) x2 (t1:c2)
insTree t [] = [t]
insTr... | null | https://raw.githubusercontent.com/qnikst/okasaki/f6f3c4211df16e4dde3a5cb4d6aaf19a68b99b0e/ch06/Data/BinomialHeap/Lazy.hs | haskell | module Data.BinomialHeap.Lazy
where
data Tree a = Node Int a [Tree a]
type Heap a = [Tree a]
empty = []
isEmpty h = null h
rank (Node n _ _) = n
root (Node _ x _) = x
link t1@(Node r x1 c1) t2@(Node _ x2 c2)
| x1 <= x2 = Node (r+1) x1 (t2:c1)
| otherwise = Node (r+1) x2 (t1:c2)
insTree t [] = [t]
insTr... | |
87ed77857518479b3c2584ca510429898156b57da171dc7dec95497f7b5dde3c | archimag/cl-closure-template | standard-templates.lisp | standard-templates.lisp
;;;;
;;;; This file is part of the cl-closure-template library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package #:closure-template)
(compile-template :common-lisp-backend
(merge-pathnames "standard-templates.tmpl"
... | null | https://raw.githubusercontent.com/archimag/cl-closure-template/f1983aa525045691e128027d2a2d74831c873d6e/src/standard-templates.lisp | lisp |
This file is part of the cl-closure-template library, released under Lisp-LGPL.
See file COPYING for details.
| standard-templates.lisp
Author : < >
(in-package #:closure-template)
(compile-template :common-lisp-backend
(merge-pathnames "standard-templates.tmpl"
(asdf:component-pathname (asdf:find-system '#:closure-template))))
|
94535758b868d66a93f717fa7a9e6937ed27c240cc4ce006fa83ac53c58db15c | honest-technology/api.unverified.email | Env.hs | module Env
( port
, prometheusPort
, apiURL
, infoPageURL
, smtpURL
, maildir
, featureToggle
, debugMode
) where
import Control.Monad.Fail
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Text (Text)
import qualified Data.Text as T
i... | null | https://raw.githubusercontent.com/honest-technology/api.unverified.email/75234625974d8054f28a5c05cc313c927ffae8d5/src/Env.hs | haskell | module Env
( port
, prometheusPort
, apiURL
, infoPageURL
, smtpURL
, maildir
, featureToggle
, debugMode
) where
import Control.Monad.Fail
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Text (Text)
import qualified Data.Text as T
i... | |
ce80d94110acfffdeaa683dd79b9c0e7caa1be926d9f0b62fcf12fd0a3b9c727 | PJK/haskell-pattern-matching | Identity.hs | module Identity where
id :: a -> a
id x = x | null | https://raw.githubusercontent.com/PJK/haskell-pattern-matching/7ef4a45731beba92ee01614ae563df65be36e8ba/data/exact/Identity.hs | haskell | module Identity where
id :: a -> a
id x = x | |
8f853529e35fb8e0d31130faf3e38f954b872c4cb4215a8d57c10a325fe5ac94 | roburio/tlstunnel | filesystem.ml | module Make (Pclock : Mirage_clock.PCLOCK) (Block : Mirage_block.S) = struct
module H = Mirage_crypto.Hash.SHA256
let s_version = 1
module IS = Set.Make(Int64)
type superblock = {
2 byte
padding - 6 byte
8 byte
8 byte
8 byte
8 byte
data_checksum : Cstruct.t ;
padding until length - 32
(... | null | https://raw.githubusercontent.com/roburio/tlstunnel/243974c6af6e9cdcc287ae8f80f960a35f70149a/unikernel/filesystem.ml | ocaml | superblock_checksum : Cstruct.t ;
not persistent
each sector is prefixed by a next pointer
each sector is prefixed by a next pointer
write data
according to the test above this should not happen | module Make (Pclock : Mirage_clock.PCLOCK) (Block : Mirage_block.S) = struct
module H = Mirage_crypto.Hash.SHA256
let s_version = 1
module IS = Set.Make(Int64)
type superblock = {
2 byte
padding - 6 byte
8 byte
8 byte
8 byte
8 byte
data_checksum : Cstruct.t ;
padding until length - 32
}
... |
687bbf0c2bcb2b7d51f79137b43d5a2ea819f9f44fdef475a8addd605c7bb1df | input-output-hk/cardano-ledger | TxBody.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE Rank... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/mary/impl/src/Cardano/Ledger/Mary/TxBody.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
===========================================================================
Wrap it all up in a newtype, hiding the insides with a pattern constructor.
| Encodes memoized bytes created upon construction.
# COMPLETE MaryTxBody #
# INLINEABLE outputsTxBodyL #
# IN... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Standalo... |
c4594873ce05596d3d9291da89c679024fcebe2e630644b259017007a5f0dbba | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_auth_attempts.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 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_auth_attempts).
-export([... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_auth_attempts.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | 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 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_auth_attempts).
-export([init/2... |
ce673bbe83c835dc702689c588ca7fe3d0fb8555d006c214980b7923ee887637 | Purple-Services/app-service | find-bad-place-ids.clj | ;; you can run this in pretty much any namespace
;; require
[cheshire.core :refer [generate-string parse-string]]
[clojure.walk :refer [keywordize-keys]]
[clj-http.client :as client]
(defn is-place-id-valid?
[place-id]
(try
(let [body (:body (clj-http.client/get
""
... | null | https://raw.githubusercontent.com/Purple-Services/app-service/e0a4f74c621159240cff33ed4225a7303524ebf8/scripts/find-bad-place-ids.clj | clojure | you can run this in pretty much any namespace
require
_ (clojure.pprint/pprint body)
temp
(filter #(or (= "fb10210722109948146" (:id %))
(= "fYTOqAiwZBRMtH5uKi94" (:id %)) |
[cheshire.core :refer [generate-string parse-string]]
[clojure.walk :refer [keywordize-keys]]
[clj-http.client :as client]
(defn is-place-id-valid?
[place-id]
(try
(let [body (:body (clj-http.client/get
""
{:as :json
:content-type :json
... |
f1f3289a51f73c3328d61947b51ea643261336f01ebec99ccbd47b54a5694442 | argp/bap | smtlib2.ml | * Output to SMTLIB2 format
@author ejs
@author ejs
*)
open Type
open Big_int_Z
open Big_int_convenience
open Ast
open Ast_convenience
open Typecheck
module D = Debug.Make(struct let name = "Smtlib2" and default=`NoDebug end)
open D
exception No_rule
module VH = Var.VarHash
type sort = BitVec | Bool
t... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/smtlib2.ml | ocaml | * Z3 only
* Seperate let_begin and let_end to allow for streaming generation of
formulas in utils/streamtrans.ml
The print functions called, ast_exp and ast_exp_bool never
raise No_rule. So, we don't need to evaluate them before the lazy
block.
* Returns a lazy expression that prints let v = e1 ... | * Output to SMTLIB2 format
@author ejs
@author ejs
*)
open Type
open Big_int_Z
open Big_int_convenience
open Ast
open Ast_convenience
open Typecheck
module D = Debug.Make(struct let name = "Smtlib2" and default=`NoDebug end)
open D
exception No_rule
module VH = Var.VarHash
type sort = BitVec | Bool
t... |
6d06cb6a880872e64ed21392e540f21a5223a5c6a503e597a73c08ad5caab59f | franklindyer/cs357-ta-materials | set_utils.rkt | #lang racket
(define (concat-stack before after)
(if (empty? before)
after
(concat-stack (cdr before) (cons (car before) after))))
(define (insert-set-cum cmp e before after)
(cond ((empty? after) (concat-stack before (cons e '())))
((cmp e (car after)) (concat-stack before (cons e after)))
... | null | https://raw.githubusercontent.com/franklindyer/cs357-ta-materials/087cdc29e13d7f0796d70f2bc9e08a20f626ac92/scheme/misc/set_utils.rkt | racket | #lang racket
(define (concat-stack before after)
(if (empty? before)
after
(concat-stack (cdr before) (cons (car before) after))))
(define (insert-set-cum cmp e before after)
(cond ((empty? after) (concat-stack before (cons e '())))
((cmp e (car after)) (concat-stack before (cons e after)))
... | |
e02e63d75bf97dfa1b1a72a4f588f0cb064750de57508b25f484faa9186673f3 | nokijp/pietc | RuntimeSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Language.Piet.Internal.RuntimeSpec
( main
, spec
) where
import Control.Monad
import qualified Language.Piet.Internal.Runtime as P
import qualified LLVM.AST as AST
import qualified LLVM.AST.Type as T
import LLVM.IRBuilder
import LLVMTestUtils
im... | null | https://raw.githubusercontent.com/nokijp/pietc/da6699c286a7b428b01211c8e467ce4ec1f7967e/test/Language/Piet/Internal/RuntimeSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
module Language.Piet.Internal.RuntimeSpec
( main
, spec
) where
import Control.Monad
import qualified Language.Piet.Internal.Runtime as P
import qualified LLVM.AST as AST
import qualified LLVM.AST.Type as T
import LLVM.IRBuilder
import LLVMTestUtils
import Test.Hspec
main :: IO ()
main... |
43281133c3d5e39cc2e2b854a4334e719d0f13a8b9f45449dd3c3ff98750b128 | zliu41/min-max-pqueue | MinMaxQueue.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
-----------------------------------------------------------------------------
-- |
-- Module : Data.MinMaxQueue
Maintainer : < >
--
-- Double-ended priority queues, allowing efficient retrieval and removel
-- from... | null | https://raw.githubusercontent.com/zliu41/min-max-pqueue/62fefaf495334a3238787980eb1e463b3bfb8be2/src/Data/MinMaxQueue.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
---------------------------------------------------------------------------
|
Module : Data.MinMaxQueue
Double-ended priority queues, allowing efficient retrieval and removel
from both ends of the queue.
A queue can be configured with a maximum size. ... | # LANGUAGE TupleSections #
Maintainer : < >
The implementation is backed by a @'Map ' ( ' NonEmpty ' a)@. This means
In a pure language like , a
If you only access one end of the queue ( i.e. , you need a regular
if performance is important ; in my experience wins , even for
module Data.MinMaxQueu... |
a46dd14a3a6679f004b4994b90a1d421c193be6fb3b0c43a13b2b8d2fbf43387 | caisah/sicp-exercises-and-examples | ex_2.70.scm | The following eight - symbol alphabet with associated relative frequencies was designed
to efficiently encode the lyrics of 1950s rock songs .
A 2
;; BOOM 1
GET 2
JOB 2
NA 16
;; SHA 3
YIP 9
;; WAH 1
Use generate - huffman - tree to generate a corresponding tree , and use encode
;; to encode the follo... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.3.4-huffman_encoding_trees/ex_2.70.scm | scheme | BOOM 1
SHA 3
WAH 1
to encode the following message:
Get a job
Sha na na na na na na na
Get a job
Sha na na na na na na na
Sha boom
How many bits are required for encoding? What is the smallest number of bits that
alphabet?
symbol
frequency | The following eight - symbol alphabet with associated relative frequencies was designed
to efficiently encode the lyrics of 1950s rock songs .
A 2
GET 2
JOB 2
NA 16
YIP 9
Use generate - huffman - tree to generate a corresponding tree , and use encode
would be needed to encode this son... |
c78b6d8e44f571d413009e28e7f79ded590d53a720d82eb56294c91703ee77a6 | sysbio-bioinf/avatar | pareto_front_view.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/dialogs/pareto_front_view.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
remove d... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.ui.dialogs.pareto-front-view
(:require [clj-jfx.core :as jfx]
[avatar.ui.plot :as plot]
[avatar.data.management :as dm]
[avatar.data.operations :as ops]
[avatar.ui.dialogs... |
16e71596de898378bd9259e96e8a2b4e2df87b16b208ed62458d0be0d8d0869f | qfpl/reflex-workshop | Apply.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Exercises/Behaviors/Creating/Apply.hs | haskell | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | |
18f940d5a8b5d421f8b5f499171b4f8c434182028bf542ef0549ea2f40bb8c86 | youjinbou/gmaths | vec3.mli | (** a very simple 2D vector module *)
module type S =
sig
module Scalar : Vec.SCALAR
type scalar = Scalar.t
type t = scalar array
type tuple_t = scalar * scalar * scalar
(** vector dimensions *)
val size : int
(** vector creation *)
val init : (int -> scalar) -> t
val make : scalar -> t
(** f... | null | https://raw.githubusercontent.com/youjinbou/gmaths/1a507444071941a45b39f8c65e90c37427ea68a3/src/vec3.mli | ocaml | * a very simple 2D vector module
* vector dimensions
* vector creation
* fold operators
* accessors
* map operators
* null vector
* unit vector generator
* opposit vector operator
* additions
* vector scaling
* this is actually scale and add
* dot product
* cross product
* equivalent of map id
* alias of... | module type S =
sig
module Scalar : Vec.SCALAR
type scalar = Scalar.t
type t = scalar array
type tuple_t = scalar * scalar * scalar
val size : int
val init : (int -> scalar) -> t
val make : scalar -> t
val fold_left : ('a -> scalar -> 'a) -> 'a -> t -> 'a
val fold_right : (scalar -> 'a -> 'a) ... |
3357c8f6e19bbcbc065b91949d46e80db3a0d19f698100b5ddbd9be130c0c021 | goblint/analyzer | node.ml | open GoblintCil
open Pretty
include Printable.Std
include Node0
let name () = "node"
(* TODO: remove this? *)
* Pretty node plainly with entire stmt .
let pretty_plain () = function
| Statement s -> text "Statement " ++ dn_stmt () s
| Function f -> text "Function " ++ text f.svar.vname
| FunctionEntry f -> te... | null | https://raw.githubusercontent.com/goblint/analyzer/7f7b9f041c7ad51a4d7c3b51e5c19f2687ef9287/src/framework/node.ml | ocaml | TODO: remove this?
TODO: remove this?
* Output functions for Printable interface
doesn't use this but defaults to no label and uses ID from show_id instead
* Find [fundec] which the node is in. In an incremental run this might yield old fundecs for pseudo-return nodes from the old file.
* @raise Not_found | open GoblintCil
open Pretty
include Printable.Std
include Node0
let name () = "node"
* Pretty node plainly with entire stmt .
let pretty_plain () = function
| Statement s -> text "Statement " ++ dn_stmt () s
| Function f -> text "Function " ++ text f.svar.vname
| FunctionEntry f -> text "FunctionEntry " ++ te... |
722ac925d502d264e51f3b0a0499f0b49b7f3be4b1412f3bd82bc00d7286e00e | hdima/erlport | ruby.erl | Copyright ( c ) 2009 - 2015 , < >
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% * Redistributions of source code must retain the above copyright notice,
%%% this list of... | null | https://raw.githubusercontent.com/hdima/erlport/246b7722d62b87b48be66d9a871509a537728962/src/ruby.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistribution... | Copyright ( c ) 2009 - 2015 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , E... |
f0fe67442af817efb7071dc36932a1c4d98e671d143f656bd382ad8858b61be3 | Zilliqa/scilla | Checker.ml |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla 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 you... | null | https://raw.githubusercontent.com/Zilliqa/scilla/8880cadf4c317415dc808fce004e5e06a33492d0/src/base/Checker.ml | ocaml | Modules use local names, which are then disambiguated
Check that the module parses
Change local names to global names
Change local names to global names
Check restrictions on inductive datatypes, and on associated recursion principles
Type check the contract with external libraries
Type check the contract ... |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla 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 you... |
f863a120a33c70e3f731c03898087ca64419e6c6bf2e71bea075eae208ee0446 | klutometis/clrs | bit-vector.scm | (define (bv-hash key)
(expt 2 key))
(define (bv-unhash key)
(inexact->exact (/ (log key) (log 2))))
(define (bv-insert bv key)
(bitwise-ior bv (bv-hash key)))
(define (bv-delete bv key)
(bitwise-and bv (bitwise-not (bv-hash key))))
(define (bv-search bv key)
(let ((element (bitwise-and bv (bv-hash key))))... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/11.1/bit-vector.scm | scheme | (define (bv-hash key)
(expt 2 key))
(define (bv-unhash key)
(inexact->exact (/ (log key) (log 2))))
(define (bv-insert bv key)
(bitwise-ior bv (bv-hash key)))
(define (bv-delete bv key)
(bitwise-and bv (bitwise-not (bv-hash key))))
(define (bv-search bv key)
(let ((element (bitwise-and bv (bv-hash key))))... | |
9e04d5fe5968aea8fa0aa65208bca02f172acca4b98a75665c1bd30b917f659f | ChrisPenner/grids | Transpose.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeApplications #
# LANGUAGE PolyKinds #
# OPTIONS_GHC -fno - warn - redundant - constraints #
module Data.Grid.Internal.Transpose where
import Data.Grid.Internal.Grid
import Data.Grid... | null | https://raw.githubusercontent.com/ChrisPenner/grids/619c72b1e51f96377845c2a15eb100d8f4185fa1/src/Data/Grid/Internal/Transpose.hs | haskell | function
'permute' requires a type application containing a permutation pattern;
matrix 'transpose'
> λ> small
> fromNestedLists
> [[0,1,2]
> ,[6,7,8]]
>
> λ> permute @[1, 0] small
> fromNestedLists
> [[0,3,6]
> ,[1,4,7]
> ,[2,5,8]]
| Permute the dimensions of a coordinate according to a perm... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeApplications #
# LANGUAGE PolyKinds #
# OPTIONS_GHC -fno - warn - redundant - constraints #
module Data.Grid.Internal.Transpose where
import Data.Grid.Internal.Grid
import Data.Grid... |
c372d8e9d8cb0b03db918e7524dbf82bb89769cfb514f61f96026421fe17f06e | janestreet/memtrace_viewer_with_deps | app.mli | open! Core_kernel
module Model : sig
type t [@@deriving sexp]
val cutoff : t -> t -> bool
end
include Incr_dom.App_intf.S with type State.t = unit and module Model := Model
val initial_model : Model.t
| null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incr_dom/example/text_input/lib/app.mli | ocaml | open! Core_kernel
module Model : sig
type t [@@deriving sexp]
val cutoff : t -> t -> bool
end
include Incr_dom.App_intf.S with type State.t = unit and module Model := Model
val initial_model : Model.t
| |
11d0e29835b1a247400c62fc762b54143fb7d6d07ecd96eef87a2345eb5dff96 | DATX02-17-26/DATX02-17-26 | Flatten.hs | DATX02 - 17 - 26 , automated assessment of imperative programs .
- Copyright , 2017 , see AUTHORS.md .
-
- This program is free software ; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation ; either version 2
- ... | null | https://raw.githubusercontent.com/DATX02-17-26/DATX02-17-26/f5eeec0b2034d5b1adcc66071f8cb5cd1b089acb/libsrc/Class/Product/Flatten.hs | haskell | | Flattening of homogeneous parametric product types that are nested pairs
into a flat structure.
------------------------------------------------------------------------------
Classes:
------------------------------------------------------------------------------
| Class for flattening a homogeneous parametric pro... | DATX02 - 17 - 26 , automated assessment of imperative programs .
- Copyright , 2017 , see AUTHORS.md .
-
- This program is free software ; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation ; either version 2
- ... |
5d7994eb82fc93037d72e268a316bf4a40b16681340568983bf3ecb5a096ce23 | polysemy-research/polysemy | Kind.hs | # OPTIONS_HADDOCK not - home #
| Description : Kind aliases ' Effect ' and ' EffectRow '
module Polysemy.Internal.Kind where
import Data.Kind (Type)
------------------------------------------------------------------------------
-- | The kind of effects.
--
@since 0.5.0.0
type Effect = (Type -> Type) -> Type -... | null | https://raw.githubusercontent.com/polysemy-research/polysemy/10a1336f32438c2d308313f8ad55ac736145390f/src/Polysemy/Internal/Kind.hs | haskell | ----------------------------------------------------------------------------
| The kind of effects.
----------------------------------------------------------------------------
| The kind of effect rows.
---------------------------------------------------------------------------- | # OPTIONS_HADDOCK not - home #
| Description : Kind aliases ' Effect ' and ' EffectRow '
module Polysemy.Internal.Kind where
import Data.Kind (Type)
@since 0.5.0.0
type Effect = (Type -> Type) -> Type -> Type
@since 0.5.0.0
type EffectRow = [Effect]
| Append two type - level lists .
type family Append ... |
f68f37462169e8b7812777d09bfb2853cd834570b199708ffa879a8ecab5ee86 | dgrnbrg/piplin | modules.clj | (ns piplin.modules
(:use [piplin types protocols])
(:use [clojure.string :only [join]]
[clojure.set :only [map-invert]])
(:use [slingshot.slingshot :only [throw+]])
(:refer-clojure :exclude [replace cast])
(:use [clojure.string :only [join replace split]])
(:use [swiss-arrows.core :only [-<> -<>>]])... | null | https://raw.githubusercontent.com/dgrnbrg/piplin/01f3ac72ccc904b7789dfd6e46277c179e11002c/src/piplin/modules.clj | clojure | This stores the path of the current module--used for outputing hierarchical data
This is an atom containing a map of state element paths to a map
TODO: automatically cast the return values of fnks
that are being assigned to regs
We actually want to refer to registers, not their inputs,
in this map
TODO: check that regi... | (ns piplin.modules
(:use [piplin types protocols])
(:use [clojure.string :only [join]]
[clojure.set :only [map-invert]])
(:use [slingshot.slingshot :only [throw+]])
(:refer-clojure :exclude [replace cast])
(:use [clojure.string :only [join replace split]])
(:use [swiss-arrows.core :only [-<> -<>>]])... |
ebdb289ca906c6a685545c3df3a7ee2a0914f6c1a7b9e5f0b7fff1c6b32ab02c | haasn/hsbooru | Stats.hs | # LANGUAGE CPP , BangPatterns #
module HsBooru.Stats
( -- * Post statistics
PostStats(..)
, showPostStats
, postStats
-- * Site statistics
, printSiteStats
, avgDepth
, maxDepth
-- * Timers and misc utilities
, Timer
, newTimer
, measureTimer
, showPerf
) where
... | null | https://raw.githubusercontent.com/haasn/hsbooru/996880786d2cbccd6bef4c0b983c18989d5d5f01/src/HsBooru/Stats.hs | haskell | * Post statistics
* Site statistics
* Timers and misc utilities
| Helper to pretty-print post count stats
| Pretty-print performance characteristics, given a count and a time delta
in nanoseconds
Nanoseconds
| Print out a summary of site-related statistics | # LANGUAGE CPP , BangPatterns #
module HsBooru.Stats
PostStats(..)
, showPostStats
, postStats
, printSiteStats
, avgDepth
, maxDepth
, Timer
, newTimer
, measureTimer
, showPerf
) where
#include "MachDeps.h"
import Text.Printf
import Data.IORef
import System.Clock
impor... |
767dceaba6f57e925d3cef45b159eb0f759c3b373a3b00474c556e21156414c5 | composewell/streamly | Channel.hs | -- |
Module : Streamly . Internal . Data . Stream . Concurrent . Channel
Copyright : ( c ) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
Portability : GHC
module Streamly.Internal.Data.Stream.Concurrent.Channel
(
-- * Channel
Ch... | null | https://raw.githubusercontent.com/composewell/streamly/7252323b76a291aca9f512d39f0d464d992f0f00/src/Streamly/Internal/Data/Stream/Concurrent/Channel.hs | haskell | |
License : BSD-3-Clause
Maintainer :
Stability : experimental
* Channel
wait for running tasks but do not schedule any more .
* Configuration
** Limits
** Rate Control
** Stop behavior
** Scheduling behavior
** Diagnostics
| Create a new concurrent stream evaluation channel. The monad
state used ... | Module : Streamly . Internal . Data . Stream . Concurrent . Channel
Copyright : ( c ) 2017 Composewell Technologies
Portability : GHC
module Streamly.Internal.Data.Stream.Concurrent.Channel
(
Channel (..)
, newChannel
, withChannel
, withChannelK
, fromChannel
, toChannel
... |
af06db718b5c01d189202ec2f26d0676fa5a1086e944948ebf0cf1438e09bb18 | ocaml-multicore/ocaml-tsan | emitaux.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/asmcomp/emitaux.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type error =
| Stack_frame_too_large of int
exception Error of error
let output_channel = ref stdout... |
b1aa8e41627e63832fb0318c3a4f087d13d8ad6514c0b966c0af6729729e1555 | metosin/compojure-api-examples | project.clj | (defproject metosin/compojure-api-examples "1.1.0"
:description "Compojure-api-examples"
:dependencies [[org.clojure/clojure "1.10.3"]
[metosin/compojure-api "1.1.13"]]
:ring {:handler compojure.api.examples.handler/app}
:uberjar-name "examples.jar"
:uberwar-name "examples.war"
:profiles {:... | null | https://raw.githubusercontent.com/metosin/compojure-api-examples/5503ad1461eb9f37ecb86fba89cf8c0161deb09e/project.clj | clojure | (defproject metosin/compojure-api-examples "1.1.0"
:description "Compojure-api-examples"
:dependencies [[org.clojure/clojure "1.10.3"]
[metosin/compojure-api "1.1.13"]]
:ring {:handler compojure.api.examples.handler/app}
:uberjar-name "examples.jar"
:uberwar-name "examples.war"
:profiles {:... | |
45609fdd0a670b7b07b8d188cd5c70f51aad48bbeaf39aecd4f136e845733ce1 | wdebeaum/DeepSemLex | tacqueria.lisp | ;;;;
;;;; W::tacqueria
;;;;
(define-words :pos w::N :templ count-pred-templ
:words (
(W::tacqueria
(SENSES
((LF-PARENT ONT::restaurant)
(meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments y3-test-data)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/tacqueria.lisp | lisp |
W::tacqueria
|
(define-words :pos w::N :templ count-pred-templ
:words (
(W::tacqueria
(SENSES
((LF-PARENT ONT::restaurant)
(meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments y3-test-data)
)
)
)
))
|
c01547108e676ae3b872984e44f890fc82cd0d136029876d01d4a9fee634083e | karimarttila/clojure | domain_table_storage.clj | (ns simpleserver.domaindb.domain-table-storage
(:import (com.microsoft.azure.storage CloudStorageAccount)
(com.microsoft.azure.storage.table CloudTableClient)
(com.microsoft.azure.storage.table TableOperation)
(com.microsoft.azure.storage.table TableQuery TableQuery$QueryComparisons)
... | null | https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/clj-ring-cljs-reagent-demo/simple-server/src/simpleserver/domaindb/domain_table_storage.clj | clojure | (ns simpleserver.domaindb.domain-table-storage
(:import (com.microsoft.azure.storage CloudStorageAccount)
(com.microsoft.azure.storage.table CloudTableClient)
(com.microsoft.azure.storage.table TableOperation)
(com.microsoft.azure.storage.table TableQuery TableQuery$QueryComparisons)
... | |
5e4670c1c49499dc3cb36dffc360d66a29e2ce6b3024fa57d965988918b71f12 | Opetushallitus/aipal | vaihto_test.clj | (ns aipal.infra.kayttaja.vaihto-test
(:require [clojure.test :refer :all]
[aipal.infra.kayttaja :refer [*kayttaja*]]
[aipal.infra.kayttaja.vaihto :refer :all]
[aipal.infra.kayttaja.sql :refer [with-sql-kayttaja*]]
[aipal.arkisto.kayttaja :as kayttaja-arkisto]
... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/test/clj/aipal/infra/kayttaja/vaihto_test.clj | clojure | tyhjäksi. | (ns aipal.infra.kayttaja.vaihto-test
(:require [clojure.test :refer :all]
[aipal.infra.kayttaja :refer [*kayttaja*]]
[aipal.infra.kayttaja.vaihto :refer :all]
[aipal.infra.kayttaja.sql :refer [with-sql-kayttaja*]]
[aipal.arkisto.kayttaja :as kayttaja-arkisto]
... |
5fb6839bb1d50bc183f13af3f20ad8efdcae8fe9cb9e2d39d13433ba3115a24b | utahstreetlabs/risingtide | metrics.clj | (ns risingtide.metrics)
(defn mean
[& numbers]
(quot (apply + numbers) (count numbers)))
(defn median [& ns]
"Thanks, #Clojure"
(let [ns (sort ns)
cnt (count ns)
mid (bit-shift-right cnt 1)]
(if (odd? cnt)
(nth ns mid)
(/ (+ (nth ns mid) (nth ns (dec mid))) 2))))
| null | https://raw.githubusercontent.com/utahstreetlabs/risingtide/bc5b798396679739469b1bd8ee1b03db76178cde/src/risingtide/metrics.clj | clojure | (ns risingtide.metrics)
(defn mean
[& numbers]
(quot (apply + numbers) (count numbers)))
(defn median [& ns]
"Thanks, #Clojure"
(let [ns (sort ns)
cnt (count ns)
mid (bit-shift-right cnt 1)]
(if (odd? cnt)
(nth ns mid)
(/ (+ (nth ns mid) (nth ns (dec mid))) 2))))
| |
e1500fa1904b8d24a9b807e6ec3969edc0594d87911ed2eb4ca1d1fd734f551e | kit-ty-kate/visitors | expr00.ml | type expr =
| EConst of int
| EAdd of expr * expr
[@@deriving visitors { variety = "iter" }]
| null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr00.ml | ocaml | type expr =
| EConst of int
| EAdd of expr * expr
[@@deriving visitors { variety = "iter" }]
| |
535b7e414b56537305c5657d1622ffbd3f493b5831115744222da174accdb2de | carlohamalainen/ghc-imported-from | GhcImportedFrom.hs | # LANGUAGE CPP #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
-----------------------------------------------------------------------------
-- |
-- Module : GhcImportedFrom
Copyright : 2013 - 2016
-- License : BSD3
--
-- Maintainer :
-- Stability :... | null | https://raw.githubusercontent.com/carlohamalainen/ghc-imported-from/ac28f1c26644791abd698c55b00ce663ccbd861d/Language/Haskell/GhcImportedFrom.hs | haskell | # LANGUAGE Rank2Types #
---------------------------------------------------------------------------
|
Module : GhcImportedFrom
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
documentation for a given symbol in a particular module, file, and
line/col location.
L... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
Copyright : 2013 - 2016
Synopsis : Attempt to guess the location of the HTML
module Language.Haskell.GhcImportedFrom (
QualifiedName
, Symbol
, GhcOptions(..)
, GhcPkgOptions(..)
, HaskellModule(..)
, modif... |
8ac045ea07e8341f404d43883551f9dabfcd17aa18be33db204ba211badaf094 | Deducteam/Dedukti | oracle.ml | module M = Api.Meta
module T = Kernel.Term
module U = Universes
type theory = (U.pred * bool) list
type theory_maker = int -> theory
let rec enumerate : int -> U.univ list =
fun i -> if i = 0 then [] else U.Enum (i - 1) :: enumerate (i - 1)
(** [is_true meta p] check if the predicate [p] is true in the original th... | null | https://raw.githubusercontent.com/Deducteam/Dedukti/5771c9c0efe74499d1fd918a71609c85a85b13ee/universo/common/oracle.ml | ocaml | * [is_true meta p] check if the predicate [p] is true in the original theory.
* [is_true_rule meta s s' s''] check if the predicate [Rule s s' s''] is true in the original theory.
FIXME: can be optimized.
* [mk_theory meta i] computes a theory for the universes up to [i]. A theory is an array for each predicate tha... | module M = Api.Meta
module T = Kernel.Term
module U = Universes
type theory = (U.pred * bool) list
type theory_maker = int -> theory
let rec enumerate : int -> U.univ list =
fun i -> if i = 0 then [] else U.Enum (i - 1) :: enumerate (i - 1)
let is_true (meta : M.cfg) p =
let t = U.term_of_pred p in
let t' = M.... |
2ad8d5baa0f3dd8f0a332a1bd38f9188d439742c2003069643e0de589b1ef488 | yetanalytics/testomic | core_test.clj | (ns testomic.core-test
(:require [clojure.test :refer :all]
[testomic.core :refer :all]
[datomic.api :as d]))
(deftest set-norms!-test
(is (= {} *norms-map*))
(set-norms! {:foo "bar"})
(is (= {:foo "bar"} *norms-map*))
(set-norms! {})
(is (= {} *norms-map*)))
(deftest set-norms-pat... | null | https://raw.githubusercontent.com/yetanalytics/testomic/9d85fb72f79c239503cebdb8bf7e20e08ce09318/test/testomic/core_test.clj | clojure | cleanup
first conn | (ns testomic.core-test
(:require [clojure.test :refer :all]
[testomic.core :refer :all]
[datomic.api :as d]))
(deftest set-norms!-test
(is (= {} *norms-map*))
(set-norms! {:foo "bar"})
(is (= {:foo "bar"} *norms-map*))
(set-norms! {})
(is (= {} *norms-map*)))
(deftest set-norms-pat... |
8f87e33d2429402cb65cc48581805a003b9e8f260907ee634565f7beb65df48d | deverl-ide/deverl | deverl_io.erl | %% =====================================================================
%% 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 vers... | null | https://raw.githubusercontent.com/deverl-ide/deverl/69216c7720ce2a32344711f5526c0eb9676bcae0/deverl/src/deverl_io.erl | erlang | =====================================================================
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
@author < >
@author < >
, 2014
-module(deverl_io).
-include_lib("wx/include/wx.hrl").
-exp... |
9c644a27bb39a2c5d366d3d58665dcf39af3440eaae2003fe54b69e42291a58c | CarlosMChica/HaskellBook | vigenere.hs | module Vigenere where
import Data.Char
caesar :: Int -> String -> String
caesar spaces = fmap (caesarChar spaces)
unCaesar :: String -> Int -> String
unCaesar [] _ = []
unCaesar (x:xs) spaces = shift x spaces (-) : unCaesar xs spaces
caesarChar :: Int -> Char -> Char
caesarChar = shift (+)
shift:: (Int ->... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter13/vigenere.hs | haskell | module Vigenere where
import Data.Char
caesar :: Int -> String -> String
caesar spaces = fmap (caesarChar spaces)
unCaesar :: String -> Int -> String
unCaesar [] _ = []
unCaesar (x:xs) spaces = shift x spaces (-) : unCaesar xs spaces
caesarChar :: Int -> Char -> Char
caesarChar = shift (+)
shift:: (Int ->... | |
0d4d1706ae27441df1f0765d9d5ba628c7eb8c70b3f8cea5549be6b36204f9d3 | haskell/statistics | Uniform.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveDataTypeable , DeriveGeneric #
-- |
-- Module : Statistics.Distribution.Uniform
Copyright : ( c ) 2011
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
Variate distributed uniformly in the interval .
module S... | null | https://raw.githubusercontent.com/haskell/statistics/3c555df2ae8817d0124ff9315a0e78b47e7a924e/Statistics/Distribution/Uniform.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Statistics.Distribution.Uniform
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
* Constructors
** Accessors
| Uniform distribution from A to B
# UNPACK #
^ Low boundary of distribution
# UNPACK #
^ Upper boundary of distribution... | # LANGUAGE DeriveDataTypeable , DeriveGeneric #
Copyright : ( c ) 2011
Variate distributed uniformly in the interval .
module Statistics.Distribution.Uniform
(
UniformDistribution
, uniformDistr
, uniformDistrE
, uniformA
, uniformB
) where
import Control.Applicative
import Data.Aes... |
15bb51d1f20ba9b3d426d3b20a1f1da383e3133b15e15f0c730faf8f8f3e0211 | afeinberg/ocaml-tinylisp | main.ml | open Builtins
open Environment
open Sexp
let lisp_read inp =
let lexbuf = Lexing.from_channel inp in
Parser.main Lexer.token lexbuf
let init_env () =
let env = Symtab.create 32 in
let syms = [ "QUOTE", fn_quote ;
"CAR", fn_car ;
"CDR", fn_cdr ;
"CONS", fn_con... | null | https://raw.githubusercontent.com/afeinberg/ocaml-tinylisp/e4e0312e71634401e92a887deb3230c5eaf6fe35/main.ml | ocaml | open Builtins
open Environment
open Sexp
let lisp_read inp =
let lexbuf = Lexing.from_channel inp in
Parser.main Lexer.token lexbuf
let init_env () =
let env = Symtab.create 32 in
let syms = [ "QUOTE", fn_quote ;
"CAR", fn_car ;
"CDR", fn_cdr ;
"CONS", fn_con... | |
34b7a5d10b9b2c43cfefd47c61eb30d113827f6fe91246ed1f1321b4b45e044c | armedbear/abcl | directory.lisp | directory.lisp
;;;
Copyright ( C ) 2004 - 2007
Copyright ( C ) 2008
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your opti... | null | https://raw.githubusercontent.com/armedbear/abcl/4a02ecca95a0ef722782f55f624e0cb3d95af388/src/org/armedbear/lisp/directory.lisp | lisp |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details... | directory.lisp
Copyright ( C ) 2004 - 2007
Copyright ( C ) 2008
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin Street , Fift... |
36a9d333a5a1fcaa1aa08df432cca6d852e0b08b7518358944c5e241aa7f51c1 | sshirokov/CLSQL | mysql-loader.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: mysql-loader.sql
Purpose : MySQL library loader using UFFI
Author :
Created : Feb 2002
;;;;
This file , part of ... | null | https://raw.githubusercontent.com/sshirokov/CLSQL/c680432aea0177677ae2ee7b810a7404f7a05cab/db-mysql/mysql-loader.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Name: mysql-loader.sql
(), also known as the LLGPL.
************************************************************************* | Purpose : MySQL library loader using UFFI
Author :
Created : Feb 2002
This file , part of CLSQL , is Copyright ( c ) 2002 - 2010 by
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:mysql)
sear... |
cb3ab440bd0e94fd07278dcc800b29b8078ca3c9456f52cfef84c7120a5ff4cc | SNePS/SNePS2 | parser.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : PARSER ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : parser.lisp , v 1.2 2013/08/28 19:07:24 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file ... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/nlint/parser/parser.lisp | lisp | Syntax : Common - Lisp ; Package : PARSER ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitation... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : parser.lisp , v 1.2 2013/08/28 19:07:24 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " ba... |
6178f02cd51fa5546044f689b5b0f8e5ebf99a6e31f299f95ee68e4f85020bdc | haskell/cabal | Anonymous.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Reporting
Copyright : ( c ) 2008
-- License : BSD-like
--
-- Maintainer :
-- Stability : experimental
-- Port... | null | https://raw.githubusercontent.com/haskell/cabal/c21dbcd2a9d54962eb39f598dfce2d012ff7fd1c/cabal-install/src/Distribution/Client/BuildReports/Anonymous.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Distribution.Client.Reporting
License : BSD-like
Maintainer :
Stability : experimental
Portability : portable
Anonymous build report data struct... | Copyright : ( c ) 2008
module Distribution.Client.BuildReports.Anonymous (
BuildReport(..),
InstallOutcome(..),
Outcome(..),
newBuildReport,
parseBuildReport,
parseBuildReportList,
showBuildReport,
cabalInstallID
) where
import Distribution.Client.Compat.Prelude
import Prel... |
1ee84ce1b0282df58516523cbde78500c7089e9e52cec77db9587db0365fc8db | pingles/googlecloud | tables.clj | (ns googlecloud.bigquery.tables
(:require [googlecloud.core :as gc]
[googlecloud.bigquery.coerce]
[schema.core :as s])
(:import [com.google.api.services.bigquery.model TableReference TableFieldSchema TableSchema Table]))
(defn list [service project-id dataset-id]
(letfn [(mk-list-op
... | null | https://raw.githubusercontent.com/pingles/googlecloud/8d31afb1c627d40f7293f85c479cbfa98317b056/bigquery/src/googlecloud/bigquery/tables.clj | clojure | (ns googlecloud.bigquery.tables
(:require [googlecloud.core :as gc]
[googlecloud.bigquery.coerce]
[schema.core :as s])
(:import [com.google.api.services.bigquery.model TableReference TableFieldSchema TableSchema Table]))
(defn list [service project-id dataset-id]
(letfn [(mk-list-op
... | |
18e382861142375daf704a1a1a12a16a3a49d3c3ae7f964408388e0169cdd478 | haskell-foundation/foundation | CSV.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Foundation.Format.CSV
( testFormatCSV
) where
import Foundation
import Foundation.Format.CSV
import Foundation.Check
import Foundation.String.Builder (toString)
import F... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/tests/Test/Foundation/Format/CSV.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Foundation.Format.CSV
( testFormatCSV
) where
import Foundation
import Foundation.Format.CSV
import Foundation.Check
import Foundation.String.Builder (toString)
import Foundation.Parser (parseOnly)
impor... |
4ce11139e28cecf3d31085b5e2b273f902339bc1a4873a8bca383294de4a931a | VictorNicollet/Ohm | en.adlib.ml | | `Common_Project_Name -> ConfigProject.name
| null | https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/install/assets/common/en.adlib.ml | ocaml | | `Common_Project_Name -> ConfigProject.name
| |
26c3255a74dffd767a46e9c4e23bcbaab598def4a49cc3a5764b683e87528c4c | jameshaydon/lawvere | LawvereSpec.hs | module LawvereSpec where
import Lawvere.Check
import Lawvere.Disp
import Lawvere.Eval
import Lawvere.File
import Paths_lawvere
import Protolude
import Test.Hspec
spec :: Spec
spec = describe "Examples work" $ do
mainWorksSpec
"README.md"
"(suc.\n\
\ { state = 3,\n\
\ value =\n\
\ (cons.... | null | https://raw.githubusercontent.com/jameshaydon/lawvere/2d7d12347658b502b317fece26d97984d280226c/test/LawvereSpec.hs | haskell | module LawvereSpec where
import Lawvere.Check
import Lawvere.Disp
import Lawvere.Eval
import Lawvere.File
import Paths_lawvere
import Protolude
import Test.Hspec
spec :: Spec
spec = describe "Examples work" $ do
mainWorksSpec
"README.md"
"(suc.\n\
\ { state = 3,\n\
\ value =\n\
\ (cons.... | |
1309e6dbf9cc2381c6eec805773ab31bdecb07a8e1cb5b68c9f4271f16ace28f | bhauman/advent-of-clojure | day5.clj | (ns advent-2016.day5
(:require
[clojure.java.io :as io]
[digest :refer [md5]]
[medley.core :refer [distinct-by]]))
(def input "ffykfhsq")
(defn find-password [code]
(transduce
(comp
(map #(md5 (str code %)))
(filter #(= "00000" (subs % 0 5)))
(map #(nth % 5))
(take 8))
conj
[]
... | null | https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2016/day5.clj | clojure | (ns advent-2016.day5
(:require
[clojure.java.io :as io]
[digest :refer [md5]]
[medley.core :refer [distinct-by]]))
(def input "ffykfhsq")
(defn find-password [code]
(transduce
(comp
(map #(md5 (str code %)))
(filter #(= "00000" (subs % 0 5)))
(map #(nth % 5))
(take 8))
conj
[]
... | |
84e7441bbe00aacaf207af337485711518e3d5f3dbf41de233bfe4e2aad21322 | OCamlPro/freeton_wallet | main.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/4d29bbd5e4a3293b31848181943d83ea7c6abbcc/src/freeton_crawler_lib/main.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
let main () = Printf.printf "Hello world!\n"
|
b592cbea8cfdf5e47ef8142e49e63b84279a13cef7b8f968e1a62e0a8f28abf7 | haskell-tls/hs-tls | Serialization.hs | module Network.TLS.Util.Serialization
( os2ip
, i2osp
, i2ospOf_
) where
import Crypto.Number.Serialize (os2ip, i2osp, i2ospOf_)
| null | https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/core/Network/TLS/Util/Serialization.hs | haskell | module Network.TLS.Util.Serialization
( os2ip
, i2osp
, i2ospOf_
) where
import Crypto.Number.Serialize (os2ip, i2osp, i2ospOf_)
| |
91d8341ff34411e5f0d7359583f1c759e738c953a7ff1576ef79dc04725ea6e7 | aaronc/c-in-clj | runtime.clj | (ns c-in-clj.runtime
(:use
[c-in-clj.lang])
(:require
[clojure.string :as str]
[c-in-clj.platform :as platform]))
(defmacro defhooks [name]
`(let [hook-map# (atom {})]
(defmacro ~name
{:hook-map hook-map#}
[hook-name# args# & body#]
`(swap! hook-map# assoc
... | null | https://raw.githubusercontent.com/aaronc/c-in-clj/3a3c6ac5b3ba9404b7a6f2328a4157dc915c3a2f/src/c_in_clj/runtime.clj | clojure | (ns c-in-clj.runtime
(:use
[c-in-clj.lang])
(:require
[clojure.string :as str]
[c-in-clj.platform :as platform]))
(defmacro defhooks [name]
`(let [hook-map# (atom {})]
(defmacro ~name
{:hook-map hook-map#}
[hook-name# args# & body#]
`(swap! hook-map# assoc
... | |
43c4d10f837b2e1e4c867ab3088a4887d6f1261e9ca43ea33fa7ade01887fbf7 | alexandergunnarson/quantum | core.cljc | (ns quantum.test.apis.twitter.core
(:require [quantum.apis.twitter.core :as ns]))
(defn test:gen-oauth-signature
[email app {:keys [method url query-params]} auth-params])
(defn test:request!
([req])
([email app {:as request :keys [url method query-params timestamp]}]))
(defn test:tweets->hashtags [x])
(def... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/apis/twitter/core.cljc | clojure | HEADLESS BROWSER AUTOMATION | (ns quantum.test.apis.twitter.core
(:require [quantum.apis.twitter.core :as ns]))
(defn test:gen-oauth-signature
[email app {:keys [method url query-params]} auth-params])
(defn test:request!
([req])
([email app {:as request :keys [url method query-params timestamp]}]))
(defn test:tweets->hashtags [x])
(def... |
2e049dbf973f0e65cdbdb6371e405c4e79d0a00e877acd32b8b2f04b82ae7ab4 | duo-lang/duo-lang | Types.hs | module Syntax.TST.Types where
import Data.Set (Set)
import Data.Set qualified as S
import Data.Map (Map)
import Data.Map qualified as M
import Data.List.NonEmpty (NonEmpty)
import Data.Kind ( Type )
import Syntax.RST.Types (Polarity(..), PolarityRep(..), FlipPol ,PrdCnsFlip)
import Syntax.CST.Kinds
import Syntax.CST.Ty... | null | https://raw.githubusercontent.com/duo-lang/duo-lang/926c8e843687ee408027c21483aa2369b4cd0580/src/Syntax/TST/Types.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------... | module Syntax.TST.Types where
import Data.Set (Set)
import Data.Set qualified as S
import Data.Map (Map)
import Data.Map qualified as M
import Data.List.NonEmpty (NonEmpty)
import Data.Kind ( Type )
import Syntax.RST.Types (Polarity(..), PolarityRep(..), FlipPol ,PrdCnsFlip)
import Syntax.CST.Kinds
import Syntax.CST.Ty... |
5a84cb1734c1ccaae70e41b152d5c8851c5fe4437660f6f1e297a2363c987155 | gedge-platform/gedge-platform | rabbit_mqtt_retained_msg_store.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_mqtt_retained_msg_store).
-export... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_mqtt/src/rabbit_mqtt_retained_msg_store.erl | erlang | 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_mqtt_retained_msg_store).
-export([beha... | |
a268791633dc845921d31d0f221bc0a12c75cb5005d7347408552df65e2b0bf5 | lispbuilder/lispbuilder | package.lisp | ;;;; lispbuilder-sdl-gfx-binaries
(in-package #:cl-user)
(defpackage #:lispbuilder-sdl-gfx-binaries
(:use #:cl)
(:nicknames #:sdl-gfx-bin)
(:documentation "The main package of `lispbuilder-sdl-gfx'.")
(:export
;; globals.lisp
#:*dll-path*))
| null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl-gfx/bin/package.lisp | lisp | lispbuilder-sdl-gfx-binaries
globals.lisp |
(in-package #:cl-user)
(defpackage #:lispbuilder-sdl-gfx-binaries
(:use #:cl)
(:nicknames #:sdl-gfx-bin)
(:documentation "The main package of `lispbuilder-sdl-gfx'.")
(:export
#:*dll-path*))
|
9e7f493e8ad7a5cc7e850505855827fbfcf9f456e0349344d1cb2c6016dcb13d | moby/vpnkit | dns_forward_resolver.mli |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/moby/vpnkit/9f3644114c1215202a4a22ad9038d50658abbad1/src/dns_forward/dns_forward_resolver.mli | ocaml |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
f3a48261de8577c1c1d2be6e9d3a0d5d9aa6266c7433ba570767de3035248ad7 | chetmurthy/pa_ppx | pack.ml | Copyright 2016
type length_pack_spec_t =
[ `INTELINT
| `NETINT
| `SCHAR
| `SINTELSHORT
| `SNETSHORT
| `UCHAR
| `UINTELSHORT
| `UNETSHORT]
let lengthspec_of_int len = function
`INTELINT -> `INTELINT len
| `NETINT -> `NETINT len
| `SCHAR -> assert (len < 128) ; `SCHAR len
... | null | https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/util-lib/pack.ml | ocaml | Copyright 2016
type length_pack_spec_t =
[ `INTELINT
| `NETINT
| `SCHAR
| `SINTELSHORT
| `SNETSHORT
| `UCHAR
| `UINTELSHORT
| `UNETSHORT]
let lengthspec_of_int len = function
`INTELINT -> `INTELINT len
| `NETINT -> `NETINT len
| `SCHAR -> assert (len < 128) ; `SCHAR len
... | |
1328fba691bb005313ec6ae13f4539b89647e375b387e3ad58c3d8e0972bf926 | unclechu/xlib-keys-hack | Lens.hs | Author :
License : -keys-hack/master/LICENSE
# LANGUAGE TemplateHaskell #
module Utils.Lens (spec) where
import "lens" Control.Lens ((.~), (%~), (&))
import "hspec" Test.Hspec (Spec, describe, it, shouldBe)
-- local imports
import "xlib-keys-hack" Utils.Lens (makeApoLenses, makeApoClassy)
data Foo = Foo {... | null | https://raw.githubusercontent.com/unclechu/xlib-keys-hack/33b49a9b1fc4bc87bdb95e2bb632a312ec2ebad0/test/Utils/Lens.hs | haskell | local imports | Author :
License : -keys-hack/master/LICENSE
# LANGUAGE TemplateHaskell #
module Utils.Lens (spec) where
import "lens" Control.Lens ((.~), (%~), (&))
import "hspec" Test.Hspec (Spec, describe, it, shouldBe)
import "xlib-keys-hack" Utils.Lens (makeApoLenses, makeApoClassy)
data Foo = Foo { fooFoo :: Int, f... |
153b11222a48769134a4b9bd238556d5543016882b52857a07ad1894512a39cb | amir343/avlang | avl_scan.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2015 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/amir343/avlang/36b14f476327c38d7fb75a787e1e8fd89f25919e/src/avl_scan.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2015 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Erlang token scanning functions of io library .
000 - 037 NUL - US control
040 - 057 SPC - / ... |
c67159ec00838457a073d4d9b7e6fc11d48836c19069dbe41490885320b5fea1 | ruliana/racket-examples | amb-operator.rkt | #lang racket
(define failures null)
(define (fail)
(if (pair? failures) ((first failures)) (error "no more choices!")))
(define (amb/thunks choices)
(let/cc k (set! failures (cons k failures)))
(if (pair? choices)
(let ([choice (first choices)]) (set! choices (rest choices)) (choice))
(begin (set! f... | null | https://raw.githubusercontent.com/ruliana/racket-examples/688293c86132f3b5c924360d53238ca352d4cf5b/amb-operator.rkt | racket | Problem solution
-> '("that" "thing" "grows" "slowly") | #lang racket
(define failures null)
(define (fail)
(if (pair? failures) ((first failures)) (error "no more choices!")))
(define (amb/thunks choices)
(let/cc k (set! failures (cons k failures)))
(if (pair? choices)
(let ([choice (first choices)]) (set! choices (rest choices)) (choice))
(begin (set! f... |
c8c781254a4f8e456b0f389f55e97ffd0f8ede1b1321e5f9699ae51720c3cc40 | ChrisTitusTech/gimphelp | 210_photo_vintage-effect.scm | 210_photo_vintage-effect.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
; or... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_photo_vintage-effect.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
==================================================
... | 210_photo_vintage-effect.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
04/27/2008 - Edited by
it under the terms of the GNU General Public License as published by
t... |
464906d8ff808d61c96ef1386e793baa7e23c0cebc3002fcf002eee294510501 | ulricha/dsh | VirtualSegmentAlgebra.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Database.DSH.VSL.VirtualSegmentAlgebra where
import qualified Data.List.NonEmpty as N
import Database.Algebra.Dag.Build
import qualified Database.DSH.Common.Lang as L
import Database.DSH.Common.Ve... | null | https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/VSL/VirtualSegmentAlgebra.hs | haskell | | This class defines the dialect of segment operators that implement delayed
vectors. These operators that need to be implemented by a backend.
| Data Vector
| Replication Vector
| A vector representing a literal list.
| A reference to a database-resident table.
| Perform duplicate elimination per segment.
| /M... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Database.DSH.VSL.VirtualSegmentAlgebra where
import qualified Data.List.NonEmpty as N
import Database.Algebra.Dag.Build
import qualified Database.DSH.Common.Lang as L
import Database.DSH.Common.Ve... |
cd21286ee204ef1345d7b603a5a2b886608228bd227bb7cae40059f2ce6c7461 | binaryage/chromex | document_scan.cljs | (ns chromex.ext.document-scan (:require-macros [chromex.ext.document-scan :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn scan* [config options]
(gen-wrap :function ::scan config op... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/document_scan.cljs | clojure | (ns chromex.ext.document-scan (:require-macros [chromex.ext.document-scan :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn scan* [config options]
(gen-wrap :function ::scan config op... | |
b73b3d3eb0dc23af0c29a84ffe73c868700d0ce25a80e59a54fa73047916915f | racket/racket7 | module.rkt | #lang racket/base
(require "../common/phase.rkt"
"../common/small-hash.rkt"
"../common/performance.rkt"
"../syntax/bulk-binding.rkt"
"../syntax/module-binding.rkt"
"../common/module-path.rkt"
"../compile/module-use.rkt"
"../expand/root-expand-context.rkt"
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/namespace/module.rkt | racket | ----------------------------------------
#f, symbol, or complete path
module path index used for a self reference
list of (cons phase list-of-module-path-index)
phase-level -> sym -> 'provided or 'protected; computed on demand from `provides`
#f or vector
phase-level
phase-level
phase-level namespace -> module... | #lang racket/base
(require "../common/phase.rkt"
"../common/small-hash.rkt"
"../common/performance.rkt"
"../syntax/bulk-binding.rkt"
"../syntax/module-binding.rkt"
"../common/module-path.rkt"
"../compile/module-use.rkt"
"../expand/root-expand-context.rkt"
... |
0506015d45bba6719653311b103075c75e67f2ccb16b173183a7fc7b4eb7ae1c | mirage/irmin | read_only_intf.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/read_only_intf.ml | ocaml | * The type for stores. The ['a] phantom type carries information about the
store mutability.
* The type for keys.
* The type for raw values.
* [mem t k] is true iff [k] is present in [t].
* [find t k] is [Some v] if [k] is associated to [v] in [t] and [None] is
[k] is not present in [t]. |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
3a4be142e3f7d7aea41a291365ada7e2f3fd24cee41b810b0bf9e126e88bb624 | broom-lang/broom | Env.ml | open Streaming
open Asserts
module T = Fc.Type
module E = Fc.Term.Expr
module TS = TyperSigs
type 'a with_pos = 'a Util.with_pos
type uv = Fc.Uv.t
type var = Util.plicity * E.var
type vals_binding =
| White of (T.ov Vector.t * T.t) * Ast.Term.Expr.t with_pos
| Grey
| Black of Fc.Term.Expr.t TS.typing
ty... | null | https://raw.githubusercontent.com/broom-lang/broom/36d4d9ae234a16bc4da287eef751e9447705ee58/compiler_prev/lib/Typechecker/Env.ml | ocaml | OPTIMIZE:
---
---
TODO: really?
TODO: really? | open Streaming
open Asserts
module T = Fc.Type
module E = Fc.Term.Expr
module TS = TyperSigs
type 'a with_pos = 'a Util.with_pos
type uv = Fc.Uv.t
type var = Util.plicity * E.var
type vals_binding =
| White of (T.ov Vector.t * T.t) * Ast.Term.Expr.t with_pos
| Grey
| Black of Fc.Term.Expr.t TS.typing
ty... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.