_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 |
|---|---|---|---|---|---|---|---|---|
c4ad8b509ca799a63b1bbd78ed10b99ee06f01b4221efd24adb6cba03995183b | k-bx/protocol-buffers | QuickCheck.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module Text.ProtocolBuffers.Test.QuickCheck
( module Test.QuickCheck
, quickCheckTests
)
where
import Test.QuickCheck
import qualified Data.Sequence as Seq
import qualified Data.ByteString.Lazy as L
import qualified... | null | https://raw.githubusercontent.com/k-bx/protocol-buffers/a1d0fdf6b9df7ed066f623de618a4470f4493d33/protobuf-test-suite/test/src/Text/ProtocolBuffers/Test/QuickCheck.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module Text.ProtocolBuffers.Test.QuickCheck
( module Test.QuickCheck
, quickCheckTests
)
where
import Test.QuickCheck
import qualified Data.Sequence as Seq
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.UTF8 as U
import Text.ProtocolBuffers.Bas... |
fab43fdda785bdef12960aba0d985ac1e9bfb436a18906440521768a95c0c3c5 | binsec/binsec | mnemonic.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/base/mnemonic.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
79672c51be0d16626f39430858c4652493f0a30a24b629e6f3eddf04890bf397 | spawngrid/htoad | ec_talk.erl | -*- mode : Erlang ; fill - column : 79 ; comment - column : 70 ; -*-
%%%---------------------------------------------------------------------------
%%% Permission is hereby granted, free of charge, to any person
%%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal ... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/deps/erlware_commons/src/ec_talk.erl | erlang | ---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, an... | -*- mode : Erlang ; fill - column : 79 ; comment - column : 70 ; -*-
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRAN... |
6c2a8aa444fdf49ab3956b00de5a9bbc27d3c419b18847f48ba3d60685f767ff | ghcjs/jsaddle | Types.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE MagicHash #
{-# LANGUAGE BangPatterns #-}
module GHCJS.Types ( JSVal
, WouldBlockException(..)
, JSException(..)
, IsJSVal
, jsval
, isNull
, isUndefined
... | null | https://raw.githubusercontent.com/ghcjs/jsaddle/97273656e28790ab6e35c827f8086cf47bfbedca/jsaddle/src-ghc/GHCJS/Types.hs | haskell | # LANGUAGE EmptyDataDecls #
# LANGUAGE BangPatterns #
, toPtr
, fromPtr
toPtr :: JSVal -> Ptr a
fromPtr :: Ptr a -> JSVal
fromPtr p = js_ptrVal p
{-# INLINE fromPtr #-}
| This is a deprecated copmatibility wrapper for the old JSRef type.
| # LANGUAGE MagicHash #
module GHCJS.Types ( JSVal
, WouldBlockException(..)
, JSException(..)
, IsJSVal
, jsval
, isNull
, isUndefined
, nullRef
, JSString
... |
dd83d225f5a0d6b4b7c54a6fc744fa5403c9f72b500588dd7e906d887c4c597b | plaidfinch/ComonadSheet | Unchecked.hs | module Unchecked where
import Generic
import Data.Function
evaluate :: ComonadApply w => w (w a -> a) -> w a
evaluate fs = fix $ (fs <@>) . duplicate
evaluate = extend -- more elegant , but breaks sharing , resulting in exponential performance penalty
cell :: (RefOf r z l, AnyZipper z i a) => r -> z -> a
cell = (v... | null | https://raw.githubusercontent.com/plaidfinch/ComonadSheet/1cc9a91dc311bc1c692df4faaea091238b7871c2/Old/Unchecked.hs | haskell | more elegant , but breaks sharing , resulting in exponential performance penalty | module Unchecked where
import Generic
import Data.Function
evaluate :: ComonadApply w => w (w a -> a) -> w a
evaluate fs = fix $ (fs <@>) . duplicate
cell :: (RefOf r z l, AnyZipper z i a) => r -> z -> a
cell = (view .) . go
cells :: (RefOf r z l, AnyZipper z i a) => [r] -> z -> [a]
cells refs zipper = map (`cell`... |
551be3270c3bcfd52c4c42a374ad35eb5d931a73ef448dca2713954622f7eb07 | IBM/probzelus | mv_gaussian_tests.ml | open Semi_symbolic.Semi_symbolic_impl
open Owl
let mu0 = Mat.of_array [| 20.; 0.; |] 2 1
let sigma0 = Mat.of_arrays [| [| 3.; 0.; |];
[| 0.; 3.;|] |]
let rv1 = sample "mu0" (mv_gaussian (const mu0) (const sigma0))
let rv1_inner =
begin match rv1 with
| ExRand (rv) -> rv
| _ -> ass... | null | https://raw.githubusercontent.com/IBM/probzelus/c56573201b43780b9c103e5616bb193ababa3399/probzelus/semi_symbolic/test/mv_gaussian_tests.ml | ocaml | assert (sigma_val = sigma0) XXX: this fails by a very small amount | open Semi_symbolic.Semi_symbolic_impl
open Owl
let mu0 = Mat.of_array [| 20.; 0.; |] 2 1
let sigma0 = Mat.of_arrays [| [| 3.; 0.; |];
[| 0.; 3.;|] |]
let rv1 = sample "mu0" (mv_gaussian (const mu0) (const sigma0))
let rv1_inner =
begin match rv1 with
| ExRand (rv) -> rv
| _ -> ass... |
71d272b0d5f062bb382c9473ccdff23a41bb0a802c6d62c272e12e71f87db9df | racket/eopl | sec2.3.rkt | #lang eopl
(require eopl/tests/private/utils)
;; var-exp : Var -> Lc-exp
(define var-exp
(lambda (var)
`(var-exp ,var)))
;; lambda-exp : Var * Lc-exp -> Lc-exp
(define lambda-exp
(lambda (var lc-exp)
`(lambda-exp ,var ,lc-exp)))
;; app-exp : Lc-exp * Lc-exp -> Lc-exp
(define app-exp
(lambda (lc-exp1 lc... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter2/sec2.3.rkt | racket | var-exp : Var -> Lc-exp
lambda-exp : Var * Lc-exp -> Lc-exp
app-exp : Lc-exp * Lc-exp -> Lc-exp
var-exp? : Lc-exp -> Bool
lambda-exp? : Lc-exp -> Bool
app-exp? : Lc-exp -> Bool
var-exp->var : Lc-exp -> Var
lambda-exp->bound-var : Lc-exp -> Var
lambda-exp->body : Lc-exp -> Lc-exp
app-exp->rator : Lc-exp -> Lc... | #lang eopl
(require eopl/tests/private/utils)
(define var-exp
(lambda (var)
`(var-exp ,var)))
(define lambda-exp
(lambda (var lc-exp)
`(lambda-exp ,var ,lc-exp)))
(define app-exp
(lambda (lc-exp1 lc-exp2)
`(app-exp ,lc-exp1 ,lc-exp2)))
(define var-exp?
(lambda (x)
(and (pair? x) (eq? (car x)... |
af6dac49a1ff40af35d54e4151464a0da871ce3b3b6ee01473b35892b98aab3d | Deducteam/SizeChangeTool | tpdb_to_dk.ml | open Kernel.Basic
let export_dk_file : bool ref = ref false
module SString=Set.Make(struct
type t=string
let compare= compare
end)
let parenthesis s=
if String.contains s ' '
then "("^s^")"
else s
let replace c esc s =
String.concat esc (String.split_on_char c s)
let escaped_char=['/',"_slash_" ;... | null | https://raw.githubusercontent.com/Deducteam/SizeChangeTool/0a4db26ee1beed6ca7cf404ba6edd0539d540371/src/tpdb_to_dk.ml | ocaml | open Kernel.Basic
let export_dk_file : bool ref = ref false
module SString=Set.Make(struct
type t=string
let compare= compare
end)
let parenthesis s=
if String.contains s ' '
then "("^s^")"
else s
let replace c esc s =
String.concat esc (String.split_on_char c s)
let escaped_char=['/',"_slash_" ;... | |
cb4edffb779141478b90c7ed50a1139760b0da83beb296a04efbd26b5c380874 | skeuchel/needle | ShiftCommInd.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
module KnotCore.Elaboration.Interaction.ShiftCommInd (lemmas) where
import Coq.StdLib as Coq
import Coq.Syntax as Coq
import KnotCore.Syntax
import KnotCore.Elaboration.Core
import KnotCore.Elaboration.Eq
import... | null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/Interaction/ShiftCommInd.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE MultiWayIf # | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
module KnotCore.Elaboration.Interaction.ShiftCommInd (lemmas) where
import Coq.StdLib as Coq
import Coq.Syntax as Coq
import KnotCore.Syntax
import KnotCore.Elaboration.Core
import KnotCore.Elaboration.Eq
import KnotCore.Elaboration.Interaction.Common
lemmas ::... |
7d1f59aa58daa8e4765481dcac02161768d44ad9ac8ef868ace50fa07653694e | symbiont-io/detsys-testkit | Debug.hs | {-# LANGUAGE OverloadedStrings #-}
module Lec05.Debug where
import Prelude hiding (writeFile)
import Data.Aeson
import Data.ByteString.Lazy (ByteString, writeFile)
import Data.Int(Int64)
import Data.TreeDiff (ansiWlPretty, ediff, ppEditExpr)
import Lec05.History
import Lec05.StateMachine
import Lec05.Time
toI :: (... | null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/eefa1b3cdd61f72934e36543d572adedb6665274/doc/advanced-testing-mini-course/src/Lec05/Debug.hs | haskell | # LANGUAGE OverloadedStrings # |
module Lec05.Debug where
import Prelude hiding (writeFile)
import Data.Aeson
import Data.ByteString.Lazy (ByteString, writeFile)
import Data.Int(Int64)
import Data.TreeDiff (ansiWlPretty, ediff, ppEditExpr)
import Lec05.History
import Lec05.StateMachine
import Lec05.Time
toI :: (Int, HistEvent') -> Value
toI (i, H... |
b795b2500db948ffd21eebb4d54001c31629df85e00bd18b9e32d9df6ac021b8 | input-output-hk/project-icarus-importer | Update.hs | # LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
module Pos.Diffusion.Full.Update
( sendVote
, sendUpdateProposal
, updateListeners
, updateOutSpecs
) where
import Universum
import qualified Network.Broadcast.OutboundQueue as OQ
import Pos.Core.Update (UpI... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/lib/src/Pos/Diffusion/Full/Update.hs | haskell | Send UpdateVote to given addresses.
Send UpdateProposal to given address.
| Relays for data related to update system
motif required for communication.
The 'Logic m' isn't *really* needed, it's just an artefact of the design.
--------------------------------------------------------------------------
UpdateProposal... | # LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
module Pos.Diffusion.Full.Update
( sendVote
, sendUpdateProposal
, updateListeners
, updateOutSpecs
) where
import Universum
import qualified Network.Broadcast.OutboundQueue as OQ
import Pos.Core.Update (UpI... |
d269e0bcb17e9956f59fde90918db1ab6fe4d777a3d951b302f989f156342a89 | katox/neanderthal-stick | core.clj | (ns def-new-kind.core
(:require [uncomplicate.commons.core :refer [let-release release]]
[uncomplicate.commons.utils :refer [dragan-says-ex]]
[uncomplicate.neanderthal.core :as core :refer [transfer!]]
[uncomplicate.neanderthal.native :refer [native-double dge dgd]]
[ne... | null | https://raw.githubusercontent.com/katox/neanderthal-stick/b8f92e46327a54c065232a1fb0f0bebef38c4b40/examples/def-new-kind/src/def_new_kind/core.clj | clojure | define accessors and core operations
define the structure description for persistence
we need to be able to release used resources like a good citizen
provide standard java collection contracts
redefine the default print method to see inspect the content
define the constructor (from the description) for the new s... | (ns def-new-kind.core
(:require [uncomplicate.commons.core :refer [let-release release]]
[uncomplicate.commons.utils :refer [dragan-says-ex]]
[uncomplicate.neanderthal.core :as core :refer [transfer!]]
[uncomplicate.neanderthal.native :refer [native-double dge dgd]]
[ne... |
388f7273050fec94b1340eeeb3131e488bf50d29ec73aa9733769b6f7e2c269c | mirage/ocaml-cstruct | lwt_cstruct.mli |
* Copyright ( c ) 2012 - 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2012 - 2014 Citrix Systems Inc
*
* 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 app... | null | https://raw.githubusercontent.com/mirage/ocaml-cstruct/9ef1ca60f29c06bdf68c0d756b278c7b7f06bbc9/lwt/lwt_cstruct.mli | ocaml | * [read fd t] reads data from the file descriptor [fd] into the
[t] cstruct.
@return the numbers of bytes actually read.
* [write fd t] writes data from the [t] cstruct to the file
descriptor [fd].
@return the numbers of bytes actually written.
* [complete (read fd) t] fills [t] with data from [fd].
... |
* Copyright ( c ) 2012 - 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2012 - 2014 Citrix Systems Inc
*
* 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 app... |
dbb8fd22d2d78000fa59b87b0964789cadeb7d330d0ed9772262044a9359aa18 | bmeurer/ocamljit2 | pr_scheme.ml | (* pa_r.cmo q_MLast.cmo pa_extfun.cmo pr_dump.cmo *)
(***********************************************************************)
(* *)
(* Camlp4 *)
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/camlp4/unmaintained/scheme/pr_scheme.ml | ocaml | pa_r.cmo q_MLast.cmo pa_extfun.cmo pr_dump.cmo
*********************************************************************
Camlp4
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
open Pcaml;
open Format;
type printer_t 'a =... |
3525699c3ff6414cfcf94d526f10832fbb0daa7f8ca8632636fb567d1f96fcb5 | juji-io/datalevin | bench.clj | #!/usr/bin/env clojure
"USAGE: ./bench [rebuild]? [<version>|<version-vm> ...]? [<bench-name> ...]?"
(require
'[clojure.java.io :as io]
'[clojure.java.shell :as sh]
'[clojure.string :as str])
(defn sh [& cmd]
(let [res (apply sh/sh cmd)]
(when (not= 0 (:exit res))
(throw (ex-info "ERROR" res)))
... | null | https://raw.githubusercontent.com/juji-io/datalevin/acbd8dffe984403f60ce1f46dcc3e1aa360fddc5/bench/bench.clj | clojure | ["latest" "datomic"]
(System/exit 0) | #!/usr/bin/env clojure
"USAGE: ./bench [rebuild]? [<version>|<version-vm> ...]? [<bench-name> ...]?"
(require
'[clojure.java.io :as io]
'[clojure.java.shell :as sh]
'[clojure.string :as str])
(defn sh [& cmd]
(let [res (apply sh/sh cmd)]
(when (not= 0 (:exit res))
(throw (ex-info "ERROR" res)))
... |
555fdb373cc9ee8b957d1a4f2dcff79883c7098909e146c1f6741f6f1f7bcdc5 | grin-compiler/ghc-wpc-sample-programs | Cast.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE MagicHash #-}
# LANGUAGE MultiParamTypeClasses #
-- |
-- Module : Basement.Cast
-- License : BSD-style
Maintainer : Haskell Found... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/basement-0.0.11/Basement/Cast.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE MagicHash #
|
Module : Basement.Cast
License : BSD-style
| `Cast` an object of type a to b.
Do not add instance of this class if the source type is not of the same
size of the... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Maintainer : Haskell Foundation
module Basement.Cast
( Cast(..)
) where
#include "MachDeps.h"
import qualified Basement.Block.Base as Block
import Basement.Compat.Base
import Basement.Compat.Natural
import ... |
17a0f5674a9c82f20420409b40f5e67553c210172cdd0c0ef8cf671e13803f68 | ijp/guildhall | symlink-bundle.scm | symlink-bundle.scm --- Dorodango for
Copyright ( C ) 2011 Free Software Foundation , Inc.
Copyright ( C ) 2009 , 2010 < >
Author : < >
Author : < >
;; 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 ... | null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/scripts/symlink-bundle.scm | scheme | This program is free software; you can redistribute it and/or
either version 3
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.
... | symlink-bundle.scm --- Dorodango for
Copyright ( C ) 2011 Free Software Foundation , Inc.
Copyright ( C ) 2009 , 2010 < >
Author : < >
Author : < >
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have receiv... |
f2ef2287fad718ccddad02be69f215e57af42d39ae3b9a52625607fed74778f0 | sethtrain/clj-twilio | sms.clj | (ns twilio.test.twiml.sms
(:use [twilio.twiml.sms] :reload)
(:use [clojure.test]
[twilio.twiml.core]))
(deftest test-sms
(is (= (sms "I'm Hungry")
[:Sms {} "I'm Hungry"]))
(is (= (sms {:method "POST"} "I'm Hungry")
[:Sms {:method "POST"} "I'm Hungry"])))
(deftest test-redirect
(is ... | null | https://raw.githubusercontent.com/sethtrain/clj-twilio/924b2aab51f543611dc37022f7c0e82b677ee521/test/twilio/test/twiml/sms.clj | clojure | (ns twilio.test.twiml.sms
(:use [twilio.twiml.sms] :reload)
(:use [clojure.test]
[twilio.twiml.core]))
(deftest test-sms
(is (= (sms "I'm Hungry")
[:Sms {} "I'm Hungry"]))
(is (= (sms {:method "POST"} "I'm Hungry")
[:Sms {:method "POST"} "I'm Hungry"])))
(deftest test-redirect
(is ... | |
7419fd5cf73e030340b74187d99b002b3980e4ea086e5e7863b9f04857c83b65 | racket/rhombus-prototype | emoji-parse.rkt | #lang racket/base
(require racket/pretty
racket/list)
Parse " emoji-sequences.text " and " emoji-zwj-sequences.text " on stdin and
generate a lexer abbreviation that sequences . While we
;; could generate an abbreviation that is just a big "or" of all sequences,
;; lexer generation would take quadratic ... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/0378e53da1d82d1766477f2c87834f3212dc4f35/shrubbery/private/emoji-parse.rkt | racket | could generate an abbreviation that is just a big "or" of all sequences,
lexer generation would take quadratic time, which is too slow. We instead
collapse things that have the same prefix. | #lang racket/base
(require racket/pretty
racket/list)
Parse " emoji-sequences.text " and " emoji-zwj-sequences.text " on stdin and
generate a lexer abbreviation that sequences . While we
(define table (make-hasheqv))
(let loop ()
(define l (read-line))
(unless (eof-object? l)
(cond
[(reg... |
1fd7ed66c69fabe9a479adfc8bc18d9a544c8d289562c6204c495ec63d2b8131 | clj-holmes/clj-watson | vulnerability_test.clj | (ns clj-watson.unit.logic.github.vulnerability-test
(:require
[clj-watson.logic.github.vulnerability :as logic.gh.vulnerability]
[clojure.test :refer :all]))
(deftest is-version-vulnerable?
(is (= false (logic.gh.vulnerability/is-version-vulnerable? {:mvn/version "1"} {:vulnerableVersionRange "> 0.1, <= 0.4"... | null | https://raw.githubusercontent.com/clj-holmes/clj-watson/e3da1b6395406912ab22163ffd8f0838c7f8b7a2/test/clj_watson/unit/logic/github/vulnerability_test.clj | clojure | (ns clj-watson.unit.logic.github.vulnerability-test
(:require
[clj-watson.logic.github.vulnerability :as logic.gh.vulnerability]
[clojure.test :refer :all]))
(deftest is-version-vulnerable?
(is (= false (logic.gh.vulnerability/is-version-vulnerable? {:mvn/version "1"} {:vulnerableVersionRange "> 0.1, <= 0.4"... | |
5a8a357d7310e2ef86ee2b0bc79040bd4fb7e59fff748a8fe7855d07cb85d612 | typelead/intellij-eta | StringUtil.hs | module FFI.Com.IntelliJ.OpenApi.Util.Text.StringUtil where
import P
foreign import java unsafe
"@static com.intellij.openapi.util.text.StringUtil.convertLineSeparators"
convertLineSeparators :: JString -> JString
foreign import java unsafe
"@static com.intellij.openapi.util.text.StringUtil.lineColToOffset"
l... | null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/OpenApi/Util/Text/StringUtil.hs | haskell | module FFI.Com.IntelliJ.OpenApi.Util.Text.StringUtil where
import P
foreign import java unsafe
"@static com.intellij.openapi.util.text.StringUtil.convertLineSeparators"
convertLineSeparators :: JString -> JString
foreign import java unsafe
"@static com.intellij.openapi.util.text.StringUtil.lineColToOffset"
l... | |
18b2d7344857e19c6134c1f85e013e8318053e6e5efa42a1501ecb715a6ba8f2 | rzetterberg/orgmode-sql | OrgMode.hs | -- | = Introduction
--
< < -ci.org/rzetterberg/orgmode-sql.svg status > >
--
A library that facilitates import\/export orgmode data into\/out of SQL
-- databases, provide common queries and specialized summaries of the data.
--
Supports using MySQL , PostgreSQL or SQLite as storage backend .
--
-- == Importing,... | null | https://raw.githubusercontent.com/rzetterberg/orgmode-sql/98cf35b96e6ce63f60ce11ace18be55e5770352e/lib/Database/OrgMode.hs | haskell | | = Introduction
databases, provide common queries and specialized summaries of the data.
== Importing, manipulating and exporting
will parse the file, create the database schema and import the data into the
database. You can then proceed to manipulate the data in the database and
when you are done you can u... | < < -ci.org/rzetterberg/orgmode-sql.svg status > >
A library that facilitates import\/export orgmode data into\/out of SQL
Supports using MySQL , PostgreSQL or SQLite as storage backend .
Using this library you can grab one of your orgmode files and this library
spent on , you can generate a ' ClockTable ' ... |
a3a9865874723f9b6b916145f40f95122177ccc4d53eb40b3d1979358ca49e90 | lpw25/ocaml-typed-effects | lazy.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/stdlib/lazy.mli | ocaml | *********************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
type 'a t = 'a lazy_t;;
* A value of typ... |
5c4f79d268bb1a86cf41ca707d384587148df062e4189c2d7bfa5c4c3b628723 | reddit-archive/reddit1.0 | tokenizer.lisp | ;;;; Copyright 2018 Reddit, Inc.
;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining a copy of
;;;; this software and associated documentation files (the "Software"), to deal in
the Software without restriction , including without limitation the rights to
;;;; use, copy, modify, merge, pu... | null | https://raw.githubusercontent.com/reddit-archive/reddit1.0/bb4fbdb5871a32709df30540685cf44c637bf203/tokenizer.lisp | lisp | Copyright 2018 Reddit, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
so, subject to the following conditions:
The a... | the Software without restriction , including without limitation the rights to
of the Software , and to permit persons to whom the Software is furnished to do
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
d9b7ac2637b8e36bca02f0e25d8f70333a304e38380206fccffb80901141c82c | sph-mn/sph-lib | list.scm | (define-test-module (test module sph list)
(import
(sph list))
(define-test (env-replace-at-once-proc a)
(map (l (e) (* 3 e)) a))
(define-test (group-split-at-matches arguments)
(group-split-at-matches integer? arguments))
(test-execute-procedures-lambda
(flatten
((1 (2 3 (4) (5 (6 7)) ... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/test/module/sph/list.scm | scheme | matches in the middle, modification of matches
matches at beginning and end
no ellipsis
middle ellipsis
trailing ellipsis
honoring the ellipsis as optional indicator | (define-test-module (test module sph list)
(import
(sph list))
(define-test (env-replace-at-once-proc a)
(map (l (e) (* 3 e)) a))
(define-test (group-split-at-matches arguments)
(group-split-at-matches integer? arguments))
(test-execute-procedures-lambda
(flatten
((1 (2 3 (4) (5 (6 7)) ... |
6f14d6752cbbab46211205bebb7ff33b9831c39944fff980a4730bea22f977fc | cbaggers/rtg-math | non-consing.lisp | (in-package #:rtg-math.vector2.non-consing)
;;----------------------------------------------------------------
(defn-inline set-components ((x single-float) (y single-float) (vec vec2)) vec2
(declare (optimize (speed 3) (safety 1) (debug 1)))
(setf (x vec) x
(y vec) y)
vec)
;;--------------------------... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/vectors/vector2/non-consing.lisp | lisp | ----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
------------------------------------------------------------... | (in-package #:rtg-math.vector2.non-consing)
(defn-inline set-components ((x single-float) (y single-float) (vec vec2)) vec2
(declare (optimize (speed 3) (safety 1) (debug 1)))
(setf (x vec) x
(y vec) y)
vec)
(defn-inline copy-components ((vec vec2) (copy-from vec2)) vec2
(declare (optimize (speed 3)... |
2ebe6786562c695a50ed867e7bb8d706a11e642daa30ea499c01e1b0f1f0b084 | composewell/streamly | Strict.hs | -- |
Module : Streamly . Internal . Data . Tuple . Strict
Copyright : ( c ) 2019 Composewell Technologies
( c ) 2013
-- License : BSD3
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- | Strict data types to be used as accumulator for strict left folds and
-- s... | null | https://raw.githubusercontent.com/composewell/streamly/4ddc30aab84fbbd66ddfeafced2ed3e862e7955d/core/src/Streamly/Internal/Data/Tuple/Strict.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
| Strict data types to be used as accumulator for strict left folds and
scans. For more comprehensive strict data types see
-base-types . The names have been
suffixed by a prime so that programmers can easily distinguish the strict
versions from t... | Module : Streamly . Internal . Data . Tuple . Strict
Copyright : ( c ) 2019 Composewell Technologies
( c ) 2013
Portability : GHC
One major advantage of strict data structures as accumulators in folds and
module Streamly.Internal.Data.Tuple.Strict
(
Tuple' (..)
, Tuple3'... |
cacbfb6959ca28cece427a3e5b334801643874ee3aa42fc93ac818accce6e5ce | reactive-systems/syfco | Wring.hs | -----------------------------------------------------------------------------
-- |
-- Module : Writer.Formats.Wring
License : MIT ( see the LICENSE file )
Maintainer : ( )
--
-- Transforms a specification to a wring format.
--
---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/reactive-systems/syfco/603bbdba1c4902674165714516eea7b6dacbd155/src/lib/Writer/Formats/Wring.hs | haskell | ---------------------------------------------------------------------------
|
Module : Writer.Formats.Wring
Transforms a specification to a wring format.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---... | License : MIT ( see the LICENSE file )
Maintainer : ( )
module Writer.Formats.Wring where
import Config
import Simplify
import Data.LTL
import Data.Error
import Data.Specification
import Writer.Eval
import Writer.Data
import Writer.Utils
opConfig
:: OperatorConfig
opConfig = OperatorConfig
... |
5d98544a567fd67a78ef84f8111e019ff4b69f0468715b0d2dd6f87040f2e39c | returntocorp/semgrep | lib_parsing_php.mli | open Cst_php
(*s: lib_parsing_php.mli *)
val is_php_filename : Common.filename -> bool
this will open the file and look possible for a # ! /usr / / env php
val is_php_file : Common.filename -> bool
val is_php_script : Common.filename -> bool
val find_source_files_of_dir_or_files :
?verbose:bool ->
?include_ha... | null | https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/php/ast/lib_parsing_php.mli | ocaml | s: lib_parsing_php.mli
x: lib_parsing_php.mli
(* returns only origin tokens, filter fake tokens
x: lib_parsing_php.mli
x: lib_parsing_php.mli
x: lib_parsing_php.mli
e: lib_parsing_php.mli | open Cst_php
val is_php_filename : Common.filename -> bool
this will open the file and look possible for a # ! /usr / / env php
val is_php_file : Common.filename -> bool
val is_php_script : Common.filename -> bool
val find_source_files_of_dir_or_files :
?verbose:bool ->
?include_hack:bool ->
Common.path lis... |
7f4de48442384a5d497c122851382d49c8fd45076cb630a315b797d417ffcbe5 | Octachron/codept | a.mli | include E.F
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/module_types/a.mli | ocaml | include E.F
| |
2de56ef3698b2998a1ab6c77fb895156cea96a29b0f820e44901f52785fce079 | aphyr/schadenfreude | demo.clj | (ns schadenfreude.demo
(:use [schadenfreude.git :only [compare-versions]]
[clojure.stacktrace :only [print-cause-trace]]))
(defn suite
[dir]
{:before #(prn "setup")
:after #(prn "teardown" %)
:runs [{:name "demo"
:n 10000
:threads 4
:before #(prn "before" %)
... | null | https://raw.githubusercontent.com/aphyr/schadenfreude/997a886cfa77f5de61e78d643f448de35bd5471e/src/schadenfreude/demo.clj | clojure | (ns schadenfreude.demo
(:use [schadenfreude.git :only [compare-versions]]
[clojure.stacktrace :only [print-cause-trace]]))
(defn suite
[dir]
{:before #(prn "setup")
:after #(prn "teardown" %)
:runs [{:name "demo"
:n 10000
:threads 4
:before #(prn "before" %)
... | |
d22b92e62679fdc4d4ff095f9f2de83c9f60b92a9a67a8ed0037958881a3e1d1 | rufoa/named-re | re.clj | (ns named-re.re
(:refer-clojure :exclude [re-pattern re-matcher re-groups re-seq re-matches re-find])
(:import [java.util.regex Pattern Matcher]))
(defn- is-java7?
"Does the JRE support named groups directly?"
[]
(>= (java.lang.Float/parseFloat (System/getProperty "java.specification.version")) 1.7))
(d... | null | https://raw.githubusercontent.com/rufoa/named-re/382bcea3d3815155dd7a42798209a2f1e2f33bb8/src/named_re/re.clj | clojure | only named groups
all capturing groups
for backwards compatibility with clojure.core/re-pattern
no named groups
turn named groups into normal groups
| (ns named-re.re
(:refer-clojure :exclude [re-pattern re-matcher re-groups re-seq re-matches re-find])
(:import [java.util.regex Pattern Matcher]))
(defn- is-java7?
"Does the JRE support named groups directly?"
[]
(>= (java.lang.Float/parseFloat (System/getProperty "java.specification.version")) 1.7))
(d... |
a73d8a3713efbfa0d4e1c87f1583bf9b7e6fe0fda3a47f75e2218d16d1ccfd84 | deadpendency/deadpendency | CacheExternalRetC.hs | module Common.Effect.CacheExternal.Carrier.CacheExternalRetC
( runCacheExternalRet,
)
where
import Common.Effect.CacheExternal.CacheExternal (CacheExternal (..))
import Control.Algebra (Algebra (..), (:+:) (..))
import Control.Carrier.Reader (ReaderC, ask, runReader)
import Control.Carrier.Writer.Strict (WriterC, ... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/CacheExternal/Carrier/CacheExternalRetC.hs | haskell | module Common.Effect.CacheExternal.Carrier.CacheExternalRetC
( runCacheExternalRet,
)
where
import Common.Effect.CacheExternal.CacheExternal (CacheExternal (..))
import Control.Algebra (Algebra (..), (:+:) (..))
import Control.Carrier.Reader (ReaderC, ask, runReader)
import Control.Carrier.Writer.Strict (WriterC, ... | |
9d612bacdf1aa12e4f729834637404c20eee87930e7b2960f06bf589ea09b33b | ocaml/omd | expect_tests.ml | let show x = Omd.to_html x |> print_string
let%expect_test "construct inline elements" =
show
Omd.Ctor.
[ p
[ em "emphasized"
; br
; strong ~attrs:[ ("class", "my-class") ] "strong"
; nl
; code "some code"
; nl
; a "label" ~url:"my/page/... | null | https://raw.githubusercontent.com/ocaml/omd/e7f30382554cecd595b160e6c218194817ce76d4/tests/expect_tests.ml | ocaml | let show x = Omd.to_html x |> print_string
let%expect_test "construct inline elements" =
show
Omd.Ctor.
[ p
[ em "emphasized"
; br
; strong ~attrs:[ ("class", "my-class") ] "strong"
; nl
; code "some code"
; nl
; a "label" ~url:"my/page/... | |
e65dba9ae352a025f26729297be454df32e42c695f4aad9ed34eb2fe5af48e79 | plclub/lngen | MyLibrary.hs | | This module defines a library of assorted functions that I have
not found in ( GHC 's ) standard library .
not found in (GHC's) standard library. -}
module MyLibrary where
import Data.List ( intercalate, nub, minimumBy )
import Data.Map ( Map )
import qualified Data.Map as Map
import Data.Maybe ( catMa... | null | https://raw.githubusercontent.com/plclub/lngen/2c4f591f0c0fe6cb901e117a31d5d113735f8f54/src/MyLibrary.hs | haskell | -----------------------------------------------------------------------
* General purpose parsing combinators
-----------------------------------------------------------------------
* Error handling
| Views 'Either' as an error monad and returns the result of the
computation or else calls 'error'.
-------... | | This module defines a library of assorted functions that I have
not found in ( GHC 's ) standard library .
not found in (GHC's) standard library. -}
module MyLibrary where
import Data.List ( intercalate, nub, minimumBy )
import Data.Map ( Map )
import qualified Data.Map as Map
import Data.Maybe ( catMa... |
a7e7a6e5d09a618298c505a0235f3c1688fe2fef512af85f16d1944eb68eaa2e | ocsigen/macaque | sql_builders.ml | open Sql_internals
open Sql_types
(** operations *)
let null_workaround (v, t) =
NULL WORKAROUND
It is assumed that any value with type Nullable None is NULL .
This can work around several PostGreSQL Typing limitations
wrt . NULL , such as the ( NULL + NULL ) issue or , worse :
SELECT NU... | null | https://raw.githubusercontent.com/ocsigen/macaque/a92e91c7ed443086551d909c3cfad22c71144f54/src/sql_builders.ml | ocaml | * operations
* values
* tables
* views
* results
* queries | open Sql_internals
open Sql_types
let null_workaround (v, t) =
NULL WORKAROUND
It is assumed that any value with type Nullable None is NULL .
This can work around several PostGreSQL Typing limitations
wrt . NULL , such as the ( NULL + NULL ) issue or , worse :
SELECT NULL + e.n FROM ( SE... |
e64384e9777caa4c75dd25d188d6abc8f5bc57321cb2fafe8865ac8ae84ae761 | shenxs/about-scheme | 26.同时处理.rkt | ;不是非常明白这一章节要讲什么
;似乎是关于有两个参数的函数的设计
#lang racket
(define (replace-eol-with front end)
(cond
[(empty? front) end]
[else (cons
(first front)
(replace-eol-with (rest front) end))]))
( replace - eol - with ' ( 1 2 3 ) ' ( 4 5 6 ) )
Exercise 372
;[a list of number] [a list of symbol]
;... | null | https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/26.%E5%90%8C%E6%97%B6%E5%A4%84%E7%90%86.rkt | racket | 不是非常明白这一章节要讲什么
似乎是关于有两个参数的函数的设计
[a list of number] [a list of symbol]
===>
all possible pair
===>
[a symbol] [a list of number] ==>[a list of (symbol number) pair
支付薪水
[List-of Number] [List-of Number] -> [List-of Number]
[a list of employee] [list of work records] ===>[list of structure]
-----IN------;
(wages*.v3
[a... |
#lang racket
(define (replace-eol-with front end)
(cond
[(empty? front) end]
[else (cons
(first front)
(replace-eol-with (rest front) end))]))
( replace - eol - with ' ( 1 2 3 ) ' ( 4 5 6 ) )
Exercise 372
' ( a b c ) ' ( 1 2 )
' ( ( a 1 ) ( a 2 ) ( b 1 ) ( b 2 ) ( c 1 ) ( c 2 ) ... |
8d0bc518fb6422ab1feb5466a9804dcdb7464453b79a26edd3f67879ae542c13 | myuon/ghc-compiler-notes | GHCConstantsHaskellWrappers.hs | -- includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs
| null | https://raw.githubusercontent.com/myuon/ghc-compiler-notes/1ac7d051acac420f481d34e860040da99a768e43/dummy_includes/GHCConstantsHaskellWrappers.hs | haskell | includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs | |
03105708737becb592e55965a1c972d214a521b6f2be1350c0c2f63244738d7c | TrustInSoft/tis-interpreter | hptmap.ml | (**************************************************************************)
(* *)
This file was originally part of Menhir
(* *)
and , ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/utils/hptmap.ml | ocaml | ************************************************************************
en Automatique. All rights... | This file was originally part of Menhir
and , INRIA Rocquencourt
Copyright 2005 Institut National de Recherche en Informatique et
under the terms of the Q Public License version 1.0 , with the
File modified by CEA ( Commissariat à l'énergie ... |
a5eff0df25ae561c0de735ec306bbf109d118c2b27a0e2ac8dba0292ff5fdd8d | diku-dk/futhark | IntegralExp.hs | -- | It is occasionally useful to define generic functions that can
-- not only compute their result as an integer, but also as a symbolic
-- expression in the form of an AST.
--
There are some hacks for this - it is for example not hard
to define an instance of ' ' that constructs an AST . However ,
-- this fa... | null | https://raw.githubusercontent.com/diku-dk/futhark/5b24fb6f8c227f8d9264982ec39a58fb16e07757/src/Futhark/Util/IntegralExp.hs | haskell | | It is occasionally useful to define generic functions that can
not only compute their result as an integer, but also as a symbolic
expression in the form of an AST.
this falls down for some other interesting classes, like
'Integral', which requires both the problematic method
We can always just define hobbled... | There are some hacks for this - it is for example not hard
to define an instance of ' ' that constructs an AST . However ,
' fromInteger ' , and also that the type is an instance of ' ' .
Hence , this module defines similes to standard numeric
module Futhark.Util.IntegralExp
( IntegralExp (..),
Wrap... |
28d99c4674e65688536f01701ab9bcb292a5d050b533ed74b0e8ba3e1caa3009 | remodoy/clj-postgresql | t_pool.clj | (ns clj-postgresql.t-pool
(:use midje.sweet)
(:require [clj-postgresql.core :as pg]
[clojure.java.jdbc :as jdbc]))
(defn query
[& args]
(jdbc/query (pg/pool) args))
(defn query1
[& args]
(let [result (apply query args)]
(first result)))
(fact "Pool query works"
(jdbc/execute! (pg/po... | null | https://raw.githubusercontent.com/remodoy/clj-postgresql/38eec16386e43504addcae4601fa36f595c81f1a/test/clj_postgresql/t_pool.clj | clojure | (ns clj-postgresql.t-pool
(:use midje.sweet)
(:require [clj-postgresql.core :as pg]
[clojure.java.jdbc :as jdbc]))
(defn query
[& args]
(jdbc/query (pg/pool) args))
(defn query1
[& args]
(let [result (apply query args)]
(first result)))
(fact "Pool query works"
(jdbc/execute! (pg/po... | |
4ae9b409dc12bb57b6a2d9015194f26c45a57329d7f124d5464ff78b2d10b061 | dlesl/erqwest | erqwest_runtime.erl | @private
%%
%% This gen_server monitors the tokio runtime so that its failure can be handled
%% by the supervision tree (for example in the case of a panic). Since this is
%% not expected to happen, the reference to the runtime is stored in a
%% persistent_term for efficiency.
-module(erqwest_runtime).
-behaviour(g... | null | https://raw.githubusercontent.com/dlesl/erqwest/afe7a984a51531687a1ca2540c1310a7bb65d9a5/src/erqwest_runtime.erl | erlang |
This gen_server monitors the tokio runtime so that its failure can be handled
by the supervision tree (for example in the case of a panic). Since this is
not expected to happen, the reference to the runtime is stored in a
persistent_term for efficiency.
gen_server callbacks
gen_server implementation | @private
-module(erqwest_runtime).
-behaviour(gen_server).
-export([start_link/0, get/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2]).
-record(state, {runtime}).
-define(SERVER, ?MODULE).
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
get(... |
2b1788760360241217c6ef5c1128c0f5436babc496ebc21d660465d844e7c977 | OCamlPro/freeton_wallet | db_utils.ml | let database = ref (Freeton_crawler_db_versions.Main.database ())
module PGOCaml = PGOCaml_lwt
module M = PGOCaml_lwt.M
type database_handle = (string, bool) Hashtbl.t PGOCaml.t
let host = match Sys.getenv "PGHOST" with | exception _ -> None | s -> Some s
let (host, unix_domain_socket_dir) =
match host with
| None ... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/5dcf765d697d09bf5bdab7824fffd86f10d4bdf5/src/freeton_crawler_lib/db_utils.ml | ocaml | let database = ref (Freeton_crawler_db_versions.Main.database ())
module PGOCaml = PGOCaml_lwt
module M = PGOCaml_lwt.M
type database_handle = (string, bool) Hashtbl.t PGOCaml.t
let host = match Sys.getenv "PGHOST" with | exception _ -> None | s -> Some s
let (host, unix_domain_socket_dir) =
match host with
| None ... | |
7c138a3799dd3d90c0d148d595848e1ea5f42bc4142c31e3f713637b82cc6334 | mfoemmel/erlang-otp | format_lib_supp.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/sasl/src/format_lib_supp.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(format_lib_supp).
-export([print_... |
d24fe0b138026c38dc4b377d0d09f5a8e97569ff64c6a97fb8bc9a17b14cde67 | abtv/tech-radar | preprocessing.clj | (ns tech-radar.analytics.preprocessing
(:require [taoensso.timbre :as timbre]
[tech-radar.analytics.classification :refer [classify]]
[tech-radar.analytics.utils :refer [get-hashtags]]
[tech-radar.utils.parsers :refer [parse-twitter-date]]))
(defn- streamed-tweet->tweet [{:keys [i... | null | https://raw.githubusercontent.com/abtv/tech-radar/167c1c66ff2cf7140fe1de247d67a7134b0b1748/src/clj/tech_radar/analytics/preprocessing.clj | clojure | (ns tech-radar.analytics.preprocessing
(:require [taoensso.timbre :as timbre]
[tech-radar.analytics.classification :refer [classify]]
[tech-radar.analytics.utils :refer [get-hashtags]]
[tech-radar.utils.parsers :refer [parse-twitter-date]]))
(defn- streamed-tweet->tweet [{:keys [i... | |
51a53e345d1cc73fe777ccb9694bcd2a2332ac9a45d8dd55fdaa02462528b00a | let-def/ttx | ttx_import.ml | module Ml = struct
module Path = Path
module Ident = Ident
module Types = Types
module Map : sig
type 'a t
val empty : debug_name:string -> 'a t
val add : 'a t -> Ident.t -> 'a -> 'a t
val get : 'a t -> Ident.t -> 'a
val find : 'a t -> Ident.t -> 'a option
val of_list : debug_name:strin... | null | https://raw.githubusercontent.com/let-def/ttx/0a50ba7253056d1202f108b67faf4d9cc78e020d/lib/ttx/ttx_import.ml | ocaml | of_path Predef.path_exn;
of_path Predef.path_array;
of_path Predef.path_lazy_t;
of_path Predef.path_extension_constructor;
of_path Predef.path_floatarray; | module Ml = struct
module Path = Path
module Ident = Ident
module Types = Types
module Map : sig
type 'a t
val empty : debug_name:string -> 'a t
val add : 'a t -> Ident.t -> 'a -> 'a t
val get : 'a t -> Ident.t -> 'a
val find : 'a t -> Ident.t -> 'a option
val of_list : debug_name:strin... |
04fe975171eba4cedc46e725d8716da8d600b6367ad751a9cdef327e37a3e822 | unisonweb/unison | Set.hs | module Unison.Util.Set
( asSingleton,
difference1,
mapMaybe,
symmetricDifference,
Unison.Util.Set.traverse,
flatMap,
filterM,
)
where
import Data.Functor ((<&>))
import qualified Data.Maybe as Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Unison.Util.Monoid (foldMapM)
... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/lib/unison-prelude/src/Unison/Util/Set.hs | haskell | | Get the only member of a set, iff it's a singleton.
| Set difference, but return @Nothing@ if the difference is empty. | module Unison.Util.Set
( asSingleton,
difference1,
mapMaybe,
symmetricDifference,
Unison.Util.Set.traverse,
flatMap,
filterM,
)
where
import Data.Functor ((<&>))
import qualified Data.Maybe as Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Unison.Util.Monoid (foldMapM)
... |
2cfd6adb41ed5570a3d1d9ecdc24a489c5f6017cb751c7c99ca6817b8e07bd62 | yzhs/ocamlllvm | proc_nt.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/amd64/proc_nt.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2000 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : proc_nt.ml 9547 2010 - 01 - 2... |
305f0dfff87e7c1f1a1dbeb44ef556b9f346942002d007e2efd087a349fc5785 | dawidovsky/IIUWr | stan.rkt | #lang racket
pomocnicza funkcja dla list o określonej
(define (tagged-tuple? tag len p)
(and (list? p)
(= (length p) len)
(eq? (car p) tag)))
(define (tagged-list? tag p)
(and (pair? p)
(eq? (car p) tag)
(list? (cdr p))))
;;
(define (node l s r)
(list 'node l s r))
(define (no... | null | https://raw.githubusercontent.com/dawidovsky/IIUWr/73f0f65fb141f82a05dac2573f39f6fa48a81409/MP/Pracownia9/stan.rkt | racket | #lang racket
pomocnicza funkcja dla list o określonej
(define (tagged-tuple? tag len p)
(and (list? p)
(= (length p) len)
(eq? (car p) tag)))
(define (tagged-list? tag p)
(and (pair? p)
(eq? (car p) tag)
(list? (cdr p))))
(define (node l s r)
(list 'node l s r))
(define (node?... | |
e88a28b6360340807c3f42bfa19c46734666480d5ad4714384ba57c3b4298590 | ztellman/narrator | executor.clj | (ns narrator.executor
(:use
[potemkin])
(:require
[clojure.tools.logging :as log]
[narrator.utils.locks :as l]
[primitive-math :as p]
[narrator.utils.rand :as r]
[narrator.core :as c])
(:import
[java.util
ArrayList]
[narrator.core
IBufferedAggregator
StreamOperator]
... | null | https://raw.githubusercontent.com/ztellman/narrator/fd6b46b374c375c2701c377085058f27430e34f1/src/narrator/executor.clj | clojure |
task-id is already defined, update lease counts
no task-id, acquire semaphore and create task-id
| (ns narrator.executor
(:use
[potemkin])
(:require
[clojure.tools.logging :as log]
[narrator.utils.locks :as l]
[primitive-math :as p]
[narrator.utils.rand :as r]
[narrator.core :as c])
(:import
[java.util
ArrayList]
[narrator.core
IBufferedAggregator
StreamOperator]
... |
198a678e8d1f95b2aefc3fb7462e725b6fc47d8cabdf73e259cac25cb8c862e8 | remixlabs/wasicaml | t040_exc5.ml | like but in the main function ( which is compiled differently )
let () =
Testprint.string "test" "f1";
let k = ref 0 in
( try
incr k;
raise Not_found
with
| Not_found -> incr k
);
Testprint.int "k" !k;
Testprint.string "test" "f2";
let k = ref 0 in
( try
try
incr... | null | https://raw.githubusercontent.com/remixlabs/wasicaml/74ff72535aa8e49ab94a05d9c32c059ce264c1bb/test/t040_exc5.ml | ocaml | like but in the main function ( which is compiled differently )
let () =
Testprint.string "test" "f1";
let k = ref 0 in
( try
incr k;
raise Not_found
with
| Not_found -> incr k
);
Testprint.int "k" !k;
Testprint.string "test" "f2";
let k = ref 0 in
( try
try
incr... | |
b542dba8131d6c4a346e8d75ae95acb8a76657365b0c3b574481151ca0740ae8 | alt-romes/slfl | Minimize.hs | # LANGUAGE LambdaCase #
module Minimize where
import CoreSyntax (Name)
import Syntax
import Program
minimize :: Program -> Program
minimize (Program a binds c d) = Program a (map minimize' binds) c d
where
minimize' :: Binding -> Binding
minimize' (Binding n e) = Binding n $ minimizex e
minimi... | null | https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/app/Minimize.hs | haskell | Enter lambda
If e2 is the var name equal to the last name, return e1 as the minimized exp
Else we fail and return the original expression
Same as above but deepen
The minimization reached a type that doesn't work, return the original expression | # LANGUAGE LambdaCase #
module Minimize where
import CoreSyntax (Name)
import Syntax
import Program
minimize :: Program -> Program
minimize (Program a binds c d) = Program a (map minimize' binds) c d
where
minimize' :: Binding -> Binding
minimize' (Binding n e) = Binding n $ minimizex e
minimi... |
b50e0e783785de4b264c4ac611180a8cb44555e2a619dec23a5ef5afa79beaa5 | marick/Midje | t_simple.clj | (ns midje.checking.checkers.t-simple
(:require [midje.sweet :refer :all]
[midje.checking.checkers.defining :refer [checker?]]
[midje.test-util :refer :all]))
(facts "about truthy"
#'truthy => checker?
truthy => checker?
true => truthy
1 => truthy
(truthy false) => false
(truthy n... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/checking/checkers/t_simple.clj | clojure | Following would be a user error, but the results should be helpful.
Note that both regexps should match.
with error. Here's the expected behavior:
! | (ns midje.checking.checkers.t-simple
(:require [midje.sweet :refer :all]
[midje.checking.checkers.defining :refer [checker?]]
[midje.test-util :refer :all]))
(facts "about truthy"
#'truthy => checker?
truthy => checker?
true => truthy
1 => truthy
(truthy false) => false
(truthy n... |
7511df4443cb583dbb9d1b3846b643afbb0352731f3520451085aa0b6f750eaa | the-drunk-coder/megra | megra-supercollider-event-handlers-8ch.lisp | (in-package :megra)
(defmethod handle-grain-event-sc-8ch ((g grain-event-8ch) timestamp &key)
(unless (gethash (grain-8ch-sample-location g) *sc-buffer-directory*)
(register-sample (grain-8ch-sample-location g)))
;; might save a hashtable access here ... later ...
(let ((bufnum (gethash (grain-8ch-sample-loc... | null | https://raw.githubusercontent.com/the-drunk-coder/megra/8d40fc4e3c2758d71895a46ea96280ed217bd348/megra-supercollider-event-handlers-8ch.lisp | lisp | might save a hashtable access here ... later ... | (in-package :megra)
(defmethod handle-grain-event-sc-8ch ((g grain-event-8ch) timestamp &key)
(unless (gethash (grain-8ch-sample-location g) *sc-buffer-directory*)
(register-sample (grain-8ch-sample-location g)))
(let ((bufnum (gethash (grain-8ch-sample-location g) *sc-buffer-directory*)))
(osc:si... |
2c77266040823303f7ffc7b7a361a82c4c444181ef2d8967f1791c22bff0f5da | dhleong/wish | collections.cljs | (ns wish.util.collections
"(New) Home of collection manipulation fns")
(defn index-where
"Given an ordered collection, return the index of the first item that
matches the given predicate. Returns nil if no item matches"
[coll pred]
(loop [i 0
coll coll]
(when (seq coll)
(if (pred (first c... | null | https://raw.githubusercontent.com/dhleong/wish/41eda273163f7421fdcb60b72349830f014f44d2/src/cljs/wish/util/collections.cljs | clojure | (ns wish.util.collections
"(New) Home of collection manipulation fns")
(defn index-where
"Given an ordered collection, return the index of the first item that
matches the given predicate. Returns nil if no item matches"
[coll pred]
(loop [i 0
coll coll]
(when (seq coll)
(if (pred (first c... | |
2a796eb6bfc1e51125785dd2e547ef1ebe0d5ae63d756220957013f643f37611 | ctford/functional-composition | canone_alla_quarta.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Functional Composition by ( @ctford ) ; ;
;; ThoughtWorks ;;
;; ;;
;; -composition ;;
;; ;;
;; ... | null | https://raw.githubusercontent.com/ctford/functional-composition/8dc3e594c4c1512f12147458c8654f280004a658/src/goldberg/variations/canone_alla_quarta.clj | clojure |
;
ThoughtWorks ;;
;;
-composition ;;
;;
;;
Sine waves ;;
;
Psycho-acoustics ... |
(ns goldberg.variations.canone-alla-quarta
(:use [overtone.live :exclude
[scale pitch midi->hz note sharp flat run fill]]
[quil.core :only
[smooth sketch ellipse frame-rate background
width height stroke stroke-weight fill]]))
(definst tone [frequency 440] (sin-osc freq... |
bb6a2954d252022390a2ecdbd0ffbffeffc6b7eae7fb4303b9b0cf4c9c5764e0 | Helium4Haskell/helium | TestTypeSynonyms.hs | module TestTypeSynonyms where
type Dier = String
type Beer = Dier
type IJsbeer = Beer
type IJsberen = [IJsbeer]
type Vogel = Dier
type Kanarie = Vogel
type Vogels = [Vogel]
dier :: Dier
dier = "dier"
beer :: Beer
beer = "beer"
ijsbeer :: IJsbeer
ijsbeer = "ijsbeer"
ijsberen :: IJsberen
ijsberen = [ijsbeer, ijsbe... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/knowntofix/TestTypeSynonyms.hs | haskell | [Beer]
[Beer] | module TestTypeSynonyms where
type Dier = String
type Beer = Dier
type IJsbeer = Beer
type IJsberen = [IJsbeer]
type Vogel = Dier
type Kanarie = Vogel
type Vogels = [Vogel]
dier :: Dier
dier = "dier"
beer :: Beer
beer = "beer"
ijsbeer :: IJsbeer
ijsbeer = "ijsbeer"
ijsberen :: IJsberen
ijsberen = [ijsbeer, ijsbe... |
0436d67b6c2cb54837fc776573c46a9c13b874bbc2b3adf8c457f8611fc53854 | vikram/lisplibraries | suggest.lisp |
(in-package :weblocks)
(export '(render-suggest))
(defun render-suggest (input-name resultset &key
default-value
(input-id (gensym))
(choices-id (gensym))
(format-fn #'format-suggest-list)
(max-length *max-raw-input-length*)
welcome-name)
"Renders a block that ... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/snippets/suggest.lisp | lisp |
(in-package :weblocks)
(export '(render-suggest))
(defun render-suggest (input-name resultset &key
default-value
(input-id (gensym))
(choices-id (gensym))
(format-fn #'format-suggest-list)
(max-length *max-raw-input-length*)
welcome-name)
"Renders a block that ... | |
dc25f1e1518aef40c3a2922b1f15d8bcd4faf538325d47070f1dff1f26b8e061 | ocamllabs/ocaml-modular-implicits | t193-setfloatfield-1.ml | open Lib;;
type t = {
mutable a : float;
mutable b : float;
};;
let x = { a = 0.1; b = 0.2 } in
x.a <- 0.3;
if x.a <> 0.3 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 GETGLOBAL 0.2
11 PUSHGETGLOBAL 0.1
13 MAKE... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t193-setfloatfield-1.ml | ocaml | open Lib;;
type t = {
mutable a : float;
mutable b : float;
};;
let x = { a = 0.1; b = 0.2 } in
x.a <- 0.3;
if x.a <> 0.3 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 GETGLOBAL 0.2
11 PUSHGETGLOBAL 0.1
13 MAKE... | |
ee1fb6593193a8edb3ee9a47a46f5d4436a55846122c6e3df4485af5376db6e4 | deadtrickster/cl-statsd | null.lisp | (in-package :statsd)
(defclass null-client (statsd-client-base )
())
(defun make-null-client ()
(make-instance 'null-client))
(defmethod send ((client null-client) metric key value rate)
(declare (ignore metric key rate))
value)
| null | https://raw.githubusercontent.com/deadtrickster/cl-statsd/7790c95c097f690994256519d24106b53c3e5e37/src/clients/null.lisp | lisp | (in-package :statsd)
(defclass null-client (statsd-client-base )
())
(defun make-null-client ()
(make-instance 'null-client))
(defmethod send ((client null-client) metric key value rate)
(declare (ignore metric key rate))
value)
| |
4e69830716283a08ecbf6ed2c63840ab8faecddac3bba4e44e83dd83a1b1fc9c | hcvst/erlang-dns | ed_zone_data_sup.erl | %%%----------------------------------------------------------------------------
@doc Erlang DNS ( EDNS ) supervisor of lookup servers
@author v. Stockhausen < >
%%% @end
%%%----------------------------------------------------------------------------
-module(ed_zone_data_sup).
-behaviour(supervisor).
%% API
-e... | null | https://raw.githubusercontent.com/hcvst/erlang-dns/cac34b16d565d228a11acfad670d7bba321a3ddc/src/ed_zone_data_sup.erl | erlang | ----------------------------------------------------------------------------
@end
----------------------------------------------------------------------------
API
behaviour callbacks
============================================================================
API
====================================================... | @doc Erlang DNS ( EDNS ) supervisor of lookup servers
@author v. Stockhausen < >
-module(ed_zone_data_sup).
-behaviour(supervisor).
-export([start_link/0, register_zone_provider/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
( ) - > { ok , Pid::pid ( ) }
start_link() ->
supervisor:start_link({loc... |
5b968177a6bd255dae909e4d56084263cb2487acde6a44dd24e0d8cad7fc31bd | bennn/zordoz | main.rkt | #lang racket/base
(require racket/contract
compiler/zo-structs
zordoz/private/zo-string
zordoz/private/zo-transition
zordoz/private/zo-find
zordoz/private/zo-shell
zordoz/private/zo-syntax
zordoz/private/zo-compile)
(provide result result? result-zo resul... | null | https://raw.githubusercontent.com/bennn/zordoz/00f68d7e00fbf271a95c3f120a2d9fe5b598b7e9/main.rkt | racket | Render a zo struct as a string.
Optional argument #:deep? determines whether to render the struct's
fields, or just its name.
Convert a zo struct to a string specification.
Specifications are structured strings -- they are lists with
the same number of fields as the struct they represent.
(zo-transition z s) re... | #lang racket/base
(require racket/contract
compiler/zo-structs
zordoz/private/zo-string
zordoz/private/zo-transition
zordoz/private/zo-find
zordoz/private/zo-shell
zordoz/private/zo-syntax
zordoz/private/zo-compile)
(provide result result? result-zo resul... |
8ba81c3ea3c17702555ec1f54473a2395c1e25e5bdc40e2daf55b337a606d551 | jyh/metaprl | ilc_core.mli | doc <:doc<
@theory{ILC: A Foundation for Automated Reasoning About Pointer Programs}
@module[Ilc_core]
The @tt[Ilc_core] module implements the basic language of the ILC.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modul... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/ilc/ilc_core.mli | ocaml |
* For connectives such as implications and conjuntions we need to use names
* that would not coflict with the type theory ones (in order not to be forced
* to use fully qualified names for the type theory connectives)
*
* This is not a complete list (yet).
This theory does not use proof terms | doc <:doc<
@theory{ILC: A Foundation for Automated Reasoning About Pointer Programs}
@module[Ilc_core]
The @tt[Ilc_core] module implements the basic language of the ILC.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modul... |
4a03894aa623d38f8f37bb31fa7d61632492394d20ab63b4f27f250d3c960930 | exoscale/clojure-kubernetes-client | v1_container_status.clj | (ns clojure-kubernetes-client.specs.v1-container-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-container-state :refer :all]
[clojure-kubernetes-client.specs.v1-container-state :refer :all]
)
(:import (jav... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_container_status.clj | clojure | (ns clojure-kubernetes-client.specs.v1-container-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-container-state :refer :all]
[clojure-kubernetes-client.specs.v1-container-state :refer :all]
)
(:import (jav... | |
8fdc361a37a491edbf02e569148cc335754018068b480ea34f257c849cac1499 | clojure-interop/google-cloud-clients | GrpcGameServerClustersServiceStub.clj | (ns com.google.cloud.gaming.v1alpha.stub.GrpcGameServerClustersServiceStub
"gRPC stub implementation for gameservices API (prod).
This class is for advanced usage and reflects the underlying API directly."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.gaming.v1alpha.stub GrpcGameS... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.gaming/src/com/google/cloud/gaming/v1alpha/stub/GrpcGameServerClustersServiceStub.clj | clojure | (ns com.google.cloud.gaming.v1alpha.stub.GrpcGameServerClustersServiceStub
"gRPC stub implementation for gameservices API (prod).
This class is for advanced usage and reflects the underlying API directly."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.gaming.v1alpha.stub GrpcGameS... | |
49089796326dcc4845d4d6e23333a86445f0abb2c96e872d6180f4c49ca1f241 | ocaml/oasis | plugin1.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/ext/plugin-loader/test/data/findlib/plugin1/plugin1.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
b1ebead30c78f7cc0df870615f291e96a9e7b4f208000d9795bd7878076abd20 | bostonaholic/ring-okta | saml.clj | (ns ring.ring-okta.saml
(:require [clojure.data.codec.base64 :as b64]
[clojure.string :as string])
(:import (com.okta.saml SAMLValidator)))
(defn- get-saml-response [saml-response okta-config validator]
(let [config (.getConfiguration validator okta-config)
decoded-saml-response (String. (b64... | null | https://raw.githubusercontent.com/bostonaholic/ring-okta/685a9eef3d5a5f729d70c3665a3e531a3d6dbd2c/src/ring/ring_okta/saml.clj | clojure | (ns ring.ring-okta.saml
(:require [clojure.data.codec.base64 :as b64]
[clojure.string :as string])
(:import (com.okta.saml SAMLValidator)))
(defn- get-saml-response [saml-response okta-config validator]
(let [config (.getConfiguration validator okta-config)
decoded-saml-response (String. (b64... | |
a8761d12f47b72558094183e016f786f6fc106cc96615b21e521e9b85e7c5a3d | dradtke/Lisp-Text-Editor | bindings.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; libtest.lisp --- Setup CFFI bindings for libtest.
;;;
Copyright ( C ) 2005 - 2007 , loliveira(@)common - lisp.net >
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/cffi_0.10.6/tests/bindings.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
libtest.lisp --- Setup CFFI bindings for libtest.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distr... | Copyright ( C ) 2005 - 2007 , loliveira(@)common - lisp.net >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY ... |
4a48526f7be970e7b4c5924e2b7dedd0f756e5d09dd290b715cffe4166601e4b | CardanoSolutions/kupo | PatternSpec.hs | 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 /.
module Test.Kupo.Data.PatternSpec
( spec
) where
import Kupo.Prelude
import Kupo.Data.Cardano
( ComparableOutput
, ExtendedOu... | null | https://raw.githubusercontent.com/CardanoSolutions/kupo/81279c36f6f3979122e80d63750ba8482016ac79/test/Test/Kupo/Data/PatternSpec.hs | haskell |
Helper
| 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 /.
module Test.Kupo.Data.PatternSpec
( spec
) where
import Kupo.Prelude
import Kupo.Data.Cardano
( ComparableOutput
, ExtendedOu... |
47aaf767c513037a7ff7904784e8d5c1c7c17adc4a3b68bafc40643625ea3b1d | dinosaure/mimic | hmap.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dinosaure/mimic/c531df2c30b435e7869125f4c8330a8b4499d63b/lib/hmap.ml | ocaml | Type identifiers.
See #1
Heterogeneous maps
Keys
Maps | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
bace245e847313c856e6294a1ee190fc0c531a8156e4ae4cc8d222260702b864 | okuoku/nausicaa | test-strings-mutable-strings.sps | -*- coding : utf-8 -*-
;;;
Part of : / Scheme
;;;Contents: tests for mutable string label
Date : Thu Dec 23 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU General Public License as published... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-strings-mutable-strings.sps | scheme |
Contents: tests for mutable string label
Abstract
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
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRAN... | -*- coding : utf-8 -*-
Part of : / Scheme
Date : Thu Dec 23 , 2010
Copyright ( c ) 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
#!r6rs
(import (nausicaa)
(n... |
8ac20b51475d859c17880f890a1d387c980d3f126737faed8739176629e30e02 | graninas/The-Amoeba-World | Player.hs | module Amoeba.GameLogic.Data.Player where
data Player = Human
| AI1
deriving (Show, Read, Eq)
humanPlayer = Human
ai1Player = AI1 | null | https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/GameLogic/Data/Player.hs | haskell | module Amoeba.GameLogic.Data.Player where
data Player = Human
| AI1
deriving (Show, Read, Eq)
humanPlayer = Human
ai1Player = AI1 | |
ba0900e88041857229dc702c25c300c4d3d0408db7fc09223391a1aa861a147b | triffon/fp-2022-23 | 01-del-assoc.rkt | #lang racket
ще използваме тази функция в други файлове
(provide del-assoc)
(define (del-assoc key alist)
(filter
(lambda (kv) (not (equal? key (car kv))))
alist)) | null | https://raw.githubusercontent.com/triffon/fp-2022-23/c6f5ed7264fcd8988cf29f2d04fda64faa8c8562/exercises/inf2/08/01-del-assoc.rkt | racket | #lang racket
ще използваме тази функция в други файлове
(provide del-assoc)
(define (del-assoc key alist)
(filter
(lambda (kv) (not (equal? key (car kv))))
alist)) | |
caa8565a59f46fc2ef76d7ee4eb49e09e9435970c5aa934db72320f68bd9cb59 | uw-unsat/serval | refcnt.rkt | #lang rosette/safe
(provide (all-defined-out))
(struct refcnt (cnt perm perm-inv) #:transparent)
(define (make-havoc-refcnt)
(define-symbolic* cnt (~> (bitvector 64) (bitvector 64)))
(define-symbolic* perm (~> (bitvector 64) (bitvector 64) (bitvector 64)))
(define-symbolic* perm-inv (~> (bitvector 64) (bitvect... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/spec/refcnt.rkt | racket | #lang rosette/safe
(provide (all-defined-out))
(struct refcnt (cnt perm perm-inv) #:transparent)
(define (make-havoc-refcnt)
(define-symbolic* cnt (~> (bitvector 64) (bitvector 64)))
(define-symbolic* perm (~> (bitvector 64) (bitvector 64) (bitvector 64)))
(define-symbolic* perm-inv (~> (bitvector 64) (bitvect... | |
2efc1068bf65c8b6678de21fbf1402d454928499b6f7b815cf6d7c2ca4b07873 | rescript-association/reanalyze | ext_json_types.ml | Copyright ( C ) 2015 - 2017 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-association/reanalyze/cdfda77abac5defd1271927bcd277628afa7e36a/src/ext/ext_json_types.ml | ocaml | Copyright ( C ) 2015 - 2017 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | |
1e5b358fd0a2b8eeb27819fdc9543362b47fb28585b7d7c5ca060b7ebf3c4873 | twosigma/waiter | handler.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/8d3cdaed90078c188095ae1e65714edc72f9122c/containers/test-apps/jwks-server/src/jwks_server/handler.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns jwks-server.handler
(:require [buddy.core.keys :as buddy-keys]
[buddy.sign.jwt :as jwt]
[clojure.data.json :as json]
[clojure.tools.logging :as log]
... |
8e77d4b16b341a0487bbbf8a78320178f1e80eee226477f01e42dcd774e31093 | s312569/clj-biosequence | serialising.clj | (in-ns 'clj-biosequence.core)
(defrecord biosequenceIndexReader [index strm]
biosequenceReader
(biosequence-seq [this]
(ind/object-seq (:strm this) (vals (dissoc (:index this) :parameters))))
(get-biosequence [this accession]
(if-let [i ((:index this) accession)]
(first (ind/object-seq (:strm th... | null | https://raw.githubusercontent.com/s312569/clj-biosequence/b4d2a2750d8fd6a2b398d859879c193e00212415/src/clj_biosequence/serialising.clj | clojure | (in-ns 'clj-biosequence.core)
(defrecord biosequenceIndexReader [index strm]
biosequenceReader
(biosequence-seq [this]
(ind/object-seq (:strm this) (vals (dissoc (:index this) :parameters))))
(get-biosequence [this accession]
(if-let [i ((:index this) accession)]
(first (ind/object-seq (:strm th... | |
a369af8a3b3909738b8b3113c720624d7943a4dcf43de865f73a650cb4e7b89f | kindista/kindista | helpers.lisp | Copyright 2012 - 2021 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at you... | null | https://raw.githubusercontent.com/kindista/kindista/b68b5ef6a4bf01054d183e566bf257f2aa8a7945/src/email/helpers.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
")
")
"
"
")
")
"
}
}
text-decoration: none;}")
"
"
" | Copyright 2012 - 2021 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distr... |
e3199f062d742ae7da63cfe5fa185df3c133c840e9aa0fd3659fb516319a3813 | racket/plot | line.rkt | #lang typed/racket/base
(require typed/racket/class racket/match racket/list
(only-in typed/pict pict)
plot/utils
"../common/type-doc.rkt"
"../common/utils.rkt")
(provide (all-defined-out))
;; ========================================================================================... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/private/plot3d/line.rkt | racket | =================================================================================================== | #lang typed/racket/base
(require typed/racket/class racket/match racket/list
(only-in typed/pict pict)
plot/utils
"../common/type-doc.rkt"
"../common/utils.rkt")
(provide (all-defined-out))
(: lines3d-render-proc (-> (-> (Listof (Vectorof Real)))
Plot-C... |
95fd8b0d8dc6bbdf0bed7780c6eb03c8c6121dd50b1439525121225568ed84d4 | GaloisInc/ivory | Proc.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeFamilies #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE DataKinds #
# LANGUAGE KindS... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory/src/Ivory/Language/Proc.hs | haskell | # LANGUAGE Rank2Types #
Function Type ---------------------------------------------------------------
| The kind of procedures.
| Typeclass for procedure types, parametrized over the C procedure's
signature, to produce a value representing their signature.
| Turn a type-level description of the signature into a (r... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE Exist... |
2d848d13e1dec88ed685349cdfe46571550f3cdd96a31d00280afa483b3b6e0c | RolfRolles/PandemicML | AVM2string_info.mli | open AVM2Pervasives
* A string of 16 - bit characters
type t =
{ (* Size of UTF-8 encoded field below *)
size: u30;
(* UTF-8 encoded string *)
utf8: u8 array;
}
val parse : prim_parser -> t | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Incubator/AVM2/AVM2string_info.mli | ocaml | Size of UTF-8 encoded field below
UTF-8 encoded string | open AVM2Pervasives
* A string of 16 - bit characters
type t =
size: u30;
utf8: u8 array;
}
val parse : prim_parser -> t |
47a9e64ca3302924dc14ab81c25157178ab7c8f83b9bff83b5c07a41cbc0b69f | nixeagle/nisp | user.lisp | ;;;; Package for including all sorts of interesting and useful libraries
;;;; for testing.
(in-package :cl-user)
(defpackage #:nisp.user
(:use :cl
;; implentation independent sockets
:alexandria
:anaphora
:eos
:usocket
:drakma) ;http-request
(... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/user.lisp | lisp | Package for including all sorts of interesting and useful libraries
for testing.
implentation independent sockets
http-request
In custom userland, this userland has modifications from a standard
userland.
of the macro expression to display the result value.
(+ 1 2)
(my-setup-server) | (in-package :cl-user)
(defpackage #:nisp.user
(:use :cl
:alexandria
:anaphora
:eos
:usocket
(:nicknames :nu :~))
(in-package :nisp.user)
(defmacro n.disasemble (form)
(let ((s (gensym)))
`(let ((,s (with-output-to-string (*standard-output*)
(disassemble ',(c... |
3a040df407ce0cb9e74c04973bebee083708a5a4b86948b36df031b28d4c7237 | huangjs/cl | float.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/float.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
EXPERIMENTAL ... |
(in-package :maxima)
(macsyma-module float)
AND POWER - OF-2 EXPONENT .
EXPONENTS MAY BE BIG NUMBERS NOW ( AUG . 1975 --RJF )
Modified : July 1979 by CWH to run on the Lisp Machine and to comment
August 1980 by CWH to run on Multics and to install
new FIXFLOAT .
December 1980 by JIM to fix BIGLSH no... |
ba5b48f885bd90141a273cc37a2ad46542d82f0775e73038dd3a982afe228833 | freizl/dive-into-haskell | numbers-to-words.hs | -- | Converting numbers to words
module Main where
units, teens, tens :: [String]
units = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
teens = [ "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen",
"seventeen", "eighteen", "nineteen" ]
tens = [ "twenty", "thi... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/introduction-to-FP/chapter4/numbers-to-words.hs | haskell | | Converting numbers to words
----------------------------
Exercise
----------------------------
?? what is a full-stop character
fullstop :: String -> String |
module Main where
units, teens, tens :: [String]
units = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
teens = [ "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen",
"seventeen", "eighteen", "nineteen" ]
tens = [ "twenty", "thirty", "forty", "fifty", "sixty", ... |
2016af2d457963c142d6ee43fea66beda74935c56e4efcdf997694b5d8908298 | rumblesan/improviz | Spec.hs | module Main where
import Data.Monoid ( mempty )
import Test.Framework
import Tests.Language.Ast.Transformers.Globalise
( transformersGlobaliseTests )
import Tests.Language.Interpreter ( interpreterTests )
i... | null | https://raw.githubusercontent.com/rumblesan/improviz/90162e6dc7befec34e3b7b18b8aca275f26cd505/test/Spec.hs | haskell | module Main where
import Data.Monoid ( mempty )
import Test.Framework
import Tests.Language.Ast.Transformers.Globalise
( transformersGlobaliseTests )
import Tests.Language.Interpreter ( interpreterTests )
i... | |
58f2ac43df4ce27a6bb7a62ef3c4cd1e597d56d125082a6db147247c1cf19109 | 8c6794b6/guile-tjit | t-flonum-03.scm | (define (micro n incr)
(let lp ((n n) (acc 0.0))
(if (< 0 n)
(lp (- n 1) (+ acc incr))
acc)))
(micro #e1e6 1.23)
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-flonum-03.scm | scheme | (define (micro n incr)
(let lp ((n n) (acc 0.0))
(if (< 0 n)
(lp (- n 1) (+ acc incr))
acc)))
(micro #e1e6 1.23)
| |
6369ce4b81c2d6e447db39d0b2697c2d761c579dc2199d0f19f4eb1ef8a034ce | AccelerationNet/a-cl-logger | tests.lisp | (in-package :a-cl-logger)
(cl-interpol:enable-interpol-syntax)
(progn
(define-logger testlog ())
(setf (appenders *testlog*) nil)
(setf (parents *testlog*) nil))
(defun run-tests ()
(unwind-protect
(lisp-unit2:run-tests
:package :a-cl-logger
:name :a-cl-logger
:run-contex... | null | https://raw.githubusercontent.com/AccelerationNet/a-cl-logger/cf2b586e9fae0ae2f11ec132a45d69ff8f82d2d5/tests.lisp | lisp | (in-package :a-cl-logger)
(cl-interpol:enable-interpol-syntax)
(progn
(define-logger testlog ())
(setf (appenders *testlog*) nil)
(setf (parents *testlog*) nil))
(defun run-tests ()
(unwind-protect
(lisp-unit2:run-tests
:package :a-cl-logger
:name :a-cl-logger
:run-contex... | |
54dc237d4925851264f89ff674cdfe8a434cfea4c23b5d8ae7d4caca5edc26b8 | manuel-serrano/hop | js_pp.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/2.5.x / scheme2js / js_pp.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/js_pp.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* This file is part of Scheme2JS/HOP. */
*===========================... | * serrano / prgm / project / hop/2.5.x / scheme2js / js_pp.scm * /
* Author : * /
* Creation : 2007 - 11 * /
* Last change : Thu Jul 18 13:39:01 2013 ( serrano ) * /
* Copyr... |
bc6123cad57910adb0bf7ee0ea2d44b7c9b5b71282f849f7a22a0c25fdc644e7 | rigidus/rigidus.ru | irc.lisp | ;; -lisp.net/project/cl-irc/
(require :cl-irc)
(in-package :irc)
(defparameter *connection*
(connect :nickname "testolo5" :server "irc.freenode.org"))
(read-message-loop *connection*)
(join *connection* "#alfazobeta")
;; (defun my-hook (param)
;; (format t "~%[~A]~%" param))
;; (defun my-ping-hook (param)
;;... | null | https://raw.githubusercontent.com/rigidus/rigidus.ru/34fe088f5c3d22243b49cf97f376c8f3c1243dff/org/lrn/irc/irc.lisp | lisp | -lisp.net/project/cl-irc/
(defun my-hook (param)
(format t "~%[~A]~%" param))
(defun my-ping-hook (param)
(format t "~%[-=:ping ~A :=-]~%" param))
(add-hook *connection* 'irc-message #'my-hook)
(add-hook *connection* 'irc-ping-message #'my-ping-hook)
(get-hooks *connection* 'irc-message)
(get-hooks *connec... |
(require :cl-irc)
(in-package :irc)
(defparameter *connection*
(connect :nickname "testolo5" :server "irc.freenode.org"))
(read-message-loop *connection*)
(join *connection* "#alfazobeta")
(cl-irc:privmsg *connection* "#alfazobeta" "")
|
d1fcdca3e23ea92568f4eefe11fd72d63f28dab3f8e34866bdf85d40c10044fa | afiniate/aws_async | sqs_deletequeue.ml | open Core.Std
open Async.Std
open Deferred.Result.Monad_infix
type result = {request_id:String.t} with sexp
let parse_result xml_string =
let open Result.Monad_infix in
Sqs_xml.expect_dtd @@ Xmlm.make_input (`String (0, xml_string))
>>= Sqs_xml.expect_tag ~name:"DeleteQueueResponse"
>>= Sqs_util.parse_respons... | null | https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/sqs/sqs_deletequeue.ml | ocaml | open Core.Std
open Async.Std
open Deferred.Result.Monad_infix
type result = {request_id:String.t} with sexp
let parse_result xml_string =
let open Result.Monad_infix in
Sqs_xml.expect_dtd @@ Xmlm.make_input (`String (0, xml_string))
>>= Sqs_xml.expect_tag ~name:"DeleteQueueResponse"
>>= Sqs_util.parse_respons... | |
cd50eb38cd7c47a52541fd3880bf685b0d66a91f10c3c94b22120723778dca3c | kappelmann/engaging-large-scale-functional-programming | Types.hs | module Types where
type Player = Int
type Field = Int
type Row = [Field]
type Column = [Field]
type Board = [Row]
type Pos = (Int, Int)
type Size = (Int, Int)
type Strategy = [Double] -> Player -> Board -> Pos
type StatefulStrategyFunc a = a -> [Double] -> Player -> Board -> (Pos, a)
type StatefulStrategy a = (a, Stat... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/80e8a732c38691ff4e602e0cf77ff2eefb486284/resources/game_tournament_framework/test/Types.hs | haskell | module Types where
type Player = Int
type Field = Int
type Row = [Field]
type Column = [Field]
type Board = [Row]
type Pos = (Int, Int)
type Size = (Int, Int)
type Strategy = [Double] -> Player -> Board -> Pos
type StatefulStrategyFunc a = a -> [Double] -> Player -> Board -> (Pos, a)
type StatefulStrategy a = (a, Stat... | |
66f1c8c43359c798e3dcd489f74d56b02a4ab7ac2b652d111b2f59a23c0baf7b | mbj/stratosphere | RecoveryGroup.hs | module Stratosphere.Route53RecoveryReadiness.RecoveryGroup (
RecoveryGroup(..), mkRecoveryGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
d... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/route53recoveryreadiness/gen/Stratosphere/Route53RecoveryReadiness/RecoveryGroup.hs | haskell | module Stratosphere.Route53RecoveryReadiness.RecoveryGroup (
RecoveryGroup(..), mkRecoveryGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
d... | |
7ce2b9fdbeddce4befb0240ac706e4405bc4c458f718cc2d17f872f989e24af0 | sneerteam/sneer | client_test.clj | (ns sneer.networking.client-test
(:require
[midje.sweet :refer [fact]]
[clojure.core.async :refer [thread to-chan chan close! >!! map>]]
[sneer.test-util :refer :all]
[sneer.async :refer :all]
[sneer.networking.client :refer :all]))
( do ( require ' midje.repl ) ( midje.repl/autotest ) )
(def t1 {... | null | https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/test/clojure/sneer/networking/client_test.clj | clojure | (ns sneer.networking.client-test
(:require
[midje.sweet :refer [fact]]
[clojure.core.async :refer [thread to-chan chan close! >!! map>]]
[sneer.test-util :refer :all]
[sneer.async :refer :all]
[sneer.networking.client :refer :all]))
( do ( require ' midje.repl ) ( midje.repl/autotest ) )
(def t1 {... | |
51a6d853ff0359851c1732c6d41bd242d382409303464cf96ce0981ad46b1b4f | camlp5/camlp5 | parsetree.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.02.0/parsing/parsetree.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Asttypes
* { 2 Extension points ... |
c1689f0e92e541506f9b0a49ea1551354eae616a08f5327467f8af954c42e7f6 | FailWhaleBrigade/water-wars | Main.hs | You can benchmark your code quickly and effectively with Criterion . See its
-- website for help: </>.
import Criterion.Main
import Prelude
main :: IO ()
main = defaultMain [bench "const" (whnf const ())]
| null | https://raw.githubusercontent.com/FailWhaleBrigade/water-wars/bdd0616b1eed281ace499f059b4cc1e72bc50d05/benchmark/Main.hs | haskell | website for help: </>. | You can benchmark your code quickly and effectively with Criterion . See its
import Criterion.Main
import Prelude
main :: IO ()
main = defaultMain [bench "const" (whnf const ())]
|
7cb2ede585587ecf03e4a6ecdcab87dc66db13166b39e17052b6eadc4d79494a | juxt/bolt | protocols.clj | Copyright © 2014 , JUXT LTD . All Rights Reserved .
(ns bolt.authentication.protocols)
(defprotocol RequestAuthenticator
(authenticate [_ request]
"Return (as a map) any credentials that can be determined from the
given Ring request"))
(extend-protocol RequestAuthenticator
nil
(authenticate [_ reques... | null | https://raw.githubusercontent.com/juxt/bolt/f77be416f82c1ca19d5dc20a15942375edc9b740/src/bolt/authentication/protocols.clj | clojure | Copyright © 2014 , JUXT LTD . All Rights Reserved .
(ns bolt.authentication.protocols)
(defprotocol RequestAuthenticator
(authenticate [_ request]
"Return (as a map) any credentials that can be determined from the
given Ring request"))
(extend-protocol RequestAuthenticator
nil
(authenticate [_ reques... | |
fc70b27ae66fdb5b7614243b47f8a94b701b0cf12f2050b3fbd8c2fb4b104ebc | ucsd-progsys/dsolve | dotprod2.ml |
let dotprod v1 v2 =
let sum = ref 0 in
for i = 0 to (Array.length v1) - 1 do
sum := !sum + (Array.get v1 i) * (Array.get v2 i)
done;
!sum
let driver =
let _ = Random.init 555 in
let sz = Random.int 40 in
let sz' = sz + 1 in
let v1 = Array.make sz' (Random.int 5) in
let v2 = Array.make sz'... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/postests/dotprod2.ml | ocaml |
let dotprod v1 v2 =
let sum = ref 0 in
for i = 0 to (Array.length v1) - 1 do
sum := !sum + (Array.get v1 i) * (Array.get v2 i)
done;
!sum
let driver =
let _ = Random.init 555 in
let sz = Random.int 40 in
let sz' = sz + 1 in
let v1 = Array.make sz' (Random.int 5) in
let v2 = Array.make sz'... | |
707e72bb23c03795b1f5682df6a4a6b029c9044bbe25351d12db452e41d4ba3c | plumatic/grab-bag | template_test.clj | (ns plumbing.template-test
(:use plumbing.core clojure.test plumbing.test)
(:require [plumbing.template :as template]))
(deftest interpolate-into-string-test
(is-= "history:ooyala,sumo,grabbag"
(template/interpolate-into-string
"history:#{w1},#{w2},#{w3}"
[[:w1 "ooyala"] [:w2 "sumo"] [:... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/test/plumbing/template_test.clj | clojure | (ns plumbing.template-test
(:use plumbing.core clojure.test plumbing.test)
(:require [plumbing.template :as template]))
(deftest interpolate-into-string-test
(is-= "history:ooyala,sumo,grabbag"
(template/interpolate-into-string
"history:#{w1},#{w2},#{w3}"
[[:w1 "ooyala"] [:w2 "sumo"] [:... | |
27d8fbe1003778f3d858cf27266ad9420c4a684a2bc14818b0d182ed73ba672f | EFanZh/EOPL-Exercises | exercise-4.34-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-4.x-call-by-reference-lang.rkt")
(check-equal? (run "letref x = 3
in x")
(num-val 3))
(check-equal? (run "let x = 3
in let y = x
in begin set y = 4;
... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-4.34-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-4.x-call-by-reference-lang.rkt")
(check-equal? (run "letref x = 3
in x")
(num-val 3))
(check-equal? (run "let x = 3
in let y = x
x
end")... | |
570fc8a514dc742c80a8aebe969a398c008c5d726f85b8771f67dcf8b65dbb9f | mirage/ocaml-ipaddr | ipaddr_sexp.ml |
* Copyright ( c ) 2018 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/ocaml-ipaddr/b5d92b2ac3814abcf4b32682a79f1730ee98f984/lib/ipaddr_sexp.ml | ocaml |
* Copyright ( c ) 2018 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.