_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 |
|---|---|---|---|---|---|---|---|---|
4148ad9c15d02cf35aba4e1c838e2c552bdc1676cd19211aab1bf7236ee2047e | Et7f3/ocalc | grandReel_on.ml | open GrandEntier_on
* grandreel est un tuple [ ( signe négatif , \[unité , dizaine , centaine , ... \ ] , exposant base 10 ) ]
[ -1,23 ] correspond à [ ( true , \[3 ; 2 ; 1\ ] , -2 ) ]
[-1,23] correspond à [(true, \[3; 2; 1\], -2)] *)
type grandreel = bool * int list * int
* zero de grandreel
let zero = false, [], ... | null | https://raw.githubusercontent.com/Et7f3/ocalc/667da625676829307fc59542906ed2075fe818bd/src/modules/grandReel_on.ml | ocaml | * unité de grandreel
* renvoie [grandreel < 0]
let is_nul (a, b, c) = b = []
* renvoie l'oposé
/ 0
0 / a -> +
sa is not ""
Convertit basiquement le nombre | open GrandEntier_on
* grandreel est un tuple [ ( signe négatif , \[unité , dizaine , centaine , ... \ ] , exposant base 10 ) ]
[ -1,23 ] correspond à [ ( true , \[3 ; 2 ; 1\ ] , -2 ) ]
[-1,23] correspond à [(true, \[3; 2; 1\], -2)] *)
type grandreel = bool * int list * int
* zero de grandreel
let zero = false, [], ... |
8cf5d4360e9d27b319bf9a6dedb24974319830eed7560fa7ef1065b0755c435a | fdopen/ppx_cstubs | gen_ml.mli | This file is part of ppx_cstubs ( )
* Copyright ( c ) 2018 - 2019 fdopen
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... | null | https://raw.githubusercontent.com/fdopen/ppx_cstubs/5d5ce9b7cf45d87bb71c046a76d30c17ec6075e5/src/internal/gen_ml.mli | ocaml | move me somewhere else ... | This file is part of ppx_cstubs ( )
* Copyright ( c ) 2018 - 2019 fdopen
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version... |
a543f4becfb05a6103317cdc8478a36334382f20ea8f30d0fcbc3b86dbdbac0c | ajhc/ajhc | HsSyn.hs | {-# OPTIONS_GHC -pgmF drift-ghc -F #-}
module FrontEnd.HsSyn where
import Data.Binary
import Data.Generics
import C.FFI
import FrontEnd.SrcLoc
import Name.Name
import Name.Names
import Options
import StringTable.Atom
import StringTable.Atom()
instance HasLocation HsAlt where
srcLoc (HsAlt sl _ _ _) = sl
instanc... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/FrontEnd/HsSyn.hs | haskell | # OPTIONS_GHC -pgmF drift-ghc -F #
! derive: update !
Export/Import Specifications
variable
T
T(..)
T(C_1,...,C_n)
module M (not for imports)
! derive: Binary !
deriving
rhs
where
! derive: is !
where
! derive: is, update !
! derive: Binary !
the following is used internally
! derive: Binary, is !
! derive... | module FrontEnd.HsSyn where
import Data.Binary
import Data.Generics
import C.FFI
import FrontEnd.SrcLoc
import Name.Name
import Name.Names
import Options
import StringTable.Atom
import StringTable.Atom()
instance HasLocation HsAlt where
srcLoc (HsAlt sl _ _ _) = sl
instance HasLocation HsExp where
srcLoc (H... |
b8fac75aa5f4c22cc20253e64b33e7fc1a4e922d4da0194f88f8b3bafe63d5b9 | jappeace/awesome-project-name | Render.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -Wno - missing - monadfail - instances #
# OPTIONS_GHC -fno - warn - orphans #
module Awe.Back.Render
( renderHtmlEndpoint
)
where
import Awe.Common
import Awe.Front.Main
import Control.Monad.IO.Class ( li... | null | https://raw.githubusercontent.com/jappeace/awesome-project-name/e80a52dc2673c748a922ec19945cf75368aa3a53/backend/src/Awe/Back/Render.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -Wno - missing - monadfail - instances #
# OPTIONS_GHC -fno - warn - orphans #
module Awe.Back.Render
( renderHtmlEndpoint
)
where
import Awe.Common
import Awe.Front.Main
import Control.Monad.IO.Class ( li... | |
f2e9541ce8e728cb7b94f0da96d634bbc4af72970ddbecd3db469d0322951991 | EligiusSantori/L2Apf | login_fail.scm | (module system racket/base
(provide login-server-packet/login-fail)
(require "../../packet.scm")
(define (login-server-packet/login-fail buffer)
(let ((s (open-input-bytes buffer)))
(list
(cons 'id (read-byte s))
(cons 'reason (case (read-byte s)
((#x01) 'system-error)
((#x02) 'pas... | null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/login/server/login_fail.scm | scheme | (module system racket/base
(provide login-server-packet/login-fail)
(require "../../packet.scm")
(define (login-server-packet/login-fail buffer)
(let ((s (open-input-bytes buffer)))
(list
(cons 'id (read-byte s))
(cons 'reason (case (read-byte s)
((#x01) 'system-error)
((#x02) 'pas... | |
94a3eea73936b7dfcca7796062b0911db0e4f941b6cfad3cdc1f113ad33f216b | fare/xcvb | release.lisp | ;; Help with Releasing XCVB. Goal: no more shell scripting!
#+xcvb (module (:depends-on ("sub-xcvb")))
(in-package #:xcvb-test)
(declaim (optimize (speed 2) (safety 3) (compilation-speed 0) (debug 3)))
(defparameter *spaces*
(coerce '(#\space #\return #\linefeed #\tab) 'base-string))
(defparameter *release-exclu... | null | https://raw.githubusercontent.com/fare/xcvb/460e27bd4cbd4db5e7ddf5b22c2ee455df445258/t/release.lisp | lisp | Help with Releasing XCVB. Goal: no more shell scripting!
-separated list of easy commands.
allow #. in iolib.asd |
#+xcvb (module (:depends-on ("sub-xcvb")))
(in-package #:xcvb-test)
(declaim (optimize (speed 2) (safety 3) (compilation-speed 0) (debug 3)))
(defparameter *spaces*
(coerce '(#\space #\return #\linefeed #\tab) 'base-string))
(defparameter *release-exclude*
'(:exclude "build" :exclude "obj" :exclude "obj-ne"
... |
d32ce938bbad07cd8fd30926c5a7c612e41e730455ba959f934782a206130d23 | matthewbauer/eu4-parser | generate-countries.hs | -- generate a map of features to "countries" from the parsed assets
import Prelude hiding (putStrLn)
import Data.Aeson
import System.Directory
import Data.Map hiding (foldr, null)
import Data.Char
import Generator
import Map
import Data.ByteString.Lazy.Char8 (putStrLn)
skip :: String -> Bool
skip "." = True
skip ".."... | null | https://raw.githubusercontent.com/matthewbauer/eu4-parser/4cb2eb3dc6660916082d59ce290cdcde0e062996/generate-countries.hs | haskell | generate a map of features to "countries" from the parsed assets |
import Prelude hiding (putStrLn)
import Data.Aeson
import System.Directory
import Data.Map hiding (foldr, null)
import Data.Char
import Generator
import Map
import Data.ByteString.Lazy.Char8 (putStrLn)
skip :: String -> Bool
skip "." = True
skip ".." = True
skip _ = False
historyDir :: String
historyDir = "history/c... |
0430dae3fdd63210ef5b0e77246f6a933eef5d4710ec01c20c6b31b63ec0b3d3 | wpfjtmwls/TensorFlOcaml | fileio.ml | open Owl
open Tfgraph
open Tfnode
module Fileio = struct
let export_graph str gr n = ()
let import_graph str = Graph.empty, Tfnode.empty
end | null | https://raw.githubusercontent.com/wpfjtmwls/TensorFlOcaml/aa08d5da1f622e40dc0002e3879aab70b928e132/fileio.ml | ocaml | open Owl
open Tfgraph
open Tfnode
module Fileio = struct
let export_graph str gr n = ()
let import_graph str = Graph.empty, Tfnode.empty
end | |
e48144dbedc283882123a3867eb284571aa34da7edccbdf41c2396eeaeff2c28 | markcox80/basic-binary-ipc | posix.lisp | (in-package "BASIC-BINARY-IPC.TESTS")
(define-test define-system-call
(let ((fd (basic-binary-ipc::%ff-socket :pf-inet :sock-stream 0)))
(assert-true (plusp fd))
(assert-true (zerop (basic-binary-ipc::%ff-close fd)))
(assert-error 'socket-error (basic-binary-ipc::%ff-close fd))))
(define-test poll-fd-ev... | null | https://raw.githubusercontent.com/markcox80/basic-binary-ipc/9a80a2e0ea9eba94b9bd357917c7066bbdf1b1aa/tests/posix.lisp | lisp | (in-package "BASIC-BINARY-IPC.TESTS")
(define-test define-system-call
(let ((fd (basic-binary-ipc::%ff-socket :pf-inet :sock-stream 0)))
(assert-true (plusp fd))
(assert-true (zerop (basic-binary-ipc::%ff-close fd)))
(assert-error 'socket-error (basic-binary-ipc::%ff-close fd))))
(define-test poll-fd-ev... | |
6ded81dc6c9bc72e2f906eedff3abb7aef6f12d1094e3b82fb9a6838a9f1b99f | rizo/snowflake-os | listLabels.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/listLabels.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : listLabels.mli , v 1.12 2007 ... |
28473db92288dd1872fb28eac33fb76dabecb436b713e1284e8a6bc7f5245bd7 | dyoo/whalesong | parse-bytecode-5.1.1.rkt | #lang racket/base
(require "../version-case/version-case.rkt"
(for-syntax racket/base))
(version-case
[(and (version<= "5.1.1" (version))
(version< (version) "5.1.1.900"))
Parsing Racket 5.1.1 bytecode structures into our own structures .
(require "path-rewriter.rkt"
"../compile... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/parser/parse-bytecode-5.1.1.rkt | racket | The module path index resolver figures out how to translate module path indices to module names.
As we're parsing, we watch for closure cycles. On any subsequent time where
The map is from the gen-id to the entry-point label of the lambda.
Code is copied-and-pasted from compiler/decompile. Maps the primval ids to... | #lang racket/base
(require "../version-case/version-case.rkt"
(for-syntax racket/base))
(version-case
[(and (version<= "5.1.1" (version))
(version< (version) "5.1.1.900"))
Parsing Racket 5.1.1 bytecode structures into our own structures .
(require "path-rewriter.rkt"
"../compile... |
33960a86fa199c32b9fa4178df138d681e6d01f76ff92305cd6d84cced935c49 | anton-k/reader-pattern-servant-app | GetMessage.hs | -- | Get message by id handler
module Server.GetMessage
( Env(..)
, Db(..)
, handle
) where
import DI.Log
import Types
-----------------------------------------
-- Env
data Env = Env
{ db :: Db
, log :: Log
}
data Db = Db
{ getMessage :: MessageId -> IO (Maybe Message)
}
------------------------... | null | https://raw.githubusercontent.com/anton-k/reader-pattern-servant-app/05b9ae841221057d8dab38bf2eaa2babb3410973/src/Server/GetMessage.hs | haskell | | Get message by id handler
---------------------------------------
Env
---------------------------------------
Handler | module Server.GetMessage
( Env(..)
, Db(..)
, handle
) where
import DI.Log
import Types
data Env = Env
{ db :: Db
, log :: Log
}
data Db = Db
{ getMessage :: MessageId -> IO (Maybe Message)
}
handle :: MessageId -> App Env Message
handle messageId = do
Db{..} <- asks (.db)
Log{..} <- askLo... |
b3a3eaab870d65b255b61550791032604abc7e45de319f1dfb19a354b33c3494 | racehub/om-bootstrap | shared.cljs | (ns om-bootstrap.docs.shared
(:require [om-tools.dom :as d :include-macros true]))
(defn page-header [{:keys [title subtitle]}]
(d/div {:class "bs-docs-header" :id "content"}
(d/div {:class "container"}
(d/h1 title)
(when subtitle
(d/p subtitle)))))
(defn... | null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/docs/src/cljs/om_bootstrap/docs/shared.cljs | clojure | (ns om-bootstrap.docs.shared
(:require [om-tools.dom :as d :include-macros true]))
(defn page-header [{:keys [title subtitle]}]
(d/div {:class "bs-docs-header" :id "content"}
(d/div {:class "container"}
(d/h1 title)
(when subtitle
(d/p subtitle)))))
(defn... | |
73a369b0aac34edcb415d874950636ff35948009601b513e9ca1a9cd1d4c61bc | dbuenzli/webs | webs_cli.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The webs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/webs/d5adef4caf40ecc3e7f1ee7a346780b94c47d90f/src/webs_cli.mli | ocaml | * Command line interface support.
* [service_path] is an option for specifying an optional service path.
* [quick_serve ~name (Ok s)] runs [s] with the {!Webs_httpc} and handles
a few default command line options. If you want to be able to specify
a docroot on the command line you need to specify [with_docroo... | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The webs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... |
728487f0a81f2847e32a364316f4be62ae9414b35118a2447e941354b17b39aa | kingcons/clones | mappers.lisp | (in-package :cl-user)
(defpackage :clones.mappers
(:use :cl :clones.rom)
(:import-from :clones.conditions
:unsupported-mapper)
(:import-from :clones.util
:ub16)
(:export #:mapper
#:load-prg
#:store-prg
#:load-chr
#:store-chr
... | null | https://raw.githubusercontent.com/kingcons/clones/a2f7d84ad6a12c0a33b50a453a377a1fb9e3afac/src/mappers.lisp | lisp | Mapper Protocol Notes:
store and store-chr are permitted to return an arbitrary value if
a particular mapper does not support the store operation.
End of Mapper Protocol, Concrete implementations follow... | (in-package :cl-user)
(defpackage :clones.mappers
(:use :cl :clones.rom)
(:import-from :clones.conditions
:unsupported-mapper)
(:import-from :clones.util
:ub16)
(:export #:mapper
#:load-prg
#:store-prg
#:load-chr
#:store-chr
... |
a4e778dac67950d10ab2fb488a73dd4f3493176c729f5034b0dbc40f22afeea6 | serefayar/ayatori | core.clj | (ns ayatori.web-server.core
(:require [com.stuartsierra.component :as component]
[aleph.http :as http]
[clojure.tools.logging :as log]))
(defrecord WebServer [handler-fn
app-state
server]
component/Lifecycle
(start [this]
(if server
th... | null | https://raw.githubusercontent.com/serefayar/ayatori/32fc4818c623c11b694d313033d2d9c237831683/components/web_server/src/ayatori/web_server/core.clj | clojure | (ns ayatori.web-server.core
(:require [com.stuartsierra.component :as component]
[aleph.http :as http]
[clojure.tools.logging :as log]))
(defrecord WebServer [handler-fn
app-state
server]
component/Lifecycle
(start [this]
(if server
th... | |
1b333905ed1959a2d292dcc63d7131481690690d0449488d7251ff35133766f2 | masonium/cl-autodiff | autodiff.lisp | (in-package :cl-autodiff)
(defparameter *ad-fns* (make-hash-table))
(defmacro define-with-derivatives (name variable-list &body body)
"Define a function that computes partial derivatives automatically"
;; Most of the work is done in MAKE-AUTODIFF. This functions just lifts the inputs
;; to derivative n-tup... | null | https://raw.githubusercontent.com/masonium/cl-autodiff/922c1df59d7ba9c7213f661b4b8b9bec0d8931a2/autodiff.lisp | lisp | Most of the work is done in MAKE-AUTODIFF. This functions just lifts the inputs
to derivative n-tuples, which the autodiff expressions operate on.
symbols in the variable list are left alone
constants are literal numbers, pi, or symbols that we don't recognize
binarize each of +, -, *, and /
numerical predicates... | (in-package :cl-autodiff)
(defparameter *ad-fns* (make-hash-table))
(defmacro define-with-derivatives (name variable-list &body body)
"Define a function that computes partial derivatives automatically"
(let ((ad-name (symbolicate "ADFN-" name))
(no-deriv-name (symbolicate name "-NO-AD")))
(setf (gethash ... |
1088952f6bba75eaeab52d2cf6c6ec7316cdcff4ad74fe516ddca938993b3033 | dleslie/allegro-egg | mouse.scm | (define mouse-addon-installed? (foreign-lambda bool "al_is_mouse_installed"))
(define mouse-addon-install (foreign-lambda bool "al_install_mouse"))
(define mouse-addon-uninstall (foreign-lambda void "al_uninstall_mouse"))
(define mouse-button-count (foreign-lambda unsigned-integer32 "al_get_mouse_num_buttons"))
(defin... | null | https://raw.githubusercontent.com/dleslie/allegro-egg/0435fb891dda5c64e95aa9dedccddd31b17e27da/mouse.scm | scheme | (define mouse-addon-installed? (foreign-lambda bool "al_is_mouse_installed"))
(define mouse-addon-install (foreign-lambda bool "al_install_mouse"))
(define mouse-addon-uninstall (foreign-lambda void "al_uninstall_mouse"))
(define mouse-button-count (foreign-lambda unsigned-integer32 "al_get_mouse_num_buttons"))
(defin... | |
f5c7de2ef6df5bbc74c06fd197f71093fff053bcd314a8bbc57a92f5c6b2311b | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $ do
cabal' "clean" []
res <- cabalWithStdin "repl" ["-v2"] "foo"
-- Make sure we don't get this ghci error
* Lib > ghc : ^^ Could not load ' _ foo ' , dependency unresolved . See top entry above .
assertOutputDoesNotContain "Could not load" res
assertOu... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/ReplCSources/cabal.test.hs | haskell | Make sure we don't get this ghci error | import Test.Cabal.Prelude
main = cabalTest $ do
cabal' "clean" []
res <- cabalWithStdin "repl" ["-v2"] "foo"
* Lib > ghc : ^^ Could not load ' _ foo ' , dependency unresolved . See top entry above .
assertOutputDoesNotContain "Could not load" res
assertOutputContains "Building C Sources..." res
|
5a4e583d9a46cebf8045d877e44b35605c1615c58eda88942b2213fd6f5ca3b5 | spell-music/csound-expression | Patch.hs | # Language ScopedTypeVariables , TypeSynonymInstances , FlexibleInstances , LambdaCase #
-- | Patches.
module Csound.Air.Patch(
CsdNote, Instr, MonoInstr, Fx, Fx1, Fx2, FxSpec(..), DryWetRatio,
Patch1, Patch2, Patch(..), PolySyntSpec(..), MonoSyntSpec(..),
SyntSkin, GenInstr, GenMonoInstr, GenFxSpec,
polyS... | null | https://raw.githubusercontent.com/spell-music/csound-expression/b2ebcfc7f7cf62d5e67779fea0aacefa3724db74/csound-expression/src/Csound/Air/Patch.hs | haskell | | Patches.
* Midi
* Events
* Sco
* Single note
* Fx
** Specific fx
* Pads
* Misc
* Rever
* Sound font patches
* Monosynt params
* Csound API
* Custom temperament
** Csound API
that we'd like to be able to change after patch is already constructed. For instance the filter type can greatly
change the cha... | # Language ScopedTypeVariables , TypeSynonymInstances , FlexibleInstances , LambdaCase #
module Csound.Air.Patch(
CsdNote, Instr, MonoInstr, Fx, Fx1, Fx2, FxSpec(..), DryWetRatio,
Patch1, Patch2, Patch(..), PolySyntSpec(..), MonoSyntSpec(..),
SyntSkin, GenInstr, GenMonoInstr, GenFxSpec,
polySynt, monoSynt,... |
3471dee9a37e0c3829385e31962b5ef3d4e3e70cf346fd469a8eec7ec6537860 | tezos/tezos-mirror | builtin_benchmarks.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/cdc7a4382ef6dfcd6c73f86d9a29b829b33d18d4/src/lib_benchmark/builtin_benchmarks.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs , < >
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 A... |
32942823a951bc87458fa6d4e4eac3f3fa3fc41a43fb4e34c9bed45e33c215ec | takikawa/racket-ppa | image.rkt | #lang racket/base
(provide (all-from-out teachpack/2htdp/image)
(all-from-out lang/posn)
image=?
image mode image-color color y-place x-place
pulled-point angle side-count step-count
posn real-valued-posn
pen pen-style pen-cap pen-join)
(require teachpack/2htdp/image)
(require (only-in lang/imageeq ... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/deinprogramm/deinprogramm/sdp/image.rkt | racket | #lang racket/base
(provide (all-from-out teachpack/2htdp/image)
(all-from-out lang/posn)
image=?
image mode image-color color y-place x-place
pulled-point angle side-count step-count
posn real-valued-posn
pen pen-style pen-cap pen-join)
(require teachpack/2htdp/image)
(require (only-in lang/imageeq ... | |
7024ade2183e459d20c5b373ce6513508daf68fff8ab45e1e87b5d2e544b5d8a | techascent/tech.datatype | iterable_to_list.clj | (ns tech.v2.datatype.mutable.iterable-to-list
(:require [tech.v2.datatype.casting :as casting]
[tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.typecast :as typecast]))
(defmacro make-iter->list-table
[]
`(->> [~@(for [dtype casting/base-marshal-types]
[dtype `... | null | https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/mutable/iterable_to_list.clj | clojure | (ns tech.v2.datatype.mutable.iterable-to-list
(:require [tech.v2.datatype.casting :as casting]
[tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.typecast :as typecast]))
(defmacro make-iter->list-table
[]
`(->> [~@(for [dtype casting/base-marshal-types]
[dtype `... | |
0e62c366ba1a27ba8f25d54e411c2fb11cc08d6539d492803ae68daf8dc0d7ca | MaskRay/OJHaskell | consonant-reversal.hs | import Control.Monad.State
import Data.Char
import Data.Functor
import Data.Maybe
import qualified Data.Set as S
import Text.Printf
import qualified Data.ByteString.Char8 as B
main = do
cases <- readLn
let vowel = S.fromList "aeiou"
replicateM_ cases $ do
a <- B.getLine
let b = B.reverse $ B.filter (`S.n... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/HackerRank/contests/womens-codesprint/consonant-reversal.hs | haskell | import Control.Monad.State
import Data.Char
import Data.Functor
import Data.Maybe
import qualified Data.Set as S
import Text.Printf
import qualified Data.ByteString.Char8 as B
main = do
cases <- readLn
let vowel = S.fromList "aeiou"
replicateM_ cases $ do
a <- B.getLine
let b = B.reverse $ B.filter (`S.n... | |
0339c4a7f73e761f217a78f10cd158af57a90ff184f620c8336b8abd6462f638 | albertoruiz/easyVision | geademo.hs | -- simpler format for multiview problems
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Util(diagl, mplot)
import Vision hiding (selectSol)
import Vision.LASBA
import qualified Vision.Gea as G
import Vision.Types
import Vision.IO
import Vision.Multiview
import Vision.Epipolar
import Vision.Bootstrap
import ... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/vision/multiview/geademo.hs | haskell | simpler format for multiview problems
--------------------------------------------------------------
tracksPath = "../../../data/tracks/"
--------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------... |
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Util(diagl, mplot)
import Vision hiding (selectSol)
import Vision.LASBA
import qualified Vision.Gea as G
import Vision.Types
import Vision.IO
import Vision.Multiview
import Vision.Epipolar
import Vision.Bootstrap
import Util.ShowReco
import Util.Misc(mean,debug... |
3e3eb2f1a172938ea687c440517d5bd8bcff3397e93be18191c2db47e9ba8a54 | ocurrent/ocurrent | current_gitlab.ml | open Lwt.Infix
module Repo_id = Repo_id
module Api = Api
module Auth = Auth
module Metrics = struct
open Prometheus
let namespace = "ocurrent"
let subsystem = "gitlab"
let webhook_events_total =
let help = "Incoming webhook events" in
Counter.v_label ~label_name:"event" ~help ~namespace ~subsystem "... | null | https://raw.githubusercontent.com/ocurrent/ocurrent/8b9c5c1cbfde2a5d69ad9325fd70574dcee173ff/plugins/gitlab/current_gitlab.ml | ocaml | open Lwt.Infix
module Repo_id = Repo_id
module Api = Api
module Auth = Auth
module Metrics = struct
open Prometheus
let namespace = "ocurrent"
let subsystem = "gitlab"
let webhook_events_total =
let help = "Incoming webhook events" in
Counter.v_label ~label_name:"event" ~help ~namespace ~subsystem "... | |
cdb84f32003ffe5b140cee500552d215567fa90a8e6c0d96945cd26b85ff3009 | ocaml/opam | opamStd.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2020 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/c53b1a83d73d05e0abd361f9bc8361dcd121b6e8/src/core/opamStd.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2020 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
module type SET = sig
include Set.S
val map: (elt -> elt) -> t -> t
val is_singleton: t ... |
e60a4e482eab6dfd0016a09926c1b09a20c7b7d4e1b654564b5a25cf0ec33c99 | ThatGeoGuy/chicken-graphs | test-multigraph.scm | Copyright ( c ) 2015 ,
;;;; All rights reserved.
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions are met:
;;;;
1 . Redistributions of source code must retain the above copyright notice ,
;;;; this list of... | null | https://raw.githubusercontent.com/ThatGeoGuy/chicken-graphs/5642ad70e40c44b06a5efed6a0917096d4182d52/tests/test-multigraph.scm | scheme | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation
and/or othe... | Copyright ( c ) 2015 ,
1 . Redistributions of source code must retain the above copyright notice ,
2 . Redistributions in binary form must reproduce the above copyright notice ,
3 . Neither the name of the copyright holder nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND C... |
5a3ba667a12c1ffd958aeb745f599f76ec4a6723398639871491e443e415a92e | discus-lang/salt | Set.hs |
module Salt.Core.Prim.Ops.Set where
import Salt.Core.Prim.Ops.Base
import qualified Data.Set as Set
primOpsSet
= [ PP { name = "set'empty"
, tsig = [("a", TData)] :*> TSet "a"
, step = \[NTs [t]]
-> [VSet t $ Set.empty]
, docs = "Construct an empty set." }
, PP ... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Prim/Ops/Set.hs | haskell |
module Salt.Core.Prim.Ops.Set where
import Salt.Core.Prim.Ops.Base
import qualified Data.Set as Set
primOpsSet
= [ PP { name = "set'empty"
, tsig = [("a", TData)] :*> TSet "a"
, step = \[NTs [t]]
-> [VSet t $ Set.empty]
, docs = "Construct an empty set." }
, PP ... | |
e315099710e275dd05243ab9b562cbbfdde486d36d7d1b1a73b4fd014f16eaab | flipstone/haskell-for-beginners | 4_im_a_list_comprehension.hs | build a list of all the positive integers less than 100
that are multiples of 3 * or * 5
write a function that takes two lists returns a new list
by removing the contents of the second list from the first
write a function that accepts two lists of numbers and
returns a list of each number in the first l... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_02/4_im_a_list_comprehension.hs | haskell | return the following lists:
write a function that censors every string in a list by replacing
the vowels in them with *
For good measure, it should remove the string "dingleberry" from
the list, if it appears
| build a list of all the positive integers less than 100
that are multiples of 3 * or * 5
write a function that takes two lists returns a new list
by removing the contents of the second list from the first
write a function that accepts two lists of numbers and
returns a list of each number in the first l... |
cade0f95dcb2f23a37b6894184270f0ee4a488e768b2969d76e3b2d37a59e1cd | seckcoder/course-compiler | r4_18.rkt | (define (big [a : Integer] [b : Integer] [c : Integer] [d : Integer] [e : Integer]
[f : Integer] [g : Integer] [h : Integer] [i : Integer] [j : Integer]) : Integer
(+ d j))
(define (big2 [a : Integer] [b : Integer] [c : Integer] [d : Integer] [e : Integer]
[f : Integer] [g : Integer... | null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r4_18.rkt | racket | (define (big [a : Integer] [b : Integer] [c : Integer] [d : Integer] [e : Integer]
[f : Integer] [g : Integer] [h : Integer] [i : Integer] [j : Integer]) : Integer
(+ d j))
(define (big2 [a : Integer] [b : Integer] [c : Integer] [d : Integer] [e : Integer]
[f : Integer] [g : Integer... | |
dbf96e871362df837289811bf536454bddc4d47efe93ea358762beab5771cf11 | fugue/fregot | Extended.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE Cons... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Options/Applicative/Extended.hs | haskell | # LANGUAGE ConstraintKinds #
^ Option xxx
^ Info for xxx
^ Info for --no-xxx | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE Scoped... |
322d04702adb9edced549e9733fd04a7d53a382186a3ade50fd305773afc843d | goranmoomin/cl-cowsay | replace-cow.lisp | ;;;; replace-cow.lisp
(defpackage #:cl-cowsay.replace-cow
(:export #:replace-cow))
(in-package #:cl-cowsay.replace-cow)
(defun replace-cow (cow eyes tongue thoughts)
(setf cow (extract-cow cow)
cow (cl-ppcre:regex-replace-all "\\$thoughts" cow thoughts)
cow (cl-ppcre:regex-replace-all "\\$eyes" c... | null | https://raw.githubusercontent.com/goranmoomin/cl-cowsay/36b1123cdbefeb9bcde4572f992705cc7da5acaf/replace-cow.lisp | lisp | replace-cow.lisp |
(defpackage #:cl-cowsay.replace-cow
(:export #:replace-cow))
(in-package #:cl-cowsay.replace-cow)
(defun replace-cow (cow eyes tongue thoughts)
(setf cow (extract-cow cow)
cow (cl-ppcre:regex-replace-all "\\$thoughts" cow thoughts)
cow (cl-ppcre:regex-replace-all "\\$eyes" cow eyes)
cow (... |
00b69faffb953c0253d9a8829436d7ddec3f26b4dcdb79187ec57f3cc1b9ffce | nchataing/caml-migrate-floatarray | cmd.ml | (******************************************************************)
Copyright ( C ) 2020 - 2021 . All rights reserved .
(* *)
(* This software may be modified and distributed under the terms *)
of the BSD license . See the LICENSE file for details... | null | https://raw.githubusercontent.com/nchataing/caml-migrate-floatarray/9e7bb55ba7a801f20cdd9ce7701f0bb0200c1459/src/cmd.ml | ocaml | ****************************************************************
This software may be modified and distributed under the terms
**************************************************************** | Copyright ( C ) 2020 - 2021 . All rights reserved .
of the BSD license . See the LICENSE file for details .
let () = Load_path.init [ Config.standard_library ]
let build (path : string) =
Io.with_chdir path (fun () -> Sys.command (Filename.quote_command "dune" [ "build"; "@check" ]))
|> ignore
l... |
d1eef1769896a83995600a25545d5e2838d199af5ffe8ff527ce9adcf0a67779 | hexlet-codebattle/battle_asserts | fizzbuzz.clj | (ns battle-asserts.issues.fizzbuzz
(:require [clojure.test.check.generators :as gen]))
(def level :elementary)
(def tags ["strings"])
(def description
{:en "If a number is divisible by 3, return \"Fizz\". If a number is divisible by 5, return \"Buzz\". If a number is divisible by 3 and 5, return \"FizzBuzz\". Ot... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/6491f683ef027d1601cfc147531e4f4b71dc9d4e/src/battle_asserts/issues/fizzbuzz.clj | clojure | (ns battle-asserts.issues.fizzbuzz
(:require [clojure.test.check.generators :as gen]))
(def level :elementary)
(def tags ["strings"])
(def description
{:en "If a number is divisible by 3, return \"Fizz\". If a number is divisible by 5, return \"Buzz\". If a number is divisible by 3 and 5, return \"FizzBuzz\". Ot... | |
bc2c7a6964f6673fdf08a5a8256cb95490d2ff74de4ed35eac5f8f17f6a02667 | conal/lambda-ccc | ReifySimple.hs | # LANGUAGE TemplateHaskell , TypeOperators , GADTs , KindSignatures #
# LANGUAGE ViewPatterns , PatternGuards #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# LANGUAGE MagicHash , MultiWayIf , TupleSections , CPP #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
# OPTIONS_GHC -Wall #
{ - # OPTIONS_... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/ReifySimple.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types #
TEMP
TEMP
--------------------------------------------------------------------
|
Module : LambdaCCC.ReifySimple
LICENSE : BSD3
Maintainer :
Stability : experimental
--------------------------------------------------------------------
, ifN... | # LANGUAGE TemplateHaskell , TypeOperators , GADTs , KindSignatures #
# LANGUAGE ViewPatterns , PatternGuards #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# LANGUAGE MagicHash , MultiWayIf , TupleSections , CPP #
# OPTIONS_GHC -Wall #
Copyright : ( c ) 2013 Tabula , Inc.
Reify a Core expression into GAD... |
e222160fb6d0885a6a9322185ad1a1484a10858f743acd21f8c20c4a27862e44 | ocaml-gospel/cameleer | why3ocaml_driver.ml | * Temporary " driver " from OCaml symbols into WhyML .
This is a very simple workaround , in order to support translation of very
simple OCaml programs . In the future , this should resemble the drivers
technology of Why3 , i.e. , one should be able to provide a driver file
mapping OCaml symbol... | null | https://raw.githubusercontent.com/ocaml-gospel/cameleer/1a5209d7f172dd24d12b9a5ac7b7cccf30cebfc9/src/why3ocaml_driver.ml | ocaml | FIXME: this is only true for integers
FIXME: this is only true for integers
FIXME: understand why this happens in program symbols | * Temporary " driver " from OCaml symbols into WhyML .
This is a very simple workaround , in order to support translation of very
simple OCaml programs . In the future , this should resemble the drivers
technology of Why3 , i.e. , one should be able to provide a driver file
mapping OCaml symbol... |
e4753a2fe9b716be178906140d9b304e2e67f15d646035dd1af97cff4544a84b | UnixJunkie/rankers | myArray.ml | Copyright ( C ) 2019 ,
laboratory ,
Department of Bioscience and Bioinformatics ,
Faculty of Computer Science and Systems Engineering ,
Kyushu Institute of Technology ,
680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan .
Yamanishi laboratory,
Department of Bioscience and Bioin... | null | https://raw.githubusercontent.com/UnixJunkie/rankers/46772a75192c83e1b911d25a49753cdd3c7ca4ed/src/myArray.ml | ocaml | folded over the whole array
stopped early | Copyright ( C ) 2019 ,
laboratory ,
Department of Bioscience and Bioinformatics ,
Faculty of Computer Science and Systems Engineering ,
Kyushu Institute of Technology ,
680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan .
Yamanishi laboratory,
Department of Bioscience and Bioin... |
b6cb8fb626bad7887c7674c6e6ed7a930f76317300015dc4d03c188b439c5491 | ghorn/spatial-math | SpatialMath.hs | # OPTIONS_GHC -Wall #
# Language MultiParamTypeClasses #
{-# Language FunctionalDependencies #-}
{-# Language FlexibleInstances #-}
# Language GeneralizedNewtypeDeriving #
{-# Language DeriveFunctor #-}
{-# Language DeriveFoldable #-}
{-# Language DeriveTraversable #-}
{-# Language DeriveGeneric #-}
{-# Language TypeOp... | null | https://raw.githubusercontent.com/ghorn/spatial-math/22afc3e91b6bed7e988da3deae6cfde19383192b/src/SpatialMath.hs | haskell | # Language FunctionalDependencies #
# Language FlexibleInstances #
# Language DeriveFunctor #
# Language DeriveFoldable #
# Language DeriveTraversable #
# Language DeriveGeneric #
# Language TypeOperators #
* re-export for convenience
# INLINE _x #
# INLINE _xy #
defined in terms of quaternion composition
compute q1 | # OPTIONS_GHC -Wall #
# Language MultiParamTypeClasses #
# Language GeneralizedNewtypeDeriving #
module SpatialMath
( ArcTan2(..)
, Euler(..)
, Quaternion(..), V3(..)
, Rotation(..)
, Rot(..)
, V3T(..)
, R1(..), R2(..), R3(..)
, cross
, orthonormalize
, dcmOfQuat
, dcmOfEuler321
, quatOfDcm
,... |
9eb550500fae01dddd435aaa2709d98b4b703a12866bc2b3163e0bc60a64df4f | backtracking/ocamlgraph | strat.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/tests/strat.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
$ Id:$
... |
d236d53ff3bbfe328eebaaf55316efb91107f3a126892d1acda4b4c45c150aa6 | nasa/Common-Metadata-Repository | pipeline.clj | (ns cmr.nlp.elastic.client.pipeline
(:require
[cheshire.core :as json]
[taoensso.timbre :as log])
(:import
(java.lang String)
(org.elasticsearch.action.ingest DeletePipelineRequest
GetPipelineRequest
PutPipelineRequest)
(org.elas... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/nlp/src/cmr/nlp/elastic/client/pipeline.clj | clojure |
Indexing API Wrappers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| (ns cmr.nlp.elastic.client.pipeline
(:require
[cheshire.core :as json]
[taoensso.timbre :as log])
(:import
(java.lang String)
(org.elasticsearch.action.ingest DeletePipelineRequest
GetPipelineRequest
PutPipelineRequest)
(org.elas... |
f4f2e2d08948a83bbcd079e54bd6a0000212bb2ebfad7d9d112a7e6239d1df4c | hakaru-dev/hakaru | Types.hs | # LANGUAGE DataKinds ,
FlexibleContexts ,
GADTs ,
RankNTypes ,
KindSignatures #
FlexibleContexts,
GADTs,
RankNTypes,
KindSignatures #-}
----------------------------------------------------------------
-- ... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/CodeGen/Types.hs | haskell | --------------------------------------------------------------
2016.07.11
|
License : BSD3
Stability : experimental
Provides tools for building C Types from Hakaru types
--------------------------------------------------------------
tools for building C... | # LANGUAGE DataKinds ,
FlexibleContexts ,
GADTs ,
RankNTypes ,
KindSignatures #
FlexibleContexts,
GADTs,
RankNTypes,
KindSignatures #-}
Module : Language . Hakaru . CodeGen . Types
Copyright :... |
9d6cb52412c17aa73d3933c77ff592b66922864b5ac37f9e042c9083b75c953d | 1Jajen1/Brokkr | VarInt.hs | # LANGUAGE MagicHash #
# LANGUAGE RecordWildCards #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE TemplateHaskell #
module Main (main) where
import Test.Tasty.Bench
import qualified Data.Vector.Unboxed as U
import Foreign.ForeignPtr
import Data.Word
import GHC.Generics
import Control.DeepSeq
import Data.Primitive.Ptr
im... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/fe56efaf450f29a5571cc34fa01f7301678f3eaf/benchmark/VarInt.hs | haskell | # LANGUAGE DeriveAnyClass #
Some experiments with writing varInts
Relevant: -fast-can-you-write-a-varint/
------------------------------------------------------------
TODO Bench against repeated shift and mask if statements
# INLINE writeMask # | # LANGUAGE MagicHash #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Main (main) where
import Test.Tasty.Bench
import qualified Data.Vector.Unboxed as U
import Foreign.ForeignPtr
import Data.Word
import GHC.Generics
import Control.DeepSeq
import Data.Primitive.Ptr
import Data.Int
import GHC.Exts
im... |
0bc3fb7487d50c6d17768c561768d6c0107b298270196cadd06ce85f00acf74b | robert-strandh/Second-Climacs | form.lisp | (cl:in-package #:second-climacs-syntax-common-lisp)
This method is applicable when the caller specifies NIL for the
;;; pawn, meaning that we do not know the nature of the wad att all,
;;; only that it ought to be a form. It could be an atomic wad, in
;;; which case it should not have its indentation computed at al... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/f07b3418675e86346e6055229a481cc6a12d9e8c/Code/Syntax/Common-Lisp/Indentation/form.lisp | lisp | pawn, meaning that we do not know the nature of the wad att all,
only that it ought to be a form. It could be an atomic wad, in
which case it should not have its indentation computed at all. Or
it could be a compound wad, but with an unknown operator, in which
case we compute the indentation as if the form is a ... | (cl:in-package #:second-climacs-syntax-common-lisp)
This method is applicable when the caller specifies NIL for the
(defmethod compute-form-indentation ((wad expression-wad) (pawn null) client)
(if (simple-form-p wad)
(let ((first-child (first (children wad))))
(if (and (typep first-child 'expression... |
a09e171f42bcab275aa8e80ca26700a838008ad1657cca1e1c6ce568bd0319f4 | hipsleek/hipsleek | frontc.ml |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/frontc/frontc.ml | ocaml | Output management
filename for patching
by default do no patching
patching file contents
whether to print a file of prototypes after parsing
this seems like something that should be built-in..
** Argument definition
parse, and apply patching
parse the patch file if it isn't parsed already
parse the p... |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... |
9ba097ef41135031c970faa473d75975e23bf33007dc699bfede58112824dc72 | jeromesimeon/Galax | print_top.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast_printer/print_top.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : print_top.ml , v 1.10 2007/08/01 17:06:17 mff Exp $
open Error
open Gmisc
open Occurrence
open Namespace_names
open Datatypes
open Xquery_common_ast
open Print_common
open Xquery_ast
open Print_xquery
open Xquery_core_ast
open P... |
a8d30ef6782085d72711176f25326116332f45fd8dd67af0a937f18129663c6a | awslabs/s2n-bignum | bignum_mul_8_16_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mul_8_16_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/fastmul/bignum_mul_8_16_alt.o";;
***
XOR (% r9) (% r9)
XOR (% r10) (% r10)
ADD (% r8) (% rax)
ADC (% r9) (% rdx)
ADD (% r8) (%... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
8x8->16 multiplication using traditional x86 muls . ... |
132e742e390a2943fe3eeecc2d0cf90e16fa34f8fd2225e8cfce37f0c36e155f | themetaschemer/malt | B-comparators.rkt | #lang racket
(require "../autodiff.rkt")
;;----------------------------
Boolean comparators
;;----------------------------
(define comparator
(λ (f)
(λ (da db)
(f (ρ da) (ρ db)))))
(define =-0-0
(comparator =))
(define <-0-0
(comparator <))
(define <=-0-0
(comparator <=))
(define >-0-0
(com... | null | https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/flat-tensors/ext-ops/B-comparators.rkt | racket | ----------------------------
----------------------------
----------------------------
Tensorized comparators
---------------------------- | #lang racket
(require "../autodiff.rkt")
Boolean comparators
(define comparator
(λ (f)
(λ (da db)
(f (ρ da) (ρ db)))))
(define =-0-0
(comparator =))
(define <-0-0
(comparator <))
(define <=-0-0
(comparator <=))
(define >-0-0
(comparator >))
(define >=-0-0
(comparator >))
(define compar... |
b5bc4d6381d7890966d8373caf7edfe5b357b13e32672e3f7de558900b0f657c | kingcons/advent-of-code | day11.lisp | (mgl-pax:define-package :aoc.2022.11
(:nicknames :2022.11)
(:use :cl :mgl-pax :aoc.util :aoc.parsers :esrap)
(:import-from :serapeum
#:~>>
#:deq
#:enq
#:partial
#:queue))
(in-package :2022.11)
(defsummary (:title "Monkey in the Midd... | null | https://raw.githubusercontent.com/kingcons/advent-of-code/ffd6569ce4dfaf80e7b29a6521202c07cb58a58d/src/2022/day11.lisp | lisp | (mgl-pax:define-package :aoc.2022.11
(:nicknames :2022.11)
(:use :cl :mgl-pax :aoc.util :aoc.parsers :esrap)
(:import-from :serapeum
#:~>>
#:deq
#:enq
#:partial
#:queue))
(in-package :2022.11)
(defsummary (:title "Monkey in the Midd... | |
a97fe9c153dc3f5fa34b090760c1dd1308aa5e5a4a2157673badee9262820cc9 | malcolmsparks/plugboard | configuration.clj | Copyright 2010 .
;;
This file is part of Plugboard .
;;
Plugboard is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
;; later version.
... | null | https://raw.githubusercontent.com/malcolmsparks/plugboard/c1e78afc5dde60b08b48020c6f3ef800f05d1ada/src/test/clojure/plugboard/demos/custom_auth/configuration.clj | clojure |
later version.
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
We start with the defaults.
Then add the logic that treats functions which have particular metadata
as web resources.
Here we add a ... | Copyright 2010 .
This file is part of Plugboard .
Plugboard is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
Plugboard is distribut... |
3fe4c879c91d76eebbc0dd75330e12b0eead57f14a354b191df62702dc6dc5a4 | mbutterick/brag | expander.rkt | #lang racket/base
(require (for-syntax racket/base
racket/list
"codegen.rkt"
"runtime.rkt"
"flatten.rkt")
br-parser-tools/lex
br-parser-tools/cfg-parser
(prefix-in bs: brag/support)
racket/set)
(prov... | null | https://raw.githubusercontent.com/mbutterick/brag/6983208426fc4970b3753eea075cc492b64d5103/brag-lib/brag/codegen/expander.rkt | racket | for repl
for repl
main exports. Break hygiene so they're also available at top-level / repl
for repl
so any `define`s are automatically available at the repl.
and only identifiers explicitly `provide`d are visible on import.
handle brag/support `token` with special identifier
so it doesn't conflict with brag's ... | #lang racket/base
(require (for-syntax racket/base
racket/list
"codegen.rkt"
"runtime.rkt"
"flatten.rkt")
br-parser-tools/lex
br-parser-tools/cfg-parser
(prefix-in bs: brag/support)
racket/set)
(prov... |
e6831187afc326b33406711f815db48835fc1864c253a40150afea77de395650 | facebook/infer | AssignmentRule.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/d2e59e6df24858729129debcc2813ae3915c4f0a/infer/src/nullsafe/AssignmentRule.ml | ocaml | In certain modes, we trust rhs to be non-nullable and don't report violation
The real name was not fetched for whatever reason, this is an autogenerated name
A slight adapter over [NullsafeIssue.make]: the same signature but additionally accepts an alternative method
If there is an alternative method to propose,... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
2e1df695be2063d7cb88fc6d1bb3ab417903b9f4f896c7283425c1ee45041380 | bmeurer/ocamljit2 | testio.ml | (* Test a file copy function *)
let test msg producer consumer src dst =
print_string msg; print_newline();
let ic = open_in_bin src in
let oc = open_out_bin dst in
let (in_fd, out_fd) = Unix.pipe() in
let ipipe = Unix.in_channel_of_descr in_fd in
let opipe = Unix.out_channel_of_descr out_fd in
let prod ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/lib-threads/testio.ml | ocaml | Test a file copy function
File copy with constant-sized chunks
File copy with random-sized chunks
File copy line per line
Create long lines of text
Test input_line on truncated lines
The test |
let test msg producer consumer src dst =
print_string msg; print_newline();
let ic = open_in_bin src in
let oc = open_out_bin dst in
let (in_fd, out_fd) = Unix.pipe() in
let ipipe = Unix.in_channel_of_descr in_fd in
let opipe = Unix.out_channel_of_descr out_fd in
let prod = Thread.create producer (ic, op... |
9b28b12d3b0d0647e14d4a7c9f3c137d6082e0c8f9a887d9614841e6bff3f0cc | ConsenSysMesh/Fae | SeeAcquaintance.hs | body :: (PublicKey, PublicKey) -> FaeTX (PublicKey, PublicKey)
body = return
| null | https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/txs/SeeAcquaintance.hs | haskell | body :: (PublicKey, PublicKey) -> FaeTX (PublicKey, PublicKey)
body = return
| |
3e5955e64ddf3bacbaacdeed1d1fe52da2313e95c678ac447b45f743fcdc7796 | ZeusWPI/contests | money.hs | import Data.Set (Set)
import qualified Data.Set as S
import Control.Applicative ((<$>), (<*>))
import Control.Monad (replicateM_, replicateM)
type Coin = Char
data Weight = Heavier | Lighter
data Fake = Fake Coin Weight
data Measurement = Measurement (Set Coin) (Set Coin) Ordering
valid :: Measurement -> Fake -> Bool... | null | https://raw.githubusercontent.com/ZeusWPI/contests/d78aec91be3ce32a436d160cd7a13825d36bbf3a/2010-vpw/money.hs | haskell | import Data.Set (Set)
import qualified Data.Set as S
import Control.Applicative ((<$>), (<*>))
import Control.Monad (replicateM_, replicateM)
type Coin = Char
data Weight = Heavier | Lighter
data Fake = Fake Coin Weight
data Measurement = Measurement (Set Coin) (Set Coin) Ordering
valid :: Measurement -> Fake -> Bool... | |
dc9fc6e4b2db3846a5beccec64cb6b166011096e975be544ca520fc013b510ef | jguhlin/ODG | db_handler.clj | (ns odg.db-handler
(:require
[co.paralleluniverse.pulsar.core :as p]
[co.paralleluniverse.pulsar.actors :refer :all]
[taoensso.timbre :as timbre]
[clojure.core.reducers :as r]
[criterium.core :as cc])
(:import
[co.paralleluniverse.actors Actor]
(org.neo4j.graphdb NotFoundException
... | null | https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/src/odg/db_handler.clj | clojure | (timbre/refer-timbre)
pulsar actor's has "log" so we exclude it here.
Get node-index
Get fulltext index
Get index name (species + version OR :index-name)
Add support for new vectors...
Also test the ID we are given
Interferes with OBO import ...
More suited to fulltext ID
More suited to "fulltext" ID
(get nod... | (ns odg.db-handler
(:require
[co.paralleluniverse.pulsar.core :as p]
[co.paralleluniverse.pulsar.actors :refer :all]
[taoensso.timbre :as timbre]
[clojure.core.reducers :as r]
[criterium.core :as cc])
(:import
[co.paralleluniverse.actors Actor]
(org.neo4j.graphdb NotFoundException
... |
784424393cd5a17ad740e8469a0ce0612aceff8a192f7474663388e90d831cb2 | TrustInSoft/tis-interpreter | descr.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/datatype/descr.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
a76e6255295af0275b3b50c4bcaef3468d00c46c926002ab36c2f3ed1f66a32c | ocaml/ocaml-lsp | import.ml | module List = Stdlib.ListLabels
module Code_error = Stdune.Code_error
module Fdecl = Stdune.Fdecl
module Header = Lsp.Header
module Io = Lsp.Io
module Json = struct
include Lsp.Import.Json
let pp ppf (t : t) = Yojson.Safe.pretty_print ppf t
let rec of_dyn (t : Dyn.t) : t =
match t with
| Opaque -> `Str... | null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/032e3ff8f565b7a0f6a476dbeb4dbb49260066c8/lsp-fiber/src/import.ml | ocaml | module List = Stdlib.ListLabels
module Code_error = Stdune.Code_error
module Fdecl = Stdune.Fdecl
module Header = Lsp.Header
module Io = Lsp.Io
module Json = struct
include Lsp.Import.Json
let pp ppf (t : t) = Yojson.Safe.pretty_print ppf t
let rec of_dyn (t : Dyn.t) : t =
match t with
| Opaque -> `Str... | |
f205fc24593fdf3dfe12cb6b48a45f9b01cf8afd525f08f4698c91d48efb5497 | ssor/erlangDemos | lib_primes.erl | -module(lib_primes).
-export([make_prime/1,make_prime/2]).
make_prime(1)->
lists:nth(random:uniform(5),[1,2,3,5,7]);
make_prime(K) when K>0 ->
new_seed(),
N = make_random_int(K),
if N >3 ->
io:format("Generating a ~w digit prime ",[K]),
MaxTries = N -3,
P1 = make_prime(MaxTries,N+1),
io:format("~n",[]),
... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/demos/otp_demo/lib_primes.erl | erlang | -module(lib_primes).
-export([make_prime/1,make_prime/2]).
make_prime(1)->
lists:nth(random:uniform(5),[1,2,3,5,7]);
make_prime(K) when K>0 ->
new_seed(),
N = make_random_int(K),
if N >3 ->
io:format("Generating a ~w digit prime ",[K]),
MaxTries = N -3,
P1 = make_prime(MaxTries,N+1),
io:format("~n",[]),
... | |
85779fb0a53258091998b6ef4be840d55d62ab7a18d7032e5addf8123b942b2c | xh4/web-toolkit | numbers.lisp | (in-package :alexandria)
(declaim (inline clamp))
(defun clamp (number min max)
"Clamps the NUMBER into [min, max] range. Returns MIN if NUMBER is lesser then
MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER."
(if (< number min)
min
(if (> number max)
max
number))... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/alexandria-20191227-git/numbers.lisp | lisp | 2.0
The correct version is numerically stable, at the expense of an
unstable version can often be converted to a fast instruction on
a lot of machines, though this is machine/implementation
efficiency, and we're only talking about a single extra multiply,
many would prefer the stable version
Implements and uses ... | (in-package :alexandria)
(declaim (inline clamp))
(defun clamp (number min max)
"Clamps the NUMBER into [min, max] range. Returns MIN if NUMBER is lesser then
MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER."
(if (< number min)
min
(if (> number max)
max
number))... |
1cf5bd12c55676685b96cacafb2127ceb80fa89c9a98af65c11d57bc24ccfa34 | logseq/logseq | extract.cljc | (ns logseq.graph-parser.extract
"Handles extraction of blocks, pages and mldoc ast in preparation for db
transaction"
Disable clj linters since we do n't support clj
#?(:clj {:clj-kondo/config {:linters {:unresolved-namespace {:level :off}
:unresolved-symbol {:level :off}... | null | https://raw.githubusercontent.com/logseq/logseq/a4a5758afcb59436301f704b88638153ff1352aa/deps/graph-parser/src/logseq/graph_parser/extract.cljc | clojure | headline
check backward compatibility?
disable blank alias
TODO: performance improvement
remove block references
{:parse_outline_only? true}
whiteboard edn file should normally have valid :block/original-name, :block/name, :block/uuid | (ns logseq.graph-parser.extract
"Handles extraction of blocks, pages and mldoc ast in preparation for db
transaction"
Disable clj linters since we do n't support clj
#?(:clj {:clj-kondo/config {:linters {:unresolved-namespace {:level :off}
:unresolved-symbol {:level :off}... |
ba4f6fe26536930139a4a977011a883405e11bb77306a1600911368db8aca0c1 | kowey/GenI | Parser.hs | -- GenI surface realiser
Copyright ( C ) 2005 and
--
-- This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
--
-- T... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/src/NLP/GenI/Parser.hs | haskell | GenI surface realiser
This program is free software; you can redistribute it and/or
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more det... | Copyright ( C ) 2005 and
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple ... |
c58a9edcbb48d69ee879008a4b9caf0a64d609366b210bc8e6e318ce06bd63a1 | re-ops/re-cipes | aptcache.clj | (ns re-cipes.apps.aptcache
"Setting up aptcacheng"
(:require
[re-cipes.hardening]
[re-cog.resources.ufw :refer (add-rule)]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.resources.package :refer (package set-selection)]))
(require-recipe)
(def-inline {:depends [#'re-cipes.hardening/firewall]} ... | null | https://raw.githubusercontent.com/re-ops/re-cipes/183bdb637e54df1c6f20e8d529132e0c004e8ead/src/re_cipes/apps/aptcache.clj | clojure | (ns re-cipes.apps.aptcache
"Setting up aptcacheng"
(:require
[re-cipes.hardening]
[re-cog.resources.ufw :refer (add-rule)]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.resources.package :refer (package set-selection)]))
(require-recipe)
(def-inline {:depends [#'re-cipes.hardening/firewall]} ... | |
4a509a4ade10cd86932329ef7f05d943c85e379e0771780e4c8e8446145cd702 | owickstrom/twitter-kinesis-lab | migration.clj | (ns tagcount.migration
(:require [clojure.java.jdbc :as jdbc]
[tagcount.core :as core]))
(defn table-exists? [name]
(first
(jdbc/query core/pooled-db-spec
["select count(*)
from information_schema.tables
where table_schema = 'public'
and... | null | https://raw.githubusercontent.com/owickstrom/twitter-kinesis-lab/254111d100b11a1896f713c82d55f9e8e98f2e9e/tagcount/src/tagcount/migration.clj | clojure | (ns tagcount.migration
(:require [clojure.java.jdbc :as jdbc]
[tagcount.core :as core]))
(defn table-exists? [name]
(first
(jdbc/query core/pooled-db-spec
["select count(*)
from information_schema.tables
where table_schema = 'public'
and... | |
738c8a91b28925c0c6f2ef3299dec07df13ce02aa7f641715108864ef995620d | input-output-hk/cardano-wallet | TokenMapSpec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGU... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/5efe75a5b531824a8407653fd99c2d2d410b8f1e/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/TokenMapSpec.hs | haskell | # LANGUAGE DeriveAnyClass #
------------------------------------------------------------------------------
Invariant properties
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Construction and deconstruction... | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC... |
cedfe64c0a268e62a9b8d1e5f934289f3efeb115e90d90479615b5034b12731b | static-analysis-engineering/codehawk | bCHUserProvidedDirections.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/7e79e94ccce0df9d22d6f77764609e469c02f035/CodeHawk/CHB/bchlib/bCHUserProvidedDirections.mli | ocaml | bchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
5e67f45ffac758299ac457365960e20aeb3ac7b891e086a2abddf1bf4f6273e7 | swift-nav/wolf | Ctx.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Wolf.Ctx
( runTop
, runConfCtx
, preConfCtx
, runAmazonCtx
, runAmazonStoreCtx
, runAmazonWorkCtx
, runAmazonDecisionCtx
) where
import Control.Concurren... | null | https://raw.githubusercontent.com/swift-nav/wolf/d318c6656b0ff15a0df8305eccffabd085c44262/src/Network/AWS/Wolf/Ctx.hs | haskell | # LANGUAGE OverloadedStrings #
| Catcher for exceptions, traces and rethrows.
| Catcher for exceptions, emits stats and rethrows.
| Run stats ctx.
| Run bottom TransT.
| Run configuration context.
| Update configuration context's preamble.
| Run amazon context.
| Run amazon store context.
| Throttle t... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module Network.AWS.Wolf.Ctx
( runTop
, runConfCtx
, preConfCtx
, runAmazonCtx
, runAmazonStoreCtx
, runAmazonWorkCtx
, runAmazonDecisionCtx
) where
import Control.Concurrent
import Control.Exception.Lifted
i... |
e7a4cf0666c1835a5d34b17ee0b5b42e179f0d444848506df0e7874035398acb | Dangercoder/svelte-cljs-example | macros.cljc | (ns macros)
(defmacro defreactive [name init]
`(js* "$: ~{} = ~{}" ~name ~init)) | null | https://raw.githubusercontent.com/Dangercoder/svelte-cljs-example/9a36327b976290f2a49542baaa29ce43cfa469f9/src/macros.cljc | clojure | (ns macros)
(defmacro defreactive [name init]
`(js* "$: ~{} = ~{}" ~name ~init)) | |
7a70377b0fdfb42bf7b9466585f587158976521e23e0f9a6f3e3571ba56c32c3 | futurice/haskell-mega-repo | EditItemPage.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Futurice.App.Library.Pages.EditItemPage where
import Futurice.Lucid.Foundation hiding (page_)
import Futurice.Prelude
import Prelude ()
import Futurice.App.Library.API
import Futurice.App.Library.Markup
import Futurice.App.Library.Types
import... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/library-app/src/Futurice/App/Library/Pages/EditItemPage.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Futurice.App.Library.Pages.EditItemPage where
import Futurice.Lucid.Foundation hiding (page_)
import Futurice.Prelude
import Prelude ()
import Futurice.App.Library.API
import Futurice.App.Library.Markup
import Futurice.App.Library.Types
import qualified Data.Text as T
editItem... |
9c2149e5650934dbbf63d71000b57e80b58365a7912219e0ceed6ca314fbfdb1 | WhatsApp/erlt | import_type.erl | -file("dev/src/import_type.erlt", 1).
-module(import_type).
-eqwalizer_unchecked([]).
-compile([warn_unused_import, warnings_as_errors]).
-export([f/1]).
-import_type({mod01, [{my_pair, 2}]}).
-spec f(mod01:my_pair(boolean(),
integer())) -> integer().
f(X) ->
case X of
{true, N}... | null | https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/tests/dev/ir-spec/import_type.erl | erlang | -file("dev/src/import_type.erlt", 1).
-module(import_type).
-eqwalizer_unchecked([]).
-compile([warn_unused_import, warnings_as_errors]).
-export([f/1]).
-import_type({mod01, [{my_pair, 2}]}).
-spec f(mod01:my_pair(boolean(),
integer())) -> integer().
f(X) ->
case X of
{true, N}... | |
ad482702e6602cf92e2d8b7c5bfa6024853c6d397044de7f08e58a3294ca2f1a | alt-romes/slfl | Simple.hs |
# main = let f*x = (0, 1) in (f, x)
m = let _ = () in 1;
m2 = let x = 1 in x;
m0 = (1, 2);
main = let x*y*z = ((1, 2), 3) in ((x, y), z);
m4 = let !x = !1 in ();
| null | https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/Simple.hs | haskell |
# main = let f*x = (0, 1) in (f, x)
m = let _ = () in 1;
m2 = let x = 1 in x;
m0 = (1, 2);
main = let x*y*z = ((1, 2), 3) in ((x, y), z);
m4 = let !x = !1 in ();
| |
7f1a2ae37066480d5b9d49797d6549d609ff1c1dc73cf0cadab79a7e5c692c8e | Deducteam/Dedukti | files.ml | module B = Kernel.Basic
module S = Kernel.Signature
module P = Parsers.Parser
module Processor = Api.Processor
(** path to a file *)
type path = string
type cin
type cout
* Gather out_channel and in_channel in a GADT for input and output files . In the case of an output file , we store also the formatter associated... | null | https://raw.githubusercontent.com/Deducteam/Dedukti/abbe11318189c32ae236671ccd8dcf3c89525065/universo/common/files.ml | ocaml | * path to a file
* Path to the current file
* OCaml channel to this file
* Output directory where output files are created
* Simplify directory where simplified files are created.
* Suffix used for files containing universe declarations
* Suffix used for files containing universe constraints
* Suffix used for fi... | module B = Kernel.Basic
module S = Kernel.Signature
module P = Parsers.Parser
module Processor = Api.Processor
type path = string
type cin
type cout
* Gather out_channel and in_channel in a GADT for input and output files . In the case of an output file , we store also the formatter associated with .
type _ channel... |
a45f892ca4731b05694978cdd5f9fb26d96d4ae12d301bd5d77bd55f4d17f9fb | haskell-servant/servant | Generic.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
-- | Define servant servers from record types. Generics for the win.
--
-- The usage is simple, if you only need a collection of routes. First you
-- define a record with field types prefixe... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant/src/Servant/API/Generic.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE TypeOperators #
| Define servant servers from record types. Generics for the win.
The usage is simple, if you only need a collection of routes. First you
define a record with field types prefixed by a parameter `route`:
@
data Routes route = Routes
{ _get :: rout... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
_ _ Note : _ _ in 0.14 series this module is n't re - exported from ' Servant . API ' .
" Servant . API.Generic " is based on @servant - generic@ package by
[ / chpatrick )
@since 0.14.1
module Servant.API.Generic (
GenericMode (..),
Generic... |
3381b3e36cc07e0ef117b0c87919946e1f33f9e4e5ca30d70a1379763a664f28 | igarnier/prbnmcn-clustering | k_medoids.mli | (** K-medoids functor. *)
* Initial choice of medoids .
This implementation provides several initialization algorithms ,
the standard one being Kmedoids++ , identical to Kmeans++
This implementation provides several initialization algorithms,
the standard one being Kmedoids++, identical to Kmeans++... | null | https://raw.githubusercontent.com/igarnier/prbnmcn-clustering/9cb96db1a739beeac840568058855d81c0b2f317/k_medoids.mli | ocaml | * K-medoids functor.
* [Forgy] selects k elements at random (without replacement) as initial centroids.
* [KmedoidsPP] selects initial medoids iteratively with probabilities proportional
to their distance to the previously selected centroids. This intuitively
allows to spread them well.
* Algorithm u... |
* Initial choice of medoids .
This implementation provides several initialization algorithms ,
the standard one being Kmedoids++ , identical to Kmeans++
This implementation provides several initialization algorithms,
the standard one being Kmedoids++, identical to Kmeans++ *)
type init =
| Forgy
... |
02e718cb70569a73351b70d5cc908e98014eed9cda32e619bb71c092972a0a38 | ehird/mchost | Protocol.hs | module MC.Protocol
( ClientPacket
, ServerPacket
, module MC.Protocol.Types
) where
import MC.Protocol.Types
import MC.Protocol.Client (ClientPacket)
import MC.Protocol.Server (ServerPacket)
| null | https://raw.githubusercontent.com/ehird/mchost/49b1e3d29b60de78b9000ec6d78cf232d9a36b21/MC/Protocol.hs | haskell | module MC.Protocol
( ClientPacket
, ServerPacket
, module MC.Protocol.Types
) where
import MC.Protocol.Types
import MC.Protocol.Client (ClientPacket)
import MC.Protocol.Server (ServerPacket)
| |
d4880a5da02e17c2ca25d4eadb81261bd78733170b5e3376465ec74a7544b817 | puppetlabs/trapperkeeper-metrics | metrics_testutils.clj | (ns puppetlabs.trapperkeeper.services.metrics.metrics-testutils
(:import (com.codahale.metrics.graphite GraphiteSender))
(:require [schema.core :as schema]))
(def graphite-config
{:graphite
{:host "my.graphite.server"
:port 2003
:update-interval-seconds 10}})
(def test-config
{:server-id "localhost... | null | https://raw.githubusercontent.com/puppetlabs/trapperkeeper-metrics/47f1534ebb75339eeb42e0de33fab0ec2f6cacdc/test/puppetlabs/trapperkeeper/services/metrics/metrics_testutils.clj | clojure | (ns puppetlabs.trapperkeeper.services.metrics.metrics-testutils
(:import (com.codahale.metrics.graphite GraphiteSender))
(:require [schema.core :as schema]))
(def graphite-config
{:graphite
{:host "my.graphite.server"
:port 2003
:update-interval-seconds 10}})
(def test-config
{:server-id "localhost... | |
84f0a7010d18fbc73ac53eb35969b16e604fb03737bfb3501f9a97200b93202f | modular-macros/ocaml-macros | fftba.ml | open Bigarray
let pi = 3.14159265358979323846
let tpi = 2.0 *. pi
let fft (px : (float, float64_elt, c_layout) Array1.t)
(py : (float, float64_elt, c_layout) Array1.t) np =
let i = ref 2 in
let m = ref 1 in
while (!i < np) do
i := !i + !i;
m := !m + 1
done;
let n = !i in
if n <> np the... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/lib-bigarray/fftba.ml | ocaml | **********************************
Last stage, length=2 butterfly
**********************************
***********************
Bit reverse counter
*********************** | open Bigarray
let pi = 3.14159265358979323846
let tpi = 2.0 *. pi
let fft (px : (float, float64_elt, c_layout) Array1.t)
(py : (float, float64_elt, c_layout) Array1.t) np =
let i = ref 2 in
let m = ref 1 in
while (!i < np) do
i := !i + !i;
m := !m + 1
done;
let n = !i in
if n <> np the... |
9dec38080053b16dff35c77c37909fc299d9b3efe5cff4fa8d6077e272ea2dae | snowleopard/alga | Label.hs | -----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Label
Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
-- __Alga__ is a library for algebraic construction and manipulation of... | null | https://raw.githubusercontent.com/snowleopard/alga/601caa8ea59d869a9a68924c8b3792d9077c15d3/src/Algebra/Graph/Label.hs | haskell | ---------------------------------------------------------------------------
|
Module : Algebra.Graph.Label
Maintainer :
Stability : experimental
__Alga__ is a library for algebraic construction and manipulation of graphs
motivation behind the library, the underlying theory, and implementation details.
Th... | Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
in Haskell . See < -paper this paper > for the
module Algebra.Graph.Label (
* Semirings and dioids
Semiring (..), zero, (<+>), StarSemiring (..), Dioid,
NonNegative, finite, finiteWord, unsafeFinite, infinite, getFinite,
D... |
835284b4cb22df5f29ce50fa8942cb7466d03d412ed4f62216debe56385ab539 | lambdamusic/The-Musical-Code | 2011-07-fjords.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 2011-07-fjords.scm --
;;
;;
;;
;; ambient electronica // made with
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setup:base)
(setup:create-au syn1 ++zebra 2)
(setup:create-au syn2 ++zebra 3)
(setup:create-au syn3 ++zebra 4)
(setup:c... | null | https://raw.githubusercontent.com/lambdamusic/The-Musical-Code/4c0b578ea5fe4a45d4dad3e53d966e688af04fed/works/2011-07-fjords.scm | scheme |
2011-07-fjords.scm --
ambient electronica // made with
(zb:volume pads '- 5) |
(setup:base)
(setup:create-au syn1 ++zebra 2)
(setup:create-au syn2 ++zebra 3)
(setup:create-au syn3 ++zebra 4)
(setup:create-au pads ++zebra 5)
(patch:load ++zebra syn1 "HS12StringSitar")
(patch:load ++zebra syn2 "ukmDXPad1")
(patch:load ++zebra syn3 "HSHighTeaweed")
(patch:load ++zebra pads "HSDeepFjord")
(setup:... |
1f75a639a9ebc43a37f19c9c7c9c915b7d24c32036c1938d90c90d3be611a1a6 | emqx/mria | mria_replicant_shard_sup.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 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/mria/5cf3f660c312a88d6b7953181061ed08f1484a92/src/mria_replicant_shard_sup.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 ) 2021 - 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(mria_replicant_shard_sup).
-behaviour(supervisor).
-export([ start_link/1
, st... |
8832f0306fcb300bdfb32c19dddbdae11829ee1901f33ad5f28590381bf8b4b9 | hidaris/thinking-dumps | 2-29.rkt | #lang eopl
(require "base.ss")
(define identifier?
(lambda (x)
(and (symbol? x)
(not (eqv? 'lambda x)))))
(define list-of
(lambda (pred)
(lambda (val)
(or (null? val)
(and (pair? val)
(pred (car val))
((list-of pred) (cdr val)))))))
;;; (define-data... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap2/2-29.rkt | racket | (define-datatype type-name type-predicate-name
{(variant-name {(field-name predicate)}*)}+)
parse-expression : SchemeVal -> LcExp
unparse-lc-exp : LcExp -> SchemeVal | #lang eopl
(require "base.ss")
(define identifier?
(lambda (x)
(and (symbol? x)
(not (eqv? 'lambda x)))))
(define list-of
(lambda (pred)
(lambda (val)
(or (null? val)
(and (pair? val)
(pred (car val))
((list-of pred) (cdr val)))))))
(define-datatype... |
2b19035e6f1f5e97779e52efb5a72701ed2585e7ab2d4b46928fab6538d25d59 | crategus/cl-cffi-gtk | gdk-pixbuf.animation.lisp | ;;; ----------------------------------------------------------------------------
;;; gdk-pixbuf.animation.lisp
;;;
The documentation of this file is taken from the GDK - PixBuf Reference Manual
Version 2.36 and modified to document the Lisp binding to the GDK - PixBuf
;;; library. See <>. The API documentation of t... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gdk-pixbuf/gdk-pixbuf.animation.lisp | lisp | ----------------------------------------------------------------------------
gdk-pixbuf.animation.lisp
library. See <>. The API documentation of the Lisp
binding is available from <-cffi-gtk/>.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Pub... | The documentation of this file is taken from the GDK - PixBuf Reference Manual
Version 2.36 and modified to document the Lisp binding to the GDK - PixBuf
Copyright ( C ) 2009 - 2011
Copyright ( C ) 2011 - 2021
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General ... |
d503efffdc4beb4a1022f8abd2351f46856170853bcaea309fe2602eefafdfe8 | janestreet/ppx_optcomp | interpreter.ml | open Base
open Ppxlib
open Ast_builder.Default
module Filename = Stdlib.Filename
module Parsing = Stdlib.Parsing
module Type = struct
type t =
| Var of string
| Bool
| Int
| Char
| String
| Tuple of t list
let rec to_string = function
| Var v -> "'" ^ v
| Bool -> "bool"
... | null | https://raw.githubusercontent.com/janestreet/ppx_optcomp/c31bef63bc005305a9d4f083587fde2ece677d64/src/interpreter.ml | ocaml | * Location at which it was defined/undefined
+-----------------------------------------------------------------+
| Expression evaluation |
+-----------------------------------------------------------------+
Let-binding
Pattern matching
+---------------------------... | open Base
open Ppxlib
open Ast_builder.Default
module Filename = Stdlib.Filename
module Parsing = Stdlib.Parsing
module Type = struct
type t =
| Var of string
| Bool
| Int
| Char
| String
| Tuple of t list
let rec to_string = function
| Var v -> "'" ^ v
| Bool -> "bool"
... |
25b2b11863c37269eed1f4484168f4b9dd5f192df979ff7ef222a051f7bb972f | hammerlab/biokepi | reference_genome.mli | (**************************************************************************)
Copyright 2014 , < >
(* *)
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
(* you may not use this file except i... | null | https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/run_environment/reference_genome.mli | ocaml | ************************************************************************
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | Copyright 2014 , < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
open Common
type name = string
module Specification : sig
module Location : sig
type t = [
| `Url... |
2d430d083a90877f0222481023f3c9e8aa2e9b734fb08d86eac164aa1a43c28d | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_vhost_restart.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2011 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_vhost_restart).
-export([... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_vhost_restart.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2011 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_vhost_restart).
-export([init/2... |
72c8a1b3b5fb07faa465fdb78cde1ec8b6edfaad5a480034945fccba4c92deba | fourmolu/fourmolu | list-notation-2-four-out.hs | -- A list of the element and all its parents up to the root node.
getPath tree t =
t
: case Map.lookup (getId t) tree of
Nothing -> []
Just parent -> getPath tree parent
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/list-notation-2-four-out.hs | haskell | A list of the element and all its parents up to the root node. | getPath tree t =
t
: case Map.lookup (getId t) tree of
Nothing -> []
Just parent -> getPath tree parent
|
58db390f20d12453ef1325628a0dc6191c04ac3e8ca0a7dca0e4ae03d63c8831 | egison/egison-scheme | bench-map-pm.scm | (load "./egison.scm")
(define pm-map
(lambda (f xs)
(match-all xs (List Something)
((join _ (cons x _)) (f x)))))
(print (pm-map (lambda (x) (+ x 10)) (iota 1000 1)))
( 11 12 13 14 )
| null | https://raw.githubusercontent.com/egison/egison-scheme/49188f4bcf91199a9e1d5142851a48ed2eb916e1/benchmark/bench-map-pm.scm | scheme | (load "./egison.scm")
(define pm-map
(lambda (f xs)
(match-all xs (List Something)
((join _ (cons x _)) (f x)))))
(print (pm-map (lambda (x) (+ x 10)) (iota 1000 1)))
( 11 12 13 14 )
| |
f15bcf05152e5d01270c3833017b5242ea2a9b7d428785898bdd3454be727f9c | fakedata-haskell/fakedata | Drone.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Faker.Drone where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Drone
import Faker.TH
$(generateFakeField "drone" "name")
$(generateFakeField "drone" "battery_type")
$(generateFakeField "drone" "iso")
$(generateFakeFiel... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Drone.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Drone where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Drone
import Faker.TH
$(generateFakeField "drone" "name")
$(generateFakeField "drone" "battery_type")
$(generateFakeField "drone" "iso")
$(generateFakeField "drone" "photo_format")
$(genera... |
42935c73f8bdfae8cef0866ba24b9bf2f10fd9ddb64d392b3248b8d139ad1c20 | binaryage/chromex | context_menus.cljs | (ns chromex.app.context-menus (:require-macros [chromex.app.context-menus :refer [gen-wrap]])
(:require [chromex.core]))
; -- properties -------------------------------------------------------------------------------------------------------------
(defn action-menu-top-level-limit* [config]
(gen-wrap :property :... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/context_menus.cljs | clojure | -- properties -------------------------------------------------------------------------------------------------------------
-- events ----------------------------------------------------------------------------------------------------------------- | (ns chromex.app.context-menus (:require-macros [chromex.app.context-menus :refer [gen-wrap]])
(:require [chromex.core]))
(defn action-menu-top-level-limit* [config]
(gen-wrap :property ::action-menu-top-level-limit config))
-- functions ------------------------------------------------------------------------... |
67513ad7036476e51016af2652cb55feb4a0d3b64dcf40c8409355b82c1ad3c0 | fujita-y/ypsilon | c-ffi-test.scm | (import (core) (test-lite))
(display "(ypsilon c-ffi) testing\n\n")
(test-begin "c-function")
(test-eval! (import (core) (ypsilon c-ffi)))
(test-eval! (define sqrt (c-function double sqrt (double))))
(test-eval! (define n (sqrt 100)))
(test-equal "sqrt" n => 10.0)
(test-end)
(test-begin "c-function/weak")
(test-eval... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/cb723fa01e7403cf8b5290bb7886bcc9222c8c29/test/c-ffi-test.scm | scheme | (import (core) (test-lite))
(display "(ypsilon c-ffi) testing\n\n")
(test-begin "c-function")
(test-eval! (import (core) (ypsilon c-ffi)))
(test-eval! (define sqrt (c-function double sqrt (double))))
(test-eval! (define n (sqrt 100)))
(test-equal "sqrt" n => 10.0)
(test-end)
(test-begin "c-function/weak")
(test-eval... | |
5b20b48ad4ee3937df025df9558e171fa23e227cb7710638ea0e19f8990c00ce | zachjs/sv2v | TFBlock.hs | sv2v
- Author : < >
-
- Conversion for tasks and functions to contain only one top - level statement ,
- as required in . This conversion also hoists data declarations to
- the task or function level for greater portability .
- Author: Zachary Snow <>
-
- Conversion for tasks and functions to... | null | https://raw.githubusercontent.com/zachjs/sv2v/dd951740e75fc9a4cb8cec23687f73340eda8f2c/src/Convert/TFBlock.hs | haskell | sv2v
- Author : < >
-
- Conversion for tasks and functions to contain only one top - level statement ,
- as required in . This conversion also hoists data declarations to
- the task or function level for greater portability .
- Author: Zachary Snow <>
-
- Conversion for tasks and functions to... | |
d2d0357aaf8b1a7eb2c5479adebbb9e358c5f40b15788fc85ea4e51e240aa141 | anoma/juvix | InfoTable.hs | module Juvix.Compiler.Reg.Data.InfoTable where
import Juvix.Compiler.Reg.Language
data InfoTable = InfoTable
{ _infoFunctions :: HashMap Symbol FunctionInfo,
_infoConstrs :: HashMap Tag ConstructorInfo,
_infoInductives :: HashMap Symbol InductiveInfo,
_infoMainFunction :: Maybe Symbol
}
data Function... | null | https://raw.githubusercontent.com/anoma/juvix/9e7a8a98d40dd5e9c60b35c2f1e0c45231d29b66/src/Juvix/Compiler/Reg/Data/InfoTable.hs | haskell | module Juvix.Compiler.Reg.Data.InfoTable where
import Juvix.Compiler.Reg.Language
data InfoTable = InfoTable
{ _infoFunctions :: HashMap Symbol FunctionInfo,
_infoConstrs :: HashMap Tag ConstructorInfo,
_infoInductives :: HashMap Symbol InductiveInfo,
_infoMainFunction :: Maybe Symbol
}
data Function... | |
949a049f438815b4c26d2655218b3163cf65e972c9719c06ab6b13a9ffc1b653 | unclechu/xlib-keys-hack | Options.hs | Author :
License : -keys-hack/master/LICENSE
# LANGUAGE ScopedTypeVariables , RankNTypes , BangPatterns #
# LANGUAGE DeriveGeneric , DeriveAnyClass , TemplateHaskell #
module Options
( Options (..)
, HasOptions (..)
, ErgonomicMode (..)
, extractOptions
, usageInfo
, noise
, ... | null | https://raw.githubusercontent.com/unclechu/xlib-keys-hack/33b49a9b1fc4bc87bdb95e2bb632a312ec2ebad0/src/Options.hs | haskell | local imports
From arguments
and will be reduced with only available
devices (that connected to pc).
available devies (that exist in file system).
Will be extracted at initialization step
(as `handleDeviceFd`).
Will be extracted from `disableXInputDeviceName`
and from `disableXInputDeviceId` and filtered
with... | Author :
License : -keys-hack/master/LICENSE
# LANGUAGE ScopedTypeVariables , RankNTypes , BangPatterns #
# LANGUAGE DeriveGeneric , DeriveAnyClass , TemplateHaskell #
module Options
( Options (..)
, HasOptions (..)
, ErgonomicMode (..)
, extractOptions
, usageInfo
, noise
, ... |
b57e8e931ead228984e906f2d6cb806904868c018fd3e30e05413d8d517f1466 | Spivoxity/obc-3 | gcmap.ml |
* gcmap.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 .... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/compiler/gcmap.ml | ocaml | A pointer
Repeat (base, count, stride, map)
Pointer block (base, count)
At offset o in the frame is the address of an open array parameter
passed by value, with ndim dimensions and an element size of stride.
The parameter will be copied into a dynamically-sized area in the
stack frame, and the map... |
* gcmap.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 .... |
d76ae187188373e113c6fd90df7ba8297c905dde17d59c95df168f02e546bce2 | quil/quil | safe_fns.clj | (ns quil.middlewares.safe-fns
(:require [clojure.stacktrace :refer [print-cause-trace]]
[quil.util :as u]))
(defn- wrap-fn [name function]
(fn []
(try
(function)
(catch Exception e
(println "Exception in " name " function: " e "\nstacktrace: " (with-out-str (print-cause-trace e)... | null | https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/src/clj/quil/middlewares/safe_fns.clj | clojure | :mouse-wheel is a special case as it takes single argument | (ns quil.middlewares.safe-fns
(:require [clojure.stacktrace :refer [print-cause-trace]]
[quil.util :as u]))
(defn- wrap-fn [name function]
(fn []
(try
(function)
(catch Exception e
(println "Exception in " name " function: " e "\nstacktrace: " (with-out-str (print-cause-trace e)... |
cb5e0f3edd8afcc93b80600a0e4319a6a77ec1b7dd4dbc01cee98b01eaea0af0 | haskell-graphql/graphql-api | AST.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_HADDOCK not - home #
| Description : The GraphQL AST
module GraphQL.Internal.Syntax.AST
( QueryDocument(..)
, SchemaDocument(..)
, Definition(..)
, OperationDefinition(..)
, Node(.... | null | https://raw.githubusercontent.com/haskell-graphql/graphql-api/8ced344485cd638cee50eeb6b653baecea359406/src/GraphQL/Internal/Syntax/AST.hs | haskell | # LANGUAGE RankNTypes #
* Documents
| A 'QueryDocument' is something a user might send us.
/#sec-Language.Query-Document
/#sec-Type-System
* Fragments
* Values
* Directives
* Type Reference
* Type definition | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_HADDOCK not - home #
| Description : The GraphQL AST
module GraphQL.Internal.Syntax.AST
( QueryDocument(..)
, SchemaDocument(..)
, Definition(..)
, OperationDefinition(..)
, Node(..)
, VariableDefinition(..... |
24a4588b8b1dc8c3cedb2312de1eaee1feb292a8d9f22ef510f6b2afbbdd87a2 | racket/plai | cond.rkt | #lang plai/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 40)
(cond
[(zero? 3) 1111]
[#f 2222]
[#t 3333])
| null | https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/cond.rkt | racket | #lang plai/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 40)
(cond
[(zero? 3) 1111]
[#f 2222]
[#t 3333])
| |
f0e0c97593aa73107ec409ff218425044cecc3ce2f973bba10400eab13bf71f1 | erlang/otp | erl_html_tools.erl | %%--------------------------------------------------------------------
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2023 . 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 ... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/system/doc/top/src/erl_html_tools.erl | erlang | --------------------------------------------------------------------
%CopyrightBegin%
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 K... | Copyright Ericsson AB 2009 - 2023 . 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(erl_html_tools).
-export([top_index/0,top_index/1,top_index/4,top_index_silent/3]).
-include_lib("kernel/i... |
9b17d5ec105eb6297db6366712ca9fdeed5037b104023834347485e59d699381 | ml4tp/tcoq | proof_global.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/proofs/proof_global.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Pp
open Names... |
50819b5fd858d0e2fb64d0c9dfb8f7ef216ab311321c5a521bcb8dfde002f7d6 | cracauer/sbcl-ita | win32.impure.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public domain and is provided with
;;;;... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/tests/win32.impure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information. | This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
#-win32 (exit :code 104)
(with-test (:name :dbg-print-exception-c)
(handler-case
(alien-funcall (extern-alien "OutputDebugStringA" (function (values) c-string)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.