_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
a46bc31ebdfccce52914fc758d28c11352ff408dae2d4b370376910d019b17df
Dasudian/DSDIN
wormhole_session_noise.erl
-module(wormhole_session_noise). -behaviour(gen_server). -include("wormhole_codec.hrl"). -export([connect/3 , accept/2 , close/1]). -export([channel_open/2 , channel_accept/2 , funding_created/2 , funding_signed/2 , funding_locked/2 , deposit_created/2 , deposi...
null
https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/wormhole/src/wormhole_session_noise.erl
erlang
Connection establishment handle supported short forms 'binary' and 'list'
-module(wormhole_session_noise). -behaviour(gen_server). -include("wormhole_codec.hrl"). -export([connect/3 , accept/2 , close/1]). -export([channel_open/2 , channel_accept/2 , funding_created/2 , funding_signed/2 , funding_locked/2 , deposit_created/2 , deposi...
e023b9b59c82fa4d255d80b331a2b5c8ad47ded94ecc9b8eb2c7cb14fd9bf2c9
PuercoPop/Movitz
primitive-functions.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2001 - 2005 , Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: primitive-functions.lisp ;;;; Descript...
null
https://raw.githubusercontent.com/PuercoPop/Movitz/7ffc41896c1e054aa43f44d64bbe9eaf3fcfa777/losp/muerte/primitive-functions.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: primitive-functions.lisp Description: Some primitive-functions of the basic run-time ---------------------------------------------...
Copyright ( C ) 2001 - 2005 , Department of Computer Science , University of Tromso , Norway . Author : < > Created at : Tue Oct 2 21:02:18 2001 $ I d : primitive - functions.lisp , v 1.71 2008 - 03 - 21 22:28:26 Exp $ (require :muerte/basic-macros) (provide :muerte/primitive-functio...
e9a275933199f9da4af52733fa76e8531e42516a8a5b55954426ba218f96c431
hypernumbers/hypernumbers
bootstrap_utils.erl
@author ( C ) 2012 - 2014 , Hypernumbers Ltd @doc Utilities for bootstrap fns %%% %%% @end Created : 22 Oct 2012 by %%%------------------------------------------------------------------- %%% %%% LICENSE %%% %%% This program is free software: you can redistribute it and/or modify it under the t...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/hypernumbers-1.0/src/bootstrap_utils.erl
erlang
@end ------------------------------------------------------------------- LICENSE This program is free software: you can redistribute it and/or modify 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 ...
@author ( C ) 2012 - 2014 , Hypernumbers Ltd @doc Utilities for bootstrap fns Created : 22 Oct 2012 by it under the terms of the GNU Affero General Public License as published by the Free Software Foundation version 3 You should have received a copy of the GNU Affero General Public License...
49de4ae9bf3f1fef466d71a64f38033e1a4e105f0a7c9d2bc813c0f393a80fe7
vernemq/vernemq_dev
on_offline_message_hook.erl
%% @hidden -module(on_offline_message_hook). -include("vernemq_dev.hrl"). %% called as an 'all'-hook, return value is ignored -callback on_offline_message(SubscriberId :: subscriber_id(), QoS :: qos(), Topic :: topic(), ...
null
https://raw.githubusercontent.com/vernemq/vernemq_dev/6d622aa8c901ae7777433aef2bd049e380c474a6/src/on_offline_message_hook.erl
erlang
@hidden called as an 'all'-hook, return value is ignored
-module(on_offline_message_hook). -include("vernemq_dev.hrl"). -callback on_offline_message(SubscriberId :: subscriber_id(), QoS :: qos(), Topic :: topic(), Payload :: payload(), ...
a6f61454c5f08c59b7a9e39fdd00a2a605f31ff9f1a46d54866bc55b77718eb3
tek/helic
AgentId.hs
{-# options_haddock prune #-} -- |AgentId Data Type, Internal module Helic.Data.AgentId where import Polysemy.Time.Json (json) newtype AgentId = AgentId { unAgentId :: Text } deriving stock (Eq, Show) deriving newtype (IsString) json ''AgentId
null
https://raw.githubusercontent.com/tek/helic/055b2ffa063936ad4ae6249c9e6e0603482baaa9/packages/helic/lib/Helic/Data/AgentId.hs
haskell
# options_haddock prune # |AgentId Data Type, Internal
module Helic.Data.AgentId where import Polysemy.Time.Json (json) newtype AgentId = AgentId { unAgentId :: Text } deriving stock (Eq, Show) deriving newtype (IsString) json ''AgentId
bf5e2fef56f126e7104a843e4c34e84d44772a4a63fd584a2f07ac5ef7f1b1ce
fakedata-haskell/fakedata
OtherSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module OtherSpec where import Control.Applicative ((<|>)) import Control.Monad.Catch import Control.Monad.IO.Class import qualified Data.Map as M import Data.Semigroup ((<>)) import Data.Text hiding (all, map) import qual...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/4182ff14bb0aa8513ac30f5860506b3bb96482a0/test/OtherSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # module OtherSpec where import Control.Applicative ((<|>)) import Control.Monad.Catch import Control.Monad.IO.Class import qualified Data.Map as M import Data.Semigroup ((<>)) import Data.Text hiding (all, map) import qualified Data.Text as T import qualifi...
fec19c84649863f0f6dacd8a973bcc9930015e4050ba98c824d8da56347bd8a7
rand00/flappy
flap.ml
open Js_of_ocaml open Lwt.Infix open Lwt_react open ReactiveData open Gg module H = Tyxml_js.Html module R = Tyxml_js.R.Html let sp = Printf.sprintf let log = Printf.printf let (%) f g x = f (g x) let (%>) f g x = g (f x) module IMap = CCMap.Make(CCInt) open GameEntity.T open GameModel.T let debug = false let fp...
null
https://raw.githubusercontent.com/rand00/flappy/1fe4d2dfd24fdb6131828cb953bf3e2a20db55a4/src/flap.ml
ocaml
Note: Intentionally evaluating else-case to test performance *Imperative code - initialization and updating graph w a s d arrow-up arrow-left arrow-down arrow-right i j k l p
open Js_of_ocaml open Lwt.Infix open Lwt_react open ReactiveData open Gg module H = Tyxml_js.Html module R = Tyxml_js.R.Html let sp = Printf.sprintf let log = Printf.printf let (%) f g x = f (g x) let (%>) f g x = g (f x) module IMap = CCMap.Make(CCInt) open GameEntity.T open GameModel.T let debug = false let fp...
664fdcb6f8dd175bf3956679e9aa1e7e100aa10f9912cae50db968998840c34c
vikram/lisplibraries
cmucl.lisp
(in-package :trivial-sockets) (defun resolve-hostname (name) (cond ((eql name :any) "0.0.0.0") ((typep name '(vector * 4)) (format nil "~{~A~^.~}" (coerce name 'list))) (t name))) (defun pretty-stream-name (host port) (format nil "~A:~A" (resolve-hostname host) port)) (defun open-stream (peer-host peer-...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/dependencies/trivial-sockets_until-i-can-merge-with-the-mainline/cmucl.lisp
lisp
connect-to-inet-socket signals simple-erors. not great create-inet-listener barfs on `:host nil'
(in-package :trivial-sockets) (defun resolve-hostname (name) (cond ((eql name :any) "0.0.0.0") ((typep name '(vector * 4)) (format nil "~{~A~^.~}" (coerce name 'list))) (t name))) (defun pretty-stream-name (host port) (format nil "~A:~A" (resolve-hostname host) port)) (defun open-stream (peer-host peer-...
121c553d96d8ae40c15cb2f4bc1ec326bab80b755e054802070fecff4d008778
haskell/c2hs
NameSpaces.hs
Compiler Toolkit : name space management -- Author : Created : 12 November 95 -- Copyright ( c ) [ 1995 .. 1999 ] -- -- This file 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 ...
null
https://raw.githubusercontent.com/haskell/c2hs/7a4da9e93fc0456f01aa7a94e5eea533b171fd1d/src/Data/NameSpaces.hs
haskell
This file is free software; you can redistribute it and/or modify (at your option) any later version. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publ...
Compiler Toolkit : name space management Author : Created : 12 November 95 Copyright ( c ) [ 1995 .. 1999 ] it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or language : 98 module Data.NameSpaces (NameSp...
c0a18597e8b4ee278fe44b3dbe09486867a409d7b517242f163ceb4bcc716357
MarcKaufmann/congame
howtos.rkt
#lang racket/base ;; Stolen from: ;; -doc/scribblings/style/shared.rkt (require racket/list racket/match (only-in scribble/core table-columns table-cells style plain color-property nested-flow) scribble/html-properties scribble/manual scribble/struct) ...
null
https://raw.githubusercontent.com/MarcKaufmann/congame/2f1409fd78f3cf38c350e0ec5af437ffdf55c911/congame-doc/howtos.rkt
racket
Stolen from: -doc/scribblings/style/shared.rkt -- in --
#lang racket/base (require racket/list racket/match (only-in scribble/core table-columns table-cells style plain color-property nested-flow) scribble/html-properties scribble/manual scribble/struct) (provide compare0) (define stretching-style (style ...
e8644a856f5db19c20faa1fcdb58abc5e7a88a1f98709fa5629f24591064f5ad
toddaaro/advanced-dan
valo-cps-cc.scm
A basic scheme interpreter in ;;(load "ck.scm") ;;(load "neq.scm") ;;(load "tree-unify.scm") ;;(load "miniKanren.scm") (import (ck)) (import (neq)) (load "matche.scm") (load "tester.scm") (define valo-cps (lambda (exp env k val) (matche `(,exp ,env ,k ,val) [(,exp ,env ,k ,val) (conde ...
null
https://raw.githubusercontent.com/toddaaro/advanced-dan/5d6c0762d998aa37774e0414a0f37404e804b536/valo/valo-cps-cc.scm
scheme
(load "ck.scm") (load "neq.scm") (load "tree-unify.scm") (load "miniKanren.scm") MY TESTS! IMPORTS ARE HARD!
A basic scheme interpreter in (import (ck)) (import (neq)) (load "matche.scm") (load "tester.scm") (define valo-cps (lambda (exp env k val) (matche `(,exp ,env ,k ,val) [(,exp ,env ,k ,val) (conde [(numo exp) (apply-k k exp val)] [(== exp #t) (apply-k k #t val)] [(...
a78d6ae90972bbd511614245d2eabf01788ae2931cd7d9a2d592c9de1bd90bdd
backtracking/mlpost
mlpost.mli
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/e82db2d3766f24392956478496fa26c8837c1fef/src/mlpost.mli
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking module Signature : sig type point module type Boxlike = sig type t val width : t -> float...
427424658ac37ad465e0e908b9c8eef30cbf20153bc95740ff7f26a39cebcdd9
obsidiansystems/prim-uniq
Tag.hs
{-# LANGUAGE GADTs, FlexibleInstances #-} module Unsafe.Unique.Tag ( Tag , newTag , veryUnsafeMkTag ) where import Data.GADT.Compare import Data.GADT.Show import Unsafe.Unique.Prim import Unsafe.Coerce import Control.Monad.Primitive import Control.Monad import Data.Type.Equality ((:~:)(..)) |The ' T...
null
https://raw.githubusercontent.com/obsidiansystems/prim-uniq/401f8880a1b2045f2ad8c4714dda0a1c8c3735b4/src/Unsafe/Unique/Tag.hs
haskell
# LANGUAGE GADTs, FlexibleInstances # phantom type. A 'Tag' constructor can be generated in any primitive monad (but only tags from the same one can be compared). Every tag is equal to itself and to equality even when their types are not known to be equal. 'Tag' uses a 'Uniq' as a witness of type equality, wh...
module Unsafe.Unique.Tag ( Tag , newTag , veryUnsafeMkTag ) where import Data.GADT.Compare import Data.GADT.Show import Unsafe.Unique.Prim import Unsafe.Coerce import Control.Monad.Primitive import Control.Monad import Data.Type.Equality ((:~:)(..)) |The ' Tag ' type is like an ad - hoc GADT allowin...
9b55c7b31bf596b7fb07c2e36ed1158f570308d59079a6529a1cdc72e21aec77
WorksHub/client
views.cljs
(ns wh.logged-in.personalised-jobs.views (:require [re-frame.core :refer [dispatch]] [wh.components.common :refer [link]] [wh.components.icons :refer [icon]] [wh.components.job :refer [job-card]] [wh.logged-in.personalised-jobs.events :as events] [wh.logged-in.personalised-jobs.subs :as subs] ...
null
https://raw.githubusercontent.com/WorksHub/client/d38e2e1bfbbc7a00715dc3c7a3ddc7130c6090f0/client/src/wh/logged_in/personalised_jobs/views.cljs
clojure
(ns wh.logged-in.personalised-jobs.views (:require [re-frame.core :refer [dispatch]] [wh.components.common :refer [link]] [wh.components.icons :refer [icon]] [wh.components.job :refer [job-card]] [wh.logged-in.personalised-jobs.events :as events] [wh.logged-in.personalised-jobs.subs :as subs] ...
42e68dd38662bc0dd8cc660662ef7da35b461fbf08e9a8dd1eab89054a781a38
mirage/alcotest
compact.ml
let () = let open Alcotest in let passing s = test_case s `Quick (fun () -> ()) in let failing s = test_case s `Quick (fun () -> failwith "Error") in run ~compact:true __FILE__ [ ("alpha", [ passing "1"; passing "2"; failing "3"; passing "4" ]); ("beta", [ passing "1" ]); ("gamma", [ passi...
null
https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/test/e2e/alcotest/failing/compact.ml
ocaml
let () = let open Alcotest in let passing s = test_case s `Quick (fun () -> ()) in let failing s = test_case s `Quick (fun () -> failwith "Error") in run ~compact:true __FILE__ [ ("alpha", [ passing "1"; passing "2"; failing "3"; passing "4" ]); ("beta", [ passing "1" ]); ("gamma", [ passi...
a3301e0ff6e3de150d2246984a6603d2e4211c4c05564ea549279ee212c81c12
gafiatulin/codewars
SimpleDecrypt.hs
-- Simple decrypt algo -- module Kata (decrypt) where import Data.Char (isAsciiLower, intToDigit) import qualified Data.Map.Strict as Map decrypt :: String -> String decrypt = map (intToDigit . snd) . Map.toAscList . foldl f (Map.fromList . zip ['a' .. 'z'] . repeat $ 0) where f m c | isAsciiLower c = Map.insertW...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/SimpleDecrypt.hs
haskell
Simple decrypt algo
module Kata (decrypt) where import Data.Char (isAsciiLower, intToDigit) import qualified Data.Map.Strict as Map decrypt :: String -> String decrypt = map (intToDigit . snd) . Map.toAscList . foldl f (Map.fromList . zip ['a' .. 'z'] . repeat $ 0) where f m c | isAsciiLower c = Map.insertWith (+) c 1 m ...
f67f3148784785f0d5f17da686b0d01dbf42d324eadd9cd7934fd837df86062d
CryptoKami/cryptokami-core
Types.hs
# LANGUAGE TemplateHaskell # module Pos.Shutdown.Types ( ShutdownContext (..) , shdnIsTriggered ) where import Universum import Control.Lens (makeLenses) data ShutdownContext = ShutdownContext { _shdnIsTriggered :: !(TVar Bool) -- ^ If this flag is `True`, then worke...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/infra/Pos/Shutdown/Types.hs
haskell
^ If this flag is `True`, then workers should stop.
# LANGUAGE TemplateHaskell # module Pos.Shutdown.Types ( ShutdownContext (..) , shdnIsTriggered ) where import Universum import Control.Lens (makeLenses) data ShutdownContext = ShutdownContext { _shdnIsTriggered :: !(TVar Bool) } makeLenses ''ShutdownContext
4305336d0dd0dbf2abcca7c800b9b19d2f6d6da4b75284d46b5b03ffb03036e7
ds-wizard/engine-backend
LocaleCreateSM.hs
module Wizard.Api.Resource.Locale.LocaleCreateSM where import Data.Swagger import Servant import Servant.Multipart import Servant.Swagger import Servant.Swagger.Internal import Wizard.Api.Resource.Locale.LocaleCreateDTO (LocaleCreateDTO) instance HasSwagger api => HasSwagger (MultipartForm Mem LocaleCreateDTO :> api...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/12717256cde8d20020e30cd55dc3ef00fef9362a/engine-wizard/src/Wizard/Api/Resource/Locale/LocaleCreateSM.hs
haskell
module Wizard.Api.Resource.Locale.LocaleCreateSM where import Data.Swagger import Servant import Servant.Multipart import Servant.Swagger import Servant.Swagger.Internal import Wizard.Api.Resource.Locale.LocaleCreateDTO (LocaleCreateDTO) instance HasSwagger api => HasSwagger (MultipartForm Mem LocaleCreateDTO :> api...
5d6877089a1764c2e4860af82f4e29fcb898cddfc2c7533d577a378812801c00
fission-codes/cli
Types.hs
-- | General configuration required to run any CLI function module Fission.CLI.Config.Base.Types ( BaseConfig (..) , FissionBase (..) ) where import Fission.Prelude import qualified RIO.ByteString.Lazy as Lazy import RIO.Orphans () import Fission.Web.Client import qualified Fissio...
null
https://raw.githubusercontent.com/fission-codes/cli/dc3500babad35a6cb44835fa503d27d672cbcdb3/library/Fission/CLI/Config/Base/Types.hs
haskell
| General configuration required to run any CLI function | The configuration used for the CLI application | The top-level app type
module Fission.CLI.Config.Base.Types ( BaseConfig (..) , FissionBase (..) ) where import Fission.Prelude import qualified RIO.ByteString.Lazy as Lazy import RIO.Orphans () import Fission.Web.Client import qualified Fission.Web.Client.Types as Client import Network.IPFS ...
b4b74abb6cc789352e05728f843031d0017e3607389e3ed211774709f85521af
typelead/intellij-eta
Type00003.hs
{-# LANGUAGE RankNTypes #-} module Type00003 where type Run t = forall n b. Monad n => t n b -> n (StT t b)
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/resources/fixtures/eta/sources/Type00003.hs
haskell
# LANGUAGE RankNTypes #
module Type00003 where type Run t = forall n b. Monad n => t n b -> n (StT t b)
5d858c64b826f71986f3b96523ad69e9fbfde6423a5c37dd39677be8f7b35cb5
andrewMacmurray/haskell-book-solutions
Pipeline.hs
module Ch21.Pipeline where data Query = Query data SomeObj = SomeObj data IoOnlyObj = IoOnlyObj data Err = Err decodeFn :: String -> Either Err SomeObj decodeFn = undefined fetchFn :: Query -> IO [String] fetchFn = undefined makeIoOnlyObj :: [SomeObj] -> IO [(SomeObj, IoOnlyObj)] makeIoOnlyObj = undefined pipeline...
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch21/Pipeline.hs
haskell
module Ch21.Pipeline where data Query = Query data SomeObj = SomeObj data IoOnlyObj = IoOnlyObj data Err = Err decodeFn :: String -> Either Err SomeObj decodeFn = undefined fetchFn :: Query -> IO [String] fetchFn = undefined makeIoOnlyObj :: [SomeObj] -> IO [(SomeObj, IoOnlyObj)] makeIoOnlyObj = undefined pipeline...
c0ca59c4ce140c1ed60bbcdb8d6fa783e370b82c2ba4c02f28023678971f1c5e
RefactoringTools/HaRe
D3.hs
module Renaming.D3 where {-Rename class name 'SameOrNot' to 'Same'. This refactoring affects module `D3', 'B3' and 'C3' -} data Tree a = Leaf a | Branch (Tree a) (Tree a) fringe :: Tree a -> [a] fringe (Leaf x ) = [x] fringe (Branch left right) = fringe left ++ fringe right class SameOrNot a where isSame :: a...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/D3.hs
haskell
Rename class name 'SameOrNot' to 'Same'. This refactoring affects module `D3', 'B3' and 'C3'
module Renaming.D3 where data Tree a = Leaf a | Branch (Tree a) (Tree a) fringe :: Tree a -> [a] fringe (Leaf x ) = [x] fringe (Branch left right) = fringe left ++ fringe right class SameOrNot a where isSame :: a -> a -> Bool isNotSame :: a -> a -> Bool instance SameOrNot Int where isSame a b = a == b ...
58d941466480a4f26dc01c7f6d214285979c3cf8a18f277b89c45666c63e06e0
lemmaandrew/CodingBatHaskell
makes10.hs
From Given 2 ints , a and b , return true if one if them is 10 or if their sum is 10 . Given 2 ints, a and b, return true if one if them is 10 or if their sum is 10. -} import Test.Hspec ( hspec, describe, it, shouldBe ) makes10 :: Int -> Int -> Bool makes10 a b = undefined main :: IO () main = hspec $ descr...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Warmup-1/makes10.hs
haskell
From Given 2 ints , a and b , return true if one if them is 10 or if their sum is 10 . Given 2 ints, a and b, return true if one if them is 10 or if their sum is 10. -} import Test.Hspec ( hspec, describe, it, shouldBe ) makes10 :: Int -> Int -> Bool makes10 a b = undefined main :: IO () main = hspec $ descr...
b983e783a53f89a046493811abff6e564c27cf04c49bf6eec6ea85d8bbf0c24e
mini-monkey/mini-monkey
minimonkey_app.erl
%%%------------------------------------------------------------------- @doc minimonkey public API %% @end %%%------------------------------------------------------------------- -module(minimonkey_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %%================================...
null
https://raw.githubusercontent.com/mini-monkey/mini-monkey/4afa4385256c0f1d23db522c0725c3291a8c86c8/src/minimonkey_app.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- Application callbacks ==================================================================== API ==================================================================== ------------...
@doc minimonkey public API -module(minimonkey_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> minimonkey_sup:start_link(). stop(_State) -> ok. Internal functions
f430c939b0ea36739b319e95681a3270f2689c84c71a99120320f6bd456167b2
JeffreyBenjaminBrown/hode
Index.hs
-- | Minus mkRslt, these gory details are not -- part of the Rslt interface. # LANGUAGE ScopedTypeVariables , TupleSections , LambdaCase # ScopedTypeVariables, TupleSections, LambdaCase #-} module Hode.Rslt.Index where import Control.Arrow (first) import Data.Maybe import Data.M...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode/Hode/Rslt/Index.hs
haskell
| Minus mkRslt, these gory details are not part of the Rslt interface. TODO ? speed: build ts at the same time as the map, to avoid looping over the addresses twice. | == Given an expression, look up an address. | == Given an address, look up what it's connected to. | `refExprPositions e` gives every pair `(r,a)...
# LANGUAGE ScopedTypeVariables , TupleSections , LambdaCase # ScopedTypeVariables, TupleSections, LambdaCase #-} module Hode.Rslt.Index where import Control.Arrow (first) import Data.Maybe import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set)...
917d328b7de9b028ac19f1ca394f3483c5393cf0a3daaea6dd5d876635ab5e42
caradoc-org/caradoc
TestMD5.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/test/TestMD5.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
ea0c3c7d522e7d219d69fff3b67715ba78d351bf0c5546a4c4d94d1722f61d66
thelema/ocaml-community
fstclassmod.ml
(* Example of algorithm parametrized with modules *) let sort (type s) set l = let module Set = (val set : Set.S with type elt = s) in Set.elements (List.fold_right Set.add l Set.empty) let make_set (type s) cmp = let module S = Set.Make(struct type t = s let compare = cmp end) in (module S : Set.S ...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/testsuite/tests/typing-fstclassmod/fstclassmod.ml
ocaml
Example of algorithm parametrized with modules Hiding the internal representation
let sort (type s) set l = let module Set = (val set : Set.S with type elt = s) in Set.elements (List.fold_right Set.add l Set.empty) let make_set (type s) cmp = let module S = Set.Make(struct type t = s let compare = cmp end) in (module S : Set.S with type elt = s) let both l = List.map (fun ...
d82d0d8d126a2e1140621b4dc53948464a8352c1b870e47b8e3266646a344967
ott-lang/ott
term_parser.ml
(**************************************************************************) (* Ott *) (* *) , Computer Laboratory , University of Cambridge , project , I...
null
https://raw.githubusercontent.com/ott-lang/ott/29ac9ef84967686da35b9b42608b3aec3539a689/src/term_parser.ml
ocaml
************************************************************************ Ott ...
, Computer Laboratory , University of Cambridge , project , INRIA Rocquencourt Copyright 2005 - 2007 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the ...
893a96b2273b7fe0aefffafaa04aed854847430734b88c1d186d6bdf4c609f44
ailisp/Graphic-Forms
label.lisp
(in-package :graphic-forms.uitoolkit.widgets) ;;; ;;; helper functions ;;; (defun compute-image-style-flags (style) (let ((flags (logior gfs::+ss-bitmap+ gfs::+ss-realsizeimage+ gfs::+ss-centerimage+))) (when (find :raised style) ; FIXME: this style not yet working (setf flags (logand (lognot gfs::+ss-sun...
null
https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/uitoolkit/widgets/label.lisp
lisp
helper functions FIXME: this style not yet working primary text static styles styles that can be combined FIXME: this style not yet working methods
(in-package :graphic-forms.uitoolkit.widgets) (defun compute-image-style-flags (style) (let ((flags (logior gfs::+ss-bitmap+ gfs::+ss-realsizeimage+ gfs::+ss-centerimage+))) (setf flags (logand (lognot gfs::+ss-sunken+) flags)) (setf flags (logior flags gfs::+ss-etchedframe+))) (when (find :sunken s...
375c08dda6a3594e60de711365a7008b223560ed40302cbad9bca69c66ae3ba0
synduce/Synduce
Parser.mli
(** This module defines function to convert from s-expressions to sygus. *) open Base open Sygus module Annot : sig type kind = | AAtom of string | AList of t list and t = { loc : Parsexp.Positions.range ; sexp : kind } (** Add dummy locations to a s-expression. *) val of_sexp : Sexp.t ...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/syguslib/Parser.mli
ocaml
* This module defines function to convert from s-expressions to sygus. * Add dummy locations to a s-expression. * An exception raised during the s-expression based parsing method. The s-expression should be the expression causing the exception to be raise, and the string is an informative message as to why parsi...
open Base open Sygus module Annot : sig type kind = | AAtom of string | AList of t list and t = { loc : Parsexp.Positions.range ; sexp : kind } val of_sexp : Sexp.t -> t val iter : t -> f:(location -> Sexp.t -> unit) -> unit end exception ParseError of location * Sexp.t * string excep...
5bf9d20bd0b8f9fb6f28ff496b69ed2c23d38f3833e5b1628297d17eef57a756
ggreif/dynamic-loader
UnsafeCriterion.hs
# LANGUAGE KindSignatures , ConstraintKinds , TypeFamilies , MultiParamTypeClasses , FlexibleInstances # MultiParamTypeClasses, FlexibleInstances #-} module System.Plugins.Criteria.UnsafeCriterion (Criterion(..)) where import System.Plugins.Criteria.LoadCriterion import System.Plugins.Dyna...
null
https://raw.githubusercontent.com/ggreif/dynamic-loader/9f3c8b6136d1902ab68ac37ff0182bb2bf1e9eae/System/Plugins/Criteria/UnsafeCriterion.hs
haskell
# LANGUAGE KindSignatures , ConstraintKinds , TypeFamilies , MultiParamTypeClasses , FlexibleInstances # MultiParamTypeClasses, FlexibleInstances #-} module System.Plugins.Criteria.UnsafeCriterion (Criterion(..)) where import System.Plugins.Criteria.LoadCriterion import System.Plugins.Dyna...
85e4e47f0b2d58e387bfd7d911e847803b9249c640e651565cc6f40122bd8977
K2InformaticsGmbH/egambo
egambo_tictac_sym_5_4.erl
-module(egambo_tictac_sym_5_4). -export([a_ide/1, b_ver/1, c_hor/1, d_pnt/1]). -export([x01/1, x02/1, x03/1, x04/1]). -export([y01/1, y02/1, y03/1]). % generated in egambo_tictac_sym a_ide(Board) -> Board. b_ver([AA, AB, AC, AD, AE]) -> [AE, AD, AC, AB, AA]; b_ver([AA, AB, AC, AD, AE, BA, BB, BC, BD, BE, CA...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_tictac_sym_5_4.erl
erlang
generated in egambo_tictac_sym
-module(egambo_tictac_sym_5_4). -export([a_ide/1, b_ver/1, c_hor/1, d_pnt/1]). -export([x01/1, x02/1, x03/1, x04/1]). -export([y01/1, y02/1, y03/1]). a_ide(Board) -> Board. b_ver([AA, AB, AC, AD, AE]) -> [AE, AD, AC, AB, AA]; b_ver([AA, AB, AC, AD, AE, BA, BB, BC, BD, BE, CA, CB, CC, CD, CE, DA, DB, DC, DD,...
c0e2afd6fbd2a09f5a6cc40601e864c38c2110e8992e8a4fc4b586207f3c28f7
discoproject/disco
disco_config.erl
-module(disco_config). -behaviour(gen_server). -include("common_types.hrl"). -include("gs_util.hrl"). -include("disco.hrl"). -export([start_link/0]). -export([get_config_table/0, save_config_table/1, blacklist/1, whitelist/1, gc_blacklist/1, gc_whitelist/1]). -export([init/1, handle_call/3, handle_c...
null
https://raw.githubusercontent.com/discoproject/disco/be65272d3eecca184a3c8f2fa911b86ac87a4e8a/master/src/disco_config.erl
erlang
=================================================================== API functions =================================================================== gen_server callbacks =================================================================== internal functions Backward compatibility for older configs, updated whene...
-module(disco_config). -behaviour(gen_server). -include("common_types.hrl"). -include("gs_util.hrl"). -include("disco.hrl"). -export([start_link/0]). -export([get_config_table/0, save_config_table/1, blacklist/1, whitelist/1, gc_blacklist/1, gc_whitelist/1]). -export([init/1, handle_call/3, handle_c...
842cb8639cb8fe4d74aa5f1be42e5a1e12635889a3e4f30db15b802ef04121e7
nuprl/gradual-typing-performance
render-lnm.rkt
#lang typed/racket/base Specific tools for rendering L - N / M pictures in the current paper . We currently use this two ways : ;; - The paper (typed-racket.scrbl) calls 'data->pict' to create an image ;; - From the command-line, call `render-lnm.rkt -o FIG.png DATA.rktd ...` ;; to create a figure named `FIG.pn...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/popl-2016/render-lnm.rkt
racket
- The paper (typed-racket.scrbl) calls 'data->pict' to create an image - From the command-line, call `render-lnm.rkt -o FIG.png DATA.rktd ...` to create a figure named `FIG.png` from the data files `DATA.rktd ...` Build a picture from a list of pairs: Optional argument tags the generated figure, because results ...
#lang typed/racket/base Specific tools for rendering L - N / M pictures in the current paper . We currently use this two ways : (provide data->pict 1st component labels a dataset 2nd component is a path - string to data PARAM-N PARAM-M PARAM-L PARAM-MAX-OVERHEAD PARAM-NUM-SAMPLES ) (require "sc...
7bc01e0ca84391addce37312b8953c75ebd871d66542d218123b7ed014bf0b55
dsheets/codoc
assemble.ml
open Assemblage let version = "0.2.0" let warnings = ["-w";"@f@p@u@y"] let flags = Flags.(v (`Compile `Byte) warnings @@@ v (`Compile `Native) warnings @@@ v (`Link `Native) [(*"-p"*)]) let unix = pkg "unix" let stringext = pkg "stringext" let uri = pkg "uri" let doc_ock = pkg "doc-ock" let do...
null
https://raw.githubusercontent.com/dsheets/codoc/382077cf3e7e20e478bd97cc0b348e0b2ec926db/assemble.ml
ocaml
"-p" TODO: would be nice out of the library and into the tool
open Assemblage let version = "0.2.0" let warnings = ["-w";"@f@p@u@y"] let flags = Flags.(v (`Compile `Byte) warnings @@@ v (`Compile `Native) warnings @@@ let unix = pkg "unix" let stringext = pkg "stringext" let uri = pkg "uri" let doc_ock = pkg "doc-ock" let doc_ock_xml = pkg "doc-ock-xml" let xmlm...
43b5010f40765cb89738eb9d3980e5ebd4cace3fff94627e01c7dafbf53e0a4d
ivankelly/gambit
debug.scm
File : " debug.scm " , Time - stamp : < 2007 - 04 - 04 11:39:46 feeley > Copyright ( c ) 1998 - 2007 by , All Rights Reserved . Test program for Gambit - C 's interpreter support for debugging . ;------------------------------------------------------------------------------ (define (test a b c d) ((lambd...
null
https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/tests/debug.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ may not work in the future may not work in the future ------------------------------------------------------------------------------
File : " debug.scm " , Time - stamp : < 2007 - 04 - 04 11:39:46 feeley > Copyright ( c ) 1998 - 2007 by , All Rights Reserved . Test program for Gambit - C 's interpreter support for debugging . (define (test a b c d) ((lambda (e f g h) ((lambda (i j k l) (set! a (+ a 1)) (set! b (+ ...
626f643ce10b40cb2c445a509fd6d284178e7cf4c514af64de8a0e03b8faa7b8
bonkzwonil/defrest
suite.lisp
(in-package :cl-user) (defpackage :defrest-test (:use :cl :defrest :fiveam :hunchentoot)) ;; and :drakma but it clashes with hunchentoot namespace (in-package :defrest-test) (def-suite defrest-tests :description "Unit and runtime Tests for defrest") (in-suite defrest-tests) (test testurlfiddling () (is (equal ...
null
https://raw.githubusercontent.com/bonkzwonil/defrest/20824af48363822113e1357db74e5cd1a4d9a877/tests/suite.lisp
lisp
and :drakma but it clashes with hunchentoot namespace Simple CRUD Test
(in-package :cl-user) (in-package :defrest-test) (def-suite defrest-tests :description "Unit and runtime Tests for defrest") (in-suite defrest-tests) (test testurlfiddling () (is (equal "/test/[0-9]+/gna" (defrest::schema->regexpurl "/test/{id:[0-9]+}/gna")))) (test testparse () (let ((result (de...
ea6e6e3eaa851eae2559d83b80d2057824902629f92678ef67e63d81a3fd4de3
peti/csv2ledger
Camt.hs
# LANGUAGE ApplicativeDo # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # -- | Parse the CSV CAMT format for \"cash management\". module Csv2Ledger.Camt where import Csv2Ledger import Data.ByteString.Lazy as BSL import Data.Char import Data.Csv import Data.Text as T import Data.Text.Encoding as T i...
null
https://raw.githubusercontent.com/peti/csv2ledger/347daec3a748463f32f3a6d38d36827bc399039a/src/Csv2Ledger/Camt.hs
haskell
# LANGUAGE OverloadedStrings # | Parse the CSV CAMT format for \"cash management\".
# LANGUAGE ApplicativeDo # # LANGUAGE RecordWildCards # module Csv2Ledger.Camt where import Csv2Ledger import Data.ByteString.Lazy as BSL import Data.Char import Data.Csv import Data.Text as T import Data.Text.Encoding as T import Data.Text.Lazy.Encoding as TL import Data.Time.Calendar import Data.Time.Format impor...
0dde15580da484b925e30a9e762bc4e228fa697523981637b9a3999653affae2
hopv/MoCHi
CEGAR_abst.mli
(** Predicate abstraction *) exception NotRefined * call - by - name に対応させる際,let x = fail ; 1 in assert ( x = x ) が unsafe と判定されるようにしないといけない 古い実装では次の点でCPSに依存している - TRecSに渡すプログラムにタプルが入らないように - f : int[]->unit のとき,f fail が f にならないように(副作用のある式を消さないように ) call-by-name に対応させる際,let x = fail; 1 in assert (x = x) が ...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/CEGAR_abst.mli
ocaml
* Predicate abstraction * [abstract force t] で [t] の述語抽象を求める.
exception NotRefined * call - by - name に対応させる際,let x = fail ; 1 in assert ( x = x ) が unsafe と判定されるようにしないといけない 古い実装では次の点でCPSに依存している - TRecSに渡すプログラムにタプルが入らないように - f : int[]->unit のとき,f fail が f にならないように(副作用のある式を消さないように ) call-by-name に対応させる際,let x = fail; 1 in assert (x = x) が unsafe と判定されるようにしないといけない 古い実...
e276144b6ea99aa88358c0ddb1b072e71e84dc062ebdfd42cb4da6fdc2d05152
jaredly/reason-language-server
terminfo.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/terminfo.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2017 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Printf external isatty : out_channel -> bool = "caml_sys_isatty" external terminfo_rows: out_channe...
c41f7619d1b65dcdc07437805ebc2e27331c0e0e87b3dce30a22fbc69ed666ef
fetburner/compelib
pHashtbl.mli
(* 永続ハッシュテーブル(は?) *) type ('a, 'b) t val create : ?random:bool -> int -> ('a, 'b) t val add : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t val remove : ('a, 'b) t -> 'a -> ('a, 'b) t val replace : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t val find : ('a, 'b) t -> 'a -> 'b val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit val fol...
null
https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/container/pHashtbl.mli
ocaml
永続ハッシュテーブル(は?)
type ('a, 'b) t val create : ?random:bool -> int -> ('a, 'b) t val add : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t val remove : ('a, 'b) t -> 'a -> ('a, 'b) t val replace : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t val find : ('a, 'b) t -> 'a -> 'b val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit val fold : ('a -> 'b -> 'c -...
69731441eea50d3ad20ec86d6138dba10868cc60f65f2a021c5f048ab62148f8
bobzhang/ocaml-book
test.ml
open Printf * Tags for " test.ml " : { . extension : ml , file : test.ml , , quiet . } Tags for "test.ml": {. extension:ml, file:test.ml, ocaml, quiet .} *)
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/toolchain/code/build/test.ml
ocaml
open Printf * Tags for " test.ml " : { . extension : ml , file : test.ml , , quiet . } Tags for "test.ml": {. extension:ml, file:test.ml, ocaml, quiet .} *)
6856765fd18b42f36781c92f385df395c5a0de30fc034b7f7e9b2f906bf28def
matsubara0507/git-plantation
Orphans.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Orphans () where import RIO import Control.Monad.Error.Class (throwError) impo...
null
https://raw.githubusercontent.com/matsubara0507/git-plantation/7bd7ea01fec83dc02118eefcfeb145a1df4f564e/src/Orphans.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Orphans () where import RIO import Control.Monad.Error.Class (throwError) impo...
37e90750b76bf4b5558d3bf54e11b9ea94b9d1fbce2e87114f54105a6bab1c0a
mput/sicp-solutions
2_28.rkt
#lang racket Solution for exercise 2_28 . (require rackunit "../solutions/utils.rkt") (provide fringe) (define (fringe items) (cond ((null? items) (list)) ((pair? items) (append (fringe (car items)) (fringe (cdr items)))) (else (list items))))
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_28.rkt
racket
#lang racket Solution for exercise 2_28 . (require rackunit "../solutions/utils.rkt") (provide fringe) (define (fringe items) (cond ((null? items) (list)) ((pair? items) (append (fringe (car items)) (fringe (cdr items)))) (else (list items))))
9738577ecc806b63fac913bdb96254169d5fa94b18c57fd77bddabb0d5b1bc45
ijvcms/chuanqi_dev
active_service_config.erl
%%%------------------------------------------------------------------- @author zhengsiying %%% @doc %%% 自动生成文件,不要手动修改 %%% @end Created : 2016/10/12 %%%------------------------------------------------------------------- -module(active_service_config). -include("common.hrl"). -include("config.hrl"). -compile([exp...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/active_service_config.erl
erlang
------------------------------------------------------------------- @doc 自动生成文件,不要手动修改 @end -------------------------------------------------------------------
@author zhengsiying Created : 2016/10/12 -module(active_service_config). -include("common.hrl"). -include("config.hrl"). -compile([export_all]). get_list_conf() -> [ active_service_config:get(X) || X <- get_list() ]. get_list() -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22...
f76b9ee7449317f25e2229463b56d73aaad70ea31dad108df03faec16627c5b4
rudymatela/extrapolate
overflow8.hs
# LANGUAGE TemplateHaskell # for GHC < = 7.8 import Test.Extrapolate import Test.LeanCheck.Utils import Data.Int #if __GLASGOW_HASKELL__ < 710 import Data.Typeable (Typeable) deriving instance Typeable T #endif type I = [Int8] data T = T I I{- I-} deriving Show toList :: T -> [[Int8]] toList (T i j{- k-}) = ...
null
https://raw.githubusercontent.com/rudymatela/extrapolate/501c8fff9d59423428fd02959511c41a173b6e60/eg/overflow8.hs
haskell
I k ,k
# LANGUAGE TemplateHaskell # for GHC < = 7.8 import Test.Extrapolate import Test.LeanCheck.Utils import Data.Int #if __GLASGOW_HASKELL__ < 710 import Data.Typeable (Typeable) deriving instance Typeable T #endif type I = [Int8] deriving Show toList :: T -> [[Int8]] pre :: T -> Bool pre t = all ((< 16) . sum)...
814ab04688eead805832af5a6fe554164c9fdecf3b53e2fb484b3607484ca0a7
polyfy/polylith
brick_test.clj
(ns polylith.clj.core.change.brick-test (:require [clojure.test :refer :all] [polylith.clj.core.change.entity :as brick])) (def files ["bases/core/src/polylith/core/main.clj" "bases/core/test/polylith/core/main_test.clj" "bases/core/test/polylith/workspace/main_test.clj" ...
null
https://raw.githubusercontent.com/polyfy/polylith/76936c752fb5b729c216b23d92c8a8d71cfdc92f/components/change/test/polylith/clj/core/change/brick_test.clj
clojure
(ns polylith.clj.core.change.brick-test (:require [clojure.test :refer :all] [polylith.clj.core.change.entity :as brick])) (def files ["bases/core/src/polylith/core/main.clj" "bases/core/test/polylith/core/main_test.clj" "bases/core/test/polylith/workspace/main_test.clj" ...
b752c82932a8f99f54b07e671f81f1660b2a3c1f5b372e5a15e8a8bb1028176f
ocaml-multicore/parafuzz
deprecated_unsigned_printers.ml
(* TEST * toplevel *) % n , % l , % N and % L have a scanf - specific semantics , but are supposed to be interpreted by Printf and Format as % u , despite this interpretation being mildly deprecated to be interpreted by Printf and Format as %u, despite this interpretation being mildly deprecated *...
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/formats-transition/deprecated_unsigned_printers.ml
ocaml
TEST * toplevel
% n , % l , % N and % L have a scanf - specific semantics , but are supposed to be interpreted by Printf and Format as % u , despite this interpretation being mildly deprecated to be interpreted by Printf and Format as %u, despite this interpretation being mildly deprecated *) let test format = (Pri...
da4d1d6f2fad801b5c85f3c7a185ec986e3efe6746d41d79c709216dde430642
music-suite/music-suite
Part.hs
# LANGUAGE FlexibleContexts # # LANGUAGE InstanceSigs # # OPTIONS_GHC -fno - warn - name - shadowing -fno - warn - unused - imports -fno - warn - redundant - constraints # -fno-warn-unused-imports -fno-warn-redundant-constraints #-} module Music.Parts.Part ( Part, _solo, subpart, instrument, ...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Parts/Part.hs
haskell
import Data.Monoid import Control.Lens (set) | A part is a subdivided group of instruments of a given type. Type of instrument Subdivision within instrument chorus | set of players represented by b. arbitrarily: arbitrarily: arbitrarily: arbitrarily: | Returns 'True' iff all given parts ...
# LANGUAGE FlexibleContexts # # LANGUAGE InstanceSigs # # OPTIONS_GHC -fno - warn - name - shadowing -fno - warn - unused - imports -fno - warn - redundant - constraints # -fno-warn-unused-imports -fno-warn-redundant-constraints #-} module Music.Parts.Part ( Part, _solo, subpart, instrument, ...
b8e31c8ef66d71ff669174df30969402dab7c1203af4253675b8043df4b116d3
intermine/bluegenes-old
resultrow.cljs
(ns bluegenes.tools.search.resultrow (:require [re-frame.core :as re-frame] [bluegenes.utils.layouthelpers :as layout] [reagent.core :as reagent])) (enable-console-print!) (defn is-selected? [result selected-result] "returns true if 'result' is selected" (= selected-result result)) (defn...
null
https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/cljs/bluegenes/tools/search/resultrow.cljs
clojure
Todo: remove this dirty hard coding of the service URL iterate over the string arrays, and wrap span.searchterm around the terms. don't do it for the last string, otherwise we end up with random extra search terms appended where there should be none. special case: if both strings are empty, the entire string was the...
(ns bluegenes.tools.search.resultrow (:require [re-frame.core :as re-frame] [bluegenes.utils.layouthelpers :as layout] [reagent.core :as reagent])) (enable-console-print!) (defn is-selected? [result selected-result] "returns true if 'result' is selected" (= selected-result result)) (defn...
aea8ccfc490541735f3d05d05a523c346aa80575bf80ca92dd8848c07da7b5b4
typesafety/aoc2021
Main.hs
module Main (main) where import CustomPrelude import Data.Text qualified as T import Text.Printf (printf) import System.CPUTime (getCPUTime) import System.Environment (getArgs) import DayPart (Day (..), Part (..), parseDayPart) import Solutions.Day01 qualified as D1 import Solutions.Day02 qualified as D2 import Solu...
null
https://raw.githubusercontent.com/typesafety/aoc2021/66252742f188db84eee5d8846dfd0791ad8dbf8d/app/Main.hs
haskell
module Main (main) where import CustomPrelude import Data.Text qualified as T import Text.Printf (printf) import System.CPUTime (getCPUTime) import System.Environment (getArgs) import DayPart (Day (..), Part (..), parseDayPart) import Solutions.Day01 qualified as D1 import Solutions.Day02 qualified as D2 import Solu...
84dcbf21c01a221a9afcdd5327b9ddee358d48e99117521fc232608d41710587
input-output-hk/hydra-sim
PaymentWindow.hs
# LANGUAGE DerivingVia # module Hydra.Tail.Simulation.PaymentWindow ( Balance (..), initialBalance, modifyCurrent, Ada (..), ada, Lovelace (..), lovelace, PaymentWindowStatus (..), viewPaymentWindow, ) where import Prelude import GHC.Generics ( Generic, ) import Quiet ( Quiet (..), ) data Ad...
null
https://raw.githubusercontent.com/input-output-hk/hydra-sim/2ca0189dd82320a8e6c6f8ac8da6fab87b7664ea/src/Hydra/Tail/Simulation/PaymentWindow.hs
haskell
# LANGUAGE DerivingVia # module Hydra.Tail.Simulation.PaymentWindow ( Balance (..), initialBalance, modifyCurrent, Ada (..), ada, Lovelace (..), lovelace, PaymentWindowStatus (..), viewPaymentWindow, ) where import Prelude import GHC.Generics ( Generic, ) import Quiet ( Quiet (..), ) data Ad...
b70d0dba6229d04c5c0afbbd67685c1a7650f2acb92064289af9bf4f0224ad69
PDP-10/panda
step.lsp
;;; LISP Stepping Package ;;; < comments and problems accepted > , TS-824 ;;; x3-6032 ;;; AI: RICH ;;; For complete instructions see .INFO.;STEP INFO ;;; Rewritten 11/03/76 ;;; ;;; ;;; User Interface Function ;;; Valid Forms : set EVALHOOK * ...
null
https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/maclisp/step.lsp
lisp
LISP Stepping Package x3-6032 AI: RICH STEP INFO User Interface Function (STEP T) T (STEP FOO1 FOO2 ...) (FOO1 FOO2) should be compiled with RICH;UTIL > must be on for hook to work initialize depth count for safety turn system hook to my function print...
< comments and problems accepted > , TS-824 Rewritten 11/03/76 Valid Forms : set EVALHOOK * ( STEP ) NIL ( STEP NIL ) NIL (declare (special evalhook evalhook* evalhook# prinlevel prinlength) (fixnum i indent) (setq macros nil) (S...
520eeb40fece83489d4d32fcf0ceb7503f8b7e99a6a63decbfa40491e07feb47
kadena-io/chainweb-node
Cut.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables...
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/aff594a05096341d01ae50a9f37056b2519025d2/test/Chainweb/Test/Cut.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | Stability: experimental * Testing ** Arbitrary Values ** Cut properties ** all passing properties internal modules -------------------------------------------------------------------------- -- | Block time ge...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - ...
33dd9c793322c7c8e22b738ba9d7461a76fb2e7ddcd1ced56b18fe9a2d44fd02
ml4tp/tcoq
cases.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/cases.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * {5 Compilation of pattern-matching...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Evd...
9a888bd2c07f134bd109d7934321117cbeaebc78c05c3289ad72bbd59cbb076d
ZHaskell/z-data
UUIDSpec.hs
# LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Z.Data.Builder.UUIDSpec where import qualified Data.List as List import Data.Word import Data.Int import GHC.Float import Data.Time.Format import qualified Z.Data.Builder.UUID as B import ...
null
https://raw.githubusercontent.com/ZHaskell/z-data/64f43e58c608b322dbe05ff7e3773f79ec6b1d39/test/Z/Data/Builder/UUIDSpec.hs
haskell
# LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Z.Data.Builder.UUIDSpec where import qualified Data.List as List import Data.Word import Data.Int import GHC.Float import Data.Time.Format import qualified Z.Data.Builder.UUID as B import ...
9baff16356be6ed5969e5f851679e45ca02f2c8f4ff5b462bed767671fd64eff
xclerc/ocamljava
exchanger.ml
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/sync/exchanger.ml
ocaml
Null value Miscellaneous
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
c2e4a0bb57630e6217a191408a6d3fdc419b6ddb88c5923f854a618a829ab7b6
analyticbastard/xicotrader
service.clj
(ns xicotrader.service) (defprotocol Service (init [this trade-assets])) (defn init-service [service trade-assets] (.init service trade-assets))
null
https://raw.githubusercontent.com/analyticbastard/xicotrader/67e15143d853649afabbb9a778225457e97c70cd/src/clj/xicotrader/service.clj
clojure
(ns xicotrader.service) (defprotocol Service (init [this trade-assets])) (defn init-service [service trade-assets] (.init service trade-assets))
c6d436ae4deb82bfad4752873242ccc0815b9f9011f582214144575801a88ff9
tjammer/tacs
game.ml
open ContainersLabels module Tile = Tile module Moves = Moves open Moves open Option.Infix type kind = Pawn | King [@@deriving eq] module Team = struct type t = Blue | Red [@@deriving eq, sexp] let flip = function Blue -> Red | Red -> Blue let to_str = function Blue -> "Blue" | Red -> "Red" let win_field = ...
null
https://raw.githubusercontent.com/tjammer/tacs/6d0084e6613dbf1d6fa582ef6354567bb40e3650/src/game/game.ml
ocaml
open ContainersLabels module Tile = Tile module Moves = Moves open Moves open Option.Infix type kind = Pawn | King [@@deriving eq] module Team = struct type t = Blue | Red [@@deriving eq, sexp] let flip = function Blue -> Red | Red -> Blue let to_str = function Blue -> "Blue" | Red -> "Red" let win_field = ...
b98a27842668ed7d60d737f584aec02edd4fd81036639c3b45dc0b6ae9b0a23d
noprompt/garden
def.clj
(ns garden.def (:require [garden.types] [garden.util :as util] [garden.core]) (:import garden.types.CSSFunction garden.types.CSSAtRule)) (defmacro defstyles "Convenience macro equivalent to `(def name (list styles*))`." [name & styles] `(def ~name (list ~@styles))) (defmac...
null
https://raw.githubusercontent.com/noprompt/garden/025c4d8c6a88fdb58def34122af0459e51e309a9/src/garden/def.clj
clojure
=> #'user/a => [:a {:text-decoration \"none\"}] => #'user/sub-headings => [:h4 :h5 :h6 {:font-weight \"normal\"}]" => #'user/url => #garden.types.CSSFunction{:function \"url\", :args \"\"} => #'user/attr => #garden.types.CSSFunction{:function \"url\", :args [:vertical :length]} => \"attr(vertical length)\" =>...
(ns garden.def (:require [garden.types] [garden.util :as util] [garden.core]) (:import garden.types.CSSFunction garden.types.CSSAtRule)) (defmacro defstyles "Convenience macro equivalent to `(def name (list styles*))`." [name & styles] `(def ~name (list ~@styles))) (defmac...
bc4d3d3968984d31935400074d4b5b66aa1dcac661a1d8e9bfebe9542dfaa86c
jumarko/web-development-with-clojure
dev_middleware.clj
;--- Excerpted from " Web Development with Clojure , Second Edition " , published by The Pragmatic Bookshelf . Copyrights apply to this code . It may not be used to create training material , ; courses, books, articles, and the like. Contact us if you are in doubt. ; We make no guarantees that this code is fit fo...
null
https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/picture-gallery-c/env/dev/clj/picture_gallery/dev_middleware.clj
clojure
--- courses, books, articles, and the like. Contact us if you are in doubt. We make no guarantees that this code is fit for any purpose. Visit for more book information. ---
Excerpted from " Web Development with Clojure , Second Edition " , published by The Pragmatic Bookshelf . Copyrights apply to this code . It may not be used to create training material , (ns picture-gallery.dev-middleware (:require [ring.middleware.reload :refer [wrap-reload]] [selmer.middleware :re...
7d5f68032697d9f48d8c353151479bfa8e1b46ef1842629624b96d3b118d38c6
ezrakilty/narc
Example.hs
| Some example queries demonstrating the Narc interface . module Database.Narc.Example where import Test.HUnit import Database.Narc import Database.Narc.Embed example1 = let t = (table "foo" [("a", TBool)]) in foreach t $ \x -> (having (project x "a") (singleton x)) example2 = ...
null
https://raw.githubusercontent.com/ezrakilty/narc/76310e6ac528fe038d8bdd4aa78fa8c555501fad/Database/Narc/Example.hs
haskell
| Filter to rows which have a particular value in a field: | Filter to rows which give true for a predicate: @filterPred table pred@. | Project-away all columns but the given ones: @narrowToNames names src@. | Transform a result set into an ordered result set. TBD: implement! | A peculiar query from my train game ...
| Some example queries demonstrating the Narc interface . module Database.Narc.Example where import Test.HUnit import Database.Narc import Database.Narc.Embed example1 = let t = (table "foo" [("a", TBool)]) in foreach t $ \x -> (having (project x "a") (singleton x)) example2 = ...
dbc8d19a9e3fb2c31649cca5c958b19444f734d86b9e6d9e34d8b11c71e68956
emqx/emqx-management
emqx_mgmt_api_plugins.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-management/3e5600ca340612177ea39d00f7203816cf8ffddb/src/emqx_mgmt_api_plugins.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_mgmt_api_plugins). -include("emqx_mgmt.hrl"). -include_lib("emqx/include/emqx.hrl"). -i...
8ffd6f5779f47a9c5f80ab3183db62c3c378b784f2b4dbe5741760c169242e02
input-output-hk/cardano-sl
Severity.hs
-- | Logging severities module Pos.Util.Log.Severity ( Severity(..) ) where import Data.Yaml (FromJSON (..), ToJSON (..), withText) import GHC.Generics import Universum data Severity = Debug | Info | Warning | Notice | Error deriving (Generic, Show, Eq, Or...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/src/Pos/Util/Log/Severity.hs
haskell
| Logging severities | Handwritten 'FromJSON' instance because the log config files contain a '+' after their severity that has to be dropped to be parsed into our 'Severity' datatype. catch all
module Pos.Util.Log.Severity ( Severity(..) ) where import Data.Yaml (FromJSON (..), ToJSON (..), withText) import GHC.Generics import Universum data Severity = Debug | Info | Warning | Notice | Error deriving (Generic, Show, Eq, Ord) instance ToJSON Seve...
787d799ffa29f3a39957aa438b28da3763044e8b8830fe651d4e7e1924fb20c7
adventuring/tootsville.net
mail-utils.lisp
(defun mail-only (address) "Given a nice e-mail address like \"Name\" <user@domain>, returns just the user@domain bit." (if (and (find #\< address :test #'char=) (find #\> address :test #'char=) (< (position #\< address :test #'char=) (position #\> address :test #'char=))) ...
null
https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/lib/oliphaunt/mail-utils.lisp
lisp
(defun mail-only (address) "Given a nice e-mail address like \"Name\" <user@domain>, returns just the user@domain bit." (if (and (find #\< address :test #'char=) (find #\> address :test #'char=) (< (position #\< address :test #'char=) (position #\> address :test #'char=))) ...
079217ebdbf9645e1ad97711bd6eebd6b371ab55f60af4f9a988ad724df5c3df
elastic/eui-cljs
data_grid_column_sorting_draggable.cljs
(ns eui.data-grid-column-sorting-draggable (:require ["@elastic/eui/lib/components/datagrid/controls/column_sorting_draggable.js" :as eui])) (def defaultSortDescLabel eui/defaultSortDescLabel) (def EuiDataGridColumnSortingDraggable eui/EuiDataGridColumnSortingDraggable) (def defaultSortAscLabel eui/defaultSortAscL...
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/data_grid_column_sorting_draggable.cljs
clojure
(ns eui.data-grid-column-sorting-draggable (:require ["@elastic/eui/lib/components/datagrid/controls/column_sorting_draggable.js" :as eui])) (def defaultSortDescLabel eui/defaultSortDescLabel) (def EuiDataGridColumnSortingDraggable eui/EuiDataGridColumnSortingDraggable) (def defaultSortAscLabel eui/defaultSortAscL...
957c3ef88faedccc37c81f7a1dc2ebc868e58960352d463f92412cbb89649e7f
OpenC2-org/ocas
act_delete.erl
@author ( C ) 2017 , sFractal Consulting LLC -module(act_delete). %%%------------------------------------------------------------------- %%% %%% All rights reserved. Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% %%% Redistribution and use in source and binary forms, with or without ...
null
https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/action_servers/act_delete.erl
erlang
------------------------------------------------------------------- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this...
@author ( C ) 2017 , sFractal Consulting LLC -module(act_delete). Licensed under the Apache License , Version 2.0 ( the " License " ) ; " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( ...
c26ec9b56a8e8fa9b7724b3dabdbda4e63ba31ed4f84836065db20fd609894ef
tud-fop/vanda-haskell
NGrams.hs
# OPTIONS_GHC -fno - warn - incomplete - record - updates # | Module : VandaCLI.NGrams Description : functions to work n - gram models Copyright : Ⓒ , 2015 License : BSD - style Maintainer : Stability : experimental This module contains functions to work n - gram models . Module:...
null
https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/executable/VandaCLI/NGrams.hs
haskell
# OPTIONS_GHC -fno - warn - incomplete - record - updates # | Module : VandaCLI.NGrams Description : functions to work n - gram models Copyright : Ⓒ , 2015 License : BSD - style Maintainer : Stability : experimental This module contains functions to work n - gram models . Module:...
c642a3c06d87cd0f8633bdbf96d2c1ce963fa96988a6d4124935920d65ce9a62
MyDataFlow/ttalk-server
mod_stream_management.erl
-module(mod_stream_management). -xep([{xep, 198}, {version, "1.3"}]). -behaviour(gen_mod). %% `gen_mod' callbacks -export([start/2, stop/1]). %% `ejabberd_hooks' handlers -export([add_sm_feature/2, remove_smid/4, session_cleanup/4]). %% `ejabberd.cfg' options (don't use outside of tests) -...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_stream_management.erl
erlang
`gen_mod' callbacks `ejabberd_hooks' handlers `ejabberd.cfg' options (don't use outside of tests) API for `ejabberd_c2s' `gen_mod' callbacks `ejabberd_hooks' handlers `ejabberd.cfg' options (don't use outside of tests) Return true if succeeded, false otherwise. Return true if succeeded, false otherwise. ...
-module(mod_stream_management). -xep([{xep, 198}, {version, "1.3"}]). -behaviour(gen_mod). -export([start/2, stop/1]). -export([add_sm_feature/2, remove_smid/4, session_cleanup/4]). -export([get_buffer_max/1, set_buffer_max/1, get_ack_freq/1, set_ack_freq/1, ...
c893edce7a1d16256fa1e7295e04f5faf661023b7b81d3bd5f54f50562a9ba10
slyrus/abcl
copy-seq.lisp
;;; copy-seq.lisp ;;; Copyright ( C ) 2003 $ Id$ ;;; ;;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . ;;; ;;...
null
https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/copy-seq.lisp
lisp
copy-seq.lisp This program is free software; you can redistribute it and/or either version 2 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License f...
Copyright ( C ) 2003 $ Id$ modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . (require...
a56067743189591a43dfafd7e889cd3215ea2faad10f99596939ca0ed19bae04
esl/MongooseIM
config_parser_helper.erl
@doc Expected parsed and processed options for TOML parser tests -module(config_parser_helper). -compile([export_all, nowarn_export_all]). %% Expected configuration options for predefined configurations. For each clause there is a corresponding TOML file in config_parser_SUITE_data . options("host_types") -> ...
null
https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/test/common/config_parser_helper.erl
erlang
Expected configuration options for predefined configurations. would be added with incorrect value by mod_config/2
@doc Expected parsed and processed options for TOML parser tests -module(config_parser_helper). -compile([export_all, nowarn_export_all]). For each clause there is a corresponding TOML file in config_parser_SUITE_data . options("host_types") -> [{all_metrics_are_global, false}, {default_server_domain, <...
a0c1b8045fc80b85f7d75a6d8556c7a270379c9982a8f57f38b08bb2e8d6bae2
KirinDave/erlenmeyer
test-node.scm
#! /usr/bin/env mzscheme -rq (require (file "../src/erlenmeyer.scm")) (define (read-loop) (for-each-erlang-packet (lambda (x) (fprintf (current-error-port) "got ~s~n" x)))) (read-loop)
null
https://raw.githubusercontent.com/KirinDave/erlenmeyer/f9ecb20fb6f4b6aad1d221fae0cefce329855b42/bin/test-node.scm
scheme
#! /usr/bin/env mzscheme -rq (require (file "../src/erlenmeyer.scm")) (define (read-loop) (for-each-erlang-packet (lambda (x) (fprintf (current-error-port) "got ~s~n" x)))) (read-loop)
a7714eb05069919ddcc432e326da2ee1bd72f4336cd500b8631cb0e0d2848ddc
ravichugh/djs
xx_test01.ml
let id :: x:Top -> {(= v x)} = fun x -> ( #return { 0 }) in 0
null
https://raw.githubusercontent.com/ravichugh/djs/c4a13e06adb3e0945f39966523a4d944448c1941/tests/imperative/control/xx_test01.ml
ocaml
let id :: x:Top -> {(= v x)} = fun x -> ( #return { 0 }) in 0
0a5b83856f30d5cf0168a6b64d398472c38ce0d79cba58ec12571c9dadc36d60
well-typed/large-records
R060.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif # LANGUAGE OverloadedLabels # {-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-} module Experiment.GetEvens.Sized.R060 where import Dat...
null
https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/GetEvens/Sized/R060.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings # # OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin # 00 .. 09
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif # LANGUAGE OverloadedLabels # module Experiment.GetEvens.Sized.R060 where import Data.Record.Anon.Simple (Record) import qualified Data.Record.Anon.Simple as Anon import Bench.EvensOfSize.Evens060 import Common.RowOfSize.Row060 getEvens :: Record ExampleRow ->...
23ef1ed305e7359da503fbab62e5377f6c31624a7575f6eb9f3f88a894c8ea27
mvdcamme/meta-tracing-JIT
Cont-passing interpreter traced.scm
; Slip : Lisp in 100 lines - Theo D'Hondt : SOFT : - 2010 ; ; CPS* version ; Version 3 - proper tail recursion ; ; <expression> ::= <computation>|<lambda>|<quote>|<variable>| ; <literal>|<null> ; <computation> ::= <definition>|<assignment>|<sequence>| ; ...
null
https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/Slip%20interpreters/Cont-passing%20interpreter%20traced.scm
scheme
CPS* version <expression> ::= <computation>|<lambda>|<quote>|<variable>| <literal>|<null> <computation> ::= <definition>|<assignment>|<sequence>| <conditional>|<iteration>|<application> <definition> ::= (define <variable> <expression>) <definiti...
Slip : Lisp in 100 lines - Theo D'Hondt : SOFT : - 2010 Version 3 - proper tail recursion (begin (define meta-level-apply apply) (define meta-level-eval eval) (define (vassoc el list) (cond ((null? list) #f) ((eq? el (vector-ref (car list) 0)) (car list)) (else (vassoc el ...
2c36c12ce3e03c79a0ef1417d5245f30c6af2b28665cdb97cd8748cb3eccecfe
simplex-chat/simplex-chat
MarkdownTests.hs
# LANGUAGE BlockArguments # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} module MarkdownTests where import Data.List.NonEmpty (NonEmpty) import Data.Text (Text) import Simplex.Chat.Markdown import System.Console.ANSI.Types import Test.Hspec markdownTests :: Spec markdow...
null
https://raw.githubusercontent.com/simplex-chat/simplex-chat/5d976d3c67c9c342895dfd6de1398d44699d005a/tests/MarkdownTests.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE BlockArguments # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLists # module MarkdownTests where import Data.List.NonEmpty (NonEmpty) import Data.Text (Text) import Simplex.Chat.Markdown import System.Console.ANSI.Types import Test.Hspec markdownTests :: Spec markdownTests = do textFormat secretTe...
63a1765349a6ee4b3e1317b8abd945d749e7fa51fcfc58550b39f8b453a57c42
elm/package.elm-lang.org
Task.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Task ( Task , run , Transaction , bail , attempt , fetchGithub ) where import Control.Exception (SomeException, catch, try) import Control.Monad.Except (ExceptT, runExceptT, throwError) import Control.Monad.Reader (ReaderT, runReaderT, as...
null
https://raw.githubusercontent.com/elm/package.elm-lang.org/d4d5a997a5d9d6622694c488e6a3ae9f537da761/migration/Task.hs
haskell
# LANGUAGE OverloadedStrings # TASKS ERROR HTTP
# OPTIONS_GHC -Wall # module Task ( Task , run , Transaction , bail , attempt , fetchGithub ) where import Control.Exception (SomeException, catch, try) import Control.Monad.Except (ExceptT, runExceptT, throwError) import Control.Monad.Reader (ReaderT, runReaderT, ask) import Control.Monad.Trans (lift...
7b7a4dd821f509a98018d270ef0f569b39dacd4f010f62ad8514498d5b8523ab
dgrnbrg/piplin
core_impl.clj
(ns piplin.types.core-impl "This namespace provides multimethod implementations of many clojure core functions. It has them by default dispatch to clojure's core implementation, but opens the possibility to adding support for many bitwise and numeric types in piplin. There are also several macros useful for ...
null
https://raw.githubusercontent.com/dgrnbrg/piplin/01f3ac72ccc904b7789dfd6e46277c179e11002c/src/piplin/types/core_impl.clj
clojure
(ns piplin.types.core-impl "This namespace provides multimethod implementations of many clojure core functions. It has them by default dispatch to clojure's core implementation, but opens the possibility to adding support for many bitwise and numeric types in piplin. There are also several macros useful for ...
6b94d8c84c7ea81a4cfb60d62cb5fe1379c1b0544bc84fa13ccb4b36947f25c1
logicmoo/wam_common_lisp
manager.lsp
-*- Mode : Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*- ;;; Window Manager Property functions ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 Texas Instruments Incorporated . ;;; ;;; Permission is granted to any indiv...
null
https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/clx/manager.lsp
lisp
Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*- Window Manager Property functions P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in al...
TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without (in-package :xlib) (defun wm-name (window) (declare (type window window)) (declare (values string)) (get-propert...
71382306719f70cd994071a1ee849c8aabbfee06e659c03d3a91f0f0d44ce22a
Drup/dowsing
Trie.mli
module type NODE = sig type t val empty : t val add : Type.t -> t -> t val remove : Type.t -> t -> t val iter : t -> Type.t Iter.t val iter_with : Type.t -> t -> Type.t Iter.t end module Leaf : NODE module Node (Feat : Feature.S) (Sub : NODE) : NODE val make : (module Feature.S) List.t -> (module NODE)...
null
https://raw.githubusercontent.com/Drup/dowsing/cbeeb9d4e885b6ee03416415a3142717543953e2/lib/index/Trie.mli
ocaml
module type NODE = sig type t val empty : t val add : Type.t -> t -> t val remove : Type.t -> t -> t val iter : t -> Type.t Iter.t val iter_with : Type.t -> t -> Type.t Iter.t end module Leaf : NODE module Node (Feat : Feature.S) (Sub : NODE) : NODE val make : (module Feature.S) List.t -> (module NODE)...
99c1b9c91108d07d2c463afe79d65f528bf6d815eb2fb4611887bf79864c1f30
Ericson2314/lighthouse
Main.hs
{-# OPTIONS -cpp #-} ------------------------------------------------------------------ A primop - table mangling program -- ------------------------------------------------------------------ module Main where import Parser import Syntax import Monad import Char import List import Sys...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/utils/genprimopcode/Main.hs
haskell
# OPTIONS -cpp # ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- Code generators ----------------------------------------------- ------------------------------------------...
module Main where import Parser import Syntax import Monad import Char import List import System ( getArgs ) import Maybe ( catMaybes ) main :: IO () main = getArgs >>= \args -> if length args /= 1 || head args `notElem` known_args then error ("usage: genprimopcode command < primops.txt > ...\n" ...
e5c89632f6fd327727e0f278dd9106ebbf0adec40c8a957d175788fa6601e397
divipp/ActiveHs
Args.hs
{-# LANGUAGE DeriveDataTypeable, NamedFieldPuns #-} module Args where import Paths_activehs import System.Directory (createDirectoryIfMissing) import System.Console.CmdArgs.Implicit import System.FilePath import Data.Version ------------------ data Args = Args { sourcedir :: String , includ...
null
https://raw.githubusercontent.com/divipp/ActiveHs/b0359c1d04a0f6d0054d5ad591a71e45426ded94/Args.hs
haskell
# LANGUAGE DeriveDataTypeable, NamedFieldPuns # ----------------
module Args where import Paths_activehs import System.Directory (createDirectoryIfMissing) import System.Console.CmdArgs.Implicit import System.FilePath import Data.Version data Args = Args { sourcedir :: String , includedir :: [String] , gendir :: String , exercis...
cdbb8b4cf935d4da42453418d34b9697bab200b2b12b9d3389038d490191365b
Chris00/mesh
make_FC_code.ml
(* Generate the layout dependent files by textual substitution. This script is supposed to be run before oasis. The tarballs must contain the already generated files. *) let string_of_file fn = let buf = Buffer.create 4096 in let fh = open_in fn in let s = Bytes.create 4096 in let read = ref 1 in (* en...
null
https://raw.githubusercontent.com/Chris00/mesh/a998a3d898b0013517a5f7f6078791b61e6a0fe2/config/make_FC_code.ml
ocaml
Generate the layout dependent files by textual substitution. This script is supposed to be run before oasis. The tarballs must contain the already generated files. enter the loop FORTRAN view taken as default: Easymesh -> Fortran Easymesh Filename, module name
let string_of_file fn = let buf = Buffer.create 4096 in let fh = open_in fn in let s = Bytes.create 4096 in while !read > 0 do read := input fh s 0 4096; Buffer.add_substring buf (Bytes.unsafe_to_string s) 0 !read; done; Buffer.contents buf let write_ro ?orig_path fn s = (try Sys.remove fn with ...
57f305d590309fe3fb5aac759181b97fce474b03df195367271dfc7a9051e4af
angavrilov/ecl-compute
simplify.lisp
;;; -*- mode:lisp; indent-tabs-mode: nil; -*- (in-package fast-compute) (defparameter *simplify-cache* (make-hash-table)) (defparameter *simplify-ranges* nil) (def-rewrite-pass simplify-index (:multiple-pass t :memoize-hash *simplify-cache*) ;; Expand abbreviations (`(1+ ,x) `(+ ,x 1)) (`(1- ,x) `(- ,x 1))...
null
https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/expr/simplify.lisp
lisp
-*- mode:lisp; indent-tabs-mode: nil; -*- Expand abbreviations Expand trivial ranges Recurse into ranges if requested Collapse arithmetical no-ops Calculate fully numerical expressions Normalize sign Reorder the number in + and * to be last Simplify adjacent * & / Simplify obviously even division Simplify ad...
(in-package fast-compute) (defparameter *simplify-cache* (make-hash-table)) (defparameter *simplify-ranges* nil) (def-rewrite-pass simplify-index (:multiple-pass t :memoize-hash *simplify-cache*) (`(1+ ,x) `(+ ,x 1)) (`(1- ,x) `(- ,x 1)) ((or (ranging-spec (type number val)) (ranging-spec _ :min (ty...
c613b53b5864bf45bc4b475e22ad5d30a48e283adfc4ddebe9437a5f50c42ae3
souenzzo/atemoia
server_test.clj
(ns atemoia.server-test (:require [atemoia.server :as atemoia] [cheshire.core :as json] [clojure.string :as string] [clojure.test :refer [deftest is]] [io.pedestal.http :as http] [io.pedestal.test :refer [response-for]] [next.jdbc :as jdbc]) (:...
null
https://raw.githubusercontent.com/souenzzo/atemoia/e438aa34e32f51ec4133c215ab25b5bee65a31cd/test/atemoia/server_test.clj
clojure
(ns atemoia.server-test (:require [atemoia.server :as atemoia] [cheshire.core :as json] [clojure.string :as string] [clojure.test :refer [deftest is]] [io.pedestal.http :as http] [io.pedestal.test :refer [response-for]] [next.jdbc :as jdbc]) (:...
f31545ce8461ae55ce09b63117c34261db6bb3c5b0a36e857499c87342129c81
klutometis/clrs
section.scm
(require-extension syntax-case array-lib foof-loop) (module section-15.3 (matrix-chain-order/greedy) (include "../15.3/matrix.scm"))
null
https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/15.3/section.scm
scheme
(require-extension syntax-case array-lib foof-loop) (module section-15.3 (matrix-chain-order/greedy) (include "../15.3/matrix.scm"))
0d8fee2f32daae5705b9dbfb44ea7c257f1995add7a5edc2ad829211c017e947
ruhatch/mirage-oram
blockSizeExperiment.ml
open Core.Std module O = Oram.Make(PosMap.InMemory)(Block) let ( >>= ) x f = Lwt.bind x @@ function | `Error e -> Lwt.return (`Error e) | `Ok x -> f x let connectAndInitialiseORAMOfSize desiredSizeInSectors desiredBlockSize = match Lwt_main.run ( Block.connect "diskBlock.img" >>= fun bd -> ...
null
https://raw.githubusercontent.com/ruhatch/mirage-oram/533a7f7726c4a499b60c71ed627b730349a3816b/tests/blockSizeExperiment.ml
ocaml
open Core.Std module O = Oram.Make(PosMap.InMemory)(Block) let ( >>= ) x f = Lwt.bind x @@ function | `Error e -> Lwt.return (`Error e) | `Ok x -> f x let connectAndInitialiseORAMOfSize desiredSizeInSectors desiredBlockSize = match Lwt_main.run ( Block.connect "diskBlock.img" >>= fun bd -> ...
fa6a6f1ea2fee6435e6a8acf494bb9539772c3e6c87c8eb5121bd2495fb38caa
biegunka/biegunka
Options.hs
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Control.Biegunka.Options ( Runner , runnerOf , runner_ , Environments(..) , parser ) where import ...
null
https://raw.githubusercontent.com/biegunka/biegunka/74fc93326d5f29761125d7047d5418899fa2469d/src/Control/Biegunka/Options.hs
haskell
| Get environment and 'Runner' from the command line options. | Get 'Runner' from the command line options. | Construct the parser for interpreters and modes given a parser for environments. | List of possible environments. The strings `environments` returns must be unique. | Record selector's metadata is ignor...
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Control.Biegunka.Options ( Runner , runnerOf , runner_ , Environments(..) , parser ) where import ...
58b6be261f475d237af224cdc07c0f72d4783b39a55442b05145d98c7674d650
input-output-hk/ouroboros-network
Args.hs
# LANGUAGE ExistentialQuantification # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # module Ouroboros.Consensus.Storage.ChainDB.Impl.Args ( ChainDbArgs (..) , ChainDbSpecificArgs (..) , Relat...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/358880057f1d6d86cc385e8475813ace3b9ebef6/ouroboros-consensus/src/Ouroboros/Consensus/Storage/ChainDB/Impl/Args.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # * Internal ------------------------------------------------------------------------------ Arguments ------------------------------------------------------------------------------ Policy ^ Which chunks of the ImmutableDB to validate on op...
# LANGUAGE ExistentialQuantification # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Ouroboros.Consensus.Storage.ChainDB.Impl.Args ( ChainDbArgs (..) , ChainDbSpecificArgs (..) , RelativeMountPoint (..) , defaultArgs , fromChainDbArgs ) where import Dat...
c812177e508765dccd8f2d6a34a2707eb745f066b2b6bb9fd991be65fd01c571
bufferswap/ViralityEngine
layout-defs.lisp
(in-package #:virality) (defclass geometry-layout () ((%name :reader name :initarg :name) (%groups :accessor groups) (%group-order :accessor group-order)))
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/datatype/layout-defs.lisp
lisp
(in-package #:virality) (defclass geometry-layout () ((%name :reader name :initarg :name) (%groups :accessor groups) (%group-order :accessor group-order)))
fbd129c650cdec75560726b52a5c134e29d73736fea53c7f63ddaffd6ecafb4d
ocramz/petsc-hs
GenerateC2Hs.hs
----------------------------------------------------------------------------- -- | Module : Numerical . Petsc . Internal . C2HsGen . Copyright : ( c ) 2015 -- License : LGPL3 Maintainer : zocca . . gmail . com -- Stability : experimental -- -- | c2hs generation -- --------------------...
null
https://raw.githubusercontent.com/ocramz/petsc-hs/d74a468da0dbc867d2ea25f280c7892cc54add48/src/Numerical/PETSc/Internal/C2HsGen/GenerateC2Hs.hs
haskell
--------------------------------------------------------------------------- | License : LGPL3 Stability : experimental | c2hs generation --------------------------------------------------------------------------- | SETTINGS | output destination | `.chs` file name | type synonyms: `type Ty_ = {# type T...
Module : Numerical . Petsc . Internal . C2HsGen . Copyright : ( c ) 2015 Maintainer : zocca . . gmail . com module Numerical.PETSc.Internal.C2HsGen.GenerateC2Hs where import Data.Char import Data.List ` FileFmt ` or ` StdoutFmt ` outFormat = StdoutFmt outModuleName = "TypesC2HsGe...
c5481b23787156b8da3f118ea964a0e4b6cc6e663eb9e9ef545689433b25e6d1
mogenslund/liquid
highlighter.cljc
(ns liq.highlighter (:require [clojure.string :as str] [liq.buffer :as buffer])) (defn first-match [s match] (if (string? match) (when-let [m (str/index-of s match)] {:pos (inc m) :match match}) (let [m (re-find match s)] (cond (= m "") {:pos (inc (count s)) :match ""} ...
null
https://raw.githubusercontent.com/mogenslund/liquid/eafc54df9c67f2e625220b78b65de1143099ef00/src/liq/highlighter.cljc
clojure
Context style
(ns liq.highlighter (:require [clojure.string :as str] [liq.buffer :as buffer])) (defn first-match [s match] (if (string? match) (when-let [m (str/index-of s match)] {:pos (inc m) :match match}) (let [m (re-find match s)] (cond (= m "") {:pos (inc (count s)) :match ""} ...
f471e6e4270fd1d815815afb2878ac0ab617e4fd0c00f66770e3f7a2ec41f08c
omariosouto/learnin-public-clojure
prod.cljs
(ns pokebank-ui.prod (:require [pokebank-ui.core :as core])) ;;ignore println statements in prod (set! *print-fn* (fn [& _])) (core/init!)
null
https://raw.githubusercontent.com/omariosouto/learnin-public-clojure/bb66040ef397d4d6e8275330acdd553bbf850a39/projects/pokebank-ui/env/prod/cljs/pokebank_ui/prod.cljs
clojure
ignore println statements in prod
(ns pokebank-ui.prod (:require [pokebank-ui.core :as core])) (set! *print-fn* (fn [& _])) (core/init!)
c2bfd577195a04e907525995d9ba9073096ee9aa5e71a9603bc9264fe497d388
qmuli/qmuli
Qi.hs
# LANGUAGE DataKinds # {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Qi where import Control.Lens hiding (argument) import Control.Monad.Freer import Control.Monad.Freer.State import Data.Aeson (eithe...
null
https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/library/Qi.hs
haskell
# LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # import Qi.Config.AWS.CW import Qi.Config.AWS.DDB `showHelpOnErrorExecParser` parses out commands, arguments and options using the rules in `opts` and gives the `Options` structure to `dispatch` that acts in accord to the options al...
# LANGUAGE DataKinds # module Qi where import Control.Lens hiding (argument) import Control.Monad.Freer import Control.Monad.Freer.State import Data.Aeson (eitherDecode, encode) import Data.Aeson.Types (pars...
4dc3aab8560769cabd2aef7b7ae1d1e85c86badcf3e4cd9a07dec7fb71025418
mfikes/fifth-postulate
ns149.cljs
(ns fifth-postulate.ns149) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns149.cljs
clojure
(ns fifth-postulate.ns149) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
8e75e7df65c88e5c19240c241a2ff9616bcaafacb96c2fca2d6898cb25b04877
spawnfest/eep49ers
file_sorter.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2001 - 2018 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/src/file_sorter.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2001 - 2018 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(file_sorter). Avoid warning for local function error/2 clashing with autoimported BIF . -compile({no_auto_...
937a8b37d27bb28cde04e0a7a564788760a94fdfbe451c6c66a15b02dbeab142
rtoy/cmucl
cell.lisp
;;; -*- Package: PPC -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . If you want to use this code or any part of CMU Common Lisp , please conta...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/ppc/cell.lisp
lisp
-*- Package: PPC -*- ********************************************************************** ********************************************************************** This file contains the VM definition of various primitive memory access VOPs for the PPC. Data object ref/set stuff. Symbol hacking VOPs: ...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . If you want to use this code or any part of CMU Common Lisp , please contact or . (ext:file-comment "$Header: src/compiler/ppc/cell.lisp $") Written by Converted by ...
8d35eefc9581cc965308041b1af4cbc8b178ad943565b49b9589fcf59d3f6eda
SHoltzen/dice
Wmc.ml
open Core open Bdd (** map from variable index to (low weight, high weight) *) type weight = (label, (Bignum.t*Bignum.t)) Core.Hashtbl.Poly.t let hashtable_to_float (low, high) = (Bignum.to_float low, Bignum.to_float high) let hashtable_to_log (low, high) = (LogProbability.make low, LogProbability.make high) ...
null
https://raw.githubusercontent.com/SHoltzen/dice/0577a89ce08e49da069c242f6353e4d9c19b12f5/lib/Wmc.ml
ocaml
* map from variable index to (low weight, high weight) internal memoized recursive weighted model count compute weight of children compute new weight, add to cache
open Core open Bdd type weight = (label, (Bignum.t*Bignum.t)) Core.Hashtbl.Poly.t let hashtable_to_float (low, high) = (Bignum.to_float low, Bignum.to_float high) let hashtable_to_log (low, high) = (LogProbability.make low, LogProbability.make high) * Perform a weighted model count of the BDD ` bdd ` wit...
df49c5c2efae427489f296c93f99dccdcd1720dbd4314ef522356e1140d34a6d
acorrenson/Oratio
test.ml
open Tactic open Kernel.Logic open Translators open French module T = Engine.Make (Verified_tree) module D = Engine.Make (Debuger) let display e = T.eval e.proof |> french let clear () = print_endline "\n" let _ = clear (); let p = (Impl (And (Atom 'a', Atom 'b'), And (Atom 'b', Atom 'a'))) in init p |> intr...
null
https://raw.githubusercontent.com/acorrenson/Oratio/ade8d9a3253270e311ebbcff10cb955bd2c8af42/examples/test.ml
ocaml
open Tactic open Kernel.Logic open Translators open French module T = Engine.Make (Verified_tree) module D = Engine.Make (Debuger) let display e = T.eval e.proof |> french let clear () = print_endline "\n" let _ = clear (); let p = (Impl (And (Atom 'a', Atom 'b'), And (Atom 'b', Atom 'a'))) in init p |> intr...
e3b3bbbe2fe8c20ca17fab0f78ece8ae6b54aac49e7f6a7cc43e0ee38e8a0e41
AndreaCrotti/elo
views.cljs
(ns byf.league-detail.views (:require [antizer.reagent :as ant] [byf.auth :as auth] [byf.common.players :as players-handlers] [byf.common.views :as common-views] [byf.league-detail.games-list :refer [games-table]] [byf.league-detail.add-game :refer [game-for...
null
https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/src/cljs/byf/league_detail/views.cljs
clojure
this is kind of an antipattern for reframe
(ns byf.league-detail.views (:require [antizer.reagent :as ant] [byf.auth :as auth] [byf.common.players :as players-handlers] [byf.common.views :as common-views] [byf.league-detail.games-list :refer [games-table]] [byf.league-detail.add-game :refer [game-for...