_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
1b8a7fae80469538a66fbf7ad68171440e4036b5880e747a8fbfb3aad78eefbe
antoniogarrote/egearmand-server
workers_registry.erl
-module(workers_registry) . %% @doc %% A registry of all the workers in the cluster. -author("Antonio Garrote Hernandez") . -behaviour(gen_server) . -include_lib("states.hrl") . -include_lib("eunit/include/eunit.hrl"). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). -export([start_link...
null
https://raw.githubusercontent.com/antoniogarrote/egearmand-server/45296fb40e3ddb77f71225121188545a371d2237/src/workers_registry.erl
erlang
@doc A registry of all the workers in the cluster. Public API @doc Establishes the connection. @doc log:debug(["workers_registry : registering worker", WorkerProxyInfo]), @doc @doc Checks if any worker in the registry has the handle in their current jobs. @doc Updates the state of a worker proxy setting the ...
-module(workers_registry) . -author("Antonio Garrote Hernandez") . -behaviour(gen_server) . -include_lib("states.hrl") . -include_lib("eunit/include/eunit.hrl"). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). -export([start_link/0, register_worker_proxy/1, unregister_worker_proxy/1, u...
eb289e0a3ff8db2e94fe2e22e097f9ed1c7155bbfef6f93e3af6fbfe61ce2057
tweag/lagoon
Main.hs
# LANGUAGE LambdaCase # module Main where import Test.Hspec import Data.Conduit import Control.Monad import Test.QuickCheck import qualified Data.List.NonEmpty as NE import Lagoon.Util.Conduit import qualified Data.Conduit.List as CL import Test.Hspec.QuickCheck (modifyMaxSize) main :: IO () main = hspec $ do des...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/backend/conduit-compact-test/Main.hs
haskell
# LANGUAGE LambdaCase # module Main where import Test.Hspec import Data.Conduit import Control.Monad import Test.QuickCheck import qualified Data.List.NonEmpty as NE import Lagoon.Util.Conduit import qualified Data.Conduit.List as CL import Test.Hspec.QuickCheck (modifyMaxSize) main :: IO () main = hspec $ do des...
dd7e67e4b402f93aa8a02e439b2409c669a1058a6e1f16543c84518bbc5185dd
objecthub/swift-lispkit
SRFI-144.scm
SRFI 144 REGRESSION TEST SUITE ;;; This is the test suite for SRFI 144 . ;;; ;;; Implementation of original test suite: Copyright © 2017 . All rights reserved . ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ( the " Sof...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/0bc3dce1c86788a2e169c598fa5ab3fd67f6c466/Sources/LispKit/Resources/Tests/SRFI-144.scm
scheme
Implementation of original test suite: Permission is hereby granted, free of charge, to any person obtaining a copy of this without restriction, including without limitation the rights to use, copy, modify, conditions: The above copyright notice and this permission notice shall be included in all copies INCL...
SRFI 144 REGRESSION TEST SUITE This is the test suite for SRFI 144 . Copyright © 2017 . All rights reserved . software and associated documentation files ( the " Software " ) , to deal in the Software merge , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons t...
0b0704a3b6bf1239c98a4ec05f9e0dbcbe53590cf5874217cb033237d34bd276
fogfish/typhoon
scenario_sup.erl
%% %% Copyright 2015 Zalando SE %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/scenario/src/scenario_sup.erl
erlang
Copyright 2015 Zalando SE 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 Licens...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(scenario_sup). -behaviour(supervisor). -author(''). -export([ start_link/0, init/1 ]). -define(CHILD(Type, I), {I, {I, start_link, []}, transient,...
a6ae86e1e4bb1124448ddd09725d66eb908087189af68474fc606d051e9ddf00
heraldry/heraldicon
change_temporary_password.cljs
(ns heraldicon.frontend.user.form.change-temporary-password (:require [clojure.string :as str] [heraldicon.frontend.aws.cognito :as cognito] [heraldicon.frontend.language :refer [tr]] [heraldicon.frontend.message :as message] [heraldicon.frontend.modal :as modal] [heraldicon.frontend.user.form.core ...
null
https://raw.githubusercontent.com/heraldry/heraldicon/54e003614cf2c14cda496ef36358059ba78275b0/src/heraldicon/frontend/user/form/change_temporary_password.cljs
clojure
(ns heraldicon.frontend.user.form.change-temporary-password (:require [clojure.string :as str] [heraldicon.frontend.aws.cognito :as cognito] [heraldicon.frontend.language :refer [tr]] [heraldicon.frontend.message :as message] [heraldicon.frontend.modal :as modal] [heraldicon.frontend.user.form.core ...
0d548e66d237348b039562480bf502e5ea42c024a6a069f5e75aaeb13f47e6db
yangchenyun/learning-sicp
ps8-ans.scm
;a possible test for AND-PROC correctness: ( and - proc ( begin ( pp 1 ) # t ) ( begin ( pp 2 ) # f ) ( begin ( pp 3 ) ) ) ;;; For defining, using dotted-list formal params, procedures with varying numnber of args (define (process-arg-procs params aprocs env) (let ((params (undot params)) (aprocs (match...
null
https://raw.githubusercontent.com/yangchenyun/learning-sicp/99a19a06eddc282e0eb364536e297f27c32a9145/practices/assignments/14.evaluators/ps8-ans.scm
scheme
a possible test for AND-PROC correctness: For defining, using dotted-list formal params, procedures now back to the old process-arg-procs body: slightly revised from PS8 for clarity (define (undot params) <blob6a>) ;a possible test for AND correctness:
( and - proc ( begin ( pp 1 ) # t ) ( begin ( pp 2 ) # f ) ( begin ( pp 3 ) ) ) with varying numnber of args (define (process-arg-procs params aprocs env) (let ((params (undot params)) (aprocs (matchup-args params aprocs))) (map (lambda (param aproc) (cond ((variable? param) (aproc env)) ...
555d33f5ecc16a6a2b72bf71e2165d4028e3210659152c5fbb5252e6c5c4baa9
jcclinton/wow-emulator
update_mask.erl
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x %% Copyright ( C ) 2014 < jamieclinton.com > %% %% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Found...
null
https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/lib/update_mask.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU G...
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x Copyright ( C ) 2014 < jamieclinton.com > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy...
d178ce8351af611dc2dbf55c3781305ec00126f1c8cc1f98f01bf76aca431bce
raehik/binrep
Generic.hs
# LANGUAGE AllowAmbiguousTypes # module Util.Generic where import GHC.Generics -- | 'datatypeName' without the value (only used as a proxy). Lets us push our ' undefined 's into one place . datatypeName' :: forall d. Datatype d => String datatypeName' = datatypeName @d undefined -- | 'conName' without the value...
null
https://raw.githubusercontent.com/raehik/binrep/4c60cdc59f60444c3dbfc708a13968b79d52c82d/src/Util/Generic.hs
haskell
| 'datatypeName' without the value (only used as a proxy). Lets us push our | 'conName' without the value (only used as a proxy). Lets us push our | 'selName' without the value (only used as a proxy). Lets us push our | Get the record name for a selector if present. On the type level, a 'Maybe Symbol' is stored f...
# LANGUAGE AllowAmbiguousTypes # module Util.Generic where import GHC.Generics ' undefined 's into one place . datatypeName' :: forall d. Datatype d => String datatypeName' = datatypeName @d undefined ' undefined 's into one place . conName' :: forall c. Constructor c => String conName' = conName @c undefin...
b1a23577e20404aa5c32275fef480c963d4c066a90fa992d9c692c5f0c476c75
balsoft/lambda-launcher
UrbanDictionary.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE DeriveGeneric # module LambdaLauncher.Plugins.UrbanDictionary where import LambdaLauncher.Plugins.Support import LambdaLauncher.Types import Control.Monad.IO.Class (liftIO) import Data.Aeson import Data.Text (Text) import Network.HTTP.Req imp...
null
https://raw.githubusercontent.com/balsoft/lambda-launcher/0f04c9d41a8ae64e7b28c68b7315a6c6e55765a8/src/LambdaLauncher/Plugins/UrbanDictionary.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # # LANGUAGE DeriveGeneric # module LambdaLauncher.Plugins.UrbanDictionary where import LambdaLauncher.Plugins.Support import LambdaLauncher.Types import Control.Monad.IO.Class (liftIO) import Data.Aeson import Data.Text (Text) import Network.HTTP.Req import GHC.Generics data Definition =...
c23c2151eaa95dbf862563d2a36b216f86a755673f8342f03f266b892678a604
dwayne/eopl3
mutpair.rkt
#lang eopl (require "./store.rkt") (provide newpair left right setleft setright mutpair?) (define (mutpair? v) (reference? v)) newpair : ExpVal x ExpVal - > MutPair (define (newpair val1 val2) (let ([r1 (newref val1)] [r2 (newref val2)]) r1)) left : MutPair - > ExpVal (define (left p) ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/MUTABLE-PAIRS-4.30/mutpair.rkt
racket
setleft : MutPair x ExpVal -> Unspecified setright : MutPair x ExpVal -> Unspecified
#lang eopl (require "./store.rkt") (provide newpair left right setleft setright mutpair?) (define (mutpair? v) (reference? v)) newpair : ExpVal x ExpVal - > MutPair (define (newpair val1 val2) (let ([r1 (newref val1)] [r2 (newref val2)]) r1)) left : MutPair - > ExpVal (define (left p) ...
9197e1eb039d7271649c0a83ca40cb4caedb3a3363d960219a9d60d4c91b6131
janegca/htdp2e
Exercise-376-overflow.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-376-overflow) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constr...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intermezzo-Numbers/Exercise-376-overflow.rkt
racket
about the language level of this file in a form that our tools can easily process. (expt #i10.0 n) is an inexact number while (expt #i10. (+ n 1)) is approximated with +inf.0. Hint Design a function to compute n. #i1e+308 #i+inf.0
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-376-overflow) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) Exercise 376 . ISL+ uses + inf.0 to de...
dfe3391ca0e5d2bfbfa2dd5d49fa78277ac84fc7308a80d45f82ededeff8297f
redbadger/karma-tracker
events.clj
(ns karma-tracker.events (:require [clojure.spec :as s])) (def types {"PullRequestEvent" :pull-request "PullRequestReviewEvent" :pull-request-review "PullRequestReviewCommentEvent" :pull-request-review-comment "IssuesEvent" :issue ...
null
https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/src/karma_tracker/events.clj
clojure
{:post [(s/valid? ::event %)]}
(ns karma-tracker.events (:require [clojure.spec :as s])) (def types {"PullRequestEvent" :pull-request "PullRequestReviewEvent" :pull-request-review "PullRequestReviewCommentEvent" :pull-request-review-comment "IssuesEvent" :issue ...
547e9bcef94b5911902afea059bf30f85a40e37e6a38c49b377d9cc00141b6c4
Haskallywags/school-of-haskell
StackVM.hs
module Provided.StackVM ( StackVal(..) , StackExp(..) , Stack , Program , stackVM ) where -- Values that may appear in the stack. Such a value will also be -- returned by the stackVM program execution function. data StackVal = IVal Integer | BVal Bool | Void deriving (Eq, Show) -- The various expressions our ...
null
https://raw.githubusercontent.com/Haskallywags/school-of-haskell/bf4475d2b1dff6165ea20461d87f4ce77aaedcf9/cis194/homework-5/src/Provided/StackVM.hs
haskell
Values that may appear in the stack. Such a value will also be returned by the stackVM program execution function. The various expressions our VM understands. Execute the given program. Returns either an error message or the value on top of the stack after execution. Execute a program against a given stack.
module Provided.StackVM ( StackVal(..) , StackExp(..) , Stack , Program , stackVM ) where data StackVal = IVal Integer | BVal Bool | Void deriving (Eq, Show) data StackExp = PushI Integer | PushB Bool | Add | Mul | And | Or deriving (Eq, Show) type Stack = [StackVal] type Program = [StackExp]...
e86267e5ba711f0127a53963d07d3daeb031cd964a8aad62d8724eb9b788c9f2
vmchale/command-line-tweeter
Types.hs
-- | Exports the `Tweet` type, a datatype for building tweets easily module Web.Tweet.Types where import Lens.Micro import Web.Authenticate.OAuth -- | Data type for our request: consists of the status text, whether to trium u information in the response, the handles to mention, and optionally the ...
null
https://raw.githubusercontent.com/vmchale/command-line-tweeter/53314340c5bc7dda4de78072790c2c36e180c0ca/src/Web/Tweet/Types.hs
haskell
| Exports the `Tweet` type, a datatype for building tweets easily | Data type for our request: consists of the status text, whether to trium u information in the response, the handles to mention, and optionally the id of the status to reply to. | Data type for tweets as they are returned | Stores data like (name, t...
module Web.Tweet.Types where import Lens.Micro import Web.Authenticate.OAuth data Tweet = Tweet { _status :: String , _handles :: [String] , _replyID :: Maybe Int } data TweetEntity = TweetEntity { _text :: String , _replyTo :: Maybe Int , _name :: Stri...
c00e80a986bc19a5363fcbe87db99e7ed4cb9930e18b4ee30512ca037b90f220
snoyberg/conduit
Acquire.hs
# LANGUAGE CPP # | This was previously known as the Resource monad . However , that term is -- confusing next to the ResourceT transformer, so it has been renamed. module Data.Acquire ( Acquire -- * Example usage of 'Acquire' for allocating a resource and freeing it up. -- -- | The code makes use of 'mkAcquire' ...
null
https://raw.githubusercontent.com/snoyberg/conduit/1771780ff4b606296924a28bf5d4433ae6a916f3/resourcet/Data/Acquire.hs
haskell
confusing next to the ResourceT transformer, so it has been renamed. * Example usage of 'Acquire' for allocating a resource and freeing it up. | The code makes use of 'mkAcquire' to create an 'Acquire' and uses 'allocateAcquire' to allocate the resource and register an action to free up the resource. === __Reprod...
# LANGUAGE CPP # | This was previously known as the Resource monad . However , that term is module Data.Acquire ( Acquire > import Data . Acquire > import Control . Monad . Trans . Resource > import Control . Monad . IO.Class > ( releaseKey , resource ) < - allocateAcquire ack > liftIO $ putS...
a4ab9a05315341bdd197a9afc62361948de14cb120f8c918af442f047e9d4576
futurice/haskell-mega-repo
API.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} module Futurice.App.PlanMillSync.API where import Futurice.Lucid.Foundation (HtmlPage) import Futurice.Prelude import Futurice.Servant...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/planmill-sync/src/Futurice/App/PlanMillSync/API.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # actions ----------------------------------------------------------------------------- Actions -----------------------------------------------------------------------------
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Futurice.App.PlanMillSync.API where import Futurice.Lucid.Foundation (HtmlPage) import Futurice.Prelude import Futurice.Servant import Prelude () import Servant import qualified FUM.Types.Login as FUM ty...
a0a57314542362b54bd9497967734b2a19346184bedeab5284b522acc145d55b
esl/erlang-web
erlydtl.erl
%%%------------------------------------------------------------------- %%% File: erlydtl.erl @author < > [ ] @author < > 2008 , %%% @doc %%% Public interface for ErlyDTL %%% @end %%% %%% The MIT License %%% Copyright ( c ) 2008 , %%% %%% Permission is hereby granted, free of cha...
null
https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/erlydtl-0.5.3/src/erlydtl/erlydtl.erl
erlang
------------------------------------------------------------------- File: erlydtl.erl @doc Public interface for ErlyDTL @end 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 u...
@author < > [ ] @author < > 2008 , Copyright ( c ) 2008 , 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 PROV...
1abe62495422a19c54b3bc92964ada7a86bb3ea2da9a510bbe3ab9f2c604a40f
ekmett/linear-accelerate
doctests.hs
----------------------------------------------------------------------------- -- | -- Module : Main (doctests) Copyright : ( C ) 2012 - 14 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : provisional -- Portability : portable -- -- This module provides doct...
null
https://raw.githubusercontent.com/ekmett/linear-accelerate/7b2438c93add45e0ac884b09ff009036d3e540eb/tests/doctests.hs
haskell
--------------------------------------------------------------------------- | Module : Main (doctests) License : BSD-style (see the file LICENSE) Stability : provisional Portability : portable This module provides doctests for a project based on the actual versions to be added to the project ----...
Copyright : ( C ) 2012 - 14 Maintainer : < > of the packages it was built with . It requires a corresponding Setup.lhs module Main where import Build_doctests (flags, pkgs, module_sources) import Data.Foldable (traverse_) import Test.DocTest main :: IO () main = do traverse_ putStrLn args ...
1da643b87aac53c0fb04f90d4c896059d39afbd912376087869c603ea4f57852
casperschipper/ocaml-cisp
ssp2.ml
open Cisp let ( ) = let env = triangle ( st 50.0 ) | > Seq.map ( linlin ( -1.0 ) 1.0 400.0 12000.0 ) in let ( ) = osc env in Jack.playSeqs 0 Process.sample_rate [ effect masterClock ( oscil ( ) ) ; ( ) ; ( ) ; ( ) ] let () = let env = triangle (st 50.0) |> Seq.map (linlin (-1.0) 1.0 400.0 12000....
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/ssp2.ml
ocaml
open Cisp let ( ) = let env = triangle ( st 50.0 ) | > Seq.map ( linlin ( -1.0 ) 1.0 400.0 12000.0 ) in let ( ) = osc env in Jack.playSeqs 0 Process.sample_rate [ effect masterClock ( oscil ( ) ) ; ( ) ; ( ) ; ( ) ] let () = let env = triangle (st 50.0) |> Seq.map (linlin (-1.0) 1.0 400.0 12000....
f1ead850765975e611b657a8e7f6895704f6323459c125a49006d4886e6221a4
jhickner/smtp-mail
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Network.Mail.SMTP hiding (simpleMail) import Network.Mail.Mime (simpleMail) import System.Environment as Env import Test.Hspec import Test.Hspec.Expectations from = Address Nothing "" to = Address (Just "alice") "" subject = "Test Mail" body...
null
https://raw.githubusercontent.com/jhickner/smtp-mail/907bbbd4d9c7f293b19595b761e73536578e0c1c/nix-integration-test/integration-test/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Network.Mail.SMTP hiding (simpleMail) import Network.Mail.Mime (simpleMail) import System.Environment as Env import Test.Hspec import Test.Hspec.Expectations from = Address Nothing "" to = Address (Just "alice") "" subject = "Test Mail" body = "Test Mail Body Part" html...
96a3d2b19bd016ee3fbbb353e5ccd26b390de2f5855cd26e95c7896ae48d2457
ilyasergey/monadic-cfa
NonShared.hs
# LANGUAGE TypeOperators # # LANGUAGE ParallelListComp # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE TupleSections # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE ImplicitParams # module CFA.CESK.Analysis.NonShared where...
null
https://raw.githubusercontent.com/ilyasergey/monadic-cfa/caeb9e5375affe9c3cdee0753ae2ba489cdc328a/CFA/CESK/Analysis/NonShared.hs
haskell
# LANGUAGE TypeSynonymInstances # -------------------------------------------------------------------- ABSTRACT INTERPRETATION -------------------------------------------------------------------- abstract allocator function nondeterministic because of stored continuations ----------------------------------------...
# LANGUAGE TypeOperators # # LANGUAGE ParallelListComp # # LANGUAGE TupleSections # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE ImplicitParams # module CFA.CESK.Analysis.NonShared where import Data.Map as Map import Data.S...
0d7f0e625f6259a0c58290c3067e38ca92d51ef31a713b8d90fcff03252efe9c
backtracking/ocamlgraph
leaderlist.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/leaderlist.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking Copyrig...
da653e03eb804944dac08bcca6c3feec82d60f85da36e299b67b9e11f44a35dd
baryluk/ex11
ex11_lib.erl
-module(ex11_lib). Copyright ( C ) 2003 , 2004 by ( ) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. T...
null
https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/lib/ex11_lib.erl
erlang
All rights reserved. The copyright holder hereby grants the rights of usage, distribution and modification of this software to everyone and for any purpose, as long as this license and the copyright notice above are preserved and not modified. There is no warranty for this software. these are the widgets command...
-module(ex11_lib). Copyright ( C ) 2003 , 2004 by ( ) 2003 - 12- ? ? Original version by 2004 - 02 - 15 Added initial support for using multiple screens < > -define(Vsn, "3.1"). -export([colors/0, mkArc/6, mkPoint/2, mkRectangle/4, eAllocColor/4, eAllocNamedColor/2, eChangeGC/2...
1a3c411742a8d450ccc121b02fc0f57866ba01c7c44966f7a9deae420b7edd34
ocurrent/ocaml-multicore-ci
opam_monorepo.ml
type info = string * OpamFile.OPAM.t type lock_file_version = V0_1 | V0_2 [@@deriving yojson, ord] type config = { package : string; selection : Selection.t; lock_file_version : lock_file_version; } [@@deriving yojson, ord] let selection_of_config c = c.selection let only_lockfile_in ~dir = let opam_locked =...
null
https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/lib/opam_monorepo.ml
ocaml
type info = string * OpamFile.OPAM.t type lock_file_version = V0_1 | V0_2 [@@deriving yojson, ord] type config = { package : string; selection : Selection.t; lock_file_version : lock_file_version; } [@@deriving yojson, ord] let selection_of_config c = c.selection let only_lockfile_in ~dir = let opam_locked =...
a67317d086c5243962553a91c0128d926154efce8d6d1d3ba14ba64625d11733
v-kolesnikov/sicp
2_77.clj
(ns sicp.chapter02.2-77 (:require [sicp.common :as sicp] [sicp.common.dispatch-table :as dt] [sicp.chapter02.2-77.scheme-number :as math-numbers] [sicp.chapter02.2-77.rational :as math-rational] [sicp.chapter02.2-77.complex :as math-complex] [sicp.common.pa...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_77.clj
clojure
(ns sicp.chapter02.2-77 (:require [sicp.common :as sicp] [sicp.common.dispatch-table :as dt] [sicp.chapter02.2-77.scheme-number :as math-numbers] [sicp.chapter02.2-77.rational :as math-rational] [sicp.chapter02.2-77.complex :as math-complex] [sicp.common.pa...
0558fce6b36069485087401fecb0d5538c25691318e1f8de3e3eb7e9f0f9c2a6
dainiusjocas/lucene-grep
analysis_file_test.clj
(ns lmgrep.analysis-file-test (:require [clojure.test :refer [deftest is testing]] [lmgrep.analysis :as a]) (:import (org.apache.lucene.analysis Analyzer))) (deftest read-analyzers-from-file (testing "empty config test" (is (= {} (a/read-analysis-conf-from-file nil nil)))) (testing "basic test ...
null
https://raw.githubusercontent.com/dainiusjocas/lucene-grep/eed0e4c57a4fc04419e0ff71679bd0435113e310/test/lmgrep/analysis_file_test.clj
clojure
(ns lmgrep.analysis-file-test (:require [clojure.test :refer [deftest is testing]] [lmgrep.analysis :as a]) (:import (org.apache.lucene.analysis Analyzer))) (deftest read-analyzers-from-file (testing "empty config test" (is (= {} (a/read-analysis-conf-from-file nil nil)))) (testing "basic test ...
b50dceffbb446eb7c71ac0736254529890e9a7f502e83ca51aeb351f2353f4a1
dpiponi/Moodler
CParser.hs
import qualified Data.ByteString.Char8 as B import Language.C.Data.Position import Language.C.Data.Name import Language.C.Parser main :: IO () main = do code <- B.getContents case execParser translUnitP code (position 0 "" 0 0) builtinTypeNames newNameSupply of Right parsed -> print parsed Left...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/Tools/CParser.hs
haskell
import qualified Data.ByteString.Char8 as B import Language.C.Data.Position import Language.C.Data.Name import Language.C.Parser main :: IO () main = do code <- B.getContents case execParser translUnitP code (position 0 "" 0 0) builtinTypeNames newNameSupply of Right parsed -> print parsed Left...
09566dbd0d645547daacdfbefc2f61d1e73aac02d633642b3d3f25267d91444b
juxtin/jen
test_util.clj
(ns jen.test-util (:require [jen.core :as jen] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] [schema.core :as sc])) (defn generator-fits-schema-prop "The property that the generator always fits the given schema." [generator schema] (let...
null
https://raw.githubusercontent.com/juxtin/jen/858df34e4699860b48c1c78eb86284d42b058396/src/jen/test_util.clj
clojure
for some reason, take n works better than the optional n argument to sample-seq
(ns jen.test-util (:require [jen.core :as jen] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] [schema.core :as sc])) (defn generator-fits-schema-prop "The property that the generator always fits the given schema." [generator schema] (let...
76bb7cc9bc33a16a8e48731ebe965ca2c102a91b8555c33d27aaf70d95dfe8f9
WorksHub/client
subs.cljs
(ns wh.logged-in.personalised-jobs.subs (:require [re-frame.core :refer [reg-sub]] [wh.common.job :as job] [wh.logged-in.personalised-jobs.db :as personalised-jobs])) (reg-sub ::personalised-jobs (fn [db _] (::personalised-jobs/sub-db db))) (reg-sub ::jobs :<- [::personalised-job...
null
https://raw.githubusercontent.com/WorksHub/client/d38e2e1bfbbc7a00715dc3c7a3ddc7130c6090f0/client/src/wh/logged_in/personalised_jobs/subs.cljs
clojure
unsure what to call these, as :user/liked-jobs is a sub etc, but as they're namespaced separated , it isn't an IMMEDIATE issue...
(ns wh.logged-in.personalised-jobs.subs (:require [re-frame.core :refer [reg-sub]] [wh.common.job :as job] [wh.logged-in.personalised-jobs.db :as personalised-jobs])) (reg-sub ::personalised-jobs (fn [db _] (::personalised-jobs/sub-db db))) (reg-sub ::jobs :<- [::personalised-job...
9266ce19836415718192ddd6ca6706b58a7ae97a2624e819ab9f2920d3982917
gethop-dev/hop-cli
openid_connect.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this ;; file, You can obtain one at / (ns hop-cli.keycloak.api.openid-connect (:require [clojure.set :as set] [hop-cli.util.http :as util.http])) (defn get-token [{:...
null
https://raw.githubusercontent.com/gethop-dev/hop-cli/137d1076d4121ffcfcc271b865656936bab8c864/src/hop_cli/keycloak/api/openid_connect.clj
clojure
file, You can obtain one at /
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this (ns hop-cli.keycloak.api.openid-connect (:require [clojure.set :as set] [hop-cli.util.http :as util.http])) (defn get-token [{:keys [base-url username password ...
07eb7fab5f6db643aec6a9e737fdc43dbe7a4d92b66ec262bedefddb2d099e53
maranget/hevea
mysys.mli
(***********************************************************************) (* *) (* HEVEA *) (* *) , projet PARA , INR...
null
https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/mysys.mli
ocaml
********************************************************************* HEVEA ...
, projet PARA , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . exception Error of string val put_from_file : string -> (string -> unit) -> unit val copy_from_lib : string -> s...
12e663242bb69939c63927da635ec90b6bbeb067f21cc03844ff11c0055a579a
MinaProtocol/mina
field.ml
open Intf open Core_kernel module Bignum_bigint = Snarky_backendless.Backend_extended.Bignum_bigint module type Input_intf = sig type t module Bigint : Bigint.Intf val size : unit -> Bigint.t val size_in_bits : unit -> int val to_bigint : t -> Bigint.t val of_bigint : Bigint.t -> t val of_int : int...
null
https://raw.githubusercontent.com/MinaProtocol/mina/d6436be74fd3fa5e38bbf95ad2f2c6dfd10cfe37/src/lib/crypto/kimchi_backend/common/field.ml
ocaml
TODO: Improve snarky interface so these aren't necessary.. Avoids allocation
open Intf open Core_kernel module Bignum_bigint = Snarky_backendless.Backend_extended.Bignum_bigint module type Input_intf = sig type t module Bigint : Bigint.Intf val size : unit -> Bigint.t val size_in_bits : unit -> int val to_bigint : t -> Bigint.t val of_bigint : Bigint.t -> t val of_int : int...
906a3ee8cbe57b6f12c9b47c805c09b27feeabbbe2db75bc80c3944ce14f8e8f
thesis/shale
proxies.clj
(ns shale.proxies (:require [clojure.core.match :refer [match]] [clojure.set :refer [rename-keys]] [clojure.walk :refer [postwalk]] [com.stuartsierra.component :as component] [schema.core :as s] [taoensso.carmine :as car] [shale.logging :as loggi...
null
https://raw.githubusercontent.com/thesis/shale/84180532e46ee5d9ee0218138da04ea035bcf7d2/src/clj/shale/proxies.clj
clojure
if proxies in config aren't in Redis, put them there if they are, don't modify eg availability TODO DRY up this with logic in sessions
(ns shale.proxies (:require [clojure.core.match :refer [match]] [clojure.set :refer [rename-keys]] [clojure.walk :refer [postwalk]] [com.stuartsierra.component :as component] [schema.core :as s] [taoensso.carmine :as car] [shale.logging :as loggi...
c1bd4520b88fc64edbd55f842c450abc7ed37570fb5fe7a8063e30983a1ccc85
fetburner/Coq2SML
decl_kinds.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/library/decl_kinds.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Informal mathematical status of de...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Libnames typ...
25934f57557517e7da45bae4ce42cc4192824a65335f8aa61bf87636569e52ea
jrm-code-project/LISP-Machine
flavor-definitions-and-methods.lisp
-*- Mode : LISP ; Package : WINDOW - MAKER ; Base:8 ; : ZL -*- Copyright C LISP MACHINE INC . , 1985 . ;;; ;;; A frame will be taken as a dummy window having a list of panes (defflavor frame ((owner nil) (list-of-border-lines nil) left right top bottom (list-of...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/window/window-maker/flavor-definitions-and-methods.lisp
lisp
Package : WINDOW - MAKER ; Base:8 ; : ZL -*- A frame will be taken as a dummy window having a list of panes Not really implemented (tv:add-typeout-item-type *item-type-alist* line "drag it with mouse" :drag) (setq *item-type-alist* (remove 'line *item-type-alist* :key #'car)) Method which slices a give...
Copyright C LISP MACHINE INC . , 1985 . (defflavor frame ((owner nil) (list-of-border-lines nil) left right top bottom (list-of-panes-or-frames nil) (direction-of-slice nil) (relative-size 1.0) keyword (number nil) name-...
478c08d7ab4e4c050daf64592091e4327c4f6cb957efcd6234cd87b4c28872f2
hammerlab/epidisco
parameters.ml
open Nonstd module String = Sosa.Native_string type t = { (* SAMPLES *) normal_inputs: Input.t list; [@docs "SAMPLES"] [@conv (Input.conv ~kind:"normal")] (** Normal sample(s) for the pipeline. *) tumor_inputs: Input.t list; [@docs "SAMPLES"] [@conv (Input.conv ~kind:"tumor")] (** Tumor sample(s) fo...
null
https://raw.githubusercontent.com/hammerlab/epidisco/0fdbcc2b4f3bb1c4af74411af69b371870f76d6a/src/lib/parameters.ml
ocaml
SAMPLES * Normal sample(s) for the pipeline. * Tumor sample(s) for the pipeline. * RNA sample(s) for the pipeline. OPTIONS * The reference build * Where to save the results. * Give a name to the run(s). * Vaxrank option: Ignore mismatches after variant. * Run bedtools intersect on VCFs with the given bed fil...
open Nonstd module String = Sosa.Native_string type t = { normal_inputs: Input.t list; [@docs "SAMPLES"] [@conv (Input.conv ~kind:"normal")] tumor_inputs: Input.t list; [@docs "SAMPLES"] [@conv (Input.conv ~kind:"tumor")] rna_inputs: Input.t list option; [@docs "SAMPLES"] [@conv (Input.conv ~kind:"r...
7e81748457c7f21c5aef14c3279e64be4bc8e7cb82fb1e2c56522901f2471622
xh4/web-toolkit
directory.lisp
(in-package :http) (defclass directory () ((pathname :initarg :pathname :initform nil :accessor directory-pathname))) (defmethod print-object ((directory directory) stream) (print-unreadable-object (directory stream :type t :identity t) (format stream "~S" (directory-pathname directory)))) (defme...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/directory.lisp
lisp
(in-package :http) (defclass directory () ((pathname :initarg :pathname :initform nil :accessor directory-pathname))) (defmethod print-object ((directory directory) stream) (print-unreadable-object (directory stream :type t :identity t) (format stream "~S" (directory-pathname directory)))) (defme...
0f6aafcc90928a6de0829fa33f85857d94e704a4366bf2f2a9e658d12a5561a7
dbuenzli/uuseg
uuseg_sentence.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 The uuseg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c)...
null
https://raw.githubusercontent.com/dbuenzli/uuseg/6e4b136514154fd0d57276e2f887208e36d2b136/src/uuseg_sentence.ml
ocaml
fill slots on the right of boundary ad-hoc state to handle SB8 to SB11 ad-hoc state to handle SB8 flush slot r0 to get to next boundary. `End was added. current state. break window. index in [window] of [l0]. buffer for r0. buffer for resolving SB8. WARNING. The code that follows is truly horrible,...
--------------------------------------------------------------------------- Copyright ( c ) 2014 The uuseg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c)...
0d41a412cf96f5fc2245091efaecafd13250f5306bbbe614b3dcfa2d36cc4bf3
MaartenFaddegon/Hoed
t64.hs
# LANGUAGE DeriveGeneric # {-# OPTIONS -fdefer-type-errors #-} import Debug.Hoed -- Should build data T64 = T64 { t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30 , t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/tests/Generic/t64.hs
haskell
# OPTIONS -fdefer-type-errors # Should build
# LANGUAGE DeriveGeneric # import Debug.Hoed data T64 = T64 { t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30 , t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58 , ...
75c86d7a30c55b08e0cd232092a2d95c03e70da75cdc46cdebb70ca426827933
Elzair/nazghul
loc.scm
(define (mk-loc place x y) (list place x y)) (define (loc-mk place x y) (list place x y)) (define (loc-place loc) (car loc)) (define (loc-x loc) (cadr loc)) (define (loc-y loc) (caddr loc)) ;; eval-loc -- given a loc where the place is a tag, return one where the place ;; is bound to the kernel object referred to by ...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/loc.scm
scheme
eval-loc -- given a loc where the place is a tag, return one where the place is bound to the kernel object referred to by the tag x direction y direction loc-add -- vector sum of locations (auto wraps) (println "loc-add " locs) on wrapping maps there are eastern half southeast quarter northeast quarter southw...
(define (mk-loc place x y) (list place x y)) (define (loc-mk place x y) (list place x y)) (define (loc-place loc) (car loc)) (define (loc-x loc) (cadr loc)) (define (loc-y loc) (caddr loc)) (define (eval-loc loc) (mk-loc (eval (loc-place loc)) (loc-x loc) (loc-y loc))) (define (loc-op a b op) ...
81d4899d96152220f63f5cb1f3ec1ea98a422f4f744fdfcaa74802e221dc83da
haskell-rewriting/term-rewriting
Arbitrary.hs
-- This file is part of the 'term-rewriting' library. It is licensed under an MIT license . See the accompanying ' LICENSE ' file for details . -- Authors : {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} -- Types and Arbitrary instances for tests. module Arbitrary ( Var', Fun', Term', ...
null
https://raw.githubusercontent.com/haskell-rewriting/term-rewriting/d01ee419f9fd3c2011d37b6417326a9373d5ee9c/test/Arbitrary.hs
haskell
This file is part of the 'term-rewriting' library. It is licensed # LANGUAGE TypeSynonymInstances, FlexibleInstances # Types and Arbitrary instances for tests.
under an MIT license . See the accompanying ' LICENSE ' file for details . Authors : module Arbitrary ( Var', Fun', Term', Rule', Subst', ) where import Data.Rewriting.Term (Term (..)) import Data.Rewriting.Rule (Rule (..)) import qualified Data.Rewriting.Rule as Rule import Data.Rewriting...
3be6151ebe0c5c77ed51804761ba75b9f2a3564ffbfd684111a32d31dec1e0e3
scrintal/heroicons-reagent
chat_bubble_left.cljs
(ns com.scrintal.heroicons.solid.chat-bubble-left) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M4.848 2.771A49.144 49.144 0 0112 2.25c2.43 0 4.817.178 7.152.52 1.978.29...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/chat_bubble_left.cljs
clojure
(ns com.scrintal.heroicons.solid.chat-bubble-left) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M4.848 2.771A49.144 49.144 0 0112 2.25c2.43 0 4.817.178 7.152.52 1.978.29...
80aa460c3c4cba09a4d2c9a4b38f2023ab2b41fe7324fd43828e08be6eb59027
MercuryTechnologies/ghc-specter
OGDF.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - orphans # module GHCSpecter.GraphLayout.OGDF ( nodeGraphics, edgeGraphics, edgeIntWeight, edgeDoubleWeight, edgeLabel, nodeLabel, edgeType, nodeType, nodeId, edgeArrow, edgeStyle, nodeStyle, nodeTemplate, ...
null
https://raw.githubusercontent.com/MercuryTechnologies/ghc-specter/d911e610e0ee0fb43497dad9e762fec2abbf9e08/daemon/src/GHCSpecter/GraphLayout/OGDF.hs
haskell
# LANGUAGE BangPatterns # | retrieve node layout information with bare node index.
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - orphans # module GHCSpecter.GraphLayout.OGDF ( nodeGraphics, edgeGraphics, edgeIntWeight, edgeDoubleWeight, edgeLabel, nodeLabel, edgeType, nodeType, nodeId, edgeArrow, edgeStyle, nodeStyle, nodeTemplate, edgeSubGraphs, nodeWeight, ...
13231fa9ad49a9f8b8ce76f4295f24c840f8428952a36ebc9e2633c4925935e5
ocamllabs/ocaml-modular-implicits
arrayLabels.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , Kyot...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/arrayLabels.ml
ocaml
********************************************************************* OCaml ...
, Kyoto University RIMS Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with include Array
1b05293677bf0b514c58cfe232b091f2ebf58d2843be14032330d2b9e18ec7a2
moby/vpnkit
main.ml
open Lwt let src = let src = Logs.Src.create "9P" ~doc:"/port filesystem" in Logs.Src.set_level src (Some Logs.Info); src module Log9P = (val Logs.src_log src : Logs.LOG) let src = let src = Logs.Src.create "main" ~doc:"Mirage TCP/IP <-> socket proxy" in Logs.Src.set_level src (Some Logs.Info); src modu...
null
https://raw.githubusercontent.com/moby/vpnkit/281c14bbdc92dad26bb2d7710f1fed5f81e080a3/src/bin/main.ml
ocaml
trim leading / no need to add more delay Figure out where to forward incoming connections to forwarded ports. backwards compatible with plain unix path
open Lwt let src = let src = Logs.Src.create "9P" ~doc:"/port filesystem" in Logs.Src.set_level src (Some Logs.Info); src module Log9P = (val Logs.src_log src : Logs.LOG) let src = let src = Logs.Src.create "main" ~doc:"Mirage TCP/IP <-> socket proxy" in Logs.Src.set_level src (Some Logs.Info); src modu...
0225fe576464e0e19533f11cfc3ba2e28ce4c40600ce85fb1d26fa984cd2c13e
CatalaLang/catala
pos.ml
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . ...
null
https://raw.githubusercontent.com/CatalaLang/catala/5e063dac1b41d77ae44279452f2d03d51e3efaca/compiler/catala_utils/pos.ml
ocaml
should be outside of [Cli.with_style]
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . ...
4e4075c83bdfe60375815d91f7a1c07937c699713b79b14a443d71384c4fddb8
input-output-hk/cardano-sl
Index.hs
# LANGUAGE DeriveGeneric # module Pos.DB.Epoch.Index ( writeEpochIndex , getEpochBlundOffset , SlotIndexOffset (..) ) where import Universum import Data.Binary (Binary, decode, encode) import qualified Data.ByteString.Builder as Builder import qualified Data.ByteString...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/db/src/Pos/DB/Epoch/Index.hs
haskell
When we store all blocks for an epoch in a "epoch" file we need a fast and simple way of extracting any single block from the epoch file without decoding the whole file. We do this by keeping a separate index file that for each slot, can give the and quickest to access way to store the slot index to file offset m...
# LANGUAGE DeriveGeneric # module Pos.DB.Epoch.Index ( writeEpochIndex , getEpochBlundOffset , SlotIndexOffset (..) ) where import Universum import Data.Binary (Binary, decode, encode) import qualified Data.ByteString.Builder as Builder import qualified Data.ByteString...
335bce91cfa05ddcb89f75908ba6540372d4df4e3357f8642be5f221d8b5a475
AdaCore/why3
bindings.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/trywhy3/bindings.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Js_of_ocaml open Js let log s = ignore (Firebug.console ## log (string s)) let log_time s = let da...
23919a33c9e8596b6b506ff4c3d7ea55ace36401741d83c0cba9003e26e5f0a0
roelvandijk/base-unicode-symbols
Unicode.hs
# LANGUAGE NoImplicitPrelude , UnicodeSyntax # module Data.Bool.Unicode ( (∧), (∨), (¬), (⊻), (⊼), (⊽) ) where ------------------------------------------------------------------------------- -- Imports ------------------------------------------------------------------------------- -- from base: import Data.Bool ( Bo...
null
https://raw.githubusercontent.com/roelvandijk/base-unicode-symbols/f1607c281ee821d20d6829ab38180c30d350321b/src/Data/Bool/Unicode.hs
haskell
----------------------------------------------------------------------------- Imports ----------------------------------------------------------------------------- from base: ----------------------------------------------------------------------------- Fixities -------------------------------------------------------...
# LANGUAGE NoImplicitPrelude , UnicodeSyntax # module Data.Bool.Unicode ( (∧), (∨), (¬), (⊻), (⊼), (⊽) ) where import Data.Bool ( Bool, (&&), (||), not ) infixr 2 ∨ infixr 3 ⊽ infixr 3 ⊼ infixr 3 ⊻ infixr 3 ∧ (¬) ∷ Bool → Bool (¬) = not | ( & # x2227 ;) = ( ' & & ' ) U+2227 , LOGICAL AND (&#x2227;) = ('...
52d06a9b1db160278fa7ecfff53bbff152eb16ca925df6c5dd8b3fe09268149c
akabe/ocaml-crf
crf_graph.ml
--- A library for conditional random field ( CRF ) in OCaml Copyright ( C ) 2015 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , o...
null
https://raw.githubusercontent.com/akabe/ocaml-crf/ced26bcce559b1eda307f7a8961ac9e52905882f/lib/crf_graph.ml
ocaml
Process failure
--- A library for conditional random field ( CRF ) in OCaml Copyright ( C ) 2015 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , o...
3b66345266aece7e8061ad8a11eab2644dc4b43cfe247343f03ade96c166d106
tokenrove/m68k-assembler
sections.lisp
(in-package :m68k-assembler) ;;;; SECTIONS (defstruct section (name) (object-stream) (output-fn #'write-big-endian-data) (relocations (make-hash-table)) (program-counter 0)) (defun section-length (section) XXX broken for ORG ; perhaps we should always defer org to the ;; linker? -JS (section-program...
null
https://raw.githubusercontent.com/tokenrove/m68k-assembler/6c3bc3e62da890bb34da856c8c72a6a7d1650eaa/sections.lisp
lisp
SECTIONS perhaps we should always defer org to the linker? -JS
(in-package :m68k-assembler) (defstruct section (name) (object-stream) (output-fn #'write-big-endian-data) (relocations (make-hash-table)) (program-counter 0)) (defun section-length (section) (section-program-counter section)) (eval-when (:compile-toplevel :load-toplevel :execute) (defun create-bss ...
a99bab1920bdd1f72fc2ede2e2b40aaf02280d62f8908c4f96318638e7f4d3b3
vaibhavsagar/experiments
CabalSetup.hs
# OPTIONS_GHC -cpp # ----------------------------------------------------------------------------- -- | Module : CabalSetup Copyright : ( c ) The University of Glasgow 2006 -- -- Maintainer : -- Stability : alpha -- Portability : portable -- The user interface to building and installing Cabal...
null
https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/Cabal/cabal-setup/CabalSetup.hs
haskell
--------------------------------------------------------------------------- | Maintainer : Stability : alpha Portability : portable read the .cabal file if there's a Setup script, - invoke it with args - if we find runhaskell (TODO) otherwise, - behave like a boilerplate Setup.hs Later:...
# OPTIONS_GHC -cpp # Module : CabalSetup Copyright : ( c ) The University of Glasgow 2006 The user interface to building and installing Cabal packages . module Main (main) where import Distribution.Simple import Distribution.Simple.Utils import Distribution.Simple.Configure ( configCompiler, ge...
8543df65c67eccb46ac8c30e9907e13f27c5808f8517eb778f85ed296f5514c2
haskell/stm
stm048.hs
# LANGUAGE ScopedTypeVariables # module Main where import GHC.Conc import Control.Concurrent import Control.Exception import Foreign.StablePtr import System.IO Create two tvars each holding 0 initTVars :: STM (TVar Int, TVar Int) initTVars = do v1 <- newTVar 0 v2 <- newTVar 0 return (v...
null
https://raw.githubusercontent.com/haskell/stm/319e380ab2ddfb99ab499b6783e22f2b4faaee38/tests/stm048.hs
haskell
Increment v1, retry Increment v2, don't retry optionOne attempts to retry while valid. optionOne attempts to retry while valid. it completes successfully. Nested use of `orElse`: combine (optionOne and OptionOne) with optionTwo Nested use of `orElse`: combine (optionOne and optionTwo) with optionTwo return (v1,...
# LANGUAGE ScopedTypeVariables # module Main where import GHC.Conc import Control.Concurrent import Control.Exception import Foreign.StablePtr import System.IO Create two tvars each holding 0 initTVars :: STM (TVar Int, TVar Int) initTVars = do v1 <- newTVar 0 v2 <- newTVar 0 return (v...
99036acd4ea51d94d904a3e7c438b1b307438a0e3572581b4acb16b824747431
rtoy/cmucl
interface-glue.lisp
;;;; -*- Mode: Lisp ; Package: Toolkit -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/motif/lisp/interface...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/motif/lisp/interface-glue.lisp
lisp
-*- Mode: Lisp ; Package: Toolkit -*- ********************************************************************** ********************************************************************** Functions which provide the glue for the interface between the C server and the Lisp client. Functions for handling server reques...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/motif/lisp/interface-glue.lisp $") Written by (in-package "TOOLKIT") (defvar reply-table (vector :confirm :values :callback :event :er...
76538d5c0da7881e42ea4bdff69614d3b48a3d6c03cff5aba6f07b02b4e9c76e
viercc/kitchen-sink-hs
Discharge.hs
-- <-cafe/2022-April/135224.html> # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} # LANGUAGE DataKinds , PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # module Discharge where import GHC.TypeNats import Data.Proxy import Data.Kind class KnownNat n => F (n :...
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/3fa62b16469d76977a68db3f622b6ce692c70b31/experiment/src/Discharge.hs
haskell
<-cafe/2022-April/135224.html> # LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds , PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # module Discharge where import GHC.TypeNats import Data.Proxy import Data.Kind class KnownNat n => F (n :: Nat) foo :: forall n. F n => (F n => Proxy n -> Proxy n) ->...
b8ef996915f7fda533406cf6613662e58916d39811369d19e78b6d61ba28bdc0
okuoku/nausicaa
compile-all.mosh.sps
;;; Part of : / Contents : compile script for Mosh Scheme Date : Sat Dec 26 , 2009 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2009 < > ;;; ;;;This program is free software: you can redistribute it and/or modify ;;;it under the terms of the GNU General Public License as published by the Free Software Foundation ...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/gcrypt/src/libraries/compile-all.mosh.sps
scheme
Abstract This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warra...
Part of : / Contents : compile script for Mosh Scheme Date : Sat Dec 26 , 2009 Copyright ( c ) 2009 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (only (fo...
af976c0d68195637afe701bf42d2132af994a523f906241b146f49aa343cdfee
ccntrq/loxomotive
Expr.hs
module Loxomotive.Expr where import Loxomotive.Object import Loxomotive.Token data Expr = Assign Token Expr | Binary Expr Token Expr | Call Expr Token [Expr] -- The opening args paren is saved for errors | Get Expr Token | Grouping Expr | Literal Object | Logical Expr Token Expr | Set ...
null
https://raw.githubusercontent.com/ccntrq/loxomotive/1d40f4e8c52921c0c09d4ec2156d13e3cc80c704/src/Loxomotive/Expr.hs
haskell
The opening args paren is saved for errors
module Loxomotive.Expr where import Loxomotive.Object import Loxomotive.Token data Expr = Assign Token Expr | Binary Expr Token Expr | Get Expr Token | Grouping Expr | Literal Object | Logical Expr Token Expr | Set Expr Token Expr | Super Token Token | This Token | Unary Token ...
cf8484e1990be01382772fb4e07ac6cfb88a7fc48f52f760c0d7d9ff832dad53
Ptival/language-ocaml
RecFlag.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.RecFlag ( recFlagPP, ) where import Language.OCaml.Definitions.Parsing.ASTTypes (RecFlag (..)) import Prettyprinter (...
null
https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/RecFlag.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.RecFlag ( recFlagPP, ) where import Language.OCaml.Definitions.Parsing.ASTTypes (RecFlag (..)) import Prettyprinter (Doc, Pretty (pretty)) recFlagPP ::...
a40fbf6a5fb219ab5f0dfaf221f97eb771e9ecabd6a183e49f032d2ef4b03198
blindglobe/clocc
avlseq.lisp
;;; Extensible Sequence Type AVL trees as Sequences ;;; Copyright ( C ) 1988 , 1992 This is Free Software , published under the GNU General Public License v2 . ;; AVL-trees, implemented in COMMON LISP, as sequences , 22.09.1988 CLISP - Version 29.12.1988 ;; Version with many declarations, ;; ...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/ext/sequences/avlseq.lisp
lisp
Extensible Sequence Type AVL-trees, implemented in COMMON LISP, as sequences Version with many declarations, bookkeeping over the length of each subtree, An AVL-tree is a binary tree, where in each node a datum (value) is located. The tree is always balanced, in a way, that the depths The order rela...
AVL trees as Sequences Copyright ( C ) 1988 , 1992 This is Free Software , published under the GNU General Public License v2 . , 22.09.1988 CLISP - Version 29.12.1988 definition of a sequence - subtype AVL - TREE . , 01.09.2004 : translation of comments 2004 - 09 - 05 : updated to A...
8e900d5f062a0b3caecc3ca0596500d65ccfb8024ab316b3cb832cf131beffb1
pietervdvn/ALGT
Tools.hs
module AbstractInterpreter.Tools where {- This module reexports functions to check totality and stricter values -} import TypeSystem import Utils.Utils import Utils.ToString import AbstractInterpreter.AbstractSet import AbstractInterpreter.Assignment import AbstractInterpreter.FunctionAnalysis import AbstractInterpr...
null
https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/AbstractInterpreter/Tools.hs
haskell
This module reexports functions to check totality and stricter values
module AbstractInterpreter.Tools where import TypeSystem import Utils.Utils import Utils.ToString import AbstractInterpreter.AbstractSet import AbstractInterpreter.Assignment import AbstractInterpreter.FunctionAnalysis import AbstractInterpreter.RuleAnalysis as RI import AbstractInterpreter.MinimalTypes import Data...
b3c8cb8f6ed7627156e86d8d211de8af7c2f06d382e625f7f9f03367340283a6
nuscr/nuscr
test.ml
(* directorires to test *) open! Base open! Stdio let dirs = ["examples"] (* files to not test *) let avoid = [ (* review these files *) "examples/from-scribble-java/tmp/Test.nuscr" ; "examples/from-scribble-java/tmp/Test2.nuscr" ; "examples/from-scribble-java/demo/supplierinfo/SupplierInfoExper.nuscr" ; ...
null
https://raw.githubusercontent.com/nuscr/nuscr/ec5f199dbbc593296237424efd7d1db8c96edb91/test/test.ml
ocaml
directorires to test files to not test review these files test the parser
open! Base open! Stdio let dirs = ["examples"] let avoid = "examples/from-scribble-java/tmp/Test.nuscr" ; "examples/from-scribble-java/tmp/Test2.nuscr" ; "examples/from-scribble-java/demo/supplierinfo/SupplierInfoExper.nuscr" ; "examples/consensus/ClockTR.nuscr" ; "examples/consensus/ClockAnnotTR.nuscr" ...
8d33964a24b709a10a6b02f6eefd72c75b41d4e080602cdbbc3fa098b6455d63
brendanhay/amazonka
DnsRecord.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workmail/gen/Amazonka/WorkMail/Types/DnsRecord.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ 'newDnsRecord' smart constructor. | The DNS hostname.- For example, @domain.example.com@. | The RFC 1035 record type. Possible values: @CNAME@, @A@, @MX@. type. | The following record fields are available, with the c...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Mo...
7b6eecea38a88b639e57f38df7f901750addb49f897f4fb93fdffcddb9c448b1
danwdart/humblr
Tumblr.hs
# LANGUAGE FlexibleContexts # module Web.Tumblr where import Conduit import Control.Arrow import Control.Monad.Reader import Data.Aeson import Data.Attoparsec.ByteString import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 ...
null
https://raw.githubusercontent.com/danwdart/humblr/eab8d37df9ccdd632736b458edd7aab779a2caf2/src/Web/Tumblr.hs
haskell
| The Tumblr API key | The Tumblr API secret to use | Obtain authorization information. TODO: Cleaner, more elegant solution TODO: Store the obtained tokens | This method returns general information about the blog, such as the title, number of posts, and other high-level data. | /info | Retrieve a Blog Avat...
# LANGUAGE FlexibleContexts # module Web.Tumblr where import Conduit import Control.Arrow import Control.Monad.Reader import Data.Aeson import Data.Attoparsec.ByteString import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 ...
289cfbb5e0c198c03ec7526038730e9c1950d17175ee3cda7ba84a604b591e26
Halfwake/web-sweeper
web.rkt
#lang web-server/base (require racket/list racket/match web-server/lang/web web-server/http/xexpr web-server/servlet-env racket/serialize "grid.rkt" "mine.rkt") (serializable-struct game-state (grid render-mode)) (define (reveal-link a-grid x y) (λ (re...
null
https://raw.githubusercontent.com/Halfwake/web-sweeper/20f82bd64dd0ab5165dd28cdde7d46d31eee4593/web.rkt
racket
#lang web-server/base (require racket/list racket/match web-server/lang/web web-server/http/xexpr web-server/servlet-env racket/serialize "grid.rkt" "mine.rkt") (serializable-struct game-state (grid render-mode)) (define (reveal-link a-grid x y) (λ (re...
6d678e7e73e3e67cdec70629c7291e176650dfec534b769b9d83f19451ac771f
Helium4Haskell/helium
ClassInstance4.hs
class X a where f :: Int -> a class X a => Y a where g :: Char -> a instance X Int where f = (+1) instance Y Int where g = f . primOrd main = show (g 'a' + 1)
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/ClassInstance4.hs
haskell
class X a where f :: Int -> a class X a => Y a where g :: Char -> a instance X Int where f = (+1) instance Y Int where g = f . primOrd main = show (g 'a' + 1)
9e58216bb5b16c893c0de327ac2005e6e10f112800923a8c8133bcb6388db1b3
write-you-a-scheme-v2/scheme
Build.hs
import Prelude import Development.Shake ( cmd, shakeArgs, shakeOptions, getDirectoryFiles, (%>), need, phony, putInfo, removeFilesAfter, want ) import Development.Shake.FilePath ( (-<.>), (</>), dropDirectory1 ) main :: IO () main = shakeArgs shakeOptions $ do...
null
https://raw.githubusercontent.com/write-you-a-scheme-v2/scheme/72b8b048aa019aeffbe59da80b908bb93409261f/Build.hs
haskell
import Prelude import Development.Shake ( cmd, shakeArgs, shakeOptions, getDirectoryFiles, (%>), need, phony, putInfo, removeFilesAfter, want ) import Development.Shake.FilePath ( (-<.>), (</>), dropDirectory1 ) main :: IO () main = shakeArgs shakeOptions $ do...
e01c2ba77278e737e87039893c91d40f4367f35bf9de05828a35adeb621dcc4a
mikera/clojure-utils
bytes.clj
(ns mikera.cljutils.bytes "Utility functions fro working with byte arrays." (:refer-clojure :exclude [reverse]) (:import [java.util Arrays]) (:require [mikera.cljutils.hex :as hex]) (:require [clojure.string :as str])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (def BYTE-ARRAY-C...
null
https://raw.githubusercontent.com/mikera/clojure-utils/92f7fd7a40c9cf22ab7004a304303e45ea4d4284/src/main/clojure/mikera/cljutils/bytes.clj
clojure
(ns mikera.cljutils.bytes "Utility functions fro working with byte arrays." (:refer-clojure :exclude [reverse]) (:import [java.util Arrays]) (:require [mikera.cljutils.hex :as hex]) (:require [clojure.string :as str])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (def BYTE-ARRAY-C...
b3acaccce3344060ed97409ff9361dfef62825b3990c0e8c68ef675f93fe9d72
apache/couchdb-couch-mrview
couch_mrview_compact_tests.erl
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 under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-couch-mrview/f08c26a098a46366cfaf0e14b940af1f11d84577/test/couch_mrview_compact_tests.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_mrview_compact_tests). -include_lib("couch/include/couch_eunit.hrl"). -include_lib("couch/include/couch_db.hrl"). -define(TIMEOUT, 1000). ...
bae6e4abf268827eafe67c0f2748ed2d0a9f773349bfdcf2331c170fe3a74c49
omnyway-labs/amplify_cljs_example
project.clj
(defproject amplify-cljs-example "0.2.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.520" :exclusions [com.google.javascript/closure-compiler-unshaded org.clojure/google-closure-library]] [th...
null
https://raw.githubusercontent.com/omnyway-labs/amplify_cljs_example/67a82752a78c53703a0f13ce45fcfbb76199edf2/project.clj
clojure
(defproject amplify-cljs-example "0.2.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.520" :exclusions [com.google.javascript/closure-compiler-unshaded org.clojure/google-closure-library]] [th...
f7001d578afb9dea36c103000404428b98765d3c6d65b7709784e32a24ad1ff9
jgm/unicode-collation
unit.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # module Main (main) where import Text.Collate import Text.Collate.Normalize (toNFD) import Text.Printf import Test.Tasty import Test.Tasty.QuickCheck import Test.Tasty.HUnit import Data.Either (lefts) import Data.List (sortBy) import Data.Text (Text) import qua...
null
https://raw.githubusercontent.com/jgm/unicode-collation/8a147f9a92ad198df24f117e211cd6b6522aeba3/test/unit.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # module Main (main) where import Text.Collate import Text.Collate.Normalize (toNFD) import Text.Printf import Test.Tasty import Test.Tasty.QuickCheck import Test.Tasty.HUnit import Data.Either (lefts) import Data.List (sortBy) import Data.Text (Text) import qualified Data.Text as T import qualif...
827014665a4671427e46c4f54b1694f7c1a911e4ffbb50d7241de506356bc4cd
slyrus/mcclim-old
text-size-test.lisp
;;; -*- Mode: Lisp; -*- ( c ) 2006 ( ) ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . ;;; ;;; Th...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Examples/text-size-test.lisp
lisp
-*- Mode: Lisp; -*- This library is free software; you can redistribute it and/or either This library 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 License along with this libra...
( c ) 2006 ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library General Public Free Software Foundation , Inc. , 59 Templ...
79b7ba08d210e77693177f49f8a0b38286d6d8934c61ace1c84037f0367c19c1
AdaCore/why3
smtv1.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/74914e765153d7eb4b34cd0246a623719f4aa670/src/printer/smtv1.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Format open Pp open Ident open Ty open Term open Decl open Printer let ident_printer = let bls = [...
24927aad4e41335ed6657b2e8d8e5a38f1b1b0dfc7871f01541eaac3e57d0405
HugoPeters1024/hs-sleuth
RealFloat.hs
# LANGUAGE CPP , OverloadedStrings # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif -- | -- Module: Data.Text.Lazy.Builder.RealFloat Copyright : ( c ) The University of Glasgow 1994 - 2002 -- License: see libraries/base/LICENSE -- -- Write a floating point value to a 'Builder'. module Data.Text...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.3.2/Data/Text/Lazy/Builder/RealFloat.hs
haskell
| Module: Data.Text.Lazy.Builder.RealFloat License: see libraries/base/LICENSE Write a floating point value to a 'Builder'. | Control the rendering of floating point numbers. ^ Scientific notation (e.g. @2.3e123@). ^ Standard decimal notation. @9,999,999@, and scientific notation otherwise. using standar...
# LANGUAGE CPP , OverloadedStrings # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif Copyright : ( c ) The University of Glasgow 1994 - 2002 module Data.Text.Lazy.Builder.RealFloat ( FPFormat(..) , realFloat , formatRealFloat ) where import Data.Array.Base (unsafeAt) import Dat...
066558716ff6cb5100d606ff0f21702afe79160ff610f608e01a31393e960261
ChicagoBoss/ChicagoBoss
boss_json.erl
%%------------------------------------------------------------------- @author ChicagoBoss Team and contributors , see file in root directory %% @end This file is part of ChicagoBoss project . See file in root directory %% for license information, see LICENSE file in root directory %% @end %...
null
https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/src/boss/boss_json.erl
erlang
------------------------------------------------------------------- @end for license information, see LICENSE file in root directory @end @doc ------------------------------------------------------------------- It's an erlang:now() value.
@author ChicagoBoss Team and contributors , see file in root directory This file is part of ChicagoBoss project . See file in root directory -module(boss_json). -export([encode/2]). -ifdef(TEST). -compile(export_all). -endif. -spec encode(_,_) -> any(). -spec json_data1([{_,_}],_,[{_,_}]) ->...
34a2c7e2e4fa264bb0d258b3d71a0ed9f5b28dc3075dfcb907d8bf9c3d974092
hasktorch/hasktorch
Native3.hs
-- generated by using spec/Declarations.yaml # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module Torch.Internal.Unmanaged.Native.Native3 where import Foreign.C.String import Foreign.C.Types im...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Native/Native3.hs
haskell
generated by using spec/Declarations.yaml # LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Torch.Internal.Unmanaged.Native.Native3 where import Foreign.C.String import Foreign.C.Types import Foreign import Torch.Internal.Type import qualified Language.C.Inline.Cpp ...
e1ec4321bd446848751a44a5f726661371d25954d447aced59f2cdfbc56a82e6
frenchy64/fully-satisfies
selmer.clj
(ns io.github.frenchy64.fully-satisfies.dev.selmer (:require [selmer.parser :as sp :refer [render render-file]] [selmer.util :as su] [clojure.string :as str] [clojure.java.io :as io] [clojure.java.shell :as sh]) (:import [java.io File])) (sp/cache-off!) (defn missin...
null
https://raw.githubusercontent.com/frenchy64/fully-satisfies/ffeb0e09cfa36a403c7226af717115460fe2c82d/dev/src/io/github/frenchy64/fully_satisfies/dev/selmer.clj
clojure
root-relative root-relative {◊var◊} instead of {{var}}
(ns io.github.frenchy64.fully-satisfies.dev.selmer (:require [selmer.parser :as sp :refer [render render-file]] [selmer.util :as su] [clojure.string :as str] [clojure.java.io :as io] [clojure.java.shell :as sh]) (:import [java.io File])) (sp/cache-off!) (defn missin...
1cca6c41cc3241909d2c30233facdb3978c1c54ad62ebf75d073f1277067b4cc
skeuchel/needle
Evaluation.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module KnotSpec.Evaluation where import Knot.Env import KnotSpec.Inference import KnotSpec.Substitution im...
null
https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotSpec/Evaluation.hs
haskell
# LANGUAGE GADTs # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module KnotSpec.Evaluation where import Knot.Env import KnotSpec.Inference import KnotSpec.Substitution import KnotSpec...
550e3446fa374fcadecc5c1b13dbd154e5c31682358e834356c04e9fca21c32d
tarides/current-albatross-deployer
client.ml
open Lwt.Syntax module IpManager = Iptables_client.IpManager module Deployments = Iptables_client.Deployments module Albatross = struct let connect name (cmd : Vmm_commands.t) = let sock, next = Vmm_commands.endpoint cmd in let sockaddr = Lwt_unix.ADDR_UNIX (Vmm_core.socket_path sock) in let* result = Vm...
null
https://raw.githubusercontent.com/tarides/current-albatross-deployer/fd3a811d81f5af3fd37459cadab8823b9562e8da/lib/client.ml
ocaml
open Lwt.Syntax module IpManager = Iptables_client.IpManager module Deployments = Iptables_client.Deployments module Albatross = struct let connect name (cmd : Vmm_commands.t) = let sock, next = Vmm_commands.endpoint cmd in let sockaddr = Lwt_unix.ADDR_UNIX (Vmm_core.socket_path sock) in let* result = Vm...
62a3002738ad7af03ec2378a310c023ab7fe4df098a61279526bc557f61c9f0f
brownplt/TeJaS
strobe_kinding.ml
open Prelude open Sig open Strobe_sigs module Make (Strobe : STROBE_MODULE) (ExtKinding : EXT_KINDING with type typ = Strobe.extTyp with type kind = Strobe.extKind with type binding = Strobe.extBinding with type baseTyp = Strobe.typ with type baseKind = Strobe.kind with type baseBinding = Strobe.bind...
null
https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/strobe_kinding.ml
ocaml
Printf.printf "Adding prim %s\n" s;
open Prelude open Sig open Strobe_sigs module Make (Strobe : STROBE_MODULE) (ExtKinding : EXT_KINDING with type typ = Strobe.extTyp with type kind = Strobe.extKind with type binding = Strobe.extBinding with type baseTyp = Strobe.typ with type baseKind = Strobe.kind with type baseBinding = Strobe.bind...
ecdab66eda671060f66995c1272b931d92a57470332123fffedccda0a5c1d207
davdar/maam
Compat.hs
# LANGUAGE CPP # # LANGUAGE OverlappingInstances # module FP.Compat where import FP.Core import qualified Prelude instance (Monad m) => Prelude.Monad m where { return = FP.Core.return ; (>>=) = (FP.Core.>>=) } #if MIN_VERSION_base(4,8,0) instance (Applicative f) => Prelude.Applicative f where { pure = FP.Core.pure ...
null
https://raw.githubusercontent.com/davdar/maam/2cc3ff3511a7a4daadcd44c60c4b08862c01e183/src/FP/Compat.hs
haskell
# LANGUAGE CPP # # LANGUAGE OverlappingInstances # module FP.Compat where import FP.Core import qualified Prelude instance (Monad m) => Prelude.Monad m where { return = FP.Core.return ; (>>=) = (FP.Core.>>=) } #if MIN_VERSION_base(4,8,0) instance (Applicative f) => Prelude.Applicative f where { pure = FP.Core.pure ...
076e2ff63f0fd31ef602a61d125d1a55534ae88ffd78caa1b41cc64fb00c241b
solatis/haskell-bitcoin-api
Misc.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Network.Bitcoin.Api.Misc ( module Network.Bitcoin.Api.Misc , I.callRaw , I.RpcError(..) ) where import Control.Applicative ((<$>), (<*>)) import Control.Lens.TH (makeLenses) import Control.Mon...
null
https://raw.githubusercontent.com/solatis/haskell-bitcoin-api/cd4b9757283bdd61b5b4ac922db36bbebc469dea/src/Network/Bitcoin/Api/Misc.hs
haskell
# LANGUAGE OverloadedStrings # | What version of bitcoind are we running? | What version is the wallet? | How much money is currently in the wallet? | The number of blocks in our chain. | How many peers are we connected to? | A blank string if we're not using a proxy. | The difficulty multiplier for bitcoin mini...
# LANGUAGE TemplateHaskell # module Network.Bitcoin.Api.Misc ( module Network.Bitcoin.Api.Misc , I.callRaw , I.RpcError(..) ) where import Control.Applicative ((<$>), (<*>)) import Control.Lens.TH (makeLenses) import Control.Monad (mzero) import ...
23836b869d8a9080bc99fb9a666665ac7ec721fcaf89e84fec8df28fce9380e2
graninas/Functional-Design-and-Architecture
Types.hs
module Andromeda.Common.Types where type Key = String type Message = String
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/f54faef342bee66be1667d3fb9f54582bbc18a1d/Second-Edition-Manning-Publications/BookSamples/CH05/Section5p2p3/src/Andromeda/Common/Types.hs
haskell
module Andromeda.Common.Types where type Key = String type Message = String
3c434aedcd40d6d2db3f15f3a6eb93f4599bc88b28217334e420631e84bb5ddb
robertzk/xgboost.hs
Test.hs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE FlexibleInstances # # CFILES test.c xgboost_wrapper.cpp # import Xgboost import Xgboost.Foreign import System.IO.Unsafe import Foreign.C import Foreign.Storable import Foreign.Ptr main :: IO () main = do check_trivial --check_xgboost_read -- Stolen: myAssert :: S...
null
https://raw.githubusercontent.com/robertzk/xgboost.hs/b0b8890eba63a4dd25de3413b12a727f5e2fedac/tests/Test.hs
haskell
check_xgboost_read Stolen: check_xgboost_read = do let dat = unsafePerformIO $ (new :: IO (Ptr CFloat)) let dmh = unsafePerformIO $ (new :: IO (Ptr (Ptr ()))) mat rs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE FlexibleInstances # # CFILES test.c xgboost_wrapper.cpp # import Xgboost import Xgboost.Foreign import System.IO.Unsafe import Foreign.C import Foreign.Storable import Foreign.Ptr main :: IO () main = do check_trivial myAssert :: String -> Bool -> IO () myAssert msg...
8402113cefa0ee79ca8458de63726441f66eca69bc6e6f22cf710fbcc08d4711
testdouble/baizen
file_trailer_test.clj
(ns baizen.formats.file-trailer-test (:require [clojure.test :refer :all] [baizen.formats :refer :all] [baizen.formats.file-trailer :refer :all]) (:import (baizen.formats.file_trailer FileTrailer))) (def file-trailer-line ["99" "1215450000" "4" "36/"]) (deftest file-trailer-test (testing...
null
https://raw.githubusercontent.com/testdouble/baizen/66bc3da3b660bc88317e1be6fce266a95db883fb/test/baizen/formats/file_trailer_test.clj
clojure
(ns baizen.formats.file-trailer-test (:require [clojure.test :refer :all] [baizen.formats :refer :all] [baizen.formats.file-trailer :refer :all]) (:import (baizen.formats.file_trailer FileTrailer))) (def file-trailer-line ["99" "1215450000" "4" "36/"]) (deftest file-trailer-test (testing...
9c32ce12891caff92e9a3c78f0b1ea4e0cea93a4dc3fbe15382e9ae2acdb903e
tmattio/js-bindings
es2015_symbol.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es5 module Symbol : sig include module type of struct include Symbol end val for_ : key:string -> symbol [@@js.global "for"] val key_for : sym:symbol -> string or_undefined [@@js.global "keyFor"] end [@@js.scope...
null
https://raw.githubusercontent.com/tmattio/js-bindings/f1d36bba378e4ecd5310542a0244dce9258b6496/lib/es2015/es2015_symbol.mli
ocaml
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es5 module Symbol : sig include module type of struct include Symbol end val for_ : key:string -> symbol [@@js.global "for"] val key_for : sym:symbol -> string or_undefined [@@js.global "keyFor"] end [@@js.scope...
c07d54e7151fe88bff3b2771eee26163b5e8f04de67b957df59458df242dfc58
sethtrain/clj-twilio
voice.clj
(ns twilio.twiml.voice (:use [twilio.twiml.core])) ;; Primary Verbs (content-verb say) (content-verb play) (nestable-verb gather) (simple-verb record) (content-verb sms) (nestable-verb dial) (content-verb number) (content-verb conference) ;; Secondary Verbs (single-verb hangup) (content-verb redirect) (simple-ver...
null
https://raw.githubusercontent.com/sethtrain/clj-twilio/924b2aab51f543611dc37022f7c0e82b677ee521/src/twilio/twiml/voice.clj
clojure
Primary Verbs Secondary Verbs
(ns twilio.twiml.voice (:use [twilio.twiml.core])) (content-verb say) (content-verb play) (nestable-verb gather) (simple-verb record) (content-verb sms) (nestable-verb dial) (content-verb number) (content-verb conference) (single-verb hangup) (content-verb redirect) (simple-verb reject) (simple-verb pause)
79af3bc732bc488c3c0e5a04d4bb06bcda40c4fbe6627242a22e5c7456f3c3b1
gowthamk/ocaml-irmin
alice_monkey.ml
open Printf (* Utility functions *) U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = begin Printf.printf "%s\n" h; flush_all(); end let (>>=) = Lwt.Infix.(>>=) let rec loop_...
null
https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/heap_leftist/fs/alice_monkey.ml
ocaml
Utility functions * -------------------------------------------------------- * Note: this alice monkey is setup to do diff experiments. * For more general experiments, change the repo root path, and * uncomment bob_url * -------------------------------------------------------- bob_uri select a random number ...
open Printf U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = begin Printf.printf "%s\n" h; flush_all(); end let (>>=) = Lwt.Infix.(>>=) let rec loop_until_y (msg:string) : u...
81fceb1c5de8845db9e06b44d2783192267d78f8dbe9714bda1c9071cb4de5ac
darrenldl/ProVerif-ATP
param.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/param.ml
ocaml
constants for predicate properties constants for function properties various parameters that can be set by the user For trace reconstruction, to disable display of initial state when backtracking is forbidden and the trace is displayed as it is build. let testeq = ref (None : (Types.predicate * Types.funsym...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
9c86d8427b4783c3e30259b58cec4a014fe98c9fb3defc533603eede8577175a
raymoo/applepai
GameState.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # module Mahjong.GameState ( -- * Players PlayerNum(..) , Players(..) , p1 , p2 ...
null
https://raw.githubusercontent.com/raymoo/applepai/0112f74ffb14b51dd0b0c4f987cfd783750b3aac/src/Mahjong/GameState.hs
haskell
# LANGUAGE RankNTypes # * Players * The Wall * Game State ** Generic State ** Moves *** Validation | 'Getter' for the tiles in a wall | 'Getter' for the number of tiles in a wall | 'Getter' for the tiles in the dead wall | Generic GameState - This information is common to all game states. The players in the ...
# LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # module Mahjong.GameState ( PlayerNum(..) , Players(..) , p1 , p2 , p3 , p4 , TileWal...
bd81a1438c0b8450ca3bbd3378c01439e0de858e30fdf2b0d902fc101ebcf0ba
tpapp/cl-slice
cl-slice.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- (cl:defpackage #:cl-slice (:use #:cl #:alexandria #:anaphora #:cl-slice-dev #:let-plus) (:export #:slice #:aslice #:ref #:including #:nodrop #:head #:tail #:mask #:which)) (in-package #:cl-slice) ;;; generic user...
null
https://raw.githubusercontent.com/tpapp/cl-slice/02395a30dc7b417b1f0ae2a1f9a2787938d75082/cl-slice.lisp
lisp
Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- generic user interface some convenience forms implementation for arrays implementation for lists masks
(cl:defpackage #:cl-slice (:use #:cl #:alexandria #:anaphora #:cl-slice-dev #:let-plus) (:export #:slice #:aslice #:ref #:including #:nodrop #:head #:tail #:mask #:which)) (in-package #:cl-slice) (defgeneric ref (object &rest subscripts) (:documentation "Return the element of OBJ...
e80f1bbf05c05b6720c80cf52750158b4f411e4f88c07a38c2459ecee6c013b0
alanz/ghc-exactprint
Control.hs
# LANGUAGE Unsafe # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , BangPatterns # , NoImplicitPrelude , ScopedTypeVariables , BangPatterns #-} module GHC.Event.Control ( * Managing the IO manager Signal , ControlM...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/Control.hs
haskell
** Control message reception *** File descriptors ** Control message sending * Utilities # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # INLINE wakeupReadFd # | Create the structure (usually a pipe) used for waking up the IO manager thread from another thread. The write end must be...
# LANGUAGE Unsafe # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , BangPatterns # , NoImplicitPrelude , ScopedTypeVariables , BangPatterns #-} module GHC.Event.Control ( * Managing the IO manager Signal , ControlM...
f0262f44ebfcd0831db14bcb29464e05f9220c05c66646ed4dfe40c226739abf
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Email.Rules ( rules ) where im...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Email/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Email.Rules ( rules ) where import Prelude import Data.String import Duckling.Dimensions.Types import Duckling.Email.Types (EmailData (..)) import qualified Duckling.Email.Types as TEmail import Duckling.Regex.Types import Duckling.Types ruleEma...
3c7b4447a96434e6d36e9aa4e543fcbda552cb97ca966374f3bce3d60ae3e269
jaspervdj/blaze-markup
Blaze.hs
{-# LANGUAGE CPP #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} -- | BlazeMarkup is a markup combinator library. It provides a way to embed markup languages like HTML and SVG in Haskell in an efficient and convenient -- way, with a l...
null
https://raw.githubusercontent.com/jaspervdj/blaze-markup/214b4110b925378f5e5e5a1e9c2d66120b6889d1/src/Text/Blaze.hs
haskell
# LANGUAGE CPP # # LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances # | BlazeMarkup is a markup combinator library. It provides a way to embed way, with a light-weight syntax. To use the library, one needs to import a set of combinators. For example, > {-# LANGUAGE OverloadedString...
# LANGUAGE FlexibleInstances # markup languages like HTML and SVG in Haskell in an efficient and convenient you can use HTML 4 Strict from BlazeHtml package . > import Prelude hiding ( head , i d , div ) To render the page later on , you need a so called Renderer . The recommended renderer is an UTF-8 ren...
d78667307ce220e5aa596a4ffc88906b2490b7de1dc96995bd7ec71e64136fcc
danlentz/datomic-rdf
tree.clj
(ns datomic-rdf.tree (:use [clojure.core]) (:use [clojure.pprint]) (:use [datomic-schema.schema :only [defpart defschema fields part]]) (:use [clojure.repl :only [doc find-doc apropos]]) (:require [datomic-rdf.model :refer :all]) (:require [clojure.string :as string]) (:require [datomic.api :as d]) (:re...
null
https://raw.githubusercontent.com/danlentz/datomic-rdf/cffa0d425d70de690a42c354cd3c4c503b17700f/src/datomic_rdf/tree.clj
clojure
tree-nodes
(ns datomic-rdf.tree (:use [clojure.core]) (:use [clojure.pprint]) (:use [datomic-schema.schema :only [defpart defschema fields part]]) (:use [clojure.repl :only [doc find-doc apropos]]) (:require [datomic-rdf.model :refer :all]) (:require [clojure.string :as string]) (:require [datomic.api :as d]) (:re...
7412ad06c0b2dfe4481cbf57933fe43442728e7185fa71a25ee7f782df1b7c2f
c-cube/poc-modular-io
rot13.ml
open IO let f c = match c with | 'a' .. 'z' -> Char.chr (Char.code 'a' + ((Char.code c - Char.code 'a') + 13) mod 26) | 'A' .. 'Z' -> Char.chr (Char.code 'A' + ((Char.code c - Char.code 'A') + 13) mod 26) | c -> c let map_in ?buf_size ic = IO_helpers.map_c ?buf_size f ic let map_out oc = IO_helpe...
null
https://raw.githubusercontent.com/c-cube/poc-modular-io/cfc40b78b519cb187d77d2f17c575320dbec1a0a/src/rot13.ml
ocaml
open IO let f c = match c with | 'a' .. 'z' -> Char.chr (Char.code 'a' + ((Char.code c - Char.code 'a') + 13) mod 26) | 'A' .. 'Z' -> Char.chr (Char.code 'A' + ((Char.code c - Char.code 'A') + 13) mod 26) | c -> c let map_in ?buf_size ic = IO_helpers.map_c ?buf_size f ic let map_out oc = IO_helpe...
aa7bcf166cae3902f4a2a703bede2dab30c64de8e6acb8cdba235eee6935c5f9
haskell-perf/graphs
Setup.hs
import Distribution.Simple import System.Directory import Data.List (intercalate, delete, isInfixOf, sort) import qualified Data.Text as T import qualified Data.Text.IO as T main :: IO () main = do generateRealLifeGraphs defaultMain -- | generate real life graphs from a text file generateRealLifeGraphs :: IO () g...
null
https://raw.githubusercontent.com/haskell-perf/graphs/d2e53fb424b01bb51d5733cc40fd62abb2740430/Setup.hs
haskell
| generate real life graphs from a text file
import Distribution.Simple import System.Directory import Data.List (intercalate, delete, isInfixOf, sort) import qualified Data.Text as T import qualified Data.Text.IO as T main :: IO () main = do generateRealLifeGraphs defaultMain generateRealLifeGraphs :: IO () generateRealLifeGraphs = do gr <- sort . delete...
a2b8c366561af8bcee1a372cc14d8167e2b059b291714b5b403f4f715502cf92
abailly/hs-word2vec
analyze.hs
module Main where import Control.Monad (foldM, when) import Data.List (isSuffixOf) import Prelude hiding (readFile) import System.Directory (getDirectoryContents) import System.Environment (getArgs) import System.FilePath ((</>))...
null
https://raw.githubusercontent.com/abailly/hs-word2vec/894e401325dbb7c35c45e9ed546b0914f93c900f/main/analyze.hs
haskell
module Main where import Control.Monad (foldM, when) import Data.List (isSuffixOf) import Prelude hiding (readFile) import System.Directory (getDirectoryContents) import System.Environment (getArgs) import System.FilePath ((</>))...
5c0109d95e0059a66b2f97623114139a6a49188a26e96b529dc210e81d95ffe7
williamleferrand/aws
sDB.ml
module M = SDB_factory.Make (Ocsigen_HC) include M
null
https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/src/ocsigen/sDB.ml
ocaml
module M = SDB_factory.Make (Ocsigen_HC) include M
f701ff82bd72974ad8434cb24737692ffaf268b9dc5753487cb888a450d48c2d
input-output-hk/marlowe-pioneer-program
double-pay-refactored.hs
{-# LANGUAGE OverloadedStrings #-} import Language.Marlowe.Extended main :: IO () main = printJSON $ contract "Giver1" "Giver2" "Receiver" (ConstantParam "Deposit") (TimeParam "Deadline") contract :: Party -> Party -> Party -> Value -> Timeout -> Contract contract giver1 giver2 receiver amount deadline = When [d...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-pioneer-program/2e1238f74d6879eb17083da763b565b4cabf76bd/code/src/lecture04/double-pay-refactored.hs
haskell
# LANGUAGE OverloadedStrings #
import Language.Marlowe.Extended main :: IO () main = printJSON $ contract "Giver1" "Giver2" "Receiver" (ConstantParam "Deposit") (TimeParam "Deadline") contract :: Party -> Party -> Party -> Value -> Timeout -> Contract contract giver1 giver2 receiver amount deadline = When [deposits giver1 giver2, deposits giv...
6ccedfdfedc952713c7e181002cafa4caefa78951edf3bb6aa862e6e94b08ed5
Frozenlock/bacure
state.clj
(ns bacure.state) Generic methods (defn- set-value! [state v] (reset! state v)) (defn- get-key [state k] (or k (some-> @state first key))) (defn- get-value "Return the local-device associated with the device-id. If device-id is nil, simply return the first found." [state k] (->> (get-key state k)...
null
https://raw.githubusercontent.com/Frozenlock/bacure/d76ee23a290b8453334e31ed20b87ccb3c1024cb/src/bacure/state.clj
clojure
Requests Local devices (def get-local-device-id (partial get-key local-devices)) ;; not yet used previously 'get-local-device-property' ports might still be bound to the removed (def get-local-device (partial get-value local-devices)) (def get-local-device-property (partial get-in-value local-devices)) (def assoc-i...
(ns bacure.state) Generic methods (defn- set-value! [state v] (reset! state v)) (defn- get-key [state k] (or k (some-> @state first key))) (defn- get-value "Return the local-device associated with the device-id. If device-id is nil, simply return the first found." [state k] (->> (get-key state k)...