_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 |
|---|---|---|---|---|---|---|---|---|
bfcddaad3cf8d4dead1e24882e5d9ab8aa011c29b519a77427b3c5a6f69c2d2b | threatgrid/ctia | target_record_test.clj | (ns ctia.http.routes.graphql.target-record-test
(:require
[clj-momo.test-helpers.core :as mth]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.entity.target-record :as target-record]
[ctia.test-helpers.auth :refer [all-capabilities]]
[ctia.test-helpers.core :as helpers]
[... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/test/ctia/http/routes/graphql/target_record_test.clj | clojure | (ns ctia.http.routes.graphql.target-record-test
(:require
[clj-momo.test-helpers.core :as mth]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.entity.target-record :as target-record]
[ctia.test-helpers.auth :refer [all-capabilities]]
[ctia.test-helpers.core :as helpers]
[... | |
b7510b9a47b134c34b73c40746ad8e8d474151fbfb6494850c802066e44c557d | MLstate/opalang | bslJsConf.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libbsl/bslJsConf.ml | ocaml | depends
alias
-
EXTEND-OPT
<!> Beware, this type is marshaled during the bsl preprocessing
EXTEND-OPT
&& EXTEND-OPT
*
The type parsed for an analysis, corresponding to a property with an argument
Example:
{[
cleanup: false
]}
will be parsed as: ["c... |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
f81bbe27736803aae53b27349c2417857cb2684802b7fd8b1e9c9cb954f0f861 | nivertech/github-backup | Path.hs | path manipulation
-
- Copyright 2010 - 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Utility.Path where
import Data.String.Utils
import System.Path
import System.FilePath
import ... | null | https://raw.githubusercontent.com/nivertech/github-backup/490bc0e1fe0395a54e70de5aa0201c81d1a64476/Utility/Path.hs | haskell | Returns the parent directory of a path. Parent of / is ""
Converts a filename into a normalized, absolute path.
-
- Unlike Directory.canonicalizePath, this does not require the path
- already exists.
Constructs a relative path from a directory to a file.
-
- Both must be absolute, and normalized (eg with absN... | path manipulation
-
- Copyright 2010 - 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Utility.Path where
import Data.String.Utils
import System.Path
import System.FilePath
import ... |
67e199b9127a4d0ee4bbc53714b451eff072888d5e6fb3fa3d60d1ac771412fc | fluree/db | optional_query_test.clj | (ns fluree.db.query.optional-query-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[fluree.db.test-utils :as test-utils]
[fluree.db.json-ld.api :as fluree]
[fluree.db.util.log :as log]))
(deftest ^:integration optional-queries
(testing "Testing various 'optional' query clauses."
... | null | https://raw.githubusercontent.com/fluree/db/6da45af99665a158f01fe6153f61dac84a1d190d/test/fluree/db/query/optional_query_test.clj | clojure | basic single optional statement
including another pass-through variable, but with 'optional' sandwiched
optional with unnecessary embedded vector statement
Multiple optional clauses should work as a left outer join between them | (ns fluree.db.query.optional-query-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[fluree.db.test-utils :as test-utils]
[fluree.db.json-ld.api :as fluree]
[fluree.db.util.log :as log]))
(deftest ^:integration optional-queries
(testing "Testing various 'optional' query clauses."
... |
42ad30543712c8894e24ba13560c935d205de864a9b173a540e5c968dd1b83db | Frama-C/Frama-C-snapshot | collection.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/qed/collection.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
e1d58233ce6c79feaa9fb92a412920e4ba529c9f878d8f75bac5a56c5277dab9 | iskandr/parakeet-retired | InferImpTypes.ml | (* pp: -parser o pa_macro.cmo *)
open Base
open SSA_Analysis
open TypedSSA
let simple_conversion = function
| Type.ScalarT eltT -> ImpType.ScalarT eltT
| Type.ArrayT (eltT, rank) -> ImpType.ArrayT (eltT, rank)
| other -> failwith $ Printf.sprintf
"[InferImpTypes.simple_conversion] Unexpected type: %s"
(... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Imp/InferImpTypes.ml | ocaml | pp: -parser o pa_macro.cmo
for now just assume every array operator creates a fresh array |
open Base
open SSA_Analysis
open TypedSSA
let simple_conversion = function
| Type.ScalarT eltT -> ImpType.ScalarT eltT
| Type.ArrayT (eltT, rank) -> ImpType.ArrayT (eltT, rank)
| other -> failwith $ Printf.sprintf
"[InferImpTypes.simple_conversion] Unexpected type: %s"
(Type.to_str other)
module type I... |
6275def780979839aad5a85e93e45a5af53a2f863a5c2a79c00c39fad6989143 | nikita-volkov/stm-hamt | ListT.hs | module StmHamt.ListT where
import StmHamt.Prelude hiding (filter, all)
import StmHamt.Types
import ListT
import qualified PrimitiveExtras.SmallArray as SmallArray
import qualified PrimitiveExtras.By6Bits as By6Bits
hamtElements :: Hamt a -> ListT STM a
hamtElements (Hamt var) = tVarValue var >>= By6Bits.elementsList... | null | https://raw.githubusercontent.com/nikita-volkov/stm-hamt/4b89e0c8eec3712c0cb41b56eaf9bd86facc3bd3/library/StmHamt/ListT.hs | haskell | module StmHamt.ListT where
import StmHamt.Prelude hiding (filter, all)
import StmHamt.Types
import ListT
import qualified PrimitiveExtras.SmallArray as SmallArray
import qualified PrimitiveExtras.By6Bits as By6Bits
hamtElements :: Hamt a -> ListT STM a
hamtElements (Hamt var) = tVarValue var >>= By6Bits.elementsList... | |
2135cb8e0bc575a6fc5427e183b57b672844dbb65fdfe209c291f5cc8cdeafbf | MarchLiu/market | listener_test.clj | (ns liu.mars.market.listener-test
(:require [clojure.test :refer :all]
[jaskell.handle :refer [supplier function]])
(:import (akka.actor ActorSystem ActorPaths)
(liu.mars.market DepthListenerActor)
(akka.testkit.javadsl TestKit)
(liu.mars.market.dash Depth)
(a... | null | https://raw.githubusercontent.com/MarchLiu/market/7a7daf6c04b41e0f8494be6740da8d54785c5e77/market-maker/src/test/clojure/liu/mars/market/listener_test.clj | clojure | (defmulti service (fn [_ msg] (class msg))) | (ns liu.mars.market.listener-test
(:require [clojure.test :refer :all]
[jaskell.handle :refer [supplier function]])
(:import (akka.actor ActorSystem ActorPaths)
(liu.mars.market DepthListenerActor)
(akka.testkit.javadsl TestKit)
(liu.mars.market.dash Depth)
(a... |
d145aff8c69f003bedc7727e83edd0c68e90ce08f92618f7800e7ab7e48aa2e8 | skypher/blackthorn | input.lisp | Blackthorn -- Lisp Game Engine
;;;;
Copyright ( c ) 2007 - 2011 , < >
;;;;
;;;; 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 limita... | null | https://raw.githubusercontent.com/skypher/blackthorn/914b38a95f1d192219f197e4b4a77b1632daa94b/src/blackthorn/input.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do so, subject to the following conditions:... | Blackthorn -- Lisp Game Engine
Copyright ( c ) 2007 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRA... |
458bc749bd3a4976d089fcf67c2e327a197a8259d4681b731c93e282dc01e8bc | csabahruska/jhc-components | Unify.hs |
module FrontEnd.Tc.Unify(
subsumes,
boxyMatch,
printRule,
listenSolvePreds
) where
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Writer(Monoid(..))
import qualified Data.Map as Map
import qualified Data.Set as Set
import Doc.DocLike
import Doc.PPrint
import FrontEnd.Tc.Clas... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-frontend/src/FrontEnd/Tc/Unify.hs | haskell | actual/offered <= expected
actual/offered `subsumes` expected
SBOXY
SKOL needs to be after SBOXY
SPEC
isRho' r2
CON
MONO
might as well return flattened type
we can skip the occurs check for boxy types
occurs check
CEQ2
SEQ2
are associated types tau?
withSrcLoc sl $
| otherwise = fail $ "mgu: Constructo... |
module FrontEnd.Tc.Unify(
subsumes,
boxyMatch,
printRule,
listenSolvePreds
) where
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Writer(Monoid(..))
import qualified Data.Map as Map
import qualified Data.Set as Set
import Doc.DocLike
import Doc.PPrint
import FrontEnd.Tc.Clas... |
26d72576d456887125674b0fe28bcc8ded7706fa40a50e0f9b9ff9185d9f427a | j-mie6/ParsleyHaskell | Test.hs | # LANGUAGE TemplateHaskell , UnboxedTuples , ScopedTypeVariables , TypeApplications #
module Parsley.Fold.Test where
import Test.Tasty
import Test.Tasty.HUnit
import TestUtils
import qualified Parsley.Fold.Parsers as Parsers
import Prelude hiding ()
tests :: TestTree
tests = testGroup "Fold" [ prefixTests
... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley/test/Parsley/Fold/Test.hs | haskell | chainr1 chainr
skipMany skipManyN skipSome
endBy endBy1
sepEndBy sepEndBy1 | # LANGUAGE TemplateHaskell , UnboxedTuples , ScopedTypeVariables , TypeApplications #
module Parsley.Fold.Test where
import Test.Tasty
import Test.Tasty.HUnit
import TestUtils
import qualified Parsley.Fold.Parsers as Parsers
import Prelude hiding ()
tests :: TestTree
tests = testGroup "Fold" [ prefixTests
... |
3fddf81cb9172eb913e3cecb9e96e6356322c1a1520ca6a1588ab8950e05424a | bootstrapworld/curr | contentlist.rkt | ; This file specifies the pages that make up the workbook for the
; course containing this resources/workbook directory. ]
; The list should contain names of either .scrbl or .pdf files that
; are in the workbook/pages directory. Each list element must
; include either a .scrbl or a .pdf extension.
; The workbook... | null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/reactive/resources/workbook/langs/en-us/contentlist.rkt | racket | This file specifies the pages that make up the workbook for the
course containing this resources/workbook directory. ]
The list should contain names of either .scrbl or .pdf files that
are in the workbook/pages directory. Each list element must
include either a .scrbl or a .pdf extension.
The workbook will be... |
(
("StudentWorkbook.pdf" "Review")
("StudentWorkbook.pdf" "Review-page2")
("StudentWorkbook.pdf" "Fast-Functions-double")
("StudentWorkbook.pdf" "Fast-Functions-blank")
("StudentWorkbook.pdf" "Fast-Functions-blank")
("StudentWorkbook.pdf" "Bug-Hunting")
("StudentWorkbook.pdf" "Unit-2")
("StudentWorkbook.pdf"... |
c6e19d3df37a52258573779e78a44efe636bc8be55f630ae910d7d3cb01d3143 | c-cube/maki | maki_gc.ml |
(* This file is free software. See file "license" for more details. *)
* { 1 Maki GC implementation }
module S = Maki.Storage
open Result
open Lwt.Infix
let force = ref false
let parse_argv () =
let options =
Arg.align
[ "--debug", Arg.Int Maki.Log.set_level, " set debug level";
"-d", Arg.Int ... | null | https://raw.githubusercontent.com/c-cube/maki/7067602c3b1206a92abfd221bc8950f30bb75b73/src/tools/maki_gc.ml | ocaml | This file is free software. See file "license" for more details. |
* { 1 Maki GC implementation }
module S = Maki.Storage
open Result
open Lwt.Infix
let force = ref false
let parse_argv () =
let options =
Arg.align
[ "--debug", Arg.Int Maki.Log.set_level, " set debug level";
"-d", Arg.Int Maki.Log.set_level, " short for --debug";
"--force", Arg.Set fo... |
892ce3ff372d1ad9f794eb1b879c6f27400dbc7921c73718ccaada01b9737373 | hyperfiddle/electric | photon_loop_leo.clj |
; Hypothesis: in Photon, recursion is an explicit choice about the lifecycle
; Program FOo1
(p/defn Foo1 "reactive recursion (in linear space)" [n]
#_(new (m/observe (fn [!] (println 'mount) (! nil) #(println 'unmount))))
(dom/div n)
(if (pos? n)
chain of frames . named recursion point Foo1
n))
mount ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/loop/photon_loop_leo.clj | clojure | Hypothesis: in Photon, recursion is an explicit choice about the lifecycle
Program FOo1
goto implicit recursion point Foo1
mount is called once
goto implicit recursion point - loop
We propose defined behavior of Foo1 and Foo2, and the meaning is not the same.
D: I agree
L: I agree because it's a definition
L: ... |
(p/defn Foo1 "reactive recursion (in linear space)" [n]
#_(new (m/observe (fn [!] (println 'mount) (! nil) #(println 'unmount))))
(dom/div n)
(if (pos? n)
chain of frames . named recursion point Foo1
n))
mount is called 3 times
(p/defn Foo2 "reactive iteration (in constant space)" [n]
#_(new (m/obs... |
5c44d0bf389433e4f4529c780353d8825788054c7c3bb4a556c75f0ac140258f | FailWhaleBrigade/water-wars | State.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
module WaterWars.Core.Game.State
( module WaterWars.Core.Game.State
, module WaterWars.Core.Game.Base
)
where
import ClassyPrelude
import WaterWars.Core.Game.Base
-- |Master-state of the whole game
data GameState = Game... | null | https://raw.githubusercontent.com/FailWhaleBrigade/water-wars/bdd0616b1eed281ace499f059b4cc1e72bc50d05/library/WaterWars/Core/Game/State.hs | haskell | |Master-state of the whole game
TODO: better name | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
module WaterWars.Core.Game.State
( module WaterWars.Core.Game.State
, module WaterWars.Core.Game.Base
)
where
import ClassyPrelude
import WaterWars.Core.Game.Base
data GameState = GameState
{ inGamePlayers :: InGame... |
2b570292e8863e399ba1ea53626e4607f884afb2735b3303f32566301f82967f | Holmusk/three-layer | Setup.hs | import Data.ProtoLens.Setup (defaultMainGeneratingProtos)
main :: IO ()
main = defaultMainGeneratingProtos "proto"
| null | https://raw.githubusercontent.com/Holmusk/three-layer/1b58ec102f206681b66a584ca4a7d18f2eb4ef81/Setup.hs | haskell | import Data.ProtoLens.Setup (defaultMainGeneratingProtos)
main :: IO ()
main = defaultMainGeneratingProtos "proto"
| |
e35efc7a96d58a4237c25905cf0238a8c7faf39b299729dff427290df0e8431d | babashka/pod-registry | tabl.clj | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'justone/tabl "0.3.0")
(require '[pod.tabl.fancy :as fancy])
(require '[pod.tabl.doric :as doric])
(fancy/print-table [{:foo 1 :bar 2} {:foo 2 :bar 3}])
(doric/print-table [{:foo 1 :bar 2} {:foo 2 :bar 3}])
| null | https://raw.githubusercontent.com/babashka/pod-registry/295164cd4807bdf22be7879b83f15d258e0850a9/examples/tabl.clj | clojure | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'justone/tabl "0.3.0")
(require '[pod.tabl.fancy :as fancy])
(require '[pod.tabl.doric :as doric])
(fancy/print-table [{:foo 1 :bar 2} {:foo 2 :bar 3}])
(doric/print-table [{:foo 1 :bar 2} {:foo 2 :bar 3}])
| |
ef21c1a1fc1c6631d67d812b4c93754a816352d17e347dcb0c1e7c7cddb4e52f | ghcjs/jsaddle-dom | HTMLFrameSetElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLFrameSetElement
(setCols, getCols, setRows, getRows, blur, error, focus, focusin,
focusout, load, resiz... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLFrameSetElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/HTMLFrameSetElement.cols Mozilla HTMLFrameSetElement.cols documentation>
| <-US/docs/Web/API/HTMLFrameSetElement.cols Mozilla HTMLFrameSetElement.cols documentation>
| <-US/docs/Web/API/HTMLFrameSetElem... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLFrameSetElement
(setCols, getCols, setRows, getRows, blur, error, focus, focusin,
focusout, load, resize, scroll, webKitWillRevealBottom,
webKitWillRevealLeft, webKitWillRevealRight, webKitWillR... |
17abb543275dd8e98062bf6190c73ebab18ebbdc805c83b05a386c58b0c8487c | matsen/pplacer | file_parsing.ml | let empty_line_rex = Str.regexp "^[ \t]*$"
let comment_rex = Str.regexp "^[ \t]*#.*"
let filter_not some_rex string_list =
List.filter
(fun line -> not (Str.string_match some_rex line 0))
string_list
let filter_empty_lines = filter_not empty_line_rex
let filter_comments = filter_not comment_rex
(* *** read... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/common_src/file_parsing.ml | ocaml | *** reading *** | let empty_line_rex = Str.regexp "^[ \t]*$"
let comment_rex = Str.regexp "^[ \t]*#.*"
let filter_not some_rex string_list =
List.filter
(fun line -> not (Str.string_match some_rex line 0))
string_list
let filter_empty_lines = filter_not empty_line_rex
let filter_comments = filter_not comment_rex
let string_... |
e77f2ef48abdbfc30624572f7757540c7259b1beef5384e3a02b24e061a40ea1 | endobson/racket-llvm | paths.rkt | #lang racket/base
(require racket/runtime-path)
(require (for-syntax racket/base))
(provide llvm-racket-lib-path)
(define-runtime-path llvm-racket-lib-path (string-append "../../llvm-racket" (bytes->string/utf-8 (system-type 'so-suffix))))
| null | https://raw.githubusercontent.com/endobson/racket-llvm/3eb557b0fe4bddfdfce8e8f4659d218535daa061/private/ffi/paths.rkt | racket | #lang racket/base
(require racket/runtime-path)
(require (for-syntax racket/base))
(provide llvm-racket-lib-path)
(define-runtime-path llvm-racket-lib-path (string-append "../../llvm-racket" (bytes->string/utf-8 (system-type 'so-suffix))))
| |
3ef7623772b77af36b543d15fbc86ce60b12b52eeb3b364a586d15398cd72cec | monadbobo/ocaml-core | unit.ml | open Sexplib.Std
open Bin_prot.Std
module T = struct
type t = unit with sexp, bin_io
let compare _ _ = 0
let hash _ = 0
let equal _ _ = true
end
include T
include Sexpable.To_stringable (T)
include Comparable.Make_binable (T)
include Hashable.Make_binable (T)
let pp ppf () = Format.fprintf ppf "()"
| null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/unit.ml | ocaml | open Sexplib.Std
open Bin_prot.Std
module T = struct
type t = unit with sexp, bin_io
let compare _ _ = 0
let hash _ = 0
let equal _ _ = true
end
include T
include Sexpable.To_stringable (T)
include Comparable.Make_binable (T)
include Hashable.Make_binable (T)
let pp ppf () = Format.fprintf ppf "()"
| |
5322c75bddab6f125e4e53ad32cd84603805568d3a35fd5bca762f508306e35a | charlieg/Sparser | loader2.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992 - 1998 -- all rights reserved
extensions copyright ( c ) 2006 - 2009 BBNT Solutions LLC . All Rights Reserved
$ Id:$
;;;
;;; File: "loader"
;;; Module: "objects;model:individuals:"
version : 1.0 June 2009
initiate... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/individuals/loader2.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "loader"
Module: "objects;model:individuals:"
bumped [find] to preserve the old permanent/temp code
already loaded by [model;] level | copyright ( c ) 1992 - 1998 -- all rights reserved
extensions copyright ( c ) 2006 - 2009 BBNT Solutions LLC . All Rights Reserved
$ Id:$
version : 1.0 June 2009
initiated 7/16/92 v2.3 . ( 5/25/93 ) added [ decode ]
0.1 ( 8/5/94 ) bumped [ decode ] to add ' or ' ( 8/9 ) added [ delete ] and
0.2... |
1c8c658e3d29c615569f17b4179151706ed56bbe84dcc6e6ecdf3b5e2cbd4887 | hasktorch/hasktorch | Extra.hs |
-- generated by using spec/Declarations.yaml
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module Torch.Internal.Unmanaged.Native.Extra where
import Foreign.C.String
import Foreign.C.Types
impo... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Native/Extra.hs | haskell | generated by using spec/Declarations.yaml
# LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
module Torch.Internal.Unmanaged.Native.Extra where
import Foreign.C.String
import Foreign.C.Types
import Foreign
import Torch.Internal.Type
import qualified Language.C.Inline.Cpp as... |
ad9fb8b028904c36749f05fb4624c2f39aa74a7f2e07b78827f114eee9001c54 | modular-macros/ocaml-macros | backtrace3.ml |
(* A test for stack backtraces *)
exception Error of string
let rec f msg n =
if n = 0 then raise(Error msg) else 1 + f msg (n-1)
let g msg =
match
f msg 5
with
| _ ->
(* value return does not happen *)
assert false
| exception (Error "a") ->
print_string "a"; print_newline(); 0
| ex... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/backtrace/backtrace3.ml | ocaml | A test for stack backtraces
value return does not happen
this should Re-raise, appending to the current backtrace
according to the current re-raise policy (a static condition),
this does not re-raise |
exception Error of string
let rec f msg n =
if n = 0 then raise(Error msg) else 1 + f msg (n-1)
let g msg =
match
f msg 5
with
| _ ->
assert false
| exception (Error "a") ->
print_string "a"; print_newline(); 0
| exception (Error "b" as exn) ->
print_string "b"; print_newline(); rai... |
ff2349a5051df28bf6a68b7d3bec9606f3f4a94c8b9c489663325de6624642d2 | robert-strandh/Clump | insertion.lisp | (cl:in-package #:clump-2-3-tree)
;;; This generic function can be used only on an empty tree.
(defgeneric insert (object tree))
(defmethod insert :before (object (tree tree))
(unless (null (contents tree))
(error 'tree-for-insertion-must-be-empty
:tree tree)))
(defmethod insert (object (tree tree))
(setf... | null | https://raw.githubusercontent.com/robert-strandh/Clump/1ea4dbac1cb86713acff9ae58727dd187d21048a/2-3-tree/insertion.lisp | lisp | This generic function can be used only on an empty tree.
NEW-CHILD-1 and NEW-CHILD-2. | (cl:in-package #:clump-2-3-tree)
(defgeneric insert (object tree))
(defmethod insert :before (object (tree tree))
(unless (null (contents tree))
(error 'tree-for-insertion-must-be-empty
:tree tree)))
(defmethod insert (object (tree tree))
(setf (contents tree)
(make-instance (leaf-class tree)
:conten... |
67c40bbfdc765af312ad5327a7e311339e871c94bbd7d441945f088926c1504a | imandra-ai/imandra-ros | stereo_msgs_of_json.ml | open Json_utils;;
open Basic_types_of_json;;
open Ros_messages.Stereo_msgs;;
let json_to_disparityImage_opt json =
jreq json "header" Std_msgs_of_json.json_to_header_opt @@ fun header ->
jreq json "image" Sensor_msgs_of_json.json_to_image_opt @@ fun image ->
jreq json "f" json_to_float32_opt @@ fun f ->
... | null | https://raw.githubusercontent.com/imandra-ai/imandra-ros/e1380c267ee319dd4f86c4b54e0b270bc0738796/imandra_model/src-messages-pp/stereo_msgs_of_json.ml | ocaml | open Json_utils;;
open Basic_types_of_json;;
open Ros_messages.Stereo_msgs;;
let json_to_disparityImage_opt json =
jreq json "header" Std_msgs_of_json.json_to_header_opt @@ fun header ->
jreq json "image" Sensor_msgs_of_json.json_to_image_opt @@ fun image ->
jreq json "f" json_to_float32_opt @@ fun f ->
... | |
1395882a7bf2ca0cad3d4c85edc09cb8301085e0fe1f2c5e9796860dd44353ac | ocamllabs/vscode-ocaml-platform | ocaml_lsp.mli | open Import
type t
val of_initialize_result : LanguageClient.InitializeResult.t -> t
val is_version_up_to_date :
t -> Ocaml_version.t -> (unit, [ `Msg of string ]) result
val can_handle_switch_impl_intf : t -> bool
val can_handle_infer_intf : t -> bool
val can_handle_typed_holes : t -> bool
| null | https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/89d59044e2c0118b55797003880a2ff93a025354/src/ocaml_lsp.mli | ocaml | open Import
type t
val of_initialize_result : LanguageClient.InitializeResult.t -> t
val is_version_up_to_date :
t -> Ocaml_version.t -> (unit, [ `Msg of string ]) result
val can_handle_switch_impl_intf : t -> bool
val can_handle_infer_intf : t -> bool
val can_handle_typed_holes : t -> bool
| |
2bd4670117cf8a0607c2f37562b6a70ec2511c205468bc783a66cbddd38d702c | mirage/irmin-server | store.ml | open Lwt.Syntax
module S = Irmin_mem.KV.Make (Irmin.Contents.String)
module Client = Irmin_client_unix.Make (S)
let main =
let uri = Utils.get_url in
let* repo = Client.connect uri in
let* t = Client.main repo in
let* w = Client.watch t (fun _ -> Lwt_io.printl "UPDATED") in
let* () = Client.set_exn t ~info:C... | null | https://raw.githubusercontent.com/mirage/irmin-server/d7dc30e5644160f4004dd7b708a841fbc99ad8c0/examples/store.ml | ocaml | open Lwt.Syntax
module S = Irmin_mem.KV.Make (Irmin.Contents.String)
module Client = Irmin_client_unix.Make (S)
let main =
let uri = Utils.get_url in
let* repo = Client.connect uri in
let* t = Client.main repo in
let* w = Client.watch t (fun _ -> Lwt_io.printl "UPDATED") in
let* () = Client.set_exn t ~info:C... | |
dc0e819c391f6f56b8bf59179999a3c61c39c0b23d4f8625de597ac0c4168fe9 | maximedenes/native-coq | errors.mli | (***********************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/errors.mli | ocaml | *********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
*********************************************************************
* [todo] is for running of an incomplete... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
* This modules imp... |
b5855f2cca8add82cad1b416bc1b50bd991e6bc546ed8cace40a4d140b402e1c | ghc/nofib | Main.hs | ------------------------------------------------------------------------------
A simple banner program : , 1992
--
-- Many years ago, I was helping out on a stand at a computer show.
-- Or at least, I would have been if anyone had been interested in
-- what we had on the stand. So ins... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/banner/Main.hs | haskell | ----------------------------------------------------------------------------
Many years ago, I was helping out on a stand at a computer show.
Or at least, I would have been if anyone had been interested in
what we had on the stand. So instead, I sat down to see if I
could write a banner program -- something to pr... | A simple banner program : , 1992
The original program was in Basic , but here is a version in Hugs .
The program itself is only two lines long and that is rather pleasing ,
anymore . I wonder whether the complete Hugs code is that much shorter ?
One of the nice things about t... |
4715aa71575dbf8dc89b58801aa109274d5e8ebccfcaea8a03f03a23efd50123 | carlosavieira/self-study | 12.hs | data Count a = Single a | Multiple Int a deriving (Eq, Show)
decode' :: Count a -> [a]
decode' (Single x) = [x]
decode' (Multiple y x) = take y (repeat x)
decodeModified :: [Count a] -> [a]
decodeModified [] = error "Empty List"
decodeModified [x] = decode' x
decodeModified (x:xs) = (decode' x)++(decodeModified xs) | null | https://raw.githubusercontent.com/carlosavieira/self-study/c7f998875f34a9d3623ade6deb75980affad2047/programming/Haskell/99%20problems/solutions/12.hs | haskell | data Count a = Single a | Multiple Int a deriving (Eq, Show)
decode' :: Count a -> [a]
decode' (Single x) = [x]
decode' (Multiple y x) = take y (repeat x)
decodeModified :: [Count a] -> [a]
decodeModified [] = error "Empty List"
decodeModified [x] = decode' x
decodeModified (x:xs) = (decode' x)++(decodeModified xs) | |
f646c2cf864f4cdc7fb35184ca8c0c75b098e4b62bedf1b8d00c87b24063c20c | athensresearch/athens | copy_paste_test.cljs | (ns athens.copy-paste-test
(:require
[athens.common-db :as common-db]
[athens.common-events.bfs :as bfs]
[athens.common-events.fixture :as fixture]
[athens.common-events.graph.ops :as graph-ops]
[athens.common-events.resolver.atomic :as atomic-resolver]
[athens.views.blocks.internal-representa... | null | https://raw.githubusercontent.com/athensresearch/athens/18d76e4f11426e596e4d8c0473cf4a1965068d3d/test/athens/copy_paste_test.cljs | clojure | (ns athens.copy-paste-test
(:require
[athens.common-db :as common-db]
[athens.common-events.bfs :as bfs]
[athens.common-events.fixture :as fixture]
[athens.common-events.graph.ops :as graph-ops]
[athens.common-events.resolver.atomic :as atomic-resolver]
[athens.views.blocks.internal-representa... | |
64dad786820a6560fae5af6aec7e1fb0b60813cf223ae4384bba5a640d084ce6 | ujamjar/hardcaml-zinc | zinc_tb.ml | open Printf
open Hardcaml
module Waveform = Hardcaml_waveterm.Waveform
module Z = Cyclesim.With_interface (Zinc.I) (Zinc.O)
type cfg =
{ waves : bool
; instr_trace : bool
; state_trace : bool
; mem_trace : bool
}
let make cfg exe =
let mem_size_words = 1024 * 1024 in
let _show_instr =
let ins = Base... | null | https://raw.githubusercontent.com/ujamjar/hardcaml-zinc/ad9360a66ddd239550623e3a92fe5328934706fa/archived/zinc_tb.ml | ocaml | instruction trace
memory accesses
read
write
c-calls | open Printf
open Hardcaml
module Waveform = Hardcaml_waveterm.Waveform
module Z = Cyclesim.With_interface (Zinc.I) (Zinc.O)
type cfg =
{ waves : bool
; instr_trace : bool
; state_trace : bool
; mem_trace : bool
}
let make cfg exe =
let mem_size_words = 1024 * 1024 in
let _show_instr =
let ins = Base... |
5498721188318aa70191fd81abf744cca74877081550ba04064d11165a03cb6c | input-output-hk/cardano-ledger | Core.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Core.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
=========================================
The redeeming data
The ExUnits memory count
The ExUnits steps count
^ A Redeemer that will make it succeed
The redeeming data
The ExUnits memory count
The ExUnits steps count
^ A Redeemer that will make it succeed
| Gene... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Test.Cardano.L... |
8e1eff9f04bfd057e1a288be2eceeb7114203ade46a796fca24aa3541da68412 | ekmett/linear | Linear.hs | -----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2012 - 2015
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
-- This module simply re-exports everything from the ... | null | https://raw.githubusercontent.com/ekmett/linear/9bb5d69d25f96dd338769f81927d5101b90663af/src/Linear.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
This module simply re-exports everything from the various modules
that make up the linear package.
-------------------------------... | Copyright : ( C ) 2012 - 2015
Maintainer : < >
module Linear
( module Linear.Algebra
, module Linear.Binary
, module Linear.Conjugate
, module Linear.Covector
, module Linear.Epsilon
, module Linear.Matrix
, module Linear.Metric
, module Linear.Projection
, module Linear.Quaternion
... |
a3e31ce78c56ab7fddc7457ac1ec0ecaed1ca6a2e7f77948a6c59643973a518d | infinisil/nixbot | Reply.hs | # LANGUAGE FlexibleContexts #
module Plugins.Reply (replyPlugin) where
import Control.Monad.IO.Class
import Control.Monad.State
import Data.Char
import Data.List
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Ti... | null | https://raw.githubusercontent.com/infinisil/nixbot/e8695fd73c07bc115ee0dd3e7c121cd985c04c06/src/Plugins/Reply.hs | haskell | # LANGUAGE FlexibleContexts #
module Plugins.Reply (replyPlugin) where
import Control.Monad.IO.Class
import Control.Monad.State
import Data.Char
import Data.List
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Ti... | |
4ba5af3b2fc9571195ea8cb74aadbcc41c8a99cbde658194122301d3e9dc24d0 | spwhitton/consfigurator | pass.lisp | (in-package :consfigurator/tests)
(named-readtables:in-readtable :consfigurator)
(in-consfig "consfigurator/tests")
(defun populate-data-pass ()
"Invoked by test runner before data source is registered."
(pass '("insert" "-m" "server.example.org/account") :input "hunter2")
(pass '("insert" "-m" "_foo/bar/baz") :... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/0f9255e48f1b51e2a61f2b327c74a4b1ca0416ca/tests/data/pass.lisp | lisp | (in-package :consfigurator/tests)
(named-readtables:in-readtable :consfigurator)
(in-consfig "consfigurator/tests")
(defun populate-data-pass ()
"Invoked by test runner before data source is registered."
(pass '("insert" "-m" "server.example.org/account") :input "hunter2")
(pass '("insert" "-m" "_foo/bar/baz") :... | |
3e5fd6d071d236c027b221f17cc667e63d741b23de98f15d2bdac4cfae3e8dee | offby1/rudybot | vars.rkt | #lang racket/base
(require racket/file
"utils.rkt")
(provide (all-defined-out))
;; This value depends on the server; this seems to work for freenode
(define *my-nick*
(box (from-env "BOTNICK" "rudybot")))
(define *my-master*
;; use authentication by default, but allow to set a regexp for convenience
(b... | null | https://raw.githubusercontent.com/offby1/rudybot/69df1f966dea1ceed9616e50535e92d6a90f6171/vars.rkt | racket | This value depends on the server; this seems to work for freenode
use authentication by default, but allow to set a regexp for convenience
This should probably be a hash table, keyed by network name.
env var can be "#foo,#bar"
some state is put globally, to be able to separate functions conveniently
but adding
M... | #lang racket/base
(require racket/file
"utils.rkt")
(provide (all-defined-out))
(define *my-nick*
(box (from-env "BOTNICK" "rudybot")))
(define *my-master*
(box (let ([master (from-env "BOTMASTER" "")])
(and (not (equal? master ""))
(regexp (string-append "^" master "$"))))))
(m... |
ef87d1b9a288c2a4094622e21b79843cf14b02510b5ec74a41ac1b653c2cea4c | adityaathalye/sicp | ex1-18-mul-by-add-iter.scm | ; Ex 1.18 Iterative process to multiply using addition
; The process to multiply, using only addition, grows by
; theta(log n) steps, in constant space.
(define(* a b)
(if (= b 0)
0
(mult-iter 0 a b)))
(define (mult-iter mult-sum a b)
; I display object '*' ONLY as a quick-n-dirty way... | null | https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ex1-18-mul-by-add-iter.scm | scheme | Ex 1.18 Iterative process to multiply using addition
The process to multiply, using only addition, grows by
theta(log n) steps, in constant space.
I display object '*' ONLY as a quick-n-dirty way to visually
verify order of growth.
(halve) as a black-box abstraction
Strictly speaking, one can argue that divisi... |
(define(* a b)
(if (= b 0)
0
(mult-iter 0 a b)))
(define (mult-iter mult-sum a b)
(display (+ mult-sum a))
(display " ")
(cond ((= b 1) (+ mult-sum a))
((halve b) (mult-iter mult-sum (double a) (halve b)))
(else (mult-iter (+ mult-sum a) a (- b 1)))))
can be ... |
2cce4868517b9286df21648885471ef8839384b2c861ea1b8ed51858b7e4f834 | Incanus3/ExiL | matches.lisp | (in-package :exil-env)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; match represents a rule whose conditions have been satisfied by a list of
;; facts (represented by token)
;; environment's agenda keeps track of matches from which they're then selected
;; and the match rules fir... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/environment/matches.lisp | lisp |
match represents a rule whose conditions have been satisfied by a list of
facts (represented by token)
environment's agenda keeps track of matches from which they're then selected
and the match rules fired (the variable bindings are resolved and substituted
in rule's RHS activations before its evaluation)
publi... | (in-package :exil-env)
(defclass match () ((rule :initarg :rule :reader match-rule
:initform (error "match rule has to be specified"))
(token :initarg :token :reader match-token
:initform (error "match token has to be specified"))
... |
f0d8e6d72aa0a2cc6ebefc8f6ca5007683e00dd1799463fcaa2c3317166a09f3 | ghcjs/ghcjs | Expr.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
module Expr where
import Data.Data
import Data.Typeable
import Language.Haskell.TH as TH
import Language.Haskell.TH.Quote
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Char
data Expr = IntExpr Integer
| AntiIn... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/quasiquotation/qq005/Expr.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Extend a generic query by a type-specific case | # LANGUAGE FlexibleContexts #
module Expr where
import Data.Data
import Data.Typeable
import Language.Haskell.TH as TH
import Language.Haskell.TH.Quote
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Char
data Expr = IntExpr Integer
| AntiIntExpr String
| BinopExpr... |
e4ee4ab01d86448db304ea90a51c1fa156a27a4275a8317c2854f881be5a3639 | lwhjp/ecmascript | this.rkt | #lang racket/base
(require (for-syntax racket/base))
(provide (all-defined-out))
(define current-ecma:this (make-parameter #f))
(define-syntax (ecma:this stx)
(syntax-case stx ()
[_ (identifier? stx) (syntax/loc stx (current-ecma:this))]))
(define (apply/this this-arg proc args)
(parameterize ([current-ecm... | null | https://raw.githubusercontent.com/lwhjp/ecmascript/69fcfa42856ea799ff9d9d63a60eaf1b1783fe50/private/this.rkt | racket | #lang racket/base
(require (for-syntax racket/base))
(provide (all-defined-out))
(define current-ecma:this (make-parameter #f))
(define-syntax (ecma:this stx)
(syntax-case stx ()
[_ (identifier? stx) (syntax/loc stx (current-ecma:this))]))
(define (apply/this this-arg proc args)
(parameterize ([current-ecm... | |
4af86e14065445fca3ad4ed05a090546e3b218fc7f35e71232f6e34b8a627cff | paurkedal/viz | diag.mli | Copyright ( C ) 2010 - -2016 Petter A. Urkedal < >
*
* This file is part of the Viz Compiler < / > .
*
* The Viz Compiler 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... | null | https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/diag.mli | ocaml | * Diagnostic Functions and Exceptions | Copyright ( C ) 2010 - -2016 Petter A. Urkedal < >
*
* This file is part of the Viz Compiler < / > .
*
* The Viz Compiler 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... |
53ab03700a0f415b2b3afd0b535e63c47ee65b92550ba802061fd331d27b78d7 | fn-fx/fn-fx | 02_form.clj | (ns getting-started.02-form
(:require [fn-fx.fx-dom :as dom]
[fn-fx.diff :refer [component defui render should-update?]]
[fn-fx.controls :as ui]))
(def firebrick
(ui/color :red 0.69 :green 0.13 :blue 0.13))
;; The main login window component, notice the authed? parameter, this defines a fu... | null | https://raw.githubusercontent.com/fn-fx/fn-fx/36c7659ef3d9b88b8bcf71fecd792c0d829a2d38/examples/getting_started/02_form.clj | clojure | The main login window component, notice the authed? parameter, this defines a function
we can use to construct these ui components, named "login-form"
Wrap our login form in a stage/scene, and create a "stage" function
handler-fn handles events from the ui and updates the data state
ui-state holds the most recent ... | (ns getting-started.02-form
(:require [fn-fx.fx-dom :as dom]
[fn-fx.diff :refer [component defui render should-update?]]
[fn-fx.controls :as ui]))
(def firebrick
(ui/color :red 0.69 :green 0.13 :blue 0.13))
(defui LoginWindow
(render [this {:keys [authed?]}]
(ui/grid-pane
:alig... |
3fba8809fe32686224d93e2540a334df9850568fea2b4fa94e0919a959628573 | yetanalytics/dl4clj | utils.clj | (ns dl4clj.spark.utils
(:import [org.deeplearning4j.spark.impl.graph.dataset DataSetToMultiDataSetFn]
[org.deeplearning4j.spark.util SparkUtils])
(:require [dl4clj.constants :refer [value-of]]))
;; update to work with code
WIP
(defn convert-ds-to-multi-ds
"Convert a JavaRDD<DataSet> to a JavaRDD<Mu... | null | https://raw.githubusercontent.com/yetanalytics/dl4clj/9ef055b2a460f1a6246733713136b981fd322510/src/dl4clj/spark/utils.clj | clojure | update to work with code | (ns dl4clj.spark.utils
(:import [org.deeplearning4j.spark.impl.graph.dataset DataSetToMultiDataSetFn]
[org.deeplearning4j.spark.util SparkUtils])
(:require [dl4clj.constants :refer [value-of]]))
WIP
(defn convert-ds-to-multi-ds
"Convert a JavaRDD<DataSet> to a JavaRDD<MultiDataSet>"
[data-set]
... |
435561534ba23caa46a6e433379257184aa5c7b856240ff71e720784885a4ad6 | IvanRublev/year_progress_bot | custom_pgsql_store.erl | -module(custom_pgsql_store).
-include_lib("epgsql/include/epgsql.hrl").
-include_lib("mixer/include/mixer.hrl").
-mixin([sumo_store_pgsql]).
-export([persist_new/3]).
persist_new(Changeset, DocName, State) ->
#{conn := Conn} = State,
NPFieldNames = maps:keys(Changeset),
NPColumnNames = lists:map(fun escape/... | null | https://raw.githubusercontent.com/IvanRublev/year_progress_bot/c3e85a5598d768933d5fb676c74d92fa8033cf60/apps/year_progress_bot/src/infra/db/custom_pgsql_store.erl | erlang | -module(custom_pgsql_store).
-include_lib("epgsql/include/epgsql.hrl").
-include_lib("mixer/include/mixer.hrl").
-mixin([sumo_store_pgsql]).
-export([persist_new/3]).
persist_new(Changeset, DocName, State) ->
#{conn := Conn} = State,
NPFieldNames = maps:keys(Changeset),
NPColumnNames = lists:map(fun escape/... | |
4c0b3d284a60e6ccc33b4868b1f7dce3937bdfa3012be809ff01ae2f7cb70483 | SamB/coq | xlate.ml | (** Translation from coq abstract syntax trees to centaur vernac
*)
open String;;
open Char;;
open Util;;
open Names;;
open Ascent;;
open Genarg;;
open Rawterm;;
open Tacexpr;;
open Vernacexpr;;
open Decl_kinds;;
open Topconstr;;
open Libnames;;
open Goptions;;
// Verify whether this is dead code , as of coq ver... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/interface/xlate.ml | ocaml | * Translation from coq abstract syntax trees to centaur vernac
(true,])
* Tactics
probably useless: just for compatibility
TODO: application pattern
CT_premise_pattern(xlate_id_opt na, xlate_context_pattern b, xlate_context_pattern t);;
Moved from xlate_tactic
TODO LATER: local recursive tactics and ... | open String;;
open Char;;
open Util;;
open Names;;
open Ascent;;
open Genarg;;
open Rawterm;;
open Tacexpr;;
open Vernacexpr;;
open Decl_kinds;;
open Topconstr;;
open Libnames;;
open Goptions;;
// Verify whether this is dead code , as of coq version 7
The following three sentences have been added to cope with a c... |
c7a551ae1ce2523083ad31b043f1e74cd284f36145697df03c25c22609b98453 | markostanimirovic/re-action | prod.cljs | (ns login-form.prod
(:require
[login-form.core :as core]))
;;ignore println statements in prod
(set! *print-fn* (fn [& _]))
(core/init!)
| null | https://raw.githubusercontent.com/markostanimirovic/re-action/d6cb33d9ac73bedeac4f09996c2c741d21bda7ba/examples/login-form/env/prod/cljs/login_form/prod.cljs | clojure | ignore println statements in prod | (ns login-form.prod
(:require
[login-form.core :as core]))
(set! *print-fn* (fn [& _]))
(core/init!)
|
34a2843c84acdda599dd58dce4602a940be9e7f795dddb1ed33fdfbed539c668 | samply/blaze | spec.clj | (ns blaze.metrics.spec
(:require
[clojure.spec.alpha :as s])
(:import
[io.prometheus.client Collector CollectorRegistry]))
(s/def :blaze.metrics/collector
#(instance? Collector %))
(s/def :blaze.metrics/collectors
(s/coll-of :blaze.metrics/collector))
(defn registry? [x]
(instance? CollectorRegi... | null | https://raw.githubusercontent.com/samply/blaze/fd535063fd32429db69dd23c53c0eae6de6b6f5a/modules/metrics/src/blaze/metrics/spec.clj | clojure | (ns blaze.metrics.spec
(:require
[clojure.spec.alpha :as s])
(:import
[io.prometheus.client Collector CollectorRegistry]))
(s/def :blaze.metrics/collector
#(instance? Collector %))
(s/def :blaze.metrics/collectors
(s/coll-of :blaze.metrics/collector))
(defn registry? [x]
(instance? CollectorRegi... | |
92b4bdfe70d64e085505ffb55672e4e9d6e7d6bec6152882352222b3e1e74471 | lichtblau/CommonQt | t9.lisp | ;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
;;; -t9.html
(defpackage :qt-tutorial-9
(:use :cl :qt)
(:export #:main))
(in-package :qt-tutorial-9)
(named-readtables:in-readtable :qt)
(defvar *qapp*)
(defclass cannon-field ()
((current-angle :initform 45
:accessor curren... | null | https://raw.githubusercontent.com/lichtblau/CommonQt/fa14472594b2b2b34695ec3fff6f858a03ec5813/tutorial/old/t9.lisp | lisp | -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
-t9.html |
(defpackage :qt-tutorial-9
(:use :cl :qt)
(:export #:main))
(in-package :qt-tutorial-9)
(named-readtables:in-readtable :qt)
(defvar *qapp*)
(defclass cannon-field ()
((current-angle :initform 45
:accessor current-angle))
(:metaclass qt-class)
(:qt-superclass "QWidget")
(:slots ("s... |
9cabd526c402afe7de69123e6b003bfe69400ee52be9f189d9748303de3cbbcd | Macroz/GraphQLviz | project.clj | (defproject macroz/graphqlviz "0.5.0"
:description "Visualize GraphQL schemas using Graphviz"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[macroz/tangle "0.1.8"]
[org.clojure/data.json "0.2.6"]
... | null | https://raw.githubusercontent.com/Macroz/GraphQLviz/6df0713ae51d7cfea489a9183c59b42d1987ab09/project.clj | clojure | (defproject macroz/graphqlviz "0.5.0"
:description "Visualize GraphQL schemas using Graphviz"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[macroz/tangle "0.1.8"]
[org.clojure/data.json "0.2.6"]
... | |
dfab158554df69bc2cfa35098addc583c1edb732c347c35aecede0b27e18b544 | jfischoff/twitch | Path.hs | --
Copyright ( c ) 2012
-- Developed for a Google Summer of Code project -
--
# LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
module Twitch.Path
( findFiles
, findDirs
, findAllDirs
, canonicalizeDirPath
, canonicalizePath
) where
satisfy... | null | https://raw.githubusercontent.com/jfischoff/twitch/9ed10b0aaff8aace3b8b2eb47d605d9107194b95/src/Twitch/Path.hs | haskell |
Developed for a Google Summer of Code project -
| Copyright ( c ) 2012
# LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
module Twitch.Path
( findFiles
, findDirs
, findAllDirs
, canonicalizeDirPath
, canonicalizePath
) where
satisfy GHC < 7.10
import Control.Monad
import System.Directory
... |
d2a6bfb53aceeb16d43eb83432d4a394070135886835b1cc65ece845fe944abe | miraj-project/miraj | utils.clj | (ns ^{:doc "Miraj utility functions"
:author "Gregg Reynolds"}
miraj.utils
(:refer-clojure :exclude [import refer require])
(:require [clojure.string :as str]
[clojure.pprint :as pp]
[clojure.data.json :as json]
[clojure.java.shell :refer [sh]]
[clojure.set :a... | null | https://raw.githubusercontent.com/miraj-project/miraj/bf6f7d4d1c383ac9294dcdef2ad48b3863b6d84f/src/clj/miraj/utils.clj | clojure | [mobileink.boot-bowdlerize :as bow]
[polymer :refer :all]
[clojure.tools.reader :as reader]
[clojure.tools.reader.reader-types :as readers]
[cljs.compiler :as c]
[cljs.closure :as cc]
[cljs.env :as env])
(log/debug "NS->URI")
(log/debug "ns->path: " namesp)
_ (log/debug "ns-name: " ns-name)
_ (log/debug "pat... | (ns ^{:doc "Miraj utility functions"
:author "Gregg Reynolds"}
miraj.utils
(:refer-clojure :exclude [import refer require])
(:require [clojure.string :as str]
[clojure.pprint :as pp]
[clojure.data.json :as json]
[clojure.java.shell :refer [sh]]
[clojure.set :a... |
78e55d484b42d318b2832929a3c4b66c13f1c1c240ac5ac107bceacecd05ea5e | penpot/penpot | helpers_shapes_test.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns frontend-tests.helpers-shapes-test
(:require
[app.common.colors :as clr]
[app.common.data :as d]
... | null | https://raw.githubusercontent.com/penpot/penpot/f3472fcd790c2d1254b64a7d3e4510369914df9e/frontend/test/frontend_tests/helpers_shapes_test.cljs | clojure |
Copyright (c) KALEIDOS INC | 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 /.
(ns frontend-tests.helpers-shapes-test
(:require
[app.common.colors :as clr]
[app.common.data :as d]
[app.common.geom.point :as gpt]... |
ef7e52ecbe200eb45e8a0fa5c167e860afaeab2913d7e4cb3e75de4703e96988 | toddmohney/json-api | DocumentSpec.hs | module Network.JSONApi.DocumentSpec where
import Control.Lens ((^?))
import Data.Aeson (ToJSON)
import qualified Data.Aeson as AE
import qualified Data.Aeson.Lens as Lens
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BS
import Data.Either (isRight)
import Data.Maybe
impo... | null | https://raw.githubusercontent.com/toddmohney/json-api/265a500f6bfe61965adeb4ae62b561f1da4d35e6/test/Network/JSONApi/DocumentSpec.hs | haskell | putStrLn (BS.unpack encodedJson)
putStrLn (show decodedJson)
putStrLn (BS.unpack encodedJson)
putStrLn $ show decodedJson
putStrLn (BS.unpack encodedJson)
putStrLn $ show decodedJson
putStrLn (BS.unpack encodedJson)
putStrLn $ show decodedJson | module Network.JSONApi.DocumentSpec where
import Control.Lens ((^?))
import Data.Aeson (ToJSON)
import qualified Data.Aeson as AE
import qualified Data.Aeson.Lens as Lens
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BS
import Data.Either (isRight)
import Data.Maybe
impo... |
f63cd2531f120b524fe8c743c4093fb586f64e9ac82630387fed5c3bfe82f96a | da-x/fancydiff | Test.hs | ------------------------------------------------------------------------------------
import System.FilePath ((</>))
----
import qualified Paths_fancydiff as Paths_fancydiff
import System.Process (callProcess)
------------------------------------------------------------------------------------
main... | null | https://raw.githubusercontent.com/da-x/fancydiff/95c76034d907f715466b26e4f4001990ca98bfcc/test/Test.hs | haskell | ----------------------------------------------------------------------------------
--
---------------------------------------------------------------------------------- | import System.FilePath ((</>))
import qualified Paths_fancydiff as Paths_fancydiff
import System.Process (callProcess)
main :: IO ()
main = do
fancydiff <- fmap (</> "fancydiff") Paths_fancydiff.getBinDir
callProcess fancydiff ["--test-suite"]
|
2395a61e734e65444383259b5655a49991e61db577d15bcf83539c339e23b40e | Quid2/zm | K0e1df25dc480.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.ZM.ADT.User.K0e1df25dc480 (User(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
import qualified Test.ZM.ADT.List.Kb8cd13187198
import qualified Test.ZM.ADT.Char.K... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/ZM/ADT/User/K0e1df25dc480.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # | module Test.ZM.ADT.User.K0e1df25dc480 (User(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
import qualified Test.ZM.ADT.List.Kb8cd13187198
import qualified Test.ZM.ADT.Char.K066db52af145
newtype User = User {userName :: Test.ZM.ADT.Lis... |
e0b2e406f5cc5be740a6d774404988ce9d006948d21cf9d2ee7f329f32ee5b8f | martintrojer/frinj | jvm.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; ... | null | https://raw.githubusercontent.com/martintrojer/frinj/e588c8e022f13a59e529c19bc78657a4284d4e72/src/frinj/jvm.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns frinj.jvm
(:require [frinj.core :as core]
[frinj.cross :as cross]
[frinj.parser :as parser]
[frinj.feeds :as feeds]
[clojure.java.io :as io])
(:import frinj.core.fjv))
(alt... |
2c7aa7376df29b876bd35597d97707edd9675d36f56ccef9ecec8fc241f1e8be | lehins/massiv | Filter.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Main where
import Criterion.Main
import Data.Massiv.Array as A
import Data . Massiv . Array . Delayed . Stream
import Data.Massiv.Array.Manifest.Vector as A
import Data.Massiv.Bench as A
import qualified Data.Vector... | null | https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv-bench/bench/Filter.hs | haskell | # LANGUAGE BangPatterns #
-- Really slow
filterA :: Source r ix e => (e -> Bool) -> Array r ix e -> Array DL Ix1 e
filterA f = foldlS collect A.empty
where
-- Slow
filterA' :: Source r ix e => (e -> Bool) -> Array r ix e -> Array DL Ix1 e
filterA' f = foldrS collect A.empty
where
| f e = A.cons e acc | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Main where
import Criterion.Main
import Data.Massiv.Array as A
import Data . Massiv . Array . Delayed . Stream
import Data.Massiv.Array.Manifest.Vector as A
import Data.Massiv.Bench as A
import qualified Data.Vector.Primitive as VP
import Prelud... |
678f68fcbd9ea201413d1bb8ea845c1b90b6254f1090584cbb0fc7aa17008796 | cedlemo/OCaml-GI-ctypes-bindings-generator | Clipboard.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let get =
foreign "gtk_clipboard_get" (ptr Atom.t_typ @-> returning (ptr t_typ))
let get_default =
foreign "gtk_clipboard_get_default" (ptr Display.t_typ @-> returning (ptr t_typ))
let get_for_display =
foreign "gtk_clipboard_get_for_displa... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Clipboard.ml | ocaml | Not implemented gtk_clipboard_request_contents type callback not implemented
Not implemented gtk_clipboard_request_image type callback not implemented
Not implemented gtk_clipboard_request_rich_text type callback not implemented
Not implemented gtk_clipboard_request_targets type callback not implemented
Not implemented... | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let get =
foreign "gtk_clipboard_get" (ptr Atom.t_typ @-> returning (ptr t_typ))
let get_default =
foreign "gtk_clipboard_get_default" (ptr Display.t_typ @-> returning (ptr t_typ))
let get_for_display =
foreign "gtk_clipboard_get_for_displa... |
6b1762bb90a81f28a9cf7c075ff0a60d0dc97c233569d22a9a62e66f21696e86 | sanette/oplot | surf3d.ml | Three 3D views .
#use "topfind";;
#thread;;
#require "oplot";;
open Oplot.Plt;;
let a = axis 0. 0.
let fx u v = 0.3 +. ((1. +. (0.5 *. cos u)) *. cos v)
let fy u v = 0.2 +. ((1. +. (0.5 *. cos u)) *. sin v)
let fz u _ = 0.5 *. sin u
let s = surf3d_plot ~wire:true ~width:10 ~height:50 fx fy fz 0. 0. 3. 6.29;;
let s... | null | https://raw.githubusercontent.com/sanette/oplot/facce7233787bc81f14acc261e210c0ae243a123/top/surf3d.ml | ocaml | Three 3D views .
#use "topfind";;
#thread;;
#require "oplot";;
open Oplot.Plt;;
let a = axis 0. 0.
let fx u v = 0.3 +. ((1. +. (0.5 *. cos u)) *. cos v)
let fy u v = 0.2 +. ((1. +. (0.5 *. cos u)) *. sin v)
let fz u _ = 0.5 *. sin u
let s = surf3d_plot ~wire:true ~width:10 ~height:50 fx fy fz 0. 0. 3. 6.29;;
let s... | |
49d97ea4a13770b4cad29b51db507b5769341055716847cfc70dc872dd475216 | slyrus/cl-bio | defpackage.lisp | Copyright ( c ) 2006 ( )
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of co... | null | https://raw.githubusercontent.com/slyrus/cl-bio/e6de2bc7f4accaa11466902407e43fae3184973f/defpackage.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistrib... | Copyright ( c ) 2006 ( )
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:cl-user)
(defpackage #:bio (:use #:cl)
(:export
#:bio-object
#:bio-object-set
... |
7bc2b2f9a15a599fd05695322b5dac469ec72fe7be2ee3e7a0081ec2d510b9d7 | alanz/ghc-exactprint | BadTelescope3.hs | {-# LANGUAGE TypeInType, ExplicitForAll #-}
module BadTelescope3 where
import Data.Kind
data SameKind :: k -> k -> *
type S a k (b :: k) = SameKind a b
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/pre-ghc86/BadTelescope3.hs | haskell | # LANGUAGE TypeInType, ExplicitForAll # |
module BadTelescope3 where
import Data.Kind
data SameKind :: k -> k -> *
type S a k (b :: k) = SameKind a b
|
4102a4b6e6feb156e23fe18d46fed40ad3e8084fd04d564e34a866e4ce7d643f | cyverse-archive/DiscoveryEnvironmentBackend | folders.clj | (ns iplant_groups.routes.folders
(:use [common-swagger-api.schema]
[iplant_groups.routes.domain.folder]
[iplant_groups.routes.domain.privileges]
[iplant_groups.routes.domain.params]
[ring.util.http-response :only [ok]])
(:require [iplant_groups.service.folders :as folders]))
(defrou... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/iplant-groups/src/iplant_groups/routes/folders.clj | clojure | (ns iplant_groups.routes.folders
(:use [common-swagger-api.schema]
[iplant_groups.routes.domain.folder]
[iplant_groups.routes.domain.privileges]
[iplant_groups.routes.domain.params]
[ring.util.http-response :only [ok]])
(:require [iplant_groups.service.folders :as folders]))
(defrou... | |
53016243290f23e53d2bd37e9eb377997c88a4b2130d49bb332932cd3c864fb4 | pgj/mirage-kfreebsd | extern.ml | let main () =
OS.Console.log_s "hello external world!"
| null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-test/regress/basic/extern.ml | ocaml | let main () =
OS.Console.log_s "hello external world!"
| |
def1b386c1d33512f3227d46880c5ef7add39e39e0f8a1e650dd744561afa27b | gonzojive/sbcl | unix-pathname.lisp | ;;;; pathname parsing for Unix filesystems
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domai... | null | https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/code/unix-pathname.lisp | lisp | pathname parsing for Unix filesystems
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Take a string and return a list of cons cells that mark the char
location.
Now we have everything we w... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
separated subseq . The first value is true if absolute directories
(defun split-at-slashes (namestr... |
66461c6b48ae0bb6fb2df17bf0fd718b88240f8f65eab65844e16fd5af7d0275 | jfeser/castor | irgen.mli | open Core
open Ast
open Implang
type ir_module = {
funcs : func list;
params : (string * Prim_type.t) list;
buffer_len : int;
}
[@@deriving compare, equal, sexp]
exception IRGenError of Error.t
val irgen :
?debug:bool ->
params:(string * Prim_type.t) list ->
len:int ->
< resolved : Resolve.resolved ; t... | null | https://raw.githubusercontent.com/jfeser/castor/39005df41a094fee816e85c4c673bfdb223139f7/lib/irgen.mli | ocaml | open Core
open Ast
open Implang
type ir_module = {
funcs : func list;
params : (string * Prim_type.t) list;
buffer_len : int;
}
[@@deriving compare, equal, sexp]
exception IRGenError of Error.t
val irgen :
?debug:bool ->
params:(string * Prim_type.t) list ->
len:int ->
< resolved : Resolve.resolved ; t... | |
4e75ada8a6cd32b4f935d9b5cc3f39437b7423475c60ddb6f19bab21292b63c6 | dyzsr/ocaml-selectml | t090-acc4.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let x = true in
let y = false in
let z = false in
let a = false i... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t090-acc4.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let x = true in
let y = false in
let z = false in
let a = false i... | |
bcafccea79defc5ad2fb2af5acc21149914bf5b6b3430011efba8ba86203c8fa | metaocaml/ber-metaocaml | driver.ml | TEST
script = " sh $ { test_source_directory}/check - linker - version.sh "
files = " mylib.mli mylib.ml stack_walker.c "
* macos
* * script
* * * setup - ocamlopt.byte - build - env
* * * * ocamlopt.byte
flags = " -opaque "
module = " mylib.mli "
* * * * * ocamlopt.byte
module = " "
flags = "... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/unwind/driver.ml | ocaml | TEST
script = " sh $ { test_source_directory}/check - linker - version.sh "
files = " mylib.mli mylib.ml stack_walker.c "
* macos
* * script
* * * setup - ocamlopt.byte - build - env
* * * * ocamlopt.byte
flags = " -opaque "
module = " mylib.mli "
* * * * * ocamlopt.byte
module = " "
flags = "... | |
90de53a30667028cc59194b0a32e1290eb35a1170b9292425c5d82cf3beac4b2 | Vaelatern/necessary-evil | fault.clj | (ns necessary-evil.fault
"Provides the fault record type required to support XML-RPC fault returns.
Functions and forms to make working with faults easier are also provided.
attempt-all will short circuit if any Fault is encountered."
(:use [clojure.algo.monads :only [monad domonad]]))
;; returning a Fault ... | null | https://raw.githubusercontent.com/Vaelatern/necessary-evil/e4e8c9ccb0a631b57ef2eed52b8670bf9f705567/src/necessary_evil/fault.clj | clojure | returning a Fault record from any piece of rpc handler will result
generate a params blob | (ns necessary-evil.fault
"Provides the fault record type required to support XML-RPC fault returns.
Functions and forms to make working with faults easier are also provided.
attempt-all will short circuit if any Fault is encountered."
(:use [clojure.algo.monads :only [monad domonad]]))
in a fault methodRe... |
e54771bb2614a45bedabbc528fc689cc2f3789fda1c08b08393b50548f39281c | lspitzner/brittany | Test177.hs | import A.B.C
import A.B.D
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test177.hs | haskell | import A.B.C
import A.B.D
| |
3b461e992983365c6e94c12d52ee90760c8f9c182171e1fd8203d7501d9ac4d6 | ghc/packages-Cabal | ArbitraryInstances.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
# OPTIONS_GHC -fno - warn - orphans #
module UnitTests.Distribution.Client.ArbitraryInstances (
adjustSize,
shortListOf,
shortListOf1,
arbitraryFlag,
ShortToken(..),
arbitraryShortToken,
NonMEmp... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TypeOperators #
* Shrinker
note: there are plenty of instances defined in ProjectConfig test file.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
| shrinker with pr... | # LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module UnitTests.Distribution.Client.ArbitraryInstances (
adjustSize,
shortListOf,
shortListOf1,
arbitraryFlag,
ShortToken(..),
arbitraryShortToken,
NonMEmpty(..),
NoShrink(..),
Shrinker,
runShrinker,
shrinke... |
6a8536778d1ca5cb6ddc690e672fa4ed16e278afe00e5250203e4728c682671f | MinaProtocol/mina | block_reward_test.ml | open Core
open Integration_test_lib
open Mina_base
module Make (Inputs : Intf.Test.Inputs_intf) = struct
open Inputs
open Engine
open Dsl
open Test_common.Make (Inputs)
TODO : find a way to avoid this type alias ( first class module signatures restrictions make this tricky )
type network = Network.t
t... | null | https://raw.githubusercontent.com/MinaProtocol/mina/8cd54037afbc17ae5d8841c9783bc847ebcec09e/src/app/test_executive/block_reward_test.ml | ocaml | open Core
open Integration_test_lib
open Mina_base
module Make (Inputs : Intf.Test.Inputs_intf) = struct
open Inputs
open Engine
open Dsl
open Test_common.Make (Inputs)
TODO : find a way to avoid this type alias ( first class module signatures restrictions make this tricky )
type network = Network.t
t... | |
1308d1ec3b021b7bc2d41e08b50dfa10a5c541598ff635b1e854721ae69711b9 | charlieg/Sparser | loader1.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1991 - 1999 -- all rights reserved
;;;
;;; File: "loader"
;;; Module: "grammar;rules:words:"
Version : 1.7 October 1999
initiated 2/1/91 , added " other adverbs " & " vague " 2/12 , added
" conjunctions " 2/20... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/rules/words/loader1.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "loader"
Module: "grammar;rules:words:"
format1 as [spaces], 12/28 put in the load flags
conversion to the new semantics
for coordination with populating the dispatch array for the
tokenizer
(1/9/95) added [adjectiv... | copyright ( c ) 1991 - 1999 -- all rights reserved
Version : 1.7 October 1999
initiated 2/1/91 , added " other adverbs " & " vague " 2/12 , added
" conjunctions " 2/20 , added scheme for function words and
some cases 3/20 , 4/23 added contractions . 11/17 elevated
1.0 ( 9/7/92 v2.3 ) bu... |
07aea4e2793d90166765bbe09886c67e67fbd9103e18a72f4c854b0d88cdb106 | mirage/ocaml-github | jar_cli.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-github/0196f078bfaa460f796b0512717851edf531e31b/jar/jar_cli.ml | ocaml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
4e30005726f1fea79140b359359c3f89a2225f0b5a6bd379562130d777c64822 | HealthSamurai/unit-map | now.cljc | (ns unit-map.systems.date-time.now
(:require [unit-map.core :as umap]
[unit-map.impl.registry :as registry]
[unit-map.impl.system :as system]))
;; TODO:
- What if someone wants to use : second & : nanosecond ?
;; - Add am pm period support
(defn tz-offset
([registry]
(tz-offset regis... | null | https://raw.githubusercontent.com/HealthSamurai/unit-map/eb90c2c427c2fb0f48cb54e58d1565f3255ec16d/src/unit_map/systems/date_time/now.cljc | clojure | TODO:
- Add am pm period support | (ns unit-map.systems.date-time.now
(:require [unit-map.core :as umap]
[unit-map.impl.registry :as registry]
[unit-map.impl.system :as system]))
- What if someone wants to use : second & : nanosecond ?
(defn tz-offset
([registry]
(tz-offset registry
{:min (-> #?(:clj (j... |
aa3bb0d76b3968b40c0d3b755568299854c8667f4c62ac6545caf075c6c48079 | the-dr-lazy/cascade | IncorrectValidLogin.hs | |
Module : Test . Cascade . Api . StateMachine . Command . Authentication . IncorrectValidLogin
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability ... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/test/Test/Cascade/Api/StateMachine/Command/Authentication/IncorrectValidLogin.hs | haskell | |
Module : Test . Cascade . Api . StateMachine . Command . Authentication . IncorrectValidLogin
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability ... | |
6fbb08f77c38ca193b0a68b08ec6b15e63310d0e3b0faf03e2f9beaa795a9ace | deadtrickster/prometheus.cl | support.lisp | (in-package #:prometheus.test.support)
(defmacro error-class-exists (name &optional (base 'prom:base-error))
(let ((class-exists-msg (format nil "~s class exists" name))
(class-is-base-msg (format nil "~s is ~s" name base))
(no-class-msg (format nil "No ~s class" name)))
`(subtest "Error existenc... | null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/t/support/support.lisp | lisp | (in-package #:prometheus.test.support)
(defmacro error-class-exists (name &optional (base 'prom:base-error))
(let ((class-exists-msg (format nil "~s class exists" name))
(class-is-base-msg (format nil "~s is ~s" name base))
(no-class-msg (format nil "No ~s class" name)))
`(subtest "Error existenc... | |
848170b1f93aec47acada5844b7be4dcc88bc467607366f12c9de5934202277d | programaker-project/Programaker-Core | automate_bot_engine_launcher.erl | %%%-------------------------------------------------------------------
%% @doc automate_bot_engine main runner, allows to span appropiately
%% the bots.
%% @end
%%%-------------------------------------------------------------------
-module(automate_bot_engine_launcher).
%% API
-export([ update_program/1
... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_bot_engine/src/automate_bot_engine_launcher.erl | erlang | -------------------------------------------------------------------
@doc automate_bot_engine main runner, allows to span appropiately
the bots.
@end
-------------------------------------------------------------------
API
====================================================================
API functions
======... |
-module(automate_bot_engine_launcher).
-export([ update_program/1
, stop_program/1
]).
update_program(ProgramId) ->
case get_program_pid(ProgramId) of
{ ok, Pid } ->
case automate_coordination_utils:is_process_alive(Pid) of
automate_bot_engine_runner_sup:st... |
12bef1f7291c8aad80d22e4c77e75e5dad626dc6c2a3fb99d496766d18219771 | senapk/funcional_arcade | solver.hs | merge x [] = x
merge [] x = x
merge (x:xs) (y:ys) = if x < y then x:(merge xs (y:ys)) else y:(merge (x:xs) ys) | null | https://raw.githubusercontent.com/senapk/funcional_arcade/70fa04b4799d5a8c7e5add39d9f217f38f418600/base/036/solver.hs | haskell | merge x [] = x
merge [] x = x
merge (x:xs) (y:ys) = if x < y then x:(merge xs (y:ys)) else y:(merge (x:xs) ys) | |
9ab3cdfeb1a7922aa68792b718a62972408c52cf187b400f327c11bc2546e054 | isovector/ldtk-types | LDtk.hs | module LDtk
( module LDtk
, module LDtk.Types
) where
import Data.Aeson
import LDtk.Types hiding (ldtkOpts, parseFieldValue)
------------------------------------------------------------------------------
| @since 1.2.3
loadLDtk :: FilePath -> IO (Either String LDtkRoot)
loadLDtk = eitherDecodeFileStrict
| null | https://raw.githubusercontent.com/isovector/ldtk-types/88e497bb8eb20a1ce8746b0be388ab084d4f1537/src/LDtk.hs | haskell | ---------------------------------------------------------------------------- | module LDtk
( module LDtk
, module LDtk.Types
) where
import Data.Aeson
import LDtk.Types hiding (ldtkOpts, parseFieldValue)
| @since 1.2.3
loadLDtk :: FilePath -> IO (Either String LDtkRoot)
loadLDtk = eitherDecodeFileStrict
|
bd6f57ade603bcfa396211d142a8a8eee1251f82943971cfbbfcb32e92b0ac2d | jaspervdj/number-six | Sample.hs | | Number six sample configuration file
--
{-# LANGUAGE OverloadedStrings #-}
module Main where
import NumberSix
import NumberSix.Irc
main :: IO ()
main = numberSix IrcConfig
{ ircNick = "herpy"
, ircRealName = "Number Six Testing Bot"
, ircChannels = ["#testing"]
, ircHost = "win... | null | https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/Sample.hs | haskell |
# LANGUAGE OverloadedStrings # | | Number six sample configuration file
module Main where
import NumberSix
import NumberSix.Irc
main :: IO ()
main = numberSix IrcConfig
{ ircNick = "herpy"
, ircRealName = "Number Six Testing Bot"
, ircChannels = ["#testing"]
, ircHost = "wina.ugent.be"
, ircPort = 666... |
22212bed59945d97bee7bd868996cf2c7f7afa0418fee55e12b60aa94346a4e2 | acieroid/scala-am | ring.scm | (define result '())
(define output (lambda (i) (set! result (cons i result))))
(define (make-ring n)
(let ((last (cons 0 '())))
(define (build-list n)
(if (= n 0)
last
(cons n (build-list (- n 1)))))
(let ((ring (build-list n)))
(set-cdr! last ring)
ring)))
(define (pri... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/ring.scm | scheme | (define result '())
(define output (lambda (i) (set! result (cons i result))))
(define (make-ring n)
(let ((last (cons 0 '())))
(define (build-list n)
(if (= n 0)
last
(cons n (build-list (- n 1)))))
(let ((ring (build-list n)))
(set-cdr! last ring)
ring)))
(define (pri... | |
0eb45917f27bbacbe4148652656fb8d107621eeb763f37df4fe0f1b0102620ad | tsloughter/kuberl | kuberl_networking_v1beta1_ingress_status.erl | -module(kuberl_networking_v1beta1_ingress_status).
-export([encode/1]).
-export_type([kuberl_networking_v1beta1_ingress_status/0]).
-type kuberl_networking_v1beta1_ingress_status() ::
#{ 'loadBalancer' => kuberl_v1_load_balancer_status:kuberl_v1_load_balancer_status()
}.
encode(#{ 'loadBalancer' := LoadBal... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_networking_v1beta1_ingress_status.erl | erlang | -module(kuberl_networking_v1beta1_ingress_status).
-export([encode/1]).
-export_type([kuberl_networking_v1beta1_ingress_status/0]).
-type kuberl_networking_v1beta1_ingress_status() ::
#{ 'loadBalancer' => kuberl_v1_load_balancer_status:kuberl_v1_load_balancer_status()
}.
encode(#{ 'loadBalancer' := LoadBal... | |
f06b5851fc46b9fa7c842a7adade0d2c7368e34aa032cd9473c37c1b8dae87d4 | IBM/wcs-ocaml | io_util.mli |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/examples/rulebot/src/io_util.mli | ocaml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | |
032377c38bc632a4526bf960aa178662e6a73f774a7a042d8222de2f19d46246 | hemmi/coq2scala | tokens.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/tools/coqdoc/tokens.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type of dictionaries
Add a string... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type ttree
val empty_ttree ... |
228d8b8eaf89d8b0d5b78260e54c34c8791587d373efc987b0e7d84f362d0d58 | kupl/MicSE | time.mli | (* Timer *)
module Mtime_s : sig
include module type of Mtime
val t_of_sexp : Core.Sexp.t -> t
val sexp_of_t : t -> Core.Sexp.t
end
module SMap : module type of Core.Map.Make (Core.String)
(******************************************************************************)
(**************************************... | null | https://raw.githubusercontent.com/kupl/MicSE/23678f01f993baac6c45ca2aab029e7356edfa2f/utils/time.mli | ocaml | Timer
****************************************************************************
****************************************************************************
Setting
****************************************************************************
****... |
module Mtime_s : sig
include module type of Mtime
val t_of_sexp : Core.Sexp.t -> t
val sexp_of_t : t -> Core.Sexp.t
end
module SMap : module type of Core.Map.Make (Core.String)
module Setting : sig
type t = {
in nano second
created_at : Mtime_s.t;
expired_at : Mtime_s.t option;
last_check : ... |
dbd6f7c1fab7a9f7d6904be82c7d2dd9de5bd09a24d2c06ddeb99bf01e21d48a | goderich/aoc2020 | day17.rkt | #lang racket
;; We begin by defining a parameter of dimensions used in the game of life.
This parameter is limited by contract to only values of 3 or 4 . Its
default value is 3 , as used in part 1 .
(define/contract dimensions
(parameter/c (or/c 3 4))
(make-parameter 3))
;; We use a nullary function to read t... | null | https://raw.githubusercontent.com/goderich/aoc2020/96db9aab107e1f4a594319f38a9a309591bd331e/day17.rkt | racket | We begin by defining a parameter of dimensions used in the game of life.
We use a nullary function to read the input file. The function examines
the `dimensions` parameter to decide whether to output lists of length
currently occupied positions are collected into a set. We begin the game
with z (and w, if applicab... | #lang racket
This parameter is limited by contract to only values of 3 or 4 . Its
default value is 3 , as used in part 1 .
(define/contract dimensions
(parameter/c (or/c 3 4))
(make-parameter 3))
3 or 4 for the coordinates of individual cubes . The coordinates of
(define (get-input)
(for/set ((line (file-... |
05492df781fe6735e85ca9e751239f5c1d0a7cbdb1cd68a9a352d6cbebb03de1 | mejgun/haskell-tdlib | PassportElementErrorSource.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.PassportElementErrorSource where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
| Contains the description of an error in a Telegram Passport element
data PassportElementErrorSource
= -- | The element cont... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/PassportElementErrorSource.hs | haskell | # LANGUAGE OverloadedStrings #
|
| The element contains an error in an unspecified place. The error will be considered resolved when new data is added
|
| The front side of the document contains an error. The error will be considered resolved when the file with the front side changes
| The reverse side of the docu... |
module TD.Data.PassportElementErrorSource where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
| Contains the description of an error in a Telegram Passport element
data PassportElementErrorSource
PassportElementErrorSourceUnspecified
| One of the data fie... |
5d0584b5ec19cfddba009b0cf62ad8a48b616fec36148b39f133c97f2beee814 | caradoc-org/caradoc | entry.ml | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2015 ANSSI
Copyright ( C ) 2015 - 2017
(* ... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/util/entry.ml | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2015 ANSSI
Copyright ( C ) 2015 - 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have rece... |
3952564cbfd0a69aa9d09eeb939b6924c6978de78028e7c36bf540e13e6d5d33 | wireless-net/erlang-nommu | wxCalendarEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxCalendarEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
See also the message variant { @link wxE... |
8fcd1ba47155aae90dda71bf7773a43550ed56ede098fa87cd3ba464fdb801fa | HumbleUI/HumbleUI | draggable.clj | (ns io.github.humbleui.ui.draggable
(:require
[io.github.humbleui.core :as core]
[io.github.humbleui.protocols :as protocols]
[io.github.humbleui.ui.dynamic :as dynamic])
(:import
[io.github.humbleui.types IPoint IRect]
[io.github.humbleui.skija Canvas]
[java.lang AutoCloseable]))
(defn chi... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/a0c2522cd74ab7adea6cf000411b04a86175ab02/src/io/github/humbleui/ui/draggable.clj | clojure | (ns io.github.humbleui.ui.draggable
(:require
[io.github.humbleui.core :as core]
[io.github.humbleui.protocols :as protocols]
[io.github.humbleui.ui.dynamic :as dynamic])
(:import
[io.github.humbleui.types IPoint IRect]
[io.github.humbleui.skija Canvas]
[java.lang AutoCloseable]))
(defn chi... | |
9ca386e1e30fd8e8d959d7dabca9301335de76e9421f0be48211417e56eb79c2 | emqx/emqx | emqx_license_parser_v20220101.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%--------------------------------------------------------------------
-module(emqx_license_parser_v20220101).
-behaviour(emqx_license_parser).
-include_lib("emqx/inc... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/lib-ee/emqx_license/src/emqx_license_parser_v20220101.erl | erlang | --------------------------------------------------------------------
--------------------------------------------------------------------
however, in order to make expiration test easier (before Mar.2022),
allow it to start from Nov.2021
------------------------------------------------------------------------------
... | Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
-module(emqx_license_parser_v20220101).
-behaviour(emqx_license_parser).
-include_lib("emqx/include/logger.hrl").
-include("emqx_license.hrl").
-define(DIGEST_TYPE, sha256).
-define(LICENSE_VERSION, <<"220111">>).
This is the earlies... |
0e8aae14aaf739b4bafce3d869769854956f56de8a91ca22217b73d0a0fc28dc | higherkindness/mu-haskell | Internal.hs | # language FlexibleContexts #
{-# language ScopedTypeVariables #-}
# language TypeApplications #
# language TypeFamilies #
module Mu.Kafka.Internal where
import qualified Data.Avro as A
import Data.ByteString
import Data.ByteString.Lazy (fromStrict, toStrict)
import ... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/adapter/kafka/src/Mu/Kafka/Internal.hs | haskell | # language ScopedTypeVariables # | # language FlexibleContexts #
# language TypeApplications #
# language TypeFamilies #
module Mu.Kafka.Internal where
import qualified Data.Avro as A
import Data.ByteString
import Data.ByteString.Lazy (fromStrict, toStrict)
import Mu.Schema
toBS :: forall sch s... |
fa8507de3b03a50bc0db8a5bbf87b50b924ae970ec50d5ce985614a2459ec557 | thierry-martinez/pyast | loc.ml | type t = {
lstart: Lexing.position;
lend: Lexing.position;
}
let mk lstart lend = { lstart; lend }
let of_lexbuf lexbuf =
mk (Lexing.lexeme_start_p lexbuf) (Lexing.lexeme_end_p lexbuf)
let line pos = pos.Lexing.pos_lnum
let column pos = pos.Lexing.pos_cnum - pos.Lexing.pos_bol
let format formatter l =
... | null | https://raw.githubusercontent.com/thierry-martinez/pyast/6544e93827f2ddb02546d7e51522fc3ef1918aee/asdl/loc.ml | ocaml | type t = {
lstart: Lexing.position;
lend: Lexing.position;
}
let mk lstart lend = { lstart; lend }
let of_lexbuf lexbuf =
mk (Lexing.lexeme_start_p lexbuf) (Lexing.lexeme_end_p lexbuf)
let line pos = pos.Lexing.pos_lnum
let column pos = pos.Lexing.pos_cnum - pos.Lexing.pos_bol
let format formatter l =
... | |
fdaed8a355782d47e7096860e44189569636c4e4cb100d2aea81e7176f488027 | ninjudd/cake | foo.clj | (ns foo
(:use cake cake.core))
(defn bar []
[(count *project*) (keys *project*)])
(deftask foo
(prn "foo.clj")
(bake
(:use clojure.test)
[a (bar)]
(is true)
(println "============" (.getName *ns*) "============")
(println a)
(println *project*)
(println *opts*)))
| null | https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/examples/test/src/foo.clj | clojure | (ns foo
(:use cake cake.core))
(defn bar []
[(count *project*) (keys *project*)])
(deftask foo
(prn "foo.clj")
(bake
(:use clojure.test)
[a (bar)]
(is true)
(println "============" (.getName *ns*) "============")
(println a)
(println *project*)
(println *opts*)))
| |
51490e18dced9b48df725fd18efe7218e43280714b67eb30459b2a3bc1c41931 | gator1/jepsen | kafka.clj | (ns jepsen.kafka
(:gen-class)
(:require [clojure.tools.logging :refer :all]
[clojure.java.io :as io]
[clojure.string :as str]
[gregor.core :as gregor]
[jepsen [db :as db]
[cli :as cli]
[core :as jepsen]
... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/kafka/src/jepsen/kafka.clj | clojure | [knossos.op :as op]
Delete it if it exists
(zk/start)
(c/exec (c/lit "/opt/kafka/bin/zookeeper-server-start.sh -daemon config/zookeeper.properties")))
Create topic synchronously
Install specific versions
-0.10.2.0.tgz
(info node "apt-get update:" (c/exec :apt-get :update))
(c/exec :apt-get :install :-y :--force-yes... | (ns jepsen.kafka
(:gen-class)
(:require [clojure.tools.logging :refer :all]
[clojure.java.io :as io]
[clojure.string :as str]
[gregor.core :as gregor]
[jepsen [db :as db]
[cli :as cli]
[core :as jepsen]
... |
5296494d3020f7c7580fd2ec6ea6512f725fe7334442ac8cdc01cb2b4690b7ea | reborg/clojure-essential-reference | 8.clj | < 1 >
(lazy-seq
(when-let [s (seq (take n xs))]
(let [cb (chunk-buffer n)]
(doseq [x s] (chunk-append cb x))
(chunk-cons (chunk cb) (re-chunk n (drop n xs)))))))
< 2 > | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialGeneration/pmap%2Cpcallsandpvalues/8.clj | clojure | < 1 >
(lazy-seq
(when-let [s (seq (take n xs))]
(let [cb (chunk-buffer n)]
(doseq [x s] (chunk-append cb x))
(chunk-cons (chunk cb) (re-chunk n (drop n xs)))))))
< 2 > | |
bb1cf4b4b08c5c1e18f235b700f908048f513f070218a60c4dcaaa4fb6411507 | jbreindel/battlecraft | bc_ai_fsm.erl |
-module(bc_ai_fsm).
-behaviour(gen_fsm).
%% distance to sense in vertices
-define(SENSE_DIST, 4).
-export([init/1,
no_action/2,
standing/2,
moving/2,
attacking/2,
TODO implement actions/3
handle_event/3,
handle_sync_event/4,
handle_info/3,
terminate/3,
code_change/4]).
-e... | null | https://raw.githubusercontent.com/jbreindel/battlecraft/622131a1ad8c46f19cf9ffd6bf32ba4a74ef4137/apps/bc_entity/src/bc_ai_fsm.erl | erlang | distance to sense in vertices
internal state
====================================================================
API functions
====================================================================
====================================================================
Behavioural functions
========================... |
-module(bc_ai_fsm).
-behaviour(gen_fsm).
-define(SENSE_DIST, 4).
-export([init/1,
no_action/2,
standing/2,
moving/2,
attacking/2,
TODO implement actions/3
handle_event/3,
handle_sync_event/4,
handle_info/3,
terminate/3,
code_change/4]).
-export([start_link/3,
entity_di... |
0babba218c0b17c64aa05098465fed3fadba66a4831564c149139012453d7ce2 | TeMPOraL/alice | facebook.lisp | (in-package #:alice)
(defclass page ()
((page-id)
(access-key)
(forward-messages-to)))
Transporting messages between Facebook page and info .
;;; outputs
(defun post-to-facebook (text)
;; TODO POST to /me/feed
TODO choose between links&stuff ?
)
| null | https://raw.githubusercontent.com/TeMPOraL/alice/4621a53ccd459bebf0b34c531dab49f7b42f35c7/grimoire/facebook.lisp | lisp | outputs
TODO POST to /me/feed | (in-package #:alice)
(defclass page ()
((page-id)
(access-key)
(forward-messages-to)))
Transporting messages between Facebook page and info .
(defun post-to-facebook (text)
TODO choose between links&stuff ?
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.