_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 |
|---|---|---|---|---|---|---|---|---|
0160ee8d3d8cdee6f49833ec7e4cc18dcff98a3bead44d7716bcab02a7b0492d | wedesoft/aiscm | playground.scm | (use-modules (srfi srfi-1) (oop goops) (aiscm core) (aiscm util) (aiscm hypercomplex))
; //
(define (hypercomplex-inverse a)
(jit-let [(d1 (- (real-part a) (kmag-part a)))
(d2 (+ (imag-part a) (jmag-part a)))
(d3 (+ (real-part a) (kmag-part a)))
(d4 (- (imag-part a) (jmag-part a... | null | https://raw.githubusercontent.com/wedesoft/aiscm/2c3db8d00cad6e042150714ada85da19cf4338ad/etc/playground.scm | scheme | // | (use-modules (srfi srfi-1) (oop goops) (aiscm core) (aiscm util) (aiscm hypercomplex))
(define (hypercomplex-inverse a)
(jit-let [(d1 (- (real-part a) (kmag-part a)))
(d2 (+ (imag-part a) (jmag-part a)))
(d3 (+ (real-part a) (kmag-part a)))
(d4 (- (imag-part a) (jmag-part a)))
... |
0ef5dca9dc75b6994d6411f0aded48d00d1da633c205c22d2265beba7aef92b7 | pascutto/cachecache | main.ml | module K = struct
include Int
let hash = Hashtbl.hash
end
module V = struct
type t = int
let weight _ = 1
end
module GLru = struct
include Cachecache.Lru.Make (K)
type nonrec t = int t
end
module OLru = struct
include Lru.M.Make (K) (V)
let v = create ~random:false
let find_opt t k = find k t
... | null | https://raw.githubusercontent.com/pascutto/cachecache/23ebb1f203564f56dc11d5b775999dcd1281c34b/bench/main.ml | ocaml | module K = struct
include Int
let hash = Hashtbl.hash
end
module V = struct
type t = int
let weight _ = 1
end
module GLru = struct
include Cachecache.Lru.Make (K)
type nonrec t = int t
end
module OLru = struct
include Lru.M.Make (K) (V)
let v = create ~random:false
let find_opt t k = find k t
... | |
22ceb6e88ede2edf0aebed10293216d5341e2bdb010f99e1f641b9a63adfec5f | mvoidex/hsdev | Types.hs | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings , FlexibleInstances , MultiParamTypeClasses , TypeFamilies , UndecidableInstances , ConstraintKinds , FlexibleContexts , TemplateHaskell #
module HsDev.Database.Update.Types (
Status(..), Progress(..), Task(..),
UpdateOptions(..), updateTasks, updateGhcOpts, ... | null | https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/HsDev/Database/Update/Types.hs | haskell | where
enterTransaction act = do
Log.sendLog Log.Trace "entering sqlite transaction"
timer "closed transaction" $ transaction_ Immediate $ do
Log.sendLog Log.Debug "updating sql database"
_ <- act
Log.sendLog Log.Debug "sql database updated" | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings , FlexibleInstances , MultiParamTypeClasses , TypeFamilies , UndecidableInstances , ConstraintKinds , FlexibleContexts , TemplateHaskell #
module HsDev.Database.Update.Types (
Status(..), Progress(..), Task(..),
UpdateOptions(..), updateTasks, updateGhcOpts, ... |
adbe71b322547c1bc23972a5af96bb5c7bd1338a2f2bd383ccc577361976c54b | aws-beam/aws-erlang | aws_pinpoint_sms_voice.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Pinpoint SMS and Voice Messaging public facing APIs
-module(aws_pinpoint_sms_voice).
-export([create_configuration_set/2,
create_configuration_set/3,
create_configuration_set_event_destination/3,
... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_pinpoint_sms_voice.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
====================================================================
API
====================================================================
@doc Create a new configuration set.
destinations to it.
@doc Create a new event destination in a configuration set.
@doc Delete... | See -beam/aws-codegen for more details .
@doc Pinpoint SMS and Voice Messaging public facing APIs
-module(aws_pinpoint_sms_voice).
-export([create_configuration_set/2,
create_configuration_set/3,
create_configuration_set_event_destination/3,
create_configuration_set_event_destination/4,... |
396a1a5e66c4aeb2fda86c2566ea7079d685393b713354a2332f86cff2d95137 | haskell-numerics/hmatrix | Ellint.hs | # LANGUAGE CPP #
------------------------------------------------------------
-- |
-- Module : Numeric.GSL.Special.Ellint
Copyright : ( c ) 2006 - 11
-- License : GPL
Maintainer : ( aruiz at um dot es )
-- Stability : provisional
-- Portability : uses ffi
--
-- Wrappers for selected func... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/special/lib/Numeric/GSL/Special/Ellint.hs | haskell | ----------------------------------------------------------
|
Module : Numeric.GSL.Special.Ellint
License : GPL
Stability : provisional
Portability : uses ffi
Wrappers for selected functions described at:
<>
---------------------------------------------------------- | # LANGUAGE CPP #
Copyright : ( c ) 2006 - 11
Maintainer : ( aruiz at um dot es )
module Numeric.GSL.Special.Ellint(
ellint_Kcomp_e
, ellint_Kcomp
, ellint_Ecomp_e
, ellint_Ecomp
, ellint_Pcomp_e
, ellint_Pcomp
, ellint_Dcomp_e
, ellint_Dcomp
, ellint_F_e
, ellint_F
, ellint_E_e
, ellint_E
, ellint_P... |
3a82bac3e42b1c47bc640938f3fb04a7295efbf5b15018ce0eea964b51c45b28 | avsm/mirage-duniverse | ignore_unused_warning.mli | val add_dummy_user_for_values : Ast_traverse.map
| null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppxlib/src/ignore_unused_warning.mli | ocaml | val add_dummy_user_for_values : Ast_traverse.map
| |
4ad4093da84ee2069b6ee9b26862f48e40eb6e9376efa781bcd4ee2db4a77a68 | xray-tech/xorc-xray | logging.clj | (ns re.tracing.logging
(:require [clojure.tools.logging :as logging])
(:import io.jaegertracing.internal.JaegerSpanContext
[io.opentracing.contrib.api SpanData SpanObserver TracerObserver]
io.opentracing.Span
java.util.Map
org.slf4j.MDC))
(def log-levels
{"info" :info
... | null | https://raw.githubusercontent.com/xray-tech/xorc-xray/ee1c841067207c5952473dc8fb1f0b7d237976cb/src/re/tracing/logging.clj | clojure | It's jaeger specific way to receive trace id
opentracing specifications still doesn't have standard way to do it | (ns re.tracing.logging
(:require [clojure.tools.logging :as logging])
(:import io.jaegertracing.internal.JaegerSpanContext
[io.opentracing.contrib.api SpanData SpanObserver TracerObserver]
io.opentracing.Span
java.util.Map
org.slf4j.MDC))
(def log-levels
{"info" :info
... |
b8f1eee40765b6ccf7a8e05226b5822551f0aab34d755d870ff5b81eaa872b4f | cyverse-archive/DiscoveryEnvironmentBackend | util.clj | (ns donkey.util
"Utility functions for defining services in Donkey. This namespace is used by donkey.core and
several other top-level service definition namespaces."
(:use [compojure.core]
[donkey.util.service]
[donkey.util.transformers]
[donkey.util.validators :only [parse-body]]
... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/util.clj | clojure | (ns donkey.util
"Utility functions for defining services in Donkey. This namespace is used by donkey.core and
several other top-level service definition namespaces."
(:use [compojure.core]
[donkey.util.service]
[donkey.util.transformers]
[donkey.util.validators :only [parse-body]]
... | |
447075a6b4d49f2633ad1a5fbe0900fa815567ceb02e8e2c900b3f680cf4b24d | dzen-dhall/dzen-dhall | Validate.hs | module DzenDhall.Commands.Validate where
import DzenDhall.App
import DzenDhall.App as App
import DzenDhall.Arguments
import DzenDhall.Config
import DzenDhall.Extra
import DzenDhall.Runtime.Data
import qualified DzenDhall.Parser as Parser
import qualified Dzen... | null | https://raw.githubusercontent.com/dzen-dhall/dzen-dhall/ee43b74272d6776ce57adfd7b7d85650580a6cbb/src/DzenDhall/Commands/Validate.hs | haskell | module DzenDhall.Commands.Validate where
import DzenDhall.App
import DzenDhall.App as App
import DzenDhall.Arguments
import DzenDhall.Config
import DzenDhall.Extra
import DzenDhall.Runtime.Data
import qualified DzenDhall.Parser as Parser
import qualified Dzen... | |
daec88df569ca88ca20de5b09b72e98ddec85304750e2a56dc9b4652250e2391 | eglaysher/rldev | optpp.ml |
Copyright ( C ) 2006 Haeleth ; based on code copyright ( C ) 2000
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 l... | null | https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/common/optpp.ml | ocaml | option definition structures
Pretty-printing
Output functions (defaults are CLI)
long option with argument
long option with no argument
short option
no argument allowed; next chars are options
argument allowed or mandatory
immediate argument
non-immediate argument
no argument
option structure con... |
Copyright ( C ) 2006 Haeleth ; based on code copyright ( C ) 2000
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 l... |
cffb01acdb1f7d483d091516f533a665e55a06d3694456c624d1f2f48dfef3cc | zkat/squirl | tumble.lisp | (in-package :squirl-demo)
(defclass tumble-demo (demo)
((box :initarg :box :accessor demo-box))
(:default-initargs :name "Tumbling along."))
(defmethod update-demo ((demo tumble-demo) dt)
(incf (accumulator demo) (if (> dt *dt-threshold*) *dt-threshold* dt))
(loop while (>= (accumulator demo) (physics-timeste... | null | https://raw.githubusercontent.com/zkat/squirl/d5ab125b389008696a66f5a0d1bbb7449584db90/demo/tumble.lisp | lisp | manually update the position of the box so that it rotates.
Because the box was added as static and we moved it, we need to manually
rehash the static spatial hash
add the bricks | (in-package :squirl-demo)
(defclass tumble-demo (demo)
((box :initarg :box :accessor demo-box))
(:default-initargs :name "Tumbling along."))
(defmethod update-demo ((demo tumble-demo) dt)
(incf (accumulator demo) (if (> dt *dt-threshold*) *dt-threshold* dt))
(loop while (>= (accumulator demo) (physics-timeste... |
a30a06b8bc6726c695299312e8c208e981cbc8ebfea66fc5c270a7f87af271d2 | finkel-lang/finkel | class.hs | class Ord a => C1 a where -- Haskell
m1 :: a -> Int
m1 _ = 0
| null | https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/decl/class.hs | haskell | Haskell | m1 :: a -> Int
m1 _ = 0
|
04d34fa24bc8cc0c68313846f90525eade675d859cc24e93677f91aa4fad7dec | oshyshko/adventofcode | D19.hs | module Y15.D19 where
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Imports
import Parser
import Util
type Part = String
type Molecule = String
replacementsAndInitial :: Parser ([(Part, Part)], Molecule)
replacementsAndInitial = do
replacemen... | null | https://raw.githubusercontent.com/oshyshko/adventofcode/95938bb9b91b964394d4ee1def3bc9bf9c928e09/src/Y15/D19.hs | haskell | module Y15.D19 where
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Imports
import Parser
import Util
type Part = String
type Molecule = String
replacementsAndInitial :: Parser ([(Part, Part)], Molecule)
replacementsAndInitial = do
replacemen... | |
d00dcd6fca2023f3e3ff0a58c5241bc2fa31525f20b903971b9ec62a9853d0af | FranklinChen/hugs98-plus-Sep2006 | Region.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.Win32.GDI.Region
Copyright : ( c ) , 1997 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : Vuokko < >
-- Stability : provisional
-- Portability : po... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/Win32/Graphics/Win32/GDI/Region.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Win32.GDI.Region
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
---... | Copyright : ( c ) , 1997 - 2003
Maintainer : Vuokko < >
A collection of FFI declarations for interfacing with Win32 .
module Graphics.Win32.GDI.Region where
import System.Win32.Types
import Graphics.Win32.GDI.Types
import Foreign
badRegion :: RegionType -> Bool
badRegion n = n == 0 || n == gDI_... |
546f2080d97673391181c6b32a67533f41e2dd138ffbd66af1ddc7d4a57eb00f | hoytech/antiweb | load.lisp | Antiweb ( C )
CFFI loader modeled after load.lisp from CL - PPCRE
(in-package :cl-user)
(let ((files '("utils"
"features"
#+sbcl "cffi-sbcl"
#+cmu "cffi-cmucl"
#+clisp "cffi-clisp"
#+ccl "cffi-openmcl"
"package"
... | null | https://raw.githubusercontent.com/hoytech/antiweb/53c38f78ea01f04f6d1a1ecdca5c012e7a9ae4bb/bundled/cffi/load.lisp | lisp | Antiweb ( C )
CFFI loader modeled after load.lisp from CL - PPCRE
(in-package :cl-user)
(let ((files '("utils"
"features"
#+sbcl "cffi-sbcl"
#+cmu "cffi-cmucl"
#+clisp "cffi-clisp"
#+ccl "cffi-openmcl"
"package"
... | |
ec9291828fdebd5d08f23b837a35c27e324e06d405b00448bc757cccdb510317 | glebec/haskell-programming-allen-moronuki | 00-scratch.hs | module ScratchCh5 where
--
| null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/05-types/00-scratch.hs | haskell | module ScratchCh5 where
| |
7e0f7e32038b23f959822cfc474a51ee1e23c3e7152b159a17f1a3d8fad510b2 | konn/lk-proof-assistant | autoprover.hs | {-# LANGUAGE DoAndIfThenElse, QuasiQuotes #-}
module Main where
import Control.Applicative
import Data.Generics.Uniplate.Operations
import Data.List
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Dat... | null | https://raw.githubusercontent.com/konn/lk-proof-assistant/7d71d7bab33cf75b5c23d76e6139f229434fd527/autoprover.hs | haskell | # LANGUAGE DoAndIfThenElse, QuasiQuotes # | module Main where
import Control.Applicative
import Data.Generics.Uniplate.Operations
import Data.List
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.IO as T
import ... |
c3668178164fad0e3731cde1cfe6058bed41701624625547993b5a93b0eca5d2 | jguhlin/ODG | core.clj | (ns odg.core
(:gen-class :main true)
(:require clojure.java.io
clojure.string
[co.paralleluniverse.pulsar.core :as p]
[clojure.core.reducers :as r]
[cheshire.core :refer :all]
[odg.assembly :as assembly]
[clojure.tools.cli]
... | null | https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/src/odg/core.clj | clojure | Make debugging output easier to understand..
"preprocess" (do
(preprocess/main config options))
"worker" (do
(worker/main config options))
(assembly/import-fasta-cli @config options (rest args)))
Explain that this is blastn only!
Need to document this one... | (ns odg.core
(:gen-class :main true)
(:require clojure.java.io
clojure.string
[co.paralleluniverse.pulsar.core :as p]
[clojure.core.reducers :as r]
[cheshire.core :refer :all]
[odg.assembly :as assembly]
[clojure.tools.cli]
... |
928bba3970a8be1a8c2b35876591056490275c05d39907e947df691ccade12ee | garrigue/labltk | slave.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/support/slave.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
b924c7dc21cbb421f26f9abd9db486e6336ac060203560652124219e1a6309a5 | BinaryAnalysisPlatform/bap | beagle_prey.mli | open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
module Words : sig
type t = String.Set.t
include Value.S with type t := t
val to_string : t -> string
end
type words = Words.t
type t
val caught : (t * words) Primus.observation
(** made when a prey is detected *)
val detected : t Primus.obse... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/beagle/beagle_prey.mli | ocaml | * made when a prey is detected
* a statement that a prey was detected
* [create terms chars] the result of beagle hunting stating that
during the execution of a sequence of [terms] we observed [chars]
in that specific order.
* [data prey] is a sequence of chars, that was caught
* a set of static strings... | open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
module Words : sig
type t = String.Set.t
include Value.S with type t := t
val to_string : t -> string
end
type words = Words.t
type t
val caught : (t * words) Primus.observation
val detected : t Primus.observation
val finished : t Primus.sta... |
dabbca848e581f381f1f1f102f404b09d531d938024037b70acc0768d02990ff | agda/agda2hs | ConstrainedInstance.hs | module ConstrainedInstance where
data D a = C a
instance (Eq a) => Eq (D a) where
C x == C y = x == y
| null | https://raw.githubusercontent.com/agda/agda2hs/4cda09ffd12eca31bc37e1d74532ed8e22baa4ac/test/ConstrainedInstance.hs | haskell | module ConstrainedInstance where
data D a = C a
instance (Eq a) => Eq (D a) where
C x == C y = x == y
| |
b265ef2cc85d2d16cbe50ea88d3e23ed538d0d8d8c99e461462235158af04e7a | nunchaku-inria/nunchaku | Model_clean.ml |
(* This file is free software, part of nunchaku. See file "license" for more details. *)
* { 1 Rename values in a model }
open Nunchaku_core
module TI = TermInner
module M = Model
module DT = Model.DT
module T = Term
type term = T.t
type model = (T.t, T.t) Model.t
let fpf = Format.fprintf
let name = "model_clean"... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/transformations/Model_clean.ml | ocaml | This file is free software, part of nunchaku. See file "license" for more details.
a kind of flat-form printing of [t]
return a prefix for constants in the domain of this given type
compute a set of renaming rules for the model [m]
rename [v] and add the renaming to [subst]
rewrite [t] using the set of rewri... |
* { 1 Rename values in a model }
open Nunchaku_core
module TI = TermInner
module M = Model
module DT = Model.DT
module T = Term
type term = T.t
type model = (T.t, T.t) Model.t
let fpf = Format.fprintf
let name = "model_clean"
let section = Utils.Section.(make ~parent:root) name
let rec flatten_ty out t = match T... |
d6f72eec06bc0284afea7630004a26bf4370ceaa6d3efc128b1b8e16fa7bf549 | equill/neo4cl | package.lisp | Copyright 2017 < >
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
distributed ... | null | https://raw.githubusercontent.com/equill/neo4cl/1611a357ac50f67d8ca45d87405aaffbc6926ec8/src/package.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2017 < >
distributed under the License is distributed on an " AS IS " BASIS ,
(defpackage neo4cl
(:use
#:cl)
(:export
bolt-server
bolt-auth-basic
bolt-auth-none
neo4j-version
neo4j-4-3-9
hostname
port
bolt-session
connect
connection
connection-id... |
be8849a53cdd06a1bd218798cb45f20677646d031dc434156ea87e510a7ad88a | TrustInSoft/tis-interpreter | eval_annots.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/legacy/eval_annots.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
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 Softwa... |
fb88075bbbabcb07687abcba64c2e373bf818378b90947c533fb619f9c8bb4ee | tari3x/csec-modex | history.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/history.ml | ocaml | add a rule and return its history
History simplification
We use a hash table that associates to each fact all trees that
derive it. To avoid recomputing hashes, we store them together with
the considered fact.
Remove proofs of the same fact only for attacker facts,
several proofs of the s... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
b711d916fc3d3001f80f855a755c1a5c69ccf80d8b0c8b954a606d529f812992 | ocurrent/ocaml-ci | backend_solver.ml | open Lwt.Infix
let ( >>!= ) = Lwt_result.bind
type t =
| Remote of Current_ocluster.Connection.t
| Local of Ocaml_ci_api.Solver.t Lwt.t
let switch = Current.Switch.create ~label:"solver-remote" ()
let config = Current.Config.v ()
let solve_to_custom req builder =
let params =
Yojson.Safe.to_string @@ Ocam... | null | https://raw.githubusercontent.com/ocurrent/ocaml-ci/bac90619e2404a4761e8dcd95fe87b64489f7739/lib/backend_solver.ml | ocaml | open Lwt.Infix
let ( >>!= ) = Lwt_result.bind
type t =
| Remote of Current_ocluster.Connection.t
| Local of Ocaml_ci_api.Solver.t Lwt.t
let switch = Current.Switch.create ~label:"solver-remote" ()
let config = Current.Config.v ()
let solve_to_custom req builder =
let params =
Yojson.Safe.to_string @@ Ocam... | |
c3475957b4adc97770ce35dd63787ffd7f494767e05ac4e3ff02d23eafa77cc5 | TheAlgorithms/Haskell | Problem6.hs | module ProjectEuler.Problem6.Problem6 where
sumSquare :: [Integer] -> Integer
sumSquare = sum . map (^2)
squareSum :: [Integer] -> Integer
squareSum = (^2) . sum
main :: IO ()
main = do
let l = [1..100]
putStrLn $ show $ (squareSum l) - (sumSquare l) | null | https://raw.githubusercontent.com/TheAlgorithms/Haskell/9dcabef99fb8995a760ff25a9e0d659114c0b9d3/src/ProjectEuler/Problem6/Problem6.hs | haskell | module ProjectEuler.Problem6.Problem6 where
sumSquare :: [Integer] -> Integer
sumSquare = sum . map (^2)
squareSum :: [Integer] -> Integer
squareSum = (^2) . sum
main :: IO ()
main = do
let l = [1..100]
putStrLn $ show $ (squareSum l) - (sumSquare l) | |
44f0ed76e05cb3918a9e388175f7a90462ea7f814d9491255c17894d4fd851ed | tjammer/schmu | records.ml | open Types
open Typed_tree
open Inference
module type Core = sig
val convert : Env.t -> Ast.expr -> Typed_tree.typed_expr
val convert_annot :
Env.t -> Types.typ option -> Ast.expr -> Typed_tree.typed_expr
end
module type S = sig
val convert_record :
Env.t ->
Ast.loc ->
Types.typ option ->
(... | null | https://raw.githubusercontent.com/tjammer/schmu/2a5b3a1164115f83a49ffea3ad2db5a1aab69056/lib/typing/records.ml | ocaml | If the variable is generic, we figure the type out normally
and then unify for the later fields
We sort the labels to appear in the defined order
Records with mutable fields cannot be const
There are some old fields. | open Types
open Typed_tree
open Inference
module type Core = sig
val convert : Env.t -> Ast.expr -> Typed_tree.typed_expr
val convert_annot :
Env.t -> Types.typ option -> Ast.expr -> Typed_tree.typed_expr
end
module type S = sig
val convert_record :
Env.t ->
Ast.loc ->
Types.typ option ->
(... |
c94bb3a6131d071e8c719ee11b428d34b85bde76e7c786052ed16b036062f45c | camlspotter/ocamloscope.2 | search.mli | (** Search session loop *)
open Utils
val do_search : FilePath.t -> unit
(** Load the database file (normally "all.all") then start a search session *)
val dump : FilePath.t -> unit
(** Dump the database file. Normally useless since the output is too huge *)
| null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/search.mli | ocaml | * Search session loop
* Load the database file (normally "all.all") then start a search session
* Dump the database file. Normally useless since the output is too huge |
open Utils
val do_search : FilePath.t -> unit
val dump : FilePath.t -> unit
|
fd22c7e674895424227ce3fc347374124923cad4f973f3f222a901f37f84c461 | sorawee/fmt | record.rkt | #lang racket/base
(provide define/record)
(require syntax/parse/define
(for-syntax racket/base))
(define-syntax-parse-rule (define/record fun-name #:record x:id
[(s ...) body ...] ...
[{~literal else} else-body ...])
(begin
(define x (list {~@ s .... | null | https://raw.githubusercontent.com/sorawee/fmt/c981fda6080d07854c8083a1fa8507a23c6fdb87/record.rkt | racket | #lang racket/base
(provide define/record)
(require syntax/parse/define
(for-syntax racket/base))
(define-syntax-parse-rule (define/record fun-name #:record x:id
[(s ...) body ...] ...
[{~literal else} else-body ...])
(begin
(define x (list {~@ s .... | |
e13e1050d6209b7e9d013a23e76442b9dae0d55d9afe95da9ba2b91d8ba41419 | UChicago-PL/smyth | rank.mli | (** Ranking algorithms for synthesis solutions.
Algorithm configurable via the {!Params} module. *)
open Lang
val rank :
(hole_name * exp) list -> int
(** Computes a rank for a synthesis solution (lower is better). *)
val sort :
(hole_name * exp) list list -> (hole_name * exp) list list
(** Sorts a list of ... | null | https://raw.githubusercontent.com/UChicago-PL/smyth/08fea281f70d3ee604fde9dde140c8a570d6905d/lib/smyth/rank.mli | ocaml | * Ranking algorithms for synthesis solutions.
Algorithm configurable via the {!Params} module.
* Computes a rank for a synthesis solution (lower is better).
* Sorts a list of synthesis solutions by rank.
* Returns the best-ranked {i recursive} synthesis solution from a list. |
open Lang
val rank :
(hole_name * exp) list -> int
val sort :
(hole_name * exp) list list -> (hole_name * exp) list list
val first_recursive :
(hole_name * exp) list list -> (hole_name * exp) list option
|
442b9cc53a3a16bc557391cfe4e3576c9a2992df4ef01bd54130487284acfa78 | Airini/FEECa | TestDummy.hs | module Main where
import qualified FEECa.Internal.FormTest as F
import qualified FEECa.Internal.MultiIndexTest as MI
import qualified FEECa.Internal.SimplexTest as S
import qualified FEECa.Internal.VectorTest as V
import qualified FEECa.Utility.CombinatoricsTest as C
import qualified FEECa.Utility.Q... | null | https://raw.githubusercontent.com/Airini/FEECa/3ffae7177fca159d965b70e3763a20ab84cd8a8b/tests/TestDummy.hs | haskell | TODO: testing configuration (?)
| A test dummy | module Main where
import qualified FEECa.Internal.FormTest as F
import qualified FEECa.Internal.MultiIndexTest as MI
import qualified FEECa.Internal.SimplexTest as S
import qualified FEECa.Internal.VectorTest as V
import qualified FEECa.Utility.CombinatoricsTest as C
import qualified FEECa.Utility.Q... |
7de1ddb216ca8711d7ee67c8d4864b997b80e27f288a5c6fa6a8e3ddf12057ab | chrisdone/duet | classes.hs | class Reader a where
reader :: List Ch -> a
class Shower a where
shower :: a -> List Ch
instance Shower Nat where
shower = \n ->
case n of
Zero -> Cons Z Nil
Succ n -> Cons S (shower n)
data Nat = Succ Nat | Zero
instance Reader Nat where
reader = \cs ->
case cs of
Cons Z Nil -> Zero
... | null | https://raw.githubusercontent.com/chrisdone/duet/959d40db68f4c2df04cabb7677724900d4f71db4/examples/classes.hs | haskell | class Reader a where
reader :: List Ch -> a
class Shower a where
shower :: a -> List Ch
instance Shower Nat where
shower = \n ->
case n of
Zero -> Cons Z Nil
Succ n -> Cons S (shower n)
data Nat = Succ Nat | Zero
instance Reader Nat where
reader = \cs ->
case cs of
Cons Z Nil -> Zero
... | |
308a9165cebe6d53f8a363beda385772242501d3aa18b000e3c888de8ef12817 | analyticbastard/xicotrader | system.clj | (ns xicotrader.system
(:require
[clojure.core.async :as a]
[com.stuartsierra.component :as component]
[xicotrader
[webhandler :as webhandler]
[webserver :as webserver]]))
(defn- create-webserver [config]
(assoc (webserver/new config) :ch (a/chan)))
(defn make-system-component
[{:keys [webs... | null | https://raw.githubusercontent.com/analyticbastard/xicotrader/67e15143d853649afabbb9a778225457e97c70cd/externals/simulator/src/xicotrader/system.clj | clojure | (ns xicotrader.system
(:require
[clojure.core.async :as a]
[com.stuartsierra.component :as component]
[xicotrader
[webhandler :as webhandler]
[webserver :as webserver]]))
(defn- create-webserver [config]
(assoc (webserver/new config) :ch (a/chan)))
(defn make-system-component
[{:keys [webs... | |
ec3962baaefaf02cde160bd075e3e45c098b4f12ff8465ab4d62d56adda3e3aa | tmfg/mmtis-national-access-point | service_viewer.cljs | (ns ote.app.controller.service-viewer
(:require [clojure.string :as string]
[clojure.walk :refer [postwalk]]
[clojure.set :refer [difference]]
[tuck.core :as tuck :refer-macros [define-event]]
[ote.communication :as comm]
[ote.localization :as localization :... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/94d870255b2f8dbe0d637da39a828805c3abd9a0/ote/src/cljs/ote/app/controller/service_viewer.cljs | clojure | (ns ote.app.controller.service-viewer
(:require [clojure.string :as string]
[clojure.walk :refer [postwalk]]
[clojure.set :refer [difference]]
[tuck.core :as tuck :refer-macros [define-event]]
[ote.communication :as comm]
[ote.localization :as localization :... | |
b648ab4f6d383f3117178a621d327fdfb1fd67683e486af8cf42555ac4e694dc | AshleyYakeley/Truth | Invert.hs | module Language.Expression.Dolan.Invert
( invertTypeMaybe
) where
import Data.Shim
import Language.Expression.Common
import Language.Expression.Dolan.Arguments
import Language.Expression.Dolan.Bisubstitute
import Language.Expression.Dolan.Subtype
import Language.Expression.Dolan.Type
import Language.Expression... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/7e7c2bf19e673caefe2b3b1502532a7d65c4487c/Pinafore/typed-expression/lib/Language/Expression/Dolan/Invert.hs | haskell | module Language.Expression.Dolan.Invert
( invertTypeMaybe
) where
import Data.Shim
import Language.Expression.Common
import Language.Expression.Dolan.Arguments
import Language.Expression.Dolan.Bisubstitute
import Language.Expression.Dolan.Subtype
import Language.Expression.Dolan.Type
import Language.Expression... | |
656b4a572a294027df499aa68a2adaccdc2b073ede268cec036d15ec72a0bec5 | caisah/sicp-exercises-and-examples | expt.scm | (define (expt b n)
(if (= n 0)
1
(* b (expt b (- n 1)))))
(expt 2 3)
(define (expt-iter b counter product)
(if (= counter 0)
product
(expt-iter b
(- counter 1)
(* b product))))
(define (expt b n)
(expt-iter b n 1))
(expt 3 2)
(define (even? n)
(= (rem... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/1.2.4-exponentiation/expt.scm | scheme | (define (expt b n)
(if (= n 0)
1
(* b (expt b (- n 1)))))
(expt 2 3)
(define (expt-iter b counter product)
(if (= counter 0)
product
(expt-iter b
(- counter 1)
(* b product))))
(define (expt b n)
(expt-iter b n 1))
(expt 3 2)
(define (even? n)
(= (rem... | |
3651fab3b4cf27392c2620e9818fa1647a2f167cec9e3a883214e0b875c9fe68 | input-output-hk/cardano-wallet-legacy | Read.hs | module Cardano.Wallet.Kernel.DB.Read (
-- | Getters across the entire kernel
walletIds
-- | Summarize
, accountsByRootId
, addressesByRootId
, addressesByAccountId
, pendingByAccount
, foreignPendingByAccount
-- | Lookups
, lookupHdRootId
, lookupHdAccountId
, lookupHdAddressId
, looku... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/Kernel/DB/Read.hs | haskell | | Getters across the entire kernel
| Summarize
| Lookups
| Properties of an entire root
| Queries on an account's current checkpoint
------------------------------------------------------------------------------
Getters across the entire kernel
--------------------------------------------------------------------... | module Cardano.Wallet.Kernel.DB.Read (
walletIds
, accountsByRootId
, addressesByRootId
, addressesByAccountId
, pendingByAccount
, foreignPendingByAccount
, lookupHdRootId
, lookupHdAccountId
, lookupHdAddressId
, lookupCardanoAddress
, rootAssuranceLevel
, rootTotalBalance
, currentUtxo
... |
40feba958f36d00acf504f813b9543a9d86c1697d43921898000ef6074de6933 | scmlab/gcl | Lexer.hs | # LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
module Syntax.Parser.Lexer
( scan
, LexicalError
, Tok(..)
, TokStream
)
where
import Data.Char ( isAlphaNum
, isDigit
, isLowe... | null | https://raw.githubusercontent.com/scmlab/gcl/cadeff706b678e558100f3c3b172055486e6043a/src/Syntax/Parser/Lexer.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
| Tok & TokStream
the following tokens will not be sent to the parser
might not actually be used?
This token is only generated when a parser failed, and is us... | # LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
module Syntax.Parser.Lexer
( scan
, LexicalError
, Tok(..)
, TokStream
)
where
import Data.Char ( isAlphaNum
, isDigit
, isLowe... |
c014e0cf8b0a4f6672f773dcfeed3cca72a65815f01f9d26556fb2980e6e193a | alex-hhh/ActivityLog2 | view-workouts.rkt | #lang racket/base
;; view-workouts.rkt -- workouts management panel
;;
;; This file is part of ActivityLog2, an fitness activity tracker
Copyright ( C ) 2018 , 2021 < >
;;
;; 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 ... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/35efd751b30592c8fcb2e9b87da93f67554b061e/rkt/workout-editor/view-workouts.rkt | racket | view-workouts.rkt -- workouts management panel
This file is part of ActivityLog2, an fitness activity tracker
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty ... | #lang racket/base
Copyright ( C ) 2018 , 2021 < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
(require db/base
racket/class
racket/gui/base
racket/match
"../dbutil.r... |
6fe279e5c1b7335822d0ecd566d6af3c11a1e83d039c5d61beb21dc0f21f4274 | tonyday567/numhask | Group.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall #
-- | The Group hierarchy
module NumHask.Algebra.Group
( Magma (..),
Unital (..),
Associative,
Commutative,
Absorbing (..),
Invertible (..),
Idempotent,
Group,
AbelianGroup,
)
where
import Prelude... | null | https://raw.githubusercontent.com/tonyday567/numhask/c185bd9561f780654c34dcf852c7fbe95fdee932/src/NumHask/Algebra/Group.hs | haskell | | The Group hierarchy
* Magma structure
| A <(algebra) Magma> is a tuple (T,magma) consisting of
- a type a, and
- a function (magma) :: T -> T -> T
The mathematical laws for a magma are:
- magma is defined for all possible pairs of type T, and
- magma is closed in the set of all possible values of type T
... | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall #
module NumHask.Algebra.Group
( Magma (..),
Unital (..),
Associative,
Commutative,
Absorbing (..),
Invertible (..),
Idempotent,
Group,
AbelianGroup,
)
where
import Prelude
These laws are true ... |
b13b96399f8c5aa9699e5485f6cef7fd0afa5e185c4c532d38ed0c1642a64dcf | rpav/spell-and-dagger | move-manager.lisp | (in-package :game)
;; MOVE-MANAGER
;;; This is a mixin for things that have complex "walk around"
;;; animations.
(defclass move-manager ()
((sprite-name :initform nil :initarg :sprite-name)
sprite-anim sprite-anim-state))
(defun mm-move-name (mm move)
(with-slots (sprite-name) mm
(switch (move)
(... | null | https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/entity/move-manager.lisp | lisp | MOVE-MANAGER
This is a mixin for things that have complex "walk around"
animations. | (in-package :game)
(defclass move-manager ()
((sprite-name :initform nil :initarg :sprite-name)
sprite-anim sprite-anim-state))
(defun mm-move-name (mm move)
(with-slots (sprite-name) mm
(switch (move)
(+motion-none+ (string+ sprite-name "walk-down"))
(+motion-up+ (string+ sprite-name "walk-up... |
d188f979cda13c993b15ea78b4c43373a476d17f243711b8079d113e4e098122 | ghc/ghc | Debugger.hs | -----------------------------------------------------------------------------
--
-- GHCi Interactive debugging commands
--
( supported by Google SoC ) 2006
--
ToDo : lots of violation of layering here . This module should
decide whether it is above the GHC API ( import GHC and nothing
-- else) or below it.
--... | null | https://raw.githubusercontent.com/ghc/ghc/5d96fd5060958238d5b5c98f14a8b9221c87df93/compiler/GHC/Runtime/Debugger.hs | haskell | ---------------------------------------------------------------------------
GHCi Interactive debugging commands
else) or below it.
---------------------------------------------------------------------------
-----------------------------------
| The :print & friends commands
-----------------------------------
S... | ( supported by Google SoC ) 2006
ToDo : lots of violation of layering here . This module should
decide whether it is above the GHC API ( import GHC and nothing
module GHC.Runtime.Debugger (pprintClosureCommand, showTerm, pprTypeAndContents) where
import GHC.Prelude
import GHC
import GHC.Driver.Session
imp... |
60d12b0001d363cb4d49ee3e62d7d8b4861e73383008371acae353884326240a | lasp-lang/types | lists_ext.erl | %%
Copyright ( c ) 2015 - 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/lasp-lang/types/e35b9b3a32b8f580daff1a7d1102813ad530835e/src/lists_ext.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
----------------------------... | Copyright ( c ) 2015 - 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(lists_ext).
-a... |
e90b3672b43e83d8fdd5b367503179849f4818cf3586a27decd2881b270189df | dancrossnyc/multics | e_defpl1_.lisp | ;;; ***********************************************************
;;; * *
* Copyright , ( C ) Honeywell Bull Inc. , 1988 *
;;; * *
* Copyright , ( C ) Honeywell Information Systems Inc. , 19... | null | https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_multics_emacs_.s.archive/e_defpl1_.lisp | lisp | ***********************************************************
* *
* *
* *
* *
**************... | * Copyright , ( C ) Honeywell Bull Inc. , 1988 *
* Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
* Copyright ( c ) 1978 by Massachusetts Institute of *
* Technology and Honeywell Information Systems , Inc. *
1 ) change(84 - 01 - 23,Margolin ) , approve ( ) , a... |
630412ca8f162f3bdaba19a0c58106988ca033ffa5dab43f45a38f0b222e5a24 | erlang/otp | m5.erl | -module(m5).
-export([id/1, m/0, wrong/1]).
-ifdef(m5).
m() -> ?m5.
-else.
m() -> false.
-endif.
-spec wrong(float()) -> float().
wrong(X) when is_integer(X) -> X.
id(X) -> X.
| null | https://raw.githubusercontent.com/erlang/otp/1633a01279ec782273e8c100280a5d3f10ac36a8/lib/dialyzer/test/incremental_SUITE_data/m5.erl | erlang | -module(m5).
-export([id/1, m/0, wrong/1]).
-ifdef(m5).
m() -> ?m5.
-else.
m() -> false.
-endif.
-spec wrong(float()) -> float().
wrong(X) when is_integer(X) -> X.
id(X) -> X.
| |
6090d2b278d97f9be5a2b7d2643e718e27fc18a7ea97ffbe15320ba7baab27c8 | multimodalrouting/osm-fulcro | d3svg_lines.cljs | (ns app.ui.leaflet.layers.d3svg-lines
(:require
[com.fulcrologic.fulcro.components :refer [defsc]]
[app.ui.leaflet.d3 :refer [d3SvgOverlay lngLat->Point color-by-accessibility]]))
(defn d3DrawCallback [sel proj data]
(let [radius 3
upd (-> sel
(.selectAll "a")
(.data... | null | https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/ui/leaflet/layers/d3svg_lines.cljs | clojure | (ns app.ui.leaflet.layers.d3svg-lines
(:require
[com.fulcrologic.fulcro.components :refer [defsc]]
[app.ui.leaflet.d3 :refer [d3SvgOverlay lngLat->Point color-by-accessibility]]))
(defn d3DrawCallback [sel proj data]
(let [radius 3
upd (-> sel
(.selectAll "a")
(.data... | |
8f2b81e378de72ffc6b7769bcd090f1202de230d4a0e618a65df53b036ea98b5 | huangz1990/real-world-haskell-cn | candidateDigits2.hs | -- file: ch12/Barcode.hs
candidateDigits rle
| any null match = []
| otherwise = map (map (fmap snd)) match
where match = map bestLeft left ++ map bestRight right
left = chunksOf 4 . take 24 . drop 3 $ runLengths
right = chunksOf 4 . take 24 . drop 32 $ runLengths
runLengths = map... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch12/candidateDigits2.hs | haskell | file: ch12/Barcode.hs | candidateDigits rle
| any null match = []
| otherwise = map (map (fmap snd)) match
where match = map bestLeft left ++ map bestRight right
left = chunksOf 4 . take 24 . drop 3 $ runLengths
right = chunksOf 4 . take 24 . drop 32 $ runLengths
runLengths = map fst rle |
2cf301a7640ba3f997d1563a88e84918c2820847c3bdfd9e83f5f28809d91b55 | rescript-association/reanalyze | DeadOptionalArgs.ml | open DeadCommon
open Common
let active () = true
type item = {
posTo : Lexing.position;
argNames : string list;
argNamesMaybe : string list;
}
let delayedItems = (ref [] : item list ref)
let functionReferences = (ref [] : (Lexing.position * Lexing.position) list ref)
let addFunctionReference ~(locFrom : CL.Lo... | null | https://raw.githubusercontent.com/rescript-association/reanalyze/d3ef53812b412521253bc0597e98421dd9083c82/src/DeadOptionalArgs.ml | ocaml | open DeadCommon
open Common
let active () = true
type item = {
posTo : Lexing.position;
argNames : string list;
argNamesMaybe : string list;
}
let delayedItems = (ref [] : item list ref)
let functionReferences = (ref [] : (Lexing.position * Lexing.position) list ref)
let addFunctionReference ~(locFrom : CL.Lo... | |
8adc06b3bdcf23c7f55ef5a0ad75c47bd170190c89f962dd87078fca0fa3e2a6 | openeuler-mirror/secGear | Codegener.ml |
* Copyright ( c ) Huawei Technologies Co. , Ltd. 2020 . All rights reserved .
* secGear is licensed under the Mulan PSL v2 .
* You can use this software according to the terms and conditions of the Mulan PSL v2 .
* You may obtain a copy of Mulan PSL v2 at :
*
* THIS SOFTWARE IS PROVIDED ON AN " ... | null | https://raw.githubusercontent.com/openeuler-mirror/secGear/23fc7f043ba8c6a5114c6dc79261b3d7bad1bd98/tools/codegener/Codegener.ml | ocaml | Check duplicated structure definition and illegal usage.
|
* Copyright ( c ) Huawei Technologies Co. , Ltd. 2020 . All rights reserved .
* secGear is licensed under the Mulan PSL v2 .
* You can use this software according to the terms and conditions of the Mulan PSL v2 .
* You may obtain a copy of Mulan PSL v2 at :
*
* THIS SOFTWARE IS PROVIDED ON AN " ... |
1b7ff3ad227c418fcd5106f53cd70b4070eac63394795862a1ad7decf19609ec | cicakhq/potato | build-id.lisp | (in-package :potato)
(declaim #.potato.common::*compile-decl*)
(defvar *build-id* "1")
| null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/build-id.lisp | lisp | (in-package :potato)
(declaim #.potato.common::*compile-decl*)
(defvar *build-id* "1")
| |
db3bd58af709935edd86da4d6c24539219511f7d02a24495ee34dda4f0571da7 | noprompt/meander | epsilon_test.cljc | (ns meander.matrix.epsilon-test
(:require [clojure.spec.alpha :as s :include-macros true]
[clojure.test :as t]
[clojure.test.check.clojure-test :as tc.t :include-macros true]
[clojure.test.check.generators :as tc.gen :include-macros true]
[clojure.test.check.properties ... | null | https://raw.githubusercontent.com/noprompt/meander/8c0e9457befea5eee71a94a6d8726ed5916875dc/test/meander/matrix/epsilon_test.cljc | clojure | (ns meander.matrix.epsilon-test
(:require [clojure.spec.alpha :as s :include-macros true]
[clojure.test :as t]
[clojure.test.check.clojure-test :as tc.t :include-macros true]
[clojure.test.check.generators :as tc.gen :include-macros true]
[clojure.test.check.properties ... | |
feb3d31dd8938200601cee3650abd63d9d33681246dba74adace4c1d1e07be6b | jabber-at/ejabberd | ejabberd_auth_ldap.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_auth_ldap.erl
Author : < >
%%% Purpose : Authentification via LDAP
Created : 12 Dec 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redis... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_auth_ldap.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_auth_ldap.erl
Purpose : Authentification via LDAP
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be usefu... | Author : < >
Created : 12 Dec 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
e41643514f822a00827117def77de83ab4d1141e8ce560846c6335b510b7405d | mfikes/fifth-postulate | ns378.cljs | (ns fifth-postulate.ns378)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns378.cljs | clojure | (ns fifth-postulate.ns378)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
8fcb9e87833b9abf2bf05d927f9eaba1f928ce5cebbacf117f161f0e73e4c160 | timrichardt/hicgql | project.clj | (defproject io.github.timrichardt/hicgql "0.3.0"
:description "GraphQL in Clojure data structures."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clojure/clojurescript "1.10.520" :scope "provided"]
[cheshire "5.10.2"]]
:repositories
{"clojars" {:... | null | https://raw.githubusercontent.com/timrichardt/hicgql/499e487ac102afece4a6724884f6d826438c1f72/project.clj | clojure | (defproject io.github.timrichardt/hicgql "0.3.0"
:description "GraphQL in Clojure data structures."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clojure/clojurescript "1.10.520" :scope "provided"]
[cheshire "5.10.2"]]
:repositories
{"clojars" {:... | |
e165ddffaf8b1f1d1497a7812637ec2eb380cf97564640c2446c1afc25683c61 | rixed/ramen | RamenConf.ml | (* The configuration that's managed by this module includes:
*
* - the Running Configuration (RC), which is the set of all programs that are
* supposed to run;
* - the per worker Stats (generated by the archivist with option --stats)
* and used for allocating storage space;
* - the per worker storage allocati... | null | https://raw.githubusercontent.com/rixed/ramen/b42db4dbcb8b2918857cb935a9f4c243e6f9dc3b/src/RamenConf.ml | ocaml | The configuration that's managed by this module includes:
*
* - the Running Configuration (RC), which is the set of all programs that are
* supposed to run;
* - the per worker Stats (generated by the archivist with option --stats)
* and used for allocating storage space;
* - the per worker storage allocation... | open Batteries
open RamenLog
open RamenHelpersNoLog
open RamenHelpers
module O = RamenOperation
module N = RamenName
module E = RamenExpr
module T = RamenTypes
module Default = RamenConstsDefault
module Files = RamenFiles
module Retention = RamenRetention
module TimeRange = RamenTimeRange
module Versions = RamenVersion... |
8115984a4b556a8af26a7bf456cbb272498c5589956e7c8c30b73a12561d2135 | ocaml-explore/explore | time.ml | open Cmdliner
open Explore
let pp_collection ~yaml ~body ppf =
Fmt.string ppf "---\n";
Yaml.pp ppf yaml;
Fmt.pf ppf "---\n%s" body
let run collection path =
match (collection, path) with
| "workflow", Some path -> (
match Collection.Workflow.v ~path ~content:(Files.read_file path) with
| Ok t ->... | null | https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/explore/bin/time.ml | ocaml | open Cmdliner
open Explore
let pp_collection ~yaml ~body ppf =
Fmt.string ppf "---\n";
Yaml.pp ppf yaml;
Fmt.pf ppf "---\n%s" body
let run collection path =
match (collection, path) with
| "workflow", Some path -> (
match Collection.Workflow.v ~path ~content:(Files.read_file path) with
| Ok t ->... | |
4ecd2529ec083222cf47079e3f86e954bcc8cfad506cadab29f3b2c1c516cd5d | bsansouci/bsb-native | loc.ml | it 's not worth adding a dependency on parsing / location.ml(i ) or
compilerlibs just to support location printing , so we re - implement
that here
compilerlibs just to support location printing, so we re-implement
that here *)
open Lexing
(* We use a loosely structural type so that this bit of code... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/loc.ml | ocaml | We use a loosely structural type so that this bit of code can be
easily reused by project that would wish it, without introducing
any type-compatibility burden.
"file", "environment variable", "command-line option" ... | it 's not worth adding a dependency on parsing / location.ml(i ) or
compilerlibs just to support location printing , so we re - implement
that here
compilerlibs just to support location printing, so we re-implement
that here *)
open Lexing
type location = source * position * position
let file loc =... |
d3b62f8e0eb511e23c2c6c756ae77d94d4f01ec0fcbc4a899d9b7f619dde7978 | nsg-ethz/O4 | control.rkt | #lang racket/base
Control Backend
; ---------------------------------------
(provide control-declaration
deparser-declaration
control-body
table-declaration
key-property
actions-property
entries-property
key-property-body-line
action-reference
... | null | https://raw.githubusercontent.com/nsg-ethz/O4/870f6f78a6f7bb1e9e1502e29ff0048e5e1723c5/o4/backend/control.rkt | racket | ---------------------------------------
Implementation
---------------------------------------
-
After compiling the control block, we recursively expand the collected factory calls.
Missing or unhandled factory placeholder
Table Declaration
A table can be a factory body, so we might need to replace its name.
... | #lang racket/base
Control Backend
(provide control-declaration
deparser-declaration
control-body
table-declaration
key-property
actions-property
entries-property
key-property-body-line
action-reference
entries-property-body-line
... |
799074e12a3f8faa383948c404c1ff7a20b759da37d297b0b08555dcc811e266 | jpmonettas/clj-tree-layout | core_specs.cljc | (ns clj-tree-layout.core-specs
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as sgen]
[clojure.test.check.generators :as gen]
[clojure.set :as set]))
(def simple-tree-gen (gen/recursive-gen
#(gen/hash-map :id gen/uuid :childs (gen/vector %))
... | null | https://raw.githubusercontent.com/jpmonettas/clj-tree-layout/39b2ff8a95ec947ff0ad1a5d7e1afaad5c141d40/src/clj_tree_layout/core_specs.cljc | clojure | generate arguments with simple trees for testing | (ns clj-tree-layout.core-specs
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as sgen]
[clojure.test.check.generators :as gen]
[clojure.set :as set]))
(def simple-tree-gen (gen/recursive-gen
#(gen/hash-map :id gen/uuid :childs (gen/vector %))
... |
5074b230a72b30f6df48f0d5a15d828e61e4b0e4f3a8d10ec253bb765f7cb7e5 | hasktorch/hasktorch | IntArray.hs |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Unmanaged.Type.IntArray where
import qualified Language.C.Inline.Cpp ... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Type/IntArray.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Unmanaged.Type.IntArray where
import qualified Language.C.Inline.Cpp as C
import qualified Language.C.In... |
c66583745da1d39cebaddff3558447d51ca43ce6e9f47ec9361877a5589284aa | lamdu/hypertypes | TypedLam.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Hyper.Syntax.TypedLam
( TypedLam (..)
, tlIn
, tlInType
, tlOut
, W_TypedLam (..)
, MorphWitness (..)
) where
import Generics.Constraints (Constraints)
import ... | null | https://raw.githubusercontent.com/lamdu/hypertypes/161142e0d9f503194b85fb6f5b2a5907a1ae3783/src/Hyper/Syntax/TypedLam.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Hyper.Syntax.TypedLam
( TypedLam (..)
, tlIn
, tlInType
, tlOut
, W_TypedLam (..)
, MorphWitness (..)
) where
import Generics.Constraints (Constraints)
import ... | |
0b923772c25a988946b12d07bc19c23da33b4b9f070475874c594e240270b0f5 | dimitri/pginstall | json.lisp | ;;;
;;; The repository server is publishing information via an HTTP API.
;;;
;;; Encode our objects in JSON for HTTP API publishing
;;;
(in-package #:pginstall.server)
(defmacro define-yason-encoder (class)
"Define a new yason:encode method for CLASS."
`(defmethod yason:encode ((instance ,class)
... | null | https://raw.githubusercontent.com/dimitri/pginstall/66e4274fc544c48be03c719f8d3f03955649a994/src/server/json.lisp | lisp |
The repository server is publishing information via an HTTP API.
Encode our objects in JSON for HTTP API publishing
|
(in-package #:pginstall.server)
(defmacro define-yason-encoder (class)
"Define a new yason:encode method for CLASS."
`(defmethod yason:encode ((instance ,class)
&optional (stream *standard-output*))
"Encode an EXTENSION object into JSON."
(yason:with-output (stream)
(y... |
208bd4973b2462a4db964927096f4f72c3d08e0ef1a2ff50cf6b0e9e35147189 | into-docker/unixsocket-http | client.clj | (ns ^:no-doc unixsocket-http.client
(:require [clojure.string :as string])
(:import [unixsocket_http.impl
FixedPathTcpSocketFactory
FixedPathUnixSocketFactory
SingletonSocketFactory]
[okhttp3
Dns
OkHttpClient
OkHttpClient$Builder]
... | null | https://raw.githubusercontent.com/into-docker/unixsocket-http/2f40386664744e32394c48641fe1c5adbc121875/src/unixsocket_http/client.clj | clojure |
DNS lookups in static builds would be a problem. Plus, since the socket is
already connected to a specific IP, it's kinda pointless.
## OkHttpClient
undocumented options (maybe useful for debugging?)
## Client Modes | (ns ^:no-doc unixsocket-http.client
(:require [clojure.string :as string])
(:import [unixsocket_http.impl
FixedPathTcpSocketFactory
FixedPathUnixSocketFactory
SingletonSocketFactory]
[okhttp3
Dns
OkHttpClient
OkHttpClient$Builder]
... |
d4cbe17be3eeef21b48fc9ba9c434bc22dc14e854072d873d161ed62bbdea487 | leo-project/leo_commons | leo_misc_tests.erl | %%====================================================================
%%
Leo Commons
%%
Copyright ( c ) 2012 - 2014 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a c... | null | https://raw.githubusercontent.com/leo-project/leo_commons/24323c245c7984cd3fb08733e538a9fe9131d560/test/leo_misc_tests.erl | erlang | ====================================================================
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | Leo Commons
Copyright ( c ) 2012 - 2014 Rakuten , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(leo_misc_tests... |
471e73030cc793e984cc0c323be438e9581bebc24712d982502bffdaa3743587 | Bridgei2i/clojure-word2vec | core.clj | (ns clojure-word2vec.core
(:require [clojure.java.io :as io]
;[clojure.core.matrix :as mat]
;[clojure.core.matrix.operators :as matop]
[incanter.stats :as i-stat]
)
(:import [com.medallia.word2vec Word2VecTrainerBuilder Word2VecModel]
[com.medallia.word2vec... | null | https://raw.githubusercontent.com/Bridgei2i/clojure-word2vec/7c4e9bcbb19d998bab7123659fb4ca67d700d678/src/clojure_word2vec/core.clj | clojure | [clojure.core.matrix :as mat]
[clojure.core.matrix.operators :as matop]
split the string and return a seq instead of Array of strings
remove empty strings
remove collections that are empty | (ns clojure-word2vec.core
(:require [clojure.java.io :as io]
[incanter.stats :as i-stat]
)
(:import [com.medallia.word2vec Word2VecTrainerBuilder Word2VecModel]
[com.medallia.word2vec.thrift Word2VecModelThrift]
[com.medallia.word2vec.neuralnetwork NeuralNetworkType]
... |
199d56391409067c7d582f1f069dafcfc57f689fa479abad1523c57863f1e42a | nygge/pran | pran_mtp3.erl | %%%-------------------------------------------------------------------
2007 Telexpertise de Mexico , S.A. de C.V.
%%% File : mtp3.erl
@author < >
%%% @doc
%%% @end
Created : 14 Jan 2007 by < >
%%%-------------------------------------------------------------------
-module(pran_mtp3).
-export([decode/3])... | null | https://raw.githubusercontent.com/nygge/pran/2baf7f79720ebf40f5b18364127a6209515c7c91/src/pran_mtp3.erl | erlang | -------------------------------------------------------------------
File : mtp3.erl
@doc
@end
------------------------------------------------------------------- | 2007 Telexpertise de Mexico , S.A. de C.V.
@author < >
Created : 14 Jan 2007 by < >
-module(pran_mtp3).
-export([decode/3]).
-include("mtp3.hrl").
decode(<<NI:2,PRIO:2,SI:4,
DPClo:8,
OPClo:2,DPChi:6,
OPCmid:8,
SLS:4,OPChi:4,
Payload/binary>>,
Stack, _Opts) ->
<<OPC:16>> = <<0:2,OPCh... |
817015a2fb4c635d835bcf489f2f626263717ec7de91da5d2073391ceb1b3c31 | fccm/tsdl-gfx | tsdl_gfx.ml | open Ctypes
open Foreign
open Tsdl
open Result
module Gfx = struct
type 'a result = 'a Sdl.result
let error () = Error (`Msg (Sdl.get_error ()))
let zero_to_ok =
let read = function 0 -> Ok () | _ -> error () in
view ~read ~write:(fun _ -> assert false) int
let renderer =
view
~read:Sdl.unsafe_renderer_o... | null | https://raw.githubusercontent.com/fccm/tsdl-gfx/792f559467127d2c4b863d1f60ab8e402d25ebcb/src/tsdl_gfx.ml | ocaml | open Ctypes
open Foreign
open Tsdl
open Result
module Gfx = struct
type 'a result = 'a Sdl.result
let error () = Error (`Msg (Sdl.get_error ()))
let zero_to_ok =
let read = function 0 -> Ok () | _ -> error () in
view ~read ~write:(fun _ -> assert false) int
let renderer =
view
~read:Sdl.unsafe_renderer_o... | |
8541edad597dcb12c54bcc74a468c17624e07585901b3da1b4a46cdae1e09044 | DarrenN/cuttlefish | chunk-list.rkt | #lang racket
(provide chunk-list)
;; Split a list into ct chunks as best you can
ex : ( chunk - list ( range 0 12 ) 3 ) - > ' ( ( 0 1 2 3 ) ( 4 5 6 7 ) ( 8 9 10 11 12 ) )
(define (chunk-list ls ct)
(define n (round (/ (length ls) ct)))
(define (loop ls ct ac)
(cond [(empty? ls)
(reverse ac)]
... | null | https://raw.githubusercontent.com/DarrenN/cuttlefish/587c4db078e557ee48bb04e302bc4ba38d3ffdf6/private/chunk-list.rkt | racket | Split a list into ct chunks as best you can | #lang racket
(provide chunk-list)
ex : ( chunk - list ( range 0 12 ) 3 ) - > ' ( ( 0 1 2 3 ) ( 4 5 6 7 ) ( 8 9 10 11 12 ) )
(define (chunk-list ls ct)
(define n (round (/ (length ls) ct)))
(define (loop ls ct ac)
(cond [(empty? ls)
(reverse ac)]
[(< (length ls) n)
(if (equal? ... |
029d614329b455aacb3d2f376b00cab5bc8f8a41ffb7c7415a61206d3dabaf14 | henrik42/spring-break | shutdown-hook.clj | ;; Try this:
CP=$(JAVA_CMD=`which )
java -cp $ { CP / clojure / no - namespace - scripts / shutdown - hook.clj
;;
;; And in another shell:
kill -HUP $ ( ps aux | grep java | grep shutdown - hook | awk ' { print $ 2 } ' )
;; Try -KILL instead of -HUP. Go to the java shell and type ctrl-c.
(let [state (ato... | null | https://raw.githubusercontent.com/henrik42/spring-break/0d4e51f6ec0ffab023c46709a43b9d877fac4536/src/main/clojure/no-namespace-scripts/shutdown-hook.clj | clojure | Try this:
And in another shell:
Try -KILL instead of -HUP. Go to the java shell and type ctrl-c.
make main thread complete | CP=$(JAVA_CMD=`which )
java -cp $ { CP / clojure / no - namespace - scripts / shutdown - hook.clj
kill -HUP $ ( ps aux | grep java | grep shutdown - hook | awk ' { print $ 2 } ' )
(let [state (atom nil)]
(..
(Runtime/getRuntime)
(addShutdownHook
(proxy [Thread][]
(run []
(.print... |
1a8fca36632bd90e0f984a094c229d7634999bf1cd1ad3b37241ccf0de522816 | kronkltd/jiksnu | user.clj | (ns jiksnu.modules.core.model.user
(:require [ciste.config :refer [config]]
[clj-gravatar.core :refer [gravatar-image]]
[clojure.string :as string]
[taoensso.timbre :as timbre]
[jiksnu.modules.core.db :as db]
[jiksnu.modules.core.model :as model]
... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/model/user.clj | clojure | TODO: Move this to actions and make it find-or-create
TODO: move part of this to domains
TODO: This should check for an associated source | (ns jiksnu.modules.core.model.user
(:require [ciste.config :refer [config]]
[clj-gravatar.core :refer [gravatar-image]]
[clojure.string :as string]
[taoensso.timbre :as timbre]
[jiksnu.modules.core.db :as db]
[jiksnu.modules.core.model :as model]
... |
9c5be337750c5430f521c5e5e3ed8595410e74014bac4d7e1994b95381858e88 | openmusic-project/openmusic | rulers.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/3f951e70cd8505b85ae1479fdd2a8d47c102f08c/OPENMUSIC/code/kernel/graphics/rulers.lisp | lisp | =========================================================================
(at your option) any later version.
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 details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
4cc15a22b7a947ba9794fdeb509fbc40879de7020a1b8e3e28d4486c4d5f9f3e | outergod/cl-m4 | regex.lisp | ;;;; cl-m4 - regex.lisp
Copyright ( C ) 2010 < >
This file is part of cl - m4 .
;;;; cl-m4 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 3 of the License , or
;;;; (at your option) a... | null | https://raw.githubusercontent.com/outergod/cl-m4/9f6518b5a173a1234ae39ef45758927d329ded4a/src/cffi-regex/regex.lisp | lisp | cl-m4 - regex.lisp
cl-m4 is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
cl-m4 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 PARTI... | Copyright ( C ) 2010 < >
This file is part of cl - m4 .
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :cffi-regex)
(define-condition regex-compilation-failure (error)
((message :initarg :message
... |
bbb34dd9dde7d2da4ebbd83438588d4b32fd4d25141280a1dde218f7f2d884fe | aweber/rabbitmq-autocluster | autocluster_log.erl | %%==============================================================================
@author < >
2015 - 2016 AWeber Communications
%% @end
%%==============================================================================
-module(autocluster_log).
%% API
-export([set_level/1,
debug/1, debug/2,
inf... | null | https://raw.githubusercontent.com/aweber/rabbitmq-autocluster/31119506acb88b10355f3ab5bcc5291bfcf2cfe0/src/autocluster_log.erl | erlang | ==============================================================================
@end
==============================================================================
API
Export all for unit tests
--------------------------------------------------------------------
@doc
Log a debug message
@end
----------------------... | @author < >
2015 - 2016 AWeber Communications
-module(autocluster_log).
-export([set_level/1,
debug/1, debug/2,
info/1, info/2,
error/1, error/2,
warning/1, warning/2]).
-ifdef(TEST).
-compile(export_all).
-endif.
-spec debug(Message :: string()) -> ok.
debug(Message)
... |
627b00bb0415f67d478d8755bc527fcaddf3f987c0407a6596d6868f3653a4b4 | reactive-systems/syfco | Unbeast.hs | -----------------------------------------------------------------------------
-- |
-- Module : Writer.Formats.Unbeast
License : MIT ( see the LICENSE file )
Maintainer : ( )
--
Transforms a specification to the Unbeast format .
--
---------------------------------------------------------------... | null | https://raw.githubusercontent.com/reactive-systems/syfco/0f0f6a6fff7960d8a0cbb120587984183fa7fc0e/src/lib/Writer/Formats/Unbeast.hs | haskell | ---------------------------------------------------------------------------
|
Module : Writer.Formats.Unbeast
---------------------------------------------------------------------------
---------------------------------------------------------------------------
------------------------------------------------... | License : MIT ( see the LICENSE file )
Maintainer : ( )
Transforms a specification to the Unbeast format .
module Writer.Formats.Unbeast where
import Config
import Simplify
import Data.LTL
import Data.Error
import Data.Specification
import Writer.Eval
import Control.Exception
writeFormat
:... |
bda5b37f3554289a6fff573fe39875abc16bd49a3617ccd0e8598c585408bbaf | JHU-PL-Lab/jaylang | checker.ml | open Core
open Dj_common
open Riddler
open SuduZ3
open Log.Export
let eager_check (state : Global_state.t) (config : Global_config.t) target
assumption =
let _ = (state, config) in
let unfinish_lookup =
Hash_set.to_list state.lookup_created
(* |> List.map ~f:(fun key ->
if not (Lookup_key.eq... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/dbmc/checker.ml | ocaml | |> List.map ~f:(fun key ->
if not (Lookup_key.equal key target)
then Solver.SuduZ3.not_ (Riddler.picked key)
else Riddler.picked key)
state.tree_size <- state.tree_size + 1 ;
eager_check state config target assumption
state.tree_size <- state.tree_size + 1 ; | open Core
open Dj_common
open Riddler
open SuduZ3
open Log.Export
let eager_check (state : Global_state.t) (config : Global_config.t) target
assumption =
let _ = (state, config) in
let unfinish_lookup =
Hash_set.to_list state.lookup_created
|> List.map ~f:(fun key -> picked key @=> picked target)
in
... |
ade5a4d0683aab996dba64c060d0da29f5913decec2751e38b388ecf2da90e5e | nuprl/gradual-typing-performance | main.rkt | #lang typed/racket/base
the main entry point for an OO implementation of " 6 Nimmt ! " ( Take 5 )
(provide
main)
(require
require-typed-check
typed/racket/class
"player-types.rkt"
"dealer-types.rkt"
)
(require/typed/check "player.rkt"
(create-player (-> Natural Player)))
(require/typed/check "dealer.r... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/jfp-2016/src/worst-configurations-6.4/take5/11101111/main.rkt | racket | ============================================================================= | #lang typed/racket/base
the main entry point for an OO implementation of " 6 Nimmt ! " ( Take 5 )
(provide
main)
(require
require-typed-check
typed/racket/class
"player-types.rkt"
"dealer-types.rkt"
)
(require/typed/check "player.rkt"
(create-player (-> Natural Player)))
(require/typed/check "dealer.r... |
6ec49b914c303027ffa381dfda2b85f22c1841803861b21aef5fbc520eda37b0 | hhucn/decide3 | mock_data.clj | (ns mock-data
(:require
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[datahike.api :as d]
[decide.models.opinion :as opinion]
[decide.models.process :as process]
[decide.models.proposal :as proposal]
[decide.models.user :as user]))
(defn gen-user []
(gen/generate (s/gen (s/keys... | null | https://raw.githubusercontent.com/hhucn/decide3/d66b11b6ea315764390e2000b8d76d4aa305bffe/src/dev/mock_data.clj | clojure | (ns mock-data
(:require
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[datahike.api :as d]
[decide.models.opinion :as opinion]
[decide.models.process :as process]
[decide.models.proposal :as proposal]
[decide.models.user :as user]))
(defn gen-user []
(gen/generate (s/gen (s/keys... | |
826d8b7df33409f606994bb213c549a8153ad48fb199b5af9329e0eb54dfba09 | robdockins/edison | UnbalancedSet.hs | -- |
Module : Data . Edison . .
Copyright : Copyright ( c ) 1998 - 1999 , 2008
License : MIT ; see COPYRIGHT file for terms and conditions
--
Maintainer : robdockins AT fastmail DOT fm
-- Stability : stable
Portability : GHC , Hugs ( MPTC and FD )
--
-- Sets impl... | null | https://raw.githubusercontent.com/robdockins/edison/543a9085384ac2f4effbfc3266cca5f2d3b08e1b/edison-core/src/Data/Edison/Coll/UnbalancedSet.hs | haskell | |
Stability : stable
Sets implemented as unbalanced binary search trees.
* Set type
* Coll operations
* OrdCollX operations
* SetX operations
* Set operations
* Documentation
signatures for exported functions
invariants:
* Binary Search Tree order
the remaining functions all use default definiti... | Module : Data . Edison . .
Copyright : Copyright ( c ) 1998 - 1999 , 2008
License : MIT ; see COPYRIGHT file for terms and conditions
Maintainer : robdockins AT fastmail DOT fm
Portability : GHC , Hugs ( MPTC and FD )
module Data.Edison.Coll.UnbalancedSet (
instance ... |
f304e5f30e1632cfcedd685e4b125b5506d41b55daaaedfd46e407615d734eb4 | AccelerateHS/accelerate-llvm | Fold.hs | # LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
-- |
Module : Data . Array . Accelerate . LLVM.Native . CodeGen . Fold
Copyright : [ 2014 .. 20... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/57136bfc67f0da8ea0a0aba0172397a2e92d3378/accelerate-llvm-native/src/Data/Array/Accelerate/LLVM/Native/CodeGen/Fold.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
|
License : BSD3
Stability : experimental
Reduce an array along the innermost dimension. The reduction
function must be associative to allow for an efficient parallel
implementation. When an initial value is... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Module : Data . Array . Accelerate . LLVM.Native . CodeGen . Fold
Copyright : [ 2014 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Arr... |
c55c1924c40067fa43c3b7ce5b6fcdaeb22d648a12017dab1dbd678540ef8682 | jwiegley/notes | Liquid.hs | module Liquid where
import Data.List
{-@ inline isNat @-}
isNat :: Int -> Bool
isNat n = n >= 0
@ type = { n : Int | isNat n } @
@ constant : : @
constant :: Int
constant = 20
@ double : : @
double :: Int -> Int
double n = n * 2
{-@ foo :: { n : Int | isNat n } -> { n : Int | isNat n } @-}
foo :: Int -> Int... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f7a4d8fe64a8705e6261/Liquid.hs | haskell | @ inline isNat @
@ foo :: { n : Int | isNat n } -> { n : Int | isNat n } @
@ measure size @
BUG?
@ type Implies P Q = {v:_ | Prop v <=> (Prop P => Prop Q)} @
@ implies :: p:Bool -> q:Bool -> Implies p q @
BUG?
@ plusComm :: _ -> _ -> True @
@ assume concatMap :: _ -> xs:[a] -> { ys:[b] | size xs == size ys } @
@ fo... | module Liquid where
import Data.List
isNat :: Int -> Bool
isNat n = n >= 0
@ type = { n : Int | isNat n } @
@ constant : : @
constant :: Int
constant = 20
@ double : : @
double :: Int -> Int
double n = n * 2
foo :: Int -> Int
foo n = double constant + double n
what if we change constant to just be < 200 ... |
21032fe0dacb0d8093994ce8d3f91deb91b5c531248b6a791f4b4ca3a51728ee | sim642/odep | option_syntax.ml | let (>>=) = Option.bind
let (let*) = Option.bind
let (let+) x f = Option.map f x
| null | https://raw.githubusercontent.com/sim642/odep/80061b4ca1f734b963bb0cee768dff933ea5218a/src/std/option_syntax.ml | ocaml | let (>>=) = Option.bind
let (let*) = Option.bind
let (let+) x f = Option.map f x
| |
f4b0303474ccc5e3db1693a474eafbfc44abcdc2a7bdcdb2e4d4aeeaa8868462 | ocaml/ocamlbuild | vivi3.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/test/test2/vivi3.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 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
let rec p i = [< '1; '2; p (i + 1) >]
let vivi = [|2.1... |
e3a89ae223533295576f1085342bb9549915134df5c7a8336ba0f8b5e95cc49e | ndaniels/MRFy | GeneticAlgorithm.hs | # OPTIONS_GHC -Wall -fno - warn - name - shadowing #
module SearchStrategies.GeneticAlgorithm where
import Control.Applicative
import Control.Monad.LazyRandom
import Data.List
import qualified Data.Vector.Unboxed as V
import Beta
import MRFTypes
import ParRandom
import Score
import SearchStrategy
import SearchStrate... | null | https://raw.githubusercontent.com/ndaniels/MRFy/9b522d991a9bf98a6690f791dc92ad6fe675115c/SearchStrategies/GeneticAlgorithm.hs | haskell | precondition: length ps == length qs | # OPTIONS_GHC -Wall -fno - warn - name - shadowing #
module SearchStrategies.GeneticAlgorithm where
import Control.Applicative
import Control.Monad.LazyRandom
import Data.List
import qualified Data.Vector.Unboxed as V
import Beta
import MRFTypes
import ParRandom
import Score
import SearchStrategy
import SearchStrate... |
84641d65f1e158e897e2533a3d565a9f3eb0f8408f429642bcc32684f3a4c32d | gelisam/frp-zoo | Main.hs | module Main where
import Data.IORef
import Graphics.Gloss.Interface.IO.Game
import Buttons
import CallbackSystem
import GlossInterface
main :: IO ()
main = do
-- Mutable count
count0 <- newIORef 0
count5 <- newIORef 0
count10 <- newIORef 0
mode0 <- newIORef True
mode5 <- n... | null | https://raw.githubusercontent.com/gelisam/frp-zoo/1a1704e4294b17a1c6e4b417a73e61216bad2321/callback-example/Main.hs | haskell | Mutable count
Places where callbacks can be registered
Delegate to a helper function, to help with scoping
Initial callback network
Gloss event loop
Input
Behaviour
Output | module Main where
import Data.IORef
import Graphics.Gloss.Interface.IO.Game
import Buttons
import CallbackSystem
import GlossInterface
main :: IO ()
main = do
count0 <- newIORef 0
count5 <- newIORef 0
count10 <- newIORef 0
mode0 <- newIORef True
mode5 <- newIORef True
mode... |
2b0839170a1cb539df99fdd6c387af408a442f6555a08dd27de0750b6000fe89 | pasberth/binal1 | CLI.hs | module Language.Binal.CLI where
import Language.Binal.Types
import qualified Language.Binal.Util as Util
import qualified Language.Binal.PrettyPrint as PP
import qualified Language.Binal.Verifier as V
checkAST :: AST -> IO (Maybe TypedAST)
checkAST ast = do
case V.examineForms ast of
[] -> do
ca... | null | https://raw.githubusercontent.com/pasberth/binal1/4dca66a337082e3ceec110fe57abb97981b6a2c1/Language/Binal/CLI.hs | haskell | module Language.Binal.CLI where
import Language.Binal.Types
import qualified Language.Binal.Util as Util
import qualified Language.Binal.PrettyPrint as PP
import qualified Language.Binal.Verifier as V
checkAST :: AST -> IO (Maybe TypedAST)
checkAST ast = do
case V.examineForms ast of
[] -> do
ca... | |
664197f5de620177f6663c0dbde807ef30123e44dea1fcc502c61193c3695463 | benzap/eden | exceptions.cljc | (ns eden.std.exceptions
(:require
[clojure.pprint :refer [pprint]]))
(def ^:dynamic *file-path* nil)
(def ^:dynamic *verbose* false)
(defn generate-window
"TODO: write this function, with bigger window."
[{:keys [tokens index] :as astm}]
(let []))
(defn generate-parser-data
[{:keys [tokens index] :as ... | null | https://raw.githubusercontent.com/benzap/eden/dbfa63dc18dbc5ef18a9b2b16dbb7af0e633f6d0/src/eden/std/exceptions.cljc | clojure | (ns eden.std.exceptions
(:require
[clojure.pprint :refer [pprint]]))
(def ^:dynamic *file-path* nil)
(def ^:dynamic *verbose* false)
(defn generate-window
"TODO: write this function, with bigger window."
[{:keys [tokens index] :as astm}]
(let []))
(defn generate-parser-data
[{:keys [tokens index] :as ... | |
4e389b0660807a6cebcc83256714f24f467274256453a9156242971e8e22b786 | Gbury/archsat | closure.mli | This file is free software , part of Archsat . See file " LICENSE " for more details .
(** Equality closure using an union-find structure.
This module implements a equality closure algorithm using an union-find structure.
It supports adding of equality as well as inequalities, and raises exceptions
when ... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/algos/closure.mli | ocaml | * Equality closure using an union-find structure.
This module implements a equality closure algorithm using an union-find structure.
It supports adding of equality as well as inequalities, and raises exceptions
when trying to build an incoherent closure.
Please note that this does not implement congruen... | This file is free software , part of Archsat . See file " LICENSE " for more details .
module type Key = sig
type t
val hash : t -> int
val equal : t -> t -> bool
val compare : t -> t -> int
val print : Format.formatter -> t -> unit
end
module type S = sig
* { 3 Type definitions }
type var... |
f16b2a15f8fca21bdf1463f14e82b9bf26ce2475f8f64b601b7c1c59b3ef8302 | tonyvanriet/clj-slack-client | im.clj | (ns clj-slack-client.im
(:require [clj-slack-client.web :as web])
(:refer-clojure :exclude [list]))
(def api-module "im")
(defn- call
([method-name token channel]
(web/call-and-get-response (str api-module "." method-name)
{:token token :channel channel}))
([method-name token ... | null | https://raw.githubusercontent.com/tonyvanriet/clj-slack-client/6783f003ab93adae057890421622eb5e61ab033d/src/clj_slack_client/im.clj | clojure | (ns clj-slack-client.im
(:require [clj-slack-client.web :as web])
(:refer-clojure :exclude [list]))
(def api-module "im")
(defn- call
([method-name token channel]
(web/call-and-get-response (str api-module "." method-name)
{:token token :channel channel}))
([method-name token ... | |
4fa2ac39cd4927c4d80a6fb56d25f8ad39c576d09d582b5764ff322a6602de47 | 8treenet/xy_server | samurai_data.erl | %%% @Module :samurai_data
@Author : ys
@Email :
@Created : 2013.06.24
%%% @Description: 获取战士基础属性
%%%--------------------------------------
-module(samurai_data).
%% ====================================================================
%% API functions
%% ===================================================... | null | https://raw.githubusercontent.com/8treenet/xy_server/352679e01eb4a26433ccbec513fbd282307a33bd/src/data/samurai_data.erl | erlang | @Module :samurai_data
@Description: 获取战士基础属性
--------------------------------------
====================================================================
API functions
====================================================================
参数=等级 | @Author : ys
@Email :
@Created : 2013.06.24
-module(samurai_data).
-export([get_attribute/1]).
返回 , 最大攻击 , 最小魔法攻击 , 最大魔法攻击 , 防御 , 魔法防御 , 命中 , 躲闪 , 暴击 , 连击 , 攻击速度 , 血槽 , 魔槽
get_attribute(1)->
[10,20,1,5,30,30,30,30,30,30,30,500,500]. |
8838c563fc5110a9e9bb4c9409700d3937c0756f368962d895a36b29fb931abf | abooij/haskell-xkbcommon | KeysymList.hs | # LANGUAGE TemplateHaskell #
module Text.XkbCommon.KeysymList where
import Language.Haskell.TH
import Text.XkbCommon.ParseDefines
import Text.XkbCommon.InternalTypes
TH magic from ParseDefines :
$(runIO genKeysyms >>= return)
| null | https://raw.githubusercontent.com/abooij/haskell-xkbcommon/a337b4f699fef2621ae028eec9171fcd9ea848c5/Text/XkbCommon/KeysymList.hs | haskell | # LANGUAGE TemplateHaskell #
module Text.XkbCommon.KeysymList where
import Language.Haskell.TH
import Text.XkbCommon.ParseDefines
import Text.XkbCommon.InternalTypes
TH magic from ParseDefines :
$(runIO genKeysyms >>= return)
| |
07529dec302eeb1c4f06fc1e0f6eafdb3bbaf88af5a26be9128b543619a4a9ed | apibot-org/apibot | users.clj | (ns apibot.routes.users
(:require
[apibot.config :as config]
[apibot.db.core :as db]
[apibot.db.users :as db.users]
[clojure.string :refer [split]]
[clojure.tools.logging :as log]
[compojure.api.sweet :refer :all]
[ring.util.http-response :as response :refer :all]
[apibot.schemas :refe... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/clj/apibot/routes/users.clj | clojure | (ns apibot.routes.users
(:require
[apibot.config :as config]
[apibot.db.core :as db]
[apibot.db.users :as db.users]
[clojure.string :refer [split]]
[clojure.tools.logging :as log]
[compojure.api.sweet :refer :all]
[ring.util.http-response :as response :refer :all]
[apibot.schemas :refe... | |
98fa8c97b9da2570e777efe20e16848bf271039c6252caedc26b193cd5577d0f | untangled-web/untangled-ui | Forms__02_State_Lifecycle.cljs | (ns untangled.ui.Forms--02-State-Lifecycle
(:require
[clojure.string :as str]
[com.stuartsierra.component :as component]
[untangled.client.cards :refer [untangled-app]]
[devcards.core :as dc :refer-macros [defcard defcard-doc]]
[om.dom :as dom]
[om.next :as om :refer [defui]]
[untangled.cl... | null | https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/guide/untangled/ui/Forms__02_State_Lifecycle.cljs | clojure | NOTE: non-recursive validation. You'd have to use this explicitly on each declared subform state as well.
only emits if the field is actually marked :invalid (not :unchecked)
Disables submit button unless all fields are marked `:valid` (none are :unchecked or :invalid) | (ns untangled.ui.Forms--02-State-Lifecycle
(:require
[clojure.string :as str]
[com.stuartsierra.component :as component]
[untangled.client.cards :refer [untangled-app]]
[devcards.core :as dc :refer-macros [defcard defcard-doc]]
[om.dom :as dom]
[om.next :as om :refer [defui]]
[untangled.cl... |
df5e5994d6ca81dac77a8b88fc587fb15faf19cac440b6378da44decbe3bcc79 | acl2/acl2 | base-arithmetic@useless-runes.lsp | (ACL2S::ACL2S-DEFAULT-MOD-RATIO
(775 775 (:TYPE-PRESCRIPTION NOT-INTEGERP-3B))
(775 775 (:TYPE-PRESCRIPTION NOT-INTEGERP-2B))
(775 775 (:TYPE-PRESCRIPTION NOT-INTEGERP-1B))
(577 67 (:REWRITE RATIONALP-X))
(540 108 (:TYPE-PRESCRIPTION MOD-ZERO . 2))
(448 108 (:TYPE-PRESCRIPTION MOD-ZERO . 1))
(304 8 (:LINEAR MOD-... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/acl2s/.sys/base-arithmetic%40useless-runes.lsp | lisp | (ACL2S::ACL2S-DEFAULT-MOD-RATIO
(775 775 (:TYPE-PRESCRIPTION NOT-INTEGERP-3B))
(775 775 (:TYPE-PRESCRIPTION NOT-INTEGERP-2B))
(775 775 (:TYPE-PRESCRIPTION NOT-INTEGERP-1B))
(577 67 (:REWRITE RATIONALP-X))
(540 108 (:TYPE-PRESCRIPTION MOD-ZERO . 2))
(448 108 (:TYPE-PRESCRIPTION MOD-ZERO . 1))
(304 8 (:LINEAR MOD-... | |
1444ecba70c75ea2d5a71ffb421839c3b5ce11ec3b3ad3c56f2d8c74af9b8c4a | snoyberg/mono-traversable | sorting.hs | # LANGUAGE CPP #
#if MIN_VERSION_gauge(0,2,0)
import Gauge
#else
import Gauge.Main
#endif
import Data.Sequences
import Data.MonoTraversable
import qualified Data.List
import qualified System.Random.MWC as MWC
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
asVector :: V.Vector a -> V.Vect... | null | https://raw.githubusercontent.com/snoyberg/mono-traversable/7f763974fd312c75b74374bed889a0ee07b21428/mono-traversable/bench/sorting.hs | haskell | # LANGUAGE CPP #
#if MIN_VERSION_gauge(0,2,0)
import Gauge
#else
import Gauge.Main
#endif
import Data.Sequences
import Data.MonoTraversable
import qualified Data.List
import qualified System.Random.MWC as MWC
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
asVector :: V.Vector a -> V.Vect... | |
464349235f83e4b2b20183776a38e503764028f3fe12280e797bfbbdd843e88d | SKA-ScienceDataProcessor/RC | Message.hs | # LANGUAGE TemplateHaskell , DeriveDataTypeable , DeriveGeneric #
# OPTIONS_GHC -Wall #
module DNA.Message (sayDebug, dnaSlaveHandleStart, dnaMasterStartSlave, DnaStart, DnaStarted, DnaFinished(DnaFinished), DnaPidList(DnaPidList)) where
import Text.Printf
import Control . Distributed . Process . Debug
import Control.... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/ddp-erlang-style/DNA/Message.hs | haskell | liftIO $ putStrLn $ " unable to resolve logger for " + + show msg
liftIO $ putStrLn $ "unable to resolve logger for "++show msg
in: name slavePid out: masterPid
send masterPid (DnaStarted slavePid)
in: name masterPid nodeId out: slavePid
(DnaStarted slavePid) <- expect | # LANGUAGE TemplateHaskell , DeriveDataTypeable , DeriveGeneric #
# OPTIONS_GHC -Wall #
module DNA.Message (sayDebug, dnaSlaveHandleStart, dnaMasterStartSlave, DnaStart, DnaStarted, DnaFinished(DnaFinished), DnaPidList(DnaPidList)) where
import Text.Printf
import Control . Distributed . Process . Debug
import Control.... |
73a9bf24a4dde8b6c96a34a871a4a5d52c2f0b5e363c9f8da8db628dfa8430ba | Gabriella439/suns-search | AtomName.hs | Copyright 2013
This file is part of the Suns Search Engine
The Suns Search Engine 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
opt... | null | https://raw.githubusercontent.com/Gabriella439/suns-search/59c4cbf109c8d93b3170c3da529121f2b589900c/src/AtomName.hs | haskell | * Type
* Conversion routines
| Encode a 'B.ByteString' to an 'AtomName', returning 'Nothing' if encoding
failed
| Decode an 'B.ByteString' from an 'AtomName' | Copyright 2013
This file is part of the Suns Search Engine
The Suns Search Engine 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
opt... |
70d6e2c505f099ce18b2377468e774691d222a24c785ce32567657342d5c344f | f-me/carma-public | Patch.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Data.Model.Patch
( Patch(Patch), untypedPatch
, parentField
, toParentIdent
, toParentPatch
, mergeParentPatch
, IPatch
, FullPatch, Data.Model.Patch.Object
, get, get', put, delete, union, differenceFrom, singleton
, emp... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Data/Model/Patch.hs | haskell | | A version of 'Patch' guaranteed to have all fields.
| Add a field to a patch.
| Delete a field from a patch.
| Type-safe total version of 'get'.
Filter intersection, leaving only fields with changed JSON
values
skip ephemeral field
skip unknown fields to allow upcasting child models
| Special instance which ... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Data.Model.Patch
( Patch(Patch), untypedPatch
, parentField
, toParentIdent
, toParentPatch
, mergeParentPatch
, IPatch
, FullPatch, Data.Model.Patch.Object
, get, get', put, delete, union, differenceFrom, singleton
, emp... |
34e6b568d52a413fe9f20b9f9f54b5b6e3ebfefdfde1075595c358a8a7895264 | uw-unsat/serval | mblock.rkt | #lang rosette
(require "../debug.rkt" "../bvarith.rkt" "manager.rkt")
(provide (all-defined-out))
Mblocks are low - level primitives for building typed memory models .
; They do not specify how separate are laid out in memory.
;
; An block is either an array, a struct, or a cell.
; Recursively, an array is a list ... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/lib/memory/mblock.rkt | racket | They do not specify how separate are laid out in memory.
An block is either an array, a struct, or a cell.
Recursively, an array is a list of blocks
of the same types; a struct is a list of named fields, where each
field may further refer to a block. A cell is a leaf node: it is
represented using an uninterpret... | #lang rosette
(require "../debug.rkt" "../bvarith.rkt" "manager.rkt")
(provide (all-defined-out))
Mblocks are low - level primitives for building typed memory models .
To read and write with an offset into a block , one first invokes
mblock - iload and ! uses a path to access the leaf cell .
(define enable... |
80fac6eced02328f51bdf31ce2d18ebfd054b16c5b4bc4cfe9997c9d92327018 | OCamlPro/freeton_wallet | commandTokenList.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/b97877379e51d96cb3544141d386d502348cfca9/src/freeton_wallet_lib/commandTokenList.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ez_file.V1
open EzFile.OP
open Ezcmd.V2
open EZCMD.TYPES
open Types
module Int64 = struct
include Int64
let of_string s = try
of_string s
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.