_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 |
|---|---|---|---|---|---|---|---|---|
62cdcc45d88d26e76244de64db3d40748e6b5179a9fed5bc39c25eb05d0d143c | sky-big/RabbitMQ | lqueue.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/erlang_otp_data_struct/lqueue.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
maintain their ... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2011 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
6f0437f457e97b76106fb8f47550bdc7ffe62e4419eaed0a6b001bcc1ac31c2e | brianium/clean-todos | entity_test.clj | (ns todos.core.entity-test
(:require [clojure.test :refer :all]
[clojure.spec.alpha :as s]
[clojure.test.check] ;; -emacs/cider/issues/1841#issuecomment-266072462
[clojure.spec.test.alpha :as st]
[todos.core.entity.spec :as spec])
(:import (java.util UUID)))
(defn u... | null | https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/test/todos/core/entity_test.clj | clojure | -emacs/cider/issues/1841#issuecomment-266072462 | (ns todos.core.entity-test
(:require [clojure.test :refer :all]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as st]
[todos.core.entity.spec :as spec])
(:import (java.util UUID)))
(defn uuid-gen [] (s/gen #{(.toString (UUID/randomUUID))}))
(def gen-overrides {::spec/uuid... |
b1da4826fdd521f29ffc0911be6975876750e3d910aef919a575ab787002242d | clojure-interop/google-cloud-clients | ProductSearchStubSettings$Builder.clj | (ns com.google.cloud.vision.v1.stub.ProductSearchStubSettings$Builder
"Builder for ProductSearchStubSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1.stub ProductSearchStubSettings$Builder]))
(defn delete-reference-image-settings
"Returns the builder for the setti... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1/stub/ProductSearchStubSettings%24Builder.clj | clojure | (ns com.google.cloud.vision.v1.stub.ProductSearchStubSettings$Builder
"Builder for ProductSearchStubSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1.stub ProductSearchStubSettings$Builder]))
(defn delete-reference-image-settings
"Returns the builder for the setti... | |
044dd35d56b73ac0a4f4f0403904b67bf9b8bc5ea3696464aa4ed5a8909b49e1 | pallix/lacij | textwrapping.clj | (ns lacij.examples.textwrapping
(:use lacij.edit.graph
lacij.view.graphview))
(defn -main []
(let [g (-> (create-graph :width 800 :height 800)
(add-node :wrap ["Wrap" "this" "text"] :x 10 :y 30 :height 50)
(add-node :circlewrap ["Wrap" "this" "text"]
:x 6... | null | https://raw.githubusercontent.com/pallix/lacij/ee9b7dcda13f25f7460acb5995b7970a7564c11e/src/lacij/examples/textwrapping.clj | clojure | (ns lacij.examples.textwrapping
(:use lacij.edit.graph
lacij.view.graphview))
(defn -main []
(let [g (-> (create-graph :width 800 :height 800)
(add-node :wrap ["Wrap" "this" "text"] :x 10 :y 30 :height 50)
(add-node :circlewrap ["Wrap" "this" "text"]
:x 6... | |
cd683b0e7f6ecd683492822e49f375393dad36c56f1576133642cc2068dce7b9 | LastStar/showrum | presentation.cljs | (ns showrum.frontend.presenter.views.presentation
(:require [hx.react :as hx]))
(hx/defnc Main
[{:keys [slides current-slide]}]
[:div
{:class "deck"
:style {:width (str (count slides) "00vw")
:transform (str "translateX(-"
(dec current-slide) "00vw)")}}
(for ... | null | https://raw.githubusercontent.com/LastStar/showrum/fb73e9612e4525e32b6b936179d901be50019fb5/src/showrum/frontend/presenter/views/presentation.cljs | clojure | (ns showrum.frontend.presenter.views.presentation
(:require [hx.react :as hx]))
(hx/defnc Main
[{:keys [slides current-slide]}]
[:div
{:class "deck"
:style {:width (str (count slides) "00vw")
:transform (str "translateX(-"
(dec current-slide) "00vw)")}}
(for ... | |
eeb52661049534effa2fe54c3fc9c429b6f9958c46c8d538425f6cb586abffdb | DHSProgram/DHS-Indicators-SPSS | !MLmain.sps | * Encoding: windows-1252.
* /*******************************************************************************************************************************
Program: MLmain.sps
Purpose: Main file for the Malaria Chapter.
* The main file will call other do files that will produce the ML indicators and p... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap12_ML/!MLmain.sps | scheme | * Encoding: windows-1252.
* /*******************************************************************************************************************************
Program: MLmain.sps
Purpose: Main file for the Malaria Chapter.
* The main file will call other do files that will produce the ML indicators and p... | |
599a83932daebdb962e7a48dd788fabfe4e50b3eef812c1f5d7a58272141e32b | iambrj/imin | interp-Rif.rkt | #lang racket
(require racket/fixnum)
(require "utilities.rkt")
(require "interp-Rvar.rkt")
(provide interp-Rif interp-Rif-class)
;; Note to maintainers of this code:
;; A copy of this interpreter is in the book and should be
;; kept in sync with this code.
(define interp-Rif-class
(class interp-Rvar-class
(... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/interp-Rif.rkt | racket | Note to maintainers of this code:
A copy of this interpreter is in the book and should be
kept in sync with this code.
(define (interp-exp env) | #lang racket
(require racket/fixnum)
(require "utilities.rkt")
(require "interp-Rvar.rkt")
(provide interp-Rif interp-Rif-class)
(define interp-Rif-class
(class interp-Rvar-class
(super-new)
(define/public (interp-op op)
(verbose "Rif/interp-op" op)
(match op
['+ fx+]
['- fx-]
... |
4e3d3987692f40d8f6c5d7b536c733ae99e74fc1adf6cce5d0dd65f2645ccfdd | NoRedInk/haskell-libraries | Error.hs | module Postgres.Error
( Error (..),
)
where
import qualified Control.Exception.Safe as Exception
import qualified Log
import qualified Text
import Prelude (Show (show))
| A postgres query might fail with one of these errors .
data Error
= Timeout Float
| UniqueViolation Text
| ForeignKeyConstraintViolatio... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/5fb3c2917c6a867a4be1af9df1c2c03d20906b93/nri-postgresql/src/Postgres/Error.hs | haskell | module Postgres.Error
( Error (..),
)
where
import qualified Control.Exception.Safe as Exception
import qualified Log
import qualified Text
import Prelude (Show (show))
| A postgres query might fail with one of these errors .
data Error
= Timeout Float
| UniqueViolation Text
| ForeignKeyConstraintViolatio... | |
9bd785af55aa9215983a9b09ef8dfc8648af9c6dc0f35d119e1fe54c7d0e435e | brendanhay/amazonka | DeleteContent.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wisdom/gen/Amazonka/Wisdom/DeleteContent.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.Wisdom.DeleteContent
Stability : auto-generated
Deletes the content.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newDeleteContent' smart constructor.
|
Create a value of 'Dele... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
a84e27a9b1395c7076edd17a5125a70c7f7ddff0ec0dde98e3f1f24c61bfc576 | OCamlPro/freeton_wallet | commandDebot.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/d1f665145cabf794d1fb2fde3ee7b93778ca3fe5/src/freeton_wallet_lib/commandDebot.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ez_file.V1
open Ezcmd.V2
open EZCMD.TYPES
open EzFile.OP
type todo =
| New of string
let action todo =
match todo with
| New name ->
let basename = F... |
d08b606d379a8d7d484cd6afed06a70288022b29e1b47c7e68f23cd1cbaac692 | dimitaruzunov/fp-2018 | count-columns.scm | (require rackunit rackunit/text-ui)
(define (every? p l)
(or (null? l)
(and (p (car l))
(every? p (cdr l)))))
(define (compose f g)
(lambda (x) (f (g x))))
(define (any? p l)
(not (every? (compose not p) l)))
(define (transpose matrix)
(apply map list matrix))
(define (count-columns matrix... | null | https://raw.githubusercontent.com/dimitaruzunov/fp-2018/f75f0cd009cc7f41ce55a5ec71fb4b8eadafc4eb/exercises/06/count-columns.scm | scheme | (require rackunit rackunit/text-ui)
(define (every? p l)
(or (null? l)
(and (p (car l))
(every? p (cdr l)))))
(define (compose f g)
(lambda (x) (f (g x))))
(define (any? p l)
(not (every? (compose not p) l)))
(define (transpose matrix)
(apply map list matrix))
(define (count-columns matrix... | |
f9e0d32982e8f69633c98bf657715e83789f0b30b5effbb0b838bd1141a6cc85 | huangz1990/SICP-answers | 37-matrix-*-vector.scm | 37 - matrix-*-vector.scm
(load "37-dot-product.scm")
(define (matrix-*-vector m v)
(map (lambda (col)
(dot-product col v))
m))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/37-matrix-*-vector.scm | scheme | 37 - matrix-*-vector.scm
(load "37-dot-product.scm")
(define (matrix-*-vector m v)
(map (lambda (col)
(dot-product col v))
m))
| |
d70f2c86cd7fd7a1c86d9c043947b6e0d12d6e2fea6ff63b2e53ce939792f89f | dpom/nlp-tools | claim.clj | (ns nlptools.corpus.claim
(:require
[integrant.core :as ig]
[clojure.java.io :as io]
[clojure.string :as str]
[duct.logger :refer [log]]
[clojure.test :refer :all]
[clojure.spec.test.alpha :as stest]
[clojure.spec.gen.alpha :as gen]
[nlpcore.protocols :as core]
[nlpcore.spec :as nsp]
[nlptools.mod... | null | https://raw.githubusercontent.com/dpom/nlp-tools/f513442e0ff993bba9daf1f5aff9582c61367324/src/nlptools/corpus/claim.clj | clojure | (ns nlptools.corpus.claim
(:require
[integrant.core :as ig]
[clojure.java.io :as io]
[clojure.string :as str]
[duct.logger :refer [log]]
[clojure.test :refer :all]
[clojure.spec.test.alpha :as stest]
[clojure.spec.gen.alpha :as gen]
[nlpcore.protocols :as core]
[nlpcore.spec :as nsp]
[nlptools.mod... | |
20d19d9a8b2af88f6ada77e667e54b6bd77841d404696f0330a22bc7f5b9b208 | alexandergunnarson/quantum | regex.cljc | (ns
^{:doc "Regex utils"
:attribution "alexandergunnarson"}
quantum.core.string.regex
(:refer-clojure :exclude [conj! range concat find])
(:require
#?(:cljs [goog.string :as gstr])
[clojure.string :as str]
[quantum.core.data.string
:refer [!str]])
(:import
... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/string/regex.cljc | clojure | -regex-is-b-equivalent-to-and-is-there-a-way-to-deparse-it
TODO: not using ccoll because this namespace is required for `defnt` | (ns
^{:doc "Regex utils"
:attribution "alexandergunnarson"}
quantum.core.string.regex
(:refer-clojure :exclude [conj! range concat find])
(:require
#?(:cljs [goog.string :as gstr])
[clojure.string :as str]
[quantum.core.data.string
:refer [!str]])
(:import
... |
f89176af28e2ac42b74e1edf6d6e71ae198a90364fca9cb1f59e32503b3d99e9 | ocaml-multicore/tezos | baking_errors.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_delegate/baking_errors.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
cd9ca8d8f2342c5f7da15863f566e54f80ea06bcca44d18ab1bdb06b937e58b9 | MondayMorningHaskell/AdventOfCode | Third.hs | module Third where
import Control.Monad.State
import Data.List.Split (splitOn)
import qualified Data.Heap as H
import qualified Data.Map as M
import qualified Data.Set as Set
import Data.Maybe (catMaybes)
import System.Environment
import Second (addForKey, Coord3)
solveDirac :: IO ()
solveDirac = do
args <- getArg... | null | https://raw.githubusercontent.com/MondayMorningHaskell/AdventOfCode/266e3508c74a58ed4a057fefe8a27865a6f852f4/src/Third.hs | haskell | print starts
let losingScore = min (p1Score finalState) (p2Score finalState)
print $ losingScore * dieRolls finalState
Player 1 Position
Player 2 Position
Player 1 Score
Player 2 Score
Day 22
let cubes' = filter isSmall cubes
print finalCubes
Invariant: No two cubes contain any overlapping points.
c1 = 1 1 ... | module Third where
import Control.Monad.State
import Data.List.Split (splitOn)
import qualified Data.Heap as H
import qualified Data.Map as M
import qualified Data.Set as Set
import Data.Maybe (catMaybes)
import System.Environment
import Second (addForKey, Coord3)
solveDirac :: IO ()
solveDirac = do
args <- getArg... |
5829570de9ae14326955abac763be1491e946811c36dfb688066c8219bb8a212 | kmi/irs | saved-new.lisp | Mode : Lisp ; Package :
Author :
The Open University
(in-package "OCML")
(in-ontology cost-ontology)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/cost-ontology/saved-new.lisp | lisp | Package : |
Author :
The Open University
(in-package "OCML")
(in-ontology cost-ontology)
|
634682cc3737b5e0e84a176c636998be9da1929a381909b19c86ae9548c462b5 | dparis/phzr | keyboard.cljs | (ns phzr.keyboard
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [update]))
(defn ->Keyboard
"The Keyboard class monitors keyboard input and dispatches keyboard events.
_Be aware_ that many keyboards... | null | https://raw.githubusercontent.com/dparis/phzr/5a798f280a36db137d4e4576d6f324bfd3212112/src/phzr/keyboard.cljs | clojure | ` | (ns phzr.keyboard
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [update]))
(defn ->Keyboard
"The Keyboard class monitors keyboard input and dispatches keyboard events.
_Be aware_ that many keyboards... |
14b8c1d1684320da26cdc35c00249708307478bc8a3ae27e1bc8792822185b87 | konn/lambda-pi | REPL.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLabels #
{-# LANGUAGE OverloadedStrings #-}
module Language.Lambda.Syntax.L... | null | https://raw.githubusercontent.com/konn/lambda-pi/635b9d304b1d51a39d05e7df263bb26012dc9577/src/Language/Lambda/Syntax/LambdaPi/REPL.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLabels #
module Language.Lambda.Syntax.LambdaPi.REPL where
import Control.Exception (Exception)
import Control.Lens (At (at), use, (.=),... |
a11b63ea965db39fef4a3244086ebc5839535d0c53ce633e60ff7ceac31a98d2 | tonyrog/tree_db | tree_db.erl | @author < >
( C ) 2015 ,
%%% @doc
data base
%%% @end
Created : 19 Oct 2015 by < >
-module(tree_db).
-export([new/1, lookup/2, insert/2, delete/1, delete/2, clear/1,
first/1, last/1, next/2, prev/2,
first_child/2, last_child/2, next_sibling/2, prev_sibling/2,
foldl/3, foldr/3, foldbl/3, fold... | null | https://raw.githubusercontent.com/tonyrog/tree_db/b04046ca26cfc42d58ffbadbf0290b932de04b44/src/tree_db.erl | erlang | @doc
@end
R15 !
fold functions get internal key format as input, convert with
external_key(Key) if needed.
external key, return external key
is_parent is true if Parent is a Prefix of Child
[a,b] is a parent of [a,b,c,d] and {true,[a,b,c]} is returned
example: [a,b,c] is a sibling of [a,b,d,e] and {true,[a,b... | @author < >
( C ) 2015 ,
data base
Created : 19 Oct 2015 by < >
-module(tree_db).
-export([new/1, lookup/2, insert/2, delete/1, delete/2, clear/1,
first/1, last/1, next/2, prev/2,
first_child/2, last_child/2, next_sibling/2, prev_sibling/2,
foldl/3, foldr/3, foldbl/3, foldbr/3,
depth_firs... |
9b8cbb5bde692ea0d1e745cdeaffc30eacda911b57bd41d3d0678cc05fe12a45 | qkrgud55/ocamlmulti | big_int.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/otherlibs/num/big_int.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
$ I d : big_int.ml 11156 2011 - 07 - 27 14:17:0... |
e5afd83bb107ca18a084507f28cc8d7b6f6f5329e4201746d63af57e9d607029 | pedestal/pedestal-app | console_log.cljs | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this licens... | null | https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/src/io/pedestal/app/util/console_log.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns io.pedestal.app.util.console-log)
(defn log-map [m]
(let [d (assoc m :timestamp (.getTime (js/Date.)))]
(.log js/console (pr-str d))))
(defn log [& args]
(log-map (apply hash-map args)))
|
8bf90770cd5c1ad8eb3305d22ad99c492dae10826bab8486a03063fdbfe93a4e | landakram/kiwi-desktop | markdown_processors.cljs | (ns kiwi.markdown-processors
(:require [kiwi.utils :as utils]))
(def markdown (js/require "remark-parse"))
(def remark-to-rehype (js/require "remark-rehype"))
(def fmt-html (js/require "rehype-format"))
(def html (js/require "rehype-stringify"))
(def unified (js/require "unified"))
(def task-list-plugin (js/require ... | null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/markdown_processors.cljs | clojure | (ns kiwi.markdown-processors
(:require [kiwi.utils :as utils]))
(def markdown (js/require "remark-parse"))
(def remark-to-rehype (js/require "remark-rehype"))
(def fmt-html (js/require "rehype-format"))
(def html (js/require "rehype-stringify"))
(def unified (js/require "unified"))
(def task-list-plugin (js/require ... | |
9864a0d6b1f6bb3134730d9adc1a2eb1efb56299d53a6a23f6f8c903717dbeca | stan-dev/stanc3 | Memory_patterns.ml | open Core_kernel
open Core_kernel.Poly
open Middle
*
Return a expression of the name for each type
containing an eigen matrix
Return a Var expression of the name for each type
containing an eigen matrix
*)
let rec matrix_set Expr.Fixed.{pattern; meta= Expr.Typed.Meta.{type_; _} as meta}
=
let ... | null | https://raw.githubusercontent.com/stan-dev/stanc3/e83fe4be8acf8880a1522d1908ce7aad95d58a55/src/analysis_and_optimization/Memory_patterns.ml | ocaml | *
Query to find the initial set of objects that cannot be SoA.
This is mostly recursing over expressions, with the exceptions
being functions and indexing expressions. For the logic on functions
see the docs for [query_initial_demotable_funs].
@param in_loop a boolean to signify if the expression exists in... | open Core_kernel
open Core_kernel.Poly
open Middle
*
Return a expression of the name for each type
containing an eigen matrix
Return a Var expression of the name for each type
containing an eigen matrix
*)
let rec matrix_set Expr.Fixed.{pattern; meta= Expr.Typed.Meta.{type_; _} as meta}
=
let ... |
b5e327f8bcc79748d13c0bcbefdce7adf136afcc61119c5136864f03a39ee4a7 | JAremko/spacetools | orgify_test.clj | (ns spacetools.spacedoc.org.orgify-test
"Testing export to .org format."
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[cl... | null | https://raw.githubusercontent.com/JAremko/spacetools/d047e99689918b5a4ad483022f35802b2015af5f/components/spacedoc/test/spacetools/spacedoc/org/orgify_test.clj | clojure | Generate tests for SDN -> org string conversions. | (ns spacetools.spacedoc.org.orgify-test
"Testing export to .org format."
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[cl... |
73a56e315afa162699a28ee641e3ab9de077d5c005001705a5199b2a1f9d483e | HunterYIboHu/htdp2-solution | ex398-value.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 ex398-value) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repe... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section23-Simultaneous-Processing/ex398-value.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
A LC(short for linear combination) is [List-of Number]
interpretation means a fixed order of variables' coefficient.
interpretation means a fixed numebr of variables' value.
constants
functions
computes the value... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex398-value) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
A VV(short for variable values ) is [ List - o... |
51ed9f576323d3d6d822d88c2bb25b5e4317d34b56e621e0dfc13931b071088a | avsm/ocaml-docker-scripts | dockerfile-bulk.ml | #!/usr/bin/env ocamlscript
Ocaml.packs := ["dockerfile.opam"; "dockerfile.opam-cmdliner"]
--
Generate local Dockerfiles for bulk builds . These are intended to be
rebuilt regularly so that the ONBUILD triggers are hit and the repository
git checkout is refreshed . ISC License is at the end of the file .
... | null | https://raw.githubusercontent.com/avsm/ocaml-docker-scripts/86fd07285c33fdbe70d3201f7681cb187a115fca/dockerfile-bulk.ml | ocaml | #!/usr/bin/env ocamlscript
Ocaml.packs := ["dockerfile.opam"; "dockerfile.opam-cmdliner"]
--
Generate local Dockerfiles for bulk builds . These are intended to be
rebuilt regularly so that the ONBUILD triggers are hit and the repository
git checkout is refreshed . ISC License is at the end of the file .
... | |
e7ab6e3b57f6ba3e8e170c0f7cdab5981e66f8454951f528bca8ff248814af69 | imrehg/ypsilon | init.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk init)
(export gdk_init
gdk_init_check)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x1... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/init.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk init)
(export gdk_init
gdk_init_check)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x1... |
0c2bbb689a9b9923212c172e57994302bdf7d8c847ec58b77d60285ae3c7bcb4 | ChrisPenner/SitePipe | SitePipe.hs | module SitePipe
(
-- * SitePipe
-- | This module re-exports everything you need to build a site.
In addition to exporting all of SitePipe it also exports " Data . Aeson " , " Data . Aeson . Lens " ,
" Control . Lens " , " System . FilePath . " , and ' liftIO '
-- * Running SitePipe
site
, siteWith... | null | https://raw.githubusercontent.com/ChrisPenner/SitePipe/3ccf9d3ac7618592bb33df95ea3c0e1ce8ba454d/src/SitePipe.hs | haskell | * SitePipe
| This module re-exports everything you need to build a site.
* Running SitePipe
* Loaders
* Writers
* Loader/Writers
* Readers
** Built-in
** Reader Generators
* Utilities
* Types
* Exports | module SitePipe
(
In addition to exporting all of SitePipe it also exports " Data . Aeson " , " Data . Aeson . Lens " ,
" Control . Lens " , " System . FilePath . " , and ' liftIO '
site
, siteWithGlobals
, resourceLoader
, writeWith
, writeTemplate
, textWriter
, copyFiles
, copyFilesWi... |
3f502daeb3edc4e22cc64bd13ddc868039b826562e3b8bed21bd5eed2b10fe81 | maaleske/clif | Basis.hs | |
Module : . Basis
Copyright : ( c ) , 2016 - 2017
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
= Motivation
A Clifford algebra is generated by a set of linearly independent ( but not necessarily orthogonal ) basis vectors and a metric ( bilinear form ... | null | https://raw.githubusercontent.com/maaleske/clif/abce0365b71ca168cf7fc798772b9be1b4a1562b/src/Clif/Basis.hs | haskell | * Classes
* Basis construction
* Multiplication of blades
* Computation of canonical order
| A typeclass for specifying a metric space
The default implementation uses 'orthoMul'; Replace it if you require a non-diagonal metric.
| Free multiplication of scaled blades (concatenation of vectors and multiplication ... | |
Module : . Basis
Copyright : ( c ) , 2016 - 2017
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
= Motivation
A Clifford algebra is generated by a set of linearly independent ( but not necessarily orthogonal ) basis vectors and a metric ( bilinear form ... |
b16050ff6a726554a433f87bab20a9be10fb300433b74b5b035a54c7fca6463c | hbr/albatross | gamma_algo.mli | type name_violation =
| Upper_for_proposition
| Lower_for_type
| Upper_for_object
val strings_of_violation: name_violation -> string * string
module type GAMMA =
sig
type t
val count: t -> int
(** Number of variables in the context. *)
val is_valid_index: int -> t -> bool
val nam... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/core/gamma_algo.mli | ocaml | * Number of variables in the context.
*
[push_local name typ gamma]
Add the local variable with [name] and [typ] to the context.
Precondition
{[name <> ""]}
*
[definition_term idx gamma]
If the variable [idx] has a definition, then return it. Otherwise return
... | type name_violation =
| Upper_for_proposition
| Lower_for_type
| Upper_for_object
val strings_of_violation: name_violation -> string * string
module type GAMMA =
sig
type t
val count: t -> int
val is_valid_index: int -> t -> bool
val name_of_index: int -> t -> string
val push_lo... |
ac6b6815fd6d5873ad28dc4cbae632582bcf3bd61950cd5160f85416829685d3 | pjones/playlists | Playlist.hs |
This file is part of the package playlists . It is subject to
the license terms in the LICENSE file found in the top - level directory
of this distribution and at git . No part
of playlists package , including this file , may be copied , modified ,
propagated , or distributed except according to the terms c... | null | https://raw.githubusercontent.com/pjones/playlists/35e4a91e599eac4a1c6f24500d120692e709fd1f/src/Text/Playlist.hs | haskell | ------------------------------------------------------------------------------
* Playlist Types
* Playlist Formats
* Parsing and Generating
* Utility Functions
------------------------------------------------------------------------------ |
This file is part of the package playlists . It is subject to
the license terms in the LICENSE file found in the top - level directory
of this distribution and at git . No part
of playlists package , including this file , may be copied , modified ,
propagated , or distributed except according to the terms c... |
35c158f4ad70cd9ff941474719350f47f8ba4aef8ad834b3a77e353aa3783ac9 | janestreet/hardcaml_c | codegen.ml |
open Core
open Hardcaml
let word_size = 64
let word_bytes = word_size / 8
type normal_signal_info =
{ width : int
; index : [ `Local of int | `Global of int ]
}
type signal_info =
(* A constant *)
| Const of Bits.t
(* A signal other than constant. *)
| Normal of normal_signal_info
(* An eliminated w... | null | https://raw.githubusercontent.com/janestreet/hardcaml_c/1bf2468801ba9f6a935ffcd08887d9da87bee3f1/lib/codegen.ml | ocaml | A constant
A signal other than constant.
An eliminated wire - contains [normal_signal_info] of the target signal.
ID of a local variable the signal is stored in.
Return C code that evaluates to word of signal starting at bit [bit_offset].
this is undefined behaviour, but we compile with -fno-strict-aliasing ... |
open Core
open Hardcaml
let word_size = 64
let word_bytes = word_size / 8
type normal_signal_info =
{ width : int
; index : [ `Local of int | `Global of int ]
}
type signal_info =
| Const of Bits.t
| Normal of normal_signal_info
| Virtual of normal_signal_info
let width = function
| Const c -> Bits.w... |
0dbfeee3d21e4fa7f04232166d5e3d024454d940a4bb8ba1fc3ca59e144ffb51 | SonyCSLParis/BENG | be.lisp | Copyright ( C ) 2019 Sony Computer Science Laboratories Paris
( www.remivantrijp.eu )
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , version 3 o... | null | https://raw.githubusercontent.com/SonyCSLParis/BENG/1eb525e132d2b1f74ae18532657561725f6fbb78/lexicon/auxiliaries/be.lisp | lisp |
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for mo... | Copyright ( C ) 2019 Sony Computer Science Laboratories Paris
( www.remivantrijp.eu )
it under the terms of the GNU General Public License as published by
the Free Software Foundation , version 3 of the License .
You should have received a copy of the GNU General Public Li... |
1c6b735da5c3be4314e97c963c313e16daa9fcdd0d97f0bbb908d12b621fc94e | clojusc/ltest | sample5.clj | (ns ltest.group2.samples.sample5
(:require
[clojure.test :refer [are deftest is testing]]
[ltest.core :refer [run-test run-tests run-suite run-suites]]))
(deftest single-pass-test
(is true))
(deftest single-fail-test
(is false))
(deftest single-error-test
(throw (new Exception "oops")))
| null | https://raw.githubusercontent.com/clojusc/ltest/e82073d830e0e66018bbd6c98f49b0617cd2fa88/ltest/resources/sample-tests/src/ltest/group2/samples/sample5.clj | clojure | (ns ltest.group2.samples.sample5
(:require
[clojure.test :refer [are deftest is testing]]
[ltest.core :refer [run-test run-tests run-suite run-suites]]))
(deftest single-pass-test
(is true))
(deftest single-fail-test
(is false))
(deftest single-error-test
(throw (new Exception "oops")))
| |
4307359f5e752f07721ea91492cd476bbb619b21f6eabdb50feee1e19c10fea6 | let-def/autoprinter | autoprinter.ml | open Types
let cons_path path id =
let comp = Ident.name id in
match path with
| None -> Longident.Lident comp
| Some path -> Longident.Ldot (path, comp)
let is_auto_printer_attribute (attr : Parsetree.attribute) =
match attr.attr_name.txt with
| "toplevel_printer" | "ocaml.toplevel_printer" -> true
| _... | null | https://raw.githubusercontent.com/let-def/autoprinter/d201de32cb9313fbba16caa6bb5e7bca74f52145/lib/autoprinter.ml | ocaml | open Types
let cons_path path id =
let comp = Ident.name id in
match path with
| None -> Longident.Lident comp
| Some path -> Longident.Ldot (path, comp)
let is_auto_printer_attribute (attr : Parsetree.attribute) =
match attr.attr_name.txt with
| "toplevel_printer" | "ocaml.toplevel_printer" -> true
| _... | |
0ba5f36817ab830f56907aa507ad455d36890cedea86fc92a4c3b78c3f7e832a | MinaProtocol/mina | snark_worker.mli | module Prod = Prod
module Intf : module type of Intf
include Intf.S with type ledger_proof := Ledger_proof.t
type Structured_log_events.t +=
| Generating_snark_work_failed of { error : Yojson.Safe.t }
[@@deriving register_event]
| null | https://raw.githubusercontent.com/MinaProtocol/mina/cee2e182c50d1e36f132e73a146ff0be613f2bb5/src/lib/snark_worker/snark_worker.mli | ocaml | module Prod = Prod
module Intf : module type of Intf
include Intf.S with type ledger_proof := Ledger_proof.t
type Structured_log_events.t +=
| Generating_snark_work_failed of { error : Yojson.Safe.t }
[@@deriving register_event]
| |
b67e2bebdc6a01d054f9f73ee4698d3ae663645ae15ec47c09dbc70f88b09181 | ska80/thinlisp | l-expr.lisp | (in-package "TLI")
;;;; Module L-EXPR
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1995 Gensym Corporation .
;;; All rights reserved.
This file is part of ThinLisp .
ThinLisp is open source ; you can redistribute it and/or modify it
under the terms of the ThinLisp License as published by... | null | https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tlt/lisp/l-expr.lisp | lisp | Module L-EXPR
All rights reserved.
you can redistribute it and/or modify it
either version 1 or ( at your option ) any later version .
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Lisp Expression Structures
This file contains definitions of stru... | (in-package "TLI")
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1995 Gensym Corporation .
This file is part of ThinLisp .
under the terms of the ThinLisp License as published by the ThinLisp
ThinLisp is distributed in the hope that it will be useful , but
For additional information s... |
9221274d049b7b3fc54ef2aa82ea599edbfb2983f5178c7d72e9a114959b38b6 | olsner/sedition | Parser.hs | {-# LANGUAGE OverloadedStrings, ApplicativeDo #-}
module Parser (parseString, parseOnly, pFile) where
import Control.Applicative
import Data.Bits
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.UTF8 as UTF8
import Data.Char (digitToInt, toUpper)... | null | https://raw.githubusercontent.com/olsner/sedition/0f157000951e2cce0a735f08210ccda6703915a3/Parser.hs | haskell | # LANGUAGE OverloadedStrings, ApplicativeDo #
Backtracking could be avoided here - we shouldn't need to reparse pAddress
Same but also delimited by : (for :port)
command), after that backslash followed by newline continues the text on the
multiline text.
Reads a "slash"-terminated (the terminator itself already pa... |
module Parser (parseString, parseOnly, pFile) where
import Control.Applicative
import Data.Bits
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.UTF8 as UTF8
import Data.Char (digitToInt, toUpper)
import Data.Maybe
import System.Exit
import Tex... |
21cb40c4282e77e7db098a7ec954f7eb7d8492358516bc85627494eb0a8a7e24 | bos/rwh | Carrier.hs | {-- snippet findCarrierBillingAddress --}
import qualified Data.Map as M
type PersonName = String
type PhoneNumber = String
type BillingAddress = String
data MobileCarrier = Honest_Bobs_Phone_Network
| Morrisas_Marvelous_Mobiles
| Petes_Plutocratic_Phones
deri... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch15/Carrier.hs | haskell | - snippet findCarrierBillingAddress -
- /snippet findCarrierBillingAddress -
- snippet variation1 -
- /snippet variation1 -
- snippet variation2 -
- /snippet variation2 -
- snippet variation2a -
- /snippet variation2a -
- /snippet variation3 - | import qualified Data.Map as M
type PersonName = String
type PhoneNumber = String
type BillingAddress = String
data MobileCarrier = Honest_Bobs_Phone_Network
| Morrisas_Marvelous_Mobiles
| Petes_Plutocratic_Phones
deriving (Eq, Ord)
findCarrierBillingAddress ... |
0dd17accaa5a4980004645cf73b606643b4f530e8ca0afb0327c286b153728c6 | naoiwata/sicp | 3.3.3.scm | ;;
;; @author naoiwata
SICP Chapter3
3.3.3 Representing Tables
;;
One - dimensional tables ;
(define (lookup key table)
(let
((record (assoc key (cdr table))))
(if record
(cdr record)
#f)))
(define (assoc key records)
(cond
((null? records)
#f)
((equal? key (caar recor... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/pages/3.3.3.scm | scheme |
@author naoiwata
Creating local tables ;
END | SICP Chapter3
3.3.3 Representing Tables
(define (lookup key table)
(let
((record (assoc key (cdr table))))
(if record
(cdr record)
#f)))
(define (assoc key records)
(cond
((null? records)
#f)
((equal? key (caar records))
(car records))
(else
(assoc key (c... |
3d8f53ef5f5f6f475730de202a217db524b0375cf94d03ffae4ddcc406a322b5 | aryx/xix | diff_unified.ml | (*s: version_control/diff_unified.ml *)
(*s: copyright ocamlgit *)
Copyright 2017 , see copyright.txt
(*e: copyright ocamlgit *)
open Common
(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)
... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/version_control/diff_unified.ml | ocaml | s: version_control/diff_unified.ml
s: copyright ocamlgit
e: copyright ocamlgit
***************************************************************************
Prelude
***************************************************************************
***************************************************************************
... | Copyright 2017 , see copyright.txt
open Common
Show differences between 2 files .
*
* Short explanation of unified format :
* - -Unified.html
* -
*
* alternatives :
* - ocamldiff :
* parse and display unified diffs
* - unidiff : -unidiff
* parse
* - call diff... |
3140c7d4f5ffc902d8d5521dd44e0ea4d22f2810d437d07973ae0c9731bc20a6 | polyfy/polylith | os.clj | (ns polylith.clj.core.util.os
(:require [clojure.string :as str]))
(defn windows-os? []
(str/includes? (-> "os.name" System/getProperty str/lower-case) "win"))
| null | https://raw.githubusercontent.com/polyfy/polylith/76936c752fb5b729c216b23d92c8a8d71cfdc92f/components/util/src/polylith/clj/core/util/os.clj | clojure | (ns polylith.clj.core.util.os
(:require [clojure.string :as str]))
(defn windows-os? []
(str/includes? (-> "os.name" System/getProperty str/lower-case) "win"))
| |
e7eaf1edbe49135b0e17b142a4073c949b263e59fe5a5a262c174fe8766a9ad2 | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_cruiserPowerCmd.lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(POWER_CMD-VAL
POWER_CMD
)) | 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_cruiserPowerCmd.lisp | lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(POWER_CMD-VAL
POWER_CMD
)) | |
5ae8d4e0ff995248a1eca950e547006cd53ea55a894584a5babed58ea1984290 | int-e/haskell-src-exts-simple | Simple.hs | -- |
-- This module exports all relevant modules of the haskell-src-exts-simple package.
--
The most important module is " Language . Haskell . Exts . Simple . Syntax " .
# LANGUAGE PatternSynonyms #
module Language.Haskell.Exts.Simple (
module Language.Haskell.Exts.Simple.Syntax,
module Language.Haskell.Ext... | null | https://raw.githubusercontent.com/int-e/haskell-src-exts-simple/4a5cc80de8b34f81d5f264a6c4e23dadff944b30/src/Language/Haskell/Exts/Simple.hs | haskell | |
This module exports all relevant modules of the haskell-src-exts-simple package.
useful for interpreting parse errors
* Functions | The most important module is " Language . Haskell . Exts . Simple . Syntax " .
# LANGUAGE PatternSynonyms #
module Language.Haskell.Exts.Simple (
module Language.Haskell.Exts.Simple.Syntax,
module Language.Haskell.Exts.Simple.Build,
module Language.Haskell.Exts.Simple.Pretty,
module Language.Haskell.... |
76efb701a74706a34700bb97b6b4ce632cc21293c2fd86f4c6db439af2e95792 | vitorenesduarte/tricks | tricks_driver_message.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2018 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/vitorenesduarte/tricks/9ba11252be128be481b4d4a00fe162ccdbdac501/src/tricks_driver_message.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2018 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(tricks_driver_messag... |
b6d65548c4adf094273488643c29154cb2ad0e170ebd6c5919f952ecf4f27122 | runtimeverification/haskell-backend | Condition.hs | module Test.Kore.Internal.Condition (
TestCondition,
module Kore.Internal.Condition,
) where
import Kore.Internal.Condition
import Kore.Rewrite.RewritingVariable (
RewritingVariableName,
)
type TestCondition = Condition RewritingVariableName
| null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/test/Test/Kore/Internal/Condition.hs | haskell | module Test.Kore.Internal.Condition (
TestCondition,
module Kore.Internal.Condition,
) where
import Kore.Internal.Condition
import Kore.Rewrite.RewritingVariable (
RewritingVariableName,
)
type TestCondition = Condition RewritingVariableName
| |
801195c43fb45ed987de842eb17189f8a0d71ca5638c9f7f96c05633de0fb2fd | wangweihao/ProgrammingErlangAnswer | datetime.erl | % 查找Python datetime 模块手册页。找出Python的datetime类里有多啊函数哦啊方法
% 可以通过erlang模块里有关时间的内置函数实现。在erlang的手册页里查找等价的函数。
% 如果有明显的遗漏,就实现它。
| null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/4/4/datetime.erl | erlang | 查找Python datetime 模块手册页。找出Python的datetime类里有多啊函数哦啊方法
可以通过erlang模块里有关时间的内置函数实现。在erlang的手册页里查找等价的函数。
如果有明显的遗漏,就实现它。 | |
0f78ba4fa941a025b65b4f03dcfcf14b701eaced449d1fb119b663ca4fcdead8 | avsm/eeww | generative.ml | (* TEST
* expect
*)
(* Using generative functors *)
(* Without type *)
module type S = sig val x : int end;;
let v = (module struct let x = 3 end : S);;
module F() = (val v);; (* ok *)
module G (X : sig end) : S = F ();; (* ok *)
module H (X : sig end) = (val v);; (* ok *)
[%%expect{|
module type S = sig val x : i... | null | https://raw.githubusercontent.com/avsm/eeww/4834abb9a40a9f35d0d7041a61e53e3426d8886f/boot/ocaml/testsuite/tests/typing-modules/generative.ml | ocaml | TEST
* expect
Using generative functors
Without type
ok
ok
ok
With type
ok
fail
fail
ok
ok
fail
fail
Cannot coerce between applicative and generative
fail
fail
fail
fail
tests for shortened functor notation () |
module type S = sig val x : int end;;
let v = (module struct let x = 3 end : S);;
[%%expect{|
module type S = sig val x : int end
val v : (module S) = <module>
module F : functor () -> S
module G : functor (X : sig end) -> S
module H : functor (X : sig end) -> S
|}];;
module type S = sig type t val x : t end;;
let v... |
9c288573aaa66ea803bf18d7a867f162a1674a3788f4d9dc10a658158461ac07 | vrnithinkumar/ETC | hm.erl | -module(hm).
-export([solve/1,solvePreds/2]).
-export([unify/2]).
-export([emptySub/0,comp/2,subE/2
,subT/2,subP/2
,subPs/2,free/1
,isTVar/1]).
-export([bt/2,funt/3,tvar/2,tcon/3,forall/4, tMeta/4, tSkol/2]).
-export([freshTMeta/3, freshTMeta/4, freshTSkol/1, replaceFreshTMeta/2, generalizeType/1]).
-export... | null | https://raw.githubusercontent.com/vrnithinkumar/ETC/ef65be40f071356e9590cfe50687e43ee70331b1/src/hm.erl | erlang | Map <tvar(),type()>
Type variable constructors
L is line/length
A arguments , B is return type
A arguments list , B is return type
N:Name of the constructor A: args
P for predicates
apply new substitution to remaining constraints
compose substitutions
Unification algorithm
unify is left biased (this is a cruc... | -module(hm).
-export([solve/1,solvePreds/2]).
-export([unify/2]).
-export([emptySub/0,comp/2,subE/2
,subT/2,subP/2
,subPs/2,free/1
,isTVar/1]).
-export([bt/2,funt/3,tvar/2,tcon/3,forall/4, tMeta/4, tSkol/2]).
-export([freshTMeta/3, freshTMeta/4, freshTSkol/1, replaceFreshTMeta/2, generalizeType/1]).
-export... |
e021ae3d88944a15c45044ac09c1465010feb0eda7672d72e29c1a905402adbd | johnswanson/tictag | user.clj | (ns user
(:require [clojure.tools.namespace.repl :refer [refresh]]
[taoensso.timbre :as timbre]
[reloaded.repl :refer [system init start stop go reset]]
[com.stuartsierra.component :as component]
[tictag.config :refer [config]]
[tictag.filters]
[... | null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/dev/user.clj | clojure | (ns user
(:require [clojure.tools.namespace.repl :refer [refresh]]
[taoensso.timbre :as timbre]
[reloaded.repl :refer [system init start stop go reset]]
[com.stuartsierra.component :as component]
[tictag.config :refer [config]]
[tictag.filters]
[... | |
72ee5cac4ac597386152f7c7c87c3fd031e4ce030ef5358f89a1f35e72fafc0c | orchid-hybrid/microKanren-sagittarius | domains.scm | (define (merge-domains d1 d2)
(intersection (lambda (i) i) d1 d2))
(define (domain-store-update-associations k p)
sets the domain to # f if fails
(modified-domains
(lambda (dom)
(let loop ((dom dom) (p p))
(if (null? p)
dom
(let ((u (caar p)) (v (cdar p)))
(let-values (((dom found? ... | null | https://raw.githubusercontent.com/orchid-hybrid/microKanren-sagittarius/9e740bbf94ed2930f88bbcf32636d3480934cfbb/miruKanren/domains.scm | scheme | this is the case where the var was
unified with a ground value
TODO: This depends on the CDRs of the prefix being fully walked. Does that hold? | (define (merge-domains d1 d2)
(intersection (lambda (i) i) d1 d2))
(define (domain-store-update-associations k p)
sets the domain to # f if fails
(modified-domains
(lambda (dom)
(let loop ((dom dom) (p p))
(if (null? p)
dom
(let ((u (caar p)) (v (cdar p)))
(let-values (((dom found? ... |
d16892d1b4a988e83e7579c5144dabdc8bab60535b34a93fd661c23d83acd9c7 | glutamate/bugpan | Driver.hs | module Main where
import Control.Concurrent
import OpenGL
import Compiler
import Expr
import ImpInterpret
import Control.Monad
import Database
import BugPrelude
import Traverse
import Stages
import Transform
import System.Time
import Data.Maybe
import EvalM
import System . . Files
import System.Directory
import State... | null | https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/Driver.hs | haskell | dsPrelude :: [Declare]
chainM f (x:[]) = fx
chainM f (x:xs) =
fileDecls (cmdFile ds) []
let prgNoScreen = filter (noScreen screenVars) prg | module Main where
import Control.Concurrent
import OpenGL
import Compiler
import Expr
import ImpInterpret
import Control.Monad
import Database
import BugPrelude
import Traverse
import Stages
import Transform
import System.Time
import Data.Maybe
import EvalM
import System . . Files
import System.Directory
import State... |
a0d5cf913bb87be89ff25e404c043c36e7532a74bce7948e988e8bd42de91985 | fccm/glMLite | LablGL_to_glMLite.ml | #load "str.cma" ;;
let input_lines ~filename =
let rec input_loop ic acc =
try
let line = input_line ic in
match line with
| "" -> input_loop ic acc
| _ -> input_loop ic (line::acc)
with
End_of_file -> close_in ic; (acc)
in
let ic = open_in filename in
input_loop ic []
;;... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/LablGL/LablGL_to_glMLite.ml | ocaml | #load "str.cma" ;;
let input_lines ~filename =
let rec input_loop ic acc =
try
let line = input_line ic in
match line with
| "" -> input_loop ic acc
| _ -> input_loop ic (line::acc)
with
End_of_file -> close_in ic; (acc)
in
let ic = open_in filename in
input_loop ic []
;;... | |
71e39ce38c8a9f1c351d740c9640ba6d1083cf485f0dd2dc6eb87af0856f38d6 | spurious/sagittarius-scheme-mirror | %3a87.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; srfi/%3a87.scm - => in case clauses
;;;
Copyright ( c ) 2016 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistr... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a87.scm | scheme | coding : utf-8 ; -*-
srfi/%3a87.scm - => in case clauses
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of c... | Copyright ( c ) 2016 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (srfi :87)
(export :all)
(import (... |
4ccef339c4f75d0b8a9dc89e5988c53f6efceec8eb6dd16b8b4c484afb8e4f2c | Bodigrim/arithmoi | Bilinear.hs | -- |
Module : Math . . Recurrences . Bilinear
Copyright : ( c ) 2016
Licence : MIT
Maintainer : < >
--
Bilinear recurrent sequences and numbers ,
roughly covering Ch . 5 - 6 of /Concrete Mathematics/
by , and .
--
# memory # _ _ Note on memory leaks and memoization . _ _
-... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/979f3a8f02de17ea7e52392320d3e81f16bb6d32/Math/NumberTheory/Recurrences/Bilinear.hs | haskell | |
Top-level definitions in this module are polymorphic, so the results of computations are not retained in memory.
Make them monomorphic to take advantages of memoization. Compare
( 0.01 secs , 1,385,512 bytes )
( 0.01 secs , 1,381,616 bytes )
against
>>> let binomial' = binomial :: [[Integer]]
( 0.01 secs... | Module : Math . . Recurrences . Bilinear
Copyright : ( c ) 2016
Licence : MIT
Maintainer : < >
Bilinear recurrent sequences and numbers ,
roughly covering Ch . 5 - 6 of /Concrete Mathematics/
by , and .
# memory # _ _ Note on memory leaks and memoization . _ _
1
1
1
... |
d9939b891adf76fc48890612d94687bee2895cb45dcabcc05b1f6fecdd9e73ed | groundedsage/VeganBN-website | community.cljc | (ns vbn.community
#?(:cljs (:require-macros [vbn.styler :refer [css at-media]]))
(:require [rum.core :as rum]
[vbn.atoms :as atom]
[vbn.molecules :as molecule]
#?(:clj [vbn.styler :refer [css at-media get-css-str]])))
;;;;;;;;;
MEETUP BLOCK
;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/groundedsage/VeganBN-website/d04ebf49f409b7a1dfce98344556b479697995ae/src/cljc/vbn/community.cljc | clojure |
NEED TO FIXBELOW
API FOR MEMBERS
-host=public&sig_id=23539071&only=members&sig=3ef1f60056ecefb460690cfe496e3d07ac0188f5
API FOR EVENTS
FULL PAGE CONTENT ;;;;;;;;;;
| (ns vbn.community
#?(:cljs (:require-macros [vbn.styler :refer [css at-media]]))
(:require [rum.core :as rum]
[vbn.atoms :as atom]
[vbn.molecules :as molecule]
#?(:clj [vbn.styler :refer [css at-media get-css-str]])))
MEETUP BLOCK
(def meetup-num [(css {:width "2em"})])... |
3c31bb59bd41ebc3b6659905abecf94f0f9920e2286b2cde5b9392183f181a21 | kiranshila/HackerHUD | vfd.cljs | (ns hackerhud.vfd
(:require [hackerhud.utils :as utils]
[esprit.board :as board]))
(def serial (if-let [s (::serial board/items)]
s
(println "NOTE: hackerhud.vfd/serial not setup in boards.edn")))
(def commands {:init #js[0x1B 0x40]
:clear 0x0C
:... | null | https://raw.githubusercontent.com/kiranshila/HackerHUD/98943de4b37ecac31404531f1d82ced973b90527/src/hackerhud/vfd.cljs | clojure | (ns hackerhud.vfd
(:require [hackerhud.utils :as utils]
[esprit.board :as board]))
(def serial (if-let [s (::serial board/items)]
s
(println "NOTE: hackerhud.vfd/serial not setup in boards.edn")))
(def commands {:init #js[0x1B 0x40]
:clear 0x0C
:... | |
be5e05e6f36a1679ccc8ec3f55e564b57ddb8f7433065c1ab27fe9f14031aed6 | rainyt/ocaml-haxe | project_systest.ml |
let () = let start_time = Sys.time() in
let data = ref (Sys.os_type) in
(Printf.printf "%s%s\n" ("system=") (!data));
(Printf.printf "%s%b\n" ("big_endian=") (Sys.big_endian));
(Printf.printf "%s%b\n" ("cygwin=") (Sys.cygwin));
(Printf.printf "%s%s\n" ("executable_name=") (Sys.executable_name));
(Printf.printf "%s%i\n... | null | https://raw.githubusercontent.com/rainyt/ocaml-haxe/66fd2c85ed22b5564c55310a181c08895826c6ec/bin/project_systest.ml | ocaml |
let () = let start_time = Sys.time() in
let data = ref (Sys.os_type) in
(Printf.printf "%s%s\n" ("system=") (!data));
(Printf.printf "%s%b\n" ("big_endian=") (Sys.big_endian));
(Printf.printf "%s%b\n" ("cygwin=") (Sys.cygwin));
(Printf.printf "%s%s\n" ("executable_name=") (Sys.executable_name));
(Printf.printf "%s%i\n... | |
8b981a191785b0881bc1c9fa859dc674f6c7fb39881cf738334170cf0a725820 | brawnski/git-annex | Hook.hs | A remote that provides hooks to run shell commands .
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Hook (remote) where
import qualified Data.ByteString.Lazy.Char8... | null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Remote/Hook.hs | haskell | make way for hook output | A remote that provides hooks to run shell commands .
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Hook (remote) where
import qualified Data.ByteString.Lazy.Char8... |
4a46bc7715419d094586ce51e9cfdb59f2347183bbd894c3ecebc11cb73c1af9 | babashka/babashka | macros_test.clj | (ns com.wsscode.misc.macros-test
(:require
[clojure.test :refer [deftest is are run-tests testing]]
[com.wsscode.misc.macros :as macros]))
(deftest full-symbol-test
(is (= (macros/full-symbol
'known/foo
"bar")
'known/foo))
(is (= (macros/full-symbol
'foo
... | null | https://raw.githubusercontent.com/babashka/babashka/093709386a5c3b22b733ae0bfc1b27dec832c02f/test-resources/lib_tests/com/wsscode/misc/macros_test.clj | clojure | (ns com.wsscode.misc.macros-test
(:require
[clojure.test :refer [deftest is are run-tests testing]]
[com.wsscode.misc.macros :as macros]))
(deftest full-symbol-test
(is (= (macros/full-symbol
'known/foo
"bar")
'known/foo))
(is (= (macros/full-symbol
'foo
... | |
891252153e3f6f2f6f0a32b6b5ab37f332c0938120ba12faea52c83c9142faf7 | Liutos/Project-Euler | pro44.lisp | (defun pentagonal-p (n)
(let ((rt (/ (1+ (sqrt (1+ (* 24 n)))) 6)))
(= (truncate rt) rt)))
(defun ptg-num (i)
(/ (* i (- (* 3 i) 1)) 2))
(defun maybe-d (idx)
(let ((n (ptg-num idx)))
(loop :for i :from (- idx 1) :downto 1
:do (let ((m (ptg-num i)))
(if (and (pentagonal-p (- n m))
(p... | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/lisp/pro44.lisp | lisp | (defun pentagonal-p (n)
(let ((rt (/ (1+ (sqrt (1+ (* 24 n)))) 6)))
(= (truncate rt) rt)))
(defun ptg-num (i)
(/ (* i (- (* 3 i) 1)) 2))
(defun maybe-d (idx)
(let ((n (ptg-num idx)))
(loop :for i :from (- idx 1) :downto 1
:do (let ((m (ptg-num i)))
(if (and (pentagonal-p (- n m))
(p... | |
7e35714f32ad7e02a7749cb72f67f971338215b972d5f276336184c413cad37e | leondavi/NErlNet | devScreen.erl |
-module(devScreen).
-behaviour(wx_object).
-export([new/2, show/1, destroy/1]). %% API
-export([init/1, handle_call/3, handle_cast/2, handle_event/2, handle_info/2]).
-define(SERVER_ID, 711).
-include("gui_tools.hrl").
%% Client API
new(Parent, Gen) ->
wx_object:start(?MODULE, [Parent, Gen], []).
show(Frame)... | null | https://raw.githubusercontent.com/leondavi/NErlNet/483ae9f33fc85ae704988656dcf2f6c3eaf8f557/src_erl/NerlGUI/src/devScreen.erl | erlang | API
Client API
add button for each router
add button for each router
add button for each router
destroy(State#state.frame);
io:format("Rbuttons are: ~p", [RButtons]),
Id = hd(lists:reverse(Name))-48 |
-module(devScreen).
-behaviour(wx_object).
-export([init/1, handle_call/3, handle_cast/2, handle_event/2, handle_info/2]).
-define(SERVER_ID, 711).
-include("gui_tools.hrl").
new(Parent, Gen) ->
wx_object:start(?MODULE, [Parent, Gen], []).
show(Frame) ->
wx_object:call(Frame, show_modal).
destroy(Frame) ... |
5b877d9be2e46b6d1fd4dd8a88f3a643a722d8e653b627a93e848eb2a14a3c6e | earl-ducaine/cl-garnet | kr-doc.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: :Kr -*-
;;*******************************************************************;;
The Garnet User Interface Development Environment . ; ;
;;*******************************************************************;;
This code was written by at Statistical... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/kr/kr-doc.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: :Kr -*-
*******************************************************************;;
;
*******************************************************************;;
;
as an independent contribution to the Garnet project at ;;
;
domain. ... |
$ Id$
The first half of the convention is easy . Each schema can have a
The second half of the convention provides information about
doc - string for a schema . It will search first the local slot and
not wanted ( i.e. , when this file has not been loaded first . )
# + kr - doc (: documentation ... |
f60d2c30b08a9072ef8bf6f00152bf250315bba8c7560e364a92518fd55b2427 | bmeurer/ocaml-experimental | asttypes.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/parsing/asttypes.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
Auxiliary a.s.t . types used... |
2d5b519801a4f84fb586b534c6e8921849ea79f028785bb1ca3f7eb82749ae63 | rigidus/rigidus.ru | defmodule.lisp | ;; [[file:~/src/rigidus.ru/org/lrn/crypto/mycoin.org::defmodule][defmodule]]
Copyright © 2014 - 2018 . All rights reserved .
;;;; Licensed under the GNU AGPLv3
(restas:define-module #:mycoin
(:use #:closer-mop #:cl #:iter #:alexandria #:anaphora #:postmodern)
(:shadowing-import-from :closer-mop
... | null | https://raw.githubusercontent.com/rigidus/rigidus.ru/34fe088f5c3d22243b49cf97f376c8f3c1243dff/org/lrn/crypto/src/defmodule.lisp | lisp | [[file:~/src/rigidus.ru/org/lrn/crypto/mycoin.org::defmodule][defmodule]]
Licensed under the GNU AGPLv3
special syntax for pattern-matching - ON
Отладочный вывод
else
clear-db
contains
empty
Механизм трансляции путей
`(("source;*.*"
,(concatenate 'string *base-path* "org/*.org"))
("pub... | Copyright © 2014 - 2018 . All rights reserved .
(restas:define-module #:mycoin
(:use #:closer-mop #:cl #:iter #:alexandria #:anaphora #:postmodern)
(:shadowing-import-from :closer-mop
:defclass
:defmethod
:standard-class
... |
eb18b8bcb7bcb1330675fe879d77889498a678c5d73734f393bb3239a3a13c28 | clojure/core.typed | set_bang.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/check/set_bang.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.checker.check.set-bang
(:require [clojure.core.typed.util-vars :as vs]
[clojure.core.typed.checker.utils :as u]
[clojure.core.typed.checker.check.utils :as cu]
[clojure.core.typed.checker.type-rep :as r]
... |
dfd52f439b9c9cb5e1d1bee64929a67b9f71963ebc27afe8161c7957054a2c0d | facebook/flow | ty_normalizer.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/d3c792ce86a18b200eb4cf9ff66734c2002951f1/src/typing/ty_normalizer.mli | ocaml | The following differ from mapping `from_type` on each input as it folds over
the input elements of the input propagating the state (caches) after each
transformation to the next element.
A debugging facility for getting quick string representations of Type.t |
* 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... |
b95fef6a5592e1d8218b7d0eddb45ff3d4cc6e627b7c2f8607ff0ea5fd3a5ec1 | inhabitedtype/ocaml-aws | describeReservedCacheNodes.mli | open Types
type input = DescribeReservedCacheNodesMessage.t
type output = ReservedCacheNodeMessage.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticache/lib/describeReservedCacheNodes.mli | ocaml | open Types
type input = DescribeReservedCacheNodesMessage.t
type output = ReservedCacheNodeMessage.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
159318ee4e2eaae11cd9601a92b284ad99589079b1f1abe15fe9bf3240dcc3bb | gmarceau/racket-utils | all.rkt | #lang racket
(require
"counting.rkt"
"cut.rkt"
"debug.rkt"
"file.rkt"
"hash.rkt"
"list.rkt"
"saving.rkt"
"table.rkt"
"test.rkt"
"util.rkt"
"pict.rkt"
"for.rkt")
(provide (all-from-out
"counting.rkt"
"cut.rkt"
"debug.rkt"
"file.rkt"
... | null | https://raw.githubusercontent.com/gmarceau/racket-utils/d7fdf833f0d7602d1a9c17be516c477a1614cef6/all.rkt | racket | #lang racket
(require
"counting.rkt"
"cut.rkt"
"debug.rkt"
"file.rkt"
"hash.rkt"
"list.rkt"
"saving.rkt"
"table.rkt"
"test.rkt"
"util.rkt"
"pict.rkt"
"for.rkt")
(provide (all-from-out
"counting.rkt"
"cut.rkt"
"debug.rkt"
"file.rkt"
... | |
3e39f231fdc37aab188301199c6665b3cdbfe1f30abad51a93e3269798ed4e47 | mirage/capnp-rpc | capTP.ml | open Asetmap
module Log = Debug.Log
module IntMap = Map.Make(struct type t = int let compare (a:int) b = compare a b end)
let rec filter_map f = function
| [] -> []
| x :: xs ->
match f x with
| None -> filter_map f xs
| Some y -> y :: filter_map f xs
let pp_check check f (k, v) =
try check k v
w... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/097fd38d8bd0a320ea1867191274d8ef438419f8/capnp-rpc/capTP.ml | ocaml | Maps used cap indexes to their paths
The switchable holds one until resolved, plus each [resolve_target] adds one.
Number of times remote sent us this.
We have sent a message to this target (embargo needed on resolve).
Our switchable ([Weak_ptr.t] is mutable).
Keeps the switchable alive if there are callback... | open Asetmap
module Log = Debug.Log
module IntMap = Map.Make(struct type t = int let compare (a:int) b = compare a b end)
let rec filter_map f = function
| [] -> []
| x :: xs ->
match f x with
| None -> filter_map f xs
| Some y -> y :: filter_map f xs
let pp_check check f (k, v) =
try check k v
w... |
af53c6a713f427aa7bde31be2156f711b8cb514e2890ea0666efac2a1966cfc9 | metabase/metabase | input.clj | (ns metabuild-common.input
(:require
[clojure.string :as str]
[environ.core :as env]
[metabuild-common.output :as out]))
(defn interactive?
"Whether we're running these scripts interactively, and can prompt the user for input. By default, this is
true (except when running in CircleCI), but if the env va... | null | https://raw.githubusercontent.com/metabase/metabase/5e9b52a32dfeab754d218c758d08fffbacb7c0e7/bin/build/src/metabuild_common/input.clj | clojure | prompt will repeat until a valid option is chosen. Returns
-> :c" | (ns metabuild-common.input
(:require
[clojure.string :as str]
[environ.core :as env]
[metabuild-common.output :as out]))
(defn interactive?
"Whether we're running these scripts interactively, and can prompt the user for input. By default, this is
true (except when running in CircleCI), but if the env va... |
73bbf3f431687f2b99f71a7d6f1ab33dee1892710d0f4adeea9dc70c2c8081db | nominolo/lambdachine | tree2.hs | data Tree
= Node Int
| Bin Tree Tree
main = return () | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Exclude/tree2.hs | haskell | data Tree
= Node Int
| Bin Tree Tree
main = return () | |
35eba0c5fd14c6bc3e5a26709d66477caf2dcc4db8007de255a86e9313cfd453 | yuriy-chumak/ol | kore.scm | (define-library (lib kore)
(version 1.0)
(license MIT+LGPL3)
(description
"kore.io ol ffi interface")
(export
kore
KORE_RESULT_ERROR
KORE_RESULT_OK
KORE_RESULT_RETRY
http_request*
kore_buf*
kore_http_body
kore_http_body_data
kore_http_body_length
http_populate_get
... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/e6b96010935797d2bcdbe8b66a685ce60f73a777/libraries/lib/kore.scm | scheme | ; json
kore_json*
kore_make_json
kore_json_init
kore_json_parse
kore_json_root
kore_json_strerror
internal
get
;; http_argument_get_uint16
;; http_argument_get_int32
; http_argument_get_uint32
;; http_argument_get_int64
;; http_argument_get_uint64
;; http_argument_get_float
;
(define kore_msg_init (ko... | (define-library (lib kore)
(version 1.0)
(license MIT+LGPL3)
(description
"kore.io ol ffi interface")
(export
kore
KORE_RESULT_ERROR
KORE_RESULT_OK
KORE_RESULT_RETRY
http_request*
kore_buf*
kore_http_body
kore_http_body_data
kore_http_body_length
http_populate_get
... |
bbb9c0f2b1cf3668979d6dd99180be87ece4264e8b55398dde0889386e9ad0bf | dmbaturin/otoml | otoml_base.ml | include Common
module Utils = struct
include Utils
end
include Impl_sigs
Internal exception for tracking non - existent fields .
Since it 's possible to query a full path like " table.subtable.field " ,
error messages should tell the user which exact component of that path
does not exist .
So... | null | https://raw.githubusercontent.com/dmbaturin/otoml/066ff0fceacd622d42012481e74982fdaa1f1ca0/src/lib/otoml_base.ml | ocaml | For the purpose of type error printing,
we don't make a difference between syntactic variants
because there's no cases when that would matter.
Conversions between different variants of the same type.
Constructors
Combinators
High-level interfaces
Something in the middle of the path isn't a tabl... | include Common
module Utils = struct
include Utils
end
include Impl_sigs
Internal exception for tracking non - existent fields .
Since it 's possible to query a full path like " table.subtable.field " ,
error messages should tell the user which exact component of that path
does not exist .
So... |
63a6eb757b488b445e0ac69ac4ebf2474da937357486d2009f390dff291f5738 | crategus/cl-cffi-gtk | rtest-gobject-signals.lisp | (def-suite gobject-signals :in gobject-suite)
(in-suite gobject-signals)
(defvar *verbose-gobject-signals* t)
;; We need GTK+ to have a button widget.
(asdf:load-system :cl-cffi-gtk)
;;; --- Types and Values -------------------------------------------------------
;;; GSignalInvocationHint
;;; GSignalCMarsha... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gobject-signals.lisp | lisp | We need GTK+ to have a button widget.
--- Types and Values -------------------------------------------------------
GSignalInvocationHint
GSignalCMarshaller
GSignalCVaMarshaller
GSignalFlags
GSignalQuery
G_SIGNAL_TYPE_STATIC_SCOPE
--- Functions -------------------------------------------... | (def-suite gobject-signals :in gobject-suite)
(in-suite gobject-signals)
(defvar *verbose-gobject-signals* t)
(asdf:load-system :cl-cffi-gtk)
GSignalMatchType
GConnectFlags
G_SIGNAL_MATCH_MASK
G_SIGNAL_FLAGS_MASK
(test g-signal-query
(let* ((signal-id (g-signal-lookup "clicked" "GtkBu... |
4184ccc3c41ab411d82d4b2335d86e2a49e097e4ae63ff5484ce78bec4d7990c | baffalop/aoc22-haskell | Day01.hs | module Day01 (parse, solve1, solve2) where
import Data.Text (Text, unpack)
import Data.List (sortOn, break)
import Utils ((<.>))
parse :: Text -> [Int]
parse = sum . fmap read <.> splitOn "" . lines . unpack
solve1 :: [Int] -> Int
solve1 = maximum
solve2 :: [Int] -> Int
solve2 = sum . take 3 . sortOn negate
splitO... | null | https://raw.githubusercontent.com/baffalop/aoc22-haskell/47de0ea0450469f829619d661fa770f2c0464f35/src/Day01.hs | haskell | module Day01 (parse, solve1, solve2) where
import Data.Text (Text, unpack)
import Data.List (sortOn, break)
import Utils ((<.>))
parse :: Text -> [Int]
parse = sum . fmap read <.> splitOn "" . lines . unpack
solve1 :: [Int] -> Int
solve1 = maximum
solve2 :: [Int] -> Int
solve2 = sum . take 3 . sortOn negate
splitO... | |
d32d2648a7cefad3d3107f2cd14a516f958827cd93e03d6892f189eacd205837 | davidsantiago/stencil | utils.clj | (ns stencil.utils
(:require [clojure.string :as str]
[quoin.map-access :as map])
(:import [java.io FileNotFoundException]))
;;
;; Context stack access logic
;;
;; find-containing-context and context-get are a significant portion of
;; execution time during rendering, so they are written in a less beaut... | null | https://raw.githubusercontent.com/davidsantiago/stencil/a91f860c05cbb3b80c89e9c35d170fdddc90ff91/src/stencil/utils.clj | clojure |
Context stack access logic
find-containing-context and context-get are a significant portion of
execution time during rendering, so they are written in a less beautiful
way to make them go faster.
Didn't have the key, so walk down the stack.
Either ran out of context stack or key, in either case, we were
unsu... | (ns stencil.utils
(:require [clojure.string :as str]
[quoin.map-access :as map])
(:import [java.io FileNotFoundException]))
(defn find-containing-context
"Given a context stack and a key, walks down the context stack until
it finds a context that contains the key. The key logic is fuzzy as
in ... |
55d65ee722be0860a8896c1b4d7923a0e1731f3bcfb58ce4ff844656fa31a5ce | wdebeaum/step | parser-pkg.lisp | ;;;;
;;;; File: parser-pkg.lisp
Creator :
Created : We d May 19 16:03:32 2010
Time - stamp : < Fri Jan 23 11:48:26 EST 2015 >
;;;;
(defpackage :parser
(:use :common-lisp :util :ontologymanager :lexiconmanager :w :dfc)
(:export
init - var - table ; ; ( init - var - table ): initializes the variable rea... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/Parser/parser-pkg.lisp | lisp |
File: parser-pkg.lisp
; ( init - var - table ): initializes the variable readtable
; ( read - value X ) , reads a value without resetting the current variable readtable
; ( read - expression X ): reads a value after resetting the variable readtable first
; ( subst - in X bl ): returns a new expression with va... | Creator :
Created : We d May 19 16:03:32 2010
Time - stamp : < Fri Jan 23 11:48:26 EST 2015 >
(defpackage :parser
(:use :common-lisp :util :ontologymanager :lexiconmanager :w :dfc)
(:export
?
&
%
$))
|
308c0b0c2885babf79e799de674b7ba634074f16c067d8ac2b790e899895ad10 | nakkaya/nakkaya.com | turtle.clj | (ns turtle
(:import (javax.swing JFrame JLabel)
(java.awt.image BufferedImage)
(java.awt Dimension Color)
(java.io File)
(javax.imageio ImageIO)))
(def deg (/ (Math/PI) 180))
(defn turtle [width height]
(let [image (BufferedImage. width height BufferedImage/TYPE_INT_RGB)]
(ref {:width width :... | null | https://raw.githubusercontent.com/nakkaya/nakkaya.com/bc176f685db382bd13d19186b4a2136358b0c2ae/resources/public/code/clojure/turtle.clj | clojure | (ns turtle
(:import (javax.swing JFrame JLabel)
(java.awt.image BufferedImage)
(java.awt Dimension Color)
(java.io File)
(javax.imageio ImageIO)))
(def deg (/ (Math/PI) 180))
(defn turtle [width height]
(let [image (BufferedImage. width height BufferedImage/TYPE_INT_RGB)]
(ref {:width width :... | |
b8fabbbd25a285408fb0d56bf740ea2151c4bddda0752a7c9c6fe87fcd777110 | travelping/ppp | ppp_fsm.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(ppp_fsm).
-behaviour(gen_fsm).
%% API
-export([start_link/3, start_link/4, start/3, start/4]).
-export([fsm_frame_in/2, fsm_lowerup/1... | null | https://raw.githubusercontent.com/travelping/ppp/c1e03ee93ef333b5eb8aadd14b1290cfc1001089/src/ppp_fsm.erl | erlang | API
gen_fsm callbacks
protocol callbacks
Reset our Configuration Information
Add our Configuration Information
ACK our Configuration Information
Reject our Configuration Information
Called when we want the lower layer up
Called when we want the lower layer down
=================================================... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(ppp_fsm).
-behaviour(gen_fsm).
-export([start_link/3, start_link/4, start/3, start/4]).
-export([fsm_frame_in/2, fsm_lowerup/1, fsm_l... |
4e1ca9f4adc554e5aea2f1cdc5f7feda8ff0ee7f742ad27dca3e79b19fed8127 | schibsted/spid-tech-docs | formatting.clj | (ns spid-docs.formatting
(:require [clojure.string :as str]
[inflections.core :refer [plural]]))
(defn pluralize
"Add 's' to the end of a word to pluralize it. If it already ends in 's', add
'es'. If the optional count parameter is provided, the word will be pluralized
unless the count is 1, as in ... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/formatting.clj | clojure | (ns spid-docs.formatting
(:require [clojure.string :as str]
[inflections.core :refer [plural]]))
(defn pluralize
"Add 's' to the end of a word to pluralize it. If it already ends in 's', add
'es'. If the optional count parameter is provided, the word will be pluralized
unless the count is 1, as in ... | |
856108fc1aa8e2ea4d499434ed842d9b1969df54f6f75c6f5499aa9c40233b2c | shirok/Gauche | quoted-printable.scm | ;;;
;;; quoted-printable.scm - quoted-printable encoding/decoding routine
;;;
Copyright ( c ) 2000 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of so... | null | https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/lib/rfc/quoted-printable.scm | scheme |
quoted-printable.scm - quoted-printable encoding/decoding routine
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of c... | Copyright ( c ) 2000 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(define-module rfc.quoted-printable
(exp... |
c5568b19173a4eb069a3014014770fccd3a79e790a206ae39d08fec5530baa63 | Lysxia/generic-recursion-schemes | Sum.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE T... | null | https://raw.githubusercontent.com/Lysxia/generic-recursion-schemes/692505969c5774ab5f6c26be3c9b53c2d19d46c3/src/Generic/RecursionSchemes/Internal/Sum.hs | haskell | # LANGUAGE GADTs #
| Extensible sum.
| A tagged sum of functors.
| Pattern match on the empty sum.
This can be used together with 'Generic.RecursionSchemes.match'
| Handler for a sum type.
handler), @a@ is the sum functor's parameter, and @z@ is the result type of
the handler.
A total handler (handling all ca... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAG... |
241cf3b3c03efe99477120a16f28a91ae00f0d4688b4f26819407b5067270623 | lilactown/lilac.town | data.cljc | (ns lilactown.data
(:require [clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]))
(defn project-paths
"Takes a projection of a map and creates a vector of paths that match that
projection. E.g.:
(project-paths [:a
:b [:c]
:d [:e :f [:g]]])
=> [[:a]... | null | https://raw.githubusercontent.com/lilactown/lilac.town/295669e4511e79877da14232457dea26f098acd8/src/lilactown/data.cljc | clojure | (ns lilactown.data
(:require [clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]))
(defn project-paths
"Takes a projection of a map and creates a vector of paths that match that
projection. E.g.:
(project-paths [:a
:b [:c]
:d [:e :f [:g]]])
=> [[:a]... | |
543a5a49f6c635247ff7f365e5a034d2113d537db7514fee41b0a0394667362d | logicblocks/salutem | registry.clj | (ns salutem.core.registry
"Provides constructors, query functions and resolution functions for
registries."
(:require
[salutem.core.checks :as checks]
[salutem.core.results :as results]))
(defn empty-registry
"Constructs an empty registry which can be populated using [[with-check]] and
[[with-cached-... | null | https://raw.githubusercontent.com/logicblocks/salutem/167705246d91df22c0268642857580562496386f/core/src/salutem/core/registry.clj | clojure | (ns salutem.core.registry
"Provides constructors, query functions and resolution functions for
registries."
(:require
[salutem.core.checks :as checks]
[salutem.core.results :as results]))
(defn empty-registry
"Constructs an empty registry which can be populated using [[with-check]] and
[[with-cached-... | |
90c3e4c8220973d78b2c6b9a2bbb8b337d5377c900d028592f9e7adbe0ab797f | facebookincubator/hsthrift | ExceptionTest.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
module ExceptionTest where
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad.Trans.Class
import Test.HUnit
import TestChannel
import TestRunner
import Exception.Types
import Thrift.Monad
runDangerousCode :: IO ()
runDangerousCode = th... | null | https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/tests/ExceptionTest.hs | haskell | Copyright ( c ) Facebook , Inc. and its affiliates .
module ExceptionTest where
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad.Trans.Class
import Test.HUnit
import TestChannel
import TestRunner
import Exception.Types
import Thrift.Monad
runDangerousCode :: IO ()
runDangerousCode = th... | |
f7414dbfc44b4bc7415d334cc1261ba7d409873a1f559d7439dc1a3551c07f07 | TrustInSoft/tis-interpreter | non_linear_evaluation.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/engine/non_linear_evaluation.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
9c0b7294a9468f36fdbb02316b40bbb8c09f108a0407a952047b955458d56a67 | kazu-yamamoto/quic | Frame.hs | # LANGUAGE BinaryLiterals #
{-# LANGUAGE OverloadedStrings #-}
module Network.QUIC.Types.Frame where
import Network.QUIC.Imports
import Network.QUIC.Types.Ack
import Network.QUIC.Types.CID
import Network.QUIC.Types.Error
import Network.QUIC.Types.Time
----------------------------------------------------------------
... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/0d53beb7d14e4cfb60709bdef82e8325ffa2d9b1/Network/QUIC/Types/Frame.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------
retire prior to
| Stream identifier.
| Checking if a stream is client-initiated bidirectional.
| Checking if a stream is server-initiated bidirectional.
| Checking if a stream is client-initiated unidirectional.
| Checki... | # LANGUAGE BinaryLiterals #
module Network.QUIC.Types.Frame where
import Network.QUIC.Imports
import Network.QUIC.Types.Ack
import Network.QUIC.Types.CID
import Network.QUIC.Types.Error
import Network.QUIC.Types.Time
type FrameType = Int
data Direction = Unidirectional | Bidirectional deriving (Eq, Show)
type Rea... |
a820ba90b8268677c7f87d64dc14152552cea2e42c5cdc4927c28e052da644e3 | nyu-acsys/drift | inductive5-2.ml |
let rec f x =
if x < -2 then
f (-3)
else if x < 2 then
2 * x - 1
else if x <= 2 then
f (2 * x - 1)
else
x
let main (n:int(*-:{v:Int | true}*)) =
if n > -2 then assert(f n >= (-3))
else () | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DRIFT/first/inductive5-2.ml | ocaml | -:{v:Int | true} |
let rec f x =
if x < -2 then
f (-3)
else if x < 2 then
2 * x - 1
else if x <= 2 then
f (2 * x - 1)
else
x
if n > -2 then assert(f n >= (-3))
else () |
2ced88d3cf8a6189a1d9a6b940acf070aa767d1e78c91fa32451048b5377883d | dmitryvk/sbcl-win32-threads | symbol-macrolet-test.lisp | (symbol-macrolet ((s1 (push 1 *symbol-macrolet-test-status*))
(s2 (push 2 *symbol-macrolet-test-status*)))
(eval-when (:compile-toplevel)
s1)
(eval-when (:compile-toplevel :load-toplevel)
s2))
| null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/symbol-macrolet-test.lisp | lisp | (symbol-macrolet ((s1 (push 1 *symbol-macrolet-test-status*))
(s2 (push 2 *symbol-macrolet-test-status*)))
(eval-when (:compile-toplevel)
s1)
(eval-when (:compile-toplevel :load-toplevel)
s2))
| |
8aaeee2338f4a18eee9730df9081a527e349f1274fa19db4759a5ea59c572421 | beamspirit/bigwig | bigwig_http_stats_stream.erl | %% Websocket connection that sends periodic stats about the VM
%%
-module(bigwig_http_stats_stream).
-behaviour(cowboy_http_handler).
-behaviour(cowboy_http_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3, websocket_terminate/3,
websocket_info/3]).
init... | null | https://raw.githubusercontent.com/beamspirit/bigwig/552ac9968d2457286056a17f3be7f53ec72a31cc/src/bigwig_http_stats_stream.erl | erlang | Websocket connection that sends periodic stats about the VM
| -module(bigwig_http_stats_stream).
-behaviour(cowboy_http_handler).
-behaviour(cowboy_http_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3, websocket_terminate/3,
websocket_info/3]).
init({tcp, http}, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_... |
36438130930da83729cb4ec5115a0f632a5bfc5f8233f813a6bbc939e08f23de | cyga/real-world-haskell | PodMainGUI.hs | -- file: ch23/PodMainGUI.hs
module PodMainGUI where
import PodDownload
import PodDB
import PodTypes
import System.Environment
import Database.HDBC
import Network.Socket(withSocketsDo)
-- GUI libraries
import Graphics.UI.Gtk hiding (disconnect)
import Graphics.UI.Gtk.Glade
-- Threading
import Control.Concurrent
--... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch23/PodMainGUI.hs | haskell | file: ch23/PodMainGUI.hs
GUI libraries
Threading
file: ch23/PodMainGUI.hs
| Our main GUI type
file: ch23/PodMainGUI.hs
Every so often, we try to run other threads.
Set up our events
Disconnect from the database at the end
file: ch23/PodMainGUI.hs
Load XML from glade path.
Note: crashes with a runtime error... | module PodMainGUI where
import PodDownload
import PodDB
import PodTypes
import System.Environment
import Database.HDBC
import Network.Socket(withSocketsDo)
import Graphics.UI.Gtk hiding (disconnect)
import Graphics.UI.Gtk.Glade
import Control.Concurrent
data GUI = GUI {
mainWin :: Window,
mwAddBt :: B... |
0e557f5271d5295c1c75ff20d8c4e6a2d5e38199ec2adb17cba08a2ba3d6c87a | lsrcz/mini-prover | Termination.hs | module MiniProver.Proof.Termination where
import MiniProver.Core.Termination
import MiniProver.Core.Syntax
import MiniProver.Proof.ProofDef
computeDecParamTactic :: Tactic -> Either Term Tactic
computeDecParamTactic (Exact tm) = Exact <$> computeDecParam tm
computeDecParamTactic (Apply tm mbnm) = Apply <$> computeDec... | null | https://raw.githubusercontent.com/lsrcz/mini-prover/0aa4cdf3b495ddf6707f27dcbee810d519b43177/src/MiniProver/Proof/Termination.hs | haskell | module MiniProver.Proof.Termination where
import MiniProver.Core.Termination
import MiniProver.Core.Syntax
import MiniProver.Proof.ProofDef
computeDecParamTactic :: Tactic -> Either Term Tactic
computeDecParamTactic (Exact tm) = Exact <$> computeDecParam tm
computeDecParamTactic (Apply tm mbnm) = Apply <$> computeDec... | |
e5fa0e6265535e7ea8cd1f31fd75b0776fe20279a0cb9893cc35886e3609edb1 | basvandijk/scientific | Scientific.hs | # LANGUAGE CPP , OverloadedStrings #
module Data.ByteString.Builder.Scientific
( scientificBuilder
, formatScientificBuilder
, FPFormat(..)
) where
import Data.Scientific (Scientific)
import qualified Data.Scientific as Scientific
import Data.Text.Lazy.Builder.RealFloat (FPFormat(..))
im... | null | https://raw.githubusercontent.com/basvandijk/scientific/7071b9b9b3c7317218dce2c4a1c613d1c21431e8/src/Data/ByteString/Builder/Scientific.hs | haskell | | A @ByteString@ @Builder@ which renders a scientific number to full
precision, using standard decimal notation for arguments whose
notation otherwise.
| Like 'scientificBuilder' but provides rendering options.
^ Number of decimal places to render. | # LANGUAGE CPP , OverloadedStrings #
module Data.ByteString.Builder.Scientific
( scientificBuilder
, formatScientificBuilder
, FPFormat(..)
) where
import Data.Scientific (Scientific)
import qualified Data.Scientific as Scientific
import Data.Text.Lazy.Builder.RealFloat (FPFormat(..))
im... |
a0b6b3fcebfcd39401e75390df5f892add6e12e0ade112cb9b84c5ae32b23a49 | PeterDWhite/Osker | Resumption.hs | Copyright ( c ) , 2002 , 2003
Copyright ( c ) OHSU , 2002 , 2003
module Resumption
( R (..) -- Resumption transformer without state
, run -- Run a simple resumption
Lift underlying monad into resumpton monad
, pause -- Produce a computation that pauses
, nullPause -- Pa... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Resumption/Resumption.hs | haskell | Resumption transformer without state
Run a simple resumption
Produce a computation that pauses
Pause with () return
Get continuation out of a resumption value
Determine when the resumption is at a Continue
--------------------------------------------------------------------
laws for the resumption monad transfor... | Copyright ( c ) , 2002 , 2003
Copyright ( c ) OHSU , 2002 , 2003
module Resumption
Lift underlying monad into resumpton monad
) where
Vanilla resumption monad , from " A study of evaluation order
semantics in expressions with side effects " by
and , 2000 .
We rely on the papers of for the pr... |
f4921e4429aa9d48a8a714bbc38085d52c982f8e3b92bffd4e0cc50b200de040 | DanielG/ghc-mod | Pretty.hs | ghc - mod : Happy Haskell Hacking
Copyright ( C ) 2015 < dxld ÄT darkboxed DOT org >
--
-- This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/core/GhcMod/Pretty.hs | haskell |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General... | ghc - mod : Happy Haskell Hacking
Copyright ( C ) 2015 < dxld ÄT darkboxed DOT org >
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# L... |
e10c2fceaa53f9daffd915720ba33d882a187c1513164085a5a046dbb0b26e74 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415164440.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164440.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
76a287b7e54be0cdd3b69a40bfddfd4c52164ae1dbb835fe0d747c336fddc41e | fpco/inline-c | StdVector.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - matches #
module StdVector
( stdVectorCtx
, instanceStdVector
, CStdVector
, StdVector()
, StdVector.new
, size
, to... | null | https://raw.githubusercontent.com/fpco/inline-c/b37b60f1712b12b43c86493cafb9ac324443d22e/inline-c-cpp/test/StdVector.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - matches #
module StdVector
( stdVectorCtx
, instanceStdVector
, CStdVector
, StdVector()
, StdVector.new
, size
, toVector
, pushBack
)
where
imp... |
a6b88cbabacaea9da87b59204e4f71ae1c31aaf368b695f268d37bfc8e22f087 | hdevtools/hdevtools | Child.hs | module Child where
import Parent
child :: String
child = "child of " ++ parent
| null | https://raw.githubusercontent.com/hdevtools/hdevtools/a866f017b74f4b27fabda0861f635da82e43d9fe/tests/Child.hs | haskell | module Child where
import Parent
child :: String
child = "child of " ++ parent
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.