_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 |
|---|---|---|---|---|---|---|---|---|
8185751475f7db13bc4010049687badf00ac98f70a581588c2d4e637ccb38989 | icicle-lang/icicle-ambiata | Check.hs | -- Typechecking expressions
-- and other invariants
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Icicle.Common.Exp.Check (
-- Perform all checks and return the type.
typeExp
-- Perform all checks with an empty environment and return the type.
, typeExp0
-- Perform all che... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-data/src/Icicle/Common/Exp/Check.hs | haskell | Typechecking expressions
and other invariants
Perform all checks and return the type.
Perform all checks with an empty environment and return the type.
Perform all checks and return the annotated expression.
Perform all checks with an empty environment and return the annotated expression.
| Perform all checks wi... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Icicle.Common.Exp.Check (
typeExp
, typeExp0
, checkExp
, checkExp0
) where
import Icicle.Common.Annot
import Icicle.Common.Type
import Icicle.Common.Exp.Compounds
import Icicle.Co... |
e7e7f1c598346cfd91cf76b3534f067761c45394b36a806e937b6576c9c9bb18 | openbadgefactory/salava | modal.cljs | (ns salava.badge.ui.modal
(:require
[clojure.string :refer [blank? starts-with? split includes?]]
[reagent.core :refer [atom cursor]]
[reagent.session :as session]
[salava.admin.ui.reporttool :refer [reporttool1]]
[salava.badge.ui.helper :as bh]
[salava.badge.ui.assertion :as a]
[salava.badge.ui.... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/badge/ui/modal.cljs | clojure | TODO creator endorsements
.selfie-stamp]
view count
congratulate
messages
endorsements
Check-badge
Endorse-badge
evidence list
map | (ns salava.badge.ui.modal
(:require
[clojure.string :refer [blank? starts-with? split includes?]]
[reagent.core :refer [atom cursor]]
[reagent.session :as session]
[salava.admin.ui.reporttool :refer [reporttool1]]
[salava.badge.ui.helper :as bh]
[salava.badge.ui.assertion :as a]
[salava.badge.ui.... |
5cb4566ce2156f00b7a9d5cc8f5bed41f23f504798bff889cb2659d611baf531 | imitator-model-checker/imitator | AlgoIMK.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : IMK algorithm... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoIMK.ml | ocaml | **********************************************************
**********************************************************
Modules
**********************************************************
**********************************************************
**********************************************************
***************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : IMK algorithm... |
51f08b81badcab2f148a3d1a3acfece0baba584ccc1101bcb576254a5d3a539b | luxingwen/emqx-mysql | emqx_mysql_SUITE.erl | Copyright ( c ) 2013 - 2019 EMQ Technologies Co. , Ltd. 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 app... | null | https://raw.githubusercontent.com/luxingwen/emqx-mysql/14076ccd4746379812bb76721f33649fdc72fe69/test/emqx_mysql_SUITE.erl | erlang |
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 permissions and
limitations under the License.
| Copyright ( c ) 2013 - 2019 EMQ Technologies Co. , Ltd. 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 .
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_mysql_... |
fb9e522014ee9372d08b135035b7ee7933958b08e8c12d755a5e9b0b6d18ec15 | cedlemo/OCaml-GObject-Introspection | Test_struct_info.ml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/tests/Test_struct_info.ml | ocaml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | |
e60c7a6e10f972ac74ac74267f307d86135ef0b312d1989090436680237384b6 | pixlsus/GIMP-Scripts | gu-wakui-GMIC-qt.scm | This script contains the command syntax for git post v1.79
refer to the original post for scripts for v1.79 & older
-masashi-wakui-look-with-gimp/2771/6
(define (script-fu-wakui
theImage
baseLayer
)
Initialize an undo , so the process can be undone with a single undo
(gim... | null | https://raw.githubusercontent.com/pixlsus/GIMP-Scripts/d1b121aa26ac4ac79772c993199cfa022abafb61/gu-wakui-GMIC-qt.scm | scheme | duplicate base layer
rename the dupe layer
Ensure the updated image is displayed now
end define | This script contains the command syntax for git post v1.79
refer to the original post for scripts for v1.79 & older
-masashi-wakui-look-with-gimp/2771/6
(define (script-fu-wakui
theImage
baseLayer
)
Initialize an undo , so the process can be undone with a single undo
(gim... |
c9ac69a2e12e96d9f43c9e92cfd9c75ab207581fa885b35b43fef023f1771248 | ocaml-flambda/ocaml-jst | md5.ml | (* TEST
flags += " -w -a "
*)
Test int32 arithmetic and optimizations using the MD5 algorithm
open Printf
type context =
{ buf: bytes;
mutable pos: int;
mutable a: int32;
mutable b: int32;
mutable c: int32;
mutable d: int32;
mutable bits: int64 }
let step1 w x y z data s =
let w =
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/lib-digest/md5.ml | ocaml | TEST
flags += " -w -a "
Just buffer the data
Fill the buffer
Transform 64 bytes
Test
Benchmark |
Test int32 arithmetic and optimizations using the MD5 algorithm
open Printf
type context =
{ buf: bytes;
mutable pos: int;
mutable a: int32;
mutable b: int32;
mutable c: int32;
mutable d: int32;
mutable bits: int64 }
let step1 w x y z data s =
let w =
Int32.add (Int32.add w data)
... |
dbaa5b7b30d6a4ef39103466dd106673f0209abeb16e0751e15eaccffe5b5d51 | Frama-C/Frama-C-snapshot | mark_all_slices.ml | (* ledit bin/toplevel.top -deps tests/slicing/mark_all_slices.c
#use "tests/slicing/select.ml";;
ou
#use "tests/slicing/mark_all_slices.ml";;
*)
include LibSelect;;
let main _ =
we are interesting in having several slices ,
* so use mode PreciseSlices
* so use mode PreciseSlices *)
SlicingKernel.Mod... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/slicing/mark_all_slices.ml | ocaml | ledit bin/toplevel.top -deps tests/slicing/mark_all_slices.c
#use "tests/slicing/select.ml";;
ou
#use "tests/slicing/mark_all_slices.ml";;
~~~~~~~~~~~~ Project 1 :
add a global selection in 'all' to always compute its result.
* This should modify the existing slice (all_1)
*
~~~~~~~~~~~~ Project 2 : |
include LibSelect;;
let main _ =
we are interesting in having several slices ,
* so use mode PreciseSlices
* so use mode PreciseSlices *)
SlicingKernel.Mode.Calls.set 3 ;
Slicing.Api.Project.reset_slicing ();
let kf_main = Globals.Functions.find_def_by_name "main" in
let kf_all = Globals.Function... |
a54b9dc94a409d65bb51b858d32919ab978af795d9f2aa654f01e15552e354b7 | CrossRef/cayenne | csl.clj | (ns leiningen.csl
(:require [clojure.java.io :as io]
[clojure.string :as string]))
(defn generate-locales-manifest []
(->> (io/file "csl/locales")
(.list)
(filter #(.startsWith % "locales-"))
(map #(-> %
(string/replace-first #"locales-" "")
(strin... | null | https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/tasks/leiningen/csl.clj | clojure | (ns leiningen.csl
(:require [clojure.java.io :as io]
[clojure.string :as string]))
(defn generate-locales-manifest []
(->> (io/file "csl/locales")
(.list)
(filter #(.startsWith % "locales-"))
(map #(-> %
(string/replace-first #"locales-" "")
(strin... | |
89da7409d13c9c2685678c02b9dddbccde1680e01315b7e1c20442d1f7d8f742 | plum-umd/c-strider | kttypes.ml | open Kttools
module S = String
module L = List
module TransformTypes =
struct
type ikind =
| IChar
| ISChar
| IUChar
| IBool
| IInt
| IUInt
| IShort
| IUShort
| ILong
| IULong
| ILongLong
| IULongLong
type fkind =
| FFloat
| FDouble
| FLongDouble
... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/ocaml-src/common/kttypes.ml | ocaml | open Kttools
module S = String
module L = List
module TransformTypes =
struct
type ikind =
| IChar
| ISChar
| IUChar
| IBool
| IInt
| IUInt
| IShort
| IUShort
| ILong
| IULong
| ILongLong
| IULongLong
type fkind =
| FFloat
| FDouble
| FLongDouble
... | |
b26d567ddd35c7b231a299a7c4998bcfb7f76b6aaf9028b31a99c485aba14701 | rixed/ramen | RamenTcpSocket.ml | This module implements a simple event - based TCP server that transmit PDUs
* prefixed with a 4 bytes length ( in little endian ) . Used by the configuration
* server .
* prefixed with a 4 bytes length (in little endian). Used by the configuration
* server. *)
open Batteries
open RamenLog
open RamenHelpersNo... | null | https://raw.githubusercontent.com/rixed/ramen/f91639f0f3da4a7d07a7ba00d6604b78d6dc3769/src/RamenTcpSocket.ml | ocaml | readables
writables
exceptional conditions
Adds some files to the fd sets:
Given the selected fd_sets, read from/write into them
We want to read/write entire messages so we need to buffer inputs and
* outputs:
When nothing have been read so far from the next message:
As soon as the size of the message i... | This module implements a simple event - based TCP server that transmit PDUs
* prefixed with a 4 bytes length ( in little endian ) . Used by the configuration
* server .
* prefixed with a 4 bytes length (in little endian). Used by the configuration
* server. *)
open Batteries
open RamenLog
open RamenHelpersNo... |
d0fd1d01f749f59027856bea43c4097f02c0a14c6e0cb05cfa34bae81085a976 | fogus/tathata | policies.clj | ( c ) and . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the t... | null | https://raw.githubusercontent.com/fogus/tathata/b0d7c63cded76db8b4672f27d8616474464387f8/src/clj/fogus/kernel/tathata/policies.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | ( c ) and . All rights reserved .
(ns fogus.kernel.tathata.policies
"Policies are meant to control the access to pods and optionally the
creation, comparison, and coordination of one or more objects with.
`Suchness`. Objects provide this behavior via the mixed extension of
the `Sentry`, `Coordinator`,... |
f570e5614d51e48b1a5ef03bb4312ea293be29e2bbac1cc6d98871e7aa991d3f | fgalassi/cs61a-sp11 | l8.1.scm | (define (make-account init-amount)
(let ((balance init-amount))
(define (withdraw amount)
(set! balance (- balance amount)) balance)
(define (deposit amount)
(set! balance (+ balance amount)) balance)
(define (dispatch msg)
(cond
((eq? msg 'withdraw) withdraw)
((eq? msg '... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/l8.1.scm | scheme | (define (make-account init-amount)
(let ((balance init-amount))
(define (withdraw amount)
(set! balance (- balance amount)) balance)
(define (deposit amount)
(set! balance (+ balance amount)) balance)
(define (dispatch msg)
(cond
((eq? msg 'withdraw) withdraw)
((eq? msg '... | |
4668cb531f087d69f808d3cda63963f209caef49ced2835a49bdc63af523efbd | v-kolesnikov/sicp | 2_06.clj | (ns sicp.chapter02.2-06)
(def zero
(fn [f]
(fn [x] x)))
(defn add-1
[n]
(fn [f]
(fn [x]
(f ((n f) x)))))
(def one
(fn [f] f))
(def two
(fn [f]
(fn [x]
(f (f x)))))
(defn add
[a b]
(fn [f]
(fn [x]
((a f) ((b f) x)))))
| null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_06.clj | clojure | (ns sicp.chapter02.2-06)
(def zero
(fn [f]
(fn [x] x)))
(defn add-1
[n]
(fn [f]
(fn [x]
(f ((n f) x)))))
(def one
(fn [f] f))
(def two
(fn [f]
(fn [x]
(f (f x)))))
(defn add
[a b]
(fn [f]
(fn [x]
((a f) ((b f) x)))))
| |
09adb19476f5c7b5991660a3b8e63fa35504da6ed7ff946d1dc781a39e54999c | funimage/funimage | conversion.clj | ; This is the namespace for converting datatypes (i.e. ImagePlus -> Img and vice versa)
(ns funimage.conversion
(:require [clojure.string :as string]
[clojure.java.io :as io])
(:import [java.io File]
[ij IJ ImagePlus]
#_[ij.io Opener]
[java.awt.image Buffered... | null | https://raw.githubusercontent.com/funimage/funimage/397d1ed9a1c11287f8562d05c10040ce24717f04/src/funimage/conversion.clj | clojure | This is the namespace for converting datatypes (i.e. ImagePlus -> Img and vice versa) | (ns funimage.conversion
(:require [clojure.string :as string]
[clojure.java.io :as io])
(:import [java.io File]
[ij IJ ImagePlus]
#_[ij.io Opener]
[java.awt.image BufferedImage]
[net.imglib2.img ImagePlusAdapter Img]
... |
06eac2a330545b34cdf3eb05b3f55c85a80f7bb40fa2798cc5f598ff7d205590 | quchen/generative-art | GrowingProcess.hs | module Circuits.GrowingProcess (
circuitProcess
, CellState(..)
, Circuits(..)
, ProcessGeometry(..)
) where
import Control.DeepSeq
import Control.Monad
import Control.Monad.ST
import Data.Map (Map)
import qualified Data.Map as M
impor... | null | https://raw.githubusercontent.com/quchen/generative-art/1ab82fafc8ea715946b680928689882c3e561109/penplotting/circuits/Circuits/GrowingProcess.hs | haskell | | The geometry in which a circuit growing process takes place.
| All existing circuits. The wires can be reconstructed from this.
| Grow circuits inside a geometry.
^ Given the geometry and already existing circuits, we can’t grow any circuits
start, remove it from the list of possible starts.
^ Starting point ca... | module Circuits.GrowingProcess (
circuitProcess
, CellState(..)
, Circuits(..)
, ProcessGeometry(..)
) where
import Control.DeepSeq
import Control.Monad
import Control.Monad.ST
import Data.Map (Map)
import qualified Data.Map as M
impor... |
aea193accefd6bce737e4d35164bb512de9083da8fba6e1572ad209411f56bfe | frasertweedale/hs-jose | JWK.hs | Copyright ( C ) 2013 , 2017 , 2018 Fraser Tweedale
--
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... | null | https://raw.githubusercontent.com/frasertweedale/hs-jose/ea33a544bb8af526aae28a0e866f49e20cf7b06b/test/JWK.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 per... | Copyright ( C ) 2013 , 2017 , 2018 Fraser Tweedale
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
module JWK
( spec
) where
import Data.Monoid ((<>))
impo... |
8ba0b0cc68aa6091016b28c7be4591260e441fcf7504a4e768a77a3b08baa53e | debug-ito/greskell | GValue.hs | # LANGUAGE DeriveGeneric #
-- |
-- Module: Data.Greskell.GraphSON.GValue
Description : Aeson Value with GraphSON wrappers
Maintainer : < >
--
-- __This module is for advanced use. Most users should just use "Data.Greskell.GraphSON".__
--
-- This module defines 'GValue' and exposes its deconstructors.
--
-- @sinc... | null | https://raw.githubusercontent.com/debug-ito/greskell/ff21b8297a158cb4b5bafcbb85094cef462c5390/greskell-core/src/Data/Greskell/GraphSON/GValue.hs | haskell | |
Module: Data.Greskell.GraphSON.GValue
__This module is for advanced use. Most users should just use "Data.Greskell.GraphSON".__
This module defines 'GValue' and exposes its deconstructors.
@since 0.1.2.0
* GValue type
** constructors
$caveat_decon
| An Aeson 'Value' wrapped in 'GraphSON' wrapper type. Bas... | # LANGUAGE DeriveGeneric #
Description : Aeson Value with GraphSON wrappers
Maintainer : < >
module Data.Greskell.GraphSON.GValue
GValue (..)
, GValueBody (..)
, nonTypedGValue
, typedGValue'
* *
, unwrapAll
, unwrapOne
, gValueBody
, gValueType
) where
import ... |
abaebce9f3369bd0192c191d6d7cc429692bc24316fb96262c4efbb2ed85e686 | dumbs/2010-m1s1-compilation | main.lisp | ;; Main
;; Chargement de tous les fichiers, dans l'ordre du tri topologique
pour tous les re - charger , sans les charger deux fois .
(setq *load-verbose* t)
(load "util")
(load "test-unitaire")
(load "vm")
(load "match")
(load "mini-meval")
(load "squash-lisp-1")
(load "squash-lisp-3")
(load "squash-lisp")
(load ... | null | https://raw.githubusercontent.com/dumbs/2010-m1s1-compilation/1aa5c903587d977f1fe0b680c60d09934b72b4e5/lisp/main.lisp | lisp | Main
Chargement de tous les fichiers, dans l'ordre du tri topologique |
pour tous les re - charger , sans les charger deux fois .
(setq *load-verbose* t)
(load "util")
(load "test-unitaire")
(load "vm")
(load "match")
(load "mini-meval")
(load "squash-lisp-1")
(load "squash-lisp-3")
(load "squash-lisp")
(load "compilation")
(load "equiv-tests")
(load "../implementation/meval-op")
(pr... |
6d188595859952ff5c50137255e062ee161503f7f3d8a59be9b2476e9948f6ae | solita/mnt-teet | theme_colors.cljs | (ns teet.theme.theme-colors
(:require [garden.color :refer [lighten]]))
(defn primary-alpha [alpha]
(str "rgb(4, 30, 66, " alpha ")"))
New VEERA color theme
;; Main colors
(def blue-dark "#004665")
(def blue "#005E87")
(defn blue-alpha [alpha]
(str "rgb(0, 94, 135, " alpha ")"))
(def blue-tab "#005AA3")
(def ... | null | https://raw.githubusercontent.com/solita/mnt-teet/ed985542cb0bbb169d088d37d88e29ee3921d726/app/frontend/src/cljs/teet/theme/theme_colors.cljs | clojure | Main colors
not sure how these should be used, straight from the design
Accent colors
Component colors
Text colors | (ns teet.theme.theme-colors
(:require [garden.color :refer [lighten]]))
(defn primary-alpha [alpha]
(str "rgb(4, 30, 66, " alpha ")"))
New VEERA color theme
(def blue-dark "#004665")
(def blue "#005E87")
(defn blue-alpha [alpha]
(str "rgb(0, 94, 135, " alpha ")"))
(def blue-tab "#005AA3")
(def blue-light "#00... |
3143400743b938f3c964518d382b1a48d8abb67d9875f03b35dc4af3544144c8 | eeng/shevek | totals.cljs | (ns shevek.pages.designer.visualizations.totals
(:require [shevek.domain.dw :refer [format-measure]]))
(defn totals-visualization [{:keys [results measures]}]
(let [grand-total (first results)]
[:div.ui.statistics
(doall
(for [{:keys [name title] :as measure} measures]
[:div.statistic {:ke... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/designer/visualizations/totals.cljs | clojure | (ns shevek.pages.designer.visualizations.totals
(:require [shevek.domain.dw :refer [format-measure]]))
(defn totals-visualization [{:keys [results measures]}]
(let [grand-total (first results)]
[:div.ui.statistics
(doall
(for [{:keys [name title] :as measure} measures]
[:div.statistic {:ke... | |
04dab928929564542d71c9f43120b6834a999bf6ab1df5951a0118a489b06375 | input-output-hk/cardano-sl | Conc.hs | # OPTIONS_GHC -fno - warn - orphans #
-- | Temporary holding bin for useful functions defined in `Pos.Core.Mockable`.
Since we are removing the ` Mockable ` class , some of the functions defined
-- there will move here.
module Pos.Core.Conc
( currentTime
, currentTimeUnits
, delay
, withAsync
, w... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Conc.hs | haskell | | Temporary holding bin for useful functions defined in `Pos.Core.Mockable`.
there will move here.
toMicroseconds :: TimeUnit t => t -> Integer
Use Integer to avoid potential Int overflow.
| This function is analogous to `System.Timeout.timeout`. It's
based on `race` and `delay`. | # OPTIONS_GHC -fno - warn - orphans #
Since we are removing the ` Mockable ` class , some of the functions defined
module Pos.Core.Conc
( currentTime
, currentTimeUnits
, delay
, withAsync
, withAsyncWithUnmask
, race
, timeout
, concurrently
, mapConcurrently
, forConcurrentl... |
b9c7ea4df3f1cc2e3d63224fc089a9aa9ee07a89b4e87b7187bb30e7aafe00c9 | haas/harmtrace | Standard.hs |
module HarmTrace.Matching.Standard (diffChords, diffChordsLen) where
import Data.Algorithm.Diff -- cabal install Diff
diff :: (Eq a) => [a] -> [a] -> [(DI,a)]
diff = getDiff
diffLen :: (Eq a) => [a] -> [a] -> Float
diffLen x y = fromIntegral (len (diff x y)) / fromIntegral (length x)
len :: [(DI,a)] -> Int
len [] ... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Matching/Standard.hs | haskell | cabal install Diff
------------------------------------------------------------------------------
Matching
------------------------------------------------------------------------------ |
module HarmTrace.Matching.Standard (diffChords, diffChordsLen) where
diff :: (Eq a) => [a] -> [a] -> [(DI,a)]
diff = getDiff
diffLen :: (Eq a) => [a] -> [a] -> Float
diffLen x y = fromIntegral (len (diff x y)) / fromIntegral (length x)
len :: [(DI,a)] -> Int
len [] = 0
len ((B,_):t) = len t
len ((_,_):t) = ... |
3a79bd774953ca5fb100ac5e5d4388b0285f48628910768ccf91657aa88f131f | kutyel/haskell-book | Lenses.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE ImpredicativeTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Lenses where
import Data.Function ((&))
import Data.Functor.Const (Const (Const, getConst))
import Data.Functor.Identity (Identity (Identity, runIdentity))
import... | null | https://raw.githubusercontent.com/kutyel/haskell-book/fd4dc0332b67575cfaf5e3fb0e26687dc01772a0/src/Lenses.hs | haskell | # LANGUAGE ImpredicativeTypes #
view
set
over
Usage | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Lenses where
import Data.Function ((&))
import Data.Functor.Const (Const (Const, getConst))
import Data.Functor.Identity (Identity (Identity, runIdentity))
import Data.Generics.Product.Fields (field... |
c49fa34de2343cbe22191ad4fbd05a1960c9f67498d2d3ec39c4b9c758ef6c42 | autolwe/autolwe | DeducGroup.ml | * Deducibility for group expressions .
(* ** Imports and abbreviations *)
open Abbrevs
open Util
open Syms
open Type
open Expr
open ExprUtils
open NormField
open GroebnerBasis
let mk_log level = mk_logger "Deduce.DeducGroup" level "DeducGroup.ml"
let log_i = mk_log Bolt.Level.INFO
(* ** Solving function
* ... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Deduce/DeducGroup.ml | ocaml | ** Imports and abbreviations
** Solving function
* -----------------------------------------------------------------------
NOTE: For now, we do not deal with rational functions in the
exponent. It might be possible to generalize the current algorithm
by performing something similar to the cross-multiplicati... | * Deducibility for group expressions .
open Abbrevs
open Util
open Syms
open Type
open Expr
open ExprUtils
open NormField
open GroebnerBasis
let mk_log level = mk_logger "Deduce.DeducGroup" level "DeducGroup.ml"
let log_i = mk_log Bolt.Level.INFO
let solve_group (emaps : EmapSym.t list) (ecs : (expr * inve... |
a1f2227c9116e53eca71ce08af7d385fdd1b9ba2267dbfbba208956b8f7cbd7a | xsc/invariant | spec.clj | (ns invariant.spec
"Integration with `clojure.spec`."
(:require [invariant.core :as invariant]
[invariant.potemkin :refer [import-vars]]
[clojure.spec.gen :as gen]
[clojure.spec :as s]))
# # Generic Invariant Spec
(defn ^:no-doc holds-spec-impl
"Do not use – use `holds?` in... | null | https://raw.githubusercontent.com/xsc/invariant/45425bcc69d0bc896efd5307a640dbdb06b61797/src/invariant/spec.clj | clojure | ## Public Macro | (ns invariant.spec
"Integration with `clojure.spec`."
(:require [invariant.core :as invariant]
[invariant.potemkin :refer [import-vars]]
[clojure.spec.gen :as gen]
[clojure.spec :as s]))
# # Generic Invariant Spec
(defn ^:no-doc holds-spec-impl
"Do not use – use `holds?` in... |
d2b3a8ea786e2e6a4c6026d2587b33cfca07d9e07c5a30ab7f78ff6609c35239 | haskell-game/tiny-games-hs | bulls-n-cows.hs | #!/usr/bin/env stack
-- stack script --resolver lts-20 --package random
import Control.Monad (when);import System.Random (uniformR, newStdGen)
l=length;f=sum. fmap fromEnum;p=putStrLn;(x:xs)!!!0=(x,xs);(x:xs)!!!n=(x:)<$>(xs
!!!(n-1));r n x g=let{(i,h)=uniformR(0,l x-1)g;(z,y)= x!!!i}in if n==1 then[z]
else z:r(n-1)y h... | null | https://raw.githubusercontent.com/haskell-game/tiny-games-hs/e56b1c6e6d994631a4ab5cf0bfb5ab5c62d1fa86/hackage/bulls-n-cows/bulls-n-cows.hs | haskell | stack script --resolver lts-20 --package random
^10 ------------------------------------------------------------------ 80> -- | #!/usr/bin/env stack
import Control.Monad (when);import System.Random (uniformR, newStdGen)
l=length;f=sum. fmap fromEnum;p=putStrLn;(x:xs)!!!0=(x,xs);(x:xs)!!!n=(x:)<$>(xs
!!!(n-1));r n x g=let{(i,h)=uniformR(0,l x-1)g;(z,y)= x!!!i}in if n==1 then[z]
else z:r(n-1)y h;main=turn 10. r 4['0'..'9']=<<newStdGen;turn 0 s=p... |
5a9a3637532514d97f99d8c3aa045901714e0cbf37b80c6fca8eb0a2b4d05d35 | stan-dev/stanc3 | SizedType.ml | * Types which have a concrete size associated , e.g. [ vector\[n\ ] ]
open Core_kernel
type 'a t =
| SInt
| SReal
| SComplex
| SVector of Mem_pattern.t * 'a
| SRowVector of Mem_pattern.t * 'a
| SMatrix of Mem_pattern.t * 'a * 'a
| SComplexVector of 'a
| SComplexRowVector of 'a
| SComplexMatrix of 'a... | null | https://raw.githubusercontent.com/stan-dev/stanc3/dcc107ae11db9f7f6a5a745ce7cde31e5bcad028/src/middle/SizedType.ml | ocaml | * Return a type's array dimensions and the type inside the (possibly nested) array | * Types which have a concrete size associated , e.g. [ vector\[n\ ] ]
open Core_kernel
type 'a t =
| SInt
| SReal
| SComplex
| SVector of Mem_pattern.t * 'a
| SRowVector of Mem_pattern.t * 'a
| SMatrix of Mem_pattern.t * 'a * 'a
| SComplexVector of 'a
| SComplexRowVector of 'a
| SComplexMatrix of 'a... |
3b521168723e1e31687357baaaff3922ab2b8f63312a60f2d8ebd5d2afca4c6a | janestreet/async_unix | thread_safe_ivar.mli | (** A simple thread-safe ivar implementation. *)
open! Core
open! Import
type 'a t [@@deriving sexp_of]
val create : unit -> _ t
val fill : 'a t -> 'a -> unit
(** [read t] blocks until [t] is filled. *)
val read : 'a t -> 'a
| null | https://raw.githubusercontent.com/janestreet/async_unix/2562a6b9316d7c6757726305482380bd7e6dba06/thread_safe_ivar/src/thread_safe_ivar.mli | ocaml | * A simple thread-safe ivar implementation.
* [read t] blocks until [t] is filled. |
open! Core
open! Import
type 'a t [@@deriving sexp_of]
val create : unit -> _ t
val fill : 'a t -> 'a -> unit
val read : 'a t -> 'a
|
4127b66bd91744a87c519af269c63e8df5fa1f88e8509761722443f0c032bd84 | well-typed-lightbulbs/ocaml-esp32 | truncate.ml | (* TEST
include unix
* hasunix
** bytecode
** native
*)
let str = "Hello, OCaml!"
let txt = "truncate.txt"
let test file openfile stat truncate delta close =
let () =
let c = open_out_bin file in
output_string c str;
close_out c
in
let size file =
(stat file).Unix.st_size
in
let file = openf... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-unix/common/truncate.ml | ocaml | TEST
include unix
* hasunix
** bytecode
** native
|
let str = "Hello, OCaml!"
let txt = "truncate.txt"
let test file openfile stat truncate delta close =
let () =
let c = open_out_bin file in
output_string c str;
close_out c
in
let size file =
(stat file).Unix.st_size
in
let file = openfile file in
Printf.printf "initial size: %d\n%!" (size... |
92aa3d8a92ddb489f5c4631bb3ceae9ef5f1bdc0c815be565569f838a967aee8 | rowangithub/DOrder | 196_fig1.ml | let rec loop x y =
if x < 0 then
loop (x+y) (y+1)
else assert (y > 0)
let main y =
let x = (-50) in
loop x y | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/196_fig1.ml | ocaml | let rec loop x y =
if x < 0 then
loop (x+y) (y+1)
else assert (y > 0)
let main y =
let x = (-50) in
loop x y | |
b1dd20bd14e3d2832ba6e198a07f1a51f1e205d27001a8df500bd6a34a90bcea | donaldsonjw/bigloo | spread.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Effect / spread.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Effect/spread.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* We spread the computed side-effect properties */
*===========================... | * serrano / prgm / project / bigloo / comptime / Effect / spread.scm * /
* Author : * /
* Creation : Thu Jun 20 11:36:01 1996 * /
* Last change : Mon Nov 11 09:58:34 2013 ( serrano ) * /
* Copy... |
1f622b75a74b5c0332cdb7bad8f956b4ee33194428d02dc0e3cb5638b594aa9a | denisidoro/rosebud | error_info.clj | (ns quark.beta.server.interceptors.error-info
(:require [io.pedestal.interceptor.error :as interceptor.error]
[quark.beta.server.protocols.debug-logger :as protocols.debug-logger]))
(defn- register-error-for-debugging [context error]
(some-> context :request :components :debug-logger
(protoco... | null | https://raw.githubusercontent.com/denisidoro/rosebud/90385528d9a75a0e17803df487a4f6cfb87e981c/server/src/quark/beta/server/interceptors/error_info.clj | clojure | hacky way to grab an exception as it is being propagated upwards and
register it for debug logging. Eventually find a more basic way to do
this. | (ns quark.beta.server.interceptors.error-info
(:require [io.pedestal.interceptor.error :as interceptor.error]
[quark.beta.server.protocols.debug-logger :as protocols.debug-logger]))
(defn- register-error-for-debugging [context error]
(some-> context :request :components :debug-logger
(protoco... |
863369311a6165ce7cd9843daf2e1db565006d4796580a0c269c6c93181b4931 | ocaml/oloop | test_deferred.ml | (* Test the quivalent to Utop behavior for Deferred.t values: evaluate
them automatically. *)
open Core_kernel.Std
open Async.Std
let phrases = [
"#use \"topfind\"";
"#thread";
"#require \"core\"";
"#require \"async\"";
"open Core.Std";
"open Async.Std";
"Reader.file_contents";
"le... | null | https://raw.githubusercontent.com/ocaml/oloop/d0dc99fdfb9d1a88d1f45cfaa41422254951b0a8/tests/test_deferred.ml | ocaml | Test the quivalent to Utop behavior for Deferred.t values: evaluate
them automatically. |
open Core_kernel.Std
open Async.Std
let phrases = [
"#use \"topfind\"";
"#thread";
"#require \"core\"";
"#require \"async\"";
"open Core.Std";
"open Async.Std";
"Reader.file_contents";
"let contents = Reader.file_contents \"tests/test.txt\"";
"Deferred.peek contents";
"content... |
6dc06e9b0654df2c8b345a9d5e25c56a01a28fd4ef0886ac439daa4d369b27b5 | yamadapc/stack-run | Util.hs | module System.Console.Questioner.Util
where
import Control.Exception (bracket_)
import System.Console.ANSI (clearLine, cursorDownLine, cursorUpLine,
hideCursor, showCursor)
import System.IO (BufferMode(..), Handle, hGetBuffering, hSetBuffering,
hSetEcho, stdin)
-- |
-- ... | null | https://raw.githubusercontent.com/yamadapc/stack-run/76f18cc0800ef2ffa3d1c63306282f15e5a4daf0/unix/System/Console/Questioner/Util.hs | haskell | |
Performs an IO action with some buffer mode on a handle
|
|
Performs an IO action with the console cursor hidden
|
Performs an IO action with console "echoing" supressed
|
Clears the screen from the cursor's current position until `n` lines
above it | module System.Console.Questioner.Util
where
import Control.Exception (bracket_)
import System.Console.ANSI (clearLine, cursorDownLine, cursorUpLine,
hideCursor, showCursor)
import System.IO (BufferMode(..), Handle, hGetBuffering, hSetBuffering,
hSetEcho, stdin)
hWithBuf... |
524d227903ef3f1d9432e90f14d1c5352ee4ad005d90569bc9a58d462f88fb5c | nklein/clifford | product-t.lisp | (in-package #:clifford-tests)
(nst:def-test-group product-tests ()
(nst:def-test dot-product-a-a
(:equalp (make-r2 :one -2 :x 4 :y 6 :xy 8))
(let ((a (make-r2 :one 1 :x 2 :y 3 :xy 4)))
(dot a a)))
(nst:def-test dot-product-a-b
(:equalp (make-r2 :one 2 :x 3 :y 4 :xy 5))
(let ((a (make-r2 ... | null | https://raw.githubusercontent.com/nklein/clifford/2ba9b9a8f68eb88c2821341dfac2f2a61c2f84ce/src/product-t.lisp | lisp | (in-package #:clifford-tests)
(nst:def-test-group product-tests ()
(nst:def-test dot-product-a-a
(:equalp (make-r2 :one -2 :x 4 :y 6 :xy 8))
(let ((a (make-r2 :one 1 :x 2 :y 3 :xy 4)))
(dot a a)))
(nst:def-test dot-product-a-b
(:equalp (make-r2 :one 2 :x 3 :y 4 :xy 5))
(let ((a (make-r2 ... | |
134a1518383c8fa6a67a3d183246421c014596213c763b523ac4472c2a00b4c8 | vaibhavsagar/duffer | WithRepo.hs | module Duffer.WithRepo
( WithRepo
, ReaderT
, ask
, asks
, local
, runReaderT
, liftIO
, localObjects
, withRepo
) where
import Control.Monad.Trans.Reader (ReaderT, ask, asks, local, runReaderT)
import Control.Monad.IO.Class (liftIO)
import System.FilePath ((</>))... | null | https://raw.githubusercontent.com/vaibhavsagar/duffer/bad9c6c6cf09f717e22d3d65f95564236896d610/duffer/src/Duffer/WithRepo.hs | haskell | module Duffer.WithRepo
( WithRepo
, ReaderT
, ask
, asks
, local
, runReaderT
, liftIO
, localObjects
, withRepo
) where
import Control.Monad.Trans.Reader (ReaderT, ask, asks, local, runReaderT)
import Control.Monad.IO.Class (liftIO)
import System.FilePath ((</>))... | |
b09d2c618a15dde455b36957427bfcea62b74f6ad1289915f16421452a8fae37 | mpereira/felucca | hit_points_bar.clj | (ns felucca.components.hit-points-bar
(:require [arcadia.core :refer [defmutable log update-state state log with-cmpt]]
[felucca.vector3 :as v3]
[felucca.components.creature :as creature])
(:import [UnityEngine Debug Color Camera GUI Rect Screen Vector3 Texture2D
Renderer ScaleMo... | null | https://raw.githubusercontent.com/mpereira/felucca/b22aedf1bb8beb2226ee5f0f6bd7368cc0e56fb6/Assets/felucca/src/felucca/components/hit_points_bar.clj | clojure | (ns felucca.components.hit-points-bar
(:require [arcadia.core :refer [defmutable log update-state state log with-cmpt]]
[felucca.vector3 :as v3]
[felucca.components.creature :as creature])
(:import [UnityEngine Debug Color Camera GUI Rect Screen Vector3 Texture2D
Renderer ScaleMo... | |
09566acd43176a2545806d363651b3e655605e25c3b4cdf1316b54e3b96a4cb8 | unnohideyuki/bunny | sample173.hs | main = do print $ take 10 (enumFrom 2 :: [Int])
print $ (enumFromTo 3 9 :: [Int])
print $ take 10 (enumFromThen (-1) 3 :: [Int])
print $ (enumFromThenTo 1 3 8 :: [Int])
print $ (enumFromTo 1 0 :: [Int])
print $ (enumFromThenTo 1 2 0 :: [Int])
print $ take 10 ... | null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample173.hs | haskell | main = do print $ take 10 (enumFrom 2 :: [Int])
print $ (enumFromTo 3 9 :: [Int])
print $ take 10 (enumFromThen (-1) 3 :: [Int])
print $ (enumFromThenTo 1 3 8 :: [Int])
print $ (enumFromTo 1 0 :: [Int])
print $ (enumFromThenTo 1 2 0 :: [Int])
print $ take 10 ... | |
b0dc8c8df45e2cc1de2088dc2428b6d4ba3e6d8884c1c1beb719015de13979e4 | jessex/CLRS-implementations | 0018_insertion_sort.scm | ;; INSERTION-SORT(A)
;; Sorts the given array by iteratively inserting each element into the sorted
;; portion of the array
;; O(n^2)
Chapter 2.1 , Page 18
(define insert
(lambda (a lst)
(cond
((null? lst) (list a))
((<= a (car lst)) (cons a lst))
(else (cons (car lst) (insert a (cdr lst)))... | null | https://raw.githubusercontent.com/jessex/CLRS-implementations/ed5d3d89cf489646b15941c2529533e98389a58b/scheme/0018_insertion_sort.scm | scheme | INSERTION-SORT(A)
Sorts the given array by iteratively inserting each element into the sorted
portion of the array
O(n^2) | Chapter 2.1 , Page 18
(define insert
(lambda (a lst)
(cond
((null? lst) (list a))
((<= a (car lst)) (cons a lst))
(else (cons (car lst) (insert a (cdr lst)))))))
(define insertion-sort
(lambda (lst)
(cond
((null? lst) '())
(else (insert (car lst) (insertion-sort (cdr ... |
6aac70d928c4a46ecf3809bf750a5c1ee8bd964a6c3e46d9c2d2160b897c16a2 | leondavi/NErlNet | noMatchingRouteHandler.erl | %%%-------------------------------------------------------------------
@author kapelnik
( C ) 2021 , Nerlnet
%%% @doc
%%%
%%% @end
Created : 01 . Jan 2021 4:58 AM
%%%-------------------------------------------------------------------
-module(noMatchingRouteHandler).
-author("kapelnik").
%% API
-export([init/2]... | null | https://raw.githubusercontent.com/leondavi/NErlNet/031bdc005a7534330a00f66d536759cbe6dd8e64/src_erl/Communication_Layer/http_Nerlserver/src/noMatchingRouteHandler.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Whoops! something probebly went wrong when sending this URL request | @author kapelnik
( C ) 2021 , Nerlnet
Created : 01 . Jan 2021 4:58 AM
-module(noMatchingRouteHandler).
-author("kapelnik").
-export([init/2]).
init(Req0, State) ->
Scheme = cowboy_req:scheme(Req0),
Host = cowboy_req:host(Req0),
Port = cowboy_req:port(Req0),
Path = cowboy_req:path(Req0),
Qs = cowboy_r... |
a412338c414e1de59ce4cd004b5f68c7615328c322a6268719797a91ddbf4626 | jorinvo/googlesheets-sql-sync | util_test.clj | (ns googlesheets-sql-sync.util-test
(:require
[clojure.test :refer [deftest testing are is]]
[clojure.string :as string]
[googlesheets-sql-sync.util :as util]))
(deftest fail
(is (thrown-with-msg? Exception #"oh no!"
(util/fail "oh" " no!"))))
(deftest get-free-port
(dotimes [_ ... | null | https://raw.githubusercontent.com/jorinvo/googlesheets-sql-sync/b9fb4c8d7fba36859d4225140778e465142be180/test/googlesheets_sql_sync/util_test.clj | clojure | (ns googlesheets-sql-sync.util-test
(:require
[clojure.test :refer [deftest testing are is]]
[clojure.string :as string]
[googlesheets-sql-sync.util :as util]))
(deftest fail
(is (thrown-with-msg? Exception #"oh no!"
(util/fail "oh" " no!"))))
(deftest get-free-port
(dotimes [_ ... | |
610997eb33f07ebd0f5562db1bc08335eb3b3d0aedf4d27c962b63ad87046b30 | learningclojurescript/code-examples | helpers.cljs | (ns experiment.helpers)
(defn error?
[x]
(instance? js/Error x))
(defn throw-err
[x]
(if (error? x)
(throw x)
x))
| null | https://raw.githubusercontent.com/learningclojurescript/code-examples/fdbd0e35ae5a16d53f1f784a52c25bcd4e5a8097/chapter-2/experiment/src/experiment/helpers.cljs | clojure | (ns experiment.helpers)
(defn error?
[x]
(instance? js/Error x))
(defn throw-err
[x]
(if (error? x)
(throw x)
x))
| |
a35ddd0a4de721d49293ebc78a3c929a9b2b3aad6fd3a050c6a0ff77001845e9 | herd/herdtools7 | RISCVLexer.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/RISCVLexer.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2017 - 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... |
5fe51fac98d6aec801e6cb2977617f8ea3a4e2fcf4ba45aa773f32b3e586d98d | lambda-toolshed/papillon | example.cljc | (ns lambda-toolshed.papillon.examples.example
(:require
[lambda-toolshed.papillon :as papillon :refer [enqueue execute]]
[clojure.core.async :as async :refer [go <! >! chan]]
clojure.pprint))
;; Synchronous interceptor that only handles items
;; on enter, and adds a new key to the context
(def one-ix
{:na... | null | https://raw.githubusercontent.com/lambda-toolshed/papillon/8ed9673594d37bd1aefd5b74a852f11c522e84b0/examples/lambda_toolshed/papillon/examples/example.cljc | clojure | Synchronous interceptor that only handles items
on enter, and adds a new key to the context
and does not take an initial context to augment
Synchronous interceptor with that only handles items
on enter, and updates an existing key in the context
and does not take an initial context to augment
Define an intercept... | (ns lambda-toolshed.papillon.examples.example
(:require
[lambda-toolshed.papillon :as papillon :refer [enqueue execute]]
[clojure.core.async :as async :refer [go <! >! chan]]
clojure.pprint))
(def one-ix
{:name :one-ix
:enter (fn [ctx]
(assoc ctx :number 1))})
Run an interceptor chain wi... |
ccce553d703aa9492f0d6a0e7b8f4ee1321a446f914ecedcaf21833fbc7a9ded | racket/gui | framework-test-engine.rkt | #lang racket/base
(require mzlib/pconvert
racket/tcp
racket/class
racket/gui/base
"debug.rkt")
(module test racket/base)
(define errs null)
(define sema (make-semaphore 1))
(define (protect f)
(semaphore-wait sema)
(begin0 (f)
(semaphore-post sema)))
(define (excepti... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/framework/tests/framework-test-engine.rkt | racket | #lang racket/base
(require mzlib/pconvert
racket/tcp
racket/class
racket/gui/base
"debug.rkt")
(module test racket/base)
(define errs null)
(define sema (make-semaphore 1))
(define (protect f)
(semaphore-wait sema)
(begin0 (f)
(semaphore-post sema)))
(define (excepti... | |
860d9471209a1c14b0225844ddbcc0b0341e357ffc2a43f2e163931f89b8719a | imitator-model-checker/imitator | AlgoBCCoverDistributedMSPointBasedWorker.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoBCCoverDistributedMSPointBasedWorker.mli | ocaml | **********************************************************
Modules
**********************************************************
**********************************************************
Class definition
**********************************************************
*******************************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... |
99ef73a0a6d7fe01289907d37a868aba93f87214c379028320c6e557d136cfe5 | fpco/schoolofhaskell.com | AdminActions.hs | module Handler.AdminActions where
import Import
import Handler.AdminUserList (respondCSV)
getAdminActionsR :: Handler TypedContent
getAdminActionsR = respondCSV [] [Asc AdminActionTimestamp] $ \(Entity _ AdminAction {..}) ->
return $ mapFromList
[ ("userid", toPathPiece adminActionUser)
, ("email"... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Handler/AdminActions.hs | haskell | module Handler.AdminActions where
import Import
import Handler.AdminUserList (respondCSV)
getAdminActionsR :: Handler TypedContent
getAdminActionsR = respondCSV [] [Asc AdminActionTimestamp] $ \(Entity _ AdminAction {..}) ->
return $ mapFromList
[ ("userid", toPathPiece adminActionUser)
, ("email"... | |
1765cbebca0aeb2d763e234f6f898496f27048d780168cf4ea78ac03e1cbc9f6 | mitchellwrosen/planet-mitchell | Enum.hs | module Enum
( Enum(..)
) where
import GHC.Enum
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Enum.hs | haskell | module Enum
( Enum(..)
) where
import GHC.Enum
| |
320365094492559a7a85427ae8cc8331b422671b58e62857d2916b01b19b5a88 | haskell-suite/base | Buffer.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , ForeignFunctionInterface #
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Buffer
Copyright : ( c ) The University of Glasgow 2008
-- License : ... | null | https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/GHC/IO/Buffer.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
---------------------------------------------------------------------------
|
Module : GHC.IO.Buffer
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Buffers used in the IO system
-----------------------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , ForeignFunctionInterface #
Copyright : ( c ) The University of Glasgow 2008
Portability : non - portable ( GHC Extensions )
module GHC.IO.Buffer (
Buffer(..), BufferState(..), CharBuffer, CharBufElem,
newByteBuffer,
newCharBuffer,
... |
796709430136706dbf3aab1eaf2833a3434bb740fdb66aab9ab5c2b6362b0fa9 | dpiponi/Moodler | butterbp.hs | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) (Inside plane)
lab <- label' "butterbp" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "butterbp"
inp <- plugin' (name ++ ".freq") (x-21, y+50) (Inside plane)
setCo... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/butterbp.hs | haskell | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) (Inside plane)
lab <- label' "butterbp" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "butterbp"
inp <- plugin' (name ++ ".freq") (x-21, y+50) (Inside plane)
setCo... | |
77649d8abb3ce1e12c18e95cdf409c1585683781c3af11a168db2aba8cf302b3 | Tritlo/PropR | Multi.hs | module Multi where
import Test.Tasty
import Test.Tasty.HUnit
y :: Int
y = 20
x :: Int
x = 25
some_nums :: (Int, Int)
some_nums = (30, 12)
tests :: TestTree
tests = testCase "Is the answer" (x + y @?= 42)
prop_XIs30 :: Bool
prop_XIs30 = x == 30
main :: IO ()
main = defaultMain tests
---- EXPECTED ----
diff --g... | null | https://raw.githubusercontent.com/Tritlo/PropR/1eb4e21358d88d511f70816def5884954663bfc0/tests/cases/Multi.hs | haskell | -- EXPECTED ----
git a / tests / cases / Multi.hs b / tests / cases / Multi.hs
- a / tests / cases / Multi.hs
-- END EXPECTED ---- | module Multi where
import Test.Tasty
import Test.Tasty.HUnit
y :: Int
y = 20
x :: Int
x = 25
some_nums :: (Int, Int)
some_nums = (30, 12)
tests :: TestTree
tests = testCase "Is the answer" (x + y @?= 42)
prop_XIs30 :: Bool
prop_XIs30 = x == 30
main :: IO ()
main = defaultMain tests
+ + + b / tests / cases / M... |
df7736600f385b6dc5574b1433351dd1544761ee631c3105028c4966f5603058 | modular-macros/ocaml-macros | subst.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/typing/subst.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
type t
Substitutions are used to translate a type from one context to
another . ... |
4444d5f5c869fd9e8d70325a8846308a595b647e78e2cb597b3d6418fc1024c9 | dbuenzli/topkg | topkg_test.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/topkg/ea1e0981a18ce4160ec21e8a73f67cb748059671/src/topkg_test.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
3436b803b54070ee05a6eb0791a6f2adbdce2520fad3f13a13b56b9dfb90a267 | KestrelInstitute/Specware | Tests.lisp | (test-directories ".")
(test
("Bug 0116 : Error in removeCurrying"
:sw "RemCurr#P"
:output '(
(:optional "")
";;; Elaborating spec at $TESTDIR/RemCurr#S"
";;; Elaborating proof-term at $TESTDIR/RemCurr#P"
(:optional ";;; Elaborating spec at $SPECWARE/Library/ProverBase/Top")
... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0116/Tests.lisp | lisp | (test-directories ".")
(test
("Bug 0116 : Error in removeCurrying"
:sw "RemCurr#P"
:output '(
(:optional "")
";;; Elaborating spec at $TESTDIR/RemCurr#S"
";;; Elaborating proof-term at $TESTDIR/RemCurr#P"
(:optional ";;; Elaborating spec at $SPECWARE/Library/ProverBase/Top")
... | |
fba34ca794fd1d55a591363ee52cd51f40cebbd4f39925e73aabf9bdeffa8d31 | input-output-hk/cardano-sl | CoinPortion.hs | module Pos.Core.Common.CoinPortion
( CoinPortion (..)
, coinPortionDenominator
, checkCoinPortion
, unsafeCoinPortionFromDouble
, coinPortionToDouble
, applyCoinPortionDown
, applyCoinPortionUp
) where
import Universum
import Control.Monad.Ex... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Common/CoinPortion.hs | haskell | with denominator of 'coinPortionDenominator'. The numerator must be in the
interval of [0, coinPortionDenominator].
portion of total stake.
To multiply a coin portion by 'Coin', use 'applyCoinPortionDown' (when
calculating number of coins) or 'applyCoinPortionUp' (when calculating a
threshold).
i. e. String
t... | module Pos.Core.Common.CoinPortion
( CoinPortion (..)
, coinPortionDenominator
, checkCoinPortion
, unsafeCoinPortionFromDouble
, coinPortionToDouble
, applyCoinPortionDown
, applyCoinPortionUp
) where
import Universum
import Control.Monad.Ex... |
05bd02d65146aa06b339f237d3441f7f3181d23a5e9b8138206153d6b703828a | shirok/Gauche | derived.scm | (define-module scheme.stream.derived
(use util.stream :except (stream-take stream-drop))
(export define-stream list->stream port->stream
(rename stream+ stream) ;; differs from SRFI-40
stream->list stream-append stream-concat stream-constant
stream-drop stream-drop-while stream-filter ... | null | https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/scheme/stream/derived.scm | scheme | differs from SRFI-40 | (define-module scheme.stream.derived
(use util.stream :except (stream-take stream-drop))
(export define-stream list->stream port->stream
stream->list stream-append stream-concat stream-constant
stream-drop stream-drop-while stream-filter stream-fold
stream-for-each stream-from stream-i... |
5e4ea75bc3c0a94b1f057358bfbfaad740dbd5a4ebaee80d808a04db9cee75c2 | igorhvr/bedlam | srfi-34.scm | (module srfi-34
(raise
with-exception-handler
(guard guard-aux))
(include "../../modules/srfi/srfi-34.scm")
(add-feature 'srfi-34))
| null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/libs/srfi/srfi-34.scm | scheme | (module srfi-34
(raise
with-exception-handler
(guard guard-aux))
(include "../../modules/srfi/srfi-34.scm")
(add-feature 'srfi-34))
| |
075be42e5033b74d68e66080c26b9eeda2bd566e7622c6b04f9fbed6a66a1009 | rain-1/single_cream | minikanren.scm | (defmacro values
(lambda (exp)
`(list . ,(cdr exp))))
(define (make-let-values n vars val body)
(if (= n 1)
`(let ((,(car vars) (car ,val))) . ,body)
(if (= n 2)
`(let ((,(car vars) (car ,val))
(,(cadr vars) (cadr ,val)))
. ,body)
(if (= n 3)
`(let ((,(car vars) (car ,val))
... | null | https://raw.githubusercontent.com/rain-1/single_cream/f8989fde4bfcffe0af7f6ed5916885446bf40124/t/scheme-tests/minikanren.scm | scheme | (let-values ((<vars> <val>) ...)
<body> ...)
but we only implement the single version
(let-values ((<vars> <val>))
<body> ...)
utils
variables
Variable representation is a vector of a single int
it's useful to have an ordering to speed up some set operations
substitution
Using these modified-* functions ... | (defmacro values
(lambda (exp)
`(list . ,(cdr exp))))
(define (make-let-values n vars val body)
(if (= n 1)
`(let ((,(car vars) (car ,val))) . ,body)
(if (= n 2)
`(let ((,(car vars) (car ,val))
(,(cadr vars) (cadr ,val)))
. ,body)
(if (= n 3)
`(let ((,(car vars) (car ,val))
... |
31d916f47590487378bfb982cc0460cbe222916c0a1cb477dbead559b49fa64a | weavejester/crypto-password | bcrypt.clj | (ns crypto.password.bcrypt
"Functions for encrypting passwords using the widely-used bcrypt algorithm.
See: "
(:import [at.favre.lib.crypto.bcrypt BCrypt]))
(def ^:private default-work-factor
(Long/parseLong (System/getProperty "crypto.password.bcrypt.default-work-factor" "11")))
(defn encrypt
"Encrypt a p... | null | https://raw.githubusercontent.com/weavejester/crypto-password/af340ad62ef7ce94734136f4d3569e652cde02c4/src/crypto/password/bcrypt.clj | clojure | (ns crypto.password.bcrypt
"Functions for encrypting passwords using the widely-used bcrypt algorithm.
See: "
(:import [at.favre.lib.crypto.bcrypt BCrypt]))
(def ^:private default-work-factor
(Long/parseLong (System/getProperty "crypto.password.bcrypt.default-work-factor" "11")))
(defn encrypt
"Encrypt a p... | |
efa7d6e7a7a4fdcbadc5a5cbb5714974ef37f40f3dcaaa1dbbeb68444a87be31 | alezost/guix-config | os-main.scm | (use-modules
(srfi srfi-1)
(gnu)
(gnu system locale)
(gnu services networking)
(gnu services dbus)
(gnu services desktop)
(gnu services ssh)
(gnu packages base) ; for 'canonical-package'
(al places)
(al files)
(al utils)
(al guix packages)
(al guix services linux)
(al guix utils))
(define %use... | null | https://raw.githubusercontent.com/alezost/guix-config/1fb884c7b1225a875537fe2856d3866f817d328b/system-config/os-main.scm | scheme | for 'canonical-package'
to mount qcow2 images
for my HDD to be recognized
for MIDI-keyboard
(locale-libcs
(cons (guix-package base glibc-2.23)
%default-locale-libcs))
Since I always use "guix system build --no-bootloader", I don't
to do it anyway (it is done by 'perform-action' procedure in
(guix scri... | (use-modules
(srfi srfi-1)
(gnu)
(gnu system locale)
(gnu services networking)
(gnu services dbus)
(gnu services desktop)
(gnu services ssh)
(al places)
(al files)
(al utils)
(al guix packages)
(al guix services linux)
(al guix utils))
(define %user-name "al")
(define %group-name "users")
(define %host-na... |
0c9c16b612e7c13814fd64b3c1e1a7e676f8f95ef489fe69fef100512431cbd5 | isovector/algebra-driven-design | App.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Scavenge.App where
import Data.Foldab... | null | https://raw.githubusercontent.com/isovector/algebra-driven-design/11c514e75feb22b51ae744379664549e06e70de4/code/Scavenge/App.hs | haskell | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
TODO(sandy): write about this? | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Scavenge.App where
import Data.Foldable
import qualified Data.Map.Monoidal as M
import Data.MultiSet hiding (empty)
import QuickSpec
i... |
8b1d8e57f44c8b6153975f6b5e3508b08b870c04a87f54aa140a05ec922d56ef | ashinn/chibi-scheme | binary-types.scm |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; utilities
(define (read-u16/be in)
(let* ((i (read-u8 in))
(j (read-u8 in)))
(if (eof-object? j)
(error "end of input")
(+ (arithmetic-shift i 8) j))))
(define (read-u16/le in)
(let* ((i (read-u8 in))
... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/binary-types.scm | scheme |
utilities
syntax |
(define (read-u16/be in)
(let* ((i (read-u8 in))
(j (read-u8 in)))
(if (eof-object? j)
(error "end of input")
(+ (arithmetic-shift i 8) j))))
(define (read-u16/le in)
(let* ((i (read-u8 in))
(j (read-u8 in)))
(if (eof-object? j)
(error "end of input")
(+ ... |
3b53340cbb9b29e5693f22bf98903cdb392c6ed1b2a8c47bca8fba474efaa92c | drlivingston/kabob | gensat_rules.clj | `{:name "gensat-expression-in-uberon"
:head (
gene_expression
(?/record obo/IAO_0000142 ?/expression)
(?/r1 rdf/type owl/Restriction)
(?/r1 owl/onProperty obo/BFO_0000066)
(?/r1 owl/someValuesFrom ?/uberon)
(?/r2 rdf/type owl/Restriction)
(?/r2 owl/onProperty kr... | null | https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/gensat/gensat_rules.clj | clojure | still need to add a sufficient definition
(_/fv3 obo/IAO_0000219 _/celltype_name)
;;still need to add a sufficient definition
(_/fv4 obo/IAO_0000219 _/cellsubtype_name)
(_/fv3 obo/IAO_0000219 _/celltype_name)
`{:name "gensat-expression-in-fibers"
:head (
gene_expression
(?/r1 rdf/type owl... | `{:name "gensat-expression-in-uberon"
:head (
gene_expression
(?/record obo/IAO_0000142 ?/expression)
(?/r1 rdf/type owl/Restriction)
(?/r1 owl/onProperty obo/BFO_0000066)
(?/r1 owl/someValuesFrom ?/uberon)
(?/r2 rdf/type owl/Restriction)
(?/r2 owl/onProperty kr... |
dba28b1342ea857f7ab51f4ad429aa79fce8fa6608df27721771a4f6b8a8403a | wireapp/wire-server | Main.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/be524fac7eb46d5419c319d5f8161f0c518a7f69/services/cargohold/exec/Main.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Main
( main,
)
where
... |
a296d510b62fda8477fe56e30e1525af244916a35897641e3f1fb9a3ba777d27 | mzp/coq-ide-for-ios | vconv.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/kernel/vconv.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
********************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Env... |
1a26ea6b3370828607c8b38c630ced7d3fc53000b6ffc6778a2113ac85caeec3 | webyrd/n-grams-for-synthesis | wisp-guile.scm | #!/home/arne/wisp/wisp-multiline.sh
; !#
;; This file might need to be licensed permissively for inclusion in
an SRFI . Only change it , if you agree to this possible relicensing
;; of your contribution to this file. I will not accept changes here
;; which do not allow that.
; we need to be able to replace end-of-... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-119/srfi-119/wisp-guile.scm | scheme | !#
This file might need to be licensed permissively for inclusion in
of your contribution to this file. I will not accept changes here
which do not allow that.
we need to be able to replace end-of-line characters in brackets and strings
TODO: Check whether I can offload the string processing to the
read-function... | #!/home/arne/wisp/wisp-multiline.sh
an SRFI . Only change it , if you agree to this possible relicensing
of strings instead of one big string . Or rather , each line would be
bootstrap via python3 wisp.py wisp - guile.w > 1 & & guile 1 wisp - guile.w > 2 & & guile 2 wisp - guile.w > 3 & & diff 2 3
-Author ... |
e6917aca6652755294f6e501436037ec751a2524ab15a9fe0aecbe8df3a66600 | arsenm/Clutterhs | Gtk.hs | -- -*-haskell-*-
--
Author :
--
Created : 13 Nov 2009
--
Copyright ( C ) 2009 - 2010
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the ... | null | https://raw.githubusercontent.com/arsenm/Clutterhs/ad3390895264c46906b5d3d954c4b04b04d96b1d/clutter-gtk/Graphics/UI/Clutter/Gtk.hs | haskell | -*-haskell-*-
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library 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 PARTICULA... |
Author :
Created : 13 Nov 2009
Copyright ( C ) 2009 - 2010
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
| Clutter - Gtk is an integration library for the Clutter toolkit
Clutter - Gtk allows embedding a Cl... |
9e0460af41f6ef8283045649b9720240ee4686a3826bbb4bfef1b1e77c52979d | lambdaclass/holiday_pinger | users_login_SUITE.erl | -module(users_login_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[login_with_valid_user,
fail_login_on_unknown_user,
fail_login_on_wrong_password].
init_per_suite(Config) ->
{ok, _Apps} = application:ensure_all_started(holiday_ping),
#{email := Email, pass... | null | https://raw.githubusercontent.com/lambdaclass/holiday_pinger/a8a6d1e28de57cf24d6205d275981a718305b351/test/users_login_SUITE.erl | erlang | -module(users_login_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[login_with_valid_user,
fail_login_on_unknown_user,
fail_login_on_wrong_password].
init_per_suite(Config) ->
{ok, _Apps} = application:ensure_all_started(holiday_ping),
#{email := Email, pass... | |
1ac409961489fd9dd440c032e18e58e997af1016bcd34973815f1666b2c0257f | geneweb/geneweb | searchName.ml | Copyright ( c ) 1998 - 2007 INRIA
open Config
open Gwdb
open Util
let empty_sn_or_fn base p =
is_empty_string (get_surname p)
|| is_quest_string (get_surname p)
|| is_empty_string (get_first_name p)
|| is_quest_string (get_first_name p)
|| Name.lower (sou base (get_surname p)) = ""
|| Name.lower (sou ba... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/searchName.ml | ocaml | search functions
recherche par clé, i.e. prenom.occ nom
main
************************************************************************
************************************************************************ | Copyright ( c ) 1998 - 2007 INRIA
open Config
open Gwdb
open Util
let empty_sn_or_fn base p =
is_empty_string (get_surname p)
|| is_quest_string (get_surname p)
|| is_empty_string (get_first_name p)
|| is_quest_string (get_first_name p)
|| Name.lower (sou base (get_surname p)) = ""
|| Name.lower (sou ba... |
37b8574c45b2802b8cf3c11d8ba78080c7ef4a5fd3b40ed786fe654bd3e710f4 | realworldocaml/book | workspace.mli | (** Workspaces definitions *)
open Import
module Context : sig
module Target : sig
type t =
| Native
| Named of Context_name.t
val equal : t -> t -> bool
end
module Common : sig
type t =
{ loc : Loc.t
; profile : Profile.t
; targets : Target.t list
; env : Dune_... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/workspace.mli | ocaml | * Workspaces definitions
* Either a switch name or a path to a local switch. This argument
is left opaque as we leave to opam to interpret it.
* Representation of a workspace. The list of context is topologically sorted,
i.e. a context always comes before the contexts where it is used as host
... |
open Import
module Context : sig
module Target : sig
type t =
| Native
| Named of Context_name.t
val equal : t -> t -> bool
end
module Common : sig
type t =
{ loc : Loc.t
; profile : Profile.t
; targets : Target.t list
; env : Dune_env.Stanza.t
; toolchain... |
42c6fbe98ee7c92e375a51b7c59f88c1d57aaefe9a6b995ac2f286a142fd7ee9 | WormBase/wormbase_rest | human_diseases.clj | (ns rest-api.classes.genotype.widgets.human-diseases
(:require
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.classes.do-term.core :as do-term]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn detailed-disease-model [genotype]... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/genotype/widgets/human_diseases.clj | clojure | (ns rest-api.classes.genotype.widgets.human-diseases
(:require
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.classes.do-term.core :as do-term]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn detailed-disease-model [genotype]... | |
d6e04aaa0a0ebb1fc9d754dde980864b5ec41fe5f0577a2ef8ddf5d4071b2f57 | NorfairKing/sydtest | Sqlite.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- | Testing with an in-memory sqlite database using persistent-sqlite
module Test.Syd.Persistent.Sqlite
( persistSqliteSpec,
withConnectionPool,
connectionPoolSetupFunc,
runSqlPool,
runSqliteTest,
migrationRunner,
... | null | https://raw.githubusercontent.com/NorfairKing/sydtest/e55fad0f6b8058a9b44c6c0d66bdd3c3be556d71/sydtest-persistent-sqlite/src/Test/Syd/Persistent/Sqlite.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Testing with an in-memory sqlite database using persistent-sqlite
| Declare a test suite that uses a database connection.
Example usage
> -- Database Definition
> share
> Person
> age Int Maybe
> deriving Show Eq
> |]
>
> -- Tests
> spec ::... | # LANGUAGE CPP #
module Test.Syd.Persistent.Sqlite
( persistSqliteSpec,
withConnectionPool,
connectionPoolSetupFunc,
runSqlPool,
runSqliteTest,
migrationRunner,
sqliteMigrationSucceedsSpec,
)
where
import Control.Monad.Logger
import Control.Monad.Reader
import Database.Persist.Sql
import D... |
bfe2c75baf4a2a749774338b3e18081271cd7f0e7f2ca047575dd940b032df00 | haskell-repa/repa | Eval.hs |
module Data.Array.Repa.Chain.Eval
(evalM, evalMD)
where
import Data.Array.Repa.Chain.Base
import GHC.Exts
-- | Evaluate a chain,
-- calling the given function with the index and value of each element.
evalM :: Monad m
=> (Int# -> a -> m ())
-> Chain a
-> m ()
evalM write... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-stream/Data/Array/Repa/Chain/Eval.hs | haskell | | Evaluate a chain,
calling the given function with the index and value of each element.
| Evaluate a distributed chain,
calling the given function with the index and value of each element.
Evaluate a chain,
calling the given function with the index and value of each element.
NOTE: We don't export this ... |
module Data.Array.Repa.Chain.Eval
(evalM, evalMD)
where
import Data.Array.Repa.Chain.Base
import GHC.Exts
evalM :: Monad m
=> (Int# -> a -> m ())
-> Chain a
-> m ()
evalM write c
= evalM' 0# write c
# INLINE [ 1 ] evalM #
evalMD :: Monad m
=> (Int# -> a -> m ())... |
ef57ffcbd996199e092a93c43b5d7d898d8d5f96f355ccfcb5897cd39aa68605 | dbuenzli/hyperbib | service.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/bea0ee2c35fac11fdb856c914edd846fb4a8f709/src/service.mli | ocaml | * Web service.
* Authenticated user session state.
* The type for sessions. [Unsafe_edit] sessions.
* [private_view s] is [true] iff the private view is
being show to [s].
* [state] is session state storing an authenticated user.
* [handler] is a session handler for authenticated users.
* The type for sub s... | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
aa7610c16198c7959ec4dcdb35df733ac352a7adc7e6139bab8577a417c93ff8 | aaronallen8455/erriscope | SyntaxHighlighting.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
module Erriscope.Html.SyntaxHighlighting
( highlightSyntax
) where
import Control.Applicative
import Control.Monad
import Data.Char (isSpace, isUpper)
import Data.Foldable
import Data.Functor ((<&>))
import ... | null | https://raw.githubusercontent.com/aaronallen8455/erriscope/136395a72465c62046aad0dfd976d8d251b18fd0/erriscope-server/src/Erriscope/Html/SyntaxHighlighting.hs | haskell | make sure the next character is not an identifier character, otherwise
prefixes of non-reserved names will get highlighted | # LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
module Erriscope.Html.SyntaxHighlighting
( highlightSyntax
) where
import Control.Applicative
import Control.Monad
import Data.Char (isSpace, isUpper)
import Data.Foldable
import Data.Functor ((<&>))
import ... |
d9a2774328ddf1d863b7a8acfb71181f366da27c12325af257b4fccf0d8c9443 | lokedhs/cl-gdata | misc-package.lisp | (defpackage :cl-gdata-misc
(:use :cl :cl-gdata)
(:export #:print-unreadable-safely
#:check-range
#:authenticated-request
#:http-request-with-stream
#:load-and-parse
#:+ATOM-TAG-FEED+
#:+ATOM-TAG-EDIT+
#:+ATOM-XML-MIME-TYPE+
#:no... | null | https://raw.githubusercontent.com/lokedhs/cl-gdata/3ca1ed63e358ccb4bfbbaa5f09755cc8ef980db6/src/misc-package.lisp | lisp | (defpackage :cl-gdata-misc
(:use :cl :cl-gdata)
(:export #:print-unreadable-safely
#:check-range
#:authenticated-request
#:http-request-with-stream
#:load-and-parse
#:+ATOM-TAG-FEED+
#:+ATOM-TAG-EDIT+
#:+ATOM-XML-MIME-TYPE+
#:no... | |
85324221786a1b90757b30b43d85e99f64401d943df52388cac2bff47625b29f | RichiH/git-annex | Status.hs | git status interface
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Git.Status where
import Common
import Git
import Git.Command
import Git.FilePath
data Status
= Modif... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Git/Status.hs | haskell | In -z mode, the name the
file was renamed to comes
first, and the next component
is the old filename. | git status interface
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Git.Status where
import Common
import Git
import Git.Command
import Git.FilePath
data Status
= Modif... |
a626a1f1b7f771068734df8e88c8148f5fe0b5717dbafe3a9e6ed3178ad20ee9 | draperlaboratory/cbat_tools | cbat_back_edges.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/334523cb4415f187e33f190a691e34b73733ef24/vsa/value_set/lib/src/cbat_back_edges.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its
content does not necessarily reflect the position or policy of the US
open Bap.Std
val back_edge : unit tag
val label_back_edges : sub term -> sub term
|
896698d6c9bda2bea63f750c7722043cb54db72465a2cb6e1a34afc7492ad311 | ucsd-progsys/dsolve | obj.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/stdlib/obj.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : obj.ml , v 1.23.20.2 2008/01/... |
48a7351453302bd4b540d0837cdef0f017c370e9118711bbdef5341c075ba36a | ajayyadavay/AutocadAutoLisp | LayOutColumnXIrr.lsp | (defun C:LAYOutColumnXIrr( / osm C2C Origin Origin_X Origin_Y End End_X End_Y ColSizeX ColSizeY P_C0 P_C1 P_C00 P_C11 P_C0_i P_C1_i P_C0_c
ColIntr EqInterval temp_Origin offorigin Arrowsize TxtHt Dec Gap Extline1 Extline2 distDim P_Txt1 Txt1 Out_In
DmToh DmTih)
This autoLisp program is written by ( AY ... | null | https://raw.githubusercontent.com/ajayyadavay/AutocadAutoLisp/3e159ba7c72b460a7ffd8c498874ebdd23a91c27/LayOutColumnXIrr.lsp | lisp | Download from
Choose origin of wall
Enter length of wall below and above tie beam.
Centerline
interior column number
interior column number
column
dimension
center to center distance
dimension
center to center distance
center to center distance orign to end
text
(command "_.Text" "_Style" "standard" "_Justify" "MC" ... | (defun C:LAYOutColumnXIrr( / osm C2C Origin Origin_X Origin_Y End End_X End_Y ColSizeX ColSizeY P_C0 P_C1 P_C00 P_C11 P_C0_i P_C1_i P_C0_c
ColIntr EqInterval temp_Origin offorigin Arrowsize TxtHt Dec Gap Extline1 Extline2 distDim P_Txt1 Txt1 Out_In
DmToh DmTih)
This autoLisp program is written by ( AY ... |
52a86acdd30132ecc4b619aa1240f930ba408cea09d8dbe5fdbb282961bc5005 | jomch/chatroom | room.erl | %% Author: github.com/jomch
-module(room).
-behaviour(gen_server).
%% API.
-export([start_link/0]).
%% gen_server.
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([terminate/2]).
-record(state, {id}).
-spec start_link() -> {ok, pid()}.
star... | null | https://raw.githubusercontent.com/jomch/chatroom/d5d608410a92fd7938c011ebf6027b76b33aad18/src/room.erl | erlang | Author: github.com/jomch
API.
gen_server.
第3个参数传给 init([Id]) 方法
common:logger("room->send: "++Ws++"\r\n"),
|
-module(room).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([terminate/2]).
-record(state, {id}).
-spec start_link() -> {ok, pid()}.
start_link() ->
init([Id]) ->
{ok, #state{id = Id}}.
... |
377c983c3a75c5b40df925fdcaab19941c4b065597649832c4a64c25f9eec716 | seriyps/mtproto_proxy | mtp_dc_pool_sup.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2018 ,
%%% @doc
%%% Supervisor for mtp_dc_pool processes
%%% @end
Created : 14 Oct 2018 by < >
%%%-------------------------------------------------------------------
-module(mtp_dc_pool_sup).
-behaviour(supervisor).
-... | null | https://raw.githubusercontent.com/seriyps/mtproto_proxy/5ad7c536da57ff89dea488941c7ff4711372d858/src/mtp_dc_pool_sup.erl | erlang | -------------------------------------------------------------------
@doc
Supervisor for mtp_dc_pool processes
@end
------------------------------------------------------------------- | @author < >
( C ) 2018 ,
Created : 14 Oct 2018 by < >
-module(mtp_dc_pool_sup).
-behaviour(supervisor).
-export([start_link/0,
start_pool/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-spec start_pool(mtp_config:dc_i... |
305a130ff6d4668e8c6ac1ef709e09385ad8cf68af519113f95c2c85d62f868b | may-liu/qtalk | http_set_person_mackey.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_set_person_mackey).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _ } = cowboy_req:method(Req),
catch ejb_monito... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_set_person_mackey.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(http_set_person_mackey).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _ } = cowboy_req:method(Req),
catch ejb_monitor:monitor_count(<<"http_set_person_mackey">>,1),
case Metho... |
e0078b5096c9e4088dc508cf44fa4b5c765e42378a5d7b81d185f8a32ead5ec7 | Frama-C/Frama-C-snapshot | design.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/gui/design.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
c447ffe3e18230bfb1c1340a64bacf98befa5b33cd0957582114b0011b4ce583 | lem-project/lem | server.lisp | (in-package :lem-language-server)
(defvar *server*)
(defun current-server () *server*)
(defgeneric start-server (server))
(defgeneric run-backend (server))
(defgeneric swank-port (server))
(defgeneric micros-port (server))
(defgeneric exit-server (server status-code))
(defgeneric remote-eval-sync (server expression ... | null | https://raw.githubusercontent.com/lem-project/lem/1d809f95f1b34bf40f73a6b025f7839d9f5a186d/lib/language-server/server.lisp | lisp | (in-package :lem-language-server)
(defvar *server*)
(defun current-server () *server*)
(defgeneric start-server (server))
(defgeneric run-backend (server))
(defgeneric swank-port (server))
(defgeneric micros-port (server))
(defgeneric exit-server (server status-code))
(defgeneric remote-eval-sync (server expression ... | |
99870b0d63fad412065a676f49e878630086fc26e1f505cc526fe6c1c7646fba | purerl/purerl | CheckedWrapper.hs | module Language.PureScript.Erl.CodeGen.CheckedWrapper where
import Control.Monad.Supply.Class (MonadSupply)
import qualified Data.Text as T
import Language.PureScript (ModuleName)
import Language.PureScript.Erl.CodeGen.AST
import Language.PureScript.Erl.CodeGen.Common (ModuleType (PureScriptModule), atomModuleName, fr... | null | https://raw.githubusercontent.com/purerl/purerl/d4c933b36dfaed8f4ae4e07a8806cf8a822885f4/src/Language/PureScript/Erl/CodeGen/CheckedWrapper.hs | haskell | TODO[fh]: would be nice if we also fetched/stored the array index
TODO[fh]: is this correct? feels odd that both the list of args is empty and the body is a nullary fn, I expected one or the other but not both
try to reuse bound names if possible
default to mark function as unsafe | module Language.PureScript.Erl.CodeGen.CheckedWrapper where
import Control.Monad.Supply.Class (MonadSupply)
import qualified Data.Text as T
import Language.PureScript (ModuleName)
import Language.PureScript.Erl.CodeGen.AST
import Language.PureScript.Erl.CodeGen.Common (ModuleType (PureScriptModule), atomModuleName, fr... |
d2d21f69a1ce55681bf3c9c5def5287bebd9b60a74ff57e0fe8febd68286d45d | kelamg/HtDP2e-workthrough | ex78.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex78) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex78.rkt | racket | about the language level of this file in a form that our tools can easily process.
yet more data universe
or #false if no letter fills that position | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex78) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct 3word (first second third))
A 3Word is a structur... |
153af75fcee8a0a3d937830f1ed3771e405f0bf16fd8947326865c45ae4d2f50 | simingwang/emqx-plugin-kafkav5 | rebar3_hex_cut.erl | %% @doc `rebar3 hex cut' - Publish with git tag and version bump features
%%
%% Increments tags and publishes.
%%
%% Incrementing and tagging are both optional features of this provider.
%%
%% By default you'll be prompted what type of increment to make to the version or it can be supplied as an argument to
%% the co... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/plugins/rebar3_hex/src/rebar3_hex_cut.erl | erlang | @doc `rebar3 hex cut' - Publish with git tag and version bump features
Increments tags and publishes.
Incrementing and tagging are both optional features of this provider.
By default you'll be prompted what type of increment to make to the version or it can be supplied as an argument to
the command `-i', `--i... | 1 ) patch
2 ) minor
3 ) major
4 ) other
[ 1 - 4 ] > 1
Publishing myapp 0.1.4 to : myrepo
:
Before publishing , please read Hex CoC :
= = = > Published myapp 0.1.4
= = = > Published docs for myapp 0.1.4
Create new git tag v0.1.4 ? ( " Y " ) >
= = = > Creating new tag v0.1.4 ...
= = = > Pu... |
ef4dbaab2488861a0eb7ef0713a9a336e5759be435305bee38800bd43deaf3a4 | liamoc/holbert | Paragraph.hs | # LANGUAGE TypeFamilies , DeriveGeneric , DeriveAnyClass #
module Paragraph where
import Miso.String
import Controller
import GHC.Generics(Generic)
import Data.Aeson (ToJSON,FromJSON)
data Paragraph = Paragraph MisoString deriving (Show, Eq, Generic, ToJSON, FromJSON)
instance Control Paragraph where
data Focus Para... | null | https://raw.githubusercontent.com/liamoc/holbert/91f3f79d88ed52ac63617ffc5db04bf4ca7fb9c7/Paragraph.hs | haskell | # LANGUAGE TypeFamilies , DeriveGeneric , DeriveAnyClass #
module Paragraph where
import Miso.String
import Controller
import GHC.Generics(Generic)
import Data.Aeson (ToJSON,FromJSON)
data Paragraph = Paragraph MisoString deriving (Show, Eq, Generic, ToJSON, FromJSON)
instance Control Paragraph where
data Focus Para... | |
e5bd080387f607c5a2b1bb1e9f9b5162cc42570b4cc6dd4ca519751e78ab957c | MarchLiu/market | core_test.clj | (ns robot-seed.core-test
(:require [clojure.test :refer :all]
[robot-seed.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/MarchLiu/market/7a7daf6c04b41e0f8494be6740da8d54785c5e77/robot-seed/test/robot_seed/core_test.clj | clojure | (ns robot-seed.core-test
(:require [clojure.test :refer :all]
[robot-seed.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
af384174a09a444704848706f482a59a9b89645bad5c3a3594665d8849d3646c | trivial-garbage/trivial-garbage | tests.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - lisp ; Base : 10 -*-
The above modeline is required for . Do not change .
;;;
;;; tests.lisp --- trivial-garbage tests.
;;;
This software is placed in the public domain by
;;; <> and is provided with absolutely no
;;; warranty.
(defpackage #:trivial-garbage-tests
(... | null | https://raw.githubusercontent.com/trivial-garbage/trivial-garbage/b3af9c0c25d4d4c271545f1420e5ea5d1c892427/tests.lisp | lisp | Syntax : ANSI - Common - lisp ; Base : 10 -*-
tests.lisp --- trivial-garbage tests.
<> and is provided with absolutely no
warranty.
Weak Pointers
Weak Hashtables
Finalizers
These tests are, of course, not very reliable.
lbd should not be defined in a lexical scope where obj is
present to prevent closing ov... | The above modeline is required for . Do not change .
This software is placed in the public domain by
(defpackage #:trivial-garbage-tests
(:use #:cl #:trivial-garbage #:regression-test)
(:nicknames #:tg-tests)
(:export #:run))
(in-package #:trivial-garbage-tests)
(defun run ()
(let ((*package* (find-pa... |
7923e42e5b1b5c90b9be7014d049b9fd657912f3e8702c3d04c9f253db04a71a | herbertjones/my-stumpwm-config | clean.lisp | (in-package :hfj)
(clear-window-placement-rules)
;; Clear hooks I use on restart
(remove-all-hooks *new-window-hook*)
(remove-all-hooks *focus-group-hook*)
(remove-all-hooks *focus-window-hook*)
(remove-all-hooks *focus-frame-hook*)
(remove-all-hooks *split-frame-hook*)
(remove-all-hooks *remove-split-hook*)
| null | https://raw.githubusercontent.com/herbertjones/my-stumpwm-config/e2f259895835e9f39250ea3546b24ec13fbd093c/clean.lisp | lisp | Clear hooks I use on restart | (in-package :hfj)
(clear-window-placement-rules)
(remove-all-hooks *new-window-hook*)
(remove-all-hooks *focus-group-hook*)
(remove-all-hooks *focus-window-hook*)
(remove-all-hooks *focus-frame-hook*)
(remove-all-hooks *split-frame-hook*)
(remove-all-hooks *remove-split-hook*)
|
5499e69c2442e3ae155ddc0ff2da465562bbaa2d522ed3d4cf2df90ac5004dde | rjnw/sham | type.rkt | #lang racket
(require (prefix-in cry-ir- "ast.rkt")
"../ast.rkt"
"../utils.rkt"
"ctxt.rkt")
(require racket/trace)
(require sham/sam/pretty)
(provide calc-type
ctype
;; unify-type
specialize-poly-type
)
(provide (all-defined-out))
;; (define (prettyify val... | null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-examples/sham/cryptol/ir/type.rkt | racket | unify-type
(define (prettyify val)
(match val
[(? struct-cry-ast?) (pretty-cry val)]
(printf "~a> ~a: " (build-string depth (const #\ )) fname)
(match fname
['specialize-poly-type (printf "~a:~a ~a -> ~a\n"
[else (pretty-print (map prettyify vals))]))
(define (trace-print-results fname result... | #lang racket
(require (prefix-in cry-ir- "ast.rkt")
"../ast.rkt"
"../utils.rkt"
"ctxt.rkt")
(require racket/trace)
(require sham/sam/pretty)
(provide calc-type
ctype
specialize-poly-type
)
(provide (all-defined-out))
[ else ] ) )
( define ( trace - print ... |
bd48ee5b4a46136ddb73406d94909d90b741a2eb520e39b026cee79dad006c60 | haskell/ghcup-hs | JSONSpec.hs | # LANGUAGE TypeApplications #
module GHCup.Types.JSONSpec where
import GHCup.ArbitraryTypes ()
import GHCup.Types hiding ( defaultSettings )
import GHCup.Types.JSON ()
import GHCup.Prelude
import Test.Aeson.GenericSpecs
import Test.Hspec
spec :: Spec
spe... | null | https://raw.githubusercontent.com/haskell/ghcup-hs/823458910b41cf79739257dbc3d08084400bb594/test/GHCup/Types/JSONSpec.hs | haskell | # LANGUAGE TypeApplications #
module GHCup.Types.JSONSpec where
import GHCup.ArbitraryTypes ()
import GHCup.Types hiding ( defaultSettings )
import GHCup.Types.JSON ()
import GHCup.Prelude
import Test.Aeson.GenericSpecs
import Test.Hspec
spec :: Spec
spe... | |
52aa1afb0f1196dc72823c4b5a0c2d40ba586faf9635037e965dd1aa5e645bb6 | re-ops/re-cipes | lxd.clj | (ns re-cipes.infra.lxd
"Setting up lxd locally and adding it to the local lxc client"
(:require
re-cipes.hardening
[re-cog.resources.ufw :refer (add-interface enable-forwarding)]
[re-cog.facts.config :refer (configuration)]
[re-cog.resources.file :refer (template)]
[re-cog.common.recipe :refer (requi... | null | https://raw.githubusercontent.com/re-ops/re-cipes/183bdb637e54df1c6f20e8d529132e0c004e8ead/src/re_cipes/infra/lxd.clj | clojure | (ns re-cipes.infra.lxd
"Setting up lxd locally and adding it to the local lxc client"
(:require
re-cipes.hardening
[re-cog.resources.ufw :refer (add-interface enable-forwarding)]
[re-cog.facts.config :refer (configuration)]
[re-cog.resources.file :refer (template)]
[re-cog.common.recipe :refer (requi... | |
a562d3bd7fc75829a2db62e47041d09cfd5f4c4d318018e018cd4ab0c38f2313 | ghc/ghc | Env.hs |
module GHC.Driver.Env
( Hsc(..)
, HscEnv (..)
, hscUpdateFlags
, hscSetFlags
, hsc_home_unit
, hsc_home_unit_maybe
, hsc_units
, hsc_HPT
, hsc_HUE
, hsc_HUG
, hsc_all_home_unit_ids
, hscUpdateLoggerFlags
, hscUpdateHUG
, hscUpdateHPT_lazy
, hscUpdateHPT
, hscSetActiveHom... | null | https://raw.githubusercontent.com/ghc/ghc/5640cb1d84d3cce4ce0a9e90d29b2b20d2b38c2f/compiler/GHC/Driver/Env.hs | haskell | Note [hsc_type_env_var hack]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hsc_type_env_var is used to initialize tcg_type_env_var, and
eventually it is the mutable variable that is queried from
related to knot-tying (see Note [Tying the knot]).
But why do we need a way to feed a mutable variable in? Why
can't we just initiali... |
module GHC.Driver.Env
( Hsc(..)
, HscEnv (..)
, hscUpdateFlags
, hscSetFlags
, hsc_home_unit
, hsc_home_unit_maybe
, hsc_units
, hsc_HPT
, hsc_HUE
, hsc_HUG
, hsc_all_home_unit_ids
, hscUpdateLoggerFlags
, hscUpdateHUG
, hscUpdateHPT_lazy
, hscUpdateHPT
, hscSetActiveHom... |
7f5387c36c53dadbe820ac53f9c8f1f038b5ae2cb1c6bcccab803479e0e63099 | bobzhang/fan | a_compare.ml |
type t = { foo: int; bar: string } with compare
type t = { foo : int; bar : string }
let _ = fun (_ : t) -> ()
let compare : t -> t -> int =
fun a__001_ b__002_ ->
if Pervasives.( == ) a__001_ b__002_
then 0
else
(let ret =
(Pervasives.compare : int -> int -> int) a__001_.foo b__002_.f... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/migration/a_compare.ml | ocaml |
type t = { foo: int; bar: string } with compare
type t = { foo : int; bar : string }
let _ = fun (_ : t) -> ()
let compare : t -> t -> int =
fun a__001_ b__002_ ->
if Pervasives.( == ) a__001_ b__002_
then 0
else
(let ret =
(Pervasives.compare : int -> int -> int) a__001_.foo b__002_.f... | |
a820307f7668aea8cae993fa880aa713f54f26e71943494e0ba34aeb34a39c35 | for-GET/jesse | jesse_lib.erl | %%%=============================================================================
%% Copyright 2012- Klarna AB
Copyright 2015-
%%
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
%%
%%... | null | https://raw.githubusercontent.com/for-GET/jesse/9bd02a605370332a9070c75ed13dde3bf1460e9b/src/jesse_lib.erl | erlang | =============================================================================
Copyright 2012- Klarna AB
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 CON... | Copyright 2015-
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc Json schema validation module .
This module is the core of jesse , it implements the validation functionality
-module(jesse_lib).
-export([ empty_i... |
abd6c504e185aa9952dfeb07009e534c064abae6aae176db3da3a243a43f90ff | cardmagic/lucash | srfi-17.scm |
(define-syntax set!
(syntax-rules ()
((set! (?e0 ?e1 ...) ?v)
((setter ?e0) ?e1 ... ?v))
((set! ?i ?v)
(scheme-set! ?i ?v))))
(define (setter proc)
(let ((probe (assv proc setters)))
(if probe
(cdr probe)
(error "No setter found" proc))))
(define (set-setter! proc setter)
(let ((probe (... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/srfi/srfi-17.scm | scheme |
(define-syntax set!
(syntax-rules ()
((set! (?e0 ?e1 ...) ?v)
((setter ?e0) ?e1 ... ?v))
((set! ?i ?v)
(scheme-set! ?i ?v))))
(define (setter proc)
(let ((probe (assv proc setters)))
(if probe
(cdr probe)
(error "No setter found" proc))))
(define (set-setter! proc setter)
(let ((probe (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.