_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
33546301305d83a907dcc3e98d5aafd5084ddd5c5314f8e51e71bf518cac200f
aristidb/aws
AddUserToGroup.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Aws.Iam.Commands.AddUserToGroup ( AddUserToGroup(..) , AddUserToGroupResponse(..) ) where import Aws.Core import Aws.Iam.Core import Aws.Iam.Internal import ...
null
https://raw.githubusercontent.com/aristidb/aws/a99113ed7768f9758346052c0d8939b66c6efa87/Aws/Iam/Commands/AddUserToGroup.hs
haskell
| Adds the specified user to the specified group. <> ^ Name of the group to update. ^ The of the user to add.
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Aws.Iam.Commands.AddUserToGroup ( AddUserToGroup(..) , AddUserToGroupResponse(..) ) where import Aws.Core import Aws.Iam.Core import Aws.Iam.Internal import ...
92e2e8024cb03b6f995df5a1897652a309a2fba6358247ff129fa4d2f29c6296
brendanhay/gogol
Create.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-spanner/gen/Gogol/Spanner/Projects/Instances/Backups/Create.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Resource ** Constructing a Request | A resource alias for @spanner.projects.instances.backups.create@ method which the /See:/ 'newSpannerProjectsInstancesBackupsCreate' smart constructor. | V1 error format. | OAuth access...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
cd5ec4f4ffe139a3d7ca43bd6da86d7e9aa63d73abb043fcb265b39c890708af
alvatar/spheres
xpath-ast.scm
! ! ! / XPointer - > Abstract Syntax Tree parser ;; ;; This software is in Public Domain. IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . ;; ;; Please send bug reports and comments to: ;; Dmitry Lizorkin ! W3C textual / XPointer - > AST ;; Writing operations as an S-expression in an i...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/markup/internal/xpath-ast.scm
scheme
This software is in Public Domain. Please send bug reports and comments to: Dmitry Lizorkin Writing operations as an S-expression in an infix notation Parameters for TXPath -> AST implementation Addition by XLink Node test no literal provided Location step Relative location path Location path Predic...
! ! ! / XPointer - > Abstract Syntax Tree parser IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . ! W3C textual / XPointer - > AST (define (txp:ast-operation-helper expr-lst op-lst add-on) (let ((rev-expr-lst (reverse expr-lst))) (let loop ((exprs (cdr rev-expr-lst)) (op...
eefa7d169e6d4057d1f5154bde9a815d8abc9b9af93ef2721df9ec0d429dd6a8
jeffshrager/biobike
test.lisp
;; Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . ;; (in-package :com.gigamonkeys.test) (defvar *test-name* nil) (defvar *report-passes* nil) (defparameter *debug* t) (defun listify (thing) (if (listp thing) thing (list thing))) (defmacro with-test-results ((&key print summary) &body body)...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/test-framework/test.lisp
lisp
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . (in-package :com.gigamonkeys.test) (defvar *test-name* nil) (defvar *report-passes* nil) (defparameter *debug* t) (defun listify (thing) (if (listp thing) thing (list thing))) (defmacro with-test-results ((&key print summary) &body body) "Co...
4611bb65e146ce6bac23f04633e42a6c0dc29139030c977c99d6defb41b8aa1b
haskus/packages
Proxy.hs
# LANGUAGE KindSignatures # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # # LANGUAGE MagicHash # module Haskus.Utils.Types.Proxy ( module Data.Proxy , NatVal (..) , Proxy# ) where import Data.Proxy import Haskus.Utils.Types.Nat import GHC.Exts (Proxy#) -- | A natur...
null
https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-utils-types/src/lib/Haskus/Utils/Types/Proxy.hs
haskell
| A natural value Proxy
# LANGUAGE KindSignatures # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # # LANGUAGE MagicHash # module Haskus.Utils.Types.Proxy ( module Data.Proxy , NatVal (..) , Proxy# ) where import Data.Proxy import Haskus.Utils.Types.Nat import GHC.Exts (Proxy#) data NatVal ...
b4406e6b4f671aaf584375af420c9a636589681c162eb2be6e075c62816fc5e8
ucsd-progsys/liquidhaskell
Poly2_degenerate.hs
{-@ LIQUID "--expect-any-error" @-} module Poly2_degenerate () where import Language.Haskell.Liquid.Prelude myabs x = if x `gt` 0 then x else 0 `minus` x ---------------------------------------------------------- myid3 x y = y prop_id6 = liquidAssertB (x' `geq` 10) where x' = myid3 [] $ myabs n n =...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Poly2_degenerate.hs
haskell
@ LIQUID "--expect-any-error" @ --------------------------------------------------------
module Poly2_degenerate () where import Language.Haskell.Liquid.Prelude myabs x = if x `gt` 0 then x else 0 `minus` x myid3 x y = y prop_id6 = liquidAssertB (x' `geq` 10) where x' = myid3 [] $ myabs n n = choose 0
3178e48fd746dfe803dffcaf97db871f7b1e5bfd60ac2fb0a0411b23152f7a2b
rabbitmq/rabbitmq-stomp
rabbit_stomp_frame.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/rabbitmq/rabbitmq-stomp/925d78e2c7152723a68452b38fbc2713d2797b8b/src/rabbit_stomp_frame.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. stomp_frame imp...
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 GoPivotal , Inc. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights re...
815e4f24c4dc84efdb51d5ae1aa12a139a5ee2a7aaae2c31cb0c90dae638ea2d
lassik/upscheme
match.scm
; tree regular expression pattern matching by ; list of special pattern symbols that cannot be variable names (define metasymbols '(_ ...)) ; expression tree pattern matching ; matches expr against pattern p and returns an assoc list ((var . expr) (var . expr) ...) ; mapping variables to captured subexpressions, ...
null
https://raw.githubusercontent.com/lassik/upscheme/61935bd866acb18902199bc4bc4cdd1760aa1ffc/scheme-tests/ast/match.scm
scheme
tree regular expression pattern matching list of special pattern symbols that cannot be variable names expression tree pattern matching matches expr against pattern p and returns an assoc list ((var . expr) (var . expr) ...) mapping variables to captured subexpressions, or #f if no match. when a match succeeds, _...
by (define metasymbols '(_ ...)) ( - ? < p > ) match 0 or 1 of < p > ( -+ < p > ) match at least 1 of < p > This is NP - complete . Be careful . (define (match- p expr state) (cond ((symbol? p) (cond ((eq? p '_) state) (else (let ((capt (assq...
fe2bb424c5a746d07f096c2958ed86b63e6582c3691d965db5e4d85c68c606d0
msp-strath/TypOS
Base.hs
# LANGUAGE UndecidableInstances # module Concrete.Base where import Bwd import Format import Scope import Location import Data.Function (on) data Operator = Operator { getOperator :: String } deriving (Show, Eq) data Variable = Variable { variableLoc :: Range , getVariable :: String } instance Show Variable ...
null
https://raw.githubusercontent.com/msp-strath/TypOS/fbbf0ba6451fd21e274859c666629ba029e6466c/Src/Concrete/Base.hs
haskell
name prefix counter Identifier for guard which denotes if a term is safe to use This is going to bite us when it comes to dependent types
# LANGUAGE UndecidableInstances # module Concrete.Base where import Bwd import Format import Scope import Location import Data.Function (on) data Operator = Operator { getOperator :: String } deriving (Show, Eq) data Variable = Variable { variableLoc :: Range , getVariable :: String } instance Show Variable ...
7b2395291e2398ca15d069d1264eec134102166b49d0f575c177d326d7f32a67
ros/roslisp_common
graph.lisp
;; Minimal graph implementation using adjacency list ;; Edges and nodes have integer id's and can have associated data (in-package :cl-graph) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Basic ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (deftype id () '(or symbol fixnum)) (defs...
null
https://raw.githubusercontent.com/ros/roslisp_common/4db311da26497d84a147f190200e50c7a5b4106e/cl_utils/src/cl-graph/graph.lisp
lisp
Minimal graph implementation using adjacency list Edges and nodes have integer id's and can have associated data Basic Adjacency this sort of declaration is probably unnecessary since the structure slot type is declared Modification Either use the provided id or the next free id This assert should never h...
(in-package :cl-graph) (deftype id () '(or symbol fixnum)) (defstruct (graph (:conc-name nil) (:constructor create-graph) (:copier nil)) nodes edges (next-node-id 0 :type fixnum) (next-edge-id 0 :type fixnum)) (defstruct (node-info (:conc-name nil) (:constructor make-node-info (node-data adjacent-edges)) (:typ...
cef6f4fc3d8e25dbe1a0b11a0c3f76676a0b6b0504ce6aa5b22f02edcd18350f
jaredly/reason-language-server
simplif.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/406/simplif.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 Asttypes open Lambda exception Real_reference let rec eliminate_ref id = function Lvar v as ...
365b61a9a9b8f1c33ab8199044d780c213bd893315da68e0f6bd8281019cbc23
glagoly/glagoly
routes.erl
-module(routes). -include_lib("n2o/include/n2o.hrl"). -export([init/2, finish/2]). finish(State, Ctx) -> {ok, State, Ctx}. init(State, #cx{req = Req} = Cx) -> #{path := Path} = Req, {ok, State, Cx#cx{path = Path, module = route_prefix(Path)}}. route_prefix(<<"/ws/", P/binary>>) -> route(P); route_prefix(<<...
null
https://raw.githubusercontent.com/glagoly/glagoly/bd3754599ebb456fbcb1ee5864d87d85d9584ad3/src/routes.erl
erlang
Routes
-module(routes). -include_lib("n2o/include/n2o.hrl"). -export([init/2, finish/2]). finish(State, Ctx) -> {ok, State, Ctx}. init(State, #cx{req = Req} = Cx) -> #{path := Path} = Req, {ok, State, Cx#cx{path = Path, module = route_prefix(Path)}}. route_prefix(<<"/ws/", P/binary>>) -> route(P); route_prefix(<<...
541847540c66b376210d404980769ae9ebfec87ef5712dfbd028dbc19f8a941e
babashka/babashka
inline_code_test.clj
(ns clarktown.parsers.inline-code-test (:require [clojure.test :refer [deftest testing is]] [clarktown.parsers.inline-code :as inline-code])) (deftest inline-code-test (testing "Creating inline code text" (is (= "<code>This is inline code.</code>" (inline-code/render "`This is inline code.`...
null
https://raw.githubusercontent.com/babashka/babashka/1113037b51733466faceda72d98dab5c1513a6e1/test-resources/lib_tests/clarktown/parsers/inline_code_test.clj
clojure
(ns clarktown.parsers.inline-code-test (:require [clojure.test :refer [deftest testing is]] [clarktown.parsers.inline-code :as inline-code])) (deftest inline-code-test (testing "Creating inline code text" (is (= "<code>This is inline code.</code>" (inline-code/render "`This is inline code.`...
ae0a901c25e59c66a78cb91b6c6a3668d81a65dffb77224d89a13762d2528512
cabol/cross_db
xdb_meta_SUITE.erl
-module(xdb_meta_SUITE). -include_lib("mixer/include/mixer.hrl"). -mixin([ktn_meta_SUITE]). -export([init_per_suite/1, end_per_suite/1]). -spec init_per_suite(xdb_ct:config()) -> xdb_ct:config(). init_per_suite(Config) -> [{application, cross_db} | Config]. -spec end_per_suite(xdb_ct:config()) -> ok. end_per_suit...
null
https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/test/xdb_meta_SUITE.erl
erlang
-module(xdb_meta_SUITE). -include_lib("mixer/include/mixer.hrl"). -mixin([ktn_meta_SUITE]). -export([init_per_suite/1, end_per_suite/1]). -spec init_per_suite(xdb_ct:config()) -> xdb_ct:config(). init_per_suite(Config) -> [{application, cross_db} | Config]. -spec end_per_suite(xdb_ct:config()) -> ok. end_per_suit...
230a0fafd6299375ba7ca10be4ff43d05f0530e02c760056b251d778faa8f699
philipcristiano/sssftp
ssh_sssftpd_file_api.erl
-module(ssh_sssftpd_file_api). %% To be further specified later -callback close(file:io_device(), State::term()) -> {ok, State::term()} | {{error, Reason::term()}, State::term()}. -callback delete(file:name(), State::term()) -> {ok, State::term()} | {{error, Reason::term()}, State::term()}. -callback del_dir(f...
null
https://raw.githubusercontent.com/philipcristiano/sssftp/186a2a0f77ef0dec7966414a3173d4a66a32d796/src/ssh_sssftpd_file_api.erl
erlang
To be further specified later
-module(ssh_sssftpd_file_api). -callback close(file:io_device(), State::term()) -> {ok, State::term()} | {{error, Reason::term()}, State::term()}. -callback delete(file:name(), State::term()) -> {ok, State::term()} | {{error, Reason::term()}, State::term()}. -callback del_dir(file:name(), State::term()) -> ...
8286e3f4593e64dd4c6d6ce5595391e3cf14f33fa690df4ea34891a575bcb595
mit-pdos/mcqc
File.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # module CIR.File where import Classes.Pretty() import GHC.Generics import CIR.Decl import Data.Aeson import Data.Text (Text) import Data.Text.Prettyprint.Doc import qual...
null
https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/CIR/File.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveAnyClass #
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # module CIR.File where import Classes.Pretty() import GHC.Generics import CIR.Decl import Data.Aeson import Data.Text (Text) import Data.Text.Prettyprint.Doc import qualified Data.Text as T import qualified Data.List as L data CFile = ...
227fd9820dea78fa323d05210edb495ada49d28a1c5fbaf4e76ad483c506d59c
hypernumbers/hypernumbers
twilio_app.erl
-module(twilio_app). -behaviour(application). -export([init/0]). %% Application callbacks -export([start/2, stop/1]). init() -> application:start(twilio). %% =================================================================== %% Application callbacks %% =============================================================...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/twilio/src/twilio_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(twilio_app). -behaviour(application). -export([init/0]). -export([start/2, stop/1]). init() -> application:start(twilio). start(_StartType, _StartArgs) -> [application:start(A) || A <- [inets, crypto, public_key, ssl]], twilio_sup:start_link(). stop(_State) -> ok.
dc5b4476c4d58d30b5d6dbe79d192e273899cfd955a871679a0571201cc3ab3e
coccinelle/coccinelle
spgen_interactive.mli
* This file is part of Coccinelle , lincensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, lincensed under the terms of the GPL v2. * See copyright.txt in the Coc...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/tools/spgen/source/spgen_interactive.mli
ocaml
Get user input from interactive (commandline) mode. * Returns the user input, formatted for use, and gives the user the * opportunity to save the input in a config file. ------------------------------------------------------------------------- INTERACTION FUNCTIONS
* This file is part of Coccinelle , lincensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, lincensed under the terms of the GPL v2. * See copyright.txt in the Coc...
cef19aa87fa1fe5ac29d37014ef23a7424d10859ca035474b0c5ed10b6953a92
ivanjovanovic/sicp
ch5-eceval-edited.scm
(load "../4.1/4.1.scm") (load "../5.2/5.2.4.scm") ;;;;EXPLICIT-CONTROL EVALUATOR FROM SECTION 5.4 OF ;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS ;;;;Matches code in ch5.scm ;;; To use it ;;; -- load "load-eceval.scm", which loads this file and the ;;; support it needs (including the register-machine sim...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.4/ch5-eceval-edited.scm
scheme
EXPLICIT-CONTROL EVALUATOR FROM SECTION 5.4 OF STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS Matches code in ch5.scm To use it -- load "load-eceval.scm", which loads this file and the support it needs (including the register-machine simulator) -- To initialize and start the machine, do : (define the-global-...
(load "../4.1/4.1.scm") (load "../5.2/5.2.4.scm") (define (empty-arglist) '()) (define (adjoin-arg arg arglist) (append arglist (list arg))) (define (last-operand? ops) (null? (cdr ops))) (define (no-more-exps? seq) (null? seq)) (define the-global-environment (setup-environment)) (define (get-global-environmen...
c096d217d9923128d2b3c343caf845c18e87507ae17e5935c12a1d334fe5070b
stepcut/plugins
C.hs
-- try to construct an orphan module == an instance decl-only module, -- that uses classes and types not defined in this module module C (C) where import D instance C a => D (T a) where class C a where
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/hier/hier4/C.hs
haskell
try to construct an orphan module == an instance decl-only module, that uses classes and types not defined in this module
module C (C) where import D instance C a => D (T a) where class C a where
0a77a94246f7964a5bfe4a3671a6627289a9ebce6bb0c8873c2d0eb9a852fb18
bgamari/ghc-debug
LargeThunk.hs
{-# Language BangPatterns #-} {-# Language DeriveAnyClass #-} {-# Language DerivingStrategies #-} {-# Language DuplicateRecordFields #-} # LANGUAGE DeriveGeneric # # Language GeneralizedNewtypeDeriving # {-# Language LambdaCase #-} {-# Language ParallelListComp #-} import System.Environment (getArgs) import Data.List...
null
https://raw.githubusercontent.com/bgamari/ghc-debug/202122430d93a7f948b085377d0de10055adf05e/test/test-progs/LargeThunk.hs
haskell
# Language BangPatterns # # Language DeriveAnyClass # # Language DerivingStrategies # # Language DuplicateRecordFields # # Language LambdaCase # # Language ParallelListComp # ^ Who rated this movie. ^ Movie being rated. Create the DB A single user's favorite movie. Top rated movies each rating is weighted by the ...
# LANGUAGE DeriveGeneric # # Language GeneralizedNewtypeDeriving # import System.Environment (getArgs) import Data.List (foldl', maximumBy, permutations, sortBy) import Data.Function import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Control.DeepSeq import GHC.Generics (Generic) import GHC.Deb...
a32c30e743276405798874a16d52ad523499ef7ed00dda65fc24026107b4fb59
twosigma/Cook
components.clj
Copyright ( c ) Two Sigma Open Source , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/twosigma/Cook/c08edc165028c259e01ed3ccca2457c0182ffc8c/scheduler/src/cook/components.clj
clojure
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 permis...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns cook.components (:gen-class) (:require [clojure.core.async :as async] [clojure.core.cache :as cache] [clojure.pprint :refer [pprint]] [clojure.tools.logging :a...
df73d17098297e6dd2ead9a4faaf5d5d440683befd0dea74263addaaa01c1bd9
melange-re/melange
obj_type_test.ml
type x = ( (< x : int ; y : 'self -> int > Js.t) as 'self ) let f (u : x) : x = u
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/obj_type_test.ml
ocaml
type x = ( (< x : int ; y : 'self -> int > Js.t) as 'self ) let f (u : x) : x = u
0d51119cc75f8417bf8bad316abce5b6ae1a5bb2f9745ec6d32e62177c403be3
avh4/elm-format
CliFlags.hs
module ElmFormat.CliFlags (Config(..), JsonMode(..), parser) where import Prelude () import Relude hiding (stdin) import ElmVersion (ElmVersion(..)) import qualified ElmVersion import qualified Data.String as String import qualified Options.Applicative as Opt import qualified Text.PrettyPrint.ANSI.Leijen as PP dat...
null
https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/src/ElmFormat/CliFlags.hs
haskell
COMMANDS HELP
module ElmFormat.CliFlags (Config(..), JsonMode(..), parser) where import Prelude () import Relude hiding (stdin) import ElmVersion (ElmVersion(..)) import qualified ElmVersion import qualified Data.String as String import qualified Options.Applicative as Opt import qualified Text.PrettyPrint.ANSI.Leijen as PP dat...
da80634131fffeefb1c41b9b85deefc650e22ae5dc55919402a4675e3bfe5693
GNOME/gimp-tiny-fu
blend-anim.scm
; GIMP - The GNU Image Manipulation Program Copyright ( C ) 1995 and ; ; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ; (at your option) any later ve...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/blend-anim.scm
scheme
GIMP - The GNU Image Manipulation Program This program is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License blend-anim.scm version 1.03 1999/12/21 1.00 - initial release 1.01 - some code cleanup , no real changes 1.02 - use gimp - message to ou...
3b51918fbdb247c69d87a3b7f12f23845c4998f19ca4b943f1013b0c757666db
schell/steeloverseer
Utils.hs
module Sos.Utils where import Control.Applicative import Data.ByteString (ByteString) import System.Console.ANSI import qualified Data.Text as Text import qualified Data.Text.Encoding as Text (<|||>) :: Alternative f => f a -> f b -> f (Either a b) fa <|||> fb = Left <$> fa <|> Right <$> fb infixl 3 <||...
null
https://raw.githubusercontent.com/schell/steeloverseer/dcc694460ac9713b4a9a2462a3eecc8b38ca9fa3/src/Sos/Utils.hs
haskell
module Sos.Utils where import Control.Applicative import Data.ByteString (ByteString) import System.Console.ANSI import qualified Data.Text as Text import qualified Data.Text.Encoding as Text (<|||>) :: Alternative f => f a -> f b -> f (Either a b) fa <|||> fb = Left <$> fa <|> Right <$> fb infixl 3 <||...
2a2bbbe86f80c3f45eb3bd379746eaae7b061f474d340fc5ff6c4961c70edeb9
Factual/geo
t_crs.clj
(ns geo.t-crs (:require [geo.crs :as sut] [geo.jts :as jts] [midje.sweet :as m :refer [fact facts]])) (facts "Identifying and converting EPSG and SRID identifiers" (fact "EPSG:2000" => sut/epsg-str?) (fact "pizza" => (comp not sut/epsg-str?)) (fact "EPSG:2000abc" => (comp...
null
https://raw.githubusercontent.com/Factual/geo/75722b097d559b5d073aa673fb35bfe69663b50b/test/geo/t_crs.clj
clojure
(ns geo.t-crs (:require [geo.crs :as sut] [geo.jts :as jts] [midje.sweet :as m :refer [fact facts]])) (facts "Identifying and converting EPSG and SRID identifiers" (fact "EPSG:2000" => sut/epsg-str?) (fact "pizza" => (comp not sut/epsg-str?)) (fact "EPSG:2000abc" => (comp...
ede255f30ac0d4f61cf7b2f3051b294abc130119ebb32ea50d2d7062794189a6
seancorfield/honeysql
helpers.cljc
copyright ( c ) 2020 - 2022 , all rights reserved (ns honey.sql.helpers "Helper functions for the built-in clauses in honey.sql. All helper functions are inherently variadic. Typical usage is threaded, like this: ``` (-> (select :a :b :c) (from :table) (where [:= :id 42]) (sql/format)) ...
null
https://raw.githubusercontent.com/seancorfield/honeysql/63c7a45578364a4c2bfab8043a8de6bb02003783/src/honey/sql/helpers.cljc
clojure
implementation helpers: for every clause, there is a public helper special cases so (with-columns [[:col-1 :definition] [:col-2 :definition]]) also works in addition to (with-columns [:col-1 :definition] [:col-2 :definition]) all of their arguments: same as (where [:= :status 0]) helpers that produce non-clause ...
copyright ( c ) 2020 - 2022 , all rights reserved (ns honey.sql.helpers "Helper functions for the built-in clauses in honey.sql. All helper functions are inherently variadic. Typical usage is threaded, like this: ``` (-> (select :a :b :c) (from :table) (where [:= :id 42]) (sql/format)) ...
2da33f2101efdc2c51f7879b07bd95fc7c90d3a11560801994ab358776379704
jlahd/cacle
cache.lisp
(in-package #:cacle) #+5am (5am:in-suite cacle-tests) (defclass cache () ((max-size :initarg :max-size :reader cache-max-size) (size :initform 0) (lock :initform (bt:make-lock "cache")) (hash) (provider :initarg :provider :reader cache-provider) (cleanup :initarg :cleanup :initform nil :reader cache-...
null
https://raw.githubusercontent.com/jlahd/cacle/4cbe8cfe227d2e097eaced14766f4f37aa05e617/src/cache.lisp
lisp
cache miss, and no waiting cache miss - initialize fetch from source cache hit - but data not yet ready, and no waiting cache hit - but data not yet ready note: the pending slot is no longer bound after the wait data now available ... and not immediately cleaned up cached data has expired or been invalidated n...
(in-package #:cacle) #+5am (5am:in-suite cacle-tests) (defclass cache () ((max-size :initarg :max-size :reader cache-max-size) (size :initform 0) (lock :initform (bt:make-lock "cache")) (hash) (provider :initarg :provider :reader cache-provider) (cleanup :initarg :cleanup :initform nil :reader cache-...
55419117719cdda87379f2c62b23027d2a2d7c8878a58949e13e91418f870171
JonathanLorimer/book-of-monads
CH15.hs
module CH15 where Exercise 15.1 data SList a = SList (forall b. (a -> [a] -> b) -> b -> b) toSList :: [a] -> SList a toSList [] = SList $ \_ z -> z toSList (x:xs) = SList $ \f _ -> f x xs fromSList :: SList a -> [a] fromSList (SList f) = f (:) [] nil :: SList a nil = SList $ (\_ z -> z) cons :: a -> SList a -> ...
null
https://raw.githubusercontent.com/JonathanLorimer/book-of-monads/40e212af06f65559f157af5a98e87e67f4dde872/exercises/src/CH15.hs
haskell
module CH15 where Exercise 15.1 data SList a = SList (forall b. (a -> [a] -> b) -> b -> b) toSList :: [a] -> SList a toSList [] = SList $ \_ z -> z toSList (x:xs) = SList $ \f _ -> f x xs fromSList :: SList a -> [a] fromSList (SList f) = f (:) [] nil :: SList a nil = SList $ (\_ z -> z) cons :: a -> SList a -> ...
a6177c8198a406fdc7129ccbcd736c21ebba21eb150baf07d26376a47d47a0ec
2600hz-archive/whistle
node_watcher_qc.erl
%% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/riak_core-0.14.0/test/node_watcher_qc.erl
erlang
------------------------------------------------------------------- riak_core: Core Riak Application Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the sp...
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -...
3d8b3dc16e97d4f13e4191f0ffbfb61875a7233701e64fc842df54f1da8378c1
lucasvreis/org-mode-hs
Parser.hs
module Org.Parser ( defaultOrgOptions, OrgOptions (..), evalOrgMaybe, parseOrg, parseOrgIO, ) where import Org.Parser.Definitions import Org.Parser.Document -- | Wrapper around 'parseMaybe' that evaluates the Org Parser state with the -- desired options. evalOrgMaybe :: OrgOptions -> OrgParser a -...
null
https://raw.githubusercontent.com/lucasvreis/org-mode-hs/8eed3910638f379d55114995e0bc75a5915c4e98/org-parser/src/Org/Parser.hs
haskell
| Wrapper around 'parseMaybe' that evaluates the Org Parser state with the desired options. | Parse an Org document fully, with given options, and a filepath for error messages. | Parse an Org document in a UTF8 file, with given options.
module Org.Parser ( defaultOrgOptions, OrgOptions (..), evalOrgMaybe, parseOrg, parseOrgIO, ) where import Org.Parser.Definitions import Org.Parser.Document evalOrgMaybe :: OrgOptions -> OrgParser a -> Text -> Maybe a evalOrgMaybe opt = parseMaybe . (`evalStateT` defaultState {orgStateOptions = op...
35a804a6dec2e1d289f2c6d1859fe197b38e8effd3888e7cbaf2040b73f8b5f3
monadbobo/ocaml-core
raw_scheduler.ml
open Core.Std open Import module Execution_context = Execution_context module Clock_event = Raw_clock_event module Ivar = Raw_ivar module Tail = Raw_tail let debug = Debug.debug type 'a tail = ('a, Execution_context.t) Tail.t with sexp_of module T = struct type t = { jobs : Execution_context.t Job.t Jobs.t se...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/core/lib/raw_scheduler.ml
ocaml
Avoid a caml_modify in most cases.
open Core.Std open Import module Execution_context = Execution_context module Clock_event = Raw_clock_event module Ivar = Raw_ivar module Tail = Raw_tail let debug = Debug.debug type 'a tail = ('a, Execution_context.t) Tail.t with sexp_of module T = struct type t = { jobs : Execution_context.t Job.t Jobs.t se...
1b489677ac5eb5f434d9c2cbc43ff692efc37f5f08b3de3b040931093a22359e
tsloughter/kuberl
kuberl_v1beta1_stateful_set_condition.erl
-module(kuberl_v1beta1_stateful_set_condition). -export([encode/1]). -export_type([kuberl_v1beta1_stateful_set_condition/0]). -type kuberl_v1beta1_stateful_set_condition() :: #{ 'lastTransitionTime' => kuberl_date_time:kuberl_date_time(), 'message' => binary(), 'reason' => binary(), 'status'...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_stateful_set_condition.erl
erlang
-module(kuberl_v1beta1_stateful_set_condition). -export([encode/1]). -export_type([kuberl_v1beta1_stateful_set_condition/0]). -type kuberl_v1beta1_stateful_set_condition() :: #{ 'lastTransitionTime' => kuberl_date_time:kuberl_date_time(), 'message' => binary(), 'reason' => binary(), 'status'...
4017c2e2ae4b1feec14dacdc71e75089fcff0239da1544afb578626467151b6d
dahlia/seonbi
Lang.hs
{-# LANGUAGE OverloadedStrings #-} module Text.Seonbi.Html.Lang ( LangHtmlEntity (..) , LanguageTag , annotateWithLang , extractLang , isKorean , isNeverKorean ) where import Control.Applicative import Data.Char (isSpace) import Data.Maybe import Data.Attoparsec.Text import Data.Text impo...
null
https://raw.githubusercontent.com/dahlia/seonbi/f9f8e2f216a17d4898f4b90c90a86c39bbc4c632/src/Text/Seonbi/Html/Lang.hs
haskell
# LANGUAGE OverloadedStrings # | Represents a language tag. Although it is defined as an alias for 'Text', it can be structured in the future. Do not use its contents directly. | Extracts the language tag from the given raw HTML attributes if it has @lang@ attribute. >>> extractLang "" Nothing >>> extractLang...
module Text.Seonbi.Html.Lang ( LangHtmlEntity (..) , LanguageTag , annotateWithLang , extractLang , isKorean , isNeverKorean ) where import Control.Applicative import Data.Char (isSpace) import Data.Maybe import Data.Attoparsec.Text import Data.Text import Text.Seonbi.Html.Entity import T...
06c45ec00bc24d4301794d980ce8a28065e8275065f157b2f168cee37ed3ee0c
metabase/metabase
client_test.clj
(ns metabase.driver.druid.client-test (:require [clojure.core.async :as a] [clojure.test :refer :all] [metabase.driver.druid.client :as druid.client] [metabase.driver.util :as driver.u] [metabase.query-processor :as qp] [metabase.query-processor.context.defa...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/modules/drivers/druid/test/metabase/driver/druid/client_test.clj
clojure
wait for query to start running, then close `out-chan` we want to use a bogus port here on purpose - so that locally, it gets a ConnectionRefused,
(ns metabase.driver.druid.client-test (:require [clojure.core.async :as a] [clojure.test :refer :all] [metabase.driver.druid.client :as druid.client] [metabase.driver.util :as driver.u] [metabase.query-processor :as qp] [metabase.query-processor.context.defa...
6983da40f408a30d9bcceaac0820d47702d62b949924ed2e48abb99c9d4325a5
erlangonrails/devdb
ejabberd_zlib.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_zlib.erl Author : < > Purpose : Interface to zlib Created : 19 Jan 2006 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free software; you can redistribute it and/...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/compat/ejabberd_zlib.erl
erlang
---------------------------------------------------------------------- File : ejabberd_zlib.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...
Author : < > Purpose : Interface to zlib Created : 19 Jan 2006 by < > ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU G...
b8bd13bff48c05818121fbcdd4d0a331e79babe2bd7d477bec2a2803fbb4620e
avsm/eeww
poly.ml
(* TEST * expect *) (* Polymorphic methods are now available in the main branch. Enjoy. *) (* Tests for explicit polymorphism *) open StdLabels;; type 'a t = { t : 'a };; type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b };; let f l = { fold = List.fold_left l };; (f [1;2;3]).fold ~f:(+) ~init...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/testsuite/tests/typing-poly/poly.ml
ocaml
TEST * expect Polymorphic methods are now available in the main branch. Enjoy. Tests for explicit polymorphism printer is wrong on the next (no official syntax) Type variable scope use before instancing various old bugs Full polymorphism if we do not expand Loose polymorphism if we expand Be...
open StdLabels;; type 'a t = { t : 'a };; type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b };; let f l = { fold = List.fold_left l };; (f [1;2;3]).fold ~f:(+) ~init:0;; [%%expect {| type 'a t = { t : 'a; } type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b; } val f : 'a list -> 'a fold = ...
a812da68174c52e34225a33fd844b70ed50f4231aeee0a7a72c3a8f8894ecc6f
swarmpit/swarmpit
secrets.cljs
(ns swarmpit.component.service.info.secrets (:require [material.icon :as icon] [material.components :as comp] [material.component.form :as form] [material.component.list.basic :as list] [swarmpit.routes :as routes] [swarmpit.url :refer [dispatch!]] ...
null
https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/service/info/secrets.cljs
clojure
(ns swarmpit.component.service.info.secrets (:require [material.icon :as icon] [material.components :as comp] [material.component.form :as form] [material.component.list.basic :as list] [swarmpit.routes :as routes] [swarmpit.url :refer [dispatch!]] ...
7b689d3846b86ce40dd92a94d02e34baedc60f99e7826878caf75197531e641e
kyleburton/sandbox
game.clj
(ns the-mystery-on-orville-st.game (:require [the-mystery-on-orville-st.data :as data] [the-mystery-on-orville-st.actions :as actions] [clojure.tools.logging :as log] [clojure.data.json :as json])) (defn init! [] (data/init!) (actions/init!)) (comment (init!) )
null
https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/common-lisp/land-of-lisp/the-mystery-on-orville-st/src/the_mystery_on_orville_st/game.clj
clojure
(ns the-mystery-on-orville-st.game (:require [the-mystery-on-orville-st.data :as data] [the-mystery-on-orville-st.actions :as actions] [clojure.tools.logging :as log] [clojure.data.json :as json])) (defn init! [] (data/init!) (actions/init!)) (comment (init!) )
e53f00e0abad0a1665d762dd4a294d7f614e8924cafcbad65f16929f8d078345
aantron/luv
thread_pool.ml
let () = Luv.Thread_pool.queue_work (fun () -> Luv.Time.sleep 1000; print_endline "Finished") ignore; ignore (Luv.Loop.run () : bool)
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/example/thread_pool.ml
ocaml
let () = Luv.Thread_pool.queue_work (fun () -> Luv.Time.sleep 1000; print_endline "Finished") ignore; ignore (Luv.Loop.run () : bool)
2a778e325524b8c547ed69998c9ffb829ff56453476984962c69aac49e47ff6f
unclebob/turtle-graphics
turtle_spec.clj
(ns turtle-graphics.turtle-spec (:require [speclj.core :refer :all] [turtle-graphics.turtle :as t])) (declare turtle) (defn heading [turtle heading] (assoc turtle :heading heading)) (defn velocity [turtle velocity] (assoc turtle :velocity velocity)) (defn position [turtle position] (assoc turtle...
null
https://raw.githubusercontent.com/unclebob/turtle-graphics/def6ae986851479ae69e39e476df75c76a9b05a0/spec/turtle_graphics/turtle_spec.clj
clojure
(ns turtle-graphics.turtle-spec (:require [speclj.core :refer :all] [turtle-graphics.turtle :as t])) (declare turtle) (defn heading [turtle heading] (assoc turtle :heading heading)) (defn velocity [turtle velocity] (assoc turtle :velocity velocity)) (defn position [turtle position] (assoc turtle...
ea6de5925112b8d5fb4f16d706a12222e26badfdf250932fd63ad1d8f8942033
jordillonch/eggs
example_game_gateway_shell.erl
%% eggs (Erlang Generic Game Server) %% Copyright ( C ) 2012 - 2013 < llonch.jordi at gmail dot com > %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the %%...
null
https://raw.githubusercontent.com/jordillonch/eggs/e20ccd5093952ec967458bb2d50d5acf82e69063/apps/eggs_example_game/src/example_game_gateway_shell.erl
erlang
eggs (Erlang Generic Game Server) This program is free software: you can redistribute it and/or modify License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ...
Copyright ( C ) 2012 - 2013 < llonch.jordi at gmail dot com > it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the You should have received a copy of the GNU Affero General Public License -module(example_game_gateway_shell). -beh...
8e8b4c90a035ee9d8f392b9f0de941142a78fdd9e35babbd873c6afb3a836bb9
apibot-org/apibot
graphs.clj
(ns apibot.routes.graphs (:require [apibot.config :as config] [apibot.db.core :as db] [apibot.grexec :as grexec] [apibot.schemas :refer [Graph Execution]] [clojure.string :refer [split]] [clojure.tools.logging :as log] [compojure.api.sweet :refer :all] [ring.util.http-response :as resp...
null
https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/clj/apibot/routes/graphs.clj
clojure
(ns apibot.routes.graphs (:require [apibot.config :as config] [apibot.db.core :as db] [apibot.grexec :as grexec] [apibot.schemas :refer [Graph Execution]] [clojure.string :refer [split]] [clojure.tools.logging :as log] [compojure.api.sweet :refer :all] [ring.util.http-response :as resp...
bb5139a43d9a5f554fa06e9d1aa90d3b40633039373c0412a1760936125a6810
kupl/LearnML
original.ml
exception BAD let rec sigma (f : int -> int) (a : int) (b : int) : int = if a < 0 || b < 0 || a > b then raise BAD else if a = b then f a else f a + sigma f (a + 1) b
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/sigma/sub2/original.ml
ocaml
exception BAD let rec sigma (f : int -> int) (a : int) (b : int) : int = if a < 0 || b < 0 || a > b then raise BAD else if a = b then f a else f a + sigma f (a + 1) b
5101305aaf5eff2e024863425a20d2b930ff032ab63b890a9de18e1114f04c19
metabase/metabase
common.clj
(ns metabase.driver.sql-jdbc.sync.common (:require [metabase.driver.sql-jdbc.execute :as sql-jdbc.execute]) (:import (java.sql Connection PreparedStatement ResultSet))) (set! *warn-on-reflection* true) (defn prepare-statement "Create a PreparedStatement for metadata queries; set `TYPE_FORWARD_ONLY`/`CONCU...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/driver/sql_jdbc/sync/common.clj
clojure
set `TYPE_FORWARD_ONLY`/`CONCUR_READ_ONLY`/`FETCH_FORWARD` options `sql-jdbc.execute/prepared-statement` will set `TYPE_FORWARD_ONLY`/`CONCUR_READ_ONLY`/`FETCH_FORWARD` if `rs->row-thunk` has the signature the resulting thunk is called once for `rs-thunk` should return a `ResultSet` `rs->row-thunk` is called once...
(ns metabase.driver.sql-jdbc.sync.common (:require [metabase.driver.sql-jdbc.execute :as sql-jdbc.execute]) (:import (java.sql Connection PreparedStatement ResultSet))) (set! *warn-on-reflection* true) (defn prepare-statement if possible. These queries return no rows." ^PreparedStatement [driver ^Connec...
e78b66d4dbc9fd2974e5f92341c27567da6c8403fd17ad5eed3a740ed8c2044a
erlangonrails/devdb
scgi_server.erl
Copyright ( c ) 2007 % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights % to use, copy, modify, merge, publish, distribute, s...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ringo/ringogw/src/scgi_server.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2007 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIA...
cd793db743d673a55e4b7430654ca0194be4809249df8e2e1ac5eafe8514d8c6
BinaryAnalysisPlatform/bap
bap_core_theory_definition.ml
open Bap_knowledge open Bap_core_theory_value module Var = Bap_core_theory_var module Value = Bap_core_theory_value module Effect = Bap_core_theory_effect module Program = Bap_core_theory_program module Label = Program.Label type 'a value = 'a Value.t type 'a effect = 'a Effect.t type program = Program.cls type 'a...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/850f24b224ef4b395f46274f82fbcd604cc5b1a2/lib/bap_core_theory/bap_core_theory_definition.ml
ocaml
open Bap_knowledge open Bap_core_theory_value module Var = Bap_core_theory_var module Value = Bap_core_theory_value module Effect = Bap_core_theory_effect module Program = Bap_core_theory_program module Label = Program.Label type 'a value = 'a Value.t type 'a effect = 'a Effect.t type program = Program.cls type 'a...
856053ec4103f275de4a56aef8ba8c727990ab619b3626081e219ed2fcc29fed
metabase/metabase
backfill_ids.clj
(ns metabase-enterprise.serialization.v2.backfill-ids "Finds all models with `:entity_id` columns, scans them for anything without a blank ID, and generates consistent entity_id based on their hashes. Note that cross-JVM portability is required - but that's specified for [[java.util.Random]], so this should pr...
null
https://raw.githubusercontent.com/metabase/metabase/ff2c972dcb11f9355e314cffcc8e10b0e58f53bf/enterprise/backend/src/metabase_enterprise/serialization/v2/backfill_ids.clj
clojure
(ns metabase-enterprise.serialization.v2.backfill-ids "Finds all models with `:entity_id` columns, scans them for anything without a blank ID, and generates consistent entity_id based on their hashes. Note that cross-JVM portability is required - but that's specified for [[java.util.Random]], so this should pr...
c8cb4a86cd0134c7c8b364a9efa14acf0a562d3cb8e764d5b36926529cea3f9f
drym-org/qi
info.rkt
#lang info (define version "3.0") (define collection "qi") (define deps '("base" "qi-lib" "adjutor" "cli" "math-lib" "collections-lib" "relation-lib" "cover" "cover-coveralls")) (define build-deps '(...
null
https://raw.githubusercontent.com/drym-org/qi/a8bd930eda09e07b8f44fd2e7100b7be96d446ea/qi-sdk/info.rkt
racket
#lang info (define version "3.0") (define collection "qi") (define deps '("base" "qi-lib" "adjutor" "cli" "math-lib" "collections-lib" "relation-lib" "cover" "cover-coveralls")) (define build-deps '(...
fa570b3007750b635231805f63bf3d015674cf9ccdd7f8353869099be023a00f
OCamlPro/liquidity
liquidClientErrors.ml
open LiquidClientUtils open LiquidClientRequest open LiquidClientSigs open LiquidClientTypes open LiquidTypes open Lwt.Infix module Liquidity = LiquidityLang type error = location * string type trace = (location, syntax_const Lazy_superposed.t) Trace.t exception RuntimeError of error * trace option * Ezjsonm.value ex...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/client/liquidClientErrors.ml
ocaml
failwith_ty
open LiquidClientUtils open LiquidClientRequest open LiquidClientSigs open LiquidClientTypes open LiquidTypes open Lwt.Infix module Liquidity = LiquidityLang type error = location * string type trace = (location, syntax_const Lazy_superposed.t) Trace.t exception RuntimeError of error * trace option * Ezjsonm.value ex...
397825d995e8a009dd9d53df19e9e4662a70313108a2a9a7bd7a36fe9131e649
shamazmazum/similar-images
remover.lisp
(in-package :similar-images-remover) (defun get-dimensions-jpeg (image) (declare (type (or string pathname) image)) (multiple-value-bind (width height) (with-decompressor (handle) (decompress-header handle image)) (list width height))) (defun get-dimensions-rest (image) (declare (type (or stri...
null
https://raw.githubusercontent.com/shamazmazum/similar-images/2b56f4a870f996172e5b71b72d5f55cb78af5981/remover/remover.lisp
lisp
(in-package :similar-images-remover) (defun get-dimensions-jpeg (image) (declare (type (or string pathname) image)) (multiple-value-bind (width height) (with-decompressor (handle) (decompress-header handle image)) (list width height))) (defun get-dimensions-rest (image) (declare (type (or stri...
32b672bd908237994322312c0315c97a8ef682fdd8c62c964482d021c6881ea5
bennn/little-book-of-semaphores
5-6-river.rkt
#lang little-book-of-semaphores (define CAP 4) (define boat (box '())) (define rowing? (box #f)) (define boat-mutex (make-semaphore 1)) (define set-sail (make-semaphore 0)) (define new-boat (make-semaphore 0)) ;; ----------------------------------------------------------------------------- ;; --- BEGIN DANGER need bo...
null
https://raw.githubusercontent.com/bennn/little-book-of-semaphores/13dc1690073ae45f5ac7e4e4137d636aae1ef7c9/problems/5-6-river.rkt
racket
----------------------------------------------------------------------------- --- BEGIN DANGER need boat-mutex to call these Ignoring s --- END DANGER ----------------------------------------------------------------------------- -- get on the boat -- get off the boat
#lang little-book-of-semaphores (define CAP 4) (define boat (box '())) (define rowing? (box #f)) (define boat-mutex (make-semaphore 1)) (define set-sail (make-semaphore 0)) (define new-boat (make-semaphore 0)) (define (boat-full?) (= CAP (length (unbox boat)))) (define (boat-empty?) (null? (unbox boat))) (defi...
6d68fc541478dd95b4d780b0c7fee67341f0998d9a2d3f8538e6e6a7108a3763
silky/quipper
FPReal.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== # LANGUAGE MultiParamTypeClasses # # LANGUAGE Fle...
null
https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/QuipperLib/FPReal.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== # LANGUAGE DeriveDataTypeable # | This library provides a quantum implementation of fixed-precision real numbers (i.e., with precision...
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # LANGUAGE TypeFamilies # # LANGUAGE IncoherentInstances # * decide on how much access to provide to underl...
c93715abefc7e35e8603baeb00307d5f3569d45e5e0fca8615befb0658f37e7b
gnuvince/ocaml-tiger
enventry.ml
type fun_entry = { fun_formals: Types.t list; fun_result: Types.t } type t = | VarEntry of Types.t | FunEntry of fun_entry let to_string = function | VarEntry t -> Printf.sprintf "<var: %s>" (Types.to_string t) | FunEntry { fun_formals; fun_result } -> Printf.sprintf "<fun: (%s) -> %s>...
null
https://raw.githubusercontent.com/gnuvince/ocaml-tiger/42e39cb0d48cf3100fbfb7e51aa88a71e04ec6a4/enventry.ml
ocaml
type fun_entry = { fun_formals: Types.t list; fun_result: Types.t } type t = | VarEntry of Types.t | FunEntry of fun_entry let to_string = function | VarEntry t -> Printf.sprintf "<var: %s>" (Types.to_string t) | FunEntry { fun_formals; fun_result } -> Printf.sprintf "<fun: (%s) -> %s>...
6b032e52a54c90243f4869aaac438af463d5d18b8b19b19b9a803ee2311200e0
rubenbarroso/EOPL
1_31.scm
(define make-lexical-address (lambda (v d p) (list v ': d p))) ( make - lexical - address ' a 1 2 ) > ( a : 1 2 ) (define get-v (lambda (address) (car address))) (define get-d (lambda (address) (caddr address))) (define get-p (lambda (address) (cadddr address))) (define increment-depth (l...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter1/1_31.scm
scheme
> (increment-depth '(a : 0 0)) (c free) (a : 0 0) > (index-of 'a '(b c d e f a g)) > (index-of 'a '(b c d e f h g)) free > (filter-bound '(a c)) > (filter-free '(a c) '((a : 0 0) (b : 0 0))) > (lexical-address '(lambda (a b c) (if (eqv? b c) ((lambda (c) ...
(define make-lexical-address (lambda (v d p) (list v ': d p))) ( make - lexical - address ' a 1 2 ) > ( a : 1 2 ) (define get-v (lambda (address) (car address))) (define get-d (lambda (address) (caddr address))) (define get-p (lambda (address) (cadddr address))) (define increment-depth (l...
d00f160a31cf5bded093beeb89ca5aa2b4d34044da2e33348ff8e8ad3a04a2c5
bbss/cljsc2
environment_situation_creation.clj
(ns environment-situation-creation) ;;It would be nice to easily configure sc2 game environments ;;this to facilitate data collection for ;; - Agent performance (think automatic generated minigame) ;; - API data output analysis (think "what does casting storm do to a bunch of clumped up marines") ;; - Collecting estim...
null
https://raw.githubusercontent.com/bbss/cljsc2/70e720f5bae9b58248df86f3f50d855878ae4f49/src/cljsc2/clj/environment_situation_creation.clj
clojure
It would be nice to easily configure sc2 game environments this to facilitate data collection for - Agent performance (think automatic generated minigame) - API data output analysis (think "what does casting storm do to a bunch of clumped up marines") - Collecting estimator data. (think "what does my mineral income ...
(ns environment-situation-creation) (defn create-in-env []) "add mining scv to second expand" "attack with army on left" (defn add-to-env [])
2626a4dead276cd3034d2f45485c4974117015632ade34f63441575cca2c0564
exercism/common-lisp
packages.lisp
(defpackage :test-exercises (:use :cl) (:export :run-all-tests :test-exercise))
null
https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/src/test-exercises/packages.lisp
lisp
(defpackage :test-exercises (:use :cl) (:export :run-all-tests :test-exercise))
3ef8c9ffaa039b25498c6fe13a68ac88603d7c8161215f54e8ebe28b027ebf97
CloudI/CloudI
exometer_function.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . %% 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 obtai...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_exometer_core/src/exometer_function.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- The return value is the result Pick the data point out of a proplist @doc Callback for creating an exometer `function' entry. Function entries are created as <pre lang="erla...
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . 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 /. -module(exometer_function). -behaviour(exometer_entry). -expor...
69f2b35d9b2833fb93566d8e8118f6f7c09f438669758670f22f5dc29266adbd
hyperfiddle/electric
hfql_examples.clj
(ns hfql_examples (:require [hyperfiddle.photon :as p] [hyperfiddle.hfql :refer [hfql]])) (comment [{(sub-requests sub since {{status {:options (sub-req-status-picklist)}} [:db/ident]} {{school {:options (school-picklist .)}} [:school/name]}) ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/content/hfql_examples.clj
clojure
(ns hfql_examples (:require [hyperfiddle.photon :as p] [hyperfiddle.hfql :refer [hfql]])) (comment [{(sub-requests sub since {{status {:options (sub-req-status-picklist)}} [:db/ident]} {{school {:options (school-picklist .)}} [:school/name]}) ...
187872df1c6f8ae87ee29ecec38e776fb701608c2eb79b96e3d84e9828fe873c
typelead/eta
Trace.hs
# LANGUAGE Unsafe # # LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # # LANGUAGE UnboxedTuples # # LANGUAGE GHCForeignImportPrim # {-# LANGUAGE UnliftedFFITypes #-} ----------------------------------------------------------------------------- -- | -- Module : Debug.Trace Copyright : ( c ) The Universi...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/libraries/base/Debug/Trace.hs
haskell
# LANGUAGE UnliftedFFITypes # --------------------------------------------------------------------------- | Module : Debug.Trace License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable Functions for tracing and monitoring execution...
# LANGUAGE Unsafe # # LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # # LANGUAGE UnboxedTuples # # LANGUAGE GHCForeignImportPrim # Copyright : ( c ) The University of Glasgow 2001 They should /not/ be used in production code . module Debug.Trace ( trace, traceId, traceShow, ...
f001747c1c1c7eb41440c56877d5eb248cb0f7d246547f4034eab0241fc5c71d
dbuenzli/jsonc
testing_backend.mli
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/jsonc/b6adf836a2812f25d934e85ba3b6daa5fe77fd14/test-jsoo/testing_backend.mli
ocaml
* Testing for [Jsont_jsoo].
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
cb60203b50dc4b989f8034a1956d36bcc47211ef03fbc0b6eb8f3186abe303d6
alevy/simple
smpl.hs
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} -- | The `smpl` utility for helping a user setup a Simple web project. module Main (main) where import Prelude hiding (writeFile, FilePath, all) import Control.Monad (when) import Data.Aeson import Data.Char import qualified Data.ByteString.Char8 as S8 import qua...
null
https://raw.githubusercontent.com/alevy/simple/7091a592635999b3d60799b70c85bceda3905a9f/simple/src/smpl.hs
haskell
# LANGUAGE DeriveDataTypeable, OverloadedStrings # | The `smpl` utility for helping a user setup a Simple web project.
module Main (main) where import Prelude hiding (writeFile, FilePath, all) import Control.Monad (when) import Data.Aeson import Data.Char import qualified Data.ByteString.Char8 as S8 import qualified Data.Text.Encoding as T import Data.Version import System.Console.CmdArgs import System.Directory import System.FilePat...
9f2edb526d40a0d6b07b09a0420078d7f655e1155071e6ae467721c97f9afc60
rotty/spells
fmt.scm
(define (call-with-string-input-port s proc) (proc (open-string-input-port s))) (include-file ((spells private fmt) test-fmt))
null
https://raw.githubusercontent.com/rotty/spells/e237bfa3aa4cc5be111423093239a3b4a13c5fb1/tests/fmt.scm
scheme
(define (call-with-string-input-port s proc) (proc (open-string-input-port s))) (include-file ((spells private fmt) test-fmt))
06ab6e61aee4781e7040880c472f3bd613b7f63f94576514ee383c22c1f9052f
viebel/klipse-repl
deps.clj
(ns klipse-repl.deps (:refer-clojure :exclude (add-classpath)) (:require [clojure.java.io :as io] [gadjett.core :refer [dbg dbgdef]] [clojure.tools.deps.alpha.reader :as reader] [klipse-repl.classpath :refer [add-classpath]] [clojure.tools.deps.alpha :as deps :refer [...
null
https://raw.githubusercontent.com/viebel/klipse-repl/8acc1ffaee520c991f834af5a0827286884aa8c9/src/klipse_repl/deps.clj
clojure
(ns klipse-repl.deps (:refer-clojure :exclude (add-classpath)) (:require [clojure.java.io :as io] [gadjett.core :refer [dbg dbgdef]] [clojure.tools.deps.alpha.reader :as reader] [klipse-repl.classpath :refer [add-classpath]] [clojure.tools.deps.alpha :as deps :refer [...
741977c78bbb0b144fbe3a949189692c69b2cd3893be01535fa5dccb9eb376a6
stumpwm/stumpwm-contrib
package.lisp
package.lisp (defpackage #:end-session (:use #:cl :stumpwm))
null
https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/util/end-session/package.lisp
lisp
package.lisp (defpackage #:end-session (:use #:cl :stumpwm))
f2df0f651932f39b91a43e7d15c336cf291b779b00671c257677466a7a429bad
ollef/sixten
Extracted.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE Template...
null
https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Syntax/Sized/Extracted.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # ^ Fully applied ^ Fully applied, only global ----------------------------------------------------------------------------- Helpers -----------------------------------------------------------------------------...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # # LANGUAGE ViewPatterns # module Syntax.Sized.Extracted where import Protolude hiding (Type, TypeRep) import Data...
408f43cbf0c6bc94c88d09921bf5a2a73337020dc454b8636ad9626087a99429
arvyy/racket-raylib-2d
functions.rkt
#lang racket/base (require ffi/unsafe ffi/unsafe/define "structs.rkt" "enums.rkt") (define-ffi-definer drl (ffi-lib "libraylib")) (provide (except-out (all-defined-out) drl)) ;module: core ;============ ;window related functions ;void InitWindow(int width, int height, const char *title)...
null
https://raw.githubusercontent.com/arvyy/racket-raylib-2d/2f0b05f37e6bd81cf4246116c7d32f2744dc53c0/functions.rkt
racket
module: core ============ window related functions void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context // Check if KEY_ESCAPE pressed or Close icon pressed // Close window and unload OpenGL context // Check if window has been initialized successfully ...
#lang racket/base (require ffi/unsafe ffi/unsafe/define "structs.rkt" "enums.rkt") (define-ffi-definer drl (ffi-lib "libraylib")) (provide (except-out (all-defined-out) drl)) (drl InitWindow (_fun _int _int _string -> _void)) (drl WindowShouldClose (_fun -> _bool)) (drl CloseWind...
717c6f61aad8dde11bcdc47bea5b6e0338c2adc29a4aba54a36c77b22b09d513
bakyeono/bitmap-font
han.clj
;; bitmap-font.han 한글 처리 유틸리티 (ns bitmap-font.han) ;; --- 한글 자모 분리 및 합성 --- * 한글 조합 공식 ;; 완성형 한글 코드 = ( ( ( 초성번호 * 중성개수 ) + 중성번호 ) * 종성개수 ) + + ;; 유니코드 완성형 한글 범위 (def ^:const han-begin 0xac00) (def ^:const han-end 0xd7a3) 중성의 가지수 / 종성의 가지수 (def ^:const number-of-bodies 21) (def ^:const number-of-tail...
null
https://raw.githubusercontent.com/bakyeono/bitmap-font/2422bc748006f599ef4b42f5ce5cdfba9ff980e9/src/bitmap_font/han.clj
clojure
bitmap-font.han --- 한글 자모 분리 및 합성 --- 완성형 한글 코드 = 유니코드 완성형 한글 범위 is-head? 한글 초성 문자 집합 is-body? 한글 중성 문자 집합 is-tail? 한글 종성 문자 집합 which-part head->head-idx head-idx->head 번호를 한글 초성 순서(번호)에 따른 문자와 대응시킨다. body-idx->body 번호를 한글 중성 순서(번호)에 따른 문자와 대응시킨다. tail-idx->tail 번호를 한글 중성 순서(번호)에 따른 문자와 대응시킨다. full...
한글 처리 유틸리티 (ns bitmap-font.han) * 한글 조합 공식 ( ( ( 초성번호 * 중성개수 ) + 중성번호 ) * 종성개수 ) + + (def ^:const han-begin 0xac00) (def ^:const han-end 0xd7a3) 중성의 가지수 / 종성의 가지수 (def ^:const number-of-bodies 21) (def ^:const number-of-tails 28) (def ^:const number-of-bodies*tails (* number-of-bodies number-of-tails...
2431ded891051007f22d4aa5a61b1e83cafcab60b5d54dc5868c2b8616c170e7
metabase/metabase
permissions_test.clj
(ns metabase-enterprise.sandbox.api.permissions-test (:require [cheshire.core :as json] [clojure.string :as str] [clojure.test :refer :all] [metabase-enterprise.sandbox.models.group-table-access-policy :refer [GroupTableAccessPolicy]] [metabase-enterprise.test :as met] [metabase.models :refe...
null
https://raw.githubusercontent.com/metabase/metabase/ff2c972dcb11f9355e314cffcc8e10b0e58f53bf/enterprise/backend/test/metabase_enterprise/sandbox/api/permissions_test.clj
clojure
(ns metabase-enterprise.sandbox.api.permissions-test (:require [cheshire.core :as json] [clojure.string :as str] [clojure.test :refer :all] [metabase-enterprise.sandbox.models.group-table-access-policy :refer [GroupTableAccessPolicy]] [metabase-enterprise.test :as met] [metabase.models :refe...
44140dd5a39ebc44160d478d5f9f3e8785f859eb93b7dbfc322003aeb3457996
stumpwm/stumpwm
package.lisp
(defpackage :dynamic-mixins (:use #:cl #:alexandria) (:export #:mixin-class #:mixin-object #:mixin-classes #:ensure-mix #:delete-from-mix #:mix #:replace-class #:replace-class-in-mixin))
null
https://raw.githubusercontent.com/stumpwm/stumpwm/189a730f73266999d5b8f992faf939c11d7815ad/dynamic-mixins/src/package.lisp
lisp
(defpackage :dynamic-mixins (:use #:cl #:alexandria) (:export #:mixin-class #:mixin-object #:mixin-classes #:ensure-mix #:delete-from-mix #:mix #:replace-class #:replace-class-in-mixin))
f18256f7dfa51794299e2ce58c857b56d10325d6f38803738dae38b382ac4f72
macourtney/Conjure
test_session_store.clj
(ns conjure.model.test-session-store (:use test-helper clojure.test conjure.model.session-store) (:require [conjure.util.session-utils :as session-utils] [conjure.util.request :as request])) (use-fixtures :once init-server) (def test-session-id "blah") (deftest test-session-store ...
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_model/test/conjure/model/test_session_store.clj
clojure
(ns conjure.model.test-session-store (:use test-helper clojure.test conjure.model.session-store) (:require [conjure.util.session-utils :as session-utils] [conjure.util.request :as request])) (use-fixtures :once init-server) (def test-session-id "blah") (deftest test-session-store ...
3276352c208f41138d282797c2c13932ccdb42563d0e6a512409f82c7ad89a28
aggieben/weblocks
debug-mode.lisp
(in-package weblocks-test) ;;; test render-debug-toolbar (deftest-html render-debug-toolbar-1 (with-request :get nil (weblocks::render-debug-toolbar)) (:div :class "debug-toolbar" (:a :href "/foo/bar?action=debug-reset-sessions" :title "Reset Sessions" (:img :src "/pub/images/reset.png" :al...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/debug-mode.lisp
lisp
test render-debug-toolbar test initialize-debug-actions
(in-package weblocks-test) (deftest-html render-debug-toolbar-1 (with-request :get nil (weblocks::render-debug-toolbar)) (:div :class "debug-toolbar" (:a :href "/foo/bar?action=debug-reset-sessions" :title "Reset Sessions" (:img :src "/pub/images/reset.png" :alt "Reset Sessions")))) (defte...
4d31c01c6be8e8d90693998302ba75810773f88a95824ebdd3b11f2a7b990a9e
OCamlPro/ocp-build
buildTypes.ml
(**************************************************************************) (* *) (* Typerex Tools *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/buildTypes.ml
ocaml
************************************************************************ Typerex Tools ...
Copyright 2011 - 2017 OCamlPro SAS the GNU General Public License version 3 described in the file open OcpCompat type package_type = BuildOCPTypes.package_type = | ProgramPackage | TestPackage | LibraryPackage | ObjectsPackage | SyntaxPackage | RulesPack...
0a7afcbada245fa911ba03edabab3e2974716a64bab2987286d7173a140bdd1e
inaka/serpents
spts_hdp_game_sup.erl
@doc serpents HDP game supervisor -module(spts_hdp_game_sup). -behavior(supervisor). -export([start_link/0, start_child/1, init/1]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Start / Stop %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -spec ...
null
https://raw.githubusercontent.com/inaka/serpents/b21b63cee117e0b98fd3a9be4fb326e9de3ee861/src/protocol/spts_hdp_game_sup.erl
erlang
SUPERVISOR CALLBACKS
@doc serpents HDP game supervisor -module(spts_hdp_game_sup). -behavior(supervisor). -export([start_link/0, start_child/1, init/1]). Start / Stop -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, noargs). -spec start_child(pos_integer()) -> supervisor:startchil...
1ffa69baf0b01c9855f4b135e116e9c28035df9f2bd6344cf1dc41169cd20888
aiya000/haskell-examples
DemoteRep.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE InstanceSigs # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # import Data.Proxy (Proxy(..)) import Data.Singletons (SingI(..), Sing, SingKind(..), SomeSing(..)) -- | inductive structure data Foo = Foo Foo | End data instance ...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Data/Singletons/DemoteRep.hs
haskell
# LANGUAGE GADTs # | inductive structure {output} REnd RFoo REnd
# LANGUAGE DataKinds # # LANGUAGE InstanceSigs # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # import Data.Proxy (Proxy(..)) import Data.Singletons (SingI(..), Sing, SingKind(..), SomeSing(..)) data Foo = Foo Foo | End data instance Sing (a :: Foo) where EndS :: Sing 'End FooS...
f9ce58fdcb5226352c6f9a2d0e27f80c6238313a8d49d70e8a687743107cccdc
LexiFi/menhir
Drop.mli
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/Drop.mli
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
a9bdf33403cb0539f011a5f2764c1e37e1e53896eebb55f885c0470b42be9534
vincenthz/hs-memory
Imports.hs
-- | -- Module : Data.Memory.Internal.Imports -- License : BSD-style Maintainer : < > -- Stability : experimental -- Portability : unknown -- # LANGUAGE CPP # module Data.Memory.Internal.Imports ( module X ) where import Data.Word as X import Control.Applicative as...
null
https://raw.githubusercontent.com/vincenthz/hs-memory/202a7796ab3e048943fc488704be890a3138c587/Data/Memory/Internal/Imports.hs
haskell
| Module : Data.Memory.Internal.Imports License : BSD-style Stability : experimental Portability : unknown
Maintainer : < > # LANGUAGE CPP # module Data.Memory.Internal.Imports ( module X ) where import Data.Word as X import Control.Applicative as X import Control.Monad as X (forM, forM_, void, when) import Control.Arrow as X (first, second) import Da...
695a3651d9f56ea2ad2f580153c8e1edbb8d9bb034c36ffee5fcfc46a4e24087
simonmichael/hledger
Uniqueleafnames.hs
{-# LANGUAGE OverloadedStrings #-} module Hledger.Data.JournalChecks.Uniqueleafnames ( journalCheckUniqueleafnames ) where import Data.Function (on) import Data.List (groupBy, sortBy) import Data.Text (Text) import qualified Data.Text as T import Text.Printf (printf) import Hledger.Data.AccountName (accountLeafNam...
null
https://raw.githubusercontent.com/simonmichael/hledger/b46cb8a7f77df569373d0b2b12bba5e97eff76c7/hledger-lib/Hledger/Data/JournalChecks/Uniqueleafnames.hs
haskell
# LANGUAGE OverloadedStrings # | Check that all the journal's postings are to accounts with a unique leaf name. find all duplicate leafnames, and the full account names they appear in t = fromMaybe nulltransaction ptransaction -- XXX sloppy shouldn't happen
module Hledger.Data.JournalChecks.Uniqueleafnames ( journalCheckUniqueleafnames ) where import Data.Function (on) import Data.List (groupBy, sortBy) import Data.Text (Text) import qualified Data.Text as T import Text.Printf (printf) import Hledger.Data.AccountName (accountLeafName) import Hledger.Data.Errors (make...
ed92b74aa9ef34f31d0c64291b6c7d0b171c3a0323af71a3cbaed0a21c788009
velveteer/slacker
Builder.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE TypeFamilies # {-# OPTIONS -Wno-redundant-constraints #-} module Slacker.Blocks.Builder ( Blocks(..) , AllBlocks , blocksToUnion , blocksToValues , actions , actions_ , context , context_ , divider , divider_ , section , section_ ...
null
https://raw.githubusercontent.com/velveteer/slacker/f1e646897c86c7452ab18c537d65af4515ea159c/src/Slacker/Blocks/Builder.hs
haskell
# LANGUAGE GADTs # # OPTIONS -Wno-redundant-constraints # Each accessory in the sequence overrides the next.
# LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # module Slacker.Blocks.Builder ( Blocks(..) , AllBlocks , blocksToUnion , blocksToValues , actions , actions_ , context , context_ , divider , divider_ , section , section_ , header , header_ ) where import qualified Data.Aeson as A...
e2c296d8a6db790c72c31088d1dd18cdecb4382b2e789308e9148437847a5c00
FestCat/festival-ca
upc_catalan_hour.scm
Copyright ( C ) 2009 - 2011 . Universitat Politècnica de Catalunya , Barcelona , Spain ;;; ;;; This script 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 , version 2.1 of th...
null
https://raw.githubusercontent.com/FestCat/festival-ca/f6b2d9bf4fc4f77b80890ebb95770075ad36ccaf/festival/lib/upc_catalan/upc_catalan_hour.scm
scheme
This script 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...
Copyright ( C ) 2009 - 2011 . Universitat Politècnica de Catalunya , Barcelona , Spain License as published by the Free Software Foundation , version 2.1 of the License . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin St , Fifth Floor , ...
37ad155e2ef806d5a67b75d1b7de43c69dbcf2544d4b1ddad2e96fd1d537d8fb
haskell-opengl/OpenGL
Limits.hs
----------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Shaders.Limits Copyright : ( c ) 2006 - 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -- This module contains funct...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/Shaders/Limits.hs
haskell
--------------------------------------------------------------------------- | Module : Graphics.Rendering.OpenGL.GL.Shaders.Limits License : BSD3 Stability : stable Portability : portable This module contains functions related to shader limits. ---------------------------------------------------...
Copyright : ( c ) 2006 - 2019 Maintainer : < > module Graphics.Rendering.OpenGL.GL.Shaders.Limits ( maxVertexTextureImageUnits, maxTextureImageUnits, maxCombinedTextureImageUnits, maxTextureCoords, maxVertexUniformComponents, maxFragmentUniformComponents, maxVertexAttribs, maxVaryingFloats )...
c0314db55884c6292e29705f2991c5005ca3f6fe8ecf160107d91f0af120c84b
prikhi/bodyweight-server
Routes.hs
# LANGUAGE TypeOperators # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE FlexibleContexts # module Routes ( CRUD , CRUDRoutes , crudRoutes ) where import Database.Persist.Postgresql import Servant import Auth import Models import Server (AppM, runDB, notFound) type C...
null
https://raw.githubusercontent.com/prikhi/bodyweight-server/4c5bc92d3c35db676c94b6f32d3245231f97eb66/src/Routes.hs
haskell
# LANGUAGE GADTs # | The `listRoute` returns a JSON Array of Persistent Entities. | The `createRoute` parses a JSON request body & inserts the value into the database if it is valid. | The `viewRoute` returns a single JSON object representing a Persistent Entity. | The `updateRoute` attempts to update an Entity u...
# LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Routes ( CRUD , CRUDRoutes , crudRoutes ) where import Database.Persist.Postgresql import Servant import Auth import Models import Server (AppM, runDB, notFound) type CRUD resource = ...
11e881f55a548977af41ca6d4e51aa7542ee1f340f2a80bb0b83add7ff88b715
denisshevchenko/circlehs
Environment.hs
| Module : Network . CircleCI.Environment Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : alpha API calls for work with Environment Variables used in project build . For more info please see " Environment variables " section in your CircleCI project 's Settings . ...
null
https://raw.githubusercontent.com/denisshevchenko/circlehs/0c01693723a234bb46ff8d1e6e114cce91dfa032/src/Network/CircleCI/Environment.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE MultiWayIf # * API calls * Types for calls and responses | Name of environment variable. Usage example: @ main :: IO () >>= \\case Left problem -> print problem Right envVars -> print envVars @ ^ List of environment variables. Usage example...
| Module : Network . CircleCI.Environment Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : alpha API calls for work with Environment Variables used in project build . For more info please see " Environment variables " section in your CircleCI project 's Settings . ...
03a64891713aa3fd3e33f5b8d916dffce5873efff7afb35afef3123d71869b34
anuragsoni/http_async
body.ml
open Core open Async open Shuttle module Reader = struct type t = | Empty | Stream of { encoding : [ `Chunked | `Fixed of int ] ; reader : (Bigstring.t Core_unix.IOVec.t Pipe.Reader.t[@sexp.opaque]) } [@@deriving sexp_of] let empty = Empty module Private = struct let rec r...
null
https://raw.githubusercontent.com/anuragsoni/http_async/b57078671187b5ecebec6543eab185d04f3c77bd/src/body.ml
ocaml
TODO: check for exceptions when converting to int avoid writing empty payloads as that is used to indicate the end of a stream.
open Core open Async open Shuttle module Reader = struct type t = | Empty | Stream of { encoding : [ `Chunked | `Fixed of int ] ; reader : (Bigstring.t Core_unix.IOVec.t Pipe.Reader.t[@sexp.opaque]) } [@@deriving sexp_of] let empty = Empty module Private = struct let rec r...
8860c20e48d5bca0fd7cb0fb079c5c3a5d9edd557f26da77d6abd96ab5153e29
yangyang5214/asciicast2mp4
util_test.cljs
(ns asciinema.player.util-test (:require-macros [cljs.test :refer (is deftest testing)]) (:require [cljs.test] [asciinema.player.util :as u])) (deftest adjust-to-range-test (is (= (u/adjust-to-range 1 -5 5) 1)) (is (= (u/adjust-to-range -6 -5 5) -5)) (is (= (u/adjust-to-range 6 -5 5) 5)))
null
https://raw.githubusercontent.com/yangyang5214/asciicast2mp4/5404a53ae331d44abfada6002b9affac76073418/asciinema-player/test/asciinema/player/util_test.cljs
clojure
(ns asciinema.player.util-test (:require-macros [cljs.test :refer (is deftest testing)]) (:require [cljs.test] [asciinema.player.util :as u])) (deftest adjust-to-range-test (is (= (u/adjust-to-range 1 -5 5) 1)) (is (= (u/adjust-to-range -6 -5 5) -5)) (is (= (u/adjust-to-range 6 -5 5) 5)))
2eaf75d088de849e5fe4525322c41554aa1041e86b0cb12ee79bf16493cac2d6
matsen/pplacer
guppy_round.ml
open Subcommand open Guppy_cmdobjs open Ppatteries (* Note that this version of rounded placements does not take the likelihood * weight ratio into account. However, we do preserve the order of appearance of * edges in the rounded pquery, which does maintain some of that information. * Furthermore, branch lengths m...
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/guppy_round.ml
ocaml
Note that this version of rounded placements does not take the likelihood * weight ratio into account. However, we do preserve the order of appearance of * edges in the rounded pquery, which does maintain some of that information. * Furthermore, branch lengths must be similar. given a list of pqueries, we round ...
open Subcommand open Guppy_cmdobjs open Ppatteries type rounded_placement = { location: int; distal_bl: float; pendant_bl: float; } let rounded_placement_of_placement multiplier p = let round = match multiplier with | Some mult -> fun x -> float_of_int (round (mult *. x)) | None -> fun x -> ...
117f2da2daa97450a32b7d5fd005964db32a83f9dce20c2396eef89d90f3dc8a
AlexeyRaga/azure-functions-haskell-worker
Indented.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # module Patchers.Indented where import Data.Bifunctor (first) import Data.Char (isSpace) import Data.Function (on, (&)) import Data.Functor ((<&>)) import qualified Data.List as List import ...
null
https://raw.githubusercontent.com/AlexeyRaga/azure-functions-haskell-worker/a2fd35c5c4661e6255016bc004681c451b8beb46/azure-functions-tools/app/Patchers/Indented.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TupleSections # module Patchers.Indented where import Data.Bifunctor (first) import Data.Char (isSpace) import Data.Function (on, (&)) import Data.Functor ((<&>)) import qualified Data.List as List import Data.Maybe (fromMaybe, listToMa...
37c526e7e35906192d6986c1e08636e0b50ac70bf4ba1d6e0d80fcc269c932b9
Feldspar/raw-feldspar
C.hs
# LANGUAGE QuasiQuotes # # OPTIONS_GHC -fwarn - incomplete - patterns # -- | C code generation of primitive Feldspar expressions module Feldspar.Primitive.Backend.C where import Data.Complex import Data.Constraint (Dict (..)) import Data.Proxy import Language.C.Quote.C import qualified Language.C.Syntax as C i...
null
https://raw.githubusercontent.com/Feldspar/raw-feldspar/d57ad4eae1624f9a2907d06e885a86a3f939072c/src/Feldspar/Primitive/Backend/C.hs
haskell
| C code generation of primitive Feldspar expressions | Compile a complex literal | Compile a unary operator | Compile a binary operator | Compile a function call | Compile a call to 'abs' Floating and complex types | Compile a call to 'signum' wrong. They should return -0.0. I don't know whether it's correct ...
# LANGUAGE QuasiQuotes # # OPTIONS_GHC -fwarn - incomplete - patterns # module Feldspar.Primitive.Backend.C where import Data.Complex import Data.Constraint (Dict (..)) import Data.Proxy import Language.C.Quote.C import qualified Language.C.Syntax as C import Language.C.Monad import Language.Embedded.Backend.C...
3820fa6d75542729e94e3788e0bcea7d00baea2d7a53189e84bf707a0b97e598
wireapp/wire-server
SmokeTest.hs
# LANGUAGE ExtendedDefaultRules # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - type - defaults # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of th...
null
https://raw.githubusercontent.com/wireapp/wire-server/e03f7219210019ae5be50739f594dc667e669168/tools/api-simulations/smoketest/src/Network/Wire/Simulations/SmokeTest.hs
haskell
# LANGUAGE OverloadedStrings # This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT...
# LANGUAGE ExtendedDefaultRules # # OPTIONS_GHC -fno - warn - type - defaults # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy...
e7fa59f5548b39f5f25ef0be7bbf64a0406643ff90e4cdfe12aa55d4478343f2
erlangonrails/devdb
riak_core_test_util.erl
%% ------------------------------------------------------------------- %% %% riak_test_util: utilities for test scripts %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this fil...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/apps/riak_core/src/riak_core_test_util.erl
erlang
------------------------------------------------------------------- riak_test_util: utilities for test scripts Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License f...
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
2f38fcc181a3a335af2e9337e9f7f6f2d8397fe7ee0a89cebffe0649bf772013
apache/couchdb-rebar
rebar_app_utils.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% rebar : Erlang Build Tools %% Copyright ( c ) 2009 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this softw...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/src/rebar_app_utils.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sel...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- rebar : Erlang Build Tools Copyright ( c ) 2009 ( ) in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the...
2b711f4017511922b03ddf17d80c7555a3e7e31ba97b35dda0c6ffe7f52d7033
rtoy/ansi-cl-tests
file-string-length.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Jan 22 21:34:04 2004 ;;;; Contains: Tests of FILE-STRING-LENGTH (in-package :cl-test) (deftest file-string-length.1 (with-open-file (s "tmp.dat" :direction :output :if-exists :supersede) (loop for x across +standard-chars+ for len = ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/file-string-length.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of FILE-STRING-LENGTH Error tests
Author : Created : Thu Jan 22 21:34:04 2004 (in-package :cl-test) (deftest file-string-length.1 (with-open-file (s "tmp.dat" :direction :output :if-exists :supersede) (loop for x across +standard-chars+ for len = (file-string-length s x) do (assert (typep len '(or null ...
7340442d5f29afefbb677c278c581f8a34ac28fda6d7bee42a3d4857a0403834
monadbobo/ocaml-core
raw_scheduler.ml
open Core.Std open Import module Core_scheduler = Async_core.Scheduler module Block_group = Async_core.Block_group module Work = Block_group.Work module Fd = Raw_fd module Signal = Core.Std.Signal type 'a with_options = 'a Core_scheduler.with_options include struct open Core_scheduler let current_execution_cont...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/unix/lib/raw_scheduler.ml
ocaml
The [select_interruptor] is used to interrupt the call to select when the select loop needs to be woken up to process changes, for any of the following reasons: * to start watching a file descriptor * to add a timer event * to process a finalizer * to process a signal * to pr...
open Core.Std open Import module Core_scheduler = Async_core.Scheduler module Block_group = Async_core.Block_group module Work = Block_group.Work module Fd = Raw_fd module Signal = Core.Std.Signal type 'a with_options = 'a Core_scheduler.with_options include struct open Core_scheduler let current_execution_cont...
30123dbb74fa53b56387a5d0e168ecaf888bb63eecd85f7b125759533cf1ee79
smallmelon/sdzmmo
lib_team.erl
%%%------------------------------------ %%% @Module : lib_team @Author : zzm %%% @Email : @Created : 2010.08.07 %%% @Description: 组队模块公共函数 %%%------------------------------------ -module(lib_team). -export([send_leaderid_area_scene/2]). -include("common.hrl"). -include("record.hrl"). %%Id:队长id %%Type: 1 ...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/lib/lib_team.erl
erlang
------------------------------------ @Module : lib_team @Email : @Description: 组队模块公共函数 ------------------------------------ Id:队长id Type: 0 => 卸任队长
@Author : zzm @Created : 2010.08.07 -module(lib_team). -export([send_leaderid_area_scene/2]). -include("common.hrl"). -include("record.hrl"). 1 = > 上任队长 send_leaderid_area_scene(Id, Type) -> case ets:lookup(?ETS_ONLINE, Id) of [] -> ok; [Player] -> {ok, BinData} = pt_12:write...
684afeed2f331d9c9fe40578ad38f1121da9e3e9ac0acad1a516f631fd80b1ac
xapi-project/xen-api
network_client.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/1e1165f330c30ee6cb8e8f325af9fdd07474ca24/ocaml/xapi-idl/network/network_client.ml
ocaml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
9746acd2e18ba9f3be3659ab34b5941134cb2ebeda1b6dd6751567315b71e6d2
cedlemo/OCaml-GI-ctypes-bindings-generator
Container_private.ml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Container_private"
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Container_private.ml
ocaml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Container_private"
e7b1bd73ce11e65a576a8fc55a110d9c3c0452828193784ef38f4f24e8c26ff9
HunterYIboHu/htdp2-solution
ex309-words-on-line.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex309-words-on-line) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construc...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Intermezzo-Scope-and-Abstraction/ex309-words-on-line.rkt
racket
about the language level of this file in a form that our tools can easily process. constants [List-of [List-of String]] -> [List-of Number] determines the number of words on each line [List-of [List-of String]] -> [List-of Number] determines the number of words on each line
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex309-words-on-line) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/abstraction) (define lin...
4b9a8e4ec44f5c9b84255730f00053e8a9fdf7194139b7291527ad983dc79b7d
hhucn/decide3
dark_mode_toggle.cljs
(ns decide.ui.components.dark-mode-toggle (:require [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [mui.inputs.toggle-button :as toggle] ["@mui/icons-material/Brightness3" :default DarkModeIcon] ["@mui/icons-material/Brightness7" :default LightModeIcon] ["@mui/icons-material/Brightnes...
null
https://raw.githubusercontent.com/hhucn/decide3/9532d372ad75c6b527d0d6b26307813f43c24ccb/src/main/decide/ui/components/dark_mode_toggle.cljs
clojure
(ns decide.ui.components.dark-mode-toggle (:require [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [mui.inputs.toggle-button :as toggle] ["@mui/icons-material/Brightness3" :default DarkModeIcon] ["@mui/icons-material/Brightness7" :default LightModeIcon] ["@mui/icons-material/Brightnes...
b354791f7d00db930185010242dc65432befdbb9763d7b7554050629c27540bb
sionescu/iolib
pkgdcl.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; --- Package definition. ;;; (in-package :iolib/common-lisp-user) (defpackage :iolib/base (:nicknames :iolib.base) (:extend/excluding :iolib/common-lisp #:defun #:defmethod #:defmacro #:define-compiler-macro #:constant...
null
https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/base/pkgdcl.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- --- Package definition. Conditions Debugging Types RETURN* DEFALIAS DEFOBSOLETE Reader utils Misc Matching Dynamic-buffer
(in-package :iolib/common-lisp-user) (defpackage :iolib/base (:nicknames :iolib.base) (:extend/excluding :iolib/common-lisp #:defun #:defmethod #:defmacro #:define-compiler-macro #:constantp) (:extend :alexandria :split-sequence) (:export #:bug #:iolib-bug #:sub...