_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
4f0d75ba4ce6fcab4836e1bd21853254c686f576d9f9cc608628a944c74a880b
zotonic/cowmachine
controller.erl
-module(controller). -export([ execute/2, process/4, allowed_methods/1, content_types_provided/1 ]). %% Cowmachine API Middleware export , place this module in the request as controller . execute(Req, Env) -> {ok, Req, Env#{ cowmachine_controller => ?MODULE }}. % Controller export ...
null
https://raw.githubusercontent.com/zotonic/cowmachine/6252b8cab6daa80f60dd40a5c8b0f6217d34b20d/examples/echo_post/apps/main/src/controller.erl
erlang
Cowmachine API Controller export Method not allowed. internal functions
-module(controller). -export([ execute/2, process/4, allowed_methods/1, content_types_provided/1 ]). Middleware export , place this module in the request as controller . execute(Req, Env) -> {ok, Req, Env#{ cowmachine_controller => ?MODULE }}. process(<<"POST">>, _AcceptedCT, _Provid...
893fa20af37e9929d3f991cf11cb255f1d18e694baec433879f701d588db7417
esl/MongooseIM
mod_version.erl
-module(mod_version). -behaviour(gen_mod). -behaviour(mongoose_module_metrics). -include("jlib.hrl"). -include("mongoose_config_spec.hrl"). -export([start/2]). -export([stop/1]). -export([supported_features/0]). -export([config_spec/0]). -export([process_iq/5]). -ignore_xref([process_iq/5]). -xep([{xep, 92}, {vers...
null
https://raw.githubusercontent.com/esl/MongooseIM/a465408fcc98a171cbfbcad242dedbdb5abb022d/src/mod_version.erl
erlang
-module(mod_version). -behaviour(gen_mod). -behaviour(mongoose_module_metrics). -include("jlib.hrl"). -include("mongoose_config_spec.hrl"). -export([start/2]). -export([stop/1]). -export([supported_features/0]). -export([config_spec/0]). -export([process_iq/5]). -ignore_xref([process_iq/5]). -xep([{xep, 92}, {vers...
11cef8b9dab84eed3eb556faad4f2e650ca694e3ea056e8276561cb79d79c41b
jordillonch/eggs
eggs_trait_active_sup_root.erl
%% eggs (Erlang Generic Game Server) %% Copyright ( C ) 2012 - 2013 < llonch.jordi at gmail dot com > %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the %%...
null
https://raw.githubusercontent.com/jordillonch/eggs/e20ccd5093952ec967458bb2d50d5acf82e69063/apps/eggs_example_game/deps/eggs/src/eggs_trait_active_sup_root.erl
erlang
eggs (Erlang Generic Game Server) This program is free software: you can redistribute it and/or modify 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 ...
Copyright ( C ) 2012 - 2013 < llonch.jordi at gmail dot com > it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the You should have received a copy of the GNU Affero General Public License -module(eggs_trait_active_sup_root). -beh...
37765b2e9bd3702d3d69b37b049c96b09b50a05bb521f43c60ca32a1dc23bf53
ds-wizard/engine-backend
Common.hs
module Wizard.Specs.API.Questionnaire.Common where import Data.Either (isLeft, isRight) import qualified Data.UUID as U import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Shared.Api.Resource.Error.ErrorJM () import Shared.Localization.Messages.Public import Shared.Model.Error.Error import Wizar...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/39d1411252ac15908d3b5af4e06c41bbc6f1c74d/engine-wizard/test/Wizard/Specs/API/Questionnaire/Common.hs
haskell
-------------------------------- -------------------------------- -------------------------------- -------------------------------- -------------------------------- HELPERS --------------------------------
module Wizard.Specs.API.Questionnaire.Common where import Data.Either (isLeft, isRight) import qualified Data.UUID as U import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Shared.Api.Resource.Error.ErrorJM () import Shared.Localization.Messages.Public import Shared.Model.Error.Error import Wizar...
f5c20162c3bcca7ebb6916ee217fd8f61875e9aca32fceac556fcd65a5cffc6e
edgurgel/poxa-erlang
authentication_tests.erl
-module(authentication_tests). -include_lib("eunit/include/eunit.hrl"). authentication_test_() -> {foreach, fun start/0, fun stop/1, [{"check correct authentication", fun check_ok/0}, {"check valid auth_key", fun valid_auth_key/0}, {"check invalid auth_key", fun invalid_auth_key/0}, {"check valid ...
null
https://raw.githubusercontent.com/edgurgel/poxa-erlang/27eb8671b772a0cb0880782d9b69230690fd28f4/test/authentication_tests.erl
erlang
Could not mock crypto module
-module(authentication_tests). -include_lib("eunit/include/eunit.hrl"). authentication_test_() -> {foreach, fun start/0, fun stop/1, [{"check correct authentication", fun check_ok/0}, {"check valid auth_key", fun valid_auth_key/0}, {"check invalid auth_key", fun invalid_auth_key/0}, {"check valid ...
a86f29e0b4a2e62198639852396cb11d05be8f92cef2f2e6037a382891407c4e
xh4/web-toolkit
tokenize.lisp
(in-package :html-test) (in-suite :html-test) ;; (test tokenize/named-character-reference ;; (it ( let ( ( token ( first ( tokenize - string " & lt ; " ) ) ) ) ;; (is (eq #\< token)))) ;; (it ( signals error ( tokenize - string " I 'm & notit ; I tell you " ) ) ) ;; (it ;; (handler-bind ...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/html/tokenize.lisp
lisp
(test tokenize/named-character-reference (it (is (eq #\< token)))) (it (it (handler-bind ((html:parse-error (lambda (c) (continue)))) (is (equal "I'm ¬it; I tell you" (coerce chars 'string)))))) (it (it
(in-package :html-test) (in-suite :html-test) ( let ( ( token ( first ( tokenize - string " & lt ; " ) ) ) ) ( signals error ( tokenize - string " I 'm & notit ; I tell you " ) ) ) ( let ( ( chars ( tokenize - string " I 'm & notit ; I tell you " ) ) ) ( finishes ( tokenize - string " I '...
d2d41c26ed77da9e9b6942af86100596e281461435a30fa720cfffb370257e2d
pfdietz/ansi-test
nil.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Oct 17 06:32:46 2002 ;;;; Contains: Tests for NIL (deftest nil.1 (check-predicate #'(lambda (x) (not (subtypep (type-of x) nil)))) nil) (deftest nil.2 (check-predicate #'(lambda (x) (subtypep nil (type-of x)))) nil) (deftest nil.3 (not-mv (consta...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/data-and-control-flow/nil.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for NIL
Author : Created : Thu Oct 17 06:32:46 2002 (deftest nil.1 (check-predicate #'(lambda (x) (not (subtypep (type-of x) nil)))) nil) (deftest nil.2 (check-predicate #'(lambda (x) (subtypep nil (type-of x)))) nil) (deftest nil.3 (not-mv (constantp nil)) nil) (deftest nil.4 (car nil) nil) ...
7d57867baa7dd52face81cfc6330697de52b7b615ca58a861cd3e0e157aea88e
input-output-hk/plutus
Type.hs
-- editorconfig-checker-disable-file # LANGUAGE FlexibleInstances # {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TemplateHaskell #-} # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module PlutusIR.Core.Type ( TyName (..), Name (..), ...
null
https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-core/plutus-ir/src/PlutusIR/Core/Type.hs
haskell
editorconfig-checker-disable-file # LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # Bindings | Each multi-let-group has to be marked with its scoping: * 'Rec': an identifiers introduced by this multi-let group can use all other multi-lets of the same group (including itself), thus permitting (...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module PlutusIR.Core.Type ( TyName (..), Name (..), VarDecl (..), TyVarDecl (..), varDeclNameString, tyVarDeclNameString, Kind (..), Type (..), ...
8b140df40be5472ba2f3a260fbb63eba3cb07f7f17038ed3022b237805cd21ed
pheaver/netlist-verilog
Util.hs
-------------------------------------------------------------------------------- -- | -- Module : Language.Netlist.Util Copyright : ( c ) Signali Corp. 2010 -- License : All rights reserved -- Maintainer : -- Stability : experimental -- Portability : non-portable -- Utility functions fo...
null
https://raw.githubusercontent.com/pheaver/netlist-verilog/9bc9e7864f64fadf74dffd628243cc2543abcd8d/netlist/Language/Netlist/Util.hs
haskell
------------------------------------------------------------------------------ | Module : Language.Netlist.Util License : All rights reserved Stability : experimental Portability : non-portable ------------------------------------------------------------------------------ ----------------------...
Copyright : ( c ) Signali Corp. 2010 Maintainer : Utility functions for constructing Netlist AST elements . module Language.Netlist.Util where import Language.Netlist.AST data Direction = Up | Down unsizedInteger :: Integer -> Expr unsizedInteger = unsizedIntegral unsizedIntegral :: Integral a => ...
60429bef2b4a40814e0a4857141c3bcb1f16603321d70d0d4eb72dd02a747c07
qingliangcn/mgee
mgee_unittest_router.erl
%%%---------------------------------------------------------------------- 2010 mgee ( Ming Game Engine Erlang ) %%% @author odinxu @date 2010 - 1 - 11 %%% @doc Unit Test for router %%% @end %%%---------------------------------------------------------------------- -module(mgee_unittest_router). -...
null
https://raw.githubusercontent.com/qingliangcn/mgee/b65babc3a34ef678ae2b25ce1a8fdd06b2707bb8/unittest/mgee_unittest_router.erl
erlang
---------------------------------------------------------------------- @doc Unit Test for router @end ----------------------------------------------------------------------
2010 mgee ( Ming Game Engine Erlang ) @author odinxu @date 2010 - 1 - 11 -module(mgee_unittest_router). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). test() -> ok. router_1_test() -> ok . router_2_test() -> ok .
e4ba419e2bbeba12f75071c4665dca922c0121c7202cdb0254be48a577561545
Opetushallitus/aipal
kayttaja.clj
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus ;; This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions of the EUPL ( the " Licence " ) ; ;; ;; You may not use this work except...
null
https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/rest_api/kayttaja.clj
clojure
You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at: / This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions European Union Public Licence for more details . (ns aipal.rest-api.kaytta...
66e4db9d5bd91852e9a3c220b6277544fa7a2a905223babe949af5cc1530eac6
copton/ocram
Test.hs
module Ocram.Analysis.Test (tests) where import qualified Ocram.Analysis.Filter.Test as A import qualified Ocram.Analysis.Fgl.Test as B import qualified Ocram.Analysis.CallGraph.Test as C import Test.Framework (testGroup, Test) { { { 1 tests = testGroup "Analysis" [A.tests, B.tests, C.tests]
null
https://raw.githubusercontent.com/copton/ocram/c7166eab0187868a52a61017c6d3687e5a1a6162/ocram/src/Ocram/Analysis/Test.hs
haskell
module Ocram.Analysis.Test (tests) where import qualified Ocram.Analysis.Filter.Test as A import qualified Ocram.Analysis.Fgl.Test as B import qualified Ocram.Analysis.CallGraph.Test as C import Test.Framework (testGroup, Test) { { { 1 tests = testGroup "Analysis" [A.tests, B.tests, C.tests]
1b73b39c1cc396dddf19cf7bf6f1821f944260cf5b2fd6f2a7a8afe98788435f
input-output-hk/cardano-sl
Translate.hs
# LANGUAGE GeneralizedNewtypeDeriving # module UTxO.Translate ( * context for the translation from the DSL to Cardano TranslateT(..) , Translate , runTranslateT , runTranslateTNoErrors , runTranslate , runTranslateNoErrors , withConfig , mapTranslateErrors , catchTranslateErrors , catchSomeTran...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/utxo/src/UTxO/Translate.hs
haskell
* Convenience wrappers * Interface to the verifier * Convenience re-exports ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} -------...
# LANGUAGE GeneralizedNewtypeDeriving # module UTxO.Translate ( * context for the translation from the DSL to Cardano TranslateT(..) , Translate , runTranslateT , runTranslateTNoErrors , runTranslate , runTranslateNoErrors , withConfig , mapTranslateErrors , catchTranslateErrors , catchSomeTran...
7c4466cb9c09acdb8f8b36ae9a76a7876b7bb2d44d8b58e791614e4f3d732b69
schemeorg-community/index.scheme.org
srfi.4.s8.scm
(((name . "s8vector?") (signature lambda (obj) boolean?) (tags pure predicate)) ((name . "make-s8vector") (signature case-lambda (((integer? size)) s8vector?) (((integer? size) (integer? fill)) s8vector?)) (tags pure)) ((name . "s8vector-length") (signature lambda ((s8vector? vec)) integer?) (tags pu...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.4.s8.scm
scheme
(((name . "s8vector?") (signature lambda (obj) boolean?) (tags pure predicate)) ((name . "make-s8vector") (signature case-lambda (((integer? size)) s8vector?) (((integer? size) (integer? fill)) s8vector?)) (tags pure)) ((name . "s8vector-length") (signature lambda ((s8vector? vec)) integer?) (tags pu...
21fb835fbf1a415cafc200ca9ba4cabe1c5a7e38a7546b9667232c7f5f552361
pa-ba/compdata
Desugar.hs
module Functions.Standard.Desugar where import DataTypes.Standard -- de-sugar desug :: PExpr -> OExpr desug (PInt i) = OInt i desug (PBool b) = OBool b desug (PPair x y) = OPair (desug x) (desug y) desug (PPlus x y) = OPlus (desug x) (desug y) desug (PMult x y) = OMult (desug x) (desug y) desug (PIf b x y) = OIf (de...
null
https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/benchmark/Functions/Standard/Desugar.hs
haskell
de-sugar
module Functions.Standard.Desugar where import DataTypes.Standard desug :: PExpr -> OExpr desug (PInt i) = OInt i desug (PBool b) = OBool b desug (PPair x y) = OPair (desug x) (desug y) desug (PPlus x y) = OPlus (desug x) (desug y) desug (PMult x y) = OMult (desug x) (desug y) desug (PIf b x y) = OIf (desug b) (desu...
65baf243e9d72824443c6fa91a14bae76a8bb8e55e3b21008f7a1d8f048437a7
wireless-net/erlang-nommu
wxLayoutAlgorithm.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/wx/src/gen/wxLayoutAlgorithm.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(wxLayoutAlgorithm). -include("wxe...
6621e1afce76a969082b12403eb46c14252cbf398687612a491de5c069358e4c
jamesgolick/lexical_uuid.erl
fnv1a.erl
-module(fnv1a). -author("Cliff Moon"). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -export([hash/1]). -define(OFFSET_BASIS, 14695981039346656037). -define(FNV_PRIME, 1099511628211). hash(Term) when is_binary(Term) -> fnv_int(?OFFSET_BASIS, 0, Term); hash(Term) -> fnv_int(?OFFSET_BASIS, 0, t...
null
https://raw.githubusercontent.com/jamesgolick/lexical_uuid.erl/081a92fc0cc041c86cf7118943696cec8eb37754/src/fnv1a.erl
erlang
-module(fnv1a). -author("Cliff Moon"). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -export([hash/1]). -define(OFFSET_BASIS, 14695981039346656037). -define(FNV_PRIME, 1099511628211). hash(Term) when is_binary(Term) -> fnv_int(?OFFSET_BASIS, 0, Term); hash(Term) -> fnv_int(?OFFSET_BASIS, 0, t...
4841a77c20bdfed7cf3d2394136243f54007f098fa86da2626fc9306b2cdb110
ejgallego/coq-serapi
ser_sorts.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/4c18c49187603fd05554f22760fd3ef644dcd806/serlib/ser_sorts.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2016 MINES ParisT...
36773e8c296e612c74542992fe40faad99fbcd0953cbb5101208598c623c6e1a
ygmpkk/house
PortNumber.hs
| Port numbers ( used by UDP and TCP ) and some standard port numbers module Net.PortNumber where import Kernel.Bits(Word16) import Net.PacketParsing GHC allows deriving the instance ... instance Enum Port where toEnum = Port . toEnum fromEnum (Port p) = fromEnum p instance Parse Port where parse = Port ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Net/PortNumber.hs
haskell
- Standard ports:
| Port numbers ( used by UDP and TCP ) and some standard port numbers module Net.PortNumber where import Kernel.Bits(Word16) import Net.PacketParsing GHC allows deriving the instance ... instance Enum Port where toEnum = Port . toEnum fromEnum (Port p) = fromEnum p instance Parse Port where parse = Port ...
d8d27cf5c863bad79d110dda2349819ac633657628e06e12fc274bb9e74e8efa
webyrd/mediKanren
repr.rkt
#lang racket (provide integer->repr repr->integer decimal->repr repr->decimal string->repr repr->string data->repr repr->data write-repr detail-find detail-next detail-write ) (define (integer->repr i) i) (define (repr->integer i) i) (define (decimal->repr d) d) (define (repr->decimal d) d) ...
null
https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/attic/pharos/repr.rkt
racket
(define (enc->integer bs) (integer-bytes->integer bs #t #f 0 4)) (define (enc->decimal bs) (floating-point-bytes->real bs #f 0 4)) (define (enc->string bs) (define len (integer-bytes->integer bs #f #f 0 2)) (define (data->enc d) (bytes-append* d)) (define (enc->data bs) bs) (define (write-repr repr out) (write-bytes re...
#lang racket (provide integer->repr repr->integer decimal->repr repr->decimal string->repr repr->string data->repr repr->data write-repr detail-find detail-next detail-write ) (define (integer->repr i) i) (define (repr->integer i) i) (define (decimal->repr d) d) (define (repr->decimal d) d) ...
388267782f88681bc7b27f44428d9a860ca7a54ad40c4f1240ff62e5d6b1c644
afiniate/aws_async
ddb_createtable.ml
open Core.Std open Async.Std let exec sys table = let request_spec = Ddb_system.api_version ^ ".CreateTable" in let json = Ddb_createtable_j.string_of_table table in let open Deferred.Result in Ddb_request.post sys.Ddb_system.auth [("x-amz-target", request_spec); ("Content-Type", "application/...
null
https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/dynamodb/ddb_createtable.ml
ocaml
open Core.Std open Async.Std let exec sys table = let request_spec = Ddb_system.api_version ^ ".CreateTable" in let json = Ddb_createtable_j.string_of_table table in let open Deferred.Result in Ddb_request.post sys.Ddb_system.auth [("x-amz-target", request_spec); ("Content-Type", "application/...
a740392ec26f562e0e573a1bc673117e4a71b94d2cebedcacdbdc24e9ec5f347
softwarelanguageslab/maf
R5RS_gambit_lattice-5.scm
; Changes: * removed : 1 * added : 1 * swaps : 0 * negated predicates : 2 ; * swapped branches: 0 * calls to i d fun : 2 (letrec ((apply-append (lambda (args) (if (null? args) () (if (null? (cdr args)) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_lattice-5.scm
scheme
Changes: * swapped branches: 0
* removed : 1 * added : 1 * swaps : 0 * negated predicates : 2 * calls to i d fun : 2 (letrec ((apply-append (lambda (args) (if (null? args) () (if (null? (cdr args)) (car args) ...
3ff88355894cef8ea2d5ad0c06ff3066522a97225852db5efecf5ef525be602d
kazu-yamamoto/logger
FastLoggerSpec.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module FastLoggerSpec (spec) where #if __GLASGOW_HASKELL__ < 709 import Control.Applicative ((<$>)) #endif import Control.Exception (finally) import Control.Concurrent (getNumCapabilities) import Control.Concurrent.Async (forConcurrently_) import Control.Monad (when...
null
https://raw.githubusercontent.com/kazu-yamamoto/logger/93914dd1e487bf90b35a03e40ec24ab3b3e0f260/fast-logger/test/FastLoggerSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE CPP # module FastLoggerSpec (spec) where #if __GLASGOW_HASKELL__ < 709 import Control.Applicative ((<$>)) #endif import Control.Exception (finally) import Control.Concurrent (getNumCapabilities) import Control.Concurrent.Async (forConcurrently_) import Control.Monad (when, forM_) import qualified Data.Byte...
0a9308aabf3762d0c39c7f2575bb13836279bb86aff8a76f756afab825a4e3cf
maybevoid/casimir
Higher.hs
module Casimir.Higher ( module Casimir.Higher.Base , module Casimir.Higher.CoOp , module Casimir.Higher.ContraLift , module Casimir.Higher.EffFunctor , module Casimir.Higher.NoOp , module Casimir.Higher.Union , module Casimir.Higher.Computation ) where import Casimir.Higher.Base import Casimir.Higher....
null
https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Higher.hs
haskell
module Casimir.Higher ( module Casimir.Higher.Base , module Casimir.Higher.CoOp , module Casimir.Higher.ContraLift , module Casimir.Higher.EffFunctor , module Casimir.Higher.NoOp , module Casimir.Higher.Union , module Casimir.Higher.Computation ) where import Casimir.Higher.Base import Casimir.Higher....
c3be0da55423e58ba12559a71b106fdb866fb5f09876398ae7eb210968fc54e5
mtgred/netrunner
say_test.clj
(ns game.core.say-test (:require [game.core :as core] [game.core.card :refer :all] [game.core.mark :refer :all] [game.core-test :refer :all] [game.utils-test :refer :all] [game.macros-test :refer :all] [clojure.test :refer :all])) (deftest chat-...
null
https://raw.githubusercontent.com/mtgred/netrunner/48584bdc0f92e39509b3f5c51e14be2f2a241320/test/clj/game/core/say_test.clj
clojure
(ns game.core.say-test (:require [game.core :as core] [game.core.card :refer :all] [game.core.mark :refer :all] [game.core-test :refer :all] [game.utils-test :refer :all] [game.macros-test :refer :all] [clojure.test :refer :all])) (deftest chat-...
da58a45e5d4b86261cc0fd99c2792d02d1022b4f6c4e5ac18d14af8fdd1d1b0f
logseq/logseq
date.cljs
(ns frontend.date "Date related utility fns" (:require ["chrono-node" :as chrono] [cljs-bean.core :as bean] [cljs-time.coerce :as tc] [cljs-time.core :as t] [cljs-time.format :as tf] [cljs-time.local :as tl] [frontend.state :as state] ...
null
https://raw.githubusercontent.com/logseq/logseq/917a8aa098810c42e05877752d7e02981b917fe4/src/main/frontend/date.cljs
clojure
"dd.MM.yyyy"
(ns frontend.date "Date related utility fns" (:require ["chrono-node" :as chrono] [cljs-bean.core :as bean] [cljs-time.coerce :as tc] [cljs-time.core :as t] [cljs-time.format :as tf] [cljs-time.local :as tl] [frontend.state :as state] ...
8a93f2a2d2222fd88b8a721f318d001f5a3604c2e6d203f628c79aae79d2ab3e
heroku/logplex
live_upgrade.erl
f(UpgradeNode). UpgradeNode = fun () -> case logplex_app:config(git_branch) of "v60" -> io:format(whereis(user), "at=upgrade_start cur_vsn=60~n", []); "v61" -> io:format(whereis(user), "at=upgrade type=retry cur_vsn=60 old_vsn=61~n", []); Else -> io:...
null
https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/upgrades/v60_v61/live_upgrade.erl
erlang
The only thing to update here is the nsync version used to remove possible locked scenarios after bad authentication
f(UpgradeNode). UpgradeNode = fun () -> case logplex_app:config(git_branch) of "v60" -> io:format(whereis(user), "at=upgrade_start cur_vsn=60~n", []); "v61" -> io:format(whereis(user), "at=upgrade type=retry cur_vsn=60 old_vsn=61~n", []); Else -> io:...
c4feda40b7485c347fbb8225b920b960d8bb1108e995d8f68f6e84098768a5c2
static-analysis-engineering/codehawk
jCHFile.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHFile.ml
ocaml
extlib chutil jchlib [Filename.current_dir_name] cp_with_jars @ Search for class c in a given directory or jar file
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
d2fd735ed85a653ee040b4f0891b839ed9cac65cae786dc108a8f27a38486b7e
MinaProtocol/mina
amount_of.ml
open Core_kernel open Rosetta_models module Token_id = struct let default : string = Mina_base.Token_id.(to_string default) let is_default token_id = String.equal default token_id let encode (token_id : string) = `Assoc [ ("token_id", `String token_id) ] module T (M : Monad_fail.S) = struct let decode m...
null
https://raw.githubusercontent.com/MinaProtocol/mina/b3149c7cf29b18262e5493d1734829b8eb035349/src/lib/rosetta_lib/amount_of.ml
ocaml
open Core_kernel open Rosetta_models module Token_id = struct let default : string = Mina_base.Token_id.(to_string default) let is_default token_id = String.equal default token_id let encode (token_id : string) = `Assoc [ ("token_id", `String token_id) ] module T (M : Monad_fail.S) = struct let decode m...
030e9f81d4a5635c9cb5a1d865b008d64f623a6a4a1554ffeb492211938cae66
alanz/ghc-exactprint
TypeInstance.hs
# LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE DefaultSignatures # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE Trustworthy # class TrieKey k where type instance TrieRep k = TrieRepDefault k
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/TypeInstance.hs
haskell
# LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE DefaultSignatures # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE Trustworthy # class TrieKey k where type instance TrieRep k = TrieRepDefault k
4fd64a70a2ee5b61ae7d0c158de258e79d1269981e7089edf8222678b8bb994a
korya/efuns
wX_root.mli
(***********************************************************************) (* *) (* ____ *) (* *) Fabrice Le Fessa...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_root.mli
ocaml
********************************************************************* ____ ...
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . class t : < display : Xtypes.display; eloop : Eloop.display; .. > -> int -> object val mut...
ef924b8a98b1923b5e8d168a38c7d190d5d1e1e17856bc3a5ccd11dd70bd2e4e
tristanstraub/clj-python-trampoline
interpreter.clj
(ns clj-python-trampoline.interpreter) (require '[libpython-clj.python.interpreter]) (defn initialize! [& args] (apply libpython-clj.python.interpreter/initialize! args)) (in-ns 'libpython-clj.python.interpreter) ;; Directly out of libpython-clj. Obviously, changes like this belong in libpython-clj, ;; but this...
null
https://raw.githubusercontent.com/tristanstraub/clj-python-trampoline/95616586e949649e0d540b9f71dd463923dcf513/src/clj_python_trampoline/interpreter.clj
clojure
Directly out of libpython-clj. Obviously, changes like this belong in libpython-clj, but this idea is still being developed.
(ns clj-python-trampoline.interpreter) (require '[libpython-clj.python.interpreter]) (defn initialize! [& args] (apply libpython-clj.python.interpreter/initialize! args)) (in-ns 'libpython-clj.python.interpreter) (defn initialize! [& {:keys [program-name library-path] :as options}] (when-...
f0e542bce0cf2341642c011c2ee066181cb17f12f689b48cc4c13b9f8eaff275
dundalek/closh
pipeline.cljc
(ns closh.zero.pipeline (:require [clojure.string] [closh.zero.platform.process :as process :refer [process?]] [closh.zero.platform.io :refer [out-stream in-stream err-stream stream-output pipe-stream line-seq stream-write output-stream input-stream output-stream? input-stream? *stdout* *stder...
null
https://raw.githubusercontent.com/dundalek/closh/b1a7fd310b6511048fbacb8e496f574c8ccfa291/src/common/closh/zero/pipeline.cljc
clojure
(ns closh.zero.pipeline (:require [clojure.string] [closh.zero.platform.process :as process :refer [process?]] [closh.zero.platform.io :refer [out-stream in-stream err-stream stream-output pipe-stream line-seq stream-write output-stream input-stream output-stream? input-stream? *stdout* *stder...
99d8ca977497259c02b537b89e79e5db8c96723f80f7d6d3357be3ba687be4ea
krukow/calabash-script
core.cljs
(ns calabash-script.core (:use [calabash-script.query :only [-query dir-seq valid?]] [calabash-script.tests :only [define-uia-test run-all! fail fail-if-not]]) (:require [calabash-script.log :as log] [calabash-script.uia :as uia] [calabash-script.convert :as c] [calabash...
null
https://raw.githubusercontent.com/krukow/calabash-script/7e54beab5aa83087c7b52a55eca3d1828d2d0f36/src/cljs/calabash_script/core.cljs
clojure
Waiting ;;;;;;;;; Query ;;;;;;;; Helpers ;;;; Gestures ;;;; portrait rotated clockwise ... ((:portrait :landscape-right) ;; clockwise of :portrait is :landscape-right (:landscape-right :portrait-upside-down) ;; .. (:portrait-upside-down :landscape-left)) Alerts ;;; default is do nothing Keyboard ;;; Helpers (...
(ns calabash-script.core (:use [calabash-script.query :only [-query dir-seq valid?]] [calabash-script.tests :only [define-uia-test run-all! fail fail-if-not]]) (:require [calabash-script.log :as log] [calabash-script.uia :as uia] [calabash-script.convert :as c] [calabash...
a4c52d5da128fc26cbbee1076f922f8829329f752dc6a816a287811e26659b88
default-kramer/plisqin
operators.rkt
#lang racket/base (require (submod "../private2/sql.rkt" unsafe operators)) (provide (all-from-out (submod "../private2/sql.rkt" unsafe operators)))
null
https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-lib/unsafe/operators.rkt
racket
#lang racket/base (require (submod "../private2/sql.rkt" unsafe operators)) (provide (all-from-out (submod "../private2/sql.rkt" unsafe operators)))
30e0e320e4ba8d49d3059172e894f8159ceb56f372ff378fb56e8143f5dcfd5b
robstewart57/rdf4h
Manifest.hs
{-# LANGUAGE OverloadedStrings #-} module W3C.Manifest ( loadManifest, Manifest(..), TestEntry(..) ) where import Data.Semigroup ((<>)) import Data.RDF.Graph.TList import Data.RDF.Query import Data.RDF.Types import Data.RDF.Namespace (mkUri, rdfs) import qualified Data.RDF.Namespace as NS import Safe import Te...
null
https://raw.githubusercontent.com/robstewart57/rdf4h/22538a916ec35ad1c46f9946ca66efed24d95c75/testsuite/tests/W3C/Manifest.hs
haskell
# LANGUAGE OverloadedStrings # | Manifest data as represented in W3C test files. TODO: Fields `name` and `action` are mandatory for all tests, `result` is mandatory for positive *Eval tests, the rest are optional, so we should use "Maybe" for them. TODO: Perhaps these should be pulled from the manifest graph rdft...
module W3C.Manifest ( loadManifest, Manifest(..), TestEntry(..) ) where import Data.Semigroup ((<>)) import Data.RDF.Graph.TList import Data.RDF.Query import Data.RDF.Types import Data.RDF.Namespace (mkUri, rdfs) import qualified Data.RDF.Namespace as NS import Safe import Text.RDF.RDF4H.TurtleParser import q...
e4bab14e528eb28c0867fff4b5c39a1a2e24a822661af78731bb66991ce81d79
janestreet/universe
client_info.ml
open Core module Version = struct type t = Types.Client_info.version = { major : int option ; minor : int option ; patch : int option ; prerelease : string option ; commit : string option } end module Client_type = struct type t = [ `Remote | `Ui | `Embedder | `Host | `...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/src/client_info.ml
ocaml
open Core module Version = struct type t = Types.Client_info.version = { major : int option ; minor : int option ; patch : int option ; prerelease : string option ; commit : string option } end module Client_type = struct type t = [ `Remote | `Ui | `Embedder | `Host | `...
59dddd5242c40cc353a04478f8a013a37973106132a17d3333ed720fd2a6db31
synduce/Synduce
ECache.ml
open Base open Lang open Term open EProps open Common.ProblemDefs type t = { exprs : ExpressionSet.t Hash_set.t ; ectx : RContext.t } let is_empty (c : t) = Hash_set.is_empty c.exprs let dump (fmt : Formatter.t) (c : t) = Fmt.(list ExpressionSet.pp) fmt (Hash_set.to_list c.exprs) ;; let create ~(ctx : Term....
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/confsearch/ECache.ml
ocaml
* `check_subset e c` checks whether some key in the cache `c` is a subset of `e`.
open Base open Lang open Term open EProps open Common.ProblemDefs type t = { exprs : ExpressionSet.t Hash_set.t ; ectx : RContext.t } let is_empty (c : t) = Hash_set.is_empty c.exprs let dump (fmt : Formatter.t) (c : t) = Fmt.(list ExpressionSet.pp) fmt (Hash_set.to_list c.exprs) ;; let create ~(ctx : Term....
15a9130ca4c7ab54ba65d9d87e2756974e930b45fb139a87d44786f27c18d945
r0man/geo-clj
postgis_test.clj
(ns geo.postgis-test (:import [org.postgis PGgeometry LineString LinearRing MultiLineString]) (:import [org.postgis MultiPoint MultiPolygon Point Polygon]) (:require [clojure.test :refer :all] [geo.core :refer [coordinates ewkt point-x point-y point-z point?]] [geo.postgis :refer :all])) ...
null
https://raw.githubusercontent.com/r0man/geo-clj/a0e8658aa4b7861a60d9d55c98034797e1e0a55b/test/geo/postgis_test.clj
clojure
(ns geo.postgis-test (:import [org.postgis PGgeometry LineString LinearRing MultiLineString]) (:import [org.postgis MultiPoint MultiPolygon Point Polygon]) (:require [clojure.test :refer :all] [geo.core :refer [coordinates ewkt point-x point-y point-z point?]] [geo.postgis :refer :all])) ...
f2b8345b60c63991f567b1b94d205c75d9d0cf56880e2c56756ba06f012aeced
lispgames/sdl2kit
keyboard.lisp
(in-package :kit.sdl2) (defclass keystate-tracker () ((keystate :initform (make-array 300 :element-type 'bit)))) (defun keystate-update (tracker state repeat-p keysym) (with-slots (keystate) tracker (when (and state (not repeat-p)) (case state (:keydown (setf (aref keystate (sdl2:scancode-value ...
null
https://raw.githubusercontent.com/lispgames/sdl2kit/aae663224a10ece2b0c374aa5942a3f0bc1b3c2f/src/keyboard.lisp
lisp
(in-package :kit.sdl2) (defclass keystate-tracker () ((keystate :initform (make-array 300 :element-type 'bit)))) (defun keystate-update (tracker state repeat-p keysym) (with-slots (keystate) tracker (when (and state (not repeat-p)) (case state (:keydown (setf (aref keystate (sdl2:scancode-value ...
8239075504e6f8d03c3d279d086dcf148340e07b4dc0e177c9c9e6aa4474061c
klakplok/goji
goji_jslink.ml
(****************************************************************************) GOJI ( JavaScript Interface Generator for OCaml ) This file is published under the CeCILL licence ( C ) 2013 (*********************...
null
https://raw.githubusercontent.com/klakplok/goji/78da18fafdd32910fc85f334210c9cd3aae2f974/goji_jslink.ml
ocaml
************************************************************************** ************************************************************************** * Implementation of the [jslink] command. * Main entry point of the [jslink] command
GOJI ( JavaScript Interface Generator for OCaml ) This file is published under the CeCILL licence ( C ) 2013 let () = Findlib.init () let append_contents fp_js fn = let fp = open_in fn in try while t...
aada74a8cd602c92d4a8a95429912bdaf81d7c92338e4d05c540074eeb7cf7b1
anwarmamat/cmsc330spring19-public
funs.ml
let rec map f xs = match xs with | [] -> [] | x :: xt -> (f x)::(map f xt) let rec fold f a xs = match xs with | [] -> a | x :: xt -> fold f (f a x) xt let rec fold_right f xs a = match xs with | [] -> a | x :: xt -> f x (fold_right f xt a) let rev xs = fold (fun a x -> x :: a) [] xs let append x y = fold_right (...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/project2b/src/funs.ml
ocaml
let rec map f xs = match xs with | [] -> [] | x :: xt -> (f x)::(map f xt) let rec fold f a xs = match xs with | [] -> a | x :: xt -> fold f (f a x) xt let rec fold_right f xs a = match xs with | [] -> a | x :: xt -> f x (fold_right f xt a) let rev xs = fold (fun a x -> x :: a) [] xs let append x y = fold_right (...
60b7e30f2db03db83643252d2cf77d6258c9e3cbc01f3495d7ce2f3ff4a8a9d6
elizabethsiegle/reddit-slack-bot
Types.hs
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # module Twilio.Types ( APIVersion(..) , module X -- * Misc , makeTwilioRequest , makeTwilioReq...
null
https://raw.githubusercontent.com/elizabethsiegle/reddit-slack-bot/a52ab60dcaae8e16bee8cdba22fce627157a42d8/twilio-haskell-move-to-stack/src/Twilio/Types.hs
haskell
#LANGUAGE OverloadedStrings # #LANGUAGE Rank2Types # * Misc
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # module Twilio.Types ( APIVersion(..) , module X , makeTwilioRequest , makeTwilioRequest' , makeTwilioPOSTRequest , makeTwilioPOSTRequest' , makeTwilioDE...
015d2c0cef650deb7d91de55b087b92cb932c895c31e474f3e8c52a517001e24
robertluo/fun-map
helper.cljc
(ns robertluo.fun-map.helper "Helpers for writing wrappers" (:require #?(:clj [robertluo.fun-map.util :as util]))) #?(:clj (defn let-form "returns a pair first to let or equivalent, and the second to transformed bindings." [fm bindings] #_{:clj-kondo/ignore [:unresolved-symbol]} (util/opt...
null
https://raw.githubusercontent.com/robertluo/fun-map/1ec16f50b9fd7d788aa3092e3df560829825e30d/src/robertluo/fun_map/helper.cljc
clojure
Global options
(ns robertluo.fun-map.helper "Helpers for writing wrappers" (:require #?(:clj [robertluo.fun-map.util :as util]))) #?(:clj (defn let-form "returns a pair first to let or equivalent, and the second to transformed bindings." [fm bindings] #_{:clj-kondo/ignore [:unresolved-symbol]} (util/opt...
9a745f2c598a3665a1cbf838414a7944953537706fa0d6e80c7b47c41a735a4a
forked-from-1kasper/anders
dnf.ml
open Language.Prelude open Language.Spec open Term open Elab open Rbv let negAtom = fun (p, d) -> (p, negDir d) simplify removes all conjunctions that are superset of another , ∨ x = ( x ∧ y ) ∨ ( x ∧ 1 ) = x ∧ ( y ∨ 1 ) = x ∧ 1 = x. It does not remove conjunctions like ( x ∧ −x ) , because algebra of ...
null
https://raw.githubusercontent.com/forked-from-1kasper/anders/4846f5b93c8979ff10e64061973ed681e2b8fa8c/src/kernel/dnf.ml
ocaml
open Language.Prelude open Language.Spec open Term open Elab open Rbv let negAtom = fun (p, d) -> (p, negDir d) simplify removes all conjunctions that are superset of another , ∨ x = ( x ∧ y ) ∨ ( x ∧ 1 ) = x ∧ ( y ∨ 1 ) = x ∧ 1 = x. It does not remove conjunctions like ( x ∧ −x ) , because algebra of ...
36fd8b31abc28d8df7e511c8fe3487033f459c0801f03a024031c9e90e5c30fd
GaloisInc/daedalus
Monad.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DerivingStrategies # # LANGUAGE DeriveFunctor # module Daedalus.LSP.Monad where import Control.Concurrent.Async (Async) import ...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/4a7db71fd2cbe64d9c073c3cf175ffbc353a65cc/daedalus-language-server/src/Daedalus/LSP/Monad.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveAnyClass # FilePath here is the path to search Worker commands ms delay Worker phases We can't fail (missing modules don't get a ModuleState) ^ The parsed module, not scoped. We don't really need the error, but it is nice to have. shared between threads User-a...
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DerivingStrategies # # LANGUAGE DeriveFunctor # module Daedalus.LSP.Monad where import Control.Concurrent.Async (Async) import Control.Concurrent.STM.TChan import Control.Concur...
477d602f9fd3e4cd511d769e192cc5b94d9429b9fed10496f33f9e809680b042
erleans/vonnegut
topic_SUITE.erl
-module(topic_SUITE). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -include("test_utils.hrl"). -compile(export_all). all() -> [creation, write_empty, write, index_bug, limit, index_limit, many, verify_lazy_load, startup_index_correctness, local_client_test, last_i...
null
https://raw.githubusercontent.com/erleans/vonnegut/88693f192a4fc3da88e7b359e38e72cee25b3d24/test/topic_SUITE.erl
erlang
clear env from other suites clear env from other suites leaving this in as it occasionally hits a quasi race, so if we start hitting intermittent failures here, we might have a regression write then read spawned write could have finished after our sendfile data boundaries fetch from 0 to make sure that they're a...
-module(topic_SUITE). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -include("test_utils.hrl"). -compile(export_all). all() -> [creation, write_empty, write, index_bug, limit, index_limit, many, verify_lazy_load, startup_index_correctness, local_client_test, last_i...
a7b7dc8a7a59e5f1e6b81ab19bc19074902f3d911f123e81416decf2023d8395
ghcjs/jsaddle
Object.hs
module JavaScript.Object ( Object , create , getProp, unsafeGetProp , setProp, unsafeSetProp -- , allProps , listProps -- , isInstanceOf ) where ...
null
https://raw.githubusercontent.com/ghcjs/jsaddle/97273656e28790ab6e35c827f8086cf47bfbedca/jsaddle/src-ghc/JavaScript/Object.hs
haskell
, allProps , isInstanceOf
module JavaScript.Object ( Object , create , getProp, unsafeGetProp , setProp, unsafeSetProp , listProps ) where import JavaScript.Object.Internal
34219da5d5631ee1c8a09d482328eccecc93abcfcf8eaecd5a423f22fdf4ed55
smallmelon/sdzmmo
pt_13.erl
%%%----------------------------------- %%% @Module : pt_13 @Author : xyao %%% @Email : @Created : 2010.04.29 @Description : 13角色信息 %%%----------------------------------- -module(pt_13). -export([read/2, write/2]). %% %%客户端 -> 服务端 ---------------------------- %% %%查询自己的信息 read(13001, _) -> {ok, myself}...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/proto/pt_13.erl
erlang
----------------------------------- @Module : pt_13 @Email : ----------------------------------- 客户端 -> 服务端 ---------------------------- 查询自己的信息 查询玩家的信息 服务端 -> 客户端 ------------------------------------ 升级 通知客户端更新灵力
@Author : xyao @Created : 2010.04.29 @Description : 13角色信息 -module(pt_13). -export([read/2, write/2]). read(13001, _) -> {ok, myself}; read(13004, <<Id:32>>) -> {ok, Id}; 获取快捷栏 read(13007, _) -> {ok, get}; 保存快捷栏 read(13008, <<T:8, S:8, Id:32>>) -> {ok, [T, S, Id]}; 删除快捷栏 read(13009, <<T:8>...
4072193fa7a8b5beb8abe6a1e9faec38b603ba4807edb12b57b6c74311c443f6
lazy-cat-io/metaverse
screen.cljs
(ns metaverse.runner.electron.screen (:require [metaverse.runner.electron :as electron])) (defn get-primary-display [] (.getPrimaryDisplay electron/Screen)) (defn get-width ([] (get-width (get-primary-display))) ([^js/electron.screen display] (.. display -bounds -width))) (defn get-height ([...
null
https://raw.githubusercontent.com/lazy-cat-io/metaverse/2e5754967ac0e4219197da3ff6937b666d2d26fa/src/main/clojure/metaverse/runner/electron/screen.cljs
clojure
(ns metaverse.runner.electron.screen (:require [metaverse.runner.electron :as electron])) (defn get-primary-display [] (.getPrimaryDisplay electron/Screen)) (defn get-width ([] (get-width (get-primary-display))) ([^js/electron.screen display] (.. display -bounds -width))) (defn get-height ([...
a62538cb85af0fb7d791c3a6914340ea5db276933322d0bc5de57711a7b12f93
stan-dev/stanc3
Flag_vars.ml
type t = EmitGeneratedQuantities | EmitTransformedParameters let enumerate = [EmitGeneratedQuantities; EmitTransformedParameters] let to_string = function | EmitGeneratedQuantities -> "emit_generated_quantities__" | EmitTransformedParameters -> "emit_transformed_parameters__"
null
https://raw.githubusercontent.com/stan-dev/stanc3/86267798050f9a24f61263b0825f1d44395040db/src/middle/Flag_vars.ml
ocaml
type t = EmitGeneratedQuantities | EmitTransformedParameters let enumerate = [EmitGeneratedQuantities; EmitTransformedParameters] let to_string = function | EmitGeneratedQuantities -> "emit_generated_quantities__" | EmitTransformedParameters -> "emit_transformed_parameters__"
dc017aed64186588a8554afac1f1c63904fc9590f067eea732e76a5df3d58010
6502/JSLisp
signal.lisp
(defmacro signal (condition &rest restarts) `(do ((i (1- length *handlers*) (1- i)) (h null)) ((or (< i 0) (setf (h (funcall (aref *handlers* i) ',(map #'first restarts))))) (if h (cond ,@(map (lambda (r) `((= (f...
null
https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/signal.lisp
lisp
(defmacro signal (condition &rest restarts) `(do ((i (1- length *handlers*) (1- i)) (h null)) ((or (< i 0) (setf (h (funcall (aref *handlers* i) ',(map #'first restarts))))) (if h (cond ,@(map (lambda (r) `((= (f...
9049ddb07d127def46e977fcfb97214fdcbe93bc79ec952bed0cdfcfab26a71c
kudu-dynamics/blaze
AlgaDemo.hs
module Blaze.Types.Graph.AlgaDemo where import Blaze.Prelude import Blaze.Types.Graph import Blaze.Types.Graph.Alga toEdge :: (a, a) -> Edge a toEdge (a, b) = Edge a b demograph :: AlgaGraph () Char Char demograph = fromEdges . fmap (LEdge () . toEdge) $ [ ('z', 'a') , ('a', 'b') , ('a', 'c') , ('d',...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/63e30781f4c7bd816118e855f6fa4ae6e59949fe/demo/Blaze/Types/Graph/AlgaDemo.hs
haskell
module Blaze.Types.Graph.AlgaDemo where import Blaze.Prelude import Blaze.Types.Graph import Blaze.Types.Graph.Alga toEdge :: (a, a) -> Edge a toEdge (a, b) = Edge a b demograph :: AlgaGraph () Char Char demograph = fromEdges . fmap (LEdge () . toEdge) $ [ ('z', 'a') , ('a', 'b') , ('a', 'c') , ('d',...
8a37ac3e4dee64cdef1a0324fb2fb8d203e9edcc7a99451157a85e08255000d8
arthuredelstein/local-file
project.clj
(defproject local-file "0.1.0" :description "read files local to a project in clojure" :dependencies [[org.clojure/clojure "1.3.0"]] :dev-dependencies [[lein-clojars "0.7.0"]])
null
https://raw.githubusercontent.com/arthuredelstein/local-file/add95e7658e6e6ee349b65199f595382205dfd4e/project.clj
clojure
(defproject local-file "0.1.0" :description "read files local to a project in clojure" :dependencies [[org.clojure/clojure "1.3.0"]] :dev-dependencies [[lein-clojars "0.7.0"]])
e12ab8ebb27c73a3072169f38518ebdb2c5ca9c924dcf08dd04519dcc1a2a294
NetComposer/nksip
nksip_subscription_lib.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2019 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_subscription_lib.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2019 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @private User Subscription...
c0c819b48ab43eb0bcfbf1debc7442f69fb203b866cebcc94910bf8012f93607
thheller/shadow-cljsjs
dom.cljs
(ns cljsjs.react.dom (:require ["react" :as react] ["react-dom" :as react-dom])) (js/goog.object.set react "DOM" react-dom) (js/goog.exportSymbol "ReactDOM" react-dom)
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/react/dom.cljs
clojure
(ns cljsjs.react.dom (:require ["react" :as react] ["react-dom" :as react-dom])) (js/goog.object.set react "DOM" react-dom) (js/goog.exportSymbol "ReactDOM" react-dom)
d243e763d2abd121f4ecf2381250d51b88fc144fb459fc62e8619b8788072245
softwarelanguageslab/maf
R5RS_WeiChenRompf2019_meta-circ-5.scm
; Changes: * removed : 1 * added : 8 * swaps : 0 * negated predicates : 6 * swapped branches : 6 * calls to i d fun : 13 (letrec ((map (lambda (f lst) (if (pair? lst) (cons (f (car lst)) (map f (cdr lst))) ()))) (for-each (lambda (f lst) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_WeiChenRompf2019_meta-circ-5.scm
scheme
Changes:
* removed : 1 * added : 8 * swaps : 0 * negated predicates : 6 * swapped branches : 6 * calls to i d fun : 13 (letrec ((map (lambda (f lst) (if (pair? lst) (cons (f (car lst)) (map f (cdr lst))) ()))) (for-each (lambda (f lst) ...
214354861d9fcb7381d88909edb8c5d860a54e32232fcb04561307cd81432c44
fccm/OCamlSDL2
ex_simple_wav.ml
(* example from: -a-wav-file-using-sdl2/ *) open Sdl let () = Sdl.init [`AUDIO]; let wav_spec = Audio.new_audio_spec () in load WAV file let wav_buf, wav_len = Audio.load_wav "./_tremLoadingloopl.wav" wav_spec in (* open audio device *) let device_id = Audio.open_audio_device_simple wav_spec in ...
null
https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/examples/ex_simple_wav.ml
ocaml
example from: -a-wav-file-using-sdl2/ open audio device play audio keep application running long enough to hear the sound clean up
open Sdl let () = Sdl.init [`AUDIO]; let wav_spec = Audio.new_audio_spec () in load WAV file let wav_buf, wav_len = Audio.load_wav "./_tremLoadingloopl.wav" wav_spec in let device_id = Audio.open_audio_device_simple wav_spec in Audio.queue_audio device_id wav_buf wav_len; Audio.unpause_audio_dev...
d553e7c2a65cb361e878649f9e217cd38a18a39dabb2b7efeb1a0af3cbb43b69
sysbio-bioinf/avatar
import_bioportal.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 2.0 ( -v20.html ) ; which can be found in the file LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the terms of ...
null
https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/dialogs/import_bioportal.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. propagat...
Copyright ( c ) . All rights reserved . Eclipse Public License 2.0 ( -v20.html ) (ns avatar.ui.dialogs.import-bioportal (:require [avatar.data.bioportal :as bp] [clj-jfx.core :as jfx] [clojure.string :as str] [avatar.ui.dialogs.import-matrix-file :as imp-dia] [clojure.set :as set] [avat...
b04b60b5f48aa9383e1fe1347c1f06c6d3e9906d69f6ff67e380c80d59efe586
cryptosense/pkcs11
test_lib.ml
open OUnit2 let suite = "Pkcs11" >::: [ Test_p11_aes_ctr_params.suite ; Test_p11_aes_key_wrap.suite ; Test_p11_attribute.suite ; Test_p11_attribute_type.suite ; Test_p11_attribute_types.suite ; Test_p11_gcm_params.suite ; Test_p11_hex_data.suite ; Test_p11_mechanism...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/test/lib/test_lib.ml
ocaml
open OUnit2 let suite = "Pkcs11" >::: [ Test_p11_aes_ctr_params.suite ; Test_p11_aes_key_wrap.suite ; Test_p11_attribute.suite ; Test_p11_attribute_type.suite ; Test_p11_attribute_types.suite ; Test_p11_gcm_params.suite ; Test_p11_hex_data.suite ; Test_p11_mechanism...
3c8c49953ff397ce3bbb981a4208f36a35e566d2543d4541fc833348eb174f73
naveensundarg/prover
unify-vector.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- ;;; File: unify-vector.lisp The contents of this file are subject to the Mozilla Public License ;;; Version 1.1 (the "License"); you may not use this file except in ;;; compliance with the License. You may obtain a copy of the License at ;;; / ;;; Software...
null
https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/unify-vector.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- File: unify-vector.lisp Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is SNARK . The Initial Developer of the Original Code is SRI International . Portions created by the Initial Developer are Copyright ( C ) 1981 - 2010 . ...
d107e366dbfe887c70a45257a46075e4b3a9983f865f5687be5bfb34bdab6d7c
Fresheyeball/Shpadoinkle
Hooglable.hs
# LANGUAGE FlexibleInstances # module Shpadoinkle.Website.Types.Effects.Hooglable where import Control.Monad.Trans (MonadTrans, lift) import Shpadoinkle.Website.Types.Hoogle.Target (Target) import Shpadoinkle.Widgets.Types (Search) class Hooglable m ...
null
https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/5e5fb636fb0b0e99f04bae0d75cff722a10463ae/website/Shpadoinkle/Website/Types/Effects/Hooglable.hs
haskell
# LANGUAGE FlexibleInstances # module Shpadoinkle.Website.Types.Effects.Hooglable where import Control.Monad.Trans (MonadTrans, lift) import Shpadoinkle.Website.Types.Hoogle.Target (Target) import Shpadoinkle.Widgets.Types (Search) class Hooglable m ...
3c949cc55e54efbb25fef6b6618f046e9648fb72180ea8a447fa199a579f714b
athos/pogonos
api_test.clj
(ns pogonos.api-test (:require [clojure.java.io :as io] [clojure.test :refer [deftest is are testing]] [pogonos.api :as api] [clojure.string :as str])) (defn test-file [path] (str (io/file (io/resource path)))) (deftest render-test (are [opts expected] (= expected (with-out-s...
null
https://raw.githubusercontent.com/athos/pogonos/3125449f97981e19162e671e76cd9d66577a1b7f/test/pogonos/api_test.clj
clojure
(ns pogonos.api-test (:require [clojure.java.io :as io] [clojure.test :refer [deftest is are testing]] [pogonos.api :as api] [clojure.string :as str])) (defn test-file [path] (str (io/file (io/resource path)))) (deftest render-test (are [opts expected] (= expected (with-out-s...
ce052045027c9bf83bb7a02ea795622fbce6e4dc1846d3d1e37b7a2929f9b393
DSiSc/why3
run_wait.ml
#!/usr/bin/env ocaml (** a mini-mini-make or mini-mini-sub-make just the protocol for parallelism *) #load "unix.cma";; #load "str.cma";; open Format let print_args fmt arr = for i = 1 to Array.length arr - 1 do fprintf fmt "%s" arr.(i); if i <> Array.length arr - 1 then fprintf fmt " " done l...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/examples/use_api/runstrat/run_wait.ml
ocaml
* a mini-mini-make or mini-mini-sub-make just the protocol for parallelism * How should I do that? * slave * No MAKEFLAGS or no --jobserver-fds: sequential * number of worker as argument * master let () = print_args Sys.argv print_args args print_args makejob_args (** If the arguments are...
#!/usr/bin/env ocaml #load "unix.cma";; #load "str.cma";; open Format let print_args fmt arr = for i = 1 to Array.length arr - 1 do fprintf fmt "%s" arr.(i); if i <> Array.length arr - 1 then fprintf fmt " " done let add_id = true let create_process cmd args id = if add_id then args.(Array.lengt...
8a8cbbc6ebbc5b88ea91dd64231a46d920cf5182df95291063eb4b3d5dea7af2
samply/blaze
spec.clj
(ns blaze.db.kv.spec (:require [blaze.db.kv :as kv] [clojure.spec.alpha :as s]) (:import [java.lang AutoCloseable])) (s/def :blaze.db/kv-store kv/store?) (s/def :blaze.db/kv-snapshot (s/and #(satisfies? kv/KvSnapshot %) #(instance? AutoCloseable %))) (s/def :blaze.db/kv-iterator (s/...
null
https://raw.githubusercontent.com/samply/blaze/281ca0f35c845ed6e7b7f37fe2d4b9a060b065ca/modules/kv/src/blaze/db/kv/spec.clj
clojure
(ns blaze.db.kv.spec (:require [blaze.db.kv :as kv] [clojure.spec.alpha :as s]) (:import [java.lang AutoCloseable])) (s/def :blaze.db/kv-store kv/store?) (s/def :blaze.db/kv-snapshot (s/and #(satisfies? kv/KvSnapshot %) #(instance? AutoCloseable %))) (s/def :blaze.db/kv-iterator (s/...
3a4602de958552de8415821c4ecdae365548f43022a90aef3ecd67c4b9cd8038
Clozure/ccl-tests
read-delimited-list.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Jan 1 11:17:21 2005 ;;;; Contains: Tests of READ-DELIMITED-LIST (in-package :cl-test) (deftest read-delimited-list.1 (with-input-from-string (*standard-input* "1 2 3)") (read-delimited-list #\))) (1 2 3)) (deftest read-delimited-list.2 (with-inp...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/read-delimited-list.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of READ-DELIMITED-LIST Error tests
Author : Created : Sat Jan 1 11:17:21 2005 (in-package :cl-test) (deftest read-delimited-list.1 (with-input-from-string (*standard-input* "1 2 3)") (read-delimited-list #\))) (1 2 3)) (deftest read-delimited-list.2 (with-input-from-string (*standard-input* "1 2 3 ]") (read-delimited-li...
6ead57e7d647fedf6fbe4dd5527904d03cc604f8470779970adfd4d5d4688ddc
scicloj/notespace
project.clj
(defproject scicloj/notespace "4-alpha-22" :description "Notebook experience in your Clojure namespace." :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :plugins [[lein-tools-deps "0.4.5"]] :middleware [lein-tools-deps.plugin/resolve-dependencies-wi...
null
https://raw.githubusercontent.com/scicloj/notespace/e8e583eb064412da32683bc8d18f97a43bdc9184/project.clj
clojure
(defproject scicloj/notespace "4-alpha-22" :description "Notebook experience in your Clojure namespace." :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :plugins [[lein-tools-deps "0.4.5"]] :middleware [lein-tools-deps.plugin/resolve-dependencies-wi...
e3f6b2778e9fdb859b42c25837d2de44e065f19f1dfd0054ee427bd9106e4739
chetmurthy/yay
yayparse0.ml
open Asttools ; open Pa_ppx_base.Pp_MLast ; open Pa_ppx_runtime.Exceptions ; open Yayutil ; open Yaytypes ; open Yaylexing ; open Yaypostlexing ; type t += [ Exc of Ploc.t and t[@rebind_to Ploc.Exc;][@name "Ploc.Exc";] ] [@@deriving show;] ; value print_exn exn = Some (show exn) ; Printexc.register_printer print_...
null
https://raw.githubusercontent.com/chetmurthy/yay/9451a03ae5206986d01dde7db523d47cafd961ec/yayparse0.ml
ocaml
camlp5r calc.ml,v
open Asttools ; open Pa_ppx_base.Pp_MLast ; open Pa_ppx_runtime.Exceptions ; open Yayutil ; open Yaytypes ; open Yaylexing ; open Yaypostlexing ; type t += [ Exc of Ploc.t and t[@rebind_to Ploc.Exc;][@name "Ploc.Exc";] ] [@@deriving show;] ; value print_exn exn = Some (show exn) ; Printexc.register_printer print_...
ab4ea2bb583a062fb3504ac7ddc2706c2a5cd8c3a3d6df9b3d22fde48d4e83ee
mirage/irmin
slice.ml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/slice.ml
ocaml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
bce61582f588174fd24d39f487ca560cadab38261b9c1a49c5f3af79bdc9cb38
jlouis/graphql-erlang
graphql_ast.erl
-module(graphql_ast). -include_lib("graphql/include/graphql.hrl"). -include("graphql_internal.hrl"). -include("graphql_schema.hrl"). -export([name/1, id/1, typename/1, uniq/1]). -spec name('ROOT' | graphql:name()) -> binary(). name('ROOT') -> <<"ROOT">>; name({name, _Line, X}) -> X; name({var, N}) -> name(N). id(E)...
null
https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/src/graphql_ast.erl
erlang
Determine if an association list has unique keys
-module(graphql_ast). -include_lib("graphql/include/graphql.hrl"). -include("graphql_internal.hrl"). -include("graphql_schema.hrl"). -export([name/1, id/1, typename/1, uniq/1]). -spec name('ROOT' | graphql:name()) -> binary(). name('ROOT') -> <<"ROOT">>; name({name, _Line, X}) -> X; name({var, N}) -> name(N). id(E)...
b132c397b4ef609ef0c0cf4ee471114c1f010815248a350548a77ea9c72bc8dd
nuvla/api-server
callback_user_password_set.clj
(ns sixsq.nuvla.server.resources.callback-user-password-set " Allow a user to set a new password when the execute URL is visited. " (:require [clojure.tools.logging :as log] [sixsq.nuvla.server.resources.callback :as callback] [sixsq.nuvla.server.resources.callback-user-email-validation :as user-email-v...
null
https://raw.githubusercontent.com/nuvla/api-server/d1291d0499cd33ce3b331db84ea00f6e01c1b1b5/code/src/sixsq/nuvla/server/resources/callback_user_password_set.clj
clojure
(ns sixsq.nuvla.server.resources.callback-user-password-set " Allow a user to set a new password when the execute URL is visited. " (:require [clojure.tools.logging :as log] [sixsq.nuvla.server.resources.callback :as callback] [sixsq.nuvla.server.resources.callback-user-email-validation :as user-email-v...
1036ba56c561d613882605eeac2efc130732c97309cab4ba78dfd6b9ebffd8c3
logseq/logseq
page_ref.cljs
(ns logseq.graph-parser.util.page-ref "Core vars and util fns for page-ref. Currently this only handles a logseq page-ref e.g. [[page name]]" (:require [clojure.string :as string])) (def left-brackets "Opening characters for page-ref" "[[") (def right-brackets "Closing characters for page-ref" "]]") (def left-an...
null
https://raw.githubusercontent.com/logseq/logseq/4c3503ff1e9732a96a605a657bb9cab3ec7b1c90/deps/graph-parser/src/logseq/graph_parser/util/page_ref.cljs
clojure
common regular expressions
(ns logseq.graph-parser.util.page-ref "Core vars and util fns for page-ref. Currently this only handles a logseq page-ref e.g. [[page name]]" (:require [clojure.string :as string])) (def left-brackets "Opening characters for page-ref" "[[") (def right-brackets "Closing characters for page-ref" "]]") (def left-an...
0c01acefca27ea62306a55e8fdc2c7df6c8613c7968f848f1d3ae2a8672a2c04
oreillymedia/etudes-for-erlang
stats.erl
%% @author J D Eisenberg <> %% @doc Functions for calculating basic statistics on a list of numbers. 2013 J D Eisenberg %% @version 0.1 -module(stats). -export([minimum/1, maximum/1, range/1]). %% @doc Returns the minimum item in a list of numbers. Fails when given %% an empty list, as there's nothing reasonable t...
null
https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch06-04/stats.erl
erlang
@author J D Eisenberg <> @doc Functions for calculating basic statistics on a list of numbers. @version 0.1 @doc Returns the minimum item in a list of numbers. Fails when given an empty list, as there's nothing reasonable to return. @doc Returns the maximum item in a list of numbers. Fails when given an empty li...
2013 J D Eisenberg -module(stats). -export([minimum/1, maximum/1, range/1]). -spec(minimum([number()]) -> number()). minimum(NumberList) -> minimum(NumberList, hd(NumberList)). minimum([], Result) -> Result; minimum([Head|Tail], Result) -> case Head < Result of true -> minimum(Tail, Head); false ->...
3ae38d5ebe3f7323d7acd40492042f7116007181efef42de1c71ba8aa0427cb2
teawaterwire/cryptotwittos
events.cljs
(ns twittos.events (:require [re-frame.core :as rf] [twittos.db :as db] [ajax.core :as ajax] [cljs-web3.core :as web3-core] [cljs-web3.eth :as web3-eth] [clojure.string :as str])) (rf/reg-event-fx :init (fn [] {:db db/default-db :enable-web3 [:post...
null
https://raw.githubusercontent.com/teawaterwire/cryptotwittos/1bd2290975fe6092f1231cfd5f656822af64235f/src/twittos/events.cljs
clojure
------------------- CONTRACT ------------------- ------------------- TROPHIES ------------------- Unfortunately we cannot rely on this constant contract call with geth Necessary workaround because of the issue with the constant call ------------------- LOOKUP ------------------- ------------------- SEARCH ...
(ns twittos.events (:require [re-frame.core :as rf] [twittos.db :as db] [ajax.core :as ajax] [cljs-web3.core :as web3-core] [cljs-web3.eth :as web3-eth] [clojure.string :as str])) (rf/reg-event-fx :init (fn [] {:db db/default-db :enable-web3 [:post...
4f2670dc30148c9a369f41e455402d4ed3201271c7578efcfe9ddc9a6d6dd914
buntine/Haskell--Craft-of-FP
Chapter2.hs
------------------------------------------------------------------------------ Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1999 . -- -- Chapter 2 -- The example scripts FirstScript.hs and are provided -- separately. ----------------------------------------------------------...
null
https://raw.githubusercontent.com/buntine/Haskell--Craft-of-FP/a1a8cd70eb9d1609fd384e608b7fe26b2a878803/Chapter2.hs
haskell
---------------------------------------------------------------------------- Chapter 2 separately. ---------------------------------------------------------------------------- Some example expressions Some examples of expressions which cause errors; that's why 2+(3+4 2+(3+4)) double square 4 double ...
Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1999 . The example scripts FirstScript.hs and are provided module Chapter2 where import Chapter1 ex1, ex2 :: Int ex1 = double 32 - square (size - double 3) ex2 = double 320 - square (size - double 6) they appear as comments and ...
b12b715b8bb2d03b88246abcf3ad35d1288a7d767a5f139ae631796ef83ecb51
KavehYousefi/Esoteric-programming-languages
main.lisp
Date : 2021 - 12 - 08 ;; ;; Sources: ;; -> "" - > " " o The H - Team 's QKAS website . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -- Implementation of interpreter. -- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/6b5722042a26630ad8dc0338b3f503892dd07477/QKAS/QKAS_001/main.lisp
lisp
Sources: -> "" -- Implementation of interpreter. -- ;; ------------------------------------------------------- ------------------------------------------------------- ------------------------------------------------------- ------------------------------------------------------...
Date : 2021 - 12 - 08 - > " " o The H - Team 's QKAS website . (declaim (type simple-string +LOWERCASE-CHARACTERS+)) (declaim (type simple-string +UPPERCASE-CHARACTERS+)) (defparameter +LOWERCASE-CHARACTERS+ "qwertyuiopasdfghjklzxcvbnm" "The zero-based lookup table, associating with the position ...
721174c22006ac613fb09af7aa9e2ab6466e84cd4df7ffc9aac0e394192c0593
erlyvideo/publisher
rtmp.erl
@author < > [ ] 2009 @doc RTMP encoding / decoding module . %%% @reference See <a href="" target="_top"></a> for more information. %%% @end %%% This file is part of erlang - rtmp . %%% %%% erlang-rtmp is free software: you can redistribute it and/or modify it under the terms of the GNU...
null
https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/rtmp/src/rtmp.erl
erlang
@reference See <a href="" target="_top"></a> for more information. @end erlang-rtmp is free software: you can redistribute it and/or modify (at your option) any later version. erlang-rtmp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHA...
@author < > [ ] 2009 @doc RTMP encoding / decoding module . This file is part of erlang - rtmp . 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...
cabd2b4f80957a47b2990e7eae0c1624ebebe9c32a9fde312ca88e0eee399031
poscat0x04/telegram-types
PhotoSize.hs
module Web.Telegram.Types.Internal.PhotoSize where import Common -- | One size of a photo or a -- [file](#document)\/[sticker](#sticker) thumbnail. data PhotoSize = PhotoSize { -- | Identifier for this file, which can be used to download or reuse the file fileId :: Text, -- | Unique identifier for this fil...
null
https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/PhotoSize.hs
haskell
| One size of a photo or a [file](#document)\/[sticker](#sticker) thumbnail. | Identifier for this file, which can be used to download or reuse the file | Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. | Photo wid...
module Web.Telegram.Types.Internal.PhotoSize where import Common data PhotoSize = PhotoSize fileId :: Text, fileUniqueId :: Text, width :: Int, height :: Int, fileSize :: Maybe Int } deriving stock (Show, Eq) mkLabel ''PhotoSize deriveJSON snake ''PhotoSize
800577d2ccbb02485f5fc1485bc838eb5e604e851098d65cef1124deeb6a73f1
returntocorp/semgrep
Range_to_AST.mli
limited to expressions for now . * TODO : could be extended to stmt and stmts later and so return an * AST_generic.any option . * TODO: could be extended to stmt and stmts later and so return an * AST_generic.any option. *) val expr_at_range : Range.t -> AST_generic.program -> AST_generic.expr option val ...
null
https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/experiments/synthesizing/Range_to_AST.mli
ocaml
limited to expressions for now . * TODO : could be extended to stmt and stmts later and so return an * AST_generic.any option . * TODO: could be extended to stmt and stmts later and so return an * AST_generic.any option. *) val expr_at_range : Range.t -> AST_generic.program -> AST_generic.expr option val ...
82bb705db5eda35300fba8b74313f97e5c54e4e0ae9118d1896412c6c7e20b79
gafiatulin/codewars
NMEA.hs
NMEA checksum / module NMEA where import Data.Char (isHexDigit) import Numeric (readHex) import Data.Bits (xor) check :: String -> Bool check ('$':xs) | valid = (== (fst . head . readHex $ checksum)) . foldl1 xor . map fromEnum $ str where (str, _:rest) = break (=='*') xs (checksum, end) = span is...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/NMEA.hs
haskell
NMEA checksum / module NMEA where import Data.Char (isHexDigit) import Numeric (readHex) import Data.Bits (xor) check :: String -> Bool check ('$':xs) | valid = (== (fst . head . readHex $ checksum)) . foldl1 xor . map fromEnum $ str where (str, _:rest) = break (=='*') xs (checksum, end) = span is...
eb8acd04ff52527f7149c667ad69ccc88df920702eba12a04cb72c6b70164c7a
bonkzwonil/defrest
run-tests.lisp
Initialize quicklisp ( copied from .sbclrc ) (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) (asdf:oos 'asdf:test-op 'defrest)
null
https://raw.githubusercontent.com/bonkzwonil/defrest/20824af48363822113e1357db74e5cd1a4d9a877/script/run-tests.lisp
lisp
Initialize quicklisp ( copied from .sbclrc ) (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) (asdf:oos 'asdf:test-op 'defrest)
d8aabfe93a9dea517ff1620909594f45fdbb1df14fedb748ffb40b49b4874890
Bodigrim/linear-builder
BenchDecimal.hs
-- | Copyright : ( c ) 2022 Licence : BSD3 Maintainer : < > module BenchDecimal (benchDecimal) where import qualified Data.ByteString as B import qualified Data.ByteString.Builder as B import qualified Data.Text as T import Data.Text.Builder.Linear.Buffer import Data.Text.Lazy (toStrict) import D...
null
https://raw.githubusercontent.com/Bodigrim/linear-builder/946ede793abc757180e4c53dc14b6988e6ffc3c4/bench/BenchDecimal.hs
haskell
|
Copyright : ( c ) 2022 Licence : BSD3 Maintainer : < > module BenchDecimal (benchDecimal) where import qualified Data.ByteString as B import qualified Data.ByteString.Builder as B import qualified Data.Text as T import Data.Text.Builder.Linear.Buffer import Data.Text.Lazy (toStrict) import Data.T...
c54e3e2a914ca518a1fd8445e7d9ef2d676baf624e2deb2dd0d9abdb3db86032
roburio/openvpn
config.ml
open Mirage let data_key = Key.(value @@ kv_ro ~group:"data" ()) let data = generic_kv_ro ~key:data_key "configuration" let private_netif = netif ~group:"private" "private" let private_ethernet = etif private_netif let private_arp = arp private_ethernet let private_ipv4 = create_ipv4 ~group:"private" private_ethernet...
null
https://raw.githubusercontent.com/roburio/openvpn/04fc02ee1e2e2a516e18160b90ab60ccd57b6396/mirage-nat/config.ml
ocaml
open Mirage let data_key = Key.(value @@ kv_ro ~group:"data" ()) let data = generic_kv_ro ~key:data_key "configuration" let private_netif = netif ~group:"private" "private" let private_ethernet = etif private_netif let private_arp = arp private_ethernet let private_ipv4 = create_ipv4 ~group:"private" private_ethernet...
eb2cd03c6214bfc9be31291aa28cf6fac05e7c719813d1d12a064fee16cea0b6
MyDataFlow/ttalk-server
minmax_example.erl
@private -module(minmax_example). -export([minmax_sample/3, minmax_transform/2]). %% Simple sample processor that maintains a min/max tuple %% for all received values minmax_sample(_TS, Value, undefined) -> { Value, Value }; minmax_sample(_TS, Value, {Min, Max}) when Value < Min -> { Value, Max }; ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/examples/minmax_example.erl
erlang
Simple sample processor that maintains a min/max tuple for all received values If minmax_sample() has not been called for the current time slot, then the provided state will still be 'undefined' Return the calculated total for the slot and return it as the element to be stored in the histogram. Return the min/ma...
@private -module(minmax_example). -export([minmax_sample/3, minmax_transform/2]). minmax_sample(_TS, Value, undefined) -> { Value, Value }; minmax_sample(_TS, Value, {Min, Max}) when Value < Min -> { Value, Max }; minmax_sample(_TS, Value, {Min, Max}) when Value > Max -> { Min, Value }; minmax...
6a4610b4cfd803e9aa91d8c9fe9acb2a0f294f31ac9565886cfa5a59235d905a
Z572/gwwm
config.scm
(define-module (gwwm config) #:use-module (xkbcommon xkbcommon) #:use-module (oop goops) #:use-module (oop goops describe) #:use-module (gwwm utils) #:use-module (gwwm i18n) #:use-module (gwwm color) #:export (gwwm config-borderpx config-sloppyfocus? config-xkb-rules ...
null
https://raw.githubusercontent.com/Z572/gwwm/e27d45c13c1445019a47d7de038b42bb2e6c28e5/gwwm/config.scm
scheme
(define-module (gwwm config) #:use-module (xkbcommon xkbcommon) #:use-module (oop goops) #:use-module (oop goops describe) #:use-module (gwwm utils) #:use-module (gwwm i18n) #:use-module (gwwm color) #:export (gwwm config-borderpx config-sloppyfocus? config-xkb-rules ...
9012b0222d4adaa22dc7a7fffc68ec21328c347ab0e100353880cb9cec6b85c3
isovector/talks
Naive.hs
# LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingStrategies # {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleInstances # # LANGUAGE PatternSynonyms # {-# LANGUAGE...
null
https://raw.githubusercontent.com/isovector/talks/95c82908731c3ed7b0e97ef46430d9693b51bc62/quadtrees/src/Naive.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DeriveTraversable # # LANGUAGE DerivingVia # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeSynonymInstances # # OPTIONS_GHC -Wno-name-shadowing # # OPTIONS_GHC -Wno-unused-matches # # OPTIONS_GHC -Wno-unused-import...
# LANGUAGE DeriveFoldable # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # # LANGUAGE PatternSynonyms # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # module Naive where import qualified Data.Set as S import Data.Set (Set) import Control.Applicative (liftA2)...
fe214d82139bab052f8b0401c09209f5a15997614ac7221e8035150a68b07770
faylang/fay
Integral.hs
module Integral where printPair :: (Int,Int) -> Fay () printPair (x,y) = print x >> print y main = do print (( 3) `quot` ( 2)) print (( 3) `quot` (-2)) print ((-3) `quot` ( 2)) print ((-3) `quot` (-2)) print (( 3) `rem` ( 2)) print (( 3) `rem` (-2)) print ((-3) `rem` ( 2)) print ((-3) `rem` (-2)) pr...
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/Integral.hs
haskell
module Integral where printPair :: (Int,Int) -> Fay () printPair (x,y) = print x >> print y main = do print (( 3) `quot` ( 2)) print (( 3) `quot` (-2)) print ((-3) `quot` ( 2)) print ((-3) `quot` (-2)) print (( 3) `rem` ( 2)) print (( 3) `rem` (-2)) print ((-3) `rem` ( 2)) print ((-3) `rem` (-2)) pr...
e4417221f85f301ba060546073b6c92a8bc52bdbecbed3d91616fe9ea447db4e
andorp/bead
Page.hs
{-# LANGUAGE OverloadedStrings #-} module Bead.View.Content.CourseOverview.Page ( courseOverview ) where import Control.Monad.IO.Class import Data.String (fromString) import Data.Time (UTCTime, getCurrentTime) import qualified Bead.Controller.UserStories as Story import B...
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/Content/CourseOverview/Page.hs
haskell
# LANGUAGE OverloadedStrings #
module Bead.View.Content.CourseOverview.Page ( courseOverview ) where import Control.Monad.IO.Class import Data.String (fromString) import Data.Time (UTCTime, getCurrentTime) import qualified Bead.Controller.UserStories as Story import Bead.View.Content import qualified B...
314c2d8159b5331ed7b610d8f61f714ef2268ef1c6d75db5908f19d258360301
vitorenesduarte/exp
exp_sup.erl
%% Copyright ( c ) 2018 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agre...
null
https://raw.githubusercontent.com/vitorenesduarte/exp/99486aba658c1b5f077275ceca3eef173375d050/src/exp_sup.erl
erlang
Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ----------------------------...
Copyright ( c ) 2018 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(exp_sup). -author("Vi...
a57a7f6a3b5d9ae15290f21d59611f7be27a2c12b0e6a9a0e7974b9621ae0c59
tonatona-project/tonatona
Servant.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # # LANGUAGE TypeApplications # module Tonatona.Servant ( Tonatona.Servant.run , runWithHandlers , redirect , Config(..) , Host(..) , Port , Protocol(..) ) where import RIO import Data.Default (def) import Data.Kind (Type) import Network.HTTP.Types.Head...
null
https://raw.githubusercontent.com/tonatona-project/tonatona/b6b67bf0f14d345c01dcf9ea7870b657891f032c/tonatona-servant/src/Tonatona/Servant.hs
haskell
| Main function. | Main function which allows you to pass error handlers. Config | This defines the host part of a URL. For example, in the URL :8090/, the host is @some.url.com@. | This defines the protocol part of a URL. For example, in the URL :8090/, the protocol is
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # # LANGUAGE TypeApplications # module Tonatona.Servant ( Tonatona.Servant.run , runWithHandlers , redirect , Config(..) , Host(..) , Port , Protocol(..) ) where import RIO import Data.Default (def) import Data.Kind (Type) import Network.HTTP.Types.Head...
0e5a2280fab16e6e9380d8b537f745abf59c58d371b0c286967117837e49fc9c
RefactoringTools/HaRe
Signature4.hs
module LiftToTopLevel.Signature3 where {- Lifting baz to the top level should bring in xx and a as parameters, and update the signature to include these -} foo a = baz where baz :: Int baz = xx 1 a xx :: (Integral t,Num t) => t -> t -> Int xx p1 p2 = fromIntegral $ p1 + p2
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftToToplevel/Signature4.hs
haskell
Lifting baz to the top level should bring in xx and a as parameters, and update the signature to include these
module LiftToTopLevel.Signature3 where foo a = baz where baz :: Int baz = xx 1 a xx :: (Integral t,Num t) => t -> t -> Int xx p1 p2 = fromIntegral $ p1 + p2
042598dc509ca2550b8a373dda515265829a399c0f273ac01db1a37d0d9d780e
janestreet/hardcaml
import.ml
include Base include Hardcaml module Command = Core.Command module Out_channel = Stdio.Out_channel module Test_bits = Hardcaml_test.Test_bits let fprintf = Out_channel.fprintf let stdout = Stdio.stdout
null
https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/test/regression/import.ml
ocaml
include Base include Hardcaml module Command = Core.Command module Out_channel = Stdio.Out_channel module Test_bits = Hardcaml_test.Test_bits let fprintf = Out_channel.fprintf let stdout = Stdio.stdout
dcd72a417e2421fee195e18b8f36ca7cb1d5ef50dead5982c7f30762d925e1ac
kappelmann/engaging-large-scale-functional-programming
Exercise04.hs
module Exercise04 where toN :: Int -> String -> [Int] toN _ "" = [] toN last ('R' : xs) = h : toN h xs where h = last + 1 toN last ('L' : xs) = h : toN h xs where h = last - 1 -- Hide High Lengh roadNumbers data House = High Int | Hide Int Int Int deriving (Show, Eq) calcPeak :: [House] -> [House] calc...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/04/uploads/artemishatesleadingdigits/Exercise04.hs
haskell
Hide High Lengh roadNumbers iii hih hii ihi
module Exercise04 where toN :: Int -> String -> [Int] toN _ "" = [] toN last ('R' : xs) = h : toN h xs where h = last + 1 toN last ('L' : xs) = h : toN h xs where h = last - 1 data House = High Int | Hide Int Int Int deriving (Show, Eq) calcPeak :: [House] -> [House] calcPeak [] = [] hhh calcPeak (Hi...
860bf8093e42a27375281d41eeb338122bdfa5143b30ec7511b12e2db9b46df9
ferdinand-beyer/refx
effects.cljc
(ns refx.effects (:require [refx.dispatch :as dispatch] [refx.events :as events] [refx.interceptor :refer [->interceptor]] [refx.interop :as interop] [refx.log :as log] [refx.registry :as registry] [refx.db :refer [app-db]])) (def kind :fx) ;; ...
null
https://raw.githubusercontent.com/ferdinand-beyer/refx/6851b8638098b5c4616863f3a6748c9db39b3549/core/src/refx/effects.cljc
clojure
-- Registration ------------------------------------------------------------ -- Interceptor ------------------------------------------------------------- :db effect is guaranteed to be handled before all other effects. TODO: Look it up, since it could change? :dispatch-later usage: ; in 200ms do this : ( di...
(ns refx.effects (:require [refx.dispatch :as dispatch] [refx.events :as events] [refx.interceptor :refer [->interceptor]] [refx.interop :as interop] [refx.log :as log] [refx.registry :as registry] [refx.db :refer [app-db]])) (def kind :fx) (d...
1af32ba12e28eb362a2a50b2ff49ddee458afa1559b8efe53fc39fd0829d1178
chefy-io/clojure-katas
integral.clj
(ns clojure-katas.integral) (defn integral [f a b n] {:pre [(even? n)(< a b)]} (let [delta (double (/ (- b a) n))] (* (double (/ delta 3)) (+ (f a) (f b) (reduce + (map (fn [x] (* 4 x)) (map f (range (+ a delta) (- b delta) (* 2 delta))))) (reduce + (map (fn [x] (* 2 x)) ...
null
https://raw.githubusercontent.com/chefy-io/clojure-katas/81efe02dfe5add9e10146e10dd2b34f072f7686e/src-answers/clojure_katas/integral.clj
clojure
(ns clojure-katas.integral) (defn integral [f a b n] {:pre [(even? n)(< a b)]} (let [delta (double (/ (- b a) n))] (* (double (/ delta 3)) (+ (f a) (f b) (reduce + (map (fn [x] (* 4 x)) (map f (range (+ a delta) (- b delta) (* 2 delta))))) (reduce + (map (fn [x] (* 2 x)) ...
222706fb7ec1cb1b69facdc2176faa9f2aa64f9aadcfc95d1f10d3ff84013740
Butanium/monte-carlo-tree-search-TSP
Launch_Experiment.ml
(* - For all experiments : let () = Experiments.Experiment_Generator.experiment_all () *) - For iterated 2 - Opt experiments : - For iterated 2-Opt experiments : *) let () = Experiments.Experiment_Generator.experiment_iter2opt ~max_time:10. ~amount:128 ~test_set:100 ~exp_per_config:5 ()
null
https://raw.githubusercontent.com/Butanium/monte-carlo-tree-search-TSP/f4f6bbf75c7eed2113f8d025eaab0bc428bc4ef8/tests/Launch_Experiment.ml
ocaml
- For all experiments : let () = Experiments.Experiment_Generator.experiment_all ()
- For iterated 2 - Opt experiments : - For iterated 2-Opt experiments : *) let () = Experiments.Experiment_Generator.experiment_iter2opt ~max_time:10. ~amount:128 ~test_set:100 ~exp_per_config:5 ()
3f6c4d9a3f673f15c1f5608d6cea0c8200c979f3fe036bd8249ddb139e98a4de
mbj/stratosphere
EndpointInputProperty.hs
module Stratosphere.SageMaker.ModelBiasJobDefinition.EndpointInputProperty ( EndpointInputProperty(..), mkEndpointInputProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelBiasJobDefinition/EndpointInputProperty.hs
haskell
module Stratosphere.SageMaker.ModelBiasJobDefinition.EndpointInputProperty ( EndpointInputProperty(..), mkEndpointInputProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere...
3d82c1bc044cf03c0ee9e198400d97a891d7161fd381360885309129965af5ee
pirapira/coq2rust
tQueue.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/stm/tQueue.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** re-roting the whole list is not the...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * module PriorityQueue : sig ...
cc24282e4fce628f892f5b504be3743b2ab7f5dbd5883a343b9e63ce81ee9a5d
mbenke/zpf2013
RegExtra0.hs
module RegExtra0 where import Mon import Reg data AB = A | B deriving(Eq,Ord,Show) infix 4 === class Equiv a where (===) :: a -> a -> Bool instance (Eq c) => Equiv (Reg c) where r1 === r2 = False instance Mon (Reg c) where m1 = Empty x <> y = Empty simpl :: Reg c -> Reg c simpl x = x nullable :: Reg c ...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Labs/01/Reg/RegExtra0.hs
haskell
module RegExtra0 where import Mon import Reg data AB = A | B deriving(Eq,Ord,Show) infix 4 === class Equiv a where (===) :: a -> a -> Bool instance (Eq c) => Equiv (Reg c) where r1 === r2 = False instance Mon (Reg c) where m1 = Empty x <> y = Empty simpl :: Reg c -> Reg c simpl x = x nullable :: Reg c ...
66b7936148126877d643da915293cb9033af647284516843a526636f83f455d4
samirose/sicp-compiler-project
sequence.scm
(import (compiler-test) (sequence)) (compiler-test-begin "sequence") (compiler-test-eq "sequence of values evaluates to the last value" 3 (sequence-has-last-value)) (compiler-test-eq "sequence of expressions evaluates to the last expression's value" 2 (sequence-has-last-expressions-value)) (compiler-test-eq "...
null
https://raw.githubusercontent.com/samirose/sicp-compiler-project/2bc8a481044b5a653408f8595b2a2396600b8ad6/test-compiler/test/sequence.scm
scheme
(import (compiler-test) (sequence)) (compiler-test-begin "sequence") (compiler-test-eq "sequence of values evaluates to the last value" 3 (sequence-has-last-value)) (compiler-test-eq "sequence of expressions evaluates to the last expression's value" 2 (sequence-has-last-expressions-value)) (compiler-test-eq "...