_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 |
|---|---|---|---|---|---|---|---|---|
01a73f07fa5330f6571c0b418e89c9b26b94a7defcc5441ae5709a27c257a3fe | Bogdanp/koyo | all.rkt | #lang racket/base
(define-syntax-rule (reprovide mod ...)
(begin
(require mod ...)
(provide (all-from-out mod ...))))
(reprovide
"auth.rkt"
"common.rkt"
"dashboard.rkt")
| null | https://raw.githubusercontent.com/Bogdanp/koyo/93f3fd06ee596a62bb0b286cb6290a800e911154/koyo-lib/blueprints/standard/app-name-here/pages/all.rkt | racket | #lang racket/base
(define-syntax-rule (reprovide mod ...)
(begin
(require mod ...)
(provide (all-from-out mod ...))))
(reprovide
"auth.rkt"
"common.rkt"
"dashboard.rkt")
| |
948cca3207e664abcdadf5820f86cdce7dfd5c896e2b45c3b0bf7cafcf0f0e6b | bugczw/Introduction-to-Functional-Programming-in-OCaml | W2_S2_1.ml |
POINTS AND ( 30/30 points )
The given prelude defines three types , one for three dimensional points , another for velocity vectors in three dimensions , and another one representing moving objects in space .
Write a function move : point - > dpoint - > point such that move p dp is the point p whose coordinat... | null | https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W2_ALL/Exercise/W2_S2_1.ml | ocaml |
POINTS AND ( 30/30 points )
The given prelude defines three types , one for three dimensional points , another for velocity vectors in three dimensions , and another one representing moving objects in space .
Write a function move : point - > dpoint - > point such that move p dp is the point p whose coordinat... | |
92748a72825c331d99f0b43e98d426ba5af9efc1bf525db938a9c58a77b00548 | dschrempf/elynx | SubstitutionModel.hs | -- |
-- Module : ELynx.MarkovProcess.SubstitutionModel
-- Description : Data type describing substitution model
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Tue Jan 29 19:10:46 2019 .
--
-- To be... | null | https://raw.githubusercontent.com/dschrempf/elynx/f73f4474c61c22c6a9e54c56bdc34b37eff09687/elynx-markov/src/ELynx/MarkovProcess/SubstitutionModel.hs | haskell | |
Module : ELynx.MarkovProcess.SubstitutionModel
Description : Data type describing substitution model
Maintainer :
Stability : unstable
Portability : portable
To be imported qualified.
* Types
* Accessors
* Building substitution models
* Transformations
| Name of substitution model; abstra... | Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Tue Jan 29 19:10:46 2019 .
module ELynx.MarkovProcess.SubstitutionModel
Name,
Params,
SubstitutionModel,
alphabet,
name,
params,
stationaryDistribution,
exchangeabilityMatrix,
rateMatrix,
totalRa... |
3c564f499e6ee868b5871e4a0ccec2e9120e3a458603983d266f091f83839aaf | icicle-lang/p-ambiata | Foldable.hs | # LANGUAGE NoImplicitPrelude #
module P.Foldable (
findMapM
, head
) where
import Control.Monad
import Data.Foldable
import Data.Function ((.))
import Data.Maybe
findMapM :: (Monad m, Foldable f) => (a -> m (Maybe b)) -> f a -> m (Maybe b)
findMapM f = foldr (\a a' -> ... | null | https://raw.githubusercontent.com/icicle-lang/p-ambiata/3098e411c9d521321e866b2f9637113223ef41d1/src/P/Foldable.hs | haskell | # LANGUAGE NoImplicitPrelude #
module P.Foldable (
findMapM
, head
) where
import Control.Monad
import Data.Foldable
import Data.Function ((.))
import Data.Maybe
findMapM :: (Monad m, Foldable f) => (a -> m (Maybe b)) -> f a -> m (Maybe b)
findMapM f = foldr (\a a' -> ... | |
79393658c3ed7d8369ad3dbdc78f00fa804a6aa2d534d276e8446af8ae5ca63d | janestreet/async_smtp | message.ml | module Stable = struct
open Core.Core_stable
open Email_message.Email_message_stable
open Async_smtp_types.Async_smtp_types_stable
module Time = Time_float_unix.Stable
module Unstable_mail_log = Mail_log
module Mail_log = Mail_log.Stable
module Retry_interval = Smtp_envelope.Retry_interval
module Quaran... | null | https://raw.githubusercontent.com/janestreet/async_smtp/ffe145b51d7c3d49705deb51ce33a53a21083403/src/message.ml | ocaml | Includes parent id and an incrementing counter.
Most likely, the output buffer will be the same length as the input buffer. Give
ourselves some leeway to avoid having to resize.
Peek the sequence so we don't add an eol marker for the last line.
A value of type t should only be modified via [On_disk_spool]... | module Stable = struct
open Core.Core_stable
open Email_message.Email_message_stable
open Async_smtp_types.Async_smtp_types_stable
module Time = Time_float_unix.Stable
module Unstable_mail_log = Mail_log
module Mail_log = Mail_log.Stable
module Retry_interval = Smtp_envelope.Retry_interval
module Quaran... |
d6b43243b09e90b6aa224f1d04e684d634ca0a345cb408d0893f957e7a4fa42b | uncomplicate/deep-diamond | tensor.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/deep-diamond/2fd8a3c1919b80aec481974b2aceaa0a1d26d007/src/clojure/uncomplicate/diamond/internal/cudnn/tensor.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE 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 rem... | Copyright ( c ) . All rights reserved .
(ns uncomplicate.diamond.internal.cudnn.tensor
(:require [uncomplicate.commons
[core :refer [Releaseable release let-release with-release Info info Viewable view]]
[utils :refer [dragan-says-ex]]]
[uncomplicate.clojurecuda.core :refe... |
a46975ce01d5c947649ca0d44ac66ce89433db6950aafb47a7450a552f6413e9 | botsunit/bucs | bucs_app.erl | % @hidden
-module(bucs_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
bucs_sup:start_link().
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/botsunit/bucs/792437befd259042efaf95e301dec019a5dd6ea4/src/bucs_app.erl | erlang | @hidden | -module(bucs_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
bucs_sup:start_link().
stop(_State) ->
ok.
|
b43dd3eb41e2cb699426c9ba1eff2d629f28df2f1ca18a7d7e35ffec72f443f7 | sjl/coding-math | fps.lisp | (in-package #:coding-math.fps)
;;;; FPS
(defvar *last-draw* 0)
(defvar *fps* 0.0)
(defvar *mspf* 0.0)
(defvar *frame* 0)
(defparameter *rolling-average* 0.0)
(defparameter *rolling-average-count* 10)
(defun update-average (frame-time)
(setf *rolling-average*
(/ (+ frame-time
(* *rolling-ave... | null | https://raw.githubusercontent.com/sjl/coding-math/8e2add14d033da41cb3ac0aac63ad67edb4dd66a/src/fps.lisp | lisp | FPS | (in-package #:coding-math.fps)
(defvar *last-draw* 0)
(defvar *fps* 0.0)
(defvar *mspf* 0.0)
(defvar *frame* 0)
(defparameter *rolling-average* 0.0)
(defparameter *rolling-average-count* 10)
(defun update-average (frame-time)
(setf *rolling-average*
(/ (+ frame-time
(* *rolling-average* *ro... |
c36a1bc783a8cea21fed8dd440307eaf9ac7d55c708ab9521b940484151b9b9b | ghc/testsuite | tc164.hs | # LANGUAGE ImplicitParams #
module ShouldCompile where
data UniqueSupply = US Integer
newUnique :: (?uniqueSupply :: UniqueSupply) => Integer
newUnique = r
where US r = ?uniqueSupply
The lazy pattern match in the where clause killed GHC 5.04
-- because the type {?uniqueSupply::UniqueSupply} of the RHS
of th... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc164.hs | haskell | because the type {?uniqueSupply::UniqueSupply} of the RHS | # LANGUAGE ImplicitParams #
module ShouldCompile where
data UniqueSupply = US Integer
newUnique :: (?uniqueSupply :: UniqueSupply) => Integer
newUnique = r
where US r = ?uniqueSupply
The lazy pattern match in the where clause killed GHC 5.04
of the ' where ' did n't look like a UniqueSupply
|
f042988bb17e41cc44de4f5eb086c6e95d3f7e0d526e68d63e45e36f34f960d7 | mon-key/unicly | unicly-integers.lisp | : FILE - CREATED < Timestamp : # { 2011 - 08 - 17T15:28:02 - 04:00Z}#{11333 } - by MON >
;;; :FILE unicly/unicly-integers.lisp
;;; ==============================
;;; ==============================
;; :NOTE ironclad utility functions
;;
ironclad : ub16ref / le buffer index = > value
;; ironclad:ub32ref/le buffer i... | null | https://raw.githubusercontent.com/mon-key/unicly/f9bd21446f35e28766d2f1ada2741399b14d93cb/unicly-integers.lisp | lisp | :FILE unicly/unicly-integers.lisp
==============================
==============================
:NOTE ironclad utility functions
ironclad:ub32ref/le buffer index => value
stored in little-endian order starting at index in array.
ironclad:ub16ref/be buffer index => value
ironclad:ub32ref/be buffer index => v... | : FILE - CREATED < Timestamp : # { 2011 - 08 - 17T15:28:02 - 04:00Z}#{11333 } - by MON >
ironclad : ub16ref / le buffer index = > value
ironclad : ub64ref / le buffer index = > value
This family of functions accesses an unsigned 16 - bit , 32 - bit or 64 - bit value
array must be a ( SIMPLE - ARRAY ( UNSIGN... |
30ac2c6abaf65d09cd1a2b559b412c35789da3bb40777ca91edec973b25823a8 | pink-gorilla/notebook | events.cljs | (ns pinkgorilla.notebook-ui.completion.events
(:require
[taoensso.timbre :refer-macros [info]]
[re-frame.core :refer [reg-event-fx reg-event-db dispatch]]
[pinkgorilla.nrepl.client.core :refer [op-resolve-symbol op-docstring op-completions]]))
(reg-event-db
:completion/init
(fn [db [_]]
(let [db (or db... | null | https://raw.githubusercontent.com/pink-gorilla/notebook/b01c806535f204c1c6e24c75a6619d747aba5655/src/pinkgorilla/notebook_ui/completion/events.cljs | clojure | map cider operations:
"pprint-table" "clojure.pprint"
"doseq" "clojure.core" | (ns pinkgorilla.notebook-ui.completion.events
(:require
[taoensso.timbre :refer-macros [info]]
[re-frame.core :refer [reg-event-fx reg-event-db dispatch]]
[pinkgorilla.nrepl.client.core :refer [op-resolve-symbol op-docstring op-completions]]))
(reg-event-db
:completion/init
(fn [db [_]]
(let [db (or db... |
76b15caaa977c95b52832fd8aa67b07c5820fc4774ad08f7cd5240650b19692f | v-kolesnikov/sicp | wirelang.clj | (ns sicp.chapter03.wirelang)
; Wire
(defn call-each
[procs]
(if-not (empty? procs)
(do ((first procs))
(call-each (rest procs)))
:done))
(defn make-wire []
(let [signal-value (atom 0)
action-procs (atom [])]
(letfn [(set-signal! [value]
{:pre [(contains? [0 1] value)]}... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter03/wirelang.clj | clojure | Wire
Queue
Segments
Agenda
Binary logic
Elements | (ns sicp.chapter03.wirelang)
(defn call-each
[procs]
(if-not (empty? procs)
(do ((first procs))
(call-each (rest procs)))
:done))
(defn make-wire []
(let [signal-value (atom 0)
action-procs (atom [])]
(letfn [(set-signal! [value]
{:pre [(contains? [0 1] value)]}
... |
dd5f7734aa3319becf1a9d3dbe5764eed1bdc4d88839d593678ba34e73e6f9ea | flipstone/orville | TableDefinition.hs | |
Module : Database . Orville . PostgreSQL.Internal . TableDefinition
Copyright : Flipstone Technology Partners 2016 - 2018
License : MIT
Module : Database.Orville.PostgreSQL.Internal.TableDefinition
Copyright : Flipstone Technology Partners 2016-2018
License : MIT
-}
module Database.Orville.Postgre... | null | https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/src/Database/Orville/PostgreSQL/Internal/TableDefinition.hs | haskell | |
Module : Database . Orville . PostgreSQL.Internal . TableDefinition
Copyright : Flipstone Technology Partners 2016 - 2018
License : MIT
Module : Database.Orville.PostgreSQL.Internal.TableDefinition
Copyright : Flipstone Technology Partners 2016-2018
License : MIT
-}
module Database.Orville.Postgre... | |
2cafe90dd3cff010d39bea6f24579d883b4626a1e1615d17f022aaf5b216284c | metabase/metabase | substitution.clj | (ns metabase.driver.sql.parameters.substitution
"These functions take the info for a param fetched by the functions above and add additional info about how that param
should be represented as SQL. (Specifically, they return information in this format:
{;; appropriate SQL that should be used to replace the para... | null | https://raw.githubusercontent.com/metabase/metabase/f8b048c8fa332636feef7083a8ad67e914942298/src/metabase/driver/sql/parameters/substitution.clj | clojure | appropriate SQL that should be used to replace the param snippet, e.g. {{x}}
; any prepared statement args (values for `?` placeholders) needed for the replacement snippet
------------------------------------ ->prepared-substitution & default impls -------------------------------------
TIMEZONE FIXME - remove this ... | (ns metabase.driver.sql.parameters.substitution
"These functions take the info for a param fetched by the functions above and add additional info about how that param
should be represented as SQL. (Specifically, they return information in this format:
:replacement-snippet \"= ?\"
:prepared-statement-... |
502b4b908eeeb6319fc134e95384dde37edb532fc7d3d9b25776ed96d8a49c8a | slyrus/abcl | late-setf.lisp | late-setf.lisp
;;;
Copyright ( C ) 2003 - 2005
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
... | null | https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/late-setf.lisp | lisp |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details... | late-setf.lisp
Copyright ( C ) 2003 - 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 ... |
085756b26c6cfacafe7a05a6ccedb9d1c28ae0a2284e71f4557175c499f5299b | ucsd-progsys/mist | unit.hs | unit :: Unit
unit = Unit
| null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/unit.hs | haskell | unit :: Unit
unit = Unit
| |
276c966e2b378a371bb5efc264e9afa61f9f7d3a220f8ce088d3ed60aa806a8b | berberman/arch-hs | Main.hs | # LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Main (main) where
import qualified Algebra.Graph.AdjacencyMap.Algorithm as G
import qualified Algebra.Graph.Labelled.AdjacencyMap as GL
import Args
import Control... | null | https://raw.githubusercontent.com/berberman/arch-hs/f1f1972004235428576ed0d20ad1beb220250ed3/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
all missing transitive dependencies, excluding direct dependencies of the target
after filling community
after filling aur. toBePacked1 should not appear after the next line
after removing missing children
toBePacked1 and toBePacked2 should appear after the next line
add sign for mi... | # LANGUAGE DerivingStrategies #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Main (main) where
import qualified Algebra.Graph.AdjacencyMap.Algorithm as G
import qualified Algebra.Graph.Labelled.AdjacencyMap as GL
import Args
import Control.Monad (filterM, forM_, unless)
imp... |
937af996fa3d6a845dbe970064c2fe6c0e34770ce9e08c5a11696e096526c55a | patrikja/AFPcourse | Main.hs | module Problem3.Main where
import qualified Problem3.QuestionCode as P3Q
main = P3Q.main
-- (Right 0,Right 1738)
Motivation :
main runs the same program in the two monads Eval1 and Eval2
From 3(a ) ( Problem3.Eval_expanded ) we know that gives either an
error or a new store . Thus , even if the failure is h... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2010-03/Problem3/Main.hs | haskell | (Right 0,Right 1738) | module Problem3.Main where
import qualified Problem3.QuestionCode as P3Q
main = P3Q.main
Motivation :
main runs the same program in the two monads Eval1 and Eval2
From 3(a ) ( Problem3.Eval_expanded ) we know that gives either an
error or a new store . Thus , even if the failure is handled , the
modified ... |
53a3db0a4c1870d537d5f9ad5f2ddde83cc8f184db686a47767d8ce2d6e81b22 | CatalaLang/catala | ninja_utils.ml | This file is part of the Catala build system , a specification language for
tax and social benefits computation rules . Copyright ( C ) 2020 ,
contributor : < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
use this file except in compliance with the Licens... | null | https://raw.githubusercontent.com/CatalaLang/catala/d23fcf719496defb069468d6bc47e7f437d8bede/build_system/ninja_utils.ml | ocaml | This file is part of the Catala build system , a specification language for
tax and social benefits computation rules . Copyright ( C ) 2020 ,
contributor : < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
use this file except in compliance with the Licens... | |
d51721c8353e6d3ee8131a6c3391abf3c2ec1d3e13a8a7d4d701c88dfae3f9db | cbaggers/rtg-math | types-docs.lisp | (in-package :rtg-math.types)
;;----------------------------------------------------------------
(docs:define-docs
(deftype vec2
"
A `simple-array` of 2 `single-float`s")
(deftype vec3
"
A `simple-array` of 3 `single-float`s")
(deftype vec4
"
A `simple-array` of 4 `single-float`s")
(deftype i... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/types-docs.lisp | lisp | ---------------------------------------------------------------- | (in-package :rtg-math.types)
(docs:define-docs
(deftype vec2
"
A `simple-array` of 2 `single-float`s")
(deftype vec3
"
A `simple-array` of 3 `single-float`s")
(deftype vec4
"
A `simple-array` of 4 `single-float`s")
(deftype ivec2
"
A `simple-array` of 2 `(signed-byte 32)`s")
(deftype... |
42864b3fc09600ff38c23fe9ca9c726f6e816f4fbbca25e94bfb5fd0e1809735 | OCamlPro/digodoc | dtd.ml |
* Xml Light , an small Xml parser / printer with DTD support .
* Copyright ( C ) 2003 ( )
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 ... | null | https://raw.githubusercontent.com/OCamlPro/digodoc/2856aff0a9b3a9bc2d3414eea780a3a39315e40c/src/ez_html/dtd.ml | ocaml | local cast Dtd.dtd -> dtd
- for debug only - |
* Xml Light , an small Xml parser / printer with DTD support .
* Copyright ( C ) 2003 ( )
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 ... |
72994126eebcc346c90e49bf21a0a99926068ff6a123c213ebb44a443f649db5 | lymar/hastache | Context.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
Module : Text . Hastache . Context
Copyright : ( c ) 2011 - 2013
License : BSD3
-- Maintainer: Sergey S Lymar <>
-- Stability: experimental
-- Portability: portable
|
Hastache context helpers
Hastache context ... | null | https://raw.githubusercontent.com/lymar/hastache/cd299ff1ac4c35259fbd333ea7fa9b3c280b9ff9/Text/Hastache/Context.hs | haskell | # LANGUAGE RankNTypes #
Maintainer: Sergey S Lymar <>
Stability: experimental
Portability: portable
| @defaultExt ==@ 'gshow'
monadic | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
Module : Text . Hastache . Context
Copyright : ( c ) 2011 - 2013
License : BSD3
|
Hastache context helpers
Hastache context helpers
-}
module Text.Hastache.Context (
mkStrContext
, mkStrContextM
, mkGenericContext
, mkGene... |
81b72da06d5c3f8f6160329bfc8026c64668f1936a855125ce6abf1f02d3a190 | openbadgefactory/salava | profile.cljs | (ns salava.profile.ui.profile
(:require [salava.core.ui.helper :refer [plugin-fun path-for not-activated? private?]]
[salava.core.ui.ajax-utils :as ajax]
[salava.profile.ui.block :as pb]
[salava.core.ui.error :as err]
[reagent.core :as reagent :refer [atom cursor]]
... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/profile/ui/profile.cljs | clojure | #profile
#profile] | (ns salava.profile.ui.profile
(:require [salava.core.ui.helper :refer [plugin-fun path-for not-activated? private?]]
[salava.core.ui.ajax-utils :as ajax]
[salava.profile.ui.block :as pb]
[salava.core.ui.error :as err]
[reagent.core :as reagent :refer [atom cursor]]
... |
7a72058779b2a1eacedf9879315a85f18e85997d28f6d5a5e4279cdb0d36f158 | Frama-C/Frama-C-snapshot | analysis.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/engine/analysis.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
992a18be6c1388d2b7d974d050859d2ea503fd242804864b71866d613a81cabc | JohnLato/iteratee | Wave.hs | # LANGUAGE RankNTypes , FlexibleContexts #
{-
This module is not meant primarily for instructive and pedagogical purposes.
As such, it is not fully featured, and sacrifices performance and generality
for clarity of code.
-}
module Data.Iteratee.Codecs.Wave {-# DEPRECATED "This will be moved to a separate package in... | null | https://raw.githubusercontent.com/JohnLato/iteratee/83852cebab1051999d70d2abce86f5ab88c6d7ec/Examples/Wave.hs | haskell |
This module is not meant primarily for instructive and pedagogical purposes.
As such, it is not fully featured, and sacrifices performance and generality
for clarity of code.
# DEPRECATED "This will be moved to a separate package in the future" #
=====================================================
useful type s... | # LANGUAGE RankNTypes , FlexibleContexts #
WAVEDE (..),
WAVEDE_ENUM (..),
WAVE_CHUNK (..),
AudioFormat (..),
waveReader,
readRiff,
waveChunk,
chunkToString,
dictReadFormat,
dictReadFirstFormat,
dictReadLastFormat,
dictReadFirstData,
dictReadLastData,
dictReadData,
dictProcessData
)
where... |
553306cca07ca15246e9d3cdb8e2aff64ed7db4f27b0aa3f580d2947be3ca1bf | Oblosys/proxima | MagicMonad.hs | {-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #-}
-----------------------------------------------------------------------------------------
{-| Module : Magic
Copyright :
License : All Rights Reserved
Maintainer : ... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/papers/Haskell%202008/Haskell/src/MagicMonad.hs | haskell | # OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #
---------------------------------------------------------------------------------------
| Module : Magic
Copyright :
License : All Rights Reserved
Maintainer :
St... |
module MagicMonad where
import Layers hiding (LayerFn, Simple (..))
data Simple m state map doc pres gest upd =
Simple { present :: LayerFn m state doc (map, state) pres
, interpret :: LayerFn m (map, state) gest state upd
}
fix :: (a->a) -> a
fix a = let fixa = a... |
e2d6d9d653e1808f9a4e7d06d77148c4abd5cd4b2fb88e0f1ea4817d6765ba00 | lvh/caesium | sodium_test.clj | (ns caesium.sodium-test
(:require [caesium.sodium :as s]
[clojure.test :refer [deftest is]]))
(deftest init-test
(is (#{0 1} (s/init)))
(is (= 1 (s/init))))
| null | https://raw.githubusercontent.com/lvh/caesium/cb90a4325fa48a2e4fb6cad810f340125a53fc57/test/caesium/sodium_test.clj | clojure | (ns caesium.sodium-test
(:require [caesium.sodium :as s]
[clojure.test :refer [deftest is]]))
(deftest init-test
(is (#{0 1} (s/init)))
(is (= 1 (s/init))))
| |
a09ad4a0dcb3f3b3caf485385bc8ca51584f4a7da8cfce954e59b9e4867d445c | rmloveland/scheme48-0.53 | env.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define *env*)
(define (current-env) *env*)
(define (set-current-env! env) (set! *env* env))
; Access to environment slots
(define env-ref vm-vector-ref)
(define env-set! vm-vector-set!)
(define (env-parent env) (env-ref env 0))
(define (set-env-parent... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/vm/env.scm | scheme | Access to environment slots
Making new environments
Alternative method for making environments - put the values into the heap.
includes superior environment
Migrate the current environment to the heap. Used when creating a closure.
CURRENT-ENV-SIZE size is conservative.
This is what the interpreter calls when i... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define *env*)
(define (current-env) *env*)
(define (set-current-env! env) (set! *env* env))
(define env-ref vm-vector-ref)
(define env-set! vm-vector-set!)
(define (env-parent env) (env-ref env 0))
(define (set-env-parent! env x) (env-set! env 0 x))
... |
05a7daba2293877a928faa09ab109c5e3f85e483909daaf230128bc20fa3c0e5 | p2k/ecoinpool | ebitcoin_crash_repo.erl |
%%
Copyright ( C ) 2011 Patrick " p2k " < >
%%
This file is part of ebitcoin .
%%
%% ebitcoin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) ... | null | https://raw.githubusercontent.com/p2k/ecoinpool/01ba76a7ab4b17b60cb0c525786fddef43ea80e1/apps/ebitcoin/src/ebitcoin_crash_repo.erl | erlang |
ebitcoin is free software: you can redistribute it and/or modify
(at your option) any later version.
ebitcoin 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 Licen... |
Copyright ( C ) 2011 Patrick " p2k " < >
This file is part of ebitcoin .
it under the terms of the GNU 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 General Public License
along with ebitcoin . If ... |
2c6cfef249e40b8c828af44692bf43a13c6843475c4fe80c62c1a009b4a08357 | AeneasVerif/aeneas | InterpreterExpressions.ml | module T = Types
module PV = PrimitiveValues
module V = Values
module LA = LlbcAst
open Scalars
module E = Expressions
open Utils
module C = Contexts
module Subst = Substitute
module L = Logging
open TypesUtils
open ValuesUtils
module Inv = Invariants
module S = SynthesizeSymbolic
open Cps
open InterpreterUtils
open In... | null | https://raw.githubusercontent.com/AeneasVerif/aeneas/1535b37ae84ddb1d2679c19b8fcc734351e5ce5d/compiler/InterpreterExpressions.ml | ocaml | * The local logger
* As long as there are symbolic values at a given place (potentially in subvalues)
which contain borrows and are primitively copyable, expand them.
We use this function before copying values.
Note that the place should have been prepared so that there are no remaining
loans... | module T = Types
module PV = PrimitiveValues
module V = Values
module LA = LlbcAst
open Scalars
module E = Expressions
open Utils
module C = Contexts
module Subst = Substitute
module L = Logging
open TypesUtils
open ValuesUtils
module Inv = Invariants
module S = SynthesizeSymbolic
open Cps
open InterpreterUtils
open In... |
a3e6573eb587da790bc785ed98840bc30edfa234c926bf478bbef8c83388ade7 | reasonml/reason | migrate_parsetree_500_414_migrate.ml | open Stdlib0
module From = Ast_500
module To = Ast_414
let rec copy_out_type_extension :
Ast_500.Outcometree.out_type_extension ->
Ast_414.Outcometree.out_type_extension
=
fun
{ Ast_500.Outcometree.otyext_name = otyext_name;
Ast_500.Outcometree.otyext_params = otyext_params;
Ast_500.Outcometre... | null | https://raw.githubusercontent.com/reasonml/reason/3f433821d93bdc8f85677d4ee5d276ff6551c777/src/vendored-omp/src/migrate_parsetree_500_414_migrate.ml | ocaml | open Stdlib0
module From = Ast_500
module To = Ast_414
let rec copy_out_type_extension :
Ast_500.Outcometree.out_type_extension ->
Ast_414.Outcometree.out_type_extension
=
fun
{ Ast_500.Outcometree.otyext_name = otyext_name;
Ast_500.Outcometree.otyext_params = otyext_params;
Ast_500.Outcometre... | |
a45ba0c1bba082ac7021a7dc33b81966a6f63a72840eda6ad6a8f305cbeab0c5 | roosta/herb | core.clj | (ns herb.core
(:require [herb.spec]
[garden.types])
(:import [garden.types CSSAtRule])
)
(defmacro defkeyframes
"Define a CSS @keyframes animation:
```clojure
(defkeyframes my-animation
[:from
{:background \"red\"}]
[:to
{:background \"yellow\"}])
```
CLJS... | null | https://raw.githubusercontent.com/roosta/herb/64afb133a7bf51d7171a3c5260584c09dbe4e504/src/herb/core.clj | clojure | (ns herb.core
(:require [herb.spec]
[garden.types])
(:import [garden.types CSSAtRule])
)
(defmacro defkeyframes
"Define a CSS @keyframes animation:
```clojure
(defkeyframes my-animation
[:from
{:background \"red\"}]
[:to
{:background \"yellow\"}])
```
CLJS... | |
9a45b6e865c118ebfd026ca317a9ba57ee35b5d516ce1f34db8b12f0131001be | yakaz/yamerl | unsupported_yaml_version_13.erl | -module('unsupported_yaml_version_13').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[{io_blocksize, 1}],
<<>>,
19,
true,
[],
0,
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/unsupported_yaml_version_13.erl | erlang | -module('unsupported_yaml_version_13').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[{io_blocksize, 1}],
<<>>,
19,
true,
[],
0,
... | |
ead7b2721f758d5d85d94013abf1edf858ea268ae31497f1fc6982d465d25c4a | larrychristensen/orcpub | main.cljs | (ns env.main
(:require [orcpub.core :as core]))
(core/init)
| null | https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/env/prod/env/main.cljs | clojure | (ns env.main
(:require [orcpub.core :as core]))
(core/init)
| |
595bc59e9db2fc363ed4d326c90383da316d1e03c43ba217bf26b36df212fb05 | jwiegley/notes | Printf.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Printf where
import Data.Monoid
import Data.Text
import Data.Singletons.Prelude
import Data.Type.Equality
import GHC.TypeLits
Every function of multiple arguments i... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Printf.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Printf where
import Data.Monoid
import Data.Text
import Data.Singletons.Prelude
import Data.Type.Equality
import GHC.TypeLits
Every function of multiple arguments is isomorphic to its " uncurried " f... |
3885d88cfda2339c02e274df0dc3d9296ea2706be630e9572fa6ba655bbbcc0a | MinaProtocol/mina | processor.ml | * This module contains the transition processor . The transition processor is
* the thread in which transitions are attached the to the transition frontier .
*
* Two types of data are handled by the transition processor : validated external transitions
* with precomputed state hashes ( via the block p... | null | https://raw.githubusercontent.com/MinaProtocol/mina/f3f7d625ce45a0820a56ebc8f4f1c967865a3e57/src/lib/transition_handler/processor.ml | ocaml | Only show stdout for failed inline tests.
TODO: calculate a sensible value from postake consensus arguments
add a breadcrumb and perform post processing
TODO: Can we skip here?
It is fine to skip the cache layer on blocks produced by this node
* because it is extraordinarily unlikely we would write ... | * This module contains the transition processor . The transition processor is
* the thread in which transitions are attached the to the transition frontier .
*
* Two types of data are handled by the transition processor : validated external transitions
* with precomputed state hashes ( via the block p... |
eeaacc94ac900fa93c7cc7a70d3dc6694d1640c2d86a2f7744efc0a123b22515 | ocurrent/opam-repo-ci | test.ml | let () =
Lwt_main.run
@@ Alcotest_lwt.run "opam-repo-ci"
[ ("index", Test_index.tests) ]
| null | https://raw.githubusercontent.com/ocurrent/opam-repo-ci/58cd38ddcf8bb24db5c2a7d8c233770e3e1e08cf/test/test.ml | ocaml | let () =
Lwt_main.run
@@ Alcotest_lwt.run "opam-repo-ci"
[ ("index", Test_index.tests) ]
| |
2621651dd4a8ffce4e169899841b736f0fe2301afa158cad8290f56793d64936 | metosin/sieppari | project.clj | (defproject metosin/sieppari "0.0.0-alpha13"
:description "Small, fast, and complete interceptor library."
:url ""
:license {:name "Eclipse Public License", :url "-2.0/"}
:deploy-repositories [["releases" :clojars]]
:lein-release {:deploy-via :clojars}
:dependencies []
:test-paths ["test/clj" "test/cljs"... | null | https://raw.githubusercontent.com/metosin/sieppari/7a97d55d8063f30359e902b0678c6ebca952f9fd/project.clj | clojure | Add-ons:
Testing:
Dev:
Perf testing: | (defproject metosin/sieppari "0.0.0-alpha13"
:description "Small, fast, and complete interceptor library."
:url ""
:license {:name "Eclipse Public License", :url "-2.0/"}
:deploy-repositories [["releases" :clojars]]
:lein-release {:deploy-via :clojars}
:dependencies []
:test-paths ["test/clj" "test/cljs"... |
8d505652975dca27ff1afc41bd5780b3994a88cf1dd287956b08324965a146d1 | ropas/sparrow | taintDom.ml | open BasicDom
open InterCfg
module IntOverflow =
struct
type t = Bot | Top
let to_string = function
| Bot -> "No Overflow"
| Top -> "May Overflow"
let compare = compare
let bot = Bot
let top = Top
let le x y =
match x, y with
| Bot, _ -> true
| Top, Bot -> false
| Top, Top -> true
... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/domain/taintDom.ml | ocaml | open BasicDom
open InterCfg
module IntOverflow =
struct
type t = Bot | Top
let to_string = function
| Bot -> "No Overflow"
| Top -> "May Overflow"
let compare = compare
let bot = Bot
let top = Top
let le x y =
match x, y with
| Bot, _ -> true
| Top, Bot -> false
| Top, Top -> true
... | |
d073a92303e56a7f7a76e4777bbc8ec1fc8ff956ea30e3c9be605d9b3b3f4d7d | blancas/kern | custom_lexer.clj | (ns custom-lexer
(:use [blancas.kern.core]
[clojure.string :only (upper-case)])
(:require [blancas.kern.lexer :as lex]))
;; To customize the lexer, change 'basic-def' fields as needed.
(def hoc-style
(assoc lex/basic-def
:comment-start "(*"
:comment-end "*)"
:nested-comments ... | null | https://raw.githubusercontent.com/blancas/kern/3ef65e559658c06a321a9ca7c85a541edc7b9ff2/src/main/resources/custom_lexer.clj | clojure | To customize the lexer, change 'basic-def' fields as needed.
Then make the customized parsers.
For easy access, store the parsers in vars. | (ns custom-lexer
(:use [blancas.kern.core]
[clojure.string :only (upper-case)])
(:require [blancas.kern.lexer :as lex]))
(def hoc-style
(assoc lex/basic-def
:comment-start "(*"
:comment-end "*)"
:nested-comments true
:identifier-letter (<|> alpha-num (one-of* "_-."))
... |
2c3fe287aacafda6688f7e3a3336577ea1ea594312ebc73fbbf502ea95e15853 | ghuysmans/api-cohttp-lwt | api_cohttp_lwt_server.ml | let of_router router =
let callback _conn req body =
let uri = Cohttp.Request.uri req in
let meth = Cohttp.Request.meth req in
let headers = Cohttp.Request.headers req in
let%lwt body = Cohttp_lwt.Body.to_string body in
Api_cohttp_lwt_mock.Client.ctx_of_router router ~headers ~body meth uri
in
... | null | https://raw.githubusercontent.com/ghuysmans/api-cohttp-lwt/4edfcb4d24deeeaca5786cb0e440fe295ef05b6f/server/api_cohttp_lwt_server.ml | ocaml | let of_router router =
let callback _conn req body =
let uri = Cohttp.Request.uri req in
let meth = Cohttp.Request.meth req in
let headers = Cohttp.Request.headers req in
let%lwt body = Cohttp_lwt.Body.to_string body in
Api_cohttp_lwt_mock.Client.ctx_of_router router ~headers ~body meth uri
in
... | |
06d70ffe7944519efee916781450760559f2ad8e35992af3278c1b73e3187992 | Oblosys/proxima | CodeSyntaxDump.hs |
UUAGC 0.9.10 ( CodeSyntaxDump.ag )
module CodeSyntaxDump where
import Data.List
import qualified Data.Map as Map
import Pretty
import PPUtil
import CodeSyntax
import Patterns
import CommonTypes
import Data.Map(Map)
import Data.Set(Set)
-- Patterns.ag imports
import UU.Scanner.Position(Pos)
import CommonTypes... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src-derived/CodeSyntaxDump.hs | haskell | Patterns.ag imports
CGrammar ----------------------------------------------------
cata
semantic domain
------------------------------------------------
cata
semantic domain
CNonterminal ------------------------------------------------
visit 0:
synthesized attribute:
pp : PP_D... |
UUAGC 0.9.10 ( CodeSyntaxDump.ag )
module CodeSyntaxDump where
import Data.List
import qualified Data.Map as Map
import Pretty
import PPUtil
import CodeSyntax
import Patterns
import CommonTypes
import Data.Map(Map)
import Data.Set(Set)
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Iden... |
7889fbceff0535974ae85f4f296b64d86840dbcc32f2d4e04d06680ccc2d0042 | parapluu/Concuerror | etsi_5.erl | -module(etsi_5).
-export([etsi_5/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
etsi_5() ->
Parent = self(),
ets:new(table, [public, named_table]),
ets:insert(table, {x, 0}),
ets:insert(table, {y, 0}),
ets:insert(table, {z, 0}),
ets:insert(table, {z5, 0}),
ets:insert(... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/dpor_tests/src/etsi_5.erl | erlang | -module(etsi_5).
-export([etsi_5/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
etsi_5() ->
Parent = self(),
ets:new(table, [public, named_table]),
ets:insert(table, {x, 0}),
ets:insert(table, {y, 0}),
ets:insert(table, {z, 0}),
ets:insert(table, {z5, 0}),
ets:insert(... | |
19d82be9d602366b53127ecaf67617f56491e49146cf6f1c0cf83845ce11224a | haroldcarr/learn-haskell-coq-ml-etc | Validation.hs |
Created : 2014 Jul 09 ( We d ) 13:18:07 by .
Last Modified : 2014 Jul 10 ( Thu ) by .
Created : 2014 Jul 09 (Wed) 13:18:07 by Harold Carr.
Last Modified : 2014 Jul 10 (Thu) 00:59:30 by Harold Carr.
-}
module Validation where
This contains the " Validating Credit Card Numbers " functions ( ex... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2014-07-utrecht/src/Validation.hs | haskell | ----------------------------------------------------------------------------
Reading and Showing Credit Card Numbers
----------------------------------------------------------------------------
Identifying Credit Card Type
----------------------------------------------------------------------------
End of file. |
Created : 2014 Jul 09 ( We d ) 13:18:07 by .
Last Modified : 2014 Jul 10 ( Thu ) by .
Created : 2014 Jul 09 (Wed) 13:18:07 by Harold Carr.
Last Modified : 2014 Jul 10 (Thu) 00:59:30 by Harold Carr.
-}
module Validation where
This contains the " Validating Credit Card Numbers " functions ( ex... |
ccf20278eb82b6c1bee07205c3ead7c379548599f260dd5acc871cedc4cdf882 | facebookarchive/pfff | gzip.ml | (***********************************************************************)
(* *)
The library
(* *)
, projet Cristal , ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlzip/gzip.ml | ocaml | *********************************************************************
the special exception on linking descr... | The library
, projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Pu... |
6cfe3b1d7cd5e6a68e073f533d1df15a011033572ad6ac09fe9ea217114e9b51 | ekmett/bifunctors | TH.hs | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Unsafe #
-- |
Copyright : ( C ) 2008 - 2016 , ( C ) 2015 - 2016
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Portability : portable
--
-- Functions to ... | null | https://raw.githubusercontent.com/ekmett/bifunctors/e3c86967af947d6dcf9f227312c20ee1f0186cfc/src/Data/Bifunctor/TH.hs | haskell | |
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
Functions to mechanically derive 'Bifunctor', 'Bifoldable',
in order to use this module.
* @derive@- functions
$derive
* @make@- functions
$make
* 'Bifunctor'
* 'Bifoldable'
* 'Options'
------------------... | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Unsafe #
Copyright : ( C ) 2008 - 2016 , ( C ) 2015 - 2016
Maintainer : < >
or ' Bitraversable ' instances , or to splice their functions directly into
source code . You need to enable the @TemplateHaskell@ ... |
b7ba749f7815da3b8ba38bff3e5b66fb88ad23c7bc5f0e087661d69a2fcbb75e | finnishtransportagency/harja | sampo_sanoma.clj | (ns harja.palvelin.integraatiot.sampo.sanomat.sampo-sanoma
(:require [clojure.xml :refer [parse]]
[clojure.zip :refer [xml-zip]]
[clojure.data.zip.xml :as z]
[taoensso.timbre :as log]
[harja.tyokalut.xml :as xml])
(:import (java.text SimpleDateFormat ParseException)
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/37a496f4df7594d04f19601c30acf623186283af/src/clj/harja/palvelin/integraatiot/sampo/sanomat/sampo_sanoma.clj | clojure | (ns harja.palvelin.integraatiot.sampo.sanomat.sampo-sanoma
(:require [clojure.xml :refer [parse]]
[clojure.zip :refer [xml-zip]]
[clojure.data.zip.xml :as z]
[taoensso.timbre :as log]
[harja.tyokalut.xml :as xml])
(:import (java.text SimpleDateFormat ParseException)
... | |
1052dd03028a21f5e9612dccddf5c7ec72158ee8f49ac185c5a58e3c02a3dd1a | dropbox/datagraph | Main.hs | # LANGUAGE OverloadedStrings , LambdaCase , GADTs , StandaloneDeriving , FlexibleInstances #
# LANGUAGE MultiParamTypeClasses , TypeFamilies , InstanceSigs , GeneralizedNewtypeDeriving #
{-# LANGUAGE ScopedTypeVariables, RecordWildCards, PartialTypeSignatures #-}
module Main (main) where
--import Debug.Trace
import N... | null | https://raw.githubusercontent.com/dropbox/datagraph/429957ebdbf1ef3553dabb2a8f7b16056ef4ac41/src/Main.hs | haskell | # LANGUAGE ScopedTypeVariables, RecordWildCards, PartialTypeSignatures #
import Debug.Trace
traceShowM $ name
is important because >>= guarantees sequencing in haxl but >> runs
both sides in parallel. Running in parallel here is a bad deal because
the fetch needs to happen after the write.
top-level mutations mus... | # LANGUAGE OverloadedStrings , LambdaCase , GADTs , StandaloneDeriving , FlexibleInstances #
# LANGUAGE MultiParamTypeClasses , TypeFamilies , InstanceSigs , GeneralizedNewtypeDeriving #
module Main (main) where
import Network.Wai
import Network.HTTP.Types (status200)
import Network.Wai.Handler.Warp (run)
import Data... |
941293367b9a0be33ade10e66dc1f07b5f9c00b23a12ab4d02eb51d3784b4846 | racket/racket7 | log.rkt | #lang racket/base
(require "context.rkt")
(provide log-expand
log-expand*
log-expand...
...log-expand
log-expand-start)
(define-syntax log-expand...
(syntax-rules (lambda)
[(_ ctx (lambda (obs) body ...))
(let ([obs (expand-context-observer ctx)])
(when obs
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/expand/log.rkt | racket | For historical reasons, an expander observer currently expects
numbers | #lang racket/base
(require "context.rkt")
(provide log-expand
log-expand*
log-expand...
...log-expand
log-expand-start)
(define-syntax log-expand...
(syntax-rules (lambda)
[(_ ctx (lambda (obs) body ...))
(let ([obs (expand-context-observer ctx)])
(when obs
... |
89c7633c497b2caa0ab2d035db3d733874ae962f6679a10ff651ba941377fd6b | MedeaMelana/Magic | Events.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Magic.Engine.Events (
-- * Executing effects
executeMagic, executeEffects, executeEffect, raise, applyReplacementEffects,
compileEffect, tick
) where
import Magic.Some
import Magic.Core
import qualified Magic.IdList as IdList
import Magic.... | null | https://raw.githubusercontent.com/MedeaMelana/Magic/7bd87e4e1d54a7c5e5f81661196cafb87682c62a/Magic/src/Magic/Engine/Events.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
* Executing effects
Execute multiple effects as a single event, applying replacement effects and
triggering abilities.
If enough players lose to end the game, end the game right now
continue as normal
TODO Handle multiple effects (in a single event) at once, to be... |
module Magic.Engine.Events (
executeMagic, executeEffects, executeEffect, raise, applyReplacementEffects,
compileEffect, tick
) where
import Magic.Some
import Magic.Core
import qualified Magic.IdList as IdList
import Magic.Events (willMoveToGraveyard)
import Magic.Labels ((=+))
import Magic.Types
import Mag... |
0bc02b9229a307fd37529cc68bf82bf86110a614564698843515e1ba69409d84 | ragkousism/Guix-on-Hurd | gtk.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2014 , 2015 , 2017 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 ... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/gtk.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2014 , 2015 , 2017 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Coypright © 2015 , 2016 < >
Copyright © 2... |
e4f645810565c8c5bb72d912f81f5c200e2103b12e3e82bd2ec3e83e4cef4145 | mokus0/polynomial | Newton.hs | module Bench.Newton where
import Criterion
newtonTests :: [Benchmark]
newtonTests = []
| null | https://raw.githubusercontent.com/mokus0/polynomial/42fde2c9a72f449eeda4d534acfe64b8e92b5c27/bench/src/Bench/Newton.hs | haskell | module Bench.Newton where
import Criterion
newtonTests :: [Benchmark]
newtonTests = []
| |
1a79e5f6ef8e3edab333228d6d7ec831711e6db8a0abdaf47ad930f13d37ce1a | mbutterick/quad | math.rkt | #lang quad/unicode/unicode-class-prep
math?
# downloaded from
# -15/MathClassEx-15.txt
# and used under license
# File: MathClassEx.txt
# Revision: 15
# Date: 2017-06-01, 12:35:00 GMT
#
# © 2017 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
#... | null | https://raw.githubusercontent.com/mbutterick/quad/395447f35c2fb9fc7b6199ed185850906d80811d/quad/unicode/math.rkt | racket | '. Spaces adjacent to the delimiter or the '#' are
class;char;entity name;entity set;note/description;CHARACTER NAME
S; ;;;;SPACE
N;!;excl;ISONUM;Factorial spacing;EXCLAMATION MARK
N;!;fact;;;EXCLAMATION MARK
N;#;num;ISONUM;;NUMBER SIGN
N;$;dollar;ISONUM;;DOLLAR SIGN
N;%;percnt;ISONUM;;PERCENT SIGN
N;&;amp;ISONUM;;AMPE... | #lang quad/unicode/unicode-class-prep
math?
# downloaded from
# -15/MathClassEx-15.txt
# and used under license
# File: MathClassEx.txt
# Revision: 15
# Date: 2017-06-01, 12:35:00 GMT
#
# © 2017 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
#... |
20d119639414cd4564a756a608fa5ae3fd0b99746d57a747e7d334979c14a623 | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $
cabal' "v2-run" ["pkg-abc:program"] >>= assertOutputContains "pkg-def:publib"
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.test.hs | haskell | import Test.Cabal.Prelude
main = cabalTest $
cabal' "v2-run" ["pkg-abc:program"] >>= assertOutputContains "pkg-def:publib"
| |
f9ae66b364ded16e12cb57d3f0fd9e022f94a1d2d12736a102bf9ba140a31a50 | opencog/learn | gen-dict.scm | #! /usr/bin/env guile
!#
;
; gen-dict.scm - Generate a random artificial grammar
;
Usage : ` ./gen - dict.scm < paramaters-file.scm > < output - dir > `
;
This expects two arguments : a file containing configuration parameters
; and the directory where the generated files should be written.
;
(use-modules (opencog)... | null | https://raw.githubusercontent.com/opencog/learn/fb038fd29848bee57ebb1c80ad3f8310ac7f3075/run-common/attic/gen-dict.scm | scheme |
gen-dict.scm - Generate a random artificial grammar
and the directory where the generated files should be written.
Get the program arguments
does not spew errors. (Maybe these should be #<unspecified>?)
----------------------------------------------------------
Generators for each of the different parts of th... | #! /usr/bin/env guile
!#
Usage : ` ./gen - dict.scm < paramaters-file.scm > < output - dir > `
This expects two arguments : a file containing configuration parameters
(use-modules (opencog) (opencog nlp fake))
(define param-file (cadr (program-arguments)))
(define dict-dir (caddr (program-arguments)))
Program p... |
620fd0f5bfa0902942a744cf124980f5819976ec4be94374e14c03d3a198bd1e | GregoryTravis/rhythmr | Graph.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE TupleSections #
module Graph
( Graph
, empty
, nullGraph
, connectedTo
, add
, addMulti
, nodes
, components
, fromComponents
, showGraphAsComponents
, longestPathComponent
, thresholdedWalks
, MetaGraph
, buildMetaGraph
, graphInfo
, graphStruct
, graphTest ) where
---- Really d... | null | https://raw.githubusercontent.com/GregoryTravis/rhythmr/55fd5b5af6a52da16b7d730c27fb408aa3c61538/src/Graph.hs | haskell | -- Really dumb undirected graph: extremely slow!!
An unordered graph expressed as a map from each node to all the nodes it
shares an edge with. Each edge is represented twice, once for each of its
nodes. This representation does not permit nodes without any edges attached
to them.
Add an edge (x, y). Adds y to the... | # LANGUAGE DeriveGeneric #
# LANGUAGE TupleSections #
module Graph
( Graph
, empty
, nullGraph
, connectedTo
, add
, addMulti
, nodes
, components
, fromComponents
, showGraphAsComponents
, longestPathComponent
, thresholdedWalks
, MetaGraph
, buildMetaGraph
, graphInfo
, graphStruct
, graphTest ) where
import Contr... |
a04b26007d29ce9840afbf2c389536e62f2191ca100805ad103fc18d5877551a | music-suite/music-suite | Time.hs | module Music.Time
( module Music.Time.Types,
module Music.Time.Transform,
module Music.Time.Duration,
module Music.Time.Position,
module Music.Time.Split,
module Music.Time.Juxtapose,
module Music.Time.Aligned,
module Music.Time.Rest,
module Music.Time.Note,
module Music.Time.Voice... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Time.hs | haskell | module Music.Time
( module Music.Time.Types,
module Music.Time.Transform,
module Music.Time.Duration,
module Music.Time.Position,
module Music.Time.Split,
module Music.Time.Juxtapose,
module Music.Time.Aligned,
module Music.Time.Rest,
module Music.Time.Note,
module Music.Time.Voice... | |
a653de0304707a695e9242f3039c5c095c041ffc4535f93a3b748180646c6a26 | borodust/bodge-ui-window | drawing.lisp | (cl:defpackage :bodge-ui-window.example.drawing
(:use :cl :bodge-ui :bodge-host :bodge-canvas :bodge-math)
(:export #:run))
(cl:in-package :bodge-ui-window.example.drawing)
(defvar *active-layer* :layer-1)
(defvar *active-text* "Board")
(defun layer-updater (new-layer)
(lambda (panel)
(declare (ignore pa... | null | https://raw.githubusercontent.com/borodust/bodge-ui-window/f560998c5fcade7cda195cd9d5410d46aba32ada/examples/drawing.lisp | lisp | Define main window | (cl:defpackage :bodge-ui-window.example.drawing
(:use :cl :bodge-ui :bodge-host :bodge-canvas :bodge-math)
(:export #:run))
(cl:in-package :bodge-ui-window.example.drawing)
(defvar *active-layer* :layer-1)
(defvar *active-text* "Board")
(defun layer-updater (new-layer)
(lambda (panel)
(declare (ignore pa... |
ee5a2abf3fe945d4ec000a75a224a5a59d21a24f9b3c14cb35ad94084792b671 | maximedenes/native-coq | mod_checking.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/checker/mod_checking.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val check_module : Environ.en... |
c75d61479e5acda19341fd01dcde14be8ff11ee11fe849d0460ce4a8657165cc | runexec/Static-Prime | handler.clj | (ns static-prime.handler
(:use compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]
[hiccup.core :as hc]
[hiccup.form :as hf]
[noir.response :as nr]
[noir.session :as ns]
[clojure.java.io :as io]))
;; Website S... | null | https://raw.githubusercontent.com/runexec/Static-Prime/8ca74e513372fece1ac93a22da62f86aedd1736b/src/static_prime/handler.clj | clojure | Website Settings
Edit at your own risk!!
/read/ { html file path }
Website Template Loader
Add admin panel
Index Generator
sort by header
least to greatest
insert links in their proper categories
category is the header and the links go under the category
Static Prime Editor
Routes
Create new
Edit existin... | (ns static-prime.handler
(:use compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]
[hiccup.core :as hc]
[hiccup.form :as hf]
[noir.response :as nr]
[noir.session :as ns]
[clojure.java.io :as io]))
(def index-... |
4a807790d48e739d8f1f50819b932e61b367c550602c99a630bdc3093b64b69a | hverr/haskell-obd | Car.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE RankNTypes #-}
-- | A generic car data type
module System.Hardware.ELM327.Car (
-- * Base car structure
Car
, defaultCar
* transformer for cashing
, CarT(..)
, runCarT
, flushCache
, cache
-- * L... | null | https://raw.githubusercontent.com/hverr/haskell-obd/f7de2d2c392ad491671fda60552563af181c15dd/src/System/Hardware/ELM327/Car.hs | haskell | # LANGUAGE RankNTypes #
| A generic car data type
* Base car structure
* Lenses for 'Car'
* Internal structure
| A car that has some properties, see lenses documentation below.
| A monad transformer for 'Car' where requested data is cached until 'flushCache' is called.
| Run a 'CarT' with an initial empty state
... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoImplicitPrelude #
module System.Hardware.ELM327.Car (
Car
, defaultCar
* transformer for cashing
, CarT(..)
, runCarT
, flushCache
, cache
, engineCoolantTemperature
, engineFuelRate
, engineRPM
, intakeAirTemperature
, intakeMani... |
56918ea780bc744a74828d0f091213589c34ec6cf239696746bfd31e7dd20cca | SquidDev/urn | list.lisp | "List manipulation functions.
These include several often-used functions for manipulation of lists,
including functional programming classics such as [[map]] and [[reduce]]
and useful patterns such as [[accumulate-with]].
Most of these functions are tail-recursive unless noted, which means
they will not blow up ... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/core/list.lisp | lisp | Auto-generate all `c[ad]r`/`c[ad]rs` methods. | "List manipulation functions.
These include several often-used functions for manipulation of lists,
including functional programming classics such as [[map]] and [[reduce]]
and useful patterns such as [[accumulate-with]].
Most of these functions are tail-recursive unless noted, which means
they will not blow up ... |
a4215c3415a0196934d78de5e2cc91b95640a46633f31697193de2e31d301e7d | BioHaskell/hPDB | OpenAnyFile.hs | # LANGUAGE OverloadedStrings , CPP #
-- | Opening and reading a either normal or gzipped file in an efficient way -
either using strict ' ByteString ' or mmap
module Bio.PDB.IO.OpenAnyFile(readFile, writeFile)
where
import Prelude hiding (readFile, writeFile)
import System.Directory (doesFileExist, getPermissio... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/IO/OpenAnyFile.hs | haskell | | Opening and reading a either normal or gzipped file in an efficient way -
if we have zlib:
import qualified Codec.Compression.BZip as BZip
otherwise:
DOESN'T WORK ! ! !
Upper bound : compression rate never exceeded 6.7 for big test files + 4MiB buffering .
cannot mmap | # LANGUAGE OverloadedStrings , CPP #
either using strict ' ByteString ' or mmap
module Bio.PDB.IO.OpenAnyFile(readFile, writeFile)
where
import Prelude hiding (readFile, writeFile)
import System.Directory (doesFileExist, getPermissions, Permissions(..))
import System.IO.Error (userError, IOError)
import System... |
ea94bc50c183d520cf794ce010a6a179cff08cf88a35b6e2b0189e30552133ac | hexlet-codebattle/battle_asserts | leaders_in_an_array.clj | (ns battle-asserts.issues.leaders-in-an-array
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Print all the leaders in the array.
An element is a leader if it is greater than all the elements to its right side.
And the rightm... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/7ad6006443614addd35d0f85df3abd075566c215/src/battle_asserts/issues/leaders_in_an_array.clj | clojure | (ns battle-asserts.issues.leaders-in-an-array
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Print all the leaders in the array.
An element is a leader if it is greater than all the elements to its right side.
And the rightm... | |
d4f847430a294771bbc08578ac66d305132a4e84547a4faa53e4ccc1e1470026 | cyverse-archive/DiscoveryEnvironmentBackend | seen.clj | (ns notification-agent.seen
"This namespace provides the endpoint processing logic for marking messages as received or seen."
(:use [notification-agent.common]
[slingshot.slingshot :only [throw+]])
(:require [notification-agent.db :as db]))
(defn- validate-uuids
"Validates the list of UUIDs that was pa... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/NotificationAgent/src/notification_agent/seen.clj | clojure | (ns notification-agent.seen
"This namespace provides the endpoint processing logic for marking messages as received or seen."
(:use [notification-agent.common]
[slingshot.slingshot :only [throw+]])
(:require [notification-agent.db :as db]))
(defn- validate-uuids
"Validates the list of UUIDs that was pa... | |
ccee593119c9e6ad0d4b2d81795421c13647854970ae8ffee9dfb02edf8b1ec8 | tqtezos/minter-sdk | Burn.hs | -- | Lorentz bindings for the allowlisted swaps contract.
module Lorentz.Contracts.Swaps.Burn where
import Lorentz
import Lorentz.Contracts.NonPausableSimpleAdmin
import Tezos.Address (unsafeParseAddress)
import Lorentz.Contracts.Swaps.Allowlisted
import Lorentz.Contracts.Swaps.Basic
-- Types
----------------------... | null | https://raw.githubusercontent.com/tqtezos/minter-sdk/6239f6ee8435977085c00c194224d4223386841a/packages/minter-contracts/src-hs/Lorentz/Contracts/Swaps/Burn.hs | haskell | | Lorentz bindings for the allowlisted swaps contract.
Types
--------------------------------------------------------------------------
Used for testing | module Lorentz.Contracts.Swaps.Burn where
import Lorentz
import Lorentz.Contracts.NonPausableSimpleAdmin
import Tezos.Address (unsafeParseAddress)
import Lorentz.Contracts.Swaps.Allowlisted
import Lorentz.Contracts.Swaps.Basic
data BurnSwapStorage = BurnSwapStorage
{ nextSwapId :: SwapId
, swaps :: BigMap Swap... |
83d0a3e136439fc34c57b34265eeb57ed26396eb84566f2f7f38f30bc639348f | Frama-C/Frama-C-snapshot | source_manager.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/gui/source_manager.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
9de5a77cf30a49dfa09071250789854300ef0fed4740459079df60caaed4d959 | jwiegley/notes | Buttons840.hs | module Main(main) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Monad
import Pipes
import Pipes.Concurrent
import System.Random (randomRIO)
a :: Producer Int IO ()
a = each [1..10]
b :: Pipe Int Int IO ()
b = do
chan <- liftIO newTChanIO
... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/67964c2c90918e5940daf3e4a0212a46/Buttons840.hs | haskell | module Main(main) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Monad
import Pipes
import Pipes.Concurrent
import System.Random (randomRIO)
a :: Producer Int IO ()
a = each [1..10]
b :: Pipe Int Int IO ()
b = do
chan <- liftIO newTChanIO
... | |
5e5c39c06eecf00a03ac0b0c7de9e7b81bbbb0c4e5f83838245f62451c025b5c | diffusionkinetics/open | GoG.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE TypeApplications #
|
A limited Grammar of Graphics - like interface .
@
myPts : : [ ( Double , Double ) ]
myPts = [ ( 1,2 ) , ( 1.2 , 3 ) , ( 1.4,3.5 ) ]
... | null | https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/plotlyhs/src/Graphics/Plotly/GoG.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
| Render an Aes (styling header) <a> and data <xs> into a `Plot.Trace box`
e.g. `hbox myAes [1,1,4,5,6,9,9]`
| Render an Aes (styling header) <a> and data <ys> into a `Plot.Trace box`
e.g. `vbox myAes [1,1,4,5,6,9,9]`
| # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
|
A limited Grammar of Graphics - like interface .
@
myPts : : [ ( Double , Double ) ]
myPts = [ ( 1,2 ) , ( 1.2 , 3 ) , ( 1.4,3.5 ) ]
myTrace : : Trace
myTrace = points ( aes & x .~ fst
... |
366b72e6e1bdafc6b491b60e35640b70ede85838b0f955f0037012e3fbc7bf27 | ronxin/stolzen | ex2.84.scm | #lang scheme
(define (container)
(define hash (make-hash))
(define (put op type item)
(hash-set! hash (cons op type) item)
)
(define (get op type)
(let
((key (cons op type)))
(if (hash-has-key? hash key)
(hash-ref hash key)
... | null | https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.5/ex2.84.scm | scheme | 2.84
representing inheritance tower as list
the superer type - the nearer it to the head
making pairs of {type: ordinal number in inheritance list}
let equal? be the generic equality predicate
for this change, it's needed to replace * and + in the complex package onto
apply-generic procedure it's not neede... | #lang scheme
(define (container)
(define hash (make-hash))
(define (put op type item)
(hash-set! hash (cons op type) item)
)
(define (get op type)
(let
((key (cons op type)))
(if (hash-has-key? hash key)
(hash-ref hash key)
... |
a35a21b3e61a20f1d380df90bc02e767d7b8732df566fdd58bc3af2241a4addd | thoughtpolice/claap | Types.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE KindSignatures #
# LANGUAGE GeneralizedNewtypeDeriving #
-- |
-- Module : AAP.Types
Copyright : ( c ) 2016
License : BSD3 - style ( see LICENSE.txt )
--
-- Maintainer :
-- Stability : experimental
Portability : non - portable ... | null | https://raw.githubusercontent.com/thoughtpolice/claap/4944b6c4ad6aff4097f8ef66231ce7d7a59f5ee7/src/aap/AAP/Types.hs | haskell | # LANGUAGE DataKinds #
|
Module : AAP.Types
Maintainer :
Stability : experimental
Basic type definitions used throughout the project.
* Type-level values.
* Types
** Types for the register file and memory
------------------------------------------------------------------------------... | # LANGUAGE KindSignatures #
# LANGUAGE GeneralizedNewtypeDeriving #
Copyright : ( c ) 2016
License : BSD3 - style ( see LICENSE.txt )
Portability : non - portable ( GHC extensions )
module AAP.Types
RegFileSize
, W
, MemAddr, MemValue
, MemReadAddr, MemWriteAddr
, RegAddr, Re... |
2d6527ec3639c12c14b204bbe7442fe18d491266066dd4c460432c165b8dc115 | input-output-hk/cardano-wallet-legacy | Fixture.hs | {-- | Helper module which tries to get rid of a bit of the boilerplate
needed to initialise a kernel & an active/passive wallet.
--}
module Test.Spec.Fixture (
withLayer
, withPassiveWalletFixture
, withActiveWalletFixture
, GenActiveWalletFixture
, GenPassiveWalletFixture
-- * Useful... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/Test/Spec/Fixture.hs | haskell | - | Helper module which tries to get rid of a bit of the boilerplate
needed to initialise a kernel & an active/passive wallet.
-
* Useful generators
| Do not pollute the test runner output with logs. |
module Test.Spec.Fixture (
withLayer
, withPassiveWalletFixture
, withActiveWalletFixture
, GenActiveWalletFixture
, GenPassiveWalletFixture
, genSpendingPassword
) where
import Universum
import Pos.Util.Wlog (Severity)
import Pos.Crypto (ProtocolMagic)
im... |
b71f83ee08ec3f7ab078c1fb0be2b692e15798c6b7b5a46b6c6bb4dd5ddc03ad | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Ordinal.ZH.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Ordinal/ZH/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.ZH.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Ordinal.ZH.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "ZH Tests"
[ makeCorpusT... |
38755f5cc5c4ad72d9c9061fd6104f53345b65bd716173d8cd926fd2d1ec70c7 | triffon/fp-2022-23 | 04.dec-to-bin.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
# # # зад 4
число от десетична в двоична бройна система .
(define (dec-to-bin n)
'тук)
(run-tests
(test-suite
"dec-to-bin tests"
(check = (dec-to-bin 0) 0)
(check = (dec-to-bin 1) 1)
(check = (dec-to-bin 4) 100)
(check = (dec-to-bin... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/caf334dba494954cc7bd62b9f4fc5a1ff8315f2b/exercises/cs2/02.scheme.rec-iter/04.dec-to-bin.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
# # # зад 4
число от десетична в двоична бройна система .
(define (dec-to-bin n)
'тук)
(run-tests
(test-suite
"dec-to-bin tests"
(check = (dec-to-bin 0) 0)
(check = (dec-to-bin 1) 1)
(check = (dec-to-bin 4) 100)
(check = (dec-to-bin... | |
849bd2abdcd78eb598eb3c4e12df0bd2a1e408f62ab7c9ca7f7c3f03a4af1ac9 | active-group/reacl-c | dom.cljc | (ns reacl-c.dom
"This namespace contains functions for all HTML and SVG tags, which
all return corresponding dom items. Additionally it contains the
function [[h]], a generic function that creates dom items."
(:require [reacl-c.base :as base]
[reacl-c.dom-base :as dom-base]
#?(:clj [reac... | null | https://raw.githubusercontent.com/active-group/reacl-c/a8113b37573616604ebd00e0cfdd29ec6b663512/src/reacl_c/dom.cljc | clojure | TODO: add some way to lift new primitives (with React getSnapshot.... and/or webcomponents)
optimized on having no or few events; which is the usual case.
Note: could also use (with-async-actions (fn [deliver! ])) and
event handlers that call deliver! - but then they aren't pure
anymore (at least after a translati... | (ns reacl-c.dom
"This namespace contains functions for all HTML and SVG tags, which
all return corresponding dom items. Additionally it contains the
function [[h]], a generic function that creates dom items."
(:require [reacl-c.base :as base]
[reacl-c.dom-base :as dom-base]
#?(:clj [reac... |
870f97568bff25193d1888ca41b436c1056a8067d80675cec4a49870108a105e | well-typed-lightbulbs/ocaml-esp32 | backtrace_or_exception.ml | (* TEST
flags = "-g"
ocamlrunparam += ",b=1"
* bytecode
reference="${test_source_directory}/backtrace_or_exception.byte.reference"
* native
reference = "${test_source_directory}/backtrace_or_exception.opt.reference"
compare_programs = "false"
*)
exception Exn
let return_exn ?(raise_it_inste... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/backtrace/backtrace_or_exception.ml | ocaml | TEST
flags = "-g"
ocamlrunparam += ",b=1"
* bytecode
reference="${test_source_directory}/backtrace_or_exception.byte.reference"
* native
reference = "${test_source_directory}/backtrace_or_exception.opt.reference"
compare_programs = "false"
|
exception Exn
let return_exn ?(raise_it_instead=false) () =
if raise_it_instead then
raise Exn
else
Exn
[@@inline never]
let without_reraise () =
match return_exn () with
| Exn as exn
| exception (Exn as exn) ->
raise exn
| _ -> assert false
let with_reraise () =
match return_exn ~raise_it... |
10220a15a6a1dcb8f6923bbba1f6878abd4b250251d2bc8964c2673122339781 | tek/proteome | Project.hs | module Proteome.Project where
import Lens.Micro.Extras (preview)
import Path (Abs, Dir, Path, dirname, parent)
import Proteome.Data.Env (Env)
import qualified Proteome.Data.Env as Env (currentProjectIndex, mainProject, projects)
import Proteome.Data.Project (Project)
import Proteome.Data.ProjectName (ProjectName (Pro... | null | https://raw.githubusercontent.com/tek/proteome/5090ec3b8134a720bcc98980b57bce039fb71c02/packages/proteome/lib/Proteome/Project.hs | haskell | module Proteome.Project where
import Lens.Micro.Extras (preview)
import Path (Abs, Dir, Path, dirname, parent)
import Proteome.Data.Env (Env)
import qualified Proteome.Data.Env as Env (currentProjectIndex, mainProject, projects)
import Proteome.Data.Project (Project)
import Proteome.Data.ProjectName (ProjectName (Pro... | |
8900834b314cedb82edab9a0e2e9f5c83883bcee84a0ccf1adbea92fdc6fa871 | SanderSpies/ocaml-gist | saved_parts.ml | let attribute = Location.mknoloc "merlin.saved-parts"
let table = Hashtbl.create 7
let gensym =
let counter = ref 0 in
fun () -> incr counter; !counter
let finalize = function
| Asttypes.Const_int id ->
Hashtbl.remove table id;
| _ -> assert false
let store parts =
let id = gensym () in
let key = As... | null | https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_webworker/merlin_lite/src/ocaml/typer_4.02.3/saved_parts.ml | ocaml | let attribute = Location.mknoloc "merlin.saved-parts"
let table = Hashtbl.create 7
let gensym =
let counter = ref 0 in
fun () -> incr counter; !counter
let finalize = function
| Asttypes.Const_int id ->
Hashtbl.remove table id;
| _ -> assert false
let store parts =
let id = gensym () in
let key = As... | |
f2fe7e332d2290e3b4bf4a116b3a2fcbb8a052cabd4e6f3f1a4f83060a6fedae | potatosalad/erlang-jose | jose_jws_alg_hmac.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 23 Jul 2015 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jws/jose_jws_alg_hmac.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
jose_jws callbacks
jose_jws_alg callbacks
API
Types
====================================================================
jose_jws callb... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 23 Jul 2015 by < >
-module(jose_jws_alg_hmac).
-behaviour(jose_jws).
-behaviour(jose_jws_alg).
-include("jose_jwk.hrl").
-export([from_map/1]).
-export([to_map/2]).
-export(... |
9628585de8aef0c3065996407b73a7d1945852664574d1a9344cca10d1ccbe61 | BillHallahan/G2 | TyApps.hs | module TyApps where
data C a = C a deriving Eq
class Container t where
contains :: t a -> a
instance Container C where
contains (C x) = x
@ getLt10Int : : Container t = > t { x : Int | x < = 10 } - > { y : Int | y < 10 } @
getLt10Int :: Container t => t Int -> Int
getLt10Int = contains
@ getLt10 : : ( a ,... | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/TyApps.hs | haskell | module TyApps where
data C a = C a deriving Eq
class Container t where
contains :: t a -> a
instance Container C where
contains (C x) = x
@ getLt10Int : : Container t = > t { x : Int | x < = 10 } - > { y : Int | y < 10 } @
getLt10Int :: Container t => t Int -> Int
getLt10Int = contains
@ getLt10 : : ( a ,... | |
eb7a47d67a8b30daf7e6512f7f62e5e29b100cfb2a52e5d4cb8f0fcdf6ac6ee1 | andrewzhurov/brawl-haus | gravity.cljs | (ns brawl-haus.fit.gravity
(:require [brawl-haus.fit.time :as time]
[brawl-haus.utils :refer [l]]))
m / s^2
(def system
(fn [{:keys [entities time-passed]}]
{:entities
(->> entities
(filter (comp :phys val))
(map (fn [[id {{[a-x-old a... | null | https://raw.githubusercontent.com/andrewzhurov/brawl-haus/7f560c3dcee7b242fda545d87c102471fdb21888/src/cljs/brawl_haus/fit/gravity.cljs | clojure | (ns brawl-haus.fit.gravity
(:require [brawl-haus.fit.time :as time]
[brawl-haus.utils :refer [l]]))
m / s^2
(def system
(fn [{:keys [entities time-passed]}]
{:entities
(->> entities
(filter (comp :phys val))
(map (fn [[id {{[a-x-old a... | |
64daa353cc77ba1af9fb65038c8e0fec3057d8f42ab8a88f250d9ebd89dba1ac | mirage/qubes-mirage-firewall | uplink.ml | Copyright ( C ) 2015 , < >
See the README file for details .
See the README file for details. *)
open Lwt.Infix
open Fw_utils
module Eth = Ethernet.Make(Netif)
let src = Logs.Src.create "uplink" ~doc:"Network connection to NetVM"
module Log = (val Logs.src_log src : Logs.LOG)
module Make (R:Mirage_rand... | null | https://raw.githubusercontent.com/mirage/qubes-mirage-firewall/065c8bb69a0bc1d77c07a99ab276782fc4264bae/uplink.ml | ocaml | Copyright ( C ) 2015 , < >
See the README file for details .
See the README file for details. *)
open Lwt.Infix
open Fw_utils
module Eth = Ethernet.Make(Netif)
let src = Logs.Src.create "uplink" ~doc:"Network connection to NetVM"
module Log = (val Logs.src_log src : Logs.LOG)
module Make (R:Mirage_rand... | |
5ceefd57121b903bba7b63cde99b318d357a6cf987e7b88233fa2bbbdcf76983 | life0fun/clojure-idiom | class.clj | ;; A class object system for clojure
( load - file " " )
(: use mixed in all fns , symbols , and mappings from other _ NameSpace _ . )
(: import [ pkg1 ] [ pkg2 fn1 ... ] ) import Java packages
;; (:require [namespace_1 :ref local_namespace_])
;; when defining ns, include only the references that are used.
;; :... | null | https://raw.githubusercontent.com/life0fun/clojure-idiom/481b297eeabea917a68b492b1fb78b8151408507/class.clj | clojure | A class object system for clojure
(:require [namespace_1 :ref local_namespace_])
when defining ns, include only the references that are used.
:exclude, :only, :as, :refer-clojure, :import, :use, :load, and :require.
;use naked could corrupt the namespace. (:use :only)
method spec destruct spec expression into na... | ( load - file " " )
(: use mixed in all fns , symbols , and mappings from other _ NameSpace _ . )
(: import [ pkg1 ] [ pkg2 fn1 ... ] ) import Java packages
: import working with java deftype defrecord
(ns my-class
(:refer-clojure :exclude [defstruct])
(:use [clojure.test :only (are is)])
(:require (cl... |
c5ede003327c74c7d50a2c323b35b8276528160c863a5b314f2eedb7473dd9c1 | mattmundell/nightshade | read.lisp | ;;; Tests of lisp:read.
;;;
;;; Tests of sharp macros (#|, #x...) are in ../sharpm.lisp/.
(in-package "LISP")
(import '(deftest:deftest))
(deftest read (t read-0)
"Test `read'."
(with-input-from-string (in "t") (read in)))
(deftest read (3 read-1)
"Test `read' at EOF, with error signalling."
(handler-case
... | null | https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/tests/code/reader.lisp/read.lisp | lisp | Tests of lisp:read.
Tests of sharp macros (#|, #x...) are in ../sharpm.lisp/.
Line comment (;).
(()) |
(in-package "LISP")
(import '(deftest:deftest))
(deftest read (t read-0)
"Test `read'."
(with-input-from-string (in "t") (read in)))
(deftest read (3 read-1)
"Test `read' at EOF, with error signalling."
(handler-case
(with-input-from-string (in "") (read in))
(error (c) (if (eq (type-of c) 'end-of... |
27583e2dbab06824cfcd25e0e606f39c00551e8a4daf5d00fd548238b4da29af | bjorng/wings | auv_mapping.erl | %%
%% auv_mapping.erl --
%%
%% The UV parametrisation algorithms.
%%
Copyright ( c ) 2002 - 2011 , ,
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
%%%%%% Least Square Conformal Maps %%%%%%%%%%%%
... | null | https://raw.githubusercontent.com/bjorng/wings/0ebe43abfcb094344c015589d8cd072b643d80ed/plugins_src/autouv/auv_mapping.erl | erlang |
auv_mapping.erl --
The UV parametrisation algorithms.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Least Square Conformal Maps %%%%%%%%%%%%
Algorithms based on the paper,
'Least Square Conformal Maps for Aut... | Copyright ( c ) 2002 - 2011 , ,
( now probably totally ruined by me or )
by , , ,
Presented on Siggraph 2002
The Conjugate Gradient Method ( trad )
the Conjugate Gradient Method
Without the Agonizing Pain
, March 7 , 1994
The Column Norm Preconditioning was stumbled upon , jus... |
63da507a2ecaaab6f012dd554f6dc58365db36f0ebac42705d82f54b68dad71b | DSiSc/why3 | encoding.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/encoding.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Wstdlib
open Ty
open Theory
open Task
open Trans
let meta_select_kept = register_meta_excl "select_k... |
bce911e64d3854bb851b4c776546cf33c1a8eb75dc45ffe8a48bdb689c2c8005 | TokTok/hs-toxcore | KeySpec.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StrictData #
{-# LANGUAGE Trustworthy #-}
module Network.Tox.Crypto.KeySpec where
import Test.Hspec
import Test.QuickCheck
import Control.Monad.Validate (MonadValidate, runValidate)
impor... | null | https://raw.githubusercontent.com/TokTok/hs-toxcore/647c3070cab29aee3d795a456be534d77c167d81/test/Network/Tox/Crypto/KeySpec.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE Trustworthy #
All others only local tests. | # LANGUAGE ScopedTypeVariables #
# LANGUAGE StrictData #
module Network.Tox.Crypto.KeySpec where
import Test.Hspec
import Test.QuickCheck
import Control.Monad.Validate (MonadValidate, runValidate)
import qualified Crypto.Saltine.Class as Sodium
import Data.Binar... |
c15a6c2a154de88a6b5fb8d99abcd76ce5079064af0dfed5946285b95a283e37 | cj1128/sicp-review | symbolic-algebra.scm | (define (install-polynomial-package)
(define (make-poly var term-list) (cons var term-list))
(define (variable p) (car p))
(define (term-list p) (cdr p))
(define (add-poly p1 p2)
(if (same-variable? (variable p1) (variable p2))
(make-poly (variable p1)
(add-terms (term-list p1) (... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.5/symbolic-algebra.scm | scheme | Term List Representation | (define (install-polynomial-package)
(define (make-poly var term-list) (cons var term-list))
(define (variable p) (car p))
(define (term-list p) (cdr p))
(define (add-poly p1 p2)
(if (same-variable? (variable p1) (variable p2))
(make-poly (variable p1)
(add-terms (term-list p1) (... |
e14d1892b799734e58e285d39ddfc1a3a333f25919892109aeafc2110d930e00 | aws-beam/aws-erlang | aws_elasticsearch.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Amazon Elasticsearch Configuration Service
%%
%% Use the Amazon Elasticsearch Configuration API to create, configure, and
manage Elasticsearch domains .
%%
For sample code that uses the Configuration API , see the Amazo... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_elasticsearch.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
Use the Amazon Elasticsearch Configuration API to create, configure, and
The endpoint for configuration service requests is region-specific:
es.region.amazonaws.com. For example, es.us-east-1.amazonaws.com. For a
current list of supported regions and endpoints, see Reg... | See -beam/aws-codegen for more details .
@doc Amazon Elasticsearch Configuration Service
manage Elasticsearch domains .
For sample code that uses the Configuration API , see the Amazon
Elasticsearch Service Developer Guide . The guide also contains sample code
for sending signed HTTP requests to the Elasti... |
468f0d855fc6694f4671cf896596a3dcfe2fa111ba73fdc23edb7bfac7898801 | unison-code/uni-instr-sel | Drivers.hs | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | null | https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/uni-is-llvm/UniISLLVM/Drivers.hs | haskell | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | |
47690802419c34344953079318e4f46e060151bf54ca3ad8ee4f0d12f44512e4 | imandra-ai/ocaml-opentelemetry | opentelemetry.ml | (** Opentelemetry types and instrumentation *)
module Thread_local = Thread_local
module Lock = Lock
(** Global lock. *)
module Rand_bytes = Rand_bytes
(** Generation of random identifiers. *)
open struct
let[@inline] result_bind x f =
match x with
| Error e -> Error e
| Ok x -> f x
end
* { 2 Wire fo... | null | https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/8a52da644691ab29ab86cd0fdb670bccca484bf4/src/opentelemetry.ml | ocaml | * Opentelemetry types and instrumentation
* Global lock.
* Generation of random identifiers.
* Protobuf types.
This is mostly useful internally. Users should not need to touch it.
* {2 Timestamps}
* Current unix timestamp in nanoseconds
* Sender interface for a message of type [msg].
Inspired from Logs'... |
module Thread_local = Thread_local
module Lock = Lock
module Rand_bytes = Rand_bytes
open struct
let[@inline] result_bind x f =
match x with
| Error e -> Error e
| Ok x -> f x
end
* { 2 Wire format }
module Proto = struct
module Common = struct
include Common_types
include Common_pp
in... |
c4c35ac921d97b77faef6e635115760ebba28f33b2c0082bdfc0b5321a0a831e | aantron/markup.ml | markup.ml | This file is part of Markup.ml , released under the MIT license . See
LICENSE.md for details , or visit .
LICENSE.md for details, or visit . *)
module type IO =
sig
type 'a t
val return : 'a -> 'a t
val of_cps : ((exn -> unit) -> ('a -> unit) -> unit) -> 'a t
val to_cps : (unit -> 'a t) -> ((exn ... | null | https://raw.githubusercontent.com/aantron/markup.ml/9afbf57ac7ef10a03bece6cae677a151fa164666/src/markup.ml | ocaml | This file is part of Markup.ml , released under the MIT license . See
LICENSE.md for details , or visit .
LICENSE.md for details, or visit . *)
module type IO =
sig
type 'a t
val return : 'a -> 'a t
val of_cps : ((exn -> unit) -> ('a -> unit) -> unit) -> 'a t
val to_cps : (unit -> 'a t) -> ((exn ... | |
40df4e1fc432aa499ac464be616d19002bc0f77e334f2916b16c9754bf456937 | nkpart/kit | Project.hs | # LANGUAGE TupleSections #
module Kit.Project (
makeKitProject,
KitProject(..),
kitProjectActions
)
where
import Kit.AbsolutePath (filePath)
import Kit.Spec
import Kit.Contents
import Kit.Util
import Kit.Util.FSAction
import Kit.Xcode.Builder
import Kit.Xcode.XCConfig
import Data.Maybe
import qualified Dat... | null | https://raw.githubusercontent.com/nkpart/kit/ed217ddbc90688350e52156503cca092c9bf8300/Kit/Project.hs | haskell | Paths | # LANGUAGE TupleSections #
module Kit.Project (
makeKitProject,
KitProject(..),
kitProjectActions
)
where
import Kit.AbsolutePath (filePath)
import Kit.Spec
import Kit.Contents
import Kit.Util
import Kit.Util.FSAction
import Kit.Xcode.Builder
import Kit.Xcode.XCConfig
import Data.Maybe
import qualified Dat... |
f47c6a16cf65ecfaf72211dac3d7aabba32b5a2120d9d850afde596166fce8fb | BranchTaken/Hemlock | test_map.ml | open! Basis.Rudiments
open! Basis
open Option
let test () =
List.iter [Some 42L; None] ~f:(fun o ->
File.Fmt.stdout
|> Fmt.fmt "map ("
|> (pp Uns.pp) o
|> Fmt.fmt ") ~f:(fun u -> Uns.to_string u) -> "
|> (pp String.pp) (map o ~f:(fun u -> Uns.to_string u))
|> Fmt.fmt "\n"
|> ignore
)
l... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/25a3fce449caa06ad46db351efcfb428f423184d/bootstrap/test/basis/option/test_map.ml | ocaml | open! Basis.Rudiments
open! Basis
open Option
let test () =
List.iter [Some 42L; None] ~f:(fun o ->
File.Fmt.stdout
|> Fmt.fmt "map ("
|> (pp Uns.pp) o
|> Fmt.fmt ") ~f:(fun u -> Uns.to_string u) -> "
|> (pp String.pp) (map o ~f:(fun u -> Uns.to_string u))
|> Fmt.fmt "\n"
|> ignore
)
l... | |
dbca6250be3f8f7e809443445f2005db6c2f35b66ad9c7fd02627381324a359b | donaldsonjw/bigloo | xml.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / api / web / src / Llib / xml.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/web/src/Llib/xml.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* XML parsing */
*===========================... | * serrano / prgm / project / bigloo / api / web / src / Llib / xml.scm * /
* Author : * /
* Creation : Fri Mar 11 16:23:53 2005 * /
* Last change : Mon Aug 10 16:53:05 2015 ( serrano ) * /
* ... |
658039f5b3f01394e55d66c43072ed64d4c01060844132b6deeab6ee51c32b61 | matlux/lambda-game-engine | main.clj | (ns zone.lambda.game.main
(:require
[zone.lambda.game.chess.core :as chess]
[zone.lambda.game.connect4.core :as connect4]
[clojure.core.reducers :as r]))
(defn helper []
(println "use one of the following parameters:
\tchess
\tconnect4"
))
(defn -main
([]
(helper))
([app]
... | null | https://raw.githubusercontent.com/matlux/lambda-game-engine/07109206714d80db2e3a2b65c84cd987a81006c4/src/zone/lambda/game/main.clj | clojure | (ns zone.lambda.game.main
(:require
[zone.lambda.game.chess.core :as chess]
[zone.lambda.game.connect4.core :as connect4]
[clojure.core.reducers :as r]))
(defn helper []
(println "use one of the following parameters:
\tchess
\tconnect4"
))
(defn -main
([]
(helper))
([app]
... | |
df4dd16b4acf435dbdf1b29a01dc27b6810a0f7bb917855c7d0901deea8392ce | cedlemo/OCaml-GI-ctypes-bindings-generator | Unit.mli | open Ctypes
type t = None | Points | Inch | Mm
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val t_view: t typ
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Unit.mli | ocaml | open Ctypes
type t = None | Points | Inch | Mm
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val t_view: t typ
| |
85fd11b43d20f175e92f87d59c7dcdbbb5a6576c74561597604859ca4126744d | janestreet/async_smtp | headers.mli | open! Core
open! Async
open! Async_smtp_types
module Config : sig
module Header_cond : sig
type t =
{ name : Email_headers.Name.t
; if_ : [ `Contains of string ] option
}
[@@deriving sexp]
end
module Listed_header_cond : sig
type t =
{ name : Email_headers.Name.t
; if_ ... | null | https://raw.githubusercontent.com/janestreet/async_smtp/c2c1f8b7b27f571a99d2f21e8a31ce150fbd6ced/tools/src/headers.mli | ocaml | read in as list of emails and sort
read in as list of whitespace-separated words and sort | open! Core
open! Async
open! Async_smtp_types
module Config : sig
module Header_cond : sig
type t =
{ name : Email_headers.Name.t
; if_ : [ `Contains of string ] option
}
[@@deriving sexp]
end
module Listed_header_cond : sig
type t =
{ name : Email_headers.Name.t
; if_ ... |
5a7079c14162a890c350ed912ca9fdff5f353de4e9f7ba201256e2705294a7a4 | alexkazik/qrcode | Image.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
module Codec.QRCode.Code.Image
( drawFunctionPatterns
, drawFormatBits
, drawCodeWords
) where
import Codec.QRCode.Base
import Control.Monad.Primitive (PrimMonad, PrimState)
import qualified Data.Vector.Unboxed as U... | null | https://raw.githubusercontent.com/alexkazik/qrcode/7ee12de893c856a968dc1397602a7f81f8ea2c68/qrcode-core/src/Codec/QRCode/Code/Image.hs | haskell |
Draw (almost) all function patterns into an image
| Draw all function patterns
will be overwritten by finder and alignment patterns
| Calculate all alignment pattern positions
| Draw both timing patterns (alternate black/white modules)
| Draw the version information into the image
Calculate error correction co... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
module Codec.QRCode.Code.Image
( drawFunctionPatterns
, drawFormatBits
, drawCodeWords
) where
import Codec.QRCode.Base
import Control.Monad.Primitive (PrimMonad, PrimState)
import qualified Data.Vector.Unboxed as U... |
60c9de7049053719f6dcf0ba30f832dee14eac6945e2a9746b3638e763b9652c | dyzsr/ocaml-selectml | polling.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/asmcomp/polling.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cambium , INRIA Paris
, OCaml Labs Consultancy Ltd
and , Jane Street Europe
Copyright 2021 Institut National de Recherche en Informatique et
Copyright 2021 OCaml Labs Consultancy Ltd
C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.