_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 |
|---|---|---|---|---|---|---|---|---|
da230af67506d2d3d42916800a23b541a2b78354593debcde91a3d202d8de81a | manuel-serrano/hop | notepad.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / widget / notepad.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/widget/notepad.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The HOP implementation of notepads. */
*===========================... | * serrano / prgm / project / hop / hop / widget / notepad.scm * /
* Author : * /
* Creation : Thu Aug 18 10:01:02 2005 * /
* Last change : Tue May 7 12:03:13 2019 ( serrano ) * /
* Cop... |
d8163e6f69b18368c1d46d0e3146868deb46e7236b2b658ff3abbbf202286ae2 | WhatsApp/eqwalizer | behave.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(behave).
-callback foo() -> behave1:test().
-type invalid() :: _T.
-callback use_invalid() -... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/9935940d71ef65c7bf7a9dfad77d89c0006c288e/eqwalizer/test_projects/check/src/behave.erl | erlang |
the LICENSE file in the root directory of this source tree. | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(behave).
-callback foo() -> behave1:test().
-type invalid() :: _T.
-callback use_invalid() -> invalid().
-callback use_invalid2() -> invalid().
|
2cd9be98142ddd043665eb6e3d92ae82f19c924f296fc276f1646f621bd7c60a | AshleyYakeley/Truth | Main.hs | module Main
( main
) where
import Changes.Core
import Changes.World.File
import Changes.World.GNOME.GTK
import qualified Options.Applicative as O
import Shapes
import System.FilePath
textCodec :: ReasonCodec LazyByteString Text
textCodec = hoistCodec (mapResultFailure $ pack . show) utf8Codec . bijectionCodec... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/2817d5e36bd1dc5de932d808026098b6c35e7185/Changes/changes-gnome/examples/text/Main.hs | haskell | module Main
( main
) where
import Changes.Core
import Changes.World.File
import Changes.World.GNOME.GTK
import qualified Options.Applicative as O
import Shapes
import System.FilePath
textCodec :: ReasonCodec LazyByteString Text
textCodec = hoistCodec (mapResultFailure $ pack . show) utf8Codec . bijectionCodec... | |
33747123ff16b28873c477913c415e524aa8d875cb88cf7bed22de00cfd7fea6 | antoniogarrote/clj-control | utils.clj | (ns clj-control.test.utils
(:use [clj-control.utils]
[clojure.test]))
(deftest should-apply-the-function-after-partial-application-of-n-args
(let [fx (curry 3 +)
fx1 (apply fx [1])
fx2 (apply fx1 [2])
v (apply fx2 [3])]
(is (= 6 v))
(is (fn? fx))
(is (fn? fx1))
(is (... | null | https://raw.githubusercontent.com/antoniogarrote/clj-control/175ab9f3d0157355b082b3f68472b507261eb941/test/clj_control/test/utils.clj | clojure | (ns clj-control.test.utils
(:use [clj-control.utils]
[clojure.test]))
(deftest should-apply-the-function-after-partial-application-of-n-args
(let [fx (curry 3 +)
fx1 (apply fx [1])
fx2 (apply fx1 [2])
v (apply fx2 [3])]
(is (= 6 v))
(is (fn? fx))
(is (fn? fx1))
(is (... | |
cdf06191691e329495134d51b697ff6e8a1e15dd42bf86a21df192e8d05f831e | aryx/xix | hellogui.ml | open Common
let main () =
let display = Draw.init "Hello GUI" in
raise Todo
let _ = main ()
| null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_gui/tests/hellogui.ml | ocaml | open Common
let main () =
let display = Draw.init "Hello GUI" in
raise Todo
let _ = main ()
| |
a70796e136df325dc3d3347a8c2427979aec06ae49ed43273c2011e149c4892e | sjl/cl-digraph | make-quickutils.lisp | (ql:quickload 'quickutil)
(qtlc:save-utils-as
"quickutils.lisp"
:utilities '(
:appendf
:compose
:curry
:dohash
:ensure-boolean
:ensure-gethash
:ensure-list
:hash-table-keys
:mapha... | null | https://raw.githubusercontent.com/sjl/cl-digraph/380177f204bb531c13052502b2b453cb1a1fc60a/vendor/make-quickutils.lisp | lisp | (ql:quickload 'quickutil)
(qtlc:save-utils-as
"quickutils.lisp"
:utilities '(
:appendf
:compose
:curry
:dohash
:ensure-boolean
:ensure-gethash
:ensure-list
:hash-table-keys
:mapha... | |
626a8783a3d3eb8fa600cc99d90a6dbd3fd4f6c5536f4df68f9485c6ee880329 | rizo/streaming-zoo | sequence.ml |
Original
module A = struct
type 'a t = ('a -> unit) -> unit
let count n k =
let count = ref 0 in
while true do
k !count;
incr count
done
let rec init n f k =
let i = ref 0 in
while !i < n do
k (f !i);
incr i
done
let map f seq k =
seq (fun x -> k (f ... | null | https://raw.githubusercontent.com/rizo/streaming-zoo/bf586c8b986a41353f5e3963de01047b83e7649a/src/sequence.ml | ocaml | Safe
Fast
Fast state |
Original
module A = struct
type 'a t = ('a -> unit) -> unit
let count n k =
let count = ref 0 in
while true do
k !count;
incr count
done
let rec init n f k =
let i = ref 0 in
while !i < n do
k (f !i);
incr i
done
let map f seq k =
seq (fun x -> k (f ... |
969e8565facc9c08292fdb5df1787f65ce0dda01518c57e4f015649758b21fda | GaloisInc/saw-script | Name.hs | |
Module : Verifier . SAW.Name
Copyright : Galois , Inc. 2012 - 2015
License : :
Stability : experimental
Portability : non - portable ( language extensions )
Various kinds of names .
Module : Verifier.SAW.Name
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintain... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/0312fd3d5c9ea721a374463150e47caa1e3524e3/saw-core/src/Verifier/SAW/Name.hs | haskell | # LANGUAGE DeriveLift #
# LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
* Module names
* Identifiers
* ExtCns
* Naming Environments
for instance TH.Lift Text
Module Names ----------------------------------------------------------------
automatically derived
| Create a module name given a list of s... | |
Module : Verifier . SAW.Name
Copyright : Galois , Inc. 2012 - 2015
License : :
Stability : experimental
Portability : non - portable ( language extensions )
Various kinds of names .
Module : Verifier.SAW.Name
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintain... |
8dbc3a76e39b41beb2512eec47b3ab2e9d860d2687cb2bcb77c22777ab737958 | realworldocaml/book | parametric.ml | (******************************************************************************)
(* *)
(* First we duplicate some of the examples from test.mlt, but changing their *)
(* use of fresh abstract types for type parameters. ... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_stable/tests/parametric.ml | ocaml | ****************************************************************************
First we duplicate some of the examples from test.mlt, but changing their
use of fresh abstract types for type parameters.
... |
module Basic_record = struct
module V1 = struct
type ('a, 'b, 'c, 'd) t =
{ a : 'a
; b1 : 'b
; c : 'c
; d : 'd
}
end
module V2 = struct
type ('a, 'b, 'c, 'd) t =
{ a : 'a
; b2 : 'b
; c : 'c
; d : 'd * 'a
}
[@@deriving
stable_record
... |
4c158f2579f9bc12155310da77f1776d16f820a985e4af89024766e7ed9d2b81 | facebook/flow | trace.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/typing/trace.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
e94aee940a165daabd0737cb54fa1a53ed216a3b221210c6fcff2884a3231090 | david-broman/modelyze | utils.ml |
module IntSet = Set.Make(
struct
let compare = Stdlib.compare
type t = int
end)
type intset = IntSet.t
(* Returns the last element *)
let rec last xs =
match xs with
| [] -> raise (Invalid_argument "Utils.last")
| [x] -> x
| _::xs -> last xs
let findindex x l =
let rec findidx l c =
... | null | https://raw.githubusercontent.com/david-broman/modelyze/e48c934283e683e268a9dfd0fed49d3c10277298/ext/ucamlib/src/utils.ml | ocaml | Returns the last element |
module IntSet = Set.Make(
struct
let compare = Stdlib.compare
type t = int
end)
type intset = IntSet.t
let rec last xs =
match xs with
| [] -> raise (Invalid_argument "Utils.last")
| [x] -> x
| _::xs -> last xs
let findindex x l =
let rec findidx l c =
match l with
| [] -> r... |
7378930f595cf193285d50cded42275a4082180b92263b1f72203e6563822147 | FreeAndFair/STAR-Vote | BallotStyle.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
|
Module : Application . Star . BallotStyle
Description : Type for ballot templates
The ` BallotStyle ` type represents a ballot that is waiting to be filled out .
It consists of an identifier and... | null | https://raw.githubusercontent.com/FreeAndFair/STAR-Vote/2555cbae8794ec6f34889fdabac314ff9f22b437/star-types/src/Application/Star/BallotStyle.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
| Given a ballot style and a race,
returns the next race defined by the ballot style.
| Given a ballot style and a race,
returns the previous race defined by the ballot style.
| Produces a key suitable for uniquely iden... |
|
Module : Application . Star . BallotStyle
Description : Type for ballot templates
The ` BallotStyle ` type represents a ballot that is waiting to be filled out .
It consists of an identifier and a list of races ,
where each race includes a list of candidates .
Module : Application.Star.Ballot... |
83bccbac66ab54a8338d85bce7b6f925af0aa3e7ab3070de35b1227eaa553129 | andreas/ocaml-graphql-server | error_test.ml | open Graphql
open Test_common
let suite =
[
( "nullable error",
`Quick,
fun () ->
let schema =
Schema.(
schema
[
io_field "nullable" ~typ:int
~args:Arg.[]
~resolve:(fun _ () -> Error "boom");
... | null | https://raw.githubusercontent.com/andreas/ocaml-graphql-server/d615cbb164d4ddfdc2efeb246a198dfe114adf24/graphql/test/error_test.ml | ocaml | open Graphql
open Test_common
let suite =
[
( "nullable error",
`Quick,
fun () ->
let schema =
Schema.(
schema
[
io_field "nullable" ~typ:int
~args:Arg.[]
~resolve:(fun _ () -> Error "boom");
... | |
518c4d04a369ecd3b2b56aa14c86b96b9202a1aed8d45c12bfb16179d13cb33e | jellelicht/guix | lego.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/lego.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages lego)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix downloa... |
23af304c8f0e45c84f91239955ca37373c5bedf657eaa8555f78e0a0ba19858a | GaloisInc/what4 | Normalize.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUA... | null | https://raw.githubusercontent.com/GaloisInc/what4/17483418396afa8384de4089cdfaab9e5bbf912d/what4/src/What4/Serialize/Normalize.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE MultiWayIf #
| Normalization and equivalence checking for expressions
| Apply some normalizations to make function call arguments more readable. Examples include:
* Avoid wrapping single literals in a 'B.SemiRingLiteral' and just... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE ... |
f401e6406077706ba6305d1235ced501e75f1f2e8f03f7a23b0c9df47b68cd0d | dlowe-net/orcabot | credit.lisp | (in-package #:orcabot)
(defparameter +starting-balance+ 100)
(defclass transaction ()
((source :reader source-of :initarg :source)
(dest :reader dest-of :initarg :dest)
(amount :reader amount-of :initarg :amount)
(channel :reader channel-of :initarg :channel)
(source-status :accessor source-status-of :i... | null | https://raw.githubusercontent.com/dlowe-net/orcabot/bf3c799337531e6b16086e8105906cc9f8808313/src/credit.lisp | lisp | now delete the transactions just processed | (in-package #:orcabot)
(defparameter +starting-balance+ 100)
(defclass transaction ()
((source :reader source-of :initarg :source)
(dest :reader dest-of :initarg :dest)
(amount :reader amount-of :initarg :amount)
(channel :reader channel-of :initarg :channel)
(source-status :accessor source-status-of :i... |
ebee013116067007a77bd9780d687d4a55950f64eded3a0e8f8599cd94d4f105 | marcoheisig/numpy-file-format | python-parser.lisp | (in-package #:numpy-file-format)
;;; This parser is not very sophisticated, but it gets the job done.
(defun read-python-object (stream &optional (skip #\,) (stop nil))
(loop for c = (read-char stream) do
(case c
((#\space #\tab) (values))
((#\' #\") (return (read-python-string c stream)))
(#\... | null | https://raw.githubusercontent.com/marcoheisig/numpy-file-format/e97aef6c592a412fdd1afa9a5f09d0b1ce134510/code/python-parser.lisp | lisp | This parser is not very sophisticated, but it gets the job done. | (in-package #:numpy-file-format)
(defun read-python-object (stream &optional (skip #\,) (stop nil))
(loop for c = (read-char stream) do
(case c
((#\space #\tab) (values))
((#\' #\") (return (read-python-string c stream)))
(#\( (return (read-python-tuple stream)))
(#\[ (return (read-pytho... |
98ece82418130eca07afe1f30a8cc0fc06918197c613c91978b267a104a73c2b | fpco/ide-backend | Hpc.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Hpc
-- Copyright : Thomas Tuegel 2011
--
-- Maintainer :
-- Portability : portable
--
This module provides an library interface to the @hpc@ program .
module Distribution.Simple.Pro... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.14.0/Distribution/Simple/Program/Hpc.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Program.Hpc
Copyright : Thomas Tuegel 2011
Maintainer :
Portability : portable
^ Path to .tix file
^ Path where html output should be located
^ List of modules to exclude from report
^ Path... | This module provides an library interface to the @hpc@ program .
module Distribution.Simple.Program.Hpc
( markup
, union
) where
import Distribution.ModuleName ( ModuleName )
import Distribution.Simple.Program.Run
( ProgramInvocation, programInvocation, runProgramInvocation )
import Distributio... |
ecdf772c898926ebbe851fb91950dfebd2312a0e0629590b0bfbd72f4a68977e | szktty/esca | config.mli | val version : string
val debug_mode : bool ref
val verbose_mode : bool ref
val runlib_path : string ref
val runtime_package : string -> string
| null | https://raw.githubusercontent.com/szktty/esca/11be06b4a9810cdae4ccfd4ce7c5d85597bd1999/src/config.mli | ocaml | val version : string
val debug_mode : bool ref
val verbose_mode : bool ref
val runlib_path : string ref
val runtime_package : string -> string
| |
d289d3e48f48e8705eff2f3c4517e9be1c9a97dc5596e2ca0dbdc4acecf55dbd | ucsd-progsys/nate | ocaml_tools.mli | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/ocamlbuild/ocaml_tools.mli | 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 Q Public License version 1.0 .
$ I d : ocaml_tools.mli , v 1.2.4.3 2007/11/21 20:46... |
14570acd7146c76cbd0f088a412d8ba7bd77f605bdc1a7a1441b4931a0645021 | jhidding/lyonesse | ranges.scm | (library (lyonesse ranges)
(export range for-range map-range reduce-range)
(import (rnrs base (6))
(rnrs control (6)))
(define range
(case-lambda
[(b) (range 0 b 1)]
[(a b) (range a b 1)]
[(a b dx) (let loop ([lst '()]
[x a])
(i... | null | https://raw.githubusercontent.com/jhidding/lyonesse/9d9624e3141ea3acaa670526cbe52c2d6546beef/lyonesse/ranges.scm | scheme | (library (lyonesse ranges)
(export range for-range map-range reduce-range)
(import (rnrs base (6))
(rnrs control (6)))
(define range
(case-lambda
[(b) (range 0 b 1)]
[(a b) (range a b 1)]
[(a b dx) (let loop ([lst '()]
[x a])
(i... | |
d7cfa539ef2268916b41149302ac7944a7b665fec77387222fdaca60c33df5b2 | ghcjs/ghcjs-base | CaseMapping.hs | {-# LANGUAGE Rank2Types #-}
-- AUTOMATICALLY GENERATED - DO NOT EDIT
Generated by scripts / SpecialCasing.hs
-- CaseFolding-6.3.0.txt
Date : 2012 - 12 - 20 , 22:14:35 GMT [ MD ]
SpecialCasing-6.3.0.txt
Date : 2013 - 05 - 08 , GMT [ MD ]
module Data.JSString.Internal.Fusion.CaseMapping where
import Data.Char
i... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/Data/JSString/Internal/Fusion/CaseMapping.hs | haskell | # LANGUAGE Rank2Types #
AUTOMATICALLY GENERATED - DO NOT EDIT
CaseFolding-6.3.0.txt
LATIN SMALL LETTER SHARP S
LATIN SMALL LIGATURE FF
LATIN SMALL LIGATURE FI
LATIN SMALL LIGATURE FL
LATIN SMALL LIGATURE FFL
LATIN SMALL LIGATURE LONG S T
LATIN SMALL LIGATURE ST
ARMENIAN SMALL LIGATURE ECH YIWN
ARMENIAN SMALL... | Generated by scripts / SpecialCasing.hs
Date : 2012 - 12 - 20 , 22:14:35 GMT [ MD ]
SpecialCasing-6.3.0.txt
Date : 2013 - 05 - 08 , GMT [ MD ]
module Data.JSString.Internal.Fusion.CaseMapping where
import Data.Char
import Data.JSString.Internal.Fusion.Types
upperMapping :: forall s. Char -> s -> Step (CC s) ... |
7877225acab99a5664b030e0999ff75faeabc249bcebd4f0815de84aa90e8bf5 | ssardina/ergo | two-towers.scm | This is a program for the Two Towers problem
;; possible initial values for stack A
(define stackA-values '(() (red) (blue) (red red blue red)))
the BAT
(include "red-blue-bat.scm")
;; make a tower of reds on stack B and a tower of blues on stack C
(define (goal?)
(and (eq? hand 'empty) (null? (stack 'A))
... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Examples/PlanningExamples/two-towers.scm | scheme | possible initial values for stack A
make a tower of reds on stack B and a tower of blues on stack C | This is a program for the Two Towers problem
(define stackA-values '(() (red) (blue) (red red blue red)))
the BAT
(include "red-blue-bat.scm")
(define (goal?)
(and (eq? hand 'empty) (null? (stack 'A))
(for/and ((o (stack 'B))) (eq? o 'red))
(for/and ((o (stack 'C))) (eq? o 'blue))))
(define ... |
9aafae25d0cf4f745c0e04a251e332ac86bb3b78601328754fab844f48804ca4 | bvaugon/ocapic | flash.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/ocasim/flash.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Hexfile
type t = {
program : int array;
config : int array;
}
let parse hexfile =
let len = Array.length hexfile in
let dontknow s =
failwith ("Don't know what to do... |
f7a68a4e1ca40c855484827ffb486e95fd17421fbc1086fd67200bafa7b11624 | clojang/clojang | node.clj | (ns clojang.node
(:require [clojang.util :as util]
[clojure.core.memoize :as memo]
[jiface.otp.nodes :as nodes]
[jiface.util :as ji-util]
[potemkin :refer [import-vars]]
[trifl.net :as net])
(:refer-clojure :exclude [new]))
(defn new
"An alias for ``jif... | null | https://raw.githubusercontent.com/clojang/clojang/d248e22f3ba2488fd1f16f7bb99bdd63d324d3e6/src/clojure/clojang/node.clj | clojure |
Aliases ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
abstract-node-behaviour
get-name -- see above
local-node-behaviour
node-behaviour
get-names -- see above
ping -- see above
self-behaviour
connect -- see above | (ns clojang.node
(:require [clojang.util :as util]
[clojure.core.memoize :as memo]
[jiface.otp.nodes :as nodes]
[jiface.util :as ji-util]
[potemkin :refer [import-vars]]
[trifl.net :as net])
(:refer-clojure :exclude [new]))
(defn new
"An alias for ``jif... |
b5af3c91140bf59761f6d28832d98382b8f2b08ff34a62454fc589366de4c0cd | cljfx/cljfx | v_line_to.clj | (ns cljfx.fx.v-line-to
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.fx.path-element :as fx.path-element])
(:import [javafx.scene.shape VLineTo]))
(set! *warn-on-reflection* true)
(def props
(merge
fx.path-element/props
... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/v_line_to.clj | clojure | (ns cljfx.fx.v-line-to
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.fx.path-element :as fx.path-element])
(:import [javafx.scene.shape VLineTo]))
(set! *warn-on-reflection* true)
(def props
(merge
fx.path-element/props
... | |
fea91abecc317a3ea4f8e468519536bb3b4e506c5f36dfaea99c1175dbc07c92 | freizl/dive-into-haskell | labweekexercise-solns.hs | Informatics 1 - Functional Programming
Lab Week Exercise
--
-- Solutions
--
-- Remember: there are many possible solutions, and if your solution produces
-- the right results, then it is (most likely) correct. However, if your code
-- looks far more complicated than these sample solutions, then you're probably
-- m... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/lectures/informatics1-FP/tutorials/Labweek-solutions/labweekexercise-solns.hs | haskell |
Solutions
Remember: there are many possible solutions, and if your solution produces
the right results, then it is (most likely) correct. However, if your code
looks far more complicated than these sample solutions, then you're probably
making things too difficult for yourself---try to keep it simple! | Informatics 1 - Functional Programming
Lab Week Exercise
import Test.QuickCheck
Exercise 3 :
double :: Int -> Int
double x = x + x
square :: Int -> Int
square x = x * x
Exercise 4 :
isTriple :: Int -> Int -> Int -> Bool
isTriple a b c = square a + square b == square c
Exercise 5 :
leg1 :: Int -> I... |
7ba38c3fcd77a4ff295dd436f9c639741a21558f05d3086f4e68d46356d98996 | chowells79/lrucache | MemTest.hs | import Prelude hiding ( lookup )
import Control.Monad
import Control.Concurrent
import Data.IORef
import Data.Cache.LRU.IO.Internal
main :: IO ()
main = do
v1 <- newAtomicLRU $ Just 10 -- for endless inserts
v2 <- newAtomicLRU $ Just 10 -- for endless lookups (miss)
v3 <- newAtomicLRU $ Just 10 -- for endless ... | null | https://raw.githubusercontent.com/chowells79/lrucache/14992f1361cffb25652f4420f94438931f064890/MemTest.hs | haskell | for endless inserts
for endless lookups (miss)
for endless lookups (hit) | import Prelude hiding ( lookup )
import Control.Monad
import Control.Concurrent
import Data.IORef
import Data.Cache.LRU.IO.Internal
main :: IO ()
main = do
counter <- newIORef (0 :: Int)
insert 1 "bar" v3
forever $ do
c <- readIORef counter
writeIORef counter $ c + 1
insert c (sh... |
f9b737a8e47214076091ac6c41cb8d82c0e1138d2ec9888541af3a32002522fd | facebook/Haxl | MemoizationTests.hs | Copyright ( c ) 2014 - present , Facebook , Inc.
-- All rights reserved.
--
This source code is distributed under the terms of a BSD license ,
-- found in the LICENSE file.
module MemoizationTests (tests) where
import Data.IORef
import Test.HUnit
import Haxl.Core
import Haxl.Core.Monad (unsafeLiftIO)
import Ex... | null | https://raw.githubusercontent.com/facebook/Haxl/260a97b757a6239df153b69b127ded5c47efa13c/tests/MemoizationTests.hs | haskell | All rights reserved.
found in the LICENSE file. | Copyright ( c ) 2014 - present , Facebook , Inc.
This source code is distributed under the terms of a BSD license ,
module MemoizationTests (tests) where
import Data.IORef
import Test.HUnit
import Haxl.Core
import Haxl.Core.Monad (unsafeLiftIO)
import ExampleDataSource
memoSoundness :: Test
memoSoundness = Te... |
e46c6fc5c5e6d00661d66a66608df4314b3a539a8ae63ebf1d2f6f1ab30ff68f | mrb/soundwave | Logger.hs | cribbed from
module Soundwave.Logger (start, info, Log) where
import System.IO (openFile, hPutStrLn, hFlush, hClose,
IOMode (AppendMode), Handle)
import Control.Concurrent (forkIO)
import Control.Monad (void, forever)
import Control.Monad.STM (atomically)
import Control.Concurrent.STM.TChan (write... | null | https://raw.githubusercontent.com/mrb/soundwave/5906f07310ffc2be7ccda550bf639e1d061262e8/Soundwave/Logger.hs | haskell | cribbed from
module Soundwave.Logger (start, info, Log) where
import System.IO (openFile, hPutStrLn, hFlush, hClose,
IOMode (AppendMode), Handle)
import Control.Concurrent (forkIO)
import Control.Monad (void, forever)
import Control.Monad.STM (atomically)
import Control.Concurrent.STM.TChan (write... | |
fec03652721836a3cf70fdf23d8914ef2798292499a996dd09855782fac339c3 | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_cruiserBatteryInfo.lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(BATTERY_LEVEL-VAL
BATTERY_LEVEL
VOLTAGE-VAL
VOLTAGE
CHARGE_STATUS-VAL
CHARGE_STATUS
TEMPERATURE-VAL
TEMPERATURE
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/_package_cruiserBatteryInfo.lisp | lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(BATTERY_LEVEL-VAL
BATTERY_LEVEL
VOLTAGE-VAL
VOLTAGE
CHARGE_STATUS-VAL
CHARGE_STATUS
TEMPERATURE-VAL
TEMPERATURE
)) | |
5850d9c4f7b14036b11ad1ee10c6b94e6eba42ee15866c69e33d0d2f465fe973 | TerrorJack/ghc-alter | Error.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Error
Copyright : ( c ) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer ... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Foreign/Marshal/Error.hs | haskell | ---------------------------------------------------------------------------
|
Module : Foreign.Marshal.Error
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
in case of values indicating an error state.
------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
Copyright : ( c ) The FFI task force 2001
Maintainer :
Routines for testing return values and raising a ' userError ' exception
module Foreign.Marshal.Error (
throwIf,
throwIf_,
throwIfNeg,
throwIfNeg_,
throwIfNull,
void
) wher... |
76435e7d74ca69caa66a0b396e282934955e63b57912eb10d423760cb7f4b80e | krohrer/caml-aesq | text.ml | , Fri Apr 23 00:11:58 CEST 2010
type justification = [`left | `center | `right | `block | `none]
let option_default a opt =
match opt with
| None -> a
| Some a -> a
let justification_to_string =
function
| `none -> "none"
| `left -> "left"
| `center -> "center"
| `right -> "right"
... | null | https://raw.githubusercontent.com/krohrer/caml-aesq/4cdbd23c010ad3e8eb67ca6a86cdb6a9efafc9c6/text.ml | ocaml | Minimum width allowed for formatting
Chop text up into lines (lines still need to be cooked tough)
Closures are a poor mans objects, and [width] is the only
constant field.
Chop text so its lines are no longer than [width]
Current attributes
Remaining width
Reverse list of line elements, start each line... | , Fri Apr 23 00:11:58 CEST 2010
type justification = [`left | `center | `right | `block | `none]
let option_default a opt =
match opt with
| None -> a
| Some a -> a
let justification_to_string =
function
| `none -> "none"
| `left -> "left"
| `center -> "center"
| `right -> "right"
... |
244976ed90566e4e05c0fb36cf728dc49f526a47c8051c0adfe60de0c1cd9ad5 | easyuc/EasyUC | ecPhlCond.mli | (* -------------------------------------------------------------------- *)
open EcParsetree
open EcCoreGoal.FApi
(* -------------------------------------------------------------------- *)
val t_hoare_cond : backward
val t_choare_cond : EcFol.form option -> backward
val t_bdhoare_cond : backward
val t_equiv_cond :... | null | https://raw.githubusercontent.com/easyuc/EasyUC/a9ce3e3a47b48a498ec9944eab85f2677886c7ae/uc-dsl/ucdsl-proj/src/ECsrc/phl/ecPhlCond.mli | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------------------------- | open EcParsetree
open EcCoreGoal.FApi
val t_hoare_cond : backward
val t_choare_cond : EcFol.form option -> backward
val t_bdhoare_cond : backward
val t_equiv_cond : oside -> backward
val t_equiv_match : matchmode -> backward
|
55a8b2cc682161c32694a3b18536eade98687d28fcc36a2f9f472c93e79ff0cf | lispcord/lispcord | emoji.lisp | (in-package lispcord.http)
(defmethod from-id (id (g lc:guild) &optional (bot *client*))
(if (getcache-id id :emoji)
(getcache-id id :emoji)
(cache :emoji
(discord-req (str-concat "guilds/" (lc:id g)
"/emojis/" id)
:bot bot))))
... | null | https://raw.githubusercontent.com/lispcord/lispcord/448190cc503a0d7e59bdc0ffddb2e9dba0a706af/src/http/emoji.lisp | lisp | (in-package lispcord.http)
(defmethod from-id (id (g lc:guild) &optional (bot *client*))
(if (getcache-id id :emoji)
(getcache-id id :emoji)
(cache :emoji
(discord-req (str-concat "guilds/" (lc:id g)
"/emojis/" id)
:bot bot))))
... | |
90dd00f5387a733b4a0ba96de46ec10c83cceba59d630c897c7aa8a30a81adc3 | ocaml-flambda/flambda-backend | printclambda.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/9c5d6eecfc6fc1cf067e53e530700c85a0a7b1dd/middle_end/printclambda.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Clambda
module V = Backend_var
module VP = Backend_var.With_provenance
let mutable_fl... |
f70ef045294fc163d7e83f3d306d74d6478920265fb5aed9decf810958ef8511 | maximedenes/native-coq | gmap.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/gmap.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Additions with respect to ocaml st... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Maps using the generic comp... |
860ae6f8dee041501d51e74a3ead71daf5fdcca88c9bcfb1bfa580640959f2ba | ferdinand-beyer/init | component.clj | (ns init.component
(:require [init.errors :as errors]))
(defrecord Component [name start-fn])
(defprotocol AsComponent
(component [x] "Coerces `x` to component."))
(extend-protocol AsComponent
Component
(component [c] c)
clojure.lang.IPersistentMap
(component [{:keys [name] :as m}]
(when-not (qualif... | null | https://raw.githubusercontent.com/ferdinand-beyer/init/9f986feea3f49c407c9ae58e6cb97553b349fd29/src/init/component.clj | clojure | (ns init.component
(:require [init.errors :as errors]))
(defrecord Component [name start-fn])
(defprotocol AsComponent
(component [x] "Coerces `x` to component."))
(extend-protocol AsComponent
Component
(component [c] c)
clojure.lang.IPersistentMap
(component [{:keys [name] :as m}]
(when-not (qualif... | |
11b1f66727c196dd618f2aff780175decc9b8d73ac7146946e40477e59d997b7 | erlang/corba | java_client_erl_server_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/test/java_client_erl_server_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2003 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Purpose : Test suite for the backends of the IDL compiler
-module(java_client_erl_server_SUITE).
-include_lib("com... |
c2c74559ce2cd18d869e7b2086442fe4af5c7603a2f8df6d978d53f889086ed9 | louispan/ghcjs-base-stub | Internal.hs | # LANGUAGE ForeignFunctionInterface , UnliftedFFITypes , JavaScriptFFI ,
UnboxedTuples , DeriveDataTypeable , GHCForeignImportPrim ,
MagicHash , FlexibleInstances , BangPatterns , Rank2Types , #
UnboxedTuples, DeriveDataTypeable, GHCForeignImportPrim,
MagicHash, FlexibleInstances, BangPatterns, Ran... | null | https://raw.githubusercontent.com/louispan/ghcjs-base-stub/8eaee240c9af1a2290f4572a87528f3ddb3e9f12/src/GHCJS/Foreign/Internal.hs | haskell | , mvarRef
type predicates
^ implementation dependent
JSON value type | # LANGUAGE ForeignFunctionInterface , UnliftedFFITypes , JavaScriptFFI ,
UnboxedTuples , DeriveDataTypeable , GHCForeignImportPrim ,
MagicHash , FlexibleInstances , BangPatterns , Rank2Types , #
UnboxedTuples, DeriveDataTypeable, GHCForeignImportPrim,
MagicHash, FlexibleInstances, BangPatterns, Ran... |
0066d6982b732935596e976d61ec9402a2ee53571573f18e978b0a64c6f61196 | hasktorch/hasktorch | Dataset.hs | module Dataset where
import Torch hiding (take)
import qualified Torch.Typed.Vision as V hiding (getImages')
import qualified Torch.Vision as V
-- This is a placeholder for this example until we have a more formal data loader abstraction
--
class MockDataset d where
getItem ::
d ->
Int -> -- index
Int -... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/8fa4d2a6cdb7f144484f7d24d8d4924fb0faecd2/examples/distill/Dataset.hs | haskell | This is a placeholder for this example until we have a more formal data loader abstraction
index
batchSize
input, label
| Load MNIST data as dataset abstraction | module Dataset where
import Torch hiding (take)
import qualified Torch.Typed.Vision as V hiding (getImages')
import qualified Torch.Vision as V
class MockDataset d where
getItem ::
d ->
data MNIST = MNIST
{ dataset :: V.MnistData,
idxList :: [Int]
}
instance MockDataset MNIST where
getItem mnistData... |
65948856ebea33ce21d4902e0259b0a6e7dfade7b6149067ca2f65f8eeffd52d | runtimeverification/haskell-backend | Matcher.hs | |
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2018-2021
License : BSD-3-Clause
-}
module Kore.Rewrite.Axiom.Matcher (
MatchingVariable,
MatchResult,
patternMatch,
) where
import Control.Lens qualified as Lens
impo... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/a7ff15f2263dcf274a196a958cfb99c95809afba/kore/src/Kore/Rewrite/Axiom/Matcher.hs | haskell | * Matching
Pattern
Subject
List of variables bound by binders in pattern and subject
Set of variables bound by binders in subject
term A needs term B if term A is a map or set pattern and the keys
of the map or set contain variables that are free vareiables in
term B
AC matching works by substituting the curre... | |
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2018-2021
License : BSD-3-Clause
-}
module Kore.Rewrite.Axiom.Matcher (
MatchingVariable,
MatchResult,
patternMatch,
) where
import Control.Lens qualified as Lens
impo... |
482749839ff0a5180aaf362c8e61caf416477a2990ac93a4a53ca18b60fe45dd | Shirakumo/trial | build.lisp | (in-package #:org.shirakumo.fraf.trial.release)
(defvar *default-build-features*
'(:trial-optimize-all :cl-opengl-no-masked-traps :cl-opengl-no-check-error
:cl-mixed-no-restarts :trial-release))
(defmethod build :around (target)
(restart-case
(call-next-method)
(continue ()
:report "Treat the ... | null | https://raw.githubusercontent.com/Shirakumo/trial/c4882a4526b91ef700270b29702d723f98ff5817/release/build.lisp | lisp | (in-package #:org.shirakumo.fraf.trial.release)
(defvar *default-build-features*
'(:trial-optimize-all :cl-opengl-no-masked-traps :cl-opengl-no-check-error
:cl-mixed-no-restarts :trial-release))
(defmethod build :around (target)
(restart-case
(call-next-method)
(continue ()
:report "Treat the ... | |
211bb721f3f9980979103efdd6a2a35defbe2c1d17df921010831a2f670d61f0 | scalaris-team/scalaris | yaws_ls.erl | %% -*- coding: latin-1 -*-
%%%----------------------------------------------------------------------
%%% File : yaws_ls.erl
Author : < >
%%% Purpose :
Created : 5 Feb 2002 by < >
Modified : 13 Jan 2004 by < >
Modified : Jan 2006 by < >
%%%--------------------------------------------------... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/contrib/yaws/src/yaws_ls.erl | erlang | -*- coding: latin-1 -*-
----------------------------------------------------------------------
File : yaws_ls.erl
Purpose :
----------------------------------------------------------------------
if DoAllGZip == true -> alltgz() end,
yaws:address(),
Content-Type header
last modified
size
descript... | Author : < >
Created : 5 Feb 2002 by < >
Modified : 13 Jan 2004 by < >
Modified : Jan 2006 by < >
-module(yaws_ls).
-author('').
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-include_lib("kernel/include/file.hrl").
-export([list_directo... |
3f47510c9149ea88ed743161d7c5efeb31133a605eb3b3006d90adb6d63f3411 | nvim-treesitter/nvim-treesitter | injections.scm | (comment) @comment
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/75d98eaac424661812cc18de11f3d8037be8e8f4/queries/po/injections.scm | scheme | (comment) @comment
| |
37ccdb3a17c4af288f8e0c9e908bf1dd2deb24dbc8e30c6fb43aaaf6381f2960 | vouillon/osm | routing_profile.mli | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... | null | https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/osm/routing_profile.mli | ocaml | < 0 if same as speed
< 0 if not defined
**
< 0 if not defined | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... |
3ca85ee389c5546ef1179b24ebfae0ee079682bf65e5f10779163ee22ad2834b | janegca/htdp2e | Exercise-071-EditorV1.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Exercise-071-EditorV1) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (l... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/Exercise-071-EditorV1.rkt | racket | about the language level of this file in a form that our tools can easily process.
immediately to the left of the cursor (if there are any). The function
"left" and "right". The left arrow moves the cursor one character to the
of them into tests.
specified as an enumeration. It uses auxiliary functions to d... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Exercise-071-EditorV1) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-dec... |
0b51a45a5d71567c0de226b9c6738973bf32fd0e76121890f20f94d15d815ef0 | ocamllabs/ocaml-modular-implicits | hashtbl.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/hashtbl.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
external seeded_hash_param :
int -> ... |
0b70df579a7b8155dea5c53a34b6a9e0fae4572010d1d648e5c2499d20b7d4f3 | takikawa/racket-ppa | teach-module-begin.rkt | #lang racket/base
Once upon a time , there were three different variants . Preserve the
; ability to do this.
(provide beginner-module-begin
beginner-abbr-module-begin
intermediate-module-begin
intermediate-lambda-module-begin
advanced-module-begin)
(require deinprogramm/signat... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/d336bb10e3e0ec3a20020e9ade9e77d2f6f80b6d/share/pkgs/htdp-lib/lang/private/teach-module-begin.rkt | racket | ability to do this.
Returning 0 values avoids any further result printing
(even if void values are printed)
takes a list of syntax objects (the result of syntax-e) and returns all the syntax objects that correspond to
a signature declaration. Syntax: (: id signature)
check for orphaned signatures
module-begin-co... | #lang racket/base
Once upon a time , there were three different variants . Preserve the
(provide beginner-module-begin
beginner-abbr-module-begin
intermediate-module-begin
intermediate-lambda-module-begin
advanced-module-begin)
(require deinprogramm/signature/signature
... |
8387ea4113e6ff80052ec6923d3f52d3552cb835f91e8ddc5e990fd62db9da01 | superhuman/rxxr2 | RegexParser.mli | type token =
| Literal of ((int * int) * char)
| Anchor of ((int * int) * ParsingData.pred)
| GrpOpen of (int * ParsingData.gkind)
| BeginQuote of ((int * int))
| EndQuote of ((int * int))
| TkDot of (int)
| ModsGrpOpen of (int)
| Mod of (int)
| GrpClose of (int)
| ClsClose of (int)
| TkBackref of... | null | https://raw.githubusercontent.com/superhuman/rxxr2/0eea5e9f0e0cde6c39e0fc12614f64edb6189cd5/code/RegexParser.mli | ocaml | type token =
| Literal of ((int * int) * char)
| Anchor of ((int * int) * ParsingData.pred)
| GrpOpen of (int * ParsingData.gkind)
| BeginQuote of ((int * int))
| EndQuote of ((int * int))
| TkDot of (int)
| ModsGrpOpen of (int)
| Mod of (int)
| GrpClose of (int)
| ClsClose of (int)
| TkBackref of... | |
3001d864c92e967e4898323ea851c2e69f97a25b21919dc9f9dd35a73d83c49f | Frama-C/Frama-C-snapshot | Pdg.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/pdg/Pdg.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
5c3b2cd5fa64f81f6d2acfb6062d0ed0eb1aa211be78e620c6104502a001518c | yuriy-chumak/ol | sleep_sort.scm | ; #Ol
(define (sleep-sort lst)
(for-each (lambda (timeout)
(async (lambda ()
(sleep timeout)
(print timeout))))
lst))
(sleep-sort '(5 8 2 7 9 10 5))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/4bfd67d8025d0c4fcf5fc691520fe2141124f85a/tests/rosettacode/sorting_algorithms/sleep_sort.scm | scheme | #Ol |
(define (sleep-sort lst)
(for-each (lambda (timeout)
(async (lambda ()
(sleep timeout)
(print timeout))))
lst))
(sleep-sort '(5 8 2 7 9 10 5))
|
d80a46956a97b2b9ac251e0d2e75b0bb8213e54e67b72214aa3fd5d36bc76c5a | waddlaw/TAPL | Record.hs | | 図 11.7 レコード
module Language.FullSimpleLambda.System.Record
( Term (..),
Ty (..),
Context (..),
eval,
typeof,
)
where
import Language.FullSimpleLambda.Class
import RIO
import qualified RIO.List.Partial as L.Partial
data Record
type Value = Term Record
type FieldLabel = Text
instance System R... | null | https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/lambda-fullsimple/src/Language/FullSimpleLambda/System/Record.hs | haskell | | 変数
| ラムダ抽象
| レコード
| 射影
| 関数の型
| レコードの型
E-APP2
E-PROJ
E-RCD
T-VAR
T-ABS
T-APP
T-RCD
T-PROJ
ラムダ抽象値
レコードの値
| レコードのみ想定 | | 図 11.7 レコード
module Language.FullSimpleLambda.System.Record
( Term (..),
Ty (..),
Context (..),
eval,
typeof,
)
where
import Language.FullSimpleLambda.Class
import RIO
import qualified RIO.List.Partial as L.Partial
data Record
type Value = Term Record
type FieldLabel = Text
instance System R... |
b1080ab201b35270feaf2abb0550e4b46af906c39aa2aea4d5c96acda7d8bb8f | dramforever/clash-with-stack | UpDown.hs | module PlayClash.UpDown where
import Clash.Prelude
import PlayClash.Utils ()
# ANN topEntity Synthesize
{ t_name = " up_down "
, t_inputs = [ " clk " , " rst " , " in " ]
, t_output = " out "
} #
{ t_name = "up_down"
, t_inputs = ["clk", "rst", "in"]
, t_output = "out"
} #-}
t... | null | https://raw.githubusercontent.com/dramforever/clash-with-stack/e67e82dfa9c44c39e0962ee8542387c119e05285/src/PlayClash/UpDown.hs | haskell | module PlayClash.UpDown where
import Clash.Prelude
import PlayClash.Utils ()
# ANN topEntity Synthesize
{ t_name = " up_down "
, t_inputs = [ " clk " , " rst " , " in " ]
, t_output = " out "
} #
{ t_name = "up_down"
, t_inputs = ["clk", "rst", "in"]
, t_output = "out"
} #-}
t... | |
1375b02d2bb4e266e4b2b5425287859ba6d3ea71f77541a7b554ef287ef9825e | imdea-software/leap | solve.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/progs/solve/solve.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
b59a18a91a658d76c2be8d3f54a7aeaf60f3df9209d2d065e7e28d16cae553bb | travelping/eradius | eradius_lib.erl | -module(eradius_lib).
-export([del_attr/2, get_attr/2, encode_request/1, encode_reply/1, decode_request/2, decode_request/3, decode_request_id/1]).
-export([random_authenticator/0, zero_authenticator/0, pad_to/2, set_attr/3, get_attributes/1, set_attributes/2]).
-export([timestamp/0, timestamp/1, printable_peer/2, make... | null | https://raw.githubusercontent.com/travelping/eradius/bac1a92f547ac4f8e009e9052f28c430b6f9b82d/src/eradius_lib.erl | erlang | -compile(bin_opt_info).
------------------------------------------------------------------------------------------
-- Request Accessors
------------------------------------------------------------------------------------------
-- Wire Encoding
@doc Convert a RADIUS request to the wire format.
@doc Convert a RADI... | -module(eradius_lib).
-export([del_attr/2, get_attr/2, encode_request/1, encode_reply/1, decode_request/2, decode_request/3, decode_request_id/1]).
-export([random_authenticator/0, zero_authenticator/0, pad_to/2, set_attr/3, get_attributes/1, set_attributes/2]).
-export([timestamp/0, timestamp/1, printable_peer/2, make... |
9f9e527ddc0e174854a960f2faf20076a4ab2d97ead90fbb98efd64511aba5f8 | jonase/eastwood | linter_executor.clj | (defn custom-map [f & colls]
(swap! @(resolve 'eastwood.linter-executor-test/proof)
conj
:hello)
(apply map f colls))
(set-linter-executor! custom-map)
| null | https://raw.githubusercontent.com/jonase/eastwood/c5b7d9f8ad8f8b38dc7138d853cc65f6987d6058/test-resources/eastwood/config/linter_executor.clj | clojure | (defn custom-map [f & colls]
(swap! @(resolve 'eastwood.linter-executor-test/proof)
conj
:hello)
(apply map f colls))
(set-linter-executor! custom-map)
| |
ec41cd36795657fcfcc9ba2e00b3062acceccc3ec241d24154c415758fd1c25d | froggey/Mezzano | data-types.lisp | ;;;; Low-level definitions for data types
(in-package :mezzano.internals)
(defconstant +n-fixnum-bits+ 1)
(defconstant +fixnum-tag-mask+ (1- (ash 1 +n-fixnum-bits+)))
Fields in the object header .
(defconstant +object-type-shift+ 2)
(defconstant +object-type-size+ 6)
(defconstant +object-data-shift+ 8)
(defconstan... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/data-types.lisp | lisp | Low-level definitions for data types
Low 4 bits of a value are tag bits
exactly one bit different. This allows ordinary object pointers to
#b0011
See %FAST-INSTANCE-LAYOUT-EQ-P.
Simple 1D arrays.
Array type T == simple vector.
#b011000
#b011010
#b011011
Strings. Simple strings are the same as normal strings, exc... |
(in-package :mezzano.internals)
(defconstant +n-fixnum-bits+ 1)
(defconstant +fixnum-tag-mask+ (1- (ash 1 +n-fixnum-bits+)))
Fields in the object header .
(defconstant +object-type-shift+ 2)
(defconstant +object-type-size+ 6)
(defconstant +object-data-shift+ 8)
(defconstant +object-data-size+ 56)
(defconstant +ta... |
bdff268d039ade5f7aba45c03dabfa2dbe0b2b4d282883583afcfb4cc3ce2649 | dalaing/websockets-reflex | List.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
module List (
listHoldWithKey
, listWithKey
, listWithKey'
, listWithKeyShallowDiff
, listViewWithKey
, selectViewListWithKey
, selectViewListWithKey_
, list
, simpleList
) where
import C... | null | https://raw.githubusercontent.com/dalaing/websockets-reflex/65bee7560442f5aae96f6f64fb12abeb501f5427/other-example/server/List.hs | haskell | # LANGUAGE RankNTypes #
TODO: Move the dmapToMap to the righthand side so it doesn't get fully redone every time
TODO: Something better than Dynamic t (Map k v) - we want something where the Events carry diffs, not the whole value
The other changes we need to keep track of are child insertions and deletions. diffOnlyK... | # LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
module List (
listHoldWithKey
, listWithKey
, listWithKey'
, listWithKeyShallowDiff
, listViewWithKey
, selectViewListWithKey
, selectViewListWithKey_
, list
, simpleList
) where
import Control.Monad (void)
import C... |
f681f23e99f08e0b170ed1d7b48c8a8fa4f131f3a01f20c76ca2daa7191c89a9 | S8A/htdp-exercises | ex413.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex413) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex413.rkt | racket | about the language level of this file in a form that our tools can easily process.
An Inex is a structure:
– -1
Inex -> Number
converts an inex into its numeric equivalent
Checks if the given mantissa, sign and exponent form a valid inex instance,
and otherwise produces an error with symbol s and text msg | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex413) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct inex [mantissa sign exponent])
( mak... |
3a3ef0d4c2a354eb386178d08aadfe0ffbf487942bcbe63dd594e19879c27c2b | FlowForwarding/loom | icontrol_ofsh.erl | %%------------------------------------------------------------------------------
Copyright 2014 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/icontrol/apps/icontrol/src/icontrol_ofsh.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2014 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2014 FlowForwarding.org
-module(icontrol_ofsh).
-include_lib("ofs_handler/include/ofs_handler.hrl... |
3ac26b5bb2e3b958097adaaa521879201692d67515ac15131e4cad9edcb1ca24 | jvranish/TheExperiment | Expression.hs | module Language.TheExperiment.Parser.Expression where
import Text.Parsec
import Text.Parsec.Expr
import Data.List
import Data.Function
import Language.TheExperiment.AST.Expression
import Language.TheExperiment.Parser.Lexer
import Language.TheExperiment.Parser.Literal
type ParsedExpr = Expr ()
anExpr :: EParser Pa... | null | https://raw.githubusercontent.com/jvranish/TheExperiment/54ca832d2f62a928a992b4c23dadf9653d13a5a7/src/Language/TheExperiment/Parser/Expression.hs | haskell | let opTable = [ op | (op, prec) <- opList, then reverse ... sortWith by prec, then group by prec] | module Language.TheExperiment.Parser.Expression where
import Text.Parsec
import Text.Parsec.Expr
import Data.List
import Data.Function
import Language.TheExperiment.AST.Expression
import Language.TheExperiment.Parser.Lexer
import Language.TheExperiment.Parser.Literal
type ParsedExpr = Expr ()
anExpr :: EParser Pa... |
2d8a2206b753970dec488e1cc9cdadbda31cf24a77e66b473abc03ed3b51f97f | schemedoc/cookbook | www-lowdown-colorize.scm | This code is ported from gist :
;;
;; This is an extension to the Chicken 5 `lowdown` egg to recognize
;; GitHub Flavored Markdown code blocks. These code blocks may contain
;; blank lines, and the line with the opening ``` can say the name of
;; the language being used in the block. We also add syntax coloring.... | null | https://raw.githubusercontent.com/schemedoc/cookbook/20fcb619303b0e0a567a492006b219eb9ea381c4/www-lowdown-colorize.scm | scheme |
This is an extension to the Chicken 5 `lowdown` egg to recognize
GitHub Flavored Markdown code blocks. These code blocks may contain
blank lines, and the line with the opening ``` can say the name of
the language being used in the block. We also add syntax coloring.
Example:
```Scheme
(newline)
```
TODO:
- ... | This code is ported from gist :
( display " Hello world " )
into SXML by ( html->sxml ) , then turned into HTML again by the
so it can return SXML directly and this module does not have to
(define (fenced-code-block-end fence)
(any-of end-of-input
(skip non-indent-space
... |
3599d261860e40d3c86f122c60dc005135333faa3d5e8e179587e8a09c58bcee | dwayne/haskell-programming | Main.hs | module Main where
import Control.Monad (forever, when)
import Data.List (intercalate)
import Data.Traversable (traverse)
import Morse (stringToMorse, morseToChar)
import System.Environment (getArgs)
import System.Exit (exitFailure, exitSuccess)
import System.IO (hGetLine, hIsEOF, stdin)
main :: IO ()
main = do
mod... | null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch14/morse/app/Main.hs | haskell | otherwise, proceed.
otherwise, proceed. | module Main where
import Control.Monad (forever, when)
import Data.List (intercalate)
import Data.Traversable (traverse)
import Morse (stringToMorse, morseToChar)
import System.Environment (getArgs)
import System.Exit (exitFailure, exitSuccess)
import System.IO (hGetLine, hIsEOF, stdin)
main :: IO ()
main = do
mod... |
5d67b20898de7921e6675fa1f49d6060a313b8cec2f8c322f95569db10224713 | YoshikuniJujo/test_haskell | VulkanComponentEnum.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module VulkanComponentEnum where
import MakeEnum
make :: IO ()
make = createFileWithDefault vulkanCore "Component.Enum" ["Data.Word"] [
( Just "SwizzleIdentity", [],
("Swizzle", "VkComponentSwizzle", ["Show", "Eq", "Storable"]) )
] []
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6ea44c1048805a62979669c185ab32ba9f4d2e02/themes/gui/vulkan/try-vulkan-middle/tools/VulkanComponentEnum.hs | haskell | # OPTIONS_GHC -Wall -fno - warn - tabs #
module VulkanComponentEnum where
import MakeEnum
make :: IO ()
make = createFileWithDefault vulkanCore "Component.Enum" ["Data.Word"] [
( Just "SwizzleIdentity", [],
("Swizzle", "VkComponentSwizzle", ["Show", "Eq", "Storable"]) )
] []
| |
d6749e13501a1d3a6cd5d62116b1bb7f68a187283e425926553213904ad4dbdb | peti/titlecase | Unit.hs | module Unit where
import Data.Text.Titlecase
import qualified Data.Text.Titlecase.Internal as Titlecase
import Data.Text.Titlecase.Internal hiding (articles, conjunctions, prepositions)
import Test.Tasty
import Test.Tasty.HUnit
import Data.Char ( toLower )
tests :: TestTree
tests = testGroup "Unit tests" [articles, ... | null | https://raw.githubusercontent.com/peti/titlecase/d968000d7cdf62b816e71ddb1de47aa6fdb6fa91/tests/Unit.hs | haskell | module Unit where
import Data.Text.Titlecase
import qualified Data.Text.Titlecase.Internal as Titlecase
import Data.Text.Titlecase.Internal hiding (articles, conjunctions, prepositions)
import Test.Tasty
import Test.Tasty.HUnit
import Data.Char ( toLower )
tests :: TestTree
tests = testGroup "Unit tests" [articles, ... | |
e31161e4a31767b6e3267d63a40f1178b883cb985df3875abe6e4869428adf84 | jyh/metaprl | itt_comment.ml | doc <:doc<
@module[Itt_comment]
Terms used for comments in the @Nuprl type theory.
@docoff
----------------------------------------------------------------
@begin[license]
Copyright (C) 2000 Jason Hickey, Caltech
This program is free software; you can redistribute it and/or
modify it under t... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_comment.ml | ocaml | ***********************************************************************
* UNIVERSES AND EQUALITY
***********************************************************************
***********************************************
* TeX mode.
***********************************************
* Normal mode.
********************... | doc <:doc<
@module[Itt_comment]
Terms used for comments in the @Nuprl type theory.
@docoff
----------------------------------------------------------------
@begin[license]
Copyright (C) 2000 Jason Hickey, Caltech
This program is free software; you can redistribute it and/or
modify it under t... |
5948324644bc149497441c7dbb769fcb9cc98ac1600e4f6f2c4cb6fe209c5745 | ermine-language/ermine | Keywords.hs | --------------------------------------------------------------------
-- |
Copyright : ( c ) and 2012 - 2013
License : BSD2
Maintainer : < >
-- Stability : experimental
-- Portability: non-portable
--
--------------------------------------------------------------------
module Ermine.Parser.Keyword... | null | https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Parser/Keywords.hs | haskell | ------------------------------------------------------------------
|
Stability : experimental
Portability: non-portable
------------------------------------------------------------------
| This is the set of keywords that can only occur at the beginning of the line for auto-completion purposes.
| This is the set... | Copyright : ( c ) and 2012 - 2013
License : BSD2
Maintainer : < >
module Ermine.Parser.Keywords where
import Data.HashSet
import Data.Monoid
startingKeywords :: HashSet String
startingKeywords = fromList
[ "abstract"
, "class"
, "data"
, "database"
, "export"
, "field"
, "foreign"
... |
cb60952038b7222cf635ca845c0cdb1289c1ea9e1f967965dcc69791de0a3266 | OCamlPro/ocp-build | buildOCamlRules.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/ocaml/buildOCamlRules.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
ocp - imports should be able to print this !
Warning 40 : package_options was selected from type BuildOCPTypes.package .
Warning 40 : package_dirname was selecte... |
423365c6ff0ea801fe13c8c1f650238ce84624f1bb77e8ded28195908a7889c8 | VisionsGlobalEmpowerment/webchange | views_scenes.cljs | (ns webchange.editor-v2.course-dashboard.views-scenes
(:require
[cljs-react-material-ui.icons :as ic]
[cljs-react-material-ui.reagent :as ui]
[clojure.string :as s]
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.editor-v2.components.card.views :refer [list-card] :as card]
[we... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/editor_v2/course_dashboard/views_scenes.cljs | clojure | (ns webchange.editor-v2.course-dashboard.views-scenes
(:require
[cljs-react-material-ui.icons :as ic]
[cljs-react-material-ui.reagent :as ui]
[clojure.string :as s]
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.editor-v2.components.card.views :refer [list-card] :as card]
[we... | |
1d0edd83a5eff1771eb404b11cbdc711940dfead0499a9658c76acc465a02d23 | xguerin/netml | NetML.ml | module Layer = NetML_Layer
module PCap = NetML_PCap
| null | https://raw.githubusercontent.com/xguerin/netml/de9d277d2f1ac055aea391b89391df6830f80eff/src/NetML.ml | ocaml | module Layer = NetML_Layer
module PCap = NetML_PCap
| |
1a2ddd83bb7d7f993d0a470233537cc17133969a8d511e92f2e4ddebe110d35d | yuanqing/code-problems | insertion_sort.ml | let insertion_sort (compare:'a -> 'a -> int) (xs:'a list) : 'a list =
let rec insert x ys =
match ys with
| [] -> [x]
| y::ys as zs when (compare x y < 0) ->
(* `compare` returning a negative value means that `x` is smaller than
`y`. So we place `x` in front of both `y` and `ys`. *)... | null | https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/insertion_sort/insertion_sort.ml | ocaml | `compare` returning a negative value means that `x` is smaller than
`y`. So we place `x` in front of both `y` and `ys`.
Otherwise, continue looking for a place to insert `x` in the
rest of the list. | let insertion_sort (compare:'a -> 'a -> int) (xs:'a list) : 'a list =
let rec insert x ys =
match ys with
| [] -> [x]
| y::ys as zs when (compare x y < 0) ->
x::zs
| y::ys ->
y::(insert x ys) in
let rec aux xs =
match xs with
| [] -> []
| x::xs -> insert x (aux ... |
2812cecf6e0b8f32cefa522359c3116a91fcdbeb849afe7c0f4fc8da95e418ae | ghc/nofib | Main.hs | A kernel fragment from a program written by
-- /~legere
Caltech Quantum Optics
It has the interesting property that Classic Hugs
runs it 20x faster than GHC !
Reason : calls itself with identical parameters ,
and Hugs commons that up for some reason .
( Even with that fixed , STG Hugs r... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/atom/Main.hs | haskell | /~legere
/~legere
******************
******************
Module: Numerical classical atom (atom.lhs)
******************
******************
We will want types for the whole simulation (where we can configure
the dimensions, etc), for the results (a state stream), and the force laws.
In this form GHC is ( as expec... | A kernel fragment from a program written by
Caltech Quantum Optics
It has the interesting property that Classic Hugs
runs it 20x faster than GHC !
Reason : calls itself with identical parameters ,
and Hugs commons that up for some reason .
( Even with that fixed , STG Hugs ran the program a lot... |
b58eca60d1569954e271df441dd2b4d862ec8728d349f499f7fc54902e78c8f5 | mpaltun/istanbus | istanbus_web.erl | @author author < >
YYYY author .
%% @doc istanbus_web startup code
-module(istanbus_web).
-author('author <>').
-export([start/0, start_link/0, stop/0]).
ensure_started(App) ->
case application:start(App) of
ok ->
ok;
{error, {already_started, App}} ->
ok
end.
... | null | https://raw.githubusercontent.com/mpaltun/istanbus/9f8edd1e092045d015615d29011481539ea23374/istanbus_web/src/istanbus_web.erl | erlang | @doc istanbus_web startup code
@doc Starts the app for inclusion in a supervisor tree | @author author < >
YYYY author .
-module(istanbus_web).
-author('author <>').
-export([start/0, start_link/0, stop/0]).
ensure_started(App) ->
case application:start(App) of
ok ->
ok;
{error, {already_started, App}} ->
ok
end.
( ) - > { ok , Pid::pid ( ) }
s... |
ef5aa7975271af29b078178f85a0473c197f257dd67da959a2c54a92d9f958bb | helium/blockchain-core | blockchain_txn_gen_gateway_v1.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain Transaction Genesis Gateway ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_txn_gen_gateway_v1).
-behavior(blockchain_txn).
-behavior(blockchain_json).
-include("blockcha... | null | https://raw.githubusercontent.com/helium/blockchain-core/270f90544c870295d3d767771e59d8038535dbd5/src/transactions/v1/blockchain_txn_gen_gateway_v1.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain Transaction Genesis Gateway ==
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
@doc
@end
---------------------------------------------... | -module(blockchain_txn_gen_gateway_v1).
-behavior(blockchain_txn).
-behavior(blockchain_json).
-include("blockchain_json.hrl").
-include("blockchain_utils.hrl").
-include_lib("helium_proto/include/blockchain_txn_gen_gateway_v1_pb.hrl").
-export([
new/4,
hash/1,
sign/2,
gateway/1,
owner/1,
loc... |
abe07eec323c167e8d856fbfa10c5899d743e109c7adeedb43275fe30809d94f | Kah0ona/re-dnd | views.cljs | (ns re-dnd-demo.views
(:require [fipp.clojure :refer [pprint]]
[re-dnd-demo.events :as h]
[re-dnd.events :as dnd]
[re-dnd.views :as dndv]
[re-frame.core :as rf]
[reagent.core :as r]
[taoensso.timbre :as timbre
:refer-macros (log tra... | null | https://raw.githubusercontent.com/Kah0ona/re-dnd/32ecacc8c28a25aa854bb340a5d73cb03e5751cb/src/cljs/re_dnd_demo/views.cljs | clojure | this should have its own file, custom_events
initial elements can be put here
this thing follows the mouse, and takes over the draggable's size | (ns re-dnd-demo.views
(:require [fipp.clojure :refer [pprint]]
[re-dnd-demo.events :as h]
[re-dnd.events :as dnd]
[re-dnd.views :as dndv]
[re-frame.core :as rf]
[reagent.core :as r]
[taoensso.timbre :as timbre
:refer-macros (log tra... |
7abffe1135cbf3627dd9d7dd705c293f27be25c3fce4cc6363d5dbc59a848ac9 | ashinn/chibi-scheme | binary-record-chicken.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; binary records, simpler version with type-checking on set! removed
(define-syntax defrec
(syntax-rules (make: pred: read: write: block:)
((defrec () n m p r w
((field-tmp field-read field-read-expr field-write field-write-expr fie... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/binary-record-chicken.scm | scheme |
binary records, simpler version with type-checking on set! removed
chicken define-record-type doesn't define the rtd |
(define-syntax defrec
(syntax-rules (make: pred: read: write: block:)
((defrec () n m p r w
((field-tmp field-read field-read-expr field-write field-write-expr field-get) ...)
((field getter . s) ...))
(begin
(define-record-type n (m field ...) p
(field getter . s) ...)
... |
9600999d20574a615715b6695eb7432d26530d9c47ae7b9cbef63906298e0cff | zotonic/zotonic | mod_oauth2.erl | @author < >
2019 - 2022
%% @doc OAuth2 (-ietf-oauth-v2-26)
Copyright 2019 - 2022
%%
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 b... | null | https://raw.githubusercontent.com/zotonic/zotonic/3ac6d8ee63a7526f1d1cb9f001e255a75642eec8/apps/zotonic_mod_oauth2/src/mod_oauth2.erl | erlang | @doc OAuth2 (-ietf-oauth-v2-26)
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... | @author < >
2019 - 2022
Copyright 2019 - 2022
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_oauth2).
-author("Marc Worrell <>").
-mod_title("OAuth2").
-mod_description("Provides authentication o... |
a5a3126019f1ce4e861381c466ca9ae215d75db8d491a9e00988f2df6aaef938 | mindpool/cs-termite | gen_event.scm | Erlang / OTP - like behavior for " event handlers "
;;; "Types" for the functions in a EVENT-HANDLER
;;;
INIT : : arg - > state
;;; NOTIFY :: event state -> state
;;; CALL :: args state -> reply state
;;; TERMINATE :: reason state -> void
(define-record event-handler
init
notif... | null | https://raw.githubusercontent.com/mindpool/cs-termite/23df38627bfd4bd2257fb8d9f6c1812d2cd6bc04/otp/gen_event.scm | scheme | "Types" for the functions in a EVENT-HANDLER
NOTIFY :: event state -> state
CALL :: args state -> reply state
TERMINATE :: reason state -> void
should check to avoid duplicates
build a trivial event handler with no state, only invoking a
callback on any event
CALL
TERMINATE | Erlang / OTP - like behavior for " event handlers "
INIT : : arg - > state
(define-record event-handler
init
notify
call
terminate)
(define *event-manager-timeout* 1)
(define (event-manager)
(let loop ((handlers '()))
(recv
((from tag ('call handler args))
(match (ass... |
55468812a5f6e879df837a1ccba7df0a26ab5b5dbf45ad117a083a5dc193994e | nuprl/gradual-typing-performance | ukkonen-jump-to-suffix.rkt | #lang typed/racket/base
(provide jump-to-suffix)
;; -----------------------------------------------------------------------------
(require "data-node-adapted.rkt"
"data-label-adapted.rkt"
benchmark-util)
(require/typed/check "label-label-length.rkt"
[label-length (-> label Index)])
(require/typed... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/suffixtree/typed/ukkonen-jump-to-suffix.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
jump-to-suffix: node -> (values node (union boolean number))
Given an internal node, jumps to the suffix from that node.
According to the theory of suffix tre... | #lang typed/racket/base
(provide jump-to-suffix)
(require "data-node-adapted.rkt"
"data-label-adapted.rkt"
benchmark-util)
(require/typed/check "label-label-length.rkt"
[label-length (-> label Index)])
(require/typed/check "structs-node-root.rkt"
[node-root? (-> Node Boolean)])
in the tree ... |
87d8627e59c07a1e6b668a9c20409aafba8c982d710552d877a3f3204ad20a19 | joewilliams/erl_geo_dns | lhttpc_sock.erl | %%% ----------------------------------------------------------------------------
Copyright ( c ) 2009 , Erlang Training and Consulting Ltd.
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are me... | null | https://raw.githubusercontent.com/joewilliams/erl_geo_dns/682c3925959db61ead99f13160ef8bd77486a871/apps/lhttpc/src/lhttpc_sock.erl | erlang | ----------------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... | Copyright ( c ) 2009 , Erlang Training and Consulting Ltd.
* Neither the name of Erlang Training and Consulting Ltd. nor the
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL Erlang Training and Consulting Ltd. BE
@private
@author < >
-modul... |
4f66f06a4d2c6822e296f11844645c5f3e0f0b4d1e971d1c10ea9f42227a5b46 | rrnewton/haskell-lockfree | ReactorDeque.hs | # LANGUAGE UndecidableInstances , FlexibleContexts , DeriveDataTypeable #
This is the from the Reactor package written by .
Copyright 2011
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
ar... | null | https://raw.githubusercontent.com/rrnewton/haskell-lockfree/87122157cbbc96954fcc575b4b110003d3e5c2f8/chaselev-deque/Data/Concurrent/Deque/ReactorDeque.hs | haskell | * Local stack operations
* Performance tuning
:: Int
:: Int
* Work stealing
| For an explanation of the implementation, see \"Dynamic Circular Work-Stealing Deque\"
# UNPACK #
# INLINE empty #
unsafeRead
unsafeWrite | # LANGUAGE UndecidableInstances , FlexibleContexts , DeriveDataTypeable #
This is the from the Reactor package written by .
Copyright 2011
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
ar... |
b30f98f9c4a26352d7bca3ecbac6dc6dc64987ab196a87dc066ca431d383a16d | tonymorris/geo-osm | TypeL.hs | -- | Values with a @type@ accessor.
module Data.Geo.OSM.Lens.TypeL where
import Data.Geo.OSM.MemberType
import Control.Lens.Lens
class TypeL a where
typeL ::
Lens' a MemberType
| null | https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Lens/TypeL.hs | haskell | | Values with a @type@ accessor. | module Data.Geo.OSM.Lens.TypeL where
import Data.Geo.OSM.MemberType
import Control.Lens.Lens
class TypeL a where
typeL ::
Lens' a MemberType
|
b621f145fcaadb568451ecec32af217ba7072d7220f83ee384af35c0b53887cf | OCamlPro/typerex-lint | common.mli | val id : string -> string
val cstr : string -> string
val print_longident : Longident.t -> string
val upprint : Parsetree.core_type -> string option
val mk_exploded : string -> Longident.t
val mk_aut : string -> Longident.t
val mk_aut_cstr : string -> Longident.t
val mk_match : string -> Longident.t
val warn : ('a, u... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/libs/ocplib-sempatch/lib/automaton/generator/common.mli | ocaml | * [instantiate_type_decl replacements typ] replaces all the free variables of
typ present in the association list replacements by its corresponding value
* Returns the list of toplevel value-bindings in the given structure | val id : string -> string
val cstr : string -> string
val print_longident : Longident.t -> string
val upprint : Parsetree.core_type -> string option
val mk_exploded : string -> Longident.t
val mk_aut : string -> Longident.t
val mk_aut_cstr : string -> Longident.t
val mk_match : string -> Longident.t
val warn : ('a, u... |
9d3bc5c7d8055622f7eea0612d974e430c22f6a0916684e7e39cf82c162b6360 | static-analysis-engineering/codehawk | jCHDumpBasicTypes.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHDumpBasicTypes.mli | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
4318c141d9bf4747051902aa19cfb55e190a0a09a202cdd8a5fc9b03df37b411 | nixeagle/cl-github | json.lisp | This file modifies the basic behavior of CL - JSON . All of the
;;; functions that directly modify and manipulate how cl-json reads
input are derived from the way CL - JSON does the default handling .
;;;
;;; My modifications are pretty extensive, but for completeness:
;;;
;;; Specifically
;;; - beginning-of-obj... | null | https://raw.githubusercontent.com/nixeagle/cl-github/19ba2477ea65e52e74e166482407ea96bee8e395/json.lisp | lisp | functions that directly modify and manipulate how cl-json reads
My modifications are pretty extensive, but for completeness:
Specifically
- beginning-of-object
- key-add-or-set
- value-add-or-set
- accumulator-get-object
- accumulator-add-preserved-key
-license.html)
Permission is hereby granted, ... | This file modifies the basic behavior of CL - JSON . All of the
input are derived from the way CL - JSON does the default handling .
Are especially derived from CL - JSON .
CL - JSON 's license is included here for completeness .
( This is the MIT / X Consortium license as taken from
Copyright ( c ) 2006 ... |
0a64c0178d933d98f65728a603346de6f4030b373dffaf572cee0b63a1207d51 | Octachron/tensority | small_unified.ml | module V = Small_vec
module M = Small_matrix
module T = Tensor
type _ t =
| Scalar: float ref -> < contr:Shape.empty; cov: Shape.empty > t
| Vec: 'a V.t -> < contr: 'a Shape.single; cov: Shape.empty > t
| Matrix: ('a * 'b) M.t -> < contr:'a Shape.single; cov:'b Shape.single > t
let scalar f = Scalar (re... | null | https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/small_unified.ml | ocaml | module V = Small_vec
module M = Small_matrix
module T = Tensor
type _ t =
| Scalar: float ref -> < contr:Shape.empty; cov: Shape.empty > t
| Vec: 'a V.t -> < contr: 'a Shape.single; cov: Shape.empty > t
| Matrix: ('a * 'b) M.t -> < contr:'a Shape.single; cov:'b Shape.single > t
let scalar f = Scalar (re... | |
42166a810479c7d12a097414198feff077d131850564e9ccc38094bc7d7739d8 | haskell-lisp/yale-haskell | default.scm | ;;; This handles the default rule.
(define (maybe-default-ambiguous-tyvar type def module)
(let ((classes (ntyvar-context type)))
(and (not (null? classes)) ; this happens only during cleanup after an error
(let ((non-standard? '#f)
(numeric? '#f))
(dolist (class classes)
(cond ((eq? (class-kind cla... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/type/default.scm | scheme | This handles the default rule.
this happens only during cleanup after an error |
(define (maybe-default-ambiguous-tyvar type def module)
(let ((classes (ntyvar-context type)))
(let ((non-standard? '#f)
(numeric? '#f))
(dolist (class classes)
(cond ((eq? (class-kind class) 'numeric)
(setf numeric? '#t))
((not (eq? (class-kind class) 'standard))
(setf non-stand... |
9c7e7697117ae51101591804fbb2cb5594ea44079e7962965df07be3912571a1 | johnlawrenceaspden/hobby-code | efficiencyandprogress1.clj | ;; Efficiency and Progress
;; Are ours once again
;; Now that we have the neut-ron bomb
It 's nice and quick and clean and ge - ets things done ...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
When you program in Clojure , you get the raw speed of assembler .
Unfortu... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/efficiencyandprogress1.clj | clojure | Efficiency and Progress
Are ours once again
Now that we have the neut-ron bomb
screen*?
Once upon a time, I had the knack of making clojure run at the same
not far off the speed of the sort of hand-crafted machine code which
no-one in their right mind ever writes, in these degenerate latter
days which we must ... | It 's nice and quick and clean and ge - ets things done ...
When you program in Clojure , you get the raw speed of assembler .
Unfortunately , that is , assembler on a ZX81 , running a Z80 processor at 4MHz in 1981 .
If anything , that comparison is unfair to my old ZX81 . Does anyone
remember ' 3D Invade... |
87af97ab04bbf1f57783a6434592f7e3b7549563963404a7b71edb2a0255f8b7 | binsec/binsec | sse_symbolic.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/sse/formula/sse_symbolic.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
e9078a9e2d03c091195926583957c98a842a13ca666f8890b848cce35b0a00ed | yurug/ocaml4.04.0-copatterns | buffer.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/stdlib/buffer.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t =
{mutable buffer : bytes;
mutable position : int;
mutable length : int;
initial_buffer : bytes}
le... |
f44eee9dbd049dbf8023a06d4bfda573037541ec601591c70b324bdcc2f6a6ee | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(def-ontology time-ontology
:includes (units-manipulation xsd-types)
:type :domain
;;:namespace-uri "-super.org/ontologies/time-ontology/20080612#"
:namespace-uri "-super.org/ontologies/process/time/v1.2.0#"
:namespaces (("TIME" time... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/time-ontology/load.lisp | lisp | Package :
:namespace-uri "-super.org/ontologies/time-ontology/20080612#" |
File created in WebOnto
(in-package "OCML")
(def-ontology time-ontology
:includes (units-manipulation xsd-types)
:type :domain
:namespace-uri "-super.org/ontologies/process/time/v1.2.0#"
:namespaces (("TIME" time-ontology)
("UNITS" units-manipulation)
("SI" international-syst... |
6582e727a8a736bab237e9903e4c42b701173ea0d6eb8587ec04a46e040ac78b | dbuenzli/uunf | unftrip.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2012 The uunf programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/uunf/afd25d9f5348a441e2ff69d077647e56f5de572f/test/unftrip.ml | ocaml | Output
Trip
no normalization.
normalize to nf.
guess encoding if needed.
Version
Cmd
Cmdline interface | ---------------------------------------------------------------------------
Copyright ( c ) 2012 The uunf programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... |
f7fb21f6a609410bbde3e36e4f72dfbf3468ec8ca6314c7433ceb102dbbf9b94 | rpt/lager_logstash | lager_logstash_json_formatter.erl | Copyright ( c ) 2014
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, publish, distribute... | null | https://raw.githubusercontent.com/rpt/lager_logstash/001838211299cf5608694b63d5811ae1b4e6bb9a/src/lager_logstash_json_formatter.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright noti... | Copyright ( c ) 2014
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILI... |
f84767623221778e5da99dca049915616422b202854ff029d2b75546f0a07cd0 | leopiney/tensor-safe | Examples.hs | | This module implements the examples command for TensorSafe .
module TensorSafe.Commands.Examples (examples) where
import TensorSafe.Examples.Examples
( mnistConcatenateComplexExample,
mnistConcatenateExample,
mnistExample,
mnistExampleDense,
simpleExample,
)
-- | Outputs to stdout the results ... | null | https://raw.githubusercontent.com/leopiney/tensor-safe/cdf611dbbe68f6f6cb0b44fe31d86b28a547a3f2/src/TensorSafe/Commands/Examples.hs | haskell | | Outputs to stdout the results of the examples | | This module implements the examples command for TensorSafe .
module TensorSafe.Commands.Examples (examples) where
import TensorSafe.Examples.Examples
( mnistConcatenateComplexExample,
mnistConcatenateExample,
mnistExample,
mnistExampleDense,
simpleExample,
)
examples :: IO ()
examples = do
s... |
d2ec0bf75b0a117f82ea312eb323b9a9c4d3d32ab6979adcd047e4abeae1853b | Ramarren/cl-parser-combinators | cache.lisp | (in-package :parser-combinators)
(defvar *parser-cache* (make-hash-table))
(defun drop-parser-cache ()
(clrhash *parser-cache*))
;; parser caching
(defmacro cached? (parser label)
"Parser modifier macro: cache parser as label in global cache."
(with-unique-names (inp cache)
`#'(lambda (,inp)
(if-... | null | https://raw.githubusercontent.com/Ramarren/cl-parser-combinators/9c7569a4f6af5e60c0d3a51d9c15c16d1714c845/cache.lisp | lisp | parser caching | (in-package :parser-combinators)
(defvar *parser-cache* (make-hash-table))
(defun drop-parser-cache ()
(clrhash *parser-cache*))
(defmacro cached? (parser label)
"Parser modifier macro: cache parser as label in global cache."
(with-unique-names (inp cache)
`#'(lambda (,inp)
(if-let ((,cache (geth... |
f9bcc5b492cf074fa384af399821b5c7b7eba1f4f66ce01a02dbbb8ab8c02165 | geophf/1HaskellADay | Solution.hs | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2017.M12.D27.Solution where
-
Yesterday , we stored the unparsed article set into the database . We also were
able to parse the HTML content of articles stored in JSON the day prior .
Today , we continue parsing article information and then storing those par... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M12/D27/Solution.hs | haskell | }
}
so, but how do we get from that wild and wonderful structure in the JSON
note that changing -05:00 to -04:00 does NOT change the time zone
}
(also image attached from the Entity-relation diagram)
from the source article ids in the article_stg table and the parsed articles,
store the articles in the database
- ... | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2017.M12.D27.Solution where
-
Yesterday , we stored the unparsed article set into the database . We also were
able to parse the HTML content of articles stored in JSON the day prior .
Today , we continue parsing article information and then storing those par... |
e4e686ccbbe9ab2f834b3ffd7119b225451b5e78c7197ccdcea53de30a8e83cc | input-output-hk/cardano-base | Strict.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
-- | Strict version of the 'Maybe' type.
module Data.Maybe.Strict
( StrictMaybe (SNothing, SJust),
-- * Conversion: StrictMaybe <--> Maybe
strictMaybeToMaybe,
maybeToStrictMaybe,
-- * Accessing the underly... | null | https://raw.githubusercontent.com/input-output-hk/cardano-base/9989b5571db1636bf6afd71a8f93d2c989d68d74/cardano-strict-containers/src/Data/Maybe/Strict.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveTraversable #
| Strict version of the 'Maybe' type.
* Conversion: StrictMaybe <--> Maybe
* Accessing the underlying value
| Same as `Data.Maybe.fromMaybe`
| Same as `Data.Maybe.isNothing`
| Same as `Data.Maybe.isJust`
| Same as `Data.Maybe.maybe` | # LANGUAGE DeriveGeneric #
module Data.Maybe.Strict
( StrictMaybe (SNothing, SJust),
strictMaybeToMaybe,
maybeToStrictMaybe,
fromSMaybe,
isSNothing,
isSJust,
strictMaybe,
)
where
import Cardano.Binary
( FromCBOR (fromCBOR),
ToCBOR (toCBOR),
decodeBreakOr,
decodeListLenOrInd... |
753b543905d460186cc0a720e15358c85ddab6bb8af2215a086bd87b45394bcd | fmthoma/vgrep | Type.hs | | The ' VgrepT ' monad transformer allows reading from the ' Environment '
-- and changing the state of the 'Vgrep.App.App' or a 'Vgrep.Widget.Widget'.
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# L... | null | https://raw.githubusercontent.com/fmthoma/vgrep/f3b140bf3150a3699234469c34ff8c13a298998e/src/Vgrep/Type.hs | haskell | and changing the state of the 'Vgrep.App.App' or a 'Vgrep.Widget.Widget'.
# LANGUAGE UndecidableInstances #
** Modifying the environment
** Utilities
* Re-exports
enviromnent are only possible globally (see 'modifyEnvironment'), the
'local' environment is pure.
action to an action in the base monad.
modif... | | The ' VgrepT ' monad transformer allows reading from the ' Environment '
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections ... |
07a7fa858f951a5abca2202d89a8e940363652857a5ad79b9b9879de5968de68 | lspitzner/brittany | Test486.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
import Test (longbindingNameThatoverflowsColum)
import Test (Long(List, Of, Things))
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test486.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | import Test (longbindingNameThatoverflowsColum)
import Test (Long(List, Of, Things))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.