_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
a6ac3eaf2d77c05b9d5ae0e3475a0178fe2566c6675fedced08f28a12f7b3784
Raynes/clojail
testers.clj
(ns clojail.testers "A set of predefined testers that you can use in your own sandboxes. I'm not promising that any of these are really totally secure. I cannot possibly test these for everything." (:require [bultitude.core :as nses] [serializable.fn :as sfn])) (deftype ClojailWrapper [object]) ...
null
https://raw.githubusercontent.com/Raynes/clojail/1b648f225429613d1a9b0792f58521a80aaeb0f8/src/clojail/testers.clj
clojure
(ns clojail.testers "A set of predefined testers that you can use in your own sandboxes. I'm not promising that any of these are really totally secure. I cannot possibly test these for everything." (:require [bultitude.core :as nses] [serializable.fn :as sfn])) (deftype ClojailWrapper [object]) ...
68c1a187c71452a5465ad90ef97aa88d9aae463c1631e86a145f7b8ed8e4e51b
8c6794b6/guile-tjit
srfi-64.scm
srfi-64.scm -- SRFI 64 - A Scheme API for test suites . Copyright ( C ) 2014 Free Software Foundation , Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either versi...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/srfi/srfi-64.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
srfi-64.scm -- SRFI 64 - A Scheme API for test suites . Copyright ( C ) 2014 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston...
672e170ab3b3fe15eb6583434b3d43c9a5776c91e3e6c0d0a1da2fd434b8daf9
umd-cmsc330/cmsc330spring22
public.ml
open OUnit2 open TestUtils open P2b.Data open P2b.Funs open P2b.Higher let public_contains_elem _ = let a = [] in let b = ["a";"b";"c";"d"] in let c = [91;2;96;42;100] in assert_equal ~printer:string_of_bool false @@ contains_elem a "hello"; assert_equal ~printer:string_of_bool true @@ contains_elem b "...
null
https://raw.githubusercontent.com/umd-cmsc330/cmsc330spring22/e499004813cebd2e6aeffc79088ff7279560cbf0/project2b/test/public/public.ml
ocaml
open OUnit2 open TestUtils open P2b.Data open P2b.Funs open P2b.Higher let public_contains_elem _ = let a = [] in let b = ["a";"b";"c";"d"] in let c = [91;2;96;42;100] in assert_equal ~printer:string_of_bool false @@ contains_elem a "hello"; assert_equal ~printer:string_of_bool true @@ contains_elem b "...
4de3989271037f23a94c7ee0c404325f286ce7dc32caca4350d04c41d1a6459c
expipiplus1/vulkan
VK_KHR_dynamic_rendering.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_dynamic_rendering - device extension -- -- == VK_KHR_dynamic_rendering -- -- [__Name String__] -- @VK_KHR_dynamic_rendering@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 45 -- -- [__Revision__] 1 -- -- [__Extensi...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/d765efafb2ea2965ceba268e9e4e54cbd415aa33/src/Vulkan/Extensions/VK_KHR_dynamic_rendering.hs
haskell
# language CPP # | = Name VK_KHR_dynamic_rendering - device extension == VK_KHR_dynamic_rendering [__Name String__] @VK_KHR_dynamic_rendering@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_...
45 1 - Requires support for Vulkan 1.0 - 2021 - 10 - 06 - Promoted to Vulkan 1.3 Core - , AMD - , Roblox - , Gameloft - , AMD - , Google - , Google - , Qualcomm - Jan - , Arm - ...
4914cf815fdbc10b543f514b44e40363cced541b90dff571afaaf242ea2da01c
ml4tp/tcoq
cctac.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/plugins/cc/cctac.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** decompose member of equality in an ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is the interface ...
0d6e399e1bbfcef0c221ba02af12c8c8dbc206ed14231437f4f83ad1a14aa6de
finnishtransportagency/harja
transit.cljc
(ns harja.transit "Harjan transit laajennokset" (:require [cognitect.transit :as t] [harja.pvm :as pvm] [harja.domain.roolit :as roolit] #?(:clj [harja.geo :as geo] :cljs [harja.pvm :as pvm]) [clojure.string :as str] ...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljc/harja/transit.cljc
clojure
muunnettuna, joten tässä kelpaa identity
(ns harja.transit "Harjan transit laajennokset" (:require [cognitect.transit :as t] [harja.pvm :as pvm] [harja.domain.roolit :as roolit] #?(:clj [harja.geo :as geo] :cljs [harja.pvm :as pvm]) [clojure.string :as str] ...
170d6e844e0e1c12987435c9b98cb0ef9b6fee54979af3502c245a5db83e0627
ivanjovanovic/sicp
e-3.42.scm
Exercise 3.42 . suggests that it 's a waste of time to create a ; new serialized procedure in response to every withdraw and deposit message. ; He says that make-account could be changed so that the calls to protected are ; done outside the dispatch procedure. That is, an account would return the ; same serialize...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.4/e-3.42.scm
scheme
new serialized procedure in response to every withdraw and deposit message. He says that make-account could be changed so that the calls to protected are done outside the dispatch procedure. That is, an account would return the same serialized procedure (which was created at the same time as the account) each time...
Exercise 3.42 . suggests that it 's a waste of time to create a (define (make-account balance) (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (deposit amount) (set! balance (+ balance am...
f5ee8c5efcbbb524c344fe8b1a450bfe57d9aa79f8cb0162535f57fbbd2f3dcb
jumarko/clojure-experiments
simple_closures.clj
(ns four-clojure.simple-closures) ;;; ;;; Lexical scope and first - class functions are two of the most basic building blocks of functional language like Clojure ;;; With Lexical Closures you can get a great control overal lifetime of you local bindings ;;; ;;; Let's build a simple closure: ;;; Given a positive int...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/simple_closures.clj
clojure
With Lexical Closures you can get a great control overal lifetime of you local bindings Let's build a simple closure: Given a positive integer n, return a function (f x) which computes x^n. Observe that the effect of this is to preserve the value of n for use outside the scope in which it is defined.
(ns four-clojure.simple-closures) Lexical scope and first - class functions are two of the most basic building blocks of functional language like Clojure (defn lexical-closure [n] (fn [x] (int ( Math/pow x n)))) (= 256 ((lexical-closure 2) 16) ((lexical-closure 8) 2)) (= [1 8 27 64] (map (lexical-closure ...
91aa3b5049520f1472164cea745e42e6e46321b33596c8eb5701e930c04d088f
chetmurthy/poly-protobuf
test01_ml.ml
module T = Test01_types module Pb = Test01_pb module Pp = Test01_pp let decode_ref_data () = T.({ p1 = { first_name = "John"; last_name = "Doe"; date_of_birth = 19820429l; tel_number = None; employment = Employed_by "Google"; marital_status = None; gender = Some Mal...
null
https://raw.githubusercontent.com/chetmurthy/poly-protobuf/1f80774af6472fa30ee2fb10d0ef91905a13a144/tests/testdata/integration-tests/test01_ml.ml
ocaml
module T = Test01_types module Pb = Test01_pb module Pp = Test01_pp let decode_ref_data () = T.({ p1 = { first_name = "John"; last_name = "Doe"; date_of_birth = 19820429l; tel_number = None; employment = Employed_by "Google"; marital_status = None; gender = Some Mal...
a9d5f17ee0ae872ad1e25761a59e7b79b942492d698aa6ea084445a5849bc31c
grin-compiler/ghc-whole-program-compiler-project
gen-obj.hs
# LANGUAGE RecordWildCards # module Main where import Control.Monad import Control.Monad.IO.Class import System.Environment import Stg.IO import Stg.GHC.ToStg import Stg.GHC.Backend import Stg.DeadFunctionElimination.StripModule import qualified GHC.Driver.Types as GHC import GHC import GHC.Paths ( libdir ) =...
null
https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/3fe5fb0aaebfe8005d44d29357dc53156c8b6537/external-stg-compiler/app/gen-obj.hs
haskell
modpakName TODO: fix liveness input name HINT: the stubs are compiled at link time
# LANGUAGE RecordWildCards # module Main where import Control.Monad import Control.Monad.IO.Class import System.Environment import Stg.IO import Stg.GHC.ToStg import Stg.GHC.Backend import Stg.DeadFunctionElimination.StripModule import qualified GHC.Driver.Types as GHC import GHC import GHC.Paths ( libdir ) =...
a5df24c1ee8562cf2129dfae6cdbd2f494982125bd40c8ddf9d0d4b4ab187ae9
freizl/dive-into-haskell
mysql.hs
-- file: mysql.hs import Control.Monad import Database.HDBC import Database.HDBC.MySQL main = do conn <- connectMySQL defaultMySQLConnectInfo { mysqlUser = "root", mysqlPassword = "navichina", mysqlDatabase = "swingshowcase" } ...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/hdbc/mysql.hs
haskell
file: mysql.hs
import Control.Monad import Database.HDBC import Database.HDBC.MySQL main = do conn <- connectMySQL defaultMySQLConnectInfo { mysqlUser = "root", mysqlPassword = "navichina", mysqlDatabase = "swingshowcase" } rows <- quickQu...
46a562992bafcb32ff10c84a464ab22ae121c1dff8e51c971ea5a7967d7bd7b7
Simre1/haskell-game
DoctestSpec.hs
# LANGUAGE CPP # module DoctestSpec where import Test.Hspec import Test.DocTest spec :: Spec spec = parallel $ describe "Error messages" $ it "should pass the doctest" $ doctest [ "-isrc/" , "--fast" , "-XDataKinds" , "-XDeriveFunctor" , "-XFlexibleContexts" , "-XGADTs" , "-XLambdaCase" , "-XPolyKind...
null
https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/test/DoctestSpec.hs
haskell
Modules that are explicitly imported for this test must be listed here
# LANGUAGE CPP # module DoctestSpec where import Test.Hspec import Test.DocTest spec :: Spec spec = parallel $ describe "Error messages" $ it "should pass the doctest" $ doctest [ "-isrc/" , "--fast" , "-XDataKinds" , "-XDeriveFunctor" , "-XFlexibleContexts" , "-XGADTs" , "-XLambdaCase" , "-XPolyKind...
72e7c0ef09bb9fd1f5a2e656ad3464634933ca816345b46ac49cd01cc9ddc9e5
public-law/nevada-revised-statutes-parser
TreeParser.hs
module TreeParser ( parseTree ) where import BasicPrelude ( Maybe(Just, Nothing) , Either(..) , error , head ...
null
https://raw.githubusercontent.com/public-law/nevada-revised-statutes-parser/88a886debdab6ce5bd6cf5819c846cec1ffb9220/src/TreeParser.hs
haskell
module TreeParser ( parseTree ) where import BasicPrelude ( Maybe(Just, Nothing) , Either(..) , error , head ...
cb90469bb652f1ee20efc6c1286e873d44ab532c4f240180c8b921535c369c3d
stepcut/plugins
Plugin.hs
module Plugin ( resource ) where import API resource = plugin { field = "hello out there" }
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/make/o/Plugin.hs
haskell
module Plugin ( resource ) where import API resource = plugin { field = "hello out there" }
54ff7acb8a9047a723f07c2f132d010681c180f89a9be20b65754afa2788badd
zotonic/zotonic
action_wires_growl.erl
@author < > 2009 Copyright 2009 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, softwar...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_wires/src/actions/action_wires_growl.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
@author < > 2009 Copyright 2009 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(action_wires_growl). -include_lib("zotonic_core/include/zotonic.hrl"). -export([render_action/4]). render_action(_Trigge...
dd953602f7a04758afbcefb8526aae97f10a063b35fb29af60d7bcaf7e480272
DHSProgram/DHS-Indicators-SPSS
NT_tables_PR.sps
* Encoding: windows-1252. ***************************************************************************************************** Program: NT_tables_PR.sps Purpose: produce tables for indicators Author: Ivana Bjelic Date last modified: May 18 2020 by Ivana Bjelic *This do file will produce the following tables ...
null
https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap11_NT/NT_tables_PR.sps
scheme
* Encoding: windows-1252. ***************************************************************************************************** Program: NT_tables_PR.sps Purpose: produce tables for indicators Author: Ivana Bjelic Date last modified: May 18 2020 by Ivana Bjelic *This do file will produce the following tables ...
a0eb4490711038f657f0e6b40f0b9bf04ed49161302a7cd8dce1605a95230fa1
clj-kafka/franzy
configuration_tests.clj
(ns franzy.embedded.configuration-tests (:require [midje.sweet :refer :all] [franzy.embedded.defaults :as defaults] [franzy.embedded.configuration :as config]) (:import (clojure.lang IPersistentMap) (kafka.server KafkaConfig))) (facts "Kafka configs can be created a few ways" ...
null
https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/embedded/test/franzy/embedded/configuration_tests.clj
clojure
(ns franzy.embedded.configuration-tests (:require [midje.sweet :refer :all] [franzy.embedded.defaults :as defaults] [franzy.embedded.configuration :as config]) (:import (clojure.lang IPersistentMap) (kafka.server KafkaConfig))) (facts "Kafka configs can be created a few ways" ...
f951e7dd63bb0e449c7c8e408e5ef2161caf192b3626c34bfb95d16bb991c9d6
mwotton/roboservant
BuildFrom.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstance...
null
https://raw.githubusercontent.com/mwotton/roboservant/c89e1693fc146ea653ea48d411124082e01dec2d/src/Roboservant/Types/BuildFrom.hs
haskell
this isn't wonderful, but we need a hand-rolled instance for recursive datatypes right now. with an arbitrary-ish interface, we could use a size parameter, rng access etc. powerset creates way too much stuff. something better here eventually. not recursion safe!
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstance...
fe17c749c7bc3f5c1ffb1bf55f396b509598d567b175f800a5f2d9d5f0c6a31a
tonyg/kali-scheme
jar-assem.scm
; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . ; This is file assem.scm. Assembler Courtesy . LAP syntax is much like that of the output of the disassembler except ; that glob...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/env/jar-assem.scm
scheme
-*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- This is file assem.scm. that global and set-global! take a symbol as an argument, statements may be labeled, and jump, jump-if-false, and make-cont may make a forward reference to a label to give an offset. (define dog (lap dog (check-nargs= 0) ...
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . Assembler Courtesy . LAP syntax is much like that of the output of the disassembler except Example : a translation of ( define ( dog ) ( if x 0 1 ) ) . (define-compilator '(lap synta...
fe1938cbc91b66ca090fa7e02f46180a1c8a527e35cbdbb9fbf61e976493d814
OdonataResearchLLC/linear-algebra
linear-algebra-test.lisp
Unit Tests for Linear Algebra in Common Lisp (in-package :cl-user) (defpackage :linear-algebra-test (:use :common-lisp :lisp-unit)) (in-package :linear-algebra-test) ;;; Convenience functions (defun random-interior-index (size) "Return an interior index that is guaranteed not to be an end point." (check-ty...
null
https://raw.githubusercontent.com/OdonataResearchLLC/linear-algebra/188bf6c3b7a78383c2707154c0bd19b2a4d88a07/test/linear-algebra-test.lisp
lisp
Convenience functions Data vector equality Dense matrix equality
Unit Tests for Linear Algebra in Common Lisp (in-package :cl-user) (defpackage :linear-algebra-test (:use :common-lisp :lisp-unit)) (in-package :linear-algebra-test) (defun random-interior-index (size) "Return an interior index that is guaranteed not to be an end point." (check-type size fixnum) (cond ...
9b8c2b38c586a7911aa1e6a8456a5f0437327d6c32ffdeb92b7c52b387f9c53b
may-liu/qtalk
win32_dns.erl
%%%---------------------------------------------------------------------- %%% File : win32_dns.erl Author : nt Purpose : Get name servers in a Windows machine Created : 5 Mar 2009 by nt %%% %%% ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne %%% %%% This program is free software; you can redistrib...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/win32_dns.erl
erlang
---------------------------------------------------------------------- File : win32_dns.erl 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...
Author : nt Purpose : Get name servers in a Windows machine Created : 5 Mar 2009 by nt ejabberd , Copyright ( C ) 2002 - 2014 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 co...
b794775afe7f1da9689f1732b3a23180f67cda0907f08a5c9eb6584359580ea8
grin-compiler/grin
TrivialCaseEliminationSpec.hs
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Transformations.Optimising.TrivialCaseEliminationSpec where import Transformations.Optimising.TrivialCaseElimination import Test.Hspec import Grin.TH import Test.Test hiding (newVar) import Test.Assertions runTests :: IO () runTests = hspec spec sp...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Transformations/Optimising/TrivialCaseEliminationSpec.hs
haskell
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Transformations.Optimising.TrivialCaseEliminationSpec where import Transformations.Optimising.TrivialCaseElimination import Test.Hspec import Grin.TH import Test.Test hiding (newVar) import Test.Assertions runTests :: IO () runTests = hspec spec sp...
660b68517643ffd7a8ee202ef32e004fa6d38dbb87c2934f845661c64bd640df
shayan-najd/QFeldspar
CDSL.hs
module Examples.IPGray.CDSL where import Prelude hiding (Int,pi,div,foldl,map) import QFeldspar.CDSL redCoefficient :: Dp Word32 redCoefficient = 30 greenCoefficient :: Dp Word32 greenCoefficient = 59 blueCoefficient :: Dp Word32 blueCoefficient = 11 rgbToGray :: Dp Word32 -> Dp Word32 -> Dp Word32 -> Dp Word32 ...
null
https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/Examples/IPGray/CDSL.hs
haskell
module Examples.IPGray.CDSL where import Prelude hiding (Int,pi,div,foldl,map) import QFeldspar.CDSL redCoefficient :: Dp Word32 redCoefficient = 30 greenCoefficient :: Dp Word32 greenCoefficient = 59 blueCoefficient :: Dp Word32 blueCoefficient = 11 rgbToGray :: Dp Word32 -> Dp Word32 -> Dp Word32 -> Dp Word32 ...
e89adbee534c7fd202c1b59fd99e0304f83e8bb0d2ade2e3fd109be01a9f321d
AdRoll/rebar3_hank
unnecessary_function_arguments_SUITE.erl
-module(unnecessary_function_arguments_SUITE). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export([with_warnings/1, without_warnings/1, macros/1, ignore/1, ignore_config/1, ct_suite/1]). all() -> [with_warnings, without_warnings, macros, ignore, ct_suite]. init_per_testcase(_, Config) ->...
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/6035f08e74c694ae56c4c9382e74303e7b3e9018/test/unnecessary_function_arguments_SUITE.erl
erlang
@doc No warnings since rebar.config specifically states that all of them should be ignored. @doc Common Test suites should be ignored
-module(unnecessary_function_arguments_SUITE). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export([with_warnings/1, without_warnings/1, macros/1, ignore/1, ignore_config/1, ct_suite/1]). all() -> [with_warnings, without_warnings, macros, ignore, ct_suite]. init_per_testcase(_, Config) ->...
19c23ef7059af2f59fe199939fed3efb4a1b84a14dca34d6d9731cc7c1baa2d4
gheber/kenzo
suspensions-test.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - * (in-package :kenzo-test-7) (in-suite :kenzo-7) (test suspension-cmpr (cat-7:cat-init) (let* ((cc (cat-7:deltab)) (cmpr (cat-7:suspension-cmpr (cat-7:cmpr cc)))) (is (equal :equal (funcall cmpr :s-bsgn :s-bsgn))) ...
null
https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/test/kenzo-7/suspensions-test.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 - *
(in-package :kenzo-test-7) (in-suite :kenzo-7) (test suspension-cmpr (cat-7:cat-init) (let* ((cc (cat-7:deltab)) (cmpr (cat-7:suspension-cmpr (cat-7:cmpr cc)))) (is (equal :equal (funcall cmpr :s-bsgn :s-bsgn))) (is (equal :greater (funcall cmpr 6 5))))) (test suspension-ba...
fe50e9d9574adc3aeb2338ec798cb96bf9d1a37f71f4e7ad6a944b35e86b2fbd
clarle/ai-class
trees.clj
(ns unit02.test.trees (:use [unit02.trees]) (:use [clojure.test])) (def tree-1 (node :a [(node :b [(node :d []) (node :e [])]) (node :c [(node :f []) (node :g [])])])) (def tree-2 (node :a [(node :b [(node :d []) ...
null
https://raw.githubusercontent.com/clarle/ai-class/44ca6d34380942600fb3a61a09e6a2dc4a4841c1/unit02/clojure/unit02/test/unit02/test/trees.clj
clojure
(ns unit02.test.trees (:use [unit02.trees]) (:use [clojure.test])) (def tree-1 (node :a [(node :b [(node :d []) (node :e [])]) (node :c [(node :f []) (node :g [])])])) (def tree-2 (node :a [(node :b [(node :d []) ...
5754b43e6166943468a3f9e5d061decf57f9019f77a6163acefa9f28756b57b9
lsevero/clj-xlsxio
read_test.clj
(ns clj-xlsxio.read-test (:require [clj-xlsxio.read :as sut] [clojure.test :refer [deftest is testing]] [clojure.java.io :as io] [clojure.string :as st])) (deftest read-xlsx (testing "basic reading from string filename" (let [res (sut/read-xlsx "examples/test.xlsx")] (...
null
https://raw.githubusercontent.com/lsevero/clj-xlsxio/5609b04258db74ea5ef673fb9fdca64400fc3495/test/clj_xlsxio/read_test.clj
clojure
(ns clj-xlsxio.read-test (:require [clj-xlsxio.read :as sut] [clojure.test :refer [deftest is testing]] [clojure.java.io :as io] [clojure.string :as st])) (deftest read-xlsx (testing "basic reading from string filename" (let [res (sut/read-xlsx "examples/test.xlsx")] (...
7ee9f4b1296892a766530b1a21960e4997a3102eccbdcaff5c06ffc631508e3f
spechub/Hets
Conversion.hs
| Module : ./atermlib / src / ATerm / Conversion.hs Description : the class ShATermConvertible and basic instances Copyright : ( c ) , , Uni Bremen 2002 - 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - port...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/atermlib/src/ATerm/Conversion.hs
haskell
functions for conversion to an ATermTable some instances -----------------------------------------------
| Module : ./atermlib / src / ATerm / Conversion.hs Description : the class ShATermConvertible and basic instances Copyright : ( c ) , , Uni Bremen 2002 - 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - port...
a62774c350c1e0ce702df1a92538f6694c52c19c5d7e6c1dbaba6517a0652371
padsproj/pads-haskell
DFAC.hs
# LANGUAGE TypeFamilies , ScopedTypeVariables , DeriveDataTypeable , MultiParamTypeClasses , TypeSynonymInstances , TemplateHaskell , QuasiQuotes , FlexibleInstances , FlexibleContexts , RecordWildCards ...
null
https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/examples/DFAC.hs
haskell
accepts all caaats with each character followed by a consistent number: _ -- > S1 S1 -- c --> S2 S2 -- a --> S3 S3 -- a --> S3 S3 -- t --> ACCEPT s1 -- c --> s2 s2 -- a --> s3 s3 -- a --> s3 s3 -- t --> s4
# LANGUAGE TypeFamilies , ScopedTypeVariables , DeriveDataTypeable , MultiParamTypeClasses , TypeSynonymInstances , TemplateHaskell , QuasiQuotes , FlexibleInstances , FlexibleContexts , RecordWildCards ...
ac254c82e9ff31fbd3aef9d50a5e98044948d61ce943756885cdeb9d7cd0a317
hyperfiddle/electric
subs2.cljc
(ns dustin.rosie.subs2 (:require [clojure.spec.alpha :as s] [datascript.core :as d] [hyperfiddle.api :as hf :refer [hfql]] [hfdl.lang :as p] [hyperfiddle.photon-dom :as dom] [hyperfiddle.rcf :as rcf :refer [tests tap %]] [missionary.core :as m] ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/hfql/subs2.cljc
clojure
(ns dustin.rosie.subs2 (:require [clojure.spec.alpha :as s] [datascript.core :as d] [hyperfiddle.api :as hf :refer [hfql]] [hfdl.lang :as p] [hyperfiddle.photon-dom :as dom] [hyperfiddle.rcf :as rcf :refer [tests tap %]] [missionary.core :as m] ...
afc9b4cea6a5aca6e35d7804b6be98aa9c0d62b4bc814f57abf946e40f0781ca
janestreet/krb
cache_type.mli
open! Core * Types [ API ] and [ MSLSA ] are only supported on Windows . [ KEYRING ] is only supported on Linux Linux *) type t = | API | DIR | FILE | KEYRING | MEMORY | MSLSA [@@deriving compare, enumerate, sexp_of] include Stringable.S with type t := t module Stable : sig module V1 : Stable...
null
https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/cache_type.mli
ocaml
open! Core * Types [ API ] and [ MSLSA ] are only supported on Windows . [ KEYRING ] is only supported on Linux Linux *) type t = | API | DIR | FILE | KEYRING | MEMORY | MSLSA [@@deriving compare, enumerate, sexp_of] include Stringable.S with type t := t module Stable : sig module V1 : Stable...
066e8a670ea114f166cb14bb6e9f97ef5bfea7c5d56071529bcef10b74d2c855
onyx-platform/onyx-starter
dev_system.clj
(ns onyx-starter.launcher.dev-system (:require [clojure.core.async :refer [chan <!!]] [clojure.java.io :refer [resource]] [com.stuartsierra.component :as component] [onyx.plugin.core-async] [onyx.api])) (defrecord OnyxDevEnv [n-peers] component/Lifecycle (start [c...
null
https://raw.githubusercontent.com/onyx-platform/onyx-starter/d9f0cf5095e7b4089c1e3b708b7691d8184cb36b/src/onyx_starter/launcher/dev_system.clj
clojure
(ns onyx-starter.launcher.dev-system (:require [clojure.core.async :refer [chan <!!]] [clojure.java.io :refer [resource]] [com.stuartsierra.component :as component] [onyx.plugin.core-async] [onyx.api])) (defrecord OnyxDevEnv [n-peers] component/Lifecycle (start [c...
a0893fd9eccc2756620eae5185bbcd1364a91e2455c12e43d2c1d109c3a8153c
2600hz-archive/whistle
gm_soak_test.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/gm_soak_test.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ---------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved . -module(gm_so...
786574b6a579b71b03d1959b688b46f887452145a5305583483ecb1e66ce61c9
habit-lang/alb
Surface.hs
{-# LANGUAGE TypeSynonymInstances #-} -- For Printable Id instance module Printer.Surface (module Printer.Surface, Printable(..), quoted) where import Prelude hiding ((<$>)) import Data.Char import qualified Data.Map as Map import Data.Maybe (isJust) import Printer.Common hiding (printInfix) import Syntax.Su...
null
https://raw.githubusercontent.com/habit-lang/alb/567d4c86194a884cc1ceeffca9663211de2d554c/src/Printer/Surface.hs
haskell
# LANGUAGE TypeSynonymInstances # For Printable Id instance this is probably wrong
module Printer.Surface (module Printer.Surface, Printable(..), quoted) where import Prelude hiding ((<$>)) import Data.Char import qualified Data.Map as Map import Data.Maybe (isJust) import Printer.Common hiding (printInfix) import Syntax.Surface as Surface isOperator (Ident s@(c:_) 0 _) = s /= "()" && no...
965d68eea4d10a672e8568837a7a48fc01e172e45795e9dc4ded7d3a9df04c97
exercism/babashka
run_length_encoding.clj
(ns run-length-encoding) (defn run-length-encode "encodes a string with run-length-encoding" [s] (apply str (for [x (partition-by identity s)] (str (when-not (= 1 (count x)) (count x)) (first x))))) (defn run-length-decode "decodes a run-length-encoded string" [s] ...
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/run-length-encoding/src/run_length_encoding.clj
clojure
(ns run-length-encoding) (defn run-length-encode "encodes a string with run-length-encoding" [s] (apply str (for [x (partition-by identity s)] (str (when-not (= 1 (count x)) (count x)) (first x))))) (defn run-length-decode "decodes a run-length-encoded string" [s] ...
a5d724f1c4527c3899df76953580435330fd67aaa25721118ec46409d5dd7403
hidaris/thinking-dumps
tests.rkt
#lang racket (provide test-list) ;;;;;;;;;;;;;;;; tests ;;;;;;;;;;;;;;;; (define test-list '( ;; simple arithmetic (positive-const "11" 11) (negative-const "-33" -33) (simple-arith-1 "(- 44 33)" 11) ;; nested arithmetic (nested-arith-left "(- (- 44 33) 22)" -11) (n...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-24/tests.rkt
racket
tests ;;;;;;;;;;;;;;;; simple arithmetic nested arithmetic simple variables simple unbound variables simple conditionals test dynamic typechecking make sure that the test and both arms get evaluated properly. and make sure the other arm doesn't get evaluated. simple let check nested let and shadowing
#lang racket (provide test-list) (define test-list '( (positive-const "11" 11) (negative-const "-33" -33) (simple-arith-1 "(- 44 33)" 11) (nested-arith-left "(- (- 44 33) 22)" -11) (nested-arith-right "(- 55 (- 22 11))" 44) (test-var-1 "x" 10) (test-var-2 "(- x 1)" ...
f44287d9f538670837653619f14863ae32c46a03ab775bf21526d0871419c13f
ammarhakim/gkylcas
basisSer2x.lisp
;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- (in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X $Y)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (9. "/Users/ahakim/research/gkyl-project/gkyl/cas-scripts/basis-precalc/basis-pre-cdim-calc.mac" ...
null
https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g2/basis-precalc/basisSer2x.lisp
lisp
-*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X $Y)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (9. "/Users/ahakim/research/gkyl-project/gkyl/cas-scripts/basis-precalc/basis-pre-cdim-calc.mac" SRC |$writeBasisToFile| 7.)) ((MLIST SIM...
6ae3bf033e065f508e96d129cbdc49af1ebb50b9b20f42d6b17322810569f628
quark-lang/quark
Environment.hs
module Core.Macro.Initializing.Environment where import Core.Macro.Definition import Core.Parser.AST import qualified Data.Map as M isID :: Expression -> Bool isID (Identifier _) = True isID _ = False identifiers :: [Expression] -> [String] identifiers e = map (\(Identifier s) -> s) e' where e' = ...
null
https://raw.githubusercontent.com/quark-lang/quark/40515ef28d46cd2d43227f6a54ab3e0a7228e4a2/app/Core/Macro/Initializing/Environment.hs
haskell
module Core.Macro.Initializing.Environment where import Core.Macro.Definition import Core.Parser.AST import qualified Data.Map as M isID :: Expression -> Bool isID (Identifier _) = True isID _ = False identifiers :: [Expression] -> [String] identifiers e = map (\(Identifier s) -> s) e' where e' = ...
f32357397f4c9b30537b47962a2b956d5de0193ef03bf3bb8416dede3ff60d57
robashton/cravendb
inflight_spec.clj
(ns cravendb.inflight-spec (:use [speclj.core] [cravendb.testing] [cravendb.core]) (:require [cravendb.vclock :as v] [cravendb.documents :as docs] [cravendb.storage :as s] [cravendb.inflight :as inflight] [me.raynes.fs :as fs] )) (describe "In-flight transactions" (wit...
null
https://raw.githubusercontent.com/robashton/cravendb/461e80c7c028478adb4287922db6ee4d2593a880/spec/cravendb/inflight_spec.clj
clojure
(ns cravendb.inflight-spec (:use [speclj.core] [cravendb.testing] [cravendb.core]) (:require [cravendb.vclock :as v] [cravendb.documents :as docs] [cravendb.storage :as s] [cravendb.inflight :as inflight] [me.raynes.fs :as fs] )) (describe "In-flight transactions" (wit...
78e32c40e0591a1ef5ddb36249455c578e52856fe03ea071f08250653edcccaf
esl/MongooseIM
ejabberd_auth_jwt.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_auth_jwt.erl Author : < > %%% Purpose : Authentification with JSON Web Tokens Created : 02 Aug 2016 by < > %%% %%% MongooseIM , Copyright ( C ) 2016 CostaDigital %%% %%% This program is free software; you ca...
null
https://raw.githubusercontent.com/esl/MongooseIM/b47f7872d33523841057c77626b5b5776d8a9ffb/src/auth/ejabberd_auth_jwt.erl
erlang
---------------------------------------------------------------------- File : ejabberd_auth_jwt.erl Purpose : Authentification with JSON Web Tokens 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 wi...
Author : < > Created : 02 Aug 2016 by < > MongooseIM , Copyright ( C ) 2016 CostaDigital 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 License Foundation...
c7f988dda857bb9f5464b4cb164a2235ddd52c2607079ef7abfd03a610622d9a
chetmurthy/pa_ppx
tsort0.ml
type 'a edges_t = {mutable edges: 'a list} type 'a hash_adj_t = ('a, 'a edges_t) Hashtbl.t let nodes edgl = let s = Hashtbl.create 23 in let nodes = ref [] in let chkadd n = if not(Hashtbl.mem s n) then begin Hashtbl.add s n (); nodes := n :: !nodes end in List.iter (fun (a,b) -> chkadd a; chka...
null
https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/util-lib/tsort0.ml
ocaml
type 'a edges_t = {mutable edges: 'a list} type 'a hash_adj_t = ('a, 'a edges_t) Hashtbl.t let nodes edgl = let s = Hashtbl.create 23 in let nodes = ref [] in let chkadd n = if not(Hashtbl.mem s n) then begin Hashtbl.add s n (); nodes := n :: !nodes end in List.iter (fun (a,b) -> chkadd a; chka...
c334ef81d186ad646cc43a3c2ee51939d6b8f388bc89098696db4d3902e9e212
JustusAdam/language-haskell
Ticks.hs
SYNTAX TEST " source.haskell " " Ticks in various positions " x = Tt_'_.T_'__t' T'D_'.C T_'ttt_'t_' T'x T_x T_'_ ^^^^^^ ^^^^^^ entity.name.namespace.haskell ^^^^^^^ ^ ^^^^ constant.other.haskell -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - invalid x = a `Tt_'_.T_'__t...
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tests/Ticks.hs
haskell
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - invalid ^^^^^^ ^^^^^^ entity.name.namespace.haskell ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ - entity.name.namespace.haskell constant.other.haskell ^^^^^^^ - invalid ^ ^ ...
SYNTAX TEST " source.haskell " " Ticks in various positions " x = Tt_'_.T_'__t' T'D_'.C T_'ttt_'t_' T'x T_x T_'_ ^^^^^^ ^^^^^^ entity.name.namespace.haskell ^^^^^^^ ^ ^^^^ constant.other.haskell x = a `Tt_'_.T_'__t'` b `T'D_'.C` c `T_'ttt_'t_'` d `T'x` e `T_x` f `T_'_` ...
8c047e22c568a11aacb2f97d176c711fb56f166da7d12c145687d2e13044c0c3
dterei/SafeHaskellExamples
ExpDicts_Sub.hs
# LANGUAGE RoleAnnotations # # LANGUAGE IncoherentInstances # module ExpDicts_Sub ( MEQ(..), normMEQ ) where -- Requires we explicitly use representational type role MEQ representational class MEQ a where { meq :: a -> a -> Bool } instance MEQ Char where { meq _ _ = True } normMEQ :: MEQ a => a -> a -> Boo...
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/roles2/ExpDicts_Sub.hs
haskell
Requires we explicitly use representational
# LANGUAGE RoleAnnotations # # LANGUAGE IncoherentInstances # module ExpDicts_Sub ( MEQ(..), normMEQ ) where type role MEQ representational class MEQ a where { meq :: a -> a -> Bool } instance MEQ Char where { meq _ _ = True } normMEQ :: MEQ a => a -> a -> Bool normMEQ a b = a `meq` b
4fc30a07d06cd0c5da4d2c91ca5765cbadcee676ea85a4ec8abdacf00dae48c0
conscell/hugs-android
Compiler.hs
# OPTIONS_GHC -cpp # ----------------------------------------------------------------------------- -- | -- Module : Distribution.Compiler Copyright : 2003 - 2004 -- Maintainer : < > -- Stability : alpha -- Portability : portable -- Haskell implementations . All rights reserved . Red...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/Cabal/Distribution/Compiler.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Compiler Stability : alpha Portability : portable * Support for language extensions ------------------------------------------------------------ * Command Line Types and Exports ---------------------...
# OPTIONS_GHC -cpp # Copyright : 2003 - 2004 Maintainer : < > Haskell implementations . All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source...
08f9125470e03b18a5800d44bae64901013147cd981c9a7ebb921bf15ab5aa5b
jackfirth/racket-mock
util-doc.rkt
#lang sweet-exp racket/base provide args-tech behavior-tech define-behavior-tech define-mock-tech define-opaque-tech define-persistent-mock-examples define-stub-tech mock-examples mock-tech opaque-tech parameter-tech stub-tech for-label all-from-out mock racket/base ...
null
https://raw.githubusercontent.com/jackfirth/racket-mock/5e8e2a1dd125e5e437510c87dabf903d0ec25749/mock/private/util-doc.rkt
racket
#lang sweet-exp racket/base provide args-tech behavior-tech define-behavior-tech define-mock-tech define-opaque-tech define-persistent-mock-examples define-stub-tech mock-examples mock-tech opaque-tech parameter-tech stub-tech for-label all-from-out mock racket/base ...
db3699c33437b6f21cbee754ac7b21953aeccafd555fb0bdc54ab1d8040d9c02
alaricsp/chicken-scheme
locative-stress-test.scm
locative-stress-test.scm - by (declare (usual-integrations)) ;(set-gc-report! #t) (require-extension srfi-1) #> long *ptrs[10]; if(!C_in_stackp((C_word)o##n ) & & ! C_in_fromspacep((C_word)o##n ) ) C_dbg_hook(0 ) ; #define check(n) long fill_10(long i, long *o0, long *o1, long *o2, long *o3, long *o4, ...
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/tests/locative-stress-test.scm
scheme
(set-gc-report! #t)
locative-stress-test.scm - by (declare (usual-integrations)) (require-extension srfi-1) #> #define check(n) long fill_10(long i, long *o0, long *o1, long *o2, long *o3, long *o4, long *o5, long *o6, long *o7, long *o8, long *o9) { check(0) check(1) check(2) check(3) check(4) check(5)...
8b7330df5fa493244f10d2ad9ab5a7ca27f44a850fc8ab31ab2d13ddef9423d8
theHamsta/petalisp-cuda
petalisp.lisp
(defpackage petalisp-cuda.utils.petalisp (:use :cl :petalisp.ir :petalisp) (:export :pass-as-scalar-argument-p :scalar-buffer-p)) (in-package petalisp-cuda.utils.petalisp) (defun scalar-buffer-p (buffer) (= 0 (shape-rank (buffer-shape buffer)))) (defun pass-as-scalar-argument-p (buff...
null
https://raw.githubusercontent.com/theHamsta/petalisp-cuda/12b9ee426e14edf492d862d5bd2dbec18ec427c6/src/utils/petalisp.lisp
lisp
we pass the arguments with a pointer array right now
(defpackage petalisp-cuda.utils.petalisp (:use :cl :petalisp.ir :petalisp) (:export :pass-as-scalar-argument-p :scalar-buffer-p)) (in-package petalisp-cuda.utils.petalisp) (defun scalar-buffer-p (buffer) (= 0 (shape-rank (buffer-shape buffer)))) (defun pass-as-scalar-argument-p (buff...
ffffd6d5a86f74a88bc2cfa38213eeec4cde9c2ecf3fde9a900dd51b490bdd5e
thierry-martinez/clangml
special_bindings.ml
[%%metapackage "metapp"] [%%metadir "config/.clangml_config.objs/byte"] [%%metaload "config/clangml_config.cmxs"] open Clang__bindings [%%meta Metapp.Stri.of_list ( if Clangml_config.version >= { major = 7; minor = 0; subminor = 0 } then [%str external get_token : cxtranslationunit -> cxsourcelocation -> ...
null
https://raw.githubusercontent.com/thierry-martinez/clangml/d9501e74ea48d066eeba147fdcf9aeb3408c778f/clangml/special_bindings.ml
ocaml
* Get the raw lexical token starting with the given location. * Tokenize the source code described by the given range into raw lexical tokens.
[%%metapackage "metapp"] [%%metadir "config/.clangml_config.objs/byte"] [%%metaload "config/clangml_config.cmxs"] open Clang__bindings [%%meta Metapp.Stri.of_list ( if Clangml_config.version >= { major = 7; minor = 0; subminor = 0 } then [%str external get_token : cxtranslationunit -> cxsourcelocation -> ...
8c1b9b954f6e87e7c31af96b5120b653b3bd2131c6aa82edba6da6e37225cb27
namin/clpsmt-miniKanren
full-interp-extended-tests.scm
(load "mk.scm") (load "z3-driver.scm") (load "test-check.scm") (load "full-interp-extended.scm") (test "evalo-simple-let-a" (run* (q) (evalo '(let ((foo (+ 1 2))) (* foo foo)) q)) '(9)) symbolic execution example from slide 7 of slides on symbolic execution ( contains contents from ;;; slides) ;;;...
null
https://raw.githubusercontent.com/namin/clpsmt-miniKanren/4fa74fb973c95b7913f0e0239852f18a23073ccc/full-interp-extended-tests.scm
scheme
slides) -SymExec.pdf } x y z x y z x y z old tests: slowish remember the quote! slowish remember the quote! slowish takes a while time to get interesting!
(load "mk.scm") (load "z3-driver.scm") (load "test-check.scm") (load "full-interp-extended.scm") (test "evalo-simple-let-a" (run* (q) (evalo '(let ((foo (+ 1 2))) (* foo foo)) q)) '(9)) symbolic execution example from slide 7 of slides on symbolic execution ( contains contents from 1 . int a =...
f50384317c02aae8cb23550c0f975d3a3f7884e822464940362d5e041e482773
reasonml/reason
utils.ml
let const c = fun _ -> c let group_assoc l = let cons k v acc = (k, List.rev v) :: acc in let rec aux k v vs acc = function | [] -> List.rev (cons k (v :: vs) acc) | (k', v') :: xs when compare k k' = 0 -> if compare v v' = 0 then aux k v vs acc xs else aux k v' (v :: vs) acc xs...
null
https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/src/menhir-recover/utils.ml
ocaml
let const c = fun _ -> c let group_assoc l = let cons k v acc = (k, List.rev v) :: acc in let rec aux k v vs acc = function | [] -> List.rev (cons k (v :: vs) acc) | (k', v') :: xs when compare k k' = 0 -> if compare v v' = 0 then aux k v vs acc xs else aux k v' (v :: vs) acc xs...
ece76d617a8bc4e3d4c63d3b0dd51635705f94bb26b2c1bc6d6a62e2218d8ff2
synrc/nitro
element_date.erl
-module(element_date). -author('Vladimir Galunshchikov'). -include_lib("nitro/include/nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). render_element(Record) when Record#date.show_if==false -> [<<>>]; render_element(Record) -> Id = case Record#date.postback of [] -> Record#date.i...
null
https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/input/element_date.erl
erlang
global spec
-module(element_date). -author('Vladimir Galunshchikov'). -include_lib("nitro/include/nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). render_element(Record) when Record#date.show_if==false -> [<<>>]; render_element(Record) -> Id = case Record#date.postback of [] -> Record#date.i...
93e6d1979cc9f5ecc4e3dbb75c8f97beab4071d5bcf4e6633cb710cf8db8d3b2
lisp-korea/sicp2014
ex-1-23.scm
#lang planet neil/sicp make ( next ) procedure returning 2 , 3 , 5 , 7 , ... change ( + test - divisor 1 ) to ( next test - divisor ) (define (square x) (* x x)) (define (smallest-divisor n) (find-divisor n 2)) (define (next n) (if (= n 2) 3 (+ n 2))) (define (find-divisor n test-divisor) (cond ((> (sq...
null
https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/vvalkyrie/1.2/ex-1-23.scm
scheme
-- -- --
#lang planet neil/sicp make ( next ) procedure returning 2 , 3 , 5 , 7 , ... change ( + test - divisor 1 ) to ( next test - divisor ) (define (square x) (* x x)) (define (smallest-divisor n) (find-divisor n 2)) (define (next n) (if (= n 2) 3 (+ n 2))) (define (find-divisor n test-divisor) (cond ((> (sq...
cfbf6e427c17d74f7921768847513c33402e33a38b19356bb10e19e216da3497
cerner/clara-rules
test_memory.cljc
#?(:clj (ns clara.test-memory (:require [clara.tools.testing-utils :refer [def-rules-test] :as tu] [clara.rules :refer [fire-rules insert insert-all insert! ...
null
https://raw.githubusercontent.com/cerner/clara-rules/8107a5ab7fdb475e323c0bcb39084a83454deb1c/src/test/common/clara/test_memory.cljc
clojure
While the memory is tested through rules and queries, rather than direct unit tests on the memory, the intent of these tests is to create patterns in the engine that cover edge cases and other paths of concern in clara.rules.memory. This test are here to verify -rules/issues/303 Do not batch insert to expose any S...
#?(:clj (ns clara.test-memory (:require [clara.tools.testing-utils :refer [def-rules-test] :as tu] [clara.rules :refer [fire-rules insert insert-all insert! ...
c7e7daa3ba238ed49bd87d980de5cf3185243ca1532880305f9ee41e9203e986
freedesktop/bustle
Util.hs
# LANGUAGE ForeignFunctionInterface # Bustle . Util : miscellaneous utility functions Copyright © 2008–2012 Collabora Ltd. This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either ...
null
https://raw.githubusercontent.com/freedesktop/bustle/e506b5ca71e14af3d2ebd0a63c1b8d3ea0fb1795/Bustle/Util.hs
haskell
You probably don't actually want to use this function. Escape hatch to log a value from a non-IO monadic context. Log a warning which isn't worth showing to the user, but which might interest someone debugging the application. Shorthand for liftIO.
# LANGUAGE ForeignFunctionInterface # Bustle . Util : miscellaneous utility functions Copyright © 2008–2012 Collabora Ltd. This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either ...
19f4065bec4ca43ad771cda23fc41dc3a016fe818253fc31f4265834db6e105a
gmartinezramirez/USACH-Paradigmas-Programacion
aplicacion-listas.rkt
#lang racket ( member ? ( list 1 2 3 ) 3 ) return : # t ( member ? ( list 1 2 3 ) 5 ) return : # f ; Recursion natural (define member? (lambda (lst x) (cond [(null? lst) #f] [(eq? (car lst) x) #t] [else (member? (cdr lst) x)]))) ; Sin recursion ( insert - tail - sin - duplicado (...
null
https://raw.githubusercontent.com/gmartinezramirez/USACH-Paradigmas-Programacion/e1fdfe7501a156e2e17fcefb8e30068cee3fb44f/2021-02/01-FP/aplicacion-listas.rkt
racket
Recursion natural Sin recursion Recursion natural No especifica QUE debe ser con recursion natural Tipo de recursion: recursion natural '(1 2 3 4 50)
#lang racket ( member ? ( list 1 2 3 ) 3 ) return : # t ( member ? ( list 1 2 3 ) 5 ) return : # f (define member? (lambda (lst x) (cond [(null? lst) #f] [(eq? (car lst) x) #t] [else (member? (cdr lst) x)]))) ( insert - tail - sin - duplicado ( list 1 2 3 ) 3 ) ( insert - tail ...
a40a59417ddbe65a40aa9e7e37ed6da08e4a88f70c5fbe70c934458f267973bc
thma/PolysemyCleanArchitecture
StaticConfigProvider.hs
module ExternalInterfaces.StaticConfigProvider ( runStaticConfigProvider ) where import InterfaceAdapters.Config import ExternalInterfaces.ConfigProvider import Polysemy (Embed, Member, Sem, embed, interpret) -- | just provides a static config instance runStaticConfigProvider :: (Member (Embed IO) r) => Sem (Con...
null
https://raw.githubusercontent.com/thma/PolysemyCleanArchitecture/3bb375a30bcbf35c9df62802902e0faa03e3f03d/src/ExternalInterfaces/StaticConfigProvider.hs
haskell
| just provides a static config instance | load application config. In real life, this would load a config file or read commandline args.
module ExternalInterfaces.StaticConfigProvider ( runStaticConfigProvider ) where import InterfaceAdapters.Config import ExternalInterfaces.ConfigProvider import Polysemy (Embed, Member, Sem, embed, interpret) runStaticConfigProvider :: (Member (Embed IO) r) => Sem (ConfigProvider : r) a -> Sem r a runStaticConfi...
f82a46991a9a60aef6b8ac5d78ffb18a2a7ac14fcea1d8bdaca172f28e759f8a
gedge-platform/gedge-platform
amqp_auth_mechanisms.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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% @private -module(amqp_auth_mechanisms). -inclu...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp_client/src/amqp_auth_mechanisms.erl
erlang
---------------------------------------------------------------------------
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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . @private -module(amqp_auth_mechanisms). -include("am...
b12c1e8592a8a16d2bdfd1de4105a15b0e9880d3c682542d2e5c17128bb581e0
datacrypt-project/hitchhiker-tree
core.cljc
(ns hitchhiker.tree.core (:refer-clojure :exclude [compare resolve subvec]) (:require [clojure.core.rrb-vector :refer [catvec subvec]] #?(:clj [clojure.pprint :as pp]) #?(:clj [clojure.core.async :refer [go chan put! <! <!! promise-chan] :as async] :cljs [...
null
https://raw.githubusercontent.com/datacrypt-project/hitchhiker-tree/f7d0f926541d7cb31fac11c2d2245c5bac451b86/src/hitchhiker/tree/core.cljc
clojure
core.async helpers core code TODO maybe this is a good protocol? how to track dirty bits... could model w/ monad (ground state dirty unless loaded from storage), gets cleaned after each flush-flood individual nodes must be flushable A storage backend must be able to take a node as arg, serialize, assign add...
(ns hitchhiker.tree.core (:refer-clojure :exclude [compare resolve subvec]) (:require [clojure.core.rrb-vector :refer [catvec subvec]] #?(:clj [clojure.pprint :as pp]) #?(:clj [clojure.core.async :refer [go chan put! <! <!! promise-chan] :as async] :cljs [...
2209e13eebe707773baaa2179508e48f31b8e06209b5c3d7c6874b5af83da71a
jaked/orpc
server_impl.ml
let rec lst_map f l = match l with | `Nil -> `Nil | `Cons (a,l) -> `Cons (f a, lst_map f l) module Sync = struct type 'a _r = 'a let add1 i = i + 1 let add1_list l = List.map (fun i -> i + 1) l let add1_pair (a, b) = (a + 1, b + 1) let add1_r { Types.fst = f; snd = s; trd = t } = { Ty...
null
https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/examples/external/server_impl.ml
ocaml
let rec lst_map f l = match l with | `Nil -> `Nil | `Cons (a,l) -> `Cons (f a, lst_map f l) module Sync = struct type 'a _r = 'a let add1 i = i + 1 let add1_list l = List.map (fun i -> i + 1) l let add1_pair (a, b) = (a + 1, b + 1) let add1_r { Types.fst = f; snd = s; trd = t } = { Ty...
91ee1cad3166994c8f26b55f17f74697b2c5c51c0c82c677b7aa4e4b8be29031
evdubs/chart-simulator
descending-triangle.rkt
#lang racket/base (require racket/stream racket/vector "../structs.rkt" "../technical-indicators.rkt") (provide descending-triangle-execution) (struct descending-triangle-in (dohlc sma-20 sma-20-slope sma-50 sma-50-slope satr-50 dc-25-high dc-25-low dc-25-prev-hig...
null
https://raw.githubusercontent.com/evdubs/chart-simulator/a615e2a5c05a73bd712fdf6d7070a83d354754a8/strategy/descending-triangle.rkt
racket
timeframe entry stop target position history market data inputs satisfactory conditions no longer exist for entry satisfactory conditions exist for entry and open price leads to execution satisfactory conditions exist for entry and price range leads to execution have position and open above stop have position ...
#lang racket/base (require racket/stream racket/vector "../structs.rkt" "../technical-indicators.rkt") (provide descending-triangle-execution) (struct descending-triangle-in (dohlc sma-20 sma-20-slope sma-50 sma-50-slope satr-50 dc-25-high dc-25-low dc-25-prev-hig...
513cb6b10796be511950a47b257f1d0ab532501640c9dad028fc95c05816d5e3
simplegeo/erlang
string_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2004 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/string_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 limita...
Copyright Ericsson AB 2004 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(string_SUITE). -include("test_serve...
442a0a68af0c9ae7ebf33ed07e5a964198177478454372ee0286cf47283ab1e1
wujuihsuan2016/LL_prover
formula.ml
(*** Basic definitions of formulas, sequents and rules ***) (** Definition of formulas of propositional linear logic **) type atom = string type formula = | Pos of atom | Neg of atom | One | Zero | Top | Bottom | OfCourse of formula | Whynot of formula | Tensor of formula * formula | Plus of fo...
null
https://raw.githubusercontent.com/wujuihsuan2016/LL_prover/c55f59d27824d3685f41ed554c2e7d4f8e3e6e47/src/formula.ml
ocaml
** Basic definitions of formulas, sequents and rules ** * Definition of formulas of propositional linear logic * * LLF * * ILLF * * LL *
type atom = string type formula = | Pos of atom | Neg of atom | One | Zero | Top | Bottom | OfCourse of formula | Whynot of formula | Tensor of formula * formula | Plus of formula * formula | With of formula * formula | Par of formula * formula | Impl of formula * formula type llf_rule ...
fc1121ef9c564a458c599f29bbdba7fd034ce84c9093a2f298f5ea87f7d718a9
skogsbaer/HTF
TestTypes.hs
# LANGUAGE FlexibleInstances # -- Copyright ( c ) 2005 - 2022 - -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/skogsbaer/HTF/a42450c89b7a3a3a50e381f36de3ac28faab2a16/Test/Framework/TestTypes.hs
haskell
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU...
# LANGUAGE FlexibleInstances # Copyright ( c ) 2005 - 2022 - License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 3...
c5a3b063c69d513b83e4ca09da8940ce41bfd16db1c4fd9abb652c8a3edc3586
aryx/xix
dev_textual_window.ml
open Common open Device module W = Window module T = Terminal let dev_text = { Device.default with name = "text"; perm = Plan9.r; read_threaded = (fun offset count w -> let term = w.W.terminal in let str = String.create term.T.nrunes in for i = 0 to term.T.nrunes - 1 do str.[i] <- term.T.text...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/windows/dev_textual_window.ml
ocaml
open Common open Device module W = Window module T = Terminal let dev_text = { Device.default with name = "text"; perm = Plan9.r; read_threaded = (fun offset count w -> let term = w.W.terminal in let str = String.create term.T.nrunes in for i = 0 to term.T.nrunes - 1 do str.[i] <- term.T.text...
0f0f7144b643052662f5185f1e9fbb57d52c073c463f98783d77ea567aca78be
FrancoisMalan/DivideScannedImages
DivideScannedImages.scm
; DivideScannedImages.scm by Based on a script originally by ; ; Locates each separate element in an image and creates a new image from each. if option is selected , will call the deskew plugin by ( if it is installed ) on each item ; ; License: ; ; This program is free software; you can redistribute it a...
null
https://raw.githubusercontent.com/FrancoisMalan/DivideScannedImages/51e8f3983feeeeec4e2e3b3b00c5a06020e3e22b/DivideScannedImages.scm
scheme
DivideScannedImages.scm Locates each separate element in an image and creates a new image from each. License: This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distributed in the hope that it will be ...
by Based on a script originally by if option is selected , will call the deskew plugin by ( if it is installed ) on each item it under the terms of the GNU General Public License as published by The GNU Public License is available at (define (script_fu_DivideScannedImages img inLayer inSquareCrop inP...
0883a8f2b53666dc3cbe83ed4e3ad2937a725538b857a3b8b110923477d50a69
TrustInSoft/tis-interpreter
one_hyp.ml
Modified by TrustInSoft open Cil_types let emitter = Emitter.create "Test" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let emitter2 = Emitter.create "Test2" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let set_status ?(emitter=emitter) p hyps s = Kernel.feedback "SETTING STATUS OF %a ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/report/tests/report/one_hyp.ml
ocaml
*********************************************************************** hyp = never_tried unknown true false *********************************************************************** hyp = considered_valid unknown true false *********************************************************************** hy...
Modified by TrustInSoft open Cil_types let emitter = Emitter.create "Test" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let emitter2 = Emitter.create "Test2" [ Emitter.Property_status ] ~correctness:[] ~tuning:[] let set_status ?(emitter=emitter) p hyps s = Kernel.feedback "SETTING STATUS OF %a ...
e8a9403b043b40c93e1ac6445b0890778ac4aedaf1da6cfad111f8fbf83b25e7
chaw/r7rs-libs
64.body.scm
SRFI 67 : Compare Procedures ;;; $ Id$ ;;; Extensively modified for R6RS , with substantial cleanup for R7RS . Copyright ( c ) 2005 , 2006 Per Bothner ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " )...
null
https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/srfis/gauche/srfi/64.body.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions...
SRFI 67 : Compare Procedures $ Id$ Extensively modified for R6RS , with substantial cleanup for R7RS . Copyright ( c ) 2005 , 2006 Per Bothner files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial...
f6f0d222af2911c6a33b636e4a4b216794da931edcd050396ceaa464e4c76745
ghcjs/jsaddle-dom
HTMLDirectoryElement.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLDirectoryElement (setCompact, getCompact, HTMLDirectoryElement(..), gTypeHTMLDirectoryElement) w...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLDirectoryElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLDirectoryElement (setCompact, getCompact, HTMLDirectoryElement(..), gTypeHTMLDirectoryElement) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, from...
2d34751cb7a19d9fa07c39595c05c2f0a2a87200ec562cf35a5de7ec40d13157
inhabitedtype/ocaml-aws
rejectTransitGatewayPeeringAttachment.ml
open Types open Aws type input = RejectTransitGatewayPeeringAttachmentRequest.t type output = RejectTransitGatewayPeeringAttachmentResult.t type error = Errors_internal.t let service = "ec2" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_stri...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/ec2/lib/rejectTransitGatewayPeeringAttachment.ml
ocaml
open Types open Aws type input = RejectTransitGatewayPeeringAttachmentRequest.t type output = RejectTransitGatewayPeeringAttachmentResult.t type error = Errors_internal.t let service = "ec2" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_stri...
a552ab37147af5dd22520e2409c1771a599326dcfdd3a301212b9276de04a701
jsinglet/cam
Parser.hs
module Parser where import Lexer import Lang import Debug.Trace import Compile Abstract Syntax = = = = = = = = = = = = = = = --------------- --------------- c-- language --------------- e : : = | ident | e1 e2 -- application | e1 op e2 -- binop | [ e1 , e2 ] ...
null
https://raw.githubusercontent.com/jsinglet/cam/bca0e53fe428baf7b5e489569df2355f77ea3484/src/Parser.hs
haskell
------------- ------------- language ------------- application binop pair ------------- ------------- language ------------- application binop pair term xs = expression xs pairs structures lambdas application expression (TokenOpenParen:xs) = let (e1, rest) = expression xs in let (e2, re...
module Parser where import Lexer import Lang import Debug.Trace import Compile Abstract Syntax = = = = = = = = = = = = = = = e : : = | ident | if e1 then e2 else e3 | let { rec } p = e in e | fun p - > e if a > 3 then fun x - > x + 1 else fun x - > x - 1 7 p : : = | ...
d74b48c6da37be671104130a2c69a414bc3ba97937fb2e31b1ff4bbb1e02ba14
input-output-hk/plutus-apps
Client.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # mo...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/8706e6c7c525b4973a7b6d2ed7c9d0ef9cd4ef46/plutus-chain-index-core/src/Cardano/Protocol/Socket/Client.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # | The `Slot` parameter here represents the `current` slot as computed from the current time. There is also the slot where the block was published, which is available from the `C...
# LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Cardano.Protocol.Socket.Client where import Control.Concurrent import Control.Monad.Catch (Handler (..), SomeException (..)) import Data.Aeson...
5b95c03afa83c091982a808258c1a9aaaef7ce702d3f266c079b0d0733c90104
elaforge/karya
DDebug.hs
Copyright 2015 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt | Utilities to debug derivers . These are intended for temporary use via -- "Util.Debug". They're not in a test because I wind up putting them in -- call definitions, and non-test co...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/DDebug.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt "Util.Debug". They're not in a test because I wind up putting them in call definitions, and non-test code can't link test modules.
Copyright 2015 | Utilities to debug derivers . These are intended for temporary use via module Derive.DDebug where import qualified Util.Seq as Seq import qualified Derive.Call.SubT as SubT import qualified Derive.Derive as Derive import qualified Derive.Score as Score import qualified Derive.Stream as Stream ...
c4ff2c65177fcf520903f7395cc6aa2ca15e9a5be4694823f808df4c65bd896d
ocaml-gospel/cameleer
binary_search_tree.ml
module type OrderedType = sig type t val compare : t -> t -> int [@@logic] (*@ axiom is_pre_order: is_pre_order compare *) end module Make (Ord : OrderedType) = struct type elt = Ord.t type t = E | T of t * elt * t @ function occ ( x : elt ) ( t : t ) : integer = match t with | E - > 0 ...
null
https://raw.githubusercontent.com/ocaml-gospel/cameleer/11730187347b171bee4c12ff33b049a476af6b2d/examples/exercises/solutions/binary_search_tree.ml
ocaml
@ axiom is_pre_order: is_pre_order compare @ predicate mem (x: elt) (t: t) = occ x t > 0 @ function min (t: t) : elt @ axiom is_min_empty: forall x r. min (T E x r) = x @ r = min_elt t requires t <> E variant t ensures r = min t
module type OrderedType = sig type t val compare : t -> t -> int [@@logic] end module Make (Ord : OrderedType) = struct type elt = Ord.t type t = E | T of t * elt * t @ function occ ( x : elt ) ( t : t ) : integer = match t with | E - > 0 | T l v r - > occ x l + occ x r + ( ...
fd6e69f75bab31f3e43ab68e7539941da13072e66e10766a9a6f517e552c5953
padsproj/oforest
oopsla.ml
Use Makefile in examples directory : ./desugar.sh oopsla / oopsla.ml Compile : make oopsla This example uses data from : -names-from-social-security-card-applications-national-level-data Use Makefile in examples directory Desugar: ./desugar.sh oopsla/oopsla.ml Compile: make oopsla Th...
null
https://raw.githubusercontent.com/padsproj/oforest/e10abf1c35f6d49d4bdf13d51cab44487629b3a3/examples/oopsla/oopsla.ml
ocaml
Use Makefile in examples directory : ./desugar.sh oopsla / oopsla.ml Compile : make oopsla This example uses data from : -names-from-social-security-card-applications-national-level-data Use Makefile in examples directory Desugar: ./desugar.sh oopsla/oopsla.ml Compile: make oopsla Th...
5ddc76777af6c20b1db1368e1dd82f76f25f49e01038bbb4945e4da30cb0d41c
linuxsoares/artigos-clojure
env.clj
(ns hello-web-app.env (:require [clojure.tools.logging :as log])) (def defaults {:init (fn [] (log/info "\n-=[hello-web-app started successfully]=-")) :stop (fn [] (log/info "\n-=[hello-web-app has shut down successfully]=-")) :middleware identity})
null
https://raw.githubusercontent.com/linuxsoares/artigos-clojure/6c4183e767e71168c778973dd5831e7c9edfaf4a/criando-web-application-clojure/hello-web-app/env/prod/clj/hello_web_app/env.clj
clojure
(ns hello-web-app.env (:require [clojure.tools.logging :as log])) (def defaults {:init (fn [] (log/info "\n-=[hello-web-app started successfully]=-")) :stop (fn [] (log/info "\n-=[hello-web-app has shut down successfully]=-")) :middleware identity})
ba4b9114d94e103de394520d8cc48d6209a41ce2576f5f52812265dee61fc611
Incanus3/ExiL
examples-clips.lisp
(in-package :exil-user) (format t "~%~%Running examples with clips-compatible syntax:~%") (complete-reset) (deftemplate goal (slot action (default move)) (slot object) (slot from) (slot to)) (deftemplate in (slot object) (slot location)) (deffacts world (in (object robot) (location A)) (in (object ...
null
https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/examples/examples-clips.lisp
lisp
(watch activations) (step)
(in-package :exil-user) (format t "~%~%Running examples with clips-compatible syntax:~%") (complete-reset) (deftemplate goal (slot action (default move)) (slot object) (slot from) (slot to)) (deftemplate in (slot object) (slot location)) (deffacts world (in (object robot) (location A)) (in (object ...
95eb768dc9389ea847dca990e4f27cfbf9f8927cdccfae02c1631e0b2f2253f1
crategus/cl-cffi-gtk
application-open.lisp
;;;; Example Application Open - 2021-10-9 (in-package :gio-example) (defun application-open (&rest argv) (let ((app (make-instance 'g-application :application-id "com.crategus.application-open" :flags :handles-open)) (argv (if argv argv (uiop:command-l...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/demo/gio-example/application-open.lisp
lisp
Example Application Open - 2021-10-9 Print information about the application Note: when doing a longer-lasting action here that returns to the main loop, you should use g-application-hold and g-application-release to keep the application alive until the action is completed. The argument FILES is a C pointer to ...
(in-package :gio-example) (defun application-open (&rest argv) (let ((app (make-instance 'g-application :application-id "com.crategus.application-open" :flags :handles-open)) (argv (if argv argv (uiop:command-line-arguments)))) (format t "Start app...
5938ace865dea9a9183c416885a15c0503ee290405ad36db52a3d53a10f3c29b
aristidb/aws
Core.hs
module Aws.Ses.Core ( SesError(..) , SesMetadata(..) , SesConfiguration(..) , sesEuWest1 , sesUsEast , sesUsEast1 , sesUsWest2 , sesHttpsGet , sesHttpsPost , sesSignQuery , sesResponseConsumer , RawMessage(..) , Destination(..) , EmailAddress , Sender(..) ...
null
https://raw.githubusercontent.com/aristidb/aws/a99113ed7768f9758346052c0d8939b66c6efa87/Aws/Ses/Core.hs
haskell
IsString HTTP is not supported right now, always use HTTPS | Write a data type as a list of query parameters. | A raw e-mail. | The destinations of an e-mail. | An e-mail address. | The sender's e-mail address.
module Aws.Ses.Core ( SesError(..) , SesMetadata(..) , SesConfiguration(..) , sesEuWest1 , sesUsEast , sesUsEast1 , sesUsWest2 , sesHttpsGet , sesHttpsPost , sesSignQuery , sesResponseConsumer , RawMessage(..) , Destination(..) , EmailAddress , Sender(..) ...
a01b1552c84106619a4b31739362584ef8bdfa27198737f9237152d51ff976cf
vbrankov/hdf5-ocaml
float_intf.ml
open Bigarray module type S = sig type t type float_elt (** Writes the given float array to the data set. *) val write_float_array : t -> string -> ?deflate:int -> float array -> unit (** Reads the data set into a float array. @param data If provided, the storage for the data. *) val read_floa...
null
https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/src/caml/float_intf.ml
ocaml
* Writes the given float array to the data set. * Reads the data set into a float array. @param data If provided, the storage for the data. * Writes the given float Array1.t to the data set. * Reads the data set into a float Array1.t. @param data If provided, the storage for the data. * Writes the giv...
open Bigarray module type S = sig type t type float_elt val write_float_array : t -> string -> ?deflate:int -> float array -> unit val read_float_array : t -> ?data:float array -> string -> float array val write_float_genarray : t -> string -> ?deflate:int -> (float, float_elt, _) Genarray.t -> un...
23bb955dc4f155423826cba9d8d7b3b1f2e0e20e035b170b73294366a8fabfb3
josefs/Gradualizer
absform.erl
@doc Module for extracting data from an Erlang parse tree . @private -module(absform). -export([normalize_record_field/1, normalize_function_type_list/1]). -include("gradualizer.hrl"). %% @doc Turns all record fields into typed record fields. Adds default %% 'undefined' if default value is missing. norm...
null
https://raw.githubusercontent.com/josefs/Gradualizer/ba4476fd4ef8e715e49ddf038d5f9f08901a25da/src/absform.erl
erlang
@doc Turns all record fields into typed record fields. Adds default 'undefined' if default value is missing. @doc Turns all function types into bounded function types. Add default empty constraints if missing.
@doc Module for extracting data from an Erlang parse tree . @private -module(absform). -export([normalize_record_field/1, normalize_function_type_list/1]). -include("gradualizer.hrl"). normalize_record_field({record_field, L, Name = {atom, _, _}}) -> {typed_record_field, {record_field, L, Name,...
2b223d708cc4012f3f7a478af8c934ac2bc584b84338ee64e77d57bc4d674659
DSiSc/why3
lift_epsilon.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/lift_epsilon.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Close_epsilon open Term open Theory open Task type lift_kind = let lift kind = let rec term acc t...
b512bbdcdd9403f0bdfeaa13c81105daa52e9cb8599fb1719017a706a32c8db2
polytypic/f-omega-mu
Token.ml
open Grammar let[@warning "-32"] to_string = function | And -> "and" | ArrowRight -> "→" | BraceLhs -> "{" | BraceLhsNS -> "{" | BraceRhs -> "}" | BracketLhs -> "[" | BracketLhsNS -> "[" | BracketRhs -> "]" | Caret -> "^" | Case -> "case" | Colon -> ":" | Comma -> "," | Comment _ -> "# ..." ...
null
https://raw.githubusercontent.com/polytypic/f-omega-mu/bba3a21a93bd0582fa5e75a414978e6428d3c674/src/main/FomParser/Token.ml
ocaml
open Grammar let[@warning "-32"] to_string = function | And -> "and" | ArrowRight -> "→" | BraceLhs -> "{" | BraceLhsNS -> "{" | BraceRhs -> "}" | BracketLhs -> "[" | BracketLhsNS -> "[" | BracketRhs -> "]" | Caret -> "^" | Case -> "case" | Colon -> ":" | Comma -> "," | Comment _ -> "# ..." ...
980e65fe4fb0b3b7ee57c51befd91dd2e489971cf6ab3a353f1627f8000277dc
namin/mk-on-smt
helper.scm
This file needs to be loaded before mk.scm for Vicare . I ca n't figure ; out how to do loads relative to a source file rather than the working directory , else this file would load mk.scm . Trie implementation , due to . Used for substitution ; and constraint store. ;;; subst ::= (empty) ;;; | (...
null
https://raw.githubusercontent.com/namin/mk-on-smt/90be60ee99d2f42f54195f5dd72605c9573715d9/helper.scm
scheme
out how to do loads relative to a source file rather than the working and constraint store. subst ::= (empty) | (node even odd) | (data idx val) interface helpers Misc. missing functions
This file needs to be loaded before mk.scm for Vicare . I ca n't figure directory , else this file would load mk.scm . Trie implementation , due to . Used for substitution (define-record-type node (fields e o)) (define-record-type data (fields idx val)) (define shift (lambda (n) (fxsra n 1))) (define uns...
bf4c29c5f846d60e532e408f5bcbdfc90badbaed4cd3b6b52b2a36c288d8fde2
rtoy/cmucl
insts.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Base : 10 ; Package : x86 -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . If you want to use this ...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/amd64/insts.lisp
lisp
Syntax : Common - Lisp ; Base : 10 ; Package : x86 -*- ********************************************************************** ********************************************************************** Description of the AMD64 instruction set. Primitive emitters. The effective-address (ea) structure. don't all...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . If you want to use this code or any part of CMU Common Lisp , please contact or . (ext:file-comment "$Header: src/compiler/amd64/insts.lisp $") Written by by Spr...
4a66d43ac79711830b79d9273e15afa1824676055c3cd4b8a51200442470d64b
Incubaid/arakoon
registry.mli
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
null
https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/plugins/registry.mli
ocaml
Copyright ( 2010 - 2014 ) INCUBAID BVBA Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distribut...
b3a6cd61c5cf45af160a758d9f3556ff3e8ec5d0a4e4f6ee48f1c44ec15e3d22
overtone/overtone
satie.clj
(ns ^:hw overtone.examples.monome.satie (:use [clojure.core.match :only [match]] [overtone.live] [overtone.inst sampled-piano]) (:require [polynome.core :as poly])) . 1 (def phrase1a [:iii :v :iv# :iii :iii :ii# :iii :ii#]) (def phrase1b [:iii :v :iv# :iii :v# :vi :v# :vi]) (def phrase1c [:iii ...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/examples/monome/satie.clj
clojure
A B C D E F G H I J K L M N O P Q R S T U (poly/remove-all-callbacks m) (poly/disconnect m)
(ns ^:hw overtone.examples.monome.satie (:use [clojure.core.match :only [match]] [overtone.live] [overtone.inst sampled-piano]) (:require [polynome.core :as poly])) . 1 (def phrase1a [:iii :v :iv# :iii :iii :ii# :iii :ii#]) (def phrase1b [:iii :v :iv# :iii :v# :vi :v# :vi]) (def phrase1c [:iii ...
684e5007dbd6faef549f5b7c2d634d8faa8713ec582e5973faf75c1175bd38ba
emqx/emqx
emqx_mgmt_api_publish.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/6bbb5edb536957425f11fc7f7ce38032cbf97208/apps/emqx_management/src/emqx_mgmt_api_publish.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 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_mgmt_api_publish). -include_lib("emqx/include/emqx.hrl"). -include_lib("emqx/includ...
32b93f57e17468bf0a94b0c7da53c5e1c3da71464c2792f69327ef295394551b
ds-wizard/engine-backend
DocumentTemplateDraftChangeJM.hs
module Wizard.Api.Resource.DocumentTemplate.Draft.DocumentTemplateDraftChangeJM where import Data.Aeson import Shared.Model.DocumentTemplate.DocumentTemplateJM () import Shared.Util.Aeson import Wizard.Api.Resource.DocumentTemplate.Draft.DocumentTemplateDraftChangeDTO instance FromJSON DocumentTemplateDraftChangeDTO...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Resource/DocumentTemplate/Draft/DocumentTemplateDraftChangeJM.hs
haskell
module Wizard.Api.Resource.DocumentTemplate.Draft.DocumentTemplateDraftChangeJM where import Data.Aeson import Shared.Model.DocumentTemplate.DocumentTemplateJM () import Shared.Util.Aeson import Wizard.Api.Resource.DocumentTemplate.Draft.DocumentTemplateDraftChangeDTO instance FromJSON DocumentTemplateDraftChangeDTO...
a1c0b729b37ffdda4289583614b5f48dc9a3e51edf3459b4220dae38d5f8846b
clojure-interop/google-cloud-clients
GrpcApplicationServiceStub.clj
(ns com.google.cloud.talent.v4beta1.stub.GrpcApplicationServiceStub "gRPC stub implementation for Cloud Talent Solution API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.talent.v4beta1.stub GrpcApplicatio...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/stub/GrpcApplicationServiceStub.clj
clojure
(ns com.google.cloud.talent.v4beta1.stub.GrpcApplicationServiceStub "gRPC stub implementation for Cloud Talent Solution API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.talent.v4beta1.stub GrpcApplicatio...
24265c8fab7bf8c85217c893ea5e4e2c92265e1ebebecb3b04eb5061543d6f60
vaibhavsagar/experiments
Double.hs
module Dotnet.System.Double where import Dotnet import qualified Dotnet.System.ValueType data Double_ a type Double a = Dotnet.System.ValueType.ValueType (Double_ a)
null
https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/lib/Dotnet/System/Double.hs
haskell
module Dotnet.System.Double where import Dotnet import qualified Dotnet.System.ValueType data Double_ a type Double a = Dotnet.System.ValueType.ValueType (Double_ a)
71d8f578e08108eb2f2e4fb44239383ee21261563006741d2946e3d202703d8d
vimalloc/apfs-auto-snapshot
SnapshotDatabase.hs
{-# LANGUAGE OverloadedStrings #-} module SnapshotDatabase where import TMSnapshot import Database.SQLite.Simple import Database.SQLite.Simple.FromField import Database.SQLite.Simple.Internal (Field(..)) -- TODO not great... import Database.SQLite.Simple.Ok import Database.SQLite.Simple.ToField import Data.Text (un...
null
https://raw.githubusercontent.com/vimalloc/apfs-auto-snapshot/c38c3ad7060b4cec9e0e24a2b9e258a634a189e5/src/SnapshotDatabase.hs
haskell
# LANGUAGE OverloadedStrings # TODO not great...
module SnapshotDatabase where import TMSnapshot import Database.SQLite.Simple import Database.SQLite.Simple.FromField import Database.SQLite.Simple.Ok import Database.SQLite.Simple.ToField import Data.Text (unpack) TODO move from String to Text everywhere TODO make all imports explicit data SnapshotTimeline = ...
fd5eb8ab7e27f4f578d8209c8754d5544a8e99852bbabc3de913b8aeca32bc90
MyDataFlow/ttalk-server
ejabberd_router.erl
%%%---------------------------------------------------------------------- File : ejabberd_router.erl Author : < > %%% Purpose : Main router Created : 27 Nov 2002 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne %%% %%% This program is free software; you can redistribute it and/or ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_router.erl
erlang
---------------------------------------------------------------------- Purpose : Main router 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 i...
File : ejabberd_router.erl Author : < > Created : 27 Nov 2002 by < > ejabberd , Copyright ( C ) 2002 - 2011 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 GN...
d613634ba44eb6fa4a52e37630e0436bbcc5223e820b51d244739c6853a7c7c5
Dretch/monomer-hagrid
Main.hs
# LANGUAGE EmptyCase # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # module Main (main) where import Data.Function ((&)) import Data.Sequence (Seq) import qualified Data.Sequence as S import Data.Text (Text, dropWhile, dropWhileEnd, pack, splitOn, strip) import Data.Text.IO (readFile) import Monomer import Mono...
null
https://raw.githubusercontent.com/Dretch/monomer-hagrid/9e214d7450b790e292ef25a8b5c307c39ebe511b/example-big-grid/Main.hs
haskell
# LANGUAGE EmptyCase # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # module Main (main) where import Data.Function ((&)) import Data.Sequence (Seq) import qualified Data.Sequence as S import Data.Text (Text, dropWhile, dropWhileEnd, pack, splitOn, strip) import Data.Text.IO (readFile) import Monomer import Mono...
8b8d17a0674d6d17f077681e7f25682727995a836c9d61a8aba17578426bf121
coq/coq
workerLoop.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/c4587fa780c885fda25a38a2f16e84dc9011f9bd/toplevel/workerLoop.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
b371850e0470f53e02e49285a7ca677553fd12a608d40d9cbcbc4bea607b296f
AbstractMachinesLab/caramel
config.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/utils/407_0/config.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Local_store.Compiler let version = Sys.ocaml_version let flambda = false let exec_magic_number ...
2a62d561754b200f1917a297746bb7aef748c89c1d8a56a20da02a594270cac9
thattommyhall/offline-4clojure
p63.clj
Group a Sequence - Easy ;; Given a function f and a sequence s, write a function which returns a map. The keys should be the values of f applied to each item in s. The value at each key should be a vector of corresponding items in the order they appear in s. ;; tags - core-functions ;; restricted - group-by (ns off...
null
https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p63.clj
clojure
Given a function f and a sequence s, write a function which returns a map. The keys should be the values of f applied to each item in s. The value at each key should be a vector of corresponding items in the order they appear in s. tags - core-functions restricted - group-by your solution here
Group a Sequence - Easy (ns offline-4clojure.p63 (:use clojure.test)) (def __ ) (defn -main [] (are [soln] soln (= (__ #(> % 5) [1 3 6 8]) {false [1 3], true [6 8]}) (= (__ #(apply / %) [[1 2] [2 4] [4 6] [3 6]]) {1/2 [[1 2] [2 4] [3 6]], 2/3 [[4 6]]}) (= (__ count [[1] [1 2] [3] [1 2 3] [2 3]]) {1 [[1] [...
4655d9a0fb50a7123c509bb1dd50c91a220d8e5302420adededf4ba33998b17c
haskell-tools/haskell-tools
Helpers.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} -- | Helper functions for defining refactorings. module Language.Haskell.Tools.Refactor.Utils.Helpers where import Control.Monad.State () import Control.Reference import Data.Function (on) import Data.List (sortBy, nubBy, groupBy) impor...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/Language/Haskell/Tools/Refactor/Utils/Helpers.hs
haskell
# LANGUAGE RankNTypes # | Helper functions for defining refactorings. | Remove the container (where or let) when the last binding is removed. | Puts the elements in the orginal order and remove duplicates (elements with the same source range) | Groups elements together into equivalence groups. | Chooses a represen...
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Language.Haskell.Tools.Refactor.Utils.Helpers where import Control.Monad.State () import Control.Reference import Data.Function (on) import Data.List (sortBy, nubBy, groupBy) import Data.Maybe (Maybe(..)) import Language.Haskell.Tools.AST as AST import Lan...
0eec3459365b00e9ceb09fa3cc30b4b8350a29a418bb48cd5060ec96a50b6aed
monadicsystems/okapi
Main.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module Main where import Control.Applicative ((<|>)) import Data.Aeson (ToJSON) import Data.Function ((&)) import Data.Text import GHC.Generics (Generic) import Okapi main :: IO () main = run i...
null
https://raw.githubusercontent.com/monadicsystems/okapi/3d7215ec954479b80322594dc4b89afd834e095e/examples/calculator/Main.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # # LANGUAGE TypeApplications # module Main where import Control.Applicative ((<|>)) import Data.Aeson (ToJSON) import Data.Function ((&)) import Data.Text import GHC.Generics (Generic) import Okapi main :: IO () main = run id calc type Okapi a = OkapiT IO a calc :: Okapi Response calc = d...
9afd1b8702e9820fa72e4b81849cdc61ef40c4a171e291794808b4f0448d056d
zjhmale/Ntha
Logic.hs
-- | Predicates module Ntha.Z3.Logic (Pred(..)) where data Pred t ty a where PTrue :: Pred t ty a PFalse :: Pred t ty a PConj :: Pred t ty a -> Pred t ty a -> Pred t ty a PDisj :: Pred t ty a -> Pred t ty a -> Pred t ty a PXor :: Pred t ty a -> Pred t ty a -> Pred t ty a PNeg :: P...
null
https://raw.githubusercontent.com/zjhmale/Ntha/dc47fafddf67cf821c90c5cd72566de67d996238/src/Ntha/Z3/Logic.hs
haskell
| Predicates
module Ntha.Z3.Logic (Pred(..)) where data Pred t ty a where PTrue :: Pred t ty a PFalse :: Pred t ty a PConj :: Pred t ty a -> Pred t ty a -> Pred t ty a PDisj :: Pred t ty a -> Pred t ty a -> Pred t ty a PXor :: Pred t ty a -> Pred t ty a -> Pred t ty a PNeg :: Pred t ty a -> Pr...
eaea81f69dd883f54e4a3e2f0e692f293bff357e87afbdd37bb12b1ebe4b5c60
clj-kondo/clj-kondo
compojure_test.clj
(ns clj-kondo.compojure-test (:require [clj-kondo.test-utils :refer [lint!]] [clojure.java.io :as io] [clojure.test :as t :refer [deftest is testing]] [missing.test.assertions])) (deftest compojure-test (is (empty? (lint! (io/file "corpus" "compojure" "core_test.clj")))))
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/test/clj_kondo/compojure_test.clj
clojure
(ns clj-kondo.compojure-test (:require [clj-kondo.test-utils :refer [lint!]] [clojure.java.io :as io] [clojure.test :as t :refer [deftest is testing]] [missing.test.assertions])) (deftest compojure-test (is (empty? (lint! (io/file "corpus" "compojure" "core_test.clj")))))