_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 |
|---|---|---|---|---|---|---|---|---|
65d2ab2e206de95f1047054a473bc927352b516eb32fe97acf609cd83e8940a0 | gebi/jungerl | edoc_parse_contact.erl | %% =====================================================================
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation ; either version 2 of the
%% License, or (at your option) any lat... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/edoc/src/edoc_parse_contact.erl | erlang | =====================================================================
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, ... | published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307
USA
$ Id$
@private
2003
@author < >
@doc EDoc " contact information " parsing . This is... |
99e28d831b8e6dbbc1b14a5b580890a74ba5e5a5db46a4bfb04dd13438458695 | lem-project/lem | showparen.lisp | (defpackage :lem.show-paren
(:use :cl :lem)
(:export :showparen-attribute
:forward-matching-paren
:backward-matching-paren)
#+sbcl
(:lock t))
(in-package :lem.show-paren)
(defvar *brackets-overlays* '())
(define-attribute showparen-attribute
(t :background "cyan"))
(define-editor-vari... | null | https://raw.githubusercontent.com/lem-project/lem/00990559c3bb1c2ee4d07627fd7617a10eff4bbc/src/ext/showparen.lisp | lisp | (defpackage :lem.show-paren
(:use :cl :lem)
(:export :showparen-attribute
:forward-matching-paren
:backward-matching-paren)
#+sbcl
(:lock t))
(in-package :lem.show-paren)
(defvar *brackets-overlays* '())
(define-attribute showparen-attribute
(t :background "cyan"))
(define-editor-vari... | |
db266dcc153f487058b0145b52b2ae1c6c9205ae14ec07da332abae9decfdce8 | racket/compiler | embed-me15.rkt | #lang racket/base
(require (submod "embed-me15-one.rkt" one))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is ~a.\n" (+ 9 one two three)))
#:exists 'append)
| null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/embed/embed-me15.rkt | racket | #lang racket/base
(require (submod "embed-me15-one.rkt" one))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is ~a.\n" (+ 9 one two three)))
#:exists 'append)
| |
18085bbe501b07825f5e4a990e6240a91a19a984c1c11772aa7d59eafe6de4e2 | Tehnix/miso-isomorphic-stack | Spec.hs | import Test.Hspec
import qualified Frontend.UpdateSpec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Frontend.UpdateSpec" Frontend.UpdateSpec.spec
| null | https://raw.githubusercontent.com/Tehnix/miso-isomorphic-stack/61fa5192f525f5b5b8d84d4384eb5cbdea4f7dbf/frontend/test/Spec.hs | haskell | import Test.Hspec
import qualified Frontend.UpdateSpec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Frontend.UpdateSpec" Frontend.UpdateSpec.spec
| |
f32af75ee773ebb226d228cccea1f26d2b195e89357a56fdad56ea574fb2a091 | utdemir/distributed-dataset | Archive.hs | # LANGUAGE BinaryLiterals #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-
This module contains the executables for the Lambda function.
-}
module Control.Distributed.Fork.AWS.Lambda.Internal.Archive
( Archive (..),
mkArchive,
archiveSize,
archiveChecksum,
)
where
import Codec.Archive.Zi... | null | https://raw.githubusercontent.com/utdemir/distributed-dataset/a582a96e541884580e66bc5d87b4d498c8d58182/distributed-dataset-aws/src/Control/Distributed/Fork/AWS/Lambda/Internal/Archive.hs | haskell |
This module contains the executables for the Lambda function.
And we read the current executable.
Since it'll run on AWS Lambda, it needs to be a statically linked Linux
executable, so we do a preliminary check here.
And we're going to put all of them in a zip archive.
rwx | # LANGUAGE BinaryLiterals #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
module Control.Distributed.Fork.AWS.Lambda.Internal.Archive
( Archive (..),
mkArchive,
archiveSize,
archiveChecksum,
)
where
import Codec.Archive.Zip hiding (Archive)
import Control.Distributed.Fork.AWS.Lambda.Intern... |
08cc08d866558fc2cc59b86221bb7e68bb950ff4e98d9ed37254661c43f1d66a | exercism/babashka | interest_is_interesting_test.clj | (ns interest-is-interesting-test
(:require [clojure.test :refer [deftest testing is]]
interest-is-interesting))
(deftest minimal-first-interest-rate-test
(is (= 0.5 (interest-is-interesting/interest-rate 0M))))
(deftest tiny-first-interest-rate-test
(is (= 0.5 (interest-is-interesting/interest-rate ... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/interest-is-interesting/test/interest_is_interesting_test.clj | clojure | (ns interest-is-interesting-test
(:require [clojure.test :refer [deftest testing is]]
interest-is-interesting))
(deftest minimal-first-interest-rate-test
(is (= 0.5 (interest-is-interesting/interest-rate 0M))))
(deftest tiny-first-interest-rate-test
(is (= 0.5 (interest-is-interesting/interest-rate ... | |
275b7cbae72c7e18de7f693941231c587d9fe0356e80629a69aab5ba9c5de1d0 | tobiasbehr/camunda-clojure | repository.clj | (ns camunda-clojure.repository)
(defn resource-definition->clj [resource]
{
:deployment-id (.getDeploymentId resource)
:resource-name (.getResourceName resource)
:diagram-resource-name (.getDiagramResourceName resource)
:version (.getVersion resource)
:category (.getCategory resource)
:history-ttl (.getHi... | null | https://raw.githubusercontent.com/tobiasbehr/camunda-clojure/8eae8b3aba2254bce2c54d5e3c9e050ab50157e4/src/camunda_clojure/repository.clj | clojure | (ns camunda-clojure.repository)
(defn resource-definition->clj [resource]
{
:deployment-id (.getDeploymentId resource)
:resource-name (.getResourceName resource)
:diagram-resource-name (.getDiagramResourceName resource)
:version (.getVersion resource)
:category (.getCategory resource)
:history-ttl (.getHi... | |
17a890a45d33ea1f6af72fdaab1da061f6f3bf826a00ba669e462d2b3c7e77e5 | GaloisInc/daedalus | BackwardSymbolic.hs | {-# Language OverloadedStrings #-}
# Language GeneralizedNewtypeDeriving #
--------------------------------------------------------------------------------
-- Deprecated (slow)
--------------------------------------------------------------------------------
FIXME : much of this file is similar to Synthesis , maybe ... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/6859e24fe820b174487a62ac13ac63130319ffe5/talos/src/Talos/Strategy/BackwardSymbolic.hs | haskell | # Language OverloadedStrings #
------------------------------------------------------------------------------
Deprecated (slow)
------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
Backtracking random s... | # Language GeneralizedNewtypeDeriving #
FIXME : much of this file is similar to Synthesis , maybe factor out commonalities
module Talos.Strategy.BackwardSymbolic (backwardSymbolicStrat) where
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.ByteString as BS
import Data.List (foldl', pa... |
67c37eebdb95ca50d5ca3bd2d035ab855eb800e93654c0ec4ab148dba7304def | fatho/kos-c | CodeGen.hs | {-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module KOSC.Compiler.CodeGen where
import Control.Lens
import Control.Mo... | null | https://raw.githubusercontent.com/fatho/kos-c/3829ee41f71ab0bbcfc5229e1b64b5daf5cce23b/src/KOSC/Compiler/CodeGen.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
| The type of generated names. Mainly used for identifying what a function actually returns instead of just text.
| Type of generated code.
| Possible declarations for things th... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module KOSC.Compiler.CodeGen where
import Control.Lens
import Control.Monad.State
import Data.List
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import ... |
fde18827ef1047337dfa171bc14745702ff004a5e197c1ea69f1dea5e69fd555 | clojure-interop/aws-api | AmazonSimpleWorkflow.clj | (ns com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflow
"Interface for accessing Amazon SWF.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonSimpleWorkflow instead.
Amazon Simple Workflow Service
The Amazon Simple Workflow Service (Am... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simpleworkflow/src/com/amazonaws/services/simpleworkflow/AmazonSimpleWorkflow.clj | clojure | (ns com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflow
"Interface for accessing Amazon SWF.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonSimpleWorkflow instead.
Amazon Simple Workflow Service
The Amazon Simple Workflow Service (Am... | |
b838452373cc6805d7222e19ecd23041d321e7476a039b90ba017721e172e9f3 | ocramz/petsc-hs | Utils.hs | # LANGUAGE TypeFamilies , FlexibleInstances #
{-# LANGUAGE BangPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numerical.PETSc.Internal.Utils
Copyright : ( c ) 2015
-- License : LGPL3
Maintainer : zocca . . gmail . com
-- Stability ... | null | https://raw.githubusercontent.com/ocramz/petsc-hs/d74a468da0dbc867d2ea25f280c7892cc54add48/src/Numerical/PETSc/Internal/Utils.hs | haskell | # LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
Module : Numerical.PETSc.Internal.Utils
License : LGPL3
Stability : experimental
| Miscellaneous utilities
---------------------------------------------------------------------------
import GHC.... | # LANGUAGE TypeFamilies , FlexibleInstances #
Copyright : ( c ) 2015
Maintainer : zocca . . gmail . com
module Numerical.PETSc.Internal.Utils where
import Foreign.C.Types
import Foreign.C.String
import Foreign.Ptr
import Foreign
import Data.Functor ((<$>))
import Control.Applicative ((<*>))
import Con... |
5da97cca6c91dae55976ebb3ba6f3de8344b8e191fae59bf15a3bee445ec4c37 | gcv/appengine-magic | multipart_params.clj | This code is adapted from Ring ( ) and patches
by
;;; ().
;;;
Required change from Ring : use of the streaming multipart API instead of the
temporary file API from Apache Commons FileUpload .
(ns appengine-magic.multipart-params
(:import [org.apache.commons.fileupload.servlet ServletFileUpload]
... | null | https://raw.githubusercontent.com/gcv/appengine-magic/facc9fe4945b3becd772d6b053844e572dcc1c73/src/appengine_magic/multipart_params.clj | clojure | ().
| This code is adapted from Ring ( ) and patches
by
Required change from Ring : use of the streaming multipart API instead of the
temporary file API from Apache Commons FileUpload .
(ns appengine-magic.multipart-params
(:import [org.apache.commons.fileupload.servlet ServletFileUpload]
[org.apach... |
32978374999192f199d0193089f444d68df3a121aaccf570b035fd992707f65a | argp/bap | batConcurrent.ml |
* Concurrent - Generic interface for concurrent operations
* Copyright ( C ) 2008 , LIFO , Universite d'Orleans
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; eit... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batConcurrent.ml | ocaml | * The type of a lock.
* The type of a lock. |
* Concurrent - Generic interface for concurrent operations
* Copyright ( C ) 2008 , LIFO , Universite d'Orleans
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; eit... |
11098030494120ecc4091336fbfd89632b13ff1f0d8a52b1a3f402e2a3198bea | camlp4/camlp4 | Camlp4OCamlRevisedParserParser.ml | open Camlp4; (* -*- camlp4r -*- *)
(****************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParserParser.ml | ocaml | -*- camlp4r -*-
**************************************************************************
OCaml
... | Copyright 1998 - 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - Daniel de Rauglaudre : initial version
* - : refactoring
... |
6273dfefc664361d1125f88168855b59ced9cfb4b7a76043c007d2eed6e2c42d | degree9/enterprise | multi_tenant.cljs | (ns degree9.multi-tenant
(:require [degree9.object :as obj]
[degree9.debug :as dbg]
[degree9.env :as env]
[degree9.hooks :as hooks]))
(dbg/defdebug debug "degree9:enterprise:multi-tenant")
(defn current-tenant [field]
(fn [context]
(if-let [tenant (env/get "APP_TENANT_ID")]... | null | https://raw.githubusercontent.com/degree9/enterprise/65737c347e513d0a0bf94f2d4374935c7270185d/src/degree9/multi_tenant.cljs | clojure | (ns degree9.multi-tenant
(:require [degree9.object :as obj]
[degree9.debug :as dbg]
[degree9.env :as env]
[degree9.hooks :as hooks]))
(dbg/defdebug debug "degree9:enterprise:multi-tenant")
(defn current-tenant [field]
(fn [context]
(if-let [tenant (env/get "APP_TENANT_ID")]... | |
3afd6c97d41ddd77ac5b67591b1fba670c25b27816f5208d9ac03f4d61a7a713 | byulparan/cl-collider | ugen.lisp |
(in-package #:sc)
;;; header ---------------------------------------------------------------------------------------------------------
(defvar *synthdef* nil)
(defconstant +inf+
#+(or ccl lispworks) 1F++0
#+sbcl sb-ext:single-float-positive-infinity
#+ecl ;; ext:single-float-positive-infinity // this is righ... | null | https://raw.githubusercontent.com/byulparan/cl-collider/c2963d2e7481fa08e11fc4c06b05f2dce1d3d86c/ugen.lisp | lisp | header ---------------------------------------------------------------------------------------------------------
ext:single-float-positive-infinity // this is right value. but it signal a #<FLOATING-POINT-OVERFLOW>. maybe it's ecl's bug
check inputs -------------------------------------------------------------------... |
(in-package #:sc)
(defvar *synthdef* nil)
(defconstant +inf+
#+(or ccl lispworks) 1F++0
#+sbcl sb-ext:single-float-positive-infinity
ext::most-positive-single-float)
(defgeneric new1 (ugen &rest inputs))
(defgeneric add-to-synth (ugen))
(defgeneric init-topo-sort (ugen))
(defgeneric add-ugen (synthdef ug... |
8ab31dc6f80cee847a24250a357605933d81a45107b0fe3013f96bf2b7b1c4a3 | jeromesimeon/Galax | ast_walker_rewrite_context.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast_walker/ast_walker_rewrite_context.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : ast_walker_rewrite_context.ml , v 1.2 2007/02/01 22:08:45 simeon Exp $
open Xquery_core_ast
open Xquery_type_core_ast
Note :
A rule takes a context ( including rules ) , an acexpr , and returns
an acexpr , plus a b... |
5efbf00eebc35694fe5d79fdfc5c8ca9a612ddb62534522b50209f67969a455a | ekmett/unboxed | Ur.hs | {-# Language StandaloneKindSignatures #-}
{-# Language RoleAnnotations #-}
{-# Language MagicHash #-}
# Language UnboxedTuples #
{-# Language PolyKinds #-}
{-# Language DataKinds #-}
{-# Language GADTs #-}
{-# Language UnliftedNewtypes #-}
# Language MultiParamTypeClasses #
{-# Language BlockArguments #-}
{-# Language ... | null | https://raw.githubusercontent.com/ekmett/unboxed/2f8bf0c92f3d584c8d154c037ca4c7747b6d9f65/internal/Unboxed/Internal/Linear/Ur.hs | haskell | # Language StandaloneKindSignatures #
# Language RoleAnnotations #
# Language MagicHash #
# Language PolyKinds #
# Language DataKinds #
# Language GADTs #
# Language UnliftedNewtypes #
# Language BlockArguments #
# Language ImportQualifiedPost #
# Language FlexibleInstances #
# Language ScopedTypeVariables #
# Language... | # Language UnboxedTuples #
# Language MultiParamTypeClasses #
# Language NoImplicitPrelude #
module Unboxed.Internal.Linear.Ur where
import GHC.Exts
import Prelude qualified
import Prelude (showParen, showString, showsPrec, ($), (.), (<$>), (>=))
type Ur :: forall (r :: RuntimeRep). TYPE r -> TYPE r
type role Ur rep... |
75afbeb31c9719e9ee74f8295bf70643f33b72d8d88cdc6ea5fbb2b91aac8fb7 | VisionsGlobalEmpowerment/webchange | icon_play.cljs | (ns webchange.ui.components.icon.navigation.icon-play)
(def data
[:svg {:xmlns ""
:width "60" :height "60" :viewBox "0 0 60 60"
:fill "#3453A1"}
[:path {:fill-rule "evenodd" :clip-rule "evenodd"
:d "M30 60C46.5685 60 60 46.5685 60 30C60 13.4315 46.5685 0 30 0C13.4315 0 0 13.4... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/ui/components/icon/navigation/icon_play.cljs | clojure | (ns webchange.ui.components.icon.navigation.icon-play)
(def data
[:svg {:xmlns ""
:width "60" :height "60" :viewBox "0 0 60 60"
:fill "#3453A1"}
[:path {:fill-rule "evenodd" :clip-rule "evenodd"
:d "M30 60C46.5685 60 60 46.5685 60 30C60 13.4315 46.5685 0 30 0C13.4315 0 0 13.4... | |
4708cebd93b77085d9ec999745ba6d619234cea77ce8ef8fd931e3a58ee5d0dc | chenyukang/eopl | 11.scm | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/cps.scm")
(load-relative "./base/data-structures.scm")
(load-relative "./base/cps-cases.scm")
(load-relative "./base/cps-lang.scm")
;; New stuff
(define value-of-simple-exp
(lambda (exp env)
(cases simple-expression exp
... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/11.scm | scheme | New stuff
value-of/k : TfExp * Env * Cont -> FinalAnswer
apply-cont : Cont * ExpVal -> Final-ExpVal
the end of the computation. | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/cps.scm")
(load-relative "./base/data-structures.scm")
(load-relative "./base/cps-cases.scm")
(load-relative "./base/cps-lang.scm")
(define value-of-simple-exp
(lambda (exp env)
(cases simple-expression exp
(cps-const... |
e4dd75a83652c2de89a976496eb99f4eaf7281cbb3352180c96e7d4adceaadad | qiao/sicp-solutions | 3.65.scm | (define (ln2-summands n)
(cons-stream (/ 1.0 n)
(stream-map - (ln2-summands (+ n 1)))))
(define ln2-stream
(partial-sums (ln2-summands 1)))
| null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.65.scm | scheme | (define (ln2-summands n)
(cons-stream (/ 1.0 n)
(stream-map - (ln2-summands (+ n 1)))))
(define ln2-stream
(partial-sums (ln2-summands 1)))
| |
f12d58bc8042a949773f5b3b654b0b425e40041c37355169cbcc9391fccdc094 | GaloisInc/saw-script | Theorem.hs | |
Module : . . Theorem
Description : Utilities for rewriting / compositional verification of HDL modules
License : : sbreese
Stability : experimental
Module : SAWScript.Yosys.Theorem
Description : Utilities for rewriting/compositional verification of HDL modules
License : BSD3
... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/2c5cffd498464f1dd2a9c92013a652c464163a2b/src/SAWScript/Yosys/Theorem.hs | haskell | # Language TemplateHaskell #
# Language OverloadedStrings #
# Language LambdaCase #
# Language ViewPatterns #
# Language ScopedTypeVariables #
^ URI identifying overridden module
^ type of r
^ type of (module r)
^ {{ \r -> module r }}
^ {{ \r -> precond r }}
^ {{ \r -> other r }}
| Construct a SAWCore propositio... | |
Module : . . Theorem
Description : Utilities for rewriting / compositional verification of HDL modules
License : : sbreese
Stability : experimental
Module : SAWScript.Yosys.Theorem
Description : Utilities for rewriting/compositional verification of HDL modules
License : BSD3
... |
b623c11bc572421da8dae3f947f6d73b30883b1b1e6cb526d8a077d2a63bc0d7 | fortytools/holumbus | Client.hs | module Main
(
main
)
where
import Holumbus.Distribution.SimpleDMapReduceIO
import Holumbus.MapReduce.Examples.Sum
import System.Environment
import Control.DeepSeq
import Holumbus.Common.FileHandling
main :: IO ()
main = do
putTimeStamp "Client Begin"
( triplet : [] ) <- getArgs
let (splitters,mappers,reduce... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Sum/Sum_1/Client.hs | haskell | module Main
(
main
)
where
import Holumbus.Distribution.SimpleDMapReduceIO
import Holumbus.MapReduce.Examples.Sum
import System.Environment
import Control.DeepSeq
import Holumbus.Common.FileHandling
main :: IO ()
main = do
putTimeStamp "Client Begin"
( triplet : [] ) <- getArgs
let (splitters,mappers,reduce... | |
cdab7aab26946e5342d4c4ffb8fa3bb0140339c26f77e81364e5f90140d4d46d | brendanhay/amazonka | DeleteUserAccessLoggingSettings.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-workspaces-web/gen/Amazonka/WorkSpacesWeb/DeleteUserAccessLoggingSettings.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WorkSpacesWeb.DeleteUserAccessLoggingSettings
Stability : auto-generated
Deletes user access logging settings.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newDeleteUserAccessLog... | # 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... |
2fc60c12179931cac8305a3a00ac8979e1869c9a8fde3c88781a047be00aa705 | hopv/MoCHi | lift.ml | open Util
open Syntax
open Term_util
open Type
module RT = Ref_type
let get_rtyp_lift t f rtyp =
let rec aux rtyp typ =
match rtyp with
| RT.Inter(styp, rtyps) -> RT.Inter(styp, List.map (aux -$- typ) rtyps)
| RT.Union(styp, rtyps) -> RT.Union(styp, List.map (aux -$- typ) rtyps)
| RT.Fun(x,rtyp1,rt... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/lift.ml | ocaml | TODO: fix for dependencies on predicates
for preprocess of termination mode
TODO: merge with lift | open Util
open Syntax
open Term_util
open Type
module RT = Ref_type
let get_rtyp_lift t f rtyp =
let rec aux rtyp typ =
match rtyp with
| RT.Inter(styp, rtyps) -> RT.Inter(styp, List.map (aux -$- typ) rtyps)
| RT.Union(styp, rtyps) -> RT.Union(styp, List.map (aux -$- typ) rtyps)
| RT.Fun(x,rtyp1,rt... |
fa64a02bee554e1155603c2a0eabf5a11cd5927982cc274349bf7385a86ba97b | aptmcl/rosetta | enums.rkt | #lang typed/racket/base/no-check
(require (for-syntax racket/base))
(provide define-enum define-incr-enum)
(define-syntax (define-enum stx)
(syntax-case stx ()
[(_ enum-name (name value) ...)
(quasisyntax/loc stx
(begin
(provide enum-name)
(define-type enum-name (U value ...))
... | null | https://raw.githubusercontent.com/aptmcl/rosetta/38aeafd730f93edaec7474106e84dae6d8bc1261/base/enums.rkt | racket | #lang typed/racket/base/no-check
(require (for-syntax racket/base))
(provide define-enum define-incr-enum)
(define-syntax (define-enum stx)
(syntax-case stx ()
[(_ enum-name (name value) ...)
(quasisyntax/loc stx
(begin
(provide enum-name)
(define-type enum-name (U value ...))
... | |
7d102b04738c7d3666fa11db7606bcb37ab59949c76235271cf8bbb8cb0de9eb | yutopp/rill | codegen_flowinfo.ml |
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/_migrating/codegen_flowinfo.ml | ocaml | fi with |
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2016 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... |
5c7fba49264fe15b313c4d3167ccb05b7ece47df5ea6ad97b507ff2a1849f680 | macourtney/Conjure | flow_test_destroyer.clj | (ns conjure.script.destroyers.flow-test-destroyer
(:require [clojure.tools.logging :as logging]
[conjure.core.test.util :as util]
[clojure.tools.file-utils :as file-utils]))
(defn
#^{:doc "Prints out how to use the destroy flow test command."}
usage []
(println "You must supply a service ... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_flow/src/conjure/script/destroyers/flow_test_destroyer.clj | clojure | (ns conjure.script.destroyers.flow-test-destroyer
(:require [clojure.tools.logging :as logging]
[conjure.core.test.util :as util]
[clojure.tools.file-utils :as file-utils]))
(defn
#^{:doc "Prints out how to use the destroy flow test command."}
usage []
(println "You must supply a service ... | |
8b7deecb7e786d766130506fe8eae91cb82f339069885830493528310d4b20c5 | viebel/google-api-clj | playground.clj | (ns google-api-clj.playground
(:require clojure.reflect
[clojure.spec.test.alpha :as stest]
[google-api-clj.drive-service :as drive]
[google-api-clj.google-client :refer [create-google-client]]
[google-api-clj.sheets-service :as sheets])
(:import com.google.api.servic... | null | https://raw.githubusercontent.com/viebel/google-api-clj/c868e80d6be2c97e721b946013d1dbc9a2f796c2/src/google_api_clj/playground.clj | clojure | => "1Cy8FlY4VPrFiitrd-eu6492lphkK9Matp7tyGCtqGpM";; => "1k9-ZDAZSLBDKSLS_nUAvAz69L44WMdF1XzJJ6GNhABU" ;; => "1Q4BOdey6UhM5Cw6O926vCO92Dkq-L8qwH-akXknIlc8" | (ns google-api-clj.playground
(:require clojure.reflect
[clojure.spec.test.alpha :as stest]
[google-api-clj.drive-service :as drive]
[google-api-clj.google-client :refer [create-google-client]]
[google-api-clj.sheets-service :as sheets])
(:import com.google.api.servic... |
026a5e6a0c2155b656511c72c2e84ecb783f0de1686919dc0012878f9ff7f268 | vseloved/cl-nlp | dict-lemmatizer.lisp | ( c ) 2016 - 2017 Vsevolod Dyomkin
(in-package #:nlp.lexics)
(named-readtables:in-readtable rutilsx-readtable)
(defclass mem-dict (dict lemmatizer)
((words :initarg :words :initform #h(equal)
:accessor dict-words)
(forms :initarg :forms :initform #h(equal)
:accessor dict-... | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/lexics/dict-lemmatizer.lisp | lisp | unkown word
the word is a known form for the requested POS
the word is in basic form and no specific POS is requested
there is a known word form for the requested POS
the word is known but there're no word forms for the requested POS
TODO: make generic & language-dependent
util | ( c ) 2016 - 2017 Vsevolod Dyomkin
(in-package #:nlp.lexics)
(named-readtables:in-readtable rutilsx-readtable)
(defclass mem-dict (dict lemmatizer)
((words :initarg :words :initform #h(equal)
:accessor dict-words)
(forms :initarg :forms :initform #h(equal)
:accessor dict-... |
03576c5217fc8c83cec98454c6a201101d2995d89cf77c7901564bc6b5be50e2 | diagrams/diagrams-lib | Test.hs | import Test.Tasty (TestTree, defaultMain, testGroup)
import qualified Diagrams.Test.Angle as Angle
import qualified Diagrams.Test.Direction as Direction
import qualified Diagrams.Test.Transform as Transform
import qualified Diagrams.Test.Transform.Matrix as TransformMa... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/test/Test.hs | haskell | import Test.Tasty (TestTree, defaultMain, testGroup)
import qualified Diagrams.Test.Angle as Angle
import qualified Diagrams.Test.Direction as Direction
import qualified Diagrams.Test.Transform as Transform
import qualified Diagrams.Test.Transform.Matrix as TransformMa... | |
cc7fe9a97835a5d51ef809416cb12ce72df83093f75242a3c4dd95d1400711fa | larcenists/larceny | setcc.scm | (
(seto ah)
(setno (& eax (* esi 1)))
(setb ah)
(setc (& eax (* esi 1)))
(setnae ah)
(setnb (& eax (* esi 1)))
(setnc ah)
(setae (& eax (* esi 1)))
(sete ah)
(setz (& eax (* esi 1)))
(setne ah)
(setnz (& eax (* esi 1)))
(setbe ah)
(setna (& eax (* esi 1)))
(seta ah)
(setnbe (& eax (* esi 1)))
(sets ... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/setcc.scm | scheme | (
(seto ah)
(setno (& eax (* esi 1)))
(setb ah)
(setc (& eax (* esi 1)))
(setnae ah)
(setnb (& eax (* esi 1)))
(setnc ah)
(setae (& eax (* esi 1)))
(sete ah)
(setz (& eax (* esi 1)))
(setne ah)
(setnz (& eax (* esi 1)))
(setbe ah)
(setna (& eax (* esi 1)))
(seta ah)
(setnbe (& eax (* esi 1)))
(sets ... | |
bbee382368c54992b01e51d6a650cb44ff4359bc80928ed2b0e8132927566828 | Decentralized-Pictures/T4L3NT | ticket_scanner.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/ticket_scanner.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN A... |
78a66203757085219c98b7cc339ea273d864df4f268f4166d8136bd3a35e08be | yitzchak/shasht | read.lisp | (in-package #:shasht/test)
(defun read-json (name)
(with-open-file (stream (asdf:component-pathname (asdf:find-component :shasht/test (list "src" "test" "fixtures" name))))
(let ((*read-default-float-format* 'long-float))
(shasht:read-json stream t nil t))))
(defmacro create-tests ()
`(progn ,@(mapcan... | null | https://raw.githubusercontent.com/yitzchak/shasht/4055327ef8e2aaa8627892ab256350ff3cb15e3c/src/test/read.lisp | lisp | (in-package #:shasht/test)
(defun read-json (name)
(with-open-file (stream (asdf:component-pathname (asdf:find-component :shasht/test (list "src" "test" "fixtures" name))))
(let ((*read-default-float-format* 'long-float))
(shasht:read-json stream t nil t))))
(defmacro create-tests ()
`(progn ,@(mapcan... | |
e5ed5323046668aedb93c9062f4fd4169b307b6b5d5221610cf17a96663e0402 | emqx/emqx | emqx_lwm2m_message.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/lwm2m/emqx_lwm2m_message.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_lwm2m_message).
-export([
tlv_to_json/2,
json_to_tlv/2,
text_to_json/2... |
09f58fd03f5dfe64a5a4008c3e706d5bfebc8c6d0c9f1bb53889fb6982c698b4 | robert-strandh/Second-Climacs | check-type.lisp | (cl:in-package #:second-climacs-syntax-common-lisp)
(define-indentation-automaton compute-check-type-indentations
(tagbody
(next)
;; The current wad is the operator.
(maybe-assign-indentation 1 4)
(next)
;; The current wad ought to represent the place.
(maybe-assign-indentation 4 2)
... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/5cc8f109d086558dadd41bc3d900ed6800f40abc/Code/Syntax/Common-Lisp/Indentation/check-type.lisp | lisp | The current wad is the operator.
The current wad ought to represent the place.
The current wad ought to represent the type specifier.
If we come here, it's because the optional string is present. | (cl:in-package #:second-climacs-syntax-common-lisp)
(define-indentation-automaton compute-check-type-indentations
(tagbody
(next)
(maybe-assign-indentation 1 4)
(next)
(maybe-assign-indentation 4 2)
(compute-form-indentation current-wad nil client)
(next)
(maybe-assign-indentation ... |
987b5465d6b930e6b232f9334f8fcb90db7fa6aeb4c320be78bb42a3cd1196be | Clozure/ccl-tests | print-integers.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Feb 23 06:26:25 2004
;;;; Contains: Printing tests for integers
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
;;; Tests with *print-base*
(def-print-test print.integers.1 1 "1")
(def-print-test print.integers.2 2 "2")
(def-print-test print.integ... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/print-integers.lsp | lisp | -*- Mode: Lisp -*-
Contains: Printing tests for integers
Tests with *print-base*
With *print-radix* | Author :
Created : Mon Feb 23 06:26:25 2004
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-print-test print.integers.1 1 "1")
(def-print-test print.integers.2 2 "2")
(def-print-test print.integers.3 3 "3")
(def-print-test print.integers.4 4 "4")
(def-print-test print.integers.5 5 "5")
(d... |
f790adf1b09744d1f2b90ee45eb1fa7525ef6925cf795588d99fe14ab643ffab | manuel-serrano/bigloo | recette.scm | Copyright(c ) 2011 , 2012 )
;;;; This file is part of bigloo-csv.
;;;;
;;;; bigloo-csv is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of the
;;;; License, or (a... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/csv/recette/recette.scm | scheme | This file is part of bigloo-csv.
bigloo-csv is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
bigloo-csv is distributed in the hope that it will be useful, but
WITHOUT ANY WAR... | Copyright(c ) 2011 , 2012 )
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU Lesser General Public
(module testcsv
(library csv)
(main main))
testing infrastructure copied from the recette for 's pthread library
(define *tests* ... |
fc03ae9bc68f26a65ddb22b6552b01690d6693bb407c14304636d64225f9e9af | SmartDev-0205/cardano-token-contract | Test.hs | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
import Control.Monad (void)
import Data.Default (def)
import Data.Monoid (Last (..))
import Ledger qualified
import Ledger.Ada (lovelaceValueOf)
import Ledger.Address (unPayme... | null | https://raw.githubusercontent.com/SmartDev-0205/cardano-token-contract/2a0fd76e9d8199becc8e47f99938e3c3710b300a/test/Test.hs | haskell | # LANGUAGE OverloadedStrings #
| The wallet of the operator.
| The wallet of the client person. | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
# LANGUAGE TypeApplications #
import Control.Monad (void)
import Data.Default (def)
import Data.Monoid (Last (..))
import Ledger qualified
import Ledger.Ada (lovelaceValueOf)
import Ledger.Address (unPaymentPubKeyHash)
import Ledger.Time (P... |
9d87c14054cd1b3f46c36f2d651478d08b60f5aed89f7e63eaa0858193856ee7 | tsoding/wacket | wacket.rkt | #lang racket
(provide wat-compile
wat-module
wat-export-func)
(define (wat-module expr)
`(module ,expr))
(define (wat-export-func name body)
`(func (export ,name) (result i32)
,@body))
(define (wat-number x)
`(i32.const ,x))
(define (wat-compile-op op xs)
(append
(append* (for... | null | https://raw.githubusercontent.com/tsoding/wacket/ffc7b42381c50a3cf4ea5ff04b3575efd0fd621d/wacket.rkt | racket | TODO(#7): all of the arguments are hardcoded to i32
TODO(#8): all compiled functions are exported
TODO(#10): compilation of local function variables is not support | #lang racket
(provide wat-compile
wat-module
wat-export-func)
(define (wat-module expr)
`(module ,expr))
(define (wat-export-func name body)
`(func (export ,name) (result i32)
,@body))
(define (wat-number x)
`(i32.const ,x))
(define (wat-compile-op op xs)
(append
(append* (for... |
910296f4182be42762c4e55c54f386695202dfe77e1c35c4173bb5aa311e60b7 | footprintanalytics/footprint-web | render.clj | (ns metabase.pulse.render
(:require [clojure.tools.logging :as log]
[hiccup.core :refer [h]]
[metabase.models.dashboard-card :as dashboard-card]
[metabase.pulse.render.body :as body]
[metabase.pulse.render.common :as common]
[metabase.pulse.render.image-bund... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/pulse/render.clj | clojure | Many aggregations result in [[nil]] if there are no rows to aggregate after filters
for scalar/smartscalar, the display-type might actually be :line, so we can't have line above
Provide a horizontal scrollbar for tables that overflow container width.
Surrounding <p> element prevents buggy behavior when dragging scr... | (ns metabase.pulse.render
(:require [clojure.tools.logging :as log]
[hiccup.core :refer [h]]
[metabase.models.dashboard-card :as dashboard-card]
[metabase.pulse.render.body :as body]
[metabase.pulse.render.common :as common]
[metabase.pulse.render.image-bund... |
5ce5a8051c0b5ab7bfb8031c00b4768daac9afec9e928bb66c4c32bee1f648dc | ahrefs/bs-atdgen-codec-runtime | atdgen_codec_runtime.ml | module Json_adapter = Atdgen_json_adapter
module Encode = Atdgen_codec_encode
module Decode = Atdgen_codec_decode
| null | https://raw.githubusercontent.com/ahrefs/bs-atdgen-codec-runtime/3824db53f7f4464921bb763160da3cea5fc5b658/src/atdgen_codec_runtime.ml | ocaml | module Json_adapter = Atdgen_json_adapter
module Encode = Atdgen_codec_encode
module Decode = Atdgen_codec_decode
| |
d9642ed4ef0014cf2d3761328416cdefa63171b4a00938fb085f4bf9dbea9326 | broadinstitute/firecloud-ui | igv_utils.cljs | (ns broadfcui.page.workspace.analysis.igv-utils
(:require
[broadfcui.common :as common]
[broadfcui.endpoints :as endpoints]
[broadfcui.utils :as utils]
))
(defn- finder [{:keys [track-url on-success on-error]} options]
(let [possible-idxs (atom nil)]
(add-watch possible-idxs :loop
(... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/workspace/analysis/igv_utils.cljs | clojure | (ns broadfcui.page.workspace.analysis.igv-utils
(:require
[broadfcui.common :as common]
[broadfcui.endpoints :as endpoints]
[broadfcui.utils :as utils]
))
(defn- finder [{:keys [track-url on-success on-error]} options]
(let [possible-idxs (atom nil)]
(add-watch possible-idxs :loop
(... | |
1d839a9bb8bd44c4339e9002c9734c8870b9088dc00741e8a558d5e387963088 | nytimes/vase.elasticsearch | user.clj | (ns user
(:require [fern :as f]
[qbits.spandex :as es]
[com.nytimes.vase.elasticsearch :as vase.es]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[io.pedestal.interceptor :refer [interceptor]]
[clj-http.cl... | null | https://raw.githubusercontent.com/nytimes/vase.elasticsearch/96a7e103fc4645b6551dfe30f0c1196f9ebf0672/dev/user.clj | clojure | (ns user
(:require [fern :as f]
[qbits.spandex :as es]
[com.nytimes.vase.elasticsearch :as vase.es]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[io.pedestal.interceptor :refer [interceptor]]
[clj-http.cl... | |
8ab1124c1744026084c1ae9b203cf57aef96f3f17915be232da517d7f27b5308 | MastodonC/witan.ui | results.clj | (ns witan.ui.style.components.results
(:require [garden.units :refer [px em percent]]
[witan.ui.style.colour :as colour]
[witan.ui.style.values :as values]
[witan.ui.style.fonts :as fonts]))
(def style [[:#results-header
[:h1
{:font-family fonts/base-fon... | null | https://raw.githubusercontent.com/MastodonC/witan.ui/5ea6baaff52824ac61737911dd2c11b451157bad/src/styles/witan/ui/style/components/results.clj | clojure | (ns witan.ui.style.components.results
(:require [garden.units :refer [px em percent]]
[witan.ui.style.colour :as colour]
[witan.ui.style.values :as values]
[witan.ui.style.fonts :as fonts]))
(def style [[:#results-header
[:h1
{:font-family fonts/base-fon... | |
819648bb046ee64df5b86a6bad65bbd3fbdd4aba9290235a8d322e5d5d46e160 | chessai/shwifty | Shwifty.hs | # language
AllowAmbiguousTypes
, BangPatterns
, CPP
, , , DeriveFunctor
, DeriveGeneric
, , DerivingStrategies
, FlexibleInstances
, LambdaCase
, MultiWayIf
, NamedFieldPuns
, OverloadedStrings
, RecordWildCards
, ScopedTypeVariables
, TemplateHaskell
... | null | https://raw.githubusercontent.com/chessai/shwifty/63732be1b60194a615c4b600716eed38ab99a0e8/src/Shwifty.hs | haskell | entry point to the library should be the
documentation and examples of 'getShwifty'.
See also 'getShwiftyWith'
and 'getShwiftyWithTags'.
This library is in alpha and there are a number
of known bugs which shouldn't affect most users.
See the issue tracker to see what those are.
There are proba... | # language
AllowAmbiguousTypes
, BangPatterns
, CPP
, , , DeriveFunctor
, DeriveGeneric
, , DerivingStrategies
, FlexibleInstances
, LambdaCase
, MultiWayIf
, NamedFieldPuns
, OverloadedStrings
, RecordWildCards
, ScopedTypeVariables
, TemplateHaskell
... |
8f5a0b78cf8f6a557e08c8980a7232efa6b0e9db165c61f2ff713164a99dc70d | janestreet/base_quickcheck | test_observer.mli | include module type of Base_quickcheck.Observer
| null | https://raw.githubusercontent.com/janestreet/base_quickcheck/b3dc5bda5084253f62362293977e451a6c4257de/test/src/test_observer.mli | ocaml | include module type of Base_quickcheck.Observer
| |
0a8829d81b8266df8760685902d7edc7db828fa8d69b5994a8eec94cc4faaa22 | ghcjs/jsaddle-dom | PerformanceResourceTiming.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.PerformanceResourceTiming
(getInitiatorType, getNextHopProtocol, getWorkerStart,
getRedirectStart, getRedir... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/PerformanceResourceTiming.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/PerformanceResourceTiming.redirectStart Mozilla PerformanceResourceTiming.redirectStart documentation>
| <-US/docs/Web/API/PerformanceResourceTiming.domainLookupEnd Mozilla PerformanceResourceTiming.domai... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.PerformanceResourceTiming
(getInitiatorType, getNextHopProtocol, getWorkerStart,
getRedirectStart, getRedirectEnd, getFetchStart,
getDomainLookupStart, getDomainLookupEnd, getConnectStart,
g... |
df2b73a40be01f69ebbc990661f3ea0550be1409d2c5398f1f52c5d27d313f7d | zmyrgel/tursas | move.clj | (ns tursas.state0x88.move
(:use (tursas move util)
[tursas.state0x88.util :only [piece-name
piece-value]]))
(defn index->coord
"Converts given index to algebraic representation."
[index]
(let [coord (format "%02x" index)
num (+ (- (int (nth coord 0)) 48) 1)... | null | https://raw.githubusercontent.com/zmyrgel/tursas/362551a1861be0728f21b561d8907d0ca04333f7/src/tursas/state0x88/move.clj | clojure | (ns tursas.state0x88.move
(:use (tursas move util)
[tursas.state0x88.util :only [piece-name
piece-value]]))
(defn index->coord
"Converts given index to algebraic representation."
[index]
(let [coord (format "%02x" index)
num (+ (- (int (nth coord 0)) 48) 1)... | |
831179f4044b41f225e5a44465c4d0e990be8eee989df7bec04162179354cc13 | nikodemus/SBCL | walk.impure.lisp | ;;;; tests for the code walker
This software is part of the SBCL system . See the README file for
;;;; more information.
This software is derived from software originally released by Xerox
;;;; Corporation. Copyright and release statements follow. Later modifications
;;;; to the software are in the public domain ... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/walk.impure.lisp | lisp | tests for the code walker
more information.
Corporation. Copyright and release statements follow. Later modifications
to the software are in the public domain and are provided with
absolutely no warranty. See the COPYING and CREDITS files for more
information.
All rights reserved.
Use and copying of this soft... |
This software is part of the SBCL system . See the README file for
This software is derived from software originally released by Xerox
copyright information from original PCL sources :
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
derivative works must comply with all applicab... |
9ef9570a2bb3605014f1cf85cfbd00120e166fb5a4f4fb3f6fbef439aa58dd53 | DanielG/ghc-mod | FlagSpec.hs | module FlagSpec where
import Control.Applicative
import GhcMod
import Test.Hspec
import TestUtils
import Prelude
spec :: Spec
spec = do
describe "flags" $ do
it "contains at least `-fprint-explicit-foralls" $ do
f <- runD $ lines <$> flags
f `shouldContain` ["-fprint-explicit-foral... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/FlagSpec.hs | haskell | module FlagSpec where
import Control.Applicative
import GhcMod
import Test.Hspec
import TestUtils
import Prelude
spec :: Spec
spec = do
describe "flags" $ do
it "contains at least `-fprint-explicit-foralls" $ do
f <- runD $ lines <$> flags
f `shouldContain` ["-fprint-explicit-foral... | |
a4e9e4dd641bb75808e58ed48d42b6b1be2837d114b83c721f02e95068984449 | pfdietz/ansi-test | read-sequence.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Jan 19 06:55:04 2004
;;;; Contains: Tests of READ-SEQUENCE
(in-package :cl-test)
;;; Read into a string
(defmacro def-read-sequence-test (name init args input &rest expected)
`(deftest ,name
(let ((s ,init))
(with-input-from-string
(is ,... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/streams/read-sequence.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of READ-SEQUENCE
Read into a string
Read into a base string
Read into a list
Read into a vector
Read into a vector with a fill pointer
Nil vectors
Read into a bit vector
Create output file
Error cases | Author :
Created : Mon Jan 19 06:55:04 2004
(in-package :cl-test)
(defmacro def-read-sequence-test (name init args input &rest expected)
`(deftest ,name
(let ((s ,init))
(with-input-from-string
(is ,input)
(values
(read-sequence s is ,@args)
s)))
,@expe... |
01cb376162a050398cb7fce6d8a9ec86377549cf5e2b0c9fdf3a68b10d32f079 | jaspervdj/advent-of-code | 15.hs | {-# LANGUAGE DeriveFoldable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DerivingVia #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
{-# LANGUAGE StandaloneDeriving #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances... | null | https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/2015/15.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DerivingVia #
# LANGUAGE StandaloneDeriving #
------------------------------------------------------------------------------
A different kind of boilerplate.
------------------------------------------------------------------------------
Actual solution (with the... | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Main where
import Data.Monoid (Sum (..))
import GHC.Generics
import qualified Syst... |
61e71dd2b5e60b7938f83b655d02e06f22896f26c2b7b3cf83e6fbb27ce1a7e3 | tisnik/clojure-examples | core_test.clj | (ns json2edn.core-test
(:require [clojure.test :refer :all]
[json2edn.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tisnik/clojure-examples/dead32eda2993d72117d7f23f17a362885b451c3/json2edn/test/json2edn/core_test.clj | clojure | (ns json2edn.core-test
(:require [clojure.test :refer :all]
[json2edn.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
98fbb0e3919176ddf1ceca50ac2b3e9647374bf355dfb45a32d47e927014fb35 | SquidDev/urn | void.lisp | (define void
"A logger which discards all output."
(with (discard (lambda ()))
{ :put-error! discard
:put-warning! discard
:put-verbose! discard
:put-debug! discard
:put-time! discard
:put-node-error! discard
:put-node-warning! discard }))
| null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/urn/logger/void.lisp | lisp | (define void
"A logger which discards all output."
(with (discard (lambda ()))
{ :put-error! discard
:put-warning! discard
:put-verbose! discard
:put-debug! discard
:put-time! discard
:put-node-error! discard
:put-node-warning! discard }))
| |
53574c326503861734c22c4ff3023feba9fd9c546632281337a337729db77c71 | mu-chaco/ReWire | Rename.hs | # LANGUAGE NamedFieldPuns , Rank2Types , FlexibleInstances , StandaloneDeriving , DeriveGeneric , DerivingVia , FlexibleContexts , OverloadedStrings #
# LANGUAGE Trustworthy #
# OPTIONS_GHC -fno - warn - orphans #
module ReWire.Crust.Rename
( Renamer, fixFixity, getExports, allExports
, exclude, extend, fin... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/ReWire/Crust/Rename.hs | haskell | | Map from type name to its set of data constructors.
Note: the set of "ctors" also includes fields (things that might appear in
an export list).
| Qualified (globally-unique) version of the above map.
| Map from construtor name to its field "signature,"
which is a list of field names and types.
| Qualifie... | # LANGUAGE NamedFieldPuns , Rank2Types , FlexibleInstances , StandaloneDeriving , DeriveGeneric , DerivingVia , FlexibleContexts , OverloadedStrings #
# LANGUAGE Trustworthy #
# OPTIONS_GHC -fno - warn - orphans #
module ReWire.Crust.Rename
( Renamer, fixFixity, getExports, allExports
, exclude, extend, fin... |
020c7a898658a20101057a814a8d3bdb805dd9f7d014a20de4c73c12344475fd | haskell/text | Utf16.hs | # LANGUAGE CPP #
# LANGUAGE MagicHash #
{-# LANGUAGE BangPatterns #-}
-- |
-- Module : Data.Text.Internal.Encoding.Utf16
Copyright : ( c ) 2008 , 2009 ,
( c ) 2009 ,
( c ) 2009
--
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
Portability : ... | null | https://raw.githubusercontent.com/haskell/text/ca73ae38ed3744ec930cbfdb706147ec29d5a185/src/Data/Text/Internal/Encoding/Utf16.hs | haskell | # LANGUAGE BangPatterns #
|
Module : Data.Text.Internal.Encoding.Utf16
License : BSD-style
Maintainer :
Stability : experimental
/Warning/: this is an internal module, and does not have a stable
API or name. Functions in this module may not check or enforce
preconditions expected by public module... | # LANGUAGE CPP #
# LANGUAGE MagicHash #
Copyright : ( c ) 2008 , 2009 ,
( c ) 2009 ,
( c ) 2009
Portability : GHC
module Data.Text.Internal.Encoding.Utf16
(
chr2
, validate1
, validate2
) where
import GHC.Exts
import GHC.Word (Word16(..))
#if !MIN_VE... |
607415268278d7c283fd93f999b167a797f61b0f393cf4510258cbbad0af993a | boxer-project/boxer-sunrise | win32.lisp | -*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / win32.lisp , v 1.10.2.1 2017/01/19 " -*-
Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved .
(in-package "WIN32")
From WINGDI.H
;;; /* pixel types */
(defconstant *PFD-TYPE-RGBA* ... | null | https://raw.githubusercontent.com/boxer-project/boxer-sunrise/1ef5d5a65d00298b0d7a01890b3cd15d78adc1af/src/opengl/win32.lisp | lisp | rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / win32.lisp , v 1.10.2.1 2017/01/19 " -*-
/* pixel types */
/* layer types */
/* PIXELFORMATDESCRIPTOR flags */
------------------------------------------------------------
-------------------------------------------... |
Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved .
(in-package "WIN32")
From WINGDI.H
(defconstant *PFD-TYPE-RGBA* 0)
(defconstant *PFD-TYPE-COLORINDEX* 1)
(defconstant *PFD-MAIN-PLANE* 0)
(defconstant *PFD-OVERLAY-PLANE* 1)
(defconstant *PFD-UNDERLAY-PLANE* -1)
(defconstant ... |
44ce1de2d62ed7f5bcb87bc5f707fe41405cdf99765037586c07f047d9f7784b | pfdietz/ansi-test | format-ampersand.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Jul 27 23:52:20 2004
;;;; Contains: Tests of format with ~& directive
(def-format-test format.&.1
"~0&" nil "")
(def-format-test format.&.2
"~&" nil "")
(def-format-test format.&.3
"X~&" nil #.(concatenate 'string "X" (string #\Newline)))
(def-forma... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-ampersand.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of format with ~& directive | Author :
Created : Tue Jul 27 23:52:20 2004
(def-format-test format.&.1
"~0&" nil "")
(def-format-test format.&.2
"~&" nil "")
(def-format-test format.&.3
"X~&" nil #.(concatenate 'string "X" (string #\Newline)))
(def-format-test format.&.4
"X~%~&" nil #.(concatenate 'string "X" (string #\Newl... |
c3e463a05d6a70b195e755f176b561fa3a121a025e9147db0c3453c73d27c6be | clojure-lsp/clojure-lsp | code_actions.clj | (ns clojure-lsp.feature.code-actions
(:require
[clojure-lsp.feature.add-missing-libspec :as f.add-missing-libspec]
[clojure-lsp.feature.cycle-keyword :as f.cycle-keyword]
[clojure-lsp.feature.destructure-keys :as f.destructure-keys]
[clojure-lsp.feature.drag :as f.drag]
[clojure-lsp.feature.drag-param ... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/998b950db1bb59325d00a420296de86c431ec720/lib/src/clojure_lsp/feature/code_actions.clj | clojure | (ns clojure-lsp.feature.code-actions
(:require
[clojure-lsp.feature.add-missing-libspec :as f.add-missing-libspec]
[clojure-lsp.feature.cycle-keyword :as f.cycle-keyword]
[clojure-lsp.feature.destructure-keys :as f.destructure-keys]
[clojure-lsp.feature.drag :as f.drag]
[clojure-lsp.feature.drag-param ... | |
31e101fbf63b78fbcb7503e903cb00f19b02f16d032eeca95b8ad36383ef9d9a | bobzhang/fan | comprehen.ml |
include PreCast.Make (struct end);
open Syntax;
open Lib;
open Ast;
let comprehension_or_sem_expr_for_list = Gram.mk "comprehension_or_sem_expr_for_list";
let item: Gram.t [= `cond of expr | `gen of (patt*expr) ] = Gram.mk "item";
EXTEND Gram (* LOCAL: item; *)
comprehension_or_sem_expr_for_list:
[ "u"
... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/comprehen.ml | ocaml | LOCAL: item;
LOCAL: item; |
include PreCast.Make (struct end);
open Syntax;
open Lib;
open Ast;
let comprehension_or_sem_expr_for_list = Gram.mk "comprehension_or_sem_expr_for_list";
let item: Gram.t [= `cond of expr | `gen of (patt*expr) ] = Gram.mk "item";
comprehension_or_sem_expr_for_list:
[ "u"
[ expr Level "top"{e}; ";";... |
a9811682c352305a02f301583281a85681a4e8cc48b639810232440b23be6224 | quek/paiprolog | unifgram.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
File unifgram.lisp : The parser from Chapter 20 .
(in-package #:unifgram)
(defmacro rule (head &optional (arrow ':-) &body body)
"Expand one of several types of logic rules into pure Prolog."
;; Th... | null | https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/unifgram.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; -*-
This is data-driven, dispatching on the arrow
Handle :sem
Separate out examples from body
Handle conjunctions
E.g.: (and* (t (and a b) t (and c d) t) ?x) ==>
?x = (and a b c d) | Code from Paradigms of AI Programming
Copyright ( c ) 1991
File unifgram.lisp : The parser from Chapter 20 .
(in-package #:unifgram)
(defmacro rule (head &optional (arrow ':-) &body body)
"Expand one of several types of logic rules into pure Prolog."
(funcall (get arrow 'rule-function) head body))
(s... |
f346d02ec185941b7ecb56fa7e127c8df1565ed6880fdea5d8a762542fc6a9ae | ivanjovanovic/sicp | e-3.61.scm | Exercise 3.61 . Let S be a power series ( exercise 3.59 ) whose constant
term is 1 . Suppose we want to find the power series 1 / S , that is , the
series X such that S · X = 1 . Write S = 1 + SR where SR is the part of
; S after the constant term. Then we can solve for X as follows:
;
S*X = 1
( 1 ... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.5/e-3.61.scm | scheme | S after the constant term. Then we can solve for X as follows:
whose higher-order terms are given by the negative of SR times X. Use
for a power series S with constant term 1. You will need to use
------------------------------------------------------------
Having already developed basic series and streams man... | Exercise 3.61 . Let S be a power series ( exercise 3.59 ) whose constant
term is 1 . Suppose we want to find the power series 1 / S , that is , the
series X such that S · X = 1 . Write S = 1 + SR where SR is the part of
S*X = 1
( 1 + Sr)*X = 1
X + Sr*X = 1
therefore = > X = 1 + Sr*X
In ... |
29a5e1dda6e14bc4cde750d9d35568b10ac4e75a128fa97610ac74005438d63f | crategus/cl-cffi-gtk | gdk-example.lisp | (defpackage :gdk-example
(:use :gtk :gdk :gdk-pixbuf :gobject :gio :glib :cairo :cffi :common-lisp)
(:export #:example-event-key)
(:export #:example-app-launch)
)
(in-package :gdk-example)
(defun rel-path (filename)
(let ((system-path (asdf:system-source-directory :gtk-example)))
(princ-to-string (merge-p... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/demo/gdk-example/gdk-example.lisp | lisp | (defpackage :gdk-example
(:use :gtk :gdk :gdk-pixbuf :gobject :gio :glib :cairo :cffi :common-lisp)
(:export #:example-event-key)
(:export #:example-app-launch)
)
(in-package :gdk-example)
(defun rel-path (filename)
(let ((system-path (asdf:system-source-directory :gtk-example)))
(princ-to-string (merge-p... | |
373b4f8304e80570cccac065c5c8e12de992bfd78e394d464dc81aa4041feaf9 | mikera/clojure-utils | concurrent.clj | (ns mikera.cljutils.concurrent)
;; Namespace for concurrency utils
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(defmacro plet [[s1 v1 & bindings] & body]
"Equivalent of let that evaluates bindings in parallel, using a separate thread for each.
The body is executed after all binding... | null | https://raw.githubusercontent.com/mikera/clojure-utils/92f7fd7a40c9cf22ab7004a304303e45ea4d4284/src/main/clojure/mikera/cljutils/concurrent.clj | clojure | Namespace for concurrency utils | (ns mikera.cljutils.concurrent)
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(defmacro plet [[s1 v1 & bindings] & body]
"Equivalent of let that evaluates bindings in parallel, using a separate thread for each.
The body is executed after all bindings are computed."
(let [bindings (... |
38121339d8385a1880a6e4683d9a02a24cc8ae16cb4017f7e36736e47262d356 | futurice/haskell-futurice-prelude | Doctests.hs | module Main where
import Build_doctests (flags, pkgs, module_sources)
import Data.Foldable (traverse_)
import Test.DocTest
main :: IO ()
main = do
traverse_ putStrLn args
doctest args
where
args = flags ++ pkgs ++ module_sources ++
map ("-X" ++ ) (words "DeriveDataTypeable DeriveFoldable DeriveF... | null | https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/56192d63bea76d06cb456c5ce4c776cf41a5cd7e/test/Doctests.hs | haskell | module Main where
import Build_doctests (flags, pkgs, module_sources)
import Data.Foldable (traverse_)
import Test.DocTest
main :: IO ()
main = do
traverse_ putStrLn args
doctest args
where
args = flags ++ pkgs ++ module_sources ++
map ("-X" ++ ) (words "DeriveDataTypeable DeriveFoldable DeriveF... | |
d7693696bcc43e21732ba2b14f19de5833f6447156f19837f519e5e86f7b7aa1 | sru-systems/protobuf-simple | DoubleMsg.hs | -- Generated by protobuf-simple. DO NOT EDIT!
module Types.DoubleMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype DoubleMsg = DoubleMsg
{ value :: PB.Double
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default DoubleMsg where
defaultVal = DoubleM... | null | https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/DoubleMsg.hs | haskell | Generated by protobuf-simple. DO NOT EDIT! | module Types.DoubleMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype DoubleMsg = DoubleMsg
{ value :: PB.Double
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default DoubleMsg where
defaultVal = DoubleMsg
{ value = PB.defaultVal
}
instance... |
d15d8e32fa8aa69e67f7c2d110cf76e7302c8ba557d22ff5a00410b7347f447c | kieranbrowne/clojure-tensorflow | ops.clj | (ns clojure-tensorflow.ops
(:require
[clojure-tensorflow.build :as build :refer [op-builder]]
[clojure-tensorflow.graph :as graph]
[clojure-tensorflow.utils :as utils]
[clojure-tensorflow.ops :as tf]))
(defn global-variables-initializer []
@graph/global-variables)
;; value ops
(defn constant [val]
... | null | https://raw.githubusercontent.com/kieranbrowne/clojure-tensorflow/a1771cda9e108c8575da7addbe4fe55283c5149b/src/clojure_tensorflow/ops.clj | clojure | value ops
math ops | (ns clojure-tensorflow.ops
(:require
[clojure-tensorflow.build :as build :refer [op-builder]]
[clojure-tensorflow.graph :as graph]
[clojure-tensorflow.utils :as utils]
[clojure-tensorflow.ops :as tf]))
(defn global-variables-initializer []
@graph/global-variables)
(defn constant [val]
(let [tensor... |
9aa7aee300d33dd2a8d6d989719c5278cc0c78de34d84bb92cb0a5ad14886139 | LukaKurnjek/plutus-pioneer-program-book | Model.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE NumericU... | null | https://raw.githubusercontent.com/LukaKurnjek/plutus-pioneer-program-book/0e69b2719dc7412a412a546825a002be5209e733/code/week08/test/Spec/Model.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE NumericUnderscores #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LAN... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Spec.Model
( tests
, test
, TSModel (..)
) w... |
b4d02d183aaf076e05c495217e417a9db3d76747b792946ec74a66f1d1429162 | codedownio/sandwich | Baz.hs |
module UnitTests.NestedNoFile.Baz (tests, main) where
import Test.Sandwich
tests :: TopSpec
tests = it "tests baz nested no file" $ do
2 `shouldBe` 2
main = runSandwichWithCommandLineArgs defaultOptions tests
| null | https://raw.githubusercontent.com/codedownio/sandwich/950991e34f15f5bee5b258bb828b0cce4eb2b4ab/demos/demo-discover/app/UnitTests/NestedNoFile/Baz.hs | haskell |
module UnitTests.NestedNoFile.Baz (tests, main) where
import Test.Sandwich
tests :: TopSpec
tests = it "tests baz nested no file" $ do
2 `shouldBe` 2
main = runSandwichWithCommandLineArgs defaultOptions tests
| |
03d5cdac56c9673fe160c451988ce0fa855eaf18381237423fd873725cb5e87c | dapphub/dapptools | Stepper.hs | {-# Language GADTs #-}
{-# Language DataKinds #-}
module EVM.Stepper
( Action (..)
, Stepper
, exec
, execFully
, run
, runFully
, wait
, ask
, evm
, evmIO
, entering
, enter
, interpret
)
where
-- This module is an abstract definition of EVM steppers.
Steppers can be run as TTY debugger... | null | https://raw.githubusercontent.com/dapphub/dapptools/961dbcc6ec939103a1b78534d07672d7b4e642c1/src/hevm/src/EVM/Stepper.hs | haskell | # Language GADTs #
# Language DataKinds #
This module is an abstract definition of EVM steppers.
The implementation uses the operational monad pattern
as the framework for monadic interpretation.
Note: this is a sketch of a work in progress!
| The instruction type of the operational monad
| Keep executing until... |
module EVM.Stepper
( Action (..)
, Stepper
, exec
, execFully
, run
, runFully
, wait
, ask
, evm
, evmIO
, entering
, enter
, interpret
)
where
Steppers can be run as TTY debuggers or as CLI test runners .
import Prelude hiding (fail)
import Control.Monad.Operational (Program, singlet... |
1944f740cc95e8434f7d57092ecdad8c1a549267bca69f6c1fb1c4764eb9d8fc | Octachron/codept | schematic.ml |
type format = Json | Sexp
type (_,_) eq = Eq : ('a,'a) eq
type void = (int,float) eq
module L = struct
type 'a t = 'a list =
| [ ]
| (::) of 'a * 'a t
end
module Tuple = struct
type 'a tuple =
| []: void tuple
| (::): 'a * 'b tuple -> ('a * 'b) tuple
type 'a t = 'a tuple
end
open Tuple
modu... | null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/lib/schematic.ml | ocaml | For recursive definition, rewire |
type format = Json | Sexp
type (_,_) eq = Eq : ('a,'a) eq
type void = (int,float) eq
module L = struct
type 'a t = 'a list =
| [ ]
| (::) of 'a * 'a t
end
module Tuple = struct
type 'a tuple =
| []: void tuple
| (::): 'a * 'b tuple -> ('a * 'b) tuple
type 'a t = 'a tuple
end
open Tuple
modu... |
63558737d568554c3162f3baf9405f486b5f2228f00d8f0aa0e69faf1c6589b6 | jackfirth/rebellion | taking-duplicates-test.rkt | #lang racket/base
(module+ test
(require rackunit
rebellion/base/immutable-string
rebellion/collection/list
rebellion/private/static-name
rebellion/streaming/reducer
rebellion/streaming/transducer
rebellion/streaming/transducer/testing))
;@----------... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/streaming/transducer/private/taking-duplicates-test.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(module+ test
(require rackunit
rebellion/base/immutable-string
rebellion/collection/list
rebellion/private/static-name
rebellion/streaming/reducer
rebellion/streaming/transducer
rebellion/streaming/transducer/testing))
(module+ te... |
dd724d6333d11c5fbe65db218e50ca52d41c76c6fa2521955b751400cee9e17b | open-company/open-company-auth | project.clj | (defproject open-company-auth "0.2.0-SNAPSHOT"
:description "OpenCompany Auth Service"
:url "-company/open-company-auth"
:license {
:name "GNU Affero General Public License Version 3"
:url "-3.0.en.html"
}
:min-lein-version "2.9.1"
;; JVM memory
:jvm-opts ^:replace ["-Xms512m" "-Xmx2048m" "-serv... | null | https://raw.githubusercontent.com/open-company/open-company-auth/e9256ca7e27cd66c10c5d664777ab5f00614c422/project.clj | clojure | JVM memory
Web application library -clojure/ring
Web application library -clojure/ring
CORS library
Ring logging -logger-timbre
NB: com.taoensso/encore pulled in by oc.lib
Web routing
Security library
Authentication for ring -auth
Not used directly, dependency of oc.lib and org.julienxx/clj-slack -http
No... | (defproject open-company-auth "0.2.0-SNAPSHOT"
:description "OpenCompany Auth Service"
:url "-company/open-company-auth"
:license {
:name "GNU Affero General Public License Version 3"
:url "-3.0.en.html"
}
:min-lein-version "2.9.1"
:jvm-opts ^:replace ["-Xms512m" "-Xmx2048m" "-server"]
:depende... |
751114075a926840c4b2438286ed8f94eacafa64b489feca43d64f3906d280ca | tweag/asterius | sizeof_md5context.hs | # LANGUAGE CPP #
#include "HsBaseConfig.h"
import Control.Exception (assert)
import Control.Monad
import Foreign
import Foreign.C
import Foreign.Marshal.Alloc
import GHC.Fingerprint
import GHC.Num
data MD5Context
foreign import ccall unsafe "__hsbase_MD5Init" c_MD5Init
:: Ptr MD5Context -> IO ()
foreign import c... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/sizeof_md5context/sizeof_md5context.hs | haskell | | Use single call to c_MD5Update`
| Ensure that calling c_MD5Update actually saves the state in the context.
| same | # LANGUAGE CPP #
#include "HsBaseConfig.h"
import Control.Exception (assert)
import Control.Monad
import Foreign
import Foreign.C
import Foreign.Marshal.Alloc
import GHC.Fingerprint
import GHC.Num
data MD5Context
foreign import ccall unsafe "__hsbase_MD5Init" c_MD5Init
:: Ptr MD5Context -> IO ()
foreign import c... |
2c263e13967b8ead5fc139d6b1abd5ccf2a968cc033b5dab04583bfecac232e2 | anton-k/handle-pattern-servant-app | Main.hs | module Main (main) where
import Data.Proxy
import Servant
import Network.Wai.Handler.Warp (run)
import Control.Exception (try)
import Control.Monad.Except (ExceptT(..))
import qualified Control.Immortal as Immortal
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Server
import DI.Log
impo... | null | https://raw.githubusercontent.com/anton-k/handle-pattern-servant-app/4a9b6a4635e5555bd3b7a2ca9de76f06491104f4/app/Main.hs | haskell | init mutable shared state
init interfaces (plug in state or interfaces where needed)
init local envirnoments
----------------------------------------------------------
utils
start an immortal thread
in the main thread, sleep until interrupted
(e.g. with Ctrl-C) | module Main (main) where
import Data.Proxy
import Servant
import Network.Wai.Handler.Warp (run)
import Control.Exception (try)
import Control.Monad.Except (ExceptT(..))
import qualified Control.Immortal as Immortal
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Server
import DI.Log
impo... |
f275317728334ecb6a34fd3e19cfa3ae42cf5e35f4b379f245beae3015b8f5f3 | emqx/minirest | example_file_api.erl | Copyright ( c ) 2013 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law... | null | https://raw.githubusercontent.com/emqx/minirest/e08265f8d5a2ce157912614e7c6293c7c1528ab1/examples/example_openapi/src/example_file_api.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 ( c ) 2013 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(example_file_api).
-behaviour(minirest_api).
-export([api_spec/0]).
-export([ upload_... |
72433e7f6662aeb2dbbe9df44ad7fa1705f2cbcd6adeaaf0a2df4dd48935914f | janestreet/universe | attrs.mli | open! Base
open! Ppxlib
val default : (label_declaration, expression) Attribute.t
val drop_default : (label_declaration, expression option) Attribute.t
val drop_if : (label_declaration, expression) Attribute.t
val opaque : (core_type, unit) Attribute.t
val list_variant : (constructor_declaration, unit) Attribute.t... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_sexp_conv/expander/attrs.mli | ocaml | open! Base
open! Ppxlib
val default : (label_declaration, expression) Attribute.t
val drop_default : (label_declaration, expression option) Attribute.t
val drop_if : (label_declaration, expression) Attribute.t
val opaque : (core_type, unit) Attribute.t
val list_variant : (constructor_declaration, unit) Attribute.t... | |
3a22d43f513104b3dceda0ef750da755e024f4e09ee983432298a8216598d4e8 | synduce/Synduce | sum.ml | * @synduce -s 2 -NB
type 'a tree =
| Nil
| Node of 'a * 'a tree * 'a tree
let rec repr x = x
let rec spec t = f 0 t
and f s = function
| Nil -> s
| Node (a, l, r) ->
let sum = f s l in
f (sum + a) r
;;
let rec target = function
| Nil -> [%synt s0]
| Node (a, l, r) -> [%synt join] a (target l) (... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/tree/sum.ml | ocaml | * If no assertion is used, the tool search for function names repr, spec and target. | * @synduce -s 2 -NB
type 'a tree =
| Nil
| Node of 'a * 'a tree * 'a tree
let rec repr x = x
let rec spec t = f 0 t
and f s = function
| Nil -> s
| Node (a, l, r) ->
let sum = f s l in
f (sum + a) r
;;
let rec target = function
| Nil -> [%synt s0]
| Node (a, l, r) -> [%synt join] a (target l) (... |
1a75945d62462cfed890c0ecb9db15e0bdf9029c97a62fdf4e3583f9e820d972 | robert-strandh/Second-Climacs | packages.lisp | (cl:in-package #:common-lisp-user)
(defpackage #:second-climacs-clim-base
(:use #:common-lisp)
(:local-nicknames
(#:base #:second-climacs-base)
(#:cl-syntax #:second-climacs-syntax-common-lisp)
(#:fundamental-syntax #:second-climacs-syntax-fundamental))
(:export
#:climacs
#:text-pane
#:global-t... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/180e913b05d638d832e7a6998f931ddd7872851b/Code/GUI/McCLIM-ESA/Base/packages.lisp | lisp | (cl:in-package #:common-lisp-user)
(defpackage #:second-climacs-clim-base
(:use #:common-lisp)
(:local-nicknames
(#:base #:second-climacs-base)
(#:cl-syntax #:second-climacs-syntax-common-lisp)
(#:fundamental-syntax #:second-climacs-syntax-fundamental))
(:export
#:climacs
#:text-pane
#:global-t... | |
d89d47e6365b0bdbbd52d9490f768dbf6bd9847af62e9107a1c45fa6fcfd67c2 | patricoferris/ocaml-multicore-monorepo | test_entropy_collection_async.ml | open Core
open Async
module Printing_rng = struct
type g = unit
let block = 16
let create ?time:_ () = ()
let generate ~g:_ _n = assert false
let reseed ~g:_ data =
Format.printf "reseeding: %a@.%!" Cstruct.hexdump_pp data
let accumulate ~g:_ source =
let print data =
Format.printf "accu... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/tests/test_entropy_collection_async.ml | ocaml | open Core
open Async
module Printing_rng = struct
type g = unit
let block = 16
let create ?time:_ () = ()
let generate ~g:_ _n = assert false
let reseed ~g:_ data =
Format.printf "reseeding: %a@.%!" Cstruct.hexdump_pp data
let accumulate ~g:_ source =
let print data =
Format.printf "accu... | |
a98d8b9bf9840137c44ab5c474476a31316fcd3f8e06d802eee8636dcd2d4987 | alexandroid000/improv | Turtle2.hs | # LANGUAGE TemplateHaskell #
module Turtle2 (main) where
import Prelude hiding (dropWhile)
import Control.Applicative
import Control.Arrow
import Data.Complex
import AngleNum
import Ros.Node
import Ros.Topic (repeatM, force, dropWhile, metamorphM, yieldM)
import Ros.Topic.Util (everyNew, interruptible)
import Ros.Turtl... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/Examples/Turtle/src/Turtle2.hs | haskell | A type synonym for a 2D point.
A Topic of user-supplied waypoint trajectories.
Create Twist message with linear and angular velocity in arguments.
Compute linear distance to goal and bearing to goal
Steer based on a current pose estimate and distance from goal | # LANGUAGE TemplateHaskell #
module Turtle2 (main) where
import Prelude hiding (dropWhile)
import Control.Applicative
import Control.Arrow
import Data.Complex
import AngleNum
import Ros.Node
import Ros.Topic (repeatM, force, dropWhile, metamorphM, yieldM)
import Ros.Topic.Util (everyNew, interruptible)
import Ros.Turtl... |
45fe4c5d7bed172bfe2f8a7ff527e8fa1c875397d653daabeb20ff88023792c1 | HunterYIboHu/htdp2-solution | ex160-roit-world.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-abbr-reader.ss" "lang")((modname ex160-roit-world) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repea... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section10-list-design-recipe/ex160-roit-world.rkt | racket | about the language level of this file in a form that our tools can easily process.
Graphic constants
- 0
- (add1 N)
interpretation represents the natural numbers or counting numbers
N Image -> Image
N Image -> Image
Physical constants
A Pair is a structure (make-pair N List-of-posns)
A List-of-posns is one of... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex160-roit-world) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
(... |
746f0e14e59307c991ce384d343f024747285fac808e51af92dcc49bcfe8551d | mzp/scheme-abc | lexer.ml | open Base
open Node
open Parsec
let kwd =
Node.lift (fun x -> Genlex.Kwd x)
let ident =
Node.lift (fun x -> Genlex.Ident x)
let string =
Node.lift (fun x -> Genlex.String x)
let int =
Node.lift (fun x -> Genlex.Int x)
let float =
Node.lift (fun x -> Genlex.Float x)
let implode xs =
let empty ... | null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/parser/lexer.ml | ocaml | open Base
open Node
open Parsec
let kwd =
Node.lift (fun x -> Genlex.Kwd x)
let ident =
Node.lift (fun x -> Genlex.Ident x)
let string =
Node.lift (fun x -> Genlex.String x)
let int =
Node.lift (fun x -> Genlex.Int x)
let float =
Node.lift (fun x -> Genlex.Float x)
let implode xs =
let empty ... | |
4545a2d543a949d5d7e3774c7c7a58749931f3e079e04e61320dc8c5dd8feb81 | ocaml-sf/learn-ocaml-corpus | test24.ml | let test24 =
One ((2, 4), Zero Nil)
| null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/random_access_lists/wrong/test24.ml | ocaml | let test24 =
One ((2, 4), Zero Nil)
| |
67662860281ed3f3caaf13cf5a38e49233d5debd4a78d3f757abc5bbe3bb8038 | clj-easy/graalvm-clojure | main.clj | (ns simple.main
(:require [cprop.core :refer [load-config]])
(:gen-class))
(defn -main [& args]
(let [config (load-config :file "test-config.edn")]
(println config)
42
(println (= "/z-broker" (get-in config [:source :account :rabbit :vhost])))))
| null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/cprop/src/simple/main.clj | clojure | (ns simple.main
(:require [cprop.core :refer [load-config]])
(:gen-class))
(defn -main [& args]
(let [config (load-config :file "test-config.edn")]
(println config)
42
(println (= "/z-broker" (get-in config [:source :account :rabbit :vhost])))))
| |
c2d14c6bbd079c95bf7a14534c8a9d59886d5242b1fc7b733aed26f71ad7406d | nshepperd/funn | Pointed.hs | # LANGUAGE TypeFamilies , KindSignatures , FlexibleContexts #
# LANGUAGE BangPatterns , GADTs , RankNTypes , ScopedTypeVariables #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE FlexibleInstances , DataKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE DeriveFunctor #
# LANGUAGE StandaloneDeri... | null | https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/Diff/Pointed.hs | haskell | # LANGUAGE ConstraintKinds #
) = flip pushDiff
pac :: a -> Pointed m s r
unpac :: r -> Pointed m s a
pac = pure
unpac = pure
Pac m s (Ref s t) b) =>
Pac m s (f (r,t)) (a,b) where
rb <- pac t
unpac ref_ab = do (ra, rb) <- unpack2 ref_ab
r <- unp... | # LANGUAGE TypeFamilies , KindSignatures , FlexibleContexts #
# LANGUAGE BangPatterns , GADTs , RankNTypes , ScopedTypeVariables #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE FlexibleInstances , DataKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE DeriveFunctor #
# LANGUAGE StandaloneDeri... |
08c47c902b16974d34c6d649ed0cb7f959bf91819b2d1cfd10ad80686ced06c4 | camlp4/camlp4 | DumpCamlp4Ast.mli | (****************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/Camlp4/Printers/DumpCamlp4Ast.mli | ocaml | **************************************************************************
OCaml
... | Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - : initial version
* - Nicolas Pouillard: initial version
... |
41ef956c20a9d632cafa1480c7ee0576637103a3a83944238e93b1ad83f2eafc | akabe/ocaml-jupyter | evaluation.cppo.ml | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitat... | null | https://raw.githubusercontent.com/akabe/ocaml-jupyter/7ea00fde81a915ee9d86c979f295f4c5dac28db8/src/repl/evaluation.cppo.ml | ocaml | * Top-level loop of OCaml code evaluation
* {2 Communication} | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitat... |
eef169b331e0b39b8ab0a2339f20377be2468c811c54773689949ed8741967b2 | Twinside/Rasterific | QuadraticBezier.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE BangPatterns #-}
-- | Module handling math regarding the handling of quadratic
-- and cubic bezier curve.
module Graphics.Rasterific.QuadraticBezier
( -- * Helper functions
straightLine
, bezierFromPath
, decomposeBeziers
... | null | https://raw.githubusercontent.com/Twinside/Rasterific/eb07ea38aaad154e66de14a1b4a50fb70d0843bb/src/Graphics/Rasterific/QuadraticBezier.hs | haskell | # LANGUAGE BangPatterns #
| Module handling math regarding the handling of quadratic
and cubic bezier curve.
* Helper functions
| Create a list of bezier patch from a list of points,
> bezierFromPath [a, b, c, d, e, f, g] ==
| Only work if the quadratic bezier curve
is nearly flat
| Create a quadratic bezier ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
module Graphics.Rasterific.QuadraticBezier
straightLine
, bezierFromPath
, decomposeBeziers
, clipBezier
, sanitizeBezier
, sanitizeBezierFilling
, offsetBezier
, flattenBezier
, bezierBreakAt
, bezierLengthApproxi... |
7b2bd594c6e1ad14ad649407845dbb609f3e3fb03daadd83af367a981e5bbf7c | owlbarn/owl_mask_rcnn | evalVideo.ml | (* Performs object detection on each frame of a video and returns new video with
* masks. Requires FFMpeg. *)
open Mrcnn
(* Location of the video to convert and its framerate. *)
let video_file = "data/vids/video.mp4"
let framerate = 30
Your image will be resized to a square of this dimension before being fed
*... | null | https://raw.githubusercontent.com/owlbarn/owl_mask_rcnn/838d921401676271f96e867452e21b829aff29ec/examples/evalVideo.ml | ocaml | Performs object detection on each frame of a video and returns new video with
* masks. Requires FFMpeg.
Location of the video to convert and its framerate.
add the bounding boxes and the masks to the picture | open Mrcnn
let video_file = "data/vids/video.mp4"
let framerate = 30
Your image will be resized to a square of this dimension before being fed
* to the network . It has to be a multiple of 64 . A larger size means a more
* accurate result but more time and memory to process .
* to the network. It has to be a... |
5f80c077e6bd133ec9633c2afdda30c035f5e70abde38897965a95f76a401691 | janestreet/krb | principal.ml | open! Core
open Async
module Raw = struct
type t
external of_string : Context.t -> string -> t Krb_result.t = "caml_krb5_parse_name"
external to_string : Context.t -> t -> string Krb_result.t = "caml_krb5_unparse_name"
external free : Context.t -> t -> unit = "caml_krb5_free_principal"
external salt : Conte... | null | https://raw.githubusercontent.com/janestreet/krb/50993f4d8a5d42974a72e160b7b54613568184c1/internal/principal.ml | ocaml | open! Core
open Async
module Raw = struct
type t
external of_string : Context.t -> string -> t Krb_result.t = "caml_krb5_parse_name"
external to_string : Context.t -> t -> string Krb_result.t = "caml_krb5_unparse_name"
external free : Context.t -> t -> unit = "caml_krb5_free_principal"
external salt : Conte... | |
b5f376f55902439626191ce7020736808d4327fb47b3a8e49f2dd009104f0f4e | triffon/fp-2019-20 | 14--variations.rkt | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 14
Напишете функция , вариации на ` n ` елемента , .
(define (variations k n)
void)
(run-tests (test-suite "variations tests"
(check-eq? (variations 0 3)
1)
(check-eq? (variations 1 15)
... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/03--higher-order-functions--accumulate/14--variations.rkt | racket | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 14
Напишете функция , вариации на ` n ` елемента , .
(define (variations k n)
void)
(run-tests (test-suite "variations tests"
(check-eq? (variations 0 3)
1)
(check-eq? (variations 1 15)
... | |
f018c30fdbb9ef9547329ae508e3984fa4a5163df492cb7571db0a8b962225b6 | ghc/testsuite | ManyQueue.hs | {-# LANGUAGE BangPatterns #-}
module ManyQueue where
import Control.Concurrent
import Control.Monad
import Conf
newtype MQueue a = MQueue [MVar a]
newMQueue size = do
lst <- replicateM size newEmptyMVar
return (MQueue (cycle lst))
writeMQueue :: (MQueue a) -> a -> IO (MQueue a)
writeMQueue (MQueue (x:xs)) el... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/rts/T5644/ManyQueue.hs | haskell | # LANGUAGE BangPatterns #
workaround
heap overflow
forkIO $ writer mq iTERATIONS |
module ManyQueue where
import Control.Concurrent
import Control.Monad
import Conf
newtype MQueue a = MQueue [MVar a]
newMQueue size = do
lst <- replicateM size newEmptyMVar
return (MQueue (cycle lst))
writeMQueue :: (MQueue a) -> a -> IO (MQueue a)
writeMQueue (MQueue (x:xs)) el = do
putMVar x el
return ... |
01dd646f7589a6a805ab59c8f73855ffdc5841bde1c0ec535eb41cf3f33383f4 | sellout/LOOM | system-construction.lisp | (loom.internals:defpackage system-construction
(:use #:cl)
(:export #:compile-file
#:compile-file-pathname
#:load
#:with-compilation-unit
#:*features*
#:*compile-file-pathname* #:*compile-file-truename*
#:*load-pathname* #:*load-truename*
... | null | https://raw.githubusercontent.com/sellout/LOOM/b34b0590e82a8ba41ca1e58a8a825dd889285c1d/src/system-construction.lisp | lisp | (loom.internals:defpackage system-construction
(:use #:cl)
(:export #:compile-file
#:compile-file-pathname
#:load
#:with-compilation-unit
#:*features*
#:*compile-file-pathname* #:*compile-file-truename*
#:*load-pathname* #:*load-truename*
... | |
75f45453262eaeacc671fea77e00b91c598360b39cdd90f53d0d1f79ffa85f56 | fjvallarino/monomer | Main.hs | |
Module : Main
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' Ticker ' example .
Module : Main
Copyright : (c) 2018 Francisco Vallarino
License : BSD-3-Cl... | null | https://raw.githubusercontent.com/fjvallarino/monomer/ff2ea3b4140c9648fc338738c5aed8b089c922df/examples/ticker/Main.hs | haskell | |
Module : Main
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' Ticker ' example .
Module : Main
Copyright : (c) 2018 Francisco Vallarino
License : BSD-3-Cl... | |
0b2e24c2b06d35fcd99b6a28afbb696c75def59811c71dbd1aa53a24bcc28c1c | c-cube/ocaml-containers | CCPersistentHashtbl.ml | (* This file is free software, part of containers. See file "license" for more details. *)
* { 1 Persistent hash - table on top of 's hashtables }
type 'a iter = ('a -> unit) -> unit
type 'a printer = Format.formatter -> 'a -> unit
type 'a equal = 'a -> 'a -> bool
module type HashedType = sig
type t
val equal ... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCPersistentHashtbl.ml | ocaml | This file is free software, part of containers. See file "license" for more details.
* Create a new hashtable, with the given initial capacity
* Is the table empty?
* Find the value for this key, or fails
@raise Not_found if the key is not present in the table
* Synonym to {!find} with flipped arguments
* S... |
* { 1 Persistent hash - table on top of 's hashtables }
type 'a iter = ('a -> unit) -> unit
type 'a printer = Format.formatter -> 'a -> unit
type 'a equal = 'a -> 'a -> bool
module type HashedType = sig
type t
val equal : t -> t -> bool
val hash : t -> int
end
* { 2 Signature of such a hashtable }
module t... |
3e088da650bfbc31e0aa6c9c3fc10ea3e829ab320663d5a24fd504f24b674440 | MLstate/opalang | baseLazy.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/baseLazy.ml | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
6a2f6806f2bfa80d897472f239d9619fb5bceb5765ecf0c1f2900925b53e3872 | ocaml/odoc | reason.mli |
* Copyright ( c ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/ocaml/odoc/2f639d7d661bc5397afce83dfaa71af53d2a8677/src/document/reason.mli | ocaml | * Convert compilation unit or page models into a document |
* Copyright ( c ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
fa5f4f4a54e69a7bc69ce8e13031b3bada92604547e40832a8034f7a902605dd | opencog/agi-bio | simple-inference-full.scm | (define VERBOSE #t)
#!
Simple example of bio-inference using PLN by hand using full biospace.
Usage:
cd to this file's directory, run guile --no-auto-comile,
and then in guile scheme:
scheme@(guile-user)> (load "load-biospace.scm")
scheme@(guile-user)> (load "simple-inference-full.scm")
Background Kno... | null | https://raw.githubusercontent.com/opencog/agi-bio/9c03d9b0e81cb8a8b3a58179f3134f336e5dbdb6/reasoning/simple-by-hand/simple-inference-full.scm | scheme |
Load the atomspace knowledge and rules ;;
Inference Chain Steps ;;
...
(display "Applying Member2Subset rule to all gene memberlinks...\n")
this was taking too long against the full biospace (for develpment at least)
(define gene-memberlinks
(cog-filter
(append-map... | (define VERBOSE #t)
#!
Simple example of bio-inference using PLN by hand using full biospace.
Usage:
cd to this file's directory, run guile --no-auto-comile,
and then in guile scheme:
scheme@(guile-user)> (load "load-biospace.scm")
scheme@(guile-user)> (load "simple-inference-full.scm")
Background Kno... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.