_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 |
|---|---|---|---|---|---|---|---|---|
dcd7852cc935b45cf9f12f6c4d33046057826b8769bd07025cebd691394d9b37 | threatgrid/asami | tree.cljc | (ns ^{:doc "This namespace provides the basic mechanisms for AVL trees"
:author "Paula Gearon"}
asami.durable.tree
(:require [asami.durable.block.block-api :refer [Block CountedBlocks
get-id get-byte get-int get-long
... | null | https://raw.githubusercontent.com/threatgrid/asami/2c52a588058d6456619cd5bf8dfd75039d4ad127/src/asami/durable/tree.cljc | clojure | (set! *warn-on-reflection* true)
return node-s
return node-so
these were set during the find operation
check if there was change at this level
no change. Short circuit to the root
between this node, and the next/previous
one of the pair is a leaf node. Attach to the correct side of that node
copy this node. It... | (ns ^{:doc "This namespace provides the basic mechanisms for AVL trees"
:author "Paula Gearon"}
asami.durable.tree
(:require [asami.durable.block.block-api :refer [Block CountedBlocks
get-id get-byte get-int get-long
... |
5fb11f128f74e564e4207eec0f213712fe9ef40ef6c1986b7e0a64c00905c381 | brendanhay/gogol | Get.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-cloudiot/gen/Gogol/CloudIOT/Projects/Locations/Registries/Devices/Get.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Gets details about a device.
/See:/ < Cloud IoT API Reference> for @cloudiot.projects.locations.registries.devices.get@.
* Resource
** Constructing a Request
'CloudIOTProjectsLocationsRegistriesDevicesGet' request conforms to... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
aa2c391856a8f83445d26455ffa66d603b19c77168c2d5674777ecba54bd610e | softwarelanguageslab/maf | R5RS_gambit_nqueens-4.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((one-to (lambda (n)
(letrec ((loop (lambda (i l)
(if (= i 0) l (loop (- i 1) (cons i l))))))
(loop n ()))... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_nqueens-4.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((one-to (lambda (n)
(letrec ((loop (lambda (i l)
(if (= i 0) l (loop (- i 1) (cons i l))))))
(loop n ()))))
(ok? (lambda (row dist placed)
... |
6a3db7d2b8696aee18ef4c9baa149b6d0eddacd11fed35b473361551aa57a04f | GrammaticalFramework/gf-core | Primitives.hs | module GF.Compile.TypeCheck.Primitives where
import GF.Grammar
import GF.Grammar.Predef
import qualified Data.Map as Map
typPredefined :: Ident -> Maybe Type
typPredefined f = case Map.lookup f primitives of
Just (ResOper (Just (L _ ty)) _) -> Just ty
Just (ResParam _ _) ... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/compiler/GF/Compile/TypeCheck/Primitives.hs | haskell | non-can. of empty set
-- "read" ->
(P : Type) -> Tok -> P
(P : PType) -> P -> Tok
(P : PType) -> P -> P -> PBool
(L : Type) -> L -> Str
(L : Type) -> (Str -> Str) -> L -> L | module GF.Compile.TypeCheck.Primitives where
import GF.Grammar
import GF.Grammar.Predef
import qualified Data.Map as Map
typPredefined :: Ident -> Maybe Type
typPredefined f = case Map.lookup f primitives of
Just (ResOper (Just (L _ ty)) _) -> Just ty
Just (ResParam _ _) ... |
bee229898c0a54106a9bbc6aea31ecca72307f9c2c2b4c971b57df0dcf902272 | clojure-interop/aws-api | AmazonNeptuneAsyncClient.clj | (ns com.amazonaws.services.neptune.AmazonNeptuneAsyncClient
"Client for accessing Amazon Neptune asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Amazon Neptune
Amazo... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.neptune/src/com/amazonaws/services/neptune/AmazonNeptuneAsyncClient.clj | clojure | (ns com.amazonaws.services.neptune.AmazonNeptuneAsyncClient
"Client for accessing Amazon Neptune asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Amazon Neptune
Amazo... | |
2ef7247a18959f0f6af33b358c403d896a5651a67043a9100d60981cace639b9 | nodename/clevolution | file_input.clj | (ns clevolution.file-input
(:import (java.io File)
(javax.imageio ImageIO ImageReader)))
(defn ^ImageReader get-imagereader
[inputstream]
(let [iterator (ImageIO/getImageReaders inputstream)]
(if-not (.hasNext iterator)
(throw (Exception. "No image reader found for stream")))
(.next ite... | null | https://raw.githubusercontent.com/nodename/clevolution/e0302d788826d6408076471a724fbe6352dddd82/src/clj/clevolution/file_input.clj | clojure | (ns clevolution.file-input
(:import (java.io File)
(javax.imageio ImageIO ImageReader)))
(defn ^ImageReader get-imagereader
[inputstream]
(let [iterator (ImageIO/getImageReaders inputstream)]
(if-not (.hasNext iterator)
(throw (Exception. "No image reader found for stream")))
(.next ite... | |
b82db1fa718f047eda21a4b1cb9230db0afe929b1ee27fda05948c92e54c0b69 | levand/quiescent | factory.clj | (ns quiescent.factory
"Provides convenience macros for easily creating idiomatic Quiescent element factory functions
from pre-existing React components")
(defmacro def-factories
"Define factory functions for the given components, using the specified JS object prefix"
[prefix & components]
`(do
~@(for [c... | null | https://raw.githubusercontent.com/levand/quiescent/2063ebcaffb2c62e48a177c894a10f9066b7f2cc/src/quiescent/factory.clj | clojure | (ns quiescent.factory
"Provides convenience macros for easily creating idiomatic Quiescent element factory functions
from pre-existing React components")
(defmacro def-factories
"Define factory functions for the given components, using the specified JS object prefix"
[prefix & components]
`(do
~@(for [c... | |
5409e29928f9347f96e95e5fee2c1e82243f7968e1c13fffeb6fe731e7da1075 | brendanhay/amazonka | DeleteWorkload.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wellarchitected/gen/Amazonka/WellArchitected/DeleteWorkload.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Delete an existing workload.
* Creating a Request
* Request Lenses
* Destructuring the Response
| Input for workload deletion.
/See:/ 'newDeleteWorkload' smart constructor.
|
The following record fields are available, wi... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
f123da1d3872880b425dc6a863044bdb4b7a9deec96f16100f49d9dbafa903af | nibbula/yew | unicode-test.lisp | ;;;
;;; unicode-test.lisp - Tests for unicode package.
;;;
(defpackage :unicode-test
(:documentation "Tests for unicode package.")
(:use :cl :test :unicode)
(:export
#:run
))
(in-package :unicode-test)
(defun utf8b-transparent (bytes)
"Return true if ‘bytes’ are encoded and decoded transparently."
(an... | null | https://raw.githubusercontent.com/nibbula/yew/c33d6fe8103cf67ac24cdefafe66276eb3bc1bdc/unicode/unicode-test.lisp | lisp |
unicode-test.lisp - Tests for unicode package.
Try inside ascii double quotes.
End |
(defpackage :unicode-test
(:documentation "Tests for unicode package.")
(:use :cl :test :unicode)
(:export
#:run
))
(in-package :unicode-test)
(defun utf8b-transparent (bytes)
"Return true if ‘bytes’ are encoded and decoded transparently."
(and (equalp bytes (string-to-utf8b-bytes (utf8b-bytes-to-stri... |
bbc2960d8b6452c761b601847fa208a23ca38066019e395ee6997a135f882ce9 | nikita-volkov/rebase | Lazy.hs | module Rebase.Control.Monad.Trans.State.Lazy
(
module Control.Monad.Trans.State.Lazy
)
where
import Control.Monad.Trans.State.Lazy
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Control/Monad/Trans/State/Lazy.hs | haskell | module Rebase.Control.Monad.Trans.State.Lazy
(
module Control.Monad.Trans.State.Lazy
)
where
import Control.Monad.Trans.State.Lazy
| |
c99a3e55a51b77ae2e15dfc9ac6de75e3c5b71919e4562eb485f5016c4817def | AndrasKovacs/ELTE-func-lang | Practice3.hs | module Practice3 where
-- ex1.
a Node - ban vannak az értékek ,
data BinTreeNode a = Leaf' | Node' a (BinTreeNode a) (BinTreeNode a)
deriving (Eq, Show, Ord)
-- ex2.
mind levelekben , , típusú is !
data BinTreeBoth l n = Leaf l | Node n (BinTreeBoth l n) (BinTreeBoth l n)
deriving (Eq, Show, Ord)... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-2/gyak_3/Practice3.hs | haskell | ex1.
ex2.
LAWS: lift (x <> y) == lift x <> lift y | module Practice3 where
a Node - ban vannak az értékek ,
data BinTreeNode a = Leaf' | Node' a (BinTreeNode a) (BinTreeNode a)
deriving (Eq, Show, Ord)
mind levelekben , , típusú is !
data BinTreeBoth l n = Leaf l | Node n (BinTreeBoth l n) (BinTreeBoth l n)
deriving (Eq, Show, Ord)
concatTreeLeav... |
d26a049ef3af0734ebf60b6c79122ba72340430c61b1d4773256514e74da6ceb | swamp-agr/servant-seo | doctests.hs | module Main where
import Build_doctests (flags, module_sources, pkgs)
import Data.Foldable (traverse_)
import Test.DocTest
main :: IO ()
main = do
traverse_ putStrLn args
doctest args
where
args = flags ++ pkgs ++ module_sources
| null | https://raw.githubusercontent.com/swamp-agr/servant-seo/bd6eddf1a08cff92b6cbbba6ee28ebb5dbd73c1b/test/doctests.hs | haskell | module Main where
import Build_doctests (flags, module_sources, pkgs)
import Data.Foldable (traverse_)
import Test.DocTest
main :: IO ()
main = do
traverse_ putStrLn args
doctest args
where
args = flags ++ pkgs ++ module_sources
| |
61a7fe54fea3cabcdd717809af162ebdcd1d9d53d99cb9309a19288793b658d6 | erlio/vmq_plugin | vmq_plugin_helper.erl | Copyright 2014 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/erlio/vmq_plugin/a4da95452f9363489c1fc5e2f753438e1d7b0b34/src/vmq_plugin_helper.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_plugin_helper).
-export([all/2,
all_till_ok/2]).
all(Hooks, Params) ->
all(Hooks, Params, []).
all(... |
fad0e7b2480dd2e5df5ef7428f70a08c2ee7b4b65a833b066abf37663135aee7 | ekmett/foreign-var | Var.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE TypeFamilies #
--------------------------------------------------------------------
-- |
Copyright : ( c ) 2014 - 2015 ... | null | https://raw.githubusercontent.com/ekmett/foreign-var/a4663699c103d50731e0b57aabd5a739eb355a74/src/Foreign/Var.hs | haskell | # LANGUAGE DeriveDataTypeable #
------------------------------------------------------------------
|
Stability : experimental
Portability: non-portable
------------------------------------------------------------------
* Variables
* Classes
------------------------------------------------------------------
-----... | # LANGUAGE CPP #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2014 - 2015
License : BSD2
Maintainer : < >
module Foreign.Var
(
Var(Var)
, mapVar
, SettableVar... |
c1bb6a529fed5af918efe822787532a49c02573ac44f05ff510cef08c8336d92 | carl-eastlund/dracula | dracula-core.rkt | #|
Gathers all the modules together and provides the core forms (more or less).
A few more forms are defined at provided toward the end.
|#
#lang racket/base
(require
racket/require
(path-up "self/require.rkt")
(cce-in require-provide))
(require/provide
"constants.rkt"
"conditionals.rkt"
"let.rkt"
"quot... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/lang/dracula-core.rkt | racket |
Gathers all the modules together and provides the core forms (more or less).
A few more forms are defined at provided toward the end.
| #lang racket/base
(require
racket/require
(path-up "self/require.rkt")
(cce-in require-provide))
(require/provide
"constants.rkt"
"conditionals.rkt"
"let.rkt"
"quote.rkt"
"acl2-top.rkt"
"acl2-app.rkt"
"declare.rkt"
"defun.rkt"
"defconst.rkt"
"include-book.rkt"
"in-package.rkt"
"parameter... |
e221ebc92f67f635bed460f03750e82680fcf82facad0952b4fd188dabbdea39 | locusmath/locus | number.clj | (ns locus.number.quaternion.number
(:refer-clojure :exclude [+ * - /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.core.protocols :refer :all]
[locus.set.copresheaf.structure.core.pr... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/number/quaternion/number.clj | clojure | Division rings of quaternions | (ns locus.number.quaternion.number
(:refer-clojure :exclude [+ * - /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.core.protocols :refer :all]
[locus.set.copresheaf.structure.core.pr... |
a3b0a9aca73943f8b3a92e046a1dedb95fa8409aa3b93898907254f6752be3d1 | owlbarn/owl_mask_rcnn | mrcnnUtil.ml | open Owl
module N = Dense.Ndarray.S
module C = Configuration
Names of the 80 classes of the MS Coco dataset .
let class_names =
[|"BG"; "person"; "bicycle"; "car"; "motorcycle"; "airplane";
"bus"; "train"; "truck"; "boat"; "traffic light";
"fire hydrant"; "stop sign"; "parking meter"; "bench"; "bird";
... | null | https://raw.githubusercontent.com/owlbarn/owl_mask_rcnn/838d921401676271f96e867452e21b829aff29ec/src/mrcnn/mrcnnUtil.ml | ocaml | Returns an array with selected indices ix from array arr.
Returns a list containing n empty lists (used for slicing).
Creates an Ndarray with each slice initialised using the
* slice: (int -> arr) function.
Returns an array containing the indices between 0 and n - 1 satisfying
* [cond i].
Returns the unique ... | open Owl
module N = Dense.Ndarray.S
module C = Configuration
Names of the 80 classes of the MS Coco dataset .
let class_names =
[|"BG"; "person"; "bicycle"; "car"; "motorcycle"; "airplane";
"bus"; "train"; "truck"; "boat"; "traffic light";
"fire hydrant"; "stop sign"; "parking meter"; "bench"; "bird";
... |
9e04342a383e3c639218d0a98617c766f118af0b5d773219b82be7138a8c920f | haskell/HTTP | Utils.hs | -----------------------------------------------------------------------------
-- |
-- Module : Network.HTTP.Utils
-- Copyright : See LICENSE file
License : BSD
--
-- Maintainer : Ganesh Sittampalam <>
-- Stability : experimental
-- Portability : non-portable (not tested)
--
-- Set of utility fun... | null | https://raw.githubusercontent.com/haskell/HTTP/3e9af54c867769275d7bf50c88bcd037cde6132a/Network/HTTP/Utils.hs | haskell | ---------------------------------------------------------------------------
|
Module : Network.HTTP.Utils
Copyright : See LICENSE file
Maintainer : Ganesh Sittampalam <>
Stability : experimental
Portability : non-portable (not tested)
Set of utility functions and definitions used by package modu... | License : BSD
module Network.HTTP.Utils
, toUTF8BS
, fromUTF8BS
) where
import Data.Bits
import Data.Char
import Data.List ( elemIndex )
import Data.Maybe ( fromMaybe )
import Data.Word ( Word8 )
import qualified Data.ByteString as BS
| @crlf@ is our beloved two - char line termi... |
244d3d66dfb7c4a82f2b116a68cfeb3a9bf2f33420731f4ca111e7a68c105aa2 | acl2/acl2 | bv-array-conversions2-tests@useless-runes.lsp | (TEST-CONVERSION-TO-ARRAY
(33 3 (:REWRITE BVCHOP-IDENTITY))
(16 2 (:REWRITE UNSIGNED-BYTE-P-FROM-BOUNDS))
(9 9 (:REWRITE BV-ARRAY-WRITE-WHEN-LEN-IS-NOT-NATP))
(9 9 (:REWRITE BV-ARRAY-WRITE-WHEN-INDEX-NOT-INTEGER-CHEAP))
(8 2 (:REWRITE DEFAULT-<-1))
(6 6 (:REWRITE LEN-WHEN-NOT-CONSP-CHEAP))
(5 3 (:REWRITE BVCHOP-... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv-lists/.sys/bv-array-conversions2-tests%40useless-runes.lsp | lisp | (TEST-CONVERSION-TO-ARRAY
(33 3 (:REWRITE BVCHOP-IDENTITY))
(16 2 (:REWRITE UNSIGNED-BYTE-P-FROM-BOUNDS))
(9 9 (:REWRITE BV-ARRAY-WRITE-WHEN-LEN-IS-NOT-NATP))
(9 9 (:REWRITE BV-ARRAY-WRITE-WHEN-INDEX-NOT-INTEGER-CHEAP))
(8 2 (:REWRITE DEFAULT-<-1))
(6 6 (:REWRITE LEN-WHEN-NOT-CONSP-CHEAP))
(5 3 (:REWRITE BVCHOP-... | |
8fa4f5ee87f62a6923c53410661e81a85cb30a163ed6d8d61ff67dbabe8df5ae | skanev/playground | 26.scm | EOPL exercise 1.26
;
( up lst ) removes a pair of parentheses from each top - level element of lst .
; If a top-level element is not a list, it is included in result, as is. The
value of ( up ( down lst ) ) is equivalent to lst , but ( down ( up lst ) ) is not
necessarily lst . ( See exercise 1.17 ) .
;
> ( u... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/26.scm | scheme |
If a top-level element is not a list, it is included in result, as is. The
(1 2 3 4)
> (up '((x (y)) z))
(x (y) z) | EOPL exercise 1.26
( up lst ) removes a pair of parentheses from each top - level element of lst .
value of ( up ( down lst ) ) is equivalent to lst , but ( down ( up lst ) ) is not
necessarily lst . ( See exercise 1.17 ) .
> ( up ' ( ( 1 2 ) ( 3 4 ) ) )
(define (up lst)
(if (null? lst)
'()
(append... |
97f2ea0da3ced97413a9171fe6342f74f6be899e86c4e812b5cd872f1da83827 | imitator-model-checker/imitator | DiscreteValue.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine ,... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/DiscreteValue.ml | ocaml | Discrete value of different specific types
Get discrete var type of a discrete value
Get var type of a discrete value
Check if a value is compatible with given type
Get discrete type of value
Get discrete type of var type
Check compatibility of discrete types
**********************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine ,... |
11974acfd9472e8c085f5793adef8069ec6821312f9288dda442febd79c3f7ad | launchdarkly/haskell-server-sdk | TestData.hs | module Spec.Integrations.TestData (allTests)
where
import Test.HUnit
import Data.Aeson (ToJSON, toJSON)
import Data.Function ((&))
import Data.Functor ((<&>))
import Data.Text (Text)
import GHC.Generics (Generic)
import Control.Monad.Logger
import LaunchDarkly.Server
import LaunchDarkly.Server.DataSource.Internal
im... | null | https://raw.githubusercontent.com/launchdarkly/haskell-server-sdk/b8642084591733e620dfc5c1598409be7cc40a63/test/Spec/Integrations/TestData.hs | haskell | module Spec.Integrations.TestData (allTests)
where
import Test.HUnit
import Data.Aeson (ToJSON, toJSON)
import Data.Function ((&))
import Data.Functor ((<&>))
import Data.Text (Text)
import GHC.Generics (Generic)
import Control.Monad.Logger
import LaunchDarkly.Server
import LaunchDarkly.Server.DataSource.Internal
im... | |
65fe8fb14145bd7c13603e7fb3220384c17b1f1e793a8c3de41fb0fac87ca26b | kowainik/hintman | Review.hs | {- | Data types and instances for PR review.
-}
module Hintman.Core.Review
( PullRequestReview (..)
, ReviewEvent (..)
, Comment (..)
, createComment
) where
import Data.Aeson (object, (.=))
import Hintman.Core.Hint (Hint, Line (..), formatHint)
import Hintman.Core.PrInfo (Modified... | null | https://raw.githubusercontent.com/kowainik/hintman/3dd38fa789098fbadfc905be801853942b81b7be/src/Hintman/Core/Review.hs | haskell | | Data types and instances for PR review.
| Path to file
| The position in the diff where you want to add a review comment. Note
this value is not the same as the line number in the file.
| Text of the review comment
| Create a 'Comment' from all necessary data. |
module Hintman.Core.Review
( PullRequestReview (..)
, ReviewEvent (..)
, Comment (..)
, createComment
) where
import Data.Aeson (object, (.=))
import Hintman.Core.Hint (Hint, Line (..), formatHint)
import Hintman.Core.PrInfo (ModifiedFile (..))
import Hintman.Hint.Position (getTarg... |
08cd8a4c226c3f9dc57e184c9fd4cd4ec4e49fdb2e66bd26d4b083ec6bf3c1d4 | emqx/HBridge | PrintESQL.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ <= 708
# LANGUAGE OverlappingInstances #
#endif
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - incomplete - patterns #
| Pretty - printer for PrintESQL .
Generated by the BNF converter .
module Network.MQTT.Bridge.SQL.PrintESQL where
import qualified Network... | null | https://raw.githubusercontent.com/emqx/HBridge/885a0ebd437747c50a5883247308b3811737e1d7/src/Network/MQTT/Bridge/SQL/PrintESQL.hs | haskell | | The top-level printing method.
| The printer class does the job.
# OVERLAPPABLE # | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ <= 708
# LANGUAGE OverlappingInstances #
#endif
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - incomplete - patterns #
| Pretty - printer for PrintESQL .
Generated by the BNF converter .
module Network.MQTT.Bridge.SQL.PrintESQL where
import qualified Network... |
bc08b31f0321080d20317b26257fd134b48cfd45be5081dc609b5e81dfb085f0 | kandu/mew_vi | key.ml |
* key.ml
* -----------
* Copyright : ( c ) 2019 - 2020 , DoYe < >
* Licence : MIT
*
* This file is a part of mew_vi .
* key.ml
* -----------
* Copyright : (c) 2019 - 2020, ZAN DoYe <>
* Licence : MIT
*
* This file is a part of mew_vi.
*)
type code =
| Char of string
| Enter
| ... | null | https://raw.githubusercontent.com/kandu/mew_vi/ee2e80c3eb5bd6049c7e505bf2f3c3a75a887063/src/key.ml | ocaml |
* key.ml
* -----------
* Copyright : ( c ) 2019 - 2020 , DoYe < >
* Licence : MIT
*
* This file is a part of mew_vi .
* key.ml
* -----------
* Copyright : (c) 2019 - 2020, ZAN DoYe <>
* Licence : MIT
*
* This file is a part of mew_vi.
*)
type code =
| Char of string
| Enter
| ... | |
0486ec212b4704c84dc4eef54d754fa0b359429b035ee3db77c38ee1c6362c6f | CLowcay/hgbc | CPURegisters.hs | {-# LANGUAGE OverloadedStrings #-}
module HGBC.Debugger.HTML.CPURegisters
( cpuRegisters,
)
where
import qualified Data.ByteString.Builder as BB
import HGBC.Debugger.HTML.Elements (descField, field, table, td, th, tr, value)
cpuRegisters :: BB.Builder
cpuRegisters =
table
"'panel cpu'"
[tr [th 1 ["CPU ... | null | https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/main/src/HGBC/Debugger/HTML/CPURegisters.hs | haskell | # LANGUAGE OverloadedStrings # |
module HGBC.Debugger.HTML.CPURegisters
( cpuRegisters,
)
where
import qualified Data.ByteString.Builder as BB
import HGBC.Debugger.HTML.Elements (descField, field, table, td, th, tr, value)
cpuRegisters :: BB.Builder
cpuRegisters =
table
"'panel cpu'"
[tr [th 1 ["CPU Registers"]]]
[ tr [td ["AF ", ... |
bbb8629fd4fed601d8e952cc808f3f5fe235b2c7b827e80ea744b81940762fd5 | lipas-liikuntapaikat/lipas | checkboxes.cljs | (ns lipas.ui.components.checkboxes
(:require
[lipas.ui.mui :as mui]
[reagent.core :as r]))
(defn checkbox
[{:keys [label value on-change disabled style icon checked-icon tooltip]
:or {tooltip ""}}]
[mui/tooltip {:title tooltip}
[mui/form-control-label
{:label (r/as-element [mui/typography {:... | null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/02452fd4f9e93e0b4c844d8bb600a50aa9b3be71/webapp/src/cljs/lipas/ui/components/checkboxes.cljs | clojure | %2 = checked? | (ns lipas.ui.components.checkboxes
(:require
[lipas.ui.mui :as mui]
[reagent.core :as r]))
(defn checkbox
[{:keys [label value on-change disabled style icon checked-icon tooltip]
:or {tooltip ""}}]
[mui/tooltip {:title tooltip}
[mui/form-control-label
{:label (r/as-element [mui/typography {:... |
29d01ae400b9b2f60b175344c8b61d8f03c862c54c91da5c6c5fbf31600b98f8 | NetComposer/nkservice | nkservice_config.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nkservice/affbd5b9c914e2c8775dd45733a0b5c15d784e34/src/nkservice_config.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nkservice_config).
-... |
b16ee261c06474833c83a2800807def570cc1ffd61261c925d95ba0b6e8f133e | ghc/nofib | Utils.hs | -- ==========================================================--
-- === Utilities File: utils.m (1) ===--
-- ==========================================================--
module Utils where
import MyUtils
import BaseDefs
-- ====================================--
-- === Haskell compatability ... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/anna/Utils.hs | haskell | ==========================================================--
=== Utilities File: utils.m (1) ===--
==========================================================--
====================================--
=== Haskell compatability ===--
====================================--
=============... |
module Utils where
import MyUtils
import BaseDefs
copy :: Int -> a -> [a]
copy n x = take (max 0 n) xs where xs = x:xs
sort :: (Ord a) => [a] -> [a]
sort [] = []
sort (a:x) = insert a (sort x)
where
insert :: (Ord a) => a -> [a] -> [a]
insert a [] = [a]
inser... |
de6c88790c04a15f98fa853cc2b91b1959f9fec39774b70408cf45357832149d | jumarko/web-development-with-clojure | app.cljs | (ns ^:figwheel-no-load swagger-service.app
(:require [swagger-service.core :as core]
[devtools.core :as devtools]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:on-jsload core/mount-components... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/examples/swagger-service/env/dev/cljs/swagger_service/app.cljs | clojure | (ns ^:figwheel-no-load swagger-service.app
(:require [swagger-service.core :as core]
[devtools.core :as devtools]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:on-jsload core/mount-components... | |
0dbe813986db26b1ecb98fbaebcf29363a597d997ea8c089f1108fb34ab9cbce | danilkolikov/dfl | Processor.hs | |
Module : Frontend . Desugaring . Final . Expression
Description : Final desugaring of expressions
Copyright : ( c ) , 2019
License : MIT
Final desugaring of expressions
Module : Frontend.Desugaring.Final.Expression
Description : Final desugaring of expressions
Copyright ... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Desugaring/Final/Processor.hs | haskell | | Does final desugaring of a module | |
Module : Frontend . Desugaring . Final . Expression
Description : Final desugaring of expressions
Copyright : ( c ) , 2019
License : MIT
Final desugaring of expressions
Module : Frontend.Desugaring.Final.Expression
Description : Final desugaring of expressions
Copyright ... |
24b7315bc3cf0628a79fe1edb82d2ffe7f37ed49dd551932fc068c01432f9d51 | morazanm/fsm | string.rkt | FSM Library Version 1.0
Copyright ( C ) 2015 by and
Written by : and , 2015
(module string racket
(provide lostr->lostate lostr->string sort-strings los->lostr sort-symbols)
( listof string ) -- > string
(define (lostr->string l)
(cond [(null? l) ""]
[else (string-append (car l) ... | null | https://raw.githubusercontent.com/morazanm/fsm/0a7e96e8d69cda7d22b8496375d5c792cd5d320d/fsm-core/private/string.rkt | racket | string (sorted (listof string)) --> (sorted (listof string))
los --> los | FSM Library Version 1.0
Copyright ( C ) 2015 by and
Written by : and , 2015
(module string racket
(provide lostr->lostate lostr->string sort-strings los->lostr sort-symbols)
( listof string ) -- > string
(define (lostr->string l)
(cond [(null? l) ""]
[else (string-append (car l) ... |
3110511e8586946b84dca87f4087668a3d6abc86e29e82d19256b2771ca83365 | Octachron/codept | zipper.mli | module Def = Zipper_def
module Fold = Zipper_fold
module Pp = Zipper_pp
module Skeleton = Zipper_skeleton
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/lib/zipper.mli | ocaml | module Def = Zipper_def
module Fold = Zipper_fold
module Pp = Zipper_pp
module Skeleton = Zipper_skeleton
| |
59ef28af4fdeb36f74b841edab52967c1b385a6c9210f184eaac392a83045985 | YoshikuniJujo/test_haskell | NestInFile.hs | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Template.NestInFile where
import Language.Haskell.TH
foo = $(litE $ integerL 123)
bar = integerL 321
-- baz = $(litE bar)
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/9e7c265cb7f1d6b71e17d5ee87fd5d491070b959/tribial/tribial-trials/src/Template/NestInFile.hs | haskell | baz = $(litE bar) | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Template.NestInFile where
import Language.Haskell.TH
foo = $(litE $ integerL 123)
bar = integerL 321
|
03d19936ae5e44cb940a24e0b55936706e41d1ff6c88c2a8d963cb75ebacd8cc | javgh/bridgewalker | Main.hs | {-# LANGUAGE CPP #-}
# LANGUAGE TemplateHaskell #
NOTE : Do n't modify this file unless you know what you are doing . If you are
new to snap , start with Site.hs and Application.hs . This file contains
boilerplate needed for dynamic reloading and is not meant for general
consumption .
Occas... | null | https://raw.githubusercontent.com/javgh/bridgewalker/ec5a62e6ebf36e52b98996a00a7d6042cc22ead7/src/Main.hs | haskell | # LANGUAGE CPP #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
| This is the entry point for this web server application. It supports
easily switching between interpreting source and running statica... | # LANGUAGE TemplateHaskell #
NOTE : Do n't modify this file unless you know what you are doing . If you are
new to snap , start with Site.hs and Application.hs . This file contains
boilerplate needed for dynamic reloading and is not meant for general
consumption .
Occasionally if we modify the way the ... |
553653cffa333de7d89265209244f48ab660f2aaf9bc443131c77a3c13057b1c | fjvallarino/monomer | Handlers.hs | |
Module : . Main . Handlers
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Handlers for WidgetRequests . Functions in this module handle focus , clipboard ,
overlays and all SystemEvent ... | null | https://raw.githubusercontent.com/fjvallarino/monomer/d1ddcc2d40a6151d50fca33dbca1302fa7b2e19b/src/Monomer/Main/Handlers.hs | haskell | # LANGUAGE Strict #
^ The initial widget environment.
^ The initial widget root.
^ The starting list of events.
| Initializes system resources (currently only icons).
| Initializes a widget (in general, this is called for root).
| Disposes a widget (in general, this is called for root).
^ Requests to process.
^... | |
Module : . Main . Handlers
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Handlers for WidgetRequests . Functions in this module handle focus , clipboard ,
overlays and all SystemEvent ... |
ea76d18c786a844757622b3abd999a2c13fbda257ba3a97a687294239a35db50 | srdqty/talc-3.0 | dasm.mli | (**********************************************************************)
( c ) , , ,
August 1999 , all rights reserved .
(**********************************************************************)
(* dasm.ml
*
* Disassembles an object file and associated .to file t... | null | https://raw.githubusercontent.com/srdqty/talc-3.0/df83dd5ff0e2b189b13280ddae233d8277199350/talx86/dasm.mli | ocaml | ********************************************************************
********************************************************************
dasm.ml
*
* Disassembles an object file and associated .to file to produce a
* TAL implementation.
disassemble [disassemble internals] [.to file name] [object file name]
ope... | ( c ) , , ,
August 1999 , all rights reserved .
module type dasm = sig
val disassemble : bool -> string -> string -> Tal.tal_pre_mod
end
module Chan : dasm
module Str : dasm
|
6942c27a488db24ba5782ad8e6373d28daef836bb37d19ad7d3d5226163526c9 | racket/plai | closure-1.rkt | #lang plai/gc2/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 60)
( cons 2 ( cons -10 empty ) ) )
(define (map f lst)
(if (cons? lst)
(cons (f (first lst)) (map f (rest lst)))
empty))
(define x 'gc-garbage)
(test/value=? (map (λ (x) (add1 x)) lst) '(3 -9))
| null | https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/good-mutators/closure-1.rkt | racket | #lang plai/gc2/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 60)
( cons 2 ( cons -10 empty ) ) )
(define (map f lst)
(if (cons? lst)
(cons (f (first lst)) (map f (rest lst)))
empty))
(define x 'gc-garbage)
(test/value=? (map (λ (x) (add1 x)) lst) '(3 -9))
| |
bc59ad15b04f62ded496be732ee8361568b3df0c34a23d263b2783b2946d5d1e | gedge-platform/gedge-platform | cow_http_te.erl | Copyright ( c ) 2014 - 2018 , < >
%%
%% Permission to use, copy, modify, and/or 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 AUTHOR DISC... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/cowlib/src/cow_http_te.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2014 - 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cow_http_te).
-export([stream_identity/2]).
... |
91f5fa3d133bdbfbdcc42d6a63e697e55fd311c30687257ebbcfdd841e7eed7b | snoyberg/why-you-should-use-stm | exercise.hs | #!/usr/bin/env stack
-- stack --resolver lts-13.21 script
import Control.Concurrent.STM
main :: IO ()
main = do
-- You'll need to change some function names, and add in some calls to
-- atomically
var <- newTVar "Hello"
origVal <- readTVar var
writeIORef var (origVal ++ " World")
newVal <- readIORef var... | null | https://raw.githubusercontent.com/snoyberg/why-you-should-use-stm/adf3366aebd6daf1dd702ed4cad1c2303d296afc/exercises/02-convert-to-stm/exercise.hs | haskell | stack --resolver lts-13.21 script
You'll need to change some function names, and add in some calls to
atomically | #!/usr/bin/env stack
import Control.Concurrent.STM
main :: IO ()
main = do
var <- newTVar "Hello"
origVal <- readTVar var
writeIORef var (origVal ++ " World")
newVal <- readIORef var
putStrLn newVal
|
37573980fb4b17cf4d0d9a4eed657a53765f880b2a2eb12f09bc83cbbe16d6b5 | berke/aurochs | myocamlbuild.ml | plugin
open Ocamlbuild_pack
open Ocamlbuild_plugin
open Command
open Ocaml_specific
open Outcome
let ( & ) f x = f x
let ocaml_local_dir =
lazy begin
try
Sys.getenv "OCAMLDIR"
with
| Not_found ->
let cmd = "ocamlc -where" in
My_unix.run_and_open cmd (fun ic ->
Log.dpr... | null | https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/myocamlbuild.ml | ocaml | ** ocamllib
A"-cclib";A("-L"^old.od_path);
A"-cclib";A("-L"^old.od_path);
A"-cclib";A("-L"^old.od_path);
**
local "java";
local "compiler"
rule "aurochs: .peg -> .ml,.mli"
~prods:["%.ml";"%.mli"]
~deps:["%.peg"; "aurochs/aurochs_tool.native"]
begin fun env _build ->
... | plugin
open Ocamlbuild_pack
open Ocamlbuild_plugin
open Command
open Ocaml_specific
open Outcome
let ( & ) f x = f x
let ocaml_local_dir =
lazy begin
try
Sys.getenv "OCAMLDIR"
with
| Not_found ->
let cmd = "ocamlc -where" in
My_unix.run_and_open cmd (fun ic ->
Log.dpr... |
5ed60dfe92037be49b1054fb31ba172c38b72f1bbcfaf37ab62751ea789276ee | footprintanalytics/footprint-web | pre_alias_aggregations.clj | (ns metabase.query-processor.middleware.pre-alias-aggregations
(:require [metabase.driver :as driver]
[metabase.mbql.util :as mbql.u]
[metabase.query-processor.middleware.annotate :as annotate]))
(defn- ag-name [ag-clause]
(driver/escape-alias driver/*driver* (annotate/aggregation-name ag-c... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/pre_alias_aggregations.clj | clojure | (ns metabase.query-processor.middleware.pre-alias-aggregations
(:require [metabase.driver :as driver]
[metabase.mbql.util :as mbql.u]
[metabase.query-processor.middleware.annotate :as annotate]))
(defn- ag-name [ag-clause]
(driver/escape-alias driver/*driver* (annotate/aggregation-name ag-c... | |
b26658452a57fc856388e04cbe2be71183be7dc326b2bf33de18576ef5688a82 | clojure-interop/aws-api | ContentManagerAsync.clj | (ns com.amazonaws.services.workdocs.ContentManagerAsync
"High level asynchronous utility for transferring content from and to Amazon WorkDocs.
ContentManagerAsync provides a simple API for uploading and downloading
documents to/from Amazon WorkDocs easily.
ContentManagerAsync, like all the client classes in the... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workdocs/src/com/amazonaws/services/workdocs/ContentManagerAsync.clj | clojure |
" | (ns com.amazonaws.services.workdocs.ContentManagerAsync
"High level asynchronous utility for transferring content from and to Amazon WorkDocs.
ContentManagerAsync provides a simple API for uploading and downloading
documents to/from Amazon WorkDocs easily.
ContentManagerAsync, like all the client classes in the... |
67b529f58229e83e1df6c4961e7eab64ff09329fc26208df8ff9d6e334ace416 | dradtke/Lisp-Text-Editor | gobject.foreign.lisp | (in-package :gobject)
(defgeneric release (object)
(:documentation "Manually frees the Lisp reference to the @code{object}. Probably should not be called.
@arg[object]{an instance of @class{g-object}}"))
(defmethod release ((object null)))
(defun release* (&rest objects)
"Calls @fun{release} on all objects in @... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/glib/gobject.foreign.lisp | lisp | (in-package :gobject)
(defgeneric release (object)
(:documentation "Manually frees the Lisp reference to the @code{object}. Probably should not be called.
@arg[object]{an instance of @class{g-object}}"))
(defmethod release ((object null)))
(defun release* (&rest objects)
"Calls @fun{release} on all objects in @... | |
e409e5cc673a994956d83ff4ab613fe5b4c9dc841246e1d6178e2b0da6eba734 | MarcusPlieninger/HtDP_2e_solutions | HtDP_2e_Exercise_037.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_37) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati... | null | https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_037.rkt | racket | about the language level of this file in a form that our tools can easily process.
String->String
(define (string-rest strg) "a")
given: "string", expect: "tring"
given: "batman", expect: "atman"
tests passed | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_37) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Exercise 37 . Design the function string - rest , wh... |
ba139006a876a8bfeefbf2caba8729e5b0d95e9df7e062bc37ff7ae0a3ccdd02 | Glue42/gateway-modules | util.cljc | (ns gateway.metrics.core.util
#?(:cljs (:require-macros [taoensso.timbre :refer [trace]]))
(:require
#?(:clj [clojure.core.async :as a]
:cljs [cljs.core.async :as a :refer-macros [go go-loop]])
[taoensso.timbre :as timbre]))
(defn batch
[in batch-size interval buffer-or-n]
(timbre/info "initia... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/metrics-core/src/gateway/metrics/core/util.cljc | clojure | (ns gateway.metrics.core.util
#?(:cljs (:require-macros [taoensso.timbre :refer [trace]]))
(:require
#?(:clj [clojure.core.async :as a]
:cljs [cljs.core.async :as a :refer-macros [go go-loop]])
[taoensso.timbre :as timbre]))
(defn batch
[in batch-size interval buffer-or-n]
(timbre/info "initia... | |
af43a5eea2efa50d2a45cd42b2e884066ce628e8fbaf126c79214db392774d00 | hbr/albatross | printer.ml | open Fmlib
open Common
type pos = Position.t
type range = pos * pos
module Make (PP: Pretty_printer.SIG) =
struct
open PP
let print_error_header
(error_type:string)
: t
=
(* Print the error header. *)
let err = " ERROR " in
let nfill =
max 0 (80 - 3 - ... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/albalib/printer.ml | ocaml | Print the error header.
normal line | open Fmlib
open Common
type pos = Position.t
type range = pos * pos
module Make (PP: Pretty_printer.SIG) =
struct
open PP
let print_error_header
(error_type:string)
: t
=
let err = " ERROR " in
let nfill =
max 0 (80 - 3 - (String.length error_type + String.le... |
a62717addbe88f106f77fbe908341fe204387e9e7814645a43cc93aa34d71498 | viercc/kitchen-sink-hs | unzip-test.hs | # LANGUAGE NumericUnderscores #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
module Main(main) where
import Data.List (unzip, foldl')
import qualified Data.Vector.Unboxed as V
type Vec = V.Vector Int
Set the CPP parameter to either
-- 'unzipList' or 'unzipFunctor'
main :: IO ()
main = do
let (x,y) = summarize... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/391efc1a30f02a65bbcc37a4391bd5cb0d3eee8c/execs/unzip-leak/unzip-test.hs | haskell | # LANGUAGE BangPatterns #
'unzipList' or 'unzipFunctor'
----------------------------------------------- | # LANGUAGE NumericUnderscores #
# LANGUAGE CPP #
module Main(main) where
import Data.List (unzip, foldl')
import qualified Data.Vector.Unboxed as V
type Vec = V.Vector Int
Set the CPP parameter to either
main :: IO ()
main = do
let (x,y) = summarize $ UNZIP_FUNCTION $ take 10_000 $ setup 10_000
print x
prin... |
898130c665cd8a01c9772359c684ffb8fde6a3f1e1bd88125ed55fc6ba4c8192 | aryx/yacfe | oassocb.ml | open Common
open Oassoc
class ['a,'b] oassocb xs =
object(o)
inherit ['a,'b] oassoc
val data = Map_.empty
method empty = {< data = Map_.empty >}
method add (k,v) = {< data = Map_.add k v data >}
method replkey (k,v) = {< data = Map_.add k v (Map_.remove k data) >}
method iter f = Map_.iter... | null | https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/commons_ocollection/oassocb.ml | ocaml | open Common
open Oassoc
class ['a,'b] oassocb xs =
object(o)
inherit ['a,'b] oassoc
val data = Map_.empty
method empty = {< data = Map_.empty >}
method add (k,v) = {< data = Map_.add k v data >}
method replkey (k,v) = {< data = Map_.add k v (Map_.remove k data) >}
method iter f = Map_.iter... | |
24efdd4d8f226c334937191f2f0c2eace5d9126984f4da2d6d1780bf6c9e3746 | reasonml/reason | comments.mli | (* **** comment *)
(*** comment *)
(** docstring *)
(* comment *)
(** docstring *)
(*** comment *)
(**** comment *)
(***** comment *)
(** *)
(*** *)
(**** *)
(***)
(****)
(** (** comment *) *)
(** (*** comment *) *)
(* (** comment *) *)
(* (*** comment *) *)
(* *(*** comment *) *)
(* comment **)
(* comment ***)
... | null | https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/formatTest/typeCheckedTests/input/comments.mli | ocaml | **** comment
** comment
* docstring
comment
* docstring
** comment
*** comment
**** comment
*
**
***
*
**
* (** comment
* (*** comment
(** comment
(*** comment
*(*** comment
comment *
comment **
comment ***
comment ****
*
**
|
*
*
* Multiline
*)
* *
*
*)
|
ea2aee1771b8fb3e03f30d7805f336bf9849d1e5b5bf576b86b60e75ad36e7fd | ice1000/learn | parse-float.hs | module ParseFloat where
import Data.Maybe
parseFloat :: String -> Maybe Float
parseFloat s
|1 >= (length $ filter (== '.') s) && all (\x -> elem x ('.' : ['0' .. '9'])) s = Just (read s :: Float)
|otherwise = Nothing
--
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/parse-float.hs | haskell | module ParseFloat where
import Data.Maybe
parseFloat :: String -> Maybe Float
parseFloat s
|1 >= (length $ filter (== '.') s) && all (\x -> elem x ('.' : ['0' .. '9'])) s = Just (read s :: Float)
|otherwise = Nothing
| |
8c8236d8225f1314a5871e8ef96e8e1584cdd9e6c9a3f4aaf5a5b3be5cdcefd1 | fterrier/pylos | telegram.clj | (ns server.handlers.telegram
(:require [cheshire.core :refer [generate-string]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[compojure.core :refer [routes GET POST]]
[game.game :refer [generate-moves]]
[org.httpkit.client :as http]
[... | null | https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/src/clj/server/handlers/telegram.clj | clojure | END OF TELEGRAM CLIENT
TODO what if a player has joined from the web ?
TODO error : it is not your turn to play
END OF MESSAGE PARSER
TODO I18n write a function to transform ID to text messages
TODO maybe write a handler protocol so that we can
reuse this particular method and retrieve-message
we send this blo... | (ns server.handlers.telegram
(:require [cheshire.core :refer [generate-string]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[compojure.core :refer [routes GET POST]]
[game.game :refer [generate-moves]]
[org.httpkit.client :as http]
[... |
6ac50e1c8e5c80f914ced5906301e3fe97b4a0ace1ce781523a62093d29c6b0e | hannesm/domain-name | tests.ml | let n_of_s = Domain_name.of_string_exn
let raw =
let module M = struct
type t = [ `raw ] Domain_name.t
let pp = Domain_name.pp
let equal = Domain_name.equal ~case_sensitive:false
end in (module M: Alcotest.TESTABLE with type t = M.t)
let host =
let module M = struct
type t = [ `host ] Domain_nam... | null | https://raw.githubusercontent.com/hannesm/domain-name/e9833486ee40ef2c49c43dd72976022a627b4a34/tests.ml | ocaml | let n_of_s = Domain_name.of_string_exn
let raw =
let module M = struct
type t = [ `raw ] Domain_name.t
let pp = Domain_name.pp
let equal = Domain_name.equal ~case_sensitive:false
end in (module M: Alcotest.TESTABLE with type t = M.t)
let host =
let module M = struct
type t = [ `host ] Domain_nam... | |
c924b7f215c7b66a60d4078eed4af22225cf11ef8be2d0bc9e52b30e514ffc0a | bmeurer/ocaml-experimental | parsecmmaux.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/testsuite/tests/asmcomp/parsecmmaux.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
val bind_ident: string -> Ide... |
110ee2e3f9edb6a13b82ed699750dc63af7c94b3785f20076a5bb6180b4b39e2 | shayan-najd/NativeMetaprogramming | T5366.hs | module T5366 where
newtype Id a = Id Int
data Foo = Foo {-# UNPACK #-} !(Id Foo) String
data Bar = Bar {-# UNPACK #-} !Foo
f :: Bar -> Int
f (Bar (Foo (Id x) _)) = x
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/simplCore/should_compile/T5366.hs | haskell | # UNPACK #
# UNPACK # | module T5366 where
newtype Id a = Id Int
f :: Bar -> Int
f (Bar (Foo (Id x) _)) = x
|
b2839b1f5da806107d76c73b2e37fa850d43f6fbcf5a0fb6b59dadd7f123c18e | owlbarn/owl_symbolic | onnx_pb.mli | (** onnx.proto Binary Encoding *)
* { 2 Protobuf Encoding }
val encode_version : Onnx_types.version -> Pbrt.Encoder.t -> unit
(** [encode_version v encoder] encodes [v] with the given [encoder] *)
val encode_attribute_proto_attribute_type
: Onnx_types.attribute_proto_attribute_type
-> Pbrt.Encoder.t
-> unit
(... | null | https://raw.githubusercontent.com/owlbarn/owl_symbolic/dc853a016757d3f143c5e07e50075e7ae605d969/src/onnx_specs/onnx_pb.mli | ocaml | * onnx.proto Binary Encoding
* [encode_version v encoder] encodes [v] with the given [encoder]
* [encode_attribute_proto_attribute_type v encoder] encodes [v] with the given [encoder]
* [encode_tensor_proto_segment v encoder] encodes [v] with the given [encoder]
* [encode_string_string_entry_proto v encoder] encode... |
* { 2 Protobuf Encoding }
val encode_version : Onnx_types.version -> Pbrt.Encoder.t -> unit
val encode_attribute_proto_attribute_type
: Onnx_types.attribute_proto_attribute_type
-> Pbrt.Encoder.t
-> unit
val encode_tensor_proto_segment
: Onnx_types.tensor_proto_segment
-> Pbrt.Encoder.t
-> unit
val e... |
46b3177238b7636a7320e0b581eb8689fd1f6a68ca9915d93c28b7cd10f06dff | adamgundry/records-prototype | NewPrototype.hs |
This is a newly revised ( as of January 2015 ) plan for overloaded
record fields in GHC , along the lines of the previous descriptions
but with some significant simplications .
This is a newly revised (as of January 2015) plan for overloaded
record fields in GHC, along the lines of the previous descri... | null | https://raw.githubusercontent.com/adamgundry/records-prototype/590ccfd7bb689c27655ccdb966824d918f7fcaa3/2015/NewPrototype.hs | haskell | ----------------------------------------------------------------------------
Translation of record fields in expressions
----------------------------------------------------------------------------
The 'IsRecordField' class will be used in the translation of record
enabled. Instances of this class give ways to inte... |
This is a newly revised ( as of January 2015 ) plan for overloaded
record fields in GHC , along the lines of the previous descriptions
but with some significant simplications .
This is a newly revised (as of January 2015) plan for overloaded
record fields in GHC, along the lines of the previous descri... |
0509a0b23229bc11a7b3432d81f098450443b86b3f6bc736b3979c067a6fa5b9 | ghc/ghc | Type.hs | module Flavour.Type where
import Expression
import Data.Set (Set)
Please update doc/{flavours.md , user-settings.md } when changing this file .
| ' Flavour ' is a collection of build settings that fully define a GHC build .
-- Note the following type semantics:
* @Bool@ : a plain Boolean flag whose value is kn... | null | https://raw.githubusercontent.com/ghc/ghc/be9dd9b03479070ba6387c251541f4569392c4bb/hadrian/src/Flavour/Type.hs | haskell | Note the following type semantics:
* @Action Bool@: a flag whose value can depend on the build environment.
* @Predicate@: a flag whose value can depend on the build environment and
on the current build target.
| Use these command line arguments.
| Build these packages.
| Bignum backend: 'native', 'gmp', 'ffi', ... | module Flavour.Type where
import Expression
import Data.Set (Set)
Please update doc/{flavours.md , user-settings.md } when changing this file .
| ' Flavour ' is a collection of build settings that fully define a GHC build .
* @Bool@ : a plain Boolean flag whose value is known at compile time .
data Flavour = F... |
9e3acf3572c67909e3d492fb482328becdde3df49b88f2517c478050487284e5 | TheLortex/protocaml | lrcp.mli | val listen : Eio.Net.datagram_socket -> Eio.Net.listening_socket
| null | https://raw.githubusercontent.com/TheLortex/protocaml/acefaf01b486555108f78f82345d2739422178d6/7/lrcp.mli | ocaml | val listen : Eio.Net.datagram_socket -> Eio.Net.listening_socket
| |
3a955be5d9b3bfec517a689b66857f3851125b09c61fe028db5fe5b34b5cbce3 | lhope/cl-bayesnet | test.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; test - Internal test tools to make random networks and evidence.
;;
Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
;;
;; This file is part of cl-bayesnet - a Common Lisp Bayesian Network
Infere... | null | https://raw.githubusercontent.com/lhope/cl-bayesnet/3834f6ec27a297054e9b2f67220161682d63109d/src/test.lisp | lisp |
test - Internal test tools to make random networks and evidence.
This file is part of cl-bayesnet - a Common Lisp Bayesian Network
This file is licensed under the terms of the LLGPL.
This library is free software; you can redistribute it and/or modify
This library is distributed in the hope that it will be u... | Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
Inference Engine .
it under the terms of the Lisp Lesser General Public License version
3 , which consists of the GNU Lesser General Public License , either
version 3 or ( at your option ) any later version , as publ... |
b754ec62b70fa484984aabdedc4cfb7899e55d478874ad09fd012ecca904c8d3 | jcclinton/wow-emulator | unit_model_sup.erl | This is a World of Warcraft emulator written in erlang , supporting
client 1.12.x
%%
Copyright ( C ) 2014 < jamieclinton.com >
%%
%% This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Found... | null | https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/unit_model_sup.erl | erlang |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU G... | This is a World of Warcraft emulator written in erlang , supporting
client 1.12.x
Copyright ( C ) 2014 < jamieclinton.com >
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy... |
a2af7697d1b2fd023885fbcbfb98f12c0cfdfea3a07925cf0d6bdd54f7976dde | tek/chiasma | Screenshot.hs | module Chiasma.Test.Screenshot where
import qualified Data.ByteString as ByteString (writeFile)
import qualified Data.Text as Text (lines, unlines)
import qualified Data.Text.Encoding as Text (encodeUtf8)
import Data.Text.IO (readFile)
import Path (Abs, Dir, File, Path, parent, parseRelFile, toFilePath, (</>))
import ... | null | https://raw.githubusercontent.com/tek/chiasma/c6aef5fa31b8fff049cf480b506d90982f556bf6/packages/test/lib/Chiasma/Test/Screenshot.hs | haskell | module Chiasma.Test.Screenshot where
import qualified Data.ByteString as ByteString (writeFile)
import qualified Data.Text as Text (lines, unlines)
import qualified Data.Text.Encoding as Text (encodeUtf8)
import Data.Text.IO (readFile)
import Path (Abs, Dir, File, Path, parent, parseRelFile, toFilePath, (</>))
import ... | |
874dd8b748bea5fe866bb8c8c44010584588c47746f64185cc5e3908ac814aa0 | DanielG/cabal-helper | Process.hs | cabal - helper : Simple interface to Cabal 's configuration state
Copyright ( C ) 2018 < >
--
SPDX - License - Identifier : Apache-2.0
--
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... | null | https://raw.githubusercontent.com/DanielG/cabal-helper/0e9df088226d80669dd0882ed743bca871dce61c/src/CabalHelper/Compiletime/Process.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
additional options and logging to stderr when verbosity is enabled.
and logging to stderr when verbosity is enabled. | cabal - helper : Simple interface to Cabal 's configuration state
Copyright ( C ) 2018 < >
SPDX - License - Identifier : Apache-2.0
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
|
Module : CabalHelper . Compiletime . Process
Description : System process utilities
Licens... |
a0575d1e0d5389ee4cb4a6e1494c2a9800ddbb5a1d461c160aafcef8703c9ba6 | PLSysSec/FaCT | ctverif.ml | open Util
open Pos
open Err
open Tast
open Tast_util
let sprintf = Printf.sprintf
let concat = String.concat
class ctverifator (m : fact_module) =
object (visit)
val mutable _indent : int = -1
val _minfo : module_info =
let Module(_,_,minfo) = m in minfo
method _prindent n =
"\n" ^ (String... | null | https://raw.githubusercontent.com/PLSysSec/FaCT/c08b2e00751b28e1f25d031c3afafc544acfb892/src/ctverif.ml | ocaml | For every public input value x, generate "public_in(__SMACK_value(x));"
Generate "public_in(__SMACK_value(X));"
TODO: If the return value is public, generate "public_out(__SMACK_return_value());" (restrictive)
TODO: declassify -- (permissive) takes a secret input; allows it to become a public output
TODO: publ... | open Util
open Pos
open Err
open Tast
open Tast_util
let sprintf = Printf.sprintf
let concat = String.concat
class ctverifator (m : fact_module) =
object (visit)
val mutable _indent : int = -1
val _minfo : module_info =
let Module(_,_,minfo) = m in minfo
method _prindent n =
"\n" ^ (String... |
b020b116e221ff6a9075de43e7801df9dac630e3cd2fb92e3a135ed72719316f | chrislomaxjones/part-ii-project | leader.ml | (* leader.ml *)
open Types
open Lwt.Infix
open Core
open Log.Logger
(* Types of leaders *)
type t = {
id : leader_id;
mutable replica_uris : Uri.t list;
mutable acceptor_uris : Uri.t list;
mutable ballot_num : Ballot.t;
mutable active : bool;
mutable proposals : proposal list
}
(* Types of responses that... | null | https://raw.githubusercontent.com/chrislomaxjones/part-ii-project/fb638a6d9759717a610ff8cf2fe985b94f003648/src/leader.ml | ocaml | leader.ml
Types of leaders
Types of responses that can be returned by scout and commander sub-processes
Create a new leader
Sort the list by slot number
Then group by slot number
Finally map over the list of list of pvalues, selecting the proposal corresponding to
the maximum ballot number in ea... |
open Types
open Lwt.Infix
open Core
open Log.Logger
type t = {
id : leader_id;
mutable replica_uris : Uri.t list;
mutable acceptor_uris : Uri.t list;
mutable ballot_num : Ballot.t;
mutable active : bool;
mutable proposals : proposal list
}
type process_response = Adopted of Ballot.t * Pval.t list
... |
4a00424fa93eff43f38b8b3448b5a283b2dacc2686b3bd109189043635f7d9f2 | haskell-game/sdl2 | Power.hs | module SDL.Raw.Power (
-- * Power Management Status
getPowerInfo
) where
import Control.Monad.IO.Class
import Foreign.C.Types
import Foreign.Ptr
import SDL.Raw.Enum
foreign import ccall "SDL.h SDL_GetPowerInfo" getPowerInfoFFI :: Ptr CInt -> Ptr CInt -> IO PowerState
getPowerInfo :: MonadIO m => Ptr CInt -> Ptr ... | null | https://raw.githubusercontent.com/haskell-game/sdl2/a2646ede53d98aebf8f7c49b01f99236701b7e44/src/SDL/Raw/Power.hs | haskell | * Power Management Status | module SDL.Raw.Power (
getPowerInfo
) where
import Control.Monad.IO.Class
import Foreign.C.Types
import Foreign.Ptr
import SDL.Raw.Enum
foreign import ccall "SDL.h SDL_GetPowerInfo" getPowerInfoFFI :: Ptr CInt -> Ptr CInt -> IO PowerState
getPowerInfo :: MonadIO m => Ptr CInt -> Ptr CInt -> m PowerState
getPowerIn... |
591ed1882f69a25b21d0490891fb2a6fa2fb69053c97ab4889da573f70aaa74e | uncomplicate/clojurecl | toolbox_test.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/clojurecl/58f8b9dc42a9b7faa526687c836be23cc2b6e7fd/test/clojure/uncomplicate/clojurecl/toolbox_test.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns uncomplicate.clojurecl.toolbox-test
(:require [midje.sweet :refer :all]
[uncomplicate.commons
[core :refer [release with-release]]
[utils :refer [direct-buffer count-groups]]]
[uncomplicate.clojurecl
[cor... |
5fb9b042ba9352d8f95bc82c8c827a7bf73ca0c5d6a2e16e63c81e47cdd2526f | melange-re/melange | ounit_cmd_util.ml | let ( // ) = Filename.concat
* may nonterminate when [ cwd ] is ' . '
let rec unsafe_root_dir_aux cwd =
if Sys.file_exists (cwd // Literals.bsconfig_json) then cwd
else unsafe_root_dir_aux (Filename.dirname cwd)
let project_root = unsafe_root_dir_aux (Sys.getcwd ())
let jscomp = project_root // "jscomp"
let bsc_e... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/ounit_tests/ounit_cmd_util.ml | ocaml | [dup] can not be 0, 1, 2 | let ( // ) = Filename.concat
* may nonterminate when [ cwd ] is ' . '
let rec unsafe_root_dir_aux cwd =
if Sys.file_exists (cwd // Literals.bsconfig_json) then cwd
else unsafe_root_dir_aux (Filename.dirname cwd)
let project_root = unsafe_root_dir_aux (Sys.getcwd ())
let jscomp = project_root // "jscomp"
let bsc_e... |
dc220b25b0acf8eb4d4ead46843c27c4a58d9a461fae2ba133758e7baf9c18a7 | google/ormolu | transform-multi-line2-out.hs | # LANGUAGE TransformListComp #
bar' xs ys =
[ ( x
, y
)
| x <- xs
, y <- ys
, then
First comment
sortWith
by
(x
Second comment
]
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/comprehension/transform-multi-line2-out.hs | haskell | # LANGUAGE TransformListComp #
bar' xs ys =
[ ( x
, y
)
| x <- xs
, y <- ys
, then
First comment
sortWith
by
(x
Second comment
]
| |
a638473f73595aaa70cc0773c5b96ee4052ace0f0630e4b80d01c98ab0bc00b7 | amuletml/amulet | Parser.hs | module Test.Parser.Parser (tests) where
import Test.Util
import qualified Data.Text.Lazy as L
import qualified Data.Text as T
import Parser.Wrapper (runParser)
import Parser
import qualified Text.Pretty.Note as N
import Text.Pretty.Semantic
result :: String -> T.Text -> T.Text
result file contents =
case runPars... | null | https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/tests/driver/Test/Parser/Parser.hs | haskell | module Test.Parser.Parser (tests) where
import Test.Util
import qualified Data.Text.Lazy as L
import qualified Data.Text as T
import Parser.Wrapper (runParser)
import Parser
import qualified Text.Pretty.Note as N
import Text.Pretty.Semantic
result :: String -> T.Text -> T.Text
result file contents =
case runPars... | |
7bc9a6e10c284a1b4b01fca98091dfa7c6e89755196d346116b3121c785e44dd | Novus-School/novus | router.clj | (ns novus.router
(:require [clojure.string :as string]
[novus.account.routes :as account]
[novus.conversation.routes :as conversation]
[novus.student.routes :as student]
[novus.middleware :as mw]
[muuntaja.core :as m]
[reitit.coercion.spec :as co... | null | https://raw.githubusercontent.com/Novus-School/novus/8a9f9af397383e406e9b4acf9ccc473937afe5a1/novus/src/main/novus/router.clj | clojure | exception/exception-middleware
ring-handler - Creates a ring-handler (function) out of a router | (ns novus.router
(:require [clojure.string :as string]
[novus.account.routes :as account]
[novus.conversation.routes :as conversation]
[novus.student.routes :as student]
[novus.middleware :as mw]
[muuntaja.core :as m]
[reitit.coercion.spec :as co... |
512bc2aa2c2c6c91677e971c24fe34eec1c5a99aeb582eff8fdfec81bd7bdca5 | tdammers/migrant | PostgreSQL_Tests.hs | {-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Database.Migrant.Driver.PostgreSQL_Tests
( tests
)
where
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Data.Text (Text)
import Control.Monad (void)
import System.Environment
import Data.Maybe (fromMaybe)
import Da... | null | https://raw.githubusercontent.com/tdammers/migrant/2bcbd3fc2eae1290f7cba6bd4fc7cc69ac0d24f2/migrant-postgresql-simple/test/Database/Migrant/Driver/PostgreSQL_Tests.hs | haskell | #LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module Database.Migrant.Driver.PostgreSQL_Tests
( tests
)
where
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Data.Text (Text)
import Control.Monad (void)
import System.Environment
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import qualified Da... |
2c76c3b31b4cce0db003880b6bb666f125a6ea19e262637f45038aae42d9d829 | avh4/elm-format | ExtraTest.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.Text.ExtraTest (test_tests) where
import Elm.Utils ((|>))
import Test.Tasty
import Test.Tasty.HUnit
import Data.Text.Extra
test_tests :: TestTree
test_tests =
testGroup "Data.Text.ExtraTest"
[ testCase "when there is no span of the given character" $
l... | null | https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/avh4-lib/test/Data/Text/ExtraTest.hs | haskell | # LANGUAGE OverloadedStrings # | module Data.Text.ExtraTest (test_tests) where
import Elm.Utils ((|>))
import Test.Tasty
import Test.Tasty.HUnit
import Data.Text.Extra
test_tests :: TestTree
test_tests =
testGroup "Data.Text.ExtraTest"
[ testCase "when there is no span of the given character" $
longestSpanOf '*' "stars exist only ... |
28cb3d33b86daa41f33333ee0437e35fed99de0560775d029266dcea8738114a | chef/chef-server | bksw_format.erl | @copyright Chef Software , Inc. All Rights Reserved
@author < >
%%
Licensed to the Apache Software Foundation ( ASF ) under one or more
%% contributor license agreements. See the NOTICE file distributed
%% with this work for additional information regarding copyright
ownership . The ASF licenses this file... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/bookshelf/src/bksw_format.erl | erlang |
contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright
License, Version 2.0 (the "License"); you may not use this file
the License at -2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS ... | @copyright Chef Software , Inc. All Rights Reserved
@author < >
Licensed to the Apache Software Foundation ( ASF ) under one or more
ownership . The ASF licenses this file to you under the Apache
except in compliance with the License . You may obtain a copy of
distributed under the License is distrib... |
6764062508671d8d9ea59fec18af3da0cd0581aef0170ef50dae1483b0566665 | lspitzner/brittany | Test386.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func
:: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
, (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd)
, lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
)
)
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test386.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | func
:: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
, (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd)
, lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
)
)
|
d1bdc0b11a7e8a011b59a40f703a8ffe41467079efc53476980672fb46f1a133 | dvingo/my-clj-utils | devcards_fulcro3.clj | (ns dv.devcards-fulcro3
(:require
[devcards.core :as dc :refer (defcard)]
[taoensso.timbre :as log])
(:import [java.util UUID]))
(defmacro make-card
"Create a devcard for a fulcro component.
Takes symbol of fulcro component and options."
([component]
`(make-card ~component {}))
([component {::ke... | null | https://raw.githubusercontent.com/dvingo/my-clj-utils/cccfe6419c088f9089836b6d9f2572dbf9d66a8a/src/main/dv/devcards_fulcro3.clj | clojure | (ns dv.devcards-fulcro3
(:require
[devcards.core :as dc :refer (defcard)]
[taoensso.timbre :as log])
(:import [java.util UUID]))
(defmacro make-card
"Create a devcard for a fulcro component.
Takes symbol of fulcro component and options."
([component]
`(make-card ~component {}))
([component {::ke... | |
32e9719c94e1d1215038f96d9cc7b52f0b0b466467b1160c737ba94acc2942b2 | racket/libs | info.rkt | #lang setup/infotab
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
(define copy-foreign-libs (quote ("libjpeg-7.dll" "libcairo-2.dll" "libpango-1.0-0.dll" "libexpat-1.dll" "libpng14-14.dll" "zlib1.dll" "freetype6.dll" "libfontconfig-1.dll" "libglib-2.0-0.dll" "libgobject-2.0-0.dll" "libgmodule-2.0-0.dll" "libpa... | null | https://raw.githubusercontent.com/racket/libs/ebcea119197dc0cb86be1ccbbfbe5806f7280976/draw-win32-i386/racket/draw/info.rkt | racket | #lang setup/infotab
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
(define copy-foreign-libs (quote ("libjpeg-7.dll" "libcairo-2.dll" "libpango-1.0-0.dll" "libexpat-1.dll" "libpng14-14.dll" "zlib1.dll" "freetype6.dll" "libfontconfig-1.dll" "libglib-2.0-0.dll" "libgobject-2.0-0.dll" "libgmodule-2.0-0.dll" "libpa... | |
e523f358d5d8189b3f5b1a7080d61df61195eee6251dc1002ef574e0caa5dbb5 | arrdem/shelving | parser.clj | (ns shelving.query.parser
"Implementation details of the shelving query parser."
{:authors ["Reid \"arrdem\" McKenzie <>"],
:license "Eclipse Public License 1.0",
:added "0.0.0"}
(:require [clojure.spec.alpha :as s]
[clojure.core.specs.alpha :as cs]
[clojure.test.check.generators :... | null | https://raw.githubusercontent.com/arrdem/shelving/27439bfcb2f3438d5b23fcd468360bda491002f1/src/main/clj/shelving/query/parser.clj | clojure | FIXME lolsob
seq-style datalog
Note that these apparently can't use conformers to simplify because they all inhabit the same seq
of inputs? Not sure how spec is handling the regex walk.
workaround to -2003
just write out the possibilities as an s/alt which will unform
map-style datalog
expose both styles as ::... | (ns shelving.query.parser
"Implementation details of the shelving query parser."
{:authors ["Reid \"arrdem\" McKenzie <>"],
:license "Eclipse Public License 1.0",
:added "0.0.0"}
(:require [clojure.spec.alpha :as s]
[clojure.core.specs.alpha :as cs]
[clojure.test.check.generators :... |
50fd9aaf0ffd9917ce8b83b3ad4b655bf0e8d31a1d1272f4beb3784e2638c703 | mirage/mirage | functoria_test.ml | open Functoria
open Action.Syntax
let prelude i =
Action.with_output ~path:(Info.main i) ~purpose:"init tests" @@ fun ppf ->
Fmt.pf ppf
Geneated by functoria_test
let (>>=) x f = f x
let return x = x
let run x = x
|}
let run ?(keys = []) ?init context device =
let t = Impl.abstract device in
let keys = ke... | null | https://raw.githubusercontent.com/mirage/mirage/bf5520527c304ca37795eb454ec0d3d5714d0963/test/functoria-test/functoria_test.ml | ocaml | open Functoria
open Action.Syntax
let prelude i =
Action.with_output ~path:(Info.main i) ~purpose:"init tests" @@ fun ppf ->
Fmt.pf ppf
Geneated by functoria_test
let (>>=) x f = f x
let return x = x
let run x = x
|}
let run ?(keys = []) ?init context device =
let t = Impl.abstract device in
let keys = ke... | |
6e935c027cef5c9b77fabdefc9188151ce6e976e4efef53e268c6c278c45c5f4 | fission-codes/fission | Class.hs | module Fission.Web.Server.Domain.Retriever.Class (Retriever (..)) where
import qualified Database.Persist as Persist
import Fission.Prelude
import Fission.Error
import Fission.URL.DomainName.Types
import Fission.Web.Server.Models
import Fission.Web.S... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Domain/Retriever/Class.hs | haskell | module Fission.Web.Server.Domain.Retriever.Class (Retriever (..)) where
import qualified Database.Persist as Persist
import Fission.Prelude
import Fission.Error
import Fission.URL.DomainName.Types
import Fission.Web.Server.Models
import Fission.Web.S... | |
857f9cddbd77f03868f696a7418b3911052efb199b24356403c911cd6e99d503 | eu90h/ascii-painter | point.rkt | #lang racket
(require racket/unsafe/ops)
(provide (struct-out pt)
(contract-out
[pt-add (-> pt/c pt/c pt/c)]
[pt-sub (-> pt/c pt/c pt/c)]
[pt-mag (-> pt/c integer?)])
unsafe-pt-x
unsafe-pt-y)
(struct pt (x y) #:transparent)
(define pt/c (struct/c pt integer... | null | https://raw.githubusercontent.com/eu90h/ascii-painter/23297b324d855c96d3ca12742f4991e7c10127be/point.rkt | racket | Pt Pt -> Pt
Pt Pt -> Pt
Pt -> Number | #lang racket
(require racket/unsafe/ops)
(provide (struct-out pt)
(contract-out
[pt-add (-> pt/c pt/c pt/c)]
[pt-sub (-> pt/c pt/c pt/c)]
[pt-mag (-> pt/c integer?)])
unsafe-pt-x
unsafe-pt-y)
(struct pt (x y) #:transparent)
(define pt/c (struct/c pt integer... |
96ab244b4495be4dab4af524bc42f3455772c748f7a8fba0cbc61cdc85b1c2d2 | LaurentRDC/hakyll-images | CompressJpg.hs | # LANGUAGE GeneralisedNewtypeDeriving #
-- |
Module : Hakyll . Images .
-- Description : Hakyll compiler to compress Jpeg images
Copyright : ( c ) , 2019 - present
-- License : BSD3
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
This module defines a Hakyll compiler , ... | null | https://raw.githubusercontent.com/LaurentRDC/hakyll-images/5f9284a97f3fc8f056a79fd5321c39e56622c93f/library/Hakyll/Images/CompressJpg.hs | haskell | |
Description : Hakyll compiler to compress Jpeg images
License : BSD3
Maintainer :
Stability : unstable
Portability : portable
re-encode Jpeg images at a lower quality during website compilation. Original images are
The @compressJpgCompiler@ is expected to be used like this:
@
... | # LANGUAGE GeneralisedNewtypeDeriving #
Module : Hakyll . Images .
Copyright : ( c ) , 2019 - present
This module defines a Hakyll compiler , ' compressJpgCompiler ' , which can be used to
left unchanged , but compressed images can be up to 10x smaller .
import Hakyll
import Hakyll . ... |
1b58d00ba5b4fc875a4748b79e5f37192df46699a7a217d02928cd5d512ffa88 | dlowe-net/orcabot | poetry.lisp | (in-package #:orcabot)
(defmodule poetry poetry-module ()
(syllables :accessor syllables-of)
(haiku-enabled-p :accessor haiku-enabled-p :initform nil)
(tmnt-enabled-p :accessor tmnt-enabled-p :initform nil)
(camptown-enabled-p :accessor camptown-enabled-p :initform nil))
(defmethod initialize-module ((module ... | null | https://raw.githubusercontent.com/dlowe-net/orcabot/f1aec0f6d8765c4671a8be045bbe90ef58d91406/src/poetry.lisp | lisp | secondary stress can be either
remove pronounciation
fail if a word can't be found. We don't
want any false positives.
single words can match stressed or unstressed parts
no false positives
TEENAGE MUTANT NINJA TURTLES
Camptown ladies sing this song | (in-package #:orcabot)
(defmodule poetry poetry-module ()
(syllables :accessor syllables-of)
(haiku-enabled-p :accessor haiku-enabled-p :initform nil)
(tmnt-enabled-p :accessor tmnt-enabled-p :initform nil)
(camptown-enabled-p :accessor camptown-enabled-p :initform nil))
(defmethod initialize-module ((module ... |
7822e9619b1a7ef83b40e61cfe7e4207bcb9d07a9a8b92f2872650448c88058a | bradparker/bradparker.com | Builder.hs | # LANGUAGE BlockArguments #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NoFieldSelectors #
# LANGUAGE OverloadedRecordDot #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -Wall #
module Builder
( build,
inputFile,
outputFile,
copyFile,
toFile,
getDirectoryFiles,
... | null | https://raw.githubusercontent.com/bradparker/bradparker.com/843775de5d7939939c67043d9233706df2d7fd63/bradparker.com/usr/local/src/bradparker.com/builder/Builder.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE BlockArguments #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NoFieldSelectors #
# LANGUAGE OverloadedRecordDot #
# OPTIONS_GHC -Wall #
module Builder
( build,
inputFile,
outputFile,
copyFile,
toFile,
getDirectoryFiles,
getConfig,
Builder,
Config (..),
)
where
import qu... |
89f64aec1601d57efc41f1320c376c0d6949b3b32c664835cc38e8f2ced7e249 | jfischoff/hasql-queue | AtMostOnceSpec.hs | module Hasql.Queue.Low.AtMostOnceSpec where
import Hasql.Queue.Low.AtMostOnce
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
import Test.Hspec (Spec, describe, parallel, it)
import Test.Hspec.Expectations.Lifted
import Test.Hspec.Cor... | null | https://raw.githubusercontent.com/jfischoff/hasql-queue/49f4cba713bedf6ce907cc89794f2567befed396/test/Hasql/Queue/Low/AtMostOnceSpec.hs | haskell | module Hasql.Queue.Low.AtMostOnceSpec where
import Hasql.Queue.Low.AtMostOnce
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
import Test.Hspec (Spec, describe, parallel, it)
import Test.Hspec.Expectations.Lifted
import Test.Hspec.Cor... | |
30640b972477f294586c858a6c22625c8359e2ad1d881dde133efdff05d8441b | exoscale/clojure-kubernetes-client | v1_job.clj | (ns clojure-kubernetes-client.specs.v1-job
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1-job-spec :refer :all]
[clojure-kubernetes-client.specs.v1-job-s... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_job.clj | clojure | (ns clojure-kubernetes-client.specs.v1-job
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1-job-spec :refer :all]
[clojure-kubernetes-client.specs.v1-job-s... | |
a1895d8e11ba1ff1d26b57b4c44805ee64c37571e4c000fec1bb948f29fe21ad | cabol/cross_db | xdb_transaction_test.erl | -module(xdb_transaction_test).
%% Common Test
-export([
init_per_testcase/2,
end_per_testcase/2
]).
%% Test Cases
-export([
t_transaction/1,
t_transaction_error/1,
t_in_transaction/1,
t_rollback/1
]).
-import(xdb_ct, [assert_error/2]).
%%%=================================================================... | null | https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/src/test/xdb_transaction_test.erl | erlang | Common Test
Test Cases
===================================================================
CT
===================================================================
===================================================================
Test Cases
=================================================================== | -module(xdb_transaction_test).
-export([
init_per_testcase/2,
end_per_testcase/2
]).
-export([
t_transaction/1,
t_transaction_error/1,
t_in_transaction/1,
t_rollback/1
]).
-import(xdb_ct, [assert_error/2]).
-spec init_per_testcase(atom(), xdb_ct:config()) -> xdb_ct:config().
init_per_testcase(_, Config... |
1978ed6e90eef0ee11c150119a12b5d894822ec02c5f2830d850294738b5fe95 | cnuernber/libjulia-clj | collections.clj | (ns libjulia-clj.impl.collections
(:require [libjulia-clj.impl.base :as base]
[libjulia-clj.impl.protocols :as julia-proto]
[libjulia-clj.impl.ffi :as julia-ffi]
[tech.v3.datatype.pprint :as dtype-pp]
[tech.v3.datatype.ffi :as dt-ffi])
(:import [java.util Map Iterator... | null | https://raw.githubusercontent.com/cnuernber/libjulia-clj/6c2b49e598e980e2c30f62082685797f0d99374f/src/libjulia_clj/impl/collections.clj | clojure | (ns libjulia-clj.impl.collections
(:require [libjulia-clj.impl.base :as base]
[libjulia-clj.impl.protocols :as julia-proto]
[libjulia-clj.impl.ffi :as julia-ffi]
[tech.v3.datatype.pprint :as dtype-pp]
[tech.v3.datatype.ffi :as dt-ffi])
(:import [java.util Map Iterator... | |
d3bb33a66545998219c34bd421dbcba438d8eea0fafa0d1b8e78a90bf5127c55 | joearms/paradis | par_server.erl | -module(par_server).
-export([start_parallel_server/1]).
start_parallel_server(Port) ->
{ok, Listen} = gen_tcp:listen(Port, [options]),
spawn(fun() -> connect(Listen) end).
connect(Listen) ->
{ok, Socket} = gen_tcp:accept(Listen),
spawn(fun() -> connect(Listen) end),
loop(Socket).
loop(Socket) ->... | null | https://raw.githubusercontent.com/joearms/paradis/62055b8db643926fd86c8b79f038beb9ac50916f/examples/name_server/par_server.erl | erlang | -module(par_server).
-export([start_parallel_server/1]).
start_parallel_server(Port) ->
{ok, Listen} = gen_tcp:listen(Port, [options]),
spawn(fun() -> connect(Listen) end).
connect(Listen) ->
{ok, Socket} = gen_tcp:accept(Listen),
spawn(fun() -> connect(Listen) end),
loop(Socket).
loop(Socket) ->... | |
f80da8a19e96c048f07fe7e911fa4abe9fc43913505b008cf3980463c4198aa0 | haskell-opengl/GLUT | Multisamp.hs |
Multisamp.hs ( adapted from multisamp.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program draws shows how to use multisampling to draw anti - ... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/Multisamp.hs | haskell | Print out state values related to multisampling. Create display list with
"pinwheel" of lines and triangles.
resolve overloading, not needed in "real" programs
multisampling against its absence.
draws the other display list
resolve overloading, not needed in "real" programs
mode, and handle input events. |
Multisamp.hs ( adapted from multisamp.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program draws shows how to use multisampling to draw anti - ... |
d2c20136668b0c4a7fb3c11c58dc9f708adb11fa2a7a04fadfee9067bd196c66 | uw-unsat/leanette-popl22-artifact | rosette.rkt | #lang s-exp rosette
(require
racket/hash
(only-in rosette term-cache constant? model sat)
(only-in rosette/base/core/type solvable-default get-type))
(provide solve/evaluate/concretize symbolic-void symbolic-boolean rosette-eq?)
(define concretize
(case-lambda
[(sol)
(concretize sol (filter constant... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/bagpipe/src/bagpipe/racket/main/util/rosette.rkt | racket | #lang s-exp rosette
(require
racket/hash
(only-in rosette term-cache constant? model sat)
(only-in rosette/base/core/type solvable-default get-type))
(provide solve/evaluate/concretize symbolic-void symbolic-boolean rosette-eq?)
(define concretize
(case-lambda
[(sol)
(concretize sol (filter constant... | |
d16448d6cbf2867e0d482ff508f3be65ee3fb009df952d6f32386d0f8586bbe6 | kongeor/evolduo-app | mailer.clj | (ns evolduo-app.mailer
(:require [postal.core :as postal]
[evolduo-app.mailjet :as mailjet]
[evolduo-app.model.user :as user]
[evolduo-app.model.mail :as mail]
[evolduo-app.model.news :as news]
[hiccup.core :as html]
[next.jdbc :as jdbc]
... | null | https://raw.githubusercontent.com/kongeor/evolduo-app/e97e389e3ce7edf06a4e6fc0ad4de8a273ef229f/src/evolduo_app/mailer.clj | clojure | common
needed for the list application above | (ns evolduo-app.mailer
(:require [postal.core :as postal]
[evolduo-app.mailjet :as mailjet]
[evolduo-app.model.user :as user]
[evolduo-app.model.mail :as mail]
[evolduo-app.model.news :as news]
[hiccup.core :as html]
[next.jdbc :as jdbc]
... |
78fc311e7393faa0d49440c356d31898d022028fb618e21a75e59d06a9b6ddca | tmfg/mmtis-national-access-point | reports.cljs | (ns ote.views.admin.reports
"Admin panel views. Note this has a limited set of users and is not
currently localized, all UI text is in Finnish."
(:require [stylefy.core :as stylefy]
[ote.ui.common :refer [linkify]]
[ote.style.base :as style-base]))
(defn reports
[e!]
[:div
[:h2 "Pa... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/144a2ea55041b5a5e0753cd2c58d065ca0466d2a/ote/src/cljs/ote/views/admin/reports.cljs | clojure | (ns ote.views.admin.reports
"Admin panel views. Note this has a limited set of users and is not
currently localized, all UI text is in Finnish."
(:require [stylefy.core :as stylefy]
[ote.ui.common :refer [linkify]]
[ote.style.base :as style-base]))
(defn reports
[e!]
[:div
[:h2 "Pa... | |
6076777b1d43e70b6a16edaaab5f7b94420320abc4cdcbb77156c04c7b79cb36 | ocaml-multicore/tezos | tx_rollup_repr.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 - 2022 Marigold < >
Copyright ( c )... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/tx_rollup_repr.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 - 2022 Marigold < >
Copyright ( c ) 2021 - 2022 Nomadic Labs < >
Copyright ( c ) 2022 Oxhead Alpha < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons ... |
d92cf64cd6b517cb975dcae17f0b24b25f19a9dd6e53ef4a4e36f3d925e5a722 | mhjort/huutopussi | project.clj | (defproject huutopussi-server "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.11.1"]
[compojure "1.7.0"]
[medley "1.4.0"]
[metosin/malli "0.10.1"]
[org.clojure/to... | null | https://raw.githubusercontent.com/mhjort/huutopussi/4445b896eba3008ddf4c80685af0114ad2131f4d/project.clj | clojure | (defproject huutopussi-server "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.11.1"]
[compojure "1.7.0"]
[medley "1.4.0"]
[metosin/malli "0.10.1"]
[org.clojure/to... | |
8530e518e876eb0d011a969794ac192602cb27149a9150ee240e237e5ddfa834 | gas2serra/cldk | server.lisp | (in-package :cldk-driver-clx)
(defclass clx-display (clx-driver
cldki::kerneled-display-mixin
multi-threaded-driver-mixin
driver-with-thread-mixin)
())
(defmethod cldki::driver-loop-step ((server clx-display))
(driver-process-next-events server)... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/Drivers/CLX/server.lisp | lisp | (in-package :cldk-driver-clx)
(defclass clx-display (clx-driver
cldki::kerneled-display-mixin
multi-threaded-driver-mixin
driver-with-thread-mixin)
())
(defmethod cldki::driver-loop-step ((server clx-display))
(driver-process-next-events server)... | |
5410609be8706ca22f9819ce8f976c37193ee559b1993aeb63c9fc2db8940373 | mfoemmel/erlang-otp | ex_cursor.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 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 Public Lic... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/examples/demo/ex_cursor.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 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(ex_cursor).
-behaviour(wx_object).
-exp... |
78a92392c4f6290cccf5378b3e5fb8368d1db4d0f23bf902e65b742525c0fe1b | uw-unsat/leanette-popl22-artifact | run.rkt | #lang racket
(require racket/runtime-path)
(require "../../src/bagpipe/racket/main/bagpipe.rkt")
(define-runtime-path root ".")
(time (verify (list (path->string root) "scenario4" "broken")))
(system "rm **/*.bak")
| null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/bagpipe/setups/textbook/run.rkt | racket | #lang racket
(require racket/runtime-path)
(require "../../src/bagpipe/racket/main/bagpipe.rkt")
(define-runtime-path root ".")
(time (verify (list (path->string root) "scenario4" "broken")))
(system "rm **/*.bak")
| |
331a23c9c25322ebfeadb8e83906830e8a35c518a396fa607d3ecf072233c79c | rbkmoney/machinegun | machinegun_configuration_utils.erl | %%%
Copyright 2020 RBKmoney
%%%
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
distri... | null | https://raw.githubusercontent.com/rbkmoney/machinegun/627130675ad6e7ee2127126740fe369542905b4b/src/machinegun_configuration_utils.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2020 RBKmoney
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(machinegun_configuration_utils).
-include_lib("kernel/include/file.hrl").
-export([parse_yaml_config/1]).
-export([write_files/1]).
-export(... |
cff0b10d53920c9d5887aafcb7b0668520da9857bc2b092550e6f3b79eaec34f | onedata/op-worker | file_attr_translator.erl | %%%--------------------------------------------------------------------
@author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% Module providing translation fun... | null | https://raw.githubusercontent.com/onedata/op-worker/afc25178632796e095468a491a7d91b9d47aeafb/src/modules/fslogic/translators/file_attr_translator.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
Module providing translation functions for file attr.
@end
--------------------------------------------------------------------
========================================... | @author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(file_attr_translator).
-author("Michal Stanisz").
-include("global_definitions.hrl").
-export([
to_json/1, to_json/2,
build_optional_attrs_opt/1,
select_attrs/2
]).
-spec to_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.