_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
14dd497dca125da1da4869cb9eee02dfd49c8a4e1fdbdd70b95e14ffb6cb3506
futurice/haskell-mega-repo
Internal.hs
{-# LANGUAGE OverloadedStrings #-} module Futurice.Constants.Internal (module Futurice.Constants.Internal) where import Data.Aeson.Compat (FromJSON (..), withObject, (.:)) import Futurice.Prelude import Prelude () import Servant.Client (BaseUrl) import Futurice.Services data Constants = Constants { publicUrls...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/futurice-constants/src/Futurice/Constants/Internal.hs
haskell
# LANGUAGE OverloadedStrings #
module Futurice.Constants.Internal (module Futurice.Constants.Internal) where import Data.Aeson.Compat (FromJSON (..), withObject, (.:)) import Futurice.Prelude import Prelude () import Servant.Client (BaseUrl) import Futurice.Services data Constants = Constants { publicUrls :: PerService Text , pub...
0ba85d755ce5b349ca5d7f7ee7a283fb6d6580bf3509f385f11b8ebe6a9f5366
daviwil/channel-x
xorg.scm
(define-module (channel-x packages xorg) #:use-module (guix packages) #:use-module (gnu packages gl) #:use-module (gnu packages xorg) #:use-module (gnu packages linux) #:use-module (gnu packages freedesktop)) (define-public intel-virtual-output (package (inherit xf86-video-intel) (name "intel-virtu...
null
https://raw.githubusercontent.com/daviwil/channel-x/e0f98ae5a214cc32494d97d69047057e03ac8c02/channel-x/packages/xorg.scm
scheme
(define-module (channel-x packages xorg) #:use-module (guix packages) #:use-module (gnu packages gl) #:use-module (gnu packages xorg) #:use-module (gnu packages linux) #:use-module (gnu packages freedesktop)) (define-public intel-virtual-output (package (inherit xf86-video-intel) (name "intel-virtu...
418363af41005612c2019d76ca6f7026696c8b4d49c8b38f4fe05c5fbbb0181a
bozsahin/ccglab-database
cl-book.testsuite.lisp
this is a test suite for cl-book.ccg grammar , for BTSO argument in Bozsahin 2012 CL book . the inductive version shows the power of PCCG . Catalan number of LFs can be grouped ;; to collect the right statistics, and to return just one result. This is not part of CCGlab package --hhcb load this file in CCGlab a...
null
https://raw.githubusercontent.com/bozsahin/ccglab-database/f24215aaa4ac8102f6d76c9c0ec5bd58a29743d7/cl-book/cl-book.testsuite.lisp
lisp
to collect the right statistics, and to return just one result.
this is a test suite for cl-book.ccg grammar , for BTSO argument in Bozsahin 2012 CL book . the inductive version shows the power of PCCG . Catalan number of LFs can be grouped This is not part of CCGlab package --hhcb load this file in CCGlab after you did ( load - grammar " cl - book " ) or (defparameter *db...
8c18af4d794717976ab1728c9143543030d1ceec09eeef8bebdd6cca8cfbe7c8
mfp/extprot
buffer_pool.ml
module POOL : sig type 'a t val make : (unit -> 'a) -> int -> 'a t val take : 'a t -> 'a val give_back : 'a t -> 'a -> unit end = struct type 'a t = { create : unit -> 'a; q : 'a Stack.t; capacity : int; mutable q_size : int; } let make create capacity...
null
https://raw.githubusercontent.com/mfp/extprot/11ef436c7a1f267f301f4507c05c0a3bb8beda4f/compiler/buffer_pool.ml
ocaml
module POOL : sig type 'a t val make : (unit -> 'a) -> int -> 'a t val take : 'a t -> 'a val give_back : 'a t -> 'a -> unit end = struct type 'a t = { create : unit -> 'a; q : 'a Stack.t; capacity : int; mutable q_size : int; } let make create capacity...
8491d8f552b571a6a91a3fc20972aab970088b912608b3c0832f10d929fb47d9
icicle-lang/icicle-ambiata
Stream.hs
-- | Stream transformations such as filter, map and take. # LANGUAGE NoImplicitPrelude # module Icicle.Core.Stream ( module X ) where import Icicle.Core.Stream.Check as X import Icicle.Core.Stream.Error as X import Icicle.Core.Stream.Stream as X
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-core/src/Icicle/Core/Stream.hs
haskell
| Stream transformations such as filter, map and take.
# LANGUAGE NoImplicitPrelude # module Icicle.Core.Stream ( module X ) where import Icicle.Core.Stream.Check as X import Icicle.Core.Stream.Error as X import Icicle.Core.Stream.Stream as X
e4677cf7188c5369ecc23726163c490ac96cfc17907fe71ca06579c1d9725674
janestreet/universe
test.ml
let%expect_test _ = print_endline "toto (regexp)"; [%expect {| toto (regexp) |}] ;;
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_expect/test/no-output-patterns/test.ml
ocaml
let%expect_test _ = print_endline "toto (regexp)"; [%expect {| toto (regexp) |}] ;;
110a0636201480663d3975915c5eea23f10f2a4b28b10fe9789915ac8723ad91
eyedouble/couchdb
legacy_couchdb_view_stream.erl
%% @hidden -module(legacy_couchdb_view_stream). -export([start_link/4]). -export([init_stream/5, maybe_continue/1, system_continue/3, system_terminate/4, system_code_change/4]). -export([init/1, handle_event/2, wait_rows/2, wait_rows1/2, wait_v...
null
https://raw.githubusercontent.com/eyedouble/couchdb/39830e536e803dfb492bfdb8b3644839cdd7e356/src/legacy/legacy_couchdb_view_stream.erl
erlang
@hidden monitor the process receiving the messages tell to the parent that we are ok connect to the view register the stream start the loop stop to monitor the parent we are doing the request asynchronously parent exited there is no need to continue parent exited there is no need to continue unregister the s...
-module(legacy_couchdb_view_stream). -export([start_link/4]). -export([init_stream/5, maybe_continue/1, system_continue/3, system_terminate/4, system_code_change/4]). -export([init/1, handle_event/2, wait_rows/2, wait_rows1/2, wait_val/2, ...
ca45dc2b06957ee7552a42f73c1b3420ca615afdf1eea95870e13f5f6fd69334
haskell-works/hw-koans
GeoFeedParser.hs
module Koan.GeoFeedParser where import Control.Applicative import Data.Attoparsec.ByteString.Char8 import Data.ByteString (ByteString) import Data.Char (digitToInt) import qualified Data.ByteString.Char8 as BS enrolled :: Bool enrolled = False -- Parsing library, reference do...
null
https://raw.githubusercontent.com/haskell-works/hw-koans/a807e72513d91ddf1c8aa445371b94bb169f22fd/koan/Koan/GeoFeedParser.hs
haskell
Parsing library, reference doc: -0.13.1.0/docs/Data-Attoparsec-ByteString-Char8.html "startIp" and "endIp" are required, and "cc" is optional We use '|' as separating char "." as a dot within an IP address Assuming that characters in a list are valid digits An Int parser should parse a number of digits and conver...
module Koan.GeoFeedParser where import Control.Applicative import Data.Attoparsec.ByteString.Char8 import Data.ByteString (ByteString) import Data.Char (digitToInt) import qualified Data.ByteString.Char8 as BS enrolled :: Bool enrolled = False data IPv4 = IPv4 Int Int Int In...
0c313defc9b1f9117fd762180e46c38c2d5818142b22d91b03d383e3c86eaff5
jarvinet/scheme
section121.scm
Structure and Interpretation of Computer Programs , 1st edition ;------------------------------------------------------------- ; Section 1.2.1 ;------------------------------------------------------------- exercise 1.7 (define (+ a b) (if (= a 0) b (1+ (+ (-1+ a) b)))) ; (+ 4 5) ( 1 + ( + ( -1...
null
https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/Book/Edition1/section121.scm
scheme
------------------------------------------------------------- Section 1.2.1 ------------------------------------------------------------- (+ 4 5) (1+ (1+ (1+ (+ 1 5)))) (1+ (1+ (1+ (1+ 5)))) (1+ (1+ (1+ 6))) (1+ (1+ 7)) (1+ 8) Recursive process (+ 4 5) (+ (-1+ a) (1+ b)) (+ 3 6) (+ 2 7) (+ 1 8) (+ 0 9) I...
Structure and Interpretation of Computer Programs , 1st edition exercise 1.7 (define (+ a b) (if (= a 0) b (1+ (+ (-1+ a) b)))) ( 1 + ( + ( -1 + 4 ) 5 ) ) ) ) ( 1 + ( + 3 5 ) ) ( 1 + ( 1 + ( + ( -1 + 3 ) 5 ) ) ) ( 1 + ( 1 + ( + 2 5 ) ) ) ( 1 + ( 1 + ( 1 + ( + ( -1 + 2 ) 5 ) ) ) ) ( 1...
1dab427089786a35f7ce886eeb6bea142132b4b36c80c31f79cb5b7100c9f48a
haslab/HAAP
SourceGraph.hs
HAAP : Haskell Automated Assessment Platform This module provides documentation analysis functions by resorting to the _ _ library ( < > ) . HAAP: Haskell Automated Assessment Platform This module provides documentation analysis functions by resorting to the _SourceGraph_ library (<>). -} # LANGUAGE Overlo...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Code/Analysis/SourceGraph.hs
haskell
sourcegraph number of inter-module function calls * tool runCComplexity ioargs files = do files' <- forM files $ \file -> orLogMaybe $ do logEvent $ "parsing complexity for " ++ file mn <- parseModuleFileName file return (file,mn) runCComplexity' ioargs files = do let cc = if (length...
HAAP : Haskell Automated Assessment Platform This module provides documentation analysis functions by resorting to the _ _ library ( < > ) . HAAP: Haskell Automated Assessment Platform This module provides documentation analysis functions by resorting to the _SourceGraph_ library (<>). -} # LANGUAGE Overlo...
6b6f0180bd7464663943332ca3a74e6ea69b2ee98946093a1158180df66f1134
clash-lang/clash-compiler
ShiftRotateNegative.hs
# LANGUAGE CPP # module ShiftRotateNegative where #if MIN_VERSION_base(4,15,0) import GHC.Num.Natural (Natural) #else import GHC.Natural (Natural) #endif import Clash.Prelude import Clash.Explicit.Testbench import Clash.Sized.Internal.BitVector testBench :: Signal System Bool testBench = done where done = expect...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/5ad7bb2ae9eb5a97a45cd222ce015221137ee3f7/tests/shouldwork/Numbers/ShiftRotateNegative.hs
haskell
HDL, and they have no BitPack instance needed to use 'pack'. Exceptions when shiftL / shiftR gets a negative count. shift accepts negative counts. # NOINLINE topEntity #
# LANGUAGE CPP # module ShiftRotateNegative where #if MIN_VERSION_base(4,15,0) import GHC.Num.Natural (Natural) #else import GHC.Natural (Natural) #endif import Clash.Prelude import Clash.Explicit.Testbench import Clash.Sized.Internal.BitVector testBench :: Signal System Bool testBench = done where done = expect...
b713ec433f577dd765906d30cb51c0cb40e3e318dc01e821ca78cd85ec9ffe97
YouyouCong/ppl-summer-school-2022
times.ml
リストの要素の積を求める let rec times lst = match lst with [] -> 1 | x :: xs -> if x = 0 then shift (fun k -> 0) else x * times xs ;; テスト let test1 = reset (fun () -> times [1; 3; 5]) = 15 ;; let test2 = reset (fun () -> times [4; 0; 2]) = 0 ;; let test3 = reset (fun () -> times [4; 0; 2]) + reset (fun (...
null
https://raw.githubusercontent.com/YouyouCong/ppl-summer-school-2022/876e70d40a1cb7f8b16fb4985fd6dccb50f48601/cong/example/times.ml
ocaml
リストの要素の積を求める let rec times lst = match lst with [] -> 1 | x :: xs -> if x = 0 then shift (fun k -> 0) else x * times xs ;; テスト let test1 = reset (fun () -> times [1; 3; 5]) = 15 ;; let test2 = reset (fun () -> times [4; 0; 2]) = 0 ;; let test3 = reset (fun () -> times [4; 0; 2]) + reset (fun (...
f906366a3535e6e79617cee84ce2797a6ecf0424e0e5b40437c0044d00b0ceae
rescript-lang/rescript-compiler
ast_exp_apply.ml
Copyright ( C ) 2018 , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later versi...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/9513dccf1c91de6edfa3f5016c423e3fe13ca34c/jscomp/frontend/ast_exp_apply.ml
ocaml
match fn as a |. f a |. f b c [@bs] --> f a b c [@bs] a |. (g |. b) a |. `Variant a |. (b |. f c [@bs])
Copyright ( C ) 2018 , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later versi...
8e006bda6815ac54a82649d2d7e942b2ad65157405aaa55e247daa1fcbe53e0c
emqx/esockd
esockd_udp_SUITE.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/esockd/9b959fc11a1c398a589892f335235be6c5b4a454/test/esockd_udp_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 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(esockd_udp_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("eunit/inc...
7c23a2e502abad818e55684761245667dc9f99b5933f086d42a38670767ecf5d
haskell-repa/repa
Partitions.hs
module Data.Repa.Store.Partitions (listPartitions) where import System.FilePath import Control.Monad import Data.Maybe import qualified Data.List as L import qualified System.Directory as System -- | Given a table directory and its meta-data, -- get a list of all table partitions. -- li...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-store/Data/Repa/Store/Partitions.hs
haskell
| Given a table directory and its meta-data, get a list of all table partitions.
module Data.Repa.Store.Partitions (listPartitions) where import System.FilePath import Control.Monad import Data.Maybe import qualified Data.List as L import qualified System.Directory as System listPartitions :: FilePath -> IO (Maybe [FilePath]) listPartitions path = check where ...
29eea607734f748a25b34288fbfb7771a543bf7324bb5c20dac3e438dd45df9b
hbr/albatross
red_black.ml
open Module_types module Map (Key: SORTABLE) = struct (* Basics *) (**********) type 'a pair = Key.t * 'a let compare (key: Key.t) (p: 'a pair): int = Key.compare key (fst p) type color = | Red | Black type 'a t = (* A tree of type ['a t] always sat...
null
https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/fmlib/basic/red_black.ml
ocaml
Basics ******** A tree of type ['a t] always satisfies the red and the black * invariant. left subtree key value pair right subtree Illegal call! Violation: The black height of the children is different. Insertion *********** Root color unchanged, no violation. Root colo...
open Module_types module Map (Key: SORTABLE) = struct type 'a pair = Key.t * 'a let compare (key: Key.t) (p: 'a pair): int = Key.compare key (fst p) type color = | Red | Black type 'a t = | Empty | Node of color let empty: 'a t = ...
fbd895db71955e23e1a4dcf3bdcc8b3aa1d5047df5548c862e025381320050c7
janestreet/command_rpc
caller_implementations_rpcs.mli
open! Core open! Async open! Import module Caller : sig val rpc : (unit, int) Rpc.Rpc.t val implementations : unit Rpc.Implementations.t end module Callee : Command_rpc.Command.T with type query = unit and type response = string Or_error.t
null
https://raw.githubusercontent.com/janestreet/command_rpc/23eb43f63655f8ed23703995f44e6db317ac69bc/test/protocol/caller_implementations_rpcs.mli
ocaml
open! Core open! Async open! Import module Caller : sig val rpc : (unit, int) Rpc.Rpc.t val implementations : unit Rpc.Implementations.t end module Callee : Command_rpc.Command.T with type query = unit and type response = string Or_error.t
ad6802d4430d5e13829d1582dff58dafaeed4c65ec97f4da6b70bd5eec1decf9
input-output-hk/cardano-ledger
Rules.hs
module Cardano.Ledger.Babbage.Rules ( module Cardano.Ledger.Babbage.Rules.Ledger, module Cardano.Ledger.Babbage.Rules.Utxo, module Cardano.Ledger.Babbage.Rules.Utxos, module Cardano.Ledger.Babbage.Rules.Utxow, ) where import Cardano.Ledger.Babbage.Rules.Ledger import Cardano.Ledger.Babbage.Rules.Utxo import Ca...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/babbage/impl/src/Cardano/Ledger/Babbage/Rules.hs
haskell
module Cardano.Ledger.Babbage.Rules ( module Cardano.Ledger.Babbage.Rules.Ledger, module Cardano.Ledger.Babbage.Rules.Utxo, module Cardano.Ledger.Babbage.Rules.Utxos, module Cardano.Ledger.Babbage.Rules.Utxow, ) where import Cardano.Ledger.Babbage.Rules.Ledger import Cardano.Ledger.Babbage.Rules.Utxo import Ca...
ff00c0d7c60b69877cf501249e925d500423a2884ba80495add15425008cab7b
let-def/menhir
partialGrammar.mli
(**************************************************************************) (* *) Menhir (* *) , INRIA Ro...
null
https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/partialGrammar.mli
ocaml
************************************************************************ et en Automatique. All rig...
Menhir , INRIA Rocquencourt , PPS , Université Paris Diderot Copyright 2005 - 2008 Institut National de Recherche en Informatique under the terms of the Q Public License versi...
21a040f80564050550870147fa0af9c80f245865a4ad3befb5373df81f45ddd0
kupl/FixML
sub4.ml
let rec sigma f a b = if a= b then b else (f b) + sigma f a (b-1) ;;
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/sigma/sigma1/submissions/sub4.ml
ocaml
let rec sigma f a b = if a= b then b else (f b) + sigma f a (b-1) ;;
0c09b3d9b27164dcad527c634b23087c7243ca9c8d3b50d245a3fb0d4e1f893e
zadean/xqerl
xs_base64Binary_SUITE.erl
-module('xs_base64Binary_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['base64-001'/1]). -export(['base64-002'/1]). -export(['base64-003'/1]). -export...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/xs/xs_base64Binary_SUITE.erl
erlang
-module('xs_base64Binary_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['base64-001'/1]). -export(['base64-002'/1]). -export(['base64-003'/1]). -export...
074e325415891defe6867b1f42735638cbe1b90443cd8ea4754bd733be797033
nineties/Choco
CmmGen.hs
------------------------------------------------- Choco -- Chikadzume Oriented Compiler -- Copyright 2007 - 2008 by Basement fairy -- ------------------------------------------------- module CmmGen ( translCmm ) where import Arch import Choco imp...
null
https://raw.githubusercontent.com/nineties/Choco/0081351d0b556ff74f096accb65c9ab45d29ddfe/src/CmmGen.hs
haskell
----------------------------------------------- ----------------------------------------------- Rough approximation of costs for each global variables fix this routine later translator Translations fixme! Floating-point operations I/O Tuple operation Memory operations Floating-point operations Array o...
module CmmGen ( translCmm ) where import Arch import Choco import CLamSyn import CmmSyn import Const import LamSyn import Outputable import Panic import Proc import Reg import Types import Var import Control.Monad.State import Data.Function import Data.List import qualified Data.Map as M import qualified Data.Set...
66b67dcc7804983422b8e5955f9283ce5276753600681b927d857a5f8b6715d2
drewt/scmus
client.scm
;; Copyright 2014 - 2020 ;; ;; 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. ;; ;; This program is distributed in ...
null
https://raw.githubusercontent.com/drewt/scmus/5041ec376cb17db463117b8fa212b16b23fe770d/src/client.scm
scheme
This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS...
Copyright 2014 - 2020 modify it under the terms of the GNU General Public License as You should have received a copy of the GNU General Public License (module (scmus client) (scmus-connect! scmus-disconnect! scmus-oneshot exit-client scmus-update-stats! scmus-update-status! sc...
c7650470a53d1a7ba016c4c4f6ddc61c35e3d51c1e97c6043b967c608203db21
mbj/stratosphere
ServiceCatalogProvisionedProductDetailsProperty.hs
module Stratosphere.SageMaker.Project.ServiceCatalogProvisionedProductDetailsProperty ( ServiceCatalogProvisionedProductDetailsProperty(..), mkServiceCatalogProvisionedProductDetailsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosph...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/Project/ServiceCatalogProvisionedProductDetailsProperty.hs
haskell
module Stratosphere.SageMaker.Project.ServiceCatalogProvisionedProductDetailsProperty ( ServiceCatalogProvisionedProductDetailsProperty(..), mkServiceCatalogProvisionedProductDetailsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosph...
2171f5dbae079cc216d84c6dca539e3331adf02134622ff504b54beda9395016
buildsome/buildsome
Interpreter.hs
# LANGUAGE RecordWildCards # # LANGUAGE NoMonomorphismRestriction # module BMake.Interpreter ( interpret , interpolateCmds ) where import BMake.Base import BMake.Data import Control.Monad (when, forM_) import Control.Monad.IO.Class (MonadIO(..)) import ...
null
https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/src/BMake/Interpreter.hs
haskell
| Expr after variable substitution TODO: Take the data ctors so it can generate an ExprTopLevel (\output -> trace ("cartesian input: " ++ show input ++ "\n output: " ++ show output) output) . _dump Expanded exprs given! TODO: Consider type-level marking of "expanded" exprs
# LANGUAGE RecordWildCards # # LANGUAGE NoMonomorphismRestriction # module BMake.Interpreter ( interpret , interpolateCmds ) where import BMake.Base import BMake.Data import Control.Monad (when, forM_) import Control.Monad.IO.Class (MonadIO(..)) import ...
7f004503852f3f73459332413f019a2da6619bbb30690eada3d4a4d5461abe9a
anton-k/processing-for-haskell
PlanetClick.hs
import Graphics.Proc width = 400 height = 400 center = (width / 2, height / 2) setup = do size (width, height) return (1, initPlanets) draw (_, xs) = do background (grey 0) drawSun mapM_ drawPlanet xs update (orient, xs) = return $ (orient, fmap (updatePlanet orient) xs) -------------------------------------...
null
https://raw.githubusercontent.com/anton-k/processing-for-haskell/431b5268e1f31a172b05edd2fcc5abe99ca826fa/tutorial/code/PlanetClick.hs
haskell
----------------------------------- sun ----------------------------------- planets ----------------------------------- -----------------------------------
import Graphics.Proc width = 400 height = 400 center = (width / 2, height / 2) setup = do size (width, height) return (1, initPlanets) draw (_, xs) = do background (grey 0) drawSun mapM_ drawPlanet xs update (orient, xs) = return $ (orient, fmap (updatePlanet orient) xs) drawSun = do fill (grey 255) circl...
0593ae88a768284df47f14d3a4b938e7af7dbf14df9bfb6aa58acd59f0f44d52
ghc/nofib
Main.hs
module Main (main) -- typecheck where { import System.Environment (getArgs); partain : import Fast2haskell ; #include "../Fast2haskell.hs" strict_show_i::Int -> [Char]; strict_show_i x=miraseq x (show x); strict_show_d::Double -> [Char]; strict_show_d x=miraseq x (show x); f_check::T_vexp -> [C...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/hartel/typecheck/Main.hs
haskell
typecheck
where { import System.Environment (getArgs); partain : import Fast2haskell ; #include "../Fast2haskell.hs" strict_show_i::Int -> [Char]; strict_show_i x=miraseq x (show x); strict_show_d::Double -> [Char]; strict_show_d x=miraseq x (show x); f_check::T_vexp -> [Char]; f_check a_expr= ...
090f543aac6094e02932a8a695011667d350db7ef3f7252a5fde08fc7e644b75
anurudhp/CPHaskell
b.hs
-- AC import Control.Arrow ((>>>)) main :: IO () main = interact $ lines >>> head >>> solve >>> ( \b -> if b then "Yes" else "No" ) solve :: String -> Bool solve s = and $ (\s -> s == reverse s) <$> ([id, take half, drop (1 + half...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/atcoder/abc159/b.hs
haskell
AC
import Control.Arrow ((>>>)) main :: IO () main = interact $ lines >>> head >>> solve >>> ( \b -> if b then "Yes" else "No" ) solve :: String -> Bool solve s = and $ (\s -> s == reverse s) <$> ([id, take half, drop (1 + half)] <*> ...
2e0c88176da009e64857fa2f893798c4d5bcdf3d874957688b3b77f8b88ec9e1
larcenists/larceny
ray.scm
RAY -- Ray - trace a simple scene with spheres , generating a " .pgm " file . Translated to Scheme from book ANSI Common Lisp , Example 9.8 (import (scheme base) (scheme inexact) (scheme file) (scheme read) (scheme write) (scheme time)) (define (make-point x y z) (vect...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/ray.scm
scheme
RAY -- Ray - trace a simple scene with spheres , generating a " .pgm " file . Translated to Scheme from book ANSI Common Lisp , Example 9.8 (import (scheme base) (scheme inexact) (scheme file) (scheme read) (scheme write) (scheme time)) (define (make-point x y z) (vect...
0f5dee171a77a9bd87b9d1f4d885c055bfe3575fb1dae8258a454a51d105b00d
processone/ejabberd
mod_last_mnesia.erl
%%%------------------------------------------------------------------- File : Author : < > Created : 13 Apr 2016 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General P...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_last_mnesia.erl
erlang
------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHA...
File : Author : < > Created : 13 Apr 2016 by < > ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public Li...
679514a8d44608c13799e6ac91a77ef46fcfd9e1f0bda2aa76bb0cbfa017bb94
dpiponi/Moodler
HandleEvent.hs
# LANGUAGE FlexibleContexts # module HandleEvent(elementDisplayName, hoverGadget, labelGadget, selectPointOnCurrent, handleDefault) where import Control.Lens hiding (setting) import Control.Monad.State import Control . Monad . Trans . Free im...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/src/HandleEvent.hs
haskell
import Text import Numeric XXX Could this be script+keybinding? liftIO $ print (container, contentss) XXX Make script+binding. Needs planeInfo . rootTransform command. XXX Make script+binding. Needs planeInfo . rootTransform command. XXX Can this become script+binding. Couldn't before because of hlint problem. B...
# LANGUAGE FlexibleContexts # module HandleEvent(elementDisplayName, hoverGadget, labelGadget, selectPointOnCurrent, handleDefault) where import Control.Lens hiding (setting) import Control.Monad.State import Control . Monad . Trans . Free im...
b6a6628dcda5224dfe3258ab20a7d49a9720003ce7bafce380e17e3c4cdfef56
gergoerdi/tandoori
cikk2.hs
undefined = undefined Library head :: [a] -> a head (x:xs) = x tail :: [a] -> [a] tail (x:xs) = xs append :: [a] -> [a] -> [a] append _ _ = [] -- The example from the paper reverse [] = [] reverse (x:xs) = append (reverse xs) x last xs = head (reverse xs) -- init xs = reverse (tail (...
null
https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/input/cikk2.hs
haskell
The example from the paper init xs = reverse (tail (reverse xs)) rotateR xs = last xs : init xs
undefined = undefined Library head :: [a] -> a head (x:xs) = x tail :: [a] -> [a] tail (x:xs) = xs append :: [a] -> [a] -> [a] append _ _ = [] reverse [] = [] reverse (x:xs) = append (reverse xs) x last xs = head (reverse xs)
4131389a14a24455d9ee9bd0972a83b39d31d54f0696b446c17a84814ea48eea
hjcapple/reading-sicp
exercise_3_81.scm
#lang racket P246 - [ 练习 3.81 ] (require "stream.scm") (require "infinite_stream.scm") 线性同余法,a 和 m (define (rand-update x) (let ((a 48271) (b 19851020) (m 2147483647)) (modulo (+ (* a x) b) m))) (define random-init 7) (define (rand-generator cmds) (define (rand-helper v cmds) (if (stream-null? cmds...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_81.scm
scheme
#lang racket P246 - [ 练习 3.81 ] (require "stream.scm") (require "infinite_stream.scm") 线性同余法,a 和 m (define (rand-update x) (let ((a 48271) (b 19851020) (m 2147483647)) (modulo (+ (* a x) b) m))) (define random-init 7) (define (rand-generator cmds) (define (rand-helper v cmds) (if (stream-null? cmds...
b14b106e8135b71dfb34d3396c02037f275288f41b764c8a2b1f5a4de9483a62
RisingFisan/Programacao-Funcional
Teste2_1415.hs
import Data.List (sort) import System.Random data Heap a = Vazia | Nodo a (Heap a) (Heap a) ex1 = Nodo 2 (Nodo 5 (Nodo 10 (Nodo 12 Vazia Vazia) (Nodo 20 Vazia Vazia)) (Nodo 6 (Nodo 15 Vazia Vazia) Vazia)) (Nodo 8 (Nodo 1...
null
https://raw.githubusercontent.com/RisingFisan/Programacao-Funcional/fb52a6f256a60e129d8a46e2aa0b36d86117155a/Testes/Teste2_1415.hs
haskell
import Data.List (sort) import System.Random data Heap a = Vazia | Nodo a (Heap a) (Heap a) ex1 = Nodo 2 (Nodo 5 (Nodo 10 (Nodo 12 Vazia Vazia) (Nodo 20 Vazia Vazia)) (Nodo 6 (Nodo 15 Vazia Vazia) Vazia)) (Nodo 8 (Nodo 1...
eb4fdbfb452a55971cc0e723ef300a6d8eb35f089dc1856fdf8624b96c3ba4bb
RefactoringTools/HaRe
MultiFun1.hs
module MultiFun1 where Remove the second parameter from every equation for the function foo . Remove the second parameter from every equation for the function foo. -} foo [] x = [] foo xs x = [1]
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/RmOneParameter/MultiFun1.hs
haskell
module MultiFun1 where Remove the second parameter from every equation for the function foo . Remove the second parameter from every equation for the function foo. -} foo [] x = [] foo xs x = [1]
32a086c31c9464483038d7a577e94238aecc4a05dacd922a7e1af0975644bdcb
heidegger/JSConTest
JSParseInterface.mli
open Utf16 exception JSParseError type encoding = Regular of Ulexing.enc | EUtf16 of byte_order option val string_of_encoding : encoding -> string val next_lexeme : LexingOwn.lexbuf -> JSParse.token val set_location : string -> int -> int -> int -> unit val parse_program : in_channel -> encoding -> string AST.progr...
null
https://raw.githubusercontent.com/heidegger/JSConTest/7c807a76af998da25775fba1f5cbe1cf8031d121/ocaml/js/JSParseInterface.mli
ocaml
open Utf16 exception JSParseError type encoding = Regular of Ulexing.enc | EUtf16 of byte_order option val string_of_encoding : encoding -> string val next_lexeme : LexingOwn.lexbuf -> JSParse.token val set_location : string -> int -> int -> int -> unit val parse_program : in_channel -> encoding -> string AST.progr...
6924f86132442e9630ba86a15e2672a8bd9e045b4a69849572b38fe092a81daa
ocurrent/solver-service
context.ml
open Lwt.Infix module Hash = Digestif.SHA1 let ( / ) = Filename.concat let ( >>!= ) = Lwt_result.bind type t = { state_dir : string } let repos_dir t = t.state_dir / "git" let dir_exists d = match Unix.lstat d with | Unix.{ st_kind = S_DIR; _ } -> true | _ -> false | exception Unix.Unix_error (Unix.ENOENT, ...
null
https://raw.githubusercontent.com/ocurrent/solver-service/87d6b79b552a04cac85011310356619f3e62a1e2/worker/context.ml
ocaml
Don't let ocaml-git try to init a new repository! This reset might avoid `fatal: cannot chdir to '../../../ocurrent': No such file or directory` errors Don't let the user cancel these operations.
open Lwt.Infix module Hash = Digestif.SHA1 let ( / ) = Filename.concat let ( >>!= ) = Lwt_result.bind type t = { state_dir : string } let repos_dir t = t.state_dir / "git" let dir_exists d = match Unix.lstat d with | Unix.{ st_kind = S_DIR; _ } -> true | _ -> false | exception Unix.Unix_error (Unix.ENOENT, ...
57d1f8b64d08606e656a3191de20439fc8cfcad5a8de610a852db4bb2ee62eb9
SuzanneSoy/anaphoric
amap-test.rkt
#lang racket/base (require anaphoric/amap rackunit) (check-equal? '(2 3) (amap (add1 it) '(1 2)) "Sanity check.") (check-equal? '("2" "4") (amap (number->string (+ it it)) '(1 2)) "Multiple 'it' in a nested expression.") (define (f lst) (amap (/ it 0) lst)) (check-equal? '() (f '()) "Empty list...
null
https://raw.githubusercontent.com/SuzanneSoy/anaphoric/c648ec2aad6d2b2ec72acc729143454d1e855cf6/test/amap-test.rkt
racket
#lang racket/base (require anaphoric/amap rackunit) (check-equal? '(2 3) (amap (add1 it) '(1 2)) "Sanity check.") (check-equal? '("2" "4") (amap (number->string (+ it it)) '(1 2)) "Multiple 'it' in a nested expression.") (define (f lst) (amap (/ it 0) lst)) (check-equal? '() (f '()) "Empty list...
af3c1a616e25c0fac1e690402033c8af9218e9a265531d24ab5cfdedee6f433f
simon-katz/lein-nomis-ns-graph
main.cljs
(ns nomisdraw.main (:require [nomisdraw.top-level-render :as top-level-render] [reagent.core :as r])) (enable-console-print!) (println "Edits to this text should show up in your developer console.") (r/render-component [top-level-render/render] (. js/document (getElementById "app"))...
null
https://raw.githubusercontent.com/simon-katz/lein-nomis-ns-graph/e30d8af3022ee1d9b1c49571847925c45617e66b/test-resources/example-projects/nomisdraw/src/cljs/nomisdraw/main.cljs
clojure
optionally touch your app-state to force rerendering depending on your application (swap! app-state update-in [:__figwheel_counter] inc)
(ns nomisdraw.main (:require [nomisdraw.top-level-render :as top-level-render] [reagent.core :as r])) (enable-console-print!) (println "Edits to this text should show up in your developer console.") (r/render-component [top-level-render/render] (. js/document (getElementById "app"))...
14700b0ff89fa0fed33b5aff7aaae1c1ce6b7e7325908958884f0c89dc2664b8
gedge-platform/gedge-platform
amqp_selective_consumer.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2011 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% %% @doc This module is an implementation of the a...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp_client/src/amqp_selective_consumer.erl
erlang
@doc This module is an implementation of the amqp_gen_consumer opening AMQP channels. This is the default implementation selected by channel. <br/> <br/> The Consumer parameter for this implementation is {{@module}, []@}<br/> This consumer implementation keeps track of consumer tags and sends the subscription-...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2011 - 2021 VMware , Inc. or its affiliates . All rights reserved . behaviour and can be used as part of the Consumer par...
a2c22c2f5f25171000f85a0ff8e61cfe368e8f6394f65040385372dabea2af48
cryogen-project/cryogen-core
klipse.clj
(ns cryogen-core.klipse (:require [camel-snake-kebab.core :refer [->snake_case_string ->camelCaseString]] [cheshire.core :as json] [clojure.string :as string] [cryogen-core.util :as util] [net.cgrand.enlive-html :as enlive])) ;;;;;;;;;;; ;; utils (defn map-keys "Applies f to each key in m" [...
null
https://raw.githubusercontent.com/cryogen-project/cryogen-core/8318bde771d39515b5f5a7f5af53ba5c55aeec35/src/cryogen_core/klipse.clj
clojure
utils klipse This needs to be updated whenever a new clojure selector is introduced. It should only be necessary for react wrappers and the like, so not very often. When (if?) self hosted cljs becomes compatible with advanced builds this can be removed and we can just always use minified js.
(ns cryogen-core.klipse (:require [camel-snake-kebab.core :refer [->snake_case_string ->camelCaseString]] [cheshire.core :as json] [clojure.string :as string] [cryogen-core.util :as util] [net.cgrand.enlive-html :as enlive])) (defn map-keys "Applies f to each key in m" [f m] (zipmap (map f...
04fb5b11dac83e9165bb355cb435582b253806f3423d43456b7e90ba2ba1c647
MattWindsor91/travesty
state_transform_types.mli
This file is part of ' travesty ' . Copyright ( c ) 2018 by Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation ...
null
https://raw.githubusercontent.com/MattWindsor91/travesty/3f4da33830cc928ad879077e690277088de1f836/src/state_transform_types.mli
ocaml
* [Generic_types] contains generic versions of the types used in [Generic_builders] and [Generic_runners]. * [t] is the type of the state monad. * [final] is the type of returned results. In transformers, this becomes ['a Inner.t]; otherwise, it becomes just ['a]. * [state] is the type used to represent th...
This file is part of ' travesty ' . Copyright ( c ) 2018 by Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation ...
f1980f581af619f45ce7c1656d23403ccf3a0232d7fe8adff810d976ea06d028
basho/riak_test
rtdev.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2013 - 2014 Basho Technologies , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/src/rtdev.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2013 - 2014 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @private -module(rtdev...
8f4899280abc9108099524f4e17b510ce3c2ee170cfe7cff231721129b863e36
200ok-ch/easy
collect.cljs
(ns easy.collect (:require [lumo.util :as lumo] [easy.util :as util] [easy.log :as log] [clojure.tools.cli :refer [parse-opts]] [cljs.pprint :refer [pprint]] [cljs.spec.alpha :as s] [clojure.string :refer [join]])) (def cli-options [;; ["-d" ...
null
https://raw.githubusercontent.com/200ok-ch/easy/398b77e6dee3a02aa9fb78f7421b8f5c45ee2f23/src/easy/collect.cljs
clojure
["-d" "--debug" "Debug output"]
(ns easy.collect (:require [lumo.util :as lumo] [easy.util :as util] [easy.log :as log] [clojure.tools.cli :refer [parse-opts]] [cljs.pprint :refer [pprint]] [cljs.spec.alpha :as s] [clojure.string :refer [join]])) (def cli-options ]) (def...
dffdf0f6db1bf75f0372a3c7e0c90a3de6723939974875fcb375a13e41f57ee7
diagrams/palette
Types.hs
----------------------------------------------------------------------------- -- | Module : Palette . Ty[es Copyright : ( c ) 2013 -- License : BSD-style (see LICENSE) -- Maintainer : -- Types used in Palette modules -- -----------------------------------------------------------------------...
null
https://raw.githubusercontent.com/diagrams/palette/4159a0519317b0c9950812d2243b9c6e72e5cf6b/src/Data/Colour/Palette/Types.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see LICENSE) Maintainer : --------------------------------------------------------------------------- | A convenient alias. | Used to select the hue range in 'randomColor'. | Used to select the luminosity ...
Module : Palette . Ty[es Copyright : ( c ) 2013 Types used in Palette modules module Data.Colour.Palette.Types ( Kolor , Hue(..) , Luminosity(..) , ColorDefinition(..) ) where import Data.Colour type Kolor = Colour Double data Hue = HueMo...
a1e1b89a7c57fd5f049e0f2dc47a5a5f66c3a8a25832d0e127703d390d437c17
wireless-net/erlang-nommu
ssl_npn_hello_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/ssl/test/ssl_npn_hello_SUITE.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ssl_npn_hello_SUITE). -compile(e...
d4f08b0941da31aef334b4d8e4869d1f5f3b9022b3410c45d2bb4d7b2345ce71
aeternity/aeternity
aect_contracts_store.erl
%%%------------------------------------------------------------------- ( C ) 2018 , Aeternity Anstalt %%% @doc Interface to the contract store . %%% @end %%%------------------------------------------------------------------- -module(aect_contracts_store). -record(store, { cache :: #{key() => val()}, ...
null
https://raw.githubusercontent.com/aeternity/aeternity/d4863b7233f406c753fd42da10b7ee19a14aa399/apps/aecontract/src/aect_contracts_store.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- Returns empty binary if key is not in the store. Returns a map of all the key/value pairs with the given key as a strict prefix. subtree is only in cache
( C ) 2018 , Aeternity Anstalt Interface to the contract store . -module(aect_contracts_store). -record(store, { cache :: #{key() => val()}, read_cache :: #{key() => val()}, mtree :: aeu_mtrees:mtree() }). -opaque store() :: #store{}. -type key() :: binary(). -type val() :: bin...
561c22c1b2b74cfd1ead491ba468a9037d9ca7f420e4f608319968715ebf5a1f
haskell/haskell-language-server
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE TypeOperators #-} # OPTIONS_GHC -Wall # module Main where import Control.Monad (void) import Data.Either (rights) import qualified Data.Text as T import qualified Ide.Plugin.GADT as GADT import ...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/686fa1aa0ed686fb890d93247cd52ee1a77ed188/plugins/hls-gadt-plugin/test/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators #
# LANGUAGE RecordWildCards # # OPTIONS_GHC -Wall # module Main where import Control.Monad (void) import Data.Either (rights) import qualified Data.Text as T import qualified Ide.Plugin.GADT as GADT import System.FilePath ((</>)) import Test.Hls main :: IO () mai...
e6a0f17e1bd6f5667c69c0d31fce32af63fa11b79962ef221c2932efbf462e5a
ekmett/succinct
hlint.hs
----------------------------------------------------------------------------- -- | -- Module : Main (hlint) Copyright : ( C ) 2013 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : provisional -- Portability : portable -- -- This module runs HLint on the lens...
null
https://raw.githubusercontent.com/ekmett/succinct/7e884138c2e943f5ca08f56b58b409d08b870ab9/tests/hlint.hs
haskell
--------------------------------------------------------------------------- | Module : Main (hlint) License : BSD-style (see the file LICENSE) Stability : provisional Portability : portable This module runs HLint on the lens source tree. ------------------------------------------------------------...
Copyright : ( C ) 2013 Maintainer : < > module Main where import Control.Monad import Language.Haskell.HLint import System.Environment import System.Exit main :: IO () main = do args <- getArgs hints <- hlint $ ["src", "--cpp-define=HLINT"] ++ args unless (null hints) exitFailure
1434ebde459f48303b9596fa518940ca25e77cc72ef19b209e587b8cdefeda19
Gbury/dolmen
count.ml
Log base 2 let rec log2 n = if n <= 1 then 0 else 1 + log2(n asr 1) (* Count number of lines and maximum of columns *) let count_lines_and_columns file = let ch = open_in file in let n_lines = ref 0 in let max_col = ref 0 in try while true do let s = input_line ch in n_lines := !n_lines + 1; ...
null
https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/tools/count.ml
ocaml
Count number of lines and maximum of columns Scan a folder Format.eprintf "counting %s@." file; Main function
Log base 2 let rec log2 n = if n <= 1 then 0 else 1 + log2(n asr 1) let count_lines_and_columns file = let ch = open_in file in let n_lines = ref 0 in let max_col = ref 0 in try while true do let s = input_line ch in n_lines := !n_lines + 1; max_col := max !max_col (String.length s); ...
9a8d2a60812cb8b9d3d74477bd8eeff3262b6ac3db87a2deca2c298ec4f35d12
Viasat/halite
md_err.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.doc.md-err (:require [com.viasat.halite.doc.utils :as utils])) (set! *warn-on-reflection* true) (defn err-md [lang {:keys [prefix get-link-f]} err-id err] (->> ["### " "<a name=\"" (utils/safe-op-anchor err-id) "\...
null
https://raw.githubusercontent.com/Viasat/halite/a5f81473dadc1b8e63ed6744d3b0154098f1b3ab/src/com/viasat/halite/doc/md_err.clj
clojure
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.doc.md-err (:require [com.viasat.halite.doc.utils :as utils])) (set! *warn-on-reflection* true) (defn err-md [lang {:keys [prefix get-link-f]} err-id err] (->> ["### " "<a name=\"" (utils/safe-op-anchor err-id) "\...
b84e91c88a36ae9e3957a6759d9d50d3ff4952fdca1eb977cd9951f0693a440c
haskell/haskell-ide-engine
Server.hs
# LANGUAGE CPP # # LANGUAGE DuplicateRecordFields # # LANGUAGE GADTs # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE LambdaCase #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE MultiWayIf #-} # LA...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/src/Haskell/Ide/Engine/Server.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiWayIf # # LANGUAGE ScopedTypeVariables # --------------------------------------------------------------------- # ANN module ("hlint: ignore Redundant do" :: String) # # ANN module ("hli...
# LANGUAGE CPP # # LANGUAGE DuplicateRecordFields # # LANGUAGE GADTs # # LANGUAGE FlexibleInstances # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE PartialTypeSignatures # module Haskell.Ide.Engine.Server ( server ) where import Control.Conc...
5b8ed0e3f390e0bb3e01162bbd4c84f655babe56be9615e457e12be41f1cc0c5
pfeodrippe/pitoco
ws.clj
(ns pitoco.server.ws (:require [taoensso.sente :as sente] [taoensso.sente.server-adapters.http-kit :refer [get-sch-adapter]])) ;; Sente. (let [{:keys [ch-recv send-fn connected-uids ajax-post-fn ajax-get-or-ws-handshake-fn]} ;; Disable CSRF as this is supposed to be used for localhost. ...
null
https://raw.githubusercontent.com/pfeodrippe/pitoco/e641d0facab54f73b79b02818390b189c7ac6018/web_app/backend/pitoco/server/ws.clj
clojure
Sente. Disable CSRF as this is supposed to be used for localhost.
(ns pitoco.server.ws (:require [taoensso.sente :as sente] [taoensso.sente.server-adapters.http-kit :refer [get-sch-adapter]])) (let [{:keys [ch-recv send-fn connected-uids ajax-post-fn ajax-get-or-ws-handshake-fn]} (sente/make-channel-socket! (get-sch-adapter) {:csrf-token-fn nil})] (d...
f76804303955087252dfcf7debac72a98cde3e480c179ecf129a7ab0875dea21
damn/cdq
door.clj
(ns game.entity.door (:require [engine.render :as color]) (:use [engine.core :only (play-sound)] utils.core (game.components core position body pressable render) (game.maps cell-grid [minimap :only (show-on-minimap)]))) ; another way of handling the open door was to change the image&mouseover-outli...
null
https://raw.githubusercontent.com/damn/cdq/5093dbdba91c445e403f53ce96ead05d5ed8262b/src/game/entity/door.clj
clojure
another way of handling the open door was to change the image&mouseover-outline to false&remove component :pressable ... or remove the :body component too? make-closed-door ?
(ns game.entity.door (:require [engine.render :as color]) (:use [engine.core :only (play-sound)] utils.core (game.components core position body pressable render) (game.maps cell-grid [minimap :only (show-on-minimap)]))) but it had still a : body component which blocks mouseoverentities that lie b...
7346df9a095f413b916d1793e933147250dd54b55567df6eb94202f6d026faee
coccinelle/faults-in-Linux
main.ml
open Common (* ---------------------------------------------------------------------- *) (* find the starting and ending line number of each function *) let count_lines version short_name = function Ast_c.Definition (defbis, ii) -> (match ii with iifunc1::iifunc2::i1::i2::ifakestart::isto -> let start =...
null
https://raw.githubusercontent.com/coccinelle/faults-in-Linux/74c72911a1146aa1bfd410a4c3c1e79064a85904/tools/count_lines/main.ml
ocaml
---------------------------------------------------------------------- find the starting and ending line number of each function add to database ---------------------------------------------------------------------- find the length of each file add to database ----------------------------------------------...
open Common let count_lines version short_name = function Ast_c.Definition (defbis, ii) -> (match ii with iifunc1::iifunc2::i1::i2::ifakestart::isto -> let start = Ast_c.line_of_info i1 in let finish = Ast_c.line_of_info i2 in let name = Ast_c.str_of_name defbis.Ast_c.f_name in Printf.printf "v...
5c1b99326e64a8994d92a79afdac9615b6df3375b600879925a823cbd8429409
cardmagic/lucash
bufpol.scm
;;; Flags that control buffering policy. Copyright ( c ) 1993 by . See file COPYING . ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. These constants are not likely to change from stdio lib to , ;;; but you need t...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/solaris/bufpol.scm
scheme
Flags that control buffering policy. These are for the SET-PORT-BUFFERING procedure, essentially a Scheme analog of the setbuf(3S) stdio call. We use the actual stdio values. but you need to check when you do a port. _IOFBF _IONBF
Copyright ( c ) 1993 by . See file COPYING . These constants are not likely to change from stdio lib to , (define-enum-constants bufpol _ IOLBF
a6bce8fa2e77ece9e87519b4656a33c97a092901904b41b005d4bf066018c544
karamellpelle/grid
Segment.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Grid/Helpers/Segment.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid 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 GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.Grid.Helpers.Segment ( segmentEat...
680532e4506cce8d3df77ea5bec6a543e265abde5d8dc859a2135eea73d6903f
graninas/automatic-whitebox-testing-showcase
SystemCommands.hs
module Runtime.SystemCommands (runCmd) where import System.Process (shell, readCreateProcess) runCmd cmd = readCreateProcess (shell cmd) ""
null
https://raw.githubusercontent.com/graninas/automatic-whitebox-testing-showcase/c465d0c22c0154525781442c8c8f0df481165aaa/lib/flow/Runtime/SystemCommands.hs
haskell
module Runtime.SystemCommands (runCmd) where import System.Process (shell, readCreateProcess) runCmd cmd = readCreateProcess (shell cmd) ""
b6c6a3e62bff0d8cc7d3d362cbb73cbd44a2c44513ebbf1175aecd5352cd2368
klarna/avlizer
avlizer_confluent.erl
%%%----------------------------------------------------------------------------- %%% Copyright ( c ) 2018 - 2019 Klarna Bank AB ( publ ) . %%% This file is provided to you under the Apache License , %%% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain...
null
https://raw.githubusercontent.com/klarna/avlizer/e3a8a8abc741fb3c135ef1aeadf84dd400f774de/src/avlizer_confluent.erl
erlang
----------------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing ...
Copyright ( c ) 2018 - 2019 Klarna Bank AB ( publ ) . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY It implements two data...
0a19fd481960d0b8eba3b5ea989c3726691f865537b20e0d56711597179699da
pcapriotti/optparse-applicative
Pretty.hs
# LANGUAGE CPP # module Options.Applicative.Help.Pretty ( module Text.PrettyPrint.ANSI.Leijen , (.$.) , groupOrNestLine , altSep , hangAtIfOver ) where import Control.Applicative #if !MIN_VERSION_base(4,11,0) import Data.Semigroup ((<>)) #endif import Text.PrettyPrint.ANSI.Le...
null
https://raw.githubusercontent.com/pcapriotti/optparse-applicative/4fd2325533e74b52cb5c0c25dab619857b6e5ef4/src/Options/Applicative/Help/Pretty.hs
haskell
| Apply the function if we're not at the start of our nesting level. | Apply the function if we're not at the start of our nesting level. | Apply the function if we're not at the start of our nesting level. | Render flattened text on this line, or start a new line before rendering any text. This wil...
# LANGUAGE CPP # module Options.Applicative.Help.Pretty ( module Text.PrettyPrint.ANSI.Leijen , (.$.) , groupOrNestLine , altSep , hangAtIfOver ) where import Control.Applicative #if !MIN_VERSION_base(4,11,0) import Data.Semigroup ((<>)) #endif import Text.PrettyPrint.ANSI.Le...
0b989560377ca9b7f116a48cfd7392e4ce8984fabb79d0a6840010918345bf2d
phantomics/seed
graph.garden-path.lisp
graph.garden-path.lisp (in-package #:seed.app-model.graph.garden-path) (defmacro graph-garden-path (function-name &rest nodes) "Build the function for traversal of a path given the specification of the nodes in the path." (let ((node-ids (mapcar (lambda (node) (getf node :id)) nodes)) (nodes-sym (gensym))...
null
https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.app-model.graph.garden-path/graph.garden-path.lisp
lisp
manifest the conditions that pertain to this link; for option nodes, conditions are evaluated to determine whether the node is presented, while for action and switch nodes the conditions followed, or the last link is followed in case it has a condition that evaluates to false import 'state symbols into the current ...
graph.garden-path.lisp (in-package #:seed.app-model.graph.garden-path) (defmacro graph-garden-path (function-name &rest nodes) "Build the function for traversal of a path given the specification of the nodes in the path." (let ((node-ids (mapcar (lambda (node) (getf node :id)) nodes)) (nodes-sym (gensym))...
78a01518243de29f62c9018f58eb3e1f38280b7d744de86ee5c669fdbff257f0
onyx-platform/onyx-kafka
input_test.clj
(ns onyx.plugin.input-test (:require [clojure.test :refer [deftest is]] [com.stuartsierra.component :as component] [onyx.kafka.helpers :as h] [onyx.test-helper :refer [with-test-env]] [onyx.job :refer [add-task]] [onyx.tasks.kafka :refer [consumer]] ...
null
https://raw.githubusercontent.com/onyx-platform/onyx-kafka/8353ed5ff1a9f41da836a0069cdf6ba6da91f613/test/onyx/plugin/input_test.clj
clojure
(ns onyx.plugin.input-test (:require [clojure.test :refer [deftest is]] [com.stuartsierra.component :as component] [onyx.kafka.helpers :as h] [onyx.test-helper :refer [with-test-env]] [onyx.job :refer [add-task]] [onyx.tasks.kafka :refer [consumer]] ...
4b9e28d9ce9603d65cbfee634665cd6165e2b19c9d95c2a53bfdfba97acc01ce
TyOverby/mono
test_bigstring_unsafe_accessors.ml
open! Core open Poly open! Bigstring let buf = create 256 let test_accessor ~buf to_str ~fget ~fset vals = List.foldi ~init:true vals ~f:(fun i passing x -> fset buf ~pos:0 x; let y = fget buf ~pos:0 in if x <> y then eprintf "Value %d: expected %s, got %s\n" i (to_str x) (to_str y); x = y && passin...
null
https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-core/core/test/src/test_bigstring_unsafe_accessors.ml
ocaml
open! Core open Poly open! Bigstring let buf = create 256 let test_accessor ~buf to_str ~fget ~fset vals = List.foldi ~init:true vals ~f:(fun i passing x -> fset buf ~pos:0 x; let y = fget buf ~pos:0 in if x <> y then eprintf "Value %d: expected %s, got %s\n" i (to_str x) (to_str y); x = y && passin...
19f6b59131f3a3181b1b4529a7c83b0b0ef304dc0704038f17514bf9520afdca
sanette/bogue
b_style.ml
This file is part of BOGUE Style is used to describe background , border , shadow in an immutable way . Box uses this , Layout uses this in addition to a Box field for caching the computation . uses this, Layout uses this in addition to a Box field for caching the computation. *) module Draw = B...
null
https://raw.githubusercontent.com/sanette/bogue/d8867599318e80c4d97801e36503b5aa64ba7d78/lib/b_style.ml
ocaml
int should be enough since 0 means None pattern image should the shadow be larger than the box? corner radius the width of the gradient
This file is part of BOGUE Style is used to describe background , border , shadow in an immutable way . Box uses this , Layout uses this in addition to a Box field for caching the computation . uses this, Layout uses this in addition to a Box field for caching the computation. *) module Draw = B...
7638d21cbe5e61bcdf1c94287f81f21deb7c5d567c758ecbfa95f0344749bca8
filecoin-project/orient
macros.lisp
(in-package :orient) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Macros Macro - writing macros come first . (defmacro with-gensyms ((&rest vars) &body body) (let ((binding-form (lambda (var) `(,var (gensym ,(format nil "~a-" (string var))))))) `...
null
https://raw.githubusercontent.com/filecoin-project/orient/3a9ec7c41fd9f8ac5185c358ce908e5646ddffca/base/macros.lisp
lisp
General/Util -- Could/should have own package. Should this have a better name? Debugging Helper for !> Returns single-tuple. Returns relation. Names function. -> tlambda => xlambda ~> literal implementation ~=> external implementation FIXME: refactor to share code with TRANSFORMATION. (input-lambda-list ...
(in-package :orient) Macros Macro - writing macros come first . (defmacro with-gensyms ((&rest vars) &body body) (let ((binding-form (lambda (var) `(,var (gensym ,(format nil "~a-" (string var))))))) `(let (,@(mapcar binding-form vars)) ,@body))) (defmacro with-gensyms* (va...
c19397b6bb0b58ccea8a4db156f1a344b6ab67b5a0eea1fe0bcba64a75c0ad21
ocaml-jupyter/jupyter-kernel
Client.mli
(* This file is free software. See file "license" for more details. *) * { 1 Main Kernel Loop } * { 2 Prelude } type 'a or_error = ('a, string) Result.result type mime_data = { mime_type: string; mime_content: string; (* raw content *) mime_b64: bool; (* if true, content will be encoded with base64 *) } (* ...
null
https://raw.githubusercontent.com/ocaml-jupyter/jupyter-kernel/cc2c0157c2c779d70c58a6d2dcd5b8453304faa4/src/Client.mli
ocaml
This file is free software. See file "license" for more details. raw content if true, content will be encoded with base64 list of mime objects, all of distinct types TODO: make the [exec] return type be asynchronous - return [Ok str] as a future - return a stream of actions main message ot...
* { 1 Main Kernel Loop } * { 2 Prelude } type 'a or_error = ('a, string) Result.result type mime_data = { mime_type: string; } type mime_data_bundle = mime_data list exception Restart * { 2 User - Defined Kernel } module Kernel : sig type exec_action = | Mime of mime_data_bundle type exec_status_ok ...
bac132a118cf1a507022d663e3900455cd8879caec28942ca302046905b660ac
metabase/metabase
truncate_audit_log_test.clj
(ns metabase-enterprise.task.truncate-audit-log-test (:require [clojure.test :refer :all] [metabase.models.setting :as setting] [metabase.public-settings.premium-features :as premium-features] [metabase.task.truncate-audit-log.interface :as truncate-audit-log.i] [metabase.test :as mt])) (deftest audit...
null
https://raw.githubusercontent.com/metabase/metabase/4059bd7b8eb0749d069bc4c36b844d477db7678f/enterprise/backend/test/metabase_enterprise/task/truncate_audit_log_test.clj
clojure
(ns metabase-enterprise.task.truncate-audit-log-test (:require [clojure.test :refer :all] [metabase.models.setting :as setting] [metabase.public-settings.premium-features :as premium-features] [metabase.task.truncate-audit-log.interface :as truncate-audit-log.i] [metabase.test :as mt])) (deftest audit...
9c0ef4463dabba039bb28c3c8bd88d93f0ba28d1b376f3e992c308e65a188e5f
metametadata/carry
signals.cljs
(ns app.home.signals (:require [app.blueprint-methods :refer [on-signal]] [cljs.core.match :refer-macros [match]])) (defmethod on-signal (namespace ::_) [_model signal _dispatch-signal dispatch-action] (match signal ::on-click (dispatch-action :app.home.actions/click)))
null
https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/blueprint-splitting-multimethods-core-match/src/app/home/signals.cljs
clojure
(ns app.home.signals (:require [app.blueprint-methods :refer [on-signal]] [cljs.core.match :refer-macros [match]])) (defmethod on-signal (namespace ::_) [_model signal _dispatch-signal dispatch-action] (match signal ::on-click (dispatch-action :app.home.actions/click)))
7483eccbd89a9d2bcab52763178c9277f0101a1e1bca6369560da8f83be5de9f
matterhorn-chat/mattermost-api
Mattermost.hs
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # module Network.Mattermost ( -- * Types * * Mattermost - Related Types ( deprecated : use Network . Mattermost . Types instead ) -- n.b. the deprecation notice is in that haddock header because we're -- s...
null
https://raw.githubusercontent.com/matterhorn-chat/mattermost-api/66f9736de4dbcd695248fe77534c8b7d5c780c6a/src/Network/Mattermost.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE OverloadedStrings # * Types n.b. the deprecation notice is in that haddock header because we're still waiting for ... ** Log-related types * Typeclasses * HTTP API Functions MM utility functions | Parse a path, failing if we cannot. | Parse the JSON body out of ...
# LANGUAGE TupleSections # module Network.Mattermost * * Mattermost - Related Types ( deprecated : use Network . Mattermost . Types instead ) ConnectionPoolConfig(..) , Login(..) , Hostname , Port , ConnectionData , Session , Id(..) , User(..) , UserId(..) , InitialLoad(..) , Team(..) , TeamMember(..) , Typ...
890896c39bf9509e827513fd9fc79f13dbccc98e8348530b24c704a50577ef76
S8A/htdp-exercises
ex003.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex3) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" ...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex003.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex3) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f...
c64201d72dc06c8c9cc316b2653e4d5e587be30433e41cd798bdd51b1d49352d
yesodweb/yesod
runtests.hs
# LANGUAGE OverloadedStrings , NoMonomorphismRestriction # import Network.Wai.Application.Static import Test.Hspec.Monadic import Test.Hspec.QuickCheck import Test.Hspec.HUnit () import Test.HUnit ((@?=), assert) import Distribution.Simple.Utils (isInfixOf) import qualified Data.ByteString.Char8 as S8 import qualified...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-static/test/unicode/tests/runtests.hs
haskell
import Data.Time.Format (formatTime) debug :: String -> m0 ()
# LANGUAGE OverloadedStrings , NoMonomorphismRestriction # import Network.Wai.Application.Static import Test.Hspec.Monadic import Test.Hspec.QuickCheck import Test.Hspec.HUnit () import Test.HUnit ((@?=), assert) import Distribution.Simple.Utils (isInfixOf) import qualified Data.ByteString.Char8 as S8 import qualified...
2fd5a9eaf48353ce646793850f5200e0c526d27b8e98e063378edb6303365f8a
clj-commons/seesaw
font.clj
Copyright ( c ) , 2011 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ; By using this software in any fashion, you are agreeing to be ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/test/seesaw/test/font.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) , 2011 . All rights reserved . (ns seesaw.test.font (:use seesaw.font) (:use [lazytest.describe :only (describe it testing)] [lazytest.expect :only (expect)]) (:import [java.awt Font])) (describe font (it "can create a font from a font-spec" (let [f (font "ARIAL-BOLD-18")] ...
f3a898182f309a705ae3ff2e8baead7529378df3cf44a53eba9a28cabff3494d
inclojure-org/intermediate-clojure-workshop
mocking_fns.clj
(ns workshop-app.mocking-fns (:require [clojure.test :refer :all] [workshop-app.handlers.users :as wahu] [workshop-app.db.sqlite :as wads] [workshop-app.db.in-mem :as wadim])) pattern 2 . do n't create the connection but instead redefine ;; it to an inmemory implementation. ;; t...
null
https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/7/test/workshop_app/mocking_fns.clj
clojure
it to an inmemory implementation. these are useful when you communicate to a database over a network
(ns workshop-app.mocking-fns (:require [clojure.test :refer :all] [workshop-app.handlers.users :as wahu] [workshop-app.db.sqlite :as wads] [workshop-app.db.in-mem :as wadim])) pattern 2 . do n't create the connection but instead redefine (use-fixtures :each (fn [t] ...
5b8f1ccc12f9933f71a46343a83dd4b26112c58a5efb3b2316e3dbde2b215d8e
wdebeaum/step
wind.lisp
;;;; ;;;; W::wind ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :tags (:base500) :words ( (W::wind (SENSES ((meta-data :origin trips :entry-date 20060803 :change-date nil :comments nil :wn ("wind%1:19:00")) (LF-PARENT ONT::air-current) (TEMPL MASS-PRED-TEMPL) ) ) ) )) (define-w...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wind.lisp
lisp
W::wind like move,bounce
(define-words :pos W::n :templ COUNT-PRED-TEMPL :tags (:base500) :words ( (W::wind (SENSES ((meta-data :origin trips :entry-date 20060803 :change-date nil :comments nil :wn ("wind%1:19:00")) (LF-PARENT ONT::air-current) (TEMPL MASS-PRED-TEMPL) ) ) ) )) (define-words :pos W::v :TEMPL A...
018d6248075408c54638e8415245f51808f5ed2862b169d80fe2cab49ade2538
xtdb/xtdb
user.clj
(ns user (:require [xtdb.api :as xt] [xtdb.azure.blobs :as azb])) (def init-data [{:xt/id :country/denmark :country/name "Denmark"} {:xt/id :region/hovedstaden :country :country/denmark} {:xt/id :municipality/copenhagen :region :region/hovedstaden} {:xt/id :org/some-org :org...
null
https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/modules/azure-blobs/dev/user.clj
clojure
(ns user (:require [xtdb.api :as xt] [xtdb.azure.blobs :as azb])) (def init-data [{:xt/id :country/denmark :country/name "Denmark"} {:xt/id :region/hovedstaden :country :country/denmark} {:xt/id :municipality/copenhagen :region :region/hovedstaden} {:xt/id :org/some-org :org...
c6e8537eedcb129f7343c2c045aca08b085209924e6bf51d7ea368d35fc21a9b
dreixel/syb
GShow2.hs
{-# LANGUAGE DeriveDataTypeable #-} module GShow2 (tests) where {- This test exercices GENERIC show for the infamous company datatypes. The output of the program should be some representation of the infamous "genCom" company. -} import Test.Tasty.HUnit import Data.Generics import CompanyDatatypes tests = gshow g...
null
https://raw.githubusercontent.com/dreixel/syb/4806afeb2ea824a3ea9969e23ca2c9569cd20d84/tests/GShow2.hs
haskell
# LANGUAGE DeriveDataTypeable # This test exercices GENERIC show for the infamous company datatypes. The output of the program should be some representation of the infamous "genCom" company.
module GShow2 (tests) where import Test.Tasty.HUnit import Data.Generics import CompanyDatatypes tests = gshow genCom @=? output Here is another exercise : The following function gshow ' is a completely generic variation on gshow . It would print strings as follows : * Main > gshow ' " abc " " ( (: ) ...
1d15d9657f4a574aeedc457adad447ca29f203f48ecc94146515adb713b52bc4
leanil/LambdaGen
LinAlg.hs
module LinAlg where import Expr import Type sclAdd :: Expr0 sclAdd = let x = var "x" double y = var "y" double in lam [x,y] (add x y) sclMul :: Expr0 sclMul = sclMulN 2 sclMulN :: Int -> Expr0 sclMulN 1 = lam [x] (x) where x = var "x" double sclMulN n = lam params $ foldl (\expr arg -> mul ex...
null
https://raw.githubusercontent.com/leanil/LambdaGen/aff49962759c1ce1fcfb2a1cc4a9a11d78e713a9/src/LinAlg.hs
haskell
module LinAlg where import Expr import Type sclAdd :: Expr0 sclAdd = let x = var "x" double y = var "y" double in lam [x,y] (add x y) sclMul :: Expr0 sclMul = sclMulN 2 sclMulN :: Int -> Expr0 sclMulN 1 = lam [x] (x) where x = var "x" double sclMulN n = lam params $ foldl (\expr arg -> mul ex...
050008afd956cdcaef57f9b65a5ce80ace67a3d73c80cd14d8bd31fac29c956b
DKurilo/hackerrank
solution.hs
- Used docs : - - /~toida/nerzic/390teched/regular/fa/nfa-2-dfa.html - /~jkhoury/markov.htm - Parser Monad from - - - So : - 1 . it - 2 . Construct NFA - 3 . Convert to DFA - 4 . Build transition matrix for DFA - 5 . Multiply matrices using modular arithmetic - Done - U...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/count-strings/solution.hs
haskell
≫= BSC.hPutStrLn fptr
- Used docs : - - /~toida/nerzic/390teched/regular/fa/nfa-2-dfa.html - /~jkhoury/markov.htm - Parser Monad from - - - So : - 1 . it - 2 . Construct NFA - 3 . Convert to DFA - 4 . Build transition matrix for DFA - 5 . Multiply matrices using modular arithmetic - Done - U...
43698bdb47971cfa5d8461c1180fdd1d31165430f0757ce41c13426e4e073fa8
mpickering/apply-refact
Structure4.hs
foo b | c <- f b = c where f = here
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Structure4.hs
haskell
foo b | c <- f b = c where f = here
c05a76e603b19ad82aa3591d698006394d3e9ea4c861247c59039ebc6708ef47
mhuebert/maria
katex.cljs
(ns maria.editor.extensions.katex (:require ["katex" :as katex] [yawn.hooks :as h] [yawn.view :as v])) ;; TODO - load this css ;; {:href "@0.16.2/dist/katex.min.css"} (v/defview show-katex [el x] [el {:ref (h/use-callback (fn [el] (when...
null
https://raw.githubusercontent.com/mhuebert/maria/9fc2e26ed7df16e82841e0127a56ae36fafa4e63/editor2/src/main/maria/editor/extensions/katex.cljs
clojure
TODO - load this css {:href "@0.16.2/dist/katex.min.css"}
(ns maria.editor.extensions.katex (:require ["katex" :as katex] [yawn.hooks :as h] [yawn.view :as v])) (v/defview show-katex [el x] [el {:ref (h/use-callback (fn [el] (when el (katex/render x el))))}])
3f1d660a719ec3978060b9263ba3b0ba74bbab29d7e8322ce947aabb05573730
josteink/lein-drip
platform.clj
(ns leindrip.platform) ; platform support (def platforms { ; just in case we ever need to support this in the future. :windows nil :unix { :name "Unix" :leindrip-folder ".leindrip" :drip-executable "drip" :lein-folder ".lein" }}) (defn get-platform [] (let [os-name (System/getProp...
null
https://raw.githubusercontent.com/josteink/lein-drip/023eeb6727081497c24b13aa1390cb4b7727c0fc/src/leindrip/platform.clj
clojure
platform support just in case we ever need to support this in the future. everything not windows is unix :)
(ns leindrip.platform) (def platforms { :windows nil :unix { :name "Unix" :leindrip-folder ".leindrip" :drip-executable "drip" :lein-folder ".lein" }}) (defn get-platform [] (let [os-name (System/getProperty "os.name") is-windows (not (= -1 (.indexOf os-name "Windows")))] ...
ff205b86efc00de3f41c3480f9ae7e2a0d2c93ec0c65c2a747f4bdea945eebc8
haskell-opengl/OpenGLRaw
OES.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.OES Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -- A convenience module, combining all raw modules containing...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/OES.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.OES License : BSD3 Stability : stable Portability : portable A convenience module, combining all raw modules containing OES extensions. ----------------------------------------------------------...
Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.OES ( module Graphics.GL.OES.ByteCoordinates, module Graphics.GL.OES.CompressedPalettedTexture, module Graphics.GL.OES.FixedPoint, module Graphics.GL.OES.QueryMatrix, module Graphics.GL.OES.ReadFormat, module Graphics.GL.OES.Singl...
d2b07f768a806a4b6b60db645c42ab66513f0ad8d2b4408439a5701185e2cf10
rmloveland/scheme48-0.53
check.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; The barest skeleton of a test suite. ; Mostly it makes sure that many of the external packages load without ; error. ; ,exec ,load debug/check.scm ; (done) (load-package 'testing) (config '(run (define-structure bar (export) (open scheme test...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/debug/check.scm
scheme
The barest skeleton of a test suite. Mostly it makes sure that many of the external packages load without error. ,exec ,load debug/check.scm (done) handy for preventing inlining All done.
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (load-package 'testing) (config '(run (define-structure bar (export) (open scheme testing)))) (in 'bar '(bench off)) (in 'bar '(run (define (foo) (cadr '(a b))))) (in 'bar '(run (define cadr list))) (in 'bar '(run (test "non-bench" equal? '((a...
50edf7144dcec88e318894df3d8ff98f4b935a7c452245ec9b24a85eec4671a7
kupl/FixML
sub1.ml
type metro = STATION of name | AREA of name * metro | CONNECT of metro * metro and name = string let rec checkMetro (m : metro) = match m with AREA(a, STATION b) -> if a=b then true else false |AREA (a,(AREA(b, c))) -> if a=b the...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness1/submissions/sub1.ml
ocaml
type metro = STATION of name | AREA of name * metro | CONNECT of metro * metro and name = string let rec checkMetro (m : metro) = match m with AREA(a, STATION b) -> if a=b then true else false |AREA (a,(AREA(b, c))) -> if a=b the...
58989cfb75a4a1f21c9d75b40c60dd121436715499b4d5d4aacf8e4c5314c838
jyh/metaprl
base_cache.ml
* Define a cache resource . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman / d...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/support/tactics/base_cache.ml
ocaml
*********************************************************************** * TYPES * *********************************************************************** *********************************************************************** * IMPLEMENTATION ...
* Define a cache resource . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman / d...
8ccd11c2238442b925580bbcf77443393966ee23e34eb04b8eb2a44c3433d55d
mfelleisen/Acquire
basics-intf.rkt
#lang racket ;; --------------------------------------------------------------------------------------------------- ;; interface specification for basic Acquire pieces and concepts: ;; -- hotels ;; -- cash ;; -- shares ;; -- plus functions that encode Acquire rules at this level (require "Lib/auxiliaries.rkt" "Lib/c...
null
https://raw.githubusercontent.com/mfelleisen/Acquire/5b39df6c757c7c1cafd7ff198641c99d30072b91/basics-intf.rkt
racket
--------------------------------------------------------------------------------------------------- interface specification for basic Acquire pieces and concepts: -- hotels -- cash -- shares -- plus functions that encode Acquire rules at this level a hotel that consists of at least SAFE# tiles is safe a hotel ...
#lang racket (require "Lib/auxiliaries.rkt" "Lib/contract.rkt") (interface basics& [MIN-PLAYER# natural-number/c] [MAX-PLAYER# natural-number/c] [hotel? (-> any/c boolean?)] [hotel<=? (-> hotel? hotel? boolean?)] [random-hotel (-> hotel?)] [AMERICAN hotel?] [CONTINENTAL hotel?] [FESTI...
27afdc61b359203c2155ee735bc0cfe718a7feed770fba78630d69cb1a85e8ed
cognesence/ops-search
bench.clj
(def ops '{pickup {:pre ((agent ?agent) (manipulable ?obj) (at ?agent ?place) (on ?obj ?place) (holds ?agent nil)) :add ((holds ?agent ?obj)) :del ((on ?obj ?place) (holds ?agent nil)) :txt (...
null
https://raw.githubusercontent.com/cognesence/ops-search/4b26daf15a862b8959feb572835c01d2edb7e307/examples/bench.clj
clojure
Move the book to the bench. user=> (ops-search state1 '((on book bench)) ops) {:state #{(holds R nil) (on spud table) (connects table bench) (manipulable book) (manipulable spud) (at R bench) (on book bench) (agent R)}, :path (#{(at R ...
(def ops '{pickup {:pre ((agent ?agent) (manipulable ?obj) (at ?agent ?place) (on ?obj ?place) (holds ?agent nil)) :add ((holds ?agent ?obj)) :del ((on ?obj ?place) (holds ?agent nil)) :txt (...
a5ad06de72ef43012499ddf6db0fd444791af3803251b1f5d27b5776fe036917
spawnfest/eep49ers
ssh_shell.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssh/src/ssh_shell.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 2009 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ssh_shell). -include("ssh.hrl"). -include("ssh_connect.hrl"). -behaviour(ssh_server_channel). -export([i...
7c54c55e2440a18007c2203d9df2b5cba2603bf4aae0fe823b62cbec3731399d
tuscland/lw-dns-sd
constants.lisp
-*- encoding : utf-8 ; mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*- DNS Service Discovery for LispWorks . Copyright ( c ) 2013 , . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the ...
null
https://raw.githubusercontent.com/tuscland/lw-dns-sd/2ae7e54b8bc3a89d267c2e91b083cd154bb1187d/src/constants.lisp
lisp
mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*- 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, IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp...
DNS Service Discovery for LispWorks . Copyright ( c ) 2013 , . All rights reserved . software distributed under the License is distributed on an " AS (in-package "COM.WILDORA.DNS-SD") (defparameter *default-timeout* 60) (defconstant +interface-index-any+ #x00000000) (defconstant +interface-index-l...
2378dc9db4398bb8d4fcecd1b5aa24c7c70bcb03c3f80016b79c03f3cc16621f
digital-asset/ghc
empty_sum.hs
# LANGUAGE UnboxedTuples , UnboxedSums , MagicHash # module Main where type Null = (# #) # NOINLINE showNull # showNull :: Null -> String showNull (# #) = "(# #)" # NOINLINE showNullAlt # showNullAlt :: (# Null | Null #) -> String showNullAlt (# n1 | #) = "(# " ++ showNull n1 ++ " | #)" showNullAlt (# | n2 #) = "(#...
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/unboxedsums/empty_sum.hs
haskell
# LANGUAGE UnboxedTuples , UnboxedSums , MagicHash # module Main where type Null = (# #) # NOINLINE showNull # showNull :: Null -> String showNull (# #) = "(# #)" # NOINLINE showNullAlt # showNullAlt :: (# Null | Null #) -> String showNullAlt (# n1 | #) = "(# " ++ showNull n1 ++ " | #)" showNullAlt (# | n2 #) = "(#...
d1b8f59065cb2230fd1723a50edc4530b95d06fadd94fc64366e937e76d06c50
noss/iserve
iserve_system_cb.erl
-module(iserve_system_cb). -export([start/1, iserve_request/2]). -include_lib("iserve/include/iserve.hrl"). -behaviour(iserve). start(Port) -> iserve:add_server(iserve_master, Port, ?MODULE, none). iserve_request(_C, Req) -> error_logger:info_report( lists:zip(record_info(fields, req), tl(tuple_to_lis...
null
https://raw.githubusercontent.com/noss/iserve/32281eb830c27d5db8c62730a9386c2d305c0247/examples/iserve_system/src/iserve_system_cb.erl
erlang
-module(iserve_system_cb). -export([start/1, iserve_request/2]). -include_lib("iserve/include/iserve.hrl"). -behaviour(iserve). start(Port) -> iserve:add_server(iserve_master, Port, ?MODULE, none). iserve_request(_C, Req) -> error_logger:info_report( lists:zip(record_info(fields, req), tl(tuple_to_lis...
9abf073f8a13a300bc6ac44f74235d52abc1139c7368930f0c62141b75e908c9
kapok-lang/kapok
kapok_code.erl
Code server for . -module(kapok_code). -behaviour(gen_server). -export([is_loaded/1, load_ns_for/3, get_module/1]). -export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("kapok.hrl"). Map namespace to Erlang module with rando...
null
https://raw.githubusercontent.com/kapok-lang/kapok/4272f990fe495e595d2afe38605dbca560bbe072/lib/kapok/src/kapok_code.erl
erlang
Public API gen_server API skip to load the specified namespace again helper functions. This module is load to evm but not recorded in `kapok_code`. export all macros, nomatter public or private ignore suspended def clauses Turns off warnings for unused local functions. It's possible that there are other functi...
Code server for . -module(kapok_code). -behaviour(gen_server). -export([is_loaded/1, load_ns_for/3, get_module/1]). -export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("kapok.hrl"). Map namespace to Erlang module with rando...
3ec2f3e2ec53376c01812774824030cec587a4d2099fcb70cbddb3ea77c0c685
ucsd-progsys/nate
list2.ml
(*************************************************************************) (* *) (* Objective Caml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/browser/list2.ml
ocaml
*********************************************************************** Objective Caml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ I d : list2.ml , v 1.9 2001/12/07 ...
d89d532fec1ccbfce8490baca9e7822fe194ac5bf458fa02b8891583ee2cb5d0
racket/htdp
graphing.rkt
#lang scheme (require htdp/error lang/posn lang/prim mzlib/unit htdp/draw-sig htdp/big-draw) (provide-signature-elements draw^) (provide graph-fun graph-line ) (module test racket/base) (define-higher-order-primitive graph-line graph-line/proc (f _)) (define-higher-...
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/htdp/graphing.rkt
racket
-------------------------------------------------------------------------- effect: set up pasteboard for drawing functions between [0,10] and [0,10] on x/y axis (num -> num) symbol -> true effect: draw function graph for x in [0,10] at delta = .1 (num -> num) symbol -> true effect: draw function graph for x ...
#lang scheme (require htdp/error lang/posn lang/prim mzlib/unit htdp/draw-sig htdp/big-draw) (provide-signature-elements draw^) (provide graph-fun graph-line ) (module test racket/base) (define-higher-order-primitive graph-line graph-line/proc (f _)) (define-higher-...
9b3f1d1fca1d484bec7cb6f7b2f969731bd29952a346dcb448fbc878f7e6a828
jordanthayer/ocaml-search
msa_instance.ml
$ I d : instance.ml , v 1.1 2006/06/30 19:43:09 ruml Exp $ instances instances *) type t = string array type sol = string array let gap = '-' let gap_cost = 2 let subst_cost = 1 let num_seqs i = Array.length i let seq_len i j = String.length i.(j) (******** making **********) let random_s...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/msa/msa_instance.ml
ocaml
******* making ********* * prob_subst, prob_del * returns an instance using strings from [seqs]. All fresh. check for gaps, pad short ones with gaps ************ checking ************** * checks that sol string [s] has chars from instance string [i] solution strings all same length all match corresponding inst...
$ I d : instance.ml , v 1.1 2006/06/30 19:43:09 ruml Exp $ instances instances *) type t = string array type sol = string array let gap = '-' let gap_cost = 2 let subst_cost = 1 let num_seqs i = Array.length i let seq_len i j = String.length i.(j) let random_seq len alphabet_size = let ...
8297da4adcbbda6ecfa6d3523d8b6436a99c2957d47891def19f9b7c9a23e1d9
kraison/vivace-graph-v2
rw.lisp
(defun do-write () (with-open-file (stream "/var/tmp/test" :direction :output :if-exists :overwrite :if-does-not-exist :create) (time (dotimes (i 1000) (dotimes (j 1000) (write `(+ ,i ,j) :stream stream) (format stream "~%")))))) (defun do-read () (with-open-file (stream "/var/tmp/test") ...
null
https://raw.githubusercontent.com/kraison/vivace-graph-v2/f5fcc60caa1e5b33ac3f618311e8876a94508818/rw.lisp
lisp
(defun do-write () (with-open-file (stream "/var/tmp/test" :direction :output :if-exists :overwrite :if-does-not-exist :create) (time (dotimes (i 1000) (dotimes (j 1000) (write `(+ ,i ,j) :stream stream) (format stream "~%")))))) (defun do-read () (with-open-file (stream "/var/tmp/test") ...
1ecbbee161e8ed0230d5b8a2ff191756c852afa492ebc68fcd828c658339b108
blindglobe/clocc
allegro.lisp
;;; -*- Mode: CLtL -*- ;;; allegro.lisp -- (in-package "MK4") (defmethod run-os-program ((program string) &key (arguments ()) (input nil) (output nil) (error-output nil) &allow-other-keys) (excl:run-shell-command (format nil "~A~@[~{ ~A~}~]" program arguments) :...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/defsystem-4/src/impl-dependent/allegro.lisp
lisp
-*- Mode: CLtL -*- allegro.lisp -- ******************************** ******************************** ******************************** ******************************** *** Hardcopy System *** "lpr" *** System Tag Table *** end of file -- allegro.lisp --
(in-package "MK4") (defmethod run-os-program ((program string) &key (arguments ()) (input nil) (output nil) (error-output nil) &allow-other-keys) (excl:run-shell-command (format nil "~A~@[~{ ~A~}~]" program arguments) :wait t :output output :input inpu...
29fa61765303a323f587351a3b3d19776d52d02f73818da5ce06fd7f854b9ebf
solbloch/stumpwm-configs
hue.lisp
(in-package :stumpwm) (load "/home/sol/Projects/hue/hue.asd") (ql:quickload :hue) (defvar *lights* (let ((m (make-sparse-keymap))) (define-key m (kbd "j") "decrement-bedroom-lights") (define-key m (kbd "k") "increment-bedroom-lights") (define-key m (kbd "K") "max-brightness-bedroom") (define-key m (...
null
https://raw.githubusercontent.com/solbloch/stumpwm-configs/2858fd910f7c07a7263cecca1557975789e811ee/hue.lisp
lisp
(in-package :stumpwm) (load "/home/sol/Projects/hue/hue.asd") (ql:quickload :hue) (defvar *lights* (let ((m (make-sparse-keymap))) (define-key m (kbd "j") "decrement-bedroom-lights") (define-key m (kbd "k") "increment-bedroom-lights") (define-key m (kbd "K") "max-brightness-bedroom") (define-key m (...
125ed9a7b614cf9eb7707511a3b466b3b47342480ddccebd1621992715b0e797
clojurians-org/haskell-example
hs-ssh-forwarder.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Conduit import Control.Concurrent import Control.Concurrent.Async (concurrently) import Control.Monad import Data.Conduit.Network import System.Environment import System.FilePath import Network.SSH.Client.LibSSH2.Foreign import Network.SSH.Client.LibSSH2.Co...
null
https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/sftp-conduit/dep/libssh2-hs/libssh2-conduit/hs-ssh-forwarder.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Conduit import Control.Concurrent import Control.Concurrent.Async (concurrently) import Control.Monad import Data.Conduit.Network import System.Environment import System.FilePath import Network.SSH.Client.LibSSH2.Foreign import Network.SSH.Client.LibSSH2.Conduit import Network.SSH.Client.Lib...
3247fbabc018d2d5ab18fb5b9e11873673b135eaff054373301d49c222b6dfeb
SamB/coq
classops.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/pretyping/classops.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** coercion_info : coe_typ -> coe_info...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ Id$ open Util open Pp ...