_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 |
|---|---|---|---|---|---|---|---|---|
9f19c6b755f600fb14f8189f86a6c0969599380d377dadf935364327948abfc4 | clojure-interop/aws-api | core.clj | (ns com.amazonaws.services.workdocs.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.amazonaws.services.workdocs.AbstractAmazonWorkDocs])
(require '[com.amazonaws.services.workdocs.AbstractAmazonWorkDocsAsync])
(require '[com.amazonaws.services.workdocs.AmazonWorkDocs])
(require '[c... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workdocs/src/com/amazonaws/services/workdocs/core.clj | clojure | (ns com.amazonaws.services.workdocs.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.amazonaws.services.workdocs.AbstractAmazonWorkDocs])
(require '[com.amazonaws.services.workdocs.AbstractAmazonWorkDocsAsync])
(require '[com.amazonaws.services.workdocs.AmazonWorkDocs])
(require '[c... | |
a2e65a9f0ea6eb63d37508270e714609c61be3adf6c9cddca6f06a3ab23450ad | ublubu/shapes | Linear.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE MagicHash #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
{- |
Arithmetic utility functions for vectors and matrices.
-}
module Physics.Linear wher... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes/src/Physics/Linear.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE BangPatterns #
# LANGUAGE DeriveAnyClass #
|
Arithmetic utility functions for vectors and matrices.
# INLINE smulV6' #
# INLINE smulM2x2' #
# INLINE vmulDiag6' #
# INLINE normalizeV2 #
| Length of a vector.
| Squared length of a vector.
solving some `mx = b` up in here
CLIPPING ... | # LANGUAGE TemplateHaskell #
# LANGUAGE MagicHash #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
module Physics.Linear where
import GHC.Generics (Generic)
import GHC.Prim
import GHC.Types (Double(D#))
import Control.DeepSeq
import Control.Lens
import Data.Vector.Unboxed.Der... |
ac780eb92bb0463f4c4050e859926d9835308616818d75ccaabdc401a7e5d29b | domino-clj/domino | runner.cljs | (ns domino.runner
(:require
[doo.runner :refer-macros [doo-tests]]
[domino.core-test]
[domino.effects-test]
[domino.events-test]
[domino.model-test]
[domino.util-test]
[domino.validation-test]))
(doo-tests 'domino.core-test
'domino.effects-test
'domino.events-test
... | null | https://raw.githubusercontent.com/domino-clj/domino/a93dd3a4c6108d6d1cf53083652540c9297f8c45/test/domino/runner.cljs | clojure | (ns domino.runner
(:require
[doo.runner :refer-macros [doo-tests]]
[domino.core-test]
[domino.effects-test]
[domino.events-test]
[domino.model-test]
[domino.util-test]
[domino.validation-test]))
(doo-tests 'domino.core-test
'domino.effects-test
'domino.events-test
... | |
7500bd94df194a48130a009875a4efdf21272743e6de9dc92dbfae6872c82795 | Sintrastes/xen-fret | AppData.hs |
module XenFret.AppData where
import Data.Aeson.TH
import XenFret.Data
import qualified Data.Text as T
import Data.Map hiding(fromList)
import Data.MultiMap
import Data.List.NonEmpty hiding(fromList)
import Data.Ratio
import XenFret.Sagittal
( sagittal5CommaUp, sagittalSharp, sagittalSharp5CDown )
import Control.... | null | https://raw.githubusercontent.com/Sintrastes/xen-fret/cb0b6a04b9e0286ddc58fbdd1f9d91a28b883661/xen-fret/src/XenFret/AppData.hs | haskell | | Get the list of temperaments
| Get the current preferences for the app. |
module XenFret.AppData where
import Data.Aeson.TH
import XenFret.Data
import qualified Data.Text as T
import Data.Map hiding(fromList)
import Data.MultiMap
import Data.List.NonEmpty hiding(fromList)
import Data.Ratio
import XenFret.Sagittal
( sagittal5CommaUp, sagittalSharp, sagittalSharp5CDown )
import Control.... |
948f24cf0f4b51cfa7d48f674a91944413d929072072f993589940aefc44736e | exoscale/clojure-kubernetes-client | v1_priority_class.clj | (ns clojure-kubernetes-client.specs.v1-priority-class
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
)
(:import (java.io File)))
(declare v1-priority-class-data v1-priority-class)
(def v1-priority-... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_priority_class.clj | clojure | (ns clojure-kubernetes-client.specs.v1-priority-class
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
)
(:import (java.io File)))
(declare v1-priority-class-data v1-priority-class)
(def v1-priority-... | |
21d54a68b08b0397e19af1c7064a4722bf09d92f898026ed25a132aa90e0030a | zerokarmaleft/tapl-haskell | Typechecker.hs | module Simplebool.Typechecker where
import Simplebool.Context
import Simplebool.Syntax
data TypeError = IfArmsTypeMismatch
| IfGuardNotBool
| ArrowParamTypeMismatch
| AppArrowTypeExpected
| VarTypeErrorWat
deriving (Eq, Show)
typeOf :: Contex... | null | https://raw.githubusercontent.com/zerokarmaleft/tapl-haskell/7fced6ab1d3d4a7bbe905902ee0443b4c535c306/simplebool/src/Simplebool/Typechecker.hs | haskell | module Simplebool.Typechecker where
import Simplebool.Context
import Simplebool.Syntax
data TypeError = IfArmsTypeMismatch
| IfGuardNotBool
| ArrowParamTypeMismatch
| AppArrowTypeExpected
| VarTypeErrorWat
deriving (Eq, Show)
typeOf :: Contex... | |
926290cf31c5c7c9f7b3769947bb1697f1ba438b90ddc390d8a2d8e914f44e22 | PapenfussLab/bioshake | SomaticSniper.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module Bioshake.Cluster.SomaticSniper where
import Bioshake
import Bioshake.Cluster.Torque
import Bio... | null | https://raw.githubusercontent.com/PapenfussLab/bioshake/afeb7219b171e242b6e9bb9e99e2f80c0a099aff/Bioshake/Cluster/SomaticSniper.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Bioshake.Cluster.SomaticSniper where
import Bioshake
import Bioshake.Cluster.Torque
import Bioshake.Internal.SomaticSniper
import Bioshake.TH
import Data.List
import Development.Sha... |
faadb6519f4f98bfa05f9764d97e7cab9c268dffd6d62ac7052eed84a2d29646 | mfikes/fifth-postulate | ns33.cljs | (ns fifth-postulate.ns33)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns33.cljs | clojure | (ns fifth-postulate.ns33)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | |
ab1145cc3b23c1e5da02c21d88cc95f611a6a3464d43488bcb8d7b87a5af3c64 | VictorNicollet/Ohm | config.ml | Ohm is © 2012
open BatPervasives
open Common
let apache_vhost args =
let name = Filename.basename Path.root in
let domain = name ^ ".local" in
Printf.printf
"<VirtualHost *:80>
ServerName %s
FastCgiServer %s/server
RewriteEngine On
RewriteCond %s%%{REQUEST_FILENAME} !-f
RewriteRule .* /se... | null | https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/tool/config.ml | ocaml | Ohm is © 2012
open BatPervasives
open Common
let apache_vhost args =
let name = Filename.basename Path.root in
let domain = name ^ ".local" in
Printf.printf
"<VirtualHost *:80>
ServerName %s
FastCgiServer %s/server
RewriteEngine On
RewriteCond %s%%{REQUEST_FILENAME} !-f
RewriteRule .* /se... | |
818ce259ef98d50700bcacc5826b9306d1bdcfd8f3edc511e9d59b4f171105f8 | logseq/logseq | api.cljs | (ns ^:no-doc logseq.api
(:require [camel-snake-kebab.core :as csk]
[cljs-bean.core :as bean]
[cljs.reader]
[clojure.string :as string]
[clojure.walk :as walk]
[datascript.core :as d]
[electron.ipc :as ipc]
[frontend.commands :as comma... | null | https://raw.githubusercontent.com/logseq/logseq/17f51c7b77c979add2685e0b656ce15a29dc447e/src/main/logseq/api.cljs | clojure | helpers
base
get app base info
results [path data]
handle simple commands
handle palette commands
remove simple commands
remove palette commands
app
flag - boolean | 'toggle'
flag - boolean | 'toggle'
editor
nested children results
attached shallow children
clean key
plugins
db
git
ui
assets
experi... | (ns ^:no-doc logseq.api
(:require [camel-snake-kebab.core :as csk]
[cljs-bean.core :as bean]
[cljs.reader]
[clojure.string :as string]
[clojure.walk :as walk]
[datascript.core :as d]
[electron.ipc :as ipc]
[frontend.commands :as comma... |
2bf20a8e34971cfa215dd1646010c5fef584ec54858a1ffd9b6a5be84f6f25d9 | hasktorch/hasktorch | Native2.hs |
-- generated by using spec/Declarations.yaml
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module Torch.Internal.Unmanaged.Native.Native2 where
import Foreign.C.String
import Foreign.C.Types
im... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Native/Native2.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.Native2 where
import Foreign.C.String
import Foreign.C.Types
import Foreign
import Torch.Internal.Type
import qualified Language.C.Inline.Cpp ... |
532ee7a1c8677ddf499f86d4d6b1a2b029d84a65f8ba0ba3a9b360c1ac4b6960 | simplegeo/erlang | sys_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/sys_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(sys_SUITE).
-export([all/1,log/1,lo... |
42150e62916beadf5fd2d197fd5ebbea56d0f7de71a1c4456a217d33d4db2045 | SamirTalwar/smoke | DiffUtility.hs | module Test.Smoke.App.Diff.DiffUtility
( engine,
)
where
import Data.List.NonEmpty qualified as NonEmpty
import Test.Smoke.App.Diff.ExternalDiffCommand
import Test.Smoke.App.Diff.Types
engine :: DiffEngine
engine =
DiffEngine
{ engineName = name,
engineEnabled = enabled executable,
engineRender ... | null | https://raw.githubusercontent.com/SamirTalwar/smoke/b1c24419d76eac3df36aed02bf7f726d04f80d5a/src/app/Test/Smoke/App/Diff/DiffUtility.hs | haskell | module Test.Smoke.App.Diff.DiffUtility
( engine,
)
where
import Data.List.NonEmpty qualified as NonEmpty
import Test.Smoke.App.Diff.ExternalDiffCommand
import Test.Smoke.App.Diff.Types
engine :: DiffEngine
engine =
DiffEngine
{ engineName = name,
engineEnabled = enabled executable,
engineRender ... | |
40d43d8c8183afd0f1f78ebeff9a7e0c7e156518a77787fc853e274c01178285 | erlangonrails/devdb | bin_util.erl | -module(bin_util).
-export([member64/2, to_list64/1, encode_kvsegment/1, decode_kvsegment/1, bits/1, pad/1]).
-export([find_kv/2]).
member64(Bin, Val) when is_binary(Bin), is_integer(Val) ->
member64(Bin, <<Val:64>>);
member64(Bin, Val) when is_binary(Bin), is_binary(Val) ->
member64_1(Bin, Val).
mem... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ringo/ring/src/bin_util.erl | erlang |
Binary search for a kvsegment
| -module(bin_util).
-export([member64/2, to_list64/1, encode_kvsegment/1, decode_kvsegment/1, bits/1, pad/1]).
-export([find_kv/2]).
member64(Bin, Val) when is_binary(Bin), is_integer(Val) ->
member64(Bin, <<Val:64>>);
member64(Bin, Val) when is_binary(Bin), is_binary(Val) ->
member64_1(Bin, Val).
mem... |
d7d4bf521e0a1b9ef380f5996821a1c2f4da80f56b0252e817382b7b891802b5 | juspay/atlas | Handler.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/API/Parking/Booking/Handler.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
5a3d9853bd075faa1ecaa280b8b6c4bac8d64e147cec4b6df1fdde2cfb1ec992 | cryogen-project/cryogen-core | klipse_test.clj | (ns cryogen-core.klipse-test
(:require [cryogen-core.klipse :refer :all]
[clojure.test :refer [deftest testing is are]]
[net.cgrand.enlive-html :as enlive]))
(deftest map-keys-test
(is (= {"a" 1 "b" 2} (map-keys name {:a 1 :b 2}))))
(deftest update-existing-test
(is (= {:a 1 :b 2} (updat... | null | https://raw.githubusercontent.com/cryogen-project/cryogen-core/8318bde771d39515b5f5a7f5af53ba5c55aeec35/test/cryogen_core/klipse_test.clj | clojure | (ns cryogen-core.klipse-test
(:require [cryogen-core.klipse :refer :all]
[clojure.test :refer [deftest testing is are]]
[net.cgrand.enlive-html :as enlive]))
(deftest map-keys-test
(is (= {"a" 1 "b" 2} (map-keys name {:a 1 :b 2}))))
(deftest update-existing-test
(is (= {:a 1 :b 2} (updat... | |
28fa9a696a83a85ee7cfc05fb32e95a5ef8917e2b08c9edff9877495110f5d36 | kolmodin/binary | Put.hs | # LANGUAGE CPP , ExistentialQuantification #
# LANGUAGE DeriveGeneric #
module Main (main) where
import Control.DeepSeq
import Control.Exception (evaluate)
import Criterion.Main
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as C
import qualified Data.ByteString.Lazy as L
import Data.Mon... | null | https://raw.githubusercontent.com/kolmodin/binary/bccbece2e254813f86e0a04f71d9ca3cea68b3bf/benchmarks/Put.hs | haskell | Silence Monoid import warning.
Input data
# NOINLINE word16s #
----------------------------------------------------------------------
Benchmarks | # LANGUAGE CPP , ExistentialQuantification #
# LANGUAGE DeriveGeneric #
module Main (main) where
import Control.DeepSeq
import Control.Exception (evaluate)
import Criterion.Main
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as C
import qualified Data.ByteString.Lazy as L
import Data.Mon... |
609161cdc1abfc75e24ccdcb82af38b57156ac954348a2ec2b0251ccd1765581 | blitzcode/ray-marching-distance-fields | CornellBox.hs |
# LANGUAGE OverloadedLists #
module CornellBox ( mkCornellBoxVerticesTex
, cornellBox
) where
import Control.Exception
import qualified Data.Vector as V
import qualified Graphics.Rendering.OpenGL as GL
import Foreign.Marshal.Array
import Linear
import GLHelpers
-- Build a 1D Ope... | null | https://raw.githubusercontent.com/blitzcode/ray-marching-distance-fields/0578d01e75f819b1242fa1378e3963bd48842acc/CornellBox.hs | haskell | Build a 1D OpenGL floating point texture containing the vertices of
Floor (White)
Ceiling (White)
Back Wall (White)
Right Wall (Green)
Left Wall (Red)
Light (Small offset to avoid surface acne)
Short Block (White)
Tall Block (White) |
# LANGUAGE OverloadedLists #
module CornellBox ( mkCornellBoxVerticesTex
, cornellBox
) where
import Control.Exception
import qualified Data.Vector as V
import qualified Graphics.Rendering.OpenGL as GL
import Foreign.Marshal.Array
import Linear
import GLHelpers
the triangulate... |
7cc2c4dc03d48c84f67707e9d2a81b9d1771ac15a3dcc812157e3570cea0c8d0 | project-oak/hafnium-verification | Epilogues.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/base/Epilogues.ml | ocaml | Run the epilogues when we get SIGINT (Control-C). |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
fcaf530dfed98c7aba80f5c54a3e04837ff2cd4e22463a3cfa71a08a127add3f | tommaisey/aeon | running-max.help.scm | ;; (running-max in trig)
;; Track maximum level. outputs the maximum value received at the
;; input. When triggered, the maximum output value is reset to the
;; current value.
;; in - input signal
;; trig - reset the output value to the current input value
(let* ((t (impulse ar 0.4 0))
(f (mul-add (runnin... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/triggers/running-max.help.scm | scheme | (running-max in trig)
Track maximum level. outputs the maximum value received at the
input. When triggered, the maximum output value is reset to the
current value.
in - input signal
trig - reset the output value to the current input value |
(let* ((t (impulse ar 0.4 0))
(f (mul-add (running-max (dust ar 20) t) 500 200)))
(audition (out 0 (mul (sin-osc ar f 0) 0.2))))
(let* ((t (impulse kr (mouse-x kr 0.01 2 1 0.1) 0))
(f (mul-add (running-max (sin-osc kr 2 0) t) 500 200)))
(audition (out 0 (mul (sin-osc ar f 0) 0.2))))
|
bc8a274ac2d7cf3c68290f31feb80569fe50029e2c896335a9d030b2f866f891 | W-Net-AI/LISP-CV | package.lisp | ;;;; -*- mode: lisp; indent-tabs: nil -*-
(defpackage :lisp-cv
(:nicknames #:lisp-cv #:lcv #:cv)
(:use #:cffi #:common-lisp #:swank #:trivial-garbage #:lisp-executable #:bordeaux-threads)
(:shadow #:abs #:exp #:fill #:length #:load #:log #:min #:max #:open #:read #:set #:sqrt #:write)
(:export
;; ... | null | https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/package.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
Default parameters.
Change default parameters
Live code editing
Extra OpenCV constants
C Constants
C Integer Limits
DELETE
WITH-MACROS
DEFINE-FOREIGN-TYPE
VECTORS
DEFGENERIC
Other generic functions and defuns
used to re-import shadowed symbols.
core - B... |
(defpackage :lisp-cv
(:nicknames #:lisp-cv #:lcv #:cv)
(:use #:cffi #:common-lisp #:swank #:trivial-garbage #:lisp-executable #:bordeaux-threads)
(:shadow #:abs #:exp #:fill #:length #:load #:log #:min #:max #:open #:read #:set #:sqrt #:write)
(:export
#:*camera-index*
#:*default-width*
... |
551a7f77bbded8884176ad510eeac52561d81c2df65d449ef3edd5d6bd136f82 | Idorobots/spartan | ast.rkt | #lang racket
AST
(require "ast/utils.rkt")
(require "ast/nodes.rkt")
(require "ast/eqv.rkt")
(require "ast/match.rkt")
(provide (all-from-out "ast/utils.rkt"))
(provide (all-from-out "ast/nodes.rkt"))
(provide (all-from-out "ast/eqv.rkt"))
(provide (all-from-out "ast/match.rkt"))
| null | https://raw.githubusercontent.com/Idorobots/spartan/ef3b032906655585d284f1c9a33a58f1e35cb180/src/compiler/ast.rkt | racket | #lang racket
AST
(require "ast/utils.rkt")
(require "ast/nodes.rkt")
(require "ast/eqv.rkt")
(require "ast/match.rkt")
(provide (all-from-out "ast/utils.rkt"))
(provide (all-from-out "ast/nodes.rkt"))
(provide (all-from-out "ast/eqv.rkt"))
(provide (all-from-out "ast/match.rkt"))
| |
76e2bcff3a2826d1a9d589453b9738692954f0c07cbb59a990e65f2aebbf604c | zkincaid/duet | transitionFormula.ml | open Syntax
type 'a t =
{ formula : 'a formula;
symbols : (symbol * symbol) list;
exists : (symbol -> bool) }
include Log.Make(struct let name = "srk.transitionFormula" end)
let identity srk symbols =
let formula =
List.map (fun (sym, sym') ->
mk_eq srk (mk_const srk sym) (mk_const srk sym'... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/srk/src/transitionFormula.ml | ocaml | Map from pre-state vars to their post-state counterparts
let post_map = post_map srk tf.symbols in
let pre_map = pre_map srk tf.symbols in | open Syntax
type 'a t =
{ formula : 'a formula;
symbols : (symbol * symbol) list;
exists : (symbol -> bool) }
include Log.Make(struct let name = "srk.transitionFormula" end)
let identity srk symbols =
let formula =
List.map (fun (sym, sym') ->
mk_eq srk (mk_const srk sym) (mk_const srk sym'... |
52048011e82e6b0c56ea00126464b30e2c7007713e4a3459f8408da8fa0cf2f5 | lambdaisland/uri | normalize_test.cljc | (ns lambdaisland.uri.normalize-test
(:require [lambdaisland.uri :as uri]
[lambdaisland.uri.normalize :as n]
[clojure.test :refer [deftest testing is are]]))
(deftest normalize-test
(are [x y] (= (-> x uri/parse n/normalize str) y)
" b c" ""
"" ""
"/𝍖" ... | null | https://raw.githubusercontent.com/lambdaisland/uri/082ecc790139a6f397ecbd7a16432e97a31fe5bd/test/lambdaisland/uri/normalize_test.cljc | clojure | (ns lambdaisland.uri.normalize-test
(:require [lambdaisland.uri :as uri]
[lambdaisland.uri.normalize :as n]
[clojure.test :refer [deftest testing is are]]))
(deftest normalize-test
(are [x y] (= (-> x uri/parse n/normalize str) y)
" b c" ""
"" ""
"/𝍖" ... | |
1a878f71cd474710161b3477611c9ef8b4517e8a679eeb054475a0939c10511c | MinaProtocol/mina | verification_key.mli | module Data : sig
module Stable : sig
module V1 : sig
type t = { constraints : int } [@@deriving yojson]
include Pickles_types.Sigs.VERSIONED
end
end
type t = Stable.V1.t = { constraints : int } [@@deriving yojson]
end
module Stable : sig
module V2 : sig
type t =
{ commitments :... | null | https://raw.githubusercontent.com/MinaProtocol/mina/b19a220d87caa129ed5dcffc94f89204ae874661/src/lib/pickles/verification_key.mli | ocaml | module Data : sig
module Stable : sig
module V1 : sig
type t = { constraints : int } [@@deriving yojson]
include Pickles_types.Sigs.VERSIONED
end
end
type t = Stable.V1.t = { constraints : int } [@@deriving yojson]
end
module Stable : sig
module V2 : sig
type t =
{ commitments :... | |
00d0784bd9f817c671e03f5dce16e6a780ba12f86f42a3b4c5647363314d41db | hipsleek/hipsleek | partial.ml | (* See copyright notice at the end of the file *)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Partial Evaluation & Constant Folding
*
* Soundness Assumptions :
* ( 1 ) Whole program analysis . You m... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/partial.ml | ocaml | See copyright notice at the end of the file
****************************************************************************
* A generic signature for Alias Analysis information. Used to compute the
* call graph and do symbolic execution.
***************************************************************************
all... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Partial Evaluation & Constant Folding
*
* Soundness Assumptions :
* ( 1 ) Whole program analysis . You may call functions that are not defined
* (... |
ef60716a945282e975052fad2487f34b11e14115d5f52f5bd3911c989772e8f1 | iskandr/parakeet-retired | toplevel.ml | (*===----------------------------------------------------------------------===
* Top-Level parsing and JIT Driver
*===----------------------------------------------------------------------===*)
open Llvm
open Llvm_executionengine
(* top ::= definition | external | expression | ';' *)
let rec main_loop the_fpm the_e... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/LLVM/toy/toplevel.ml | ocaml | ===----------------------------------------------------------------------===
* Top-Level parsing and JIT Driver
*===----------------------------------------------------------------------===
top ::= definition | external | expression | ';'
ignore top-level semicolons.
Evaluate a top-level expression into an anony... |
open Llvm
open Llvm_executionengine
let rec main_loop the_fpm the_execution_engine stream =
match Stream.peek stream with
| None -> ()
| Some (Token.Kwd ';') ->
Stream.junk stream;
main_loop the_fpm the_execution_engine stream
| Some token ->
begin
try match token with
| To... |
07d4b116ebe718523b285b4836a420bd74acd1032a6a4ca62a6db0b4690e84cc | ucsd-progsys/dsolve | quicksort.ml | fun('a)
qs cmp xs =
case xs of
[] => []
| x :: xs' => par cmp (x, [], [], xs')
withtype ('a * 'a -> bool) -> {n:nat} <n,0> => 'a list(n) -> 'a list(n)
and('a)
par cmp (x, l, r, xs) =
case xs of
[] => qs cmp l @ (x :: qs cmp r)
| x' :: xs' => if cmp(x', x) then par cmp (x, x' :: l, r, xs... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/quicksort.ml | ocaml | fun('a)
qs cmp xs =
case xs of
[] => []
| x :: xs' => par cmp (x, [], [], xs')
withtype ('a * 'a -> bool) -> {n:nat} <n,0> => 'a list(n) -> 'a list(n)
and('a)
par cmp (x, l, r, xs) =
case xs of
[] => qs cmp l @ (x :: qs cmp r)
| x' :: xs' => if cmp(x', x) then par cmp (x, x' :: l, r, xs... | |
53f320b7a0a6124a36d4cb6eec46882b98e142da28b35994e6e09fe424f29ad0 | RJMetrics/sweet-liberty-example | dogs_test.clj | (ns com.rjmetrics.dogs-service.dogs-test
(:require [midje.sweet :refer :all]
[com.rjmetrics.dogs-service.core :as sc]
[ring.mock.request :as mock-req]
[clojure.data.json :as json]
[com.rjmetrics.dogs-service.db :as db]))
(defn to-json-input-stream
"Take a vector or m... | null | https://raw.githubusercontent.com/RJMetrics/sweet-liberty-example/60214db9eb49b6119ec4a16d877b7b297458408c/test/com/rjmetrics/dogs_service/dogs_test.clj | clojure | resource does not exist
correct response
handle that, for the sake of brevity. | (ns com.rjmetrics.dogs-service.dogs-test
(:require [midje.sweet :refer :all]
[com.rjmetrics.dogs-service.core :as sc]
[ring.mock.request :as mock-req]
[clojure.data.json :as json]
[com.rjmetrics.dogs-service.db :as db]))
(defn to-json-input-stream
"Take a vector or m... |
1d66efc427fb9b8ae50d0a335c75b40a0a86b6d6917a67241d50d660991aa808 | vmchale/kempe | Backend.hs | module Backend ( backendTests
) where
import Control.DeepSeq (deepseq)
import qualified Kempe.Asm.Arm.ControlFlow as Arm
import Kempe.Asm.Liveness
import qualified Kempe.Asm.X86.ControlFlow as X86
import Kempe.Inline
import Kempe.Module
import ... | null | https://raw.githubusercontent.com/vmchale/kempe/aac73a386390747c0a54819d63c7438b54cdb168/test/Backend.hs | haskell | module Backend ( backendTests
) where
import Control.DeepSeq (deepseq)
import qualified Kempe.Asm.Arm.ControlFlow as Arm
import Kempe.Asm.Liveness
import qualified Kempe.Asm.X86.ControlFlow as X86
import Kempe.Inline
import Kempe.Module
import ... | |
935c7a9494d9bbb021f77a200e0981c7bfbe1451b3f8c5af450ea305d7d3e1c1 | dnaeon/cl-wol | test-core.lisp | Copyright ( c ) 2021 Nikolov < >
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
1 . Redistributions of source code must retain the above copyright
;; notice, this list of co... | null | https://raw.githubusercontent.com/dnaeon/cl-wol/8f5cb9c4aeabb726b1991379d2a47eac3f38b2b6/tests/test-core.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:
notice, this list of conditions and the following disclaimer
in this position and unchanged.
notice, this list of conditions and the fo... | Copyright ( c ) 2021 Nikolov < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES... |
c69505e05e2327a5d65045275f27b091c987652c51cfc5419a324ee2713d9943 | hkuplg/fcore | Mini.hs | {-# LANGUAGE RankNTypes #-}
module Mini where
data Type t = Int | TVar t | Fun (Type t) (Type t) | Forall (t -> Type t)
newtype CType = CType { unCType :: forall t. Type t }
konstTy = Forall (\a -> Forall (\b -> Fun (TVar a) (Fun (TVar b) (TVar a))))
t1 = let Forall f = konstTy in Forall (\a -> subst' a Int (f a))... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/frontend/Mini.hs | haskell | # LANGUAGE RankNTypes #
subst :: Type Int -> Type Int -> Type t |
module Mini where
data Type t = Int | TVar t | Fun (Type t) (Type t) | Forall (t -> Type t)
newtype CType = CType { unCType :: forall t. Type t }
konstTy = Forall (\a -> Forall (\b -> Fun (TVar a) (Fun (TVar b) (TVar a))))
t1 = let Forall f = konstTy in Forall (\a -> subst' a Int (f a))
t2 = let Forall f = konstT... |
b1199e544f7b2913dde7c3a29f7f89ec0e34c904a303ab03fbdcc67c092f0d44 | lambe-lang/nethra | proof.mli | val render :
?term_render:(Format.formatter -> 'a Nethra_lang_ast.Term.t -> unit)
-> Format.formatter
-> 'a Nethra_lang_ast.Proof.t
-> unit
| null | https://raw.githubusercontent.com/lambe-lang/nethra/7197277297ffeab769a4cc88a8bfee949def8d56/lib/nethra/lang/render/proof.mli | ocaml | val render :
?term_render:(Format.formatter -> 'a Nethra_lang_ast.Term.t -> unit)
-> Format.formatter
-> 'a Nethra_lang_ast.Proof.t
-> unit
| |
5662cdfbbdbff7e922a6356c1e196ca5ad10d493f8e1e5139549753c33d0e515 | google-research/dex-lang | JIT.hs | Copyright 2020 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
# OPTIONS_GHC -Wno - orphans #
module Dex.Foreign.JIT (
NativeFunction, ClosedExportedSignature,
ExportNativeFunction (..), ExportNativeFunctionAddr,
... | null | https://raw.githubusercontent.com/google-research/dex-lang/d2633c7cfd0e4da71d00cf5fe1b7741ff2afb8fc/src/Dex/Foreign/JIT.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
TODO: Check if atom is compatible with context! Use module name? | Copyright 2020 Google LLC
# OPTIONS_GHC -Wno - orphans #
module Dex.Foreign.JIT (
NativeFunction, ClosedExportedSignature,
ExportNativeFunction (..), ExportNativeFunctionAddr,
dexGetFunctionSignature, dexFreeFunctionSignature,
dexCompile, dexUnload
) where
import Control.Concurrent.MVar
import Control.Mo... |
10e12931bc0088caab386a879222d23f785fba7813a06aa0e53d7a4901124a68 | yetibot/yetibot | time.clj | (ns yetibot.commands.time
(:require
[yetibot.core.hooks :refer [cmd-hook]]
[clj-time.core :as time]
[clj-time.format :as f]))
(def date-time-formatter
(-> (f/formatter "yyyy-MM-dd HH:mm:ss")
(f/with-zone (time/default-time-zone))))
(defn list-timezones
"time zones # list known timezones"
[_] (v... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/time.clj | clojure | (ns yetibot.commands.time
(:require
[yetibot.core.hooks :refer [cmd-hook]]
[clj-time.core :as time]
[clj-time.format :as f]))
(def date-time-formatter
(-> (f/formatter "yyyy-MM-dd HH:mm:ss")
(f/with-zone (time/default-time-zone))))
(defn list-timezones
"time zones # list known timezones"
[_] (v... | |
dc11d33ecccda8d997aba083c64e213e5e6ba487cfeb7ece679bb05ae23a2198 | erebe/wstunnel | Socks5.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE StrictData #
module Socks5 where
import ClassyPrelude
import Data... | null | https://raw.githubusercontent.com/erebe/wstunnel/93f444c7554b05a247beb3cef3f9e9e67dbdf04e/src/Socks5.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
RESERVED
RESERVED
Reserved
RESERVED
Type | # LANGUAGE DuplicateRecordFields #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE StrictData #
module Socks5 where
import ClassyPrelude
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import quali... |
5654830a75c548af451f325cd68338682d69f916004338209ad5d259a6b6e59d | hammerlab/secotrec | aws_efs.ml | open Common
let tr_remove_new_lines = Genspio.EDSL.exec ["tr"; "-d"; "\\n"]
type guess_value = [ `From_metadata | `Value of string ] [@@deriving yojson]
type t = {
name: string [@main];
guess_subnet: guess_value [@default `From_metadata];
guess_secgroup: guess_value [@default `From_metadata];
} [@@deriving yoj... | null | https://raw.githubusercontent.com/hammerlab/secotrec/c801a43fdb0feea98da6d3636145f948aed4e7be/src/lib/aws_efs.ml | ocaml | * Function {!Common.sayl} but ith an additional prefix/prompt.
* Get the interesting contents a command returns something like
["\"129.32.23.11\"\n"].
*
Assuming you are on an EC2 instance, [curl] a piece of meta-data,
cf.
{{:-instance-metadata.html}EC2 Instance Metadata Docs}.
sayl "IP Address... | open Common
let tr_remove_new_lines = Genspio.EDSL.exec ["tr"; "-d"; "\\n"]
type guess_value = [ `From_metadata | `Value of string ] [@@deriving yojson]
type t = {
name: string [@main];
guess_subnet: guess_value [@default `From_metadata];
guess_secgroup: guess_value [@default `From_metadata];
} [@@deriving yoj... |
91cbf5606211391a08abb0519bb8465329f44dd333c332ff9dbdf9bbeb62c4ca | chef/chef-server | oc_chef_wm_named_cookbook_artifact.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
Copyright Chef Software , Inc. All Rights Reserved .
-module(oc_chef_wm_named_cookbook_artifact).
-include("oc_chef_wm.hrl").
-behaviour(chef_wm).
Webmachine resource callbacks
-mixin([{oc_... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_named_cookbook_artifact.erl | erlang | ex: ts=4 sw=4 et | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright Chef Software , Inc. All Rights Reserved .
-module(oc_chef_wm_named_cookbook_artifact).
-include("oc_chef_wm.hrl").
-behaviour(chef_wm).
Webmachine resource callbacks
-mixin([{oc_chef_wm_base, [conte... |
c98b2a632553fa6346952b93e9d73fa548c9268ebc2c5ec646279ae0212988a4 | FlowerWrong/mblog | lib_chan_cs.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/socket_dist/lib_chan_cs.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
Then Fun(Socket) is called.
Thereafter messages ... | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(lib_chan_cs).
cs stands for client_server
-export([start_raw_server/4, start_raw_client/3]).
-export([stop/1]).
-export([children/1]).
start_raw_server(Port , Fun , Max , PacketLength )
This server acc... |
8a11f818fe33d7a5dd87abd54191fe56e4c8a2b08682b1a4c8e9ad5bcc7b12c9 | eslick/cl-stdutils | stdutils.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
;;; ASD File for Think Utilities Module
(defpackage #:utils.system
(:use #:cl #:asdf))
(in-package #:utils.system)
mop hacks
# + ( or allegro cmu lispworks openmcl )
;;(pushnew :kmr-mop cl:*features*)
(defsystem ... | null | https://raw.githubusercontent.com/eslick/cl-stdutils/4a4e5a4036b815318282da5dee2a22825369137b/src/stdutils.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
ASD File for Think Utilities Module
(pushnew :kmr-mop cl:*features*)
global system macros
list related utilities, tree walking, searching, etc
iteration related utilities
anaphoric macros,
map related utilities
more iteration related utiliti... |
(defpackage #:utils.system
(:use #:cl #:asdf))
(in-package #:utils.system)
mop hacks
# + ( or allegro cmu lispworks openmcl )
(defsystem #:utils
:description "Think Utilities: A set of helpful utilities used by the Think system"
:version "1.0"
:author "Ian Eslick <>"
:licence ... |
7721883be227a26e131ed7ecb8f640905c26fa3d9e4d8bedc22ef40fe3824a50 | marick/fp-oo | klass-2.clj | Exercise 2
;; I'll mark classes invisible by tagging them with metadata.
(def invisible
(fn [class]
(assoc class :__invisible__ true)))
(def invisible?
(fn [class-symbol] (:__invisible__ (eval class-symbol))))
;; Change the already-defined metaclasses to be invisible:
(def MetaAnything (invisib... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/klass-2.clj | clojure | I'll mark classes invisible by tagging them with metadata.
Change the already-defined metaclasses to be invisible:
Ancestors just removes invisible classes from the
reversed lineage.
New metaclasses need to be created to be invisible.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Class
Test data:
... | Exercise 2
(def invisible
(fn [class]
(assoc class :__invisible__ true)))
(def invisible?
(fn [class-symbol] (:__invisible__ (eval class-symbol))))
(def MetaAnything (invisible MetaAnything))
(def MetaKlass (invisible MetaKlass))
(def MetaPoint (invisible MetaPoint))
(def Klass
(assoc-in... |
d8b33b1d11175b54a29d1f597fa94d007d2738df3bfe7033e016b0bb0c2da68a | lpgauth/marina | marina_profile.erl | -module(marina_profile).
-include("test.hrl").
-export([
fprofx/0
]).
-define(N, 1000).
-define(P, 20).
%% public
-spec fprofx() -> ok.
fprofx() ->
Filenames = filelib:wildcard("_build/default/lib/*/ebin/*.beam"),
Rootnames = [filename:rootname(Filename, ".beam") ||
Filename <- Filenames],
l... | null | https://raw.githubusercontent.com/lpgauth/marina/2d775c003f58d125bb38e7c953c30c36aebc72c6/test/marina_profile.erl | erlang | public
private | -module(marina_profile).
-include("test.hrl").
-export([
fprofx/0
]).
-define(N, 1000).
-define(P, 20).
-spec fprofx() -> ok.
fprofx() ->
Filenames = filelib:wildcard("_build/default/lib/*/ebin/*.beam"),
Rootnames = [filename:rootname(Filename, ".beam") ||
Filename <- Filenames],
lists:forea... |
993c721f20319d6e6bf8b35e76aedbd5e64671169b0814e2dd353a9d6ff2ae70 | expipiplus1/vulkan | VK_NV_copy_memory_indirect.hs | {-# language CPP #-}
-- | = Name
--
-- VK_NV_copy_memory_indirect - device extension
--
= = VK_NV_copy_memory_indirect
--
-- [__Name String__]
-- @VK_NV_copy_memory_indirect@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
427
--
-- [__Revision__]
1
--
-- [__... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Extensions/VK_NV_copy_memory_indirect.hs | haskell | # language CPP #
| = Name
VK_NV_copy_memory_indirect - device extension
[__Name String__]
@VK_NV_copy_memory_indirect@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR_get_physical_device_p... | = = VK_NV_copy_memory_indirect
427
1
- Requires support for Vulkan 1.0
- Kushwaha
< -Docs/issues/new?body=[VK_NV_copy_memory_indirect ] @vkushwaha - nv%0A*Here describe the issue or question you have about the VK_NV_copy_memory_indirect extension * >
2022 - 10 - 14
... |
1089c49444d8bb4c7295e4007bfa8764601d0349f8e6bd202ae48a1071259026 | jscrane/jvml | kmeans.clj | (ns ml.kmeans
(:use (ml util)
(incanter core stats)))
(defn find-closest-centroid [centroids point]
(indexes-of? < (map #(sum-of-squares (minus point %)) centroids)))
(defn find-closest-centroids [centroids X]
(map (partial find-closest-centroid centroids) (to-list X)))
(defn- update-sums [[sums counts... | null | https://raw.githubusercontent.com/jscrane/jvml/844eb267150564a3a0f882edbbd505ce94924c8f/src/main/clojure/ml/kmeans.clj | clojure | note this doall: otherwise the stack blows when the reduction is realised! | (ns ml.kmeans
(:use (ml util)
(incanter core stats)))
(defn find-closest-centroid [centroids point]
(indexes-of? < (map #(sum-of-squares (minus point %)) centroids)))
(defn find-closest-centroids [centroids X]
(map (partial find-closest-centroid centroids) (to-list X)))
(defn- update-sums [[sums counts... |
b8c159036ab68ae0c8c8d4dfdedb42dab00448cbbf0b88c20bd2ed17976735a1 | garrigue/labltk | frx_listbox.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/frx/frx_listbox.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
4084eb79bb686795d617a9777fb8b8ba1e2222fd4d29a758bd7e356e3f42cf59 | racket/gui | include-bitmap.rkt | #lang racket/base
(require racket/gui/base
racket/class
racket/file
setup/main-collects)
(require (for-syntax racket/base
syntax/path-spec
compiler/cm-accomplice
setup/main-collects))
(provide include-bitmap
include-bitm... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mrlib/include-bitmap.rkt | racket | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Run-time support | #lang racket/base
(require racket/gui/base
racket/class
racket/file
setup/main-collects)
(require (for-syntax racket/base
syntax/path-spec
compiler/cm-accomplice
setup/main-collects))
(provide include-bitmap
include-bitm... |
eac7507eefaa8d84895b8beef5451e6ec5b89d77c3aa18900838439bda33a71d | JacquesCarette/Drasil | Print.hs | -- | Defines functions to help debug examples. Generated files appear in ./code/debug.
module Language.Drasil.Log.Print where
import Language.Drasil hiding (symbol)
import Language.Drasil.Development (showUID)
import qualified Language.Drasil as L (symbol)
import Database.Drasil
import Utils.Drasil (stringList)
impor... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/92dddf7a545ba5029f99ad5c5eddcd8dad56a2d8/code/drasil-printers/lib/Language/Drasil/Log/Print.hs | haskell | | Defines functions to help debug examples. Generated files appear in ./code/debug.
* Main Function
| Gathers all printing functions and creates the debugging tables from them.
* Helpers
** Separators
| Debugging table separator.
| Header for debugging tables.
** Table Generators
| General function to make the... | module Language.Drasil.Log.Print where
import Language.Drasil hiding (symbol)
import Language.Drasil.Development (showUID)
import qualified Language.Drasil as L (symbol)
import Database.Drasil
import Utils.Drasil (stringList)
import qualified Data.Map as Map
import Control.Lens ((^.), view)
import Data.List (nub, sor... |
acf29763641b71fc30bee79afc91244be5ac43457f8a48353f028f25dfb4fe19 | exoscale/interceptor | impl.cljc | (ns ^:no-doc exoscale.interceptor.impl
"Core implementation"
(:require [exoscale.interceptor.protocols :as p]))
(defrecord Interceptor [enter leave error])
(extend-protocol p/Interceptor
#?(:clj clojure.lang.IPersistentMap
:cljs cljs.core.PersistentHashMap)
(interceptor [m] (map->Interceptor m))
Inter... | null | https://raw.githubusercontent.com/exoscale/interceptor/c6b5b82d5624711972cd332a766351d5d410c9ae/src/exoscale/interceptor/impl.cljc | clojure | records) | (ns ^:no-doc exoscale.interceptor.impl
"Core implementation"
(:require [exoscale.interceptor.protocols :as p]))
(defrecord Interceptor [enter leave error])
(extend-protocol p/Interceptor
#?(:clj clojure.lang.IPersistentMap
:cljs cljs.core.PersistentHashMap)
(interceptor [m] (map->Interceptor m))
Inter... |
c389fad09201f77452fb9a125c51f3e886c8dbbf0957c0ab35ce0049c171c551 | AdRoll/rebar3_format | simple_task.erl | -module(simple_task).
-vsn(1.0).
-author("test author").
-export([
stop/1,
start/1
]).
-behaviour(task).
stop(_Name) ->
ok.
start(Spec)->task:name(Spec).
| null | https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/src/otp_samples/simple_task.erl | erlang | -module(simple_task).
-vsn(1.0).
-author("test author").
-export([
stop/1,
start/1
]).
-behaviour(task).
stop(_Name) ->
ok.
start(Spec)->task:name(Spec).
| |
57a21776e2d80bb94e649dbcf073917d2194d98105a07b0823b35958897fb3ca | xmonad/xmonad-contrib | DynamicProperty.hs | -- |
Module : XMonad . Hooks .
-- Description : Apply a ManageHook to an already-mapped window.
Copyright : ( c ) , 2015
-- License : BSD3-style (see LICENSE)
-- Maintainer :
--
module XMonad.Hooks.DynamicProperty {-# DEPRECATED "Use \"XMonad.Hooks.OnPropertyChange\" instead." #-}
... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/c27a1f07915ac933f1feee301b47ae77cd55d8a6/XMonad/Hooks/DynamicProperty.hs | haskell | |
Description : Apply a ManageHook to an already-mapped window.
License : BSD3-style (see LICENSE)
Maintainer :
# DEPRECATED "Use \"XMonad.Hooks.OnPropertyChange\" instead." #
| 'dynamicPropertyChange' = 'onXPropertyChange' | Module : XMonad . Hooks .
Copyright : ( c ) , 2015
( module XMonad.Hooks.OnPropertyChange
, dynamicPropertyChange
, dynamicTitle
) where
import XMonad
imp... |
40e31db4f79bcee3d6d671dadec223a9b68854e720a0aa563a7e306be9374c4c | ocaml-multicore/tezos | mockup.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs < >
Copyright ( c ) 2022 ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/tests/mockup.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs < >
Copyright ( c ) 2022 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRAN... |
07a97b4b4553121e28c6ee2345fcae3e239fc9a2efc5d37a32e99b48b76e87a6 | rads/up-clojure | server.clj | (ns up-clojure.server
(:require [ring.adapter.jetty :as jetty])
(:gen-class))
(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body "Hello World"})
(defn -main [& args]
(let [port (or (some-> (System/getenv "PORT") Integer/parseInt)
3000)]
(jetty/run-jetty... | null | https://raw.githubusercontent.com/rads/up-clojure/b533597371d57f2bfb640cd5f9da5d67ecfa0f26/src/up_clojure/server.clj | clojure | (ns up-clojure.server
(:require [ring.adapter.jetty :as jetty])
(:gen-class))
(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body "Hello World"})
(defn -main [& args]
(let [port (or (some-> (System/getenv "PORT") Integer/parseInt)
3000)]
(jetty/run-jetty... | |
e1c80930f66e69584c9bd677ac487619b3676600fd9f4dd6218bfd84d3d00a15 | GlideAngle/flare-timing | Tag.hs | module Flight.Lookup.Tag
( TaskTimeLookup(..)
, TaskLeadingLookup(..)
, ArrivalRankLookup(..)
, TimeLookup(..)
, LeadingLookup(..)
, TagLookup(..)
, TickLookup(..)
, tagTaskTime
, tagTaskLeading
, tagArrivalRank
, tagPilotTime
, tagPilotTag
, tagTicked
) where
im... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/172a9b199eb1ff72c967669dc349cbf8d9c4bc52/lang-haskell/lookup/library/Flight/Lookup/Tag.hs | haskell | module Flight.Lookup.Tag
( TaskTimeLookup(..)
, TaskLeadingLookup(..)
, ArrivalRankLookup(..)
, TimeLookup(..)
, LeadingLookup(..)
, TagLookup(..)
, TickLookup(..)
, tagTaskTime
, tagTaskLeading
, tagArrivalRank
, tagPilotTime
, tagPilotTag
, tagTicked
) where
im... | |
990c2e24f21bac6a082d6cc61d76dd36291e9e284cc1d7b01f906fb6775eb250 | basho/riak_cs | riak_cs_list_objects_utils.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_list_objects_utils.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
96968c2bbc0b6cfb0cacb06a9c750ec9863e34496d809ca5a09c99f48740f41e | wilkerlucio/pathom | planner_readers_test.cljc | (ns com.wsscode.pathom.connect.planner-readers-test
(:require
[clojure.core.async :as async :refer [go]]
[clojure.test :refer [deftest is are run-tests testing]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.connect.foreign :as pcf]
[com.wsscode.pathom.core :as p]
[com.wsscode.pathom... | null | https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/test/com/wsscode/pathom/connect/planner_readers_test.cljc | clojure | just to make linter happy | (ns com.wsscode.pathom.connect.planner-readers-test
(:require
[clojure.core.async :as async :refer [go]]
[clojure.test :refer [deftest is are run-tests testing]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.connect.foreign :as pcf]
[com.wsscode.pathom.core :as p]
[com.wsscode.pathom... |
094543fa7e9d96cb29c8573a9031539a932ba562ccce8f53e9b33f012acd1fc0 | leonidas/lambda-webdev | Connection.hs | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Network.WebSockets.Messaging.Connection where
import Network.WebSockets hiding (send, Request, Message)
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
import Contro... | null | https://raw.githubusercontent.com/leonidas/lambda-webdev/0213745e6d2cd071007a158b1dc7a83f238bdc00/lib/Network/WebSockets/Messaging/Connection.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns #
sinkJson sink js = sendSink sink . DataMessage . Text . encode $ (trace (show js) js)
TODO: print/log error? | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Network.WebSockets.Messaging.Connection where
import Network.WebSockets hiding (send, Request, Message)
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
import Control.Applicative
import Control.Monad (guard, forever, void, (>=>), ... |
6280092095aa725df37556792d72712f031a4494ee19f0597df1534d9e4ca394 | privet-kitty/cl-competitive | smawk.lisp | (defpackage :cp/smawk
(:use :cl)
(:export #:smawk))
(in-package :cp/smawk)
(declaim (inline smawk))
(defun smawk (function x1 y1 x2 y2 &key (order #'<))
(declare (fixnum x1 y1 x2 y2))
(assert (and (<= x1 x2) (<= y1 y2)))
(let* ((rowlen (- x2 x1))
(collen (- y2 y1))
(res (make-array rowlen :... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/2c4d4e82af2a1672eef334a0a229c67d4fb37188/module/smawk.lisp | lisp | (defpackage :cp/smawk
(:use :cl)
(:export #:smawk))
(in-package :cp/smawk)
(declaim (inline smawk))
(defun smawk (function x1 y1 x2 y2 &key (order #'<))
(declare (fixnum x1 y1 x2 y2))
(assert (and (<= x1 x2) (<= y1 y2)))
(let* ((rowlen (- x2 x1))
(collen (- y2 y1))
(res (make-array rowlen :... | |
fa1a54335b247e0590016a74ed11071bd35c58cd38e6556c4b08f6ebd9008707 | jyh/metaprl | sil_state_type.ml |
* Type judgments for the state .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlma... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/sil/sil_state_type.ml | ocaml | ***********************************************************************
* SYNTAX *
***********************************************************************
* Type definitions.
***********************************************************************
* DI... |
* Type judgments for the state .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlma... |
feb381d8ca3e5a2c0988394a209b290518a9d3aebfc0a20d9c9a156c4fbd51b8 | RutledgePaulV/ring-firewall-middleware | core_test.clj | (ns ring-firewall-middleware.core-test
(:require [clojure.test :refer :all]
[ring-firewall-middleware.core :refer :all]))
(deftest wrap-allow-ips-test
(let [handler (fn [req] {:status 200 :body "You have access!"})
protected (wrap-allow-ips handler {:allow-list ["10.0.0.0/8"]})]
(testing... | null | https://raw.githubusercontent.com/RutledgePaulV/ring-firewall-middleware/bdd85a41ef3350d9e2bfda2d5f814177b0e7c9b1/test/ring_firewall_middleware/core_test.clj | clojure | (ns ring-firewall-middleware.core-test
(:require [clojure.test :refer :all]
[ring-firewall-middleware.core :refer :all]))
(deftest wrap-allow-ips-test
(let [handler (fn [req] {:status 200 :body "You have access!"})
protected (wrap-allow-ips handler {:allow-list ["10.0.0.0/8"]})]
(testing... | |
2c7c2f0ce6c2f3fd48569f384b7731d4efd4c5a560121185d90deb6924705ff7 | NorfairKing/cursor | PromoteSpec.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Cursor.Simple.Tree.PromoteSpec
( spec,
)
where
import Cursor.Simple.Tree hiding (TreeCursor)
import Cursor.Simple.Tree.Gen ()
import Cursor.Simple.Tree.TestUtils
import Cursor.Tree
... | null | https://raw.githubusercontent.com/NorfairKing/cursor/ff27e78281430c298a25a7805c9c61ca1e69f4c5/cursor-gen/test/Cursor/Simple/Tree/PromoteSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Cursor.Simple.Tree.PromoteSpec
( spec,
)
where
import Cursor.Simple.Tree hiding (TreeCursor)
import Cursor.Simple.Tree.Gen ()
import Cursor.Simple.Tree.TestUtils
import Cursor.Tree
( TreeCursor (..),
closedForest,
emptyCForest,
op... |
cd35691c5873e29b41bfd28761b0274fb745aa12256533feb359793ec83ce994 | art-w/sherlodoc | www.ml | module Storage = Db.Storage
module Succ = Query.Succ
module Sort = Query.Sort
let db_filename = Sys.argv.(1)
let shards =
let h = Storage.db_open_in db_filename in
Array.to_list h.Storage.shards
let search (has_typ, query_name, query_typ) =
let open Lwt.Syntax in
let* results_name = Query.find_names ~shards ... | null | https://raw.githubusercontent.com/art-w/sherlodoc/e560cd7448ec61723afda5f2e5d94cb52635fd0c/www/www.ml | ocaml | module Storage = Db.Storage
module Succ = Query.Succ
module Sort = Query.Sort
let db_filename = Sys.argv.(1)
let shards =
let h = Storage.db_open_in db_filename in
Array.to_list h.Storage.shards
let search (has_typ, query_name, query_typ) =
let open Lwt.Syntax in
let* results_name = Query.find_names ~shards ... | |
689466f94f15176f3be1e7fbfb762fbdb62fe59932227757de426165d5bc6b54 | clash-lang/clash-compiler | TestIndex.hs | module TestIndex where
import Clash.Prelude
type NrI = Index 8
topEntity = c1
c1 :: Signal System (Maybe NrI) -> Signal System (Maybe NrI)
c1 = fmap (fmap (+1))
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Basic/TestIndex.hs | haskell | module TestIndex where
import Clash.Prelude
type NrI = Index 8
topEntity = c1
c1 :: Signal System (Maybe NrI) -> Signal System (Maybe NrI)
c1 = fmap (fmap (+1))
| |
7f2a80f5728981db4e95411425fa7e4c9954bde840ab97d8464107cd8fd627e8 | orionsbelt-battlegrounds/obb-rules | attack.cljc | (ns obb-rules.actions.attack
(:require [obb-rules.actions.direction :as dir]
[obb-rules.element :as element]
[obb-rules.game :as game]
[obb-rules.actions.hooks :as hooks]
[obb-rules.simplifier :as simplify]
[obb-rules.actions.damage-calculator :as calculator... | null | https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/src/obb_rules/actions/attack.cljc | clojure | (ns obb-rules.actions.attack
(:require [obb-rules.actions.direction :as dir]
[obb-rules.element :as element]
[obb-rules.game :as game]
[obb-rules.actions.hooks :as hooks]
[obb-rules.simplifier :as simplify]
[obb-rules.actions.damage-calculator :as calculator... | |
eacc548c70a09ff508b3927e5b743d071041321315ef8f6ec7ca995dffa84103 | static-analysis-engineering/codehawk | xSumTypeSerializer.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Analyzer Infrastructure Utilities
Author : ------------------------------------------------------------------------------
The MIT License... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/45f39248b404eeab91ae225243d79ec0583c3331/CodeHawk/CH/xprlib/xSumTypeSerializer.ml | ocaml | * Serialization of sum types
chutil
xprlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Analyzer Infrastructure Utilities
Author : ------------------------------------------------------------------------------
The MIT License... |
eb4ab49ec58eb2169d287a77ec370cb07e4d8d06c119ae7c20baa2aa892f761e | mariari/Misc-ML-Scripts | NameSymb.hs | module NameSymb where
--------------------------------------------------------------------------------
import Mari.Library
import qualified Mari.Library.NameSymbol as NameSymbol
import qualified Test.Tasty as T
import qualified Test.Tasty.HUnit as T
import qualified Test.Tasty.QuickCheck as T
-----------------------... | null | https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/376a7d55b565bf9205e697c5c3b78e1d6b6aedcd/Haskell/StandardLibrary/test/NameSymb.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Top Level Test
-------------------------------------------------------------------... | module NameSymb where
import Mari.Library
import qualified Mari.Library.NameSymbol as NameSymbol
import qualified Test.Tasty as T
import qualified Test.Tasty.HUnit as T
import qualified Test.Tasty.QuickCheck as T
top :: T.TestTree
top =
T.testGroup
"NameSymbol tests:"
[idIsId, infixSymbolCase]
idL :: S... |
a95cb861d01cc5f0b24c5b4d993635797b1154b1a2c7660e6b667b1c7a7cdcf6 | erlang/otp | fix.erl | -module(fix).
-export([m/0]).
-spec m() -> integer().
-ifdef(error).
m() -> 3.14.
-else.
m() -> 3.
-endif.
| null | https://raw.githubusercontent.com/erlang/otp/1633a01279ec782273e8c100280a5d3f10ac36a8/lib/dialyzer/test/incremental_SUITE_data/fix.erl | erlang | -module(fix).
-export([m/0]).
-spec m() -> integer().
-ifdef(error).
m() -> 3.14.
-else.
m() -> 3.
-endif.
| |
3da8f94408aafdd730dc1f3b05e61f1c5bbe53846322472fea9bcfdfb592d45e | links-lang/links | phrase_typesugar.mli | type 'a error = { msg : string; data : 'a }
val tc_columns :
columns:Column.t list ->
'a Phrase_sugar.phrase ->
(Phrase_type.t, 'a error) result
| null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/phrase_typesugar.mli | ocaml | type 'a error = { msg : string; data : 'a }
val tc_columns :
columns:Column.t list ->
'a Phrase_sugar.phrase ->
(Phrase_type.t, 'a error) result
| |
b797c127f0cbc5c85545821c5605b43166bd5be420d85166894177413958418b | rtoy/ansi-cl-tests | nsubstitute-if-not.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Aug 31 19:00:55 2002
;;;; Contains: Tests for NSUBSTITUTE-IF-NOT
(in-package :cl-test)
(deftest nsubstitute-if-not-list.1
(nsubstitute-if-not 'b 'identity nil)
nil)
(deftest nsubstitute-if-not-list.2
(let ((x (copy-seq '(a b a c)))) (nsubstitute-if-not ... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/nsubstitute-if-not.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for NSUBSTITUTE-IF-NOT
Tests on vectors
Tests on strings
Tests on bit-vectors
More tests
Keyword tests
Error cases | Author :
Created : Sat Aug 31 19:00:55 2002
(in-package :cl-test)
(deftest nsubstitute-if-not-list.1
(nsubstitute-if-not 'b 'identity nil)
nil)
(deftest nsubstitute-if-not-list.2
(let ((x (copy-seq '(a b a c)))) (nsubstitute-if-not 'b (is-not-eql-p 'a) x) x)
(b b b c))
(deftest nsubstitute-if-not... |
252ca749a06d3f257faa1b743bda10f490da7050cda1b53af7803ffbfa24273f | c4-project/c4f | reify_stm.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus_c/src/reify_stm.ml | ocaml | This might need revisiting later.
Yay, value restriction... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
4dfbcf8fd407447ba1012c10abc80fc1c1953b8f5657ddedec0ab18b871e9a18 | nuvla/api-server | configuration_template_session_mitreid.cljc | (ns sixsq.nuvla.server.resources.spec.configuration-template-session-mitreid
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.configuration-template :as ps]
[sixsq.nuvla.server.resources.spec.core :as cimi-core]
[sixsq.nuvla.server.util.spec :as su]
[spec-tools.core :as st])... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/spec/configuration_template_session_mitreid.cljc | clojure | allows jwk JSON representation | (ns sixsq.nuvla.server.resources.spec.configuration-template-session-mitreid
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.configuration-template :as ps]
[sixsq.nuvla.server.resources.spec.core :as cimi-core]
[sixsq.nuvla.server.util.spec :as su]
[spec-tools.core :as st])... |
118b376469a7957b6dab17a13b11cac101a7b831621072ae51220ae3e5def65e | change-metrics/monocle | Lentille.hs | {-# LANGUAGE DeriveAnyClass #-}
| A shared library between lentilles and macroscope
module Lentille (
-- * The lentille context
CrawlerEnv (..),
LentilleStream,
unlessStopped,
-- * Lentille Errors
LentilleError (..),
RequestLog (..),
GraphQLError (..),
-- * Facilities
getChangeId,
isMerged,
... | null | https://raw.githubusercontent.com/change-metrics/monocle/a746679b01814ded5737a2584cd19cad574e0581/src/Lentille.hs | haskell | # LANGUAGE DeriveAnyClass #
* The lentille context
* Lentille Errors
* Facilities
* Re-export
-----------------------------------------------------------------------------
The Lentille context
| unlessStopped skips the action when the config is changed
TODO: replace IORef with Concurrent TVar
TODO: keep the ori... |
| A shared library between lentilles and macroscope
module Lentille (
CrawlerEnv (..),
LentilleStream,
unlessStopped,
LentilleError (..),
RequestLog (..),
GraphQLError (..),
getChangeId,
isMerged,
isClosed,
nobody,
toIdent,
ghostIdent,
sanitizeID,
isChangeTooOld,
swapDuration,
modu... |
923901f29adbc858d42d5acc195f4828d10ecf5e7a4ebd127e76beb756be3fc9 | phylogeography/spread | svg_renderer.cljs | (ns analysis-viewer.svg-renderer
"
Render svg hiccup structure from geo-json maps.
Api :
- geojson->svg
"
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]
[shared.geojson :as geojson]
[shared.math-utils :as math-utils]))
(def ^:dynamic *coord-transform-fn* i... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/analysis_viewer/svg_renderer.cljs | clojure | (s/fdef geojson->svg
:opts ::opts)
:ret ::svg)
:font-size (str (:text-size opts) "px")
this is in [long lat] | (ns analysis-viewer.svg-renderer
"
Render svg hiccup structure from geo-json maps.
Api :
- geojson->svg
"
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]
[shared.geojson :as geojson]
[shared.math-utils :as math-utils]))
(def ^:dynamic *coord-transform-fn* i... |
766ddad48f6a4f4e85a2b31b0e34913c9be150792f21a073558e097556472691 | Zilliqa/scilla | discover.ml | open List
module C = Configurator.V1
let () =
C.main ~name:"foo" (fun c ->
let default : C.Pkg_config.package_conf = { libs = []; cflags = [] } in
let conf =
match C.Pkg_config.get c with
| None -> default
| Some pc -> (
match C.Pkg_config.query pc ~package:"openssl" w... | null | https://raw.githubusercontent.com/Zilliqa/scilla/0f5ba940511f16f08197d509b121d724defe21c1/src/base/cpp/config/discover.ml | ocaml | macOS requires -keep_dwarf_unwind for exceptions to work. | open List
module C = Configurator.V1
let () =
C.main ~name:"foo" (fun c ->
let default : C.Pkg_config.package_conf = { libs = []; cflags = [] } in
let conf =
match C.Pkg_config.get c with
| None -> default
| Some pc -> (
match C.Pkg_config.query pc ~package:"openssl" w... |
ba00f19948df42bc6f5fb4f8378b340df292e606b32fbd125bd16fddf7a27922 | ocsigen/js_of_ocaml | print_seq.ml | (* TEST
include testing
*)
(*
A test file for the Format module.
*)
open Testing;;
open Format;;
let say s = Printf.printf s;;
let pp_print_intseq = pp_print_seq ~pp_sep:(fun fmt () -> pp_print_char fmt ' ') pp_print_int;;
try
say "empty\n%!";
test (asprintf "%a%!" pp_print_intseq Seq.empty = "");
say... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/31c8a3d9d4e34f3fd573dd5056e733233ca4f4f6/compiler/tests-ocaml/lib-format/print_seq.ml | ocaml | TEST
include testing
A test file for the Format module.
|
open Testing;;
open Format;;
let say s = Printf.printf s;;
let pp_print_intseq = pp_print_seq ~pp_sep:(fun fmt () -> pp_print_char fmt ' ') pp_print_int;;
try
say "empty\n%!";
test (asprintf "%a%!" pp_print_intseq Seq.empty = "");
say "\nmisc\n%!";
test (asprintf "%a" pp_print_intseq (List.to_seq [0]) = ... |
dce936d0e0c2bad7aad576edfa1ca2956b3cbe827956982b4b62a83fd85ac116 | ropas/sparrow | itv.ml | (***********************************************************************)
(* *)
Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
(* All rights reserved... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/domain/itv.ml | ocaml | *********************************************************************
All rights reserved.
See the LICENSE file for details. ... | Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
This software is distributed under the term of the BSD license .
open Vocab
let threshold = BatSet.of_list [0;1;16;64]
module Integer =
struct
type t = Int ... |
776c96379a87741a537bf9d013af40dcad9f6be8f57ceebca5317033ab683337 | input-output-hk/cardano-rest | test.hs |
main :: IO ()
main = putStrLn "cardano-tx-submit test"
| null | https://raw.githubusercontent.com/input-output-hk/cardano-rest/040b123b45af06060aae04479d92fada68820f12/submit-api/test/test.hs | haskell |
main :: IO ()
main = putStrLn "cardano-tx-submit test"
| |
e9c1ea0b0a6b9c3783f986ce678cf72e1ee13685d5b043f4d7033d10877be661 | GU-CLASP/TypedFlow | Types.hs | # LANGUAGE QuantifiedConstraints #
# LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 806
# LANGUAGE NoStarIsType #
#endif
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContex... | null | https://raw.githubusercontent.com/GU-CLASP/TypedFlow/875bf1b26474e38ca99e25055990466d36af6377/TypedFlow/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE TypeInType #
type i <= j = (i <=? j) ~ 'True
From:
All2 c '[] '[] = ()
All2 c '[] (y ': ys) = 'True ~ 'False
All2 c (y ': ys) '[] = 'True ~ 'False
| Flip at type ... | # LANGUAGE QuantifiedConstraints #
# LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 806
# LANGUAGE NoStarIsType #
#endif
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDer... |
9e05789ff2a10263513b138b5f4e89906f0fc2409443e2a84f61dab5641cb93d | paurkedal/ocaml-bitpath | pkg.ml | #! /usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let licenses = List.map Pkg.std_file ["COPYING.LESSER"; "COPYING"]
let () = Pkg.describe ~licenses "bitpath" @@ fun c ->
Ok [
Pkg.mllib "lib/bitpath.mllib";
Pkg.clib "lib/libbitpath_stubs.clib";
Pkg.lib "lib/bitpath_prereq.h";
Pkg.lib ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-bitpath/28ffff6fc0d211faa8776dfa12de82a34acfa847/pkg/pkg.ml | ocaml | #! /usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let licenses = List.map Pkg.std_file ["COPYING.LESSER"; "COPYING"]
let () = Pkg.describe ~licenses "bitpath" @@ fun c ->
Ok [
Pkg.mllib "lib/bitpath.mllib";
Pkg.clib "lib/libbitpath_stubs.clib";
Pkg.lib "lib/bitpath_prereq.h";
Pkg.lib ... | |
3841c5a233b03086d0b8c8706ef13cc02aa37257b9feeea2ea9f5d38c82d0567 | MaxwellBo/scratches | handler.hs | import System.Environment
import System.IO
import System.IO.Error
main = toTry `catch` handler
toTry :: IO ()
toTry = do (fileName:_) <- getArgs
contents <- readFile fileName
putStrLn $ "The file has " ++ show (length (lines contents)) ++ " lines!"
h... | null | https://raw.githubusercontent.com/MaxwellBo/scratches/3ba8f44eaa40b86d4dc1c2514b10b910fbd38f5a/handler.hs | haskell | import System.Environment
import System.IO
import System.IO.Error
main = toTry `catch` handler
toTry :: IO ()
toTry = do (fileName:_) <- getArgs
contents <- readFile fileName
putStrLn $ "The file has " ++ show (length (lines contents)) ++ " lines!"
h... | |
7c1475115465fff9d1c0ef80c9215bc0b9d471a52fb9574573b7a371cb052a14 | Netflix/PigPen | join.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/main/clojure/pigpen/join.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.join
"Commands to join and group data.
Note: Most of these are present in pigpen.core. Normally you should use those instead.
"
(:refer-clojure :exclude [group-by into reduce])
(:requi... |
819c202439d81c5da1f292c67345121f03925046b41fee8da94099e760f31a27 | racket/htdp | img-err.rkt | #lang racket/base
(provide define/chk
x-place?
y-place?
mode?
angle?
side-count?
image-color?
pen-style?
pen-cap?
pen-join?
real-valued-posn?
step-count?
check-mode/color-combination)
(require htdp/error
... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/2htdp/private/img-err.rkt | racket |
... | #lang racket/base
(provide define/chk
x-place?
y-place?
mode?
angle?
side-count?
image-color?
pen-style?
pen-cap?
pen-join?
real-valued-posn?
step-count?
check-mode/color-combination)
(require htdp/error
... |
7caac23f33c313a2663dae89d5a77a9adf7cf5efd6cddaae204f5afe36a8968f | jmingtan/clonings | require2.clj | ;; require2.clj
;; Make the code compile! No hints, you can do it :)
(ns namespaces.require2)
;; Another feature of `require` is aliasing, so we don't have to type the
;; fully-qualified name of the library every time
(require '[clojure.test :as t])
(t/deftest example-test
(t/is (= (+ 1 1) 2)))
;; Fix the followi... | null | https://raw.githubusercontent.com/jmingtan/clonings/ca64b031ab26a1924bed91f5c9c98b6dd69fc129/exercises/namespaces/require2.clj | clojure | require2.clj
Make the code compile! No hints, you can do it :)
Another feature of `require` is aliasing, so we don't have to type the
fully-qualified name of the library every time
Fix the following code! |
(ns namespaces.require2)
(require '[clojure.test :as t])
(t/deftest example-test
(t/is (= (+ 1 1) 2)))
(require '[clojure.test :as t])
(require '[clojure.string :as ???])
(deftest my-test
(testing "should return the joined strings"
(is (= (abcdef/join " " ["hey" "nonny" "nonny"])
"hey nonny non... |
106acebe34a78b52ddf1531655e0ba996f2095efe58bd2737262d69b8e998ada | reanimate/reanimate | Balloon.hs | {-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
|
Copyright : Written by
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : Written by David Himmelstrup
License : Unlicense
Maintainer :
Stability : experimental
Portabilit... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/Math/Balloon.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
import Debug.Trace
| Inflate SVG shapes like a balloon. This works by hiding corners
that are more than @t@ percent distant from the starting point
relative to the maximum diameter of the shape.
Example:
@
@
<<docs/gifs/doc_ballo... | |
Copyright : Written by
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : Written by David Himmelstrup
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Reanimate.Math.Balloon
( balloon
, balloon'
... |
3b3c3dc63e6072037f5d39c6d5bc27c707a8ee89a4146e763265038ebbbdc56d | hpdeifel/hledger-iadd | CommentDialog.hs | {-# LANGUAGE OverloadedStrings #-}
module Brick.Widgets.CommentDialog
( CommentWidget
, commentWidget
, renderCommentWidget
, commentDialogComment
, CommentAction(..)
, handleCommentEvent
) where
import Data.Semigroup ((<>))
import Brick
import Brick.Widgets.Dialog
import ... | null | https://raw.githubusercontent.com/hpdeifel/hledger-iadd/782239929d411bce4714e65dd5c7bb97b2ba4e75/src/Brick/Widgets/CommentDialog.hs | haskell | # LANGUAGE OverloadedStrings # |
module Brick.Widgets.CommentDialog
( CommentWidget
, commentWidget
, renderCommentWidget
, commentDialogComment
, CommentAction(..)
, handleCommentEvent
) where
import Data.Semigroup ((<>))
import Brick
import Brick.Widgets.Dialog
import Brick.Widgets.Center
impo... |
781c799a9c2be522206212c43463b58eda4ea68cf4357e1547ed07e37c34e281 | avsm/mirage-duniverse | static_ipv4.mli |
* Copyright ( c ) 2010 < >
*
* 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/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/src/ipv4/static_ipv4.mli | ocaml |
* Copyright ( c ) 2010 < >
*
* 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... | |
b59453d44a11d1c54a2d47767bebf5ece25bf9709b5d9c0cf0f1c6e0ec70e59e | blindglobe/clocc | section22.lisp | section 22 : printer -*- mode : lisp -*-
(in-package :cl-user)
from : < >
(check-for-bug :section22-legacy-6
(format nil "~V,,,'-A" 10 "abc")
"abc-------")
0123456789
(check-for-bug :section22-legacy-11
(format nil "foo")
"foo")
(check-for-bug :section22-legacy-15
(setq x 5)
5)
(check-for-bug ... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/tools/ansi-test/section22.lisp | lisp | section 22 : printer -*- mode : lisp -*-
(in-package :cl-user)
from : < >
(check-for-bug :section22-legacy-6
(format nil "~V,,,'-A" 10 "abc")
"abc-------")
0123456789
(check-for-bug :section22-legacy-11
(format nil "foo")
"foo")
(check-for-bug :section22-legacy-15
(setq x 5)
5)
(check-for-bug ... | |
f7ab55f00b224f02fbf7c794da9127f67434353ac090d5c719db0c952c5c1313 | libre-man/cl-transmission | util.lisp | (in-package :cl-user)
(uiop:define-package cl-transmission.util
(:use :cl :rutils.readtable)
(:import-from :alexandria
#:define-constant))
(in-package :cl-transmission.util)
(named-readtables:in-readtable rutils.readtable:rutils-readtable)
(defmacro define-export-macro (type)
(let* ((name (in... | null | https://raw.githubusercontent.com/libre-man/cl-transmission/4bbf1d2761bfa5dfa79b7bc12c3238089b994d95/src/util.lisp | lisp | (in-package :cl-user)
(uiop:define-package cl-transmission.util
(:use :cl :rutils.readtable)
(:import-from :alexandria
#:define-constant))
(in-package :cl-transmission.util)
(named-readtables:in-readtable rutils.readtable:rutils-readtable)
(defmacro define-export-macro (type)
(let* ((name (in... | |
eb64b25fd8d3afee2917738a14ae99c1c71b3d8bc6bbc38efd8a304662b6e9ad | opqdonut/haskell-exercises | W4Test.hs | module W4Test where
import W4
import Impl.Test
import Control.Monad
import Data.List
import Data.IORef
import System.IO
import System.Directory
import Test.QuickCheck hiding (Result,reason,(===))
import Test.QuickCheck.Monadic
main = testExsArgs tests stdArgs {maxSize = 40, maxSuccess = 40}
tests = [[ex1_hello]
... | null | https://raw.githubusercontent.com/opqdonut/haskell-exercises/87be496ccb0125a52386e979c2502fe9695c6498/W4Test.hs | haskell | -- -- -- -- | module W4Test where
import W4
import Impl.Test
import Control.Monad
import Data.List
import Data.IORef
import System.IO
import System.Directory
import Test.QuickCheck hiding (Result,reason,(===))
import Test.QuickCheck.Monadic
main = testExsArgs tests stdArgs {maxSize = 40, maxSuccess = 40}
tests = [[ex1_hello]
... |
14172226bbcb3bb7b7938c171c58c251549e5931e3117401aa611aeef50bb61b | mirleft/ocaml-tls | http_client.ml |
open Lwt
open Ex_common
let http_client ?ca ?fp hostname port =
let port = int_of_string port in
auth ?ca ?fp () >>= fun authenticator ->
Tls_lwt.connect_ext
(Tls.Config.client ~authenticator ())
(hostname, port) >>= fun (ic, oc) ->
let req = String.concat "\r\n" [
"GET / HTTP/1.1" ; "Hos... | null | https://raw.githubusercontent.com/mirleft/ocaml-tls/3b7736f61c684bb11170e444126fea7df1ec7d69/lwt/examples/http_client.ml | ocaml |
open Lwt
open Ex_common
let http_client ?ca ?fp hostname port =
let port = int_of_string port in
auth ?ca ?fp () >>= fun authenticator ->
Tls_lwt.connect_ext
(Tls.Config.client ~authenticator ())
(hostname, port) >>= fun (ic, oc) ->
let req = String.concat "\r\n" [
"GET / HTTP/1.1" ; "Hos... | |
dbea9adcf5e807c26910fef774a95bb8a564908b0aa25b6ef9a0dbe9b5e83ccc | jedimahdi/soltan | Api.hs | module Hokm.Api.Network.Server.Api
( Effects
, server
) where
import qualified Data.UUID as UUID
import qualified Database.PostgreSQL.Simple as Database
import Hokm.Api.Data.User
import qualified Hokm.Api.Effect.Database.User as Databa... | null | https://raw.githubusercontent.com/jedimahdi/soltan/50a97213ec83c81f5ec79898e2855d0c5e78f06c/backend/hokm-api/src/Hokm/Api/Network/Server/Api.hs | haskell | module Hokm.Api.Network.Server.Api
( Effects
, server
) where
import qualified Data.UUID as UUID
import qualified Database.PostgreSQL.Simple as Database
import Hokm.Api.Data.User
import qualified Hokm.Api.Effect.Database.User as Databa... | |
d6d59510b14982b26f3da2894d59fcc0fa9abadceb0a680c809c2be7145ea8e0 | aadafinance/aada-finance | Test.hs | # LANGUAGE NumericUnderscores #
# LANGUAGE TypeApplications #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Spec.Test where
import Data.Either
import Prelude
import Test.Tasty
import Plutus.V1.Ledger.Api
... | null | https://raw.githubusercontent.com/aadafinance/aada-finance/1661faa203974f5bbf646fe696a9e6df4957ea0c/test/Spec/Test.hs | haskell | # LANGUAGE OverloadedStrings #
testLimits (adaValue 10_000_000 <> borrowerInitialFunds <> lenderInitialFunds) cfg "Happy path" id happyPath -- (happyPath >> logError "show stats")
( liquidateBorrower > > logError " show stats " )
(Just . StakingHash . PubKeyCredential . PubKeyHash $ "ff")
amount of co... | # LANGUAGE NumericUnderscores #
# LANGUAGE TypeApplications #
# LANGUAGE RecordWildCards #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Spec.Test where
import Data.Either
import Prelude
import Test.Tasty
import Plutus.V1.Ledger.Api
import Request
import ... |
fd6830c7586a366fcb1ce34eb342d939a2981b9770395717ddc6dc2231391435 | ds26gte/tex2page | plt-tex2page.rkt | last change : 2009 - 04 - 09
(scmxlate-insert
";tex2page
( c ) , 1997 - 2002
(module tex2page-aux mzscheme
(require mzlib/process)
(require mzlib/date)
(require scheme/private/more-scheme)
( require ( lib \"process.ss\ " ) )
;(require (lib \"date.ss\"))
(provide (all-defined-except ))
")
(scmxlate-un... | null | https://raw.githubusercontent.com/ds26gte/tex2page/fb664716e062fe56e2963367d14e4732bdc93813/dialects/plt-tex2page.rkt | racket | tex2page
(require (lib \"date.ss\"))
get-arg1
(tex2page tex2page-aux)
(save-file "t2p4plt.tex" "t2p4plt.tex.orig")
(call-with-output-file "t2p4plt.tex"
(lambda (o)
non-PLT-specific document~%~%~
'replace)
(require (lib "etc.ss"))
| last change : 2009 - 04 - 09
(scmxlate-insert
( c ) , 1997 - 2002
(module tex2page-aux mzscheme
(require mzlib/process)
(require mzlib/date)
(require scheme/private/more-scheme)
( require ( lib \"process.ss\ " ) )
(provide (all-defined-except ))
")
(scmxlate-uncall
require)
(scmxlate-ignore
main
)... |
ec626126bbef104b3c8584c4ebf353389d36daf58f7665f107c309e051bc56f9 | facebookarchive/pfff | meta_ast_css.ml |
generated by ocamltarzan with : camlp4o -o /tmp / yyy.ml -I pa/ pa_type_conv.cmo pa_vof.cmo pr_o.cmo /tmp / xxx.ml
open Ast_css
let rec vof_selector (v1, v2) =
let v1 = vof_simplesel v1
and v2 =
Ocaml.vof_list
(fun (v1, v2) ->
let v1 = vof_combinator v1
and v2 = vof_simplesel v2... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_css/parsing/meta_ast_css.ml | ocaml |
generated by ocamltarzan with : camlp4o -o /tmp / yyy.ml -I pa/ pa_type_conv.cmo pa_vof.cmo pr_o.cmo /tmp / xxx.ml
open Ast_css
let rec vof_selector (v1, v2) =
let v1 = vof_simplesel v1
and v2 =
Ocaml.vof_list
(fun (v1, v2) ->
let v1 = vof_combinator v1
and v2 = vof_simplesel v2... | |
a79f38a9ab0a29e3e563a7f910a5b50003ccc2673782c873fe1faf56135aebd8 | ANSSI-FR/xsvgen | message_debug.ml | (***********************************************************************)
(* *)
(* XML Schema Validator Generator *)
(* *)
( SafeRive... | null | https://raw.githubusercontent.com/ANSSI-FR/xsvgen/3c2b5e43e7adcb856a3a2aa01bfc039bf3c6459b/lib/message_debug.ml | ocaml | *********************************************************************
XML Schema Validator Generator
... | ( SafeRiver )
Copyright 2012 , ANSSI and SafeRiver .
$ I d : message_debug.ml 1704 2012 - 06 - 04 16:49:33Z maarek $
* { 1 Message handling library , debug version }
type info =
| INFO_file_XML_valid of File_in.t
| INFO_file_XML_... |
5bb38fef8eedb4221b5986fc786a1cfcb43c1a1c3b3ae06554338d02722859cb | Relph1119/sicp-solutions-manual | p1-22-continue-primes.scm | (load "src/examples/ch01/p33-prime.scm")
(load "src/practices/ch01/p1-22-next-odd.scm")
(define (continue-primes n count)
(cond ((= count 0) (display "are primes."))
((prime? n)
(display n)
(cond ((> count 1) (display ","))
((= count 1) (display " ")))
(c... | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-22-continue-primes.scm | scheme | (load "src/examples/ch01/p33-prime.scm")
(load "src/practices/ch01/p1-22-next-odd.scm")
(define (continue-primes n count)
(cond ((= count 0) (display "are primes."))
((prime? n)
(display n)
(cond ((> count 1) (display ","))
((= count 1) (display " ")))
(c... | |
dd0d067403381501243dbaf0eba072c25268593a491c9a36f13bb52e4373b3bc | conal/lambda-ccc | TransCode.hs | # LANGUAGE CPP #
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# LANGUAGE ViewPatterns , PatternGuards #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# LANGUAGE TupleSections #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE LambdaCase #
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - unused - imports #
{ - #... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/Unused/TransCode.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
# LANGUAGE Rank2Types #
TEMP
--------------------------------------------------------------------
|
Module : LambdaCCC.TransCode
Maintainer :
Stability : experimental
--------------------------------------------------------------------
TODO: exp... | # LANGUAGE CPP #
# LANGUAGE ViewPatterns , PatternGuards #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# LANGUAGE TupleSections #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - unused - imports #
Copyright : ( c ) 2014 Tabula , Inc.
Transform a Core program to use only standard... |
deae91ba9929d421aca39e3670cc13d0222ccf50f8745ba67dcffe94e745fb60 | project-oak/hafnium-verification | CType_decl.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/clang/CType_decl.mli | ocaml | * WARNING: functions from this module should not be used if full decl is available in AST
* Processes types and record declarations by adding them to the tenv
* Add the predefined types objc_class which is a struct, and Class, which is a pointer to
objc_class. |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
7a8fa65499478b535b7715dfb640e936c42a28e4691a9b034825cc934d892a92 | lingnand/VIMonad | Warp.hs | -----------------------------------------------------------------------------
-- |
Module : XMonad . Actions . Warp
-- Copyright : (c)
-- License : BSD3-style (see LICENSE)
--
-- Maintainer :
-- Stability : unstable
-- Portability : unportable
--
-- Warp the pointer to a given window or screen... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Actions/Warp.hs | haskell | ---------------------------------------------------------------------------
|
Copyright : (c)
License : BSD3-style (see LICENSE)
Maintainer :
Stability : unstable
Portability : unportable
Warp the pointer to a given window or screen.
------------------------------------------------------------... | Module : XMonad . Actions . Warp
module XMonad.Actions.Warp (
banish,
banishScreen,
Corner(..),
warpToScreen,
warpToWindow
) where
import Data.List... |
fa442cb73136cd964eb9d2847d61fa208fe89681dd6dc69902e1db00df201043 | jaspervdj/firefly | Input.hs | --------------------------------------------------------------------------------
# LANGUAGE ForeignFunctionInterface #
module Firefly.Input
( Key
, MouseButton
, setGrabInput
, isGrabInput
, flushInput
, sendQuit
, hasReceivedQuit
, isKeyDown
, isKeyPressed
, isKeyReleased
... | null | https://raw.githubusercontent.com/jaspervdj/firefly/71e1f5f11293272bedc26444446553a24ee318ad/src/Firefly/Input.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----... | # LANGUAGE ForeignFunctionInterface #
module Firefly.Input
( Key
, MouseButton
, setGrabInput
, isGrabInput
, flushInput
, sendQuit
, hasReceivedQuit
, isKeyDown
, isKeyPressed
, isKeyReleased
, isMouseButtonDown
, isMouseButtonPressed
, isMouseButtonReleased
... |
6bca262b99c2c0d53719112f6eeeb76a3afe9c96cc02acb8afa61fd6f1abc08c | clash-lang/clash-compiler | Annotations.hs | |
Copyright : ( C ) 2021 - 2022 , QBayLogic B.V. ,
2022 , Google Inc. ,
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2021-2022, QBayLogic B.V.,
2022 , Google Inc.,
License : BSD2 (see the file LICENSE)
M... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/ca0449ba58bed122bd511cb75959de2b0cea29a3/clash-cores/src/Clash/Cores/Xilinx/Floating/Annotations.hs | haskell | template function (tclTFName argument) gets a fully evaluated Config.
ARG[0]
ARG[1]
ARG[3]
ARG[4]
ARG[5]
x , ARG[6]
y , ARG[7]
#{funcName} begin
#{funcName} end
template function (tclTFName argument) gets a fully evaluated Config.
ARG[0]
ARG[1]
ARG[3]
ARG[4]
ARG[5... | |
Copyright : ( C ) 2021 - 2022 , QBayLogic B.V. ,
2022 , Google Inc. ,
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2021-2022, QBayLogic B.V.,
2022 , Google Inc.,
License : BSD2 (see the file LICENSE)
M... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.