_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 |
|---|---|---|---|---|---|---|---|---|
be31c36f49424daa43616f78ee91f69807dda6d8e096b2b1c9b364786e4219c8 | mark-watson/haskell_tutorial_cookbook_examples | GenNeo4jCypher.hs | {-# LANGUAGE OverloadedStrings #-}
module GenNeo4jCypher
( textToCypher
, neo4j_category_node_defs
) where
import Categorize (bestCategories)
import Data.List (isInfixOf)
import Data.Char (toLower)
import Data.String.Utils (replace)
import Entities
( broadcastNetworkNames
, cityNames
, companyNames
, co... | null | https://raw.githubusercontent.com/mark-watson/haskell_tutorial_cookbook_examples/0f46465b67d245fa3853b4e320d79b7d7234e061/knowledge_graph_creator_pure/src/sw/GenNeo4jCypher.hs | haskell | # LANGUAGE OverloadedStrings # |
module GenNeo4jCypher
( textToCypher
, neo4j_category_node_defs
) where
import Categorize (bestCategories)
import Data.List (isInfixOf)
import Data.Char (toLower)
import Data.String.Utils (replace)
import Entities
( broadcastNetworkNames
, cityNames
, companyNames
, countryNames
, peopleNames
, poli... |
ef57a945523aaa287335102d35ede26a1706fc8a9947c2e731779a2b015d5666 | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-youtube/gen/Gogol/YouTube/I18nLanguages/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Retrieves a list of resources, possibly filtered.
/See:/ </ YouTube Data API v3 Reference> for @youtube.i18nLanguages.list@.
* Resource
** Constructing a Request
| A resource alias for @youtube.i18nLanguages.list@ method whic... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
d72ec782e7028357c3e89a819c82168d06f2c8d629e5b3e5096b75fc3a80c201 | patricoferris/jsoo-p5 | math.ml | let sin ?sketch angle =
let angle = Jv.of_float angle in
Sketch.call sketch "sin" [| angle |] |> Jv.to_float
| null | https://raw.githubusercontent.com/patricoferris/jsoo-p5/743dccce67cd8d942e3028a526046f20c08306be/src/math.ml | ocaml | let sin ?sketch angle =
let angle = Jv.of_float angle in
Sketch.call sketch "sin" [| angle |] |> Jv.to_float
| |
3fa6544eca659329965b66f9ee93a08c15ac3d7f9b5dc38ad534f305afc82da8 | ucsd-progsys/mist | Tests.hs | module Tests.Integration.Tests (integrationTests) where
import Control.Exception
import Control.Monad
import Data.Bool (bool)
import System.Directory
import System.Exit
import System.FilePath
import System.IO.Error
import System.IO
import Text.Printf
import Test.Tasty
import Test.Tasty.HUnit
import Tests.Utils
im... | null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/Tests.hs | haskell | -------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
------------------------... | module Tests.Integration.Tests (integrationTests) where
import Control.Exception
import Control.Monad
import Data.Bool (bool)
import System.Directory
import System.Exit
import System.FilePath
import System.IO.Error
import System.IO
import Text.Printf
import Test.Tasty
import Test.Tasty.HUnit
import Tests.Utils
im... |
dc1567611b5ac4bb94dc99f9d28ed7d19f7b1b70d86147bb1f8c18750c2fe10c | ormf/cm | fomus.lisp | ;;; **********************************************************************
Copyright ( C ) 2009 , < taube ( at ) uiuc ( dot ) edu >
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the Lisp Lesser Gnu Public License .
See for the text of this agreement .
;;; **... | null | https://raw.githubusercontent.com/ormf/cm/e1d02a11024f188562f6c789583a23dc4c09ce94/src/fomus.lisp | lisp | **********************************************************************
This program is free software; you can redistribute it and/or
********************************************************************** | Copyright ( C ) 2009 , < taube ( at ) uiuc ( dot ) edu >
modify it under the terms of the Lisp Lesser Gnu Public License .
See for the text of this agreement .
generated by scheme->cltl from fomus.scm on 04 - Aug-2009 14:11:46
(in-package :cm)
(progn (defclass fomus-file (event-file)
((parts :ini... |
ac98798d074ca4dbc1d6a75ee6e194d8ef660caad7ec8f0192ef22cb34471bba | Decentralized-Pictures/T4L3NT | encoding_benchmarks_helpers.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs . < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs . < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
1381536b36bc30c004ae4b81e6a0a4f3d1ef73a101576152693c15d34da0a6e1 | ogaml/ogaml | keycode.mli | type t =
| Unknown
| A
| B
| C
| D
| E
| F
| G
| H
| I
| J
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
| Z
| Num1
| Num2
| Num3
| Num4
| Num5
| Num6
| Num7
| Num8
| Num9
| Num0
| Numpad1
| Numpad2
| Numpad3
| Numpad4
| N... | null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/core/keycode.mli | ocaml | type t =
| Unknown
| A
| B
| C
| D
| E
| F
| G
| H
| I
| J
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
| Z
| Num1
| Num2
| Num3
| Num4
| Num5
| Num6
| Num7
| Num8
| Num9
| Num0
| Numpad1
| Numpad2
| Numpad3
| Numpad4
| N... | |
2472c9597f76513d83722df820e9d521cd3d9038746f138df838d4a596b80a58 | squint-cljs/squint | App.cljs | (ns App
(:require ["./App.module.css$default" :as styles]
["./logo.svg$default" :as logo]
["solid-js" :refer [createSignal]]
[squint.string :as str]))
(defn Counter [{:keys [init]}]
(let [[counter setCount] (createSignal init)]
#jsx [:div
"Count:" (str/join " " (ra... | null | https://raw.githubusercontent.com/squint-cljs/squint/1100357f8f12795f1e636caa8b9a8134cd351b46/examples/solidjs/src/App.cljs | clojure | (ns App
(:require ["./App.module.css$default" :as styles]
["./logo.svg$default" :as logo]
["solid-js" :refer [createSignal]]
[squint.string :as str]))
(defn Counter [{:keys [init]}]
(let [[counter setCount] (createSignal init)]
#jsx [:div
"Count:" (str/join " " (ra... | |
b7c0a4f6fa52c4e41614280b72bbb648fc6a3a072fdb8ed57804bf0a34488920 | ruuvi/ruuvitracker_server | cache_test.clj | (ns ruuvi-server.cache-test
(:require [clojure.core.cache :as ccache])
(:use ruuvi-server.cache
midje.sweet)
)
(def region (create-cache-region "dummy" 4 10000000))
(defn- calc [x] (+ x 1))
(fact (ccache/has? @region 1) => false)
(fact (lookup region 1 calc) => 2)
(fact (ccache/has? @region 1) => true)
... | null | https://raw.githubusercontent.com/ruuvi/ruuvitracker_server/269041aa2ff450c0f35183de0264d82a5c3881f1/test/ruuvi_server/cache_test.clj | clojure | (ns ruuvi-server.cache-test
(:require [clojure.core.cache :as ccache])
(:use ruuvi-server.cache
midje.sweet)
)
(def region (create-cache-region "dummy" 4 10000000))
(defn- calc [x] (+ x 1))
(fact (ccache/has? @region 1) => false)
(fact (lookup region 1 calc) => 2)
(fact (ccache/has? @region 1) => true)
... | |
c74135bb53879211774d7f7aa1115aa4206a2c2d4398e4a746d4b4f19ca989ee | Tim-ats-d/Suricate | logger.mli | (** Handler are used to make the link with logger. *)
(** {1 Logger} *)
* { 2 Logger module type }
(** API used to describle a handler. *)
module type LOGGER = sig
(** The logger's name. *)
val name : string
(** The logger's log level. *)
val level : Log_level.t
(** The logger's filter list. *)
val fi... | null | https://raw.githubusercontent.com/Tim-ats-d/Suricate/bef2bbc8f3cd4420213e6263e3e15a0fe90edb29/lib/logger.mli | ocaml | * Handler are used to make the link with logger.
* {1 Logger}
* API used to describle a handler.
* The logger's name.
* The logger's log level.
* The logger's filter list.
* Handlers attached to logger.
* API used to describle a FULL handler with a set of log function.
* Propages a log through logger's handle... |
* { 2 Logger module type }
module type LOGGER = sig
val name : string
val level : Log_level.t
val filters : Filter.t list
val handlers : (module Handler.LEVELED_HANDLER) list
end
module type FULL_LOGGER = sig
include LOGGER
val debug : string -> unit
val info : string -> unit
val warning : str... |
eab4a7c841564f18fc2e5bf8c51324e9c2e148df3fe6f37e514bd6b875bd4dc2 | cljfx/dev | dev_test.clj | (ns cljfx.dev-test
(:require [clojure.test :refer :all]
[cljfx.api :as fx]
[cljfx.dev :as fx.dev]
[clojure.string :as str])
(:import [java.io PrintStream ByteArrayOutputStream]))
(defn- validated [desc]
@(fx/on-fx-thread
(-> desc
(fx/create-component {:fx.opt/typ... | null | https://raw.githubusercontent.com/cljfx/dev/efcdecfb13c329ab8888c977c9df9e118417161c/test/cljfx/dev_test.clj | clojure | can't catch since exceptions happen in JavaFX and end up printed to stderr,
but at least they are dev exceptions | (ns cljfx.dev-test
(:require [clojure.test :refer :all]
[cljfx.api :as fx]
[cljfx.dev :as fx.dev]
[clojure.string :as str])
(:import [java.io PrintStream ByteArrayOutputStream]))
(defn- validated [desc]
@(fx/on-fx-thread
(-> desc
(fx/create-component {:fx.opt/typ... |
becb553673045079b24673077bd370623e1fc615ba67898c26124ee583ffce9d | jwiegley/notes | Hafydd.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
module Hafydd where
import Control.Monad.Free.Church
import Data.Foldable
import Data.Traversable
data PropF r
= PTrue
| PFalse
| PAnd r r
| POr r r
| PNot r
deriving (Show, Functor, Foldable, Traversable)
type P... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Hafydd.hs | haskell | # LANGUAGE DeriveTraversable #
(use banana and/or unicorn) | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
module Hafydd where
import Control.Monad.Free.Church
import Data.Foldable
import Data.Traversable
data PropF r
= PTrue
| PFalse
| PAnd r r
| POr r r
| PNot r
deriving (Show, Functor, Foldable, Traversable)
type Prop = F PropF
sign s x = fromInteg... |
b4b352364cc639002c20e44a9cecc24a0119812bfc0208a505fde749916a308a | lambdamikel/DLMAPS | sqd-reader2.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : SQD ; Base : 10 -*-
(in-package sqd)
(defparameter *saetze* nil)
(defparameter *bloecke* nil)
(defmacro datensatz (fn-name &rest rest)
(pushnew fn-name *saetze*)
(let ((variables nil)
(counter 0))
(labels ((code-block (clauses variables)
... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/sqd/sqd-reader2.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : SQD ; Base : 10 -*-
einfache Funktion, keine Variable
einfache variable |
(in-package sqd)
(defparameter *saetze* nil)
(defparameter *bloecke* nil)
(defmacro datensatz (fn-name &rest rest)
(pushnew fn-name *saetze*)
(let ((variables nil)
(counter 0))
(labels ((code-block (clauses variables)
(if (null clauses)
t
(let ((clause (first clauses))
... |
940e62f5607973eaa7e0fb0c38a21be4a6c2a5f62bcd66f98f643f61f91b00af | haskell-webgear/webgear | Path.hs | module Unit.Trait.Path (
tests,
) where
import Data.Functor.Identity (runIdentity)
import Network.Wai (defaultRequest, pathInfo)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (assertFailure, testCase, (@?=))
import WebGear.Core.Trait.Path (PathVar (..), PathVarError (..))
import WebGear.Core.Reques... | null | https://raw.githubusercontent.com/haskell-webgear/webgear/60e5547f9450aac36727e8d9980e0a8cbdb69660/webgear-server/test/Unit/Trait/Path.hs | haskell | module Unit.Trait.Path (
tests,
) where
import Data.Functor.Identity (runIdentity)
import Network.Wai (defaultRequest, pathInfo)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (assertFailure, testCase, (@?=))
import WebGear.Core.Trait.Path (PathVar (..), PathVarError (..))
import WebGear.Core.Reques... | |
d9adf6fc2b7e8e13a5c427d9fdf45815116775336316c154512d4e34f15f109d | ferd/dlhttpc | dlhttpc_sock.erl | %% coding: latin-1
%%% ----------------------------------------------------------------------------
Copyright ( c ) 2009 , Erlang Training and Consulting Ltd.
Copyright ( c ) 2012 ,
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitte... | null | https://raw.githubusercontent.com/ferd/dlhttpc/10726522af5a5df2ada91bb7c08fcfcc62fb7a4d/src/dlhttpc_sock.erl | erlang | coding: latin-1
----------------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the abov... | Copyright ( c ) 2009 , Erlang Training and Consulting Ltd.
Copyright ( c ) 2012 ,
* Neither the name of Erlang Training and Consulting Ltd. nor the
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL Erlang Training and Consulting Ltd. BE
@pr... |
48d16ea3cc0c40f2e49ff3447869c373f1f6200409006a92d7af032300c74962 | zoomhub/zoomhub | EmbedId.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
module ZoomHub.Web.Types.EmbedId
( EmbedId,
unEmbedId,
)
where
import Data.Bifunctor (first)
import qualified Data.ByteString.Char8 as BC
import qualified Data.Text as T
import Network.HTTP.Types (decodePath)
import Servant (FromHttpApiData, parse... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/3779709478d17a4c46762de1d5d3ae451437c087/src/ZoomHub/Web/Types/EmbedId.hs | haskell | # LANGUAGE OverloadedStrings #
Text | # LANGUAGE NamedFieldPuns #
module ZoomHub.Web.Types.EmbedId
( EmbedId,
unEmbedId,
)
where
import Data.Bifunctor (first)
import qualified Data.ByteString.Char8 as BC
import qualified Data.Text as T
import Network.HTTP.Types (decodePath)
import Servant (FromHttpApiData, parseUrlPiece)
import System.FilePath (s... |
2d2aa95496f461fce8b611b1574b9f0204fae871aa37120e148965e55c25b6e1 | danielsz/system | datomic_test.clj | (ns system.components.datomic-test
(:require [system.components.datomic :refer [new-datomic-db]]
[com.stuartsierra.component :as component]
[datomic.api :as d]
[clojure.test :refer [deftest testing is]]))
(def uri "datomic:mem:4334/framework-test")
(def datomic-db (new-datomic-db uri))
(deftest datomic-lif... | null | https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/test/system/components/datomic_test.clj | clojure | (ns system.components.datomic-test
(:require [system.components.datomic :refer [new-datomic-db]]
[com.stuartsierra.component :as component]
[datomic.api :as d]
[clojure.test :refer [deftest testing is]]))
(def uri "datomic:mem:4334/framework-test")
(def datomic-db (new-datomic-db uri))
(deftest datomic-lif... | |
e5f6137cbe837f4b4fd906b7fa0d3c0330be6b71bd74e1050f43ab9c2eb631b2 | thheller/shadow-cljs | watch_test.clj | (ns shadow.cljs.watch-test
(:require
[clojure.test :refer (is deftest)]
[clojure.java.io :as io]
[shadow.cljs.devtools.server.fs-watch :as fs]))
(comment
(def watcher
(fs-jvm/start {}
[(io/file "tmp" "watch")]
#{"test"}
prn
))
(fs-jvm/stop watcher)
(d... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/repl/shadow/cljs/watch_test.clj | clojure | (ns shadow.cljs.watch-test
(:require
[clojure.test :refer (is deftest)]
[clojure.java.io :as io]
[shadow.cljs.devtools.server.fs-watch :as fs]))
(comment
(def watcher
(fs-jvm/start {}
[(io/file "tmp" "watch")]
#{"test"}
prn
))
(fs-jvm/stop watcher)
(d... | |
57b33f8ae585c0fec4c180be9783e0d4624357d57579396350ac1360e43a04d0 | nikomatsakis/a-mir-formality | parameters.rkt | #lang racket
(require redex/reduction-semantics
"grammar.rkt"
"hook.rkt"
"../logic/env.rkt"
)
(provide apply-variance
variances-for
generic-parameters-for
generics-for
)
(define-metafunction formality-ty
Returns the variances for each generic pa... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/14c6a6946e9d2bd83d5fe4df8272be10ba65531d/racket-src/ty/parameters.rkt | racket | Returns the "generic parameters" (i.e., parameter name, kind, and variance) for
For a fn, consult its definition to see what generic parameters it has.
Effectively they are modeled as `struct u32`.
where `T: 'a`.
Kind of like `struct Ref<'a, T> where T: 'a`
We model `&'a mut T` the same way.
There is no guaran... | #lang racket
(require redex/reduction-semantics
"grammar.rkt"
"hook.rkt"
"../logic/env.rkt"
)
(provide apply-variance
variances-for
generic-parameters-for
generics-for
)
(define-metafunction formality-ty
Returns the variances for each generic pa... |
9b5c288ccaaeb0a6058692b7af42e0ecef7d45500c3309cfb2f67461dc689be2 | bmeurer/ocaml-arm | scrapelabels.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, Kyoto... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/tools/scrapelabels.ml | ocaml | *********************************************************************
OCaml
... | , Kyoto University RIMS
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open StdLabels
open Lexer301
let i... |
7c30e90e81096e8a8f6d803e7ee6c3248f48a591ac942551c842c0b28ee4b4d6 | adventuring/tootsville.net | friendly.lisp | ;;;; -*- lisp -*-
;;;
src / db / friendly.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
modify it under ... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/db/friendly.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more det... | src / db / friendly.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
Y... |
970152052e5ad8211c754de957d7661e7ffcea76eb7dd0a2f65a47997a0635b1 | dwayne/eopl3 | interpreter.test.rkt | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/05-ch5/interpreters/racket/TRAMPOLINED-5.19/interpreter.test.rkt | racket | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | |
fd6289f87de978d547e6093c125d144e5bda646b9c5034056a3aa57fe04b8cb1 | MinaProtocol/mina | spec.ml | module D = Digest
open Core_kernel
open Pickles_types
open Hlist
module Sc = Kimchi_backend_common.Scalar_challenge
type 'f impl = (module Snarky_backendless.Snark_intf.Run with type field = 'f)
type ('a, 'b, 'c) basic =
| Unit : (unit, unit, < .. >) basic
| Field
: ('field1, 'field2, < field1 : 'field1 ; f... | null | https://raw.githubusercontent.com/MinaProtocol/mina/8403887a428f56e91bfdf4187c6b8dc260e5424a/src/lib/pickles/composition_types/spec.ml | ocaml | Always use the same "maybe" layout which is a boolean and then the value
We skip any constraints that would be added here, but we *do* use
the underlying [Typ.t] to make sure that we allocate public inputs
correctly.
Challenge.t | module D = Digest
open Core_kernel
open Pickles_types
open Hlist
module Sc = Kimchi_backend_common.Scalar_challenge
type 'f impl = (module Snarky_backendless.Snark_intf.Run with type field = 'f)
type ('a, 'b, 'c) basic =
| Unit : (unit, unit, < .. >) basic
| Field
: ('field1, 'field2, < field1 : 'field1 ; f... |
1a66888399857a5856628acb82937578ae902602036f71ee757641d7a0175c1e | dino-/epub-tools | PubYear.hs | -- License: ISC (see LICENSE)
Author : < >
module EpubTools.Test.EpubName.PubYear
( pubYearTests
)
where
import Test.HUnit ( Test (..), assertEqual )
import EpubTools.EpubName.Format.PubYear
pubYearTests :: Test
pubYearTests = TestLabel "PubYear" $ TestList
[ testExtractYear "2001-03-25T00:00:00" ... | null | https://raw.githubusercontent.com/dino-/epub-tools/edcfa8f56622433f39febac9436bf88c04fc8303/testsuite/EpubTools/Test/EpubName/PubYear.hs | haskell | License: ISC (see LICENSE) | Author : < >
module EpubTools.Test.EpubName.PubYear
( pubYearTests
)
where
import Test.HUnit ( Test (..), assertEqual )
import EpubTools.EpubName.Format.PubYear
pubYearTests :: Test
pubYearTests = TestLabel "PubYear" $ TestList
[ testExtractYear "2001-03-25T00:00:00" "2001"
, testExtractYear "2... |
5d3dd8982df788ccc029e5043d51a2b459825d5efcb5beec6c7078ae48bd594e | sgbj/MaximaSharp | xermsg.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/xermsg.lisp | lisp | Compiled by f2cl version:
"f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ "
" macros.l , v fceac53... |
1924ede17f4e9c3b4268b543eeb09a4a8612338522f9f61621833591d5c678fa | conscell/hugs-android | TestOrdSet.hs | Copyright ( c ) 1999 .
-- See COPYRIGHT file for terms and conditions.
-- WARNING: The Set operations (insertWith...) are not adequately tested.
-- To be thorough, they should be tested on a type where distinguishable
-- values can still be "equal", and the results should be tested to make
-- sure that the "With... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/TestOrdSet.hs | haskell | See COPYRIGHT file for terms and conditions.
WARNING: The Set operations (insertWith...) are not adequately tested.
To be thorough, they should be tested on a type where distinguishable
values can still be "equal", and the results should be tested to make
sure that the "With" function was called on the right value... | Copyright ( c ) 1999 .
module TestOrdSet
where
import Prelude hiding (concat,reverse,map,concatMap,foldr,foldl,foldr1,foldl1,
filter,takeWhile,dropWhile,lookup,take,drop,splitAt,
zip,zip3,zipWith,zipWith3,unzip,unzip3,null)
import qualified Prelude
import EdisonPre... |
5f268c6c3c70c7773ca8285308e985d5580fa65ebebe40da85315009cc826238 | thi-ng/geom | line.cljc | (ns thi.ng.geom.test.types.line
#?(:cljs
(:require-macros
[cemerick.cljs.test :refer (is deftest)]))
(:require
[thi.ng.math.core :as m]
[thi.ng.geom.core :as g]
[thi.ng.geom.types]
[thi.ng.geom.line :as l]
[thi.ng.geom.vector :as v]
#?(:clj
[clojure.test :refer :all]
:cljs
... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/test/thi/ng/geom/test/types/line.cljc | clojure | (ns thi.ng.geom.test.types.line
#?(:cljs
(:require-macros
[cemerick.cljs.test :refer (is deftest)]))
(:require
[thi.ng.math.core :as m]
[thi.ng.geom.core :as g]
[thi.ng.geom.types]
[thi.ng.geom.line :as l]
[thi.ng.geom.vector :as v]
#?(:clj
[clojure.test :refer :all]
:cljs
... | |
0de85de1583ab5370fea08ab8a6e7920cfae8a9307740e4c7c00214031d4bba4 | BitGameEN/bitgamex | jiffy_08_halfword_tests.erl | This file is part of Jiffy released under the MIT license .
% See the LICENSE file for more information.
-module(jiffy_08_halfword_tests).
-include_lib("eunit/include/eunit.hrl").
-include("jiffy_util.hrl").
numerical_identity_test_() ->
[
{"1 == 1", ?_assert(jiffy:decode(<<"1">>) == 1)},
{"1... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/jiffy/test/jiffy_08_halfword_tests.erl | erlang | See the LICENSE file for more information. | This file is part of Jiffy released under the MIT license .
-module(jiffy_08_halfword_tests).
-include_lib("eunit/include/eunit.hrl").
-include("jiffy_util.hrl").
numerical_identity_test_() ->
[
{"1 == 1", ?_assert(jiffy:decode(<<"1">>) == 1)},
{"1 =:= 1", ?_assert(jiffy:decode(<<"1">>) =:= 1... |
6a1e1c70da425e50e017dac9af22bf352e01c891911622265722f6254f4b7a54 | mirage/ocaml-rpc | rpclib.ml | module Rpclib = Xmlrpc
| null | https://raw.githubusercontent.com/mirage/ocaml-rpc/fdbf7f5c3e4f0c75837f0a96d5d4d6458805fd57/src/lib/rpclib.ml | ocaml | module Rpclib = Xmlrpc
| |
d8e0ffc6b1871b0632c796136e57dee6c68a1dad72874a5e13cfd8e650bdebf3 | tek/polysemy-hasql | DeriveSumIdDbTest.hs | # options_ghc -Wno - redundant - constraints #
module Polysemy.Hasql.Test.Tree.DeriveSumIdDbTest where
import Polysemy.Db.Data.FieldId (FieldId (NamedField))
import Polysemy.Db.Data.Rep (Auto, Flatten, Prim, Product, Rep, Sum, UidRep)
import Polysemy.Db.Data.Uid
import qualified Polysemy.Db.Kind.Data.Tree as Kind
imp... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/test/Polysemy/Hasql/Test/Tree/DeriveSumIdDbTest.hs | haskell | # options_ghc -Wno - redundant - constraints #
module Polysemy.Hasql.Test.Tree.DeriveSumIdDbTest where
import Polysemy.Db.Data.FieldId (FieldId (NamedField))
import Polysemy.Db.Data.Rep (Auto, Flatten, Prim, Product, Rep, Sum, UidRep)
import Polysemy.Db.Data.Uid
import qualified Polysemy.Db.Kind.Data.Tree as Kind
imp... | |
b8ec5e43d81cea0d6804a949b0c26c2b8c0b8023d0e7857da3ca2e594ee7e614 | VincentCordobes/prep | store.ml | module List = Base.List
module Hashtbl = Base.Hashtbl
type t = {
cards : Card.t list; [@default []]
decks : Deck.t list; [@default [ Deck.create () ]]
current_deck : string; [@default Deck.default_id]
}
[@@deriving show, yojson { exn = true }]
let store_path =
try Sys.getenv "STORE_PATH"
with Not_found ->
... | null | https://raw.githubusercontent.com/VincentCordobes/prep/104d8a0d406714b189917d6b05aa51a7e7f88393/lib/store.ml | ocaml | module List = Base.List
module Hashtbl = Base.Hashtbl
type t = {
cards : Card.t list; [@default []]
decks : Deck.t list; [@default [ Deck.create () ]]
current_deck : string; [@default Deck.default_id]
}
[@@deriving show, yojson { exn = true }]
let store_path =
try Sys.getenv "STORE_PATH"
with Not_found ->
... | |
7cad2a452c9c25de9b30519d4c268ec0383e40a4e1077c0bd0d3c37cd5ea9e02 | igorhvr/bedlam | response.scm | The contents of this file are subject to the Mozilla Public License Version
1.1 ( the " License " ) ; you may not use this file except in compliance with
;;; the License. You may obtain a copy of the License at
;;; /
;;;
Software distributed under the License is distributed on an " AS IS " basis ,
;;; WITHOUT WAR... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/scm/siscweb/response.scm | scheme | you may not use this file except in compliance with
the License. You may obtain a copy of the License at
/
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
Contributor(s):
Alternatively, the contents of th... | The contents of this file are subject to the Mozilla Public License Version
Software distributed under the License is distributed on an " AS IS " basis ,
The Original Code is SISCweb .
The Initial Developer of the Original Code is .
Portions created by the Initial Developer are Copyright ( C ) 2005 - 2007
... |
7280ca7bee353ecead42813d0f4e8d58bd428ccf044a0ac67d52d0c31e65cf8d | srijan-paul/bark | IOUtil.hs | module Bark.Internal.IOUtil
( tryReadFile,
tryReadFileT,
tryReadFileTL,
withFilesInDir,
ErrMsg,
Result,
)
where
import Control.Monad (when)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.IO as TLIO
impor... | null | https://raw.githubusercontent.com/srijan-paul/bark/3b458183062d9e6052ce5d2ef1b797f4ecef3b04/app/Bark/Internal/IOUtil.hs | haskell | | Read a file from the filesystem and return it's contents
| as a lazy text object. If the file does not exist, return
| an error message instead.
| Read a file from the filesystem and return it's contents as a String.
| If the file does not exist, return an error message instead.
| Read a file from the filesyste... | module Bark.Internal.IOUtil
( tryReadFile,
tryReadFileT,
tryReadFileTL,
withFilesInDir,
ErrMsg,
Result,
)
where
import Control.Monad (when)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.IO as TLIO
impor... |
ffd11cc5146f77e07134ae9657808846dbea22d3256489b6f7e631338a8cbcfb | glv2/cl-monero-tools | randomx-service.lisp | ;;;; This file is part of monero-tools
Copyright 2020
Distributed under the GNU GPL v3 or later .
;;;; See the file LICENSE for terms of use and distribution.
(in-package :monero-tools)
(defparameter *randomx-service-host* "127.0.0.1"
"Location of the randomx-service server.")
(defparameter *randomx-service... | null | https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-tools/crypto/randomx-service.lisp | lisp | This file is part of monero-tools
See the file LICENSE for terms of use and distribution. | Copyright 2020
Distributed under the GNU GPL v3 or later .
(in-package :monero-tools)
(defparameter *randomx-service-host* "127.0.0.1"
"Location of the randomx-service server.")
(defparameter *randomx-service-port* 39093
"Port on which the randomx-service server expects connections.")
(defun randomx-serv... |
9ff1d45aca59d483985d4678ebd0d8804ab3bc672612cc159346d3575380ce94 | roburio/ocaml-openpgp | opgp_git.ml | open Rresult
let cs_of_fpath fp =
Bos.OS.File.read fp >>| Cs.of_string
|> R.reword_error (fun _ ->
`Msg (Format.sprintf "Can't open %S for reading" @@ Fpath.to_string fp))
let cs_of_file name =
TODO this is duplicated in opgp.ml ...
Fpath.of_string name >>= cs_of_fpath
let verify_git_signature target_f... | null | https://raw.githubusercontent.com/roburio/ocaml-openpgp/55459ad98a69f80789c79219c6d3be19ef6ef521/app/opgp_git.ml | ocaml | normalize argv[0] aka comm:
detached armored signature signed by [keygrip]'s secret key
default to exiting with error: | open Rresult
let cs_of_fpath fp =
Bos.OS.File.read fp >>| Cs.of_string
|> R.reword_error (fun _ ->
`Msg (Format.sprintf "Can't open %S for reading" @@ Fpath.to_string fp))
let cs_of_file name =
TODO this is duplicated in opgp.ml ...
Fpath.of_string name >>= cs_of_fpath
let verify_git_signature target_f... |
a7f6a45015facbef08e1835647d753486339cd7de658b36626e4005dffce91fe | couchbase/chronicle | chronicle_rsm_sup.erl | @author Couchbase < >
2020 Couchbase , Inc.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, sof... | null | https://raw.githubusercontent.com/couchbase/chronicle/673c0332520213eddc59d4a5bb52f0fa70b3c319/src/chronicle_rsm_sup.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | @author Couchbase < >
2020 Couchbase , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(chronicle_rsm_sup).
-behavior(dynamic_supervisor).
-include("chronicle.hrl").
-export([start_link/0]).
-export([init... |
851dc24b388d92e654afcd1d3133d012a2375c5e3a85599eaf777e82e4d518c5 | alonsovidales/Brain | ftp_psal.erl | %%
%% Persistant storage access lyaer for FTP storage systems
%%
@author < >
%% @version 0.1
@since 2012 - 10 - 21
%% @see config.hrl
%%
-module(ftp_psal).
-export([
get_file_content/1,
create_or_update_file/2,
del_file/1]).
-include("../shared/config.hrl").
%%
%% Try to open a connection with th... | null | https://raw.githubusercontent.com/alonsovidales/Brain/3e35d0f05d31f0cebc5251ec2addbb93fb5ae377/libs/ftp_psal.erl | erlang |
Persistant storage access lyaer for FTP storage systems
@version 0.1
@see config.hrl
Try to open a connection with the FTP server, and returns the PID of the
connection of an atom false if something was wrong
Creates a file, or in case of the file previously exists,
overwrite this with the given content
... | @author < >
@since 2012 - 10 - 21
-module(ftp_psal).
-export([
get_file_content/1,
create_or_update_file/2,
del_file/1]).
-include("../shared/config.hrl").
@return pid The PID of the FTP connection , atom false is the connection ca n't be opened
connect() ->
case ftp:open(?FTP_HOST, [{port,... |
59a2f9d6d31b5c041d37be4a86fd700459afcc951455124d33155cb1971a050b | lachenmayer/arrowsmith | Main.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Text.Lazy (toStrict)
import Snap.Core (writeText)
import Snap.Http.Server
import Snap.Snaplet
import Snap.Util.FileServe (serveDirectoryWith, simpleDirectoryConfig)
import Text.Blaze.Html (Html, (!))
import Text.Blaze.Html.Re... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/backend/Arrowsmith/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Main where
import Data.Text.Lazy (toStrict)
import Snap.Core (writeText)
import Snap.Http.Server
import Snap.Snaplet
import Snap.Util.FileServe (serveDirectoryWith, simpleDirectoryConfig)
import Text.Blaze.Html (Html, (!))
import Text.Blaze.Html.Renderer.Text (renderHtml)
import qua... |
bcd9174a4270b1368d861ef19fdfad5f86249323168e63ac9949aff6de7da4d6 | DHSProgram/DHS-Indicators-SPSS | CH_VAC.sps | * Encoding: windows-1252.
******************************************************************************************************
Program: CH_VAC.sps
Purpose: Code vaccination variables.
*Data inputs: KR dataset
Data outputs: coded variables
Author: Shireen Assaf and translated to SPSS by Ivana Bjelic
Date l... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap10_CH/CH_VAC.sps | scheme | * Encoding: windows-1252.
******************************************************************************************************
Program: CH_VAC.sps
Purpose: Code vaccination variables.
*Data inputs: KR dataset
Data outputs: coded variables
Author: Shireen Assaf and translated to SPSS by Ivana Bjelic
Date l... | |
c0ce4a83bcde2ebc4c7a8731a6949362e85bde7d7a3617a416928790b80ed1bc | ocamllabs/ocaml-modular-implicits | t200-getfield2.ml | open Lib;;
type t = {
a : int;
b : int;
c : int;
};;
if { a = 7; b = 6; c = 5 }.c <> 5 then raise Not_found;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONSTINT 5
11 PUSHGETGLOBAL < 0>(7 , 6 , 5 )
13 GETFIELD2
14 NEQ
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t200-getfield2.ml | ocaml | open Lib;;
type t = {
a : int;
b : int;
c : int;
};;
if { a = 7; b = 6; c = 5 }.c <> 5 then raise Not_found;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONSTINT 5
11 PUSHGETGLOBAL < 0>(7 , 6 , 5 )
13 GETFIELD2
14 NEQ
... | |
ee7cd75cec97b30810ab18e681d82c346afb54ef812b42589ec2bb09ade292a2 | sultanov-team/secret-keeper | data_readers.clj | {secret secret.keeper/make-secret}
| null | https://raw.githubusercontent.com/sultanov-team/secret-keeper/e00ff5120138c65b94d608df48168ef47915816d/src/main/clojure/data_readers.clj | clojure | {secret secret.keeper/make-secret}
| |
25cfae8ca93d6cf540784bb4f564e30e54056fc196e8d9d6cd067b65c283d60b | zotonic/zotonic | export_encoder_bert.erl | @author < >
2016 < >
%% @doc Format exports for vevent format
Copyright 2016
%%
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/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_export/src/support/export_encoder_bert.erl | erlang | @doc Format exports for vevent format
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 f... | @author < >
2016 < >
Copyright 2016
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(export_encoder_bert).
-author("Marc Worrell <>").
-record(state, {
rows = [] :: list( m_rsc:resource_id() )
}).... |
bef40c3be936fe7b2f40f1b155e693861cca7f7d8da9e2f1a14d1223a817c382 | dnaeon/cl-wol | core.lisp | Copyright ( c ) 2021 Nikolov < >
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
1 . Redistributions of source code must retain the above copyright
;; notice, this list of co... | null | https://raw.githubusercontent.com/dnaeon/cl-wol/8f5cb9c4aeabb726b1991379d2a47eac3f38b2b6/src/core/core.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer
in this position and unchanged.
notice, this list of conditions and the fo... | Copyright ( c ) 2021 Nikolov < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES... |
95a64beca4cc74c5e4f07b9a77ecf8dacfafbc799f88d4212b47254d496fa13a | master/ejabberd | mod_sic.erl | %%%----------------------------------------------------------------------
%%% File : mod_sic.erl
Author : < >
%%% Purpose : XEP-0279 Server IP Check
Created : 6 Mar 2010 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
%%%
%%% This program is free software; you can redistribute it an... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/mod_sic.erl | erlang | ----------------------------------------------------------------------
File : mod_sic.erl
Purpose : XEP-0279 Server IP Check
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITH... | Author : < >
Created : 6 Mar 2010 by < >
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Foundat... |
074b1999b016035a8abfe3b8d93c06552da6d04d1f6b8958272a04e45a37e4e8 | zkat/conserv | package.lisp | (cl:defpackage #:conserv
(:use #:cl
#:alexandria
#:conserv.utils)
(:export
;; event loop
#:call-with-event-loop
#:with-event-loop
#:add-timer
#:remove-timer
#:exit-event-loop
#:register-socket
#:unregister-socket
#:*event-base*))
| null | https://raw.githubusercontent.com/zkat/conserv/a51469e03c8d7278af9bb7a94b451bd64646d938/src/package.lisp | lisp | event loop | (cl:defpackage #:conserv
(:use #:cl
#:alexandria
#:conserv.utils)
(:export
#:call-with-event-loop
#:with-event-loop
#:add-timer
#:remove-timer
#:exit-event-loop
#:register-socket
#:unregister-socket
#:*event-base*))
|
70e22bcac720176bca29c4f52704c20eebf1977c2e8f9c96dd7a97d1fb61a5e0 | spawnfest/eep49ers | wxPrintDialog.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . 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 applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxPrintDialog.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 lan... | Copyright Ericsson AB 2008 - 2020 . 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(wxPrintDialog).
-include("wxe.hrl").
-export([destroy/1,getPrintDC/1,getPrintDialogData/1,new/1,new/2]).
-e... |
d0fedb4250473393321ab5f407547f9eac9760c084c4b999a2eb7421ce947b6d | SKA-ScienceDataProcessor/RC | Basic.hs | -- | Basic functions which
module DNA.Compiler.Basic (
checkGraph
, checkSchedule
) where
import Control.Applicative
import Data.Graph.Inductive.Graph
import qualified Data.Map as Map
import qualified Data.Foldable as T
import DNA.Actor
import DNA.AST
import DNA.Compiler.Types
-- | Check that all connec... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/dna/DNA/Compiler/Basic.hs | haskell | | Basic functions which
| Check that all connections in the dataflow graph are present
| Check that all outgoing connection of an node connections are present.
List of outgoing connection for the actor in the graph. Note
that we can connect single port to several other actors.
Connection which should be present
... | module DNA.Compiler.Basic (
checkGraph
, checkSchedule
) where
import Control.Applicative
import Data.Graph.Inductive.Graph
import qualified Data.Map as Map
import qualified Data.Foldable as T
import DNA.Actor
import DNA.AST
import DNA.Compiler.Types
checkGraph :: DataflowGraph -> Compile DataflowGraph
c... |
bf886d7213e067ff7b3bc2b501dd02c9116c4c83b67e6e253cda755d5370bbba | redstarssystems/pbuilder | war.clj | (ns badigeon.war
(:require [clojure.data.xml :as xml]
[clojure.tools.deps.alpha :as deps]
[clojure.tools.deps.alpha.util.maven :as maven]
[badigeon.utils :as utils]
[badigeon.bundle :as bundle]
[badigeon.jar :as jar]
[badigeon.compile :as compile... | null | https://raw.githubusercontent.com/redstarssystems/pbuilder/b54aba63525e23b104b9ec43e6d8328707d3478b/src/badigeon/war.clj | clojure | (ns badigeon.war
(:require [clojure.data.xml :as xml]
[clojure.tools.deps.alpha :as deps]
[clojure.tools.deps.alpha.util.maven :as maven]
[badigeon.utils :as utils]
[badigeon.bundle :as bundle]
[badigeon.jar :as jar]
[badigeon.compile :as compile... | |
33e40a3732ff307431267a102416253eea85de6cf8423c45ff168fe87366a92d | janegca/htdp2e | 1203-SP-InsertionSort.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname 1203-SP-InsertionSort) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/1203-SP-InsertionSort.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design a function that sorts a list of (real) numbers.
List-of-numbers -> List-of-numbers
rearrange a list of numbers (alon) in descending order
Number List-of-numbers -> List-of-numbers
inserts n into the sorted list of numbers... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname 1203-SP-InsertionSort) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp")))... |
1c464aa315ebea065b765cbd6adc9569dfc32c701a040a259eb78732b213e6c6 | hercules-ci/hercules-ci-agent | Main.hs | module Main where
import MockTasksApi (withServer)
import Protolude
import Spec qualified
import System.IO
import System.Timeout (timeout)
import Test.Hspec
import Test.Hspec.Runner
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
withTimeout $
withServer $ \serv... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/2063a731d51041bc5922a16f88a2bcc39cf8f6a2/tests/agent-test/src/Main.hs | haskell | module Main where
import MockTasksApi (withServer)
import Protolude
import Spec qualified
import System.IO
import System.Timeout (timeout)
import Test.Hspec
import Test.Hspec.Runner
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
withTimeout $
withServer $ \serv... | |
a7a60afd9e1d0bff8a6d6d5b6de9a9ccec793013ffe6f9963a523af4b4994e78 | esengie/fpl-exploration-tool | Main.hs | module Main where
import System.Environment
import CodeGen
main :: IO ()
main = do
args <- getArgs
case args of
[] -> gene
x:xs -> codeGenIO x >>= putStrLn
----
| null | https://raw.githubusercontent.com/esengie/fpl-exploration-tool/bf655e65d215da4d7cae703dda7a7fde1a180b43/app/Main.hs | haskell | -- | module Main where
import System.Environment
import CodeGen
main :: IO ()
main = do
args <- getArgs
case args of
[] -> gene
x:xs -> codeGenIO x >>= putStrLn
|
f4305eee926c9ee90f33c2d7b2c44179290652c3280eb42029980cbe01fdc893 | untangled-web/untangled-ui | storage_spec.clj | (ns untangled.ui.server.image-library.storage-spec
(:require
[clojure.java.io :as io]
[com.stuartsierra.component :as component]
[untangled-spec.core :refer [specification behavior assertions when-mocking]]
[untangled.ui.server.image-library.storage :as src]
[untangled.server.core :as usc]))
(def... | null | https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/test/untangled/ui/server/image_library/storage_spec.clj | clojure | (ns untangled.ui.server.image-library.storage-spec
(:require
[clojure.java.io :as io]
[com.stuartsierra.component :as component]
[untangled-spec.core :refer [specification behavior assertions when-mocking]]
[untangled.ui.server.image-library.storage :as src]
[untangled.server.core :as usc]))
(def... | |
e44a4dbc44215bd525c084aa02edaa468b246c1cc86ecd82ea597e0cce9770e5 | mabragor/cg-llvm | constants.lisp |
(in-package #:cg-llvm)
(cl-interpol:enable-interpol-syntax)
(enable-read-macro-tokens)
(quasiquote-2.0:enable-quasiquote-2.0)
(defmacro!! define-constant-rules (name typecheck errinfo &body value-rule-body) ()
(let ((type-rule-name (intern #?"$(name)-CONSTANT-TYPE"))
(value-rule-name (intern #?"$(name)-CONSTANT-V... | null | https://raw.githubusercontent.com/mabragor/cg-llvm/4a8375316d8ebf36125929c5d1a872721099d29c/src/constants.lisp | lisp | TODO : hexadecimal float ???
just a special syntax for array of chars
just a special syntax for array of chars |
(in-package #:cg-llvm)
(cl-interpol:enable-interpol-syntax)
(enable-read-macro-tokens)
(quasiquote-2.0:enable-quasiquote-2.0)
(defmacro!! define-constant-rules (name typecheck errinfo &body value-rule-body) ()
(let ((type-rule-name (intern #?"$(name)-CONSTANT-TYPE"))
(value-rule-name (intern #?"$(name)-CONSTANT-V... |
c41d453019b96e9f92fd28dec9f9ef053160f8f4ac87d3ab1b14310b19689724 | ntoronto/pict3d | engine.rkt | #lang racket/base
(require "private/engine.rkt")
(provide current-engine-bloom-buffer-size
current-engine-bloom-levels
get-engine-debug-passes
add-engine-debug-passes!
current-engine-debug-pass
get-engine-debug-shapes
add-engine-debug-shapes!
current-engi... | null | https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/engine.rkt | racket | #lang racket/base
(require "private/engine.rkt")
(provide current-engine-bloom-buffer-size
current-engine-bloom-levels
get-engine-debug-passes
add-engine-debug-passes!
current-engine-debug-pass
get-engine-debug-shapes
add-engine-debug-shapes!
current-engi... | |
25e208688113f006f01f38fb03ad66060c25fbdbced16661a40b96f26640d5f6 | metabase/metabase | collection_test.clj | (ns metabase.api.collection-test
"Tests for /api/collection endpoints."
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[metabase.api.collection :as api.collection]
[metabase.models
:refer [Card
Collection
Dashboard
DashboardCard
Moderati... | null | https://raw.githubusercontent.com/metabase/metabase/07f174deaaf3ee7794e17c3aa9ebf94250b04d8e/test/metabase/api/collection_test.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| GET /collection |
+--------------------------------------------------------------------------------------... | (ns metabase.api.collection-test
"Tests for /api/collection endpoints."
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[metabase.api.collection :as api.collection]
[metabase.models
:refer [Card
Collection
Dashboard
DashboardCard
Moderati... |
7d937ce984f121cb761e1fbd95670d31467523e5e0688338f0e4bd4221106f93 | DaisukeBekki/lightblue | Templates.hs | {-# OPTIONS -Wall #-}
{-# LANGUAGE OverloadedStrings #-}
|
Module : . Japanese . Template
Copyright : ( c ) , 2016
Licence : All right reserved
Maintainer : < >
Stability : beta
A set of lexical templates for building a lexicon .
Module : Parser.Japanese.Template
Copyright ... | null | https://raw.githubusercontent.com/DaisukeBekki/lightblue/420532a54bae200890116a336911eb0c114c8930/src/Parser/Japanese/Templates.hs | haskell | # OPTIONS -Wall #
# LANGUAGE OverloadedStrings #
* Templates for lexical items
-
modifierSR,
-
text
| defines a lexical item.
^ A phonetic form
^ A syntactic category
| Category S with the default feature setting (mainly for stems).
catS :: [FeatureValue] -> [FeatureValue] -> Feature -> Feature -> Feature -> Fea... |
|
Module : . Japanese . Template
Copyright : ( c ) , 2016
Licence : All right reserved
Maintainer : < >
Stability : beta
A set of lexical templates for building a lexicon .
Module : Parser.Japanese.Template
Copyright : (c) Daisuke Bekki, 2016
Licence : All right reser... |
860a0a6fee3f3140a8392bc2149bd6312b94461080a1291b674c96dc4319d7b1 | thma/LtuPatternFactory | SimplePersistence.hs | {-# LANGUAGE ScopedTypeVariables #-}
module SimplePersistence
( Id
, Entity
, getId
, persist
, retrieve
) where
import Data.Typeable
-- | Identifier for an Entity
type Id = String
-- | The Entity type class provides generic persistence to txt files
class (Show a, Read a, Typeable... | null | https://raw.githubusercontent.com/thma/LtuPatternFactory/f06bfd4f2efef908793a8b976f1da6f7229dc79b/src/SimplePersistence.hs | haskell | # LANGUAGE ScopedTypeVariables #
| Identifier for an Entity
| The Entity type class provides generic persistence to txt files
| return the unique Id of the entity. This function must be implemented by type class instances.
| persist an entity of type a and identified by an Id to a file
compute file path based on... | module SimplePersistence
( Id
, Entity
, getId
, persist
, retrieve
) where
import Data.Typeable
type Id = String
class (Show a, Read a, Typeable a) => Entity a where
getId :: a -> Id
persist :: a -> IO ()
persist entity = do
let fileName = getPath (typeOf enti... |
027bc64f135aa3c0d78966b50a1acbe41480a85c9a0d380c5e3530d634c330af | venantius/glow | example_1.clj | (ns comment-example-1)
(defn [x] ;; some profound stuff goes here
true)
| null | https://raw.githubusercontent.com/venantius/glow/17698a3621ba2f7d09f7c786764a21b13f90f6c3/dev-resources/test/regex/comments/example_1.clj | clojure | some profound stuff goes here | (ns comment-example-1)
true)
|
f05085a57891b24507b677b6803b04eb0b1441c3d7cf49af099d7bdf22ea28f4 | SquidDev/illuaminate | pattern.ml | open Omnomnom.Tests
open IlluaminatePattern
let test_cases =
[ (* No separator. *)
("a", "a", true);
("a", "x/a", true);
("a", "x/y/z/a", true);
("a", "ab", false);
("a", "ba", false);
("a", "a/b", true);
(* Separator at the start. *)
("/", "a", true);
("/", "a/b/c", true);
("... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/test/pattern.ml | ocaml | No separator.
Separator at the start.
Separator in the middle
Separator at the end
Separator at the end and middle
Weird ** wildcards. | open Omnomnom.Tests
open IlluaminatePattern
let test_cases =
("a", "a", true);
("a", "x/a", true);
("a", "x/y/z/a", true);
("a", "ab", false);
("a", "ba", false);
("a", "a/b", true);
("/", "a", true);
("/", "a/b/c", true);
("/a", "a", true);
("/a", "x/a", false);
("a/b", "a"... |
967e2d185d00f2cf03a10d0165dd6e962388d708d7a5375cfcc72c21a921393f | spurious/sagittarius-scheme-mirror | infix-predicates.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; srfi/%3a156/infix-predicates.scm - Syntactic combiners for binary predicates
;;;
Copyright ( c ) 2018 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditio... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a156/infix-predicates.scm | scheme | coding : utf-8 ; -*-
srfi/%3a156/infix-predicates.scm - Syntactic combiners for binary predicates
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the abo... | Copyright ( c ) 2018 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (srfi :156 infix-predicates)
(export ... |
ea34fb50c442f989fe4e473e4f4ee005a6190b4418517c9baee8b5784ac9d8b4 | johnwhitington/camlpdf | pdfdate.ml | open Pdfutil
type t =
{year : int;
month : int;
day : int;
hour : int;
minute : int;
second : int;
hour_offset : int;
minute_offset : int}
exception BadDate
let check_date d =
try
assert (d.year >= 0 && d.year <= 9999);
assert (d.month >= 1 && d.month <= 12);
assert (d.day >= 1 ... | null | https://raw.githubusercontent.com/johnwhitington/camlpdf/8fece41e8d9a3c141309f2874f7534536facf1ea/pdfdate.ml | ocaml | For now, no detection of default values which could be omitted. | open Pdfutil
type t =
{year : int;
month : int;
day : int;
hour : int;
minute : int;
second : int;
hour_offset : int;
minute_offset : int}
exception BadDate
let check_date d =
try
assert (d.year >= 0 && d.year <= 9999);
assert (d.month >= 1 && d.month <= 12);
assert (d.day >= 1 ... |
d3f22c8b1388ec72950717922cf5a3353230bf89f02814122d4816e4c6d43cb3 | spurious/sagittarius-scheme-mirror | mapping-generator.scm | -*- mode : scheme ; coding : utf-8 - unix ; -*-
(import (rnrs)
(srfi :13 strings)
(srfi :14 char-sets)
(sagittarius io)
(sagittarius))
(define *mapping-file* "./jis-sjis-euc-utf8-utf16.txt")
(define *utf16-position* 4)
(define *position-table* '#(jis sjis euc))
(define (construct-define name type)
`(define ,... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/script/mapping-generator.scm | scheme | coding : utf-8 - unix ; -*-
comment | (import (rnrs)
(srfi :13 strings)
(srfi :14 char-sets)
(sagittarius io)
(sagittarius))
(define *mapping-file* "./jis-sjis-euc-utf8-utf16.txt")
(define *utf16-position* 4)
(define *position-table* '#(jis sjis euc))
(define (construct-define name type)
`(define ,name
(let ((table (make-eqv-hashtable ,(lengt... |
ed71ec4b1b6740d51302b6fc79c6b593c6e91fce42df1a55c0644624c61409bc | darkling/lagra | lagra_parser_ntriples_parser.erl | @private
-module(lagra_parser_ntriples_parser).
-behaviour(gen_server).
-type partial_triple() :: {lagra_model:subject() | none,
lagra_model:predicate() | none,
lagra_model:object() | none}
| {lagra_model:subject() | none,
lagra_model:predicate() | none,
lagra_model:object()... | null | https://raw.githubusercontent.com/darkling/lagra/6827ea20db86aeb4c139db45bd3133ffccfddb7d/src/lagra_parser_ntriples_parser.erl | erlang | API.
gen_server.
API.
gen_server.
The parser is basically a simple state machine, cycling through
subject (iri or bnode), predicate (iri), object (iri, bnode,
literal), literal annotations (lang tag, type) if appropriate, and
The parser returns either 'eof' or a triple or a quad or an error as | @private
-module(lagra_parser_ntriples_parser).
-behaviour(gen_server).
-type partial_triple() :: {lagra_model:subject() | none,
lagra_model:predicate() | none,
lagra_model:object() | none}
| {lagra_model:subject() | none,
lagra_model:predicate() | none,
lagra_model:object()... |
1a4d4af2355a672a4f131846830d7fa673efeaa153dc287f670fdfbc188224d2 | tensorflow/haskell | Build.hs | Copyright 2016 TensorFlow authors .
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distr... | null | https://raw.githubusercontent.com/tensorflow/haskell/d088e30b80f1508281e400975bec9d14b431a22c/tensorflow/src/TensorFlow/Build.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2016 TensorFlow authors .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE FunctionalDependencies #
# LANGU... |
90df3d7cbc3b9c1de76af108e65c14f24feb746061911274ed9f790f15f98a80 | ku-fpg/blank-canvas | Rectangle.hs | {-# LANGUAGE OverloadedStrings #-}
module Rectangle where
import Graphics.Blank
( 578,200 )
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
beginPath();
rect(188, 50, 200, 100);
fillStyle "yellow";
fill();
lineWidth 7;
strokeStyle "black"... | null | https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/wiki-suite/Rectangle.hs | haskell | # LANGUAGE OverloadedStrings # | module Rectangle where
import Graphics.Blank
( 578,200 )
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
beginPath();
rect(188, 50, 200, 100);
fillStyle "yellow";
fill();
lineWidth 7;
strokeStyle "black";
stroke();
wik... |
a274651e78c36620a587998ef13f38b22131819f04f768a746e95dbe968d87b9 | racket/deinprogramm | run-dmda-code.rkt | (module run-dmda-code mzscheme
(require mred/mred mzlib/class mzlib/match syntax/modread)
(define (run-dmda-file filename)
(let ((p (open-input-graphical-file/fixed filename))
(expected-module-name
(let-values (((base name dir) (split-path filename)))
(string->symbol (path->string (path-replace-su... | null | https://raw.githubusercontent.com/racket/deinprogramm/e9fb68455641ae7d409ddb48f5e584c9d014ef4f/deinprogramm/deinprogramm/run-dmda-code.rkt | racket | build-input-port : string -> (values input any)
constructs an input port for the load handler. Also
returns a value representing the source of code read from the file.
in case it's new | (module run-dmda-code mzscheme
(require mred/mred mzlib/class mzlib/match syntax/modread)
(define (run-dmda-file filename)
(let ((p (open-input-graphical-file/fixed filename))
(expected-module-name
(let-values (((base name dir) (split-path filename)))
(string->symbol (path->string (path-replace-su... |
725d15bfaf893738f4e7be1ee4b73077c29ba34c1b1bd4cacf5e57a0849b2ae2 | herd/herdtools7 | autoArch.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/gen/autoArch.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2015 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
fa9e40109e2ff9c63b43c27ff83311204a094e2baf403bdeb4b391234545b309 | haskell-opengl/OpenGLRaw | EglImageStorage.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.EglImageStorage
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
---------------------------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/EglImageStorage.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.EXT.EglImageStorage
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Types
* Functio... | Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.EglImageStorage (
glGetEXTEglImageStorage,
gl_EXT_EGL_image_storage,
GLeglImageOES,
glEGLImageTargetTexStorageEXT,
glEGLImageTargetTextureStorageEXT
) where
import Graphics.GL.ExtensionPredicates
import Graphics.GL.Types
import... |
6f5d8ca6b82e21bf2b897f2fed7cfe88fff99b00d71450ebe2a191de9771cb53 | haskell/cabal | ExposedModule.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Types.ExposedModule where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Backpack
import Distribution.ModuleName
import Distribution.Parsec
import Distribution.Pretty
import qualified Distribution.Compat.Char... | null | https://raw.githubusercontent.com/haskell/cabal/0abbe37187f708e0a5daac8d388167f72ca0db7e/Cabal-syntax/src/Distribution/Types/ExposedModule.hs | haskell | # LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
module Distribution.Types.ExposedModule where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Backpack
import Distribution.ModuleName
import Distribution.Parsec
import Distribution.Pretty
import qualified Distribution.Compat.CharParsing as P
import qualified Text.P... |
57d8ef89f3a8c68efebe16c7f90f3f79d4844adf16bca8614a6d176948dc7685 | mmcqd/datatt | level.ml | open Core
type t =
| Const of int
| Omega
[@@deriving show,equal]
let (+) l1 l2 =
match l1,l2 with
| Const i,Const j -> Const (i + j)
| _ -> Omega
let (<) l1 l2 =
match l1,l2 with
| Const i, Const j -> i < j
| Omega,_ -> false
| _,Omega -> true
let (<=) l1 l2 =
match l1,l2 with
|... | null | https://raw.githubusercontent.com/mmcqd/datatt/3732db401496ab567834f9e3efee1dc0a8223917/src/level.ml | ocaml | open Core
type t =
| Const of int
| Omega
[@@deriving show,equal]
let (+) l1 l2 =
match l1,l2 with
| Const i,Const j -> Const (i + j)
| _ -> Omega
let (<) l1 l2 =
match l1,l2 with
| Const i, Const j -> i < j
| Omega,_ -> false
| _,Omega -> true
let (<=) l1 l2 =
match l1,l2 with
|... | |
8010eb59b39977d8d091e1ad8c396139044c8b360329d8a483a3ee180ccf5192 | clojupyter/clojupyter | handle_event.clj | (ns clojupyter.kernel.handle-event
(:require [clojupyter.kernel.handle-event.comm-msg :as comm-msg]
[clojupyter.kernel.handle-event.complete :as complete]
[clojupyter.kernel.handle-event.execute :as execute]
[clojupyter.kernel.handle-event.history :as history]
[clojupyt... | null | https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/kernel/handle_event.clj | clojure | (ns clojupyter.kernel.handle-event
(:require [clojupyter.kernel.handle-event.comm-msg :as comm-msg]
[clojupyter.kernel.handle-event.complete :as complete]
[clojupyter.kernel.handle-event.execute :as execute]
[clojupyter.kernel.handle-event.history :as history]
[clojupyt... | |
c979a773d134a2c7e138f807ba31bfb513ec60a85b1228df5ed0cd2177a84837 | SamuelSchlesinger/generic-match | Match.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE QuantifiedConstraints #
# LANGUAGE ViewPatterns #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE EmptyCase #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE InstanceS... | null | https://raw.githubusercontent.com/SamuelSchlesinger/generic-match/1be339c152c3394986a14ccf12ef1fe3c0d9e59d/Generic/Match.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
* Pattern match on a 'Generic' type
* Type classes
* Type families
matching on, as opposed to the last argument.
@maybe r f x == match x r f@
Beyond working for 'Maybe' or 'Either', this function works on just
about any type... | # LANGUAGE QuantifiedConstraints #
# LANGUAGE ViewPatterns #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE EmptyCase #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE InstanceSigs #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE PolyKinds #
# LANGUA... |
564594bc951fb971ad2ae5cb615a12fa1902d29bbb3025ff163150428e1ccf7c | Quid2/zm | K614edd84c8bd.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.ZM.ADT.TypedBLOB.K614edd84c8bd (TypedBLOB(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
import qualified Test.ZM.ADT.Type.K7028aa556ebc
import qualified Test.ZM.... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/ZM/ADT/TypedBLOB/K614edd84c8bd.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # | module Test.ZM.ADT.TypedBLOB.K614edd84c8bd (TypedBLOB(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
import qualified Test.ZM.ADT.Type.K7028aa556ebc
import qualified Test.ZM.ADT.AbsRef.K4bbd38587b9e
import qualified Test.ZM.ADT.BLOB.Kf139... |
28a458cb1dfaffaca7825d56f3ba5895ded756e769c9f27feafa03eeb2dc1c09 | duncanatt/detecter | hello_handler.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020
%%% @version 0.9
%%%
%%% @doc
%%%
%%% @end
Created : 26 . Sep 2020
%%%
Copyright ( c ) 2020 < >
%%%
%%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Gener... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowboy_apps/hello/hello_handler.erl | erlang | -------------------------------------------------------------------
@version 0.9
@doc
@end
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the impl... | @author
( C ) 2020
Created : 26 . Sep 2020
Copyright ( c ) 2020 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
-module(hello_handler).
... |
8eef9801251c4d0995229170df63d07181710487ecaa223fe37c21389e1e3448 | infi-nl/alibi | post_entry_form.cljs | (ns alibi.post-entry-form
(:require
[clojure.walk :refer [keywordize-keys]]
[clojure.string :as string]
[alibi.logging :refer [log log-cljs]]
[time.core :refer [expand-time]]
[om.core :as om]
[om.dom :as dom]
[alibi.actions :as actions]
[alibi.entry-page-state :as state
:refer []]... | null | https://raw.githubusercontent.com/infi-nl/alibi/00e97340ebff483f0ecbb3eef929a4052adbc78b/src/frontend/cljs/alibi/post_entry_form.cljs | clojure | (ns alibi.post-entry-form
(:require
[clojure.walk :refer [keywordize-keys]]
[clojure.string :as string]
[alibi.logging :refer [log log-cljs]]
[time.core :refer [expand-time]]
[om.core :as om]
[om.dom :as dom]
[alibi.actions :as actions]
[alibi.entry-page-state :as state
:refer []]... | |
c2701946489b44d616e118fafa3d72ddf9ab5096005c16ee0c6891d5a547a6cd | Appliscale/xprof | xprof_core_cmd_funlatency.erl | -module(xprof_core_cmd_funlatency).
-export([mandatory_params/0,
optional_params/0,
param_from_ast/2,
param_to_internal/2,
prepare_start/1,
format_error/1,
get_cmd_id/1,
%% tracer callbacks
init/2,
handle_event/3,
take_snapshot... | null | https://raw.githubusercontent.com/Appliscale/xprof/198e5451db429cdb7bf6b4640ec932c425b635ae/apps/xprof_core/src/xprof_core_cmd_funlatency.erl | erlang | tracer callbacks
just assert it as an internal consistency check
fun(Pattern) -> true;(_) -> false
tracer
The largest duration value that can be stored in the HDR histogram in ms
helpers for tracer callbacks
Count the depth of recursion in this process
of the outermost call
we missed the call of this function | -module(xprof_core_cmd_funlatency).
-export([mandatory_params/0,
optional_params/0,
param_from_ast/2,
param_to_internal/2,
prepare_start/1,
format_error/1,
get_cmd_id/1,
init/2,
handle_event/3,
take_snapshot/1
]).
mandatory_par... |
8afa2d349d909ddc33d3e7695e012e4e364f403b88dbb9bbaf1bab365695bc1f | cljfx/cljfx | events.clj | (ns e18-pure-event-handling.events
(:require [cljfx.api :as fx]
[e18-pure-event-handling.subs :as subs])
(:import [java.util UUID]
[javafx.scene.input KeyCode KeyEvent]))
(defmulti event-handler :event/type)
(defmethod event-handler :default [event]
(prn event))
(defmethod event-handler ... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e18_pure_event_handling/events.clj | clojure | (ns e18-pure-event-handling.events
(:require [cljfx.api :as fx]
[e18-pure-event-handling.subs :as subs])
(:import [java.util UUID]
[javafx.scene.input KeyCode KeyEvent]))
(defmulti event-handler :event/type)
(defmethod event-handler :default [event]
(prn event))
(defmethod event-handler ... | |
6f29c5a9d18e23e82fe9aa868cddf285bd60d742ddc6b1d4e6a4245f14df55ad | erlang/corba | orber_ifr_constantdef.erl | %%--------------------------------------------------------------------
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain ... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/orber/src/orber_ifr_constantdef.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... | Copyright Ericsson AB 1997 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
File : orber_ifr_constantdef.erl
Purpose : Code for
-module(orber_ifr_constantdef).
-export(['_get_def_kin... |
e3aa09873d71adbc7a3aa16ddadd2eac79fa813c2dfd596cb689c9fa6560d3dc | ryukzak/nitta | BreakLoop.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE NoMonomorphismRestriction #
{-# OPTIONS -fno-warn-orphans #-}
|
Module : NITTA.Synthesis . Steps . BreakLoop
Description :
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Synthesis.Steps.BreakLoop
Description :
... | null | https://raw.githubusercontent.com/ryukzak/nitta/b6c55b3820695090558a037dc8eca36f90e891a7/src/NITTA/Synthesis/Steps/BreakLoop.hs | haskell | # LANGUAGE GADTs #
# OPTIONS -fno-warn-orphans # | # LANGUAGE NoMonomorphismRestriction #
|
Module : NITTA.Synthesis . Steps . BreakLoop
Description :
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Synthesis.Steps.BreakLoop
Description :
Copyright : (c) Aleksandr Penskoi, 2021
License : B... |
c6ad4bce08f8f07a40958c5e4f26a8f474f522fa2ed2fbecd6226b47db6646c1 | NorfairKing/validity | Path.hs | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.GenValidity.Path where
import Data.GenValidity
import Data.Validity.Path ()
import Path
import Path.Internal
import Test.QuickCheck.Gen
instance GenValid (Path Abs File) where
genValid = (Path . ('/' :) <$> genValid) `suchThat` isVali... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-path/src/Data/GenValidity/Path.hs | haskell | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.GenValidity.Path where
import Data.GenValidity
import Data.Validity.Path ()
import Path
import Path.Internal
import Test.QuickCheck.Gen
instance GenValid (Path Abs File) where
genValid = (Path . ('/' :) <$> genValid) `suchThat` isVali... | |
880699bd496ab722a3dde93ccee896b85460d0f7b075199589ba9d958a9e9172 | fhur/gabo | lexer.clj | (ns gabo.lexer
(:require [gabo.util :refer :all]))
(defn tokenize-chunk
"Given a template substring returns a tuple of [match token]
where match is the exact string that matched and token is
the token that corresponds to the regex match.
Example: (tokenize-chunk '{{bar}} foo') will return
['{{bar}}' [:symb... | null | https://raw.githubusercontent.com/fhur/gabo/41563e04a131ce33aadd575f20a87acfecdbdc09/src/gabo/lexer.clj | clojure | match symbols e.g. {{foo}}
match iter-end e.g. {{/foo}}
match iter-init with no args e.g. {{#foo}}
match iter-init with args e.g. {{#foo 'separator'}}
match literals
more literals | (ns gabo.lexer
(:require [gabo.util :refer :all]))
(defn tokenize-chunk
"Given a template substring returns a tuple of [match token]
where match is the exact string that matched and token is
the token that corresponds to the regex match.
Example: (tokenize-chunk '{{bar}} foo') will return
['{{bar}}' [:symb... |
5386552701404f2c24df0cd72292f06f0beb3d2e4cadef4b7d17f3d80ce9b760 | RefactoringTools/HaRe | A3.hs | module LiftToToplevel.A3 where
import LiftToToplevel.C3 (anotherFun)
import LiftToToplevel.D3 (sumSquares)
main = sumSquares [1..4] + anotherFun [1..4]
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftToToplevel/A3.hs | haskell | module LiftToToplevel.A3 where
import LiftToToplevel.C3 (anotherFun)
import LiftToToplevel.D3 (sumSquares)
main = sumSquares [1..4] + anotherFun [1..4]
| |
c93c8388a0bb5753606285632a1568ce5e64e9ad350e2385bfce967cfcb43558 | unison-code/uni-instr-sel | Functions.hs | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | null | https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/Functions.hs | haskell | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | |
9bf1533f351a77068b012fc0e1788e7f023beaeb4c5249c30af801af20ca2b23 | syntheorem/thexa | PositionSpec.hs | module Thexa.PositionSpec where
import Test.Hspec
import Data.ByteString qualified as BS
import Data.ByteString.UTF8 qualified as UTF8
import Data.List (zip)
import Thexa.Internal.Unicode.Parser (readGraphemeBreakTest)
import Thexa.Position (findGraphemeBoundary)
graphemeList :: [[String]]
graphemeList = $$(readGrap... | null | https://raw.githubusercontent.com/syntheorem/thexa/e599efd97c0cb49dc3acb9a5da911e20608a210b/spec/Thexa/PositionSpec.hs | haskell | module Thexa.PositionSpec where
import Test.Hspec
import Data.ByteString qualified as BS
import Data.ByteString.UTF8 qualified as UTF8
import Data.List (zip)
import Thexa.Internal.Unicode.Parser (readGraphemeBreakTest)
import Thexa.Position (findGraphemeBoundary)
graphemeList :: [[String]]
graphemeList = $$(readGrap... | |
f2015b8e8b243d2b8a3dca2fa9404004b8c937a79027cc257f89047eb9569163 | marick/Midje | t_facts.clj | (ns midje.parsing.1-to-explicit-form.t-facts
(:require [midje.parsing.1-to-explicit-form.facts :as facts :refer :all]
[midje.sweet :refer :all]
[midje.test-util :refer :all]
[midje.parsing.2-to-lexical-maps.expects :refer [expect]]
[midje.parsing.2-to-lexical-maps.fakes... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/parsing/1_to_explicit_form/t_facts.clj | clojure | Translating sweet forms into their explicit equivalents | (ns midje.parsing.1-to-explicit-form.t-facts
(:require [midje.parsing.1-to-explicit-form.facts :as facts :refer :all]
[midje.sweet :refer :all]
[midje.test-util :refer :all]
[midje.parsing.2-to-lexical-maps.expects :refer [expect]]
[midje.parsing.2-to-lexical-maps.fakes... |
f74fdfc60c4d41959efeb9ff941d81f539df906c7a312ee8db00939be1330378 | timothypratley/reanimated | boss.cljs | (ns examples.sprites.boss
(:require-macros
[devcards.core :refer [defcard-rg]])
(:require
[datafrisk.core :as datafrisk]
[reagent.core :as reagent]))
(defn boss [{:keys [x y scale arm]}]
[:g
{:transform (str (when x (str "translate(" x " " y ")"))
(when scale (str " scale(" sca... | null | https://raw.githubusercontent.com/timothypratley/reanimated/337926deda118bdffae1e10c16d3a1be84ddf0ab/src/examples/sprites/boss.cljs | clojure | head
eyes
eyeballs
mouth
neck
body
arm | (ns examples.sprites.boss
(:require-macros
[devcards.core :refer [defcard-rg]])
(:require
[datafrisk.core :as datafrisk]
[reagent.core :as reagent]))
(defn boss [{:keys [x y scale arm]}]
[:g
{:transform (str (when x (str "translate(" x " " y ")"))
(when scale (str " scale(" sca... |
a184b11c700cf63782c9e38b6679cc06964ae24975f352b9bf290dd8e8611d42 | MrEbbinghaus/fulcro-material-ui-wrapper | form.cljc | (ns ^:deprecated material-ui.inputs.form
(:require
[com.fulcrologic.fulcro.algorithms.react-interop :as interop]
#?@(:cljs [["@mui/material/FormControl" :default FormControl]
["@mui/material/FormControlLabel" :default FormControlLabel]
["@mui/material/FormGroup" :default FormGrou... | null | https://raw.githubusercontent.com/MrEbbinghaus/fulcro-material-ui-wrapper/058f1dd4b85542914f92f48a4010ea9ad497e48f/src/material_ui/inputs/form.cljc | clojure | (ns ^:deprecated material-ui.inputs.form
(:require
[com.fulcrologic.fulcro.algorithms.react-interop :as interop]
#?@(:cljs [["@mui/material/FormControl" :default FormControl]
["@mui/material/FormControlLabel" :default FormControlLabel]
["@mui/material/FormGroup" :default FormGrou... | |
76856ca251d9197f36ef8f58a4d5230af1727b1669c5e3983de195a7e118b2ee | dmillett/political-canvas | types.clj | (ns political-canvas.shared.data.model.types
(:use [political_canvas.shared.data.schema.objects]))
(def social_media
{:twitter (->SocialMediaType "Twitter" nil "www.twitter.com/foo" {:en_us "www.twitter.com"})
:facebook (->SocialMediaType "Facebook" nil "www.facebook.com/foo" {:en_us "www.facebook.com"})
:li... | null | https://raw.githubusercontent.com/dmillett/political-canvas/ec59a065b832277ec06f80e67977eee196a6a194/src/political_canvas/shared/data/model/types.clj | clojure | (ns political-canvas.shared.data.model.types
(:use [political_canvas.shared.data.schema.objects]))
(def social_media
{:twitter (->SocialMediaType "Twitter" nil "www.twitter.com/foo" {:en_us "www.twitter.com"})
:facebook (->SocialMediaType "Facebook" nil "www.facebook.com/foo" {:en_us "www.facebook.com"})
:li... | |
86d1b0b32650e2bb16205ff1a977983684e94916529107efba08fa52b920c5a8 | sfu-natlang/yarowsky | csem.ml |
Program for the EM algorithm of described in Collins & Singer 1999 .
Program for the EM algorithm of described in Collins & Singer 1999.
*)
open Utils
let save_model lookup labels features lengths (p_y, p_m, p_xy) os =
List.iter begin fun label ->
let p = p_y label in
if p <> 0. then
Printf.fprintf os... | null | https://raw.githubusercontent.com/sfu-natlang/yarowsky/2c73d702909b4d3844b31a60947edfe72ab156b7/programs/csem.ml | ocaml | ~classifier:probs |
Program for the EM algorithm of described in Collins & Singer 1999 .
Program for the EM algorithm of described in Collins & Singer 1999.
*)
open Utils
let save_model lookup labels features lengths (p_y, p_m, p_xy) os =
List.iter begin fun label ->
let p = p_y label in
if p <> 0. then
Printf.fprintf os... |
c6807636a8f720bf364058a59009569eb9ee429152b0ed1c563217cddc601b8f | videolang/interactive-syntax | lang.rkt | #lang racket/base
(provide (all-defined-out)
(all-from-out "log.rkt")
(for-syntax (all-defined-out)))
(require racket/class
racket/serialize
racket/stxparam
racket/splicing
racket/match
syntax/location
syntax/parse/define
"log.rkt"
... | null | https://raw.githubusercontent.com/videolang/interactive-syntax/8c13d83ac0f5dbd624d59083b32f765952d1d440/editor/private/lang.rkt | racket | To be able to instantiate the found editors, we need each
module to be able to track the editors created in its
(partially defined) file.
===================================================================================================
Because we use lang in building the stdlib, which is exported
as part of the... | #lang racket/base
(provide (all-defined-out)
(all-from-out "log.rkt")
(for-syntax (all-defined-out)))
(require racket/class
racket/serialize
racket/stxparam
racket/splicing
racket/match
syntax/location
syntax/parse/define
"log.rkt"
... |
9fadc56a21321cec3d1746435e2de15c5a2487c776f69cdd71c7a1f9cf65b29e | TheClimateCorporation/squeedo | sqs_consumer_test.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/TheClimateCorporation/squeedo/2ac107cae14ff5ac2d1be096d303db9fb39fdbb1/test/com/climate/squeedo/sqs_consumer_test.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(ns com.cli... |
98f5a3b3cf36a9f4dae6831f188dc27d6498d7497542c09998c178f444419e46 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.ui-framework.layout.right-menu.views
(:require
[re-frame.core :as re-frame]
[webchange.ui-framework.components.index :refer [icon]]
[webchange.ui-framework.layout.right-menu.object-tree-menu.views :refer [objects-tree-menu]]
[webchange.editor-v2.activity-form.generic.components.activity-... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/a4f224d345f652dafb03c3a4200ee28d29d87c16/src/cljs/webchange/ui_framework/layout/right_menu/views.cljs | clojure | (ns webchange.ui-framework.layout.right-menu.views
(:require
[re-frame.core :as re-frame]
[webchange.ui-framework.components.index :refer [icon]]
[webchange.ui-framework.layout.right-menu.object-tree-menu.views :refer [objects-tree-menu]]
[webchange.editor-v2.activity-form.generic.components.activity-... | |
c88b64a3a4d85f6506caa6794ca45afb746db3eceec128f15ea661d7d00ba2fb | darkleaf/publicator | user.clj | (ns user
(:require
[publicator.persistence.init]))
(defn start [])
(defn stop [])
| null | https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/persistence/dev/user.clj | clojure | (ns user
(:require
[publicator.persistence.init]))
(defn start [])
(defn stop [])
| |
0020a4d8ddce60f0800dc790b36ae314401e209c526c2a75cc386f71e75aa6dd | samply/blaze | executors_test.clj | (ns blaze.executors-test
(:require
[blaze.executors :as ex]
[blaze.executors-spec]
[blaze.test-util :as tu]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [are deftest is testing]])
(:import
[java.util.concurrent TimeUnit]))
(set! *warn-on-reflection* true)
(st/instrument)
... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/executor/test/blaze/executors_test.clj | clojure | (ns blaze.executors-test
(:require
[blaze.executors :as ex]
[blaze.executors-spec]
[blaze.test-util :as tu]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [are deftest is testing]])
(:import
[java.util.concurrent TimeUnit]))
(set! *warn-on-reflection* true)
(st/instrument)
... | |
f2a6a2be1f0cb487c93c91fe25d3a7ae688004d57144b5c4b0c05b3c3bee5747 | codereport/SICP-2020 | cezar_b_solutions.rkt | #lang racket
(require rackunit)
(require racket/list)
(require rnrs/mutable-pairs-6)
(require compatibility/mlist)
; Ex 3.16
; +-------+-------+
; | C | |
; | o | o---+---+
; | | | | |
; +---+---+-------+ |
; | |
; | +------... | null | https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%203.3%20Solutions/cezar_b_solutions.rkt | racket | Ex 3.16
+-------+-------+
| C | |
| o | o---+---+
| | | | |
+---+---+-------+ |
| |
| +-------+---x---+
| | B | |
+-->| o | o---+----+
| | | | |
... | #lang racket
(require rackunit)
(require racket/list)
(require rnrs/mutable-pairs-6)
(require compatibility/mlist)
+ --- > 1 | 2 |
(define (count-pairs-bad x)
(if (not (pair? x))
0
(+ (count-pairs-bad (car x))
(count-pairs-bad (cdr x))
1)))
... |
69a74f29ab3a518bbc45b8dbb21e81bbd7bd2ef87e2adb5e2cfa4e24d11d77db | ejgallego/coq-serapi | ser_genintern.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_genintern.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2016 - 2018 MINES ParisT... |
0bc5ede1e05a701c0842d01371212726f92fd14c963c9728c468501062bf5dba | re-ops/re-cog | sensors.clj | (ns re-cog.scripts.sensors
(:require
[pallet.stevedore :refer (script do-script)]))
(defn vm-fail []
(script
(pipe ("cat" "/proc/cpuinfo") ("grep" "hypervisor"))
(if (= "$?" 0)
(do
(println "'cannot measure temp in a VM'")
("exit" 1)))))
(defn temp-script
"Read system devices tempera... | null | https://raw.githubusercontent.com/re-ops/re-cog/4b8fa5ab81f51af2f6e41a6f5e2655128b4be5cb/src/re_cog/scripts/sensors.clj | clojure | (ns re-cog.scripts.sensors
(:require
[pallet.stevedore :refer (script do-script)]))
(defn vm-fail []
(script
(pipe ("cat" "/proc/cpuinfo") ("grep" "hypervisor"))
(if (= "$?" 0)
(do
(println "'cannot measure temp in a VM'")
("exit" 1)))))
(defn temp-script
"Read system devices tempera... | |
357ec7bb63402e54ad97c45bf0e0d1b0b41e00049278dda4c7ce712d60492c22 | dizzyd/retest | retest_core.erl | -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
%% retest: Testing Framework
%%
Copyright ( c ) 2010 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
... | null | https://raw.githubusercontent.com/dizzyd/retest/6b33038bd4df4aab1dc15bb59076512ba8fbb113/src/retest_core.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
retest: Testing Framework
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distrib... | -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*-
Copyright ( c ) 2010 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
... |
178f351b6c8fc04bd7f9df53d8ebe5ac2c31805413133b0804208e1b0038e8db | hdbc/hdbc | Utils.hs | # LANGUAGE CPP #
-- #hide
|
Module : Database . HDBC.Utils
Copyright : Copyright ( C ) 2005 - 2011 License : BSD3
Maintainer : < >
Stability : provisional
Portability : portable
Internal module -- not exported directly .
Everything in here is expoerted by " Database ... | null | https://raw.githubusercontent.com/hdbc/hdbc/242e806ac32af2e7913aaa719334a37be16462a1/Database/HDBC/Utils.hs | haskell | #hide
not exported directly .
and read --
not exported directly.
and read --
| Like 'catchSql', with the order of arguments reversed.
| Like 'catchSql', with the order of arguments reversed.
Discard any exception from (rollback conn) so original
exception can be re-raised
Discard any exception here
| Str... | # LANGUAGE CPP #
|
Module : Database . HDBC.Utils
Copyright : Copyright ( C ) 2005 - 2011 License : BSD3
Maintainer : < >
Stability : provisional
Portability : portable
" Database . HDBC " directly .
Written by , jgoerzen\@complete.org
Module : Database.H... |
135a9740d336b0a4c8e5880cbae7ed40181db6b74e791da04bacc270d4730366 | wildbit/mysql-queue | utils_test.clj | (ns mysql-queue.utils-test
(:require [mysql-queue.utils :refer :all]
[clojure.test :refer :all]))
(deftest while-let-test
(let [s (atom [1 2 3 4 5])]
(is (nil? (while-let [[x] (seq @s)] (swap! s rest))))
(is (empty? @s))))
(deftest ns->ms-test
(is (= 0 (ns->ms 0)))
(is (= 1 (ns->ms 1000000... | null | https://raw.githubusercontent.com/wildbit/mysql-queue/68dd19eab1cd119ba40b3a64822fa5ab213354dc/test/mysql_queue/utils_test.clj | clojure | (ns mysql-queue.utils-test
(:require [mysql-queue.utils :refer :all]
[clojure.test :refer :all]))
(deftest while-let-test
(let [s (atom [1 2 3 4 5])]
(is (nil? (while-let [[x] (seq @s)] (swap! s rest))))
(is (empty? @s))))
(deftest ns->ms-test
(is (= 0 (ns->ms 0)))
(is (= 1 (ns->ms 1000000... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.