_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 |
|---|---|---|---|---|---|---|---|---|
472852d62c7c4747dd62d82feed9c122727dae2f78bc3245d6b8a9020fbb9d49 | abella-prover/abella | typing.ml | (****************************************************************************)
Copyright ( C ) 2007 - 2009 Gacek
Copyright ( C ) 2013 - 2022 Inria ( Institut National de Recherche
(* en Informatique et en Automatique) *)
(... | null | https://raw.githubusercontent.com/abella-prover/abella/7795951e17dc53d02b041f5b2ddb68161dd8ec2b/src/typing.ml | ocaml | **************************************************************************
en Informatique et en Automatique)
(at your option) an... | Copyright ( C ) 2007 - 2009 Gacek
Copyright ( C ) 2013 - 2022 Inria ( Institut National de Recherche
This file is part of Abella .
Abella is free software : you can redistribute it and/or modify
it ... |
446b36217cee0e012e46f0162c7ba3323d8acbb5d1b5c75a2d6513eff73862d2 | data61/Mirza | GS1Orphans.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
module Mirza.Common.GS1Orphans where
import Data.GS1.EventId
import Servant (ToHttpApiData)
deriving instance ToHttpApiData EventId
| null | https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/mirza-common-haskell/src/Mirza/Common/GS1Orphans.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
module Mirza.Common.GS1Orphans where
import Data.GS1.EventId
import Servant (ToHttpApiData)
deriving instance ToHttpApiData EventId
| |
e1f7198d2f4544c408178e002941c75d32d766160ce46924a0fc55ffa7a7c37d | mfelleisen/7GUI | 7state.rkt | #lang racket
(provide
SYNTAX
#; (define-state state:id state0:expr propagate:expr)
-- defines ( define state ) ...
;; -- re-defines set! for state ... so that any changes to state ... invoke propagate ...
define-state
#; (define-state* (state:id state0:expr propagate:expr) ...)
( define - state state pr... | null | https://raw.githubusercontent.com/mfelleisen/7GUI/e3631e78ab12306ad81b560443913afa4b156dec/Macros/7state.rkt | racket | (define-state state:id state0:expr propagate:expr)
-- re-defines set! for state ... so that any changes to state ... invoke propagate ...
(define-state* (state:id state0:expr propagate:expr) ...)
(set! x (values e0 e ...))
evaluate e0 and e to a list of values, use e0's value as the new value
for x and propagate ... | #lang racket
(provide
SYNTAX
-- defines ( define state ) ...
define-state
( define - state state propagate ) ...
define-state*
SYNTAX
stop)
(require (for-syntax syntax/parse))
(define-syntax (define-state* stx)
(syntax-parse stx
[(_ (state:id state0:expr f:expr) ...) #'(begin (define-state ... |
883a3a90f371e3bd2172d032d1ff89c613e6fc02c7f4c9f1fa2ac310c2de8bcb | 2600hz/kazoo | kzd_storage.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_storage.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kzd_storage).
-export([new/0]).
-export([attachments/1, attachments/2, set_attachments/2]).
-export([conn... |
b989423af1ea332ef557750cd8bcb22ca74d94e780b6aca0a0b619a97eb8e621 | ghcjs/jsaddle-dom | CSSStyleRule.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CSSStyleRule
(setSelectorText, getSelectorText, getSelectorTextUnsafe,
getSelectorTextUnchecked, getStyle, ... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/CSSStyleRule.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CSSStyleRule
(setSelectorText, getSelectorText, getSelectorTextUnsafe,
getSelectorTextUnchecked, getStyle, CSSStyleRule(..),
gTypeCSSStyleRule)
where
import Prelude ((.), (==), (>>=), return,... |
99ff354912864aca1b051858e78963dcb697a0d4985959e6ee2c1990b56c32ac | tud-fop/vanda-haskell | IO.hs | -----------------------------------------------------------------------------
-- |
Module : . Util . IO
Copyright : ( c ) Technische Universität Dresden 2014 - 2016
-- License : BSD-style
--
-- Maintainer :
-- Stability : unknown
-- Portability : portable
----------------------------------... | null | https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Vanda/Util/IO.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : unknown
Portability : portable
---------------------------------------------------------------------------
package stm
passes an action to fix/update a (partial) result. If ther... | Module : . Util . IO
Copyright : ( c ) Technische Universität Dresden 2014 - 2016
module Vanda.Util.IO
( handleOnDemand
, createForkerWithWaiter
)where
import Control.Concurrent
(atomically, modifyTVar', newTVarIO, readTVar, retry, writeTVar)
import Control.Exception (finally)
import Cont... |
fdd7381252bc61f327ca378de394cc328588aa34a6860583aa930d7b570df684 | alura-cursos/datomic-introducao | core.clj | (ns ecommerce.core
(:use clojure.pprint)
(:require [datomic.api :as d]
[ecommerce.db :as db]
[ecommerce.model :as model]))
(def conn (db/abre-conexao))
(db/cria-schema conn)
(let [computador (model/novo-produto "Computador Novo", "/computador_novo", 2500.10M)]
(d/transact conn [computad... | null | https://raw.githubusercontent.com/alura-cursos/datomic-introducao/cfb214135fed0670ee90090b63a38d8287673ac6/aula1.4/ecommerce/src/ecommerce/core.clj | clojure | (ns ecommerce.core
(:use clojure.pprint)
(:require [datomic.api :as d]
[ecommerce.db :as db]
[ecommerce.model :as model]))
(def conn (db/abre-conexao))
(db/cria-schema conn)
(let [computador (model/novo-produto "Computador Novo", "/computador_novo", 2500.10M)]
(d/transact conn [computad... | |
6fefc789d5b29916dff10f882dd934e96007ef4fcf582597356d34d833091972 | icicle-lang/icicle-ambiata | Eval.hs | | Evaluate Avalanche programs
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DoAndIfThenElse #-}
module Icicle.Avalanche.Eval (
evalProgram
, evalStmt
, RuntimeError
) where
impor... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Avalanche/Eval.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE PatternGuards #
# LANGUAGE OverloadedStrings #
# LANGUAGE DoAndIfThenElse #
| Store history information about the accumulators
| Extract base value; return an error if it's a closure
| Evaluate an entire program
with given primitive evaluator and values
Keep evaluating ... | | Evaluate Avalanche programs
# LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
module Icicle.Avalanche.Eval (
evalProgram
, evalStmt
, RuntimeError
) where
import Icicle.Avalanche.Statement.Statement
import Icicle.Avalanche.Statement.Simp.Melt
import Icicle.A... |
3814aad9bbf0479c9e1ac8bb11cd31d473903ef4ae7c91702c700136c02fda85 | joinr/spork | animation.clj | (ns spork.cljgui.animation
(:use [spork.cljgui [gui behavior scenegraph]])
(:import [java.awt Graphics2D]
[java.awt.event ActionListener]
[javax.swing Timer JPanel]))
;what we really should do is extend the drawing to IShapes
;this will let us maintain the state of the shape records, and cal... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/obe/cljgui/animation.clj | clojure | what we really should do is extend the drawing to IShapes
this will let us maintain the state of the shape records, and call their
draw-shape functions....
we take an initial drawing behavior (animation) and
a number of trails back we want to go. The idea is that
we compute a new behavior, which is the composition... | (ns spork.cljgui.animation
(:use [spork.cljgui [gui behavior scenegraph]])
(:import [java.awt Graphics2D]
[java.awt.event ActionListener]
[javax.swing Timer JPanel]))
(def greencircle (make-sprite (->relative-circle :green 100) :bitmask 0 0))
(def bluecircle (make-sprite (->relative-circle :... |
444f4164f3c630633e009a13dbfa57abaae7b8471ad32b66e3ce1f537e155b6f | r0man/google-maps-clj | projection.clj | (ns google.maps.projection
(:use google.maps.location))
(def tile-size 256)
(defstruct coords :x :y)
(defn tiles
"Returns the number of tiles for the zoom level."
[^Integer zoom]
(int (. Math pow 2 zoom)))
(defn circumference
"Returns the circumference for the zoom level."
[^Integer zoom] (* tile-size (... | null | https://raw.githubusercontent.com/r0man/google-maps-clj/75467cd366fad1250ac78f07e4796c254d09f36a/src/google/maps/projection.clj | clojure | (ns google.maps.projection
(:use google.maps.location))
(def tile-size 256)
(defstruct coords :x :y)
(defn tiles
"Returns the number of tiles for the zoom level."
[^Integer zoom]
(int (. Math pow 2 zoom)))
(defn circumference
"Returns the circumference for the zoom level."
[^Integer zoom] (* tile-size (... | |
05ad30b8aedd67b2d5c600df4704bb18457b042f92dc41f219b8efb8d7870f3f | squint-cljs/squint | resource.clj | (ns squint.resource
(:require [clojure.edn :as edn]
[clojure.java.io :as io]))
(defmacro edn-resource [f]
(list 'quote (edn/read-string (slurp (io/resource f)))))
| null | https://raw.githubusercontent.com/squint-cljs/squint/e0aac964bf00bd60cf5a3a5dbe0b89a588c5e505/resources/squint/resource.clj | clojure | (ns squint.resource
(:require [clojure.edn :as edn]
[clojure.java.io :as io]))
(defmacro edn-resource [f]
(list 'quote (edn/read-string (slurp (io/resource f)))))
| |
d2bb7675614dd02da2422a82b93629ef78373ec586d813c93ac6584cea2b429a | cdornan/keystore | PasswordStoreSchema.hs | {-# LANGUAGE QuasiQuotes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE BangPatterns #
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE ExistentialQua... | null | https://raw.githubusercontent.com/cdornan/keystore/e16103e75cf067baa3a939a1d9e79bd7af6942e7/src/Data/KeyStore/Types/PasswordStoreSchema.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE TemplateHaskell #
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE BangPatterns #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving ... |
e41d66294fbc01ea8a68bf8f8f416d9150e469a2c0075214af01903442990f47 | dongcarl/guix | utils.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2018 , 2019 , 2020 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2017 , 2019 , 2020 < >
Copyright © 2018 < >
Copyright © 2019 < >
Copyright © 2020 < 0x2b3bfa0+ >
Copyright © 2020 < >
Cop... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/import/utils.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 © 2012 , 2013 , 2018 , 2019 , 2020 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2017 , 2019 , 2020 < >
Copyright © 2018 < >
Copyright © 2019 < >
Copyright © 2020 < 0x2b3bfa0+ >
Copyright © 2020 < >
Copyright © 2021 < >
under the terms of the GNU Gener... |
19b5651c2f41fc55f4e73406e2e88ca4e787f3e3b5140f4de923eb827f8a3125 | BillHallahan/G2 | Test.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Test.Tasty
import Test.Tasty.HUnit ( testCase, assertBool, assertFailure )
import Test.Tasty.Options
import Test.Tasty.Runners
import G2.Config
import G2.Interface
import G2... | null | https://raw.githubusercontent.com/BillHallahan/G2/43e7a9f1e8f5131d91e28b54ce669e5e6782412b/tests/Test.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
Run with no arguments for default test cases.
All default test cases should pass.
Run with flag '--test-options="todo yes"' to run test cases corresponding to to-be-fixed bugs.
Test based on examples that are also good for demos
... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
module Main where
import Test.Tasty
import Test.Tasty.HUnit ( testCase, assertBool, assertFailure )
import Test.Tasty.Options
import Test.Tasty.Runners
import G2.Config
import G2.Interface
import G2.Language as G2
import Control.Exception
import Data.Maybe
import Data... |
76ed4da0ccba357d294522cbdb03b36700b414226cf906ebc0c740dd80697795 | LesleyLai/PFPL-Interpreters | e.mli | include module type of Types
val pp_typ: Format.formatter -> typ -> unit
val pp_expr: Format.formatter -> expr -> unit
val expr_typ: expr -> typ option
val is_val: expr -> bool
val step: expr -> expr
| null | https://raw.githubusercontent.com/LesleyLai/PFPL-Interpreters/5da05555b8590aa039933eb131cafd095290bde2/lib/e/e.mli | ocaml | include module type of Types
val pp_typ: Format.formatter -> typ -> unit
val pp_expr: Format.formatter -> expr -> unit
val expr_typ: expr -> typ option
val is_val: expr -> bool
val step: expr -> expr
| |
9b10b61fb50c6afed827f960a4d7c7b97eef9dde59c8bcf50141f4e154577d32 | ftovagliari/ocamleditor | text_options.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/937d6120ac48de511294f913a78ab6cd82dca92c/src/text_options.ml | ocaml | * Signals |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... |
4f2f01d49dfeabaccd0a69ad0aac9d944aebda2931b31608965de4a866c9775c | anmonteiro/piaf | request_info.ml | type t =
{ scheme : Scheme.t
; version : Versions.HTTP.t
; client_address : Eio.Net.Sockaddr.stream
; sw : Eio.Switch.t
}
| null | https://raw.githubusercontent.com/anmonteiro/piaf/782a60390b172cf1122105717bdb5c2e9924f89b/lib/request_info.ml | ocaml | type t =
{ scheme : Scheme.t
; version : Versions.HTTP.t
; client_address : Eio.Net.Sockaddr.stream
; sw : Eio.Switch.t
}
| |
34b7549c5ffa2a7c1d2319d4f410e85956f0295ec47066f00465dec650ee8f2b | gregwebs/Shelly.hs | Base.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
{-# LANGUAGE DeriveDataTypeable #-}
# L... | null | https://raw.githubusercontent.com/gregwebs/Shelly.hs/fda3a8fb49d906c78ed95a6cbf2be80964f9ee03/src/Shelly/Base.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable #
* utilities not yet exported
| ShIO is Deprecated in favor of 'Sh', which is easier to type.
# DEPRECATED ShIO "Use Sh instead of ShIO" #
^ exit code for command that ran
^ stderr for command that ran
^ working directory
^ print stdout of command that... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE InstanceSigs #
module Shelly.Base
(
Sh(..), ShIO, runSh,... |
b8ba25d8a7602018e67e9b95298b19eaee36bc12aa83d97a8bf874446c3fcc7e | knupfer/type-of-html | Custom.hs | # LANGUAGE TypeFamilies #
{-# LANGUAGE DataKinds #-}
module Custom where
import Html
newtype instance Attribute "hx-post" 'True v = HxPostA v
| null | https://raw.githubusercontent.com/knupfer/type-of-html/102bd92e7570354489bcd6d7fdeadd29c28e82a1/test/Custom.hs | haskell | # LANGUAGE DataKinds # | # LANGUAGE TypeFamilies #
module Custom where
import Html
newtype instance Attribute "hx-post" 'True v = HxPostA v
|
0f2ee49830768f4ce9e32c99f9f7a32561b81b9ac62a9807588edbdfa70eeb58 | tmattio/spin | spin_std.ml | module Glob = Glob
module Hashtbl = Hashtbl
module List = List
module Result = Result
module String = String
module Filename = Filename
module Sys = Sys
module Spawn = struct
include Spawn
let resolve_in_path prog =
Do not try to resolve in the path if the program is something like
* ./this.exe
* ./... | null | https://raw.githubusercontent.com/tmattio/spin/092ab5979d4f1d01f538743443b70465a2d5ed23/lib/spin_std/spin_std.ml | ocaml | module Glob = Glob
module Hashtbl = Hashtbl
module List = List
module Result = Result
module String = String
module Filename = Filename
module Sys = Sys
module Spawn = struct
include Spawn
let resolve_in_path prog =
Do not try to resolve in the path if the program is something like
* ./this.exe
* ./... | |
7f1f450a2df6a0f2cd774b6b349c0a45758d9ac53d180f015ecba3ece52587b0 | nuvla/api-server | data_record_test.cljc | (ns sixsq.nuvla.server.resources.spec.data-record-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.data-record :as data-record-resource]
[sixsq.nuvla.server.resources.spec.data-record :as data-record]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]))
(def vali... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/data_record_test.cljc | clojure | mandatory keywords
optional keywords | (ns sixsq.nuvla.server.resources.spec.data-record-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.data-record :as data-record-resource]
[sixsq.nuvla.server.resources.spec.data-record :as data-record]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]))
(def vali... |
ef474c21f6c9be93ea9a09c095a7486960c80c367538e8e1bd91c8f2aeefac91 | Elzair/nazghul | timer.scm | ;; A generic timer mech
(define (tmr-mk targ timeout sig)
(list targ timeout 0 #f sig))
(define (tmr-targ tmr) (car tmr))
(define (tmr-timeout tmr) (cadr tmr))
(define (tmr-count tmr) (caddr tmr))
(define (tmr-on? tmr) (cadddr tmr))
(define (tmr-sig tmr) (list-ref tmr 4))
(define (tmr-set-count! tmr val) (set-car!... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/timer.scm | scheme | A generic timer mech |
(define (tmr-mk targ timeout sig)
(list targ timeout 0 #f sig))
(define (tmr-targ tmr) (car tmr))
(define (tmr-timeout tmr) (cadr tmr))
(define (tmr-count tmr) (caddr tmr))
(define (tmr-on? tmr) (cadddr tmr))
(define (tmr-sig tmr) (list-ref tmr 4))
(define (tmr-set-count! tmr val) (set-car! (cddr tmr) val))
(defin... |
a226865ee7408059620a7aaaaa57e00dbb3ec74ebe0ca305978b48198b0138a2 | glondu/belenios | mails_voter.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2023
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/a1f9e4cc8c9aa823f3d0f9ba1e21b8c700cd5522/src/web/server/common/mails_voter.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2023
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
50695b07736aeff7ddc48391e0ad74583f88e863ed01af0f1659d626c0e53946 | LaurentMazare/ocaml-minipy | bc_code.ml | open Base
open Import
module Opcode = struct
type t =
| POP_TOP
| ROT_TWO
| ROT_THREE
| DUP_TOP
| DUP_TOP_TWO
| NOP
| UNARY_POSITIVE
| UNARY_NEGATIVE
| UNARY_NOT
| UNARY_INVERT
| BINARY_MATRIX_MULTIPLY
| INPLACE_MATRIX_MULTIPLY
| BINARY_POWER
| BINARY_MULTIPLY
... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-minipy/e83d4bfad55819a27195109d401437faa0f65f69/src/bc_code.ml | ocaml | open Base
open Import
module Opcode = struct
type t =
| POP_TOP
| ROT_TWO
| ROT_THREE
| DUP_TOP
| DUP_TOP_TWO
| NOP
| UNARY_POSITIVE
| UNARY_NEGATIVE
| UNARY_NOT
| UNARY_INVERT
| BINARY_MATRIX_MULTIPLY
| INPLACE_MATRIX_MULTIPLY
| BINARY_POWER
| BINARY_MULTIPLY
... | |
64597c47e99d31d59cc8544c9d086fedf5e98327fea1883e3af81a7495b4e56f | polysemy-research/polysemy | Common.hs | {-# LANGUAGE CPP #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE ViewPatterns #-}
# OPTIONS_HADDOCK not - home , prune #
-- | Description: TH utilities for generating effect constructors
module Polysemy.Internal.TH.Common
( ConLiftInfo (..)
, ... | null | https://raw.githubusercontent.com/polysemy-research/polysemy/10a1336f32438c2d308313f8ad55ac736145390f/src/Polysemy/Internal/TH/Common.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ViewPatterns #
| Description: TH utilities for generating effect constructors
----------------------------------------------------------------------------
Effects TH ----------------------------------------------------------------
--------------------------------------------... | # LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# OPTIONS_HADDOCK not - home , prune #
module Polysemy.Internal.TH.Common
( ConLiftInfo (..)
, getEffectMetadata
, makeMemberConstraint
, makeMemberConstraint'
, makeSemType
, makeInterpreterType
, makeEffectType
, ... |
790f2f94c6b883be1f7c7d4925c38f4e18534cbf715fcaa68427ff8fdfead288 | zotonic/zotonic | zotonic_filehandler_mappers.erl | @author < >
2014 - 2017
%%
%% @doc Handle changed files
Copyright 2014 - 2017
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by a... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_filehandler/src/zotonic_filehandler_mappers.erl | erlang |
@doc Handle changed files
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the spec... | @author < >
2014 - 2017
Copyright 2014 - 2017
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_filehandler_mappers).
-author("Arjan Scherpenisse <>").
-export([
mappers/0
]).
-export([
... |
05d9f11b6eba392ddd388dbc20b8abf6ecb1a2cc3cb5d3ba17bb727ff1f6e6c6 | facebook/pyre-check | locationBasedLookupProcessor.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/2b1a9546553ac08675d475564550b82d2f3e862a/source/server/locationBasedLookupProcessor.ml | ocaml | locationBasedLookupProcessor is a wrapper around LocationBasedLookup.create_of_module that finds
the path and creates a lookup. It is used in both hover and expression-level coverage.
If a source path corresponds to multiple artifacts, randomly pick an artifact and compute
results for it. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
b51f5f90c26b4e35a4f84656e21e81c12fbcf1e5e10a8a1cd506754cb1d8241d | ocaml/oasis | OASISPackage_intern.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISPackage_intern.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
35645d424cec16a34dfacb5132c4a4446ce8207ddf33e1d76e1285768de830a7 | marick/Midje | core.clj | (ns midje.checking.core
"Core ideas underlying all checking"
(:require [such.types :as types]
[such.sequences :as seq]))
;;; There is a notion of "extended falsehood", in which a false value may be a
;;; map containing information about what went wrong.
(defn data-laden-falsehood? [value]
(:midje/da... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/src/midje/checking/core.clj | clojure | There is a notion of "extended falsehood", in which a false value may be a
map containing information about what went wrong.
An element of extended-= is that an actual map cannot match an expected record (or type).
That produces a plain `false` above. If client code wants to be more informative, it
can use these f... | (ns midje.checking.core
"Core ideas underlying all checking"
(:require [such.types :as types]
[such.sequences :as seq]))
(defn data-laden-falsehood? [value]
(:midje/data-laden-falsehood (meta value)))
(defn as-data-laden-falsehood [value]
(vary-meta value assoc :midje/data-laden-falsehood true))
... |
4884a9cb5ed35b084a5c196e026020ac5e69d81297a2bf155745269e5cd824bc | cr-org/supernova | Connection.hs | # LANGUAGE LambdaCase , OverloadedStrings #
module Pulsar.Connection where
import Control.Applicative ( (<|>) )
import Control.Concurrent ( forkIO
, killThread
, threadDelay
... | null | https://raw.githubusercontent.com/cr-org/supernova/602409a18f47a38541ba24f5e885199efd383f48/lib/src/Pulsar/Connection.hs | haskell | | Connection details: host and port.
| Default connection data: "127.0.0.1:6650"
| It listens to incoming messages directly from the network socket and it writes them to all the
- consumers and producers' communication channels. | # LANGUAGE LambdaCase , OverloadedStrings #
module Pulsar.Connection where
import Control.Applicative ( (<|>) )
import Control.Concurrent ( forkIO
, killThread
, threadDelay
... |
435938181b6fcbd3f665ef0d4390c86ccff54639a252c5ba0a4a8743cab1163a | achirkin/vulkan | VK_KHR_sampler_ycbcr_conversion.hs | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicH... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_sampler_ycbcr_conversion.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
author: @KHR@
type: @dev... | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_KHR_sampler_ycbcr_conversion
* Vulkan extension : @VK_KHR_sampler_ycbcr... |
ce2fa6e46b0f2616db2f1f68f68f315e6c4822110405a2aa917b56218d712c1d | rbkmoney/cds | cds_maintenance_sup.erl | -module(cds_maintenance_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link() -> {ok, pid()} | {error, Reason :: any()}.
start_link() ->
supervisor:start_link(?MODULE, []).
-spec init(_) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
init(_) ->
Cleaner =... | null | https://raw.githubusercontent.com/rbkmoney/cds/7daa88e44a95de6ba0404ff492344d73fae64a95/apps/cds/src/cds_maintenance_sup.erl | erlang | -module(cds_maintenance_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link() -> {ok, pid()} | {error, Reason :: any()}.
start_link() ->
supervisor:start_link(?MODULE, []).
-spec init(_) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
init(_) ->
Cleaner =... | |
802139c5344d1536aae4b11e365e08a58cfd334ea5bd3ccc296a3da712612324 | yrashk/erlang | CosNaming_NamingContext_NotFound.erl | %%------------------------------------------------------------
%%
%% Implementation stub file
%%
Target : CosNaming_NamingContext_NotFound
Source : /net / isildur / ldisk / daily_build / otp_prebuild_r13b01.2009 - 06 - 07_20 / otp_src_R13B01 / lib / orber / COSS / CosNaming / cos_naming.idl
IC vsn : 4.2.21
%%
%... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/orber/COSS/CosNaming/CosNaming_NamingContext_NotFound.erl | erlang | ------------------------------------------------------------
Implementation stub file
This file is automatically generated. DO NOT EDIT IT.
------------------------------------------------------------
returns type code
returns id
returns name | Target : CosNaming_NamingContext_NotFound
Source : /net / isildur / ldisk / daily_build / otp_prebuild_r13b01.2009 - 06 - 07_20 / otp_src_R13B01 / lib / orber / COSS / CosNaming / cos_naming.idl
IC vsn : 4.2.21
-module('CosNaming_NamingContext_NotFound').
-ic_compiled("4_2_21").
-include("CosNaming_NamingConte... |
a30ed6c773b53bf4cdcc0cf999aa760dde52da1832147ac1fccfaecce369b148 | metosin/spec-tools | perf_test.clj | (ns spec-tools.perf-test
(:require [schema.core :as schema]
[schema.coerce :as coerce]
[spec-tools.core :as st]
[spec-tools.spec :as spec]
[criterium.core :as cc]
[clojure.spec.alpha :as s]))
;;
start repl with ` perf repl `
;; perf measured with the fol... | null | https://raw.githubusercontent.com/metosin/spec-tools/d05e6e3c76c3c6ff847aa3f8e66344df2705aeae/test/clj/spec_tools/perf_test.clj | clojure |
perf measured with the following setup:
Model Name: MacBook Pro
Model Identifier: MacBookPro11,3
81ns (alpha12)
77ns (alpha12)
430ns
1315ns
81ns (alpha14)
1430ns
95ns (alpha12)
83ns (alpha14)
25ns
1440ns (alpha12)
1160ns (alpha14)
3700ns
3.9µs (alpha14)
2.7µs (alpha14)
9.1µs | (ns spec-tools.perf-test
(:require [schema.core :as schema]
[schema.coerce :as coerce]
[spec-tools.core :as st]
[spec-tools.spec :as spec]
[criterium.core :as cc]
[clojure.spec.alpha :as s]))
start repl with ` perf repl `
Processor Name : Intel... |
24ec902896532c124277cfaef13303dba8c48b3a8745355fbd8d6c1d6d35934a | ekmett/reducers | Combinators.hs | # LANGUAGE CPP #
# LANGUAGE UndecidableInstances , TypeOperators , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , TypeFamilies #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ < 710
# LANGUAGE Trustworthy #
#endif
--------------------------------------------------... | null | https://raw.githubusercontent.com/ekmett/reducers/605d56e5824d35276df50ad0875f63c73cf4659d/src/Data/Generator/Combinators.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Generator.Combinators
License : BSD-style
Maintainer :
Stability : experimental
Portability : non-portable (type families, MPTCs)
"Data.Foldable", "Control.Monad" or elsewhere. Intended to be imported q... | # LANGUAGE CPP #
# LANGUAGE UndecidableInstances , TypeOperators , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , TypeFamilies #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ < 710
# LANGUAGE Trustworthy #
#endif
Copyright : ( c ) 2009
Utilities for wo... |
8d87627db66130a33cd97325dc5660090810bfde81020c32086cec8d24cd2572 | jwiegley/notes | MCompose.hs | module Compose where
import Control.Applicative
import Control.Monad
import Data.Functor.Compose
import Data.Functor.Identity
import Data.Distributive
import Data.Monoid
import Data.Tuple (swap)
import Data.Traversable
instance ( Monad f , Distributive f , , )
-- => Monad (Compose f g) where
-- retur... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/MCompose.hs | haskell | => Monad (Compose f g) where
return x = Compose $ return (return x)
Compose m >>= f =
let x = fmap (fmap (getCompose . f)) m in
let y = fmap distribute x in
Compose $ fmap join (join y)
return x = Compose $ return (return x)
Compose m >>= f = Compose $ do
m' <- m
... | module Compose where
import Control.Applicative
import Control.Monad
import Data.Functor.Compose
import Data.Functor.Identity
import Data.Distributive
import Data.Monoid
import Data.Tuple (swap)
import Data.Traversable
instance ( Monad f , Distributive f , , )
instance ( Monad f , , ) = > Monad ( Compose... |
a469256de434720594b029aad844d1bff10ada43cdf3f5cc85cab081a9e8aa66 | basho/machi | machi_flu0_test.erl | %% -------------------------------------------------------------------
%%
%% Machi: a small village of replicated files
%%
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
exc... | null | https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/prototype/chain-manager/test/machi_flu0_test.erl | erlang | -------------------------------------------------------------------
Machi: a small village of replicated files
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License f... | Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(... |
2d9a52c60551152340d0818ba92f5218992ecba2336a70022feca31ab60e3e37 | tenpureto/tenpureto | UI.hs | # LANGUAGE TemplateHaskell #
module Tenpureto.Effects.UI where
import Polysemy
import Polysemy.Error
import Data.Bool
import Data.Foldable
import Data.Maybe
import qualified Data.Set as Set
import Tenpureto.Data
import Tenpur... | null | https://raw.githubusercontent.com/tenpureto/tenpureto/886df860200e1a6f44ce07c24a5e7597009f71ef/src/Tenpureto/Effects/UI.hs | haskell | # LANGUAGE TemplateHaskell #
module Tenpureto.Effects.UI where
import Polysemy
import Polysemy.Error
import Data.Bool
import Data.Foldable
import Data.Maybe
import qualified Data.Set as Set
import Tenpureto.Data
import Tenpur... | |
516756237537b1a3ca187e36e4be0d13ae7ffab51c4319f544fd8c54563549dc | zeniuseducation/poly-euler | p84.clj | (ns alfa.special.p84
(:require
[clojure.set :refer [union difference intersection subset?]]
[clojure.core.reducers :as r]
[clojure.string :refer [split-lines]]
[alfa.common :refer :all]
[clojure.string :as cs]))
(def board [:GO :A1 :CC1 :A2 :T1 :R1 :B1 :CH1 :B2 :B3
:JAIL :C1 :U1 :C2 :... | null | https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/Alfa/src/alfa/special/p84.clj | clojure | (ns alfa.special.p84
(:require
[clojure.set :refer [union difference intersection subset?]]
[clojure.core.reducers :as r]
[clojure.string :refer [split-lines]]
[alfa.common :refer :all]
[clojure.string :as cs]))
(def board [:GO :A1 :CC1 :A2 :T1 :R1 :B1 :CH1 :B2 :B3
:JAIL :C1 :U1 :C2 :... | |
60654d7205d9cf74a0ce6ffce9868e24895b212352181d40a65783fe98352a3c | sheyll/newtype-zoo | NewtypeZoo.hs | # LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
-- | General Purpose Newtype Wrappers
--
-- A zoo of /newtype/ wrappers.
--
In everyday programming newtype wrappers occur again and again , to
-- convey some extra meaning for the maintainer of the code, and to prevent
-- mixing up parameters to functions with ... | null | https://raw.githubusercontent.com/sheyll/newtype-zoo/0e67717cbcd9233d9c26b6aacb4c6f8bba6ef5f7/src/NewtypeZoo.hs | haskell | | General Purpose Newtype Wrappers
A zoo of /newtype/ wrappers.
convey some extra meaning for the maintainer of the code, and to prevent
mixing up parameters to functions with the same type.
For example:
@
@
What the user actually wanted to express was:
@
applyConfiguration :: `Wanted` MyConfig -> `Curr... | # LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
In everyday programming newtype wrappers occur again and again , to
applyConfiguration : : IO MyConfig
module NewtypeZoo
(
module X
) where
import NewtypeZoo.Wanted as X
import NewtypeZoo.Valid as X
import NewtypeZoo.Updated as X
import NewtypeZ... |
4589cd7cca40651bbab7900f39581457d1b84ccc4f329d48e13ce3355dc471de | charlieg/Sparser | find.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992,1993,1994 -- all rights reserved
;;;
;;; File: "find"
;;; Module: "objects;model:individuals:"
version : 0.4 May 1994
;; initiated 7/16/92 v2.3
0.1 ( 11/10 ) fixing the semantics of some cases of the find operation
... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/individuals/find.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "find"
Module: "objects;model:individuals:"
initiated 7/16/92 v2.3
as symbols naming them since find/individual needs its bindings
in a list
--------------
Find or Make
--------------
a rule. All these individuals will be temporar... | copyright ( c ) 1992,1993,1994 -- all rights reserved
version : 0.4 May 1994
0.1 ( 11/10 ) fixing the semantics of some cases of the find operation
0.2 ( 11/23 ) adjusted how it passed arguments to simplify things
( 6/12/93 ) added define - or - find - individual to vary arg . pattern
0.3 ( 10/... |
4dee857e8f9c60c0870de5b36e3b7197d54f36efb67c9e46d010be156964a6a7 | fhur/eaml | compiler_test.clj | (ns eaml.compiler-test
(:require [eaml.compiler :refer :all]
[eaml.test-helpers :refer :all]
[eaml.fixtures.simple-res :refer :all]
[presto.core :refer :all]
[clojure.test :refer :all]))
(expected-when "Transpiling simple resources" transpile-str
when [fix-simple-c... | null | https://raw.githubusercontent.com/fhur/eaml/ee398417d4ec76966f3b88b61ffc9332741eeb28/test/eaml/compiler_test.clj | clojure |
}
}
| (ns eaml.compiler-test
(:require [eaml.compiler :refer :all]
[eaml.test-helpers :refer :all]
[eaml.fixtures.simple-res :refer :all]
[presto.core :refer :all]
[clojure.test :refer :all]))
(expected-when "Transpiling simple resources" transpile-str
when [fix-simple-c... |
b492e9a10389a275f094f7e7cddd88657d8cff224c2708b79e0797c1d464c580 | nkaretnikov/OOHaskell | Rectangle.hs |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Rectangle where
import Shape
-- The delta of rectangles
data RectangleDelta w =
RectangleDelta { getWidth :: Int
, getHeight :: Int
, rectangleTail :: w }
-- An extension of Shape... | null | https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/repository/shapes/Haskell/Shapes2/Rectangle.hs | haskell | The delta of rectangles
An extension of Shape
A "closed" constructor
Setters
Implement abstract draw method |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Rectangle where
import Shape
data RectangleDelta w =
RectangleDelta { getWidth :: Int
, getHeight :: Int
, rectangleTail :: w }
type Rectangle w = Shape (RectangleDelta w)
rec... |
6aa2bd921937f86f26ce6a008cad8a698902f96c49030ce22e7e959b25b8bdae | zoedsoupe/estrutura_de_dados | CombinacaoSpec.hs | module LE1.Recursao.CombinacaoSpec where
import Test.Hspec
import LE1.Recursao.Combinacao
spec :: Spec
spec = do
describe "testa o algoritmo de combinação" $ do
it "deve retornar 1 se k == 0" $ do
combina 2 0 `shouldBe` 1
combina 10 3 `shouldBe` 120
it "deve retornar 1 se n == k" $ do
... | null | https://raw.githubusercontent.com/zoedsoupe/estrutura_de_dados/01ffa048e373636769bb7ce1843a1e19aaad3a6c/test/LE1/Recursao/CombinacaoSpec.hs | haskell | module LE1.Recursao.CombinacaoSpec where
import Test.Hspec
import LE1.Recursao.Combinacao
spec :: Spec
spec = do
describe "testa o algoritmo de combinação" $ do
it "deve retornar 1 se k == 0" $ do
combina 2 0 `shouldBe` 1
combina 10 3 `shouldBe` 120
it "deve retornar 1 se n == k" $ do
... | |
70a8b23417d395c1aa9ba72fd28dc4c588993a6fc8c1edd6ee69594486f766c3 | jamesdbrock/replace-attoparsec | TestText.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
module TestText ( tests ) where
import Distribution.TestSuite as TestSuite
import Replace.Attoparsec.Text
import Data.Attoparsec.Text as A
import Data.Attoparsec.Combinator
import qualified Data.Text as T
import Text.Parser.Char (upper)... | null | https://raw.githubusercontent.com/jamesdbrock/replace-attoparsec/188f43b751d1f55761ce2364e68f93e7e3eb12e5/tests/TestText.hs | haskell | # LANGUAGE OverloadedStrings #
and succeeds. | # LANGUAGE FlexibleContexts #
# LANGUAGE CPP #
module TestText ( tests ) where
import Distribution.TestSuite as TestSuite
import Replace.Attoparsec.Text
import Data.Attoparsec.Text as A
import Data.Attoparsec.Combinator
import qualified Data.Text as T
import Text.Parser.Char (upper)
import Control.Applicative
import ... |
531145f53a5136e9cbe9e398824b7b35f4e99ad49bbe82fe6b2aaeb3be622f9c | kenbot/church | PeanoNat.hs | module PeanoNat where
data PNat = Zero | Succ PNat
deriving Show
p0, p1, p2, p3, p4 :: PNat
p0 = Zero
p1 = Succ p0
p2 = Succ p1
p3 = Succ p2
p4 = Succ p3
pPlus :: PNat -> PNat -> PNat
pPlus Zero b = b
pPlus (Succ x) b = pPlus x (Succ b)
pMult :: PNat -> PNat -> PNat
pMult Zero _ = Zero
pMult (Succ x) b = pP... | null | https://raw.githubusercontent.com/kenbot/church/a3da46b584dde00b66da14943154f225f062eb86/PeanoNat.hs | haskell | module PeanoNat where
data PNat = Zero | Succ PNat
deriving Show
p0, p1, p2, p3, p4 :: PNat
p0 = Zero
p1 = Succ p0
p2 = Succ p1
p3 = Succ p2
p4 = Succ p3
pPlus :: PNat -> PNat -> PNat
pPlus Zero b = b
pPlus (Succ x) b = pPlus x (Succ b)
pMult :: PNat -> PNat -> PNat
pMult Zero _ = Zero
pMult (Succ x) b = pP... | |
93292fbf001281aca169e5c70155054185bfba5f19cce260847b22f3d4c6aeec | htm-community/clortex | date.clj | (ns clortex.domain.sensors.date
(require [clj-time.core :as tc]
[clj-time.format :as tf]))
(def opf-timestamp-re #"(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):([0-9.]+)")
(defn strip-leading-zeros [s] (clojure.string/replace-first s #"^0+([1-9.])" "$1"))
(defn old-parse-opf-date
[s]
(let [m (re-matches opf-timestamp... | null | https://raw.githubusercontent.com/htm-community/clortex/69003a352140510f47c6b8e18ad6a98a7b5a3bba/src/clortex/domain/sensors/date.clj | clojure | (ns clortex.domain.sensors.date
(require [clj-time.core :as tc]
[clj-time.format :as tf]))
(def opf-timestamp-re #"(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):([0-9.]+)")
(defn strip-leading-zeros [s] (clojure.string/replace-first s #"^0+([1-9.])" "$1"))
(defn old-parse-opf-date
[s]
(let [m (re-matches opf-timestamp... | |
e96acab0a8e1a7ba003bad14337ea5f19f9a140a4a025356c8911f94a8797172 | helvm/helma | WrapTokenList.hs | module HelVM.HelMA.Automaton.WrapTokenList where
import qualified Text.Read
import qualified Text.Show
newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
deriving stock (Eq)
----
instance Show a => Show (WrapTokenList [a]) where
show (WrapTokenList tokens) = show =<< tokens
instance Read a => Rea... | null | https://raw.githubusercontent.com/helvm/helma/b4b5a0a4cc170329cae5d626239a24a6044d7c87/hs/src/HelVM/HelMA/Automaton/WrapTokenList.hs | haskell | -- | module HelVM.HelMA.Automaton.WrapTokenList where
import qualified Text.Read
import qualified Text.Show
newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
deriving stock (Eq)
instance Show a => Show (WrapTokenList [a]) where
show (WrapTokenList tokens) = show =<< tokens
instance Read a => Read (Wr... |
091a9b5b31e03fbeee0ecd0a4f72eecd357aadab7efae5aa56755eefb63e10aa | archaelus/erlmail | imapd_util.erl | %%%---------------------------------------------------------------------------------------
@author < > [ ]
2006 - 2007 Simple Enigma , Inc. All Rights Reserved .
%%% @doc IMAP server utility functions
@reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</a >... | null | https://raw.githubusercontent.com/archaelus/erlmail/fe69b0e936f1512b4f349666e56c31c0af7b672c/src/imapd_util.erl | erlang | ---------------------------------------------------------------------------------------
@doc IMAP server utility functions
@reference See <a href="" target="_top">ErlMail Google Code Repository</a> for more information
@version 0.0.6
@end
Permission is hereby granted, free of charge, to any pe... | @author < > [ ]
2006 - 2007 Simple Enigma , Inc. All Rights Reserved .
@reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</a > for more information
@since 0.0.6
The MIT License
Copyright ( c ) 2007 , Simple Enigma , Inc. All Righs Reserved
i... |
e55d6e25e786991c9d0a087b78cb26f1a3f71c56f7df1a13196fee0b08735985 | bakul/s9fes | inet-server.scm | Scheme 9 from Empty Space , Unix Function Library
By , 2010
; Placed in the Public Domain
;
( inet - server procedure^5 ) = = > undefined
( inet - server procedure^5 integer ) = = > undefined
;
Create a server socket , bind it to host STRING1 , port STRING2 and
; listen for requests on ... | null | https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/ext/sys-unix/inet-server.scm | scheme | Placed in the Public Domain
listen for requests on that socket. When a request comes in, spawn
a child process to handle the request. PROCEDURE^5 will be called
by the child process. When the procedure returns, the child will
close the connection and terminate.
The following arguments are passed to PROCEDURE^5... | Scheme 9 from Empty Space , Unix Function Library
By , 2010
( inet - server procedure^5 ) = = > undefined
( inet - server procedure^5 integer ) = = > undefined
Create a server socket , bind it to host STRING1 , port STRING2 and
PEER a list of the form ( IP PORT ) where IP is ... |
7bc09fe9578b6ec77bbd754fc9a7cb4379a8aef5d44f7dfef65e38016e42907a | mransan/raft-udp | raft_utl_logger.mli | (** Utilities around Lwt default logger *)
val start : basename:string -> interval:int -> unit -> unit Lwt.t
* [ start ~basename ~interval ( ) ] returns a perpetual thread which
implements a rotating Lwt logger every [ interval ] seconds . Only the 3
latest log file are kept . The log file name format is... | null | https://raw.githubusercontent.com/mransan/raft-udp/ffa307fa6d8bdaa3133f3cc66149ac7dfda5fc7c/src/utl/raft_utl_logger.mli | ocaml | * Utilities around Lwt default logger |
val start : basename:string -> interval:int -> unit -> unit Lwt.t
* [ start ~basename ~interval ( ) ] returns a perpetual thread which
implements a rotating Lwt logger every [ interval ] seconds . Only the 3
latest log file are kept . The log file name format is
< basename>_<timestamp>.log
impl... |
69addf4f103ad8d5a922f0bda286e3895011db7dee8a4a99b1414d1c510dc19a | haskell/hackage-server | State.hs | # LANGUAGE DeriveDataTypeable , ,
TypeFamilies , TemplateHaskell #
TypeFamilies, TemplateHaskell #-}
module Distribution.Server.Features.AnalyticsPixels.State
( AnalyticsPixel(..)
, AnalyticsPixelsState(..)
, initialAnalyticsPixelsState
-- * State queries and updates
... | null | https://raw.githubusercontent.com/haskell/hackage-server/0ba623b610e3afc514a7a3dffa1bcc0994ea2ba1/src/Distribution/Server/Features/AnalyticsPixels/State.hs | haskell | * State queries and updates
| Adds a 'AnalyticsPixel' to a 'Package'. Returns 'True' if the pixel was inserted, and 'False' if
the 'AnalyticsPixel' was already present.
| Removes a 'AnalyticsPixel' from a 'Package'.
get and replace the entire state, for backups | # LANGUAGE DeriveDataTypeable , ,
TypeFamilies , TemplateHaskell #
TypeFamilies, TemplateHaskell #-}
module Distribution.Server.Features.AnalyticsPixels.State
( AnalyticsPixel(..)
, AnalyticsPixelsState(..)
, initialAnalyticsPixelsState
, AnalyticsPixelsForPackage(..)
... |
023ff5057dddc31d5349775c1f86c0fa2ddb98a1193611ea8be722d1453310fc | dschrempf/elynx | Options.hs | # LANGUAGE DeriveGeneric #
-- |
Module : SLynx . Options
Description : SLynx general options
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Sat Sep 7 18:55:03 2019 .
module SLynx.Options ... | null | https://raw.githubusercontent.com/dschrempf/elynx/f73f4474c61c22c6a9e54c56bdc34b37eff09687/slynx/src/SLynx/Options.hs | haskell | |
Maintainer :
Stability : unstable
Portability : portable
| # LANGUAGE DeriveGeneric #
Module : SLynx . Options
Description : SLynx general options
Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Sat Sep 7 18:55:03 2019 .
module SLynx.Options (CommandArguments (..)) where
import Data.Aeson
import ELynx.Alphabet.Alphabet
impo... |
ff1289590dfca76cfd5a44aa9499a3f13f99ff3d2e5f65ca0b4c4fc5588051f6 | debug-ito/net-spider | Internal.hs | -- |
-- Module: NetSpider.Query.Internal
-- Description:
Maintainer : < >
--
--
module NetSpider.Query.Internal
( FoundNodePolicy(..)
) where
| Policy to treat ' FoundNode 's ( local findings ) when the spider
-- creates the snapshot graph.
--
' ' instance was added in version 0.3.2.0
--
@s... | null | https://raw.githubusercontent.com/debug-ito/net-spider/82dfbdca1add1edfd54ef36cb1ca5129d528b814/net-spider/src/NetSpider/Query/Internal.hs | haskell | |
Module: NetSpider.Query.Internal
Description:
creates the snapshot graph.
| Maintainer : < >
module NetSpider.Query.Internal
( FoundNodePolicy(..)
) where
| Policy to treat ' FoundNode 's ( local findings ) when the spider
' ' instance was added in version 0.3.2.0
@since 0.2.0.0
data FoundNodePolicy n na=
PolicyOverwrite
| PolicyAppend
deriving (Show,Eq)
|
30774b0b9ca9c4c8ef634527fb300189632cfbf0519d02a585ef9bc80c6dd691 | monadfix/ormolu-live | Lit.hs |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[HsLit]{Abstract syntax : source - language literals }
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[HsLit]{Abstract syntax: source-language li... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/GHC/Hs/Lit.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE ConstraintKinds #
# SOURCE #
************************************************************************
* *
\subsection[HsLit]{Literals}
* ... |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[HsLit]{Abstract syntax : source - language literals }
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[HsLit]{Abstract syntax: source-language li... |
b403194047e2b69f8ace2c932c524bc0ea158007c07f82ec6f2032e8d5bb50e1 | ndmitchell/shake | Basic.hs |
module Test.Basic(main) where
import Development.Shake
import System.FilePath
import Test.Type
import System.Directory as IO
import Data.List
import Control.Monad
import General.Extra
main = testBuild test $ do
"AB.txt" %> \out -> do
need ["A.txt", "B.txt"]
text1 <- readFile' "A.txt"
tex... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Test/Basic.hs | haskell | sometimes takes a while for the file system to notice
if you collapse depends to [Id] then this ends up asking for the stale 'a'
should say "no want/action statements, nothing to do" (checked manually) |
module Test.Basic(main) where
import Development.Shake
import System.FilePath
import Test.Type
import System.Directory as IO
import Data.List
import Control.Monad
import General.Extra
main = testBuild test $ do
"AB.txt" %> \out -> do
need ["A.txt", "B.txt"]
text1 <- readFile' "A.txt"
tex... |
9beecf3fe922db6e90c7b5f17fddfc5db03aebed584e82b3141145517e71fdf6 | xh4/web-toolkit | function.lisp | (in-package :utility)
(defun function-lambda-list (function)
(macrolet ((with-unknown-on-error (&body body)
`(handler-case (progn ,@body)
(error () :unknown))))
(let ((cont-function-p))
(let ((function (etypecase function
(cl-cont::funcallable/cc
... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/utility/function.lisp | lisp | (in-package :utility)
(defun function-lambda-list (function)
(macrolet ((with-unknown-on-error (&body body)
`(handler-case (progn ,@body)
(error () :unknown))))
(let ((cont-function-p))
(let ((function (etypecase function
(cl-cont::funcallable/cc
... | |
c41dc6ba5a8f22f208d43ccf6106905598d0f6c34cd01e3352fcc44928b061d3 | mhwombat/creatur | BenchAll.hs | ------------------------------------------------------------------------
-- |
-- Module : Main
Copyright : ( c ) 2014 - 2022
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- Runs the benchmarks.
--
--------------------------------------------... | null | https://raw.githubusercontent.com/mhwombat/creatur/c715f4de16d29b646b27f3185d1d073df0fc9cb6/unused/BenchAll.hs | haskell | ----------------------------------------------------------------------
|
Module : Main
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
Runs the benchmarks.
---------------------------------------------------------------------- | Copyright : ( c ) 2014 - 2022
module Main where
import ALife.Creatur.Genetics.BRGCBoolBench (benchmark)
import ALife.Creatur.Genetics.BRGCWord8Bench (benchmark)
import Criterion.Main (Benchmark, defaultMain)
benches :: [Benchmark]
benches =
[
ALife.Creatur.Genetics.BRGCBoolBench.benchmark,
ALif... |
dde58e3a08f19d5ec08837fcacae1ff547ab2b93f8d740348bcba36717705368 | nilenso/time-tracker | project.clj | (defproject time-tracker "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "-tracker"
:scm {:name "git" :url "-tracker"}
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha13"]
[org.clojure/tools.cli "1.0.194"]
... | null | https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/project.clj | clojure | dev dependencies | (defproject time-tracker "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "-tracker"
:scm {:name "git" :url "-tracker"}
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha13"]
[org.clojure/tools.cli "1.0.194"]
... |
79268ff946a3e14d3327b00773410247395994831d9e19184a547441a71cd71f | rollacaster/sketches | sierpinski.cljs | (ns sketches.nature-of-code.fractals.sierpinski
(:require [quil.core :as q :include-macros true]
[sketches.vector :as v]))
(defn compute-triangles [v1 v2 v3]
(let [[x1 y1] (v/mult (v/add v1 v2) 0.5)
[x2 y2] (v/mult (v/add v1 v3) 0.5)
[x3 y3] (v/mult (v/add v3 v2) 0.5)]
[[v1 [x1 y1] ... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/fractals/sierpinski.cljs | clojure | (ns sketches.nature-of-code.fractals.sierpinski
(:require [quil.core :as q :include-macros true]
[sketches.vector :as v]))
(defn compute-triangles [v1 v2 v3]
(let [[x1 y1] (v/mult (v/add v1 v2) 0.5)
[x2 y2] (v/mult (v/add v1 v3) 0.5)
[x3 y3] (v/mult (v/add v3 v2) 0.5)]
[[v1 [x1 y1] ... | |
d127946c83fed085106706697423750e04ccd036de022192caed23daf63c4888 | johnlawrenceaspden/hobby-code | map-destructuring.clj | Maps
;; I can never ever remember how this works, so here is a note to self:
1
;; And by let-lambda isomorphism
1
Why on earth is the syntax the wrong way round ? Why ca n't { : a a } match { : a 1 } ?
;; Similarly
[ 1 2 ]
; [ 1 2 ]
;; And with the common pattern where the variables are like th... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/map-destructuring.clj | clojure | I can never ever remember how this works, so here is a note to self:
And by let-lambda isomorphism
Similarly
[ 1 2 ]
And with the common pattern where the variables are like the keys:
We can destructure recursively (although we may not be wise to if we keep forgetting how it works!)
[1 2 3]
[1 2 3]
And we can ... | Maps
1
1
Why on earth is the syntax the wrong way round ? Why ca n't { : a a } match { : a 1 } ?
[ 1 2 ]
[ 1 2 ]
[ 1 2 ]
(let [{a :a {c :c d :d :as b} :b}
{:a 1 :b {:c 2 :d 3}}]
- > [ 1 { : c 2 , : d 3 } 2 3 ]
(def ring-request
{:params {:action "a" :key "k" :spurious "sp"}
... |
cf5c89b1e0412aa91d6856fd195b74c019e0b42a7c60514394902143f6159166 | soranoba/bbmustache | bbmustache_tests.erl | 2015 All Rights Reserved .
-module(bbmustache_tests).
-include_lib("eunit/include/eunit.hrl").
%%----------------------------------------------------------------------------------------------------------------------
%% Unit Tests
%%---------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/soranoba/bbmustache/dba8c7a50c9e6cba08c89319a7cf53221be4b0f0/test/bbmustache_tests.erl | erlang | ----------------------------------------------------------------------------------------------------------------------
Unit Tests
----------------------------------------------------------------------------------------------------------------------
parse_binary_test generator (success case)
parse_binary_test generat... | 2015 All Rights Reserved .
-module(bbmustache_tests).
-include_lib("eunit/include/eunit.hrl").
-define(PARSE_ERROR, incorrect_format).
-define(FILE_ERROR, file_not_found).
-define(NT_S(X, Y), ?_assertMatch({_, X, _, _, _, _}, bbmustache:parse_binary(Y))).
-define(NT_F(X, Y), ?_assertError(X, ... |
13235c36d610062f509bca8014ab3f7426c83a352396bf410aa60fa11bc0a88d | openbadgefactory/salava | edit_profile.cljs | (ns salava.user.ui.edit-profile
(:require [reagent.core :refer [atom cursor]]
[reagent.session :as session]
[reagent-modals.modals :as m]
[salava.core.ui.ajax-utils :as ajax]
[salava.core.ui.layout :as layout]
[salava.core.ui.field :as f]
[salava... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/user/ui/edit_profile.cljs | clojure | (ns salava.user.ui.edit-profile
(:require [reagent.core :refer [atom cursor]]
[reagent.session :as session]
[reagent-modals.modals :as m]
[salava.core.ui.ajax-utils :as ajax]
[salava.core.ui.layout :as layout]
[salava.core.ui.field :as f]
[salava... | |
43eaca438ccd0e9c671dd65c3524212952ad8eaa545bbd21b274fc382b75eeee | jordwalke/rehp | generate_closure.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/generate_closure.ml | ocaml | Collects adjacent closures.
make sure we have the latest version
Code.invariant (pc, blocks, free_pc); | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
59522b16da4c5a6e136096ee8656fa182335dd436dd879e34b913f1e0e7b5d93 | korya/efuns | dPrintf.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/dPrintf.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : dPrintf.ml , v 1.1 1999/10/25 07:39:40 lefessan Exp $
external format_int: string -> int -> string = ... |
d04ac76863b7c7817021be8605f82c6e02e6fc2ad44a5428c25b4b6873f3b408 | jserot/caph | options.ml | (************************************************************************************)
(* *)
(* CAPH *)
(* -bpclermont.fr ... | null | https://raw.githubusercontent.com/jserot/caph/2b3b241f0c32aa4fcaf60d4b8529956cca8aa6b1/compiler/options.ml | ocaml | **********************************************************************************
CAPH
-bpclermont.fr
... |
Copyright 2011 - 2019 . All rights reserved .
This file is distributed under the terms of the Q Public License version 1.0 .
let print_version () = Printf.printf "This is the Caph compiler, version %s\n" Version.version; exit 0
type output_for... |
678e1d289dcb6677863bf5083cc9ef8ab927f41aa3a2c4501ce79a05ccd05f70 | simmone/racket-simple-qr | example.rkt | #lang racket
(require simple-qr)
block 's default width is 5
(qr-write "" "normal.png")
(qr-write "" "normal_color.png" #:color '("#ffbb33" . "#0d47a1"))
(qr-write "" "normal_trans.png" #:color '("#9933CC" . "transparent"))
(qr-write "" "small.png" #:module_width 2)
(qr-write "" "large.png" #:module_width 10)... | null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/example/example.rkt | racket | #lang racket
(require simple-qr)
block 's default width is 5
(qr-write "" "normal.png")
(qr-write "" "normal_color.png" #:color '("#ffbb33" . "#0d47a1"))
(qr-write "" "normal_trans.png" #:color '("#9933CC" . "transparent"))
(qr-write "" "small.png" #:module_width 2)
(qr-write "" "large.png" #:module_width 10)... | |
a50c8f8f0c80aea684fca7610dba692afc68fa47eb12cf1b5661fbcd2e1b8f85 | lgessler/glam | span.cljc | (ns glam.models.span
(:require [clojure.set :refer [rename-keys]]
[com.wsscode.pathom.connect :as pc]
[taoensso.timbre :as log]
#?(:cljs [glam.models.common :as mc]
:clj [glam.models.common :as mc :refer [server-error server-message]])
#?(:clj [glam.xtdb... | null | https://raw.githubusercontent.com/lgessler/glam/871ac6e9343754755c90dc124cdb00a1cf3d8406/src/main/glam/models/span.cljc | clojure | user --------------------------------------------------------------------------------
admin -------------------------------------------------------------------------------- | (ns glam.models.span
(:require [clojure.set :refer [rename-keys]]
[com.wsscode.pathom.connect :as pc]
[taoensso.timbre :as log]
#?(:cljs [glam.models.common :as mc]
:clj [glam.models.common :as mc :refer [server-error server-message]])
#?(:clj [glam.xtdb... |
5c4952ab8e9175b3f620e4a988a5945473303140c6b637f880d2b2728c94078d | abyala/advent-2022-clojure | day23_test.clj | (ns advent-2022-clojure.day23-test
(:require [clojure.test :refer :all]
[advent-2022-clojure.day23 :refer :all]))
(def test-simple-data (slurp "resources/day23-test-simple.txt"))
(def test-complex-data (slurp "resources/day23-test-complex.txt"))
(def puzzle-data (slurp "resources/day23-puzzle.txt"))
(de... | null | https://raw.githubusercontent.com/abyala/advent-2022-clojure/4dba868c2019efe8da74c82de7d82883f44be659/test/advent_2022_clojure/day23_test.clj | clojure | (ns advent-2022-clojure.day23-test
(:require [clojure.test :refer :all]
[advent-2022-clojure.day23 :refer :all]))
(def test-simple-data (slurp "resources/day23-test-simple.txt"))
(def test-complex-data (slurp "resources/day23-test-complex.txt"))
(def puzzle-data (slurp "resources/day23-puzzle.txt"))
(de... | |
2d4d5c0505e8349b1b1d85c39e45080965a8e52f3f1ea4542b8c2e8fd765016e | simonmar/parconc-examples | logger.hs | import Control.Concurrent
import Control.Monad
-- -----------------------------------------------------------------------------
-- <<Logger
data Logger = Logger (MVar LogCommand)
data LogCommand = Message String | Stop (MVar ())
-- >>
< < initLogger
initLogger :: IO Logger
initLogger = do
m <- newEmptyMVar
le... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/logger.hs | haskell | -----------------------------------------------------------------------------
<<Logger
>>
>>
<<logger
>>
<<logMessage
>>
<<logStop
>>
<<main
>> | import Control.Concurrent
import Control.Monad
data Logger = Logger (MVar LogCommand)
data LogCommand = Message String | Stop (MVar ())
< < initLogger
initLogger :: IO Logger
initLogger = do
m <- newEmptyMVar
let l = Logger m
forkIO (logger l)
return l
logger :: Logger -> IO ()
logger (Logger m) = loop
... |
f08ac67c08549119f8a57fee0cb65343fd49507d672bf5ab47d3cb2c0ed204ad | thheller/js-framework-shadow-grove | util.cljs | (ns bench.util)
(def adjectives ["pretty", "large", "big", "small", "tall", "short", "long", "handsome", "plain", "quaint", "clean", "elegant", "easy", "angry", "crazy", "helpful", "mushy", "odd", "unsightly", "adorable", "important", "inexpensive", "cheap", "expensive", "fancy"])
(def colours ["red", "yellow", "blue"... | null | https://raw.githubusercontent.com/thheller/js-framework-shadow-grove/8d1cf1589d0c9f17aeae79784cb46a26239657f9/src/main/bench/util.cljs | clojure | (ns bench.util)
(def adjectives ["pretty", "large", "big", "small", "tall", "short", "long", "handsome", "plain", "quaint", "clean", "elegant", "easy", "angry", "crazy", "helpful", "mushy", "odd", "unsightly", "adorable", "important", "inexpensive", "cheap", "expensive", "fancy"])
(def colours ["red", "yellow", "blue"... | |
2193fc74fedd00deaef7082a4f7e1ebf3143212c1dfa876369b7dc83027762cb | rfindler/lindenmayer | lex.rkt | #lang 2d racket/base
(provide lindenmayer-lexer)
(require racket/match racket/list)
(module+ test (require rackunit))
(struct errstate (mode data) #:transparent)
(define errlabel 'errlabel)
(define errnobrk 'errnobrk)
(define errresum 'errresum)
(define errnewln 'errnewln)
(define (sec-next state data)
(define tra... | null | https://raw.githubusercontent.com/rfindler/lindenmayer/2ef7b4535d8ae1eb7cc2e16e2b630c30a4b9a34d/simple/lex.rkt | racket | mode. The error state is handled specially; it must be able to make a
transition for arbitrary input string.
The current error recovery strategy tries to re-lex with the previous state
after every spaces (and falls back to the 'rule-reset' state of the original state
when hitting a new line). Thus, when designing... | #lang 2d racket/base
(provide lindenmayer-lexer)
(require racket/match racket/list)
(module+ test (require rackunit))
(struct errstate (mode data) #:transparent)
(define errlabel 'errlabel)
(define errnobrk 'errnobrk)
(define errresum 'errresum)
(define errnewln 'errnewln)
(define (sec-next state data)
(define tra... |
9f734882eb1f8b052f22a536112358595111a70f563fa608be963beeb49fe96c | logicblocks/salutem | async.clj | (ns salutem.test.support.async
(:require
[clojure.core.async :as async]
[tick.alpha.api :as t]))
(defn <!!-or-timeout
([chan]
(<!!-or-timeout chan (t/new-duration 100 :millis)))
([chan timeout]
(async/alt!!
chan ([v] v)
(async/timeout (t/millis timeout))
(throw (ex-info "Timed out wai... | null | https://raw.githubusercontent.com/logicblocks/salutem/7ed95354d84b505d8c5d4ebeaad9b77ddf22b479/core/test/shared/salutem/test/support/async.clj | clojure | (ns salutem.test.support.async
(:require
[clojure.core.async :as async]
[tick.alpha.api :as t]))
(defn <!!-or-timeout
([chan]
(<!!-or-timeout chan (t/new-duration 100 :millis)))
([chan timeout]
(async/alt!!
chan ([v] v)
(async/timeout (t/millis timeout))
(throw (ex-info "Timed out wai... | |
edb09b44e5d79695694d4e1544921f7dc3a6b9b39087d3ad44a4ffb4e7ec713c | tsloughter/rebar3_tests | git_plugin_upgrade.erl | -module(git_plugin_upgrade).
-export([]).
| null | https://raw.githubusercontent.com/tsloughter/rebar3_tests/090bfef7d3a4790bb6b16e4c38df6e4c0460b4b2/git_plugin_upgrade/src/git_plugin_upgrade.erl | erlang | -module(git_plugin_upgrade).
-export([]).
| |
5e7316dce2c803dde3cd3c2e714ce2a6434a85b353397a1cf31e92b61c49c5ed | blockfrost/blockfrost-haskell | Pools.hs | -- | Cardano Pools reponses
module Blockfrost.Types.Cardano.Pools
( PoolEpoch (..)
, PoolInfo (..)
, PoolHistory (..)
, PoolMetadata (..)
, PoolRelay (..)
, PoolDelegator (..)
, PoolUpdate (..)
, PoolRegistrationAction (..)
, samplePoolRelay
) where
import Data.Aeson (FromJSON (..), ToJSON (..), o... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/5ced57686d95e7b14569e96f4244b701f1e321e4/blockfrost-api/src/Blockfrost/Types/Cardano/Pools.hs | haskell | | Cardano Pools reponses
| Retirement epoch for pool
^ Bech32 encoded pool ID
^ Retirement epoch number
| Detailed pool information
^ Bech32 encoded pool ID
^ Hexadecimal pool ID.
^ VRF key hash
^ Total minted blocks
^ Number of blocks minted in the current epoch
^ Stake pool certificate pledge
^ Stake pool... |
module Blockfrost.Types.Cardano.Pools
( PoolEpoch (..)
, PoolInfo (..)
, PoolHistory (..)
, PoolMetadata (..)
, PoolRelay (..)
, PoolDelegator (..)
, PoolUpdate (..)
, PoolRegistrationAction (..)
, samplePoolRelay
) where
import Data.Aeson (FromJSON (..), ToJSON (..), object, pairs, withText)
impo... |
dedbe422df5036805fd4f9d2d02841dbb0558178dc84f9467f053db5156d9355 | RolfRolles/PandemicML | Z3Stuff.ml | Functionality provided in this module:
* Making a new context -- no dependencies
* Making "sorts", given a context and an IR.typereg size -- needs a context
* Mapping IR.var terms into Z3.ast terms -- relies upon previous function
* Making a new variable, given a context, a name, and a type -- needs a context
* Makin... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Incubator/Z3Stuff.ml | ocaml | Read n bytes linearly (a[i] where 0 <= i < n) and store them into a list
Remove List.rev for big-endian; TypeReg_32 index might break later assumptions
Map these bytes into bit-vectors of size n1 (the size of the read)
Extract n bytes (BV(8)s) from the bitvector specified in t
Remove List.rev for big-endian; T... | Functionality provided in this module:
* Making a new context -- no dependencies
* Making "sorts", given a context and an IR.typereg size -- needs a context
* Mapping IR.var terms into Z3.ast terms -- relies upon previous function
* Making a new variable, given a context, a name, and a type -- needs a context
* Makin... |
439abb8c729405b156484e0983d2865cbf37d0111cf596a54d8a283add2fabfa | GlideAngle/flare-timing | SpeedFraction.hs | module SpeedFraction (speedFractionUnits, speedFractionInputs, speedFraction) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit as HU ((@?=), testCase)
import Data.Ratio ((%))
import Data.UnitsOfMeasure (u, convert)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units ()
import q... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/172a9b199eb1ff72c967669dc349cbf8d9c4bc52/lang-haskell/gap-math/test-suite-math/SpeedFraction.hs | haskell | module SpeedFraction (speedFractionUnits, speedFractionInputs, speedFraction) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit as HU ((@?=), testCase)
import Data.Ratio ((%))
import Data.UnitsOfMeasure (u, convert)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units ()
import q... | |
d5860000b9485083b2c1df3ea090374a9d80b2ebd02836809d92c28177f02130 | fab13n/lamtez | typecheck.ml | open Utils
module Ctx = Typecheck_ctx
module A = Ast
module P = String_of_ast
module StringSet = Set.Make(String)
type typed_contract = {
ctx: Ctx.t;
storage_type: A.etype;
param_type: A.etype;
result_type: A.etype;
storage_init: A.expr option;
code: A.expr }
let _DEBUG_ = ref false
l... | null | https://raw.githubusercontent.com/fab13n/lamtez/ec0aab3093ca8380a4cd364f21cf763d729de25f/typecheck.ml | ocaml | Translates a pattern, and the type it matches, into type constraints
* added to `ctx`;
* Pushes the pattern variables into ctx' expression variables;
* Keeps a bookmark to allow the removal of those evars.
Assume that etype has the corresponding product's type,
* and that every field has the corresponding f... | open Utils
module Ctx = Typecheck_ctx
module A = Ast
module P = String_of_ast
module StringSet = Set.Make(String)
type typed_contract = {
ctx: Ctx.t;
storage_type: A.etype;
param_type: A.etype;
result_type: A.etype;
storage_init: A.expr option;
code: A.expr }
let _DEBUG_ = ref false
l... |
e1c6ff87113cae73399aa222ec7b57db1178bd7e805c091d374ee9543ed94efc | brawnski/git-annex | Uninit.hs | git - annex command
-
- Copyright 2010 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Uninit where
import Control.Monad.State (liftIO)
import System.Directory
import System.Exit
im... | null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Command/Uninit.hs | haskell | to by each.
avoid normal shutdown | git - annex command
-
- Copyright 2010 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Uninit where
import Control.Monad.State (liftIO)
import System.Directory
import System.Exit
im... |
cd3b39ff1f696041de583c11c26409dc446e653df6a8980d17779b25c29d8c3d | logicmoo/wam_common_lisp | system.lsp | ;;;
;;; **********************************************************************
( c ) Copyright , 1993 . All rights reserved .
;;; **********************************************************************
;;;
A simple minded System Builder Tool .
;;;
;;; ------------------------------------------------------------... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/util/system.lsp | lisp |
**********************************************************************
**********************************************************************
----------------------------------------------------------------------
Use:
:modules
-----------------------------------------------------------------
file ... | ( c ) Copyright , 1993 . All rights reserved .
A simple minded System Builder Tool .
( defsystem name
| environment | environment | recompilations of
` ( , @patches
(in-package 'sbt :use '(lisp))
(export '(defsystem
build-system
compile-system
load-system))
(defmac... |
8ba49a04ae6ad9d2743294db8dbdfe3bbdcbade7f85c4551257426b39c92b753 | philnguyen/soft-contract | length.rkt | #lang racket/base
(require racket/match
soft-contract/fake-contract)
(define (length l)
(if (pair? l)
(+ 1 (length (cdr l)))
0))
(provide
(contract-out
[length ((listof any/c) . -> . integer? #:total? #t)]))
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/termination/misc/length.rkt | racket | #lang racket/base
(require racket/match
soft-contract/fake-contract)
(define (length l)
(if (pair? l)
(+ 1 (length (cdr l)))
0))
(provide
(contract-out
[length ((listof any/c) . -> . integer? #:total? #t)]))
| |
0597caf3d1434c2aedcc57c6bdbd6aec3bdb10c3d606cd240e4b949a334a71bf | ecraven/r7rs-benchmarks | nboyer.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; File: nboyer.sch
Description : The benchmark
Author :
Created : 5 - Apr-85
Modified : 10 - Apr-85 14:52:20 ( )
22 - Jul-87 ( )
2 - Jul-88 ( -- distinguished # f ... | null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/nboyer.scm | scheme |
File: nboyer.sch
rewrote to eliminate property lists, and added
Language: Scheme
Status: Public Domain
Fairly CONS intensive.
contained several bugs that are corrected here. These bugs are discussed
The benchmark now returns a boolean result.
benchmark, ... | Description : The benchmark
Author :
Created : 5 - Apr-85
Modified : 10 - Apr-85 14:52:20 ( )
22 - Jul-87 ( )
2 - Jul-88 ( -- distinguished # f and the empty list )
13 - Feb-97 ( -- fixed bugs in unifier and rules ,
... |
82fbdc92ccfaf90e4d8ee71f9d4eef16260c238a9a9850c031b6d6953abb3b66 | haskell/haskell-language-server | Main.hs | {-# LANGUAGE BlockArguments #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE TypeOperators #-}
module Main (main) where
import Data.Foldable (find)
import Data.Text ... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/aeb57a8eb56964c8666d7cd05b6ba46d531de7c7/plugins/hls-qualify-imported-names-plugin/test/Main.hs | haskell | # LANGUAGE BlockArguments #
# LANGUAGE MultiWayIf #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
1's based | # LANGUAGE RecordWildCards #
module Main (main) where
import Data.Foldable (find)
import Data.Text (Text)
import qualified Ide.Plugin.QualifyImportedNames as QualifyImportedNames
import System.FilePath ((</>))
import Te... |
a2c89358dede9bbfde2b78016f888eb4f4acac31cdd223139ddee6871d8770cb | MinaProtocol/mina | proof.mli | module Base : sig
module Messages_for_next_proof_over_same_field =
Reduced_messages_for_next_proof_over_same_field
module Step : sig
type ( 's
, 'unfinalized_proofs
, 'sgs
, 'bp_chals
, 'messages_for_next_wrap_proof
, 'prev_evals )
t =
{ statement... | null | https://raw.githubusercontent.com/MinaProtocol/mina/8403887a428f56e91bfdf4187c6b8dc260e5424a/src/lib/pickles/proof.mli | ocaml | module Base : sig
module Messages_for_next_proof_over_same_field =
Reduced_messages_for_next_proof_over_same_field
module Step : sig
type ( 's
, 'unfinalized_proofs
, 'sgs
, 'bp_chals
, 'messages_for_next_wrap_proof
, 'prev_evals )
t =
{ statement... | |
5755cd50b94c7f40fc5ee03d128c948013662950198c9e130d1def9e6a821ad1 | sbcl/sbcl | stubs.lisp | ;;;; miscellaneous primitive stubs (ordinary FDEFINITIONs for full
;;;; call defined in terms of fundamental definitions of inline
;;;; expansions)
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at... | null | https://raw.githubusercontent.com/sbcl/sbcl/01674dd5e771680564602b923385c10d7dee1abc/src/code/stubs.lisp | lisp | miscellaneous primitive stubs (ordinary FDEFINITIONs for full
call defined in terms of fundamental definitions of inline
expansions)
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
the low... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-IMPL")
(defun (cas symbol-value) (old new symbol)
(cas (symbol-value symbol) old new))
(defun (cas svref) ... |
d73bfcdffc6e26e747d97e1e26a25df245c2fc24a59001ef0b0b15e1c3d11002 | erlang/otp | snmpm_mpd.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applica... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/snmp/src/manager/snmpm_mpd.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific la... | Copyright Ericsson AB 2004 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(snmpm_mpd).
-export([init/1,
process_msg/7, process_msg/6,
generate_msg/5, generate_response_msg/4,
... |
fa27fd1ca945a019d6034f127349bdf1c50800a8143a7953f31427660877f714 | shayne-fletcher/zen | c_type.mli | include C_type_sig.S
| null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/regexp/c_type.mli | ocaml | include C_type_sig.S
| |
97603671f5c8006194558464551bf65fb342564b66eed1ea2c315e9531e2780f | sellout/haskerwaul | Frobenius.hs | # language UndecidableSuperClasses #
module Haskerwaul.Monoid.Frobenius
( module Haskerwaul.Monoid.Frobenius
-- * extended modules
, module Haskerwaul.Comonoid
, module Haskerwaul.Monoid
) where
import Haskerwaul.Comonoid
import Haskerwaul.Monoid
-- | [nLab](+algebra)
class (Monoid c t a, Comonoid c t a) =... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Monoid/Frobenius.hs | haskell | * extended modules
| [nLab](+algebra) | # language UndecidableSuperClasses #
module Haskerwaul.Monoid.Frobenius
( module Haskerwaul.Monoid.Frobenius
, module Haskerwaul.Comonoid
, module Haskerwaul.Monoid
) where
import Haskerwaul.Comonoid
import Haskerwaul.Monoid
class (Monoid c t a, Comonoid c t a) => FrobeniusMonoid c t a
|
f9237b1fe8cf086cb4ef9889c40a88c040f561466d8ed95e30dad880ef7a0757 | Opetushallitus/aipal | i18n.clj | Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal-vastaus/src/clj/aipalvastaus/rest_api/i18n.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
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 | Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns aipalvastaus.rest-api... |
48664db48938a143ef12333040ca691006c36600b053637f0ea1a4d472fdb462 | janestreet/ppx_sexp_conv | test_functors.ml | open! Base
module Maybe = struct
type 'a t = 'a option [@@deriving_inline sexp_grammar]
let _ = fun (_ : 'a t) -> ()
let t_sexp_grammar : 'a. 'a Sexplib0.Sexp_grammar.t -> 'a t Sexplib0.Sexp_grammar.t =
fun _'a_sexp_grammar -> option_sexp_grammar _'a_sexp_grammar
;;
let _ = t_sexp_grammar
[@@@end]
... | null | https://raw.githubusercontent.com/janestreet/ppx_sexp_conv/04959fa8bd3799734ba1ee5e50b9eab9872057aa/test/sexp_grammar/test_functors.ml | ocaml | open! Base
module Maybe = struct
type 'a t = 'a option [@@deriving_inline sexp_grammar]
let _ = fun (_ : 'a t) -> ()
let t_sexp_grammar : 'a. 'a Sexplib0.Sexp_grammar.t -> 'a t Sexplib0.Sexp_grammar.t =
fun _'a_sexp_grammar -> option_sexp_grammar _'a_sexp_grammar
;;
let _ = t_sexp_grammar
[@@@end]
... | |
e3cdd3d6d34aa630815fceb0c1164f809d5a2cd4b1e0ce28a3dba5149b278f6f | amccausl/Swish | TraceHelpers.hs | --------------------------------------------------------------------------------
$ I d : TraceHelpers.hs , v 1.1 2004/01/13 12:31:24 graham Exp $
--
Copyright ( c ) 2003 , . All rights reserved .
-- See end of this file for licence information.
---------------------------------------------------------... | null | https://raw.githubusercontent.com/amccausl/Swish/9a7356300960c62e3f0468067bda0c34ee3606bd/Swish/HaskellUtils/TraceHelpers.hs | haskell | ------------------------------------------------------------------------------
See end of this file for licence information.
------------------------------------------------------------------------------
|
Stability : provisional
Portability : H98
This module provides access to tracing function... | $ I d : TraceHelpers.hs , v 1.1 2004/01/13 12:31:24 graham Exp $
Copyright ( c ) 2003 , . All rights reserved .
Module : TraceHelpers
Copyright : ( c ) 2003 ,
License : GPL V2
Maintainer :
module Swish.HaskellUtils.TraceHelpers
( trace, traceShow
... |
2d78cb6cbdd2575cbd1208b413d018d30072d2f9c455d5a383282bd7e867155c | OCamlPro/ocplib-endian | be_ocaml_401.ml | let get_uint16 s off =
if not Sys.big_endian
then swap16 (get_16 s off)
else get_16 s off
[@@ocaml.inline]
let get_int16 s off =
((get_uint16 s off) lsl ( Sys.int_size - 16 )) asr ( Sys.int_size - 16 )
[@@ocaml.inline]
let get_int32 s off =
if not Sys.big_endian
then swap32 (get_32 s ... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-endian/10292cd3ffa4d23d737e3f855ad04f22d3d95460/src/be_ocaml_401.ml | ocaml | let get_uint16 s off =
if not Sys.big_endian
then swap16 (get_16 s off)
else get_16 s off
[@@ocaml.inline]
let get_int16 s off =
((get_uint16 s off) lsl ( Sys.int_size - 16 )) asr ( Sys.int_size - 16 )
[@@ocaml.inline]
let get_int32 s off =
if not Sys.big_endian
then swap32 (get_32 s ... | |
d139cc8d5c832b297ec48891b4c6108712397710b9fc2a66f562f5acd7afcaf3 | penpot/penpot | align.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.sidebar.options.menus.align
(:require
[app.main.data.workspace :as dw]
[app.... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/sidebar/options/menus/align.cljs | clojure |
Copyright (c) KALEIDOS INC
don't need to watch objects, only read the value | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.workspace.sidebar.options.menus.align
(:require
[app.main.data.workspace :as dw]
[app.main.data.workspace.shortcuts :as... |
f84b897d0cd50b9d2c27282eccd80cee328f7189b76ecb4b75d82aefa25d4e25 | eslick/cl-registry | qualitymetric.lisp | ;; -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil; -*-
Copyright ( c ) 2008 - 2010 , Massachusetts Institute of;Technology . All rights reserved .
Copyright ( c ) 2008 - 2010 , LAM Treatment Alliance . All rights reserved .
;;; Released under a BSD-style license: -license.php
;;; See LICENSE file
(in-package ... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/qualitymetric/qualitymetric.lisp | lisp | -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil; -*-
Technology . All rights reserved .
Released under a BSD-style license: -license.php
See LICENSE file
QualityMetric client
Process flow is as follows:
Components:
Request URIs
E.g. "/qualitymetric/results-helper/"
Encapsulate everything we need to con... |
Copyright ( c ) 2008 - 2010 , LAM Treatment Alliance . All rights reserved .
(in-package :registry)
(define-plugin qualitymetric ()
)
1 ) User browses to /qualitymetric / start and presses Submit ( TBD : parameterize survey name )
2 ) Client form connects to QualityMetric site to login and run survey
... |
b1b15f57e2622a7591a642c281eec2956cc0dec902c2a717466d4533484418eb | ocaml-multicore/tezos | client_proto_context_commands.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_011_PtHangz2/lib_client_commands/client_proto_context_commands.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
33725ce7294868d00c1ca2cf53ceca67ea01c1b7dd6819c4d9cee82263aa0491 | fulcro-legacy/fulcro3 | normalize.cljc | (ns com.fulcrologic.fulcro.algorithms.normalize
"Functions for dealing with normalizing Fulcro databases. In particular `tree->db`."
(:require
[com.fulcrologic.fulcro.algorithms.do-not-use :as util]
[edn-query-language.core :as eql]
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.components :refer... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro3/5d1b9ab274406afd68b792192d5a783f29963314/src/main/com/fulcrologic/fulcro/algorithms/normalize.cljc | clojure | union case
FIXME: What is tag for?
already normalized
normalize many
union case
missing key
can't handle | (ns com.fulcrologic.fulcro.algorithms.normalize
"Functions for dealing with normalizing Fulcro databases. In particular `tree->db`."
(:require
[com.fulcrologic.fulcro.algorithms.do-not-use :as util]
[edn-query-language.core :as eql]
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.components :refer... |
86d0b064fced5fa00f45f00f4ece3558a19628fd3f8bedde8cf2b3dda807a704 | camfort/camfort | InferenceBackend.hs |
Copyright 2016 , , , , under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribute... | null | https://raw.githubusercontent.com/camfort/camfort/3421e85f6fbbcaa6503a266b3fae029a09d2ff24/src/Camfort/Specification/Stencils/InferenceBackend.hs | haskell | # LANGUAGE GADTs #
Spans are a pair of a lower and upper bound
TODO: DELETE AS SOON AS POSSIBLE
An alternative that is simpler and possibly quicker
Otherwise
has been violated in a use of `Helpers.Vec.fromLists`
| Collapses the regions into a small set by looking for potential overlaps
and eliminating those t... |
Copyright 2016 , , , , under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribute... |
d2b3a35604dd6218ea3273b160831adb408bc77f94ef0dc83dca6b82fb2b0a9a | alesaccoia/festival_flinger | mrpa_allophones.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;; ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/mrpa_allophones.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission is hereby granted, free of charge, to use and distribute ;;
this softwar... | A definition of the extended mrpa phone set used for some diphone sets
(defPhoneSet
mrpa_allophones
(vc + -)
vowel length : short long dipthong schwa
(vlng s l d a 0)
(vheight 1 2 3 -)
(vfront 1 2 3 -)
(vrnd + -)
(ctype s f a n l 0)
(cplace l a p b d v 0)
(cvox + -)
)
(
(uh + ... |
be1ec3ee42779964dc66fbbe1f7c3bc62d1d6c5bb10ca13db054b666e26ed37a | GaloisInc/surveyor | Panic.hs | # LANGUAGE TemplateHaskell #
module Surveyor.Brick.Panic (
Component(..),
panic
) where
import qualified Panic as P
data Component = Brick
deriving (Show)
instance P.PanicComponent Component where
panicComponentName _ = "surveyor-brick"
panicComponentIssues _ = ""
panicComponentRevision = $(P.useGitRev... | null | https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-brick/src/Surveyor/Brick/Panic.hs | haskell | # LANGUAGE TemplateHaskell #
module Surveyor.Brick.Panic (
Component(..),
panic
) where
import qualified Panic as P
data Component = Brick
deriving (Show)
instance P.PanicComponent Component where
panicComponentName _ = "surveyor-brick"
panicComponentIssues _ = ""
panicComponentRevision = $(P.useGitRev... | |
2557b353a6290b6b988ea9fda2b772be66bd526255cc91cc026313dcf9b5b70b | simonmar/parconc-examples | findpar5.hs | # LANGUAGE GeneralizedNewtypeDeriving #
import System.Directory
import Control.Applicative
import Control.Concurrent
import Control.Monad
import System.FilePath
import System.Environment
import Data.List hiding (find)
import GHC.Conc (getNumCapabilities)
import Text.Printf
import qualified Control.Monad.Par.Class as P... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/findpar5.hs | haskell | <<find
<3>
>>
<<subfind
>>
which is propagated by 'get'. Instead of 'put' we have
| # LANGUAGE GeneralizedNewtypeDeriving #
import System.Directory
import Control.Applicative
import Control.Concurrent
import Control.Monad
import System.FilePath
import System.Environment
import Data.List hiding (find)
import GHC.Conc (getNumCapabilities)
import Text.Printf
import qualified Control.Monad.Par.Class as P... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.