_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 |
|---|---|---|---|---|---|---|---|---|
a42a07634f95003796f8ec16e1dd26f0472bf4e03f6e2a670994dfd76221e79d | typeable/compaREST | Header.hs | # OPTIONS_GHC -Wno - orphans #
module Data.OpenApi.Compare.Validate.Header
(
)
where
import Data.Foldable
import Data.Functor
import Data.Maybe
import Data.OpenApi
import Data.OpenApi.Compare.Behavior
import Data.OpenApi.Compare.References ()
import Data.OpenApi.Compare.Subtree
import Data.OpenApi.Compare.Validat... | null | https://raw.githubusercontent.com/typeable/compaREST/6d8a67339c0e7b20a6c721eec7a2db093a0311fc/src/Data/OpenApi/Compare/Validate/Header.hs | haskell | catch-all schema? | # OPTIONS_GHC -Wno - orphans #
module Data.OpenApi.Compare.Validate.Header
(
)
where
import Data.Foldable
import Data.Functor
import Data.Maybe
import Data.OpenApi
import Data.OpenApi.Compare.Behavior
import Data.OpenApi.Compare.References ()
import Data.OpenApi.Compare.Subtree
import Data.OpenApi.Compare.Validat... |
8b49d7f5358b4673b4bdc0951df1c7e0ab81bb49cfcf019b2c26686778ac4779 | erlang-ls/erlang_ls | els_telemetry.erl | -module(els_telemetry).
-export([send_notification/1]).
-type event() :: map().
-spec send_notification(event()) -> ok.
send_notification(Event) ->
Method = <<"telemetry/event">>,
els_server:send_notification(Method, Event).
| null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/97721deaafc46b78d93046829bacb54f29c2a4ba/apps/els_lsp/src/els_telemetry.erl | erlang | -module(els_telemetry).
-export([send_notification/1]).
-type event() :: map().
-spec send_notification(event()) -> ok.
send_notification(Event) ->
Method = <<"telemetry/event">>,
els_server:send_notification(Method, Event).
| |
6f6554ba2fb2e4808af453fd0dbf9032aa75089c3634e83bb34fb7b481c55ee6 | swamp-agr/proof-assistant-bot | Response.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
module Proof.Assistant.Response where
import Data.ByteString (ByteString)
import Data.Text.Encoding (decodeUtf8)
import Telegram.Bot.API
(ChatId, MessageId, ParseMode (..), SendMessageRequest (..), SomeChatId (..))
import Proof.Assistant.Request
| R... | null | https://raw.githubusercontent.com/swamp-agr/proof-assistant-bot/58688e8fb22594ff477cb87d8fa02e74235493c9/src/Proof/Assistant/Response.hs | haskell | # LANGUAGE OverloadedStrings #
^ output data.
Otherwise, text message will be sent. | # LANGUAGE RecordWildCards #
module Proof.Assistant.Response where
import Data.ByteString (ByteString)
import Data.Text.Encoding (decodeUtf8)
import Telegram.Bot.API
(ChatId, MessageId, ParseMode (..), SendMessageRequest (..), SomeChatId (..))
import Proof.Assistant.Request
| Response for Telegram .
data Interpr... |
c4bd1745d1433822d90301c03f1c8300833b4c23d7495734475b88d02e426878 | cognitect-labs/vase | transaction_test.clj | (ns com.cognitect.vase.transaction-test
(:require [clojure.test :refer :all]
[io.pedestal.interceptor :as interceptor]
[com.cognitect.vase.actions :as actions]
[com.cognitect.vase.test-helper :as helper]
[com.cognitect.vase.test-db-helper :as db-helper]
[clo... | null | https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/test/com/cognitect/vase/transaction_test.clj | clojure | (ns com.cognitect.vase.transaction-test
(:require [clojure.test :refer :all]
[io.pedestal.interceptor :as interceptor]
[com.cognitect.vase.actions :as actions]
[com.cognitect.vase.test-helper :as helper]
[com.cognitect.vase.test-db-helper :as db-helper]
[clo... | |
b250b593be3b5acf74e43c4e9b4d7a6d6771d5beadfeaceeccd91c8df8815448 | benedekfazekas/mranderson | move.clj | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this
;; distribution. By using this software in any fashion, you are
;; agreeing to be bound by ... | null | https://raw.githubusercontent.com/benedekfazekas/mranderson/5bacf056ebe1feda9112c9df3aba5197fc40150e/src/mranderson/move.clj | clojure | Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution. By using this software in any fashion, you are
agreeing to be bound by the terms of this license. You must not
remove this notice, or any other, from this software.
TODO: move to a zloc ns and expand to han... | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
(ns ^{:author "Stuart Sierra, Benedek Fazekas"
:doc "Refactoring tool to move a Clojure namespace from one name/file to
another, and update all references to that namespace in you... |
2afc610009dfbf18a45f1716e2502706fa7cf99cb203e2bf727903c5ffcd88dc | dtgoitia/civil-autolisp | Window.lsp | (defun dump ( VlaObject )
(vlax-dump-object VlaObject)
; v0.0 - 2017.05.08 - First issue
Author :
Last revision : 2017.05.08
)
(defun DT:MaximiseAutocadWindow ()
Maximise AutoCAD window
(vlax-put-property (vlax-get-acad-object) 'WindowState 3)
; v0.0 - 2017.05.05 - First issue
Author :
Last revis... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/Window.lsp | lisp | v0.0 - 2017.05.08 - First issue
v0.0 - 2017.05.05 - First issue
END if
v0.0 - 2017.05.05 - First issue
(vlax-dump-object acadApp)
Ensure window is in the right-hand side screen
v0.0 - 2017.05.05 - First issue | (defun dump ( VlaObject )
(vlax-dump-object VlaObject)
Author :
Last revision : 2017.05.08
)
(defun DT:MaximiseAutocadWindow ()
Maximise AutoCAD window
(vlax-put-property (vlax-get-acad-object) 'WindowState 3)
Author :
Last revision : 2017.05.05
)
(defun DT:MaximiseAutocadWindowAtRightScreen ()
Max... |
3a233df7c6ec9073f4c3b58fe0b5e99265013ca144a445045f8aa05b450665a0 | igrep/typesafe-precure | TH.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
module ACME.PreCure.Types.TH
( declareGirls
, declareTransformees
, declareTransformedGroups
, declareSpecialItems
, declareTransformations
, declarePurifications
, declareNonItemPurifications
) wher... | null | https://raw.githubusercontent.com/igrep/typesafe-precure/51a3e9b648f2e89a0021747f916571a5ce0273d9/src/ACME/PreCure/Types/TH.hs | haskell | Add type argument names
| Declare data types with their Girl instances from the type names and girl names.
Avoid generating `Unit`. See /-/issues/18622 for details. | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
module ACME.PreCure.Types.TH
( declareGirls
, declareTransformees
, declareTransformedGroups
, declareSpecialItems
, declareTransformations
, declarePurifications
, declareNonItemPurifications
) wher... |
95aabdc832937f8e7fe9c2ec39892f6c0c1ffd85bb314e78702413fed6e4999d | Failproofshark/cl-sdl2-ttf | size.lisp | (in-package :sdl2-ttf)
(defmacro define-size-function (encoding)
(let* ((foreign-function-name (format 'nil "TTF_Size~a" encoding))
(wrapper-function-name (function-symbol "size-" encoding))
(low-level-lisp-name (function-symbol "%sdl-" wrapper-function-name)))
`(define-function ,foreign-functi... | null | https://raw.githubusercontent.com/Failproofshark/cl-sdl2-ttf/ff2821a2787cb527ca643a0dbca6ab2171ce141d/src/size.lisp | lisp | (in-package :sdl2-ttf)
(defmacro define-size-function (encoding)
(let* ((foreign-function-name (format 'nil "TTF_Size~a" encoding))
(wrapper-function-name (function-symbol "size-" encoding))
(low-level-lisp-name (function-symbol "%sdl-" wrapper-function-name)))
`(define-function ,foreign-functi... | |
2f60dbbfe4fd86731555c48d69251743a14dde7fa066b6e264708c1c60377750 | ghcjs/ghcjs-dom | WorkerLocation.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.WorkerLocation
(js_getHref, getHref, js_getProtocol, getProtocol, js_getHost,
g... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WorkerLocation.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/WorkerLocation.pathname Mozilla WorkerLocation.pathname documentation> | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.WorkerLocation
(js_getHref, getHref, js_getProtocol, getProtocol, js_getHost,
getHost, js_getHostname, getHostname, js_getPort, getPort,
js_getPathname, getPathname, js_g... |
413d57a089502ce658ec9dbee42a3c9d220205142605e00b5021ff70bdebd8ab | basho/riak_test | ts_cluster_replication.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 Basho Technologies , Inc.
%%
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 Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_cluster_replication.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 permissio... | Copyright ( c ) 2016 Basho Technologies , Inc.
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
-module(ts_cluster_replication)... |
1c446db5b9e9dd46a827edb6328ddad853374f394e5a76d0653539439204f1c0 | Proxymoron461/chesskell | CannotStayInCheckTests.hs | module CannotStayInCheckTests where
import Test.Hspec
import Test.ShouldNotTypecheck (shouldNotTypecheck)
import Test.HUnit.Lang (Assertion, assertFailure)
import Data.Type.Equality ((:~:)(..))
import qualified GHC.TypeLits as TL (Nat)
import Data.Proxy(Proxy(..))
import Data.Type.Nat hiding (SNat(..))
import Chesske... | null | https://raw.githubusercontent.com/Proxymoron461/chesskell/fcfdb954ccc760d3689583d7198f0be5da2905a5/chess/test/CannotStayInCheckTests.hs | haskell | module CannotStayInCheckTests where
import Test.Hspec
import Test.ShouldNotTypecheck (shouldNotTypecheck)
import Test.HUnit.Lang (Assertion, assertFailure)
import Data.Type.Equality ((:~:)(..))
import qualified GHC.TypeLits as TL (Nat)
import Data.Proxy(Proxy(..))
import Data.Type.Nat hiding (SNat(..))
import Chesske... | |
f93e88050b2e3780edbeebc01eb7cf697ea92fc1f7f7b279d701ec309f57390f | dcastro/twenty48 | Foundation.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Jasmine ... | null | https://raw.githubusercontent.com/dcastro/twenty48/d4a58bfa389bb247525fd18f80ef428d84ef5fe9/src/Foundation.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| The foundation datatype for your application. This can be a good place to
keep settings and values requiring initialization before your application
starts running, such as database connections. Every handler will have
access to the data present here.
^ Setti... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Jasmine (minifym)
import Yesod.Default.Util (addStaticContentExter... |
c04c49326d1358963f98630c9163b64036b879bd5b9039302fbaff52ea5747d6 | djfoote/haskell-workshop-2014 | wordmaster.hs | import System.IO
import System.Random
import Data.List(nub)
type Word = String
data GameState = Game [Word] Word
data Result = Failure Error
| Victory
| Score Word Int
data Error = BadNumLetters
| NotAWord Word
commonLetters :: Word -> Word -> Int
commonLetters ... | null | https://raw.githubusercontent.com/djfoote/haskell-workshop-2014/37bebc88eb9bf21a8492ecedad3f4ec81554039c/completed/wordmaster.hs | haskell | ====================================== --
== THIS IS YOUR ABSTRACTION BARRIER == --
====================================== --
I may or may not get around to writing explanations for what's going on here.
A v... | import System.IO
import System.Random
import Data.List(nub)
type Word = String
data GameState = Game [Word] Word
data Result = Failure Error
| Victory
| Score Word Int
data Error = BadNumLetters
| NotAWord Word
commonLetters :: Word -> Word -> Int
commonLetters ... |
671fcb336e8a449777fe771a73f85d4f16af918668a8cc2fc0c8cb5c4e88cfe7 | jeffshrager/biobike | jamesgen.lisp | (in-package :pb)
Create the output that can use to run stats .
;;; This is needed in order that the report can be done efficiently.
( Doing this multiple times wo n't hurt it pushnew 's . )
(defun bubble-pubs-to-go-frames ()
(loop for year in *year-frames*
do (loop for pub in (#^pubs year)
do (loop for... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Trbl/jamesgen.lisp | lisp | This is needed in order that the report can be done efficiently.
| (in-package :pb)
Create the output that can use to run stats .
( Doing this multiple times wo n't hurt it pushnew 's . )
(defun bubble-pubs-to-go-frames ()
(loop for year in *year-frames*
do (loop for pub in (#^pubs year)
do (loop for gene in (#^genes pub)
do (loop for go in (#^Go-Id gene)
... |
546cb34477bfdebc08edfcc058fefa96657d528ba9628728804777ca62cf95c3 | hasufell/hsfm | Settings.hs | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... | null | https://raw.githubusercontent.com/hasufell/hsfm/322c766ae534fb21e3427d2845011123ddb90952/src/HSFM/Settings.hs | haskell | }
---------------------
[ Common Settings ]--
---------------------
-- Command settings ----
|The terminal command. This should call `executeFile` in the end
with the appropriate arguments.
^ current directory of the FM
executes the given command
the terminal command
whether to search PATH
arguments for the comm... | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... |
663b542e8e3201d079308a3a8186217464fa4e97cacddd3d5b32bdabf6e683f8 | mfoemmel/erlang-otp | erl_tidy.erl | %% =====================================================================
%% This library is free software; you can redistribute it and/or
%% modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation ; either version 2 of
the License , or ( at your option ) any l... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/syntax_tools/src/erl_tidy.erl | erlang | =====================================================================
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied ... | as published by the Free Software Foundation ; either version 2 of
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307
USA
$ Id$
1999 - 2006
@author < >
... |
6acf3f676d6761ff010f085895ca385b176e6fedf79d7261349a8fe52f0f2f72 | sky-big/RabbitMQ | amqp_sup.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-erlang-client/src/amqp_sup.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
@priv... |
af4fe7ecce20e772b25fa981e8372748460d00750afe67679e7b6b638a05cd00 | KMahoney/Dochi | Main.hs | module Main where
import System.Environment
import System.Console.GetOpt
import qualified Data.Map as M
import Dochi.Interpreter (env)
import Dochi.Util (compileFiles, runFiles, initialState, handleError)
import qualified Dochi.REPL as R
data Options = Options { repl :: Bool
, showAST :: Boo... | null | https://raw.githubusercontent.com/KMahoney/Dochi/4de3ea4d48760dc2c83946075f7d048e0f922b86/Main.hs | haskell | module Main where
import System.Environment
import System.Console.GetOpt
import qualified Data.Map as M
import Dochi.Interpreter (env)
import Dochi.Util (compileFiles, runFiles, initialState, handleError)
import qualified Dochi.REPL as R
data Options = Options { repl :: Bool
, showAST :: Boo... | |
b9f5c10979f17929746416c3543d76fb4335baf1ebaa084cd119876a9ec3325f | threatgrid/ctia | attack_pattern_test.clj | (ns ctia.entity.attack-pattern-test
(:require [clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.entity.attack-pattern :as sut]
[ctia.test-helpers.access-control :refer [access-control-test]]
[ctia.test-helpers.aggregate :refer [test-metric-routes]]
... | null | https://raw.githubusercontent.com/threatgrid/ctia/610ca81410988ec3043dddc75745330cfd55945d/test/ctia/entity/attack_pattern_test.clj | clojure | (ns ctia.entity.attack-pattern-test
(:require [clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.entity.attack-pattern :as sut]
[ctia.test-helpers.access-control :refer [access-control-test]]
[ctia.test-helpers.aggregate :refer [test-metric-routes]]
... | |
b3b12bd01c8ab36f69ad1972c0405321b9b904b628ee326cab9aaebe53357ae7 | xvw/planet | now.ml | let current = Glue.Util.moment ()
let print_simple () =
match current with
| Error _ -> ()
| Ok t -> Format.printf "%a" Paperwork.Timetable.Moment.pp t
;;
let () = print_simple ()
| null | https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/bin/now/now.ml | ocaml | let current = Glue.Util.moment ()
let print_simple () =
match current with
| Error _ -> ()
| Ok t -> Format.printf "%a" Paperwork.Timetable.Moment.pp t
;;
let () = print_simple ()
| |
db372ae4c84bbb3956593d965d28448f68c81849518733a41a703e5b7a060753 | mirage/index | search.ml | The MIT License
Copyright ( c ) 2019 < >
< >
< >
< >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
... | null | https://raw.githubusercontent.com/mirage/index/fe5e962534d192389484ecc63a25e4ab4668a2f0/src/search.ml | ocaml | * Improves over binary search in cases where the values in some array are
uniformly distributed according to some metric (such as a hash).
The core of the search | The MIT License
Copyright ( c ) 2019 < >
< >
< >
< >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
... |
4f9a4d91614ce9e0f4bc675ac7e99e24077bc343f7d14cac9be40fa07a735019 | clojurewerkz/ogre | store_test.clj | (ns clojurewerkz.ogre.suite.store-test
(:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse shuffle sort])
(:require [clojurewerkz.ogre.core :refer :all]))
(defn get_g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX
"g.withSideEffec... | null | https://raw.githubusercontent.com/clojurewerkz/ogre/cfc5648881d509a55f8a951e01d7b2a166e71d17/test/clojure/clojurewerkz/ogre/suite/store_test.clj | clojure | (ns clojurewerkz.ogre.suite.store-test
(:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse shuffle sort])
(:require [clojurewerkz.ogre.core :refer :all]))
(defn get_g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX
"g.withSideEffec... | |
3a1a996db0d201078b257817a2beb4937a144a8f054e48012da588553da9b207 | ninenines/cowboy | cowboy_handler.erl | Copyright ( c ) 2011 - 2017 , < >
%%
%% Permission to use, copy, modify, and/or 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 AUTHOR DISC... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/src/cowboy_handler.erl | erlang |
Permission to use, copy, modify, and/or 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 TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2017 , < >
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
-module(cowboy_handler).
-behaviour(cowboy_middleware... |
d630b51d83eb365311e48950777f690302dcb194f5739c3d5f52167533e44749 | msakai/toysolver | AReal2.hs | # LANGUAGE TemplateHaskell #
module Test.AReal2 (areal2TestGroup) where
import Data.Maybe
import Data.Ratio
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Test.Tasty.TH
import ToySolver.Data.Polynomial (UPolynomial, X (..))
import qualified ToySolver.Data.Polynomial as P
import ToySolve... | null | https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/Test/AReal2.hs | haskell | -----------------------------------------------------------------
-----------------------------------------------------------------
------------------------------------------------------------------}
-------------------------------------------------------------------
Generators
--------------------------------------... | # LANGUAGE TemplateHaskell #
module Test.AReal2 (areal2TestGroup) where
import Data.Maybe
import Data.Ratio
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Test.Tasty.TH
import ToySolver.Data.Polynomial (UPolynomial, X (..))
import qualified ToySolver.Data.Polynomial as P
import ToySolve... |
0ea8361023c5379201f70654d55a4d7a8542993281820d8eed63b7611b4ca55a | fission-codes/cli | Watch.hs | -- | Continuous file sync
module Fission.CLI.Command.Watch
( command
, handleTreeChanges
, watcher
) where
import Data.Function
import RIO.Directory
import qualified RIO.Text as Text
import Servant.Client
import Network.IPFS
import qualified Network.IPFS.Add as IPFS
i... | null | https://raw.githubusercontent.com/fission-codes/cli/dc3500babad35a6cb44835fa503d27d672cbcdb3/library/Fission/CLI/Command/Watch.hs | haskell | | Continuous file sync
| The command to attach to the CLI tree
Sleep main thread
Wait for all events to fire in sliding window | module Fission.CLI.Command.Watch
( command
, handleTreeChanges
, watcher
) where
import Data.Function
import RIO.Directory
import qualified RIO.Text as Text
import Servant.Client
import Network.IPFS
import qualified Network.IPFS.Add as IPFS
import Network.IP... |
70eb36d1dab3856d6365f4c2f3458d46327924980d5e9226e63a0cd415a7e945 | jfacorro/clojure-lab | history.clj | (ns lab.model.history
"API to create and manipulate a history of operations."
(:refer-clojure :exclude [empty empty?])
(:require [clojure.core :as core]))
(defprotocol Undoable
(redo [this] "Returns a function that redoes some operation.")
(undo [this] "Returns a function that undoes some operation."))
(def... | null | https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/model/history.clj | clojure | (ns lab.model.history
"API to create and manipulate a history of operations."
(:refer-clojure :exclude [empty empty?])
(:require [clojure.core :as core]))
(defprotocol Undoable
(redo [this] "Returns a function that redoes some operation.")
(undo [this] "Returns a function that undoes some operation."))
(def... | |
a8dd02c23741f0c788c44515f8e977d8d95bc35667750c97f1f5242f093dfc85 | pascutto/cachecache | dllist.mli | type 'a t = private {
cap : int;
witness : 'a;
mutable free : int;
contents : 'a array;
prev : int array;
next : int array;
}
@ with t
invariant t.cap > 0
invariant -1 < = t.free < t.cap
invariant t.free < > -1 - > t.prev.(t.free ) = -1
invariant forall i. 0 < = i < t.cap - > -1 < = ... | null | https://raw.githubusercontent.com/pascutto/cachecache/36efb3cfb66198c6aaf155334db42220f264d97a/src/dllist.mli | ocaml | @ predicate rec aux_mem (t: 'a t) (start: 'a c) (c: 'a c) =
start = c
\/
(start <> -1 && aux_mem t (t.next.(start)) c)
Because ortac does not check internal invariants
@ t = create cap dummy
checks cap > 0
@ pure
@ b = is_empty l
pure
ensures b <-> l.size = 0
@ b = is_full l
pure
e... | type 'a t = private {
cap : int;
witness : 'a;
mutable free : int;
contents : 'a array;
prev : int array;
next : int array;
}
@ with t
invariant t.cap > 0
invariant -1 < = t.free < t.cap
invariant t.free < > -1 - > t.prev.(t.free ) = -1
invariant forall i. 0 < = i < t.cap - > -1 < = ... |
60524f386dd706bc00db42a57e4d46cecf2ef8581a3f37a98e4970c3b0bfda39 | rtoal/ple | primes.hs | primes = filterPrime [2..]
where
filterPrime (p:xs) =
p : filterPrime [x | x <- xs, x `mod` p /= 0]
main = print(take 10 primes)
| null | https://raw.githubusercontent.com/rtoal/ple/b24cab4de2beca6970833a09d05af6ef96ec3921/haskell/primes.hs | haskell | primes = filterPrime [2..]
where
filterPrime (p:xs) =
p : filterPrime [x | x <- xs, x `mod` p /= 0]
main = print(take 10 primes)
| |
c480fc295b5c0373c821be3aa7ea60ed894d0e0511a1d8cf66344a6f1f0f0e9f | racket/web-server | check-dir.rkt | #lang web-server
(define interface-version 'stateless)
(provide start interface-version)
(define (directory-page n)
(send/suspend/url
(lambda (k-url)
(response/xexpr
`(html (head (title ,(format "Page ~a" n)))
(body
(h1 ,(format "Page ~a" n))
(h2 ,(format "The c... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/default-web-root/htdocs/lang-servlets/check-dir.rkt | racket | #lang web-server
(define interface-version 'stateless)
(provide start interface-version)
(define (directory-page n)
(send/suspend/url
(lambda (k-url)
(response/xexpr
`(html (head (title ,(format "Page ~a" n)))
(body
(h1 ,(format "Page ~a" n))
(h2 ,(format "The c... | |
b84c4bf8ae29b0049df670d76643a49c44a54cac4d92e4a3640ac9db8a280402 | korya/efuns | sound.mli | (***********************************************************************)
(* *)
(* ____ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/sound.mli | ocaml | *********************************************************************
____
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
type sound
val use_sound : bool Options.option_record
val use_local_player: bool Options.option_re... |
5696bfd04712fe9a0d31c123c42d2717cc08360f82b5060fea4552d7c30b89aa | b0-system/b0 | b0_opam.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/b0-system/b0/c701f6fba5eb8c86d3a91073b8e76a664b62de3f/src/kit/b0_opam.ml | ocaml | [opam] tool
[opam] files
Formatting
The way this fun works on normalize errors is not optimal.
Package file generation
[opam] metadata
unlikely, libraries should not do this.
XXX This is only here because of the person who wrote this.
This shouldn't exist.
FIXME This is a poc and not subtle en... | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
387e0e664ba0b7f202f3ca50ec29cb339de3836d1f131f93f1a52a3d29584f84 | jellelicht/guix | packages.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Publ... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/packages.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 , 2016 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix packa... |
f8b7deb8d50dabf48dfc74ee44ba0d202657003682240879dcb82f4f657d63f2 | bsaleil/lc | perm9.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->f64vector lst))
(def-macro (FLOATvector? x) `(f64vector? ,x))
(def-macro (FLOATvector... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5f64/perm9.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks
File: perm9.sch
Crea... | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->f64vector lst))
(def-macro (FLOATvector? x) `(f64vector? ,x))
(def-macro (FLOATvector . lst) `(f64vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make... |
a2c8c956aec602b35e68b1c86f6bc41d1f6199a66b1dead1769b6ecbd42f8d84 | charlieg/Sparser | object.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1993 - 2005 -- all rights reserved
extensions copyright ( c ) 2007 BBNT Solutions LLC . All Rights Reserved
$ Id:$
;;;
;;; File: "object"
Module : " : names : "
version : 0.1 July 2007
initiated 5/28/93 v2.3 . Br... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/names/object.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "object"
the Find routine
the simple version of Make/uncategorized-name go through. (7/5/07) removed a
break statement.
-----------------------------------------------------
the root in the lattice for all names -- no content
-----------------... | copyright ( c ) 1993 - 2005 -- all rights reserved
extensions copyright ( c ) 2007 BBNT Solutions LLC . All Rights Reserved
$ Id:$
Module : " : names : "
version : 0.1 July 2007
initiated 5/28/93 v2.3 . Broke name word routines out to their own file 4/20/95 .
0.1 ( 5/2 ) added an explicit ... |
9c31f75f476f38f1443208fff05ae988ebea41602b6d8f0ceedd71de2554a4d5 | andgate/type-theory-compiler | Compiler.hs | # OPTIONS_GHC -fno - warn - unused - imports #
# LANGUAGE LambdaCase
, RecordWildCards
, ViewPatterns
#
, RecordWildCards
, ViewPatterns
#-}
module Compiler where
import Control.Monad.Except
import Language.Syntax.Location
import qualified Langu... | null | https://raw.githubusercontent.com/andgate/type-theory-compiler/a404f085d19a19b16ae8c26616707dc46707ea10/ttc/app/Compiler.hs | haskell | putDoc $ pretty toks <> line
let stlc'' = matchModule stlc'
hPutDoc h $ pretty stlc'' | # OPTIONS_GHC -fno - warn - unused - imports #
# LANGUAGE LambdaCase
, RecordWildCards
, ViewPatterns
#
, RecordWildCards
, ViewPatterns
#-}
module Compiler where
import Control.Monad.Except
import Language.Syntax.Location
import qualified Langu... |
58710a9e2918a2104a84638da4ac97baa95d21258461a8dc162f4c2ef19fd48f | bobot/FetedelascienceINRIAsaclay | priority_queue.ml | File : priority_queue.ml
Copyright ( C ) 2008
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
excepti... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/priority_queue.ml | ocaml | or raise Empty
or raise Empty
Expected to be seldom used => do not charge for it at every insertion
Local Variables:
End: | File : priority_queue.ml
Copyright ( C ) 2008
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
excepti... |
043040a2b454de482c390a3aba341287eb3c785173a9bf4cd26943ad499df913 | LexiFi/menhir | myocamlbuild.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/demos/ocamlbuild/myocamlbuild.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
b934d1276e63e926525976ceb4fa224b83adf9b4831ae669e9840e8b6e1d128c | 0zat/gen-bs | js_obj.ml | open Js
module From_meth = struct
let to_external owner_name js_meth =
let external_candidates = [
Variadic.to_external_if_variadic owner_name js_meth ;
Some(Js_meth.to_external owner_name js_meth)
]
in
List.find BatOption.is_some external_candidates
|> BatOption.get
let to_let o... | null | https://raw.githubusercontent.com/0zat/gen-bs/20348991775d9ef3974c3b824968a0ab219502a8/src/intermediate/js_to_bs/js_obj_to_module/js_obj.ml | ocaml | open Js
module From_meth = struct
let to_external owner_name js_meth =
let external_candidates = [
Variadic.to_external_if_variadic owner_name js_meth ;
Some(Js_meth.to_external owner_name js_meth)
]
in
List.find BatOption.is_some external_candidates
|> BatOption.get
let to_let o... | |
eed9a6ca9f01fbc71024b310ce86e3248b7373ca736ad2c11e8e20b9776f7fd2 | 2600hz-archive/whistle | command_props.erl | Copyright 2010 - 2011 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/proper-1.0/test/command_props.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright 2010 - 2011 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pub... |
a835d583d1e7f6e15bbd416c824d17e142c130b01dd3aa9317244aae4d05e7d1 | zkincaid/duet | recGraph.ml | open Srk
open BatPervasives
type ('a, 'b) seq_typ = [ `Atom of 'a | `Block of 'b ]
type ('a, 'b) par_typ = [ ('a, 'b) seq_typ | `ParBlock of 'b ]
module type Vertex = sig
include Putil.CoreType
type atom
type block
type ('a, 'b) typ
val classify : t -> (atom, block) typ
end
module type BLOCK = Putil.CoreT... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/duet/recGraph.ml | ocaml | open Srk
open BatPervasives
type ('a, 'b) seq_typ = [ `Atom of 'a | `Block of 'b ]
type ('a, 'b) par_typ = [ ('a, 'b) seq_typ | `ParBlock of 'b ]
module type Vertex = sig
include Putil.CoreType
type atom
type block
type ('a, 'b) typ
val classify : t -> (atom, block) typ
end
module type BLOCK = Putil.CoreT... | |
e35685ecd2171f064ca60c1f8125c44c286fde78096133a4875a6f47cb700cb9 | kowainik/relude | Spec.hs | module Main (main) where
import Relude
import Hedgehog (checkParallel)
import System.IO (hSetEncoding, utf8)
import Test.Relude.Property (hedgehogTestList)
main :: IO ()
main = do
-- fix terminal encoding
hSetEncoding stdout utf8
hSetEncoding stderr utf8
mapM checkParallel hedgehogTestList >>= \p ->
... | null | https://raw.githubusercontent.com/kowainik/relude/f57234d406fca584807ad8c94f9db7f00f9d547e/test/Spec.hs | haskell | fix terminal encoding | module Main (main) where
import Relude
import Hedgehog (checkParallel)
import System.IO (hSetEncoding, utf8)
import Test.Relude.Property (hedgehogTestList)
main :: IO ()
main = do
hSetEncoding stdout utf8
hSetEncoding stderr utf8
mapM checkParallel hedgehogTestList >>= \p ->
if and p
then exitSuc... |
8c160b378c97515c2c5df30c8d03bbd463b3034045af681cd5a763ac3a52dc33 | dbuenzli/fut | testing.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2012 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/fut/907de63df12815f2df2cb796baa7fa37ac2758d4/test/testing.ml | ocaml | Common test infrastructure
Grrrrr.
TODO count and don't fail like in is_state | ---------------------------------------------------------------------------
Copyright ( c ) 2012 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
2967b7a0652f83b43f88772c167b70a101efc2689884438b2220955d42528020 | marcoheisig/Petalisp | lazy-reshape.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.api)
(declaim (ftype (function (rank lazy-array t) (values rank lazy-array &optional))
lazy-reshape-aux lazy-reshape-aux/shape))
(defun lazy-reshape (array &rest modifiers)
(let* ((lazy-array (lazy-array... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/3837b4ddcbcb0e804f96de917392caa0d8d5283c/code/api/lazy-reshape.lisp | lisp | Case 1: Reshape with a non-negative integer.
Case 4: Reshape using a shape designator.
Case 4a: Select a subset of elements.
lexicographic ordering. | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.api)
(declaim (ftype (function (rank lazy-array t) (values rank lazy-array &optional))
lazy-reshape-aux lazy-reshape-aux/shape))
(defun lazy-reshape (array &rest modifiers)
(let* ((lazy-array (lazy-array... |
0fefa603ae304dd8f349fe2a095b7cbb331bd6377ae5a97f560f0983a1ec10c8 | glondu/belenios | tool_js_ttkeygen.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/a1f9e4cc8c9aa823f3d0f9ba1e21b8c700cd5522/src/web/clients/tool/tool_js_ttkeygen.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
09cc1b751f2e830920b8d2ce639ac8d83f6d0bc0c74f6f52347f6f0da3272292 | offby1/anagrams | bag.scm | (define-module bag
(export bag subtract-bags bag-empty?))
(select-module bag)
(define primes (vector 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101))
(define byte->factor
(let ((lc-a-code (char->integer #\a))
(lc-z-code (char->integer #\z))
(uc-a-code (char->inte... | null | https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/gauche/bag.scm | scheme | lower-casify
unit tests
creating a bag from a string needn't be all that fast, since we'll
reading a dictionary of words), whereas subtracting bags needs to
be *really* fast, since I suspect we do this O(n!) times where n is
the length of the string being anagrammed.
| (define-module bag
(export bag subtract-bags bag-empty?))
(select-module bag)
(define primes (vector 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101))
(define byte->factor
(let ((lc-a-code (char->integer #\a))
(lc-z-code (char->integer #\z))
(uc-a-code (char->inte... |
7d9fb90562a98b0ba59309df7100b2f51f1e06e606d2b4e0cb1ec8f0b75c211b | JonasDuregard/testing-feat | Enumerate.hs | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
-- | Basic combinators for building enumerations
-- most users will want to use the type class
-- based combinators in "Test.Feat.Class" instead.
module Test.Feat.Enumerate (
Index,
Enumerate(..),
parts,
fromParts,
-- ** Reversed lists
RevList(..),
to... | null | https://raw.githubusercontent.com/JonasDuregard/testing-feat/a1b32842a8cc8ab467d93a9f97f2365330a02113/Test/Feat/Enumerate.hs | haskell | | Basic combinators for building enumerations
most users will want to use the type class
based combinators in "Test.Feat.Class" instead.
** Reversed lists
** Finite ordered sets
** Combinators for building enumerations
testing-feat
import Test.Feat.Internals.Tag(Tag(Source))
base
| A functional enumeration of... | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
module Test.Feat.Enumerate (
Index,
Enumerate(..),
parts,
fromParts,
RevList(..),
toRev,
Finite(..),
fromFinite,
module Data.Monoid,
union,
module Control.Applicative,
cartesian,
singleton,
pay,
) where
import Control . . TagSha... |
309be82e5d4f57fc4b8595967b990bdefc61ed0f77e740ee513ccbeb363cd854 | mfoemmel/erlang-otp | wxClipboard.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxClipboard.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxClipboard).
-include("wxe.hrl")... |
6ba5f45c6991e77126bea50d7547f1e1c8899304cd76bb6cd1530c366ec3e84c | ptal/AbSolute | pengine2D.ml | Copyright 2019
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 version .
This program is distr... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/fixpoint/pengine2D.ml | ocaml | Records the active tasks (those not yet entailed).
This field is backtracked automatically.
`reactor.(e)` contains the set of tasks that reacts on the event `e`.
Contains all the tasks that must be propagated in order to reach a fixpoint.
We also have the companion structure `inside_queue.(i).(j)` that i... | Copyright 2019
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 version .
This program is distr... |
8fde650509a2250326b56a9caeeb6c97462ae39d8cfb82ae593f8ea5c88ac575 | padsproj/pads-haskell | RegExp.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : Language . Pads . RegExp
Description : Pads regular expressions
Copyright : ( c ) 2011
< >
< >
License : MIT
Maintainer : < >
Stability : experimental
Module : Language.Pads.R... | null | https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/src/Language/Pads/RegExp.hs | haskell | # LANGUAGE DeriveDataTypeable #
^ A regular expression printed as its match | |
Module : Language . Pads . RegExp
Description : Pads regular expressions
Copyright : ( c ) 2011
< >
< >
License : MIT
Maintainer : < >
Stability : experimental
Module : Language.Pads.RegExp
Description : Pads regular e... |
455d6991f4b1945f5e35daf9b698af1631833c546ef162585e928c8a6d2930bf | Tener/deeplearning-thesis | Matlab.hs | # LANGUAGE OverloadedStrings , QuasiQuotes , ImplicitParams #
module Matlab where
import Data.String.Interpolation
import Data.String
import Data.Monoid
import Data.Default
import System.FilePath
import System.Directory
import System.Process
import System.Exit
import System.IO
data MatlabImp = Matlab | Octave derivi... | null | https://raw.githubusercontent.com/Tener/deeplearning-thesis/c56866bf6f48db3185b4b62348d292bf39a7a2af/lib/Matlab.hs | haskell | # LANGUAGE OverloadedStrings , QuasiQuotes , ImplicitParams #
module Matlab where
import Data.String.Interpolation
import Data.String
import Data.Monoid
import Data.Default
import System.FilePath
import System.Directory
import System.Process
import System.Exit
import System.IO
data MatlabImp = Matlab | Octave derivi... | |
f24f06c37b61892161d4a80316dc72ac32302c91d70d95f7667ae6d3359541f0 | narkisr-deprecated/core | model.clj | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
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
distri... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/aws/model.clj | clojure | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
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
distri... | |
dc17b404341f0335e433ee9f8c4752bc6479ef371d29b4a49d336dd5b7b722e2 | goblint/analyzer | invariantCil.ml | open GoblintCil
let var_replace_original_name vi =
match Cilfacade.find_original_name vi with
| Some original_name when original_name <> vi.vname -> {vi with vname = original_name}
| _ -> vi
class exp_replace_original_name_visitor = object
inherit nopCilVisitor
method! vvrbl (vi: varinfo) =
ChangeTo (v... | null | https://raw.githubusercontent.com/goblint/analyzer/9ce9249ac2f8025084e4168a6202ec09feba92fb/src/domains/invariantCil.ml | ocaml | let var_is_tmp {vdescrpure} = not vdescrpure (* doesn't exclude tmp___0 | open GoblintCil
let var_replace_original_name vi =
match Cilfacade.find_original_name vi with
| Some original_name when original_name <> vi.vname -> {vi with vname = original_name}
| _ -> vi
class exp_replace_original_name_visitor = object
inherit nopCilVisitor
method! vvrbl (vi: varinfo) =
ChangeTo (v... |
756d153b6e5ea3ebe9fb4eaa250b7a9582af6f1f2d4d5d291aecbea6bfe37584 | AccelerateHS/accelerate-examples | Event.hs |
module Gloss.Event ( react )
where
import Gloss.Simulate
import Data.Char
import Data.Label
import Graphics.Gloss.Interface.Pure.Game
-- React to user input events
--
react :: Event -> Simulate -> Simulate
react event universe
= let
char ' ' Down = modify simulatePause not
cha... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/n-body/Gloss/Event.hs | haskell | React to user input events
|
module Gloss.Event ( react )
where
import Gloss.Simulate
import Data.Char
import Data.Label
import Graphics.Gloss.Interface.Pure.Game
react :: Event -> Simulate -> Simulate
react event universe
= let
char ' ' Down = modify simulatePause not
char 't' Down = mo... |
921eead3370eba8f4562bb36102037399372c807039f33b96f6f25288b00a8c7 | wireless-net/erlang-nommu | ex_aui.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/examples/demo/ex_aui.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ex_aui).
-behaviour(wx_object).
... |
e8330a9b274e1fb150e33bea5a988b31e352b29636a3922f8949aa1ef833ab74 | BrunoBonacci/1config | backend.clj | (ns ^{:author "Bruno Bonacci (@BrunoBonacci)" :no-doc true}
com.brunobonacci.oneconfig.backend
(:refer-clojure :exclude [find load list]))
;;
;; Protocol for the clients
;;
(defprotocol IConfigClient
;;
;; takes a `config-entry` to find in input and returns the best
;; match for it. where a best match is a... | null | https://raw.githubusercontent.com/BrunoBonacci/1config/4cf8284b1b490253ac617bec9d2348c3234931e6/1config-core/src/com/brunobonacci/oneconfig/backend.clj | clojure |
Protocol for the clients
takes a `config-entry` to find in input and returns the best
match for it. where a best match is a config entry in the given
backend with the specified `:key` and `:env` and a `:version`
which is exactly the same or a earlier `:version`
it returns `nil` if not found.
`config-entry` ... | (ns ^{:author "Bruno Bonacci (@BrunoBonacci)" :no-doc true}
com.brunobonacci.oneconfig.backend
(:refer-clojure :exclude [find load list]))
(defprotocol IConfigClient
` { : key " " : env " dev " : version " 6.5.4 " } `
{ : env " dev " , : key " " , : version " 6.2.0 " ,
: change - num 1552740481566 }
(f... |
d3bc6eb111f72f0b095e47b5358a9adae440aa0fb8b8f8efda22b13649a8bba0 | clojure/clojurescript | test.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/8528937440d4c5a2c8fc86813c5a9928ab184daa/src/test/self/self_parity/test.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
mon... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns
^{:doc "Builds and runs the ClojureScript compiler test suite
in self-host mode, ensuring parity of bootstrapped ClojureScript
with JVM based ClojureScript.
This involves dynamically loading the test suite files at runti... |
b7587790f1dfdd95182334860efacf41a93adf59d6b2a6ad81fe16af5cd89d74 | ctford/Idris-Elba-Dev | Pom.hs | module IRTS.Java.Pom (pomString) where
import Data.List (unfoldr)
import Text.XML.Light
uattr :: String -> String -> Attr
uattr k v = Attr (QName k Nothing Nothing) v
-- from
splitOn :: Eq a => a -> [a] -> [[a]]
splitOn chr = unfoldr sep where
sep [] = Nothing
sep l = Just . fmap (drop 1) . break (==chr) $ l
... | null | https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/IRTS/Java/Pom.hs | haskell | from | module IRTS.Java.Pom (pomString) where
import Data.List (unfoldr)
import Text.XML.Light
uattr :: String -> String -> Attr
uattr k v = Attr (QName k Nothing Nothing) v
splitOn :: Eq a => a -> [a] -> [[a]]
splitOn chr = unfoldr sep where
sep [] = Nothing
sep l = Just . fmap (drop 1) . break (==chr) $ l
parseToDe... |
11f54ff0517a66b99dc2ce6e1250d9e9f10a7bcffccbde5b16a7675a3826bedd | owlbarn/light_actor | test.ml |
* Light Actor - Parallel & Distributed Engine of Owl System
* Copyright ( c ) 2016 - 2019 < >
* Light Actor - Parallel & Distributed Engine of Owl System
* Copyright (c) 2016-2019 Liang Wang <>
*)
open Lwt.Infix
module OBS = Owl_base_dense_ndarray.S
module NN = Owl_neural_generic.Make(OBS)
module ALD =... | null | https://raw.githubusercontent.com/owlbarn/light_actor/d5ca76db0a58c61cd0ba019be458dada3ce9c36a/test/mirage/test.ml | ocaml | FIXME: optimistically assumes loading is done by next iteration
on server
on worker
return gradient instead of weight
on server
FIXME: to port this into Owl_base?
FIXME: spend some time here |
* Light Actor - Parallel & Distributed Engine of Owl System
* Copyright ( c ) 2016 - 2019 < >
* Light Actor - Parallel & Distributed Engine of Owl System
* Copyright (c) 2016-2019 Liang Wang <>
*)
open Lwt.Infix
module OBS = Owl_base_dense_ndarray.S
module NN = Owl_neural_generic.Make(OBS)
module ALD =... |
e55e49667389171fffc82f53bd5febf4a98a49f6e075a660a5844baa451da737 | VictorNicollet/Ohm | run.ml | Ohm is © 2012
(* Types, both public and private ---------------------------------------------------------- *)
type thread = Do of thread list Lazy.t
type ('ctx,'value) t = 'ctx -> ('value -> thread) -> thread
type ('ctx,'value) value = ('ctx,'value) t
type 'ctx effect = ('ctx,unit) t
Monad ... | null | https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/src/run.ml | ocaml | Types, both public and private ----------------------------------------------------------
Context manipulation --------------------------------------------------------------------
Concurrency manipulation ----------------------------------------------------------------
Evaluation --------------------------------... | Ohm is © 2012
type thread = Do of thread list Lazy.t
type ('ctx,'value) t = 'ctx -> ('value -> thread) -> thread
type ('ctx,'value) value = ('ctx,'value) t
type 'ctx effect = ('ctx,unit) t
Monad usage -----------------------------------------------------------------------------
let return ... |
c02cc03c668f93339555eb506fb44e67674bce3514389dc78753e4ea16891c44 | samrushing/irken-compiler | t_vec16_1.scm |
(include "lib/core.scm")
(include "lib/pair.scm")
(let ((v (list->vec16 '(1 2 3 4 5))))
(printn v)
(printn v[4])
)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_vec16_1.scm | scheme |
(include "lib/core.scm")
(include "lib/pair.scm")
(let ((v (list->vec16 '(1 2 3 4 5))))
(printn v)
(printn v[4])
)
| |
34e1616b9be5d84614223c5f64c7ff18fe798751e786765f39aeeae85321b389 | monstasat/janus-ocaml | session.ml | open Js_of_ocaml
open Utils
open Lwt_result.Infix
open Webrtc
type t =
{ id : int
; server : string
; plugins : (int * Plugin.t) list ref
; mutable event_loop : string Lwt.t option
(* Properties *)
; ice_servers : _RTCIceServer Js.t list
; ice_transport_policy : Plugin.ice_transport_policy option
; bun... | null | https://raw.githubusercontent.com/monstasat/janus-ocaml/b68e8b23a95dead8bd6921206ad8c1fe64e25e30/lib/jsoo/session.ml | ocaml | Properties
Callbacks
Nothing happened
Just an ack, we can probably ignore
We didn't do setRemoteDescription
(trickle got here before the offer?)
A plugin asked the core to detach one of our handles
Media started/stopped flowing
Trouble uplink or downlink
Oops, something wrong happened
... | open Js_of_ocaml
open Utils
open Lwt_result.Infix
open Webrtc
type t =
{ id : int
; server : string
; plugins : (int * Plugin.t) list ref
; mutable event_loop : string Lwt.t option
; ice_servers : _RTCIceServer Js.t list
; ice_transport_policy : Plugin.ice_transport_policy option
; bundle_policy : Plugin... |
3264df4ea7255d6e8edb252bd08cb8cedfbb755724744f4f5c12e5108d96b767 | rmculpepper/binaryio | fixup.rkt | #lang racket/base
(require rackunit
racket/format
racket/port
binaryio/unchecked/fixup-port)
(provide (all-defined-out))
(define (call/fixup-output proc)
(define fx (open-fixup-port))
(proc fx)
(with-output-to-bytes
(lambda () (fixup-port-flush fx (current-output-port)))))
(define... | null | https://raw.githubusercontent.com/rmculpepper/binaryio/6157d5bc79028bdb9445fa9ad216b22f80c54ffd/binaryio/test/fixup.rkt | racket | ----
test unsized fixups
test sized fixups
test mixture
============================================================ | #lang racket/base
(require rackunit
racket/format
racket/port
binaryio/unchecked/fixup-port)
(provide (all-defined-out))
(define (call/fixup-output proc)
(define fx (open-fixup-port))
(proc fx)
(with-output-to-bytes
(lambda () (fixup-port-flush fx (current-output-port)))))
(define... |
b204e7b638957e7ac2166ea31550250803a37a770161f51781fa0f2b5c0ff784 | SamB/coq | gmap.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/lib/gmap.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
Additions with respect to ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Maps using the generic c... |
d8a0ab2617336e1e58898478df5a3b91d147366c1865775465d897fe957d4dc8 | AccelerateHS/accelerate-examples | Replicate.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
module Test.Prelude.Replicate (
test_replicate,
) where
import Config
import Test.Framework
import Prelude as P
import D... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/nofib/Test/Prelude/Replicate.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
Slice -----------------------------------------------------------------------
Replicate into y-axis
should produce [1,2,1,2,3,4,3,4]
Replicate into x-axis
should produce [1,1,2,2,3,3,4,4]
Replicates an array into ... | # LANGUAGE ScopedTypeVariables #
module Test.Prelude.Replicate (
test_replicate,
) where
import Config
import Test.Framework
import Prelude as P
import Data.Array.Accelerate as A
import Data.Array.Accelerate.IO.Data.Array.Unboxed... |
1803526d6d9deee3953c0c3540b747340cea307ba2df4c8b394895775d6efc54 | devaspot/games | protocol.erl | -module(protocol).
-compile({parse_transform, shen}).
-compile(export_all).
-jsmacro([take/2,attach/1,join/1,discard/3,player_info/2,reveal/4,
piece/2,logout/0,pause/2,i_saw_okey/1,i_have_8_tashes/1]).
attach(Token) -> ws:send(enc(tuple(atom('client'),tuple(atom("session_attach"), Token)))).
join(Game) -> ws... | null | https://raw.githubusercontent.com/devaspot/games/a1f7c3169c53d31e56049e90e0094a3f309603ae/apps/web/src/protocol.erl | erlang | -module(protocol).
-compile({parse_transform, shen}).
-compile(export_all).
-jsmacro([take/2,attach/1,join/1,discard/3,player_info/2,reveal/4,
piece/2,logout/0,pause/2,i_saw_okey/1,i_have_8_tashes/1]).
attach(Token) -> ws:send(enc(tuple(atom('client'),tuple(atom("session_attach"), Token)))).
join(Game) -> ws... | |
394cd1189cc6bb37a096ce4c3befffe0d7cb371be3e65a7943b4ffa2d2338d4b | morpheusgraphql/morpheus-graphql | GetInterfaceTypes.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Client.Requests.GetInterfaceTypes where
import Client.Schema
import Data.Morpheus.Client.CodeGen.Internal
instance RequestType GetCharacters where
type RequestAr... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/1d3ab7e3bc723e29ef8bd2a0c818a03ae82ce8ad/examples/code-gen/src/Client/Requests/GetInterfaceTypes.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
module Client.Requests.GetInterfaceTypes where
import Client.Schema
import Data.Morpheus.Client.CodeGen.Internal
instance RequestType GetCharacters where
type RequestArgs GetCharacters = ()
__name _ = ... |
b848cd2c78d90fbb20d02ff7e80b0259e295e699bf59738befe5dc6545a50a77 | routineco/ocaml-nanoid | jsoo.ml | let () = Tests.generate ()
| null | https://raw.githubusercontent.com/routineco/ocaml-nanoid/9449dfb4b14cf0d0b7371e7fee7fb629109982bd/tests/jsoo.ml | ocaml | let () = Tests.generate ()
| |
2147bc6874517bb727d8ae3f12d95aef8266c8efd2cdff575180f0ba5ad95cc9 | facebook/infer | AnalysisDependencyGraph.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/5aeb1697b3f7a90ab2ab71b63842fc3ed1f14ef6/infer/src/backend/AnalysisDependencyGraph.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
62e9f5d806c4d3693e844a0e0ac9faad7b3d1db7b3c5628b309e707f2f6d0282 | BillHallahan/G2 | Intersect.hs | module Intersect where
import Prelude hiding (any, intersect, intersectBy, (\\))
intersect :: (Eq a) => [a] -> [a] -> [a]
intersect = intersectBy (==)
intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy _ [] _ = []
intersectBy _ _ [] = []
intersectBy ... | null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/Samples/Intersect.hs | haskell | intersectEq' [] _ = []
intersectEq' _ [] = [] | module Intersect where
import Prelude hiding (any, intersect, intersectBy, (\\))
intersect :: (Eq a) => [a] -> [a] -> [a]
intersect = intersectBy (==)
intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy _ [] _ = []
intersectBy _ _ [] = []
intersectBy ... |
090b089b881db9261bd3bd2180c1c212c28267ef535397204a51e25e1c6bb78b | glutamate/bugpan | SpikeDetect.hs | # LANGUAGE BangPatterns , ScopedTypeVariables , FlexibleContexts , NoMonomorphismRestriction #
module SpikeDetect where
import System . Time
import Database
import
import EvalM hiding ( ListT )
--import Eval
import
--import Stages
import Query
import QueryTypes
import Control.Monad.Trans
import Control . Monad . St... | null | https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/SpikeDetect.hs | haskell | import Eval
import Stages
import Math.Probably.PlotR
import ValueIO
import Numbers
main = allSpikes -- spikeDetectIO
ask q = liftIO$ qReply q []
sinSig :: Signal Double
multiGaussMixture :: [(Double,(Vector Double, Matrix Double))] -> Vector Double -> Double
runStatVec :: (Storable b) => Fold b c -> Vector b -> c
runSt... | # LANGUAGE BangPatterns , ScopedTypeVariables , FlexibleContexts , NoMonomorphismRestriction #
module SpikeDetect where
import System . Time
import Database
import
import EvalM hiding ( ListT )
import
import Query
import QueryTypes
import Control.Monad.Trans
import Control . Monad . State . Lazy
import HaskSyntaxUn... |
5d3c0bf008e312bc4590f301da5e4d0d77159933b8acda2f599197937ac5efba | msfm2018/Online-Service | jsx_decoder.erl | %% The MIT License
Copyright ( c ) 2010 - 2013 < >
%% 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, modi... | null | https://raw.githubusercontent.com/msfm2018/Online-Service/281c2db795f09c7e4dc6768d08d35bbe83350670/deps/jsx/src/jsx_decoder.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above co... |
Copyright ( c ) 2010 - 2013 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
a648a028476f08d79806a4a03e8cbcf20ae159e64f8268693c6eb37712b179b9 | ideas-edu/ideas | ProblemDecomposition.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeFamilies #
-----------------------------------------------------------------------------
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " a... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Service/ProblemDecomposition.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
---------------------------------------------------------------------------
| Continue with a prefix until a ce... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeFamilies #
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
Portability : ... |
f4cb5f2128a0d12bde3f5c26967df2627b0a682ec45ec335c491b38f8629b2bf | martijnbastiaan/doctest-parallel | Foo.hs | module Foo where
-- | Some documentation
foo :: Int
foo = 23
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/extract/declaration/Foo.hs | haskell | | Some documentation | module Foo where
foo :: Int
foo = 23
|
3c8600cccf1f70292948fd4bdb84af6420d5871cc3eb5d32aa609621f7597ad4 | andrewjstone/rafter | rafter_log.erl | -module(rafter_log).
-behaviour(gen_server).
-include_lib("kernel/include/file.hrl").
-include("rafter.hrl").
-include("rafter_opts.hrl").
%% API
-export([start_link/2, stop/1, append/2, check_and_append/3, binary_to_entry/1,
entry_to_binary/1,get_last_entry/1, get_entry/2, get_term/2,
get_last_inde... | null | https://raw.githubusercontent.com/andrewjstone/rafter/6bc630b487ef26770df78afbbc97995cfe0b7b5a/src/rafter_log.erl | erlang | API
gen_server callbacks
=============================================================================
Logfile Structure
=============================================================================
@doc A log is made up of a file header and entries. The header contains file
metadata and is written once at fi... | -module(rafter_log).
-behaviour(gen_server).
-include_lib("kernel/include/file.hrl").
-include("rafter.hrl").
-include("rafter_opts.hrl").
-export([start_link/2, stop/1, append/2, check_and_append/3, binary_to_entry/1,
entry_to_binary/1,get_last_entry/1, get_entry/2, get_term/2,
get_last_index/1, ge... |
395b30ff43219492214f9fd208525fd13bf1f21ffb24b421b193944204d04fd8 | nikita-volkov/graph-db | FileSystem.hs | -- |
Utilities for dealing with ' FilePath ' .
--
module Benchmarks.Util.FileSystem
(
module Filesystem,
module Filesystem.Path.CurrentOS,
Status(..),
getStatus,
getExists,
getTemporaryDirectory,
remove,
removeIfExists,
removeTreeIfExists,
move,
copy,
resolve,
l... | null | https://raw.githubusercontent.com/nikita-volkov/graph-db/3e886f6b298d2b2b09eb94c2818a7b648f42cb0a/executables/Benchmarks/Util/FileSystem.hs | haskell | |
| Utilities for dealing with ' FilePath ' .
module Benchmarks.Util.FileSystem
(
module Filesystem,
module Filesystem.Path.CurrentOS,
Status(..),
getStatus,
getExists,
getTemporaryDirectory,
remove,
removeIfExists,
removeTreeIfExists,
move,
copy,
resolve,
listFilesB... |
4bbcae4b73aeae8da621a335958e4e4136ed9d532b70f5c4683bf67be457d326 | fantasytree/fancy_game_server | emysql_tcp.erl | Copyright ( c ) 2009 - 2011
< > ,
< > ,
< > ,
%% Eonblast Corporation <>
%%
%% 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 restric-
%% tion, including with... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/apps/emysql/src/emysql_tcp.erl | erlang | Eonblast Corporation <>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
tion, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to... | Copyright ( c ) 2009 - 2011
< > ,
< > ,
< > ,
files ( the " Software"),to deal in the Software without restric-
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR... |
dcbdc962b3028fc7a7c717335c08bce4678728195d22d4513da0c8d6807340cb | NetComposer/nksip | nksip_call_event.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_call_event.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 permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@private Call dialog event... |
e98784bb7facc3e6b5f73478a94448eb777b9aa98fdc789640b159c9d87d6efa | swarm-game/swarm | TestNotification.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
SPDX - License - Identifier : BSD-3 - Clause
--
-- Swarm unit tests
module TestNotification where
import Control.Lens (Getter, Ixed (ix), view, (&), (.~), (^.), (^?!))
import Data.Text (Text)
import Data.Text qualified as T
import Swarm.Game.Robot
import Swarm.Game.State
impo... | null | https://raw.githubusercontent.com/swarm-game/swarm/affc8668b77b7e85d3d23c182a5159df36d17306/test/unit/TestNotification.hs | haskell | # LANGUAGE OverloadedStrings #
|
Swarm unit tests |
SPDX - License - Identifier : BSD-3 - Clause
module TestNotification where
import Control.Lens (Getter, Ixed (ix), view, (&), (.~), (^.), (^?!))
import Data.Text (Text)
import Data.Text qualified as T
import Swarm.Game.Robot
import Swarm.Game.State
import Test.Tasty
import Test.Tasty.HUnit
import TestUtil
testNoti... |
8ea715f9a59aafc513f52b67dda8d92e84ed49862744ef054c2454bdf0b81ffe | mjrusso/joy-of-clojure-examples | ch5.clj | (ns joc.ch5)
"You keep using that word. I do not think it means what you think it means."
Clojure persistence : re : immutable in - memory collections
Persistent collections in Clojure preserve historical versions of
; its state (all versions will have the same update and lookup
; complexity guarantees). Each in... | null | https://raw.githubusercontent.com/mjrusso/joy-of-clojure-examples/d59fddbb416ff613af63d540d3f1076de0c79bc0/src/joc/ch5.clj | clojure | its state (all versions will have the same update and lookup
complexity guarantees). Each instance of a collection is immutable
and efficient.
versus...
sequential, sequence, seq
sequential collection: holds a series of values without reordering
them
sequence: a sequential collection that represents a series of... | (ns joc.ch5)
"You keep using that word. I do not think it means what you think it means."
Clojure persistence : re : immutable in - memory collections
Persistent collections in Clojure preserve historical versions of
Java array -- NOT persistent
(def ds (into-array [:willie :barnabas :adam]))
(seq ds)
(aset ... |
0a5f2899db9aef7476684a474a6934657e9e84af486df49fa04a014f7f76eabf | victornicolet/parsynt | TermPp.ml | open Base
open Fmt
open Term
open Typ
open Utils
(* ============================================================================================= *)
(* PRETTY PRINTING *)
(* ============================================================================================= *)
let rec pp_binop (formt : Formatter.t) (b : Bi... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/lang/TermPp.ml | ocaml | =============================================================================================
PRETTY PRINTING
=============================================================================================
=============================================================================================
PRETTY PRIN... | open Base
open Fmt
open Term
open Typ
open Utils
let rec pp_binop (formt : Formatter.t) (b : Binop.t) =
if Fmt.utf_8 formt then
match b with
| Times -> Fmt.string formt "*"
| Div -> Fmt.string formt "/"
| Mod -> Fmt.string formt "%"
| Plus -> Fmt.string formt "+"
| Minus -> Fmt.string formt ... |
e9eeadfad6c0924251e459a02e746ed86136845f6d2f4ebfecc87160d55dff6c | let-def/menhir | codePieces.mli | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/codePieces.mli | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
264609fadf95bf531bc59a8ea1b32ef9fc8b143accd7f57303d0018c6bdbf5af | junegunn/lq | core_test.clj | (ns lq.core-test
(:require [clojure.test :refer :all]
[lq.core :refer :all])
(:import (java.io ByteArrayInputStream)))
(defn ->req
([method uri]
{:remote-addr "localhost"
:request-method method
:uri uri
:body (ByteArrayInputStream. (byte-array 0))})
([method uri lines]
{:remote-ad... | null | https://raw.githubusercontent.com/junegunn/lq/f4d698a34e53ceecf3cccc39898defcc3e72b561/test/lq/core_test.clj | clojure | foo: a b => a b c e
bar: c d e => d
foo: a b c e | (ns lq.core-test
(:require [clojure.test :refer :all]
[lq.core :refer :all])
(:import (java.io ByteArrayInputStream)))
(defn ->req
([method uri]
{:remote-addr "localhost"
:request-method method
:uri uri
:body (ByteArrayInputStream. (byte-array 0))})
([method uri lines]
{:remote-ad... |
3816906a4016bd906a89690123c286790e901551220ffe7f2aeb313de035ef65 | metabase/metabase | revision.clj | (ns metabase.models.revision
(:require
[clojure.data :as data]
[metabase.models.interface :as mi]
[metabase.models.revision.diff :refer [diff-string]]
[metabase.models.user :refer [User]]
[metabase.util :as u]
[metabase.util.i18n :refer [tru]]
[toucan.db :as db]
[toucan.hydrate :refer [hydrate... | null | https://raw.githubusercontent.com/metabase/metabase/b1298421ac2d7b157bb3578ac1679a0da6ba8f9f/src/metabase/models/revision.clj | clojure | no default implementation for [[serialize-instance]]; models need to implement this themselves.
# Revision Entity
in some cases (such as tests) we have 'fake' models that cannot be resolved normally; don't fail entirely in
those cases
# Functions
add revision user details
Filter out irrelevant info
TODO - rewri... | (ns metabase.models.revision
(:require
[clojure.data :as data]
[metabase.models.interface :as mi]
[metabase.models.revision.diff :refer [diff-string]]
[metabase.models.user :refer [User]]
[metabase.util :as u]
[metabase.util.i18n :refer [tru]]
[toucan.db :as db]
[toucan.hydrate :refer [hydrate... |
797784eec948c998458c4ce3f25e5997e959593052a6337c8f5eec5ace4f9977 | haskell/haskell-language-server | PunGADT.expected.hs | {-# LANGUAGE GADTs #-}
data GADT a where
GADT ::
{ blah :: Int
, bar :: a
} -> GADT a
split :: GADT a -> a
split GADT {blah, bar} = _w0
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/PunGADT.expected.hs | haskell | # LANGUAGE GADTs # |
data GADT a where
GADT ::
{ blah :: Int
, bar :: a
} -> GADT a
split :: GADT a -> a
split GADT {blah, bar} = _w0
|
dfbffaeb2d465273c5f7226599e5f5bb094548b1822448dde9330776a3ebf6ec | UnixJunkie/vp-tree | myArray.ml | (* extend the Array module *)
include Array
(* smaller array, without elt at index 'i' *)
let remove i a =
let n = length a in
assert(i >= 0 && i < n);
let res = make (n - 1) (unsafe_get a 0) in
let j = ref 0 in
for i' = 0 to n - 1 do
if i' <> i then
(unsafe_set res !j (unsafe_get a i');
in... | null | https://raw.githubusercontent.com/UnixJunkie/vp-tree/d16e67ea9cf6b81dfb080643435e5d5e22c70dc7/src/myArray.ml | ocaml | extend the Array module
smaller array, without elt at index 'i'
<=> List.partition
<=> List.split
<=> BatArray.min_max with default value in case of empty array |
include Array
let remove i a =
let n = length a in
assert(i >= 0 && i < n);
let res = make (n - 1) (unsafe_get a 0) in
let j = ref 0 in
for i' = 0 to n - 1 do
if i' <> i then
(unsafe_set res !j (unsafe_get a i');
incr j)
done;
res
let partition p a =
let ok, ko =
fold_right (fun ... |
aea3d0f4fa7e6e5e0a60c27c00ea34f2f33c4c69e464dc890c8493b3349f5992 | ocaml-multicore/tezos | p256.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/lib_protocol_environment/structs/v0/p256.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
4a71256b1fa553046af9ebd00e57900efc1ac2a0231c2288f5904f2f4a5eb4c4 | emezeske/lein-cljsbuild | project.clj | (defproject cljsbuild "1.1.8"
:description "ClojureScript Autobuilder"
:url "-cljsbuild"
:license
{:name "Eclipse Public License - v 1.0"
:url "-v10.html"
:distribution :repo}
:dependencies
[[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-3211"
:exclusions [org.apache... | null | https://raw.githubusercontent.com/emezeske/lein-cljsbuild/089193c74e362c143d30dfca21a21e95c7ca112a/support/project.clj | clojure | (defproject cljsbuild "1.1.8"
:description "ClojureScript Autobuilder"
:url "-cljsbuild"
:license
{:name "Eclipse Public License - v 1.0"
:url "-v10.html"
:distribution :repo}
:dependencies
[[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-3211"
:exclusions [org.apache... | |
37bcb67e8d5a4ad05f8ebc2d96a58fd4b64c5aadc7ed59326138efecd387c7b5 | unison-code/uni-instr-sel | MakeLowLevelModelDump.hs | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | null | https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/uni-is/UniIS/Drivers/MakeLowLevelModelDump.hs | haskell | -----------
Functions
-----------
| Function for executing this driver.
Cast needed to prevent compiler warning
Cast needed to prevent compiler warning
Cast needed to prevent compiler warning
Cast needed to prevent compiler warning
Cast needed to prevent compiler warning
Cast needed to prevent compiler warning
... | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... |
aa85509d0a1ecc0d39ebab4d7b5e7341de802036960449d740d3ace232e7f74d | david-christiansen/pudding-old | second-order-refiner.rkt | #lang racket
(require
;; Make definitions with the refiner
"../refiner-define.rkt"
;; The theory and tactics we care about
(for-syntax "../theories/second-order.rkt"
"../tactics.rkt"
"../proofs.rkt"
"../proof-state.rkt"
zippers
racket/list))
(modul... | null | https://raw.githubusercontent.com/david-christiansen/pudding-old/6b9ee633b551226df61d40191bafa14386fc86ad/demo/second-order-refiner.rkt | racket | Make definitions with the refiner
The theory and tactics we care about | #lang racket
(require
"../refiner-define.rkt"
(for-syntax "../theories/second-order.rkt"
"../tactics.rkt"
"../proofs.rkt"
"../proof-state.rkt"
zippers
racket/list))
(module+ test
(require rackunit))
(define-for-syntax (solve-with rule)
(proof (r... |
47736aae589b375d093b8689beb52cb07da40ee8dbc78f41ad83d0c9a8a34ac1 | exercism/erlang | complex_numbers_tests.erl | Generated with ' v0.2.0 '
%% Revision 1 of the exercises generator was used
%% -specifications/raw/d137db179c6a760be6aa6e38ac0110e96be0b9ff/exercises/complex-numbers/canonical-data.json
%% This file is automatically generated from the exercises canonical data.
-module(complex_numbers_tests).
-include_lib("erl_exer... | null | https://raw.githubusercontent.com/exercism/erlang/9b3d3c14ef826e7efbc4fcd024fd20ed09332562/exercises/practice/complex-numbers/test/complex_numbers_tests.erl | erlang | Revision 1 of the exercises generator was used
-specifications/raw/d137db179c6a760be6aa6e38ac0110e96be0b9ff/exercises/complex-numbers/canonical-data.json
This file is automatically generated from the exercises canonical data. | Generated with ' v0.2.0 '
-module(complex_numbers_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
'1_real_part_of_a_purely_real_number_test_'() ->
{"Real part of a purely real number",
?_assert(1 ==
complex_numbers:real(complex_numbers:new(1, 0)))}... |
f1e8a090d2128aca97ffc5eb9899e3f30aaf6bd34de30872d6608581a98d0a13 | agrison/cljwebauthn | b64.clj | (ns cljwebauthn.b64
(:import java.util.Base64))
(defn encode
"Base64 encode the given String."
[^String to-encode]
(.encodeToString (Base64/getEncoder) (.getBytes to-encode)))
(defn decode
"Base64 decode the given String."
[^String to-decode]
(String. (.decode (Base64/getDecoder) to-decode)))
(defn enc... | null | https://raw.githubusercontent.com/agrison/cljwebauthn/3b3577ff126dd5bc42ac0f226ca4de63be33b8ef/src/cljwebauthn/b64.clj | clojure | (ns cljwebauthn.b64
(:import java.util.Base64))
(defn encode
"Base64 encode the given String."
[^String to-encode]
(.encodeToString (Base64/getEncoder) (.getBytes to-encode)))
(defn decode
"Base64 decode the given String."
[^String to-decode]
(String. (.decode (Base64/getDecoder) to-decode)))
(defn enc... | |
9bfed4c04281e81b1b793f4eb5e7062247fe5df57e59f92308360f6abd5946c4 | seriyps/xhttpc | redirect_middleware.erl | @author < >
( C ) 2012 ,
%%% @doc
%%% HTTP redirect middleware.
%%% Follow HTTP redirects (301/302/303).
%%% Can detect infinite redirect loops.
%%% XXX: This middleware MUST be the outermost one, because it can perform
%%% additional HTTP requests with the same session. So, if you, for example,
%%% place coo... | null | https://raw.githubusercontent.com/seriyps/xhttpc/ae5a8ab5f1d9a301e31dcf0b0b464de747816637/src/middlewares/redirect_middleware.erl | erlang | @doc
HTTP redirect middleware.
Follow HTTP redirects (301/302/303).
Can detect infinite redirect loops.
XXX: This middleware MUST be the outermost one, because it can perform
additional HTTP requests with the same session. So, if you, for example,
place cookie middleware after redirect middleware, you can loose ... | @author < >
( C ) 2012 ,
Created : 8 Oct 2012 by < >
-module(redirect_middleware).
-behaviour(xhttpc_middleware).
-export([init/1, request/3, response/4, call/2, terminate/2]).
-export([absolute_url/2, format_url/1]).
-include("xhttpc.hrl").
init(Opts) ->
MaxDepth = proplists:get_value(max_dept... |
8747598a48bad57f1cedd4bcbcc7dd7267df268f9d1019ec1ea149288e02be7e | kudelskisecurity/scannerl | utils.erl | %% utils
-module(utils).
-author("Adrien Giner - ").
-export([get_ts/0, scaninfo_print/1]).
-export([debug_parse/1, debug_print/2, debug/4]).
-export([outputs_init/2, outputs_clean/1, outputs_send/2]).
-export([read_lines/1, tgt_to_string/1, merge_sockopt/2]).
-export([replace_in_list_of_tuple/3]).
-include("../incl... | null | https://raw.githubusercontent.com/kudelskisecurity/scannerl/8133065030d014401c47b2470e67a36e9df81b1e/src/utils/utils.erl | erlang | utils
output
output utils
send message to output modules
init output modules
returns either
{error, Reason}
init the module
clean output modules
utils
get current timestamp
IP to string
merge socket options
left, right list of options
where right is prefered
replace a specific tuple in a list
t... |
-module(utils).
-author("Adrien Giner - ").
-export([get_ts/0, scaninfo_print/1]).
-export([debug_parse/1, debug_print/2, debug/4]).
-export([outputs_init/2, outputs_clean/1, outputs_send/2]).
-export([read_lines/1, tgt_to_string/1, merge_sockopt/2]).
-export([replace_in_list_of_tuple/3]).
-include("../includes/opts... |
96d016e148fbb7a6048f327421bf308b484b70cb9bbb17aa21e1c23b2fba20f6 | realworldocaml/book | syntax.mli | (** Management of syntaxes *)
open! Stdune
module Version : sig
(** A syntax version.
It is always assumed that a parser with version [(X, Y)] can read the
output produced by a printer at version [(X, Z)] for any [Z <= Y]. *)
type t = int * int
include Conv.S with type t := t
val to_dyn : t Dyn... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_sexp/syntax.mli | ocaml | * Management of syntaxes
* A syntax version.
It is always assumed that a parser with version [(X, Y)] can read the
output produced by a printer at version [(X, Z)] for any [Z <= Y].
* Whether the parser can read the data or not
* [create ~name ~desc supported_versions] defines a new syntax.
[support... |
open! Stdune
module Version : sig
type t = int * int
include Conv.S with type t := t
val to_dyn : t Dyn.builder
val hash : t -> int
val equal : t -> t -> bool
val to_string : t -> string
val can_read : parser_version:t -> data_version:t -> bool
val compare : t -> t -> Ordering.t
val min : t ... |
444947a22dfa79ddfee2bc5ff3bce8f54adedaec0396e3fb1d36c9c08f8cf7e9 | facebook/infer | context.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/9d9a3a42b75697db86bc0da3092137f175782773/sledge/src/fol/context.mli | ocaml | * Sets of assumptions, interpreted as conjunction, plus reasoning about
their logical consequences.
Functions that return contexts that might be stronger than their
argument contexts accept and return a set of variables. The input set is
the variables with which any generated variables must be chosen f... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
9f53d638e85215dccb0be61d2fad8068b33540d8409e5dc401f4c9fb4c79fbe2 | dgiot/dgiot | dgiot_tdengine_field.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/4dd50feeb052c1fce5c0c1d5787c73f662d66cae/apps/dgiot_tdengine/src/utils/dgiot_tdengine_field.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_tdengine_field).
-author("jonliu").
-include("dgiot_tdengine.hrl").
-include_lib... |
d13f8b4c1ea7296b686d2c003f8dd85d16440b60011ff1961c9a6a4e457971a0 | FundingCircle/jackdaw | schema_registry.clj | (ns jackdaw.serdes.avro.schema-registry
"Helpers for talking to one of Confluent's Avro schema registries."
{:license "BSD 3-Clause License <>"}
(:import [io.confluent.kafka.schemaregistry.client
MockSchemaRegistryClient
CachedSchemaRegistryClient]))
(set! *warn-on-reflection* true)
(def... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/b4f67106cc12a78d9dcc64b6cba668ab6a804d04/src/jackdaw/serdes/avro/schema_registry.clj | clojure | (ns jackdaw.serdes.avro.schema-registry
"Helpers for talking to one of Confluent's Avro schema registries."
{:license "BSD 3-Clause License <>"}
(:import [io.confluent.kafka.schemaregistry.client
MockSchemaRegistryClient
CachedSchemaRegistryClient]))
(set! *warn-on-reflection* true)
(def... | |
5c4d632aaabe4b3ea8e0252eb9539fb07b2bc3f2a53160365f06ec603802c731 | pitag-ha/ppx_fprint | decomposition.ml | open Rresult
type t = string * string list [@@deriving show, eq]
type loc_in_string = In_var | In_string
let invalid_var_err_msg = "Syntax error in spf payload: variable names cannot contain brackets."
let spare_right_bracket_err_msg = "Syntax error in spf payload: found a right bracket without matching left brack... | null | https://raw.githubusercontent.com/pitag-ha/ppx_fprint/98506a3c8b3e3af04ab31a31fa5a4c1148c5a022/src/lib/decomposition.ml | ocaml | Theoretically, this never happens | open Rresult
type t = string * string list [@@deriving show, eq]
type loc_in_string = In_var | In_string
let invalid_var_err_msg = "Syntax error in spf payload: variable names cannot contain brackets."
let spare_right_bracket_err_msg = "Syntax error in spf payload: found a right bracket without matching left brack... |
1800b146c9ec61c9a1b65d31e73d841cdddae3b42aafda861ccb578fb9190f07 | rvirding/luerl | luerl_lib_string.erl | Copyright ( c ) 2013 - 2021
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed... | null | https://raw.githubusercontent.com/rvirding/luerl/c8166b4ab0df4be930706f988aa833dfd50160ad/src/luerl_lib_string.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 perm... | Copyright ( c ) 2013 - 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author :
Purpose : The string library for Luerl .
-module(luerl_lib_string).
-include("luerl.hrl").
-export([install/1]).
-export([t... |
1fa26627dcca79404d776fb6673e0498938be48b4b07074bc86cda16dcef2b79 | roburio/dns-primary-git | config.ml | ( c ) 2017 , 2018 , all rights reserved
open Mirage
let remote_k =
let doc = Key.Arg.info ~doc:"Remote git repository. Use '#' as a separator for a branch name." ["r"; "remote"] in
Key.(create "remote" Arg.(opt string "" doc))
let axfr =
let doc = Key.Arg.info ~doc:"Allow unauthenticated zone transfer." ["... | null | https://raw.githubusercontent.com/roburio/dns-primary-git/158958a2cddf453e96baeb9c7cd55c02f8f8a16a/config.ml | ocaml | ( c ) 2017 , 2018 , all rights reserved
open Mirage
let remote_k =
let doc = Key.Arg.info ~doc:"Remote git repository. Use '#' as a separator for a branch name." ["r"; "remote"] in
Key.(create "remote" Arg.(opt string "" doc))
let axfr =
let doc = Key.Arg.info ~doc:"Allow unauthenticated zone transfer." ["... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.