_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 |
|---|---|---|---|---|---|---|---|---|
7370d179e2ad0c81887a03504146952ed2c9ce964cad15e5f77c8aa7cc43a04f | weavejester/hop | middleware.clj | (ns hop.core.middleware
(:require [cemerick.pomegranate.aether :as aether]
[clojure.java.io :as io]
[clojure.string :as str]
[meta-merge.core :refer [meta-merge]]
[medley.core :refer [map-vals]]))
(defn- update-tasks [build f & args]
(update build :tasks (partial map... | null | https://raw.githubusercontent.com/weavejester/hop/7fc7d5490bf8cc98bcca4a81d9e6579c9fee8c14/hop.core/src/hop/core/middleware.clj | clojure | (ns hop.core.middleware
(:require [cemerick.pomegranate.aether :as aether]
[clojure.java.io :as io]
[clojure.string :as str]
[meta-merge.core :refer [meta-merge]]
[medley.core :refer [map-vals]]))
(defn- update-tasks [build f & args]
(update build :tasks (partial map... | |
341590ab84bbe06ce5293b8b11040744e821d232e9010f47c3332a49cc02c606 | reddit-archive/reddit1.0 | frame.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/frame.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... |
e02b553215d29882e1a8161e20fe125955fe32eeb97559610efacacbeda10ef4 | janestreet/learn-ocaml-workshop | snake.mli | (* Snake! *)
| null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-snake/bin/snake.mli | ocaml | Snake! | |
da23b3b4578e7d41dd3477608b2c95b997cdc540b3cc389b0219afa598c41a83 | EduardoHi/jsyn | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.Text as T
import Jsyn
import System.Environment
readJsonExamples | > runSynth | > toJS
main :: IO ()
main = do
args <- getArgs
if length args > 1
then putStrLn "usage: jsyn <examples file>"
else do
ex <- readJsonExamples... | null | https://raw.githubusercontent.com/EduardoHi/jsyn/d537b41abc71ce2aedb8f9fd3a1fec13a8647c59/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import qualified Data.Text as T
import Jsyn
import System.Environment
readJsonExamples | > runSynth | > toJS
main :: IO ()
main = do
args <- getArgs
if length args > 1
then putStrLn "usage: jsyn <examples file>"
else do
ex <- readJsonExamples (head args)
res <- runSynth ... |
40f8b09b0eeb66df1ddf0cec8c7e06bbc5c7de54a5f551635d97133c96e35d6c | sjl/dram | rendering.clj | (ns dram.rendering
(:require [clojure.string :refer [join]]
[dram.parser :refer [parse]]
[dram.context :refer [lookup]]))
(defn find-template-url [path]
(or (clojure.java.io/resource path)
(clojure.java.io/resource (join java.io.File/separator
["... | null | https://raw.githubusercontent.com/sjl/dram/64d620ca4f90c2ce2128b15d19e20733fedb80b8/src/dram/rendering.clj | clojure | (ns dram.rendering
(:require [clojure.string :refer [join]]
[dram.parser :refer [parse]]
[dram.context :refer [lookup]]))
(defn find-template-url [path]
(or (clojure.java.io/resource path)
(clojure.java.io/resource (join java.io.File/separator
["... | |
44501aedac3a6cbd65c286e9e8829a8b4e6ef987d2f44bf2d35da503f013a0a4 | mirage/mirage-clock | pclock.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/mirage-clock/7a91cc43dad3896aa22622a2cfe6659c687dc8d9/solo5/pclock.ml | ocaml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
fd6c6beebc0b7da7e909cbf45c296226a9933c75ca7660da3b2d17917bd1ff5b | alvatar/spheres | sack-client.scm | Universal HTTP client library
Copyright ( C ) 2013 More
MIT license
;;
;; This module is intended to provide HTTP client functionality for any purpose, including ability
;; to run HTTP over custom data channels such as SSL thus providing HTTPS support. It is inspired by
XmlHttpRequest 's calling convention , a... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/net/sack-client.scm | scheme |
This module is intended to provide HTTP client functionality for any purpose, including ability
to run HTTP over custom data channels such as SSL thus providing HTTPS support. It is inspired by
Emphasis is on programmatic control over the ongoing HTTP activity on the one hand, and on
protocol support on the other... | Universal HTTP client library
Copyright ( C ) 2013 More
MIT license
XmlHttpRequest 's calling convention , and by 's lowlevel approach to delivering the protocol .
IO facility of IO primitives .
# # HTTP version support note : 1.1 and 1.0 only .
Per inspiration from libCurl , we do not support making HT... |
520bb5995540b951bf5804c5ae89c7213fb0ee468cf552d673c5fc86aafe54f1 | petereddy/clouchdb | decoder.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CLOUCHDB ; Base : 10 -*-
Copyright ( c ) 2007 . All rights reserved .
;;; 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 wit... | null | https://raw.githubusercontent.com/petereddy/clouchdb/81bcb705be198887e6ce6325c8ad007c3b43e7ea/src/decoder.lisp | lisp | Syntax : COMMON - LISP ; Package : CLOUCHDB ; Base : 10 -*-
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, and/or sell copie... |
Copyright ( c ) 2007 . All rights reserved .
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 OF ANY KIND ,
... |
6bce4491c58eab3212ecddb8d948aa0534b9276c59b522ba53387888ee22a1cc | JohnLato/language-objc | AST.hs | {-# LANGUAGE DeriveDataTypeable, DeriveFunctor #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.ObjC.Syntax.AST
Copyright : ( c ) [ 1999 .. 2007 ]
... | null | https://raw.githubusercontent.com/JohnLato/language-objc/8e9455f15b32229f7caf13769c8945d8544c79f0/src/Language/ObjC/Syntax/AST.hs | haskell | # LANGUAGE DeriveDataTypeable, DeriveFunctor #
# LANGUAGE TypeSynonymInstances #
# OPTIONS_GHC -funbox-strict-fields #
---------------------------------------------------------------------------
|
Module : Language.ObjC.Syntax.AST
License : BSD-style
Stability : experimental
Abstract syntax of C sour... |
Copyright : ( c ) [ 1999 .. 2007 ]
( c ) 2008
( c ) 2012
Maintainer :
Portability : ghc
and declarators are merged with abstract declarators .
With we refer to ` ` The C Programming Language '' , second edition , Brain
and , Prentice Hall , 1988 .... |
4064815d4be3d267d8e72bcc659af98c6e7c0695eb6c2d88216383feec0a41f0 | ollef/sixten | Annotation.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
{-# LANGUAGE DeriveAnyClass #-}
module Syntax.Annotation where
import qualified Prelude(show)
import Protolude
import Pretty
class Eq a => PrettyAnnotation a where
prettyAnno... | null | https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Syntax/Annotation.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass # | # LANGUAGE DeriveGeneric #
# LANGUAGE PatternSynonyms #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
module Syntax.Annotation where
import qualified Prelude(show)
import Protolude
import Pretty
class Eq a => PrettyAnnotation a where
prettyAnnotation :: a -> PrettyDoc -> PrettyDoc
prettyAnnotationParens :: a... |
5ff1ee13f495e386bb40c57b67477bffe4247ce734abb254b348f70f68ecb06c | lpgauth/anchor | anchor_response.erl | -module(anchor_response).
-include("anchor.hrl").
-compile(inline).
-compile({inline_size, 512}).
-export([
format/1
]).
%% public
-spec format(response()) -> ok | {ok, term()} | {error, term()}.
format(#response {status = ?STAT_OK} = Response) ->
return(Response);
format(#response {status = Status}) ->
... | null | https://raw.githubusercontent.com/lpgauth/anchor/0a7176ad0ad4bc5857d58b5b6508f359a5befabb/src/anchor_response.erl | erlang | public
private | -module(anchor_response).
-include("anchor.hrl").
-compile(inline).
-compile({inline_size, 512}).
-export([
format/1
]).
-spec format(response()) -> ok | {ok, term()} | {error, term()}.
format(#response {status = ?STAT_OK} = Response) ->
return(Response);
format(#response {status = Status}) ->
{error, s... |
427295793a590f52768cd79e320168b5e401bd0f971c1f63660191a8dbb99117 | mmottl/gsl-ocaml | odeiv_ex.ml | open Gsl
let f mu _t y f =
let y0 = y.(0) and y1 = y.(1) in
f.(0) <- y1 ;
f.(1) <- -. y0 -. mu *. y1 *. (y0 *. y0 -. 1.)
let jac mu _t y dfdy dfdt =
let y0 = y.(0) and y1 = y.(1) in
dfdy.{0, 0} <- 0. ;
dfdy.{0, 1} <- 1. ;
dfdy.{1, 0} <- -. 2. *. mu *. y0 *. y1 -. 1. ;
dfdy.{1, 1} <- -. mu *. (y0 *. y0... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/examples/odeiv_ex.ml | ocaml | open Gsl
let f mu _t y f =
let y0 = y.(0) and y1 = y.(1) in
f.(0) <- y1 ;
f.(1) <- -. y0 -. mu *. y1 *. (y0 *. y0 -. 1.)
let jac mu _t y dfdy dfdt =
let y0 = y.(0) and y1 = y.(1) in
dfdy.{0, 0} <- 0. ;
dfdy.{0, 1} <- 1. ;
dfdy.{1, 0} <- -. 2. *. mu *. y0 *. y1 -. 1. ;
dfdy.{1, 1} <- -. mu *. (y0 *. y0... | |
b60269000039245dc3508e5d9c51357fbe418df55442087b3c4894d599946482 | igorhvr/bedlam | array.scm | ;;;;"array.scm" Arrays for Scheme
Copyright ( C ) 2001 , 2003 , 2005 , 2006
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . Any copy made of this soft... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/array.scm | scheme | "array.scm" Arrays for Scheme
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any... | Copyright ( C ) 2001 , 2003 , 2005 , 2006
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
@code{(require ' array ) } or @code{(require ' ) }
(require 'reco... |
2b9e2b07e85ca43487a9f0da5ecca81ad1c82490b342a2d48511b5c243c52683 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.admin.pages.activities.views
(:require
[re-frame.core :as re-frame]
[webchange.admin.pages.activities.state :as state]
[webchange.admin.widgets.activities-list.views :refer [activities-list]]
[webchange.admin.widgets.page.views :as page]
[webchange.admin.widgets.search.views :refer [... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/5d5b492712fe34db3ea3b23230c8ad87f94e5865/src/cljs/webchange/admin/pages/activities/views.cljs | clojure | (ns webchange.admin.pages.activities.views
(:require
[re-frame.core :as re-frame]
[webchange.admin.pages.activities.state :as state]
[webchange.admin.widgets.activities-list.views :refer [activities-list]]
[webchange.admin.widgets.page.views :as page]
[webchange.admin.widgets.search.views :refer [... | |
03b27176eada8c54ff882675b6417a47c7cfee2922196f421b282d9ef503962b | deeplang-org/deeplang-type-system | example.ml |
let id size =
let time = Int.of_float (Unix.time()) in
let rint = (Random.int size) in
time * size + rint
;;
let ( ) = i d 1000 ; ;
let sym_id_gen () = 0;
sym_id generator with Unix.time and Random.int
module Dcl_Tab = Map.Make(Int);;
type dcl_tab_ent =
{ mutable name: string
; mutable sc... | null | https://raw.githubusercontent.com/deeplang-org/deeplang-type-system/4e1d1fc5a7328d32df3abbf36ce603db281a809e/Semantics/example.ml | ocaml |
let id size =
let time = Int.of_float (Unix.time()) in
let rint = (Random.int size) in
time * size + rint
;;
let ( ) = i d 1000 ; ;
let sym_id_gen () = 0;
sym_id generator with Unix.time and Random.int
module Dcl_Tab = Map.Make(Int);;
type dcl_tab_ent =
{ mutable name: string
; mutable sc... | |
2b9625d217e80fdb042a53896ad4eeb89b83b23e917e73ccc645061a69c5f6d1 | gwathlobal/CotD | init-game-events-military-sabotage.lisp | (in-package :cotd)
;;===========================
WIN EVENTS
;;===========================
(set-game-event (make-instance 'game-event :id +game-event-military-sabotage-win-for-military+
:descr-func #'(lambda ()
(for... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/game-events/init-game-events-military-sabotage.lisp | lisp | ===========================
=========================== | (in-package :cotd)
WIN EVENTS
(set-game-event (make-instance 'game-event :id +game-event-military-sabotage-win-for-military+
:descr-func #'(lambda ()
(format nil "To win, destroy all of raw flesh storages in the di... |
e53d9274247a63babb3699b6c89f3278222779941d1d3abc693d47936a57b681 | thomescai/erlang-ftpserver | ftpserver_sup.erl |
-module(ftpserver_sup).
-behaviour(supervisor).
-include("log.hrl").
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ===================================... | null | https://raw.githubusercontent.com/thomescai/erlang-ftpserver/061a8a3c2b13533542302bc9e19d29eba21d0998/src/ftpserver_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... |
-module(ftpserver_sup).
-behaviour(supervisor).
-include("log.hrl").
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
Opts = [ { root_dir,"/home / workspace / test " } ] .
bifrost : start_link(memory_server , Opts ) .... |
3cfeaca778795df93b4cb50a1db5a546b051fde60e192576abecf5776e9aa52b | rtoy/cmucl | interface-build.lisp | ;;;; -*- Mode: Lisp ; Package: Toolkit -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/motif/lisp/interface... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/motif/lisp/interface-build.lisp | lisp | -*- Mode: Lisp ; Package: Toolkit -*-
**********************************************************************
**********************************************************************
This defines functions to crunch through the information generated
about the various request operations and automatically generat... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/motif/lisp/interface-build.lisp $")
Written by
Interface Builder
(in-package "TOOLKIT")
(defconstant *string-table-file* "target:motif... |
09fedb7021cbd5719c7a199d1ba912d4e648cc294e94a1b6ffcf131073df86a3 | swarm-game/swarm | TestInventory.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
SPDX - License - Identifier : BSD-3 - Clause
--
-- Swarm unit tests
module TestInventory where
import Control.Lens ((^.))
import Data.Hashable
import Swarm.Game.Display
import Swarm.Game.Entity qualified as E
import Test.Tasty
import Test.Tasty.HUnit
testInventory :: TestTre... | null | https://raw.githubusercontent.com/swarm-game/swarm/affc8668b77b7e85d3d23c182a5159df36d17306/test/unit/TestInventory.hs | haskell | # LANGUAGE OverloadedStrings #
|
Swarm unit tests |
SPDX - License - Identifier : BSD-3 - Clause
module TestInventory where
import Control.Lens ((^.))
import Data.Hashable
import Swarm.Game.Display
import Swarm.Game.Entity qualified as E
import Test.Tasty
import Test.Tasty.HUnit
testInventory :: TestTree
testInventory =
testGroup
"Inventory"
[ testCase
... |
eed583e77afd748fff5bd38552eb830cd757b06f171e7f0013f8d63f41ff17b2 | slipstream/SlipStreamServer | cloud_entry_point_lifecycle_test.clj | (ns com.sixsq.slipstream.ssclj.resources.cloud-entry-point-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer :all]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]]
[com.sixsq.slipstream.ssclj... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/cloud_entry_point_lifecycle_test.clj | clojure | CloudEntryPoint will have been initialized in the test server fixture.
retrieve root resource (anonymously should work)
retrieve root resource (root should have edit rights)
updating root resource as user should fail
update the entry, verify updated doc is returned
must be done as administrator
verify that subse... | (ns com.sixsq.slipstream.ssclj.resources.cloud-entry-point-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer :all]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]]
[com.sixsq.slipstream.ssclj... |
58ab6eff752a85a1f1744e237d3c2bffa92568c9e0d0c639dfd40a3ff6d6ff87 | kowey/GenI | General.hs | module NLP.GenI.Test.General where
import Control.Applicative ( (<$>), (<*>) )
import Control.Monad ( liftM2 )
import Data.Char
import Data.FullList
import Data.List ( nub, isPrefixOf )
import GHC.Exts ( IsString(..) )
import Data.Maybe (isJust)
import qualified Data.Text as T
import qualified Data.Map as Map
import T... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/geni-test/NLP/GenI/Test/General.hs | haskell | ----------------------------------------------------------------------
Arbitrary
----------------------------------------------------------------------
----------------------------------------------------------------------
Serial
---------------------------------------------------------------------- | module NLP.GenI.Test.General where
import Control.Applicative ( (<$>), (<*>) )
import Control.Monad ( liftM2 )
import Data.Char
import Data.FullList
import Data.List ( nub, isPrefixOf )
import GHC.Exts ( IsString(..) )
import Data.Maybe (isJust)
import qualified Data.Text as T
import qualified Data.Map as Map
import T... |
48dfac6816e684847da6b9ed212bb192fc2b6a5c4b9c5799c47bb0bfd7bfc305 | JHU-PL-Lab/jaylang | CE-1CFA04.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c7_COEFFICIENT_1128 = 0
let rec c6_COEFFICIENT_1126 = 0
let rec c5_COEFFICIENT_1125 = 0
let rec c4_COEFFICIENT_1123 = 0
let rec c3_COEFFICIENT_1120 = 0
let rec c2_COEFFICIENT_1118 = 0
let rec c1_COEFFICIENT_1117 = 0
let rec c0_COEFFICIEN... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/termination/CE-1CFA04.ml | ocaml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c7_COEFFICIENT_1128 = 0
let rec c6_COEFFICIENT_1126 = 0
let rec c5_COEFFICIENT_1125 = 0
let rec c4_COEFFICIENT_1123 = 0
let rec c3_COEFFICIENT_1120 = 0
let rec c2_COEFFICIENT_1118 = 0
let rec c1_COEFFICIENT_1117 = 0
let rec c0_COEFFICIEN... | |
14e6a534b156ce91ea57633a727a5da0d05efb57d41765797b877d0d14e93ea5 | cl-stream/cl-stream | misc.lisp | ;;
;; cl-stream - Stream classes for Common Lisp
;;
;; Copyright 2017,2018 Thomas de Grivel <>
;;
;; 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.... | null | https://raw.githubusercontent.com/cl-stream/cl-stream/8c4888591cd4ef9062c6c066326acef1415460f1/misc.lisp | lisp |
cl-stream - Stream classes for Common Lisp
Copyright 2017,2018 Thomas de Grivel <>
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.
WITH REGARD ... | THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
(in-package :cl-stream)
(deftype fixnum+ (&optional (start 0))
`(integer ,start ,most-... |
87914218e96af6b17b510a2106af12d110c3a3669ecb5cd166ae37771c295de1 | ruHaskell-learn/lhx | TestParser.hs | module TestParser (tests) where
import Data.Either (isLeft)
import Data.Text (Text)
import Data.Text qualified as T
import Data.Text.Arbitrary ()
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, (@?), (@?=))
import Lhx.Parser qualified as LP
(?=>) :: Text -> [LP.Chunk] -> TestTree
input ?=>... | null | https://raw.githubusercontent.com/ruHaskell-learn/lhx/7114e5ff8c0ed17ac7e10b2c073c442a2e6c6ede/test/TestParser.hs | haskell | module TestParser (tests) where
import Data.Either (isLeft)
import Data.Text (Text)
import Data.Text qualified as T
import Data.Text.Arbitrary ()
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, (@?), (@?=))
import Lhx.Parser qualified as LP
(?=>) :: Text -> [LP.Chunk] -> TestTree
input ?=>... | |
1fb726a98c4a7afc89c2d8c49edfe30dffeaf051b98b4fe38b52629a0e836fc5 | wangweihao/ProgrammingErlangAnswer | sendMessage.erl | 编写一个环形计时测试。创建一个由N个进程组成的环 。
% 把一个消息沿着环发送M次,这样总共发送的消息是M*N。
记录不同的N和M值所花费的时间
% 用你熟悉的其他编程语言编写一个类似的程序,然后比较一下结果。
写一篇博客,把结果在网上发表出来 。
-module(sendMessage).
-export([start/2]).
% N 个进程, M 次
start(N, M) ->
sendstart(M, createProcess(N)).
createProcess(N) ->
% 创建 N 个进程
L = for(1, N, fun() -> spawn(fun() -> lo... | null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/12/3/sendMessage.erl | erlang | 把一个消息沿着环发送M次,这样总共发送的消息是M*N。
用你熟悉的其他编程语言编写一个类似的程序,然后比较一下结果。
N 个进程, M 次
创建 N 个进程
给第一个进程发送请求,开始绕环发送消息 | 编写一个环形计时测试。创建一个由N个进程组成的环 。
记录不同的N和M值所花费的时间
写一篇博客,把结果在网上发表出来 。
-module(sendMessage).
-export([start/2]).
start(N, M) ->
sendstart(M, createProcess(N)).
createProcess(N) ->
L = for(1, N, fun() -> spawn(fun() -> loop() end) end),
L.
sendstart(M, L) ->
Pid = getPid(1, L, M),
Pid ! {1, L, M, "... |
5965885ad3f6d56fe690632617809df0b210111fde7640727864eb75edce450f | orthecreedence/drakma-async | run.lisp | (in-package :drakma-async-test)
(in-suite drakma-async-test)
(defun run-tests () (run!))
| null | https://raw.githubusercontent.com/orthecreedence/drakma-async/3353e5cd8c14e40ac1f21e4065b07c75065b1500/test/run.lisp | lisp | (in-package :drakma-async-test)
(in-suite drakma-async-test)
(defun run-tests () (run!))
| |
86faa048186a8fdfe430e40333da42a3a3a8f332122b915201f0f6b859153f7e | Vortecsmaster/EmurgoAcademyPlutusExamples | Paths_JustValidators.hs | # LANGUAGE CPP #
# LANGUAGE NoRebindableSyntax #
# OPTIONS_GHC -fno - warn - missing - import - lists #
# OPTIONS_GHC -w #
module Paths_JustValidators (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Ex... | null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/3d2da9c5c83cd6226d6be023461cb778a6c97aa6/preVasil_V1/JustValidators/dist-newstyle/build/x86_64-linux/ghc-8.10.4.20210212/JustValidators-0.1.0.0/build/autogen/Paths_JustValidators.hs | haskell | # LANGUAGE CPP #
# LANGUAGE NoRebindableSyntax #
# OPTIONS_GHC -fno - warn - missing - import - lists #
# OPTIONS_GHC -w #
module Paths_JustValidators (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Ex... | |
837d911e5ebc58afed0ffb6d89463976e131dfc9b352f69510d638f9c62b9a3d | fyquah/hardcaml_zprize | generate.ml | open Core
open Hardcaml
open Msm_pippenger
let command_top =
Command.basic
~summary:"Generate MSM pippenger top level"
[%map_open.Command
let _ = return () in
fun () ->
let module Top = Top.Make (Config.Bls12_377) in
let module Circuit = Circuit.With_interface (Top.I) (Top.O) in
... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/zprize/msm_pippenger/hardcaml/bin/generate.ml | ocaml | open Core
open Hardcaml
open Msm_pippenger
let command_top =
Command.basic
~summary:"Generate MSM pippenger top level"
[%map_open.Command
let _ = return () in
fun () ->
let module Top = Top.Make (Config.Bls12_377) in
let module Circuit = Circuit.With_interface (Top.I) (Top.O) in
... | |
546a4149b769e32f08884ef623c1002be19aed40840b504c5c47facf857ab442 | furkan3ayraktar/clojure-polylith-realworld-example-app | interface.clj | (ns clojure.realworld.article.interface
(:require [clojure.realworld.article.core :as core]))
(defn article [auth-user slug]
(core/article auth-user slug))
(defn create-article! [auth-user article-input]
(core/create-article! auth-user article-input))
(defn update-article! [auth-user slug article-input]
(cor... | null | https://raw.githubusercontent.com/furkan3ayraktar/clojure-polylith-realworld-example-app/2f16552fb4e9a56e24e21795cbb038433085453c/components/article/src/clojure/realworld/article/interface.clj | clojure | (ns clojure.realworld.article.interface
(:require [clojure.realworld.article.core :as core]))
(defn article [auth-user slug]
(core/article auth-user slug))
(defn create-article! [auth-user article-input]
(core/create-article! auth-user article-input))
(defn update-article! [auth-user slug article-input]
(cor... | |
4aa66268899e0027aa5b7da97ae6e36dc5c28fab973832b386bb1fe33e2b3d5a | killme2008/carmine-sentinel | core_test.clj | (ns carmine-sentinel.core-test
(:require [clojure.test :refer :all]
[taoensso.carmine :as car]
[carmine-sentinel.core :refer :all]))
;;; NOTE:
;;; add the following to `redis.conf`:
;;; requirepass foobar
;;; NOTE:
;;; SENTINEL CONF `PORT` SHOULD BE DIFFERENT FOR EACH SENTINEL
;;; MAKE SURE... | null | https://raw.githubusercontent.com/killme2008/carmine-sentinel/64ff10ba70e726010cc4a30fe98bb3c4fff835a4/test/carmine_sentinel/core_test.clj | clojure | NOTE:
add the following to `redis.conf`:
requirepass foobar
NOTE:
SENTINEL CONF `PORT` SHOULD BE DIFFERENT FOR EACH SENTINEL
MAKE SURE TO REMOVE `myid` OR HARDCODE DIFFERENT IDS FOR EACH SENTINEL
NOTE:
Use different files for each sentinel
daemonize no
pidfile "/var/run/redis-sentinel.pid"
logfile ""
dir "/... | (ns carmine-sentinel.core-test
(:require [clojure.test :refer :all]
[taoensso.carmine :as car]
[carmine-sentinel.core :refer :all]))
> cat sentinel.conf
port 5000
sentinel monitor mymaster 127.0.0.1 6379 2
requirepass " foobar "
(def token "foobar")
(def host "127.0.0.1")
(def co... |
bc4a2a4e7a9ba06e6945e3df9e15164b5654a8f05c5f8df07dc8bba0c2f21c0e | scicloj/scicloj.ml | metamorph.clj | (ns scicloj.ml.template.metamorph
"This namespace contains functions, which operate on a metamorph context.
They all return the context as well.
So all functions in this namespace are metamorph compliant and can
be placed in a metamorph pipeline.
Most functions here are only manipulating the dataset, which ... | null | https://raw.githubusercontent.com/scicloj/scicloj.ml/74822932075e1575fe9779b0a165c0640b5d4740/template/scicloj/ml/template/metamorph.clj | clojure | (ns scicloj.ml.template.metamorph
"This namespace contains functions, which operate on a metamorph context.
They all return the context as well.
So all functions in this namespace are metamorph compliant and can
be placed in a metamorph pipeline.
Most functions here are only manipulating the dataset, which ... | |
85c03e36937533b56b0863db5f64886bf765546c0a3485d7857925e7c149a456 | jguhlin/ODG | ontologies_test.clj | (ns UTR-import.ontologies-test
(:use clojure.test
UTR-import.ontologies))
| null | https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/test/UTR_import/ontologies_test.clj | clojure | (ns UTR-import.ontologies-test
(:use clojure.test
UTR-import.ontologies))
| |
bf8849569e1131f8d9ce0e5e46f7290a603622a3b3171e7b092336ee301c270f | marigold-dev/deku | deku_repr.ml | module Prefix = struct
type prefix = string
type t = prefix
include Base58.Prefix
end
module With_b58 (P : sig
type t
val prefix : string
val to_raw : t -> string
val of_raw : string -> t option
end) =
struct
open P
let of_b58 string = Base58.simple_decode ~prefix ~of_raw string
let to_b58 t = B... | null | https://raw.githubusercontent.com/marigold-dev/deku/cdf82852196b55f755f40850515580be4fd9a3fa/deku-p/src/core/repr/deku_repr.ml | ocaml | TODO: this is dumb | module Prefix = struct
type prefix = string
type t = prefix
include Base58.Prefix
end
module With_b58 (P : sig
type t
val prefix : string
val to_raw : t -> string
val of_raw : string -> t option
end) =
struct
open P
let of_b58 string = Base58.simple_decode ~prefix ~of_raw string
let to_b58 t = B... |
7ceec6eaa486f61e6bc6685a9ad9a3e6467a6e1d2ef51fae497cfde94ef65736 | staticweb-io/staticweb-open-wp | user.clj | (ns io.staticweb.static-wp-daemon.user
(:require io.staticweb.static-wp-daemon.init-deploy
io.staticweb.static-wp-daemon.mysql
io.staticweb.static-wp-daemon.set-server-name
io.staticweb.static-wp-daemon.shutdown
io.staticweb.static-wp-daemon.util))
| null | https://raw.githubusercontent.com/staticweb-io/staticweb-open-wp/4ff0a51792f5c4b43364475f26aa0e0fb521f6a8/static-wp-daemon/src/io/staticweb/static_wp_daemon/user.clj | clojure | (ns io.staticweb.static-wp-daemon.user
(:require io.staticweb.static-wp-daemon.init-deploy
io.staticweb.static-wp-daemon.mysql
io.staticweb.static-wp-daemon.set-server-name
io.staticweb.static-wp-daemon.shutdown
io.staticweb.static-wp-daemon.util))
| |
94228f8af0902447704eaa34e73390f59b71411d1f635291fce72ec49a41fc22 | cram2/cram | minimization-one.lisp | Regression test - ONE for GSLL , automatically generated
;;
Copyright 2009
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundat... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/minimization-one.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test - ONE for GSLL , automatically generated
Copyright 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy o... |
566e293a5bd7723eee3101b8de26168b33edcc2e732e671fab92c3b2174940a6 | racket/drracket | main.rkt | #lang racket/base
(require "drracket.rkt")
(module test racket/base) | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/drracket/main.rkt | racket | #lang racket/base
(require "drracket.rkt")
(module test racket/base) | |
d30859816f31eaaaf7fd66aa5de50f23e29477b5011931689405b6912dedb8b3 | input-output-hk/hydra | BehaviorSpec.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
module Hydra.BehaviorSpec where
import Hydra.Prelude
import Test.Hydra.Prelude hiding (shouldBe, shouldNotBe, shouldReturn, shouldSatisfy)
import Control.Monad.Class.MonadAsync (Async, MonadAsync (async), cancel, forConcurrently_)
import Control.Monad.... | null | https://raw.githubusercontent.com/input-output-hk/hydra/54d6e4507fa4a67bb52a1507249e836e23e592bf/hydra-node/test/Hydra/BehaviorSpec.hs | haskell | Expect secondTx to be valid, but not applicable and stay pending
Expect a snapshot of the firstTx transaction
Expect a snapshot of the now unblocked secondTx
Expect secondTx to be valid, but not applicable and stay pending
If we wait too long, secondTx will expire
XXX: This is a bit cumbersome and maybe even inco... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
module Hydra.BehaviorSpec where
import Hydra.Prelude
import Test.Hydra.Prelude hiding (shouldBe, shouldNotBe, shouldReturn, shouldSatisfy)
import Control.Monad.Class.MonadAsync (Async, MonadAsync (async), cancel, forConcurrently_)
import Control.Monad.... |
206e98fe1fa6d89a1ba0344b8f0b0bff592b9650d043281acefc572f9433096b | zotonic/zotonic | zotonic_notifier_worker.erl | @author < >
2009 - 2017
%%
%% @doc Simple implementation of an observer/notifier. Relays events to observers of that event.
%% Also implements map and fold operations over the observers.
Copyright 2009 - 2017
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use th... | null | https://raw.githubusercontent.com/zotonic/zotonic/b4b823330e42dafefbba9b5382e23e119b6a723c/apps/zotonic_notifier/src/zotonic_notifier_worker.erl | erlang |
@doc Simple implementation of an observer/notifier. Relays events to observers of that event.
Also implements map and fold operations over the observers.
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 agree... | @author < >
2009 - 2017
Copyright 2009 - 2017
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_notifier_worker).
-author("Marc Worrell <>").
-behaviour(gen_server).
-include_lib("kernel/inclu... |
ca6949843c19469164e74f696043216a89020f4c8ff65199c64b781d320e3613 | sheyll/newtype-zoo | Completed.hs | -- | Indicate that something is `Completed`.
module NewtypeZoo.Completed
( Completed(Completed)
, _theCompleted
, theCompleted
) where
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
import Data.Bits (Bits,Fin... | null | https://raw.githubusercontent.com/sheyll/newtype-zoo/0e67717cbcd9233d9c26b6aacb4c6f8bba6ef5f7/src/NewtypeZoo/Completed.hs | haskell | | Indicate that something is `Completed`. | module NewtypeZoo.Completed
( Completed(Completed)
, _theCompleted
, theCompleted
) where
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
import Data.Bits (Bits,FiniteBits)
import Data.Copointed (Co... |
30fc50702702d0197d2f7937038723e5befc8ed1870b27ee98f4e854cd4bc00b | zalando/friboo | log.clj | (ns org.zalando.stups.friboo.log
(:require [clojure.tools.logging :as clojure-logging]
[cheshire.core :as json]
loads joda datetime
[io.sarnowski.swagger1st.parser]))
(defn format-value
"Formats dynamic information for logs."
[value]
(str "[" (json/encode value) "]"))
(defn format-... | null | https://raw.githubusercontent.com/zalando/friboo/5e312365a57535b0197fd787bd95ffafe6c3f4aa/src/org/zalando/stups/friboo/log.clj | clojure | TODO for now audit goes to info as well | (ns org.zalando.stups.friboo.log
(:require [clojure.tools.logging :as clojure-logging]
[cheshire.core :as json]
loads joda datetime
[io.sarnowski.swagger1st.parser]))
(defn format-value
"Formats dynamic information for logs."
[value]
(str "[" (json/encode value) "]"))
(defn format-... |
908d22ff492ca5237a6486ab0ad9dfffca1475e65af8ab67a5a14f0076be162f | hverr/haskell-obd | OBD.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE Rank2Types #-}
| Send OBD requests to the connection and return a quantity .
module System.Hardware.ELM327.Connection.OBD where
import Control.Lens (Iso', re, (^.))
import Control.Monad.Except (throwError)
import Control.Monad.IO.Class (MonadI... | null | https://raw.githubusercontent.com/hverr/haskell-obd/f7de2d2c392ad491671fda60552563af181c15dd/src/System/Hardware/ELM327/Connection/OBD.hs | haskell | # LANGUAGE Rank2Types #
| Get the engine coolant temperature.
| Get the engine fuel rate.
| Get the engine RPM.
| Get the intake air temperature.
| Get the intake manifold absolute pressure
| Get mass air flow rate.
| Get throttle position.
| Get vehicle speed. | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
| Send OBD requests to the connection and return a quantity .
module System.Hardware.ELM327.Connection.OBD where
import Control.Lens (Iso', re, (^.))
import Control.Monad.Except (throwError)
import Control.Monad.IO.Class (MonadIO)
import Numeric.Units.Dim... |
5af460b9dab804630ad83117f629f9dd798da601d8bf922e18dbeb81ab815911 | phylogeography/spread | custom_map.clj | (ns api.models.custom-map
(:require [hugsql.core :as hugsql]
[taoensso.timbre :as log]))
These are just not to upset
(declare upsert-custom-map)
(declare get-custom-map)
(declare delete-custom-map)
(hugsql/def-db-fns "sql/custom_map.sql")
(hugsql/def-sqlvec-fns "sql/custom_map.sql")
TODO : remov... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/clj/api/models/custom_map.clj | clojure | (ns api.models.custom-map
(:require [hugsql.core :as hugsql]
[taoensso.timbre :as log]))
These are just not to upset
(declare upsert-custom-map)
(declare get-custom-map)
(declare delete-custom-map)
(hugsql/def-db-fns "sql/custom_map.sql")
(hugsql/def-sqlvec-fns "sql/custom_map.sql")
TODO : remov... | |
c713618b481d7565aa91828ba06e960197afe933a2d9b96630e19ca0db555893 | emqx/minirest | example_crash_api.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/minirest/c3be47c671c76d6685e35820b8ed51b5ba96dfae/examples/example_openapi/src/example_crash_api.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(example_crash_api).
-behavior(minirest_api).
-export([api_spec/0]).
-export([hello/2])... |
9cee9561072fd5bf36cc1af0f219fa8f48c96ff44d9883d9ae7f663b1cd94d2e | input-output-hk/plutus | Misc.hs | module Benchmarks.Misc (makeBenchmarks) where
import Common
import Generators
import PlutusCore
import Criterion.Main
import System.Random (StdGen)
mkPairData takes two ' Data ' arguments d1 and d2 and creates the pair
( ) . This should n't depend on the size of the argumnts , but we 'll run it
-- with a se... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/plutus-core/cost-model/budgeting-bench/Benchmarks/Misc.hs | haskell | with a selection of different sizes just to make sure. | module Benchmarks.Misc (makeBenchmarks) where
import Common
import Generators
import PlutusCore
import Criterion.Main
import System.Random (StdGen)
mkPairData takes two ' Data ' arguments d1 and d2 and creates the pair
( ) . This should n't depend on the size of the argumnts , but we 'll run it
benchMkPairD... |
4ec435076c99c8b4ceae4625a3d6c9d6aa54f21691a801bd58ed5ee6b49e0d5a | mark-watson/loving-common-lisp | gui.lisp | ;;----------------------------------------------------------------------------
;; To try it, compile and load this file and then execute:
;;
( )
;;
;;----------------------------------------------------------------------------
Copyright ( c ) 2020 . All rights reserved .
;;----------------------------------... | null | https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/kgn/gui.lisp | lisp | ----------------------------------------------------------------------------
To try it, compile and load this file and then execute:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
capi:display-pane ;; capi:tex... | ( )
Copyright ( c ) 2020 . All rights reserved .
(in-package #:kgn)
(defvar *width* 1370)
(defvar *best-width* 1020)
(defvar *show-info-pane* t)
(defvar *pane2-message*
"In order to process your query a series of SPARQL queries will be formed based on the query. These generated SPARQL queries will be s... |
62304ca399e31a70e8892a15b36594ff57342e7acbb4334b7442c930403daf33 | pfdietz/ansi-test | user-homedir-pathname.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Dec 11 22:26:24 2004
;;;; Contains: Tests of USER-HOMEDIR-PATHNAME
(deftest user-homedir-pathname.1
(let ((pn (user-homedir-pathname)))
(notnot pn))
t)
(deftest user-homedir-pathname.2
(let* ((pn-list (multiple-value-list (user-homedir-pathname)))
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/environment/user-homedir-pathname.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of USER-HOMEDIR-PATHNAME
(deftest user-homedir-pathname.6
(let* ((pn (user-homedir-pathname))
(host (pathname-host pn)))
(or (not host)
(equalt pn (user-homedir-pathname host))))
t) | Author :
Created : Sat Dec 11 22:26:24 2004
(deftest user-homedir-pathname.1
(let ((pn (user-homedir-pathname)))
(notnot pn))
t)
(deftest user-homedir-pathname.2
(let* ((pn-list (multiple-value-list (user-homedir-pathname)))
(pn (first pn-list)))
(values
(length pn-list)
... |
f8014ebbe8474f927ef9059a704148f251c8bf115e431d714852854610f51c4e | amnh/poy5 | build.mli | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/build.mli | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
81cd35f38e8ca0a40d5c37130a6c64dd37ff4a236f9a5cbe6afef25ba0fffd3e | jacius/lispbuilder | explosion.lisp |
(in-package #:sdl-examples)
;; Explosion textures from;
;;
(defun explosion ()
(sdl:with-init ()
(sdl:window 200 100 :title-caption "Explosion" :icon-caption "Explosion")
(setf (sdl:frame-rate) 25)
(let* ((sprite-sheet (sdl:load-image (merge-pathnames "ani2.bmp" sdl:*default-asset-path*)))
... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/examples/explosion.lisp | lisp | Explosion textures from;
Create the list of cells
Each 'cell' is the x/y width/height of an image in the sprite sheet
Set the the cells for the sprite-sheet
Draw sprite in the middle of the window
Loop over each cell
This version will create separate surfaces instead of using an index into the sprite sheet.
... |
(in-package #:sdl-examples)
(defun explosion ()
(sdl:with-init ()
(sdl:window 200 100 :title-caption "Explosion" :icon-caption "Explosion")
(setf (sdl:frame-rate) 25)
(let* ((sprite-sheet (sdl:load-image (merge-pathnames "ani2.bmp" sdl:*default-asset-path*)))
(sprite-cells (loop for y f... |
9c8bab73b43b868149689b26c449306ef606d5043b58778d28cac83c2934bce9 | Eonblast/Scalaxis | mgmt_server.erl | 2007 - 2011 Zuse Institute Berlin
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
di... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/mgmt_server.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
purpose is to give new scalaris nodes a list of nodes already
-module(mgmt_server).
-author('').
-vsn('$Id$').... |
a2233794dc8d598ba543bd22f9856e7b5ccc774674e6f5594ad2d5632ebd38a0 | metaocaml/ber-metaocaml | t080-gtint.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
if 0 > 0 then raise Not_found;;
*
0 CONSTINT 42
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t080-gtint.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
if 0 > 0 then raise Not_found;;
*
0 CONSTINT 42
... | |
90d9f01216bf9c3886e2ce9692d2456e60b7e5ff4a4f59a3ea121a61903f106f | ajhc/ajhc | SelfTest.hs | # LANGUAGE TemplateHaskell #
import Data.Monoid
import Data.List(sort,nub)
import Control.Monad
import System.IO
import Test.Framework.TH
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
import Test.HUnit
import qualified Data.Set as Set
import qualified Data.List... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/selftest/SelfTest.hs | haskell | xxx need?
strings = [ "foo", "foobar", "baz", "", "bob"]
print $ map packString strings
print $ sort strings
pshash "Hello"
c = variant ( fromEnum c ` rem ` 4 )
coarbitrary c = variant (fromEnum c `rem` 4)
} | # LANGUAGE TemplateHaskell #
import Data.Monoid
import Data.List(sort,nub)
import Control.Monad
import System.IO
import Test.Framework.TH
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
import Test.HUnit
import qualified Data.Set as Set
import qualified Data.List... |
709d8725ea828b124595bb7098c38c40f78e52b2743813ab16455c3f71b7c3c0 | chrisdone/prana | ST.hs | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples , RankNTypes #
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ST
Copyright : ( c ) The University of Glasgow , 1992 - 2002
-- License : see lib... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/GHC/ST.hs | haskell | # OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : GHC.ST
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
---------------------------------------------------------------------------
* Unsafe functions
The stat... | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples , RankNTypes #
Copyright : ( c ) The University of Glasgow , 1992 - 2002
Portability : non - portable ( GHC Extensions )
The ' ST ' Monad .
module GHC.ST (
ST(..), STret(..), STRep,
fixST, runST,
liftST,... |
7b8a46f4abc1a467784d8069a75fe1580de1fb58a00152896724356c2a063ff8 | tibbe/event | RunTests.hs | import Network.Socket (withSocketsDo)
import Test.Framework (defaultMain)
import qualified Array
import qualified Manager
import qualified PSQ
import qualified Regression
main :: IO ()
main = withSocketsDo $ defaultMain tests
where tests = [ Array.tests
, Manager.tests
, PSQ.tests
... | null | https://raw.githubusercontent.com/tibbe/event/2ca43e49327aa7854396b800ff4184d8b00a69f0/tests/RunTests.hs | haskell | import Network.Socket (withSocketsDo)
import Test.Framework (defaultMain)
import qualified Array
import qualified Manager
import qualified PSQ
import qualified Regression
main :: IO ()
main = withSocketsDo $ defaultMain tests
where tests = [ Array.tests
, Manager.tests
, PSQ.tests
... | |
181cca865c4a409559cf8a3e612a13682d246c09c3f785e317d595b905c9407d | puppetlabs/puppetdb | events_test.clj | (ns puppetlabs.puppetdb.query.events-test
(:require [clojure.set]
[clojure.test :refer :all]
[puppetlabs.puppetdb.query :as query]
[puppetlabs.kitchensink.core :as kitchensink]
[puppetlabs.puppetdb.examples.reports :refer [reports]]
[puppetlabs.puppetdb.test... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/query/events_test.clj | clojure | Begin tests | (ns puppetlabs.puppetdb.query.events-test
(:require [clojure.set]
[clojure.test :refer :all]
[puppetlabs.puppetdb.query :as query]
[puppetlabs.kitchensink.core :as kitchensink]
[puppetlabs.puppetdb.examples.reports :refer [reports]]
[puppetlabs.puppetdb.test... |
fbefb43bc1e32befdcb9c9fe32f8665ac225d620323fc3c1ebeb42e1c819eaee | wlitwin/graphv | graphv_anim_tests.ml | open Graphv_anim
let string_of_status = function
| Done -> "Done"
| Canceled -> "Canceled"
;;
let update str t =
Printf.printf "%s %.2f\n%!" str t
;;
let complete str id status =
Printf.printf "%s %d %s\n%!" str id (string_of_status status)
;;
let print_end_results ?(expected_active=0) ?(expected_pe... | null | https://raw.githubusercontent.com/wlitwin/graphv/51a82c2f10c7d832b6204fede084176206e30b7e/graphv_anim/test/graphv_anim_tests.ml | ocaml | open Graphv_anim
let string_of_status = function
| Done -> "Done"
| Canceled -> "Canceled"
;;
let update str t =
Printf.printf "%s %.2f\n%!" str t
;;
let complete str id status =
Printf.printf "%s %d %s\n%!" str id (string_of_status status)
;;
let print_end_results ?(expected_active=0) ?(expected_pe... | |
d6c69d4a7699aa81d5560670968ed2815cbbadf659d92c81f630401ea8086bc6 | anuragsoni/snabbdom-ml | main_tyxml.ml | open Brr
open Snabbdom_tyxml
module Date = struct
let date = Jv.get Jv.global "Date"
let now () = Jv.new' date [||]
let to_locale_time_string date = Jv.call date "toLocaleTimeString" [||] |> Jv.to_string
end
let () =
let container =
match Document.find_el_by_id G.document (Jstr.v "app") with
| Some v ... | null | https://raw.githubusercontent.com/anuragsoni/snabbdom-ml/1ce151b0989d4795ee02666376c09ab27b52ee71/example/main_tyxml.ml | ocaml | open Brr
open Snabbdom_tyxml
module Date = struct
let date = Jv.get Jv.global "Date"
let now () = Jv.new' date [||]
let to_locale_time_string date = Jv.call date "toLocaleTimeString" [||] |> Jv.to_string
end
let () =
let container =
match Document.find_el_by_id G.document (Jstr.v "app") with
| Some v ... | |
360dd32dbe6aae23d25944e53cdf1487578e47b7c9e0326c9786d710e82c7055 | Viasat/halite | halite_analysis.clj | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite-analysis
"Public API for analyzing halite expressions"
(:require [com.viasat.halite.analysis :as analysis]
[com.viasat.halite.envs :as envs]
[com.viasat.halite.type-check :as type-check]
... | null | https://raw.githubusercontent.com/Viasat/halite/eea72acc1cbb658e223d6e716029d2e6f107e61f/src/com/viasat/halite_analysis.clj | clojure | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite-analysis
"Public API for analyzing halite expressions"
(:require [com.viasat.halite.analysis :as analysis]
[com.viasat.halite.envs :as envs]
[com.viasat.halite.type-check :as type-check]
... | |
397776d6920005ff635122e1522c20cec8ba715792d4cc8140e26f94f21423fa | foreverbell/project-euler-solutions | 28.hs | solve n = 4 * part1 - 6 * part2 - 3 where
part1 = sum [x^2 | x <- [1, 3 .. n]]
part2 = sum [2, 4 .. n - 1]
main = print $ solve 1001
| null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/28.hs | haskell | solve n = 4 * part1 - 6 * part2 - 3 where
part1 = sum [x^2 | x <- [1, 3 .. n]]
part2 = sum [2, 4 .. n - 1]
main = print $ solve 1001
| |
e76977e2e24c12c16057c1fc8babaf24238e7e937981a9e2e615588f8a4be843 | binaryage/cljs-oops | ocall_static.cljs | (ns oops.arena.ocall-static
(:require [oops.core :refer [ocall]]
[oops.tools :refer [init-arena-test! done-arena-test! testing]]))
(init-arena-test!)
; we are compiling under advanced mode
(testing "simple static ocall"
(ocall #js {"f" (fn [] 42)} "f" "p1" "p2"))
(testing "retargeted static ocall"
... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/arena/oops/arena/ocall_static.cljs | clojure | we are compiling under advanced mode | (ns oops.arena.ocall-static
(:require [oops.core :refer [ocall]]
[oops.tools :refer [init-arena-test! done-arena-test! testing]]))
(init-arena-test!)
(testing "simple static ocall"
(ocall #js {"f" (fn [] 42)} "f" "p1" "p2"))
(testing "retargeted static ocall"
(ocall #js {"a" #js {"f" (fn [] 42)}} ... |
de20b43083156d90cfff43f7d3d662ee35fd42f9fb907f97aa2a5db3a980553c | takikawa/racket-ppa | bundle.rkt | #lang racket/base
(require (only-in '#%linklet primitive->compiled-position)
racket/set
compiler/zo-structs
"run.rkt"
"name.rkt"
"linklet.rkt")
(provide wrap-bundle)
(define (wrap-bundle linkl-mode body internals lifts excluded-module-mpis get-merge-info name)
(define-va... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/compiler-lib/compiler/demodularizer/bundle.rkt | racket | exports
exports
another for selecting the slots that are externally referenced
mpis (where the selection vector matches the `import-keys` order).
If all import keys are primitive modules, then we just make
a vector with those specs in order, but if there's a more
vector to hold intermediate mpi constructions.
W... | #lang racket/base
(require (only-in '#%linklet primitive->compiled-position)
racket/set
compiler/zo-structs
"run.rkt"
"name.rkt"
"linklet.rkt")
(provide wrap-bundle)
(define (wrap-bundle linkl-mode body internals lifts excluded-module-mpis get-merge-info name)
(define-va... |
8a1a966d5ccb7d6e1a9dd373284adcb0880b84c940a14648d68ef91254760717 | CRogers/obc | gBin.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/lablgtk/gBin.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
a11f3a8872234e5c9a5d1146ffe4017f2808406149305581b3b3743eada95840 | racket/deinprogramm | record.rkt | #lang scheme/base
(provide define-record)
(require scheme/promise
mzlib/struct
mzlib/pconvert-prop
mzlib/pretty
deinprogramm/signature/signature
deinprogramm/signature/signature-german
deinprogramm/signature/signature-syntax
(only-in deinprogramm/quickcheck/quickcheck arbitrary-record arbi... | null | https://raw.githubusercontent.com/racket/deinprogramm/bc8d8d0264ebc4b87878c2d0a1c5c28dfbdf7c3f/deinprogramm/deinprogramm/sdp/record.rkt | racket | use a different name for the value binding, but
make sure the stepper prints the one from the d-r-p form
support `signature'
again, with properties
the signature might be used in the definitions, hence this ordering
FIXME: duplicate from primitives.rkt
nullary case | #lang scheme/base
(provide define-record)
(require scheme/promise
mzlib/struct
mzlib/pconvert-prop
mzlib/pretty
deinprogramm/signature/signature
deinprogramm/signature/signature-german
deinprogramm/signature/signature-syntax
(only-in deinprogramm/quickcheck/quickcheck arbitrary-record arbi... |
92f4ea205b4fa034d725718cc6a4f85ebf52cc0605bb8f89e05ae19c1a65b867 | uwiger/gproc | gproc_ps.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% --------------------------------------------------
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License a... | null | https://raw.githubusercontent.com/uwiger/gproc/3737f2b958a5908d7a3870046ae162c5b9bf971c/src/gproc_ps.erl | erlang | --------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@author < >... |
396f814812b3f4c2e1c8a518625bc74174192711947acc110e18d28b828cb52c | srid/ema | Ex05_MultiRoute.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE UndecidableInstances #
| Demonstration of ` MultiRoute ` .
module Ema.Example.Ex05_MultiRoute where
import Ema
import Ema.Example.Common (tailwindLayout)
import Ema.Example.Ex00_Hello qualified as Ex00
import Ema.Example.Ex01_Basic qualified as Ex01
import Ema.Example.Ex02... | null | https://raw.githubusercontent.com/srid/ema/61faae56aa0f3c6ca815f344684cc566f6341662/ema-examples/src/Ema/Example/Ex05_MultiRoute.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE UndecidableInstances #
| Demonstration of ` MultiRoute ` .
module Ema.Example.Ex05_MultiRoute where
import Ema
import Ema.Example.Common (tailwindLayout)
import Ema.Example.Ex00_Hello qualified as Ex00
import Ema.Example.Ex01_Basic qualified as Ex01
import Ema.Example.Ex02_Clock qualified as Ex02
import ... |
4c38262bd09dfbe409ab86cf23e91baff87369e574f4906ac70aa2cee27b19bd | cnuernber/dtype-next | for.clj | (ns tech.v3.parallel.for)
(defmacro doiter
[varname iterable & body]
`(let [~varname ~iterable]
~@body))
(defmacro parallel-for
[idx-var n-elems & body]
`(let [~idx-var ~n-elems]
~@body))
| null | https://raw.githubusercontent.com/cnuernber/dtype-next/4e43212942aafa0145640cf6b655bb83855f567d/resources/clj-kondo.exports/cnuernber/dtype-next/tech/v3/parallel/for.clj | clojure | (ns tech.v3.parallel.for)
(defmacro doiter
[varname iterable & body]
`(let [~varname ~iterable]
~@body))
(defmacro parallel-for
[idx-var n-elems & body]
`(let [~idx-var ~n-elems]
~@body))
| |
4694a93b37f8868dd462e82d12cbad690214d1966462868c7c03d1a7f50e57af | clj-easy/graalvm-clojure | project.clj | (defproject component "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[com.stuartsierra/component "1.0.0"]]
:main simple.main
:uberjar-name "simple-main.jar"
:profiles {:uberjar {:aot :all
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}
... | null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/component/project.clj | clojure | (defproject component "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[com.stuartsierra/component "1.0.0"]]
:main simple.main
:uberjar-name "simple-main.jar"
:profiles {:uberjar {:aot :all
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}
... | |
a92e9db1b224bc92a6622ae0a6f14b2c757c855df869963270c5bcb8fd786a88 | raml-org/api-modeling-framework | schema.cljc | (ns api-modeling-framework.model.schema
(:require [api-modeling-framework.model.document :as document]
[api-modeling-framework.model.domain :as domain]))
| null | https://raw.githubusercontent.com/raml-org/api-modeling-framework/34bb3b6c3e3f91b775e27f8e389e04eb2c36beb7/src/api_modeling_framework/model/schema.cljc | clojure | (ns api-modeling-framework.model.schema
(:require [api-modeling-framework.model.document :as document]
[api-modeling-framework.model.domain :as domain]))
| |
0eed33fb877e07115c89ae19a21854eb347b83bb51020eba97a8e0a783764c9f | dyzsr/ocaml-selectml | core_array_reduced_ok.ml | (* TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
type sexp = A of string | L of sexp list
type 'a t = 'a array
let _ = fun (_ : 'a t) -> ()
let array_of_sexp _ _ = [| |]
let sexp_of_array _ _ = A "foo"
let sexp_of_int _ = A "42"
let int_of_sexp _ = 42
let t_of_s... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-misc-bugs/core_array_reduced_ok.ml | ocaml | TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
|
type sexp = A of string | L of sexp list
type 'a t = 'a array
let _ = fun (_ : 'a t) -> ()
let array_of_sexp _ _ = [| |]
let sexp_of_array _ _ = A "foo"
let sexp_of_int _ = A "42"
let int_of_sexp _ = 42
let t_of_sexp : 'a . (sexp -> 'a) -> sexp -> 'a t=
let _tp_loc = "core_array.ml.t" in
fun _of_a -> fun t ->... |
c2dc5034097722b3f629d91c4edd118dfd8ab0dd8d1dabe1702a046f5b4a3a57 | stwind/ectl | ectl_sysinfo.erl | -module(ectl_sysinfo).
-export([run/1]).
-include("ectl.hrl").
%% ===================================================================
%% Public
%% ===================================================================
run(Opts) ->
ecli:start_node(ectl_lib:arg(cookie, Opts)),
Node = list_to_atom(ecli:binding(no... | null | https://raw.githubusercontent.com/stwind/ectl/056adbcacdf264502d0f88e9e6171a708ba6c875/src/ectl_sysinfo.erl | erlang | ===================================================================
Public
===================================================================
===================================================================
Private
=================================================================== | -module(ectl_sysinfo).
-export([run/1]).
-include("ectl.hrl").
run(Opts) ->
ecli:start_node(ectl_lib:arg(cookie, Opts)),
Node = list_to_atom(ecli:binding(node, Opts)),
Num = ecli:opt(num, Opts),
Interval = ecli:opt(interval, Opts) * 1000,
ectl_lib:load_recon(Node),
Res = rpc:call(Node, recon... |
d58136dc6d16ffce2e6825cb2b930b40ee81f91406c92380a9d5380f6826d532 | haskell-opengl/GLUT | Font.hs |
Font.hs ( adapted from font.c which is ( c ) Silicon Graphics , Inc )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
Draws some text in a bitmapped font . Uses bitmap and other pixel routines... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/Font.hs | haskell | Everything above this line could be in a library
that defines a font. To make it work, you've got
to call makeRasterFont before you start making
calls to printString.
resolve overloading, not needed in "real" programs
Open window with initial window size, title bar,
RGBA display mode, and handle input events. |
Font.hs ( adapted from font.c which is ( c ) Silicon Graphics , Inc )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
Draws some text in a bitmapped font . Uses bitmap and other pixel routines... |
3593b43d4d30e0e31d478847e2391885c8c931dbd03a417fa46e735fa2c1dc68 | waddlaw/TAPL | Eval.hs | {-# LANGUAGE OverloadedStrings #-}
module B.Eval where
import Language.B.Eval
import Language.B.Example
import Language.B.Type
import RIO
import Test.Tasty.Hspec
spec_eval :: Spec
spec_eval =
describe "p25-33: 3.5 Evaluation" $ do
it "definition 3.5.1" $ do
let input = TmIf TmTrue TmTrue (TmIf TmFalse Tm... | null | https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/bool/test/B/Eval.hs | haskell | # LANGUAGE OverloadedStrings # |
module B.Eval where
import Language.B.Eval
import Language.B.Example
import Language.B.Type
import RIO
import Test.Tasty.Hspec
spec_eval :: Spec
spec_eval =
describe "p25-33: 3.5 Evaluation" $ do
it "definition 3.5.1" $ do
let input = TmIf TmTrue TmTrue (TmIf TmFalse TmFalse TmFalse)
eval input `sh... |
ecb49007e46d5254fbfe57a6f43c93867eb5fe67c77d0e2cab5b2a061e1cd89c | openbadgefactory/salava | routes.cljs | (ns salava.profile.ui.routes
(:require [salava.core.ui.layout]
[salava.core.ui.helper :refer [base-path path-for]]
[salava.user.ui.profile :as profile]
[salava.core.i18n :as i18n :refer [t]]
[salava.page.ui.my :as page]
[salava.profile.ui.block :as block]
... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/profile/ui/routes.cljs | clojure | (ns salava.profile.ui.routes
(:require [salava.core.ui.layout]
[salava.core.ui.helper :refer [base-path path-for]]
[salava.user.ui.profile :as profile]
[salava.core.i18n :as i18n :refer [t]]
[salava.page.ui.my :as page]
[salava.profile.ui.block :as block]
... | |
dc5452efb9cd60562cb204c7097b2e0c0d93a73817864e526d2af262204695d3 | Tritlo/spectacular | EqualitySaturation.hs | {-# LANGUAGE OverloadedStrings #-}
module Application.EqualitySaturation (
At (..)
, UseVarAt (..)
, useVar
, maxSupportedInt
, nodeModEcs
, modEcs
, varPath
, copyEnvToChild
, copyEnvToChildren
, copyLiftedEnvToChild
) where
import Data.List ( (\\) )
import Data.Text ( Tex... | null | https://raw.githubusercontent.com/Tritlo/spectacular/00621f4f0f03e5d0afea3c730434a8842e473546/src/Application/EqualitySaturation.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------
----------------------------------------------------------
-------------------- Lambda terms ------------------------
----------------------------------------------------------
----------------
---- ECTA utilities
----------------
-------... |
module Application.EqualitySaturation (
At (..)
, UseVarAt (..)
, useVar
, maxSupportedInt
, nodeModEcs
, modEcs
, varPath
, copyEnvToChild
, copyEnvToChildren
, copyLiftedEnvToChild
) where
import Data.List ( (\\) )
import Data.Text ( Text )
import qualified Data.Text as T... |
c1acadddedc359028ddbdf8dc4ff33b53dbf46c36586020c918a1036c8129417 | tek/ribosome | Input.hs | -- |Functions for simulating user input in tests.
module Ribosome.Api.Input where
import Conc (withAsync_)
import qualified Polysemy.Time as Time
import Time (MilliSeconds, NanoSeconds, convert)
import Ribosome.Host.Api.Data (nvimInput, nvimReplaceTermcodes, nvimFeedkeys)
import Ribosome.Host.Effect.Rpc (Rpc)
|Sen... | null | https://raw.githubusercontent.com/tek/ribosome/800642404ee8bf6e1d563ad3440d3e191e5be62d/packages/ribosome/lib/Ribosome/Api/Input.hs | haskell | |Functions for simulating user input in tests.
Uses @nvim_input@.
Uses @nvim_feedkeys@. | module Ribosome.Api.Input where
import Conc (withAsync_)
import qualified Polysemy.Time as Time
import Time (MilliSeconds, NanoSeconds, convert)
import Ribosome.Host.Api.Data (nvimInput, nvimReplaceTermcodes, nvimFeedkeys)
import Ribosome.Host.Effect.Rpc (Rpc)
|Send a list of character sequences as user input to N... |
d49f636d551be13d6a12c3210e1e943a3f13a313d3103e0ee317fc0734de94fd | nibbula/yew | tr-cmds.lisp | ;;;
;;; tr-cmds.lisp - Commands for tr.
;;;
(in-package :tr)
(lish:defcommand tr
((set1 string :help "Set of characters to translate from.")
(set2 string :help "Set of characters to translate to.")
(files input-stream-or-filename :help "Input file or stream.")
(help boolean :long-arg "help" :help "Show the... | null | https://raw.githubusercontent.com/nibbula/yew/a62473dae637fb33a92aa75f260bf77b34cdbcfd/los/tr-cmds.lisp | lisp |
tr-cmds.lisp - Commands for tr.
End |
(in-package :tr)
(lish:defcommand tr
((set1 string :help "Set of characters to translate from.")
(set2 string :help "Set of characters to translate to.")
(files input-stream-or-filename :help "Input file or stream.")
(help boolean :long-arg "help" :help "Show the help."))
"Translate characters."
(when ... |
c12c08c2e5f171142c5a6c5a307090c8b2f935128d5e565f275fdfb20f0ad2dc | krukow/calabash-script | ext.cljs | (ns calabash-script.ext)
(comment
js/UIAElementArray
(-seq [this]
(prn "Array")
(prn this)
(if (zero? (.-length this))
nil
(.toArray this))))
| null | https://raw.githubusercontent.com/krukow/calabash-script/7e54beab5aa83087c7b52a55eca3d1828d2d0f36/src/cljs/calabash_script/ext.cljs | clojure | (ns calabash-script.ext)
(comment
js/UIAElementArray
(-seq [this]
(prn "Array")
(prn this)
(if (zero? (.-length this))
nil
(.toArray this))))
| |
ea2343f528b124ce2b3a9fbd7270e19353a6fbd77bd98943e1f597c7f14cdf9e | chrisdone/ircbrowse | Pagination.hs | # LANGUAGE RecordWildCards #
-- | Data pagination.
module Data.Pagination where
import Data.Default
import Data.Maybe
import Safe
import Network.URI
import Network.URI.Params
-- | A pagination object, holds information about the name, total, per
-- page, current page, etc.
data Pagination = Pagination
{ pnTotal ... | null | https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/upstream/snap-app/src/Data/Pagination.hs | haskell | | Data pagination.
| A pagination object, holds information about the name, total, per
page, current page, etc.
| Get the page count of the pagination results. | # LANGUAGE RecordWildCards #
module Data.Pagination where
import Data.Default
import Data.Maybe
import Safe
import Network.URI
import Network.URI.Params
data Pagination = Pagination
{ pnTotal :: Integer
, pnPerPage :: Integer
, pnName :: String
, pnCurrentPage :: Integer
, pnShowDesc ::... |
bebcc1190918d3b03188312d787470053152e1beb375dd2a212e41d8f53e3ee5 | reflectionalist/S9fES | depth.scm | Scheme 9 from Empty Space , Function Library
By , 2009
; Placed in the Public Domain
;
; (depth list) ==> integer
;
; Compute the depth of a list.
;
Example : ( depth ' ( a ( b ( c d ( e ) ) ) ) ) = = > 4
(define (depth a)
(if (pair? a)
(+ 1 (apply max (map depth a)))
0))
| null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/depth.scm | scheme | Placed in the Public Domain
(depth list) ==> integer
Compute the depth of a list.
| Scheme 9 from Empty Space , Function Library
By , 2009
Example : ( depth ' ( a ( b ( c d ( e ) ) ) ) ) = = > 4
(define (depth a)
(if (pair? a)
(+ 1 (apply max (map depth a)))
0))
|
b6dff75f3ddc34430eb7133cf81e19a7a22519463851e0712c5a4c9ae645aee9 | simonmar/haskell-eXchange-2015 | DataCache.hs | Copyright ( c ) 2014 , Facebook , Inc.
-- All rights reserved.
--
This source code is distributed under the terms of a BSD license ,
-- found in the LICENSE file. An additional grant of patent rights can
be found in the PATENTS file .
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
# OPTIONS_G... | null | https://raw.githubusercontent.com/simonmar/haskell-eXchange-2015/3ae0e34a051201eb77721bee2e940ec1f764a0df/build/haxl2/Haxl/Core/DataCache.hs | haskell | All rights reserved.
found in the LICENSE file. An additional grant of patent rights can
# LANGUAGE RankNTypes #
| A cache mapping data requests to their results.
# SOURCE #
This works well because we only have to store the dictionaries for
a chain of thunks during repeated insertions.
^ Request
^ Result
| Lo... | Copyright ( c ) 2014 , Facebook , Inc.
This source code is distributed under the terms of a BSD license ,
be found in the PATENTS file .
# LANGUAGE ExistentialQuantification #
# OPTIONS_GHC -fno - warn - orphans #
module Haxl.Core.DataCache
( DataCache
, empty
, insert
, lookup
, showCache
) where
... |
e5a31c11699765d80dcba4db7844730855e11a6f469f80034f0507ef8d4fb223 | realworldocaml/book | file_selector.ml | open Import
module Predicate_with_id = struct
open Stdune
open Dune_sexp
type 'a t =
{ id : Dyn.t Lazy.t
; f : 'a Predicate.t
}
let compare x y = Dyn.compare (Lazy.force x.id) (Lazy.force y.id)
let equal x y = compare x y = Ordering.Eq
let hash t = Dyn.hash (Lazy.force t.id)
let to_dyn t... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/file_selector.ml | ocaml | open Import
module Predicate_with_id = struct
open Stdune
open Dune_sexp
type 'a t =
{ id : Dyn.t Lazy.t
; f : 'a Predicate.t
}
let compare x y = Dyn.compare (Lazy.force x.id) (Lazy.force y.id)
let equal x y = compare x y = Ordering.Eq
let hash t = Dyn.hash (Lazy.force t.id)
let to_dyn t... | |
aa6ca939ae7a0c361e50160c46c7727aa41cd93536cc661c595f4707ab6aed3e | pgj/mirage-kfreebsd | user_buffer.mli |
* Copyright ( c ) 2010 00336ea19fcb53de187740c490f764f4
* Copyright ( c ) 2011 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 ap... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/tcp/user_buffer.mli | ocaml |
* Copyright ( c ) 2010 00336ea19fcb53de187740c490f764f4
* Copyright ( c ) 2011 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 ap... | |
303cd0e219780d4f1a89572dca58adefbe545da4a3350bf3589aa288c5bc7864 | spawnfest/eep49ers | ssl_connection_sup.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/src/ssl_connection_sup.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1998 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ssl_connection_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_l... |
acf28e520513c8986cd85d288c91ea04bba33d8a103441066cce8741784fd35c | rescript-lang/rescript-compiler | cmjdump_main.ml | Copyright ( C ) 2017 , Authors of ReScript
*
* 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 versi... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/81a3dc63ca387b2af23fed297db283254ae3ab20/jscomp/cmij/cmjdump_main.ml | ocaml | start dumping | Copyright ( C ) 2017 , Authors of ReScript
*
* 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 versi... |
1dd1c3f776f0a408bfb2e7a55f2d31a805f07ca87b7a8952a01e1f6dd3dcbf39 | nikita-volkov/postgresql-binary | Time.hs | module PostgreSQL.Binary.Time where
import Data.Time.Calendar.Julian
import PostgreSQL.Binary.Prelude hiding (second)
# #
dayToPostgresJulian :: Day -> Integer
dayToPostgresJulian =
(+ (2400001 - 2451545)) . toModifiedJulianDay
# INLINEABLE postgresJulianToDay #
postgresJulianToDay :: Integral a => a -> Day
post... | null | https://raw.githubusercontent.com/nikita-volkov/postgresql-binary/406cb9a69890eaa92f5aa69092c93e95fc1e0c89/library/PostgreSQL/Binary/Time.hs | haskell | # INLINEABLE microsToTimeOfDay #
# INLINEABLE microsToPico #
# INLINEABLE microsToLocalTime #
# INLINEABLE localTimeToSecs #
# INLINEABLE utcToMicros #
According to
-datetime.html | module PostgreSQL.Binary.Time where
import Data.Time.Calendar.Julian
import PostgreSQL.Binary.Prelude hiding (second)
# #
dayToPostgresJulian :: Day -> Integer
dayToPostgresJulian =
(+ (2400001 - 2451545)) . toModifiedJulianDay
# INLINEABLE postgresJulianToDay #
postgresJulianToDay :: Integral a => a -> Day
post... |
4d53e39bbd6bbe3ca0a004553efa80fab38c00c93b80410a1bf14d07199b5189 | lopec/LoPEC | configparser_tests.erl | %%%-------------------------------------------------------------------
@author
%%% @doc
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(configparser_tests).
-include_lib("eunit/include/eunit.hrl").
configparser_test_() ->
{setup,
fun() -> {ok} end,
fun(_) ->... | null | https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/trunk/lib/common/test/configparser_tests.erl | erlang | -------------------------------------------------------------------
@doc
@end
------------------------------------------------------------------- | @author
-module(configparser_tests).
-include_lib("eunit/include/eunit.hrl").
configparser_test_() ->
{setup,
fun() -> {ok} end,
fun(_) -> {ok} end,
fun(_) ->
{inorder,
[
?_assertEqual({error, enoent},
configparser:read_confi... |
9213a31e0b596d1ece325be6b69e2ed436af34c4760390f19806dc01a01609e2 | shentufoundation/deepsea | opensc.ml | open Sast
open TranslateMinic
open Ast
type mode = AST | SAST (*| MINIC*) | BYTECODE
let usage () =
prerr_endline ( "usage: ./opensc.native program.sc (ast | sast | bytecode) \n");
exit 1
let main argv =
let open Backend.LanguageExt in
let open Backend.Datatypes in
let open Backend.Glue in
let open ... | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/OpenSC/src/opensc.ml | ocaml | | MINIC
| "minic" -> MINIC
print_endline (string_of_sprogram sprogram) in
| MINIC -> print_endline (show_genv minicAST) | open Sast
open TranslateMinic
open Ast
let usage () =
prerr_endline ( "usage: ./opensc.native program.sc (ast | sast | bytecode) \n");
exit 1
let main argv =
let open Backend.LanguageExt in
let open Backend.Datatypes in
let open Backend.Glue in
let open Backend.ASM in
let open Backend.DatatypesExt... |
7f6bf3f3aedee6eb81ea3d242653c06fac72e3f00ca8583164ef03e0fcb7d345 | gafiatulin/codewars | SeaSick.hs | Holiday V - SeaSick Snorkelling
--
module Kata (seaSick) where
import Data.List (group)
seaSick :: String -> String
seaSick s = if (<= length s) . (*5) . pred . length . group $ s then "No Problem" else "Throw Up"
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/SeaSick.hs | haskell | Holiday V - SeaSick Snorkelling
module Kata (seaSick) where
import Data.List (group)
seaSick :: String -> String
seaSick s = if (<= length s) . (*5) . pred . length . group $ s then "No Problem" else "Throw Up"
| |
7f4bb13c08c953511325d8a32c5c39e67fba85c2f0cfb2800fd4ce74b881c390 | janestreet/core_kernel | flags.mli | include Flags_intf.Flags (** @open *)
| null | https://raw.githubusercontent.com/janestreet/core_kernel/87a4ee54efbff370fc590f9fb767df9e2baae94a/flags/src/flags.mli | ocaml | * @open | |
a6ccb2c041fb3b977bb8b0ab175fbcbd978df4ea0f9425b1be4b6120b206f5b8 | mmottl/pure-fun | chp5.ml |
Original source code in SML from :
Purely Functional Data Structures
Cambridge University Press , 1998
Copyright ( c ) 1998 Cambridge University Press
Translation from SML to OCAML ( this file ):
Copyright ( C ) 1999 , 2000 , 2001
email :
www :
... | null | https://raw.githubusercontent.com/mmottl/pure-fun/0181eab7662f56cd54299362612198715537cddb/chp5.ml | ocaml | *********************************************************************
*********************************************************************
raises Empty if queue is empty
raises Empty if queue is empty
insert, inspect, and remove the front element
raises Empty if queue is empty
raises Empty if queue is empty
... |
Original source code in SML from :
Purely Functional Data Structures
Cambridge University Press , 1998
Copyright ( c ) 1998 Cambridge University Press
Translation from SML to OCAML ( this file ):
Copyright ( C ) 1999 , 2000 , 2001
email :
www :
... |
d89e77e6ba80e934a886c9c9f4fb89f3ae09ddf384933bf4abe7bd25d26f02b7 | racket/unix-socket | unix-socket.rkt | #lang racket/base
(require racket/port
racket/file
rackunit
racket/unix-socket
(only-in racket/private/unix-socket-ffi platform)
"common.rkt")
;; Commands for creating socket listeners
;; - netcat is commonly available, but cannot use Linux abstract namespace
- socat c... | null | https://raw.githubusercontent.com/racket/unix-socket/89007b9b5f2188a06ed656e0f2e4fa8d3472a085/unix-socket-test/tests/unix-socket/unix-socket.rkt | racket | Commands for creating socket listeners
- netcat is commonly available, but cannot use Linux abstract namespace
============================================================
connect tests
Test path-based socket
Test Linux abstract name socket
Uses socat to create a simple unix domain socket server
==============... | #lang racket/base
(require racket/port
racket/file
rackunit
racket/unix-socket
(only-in racket/private/unix-socket-ffi platform)
"common.rkt")
- socat can use Linux abstract namespace , but is less common
So use netcat for path test and socat for abstract - name test ... |
80869f0323a23ead3b7ed18361e6c9d4c5bd854daac271b90d6ecfc5b0efd9a4 | mzp/coq-ide-for-ios | leminv.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/tactics/leminv.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Inversion stored in lemmas
return... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : leminv.ml 13323 201... |
b4b0291038445dcade808b5e5e1529491871134e453f58e950ade9853d7d63ef | emqx/emqx | emqx_connector_jwt_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_connector/test/emqx_connector_jwt_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_connector_jwt_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("commo... |
7eaacffab642a023af2cdcf3eac5fb2b7315daf1adf65ae589c59edecd75b4b4 | zhongwencool/ecron | prop_ecron_basic_SUITE.erl | -module(prop_ecron_basic_SUITE).
-include_lib("ecron/include/ecron.hrl").
%%% Common Test includes
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
-export([all/0, suite/0, groups/0, init_per_suite/1, end_per_suite/1]).
-compile(export_all).
-define(NAME, ?MODULE).
suite() ->
... | null | https://raw.githubusercontent.com/zhongwencool/ecron/b3c6dce3f607ecccacfbe67ef77fe42facc862ac/test/prop_ecron_basic_SUITE.erl | erlang | Common Test includes | -module(prop_ecron_basic_SUITE).
-include_lib("ecron/include/ecron.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
-export([all/0, suite/0, groups/0, init_per_suite/1, end_per_suite/1]).
-compile(export_all).
-define(NAME, ?MODULE).
suite() ->
[{timetrap, {minutes, ... |
c17ffc5a031960530ebec20a2a0db635c3b75d3e8d3455eccc62fd895bba8bf5 | cardmagic/lucash | event.scm | Copyright ( c ) 1999 - 2001 by . See file COPYING .
;;; Extend the functions of the RTS
(define (next-sigevent pre-event type)
(if (not (sigevent? pre-event))
(error "pre-event is not an event"))
(rts-next-sigevent pre-event type eq?))
(define (next-sigevent-set pre-event set)
(if (not (sigevent? pre... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/event.scm | scheme | Extend the functions of the RTS | Copyright ( c ) 1999 - 2001 by . See file COPYING .
(define (next-sigevent pre-event type)
(if (not (sigevent? pre-event))
(error "pre-event is not an event"))
(rts-next-sigevent pre-event type eq?))
(define (next-sigevent-set pre-event set)
(if (not (sigevent? pre-event))
(error "pre-event is ... |
9b903296557d4211a78fc7a7cb99afbf480d39017af5770f6184dc6755f19e99 | brendanhay/amazonka | ResponseTimeRootCauseService.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/ResponseTimeRootCauseService.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
| A collection of fields identifying the service in a response time
warning.
| The account ID associated to the service.
| The path of root cause entities found on the service.
| A Boolean value indicating if the service is in... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Mo... |
998bb646e91817812ffa89708f4cb4251fdf8f65f102554f6f9f15ce072eb64d | frex-project/haskell-frex | Test.hs | module Main where
import System.Exit
import Control.Monad (liftM, when)
import Language.Haskell.TH (runQ, pprint, unType)
import Language.Haskell.TH.Syntax
import Data.PartiallyStatic
import Data.Monoid
import Data.CMonoid
import Data.Ring
import Data.BoolRing
import qualified Data.Char as Char
import qualified Printf... | null | https://raw.githubusercontent.com/frex-project/haskell-frex/23d66eb2f8b1eb21021100fbf3576e6bac2dd075/test/Test.hs | haskell | Running the unstaged version
catenations
catenations
With the partially-static printf and a custom residualization
function the generated code contains a single n-ary catenation,
equivalent to
| module Main where
import System.Exit
import Control.Monad (liftM, when)
import Language.Haskell.TH (runQ, pprint, unType)
import Language.Haskell.TH.Syntax
import Data.PartiallyStatic
import Data.Monoid
import Data.CMonoid
import Data.Ring
import Data.BoolRing
import qualified Data.Char as Char
import qualified Printf... |
d1d488a096c2aa0984c0324ea3dc8bae604f0d4eff50d67623d024deb8a0514c | danilkolikov/dfl | ToConstraint.hs | |
Module : Frontend . Desugaring . Initial .
Description : Desugaring of AST nodes to
Copyright : ( c ) , 2019
License : MIT
Desugaring of AST nodes to objects , representing
Module : Frontend.Desugaring.Initial.ToConstraint
Description : Desugaring of AST nodes to Cons... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Desugaring/Initial/ToConstraint.hs | haskell | |
Module : Frontend . Desugaring . Initial .
Description : Desugaring of AST nodes to
Copyright : ( c ) , 2019
License : MIT
Desugaring of AST nodes to objects , representing
Module : Frontend.Desugaring.Initial.ToConstraint
Description : Desugaring of AST nodes to Cons... | |
9be3f2659e971061ba77132e514f045fa9f408ab76d3976b648c44521c487cec | cojna/iota | RangeMulRangeSum.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Data.SegTree.RangeMulRangeSum where
import Data.Coerce
import Data.SegTree
import Data.Semigroup
instance (Num a) => MonoidAction (Dual (Product a)) (... | null | https://raw.githubusercontent.com/cojna/iota/a64e8c5e4dd4f92e5ed3fcd0413be94ef1108f9e/src/Data/SegTree/RangeMulRangeSum.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Data.SegTree.RangeMulRangeSum where
import Data.Coerce
import Data.SegTree
import Data.Semigroup
instance (Num a) => MonoidAction (Dual (Product a)) (... | |
ecb5a15396406b24f060b917cf95cea2ca879fe5ebe92e597fc9c4c71cc21f24 | shortishly/erlang-in-docker-from-scratch | eidfs_app.erl | Copyright ( c ) 2016 - 2022 < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distribute... | null | https://raw.githubusercontent.com/shortishly/erlang-in-docker-from-scratch/5dcf1b0caa72e16a454a4bebbc03897763078806/src/eidfs_app.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissi... | Copyright ( c ) 2016 - 2022 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(eidfs_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
try
{ok, Sup} = ... |
cb91f4172df15a227908449edd4716d57d52eda0690968a237879804a763dcca | kowainik/trial | Tomland.hs | # LANGUAGE ApplicativeDo #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Trial helpers for @tomland@.
Copyright: (c) 2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
Trial helpers for @tomland@.
-}
module Trial.Tomland
( trialCodec
... | null | https://raw.githubusercontent.com/kowainik/trial/1126f99749ae20ceb11df7750955b548e01b130a/trial-tomland/src/Trial/Tomland.hs | haskell | # LANGUAGE ApplicativeDo #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Trial helpers for @tomland@.
Copyright: (c) 2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
Trial helpers for @tomland@.
-}
module Trial.Tomland
( trialCodec
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.