_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 |
|---|---|---|---|---|---|---|---|---|
fc49fc640d731cfef376b3dfe716824ce4eed551cce81f6f905c74f3d6e7030f | micmarsh/re-frame-youtube-fx | core.cljs | (ns basic-player.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[devtools.core :as devtools]
[basic-player.handlers]
[basic-player.subs]
[basic-player.views :as views]
[youtube-fx.core]))
(defn dev-setup []... | null | https://raw.githubusercontent.com/micmarsh/re-frame-youtube-fx/dfbf2790930da2810da2ea8e21a1e72abf82f0d7/examples/basic-player/src/cljs/basic_player/core.cljs | clojure | (ns basic-player.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[devtools.core :as devtools]
[basic-player.handlers]
[basic-player.subs]
[basic-player.views :as views]
[youtube-fx.core]))
(defn dev-setup []... | |
426724259a1580c321143ae31dfb6cb896ac6bf6ca69697c89ef0fec9c1be051 | RichiH/git-annex | FilePath.hs | git FilePath library
-
- Different git commands use different types of FilePaths to refer to
- files in the repository . Some commands use paths relative to the
- top of the repository even when run in a subdirectory . Adding some
- types helps keep that straight .
-
- Copyright 2012 - 2013 < ... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Git/FilePath.hs | haskell | Git uses the branch:file form to refer to a BranchFilePath
Path to a TopFilePath, within the provided git repo. | git FilePath library
-
- Different git commands use different types of FilePaths to refer to
- files in the repository . Some commands use paths relative to the
- top of the repository even when run in a subdirectory . Adding some
- types helps keep that straight .
-
- Copyright 2012 - 2013 < ... |
0d04d692a308e9653c9f3821baa95120032c701f73bc26be8f87e5489e6d9bb5 | askvortsov1/nittany_market | migrations.ml | open Caqti_request.Infix
module type DB = Caqti_lwt.CONNECTION
module R = Caqti_request
module T = Caqti_type
type migration = {
up : (module DB) -> unit Lwt.t;
down : (module DB) -> unit Lwt.t;
}
let mig_exec str =
let query = T.unit -->. T.unit @:- str in
fun (module Db : DB) ->
let%lwt unit_or_error =... | null | https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/lib/migrations.ml | ocaml | open Caqti_request.Infix
module type DB = Caqti_lwt.CONNECTION
module R = Caqti_request
module T = Caqti_type
type migration = {
up : (module DB) -> unit Lwt.t;
down : (module DB) -> unit Lwt.t;
}
let mig_exec str =
let query = T.unit -->. T.unit @:- str in
fun (module Db : DB) ->
let%lwt unit_or_error =... | |
e0fa654470f1cb2bf2eea2131a4cb0f4f204f4ea4b3ab657dd380f429de6ba2b | dterei/SafeHaskellExamples | MinList.hs | -- | Here we expose a MinList API that only allows elements
-- to be inserted into a list if they are at least greater
-- than an initial element the list is created with.
module MinList (
MinList, newMinList, insertMinList
) where
data MinList a = MinList a [a] deriving (Show)
newMinList :: Ord a => a ->... | null | https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/newtypederiving/MinList.hs | haskell | | Here we expose a MinList API that only allows elements
to be inserted into a list if they are at least greater
than an initial element the list is created with. | module MinList (
MinList, newMinList, insertMinList
) where
data MinList a = MinList a [a] deriving (Show)
newMinList :: Ord a => a -> MinList a
newMinList n = MinList n []
insertMinList :: Ord a => MinList a -> a -> MinList a
insertMinList s@(MinList m xs) n | n > m = MinList m (n:xs)
... |
f300ddf0ab4673e3527e74cd2cde8416c35dae1cc1b5b07014abd75c7f9901f8 | diagrams/diagrams-lib | Attributes.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/ThreeD/Attributes.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE TemplateHaskell #
---------------------------------------------------------------------------
|
Module : Diagrams.ThreeD.Attributes
License : BSD-style (see LICENSE)
Maintainer :
Diagrams may have /attributes/ which affect the way they ar... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2014 diagrams - lib team ( see LICENSE )
associative binary operation for combining two attributes into one .
' Last ' structure... |
16a95ce7b6d27f6ee682b6cd888c8102d163c0317ac806b120aa6180a6879555 | archimag/mongo-cl-driver | utils.lisp | ;;;; utils.lisp
;;;;
;;;; This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package #:mongo-cl-driver)
(defun try-unpromisify (promise)
(cond
#|------------------------------------------------------------------------|#
(... | null | https://raw.githubusercontent.com/archimag/mongo-cl-driver/300c10bd3d0b3ca3a82c8b32087bddbc7b6a86c3/driver/utils.lisp | lisp | utils.lisp
This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
See file COPYING for details.
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------... | Author : < >
(in-package #:mongo-cl-driver)
(defun try-unpromisify (promise)
(cond
((not (promisep promise))
promise)
((promise-finished-p promise)
(values-list (blackbird-base::promise-values promise)))
((blackbird-base::promise-forward-to promise)
(try-unpromisify (blackbird-base::... |
f1a10122335fbe6591cf844faceb16fa7b9089d1beaf95d8dbc2ab7aabe9179e | inria-parkas/sundialsml | cvRoberts_block_klu.ml | ----------------------------------------------------------------- { { {
* Programmer(s ): @ LLNL
* -----------------------------------------------------------------
* OCaml port : , , Oct 2021 .
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Co... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/cvode/serial/cvRoberts_block_klu.ml | ocaml | User-defined vector and matrix accessor macro: Ith
Problem Constants
number of equations per group
initial y components
scalar relative tolerance
vector absolute tolerance components
initial time
first output time
output time factor
number of output times
user data str... | ----------------------------------------------------------------- { { {
* Programmer(s ): @ LLNL
* -----------------------------------------------------------------
* OCaml port : , , Oct 2021 .
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Co... |
1ef5622d8f697d2254acd635068d74e7eca77a4f31b8f2278a57bb291996ec54 | onedata/op-worker | auto_storage_import_config.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This is a helper module for storag... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/src/modules/storage/import/utils/auto_storage_import_config.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This is a helper module for storage_import_config module.
the configuration of auto storage import scans.
@end
----------------------------------------------------------... | @author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
It encapsulates # auto_storage_import_config { } record which stores
-module(auto_storage_import_config).
-author("Jakub Kudzia").
-include("modules/storage/import/storage_import.hrl").
-export(... |
cb22e934fec946974108dcb691a222a775da324c0d9f747269c5702498f7da17 | sarabander/p2pu-sicp | Ex1.45.scm | ;; Definitions from the book
(define tolerance 0.00001)
(define (average x y)
(/ (+ x y) 2))
(define (average-damp f)
(lambda (x) (average x (f x))))
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess)
(let ((next (f guess)))
(if... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.3/Ex1.45.scm | scheme | Definitions from the book
------------------------------
Looks like we need at least d average dampings to take
then log(n + 1) |
(define tolerance 0.00001)
(define (average x y)
(/ (+ x y) 2))
(define (average-damp f)
(lambda (x) (average x (f x))))
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess)
(let ((next (f guess)))
(if (close-enough? guess next)
... |
dd903805f812020309b366e67a0ec8581c4dc14e622376a35d702ea530316409 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] fur
[ @ISO639 - 3@ ] fur
[ @Native name@ ]
[ @English name@ ]
[@ISO639-1@] -
[@ISO639-2@] fur
[@ISO639-3@] fur
[@Native name@] Furlan
[@English name@] Friulan
-}
module Text.Numeral.Language.FUR.Tes... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/FUR/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] fur
[ @ISO639 - 3@ ] fur
[ @Native name@ ]
[ @English name@ ]
[@ISO639-1@] -
[@ISO639-2@] fur
[@ISO639-3@] fur
[@Native name@] Furlan
[@English name@] Friulan
-}
module Text.Numeral.Language.FUR.Tes... |
72fde9b590db1a0b61daef13357cbd27039c5f3a36f242959370bc4da00e4e5d | deadtrickster/safe-queue | package.lisp | (in-package :cl-user)
(defpackage :safe-queue
(:use :cl)
(:export #:queue
#:make-queue
#:enqueue
#:dequeue
#:queue-count
#:queue-empty-p
#:mailbox
#:make-mailbox
#:mailbox-empty-p
#:mailbox-send-message
#:... | null | https://raw.githubusercontent.com/deadtrickster/safe-queue/e4acc92df034a748c72543e3a9e09e5b3aa614d4/src/package.lisp | lisp | (in-package :cl-user)
(defpackage :safe-queue
(:use :cl)
(:export #:queue
#:make-queue
#:enqueue
#:dequeue
#:queue-count
#:queue-empty-p
#:mailbox
#:make-mailbox
#:mailbox-empty-p
#:mailbox-send-message
#:... | |
a5412c728b64e5aeb480e14d1fdbbbb0aa2a32bd169a0688ec6dabf3d353c2e7 | manuel-serrano/bigloo | defuse.scm | ;*=====================================================================*/
* ... /prgm / project / bigloo / / comptime / Narrow / defuse.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : S... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/fdeac39af72d5119d01818815b0f395f2907d6da/comptime/Narrow/defuse.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Partial Def/Use node property. No fix point iteration. */
*===========================... | * ... /prgm / project / bigloo / / comptime / Narrow / defuse.scm * /
* Author : * /
* Creation : Sun Nov 10 07:53:36 2013 * /
* Last change : Thu Jul 8 10:45:48 2021 ( serrano ) * /
* Copyrigh... |
e389a8e7b82b23dbe3a80fcc4a35819cb99d03399bf84a3d1f121e03518da482 | marijnh/Postmodern | test-transactions.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN - TESTS ; -*-
(in-package :postmodern-tests)
(def-suite :postmodern-transactions
:description "Transaction testing suite for postmodern"
:in :postmodern)
(in-suite :postmodern-transactions)
(defun transaction-test-table-fixture ... | null | https://raw.githubusercontent.com/marijnh/Postmodern/d54e494000e1915a7046e8d825cb635555957e85/postmodern/tests/test-transactions.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN - TESTS ; -*-
Reset table - Now try errors
Now try abort | (in-package :postmodern-tests)
(def-suite :postmodern-transactions
:description "Transaction testing suite for postmodern"
:in :postmodern)
(in-suite :postmodern-transactions)
(defun transaction-test-table-fixture ()
(when (table-exists-p 'test-data) (execute (:drop-table 'test-data)))
(execute (:create-tabl... |
5f5599a53179108ceaa0c43963c43bcac01a958c12493623a3864210ad35bf6c | solita/solita-rooms | rooms.cljs | (ns rooms.ui.rooms
(:require [rooms.config :as config]
[rooms.ui.colors :as colors]
[rooms.styles.content :as content]
[reagent.ratom :refer [atom]]
[rooms.styles.rooms :as rooms]
[rooms.dom :as dom]
[rooms.language :as language]
[sty... | null | https://raw.githubusercontent.com/solita/solita-rooms/39eec90790a3fba36dbbccb3b3e86394a987a840/frontend/src/cljs/rooms/ui/rooms.cljs | clojure | Make sure text is not drawn outside the bar (quick and dirty solution)
Location
Room name
Features
Hours (background cells)
Never draw bars on top of heading columns
Add a bit of space between bars by not using the full width / height
Heading border
Vertical borders
Full hours
Minutes
Clicking the info box ... | (ns rooms.ui.rooms
(:require [rooms.config :as config]
[rooms.ui.colors :as colors]
[rooms.styles.content :as content]
[reagent.ratom :refer [atom]]
[rooms.styles.rooms :as rooms]
[rooms.dom :as dom]
[rooms.language :as language]
[sty... |
e80196550f2f187c02c5e8278138effdcdf7c75456fcac5bfbd29f16a52e5c27 | disteph/cdsat | dump.ml | (********************************************************)
(* This module is where the different Psyche components *)
(* can dump information during runs, which can then be *)
(* printed. *)
(********************************************************)
(*******************)
(*... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/dump.ml | ocaml | ******************************************************
This module is where the different Psyche components
can dump information during runs, which can then be
printed.
******************************************************
*****************
Display options
*********... |
type display = Latex | Utf8
let display = ref Utf8
let every
0;
0;
0;
0;
0;
0;
0;
0;
0
|]
module Timer = (struct
type t = string*(float ref)*(float option ref)
let newtimer s =
let timed = ref 0. in
let ongoing = ref None in
... |
6198b20e7205b66a5f4694e80c7ee25ba3beac53e5bfbad55316f4fd044d9cb2 | michiakig/sicp | ex-4.38-multiple-dwelling.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 4 Section 3 Variations on a Scheme - Nondeterministic
Computing
Exercise 4.38
(define (multiple-dwelling)
(let ((baker (amb 1 2 3 4 5))
(cooper (amb 1 2 3 4 5))
(fletcher (amb 1 2 3 4 5))
(miller (amb 1 2 3 4 5))
(s... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch4/ex-4.38-multiple-dwelling.scm | scheme | Structure and Interpretation of Computer Programs | Chapter 4 Section 3 Variations on a Scheme - Nondeterministic
Computing
Exercise 4.38
(define (multiple-dwelling)
(let ((baker (amb 1 2 3 4 5))
(cooper (amb 1 2 3 4 5))
(fletcher (amb 1 2 3 4 5))
(miller (amb 1 2 3 4 5))
(smith (amb 1 2 3 4 5)))
(require
(distinct? (li... |
dda01cf05dea30d2d2a624506e4bdc9b0dfbb4043f15b475d8e2713d031272c5 | grin-compiler/ghc-wpc-sample-programs | JATS.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Tests . Readers . : © 2017
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Tests for the JATS reader .
Module : Tests.Readers.... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Readers/JATS.hs | haskell | # LANGUAGE OverloadedStrings #
[ test jats "unnumbered header" $
"<sec>\n\
\ <title>Header 1<fn>\n\
\ <p>\n\
\ note\n\
\ </p>\n\
\ </fn></title>\n\ | # LANGUAGE NoImplicitPrelude #
|
Module : Tests . Readers . : © 2017
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Tests for the JATS reader .
Module : Tests.Readers.JATS
Copyright : © 2017 Hamish... |
42ac5b34bda39443978816817812fb757a9317cc3f8f3154a2e233cd1e05d2fa | rixed/datasino | datasino_cli.ml |
# 1686 "README.adoc"
# 219 "README.adoc"
open Batteries
open Cmdliner
module DE = DessserExpressions
module DH = DessserOCamlBackEndHelpers
module DL = DessserStdLib
module DM = DessserMasks
module DT = DessserTypes
module DU = DessserCompilationUnit
# 1686 "README.adoc"
open Datasino_config
open Datasino_tools
op... | null | https://raw.githubusercontent.com/rixed/datasino/0b37902f7d2f56986c9c70e32506ff26efb1b410/src/datasino_cli.ml | ocaml | [string_or_file_content s] returns either [s] or, if [s] starts with
'@', the content of that file name, à la curl:
TODO: other special chars |
# 1686 "README.adoc"
# 219 "README.adoc"
open Batteries
open Cmdliner
module DE = DessserExpressions
module DH = DessserOCamlBackEndHelpers
module DL = DessserStdLib
module DM = DessserMasks
module DT = DessserTypes
module DU = DessserCompilationUnit
# 1686 "README.adoc"
open Datasino_config
open Datasino_tools
op... |
acb58b44be472ccddc8c1ebf5955540f598fcb2ea9a5f93f7ebdccae81daa5c2 | int-index/slay | Core.hs | |
The purpose of a layouting engine is to take a description of a layout
expressed using primitives ( rectangles , circles , lines of text , etc ) and
combinators ( horizontal / vertical composition , layering , centering , etc ) and
compute absolute coordinates for primitives on a 2 - dimensional plane .
... | null | https://raw.githubusercontent.com/int-index/slay/1c9d39b8cb4f32f0b4778677c21ebb85cc1cddf7/core/src/Slay/Core.hs | haskell | * Offset
* Positioned
* Extents
* Margin
* Baseline
* Collage
| The position of an item (relative or absolute).
| Lift a binary numeric operation to offsets,
applying it to both dimensions.
| Offset pointwise addition.
| Offset pointwise subtraction.
| Offset pointwise minimum.
| Offset pointwise max... | |
The purpose of a layouting engine is to take a description of a layout
expressed using primitives ( rectangles , circles , lines of text , etc ) and
combinators ( horizontal / vertical composition , layering , centering , etc ) and
compute absolute coordinates for primitives on a 2 - dimensional plane .
... |
5eaed279c1880ebc0a2b2f5de6782adbbaf8dbc785176ffad76dd6dd9b10196d | WorksHub/client | text.cljc | (ns wh.common.text
(:require #?(:cljs [goog.string :as gstring])
#?(:cljs [goog.string.format])
[clojure.string :as str])
#?(:clj (:refer-clojure :exclude [format])))
(defn pluralize
([n singular] (pluralize n singular (str singular "s")))
([n singular plural] (if (= n 1) singular plura... | null | https://raw.githubusercontent.com/WorksHub/client/c7efca731d0ee3b92a1f58975c87bf56b0acd638/common/src/wh/common/text.cljc | clojure | "))) | (ns wh.common.text
(:require #?(:cljs [goog.string :as gstring])
#?(:cljs [goog.string.format])
[clojure.string :as str])
#?(:clj (:refer-clojure :exclude [format])))
(defn pluralize
([n singular] (pluralize n singular (str singular "s")))
([n singular plural] (if (= n 1) singular plura... |
eaa044bdcf81b93014d8e5abba91e6ec19486e43f284d392fac7ba5d0fbc7248 | ianmbloom/gudni | Types.hs | {-# LANGUAGE TemplateHaskell #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE UndecidableInstances #-}
# LANGUAGE TypeFamilies #
---------------------------... | null | https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/Raster/Types.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Stability : experimental
Portability : portable
Basic constructors and types for the ras... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
Module : Graphics . Gudni . . Types
Copyright : ( c ) 2019
Maintainer :
module Graphic... |
1da49048214cdc543ecb7b514b1dd39aebdddcfb83bb94b54d66d6a774e7b5a8 | astrada/ocaml-extjs | ext_util_KeyMap.mli | * Handles mapping key events to handling functions f ...
{ % < p > Handles mapping key events to handling functions for an element or a Component . One KeyMap can be used for multiple
actions.</p >
< p > A KeyMap must be configured with a < a href="#!/api / Ext.util . " rel="Ext.util . " class="do... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_util_KeyMap.mli | ocaml | * {% <p>Enables this KeyMap</p> %}
* {% <p>Remove a binding from this KeyMap.</p> %}
{b Parameters}:
{ul {- binding: [_ Js.t]
{% <p>See <a href="#!/api/Ext.util.KeyMap-method-addBinding" rel="Ext.util.KeyMap-method-addBinding" class="docClass">for options</a></p> %}
}
}
* {% <p>Either... | * Handles mapping key events to handling functions f ...
{ % < p > Handles mapping key events to handling functions for an element or a Component . One KeyMap can be used for multiple
actions.</p >
< p > A KeyMap must be configured with a < a href="#!/api / Ext.util . " rel="Ext.util . " class="do... |
9449b8e63786a1f703e9071e650416e1f84f936b649f4ed8c716ed6dd7b86f5d | openmusic-project/openmusic | old-compat.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : yo... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/kernel/ommodele/persistant/old-compat.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Publi... |
cdf3d5f8f408c7eb8e56c2b83240bf1bbb83ffd68effce1992e3542c45ed2283 | binsec/haunted | sse_symbolic.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/sse/sse_symbolic.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
9c3e9f8043e3d550f14adf8c96a7224fe239624bce234fd0da56cea6ca5b7ead | esumii/min-caml | simm.mli | val f : Asm.prog -> Asm.prog
| null | https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/simm.mli | ocaml | val f : Asm.prog -> Asm.prog
| |
b54976c7b8bf9d2be899324dfe375526003f4161de1880db462a16ba27e5acb1 | mbutterick/typesetting | text.rkt | #lang debug racket/base
(require "pipeline.rkt"
"quad.rkt"
"attr.rkt"
"glyphrun.rkt"
fontland)
(provide (all-defined-out))
(define-pass (measure-text-runs qs)
#:pre (list-of quad?)
#:post (list-of quad?)
(for ([q (in-list qs)]
#:when (eq? (quad-tag q) 'text-run))
(... | null | https://raw.githubusercontent.com/mbutterick/typesetting/ab900dc3b7ec4aa533ef0b9fbbe4d0de8d90477b/quad2/text.rkt | racket | #lang debug racket/base
(require "pipeline.rkt"
"quad.rkt"
"attr.rkt"
"glyphrun.rkt"
fontland)
(provide (all-defined-out))
(define-pass (measure-text-runs qs)
#:pre (list-of quad?)
#:post (list-of quad?)
(for ([q (in-list qs)]
#:when (eq? (quad-tag q) 'text-run))
(... | |
3e20c2a006ec1faf91ce5bb2f64a494f94b9bbd15d8ad4310cd9cf3e1a1bd264 | sheyll/b9-vm-image-builder | Docker.hs | -- | Implementation of an execution environment that uses /docker/.
module B9.Docker
( Docker (..),
)
where
import B9.B9Config
( dockerConfigs,
getB9Config,
)
import B9.B9Config.Docker as X
import B9.Container
import B9.DiskImages
import B9.ShellScript
import Control.Lens (view)
newtype Docker = Docker Do... | null | https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/Docker.hs | haskell | | Implementation of an execution environment that uses /docker/.
runInEnvironment ::
forall e.
(Member BuildInfoReader e, CommandIO e) =>
config ->
Script ->
Eff e Bool
where
setUp = do
buildId <- getBuildId
let scriptDirHost = buildDir </> "init-script"
scriptDir... | module B9.Docker
( Docker (..),
)
where
import B9.B9Config
( dockerConfigs,
getB9Config,
)
import B9.B9Config.Docker as X
import B9.Container
import B9.DiskImages
import B9.ShellScript
import Control.Lens (view)
newtype Docker = Docker DockerConfig
instance Backend Docker where
getBackendConfig _ =
... |
8a5398460f26c2c7efd8e54362fc6e6aca90d38988eae1fb82e647501bf45d4f | ctford/Idris-Elba-Dev | System.hs | # LANGUAGE CPP #
module IRTS.System(getTargetDir,getCC,getLibFlags,getIdrisLibDir,
getIncFlags,getMvn,getExecutablePom) where
import Util.System
import Control.Applicative ((<$>))
import Data.Maybe (fromMaybe)
import System.FilePath ((</>), addTrailingPathSeparator)
import System.Environment
impor... | null | https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/IRTS/System.hs | haskell | # LANGUAGE CPP #
module IRTS.System(getTargetDir,getCC,getLibFlags,getIdrisLibDir,
getIncFlags,getMvn,getExecutablePom) where
import Util.System
import Control.Applicative ((<$>))
import Data.Maybe (fromMaybe)
import System.FilePath ((</>), addTrailingPathSeparator)
import System.Environment
impor... | |
c5b12bdd6788f05e652148cca44614e914d9ef4565520af9899771cc22254cfe | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.EN.NZ.Corpus
( allExamples
) where
import Data.... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Time/EN/NZ/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Time.EN.NZ.Corpus
( allExamples
) where
import Data.String
import Prelude
import Duckling.Testing.Types hiding (examples)
import Duckling.Time.Corpus
import Duckling.Time.Types hiding (Month)
import Duckling.TimeGrain.Types hiding (add)
allExam... |
2f079338dac20c79ffbb9508c844610af646ac157a7487c66004877aa8a37579 | syntheorem/thexa | Grapheme.hs | module Thexa.Internal.Unicode.Grapheme where
import Data.Map ((!))
import Thexa.Regex (Regex, re)
import Thexa.Internal.Unicode.Properties (PropertyMap)
import Thexa.Internal.Unicode.Parser (readUnicodeDataFile)
| A regular expression that matches a single extended grapheme cluster as defined by the Unicode
-- sta... | null | https://raw.githubusercontent.com/syntheorem/thexa/e599efd97c0cb49dc3acb9a5da911e20608a210b/src/Thexa/Internal/Unicode/Grapheme.hs | haskell | standard.
The purpose of this is that it can be used to find grapheme cluster boundaries by starting from
next boundary.
Based on the regex defined by this table:
-37.html#Table_Combining_Char_Sequences_and_Grapheme_Clusters
Regexes from -37.html#Regex_Definitions
CharSets from
-37.html#Grapheme_Cluster_Break... | module Thexa.Internal.Unicode.Grapheme where
import Data.Map ((!))
import Thexa.Regex (Regex, re)
import Thexa.Internal.Unicode.Properties (PropertyMap)
import Thexa.Internal.Unicode.Parser (readUnicodeDataFile)
| A regular expression that matches a single extended grapheme cluster as defined by the Unicode
one ... |
e826344b6b9c2a4f4ddc764dd4be7bda6143b461b64df0e78438f845be81753e | janestreet/core | test_ephemeron.ml | open! Core
open! Expect_test_helpers_core
open! Ephemeron
type heap_block = int ref Heap_block.t [@@deriving sexp_of]
let heap_block i = ref i |> Heap_block.create_exn
let print t =
print_s [%message
""
~key:(get_key t : heap_block option)
~data:(get_data t : heap_block option)]
;;
let%expect_test... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_ephemeron.ml | ocaml | No more references to [data], but it still is kept alive by [t] while [key] is
alive.
No more references to [key], so both fields in [t] are nulled. | open! Core
open! Expect_test_helpers_core
open! Ephemeron
type heap_block = int ref Heap_block.t [@@deriving sexp_of]
let heap_block i = ref i |> Heap_block.create_exn
let print t =
print_s [%message
""
~key:(get_key t : heap_block option)
~data:(get_data t : heap_block option)]
;;
let%expect_test... |
52582193039143534d8dff73eb0e5b2f14fd4bafba6edca9d4820f3117852ed5 | yallop/ocaml-reex | test_lexer.ml |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Reex
open OUnit2
let t... | null | https://raw.githubusercontent.com/yallop/ocaml-reex/8941fb7033762f6b87fa2f33afa87440001eccbe/tests/test_lexer.ml | ocaml |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Reex
open OUnit2
let t... | |
47d8dd899c3e6de2ff7561710ca932659e649ed068ec685c292d56204a37e8f0 | dmbaturin/bnfgen | bnfgen.ml | module Grammar = Grammar
let parse lexbuf =
try
let grammar = Parse_bnf.parse lexbuf (Bnf_parser.Incremental.grammar lexbuf.lex_curr_p) in
let () = Grammar.check_grammar grammar in
Ok grammar
with
| Util.Syntax_error (pos, err) ->
begin
match pos with
| Some (line, pos) ->
Err... | null | https://raw.githubusercontent.com/dmbaturin/bnfgen/a1e35a5bbe90ef77a440d5905304a109ff36fcd7/src/lib/bnfgen.ml | ocaml | Emit a symbol separator, unless it's set to an empty string. | module Grammar = Grammar
let parse lexbuf =
try
let grammar = Parse_bnf.parse lexbuf (Bnf_parser.Incremental.grammar lexbuf.lex_curr_p) in
let () = Grammar.check_grammar grammar in
Ok grammar
with
| Util.Syntax_error (pos, err) ->
begin
match pos with
| Some (line, pos) ->
Err... |
31841e98f70481ff33a454be1e55073a711c3995171c41efde141f5d7205ce2e | steffan-westcott/clj-otel | counter_service.clj | (ns tutorial.counter-service
"Uninstrumented version of tutorial counter-service application."
(:require [ring.adapter.jetty :as jetty]
[ring.middleware.params :as params]
[ring.util.response :as response]))
(defonce ^{:doc "Counter state"} counter (atom 0))
(defn wrap-exception
"Ring ... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/b227831fbf71062f68527321837d5e3cf75990b1/tutorial/uninstrumented/src/tutorial/counter_service.clj | clojure | (ns tutorial.counter-service
"Uninstrumented version of tutorial counter-service application."
(:require [ring.adapter.jetty :as jetty]
[ring.middleware.params :as params]
[ring.util.response :as response]))
(defonce ^{:doc "Counter state"} counter (atom 0))
(defn wrap-exception
"Ring ... | |
646eea2011073f5e913dd7247eccf2b8bde7cbecbeb27759821f2702c6a75677 | juspay/atlas | Rating.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Storage/Tabular/Rating.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | |
19dc13b6c21764d9c0f840b3eec7ca869145f168276e458a2ca63e34c124ef61 | nikita-volkov/rebase | Unsafe.hs | module Rebase.Foreign.ForeignPtr.Unsafe
(
module Foreign.ForeignPtr.Unsafe
)
where
import Foreign.ForeignPtr.Unsafe
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Foreign/ForeignPtr/Unsafe.hs | haskell | module Rebase.Foreign.ForeignPtr.Unsafe
(
module Foreign.ForeignPtr.Unsafe
)
where
import Foreign.ForeignPtr.Unsafe
| |
614baac5391a520171d4128ad6d0abfb9a010cbf39c61b1f5aa720596cfda4f9 | braveclojure/babooka | add.clj | (ns journal.add
(:require
[journal.utils :as utils]))
(defn add-entry
[opts]
(let [entries (utils/read-entries)]
(spit utils/ENTRIES-LOCATION
(conj entries
(merge {:timestamp (System/currentTimeMillis)} ;; default timestamp
opts)))))
(ns journal.add
(:... | null | https://raw.githubusercontent.com/braveclojure/babooka/d35c67db0cb804a36608137fe3836922ff055a68/project/src/journal/add.clj | clojure | default timestamp | (ns journal.add
(:require
[journal.utils :as utils]))
(defn add-entry
[opts]
(let [entries (utils/read-entries)]
(spit utils/ENTRIES-LOCATION
(conj entries
opts)))))
(ns journal.add
(:require
[journal.utils :as utils]))
(defn -main
[entry-text]
(let [entries (... |
33466693b86f32ee5ecc677b92a65e853e45a1f4457ff3dc233ea03b1d16d5ad | lesguillemets/sicp-haskell | 1.40.hs | module OneForty where
import NewtonsMethod (newtonsMethod)
cubic :: Double -> Double -> Double -> Double -> Double
cubic a b c x = x^3 + a*x^2 + b*x + c
-- | finds a root.
prop > let f = cubic ( a::Double ) ( b::Double ) ( c::Double ) in ( abs $ f ( f 1.0 ) ) < 0.00001
| null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect3/1.40.hs | haskell | | finds a root. | module OneForty where
import NewtonsMethod (newtonsMethod)
cubic :: Double -> Double -> Double -> Double -> Double
cubic a b c x = x^3 + a*x^2 + b*x + c
prop > let f = cubic ( a::Double ) ( b::Double ) ( c::Double ) in ( abs $ f ( f 1.0 ) ) < 0.00001
|
5a4922229c5f63e19dd8b53a4cc36eb9084e181049b06aedb31334c090a01854 | kapok-lang/kapok | kapok_error.erl | A bunch of helpers to help to deal with errors in Kapok source code .
%% This is not exposed in the Kapok language.
-module(kapok_error).
-export([form_error/4,
compile_error/3,
compile_error/4,
parse_error/4,
warn/2,
warn/3,
handle_file_warning/2,
handle... | null | https://raw.githubusercontent.com/kapok-lang/kapok/4272f990fe495e595d2afe38605dbca560bbe072/lib/kapok/src/kapok_error.erl | erlang | This is not exposed in the Kapok language.
General form error.
Compilation error.
Tokenization/parsing error.
Default behaviour
Default behaviour
Helpers
reset stacktrace | A bunch of helpers to help to deal with errors in Kapok source code .
-module(kapok_error).
-export([form_error/4,
compile_error/3,
compile_error/4,
parse_error/4,
warn/2,
warn/3,
handle_file_warning/2,
handle_file_error/2
]).
-include("kapok.hrl"... |
aad899a96e1eb70b6010c006608f7f9df23bab03f5b93f0bf36ccc3a6637ac06 | gusbicalho/haskell-todo | Item.hs | # LANGUAGE TemplateHaskell #
|
Description : Item - related types for serialization over the network
Types here should be used only in the external APIs exposed or consumed by this
service . In this case , they are used only in JSON serialization for the HTTP
API , but we could use the same types if we decide... | null | https://raw.githubusercontent.com/gusbicalho/haskell-todo/f28b0d05ddb72764cf01d29fa978457ac455ac81/src/HaskellTodo/WireTypes/Item.hs | haskell | # LANGUAGE TemplateHaskell #
|
Description : Item - related types for serialization over the network
Types here should be used only in the external APIs exposed or consumed by this
service . In this case , they are used only in JSON serialization for the HTTP
API , but we could use the same types if we decide... | |
b909bd661681d0f1edac0c3cc0c17a1105f7683a5210d3dc5a5e387026e00285 | opennars/Narjure | premises_swapping.clj | (ns nal.test.deriver.premises-swapping
(:require [clojure.test :refer :all]
[nal.deriver.premises-swapping :refer :all]))
(def question-rule
'{:p1 (--> P S)
:p2 (--> S P)
:conclusions [{:conclusion (--> P S)
:post (:t/conversion :p/belief)}]
:full-... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/test/nal/test/deriver/premises_swapping.clj | clojure | (ns nal.test.deriver.premises-swapping
(:require [clojure.test :refer :all]
[nal.deriver.premises-swapping :refer :all]))
(def question-rule
'{:p1 (--> P S)
:p2 (--> S P)
:conclusions [{:conclusion (--> P S)
:post (:t/conversion :p/belief)}]
:full-... | |
e48f20f44c29f989c81babc8ab1fccbb1e462a56a00d73057ea24583560c8f08 | yetanalytics/datasim | parameters.clj | (ns com.yetanalytics.datasim.input.parameters
"Simulation global parameters"
(:require [clojure.spec.alpha :as s]
[com.yetanalytics.datasim.protocols :as p]
[xapi-schema.spec :as xs]
[com.yetanalytics.pan.objects.profile :as prof]
[com.yetanalytics.pan.objects.pattern... | null | https://raw.githubusercontent.com/yetanalytics/datasim/f26b18a86d96d43ebf4b45b2b25aab6cf3332226/src/main/com/yetanalytics/datasim/input/parameters.clj | clojure | all options are optional, but everything except `end` will get defaults
(optional) start of the returned statements (if after ::start).
This lets us page through sims to later times. Defaults to ::start
(optional) timezone, defaults to UTC
Seed is required, but will be generated if not present
Restrict Generation... | (ns com.yetanalytics.datasim.input.parameters
"Simulation global parameters"
(:require [clojure.spec.alpha :as s]
[com.yetanalytics.datasim.protocols :as p]
[xapi-schema.spec :as xs]
[com.yetanalytics.pan.objects.profile :as prof]
[com.yetanalytics.pan.objects.pattern... |
92e65f5d056d874396bb3f72bcb228e56e2e4e3df2dc030039911669ddcaddc5 | phadej/vec | SpineStrict.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
{-# OPTIONS_GHC -O -fplugin Test.Inspection.Plugin #-}
# OPTIONS_GHC -dsuppress - all #
module Inspection.DataFamily.SpineStrict where
import Prelude hiding (zipWith)
import Data.Fin (Fin (..))
import Data.Vec.DataFamily.SpineStrict ... | null | https://raw.githubusercontent.com/phadej/vec/a895ab79e054987938295d5a149758eb79d85683/vec/test/Inspection/DataFamily/SpineStrict.hs | haskell | # LANGUAGE GADTs #
# OPTIONS_GHC -O -fplugin Test.Inspection.Plugin #
-----------------------------------------------------------------------------
zipWith
-----------------------------------------------------------------------------
| This doesn't evaluate compile time.
------------------------------------... | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -dsuppress - all #
module Inspection.DataFamily.SpineStrict where
import Prelude hiding (zipWith)
import Data.Fin (Fin (..))
import Data.Vec.DataFamily.SpineStrict (Vec (..))
import Test.Inspection
import qualified Data.Fin as F... |
0038f4494b6fae2ca44fe7706a5c1b1b9f204c8096a8d2fb216cdddcb325a9c2 | jackfirth/lens | set-all.rkt | #lang reprovide
lens/private/view-set/set-all
| null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-unstable/unstable/lens/set-all.rkt | racket | #lang reprovide
lens/private/view-set/set-all
| |
86871032fda29b48d72fdb2f1bf5f1e136c2eb18f705e0d0e3fbdd83afc61235 | disteph/cdsat | specs.ml | (******************)
(* Specifications *)
(******************)
open Format
open General
open Sums
open Interfaces_basic
open Basic
open Variables
open Sassigns
(* Abbreviations *)
module type Term = Terms.S with type leaf = FreeVar.t
type 'd termF = (FreeVar.t,'d) Terms.termF
... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/top.mld/specs.ml | ocaml | ****************
Specifications
****************
Abbreviations
This module type is for implementations of the global datastructures
for the combination of theory modules
type version of the above
type version of the above
Standard API that a theory module, kernel-side, may offer to the plugins piloting it... |
open Format
open General
open Sums
open Interfaces_basic
open Basic
open Variables
open Sassigns
module type Term = Terms.S with type leaf = FreeVar.t
type 'd termF = (FreeVar.t,'d) Terms.termF
module type DataType = Terms.DataType with type leaf := FreeVar.t
Internal... |
5f5bcb0eea5fbdf5dee3007c275bdaa7a6edca0230183737bac4153b37cdee68 | subtitle-master/subtitlemaster | core.clj | (ns releaser.core
(:require [clj-http.client :as http]
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.java.io :as io]
[me.raynes.fs :as fs]
[clojure.core.async :as async]
[clj-progress.core :as progress])
(:import (org.apache.co... | null | https://raw.githubusercontent.com/subtitle-master/subtitlemaster/d88c2fb007c6c3d4030fefbd4b7e3eafb0e797a9/src/clj/releaser/core.clj | clojure | (ns releaser.core
(:require [clj-http.client :as http]
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.java.io :as io]
[me.raynes.fs :as fs]
[clojure.core.async :as async]
[clj-progress.core :as progress])
(:import (org.apache.co... | |
bbd6b49d0a9ab9f7bc0daead695e0792a24eb10914ec589196df6cc0440699bb | clj-commons/rewrite-clj | test_native_sci.clj | #!/usr/bin/env bb
(ns test-native-sci
(:require [clojure.java.io :as io]
[helper.graal :as graal]
[helper.main :as main]
[helper.os :as os]
[helper.shell :as shell]
[lread.status-line :as status]))
(defn expose-api-to-sci []
(status/line :head "Expose re... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/2c9a91be5b3fa12ed0d71d1b98f7a9728f82b983/script/test_native_sci.clj | clojure | #!/usr/bin/env bb
(ns test-native-sci
(:require [clojure.java.io :as io]
[helper.graal :as graal]
[helper.main :as main]
[helper.os :as os]
[helper.shell :as shell]
[lread.status-line :as status]))
(defn expose-api-to-sci []
(status/line :head "Expose re... | |
062f32857f3e7e6af17a9ed784b95c1215149104cc9923861282677d16498696 | ocsigen/ocsimore | forum_data.mli | Ocsimore
* Copyright ( C ) 2009
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/forum/forum_data.mli | ocaml | * create a new forum. [?arborescent] is true by default.
Setting it to false will prevent to comment comments.
May fail with exception [Ocsimore_common.Permission_denied].
* set or unset moderated flag on a message.
May fail with exception [Ocsimore_common.Permission_denied].
* Get forum information, gi... | Ocsimore
* Copyright ( C ) 2009
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
... |
98e2ace1163991f41e4f475d3df780126cd9ea304051604a86c6b30ec9d7e60f | goldfirere/thesis | Boilerplater.hs | module Boilerplater where
import Test.Framework.Providers.QuickCheck2
import Language.Haskell.TH
testProperties :: [Name] -> Q Exp
testProperties nms = fmap ListE $ sequence [[| testProperty $(stringE prop_name) $(varE nm) |]
| nm <- nms
... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/cab/vector-0.10.12.3/tests/Boilerplater.hs | haskell | This nice clean solution doesn't quite work since I need to use lexically-scoped type
testProperties :: Q [Dec] -> Q Exp
testProperties mdecs = do
decs <- mdecs
| FunD nm _clauses <- decs
, Just prop_name <- [stripPrefix_maybe "prop_" (nameBase nm)... | module Boilerplater where
import Test.Framework.Providers.QuickCheck2
import Language.Haskell.TH
testProperties :: [Name] -> Q Exp
testProperties nms = fmap ListE $ sequence [[| testProperty $(stringE prop_name) $(varE nm) |]
| nm <- nms
... |
1aedc2c98f2c1571c4da55e035d51852ca77456d1dd7a893bb4a666fbcf8d988 | Avi-D-coder/implicit-hie | Locate.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Hie.Locate
( nestedPkg,
stackYamlPkgs,
cabalPkgs,
)
where
import Control.Exception
import Control.Monad.IO.Class
import Control.Monad.Trans.Maybe
import Data.Attoparsec.Text (parseOnly)
import Data.Either
import Data.List
import Data.Maybe
... | null | https://raw.githubusercontent.com/Avi-D-coder/implicit-hie/a95608f9a52e4fbd73c6d7cf7304eccb728030ff/src/Hie/Locate.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
module Hie.Locate
( nestedPkg,
stackYamlPkgs,
cabalPkgs,
)
where
import Control.Exception
import Control.Monad.IO.Class
import Control.Monad.Trans.Maybe
import Data.Attoparsec.Text (parseOnly)
import Data.Either
import Data.List
import Data.Maybe
import qualified Data.Text as T
imp... |
bb95cfc54c0e971bb246e623ea7c4b1a84817683ca0202e314c7a42b03a767f3 | imrehg/ypsilon | generator.scm |
;; library (tidbits generator) deprecated
(library (tidbits generator)
(export define-generator)
(import (ypsilon generator)))
| null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/tidbits/generator.scm | scheme | library (tidbits generator) deprecated |
(library (tidbits generator)
(export define-generator)
(import (ypsilon generator)))
|
51c41b1b9d8e059fcdc09230bf20ab2013871ed937745c714eb7bcda0010699c | ztellman/narrator | operators_test.clj | (ns narrator.operators-test
(:use
[clojure test]
[narrator core])
(:require
[narrator.operators :as n]
[criterium.core :as c]))
(deftest ^:benchmark benchmark-operators
(println "rate")
(let [op (compile-operators* n/rate)]
(c/quick-bench
(dotimes [_ 1000]
(process! op nil))))... | null | https://raw.githubusercontent.com/ztellman/narrator/fd6b46b374c375c2701c377085058f27430e34f1/test/narrator/operators_test.clj | clojure | (ns narrator.operators-test
(:use
[clojure test]
[narrator core])
(:require
[narrator.operators :as n]
[criterium.core :as c]))
(deftest ^:benchmark benchmark-operators
(println "rate")
(let [op (compile-operators* n/rate)]
(c/quick-bench
(dotimes [_ 1000]
(process! op nil))))... | |
3075e26f3c5c27fc2e974052a7d4c605ae3dbdb77d14e83147f8df202373d65b | nathanaelbayle/programming-language | CalculatorRegisterVariableAST.hs | -- | AST for register based integer calculator.
--
-- Author Magne Haveraaen
Since 2020 - 03 - 14
module CalculatorRegisterVariableAST where
-----------------------
| Expressions for a calculator with 10 registers .
-- The calculator supports literals and operations
-- Addition, multiplication, and subtraction/... | null | https://raw.githubusercontent.com/nathanaelbayle/programming-language/4ee0c0c2aa34ee1cb6fa6d7c37f28bc2bfee25bd/INF222%20Pamphlets/INF222%20-%20Pamphlet%203/CalculatorRegisterVariableAST.hs | haskell | | AST for register based integer calculator.
Author Magne Haveraaen
---------------------
The calculator supports literals and operations
Addition, multiplication, and subtraction/negation.
| Statement for setting a register
---------------------
--------------------- | Since 2020 - 03 - 14
module CalculatorRegisterVariableAST where
| Expressions for a calculator with 10 registers .
data CalcExprAST
= Lit Integer
| Add CalcExprAST CalcExprAST
| Mult CalcExprAST CalcExprAST
| Sub CalcExprAST CalcExprAST
| Neg CalcExprAST
| Reg String
deriving (Eq, Read, Show)
dat... |
c9c3edd259bf39512c3f9ae9d92263a71637110319e183ab055a5e7abb4441d9 | ztellman/lamina | struct.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by... | null | https://raw.githubusercontent.com/ztellman/lamina/07c3fb84fdb3f4a4892c0bdbe3abf28788bdeb29/src/lamina/query/struct.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns lamina.query.struct
(:require [lamina.time :as t]))
canonical structure is [ " pattern " transform1 transform2 ... ]
or just [ ]
group - by is a special case , with [ " pattern " [ group - by : foo [ transform 2 ... ] ] ]
(defn first= [s x]
(= (first s) ... |
a2ecec0fff0fd8c6045a99d32bec10ebee2dc03eb910a8b20c4ceebbad2fac64 | synduce/Synduce | max.ml | * @synduce -s 2 -NB
type 'a clist =
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Elt of 'a
| Cons of 'a * 'a list
let rec spec = function
| Elt a -> a
| Cons (hd, tl) -> max hd (spec tl)
;;
let rec repr = function
| Single a -> Elt a
| Concat (x, y) -> dec y x
and dec l1 = functi... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/max.ml | ocaml | * @synduce -s 2 -NB
type 'a clist =
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Elt of 'a
| Cons of 'a * 'a list
let rec spec = function
| Elt a -> a
| Cons (hd, tl) -> max hd (spec tl)
;;
let rec repr = function
| Single a -> Elt a
| Concat (x, y) -> dec y x
and dec l1 = functi... | |
7b246a988b5319416dce2764f87d2b93f38e5fa0945466c40ab64e83998c7d9c | mokus0/junkbox | IOBoolMonoid.hs |
- ` ` IOBoolMonoid ''
- ( c ) 2008 , , Inc.
- ``IOBoolMonoid''
- (c) 2008 Cook, J. MR SSD, Inc.
-}
{-# LANGUAGE
FlexibleInstances
#-}
module TypeExperiments.IOBoolMonoid where
import Data.Monoid
instance Monoid (IO Bool) where
mempty = return True
map... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/IOBoolMonoid.hs | haskell | # LANGUAGE
FlexibleInstances
# |
- ` ` IOBoolMonoid ''
- ( c ) 2008 , , Inc.
- ``IOBoolMonoid''
- (c) 2008 Cook, J. MR SSD, Inc.
-}
module TypeExperiments.IOBoolMonoid where
import Data.Monoid
instance Monoid (IO Bool) where
mempty = return True
mappend x y = do
x <- x
... |
358693b20a578fa6bb1e02e08e8215c99ae80d8b7519fc0fff3e4750c7ec1091 | footprintanalytics/footprint-web | util_test.clj | (ns metabase.api.util-test
"Tests for /api/util"
(:require [clojure.test :refer :all]
[clojure.tools.logging :as log]
[metabase.test :as mt]))
(deftest password-check-test
(testing "POST /api/util/password_check"
(testing "Test for required params"
(is (= {:errors {:password "pa... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/api/util_test.clj | clojure | (ns metabase.api.util-test
"Tests for /api/util"
(:require [clojure.test :refer :all]
[clojure.tools.logging :as log]
[metabase.test :as mt]))
(deftest password-check-test
(testing "POST /api/util/password_check"
(testing "Test for required params"
(is (= {:errors {:password "pa... | |
0e9e31d34dba7104dfc689dc1f39a7b16fba8f081636bd6fa38772e24947005d | music-suite/music-suite | Murail.hs |
import Music.Prelude
import Util
Harmonic material from 's Gondwana
Harmonic material from Murail's Gondwana
-}
carr = 392 :: Hertz
modu = carr*(intone (c,1) justT (c.+^ m3)) :: Hertz
fsum i = abs $ carr + modu*(fromInteger i)
fdiff i = abs $ carr - modu*(fromInteger i)
chord1... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/examples/pieces/Murail.hs | haskell |
import Music.Prelude
import Util
Harmonic material from 's Gondwana
Harmonic material from Murail's Gondwana
-}
carr = 392 :: Hertz
modu = carr*(intone (c,1) justT (c.+^ m3)) :: Hertz
fsum i = abs $ carr + modu*(fromInteger i)
fdiff i = abs $ carr - modu*(fromInteger i)
chord1... | |
d4b45ece44d160332c56f508dbc554863a04f314c8d60418b756c7f4ef5625ce | adinapoli/clj3D | examples.clj | (ns clj3D.examples
(:use
[clj3D fenvs viewer] :reload))
Display a 1x1x1 cube
(view (cube 1))
view is a multimethod inherited from Incanter ,
;;you can visualize data structures as well
(view (matrix [[0 1 2] [3 4 5]]))
You can use almost all 's functions
;;Apply to all
(aa #(* %1 %1) [1 2 3])
;;Almost all fu... | null | https://raw.githubusercontent.com/adinapoli/clj3D/1175bcaddc1d59fe37c6876dc8cc178417211e38/test/clj3D/examples/examples.clj | clojure | you can visualize data structures as well
Apply to all
Almost all functions are currified and high order
Struct2 is similar to Plasm STRUCT, but it merge
geometries into one, so you will lose informations
about materials; use mk-node to view an arbitrary number of geometries
Creates a green torus
Creates a red torus ro... | (ns clj3D.examples
(:use
[clj3D fenvs viewer] :reload))
Display a 1x1x1 cube
(view (cube 1))
view is a multimethod inherited from Incanter ,
(view (matrix [[0 1 2] [3 4 5]]))
You can use almost all 's functions
(aa #(* %1 %1) [1 2 3])
((aa #(* %1 %1)) [1 2 3])
(def green-torus (color :green (torus 0.5 1.0)... |
96ae41e598098ec685b9e94021f1786ad39261e6b9fb1bcd9710ef560b579e94 | graninas/The-Amoeba-World | Language.hs | module Amoeba.View.Language where
import Amoeba.View.Output.Types
data GameNode = TitleScreen | Screen2 | Screen3 | Screen4
deriving (Ord, Eq, Show, Enum)
data Command = Finish
| Render
| StartViewPointMoving ScreenPoint
| ViewPointMoving ScreenPoint
| StopV... | null | https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/View/Language.hs | haskell | module Amoeba.View.Language where
import Amoeba.View.Output.Types
data GameNode = TitleScreen | Screen2 | Screen3 | Screen4
deriving (Ord, Eq, Show, Enum)
data Command = Finish
| Render
| StartViewPointMoving ScreenPoint
| ViewPointMoving ScreenPoint
| StopV... | |
08b125e53d15d264e4137769166b7a4ca06bb7b778f4fc650b56bcb62289dfe0 | agrafix/highjson | TH.hs | # LANGUAGE TemplateHaskell #
module Data.HighJson.TH
( deriveJsonSwagger
, jsonSerializer, jsonEncoder, jsonParser
, makeDeclareNamedSchema
, ToSchema(..)
, ToJSON(..), FromJSON(..)
)
where
import Data.Aeson
import Data.Swagger
import Language.Haskell.TH
import Data.HighJson (jsonSerializer, j... | null | https://raw.githubusercontent.com/agrafix/highjson/2a07567e54bfccc679d92fcd804c20da5275d0c9/highjson-th/Data/HighJson/TH.hs | haskell | # LANGUAGE TemplateHaskell #
module Data.HighJson.TH
( deriveJsonSwagger
, jsonSerializer, jsonEncoder, jsonParser
, makeDeclareNamedSchema
, ToSchema(..)
, ToJSON(..), FromJSON(..)
)
where
import Data.Aeson
import Data.Swagger
import Language.Haskell.TH
import Data.HighJson (jsonSerializer, j... | |
95f0842a33662f7db085a08032381ef93989f4cc1f31a159b179ee037ed1cd4a | DanielG/kvm-in-a-box | SConfig.hs |
Copyright ( c ) 2014 is hereby granted , free of charge , to any person obtaining
a copy of this software and associated documentation files ( the
" Software " ) , to deal in the Software without restriction , including
without limitation the rights to use , copy , modify , merge , publish ,
distribute , ... | null | https://raw.githubusercontent.com/DanielG/kvm-in-a-box/72a1dc8fcf833b991e080acdf0ef4a0dda3d51e9/src/Data/SConfig.hs | haskell | apply readConfigLine to every line
make sure all lines are actual configuration lines
remove comments & empty lines
inserts a parsed key-value pair into the Config accumulator
| Lookup values in a parsed configuration (alias of Map.lookup) |
Copyright ( c ) 2014 is hereby granted , free of charge , to any person obtaining
a copy of this software and associated documentation files ( the
" Software " ) , to deal in the Software without restriction , including
without limitation the rights to use , copy , modify , merge , publish ,
distribute , ... |
9b60471da9618f9ea40165f0f413440d63aa42fe34184ec8ddc5623f3934cd6f | crisptrutski/matchbox | plain.cljc | (ns matchbox.serialization.plain
(:require
[clojure.walk :as walk]
[matchbox.utils :as utils])
#?(:clj (:import (java.util HashMap ArrayList))))
(defn hydrate-raw [x]
#?(:cljs x
:clj
(cond
(instance? HashMap x) (recur (into {} x))
(instance? ArrayList x) (recur (into [] x))
... | null | https://raw.githubusercontent.com/crisptrutski/matchbox/5bb9ba96f5df01bce302a8232f6cddd9d64a1d71/src/matchbox/serialization/plain.cljc | clojure | (ns matchbox.serialization.plain
(:require
[clojure.walk :as walk]
[matchbox.utils :as utils])
#?(:clj (:import (java.util HashMap ArrayList))))
(defn hydrate-raw [x]
#?(:cljs x
:clj
(cond
(instance? HashMap x) (recur (into {} x))
(instance? ArrayList x) (recur (into [] x))
... | |
54ef4331fc1678a93310d77826d8274f3a7dc6359ee5dc7a1464f54eed75bfd3 | fpco/ide-backend | A.hs | module Main where
import B
main :: IO ()
main = B.b
| null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/ABerror/A.hs | haskell | module Main where
import B
main :: IO ()
main = B.b
| |
1c9d0fbc1adb5fb336c3c287721a35aac47bed57f7e37f331e9f3c0ea1d01764 | pedestal/pedestal | servlet.clj | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing ... | null | https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/service/src/io/pedestal/http/servlet.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
D... | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
Eclipse Public License 1.0 ( )
(ns io.pedestal.http.servlet
"Generic Servlet adapter that closes over its implementation
functions."
(:import (javax.servlet Servlet ServletConfig)))
(deftype FnServlet [init-fn service-fn destroy-fn
... |
1b29ef1096e488beb9ac204f60bd9a2091d7b31c32d58c17bb2b99a556e9a207 | erlcloud/eini | eini.erl | Licensed to the Apache Software Foundation ( ASF ) under one
%% or more contributor license agreements. See the NOTICE file
%% distributed with this work for additional information
%% regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
%% "License"); you m... | null | https://raw.githubusercontent.com/erlcloud/eini/6fcbb5d10b661eb0f92c8fff0ec87db2fd761917/src/eini.erl | erlang | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"License"); you may not use this file except in compliance
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
with the License . You may obtain a copy of the License at
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(eini).
-... |
ed6456a722d56ebe434a555312b1a6e5cecc3563c36f73fefb948d95814bb27d | ndpar/erlang | maths.erl | %%
%% @doc Math functions missing in the standard math module.
%%
-module(maths).
-author("Andrey Paramonov").
-export([log/2]).
-export([egcd/2, gcd/2, lcm/2, ilog2/1, isqrt/1]).
-export([crt_garner/2, crt_solver/2]).
-export([mod/2, mod_exp/3, mod_inv/2, mod_linear_equation_solver/3]).
-export([dot_product/2, hadama... | null | https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/lib/ndpar/src/maths.erl | erlang |
@doc Math functions missing in the standard math module.
@doc Log base `B' of `X'.
@doc Integer square root. Implemented using
[#Using_bitwise_operations bitwise algorithm].
```x = a (mod p), x = b (mod q)''' where `p' and `q' are primes.
It gives the same result as `crt_solver([A, B], [P, Q]... | -module(maths).
-author("Andrey Paramonov").
-export([log/2]).
-export([egcd/2, gcd/2, lcm/2, ilog2/1, isqrt/1]).
-export([crt_garner/2, crt_solver/2]).
-export([mod/2, mod_exp/3, mod_inv/2, mod_linear_equation_solver/3]).
-export([dot_product/2, hadamard_prod/2, pairwise_primes/1, prod/1]).
-export([pow/2]).
-export(... |
5b7466b5d69a414f02160e2950f3905d4230f35474294bb0b0f965a6ad8c9e90 | janestreet/bonsai | icon_grid.mli | open! Core
open! Import
(** The main grid of all the icons *)
val component : icons:Feather_icon.t list -> controls:Controls.t -> Vdom.Node.t
| null | https://raw.githubusercontent.com/janestreet/bonsai/d42f19ba7fd17b8363408f11da181a3812fa6c81/examples/feather_icons/icon_grid.mli | ocaml | * The main grid of all the icons | open! Core
open! Import
val component : icons:Feather_icon.t list -> controls:Controls.t -> Vdom.Node.t
|
032e09bea03c5487ec556a2594aa6c5944fd109e6251e6ae31c4b5fc42aad91d | Kakadu/fp2022 | parser.mli | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
type error = [ `ParsingError of string ]
val pp_error : Format.formatter -> [< `ParsingError of string ] -> unit
(** Main parsers *)
val parse_query : string -> (Ast.term, error) result
val parse_program : string -> (Ast.term list, e... | null | https://raw.githubusercontent.com/Kakadu/fp2022/b91542ab68c04d0a5b0e35f258ddb3b1e8661223/Prolog/lib/parser.mli | ocaml | * Main parsers
* Miniparsers | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
type error = [ `ParsingError of string ]
val pp_error : Format.formatter -> [< `ParsingError of string ] -> unit
val parse_query : string -> (Ast.term, error) result
val parse_program : string -> (Ast.term list, error) result
val n... |
07e97bfad877195f4cba78c833f55e2ca95ed4055a5ff3b6fdb87e9434a2fdda | exoscale/clojure-kubernetes-client | apps.clj | (ns clojure-kubernetes-client.api.apps
(:require [clojure-kubernetes-client.core :refer [call-api check-required-params with-collection-format *api-context*]]
[clojure.spec.alpha :as s]
[spec-tools.core :as st]
[orchestra.core :refer [defn-spec]]
[clojure-kubernetes-cli... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/api/apps.clj | clojure | (ns clojure-kubernetes-client.api.apps
(:require [clojure-kubernetes-client.core :refer [call-api check-required-params with-collection-format *api-context*]]
[clojure.spec.alpha :as s]
[spec-tools.core :as st]
[orchestra.core :refer [defn-spec]]
[clojure-kubernetes-cli... | |
af8ab2fc4bc98697a9928d2ab605d136c92e03a94e2b488979170b6a44d4628b | SamB/coq | formula.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/firstorder/formula.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
"_" cannot be parsed
we have a co... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Hipattern
ope... |
9640c6891fbb4466111661db42f8078a401dbfe5798b22a25f09771b4923fa9f | htmfilho/minimily | transfer.clj | (ns minimily.accounting.model.transfer
(:require [hugsql.core :as hugsql]
[minimily.utils.database :as db]
[minimily.accounting.model.account :as account-model]
[minimily.accounting.model.transaction :as transaction-model]))
(hugsql/def-... | null | https://raw.githubusercontent.com/htmfilho/minimily/69b7657cb24231d9837274f8cf232c87661ae994/src/minimily/accounting/model/transfer.clj | clojure | (ns minimily.accounting.model.transfer
(:require [hugsql.core :as hugsql]
[minimily.utils.database :as db]
[minimily.accounting.model.account :as account-model]
[minimily.accounting.model.transaction :as transaction-model]))
(hugsql/def-... | |
65fd04680d7df79182912d444be46d156fb5efd0a57388349f365fa4ebb1e75a | ocaml-ppx/ppx | test.ml | #require "base";;
#require "ppx.ast";;
open Base
open Ppx
open V4_07
(* Linters *)
let lint = object
inherit [Driver.Lint_error.t list] Ast_traverse.fold as super
method! type_declaration td acc =
let acc = super#type_declaration td acc in
match Type_kind.to_concrete (Type_declaration.ptype_kind td) wit... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/test/driver/transformations/test.ml | ocaml | Linters
Extension with a path argument | #require "base";;
#require "ppx.ast";;
open Base
open Ppx
open V4_07
let lint = object
inherit [Driver.Lint_error.t list] Ast_traverse.fold as super
method! type_declaration td acc =
let acc = super#type_declaration td acc in
match Type_kind.to_concrete (Type_declaration.ptype_kind td) with
| Ptype_... |
682220ceeb6eba31563066d437a1b28713268ac785c14d818474838d778e2612 | andy128k/cl-gobject-introspection | package.lisp | (in-package :common-lisp-user)
(defpackage gir-test
(:use :common-lisp :iterate :gir :fiveam :cffi)
(:export :main))
(in-package :gir-test)
(defun read-file (filename)
(with-open-file (stream filename :element-type '(unsigned-byte 8))
(let ((v (make-array (list (file-length stream)) :element-type '(unsigne... | null | https://raw.githubusercontent.com/andy128k/cl-gobject-introspection/95a13d97cbbb4d6f5b4d6ad23df37034e0d4c90c/test/package.lisp | lisp | (in-package :common-lisp-user)
(defpackage gir-test
(:use :common-lisp :iterate :gir :fiveam :cffi)
(:export :main))
(in-package :gir-test)
(defun read-file (filename)
(with-open-file (stream filename :element-type '(unsigned-byte 8))
(let ((v (make-array (list (file-length stream)) :element-type '(unsigne... | |
c4057ef37a08a14127425bf8a6e74dd89eeded03a3392708e8f113b81af73368 | tanders/cluster-engine | 3a.lisp | (in-package cluster-engine) (setf *random-state* (make-random-state t))
(print (clusterengine
16 t nil
'() ; no rules
'((4 4))
'(((1/4))
;; chord domain
((60)(62)(64)(65)(67)(69)(71)(72)))
))
(print
(clusterengine
16 t nil
'() ; no rules
'((4 4))
'(((1/4))
;; chord sequence ... | null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/test_files/3a.lisp | lisp | no rules
chord domain
no rules
chord sequence motif | (in-package cluster-engine) (setf *random-state* (make-random-state t))
(print (clusterengine
16 t nil
'((4 4))
'(((1/4))
((60)(62)(64)(65)(67)(69)(71)(72)))
))
(print
(clusterengine
16 t nil
'((4 4))
'(((1/4))
((60 63 65)(67 66 65))
)))
|
2b92ca7e7f2c7f62bf5c66803d3606d1a8d7e434585a7e32393e81f76974d9a4 | kunstmusik/pink | audio.clj | (ns
^{:doc "Functions for handling Audio I/O using Javasound"
:author "Steven Yi"}
pink.io.audio
(:import [javax.sound.sampled AudioSystem SourceDataLine
TargetDataLine
]))
(defn open-line [audio-format buffer-size]
(let [#^SourceDataLine lin... | null | https://raw.githubusercontent.com/kunstmusik/pink/7d37764b6a036a68a4619c93546fa3887f9951a7/src/main/pink/io/audio.clj | clojure | (ns
^{:doc "Functions for handling Audio I/O using Javasound"
:author "Steven Yi"}
pink.io.audio
(:import [javax.sound.sampled AudioSystem SourceDataLine
TargetDataLine
]))
(defn open-line [audio-format buffer-size]
(let [#^SourceDataLine lin... | |
023439cbe11d3642cb02120278f2af4ae31cd5ae5f1a1962e7049bbd9a8457f1 | clash-lang/clash-prelude | Unsafe.hs | |
Copyright : ( C ) 2015 - 2016 , University of Twente
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Copyright : (C) 2015-2016, University of Twente
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <>
-}
# LANGUAGE Unsafe #
module Clash.Promoted.Nat.Unsafe
... | null | https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Promoted/Nat/Unsafe.hs | haskell | | I hope you know what you're doing | |
Copyright : ( C ) 2015 - 2016 , University of Twente
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Copyright : (C) 2015-2016, University of Twente
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <>
-}
# LANGUAGE Unsafe #
module Clash.Promoted.Nat.Unsafe
... |
d2fff9c1389aa9452c39565121dcfac75323a4c9458e9856bd35846bf388b949 | philnguyen/soft-contract | signatures.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require typed/racket/unit
set-extras
bnf
"ast/signatures.rkt"
"runtime/signatures.rkt"
#;"primitives/signatures.rkt")
(Runnable . ::= . -prog -e [#:reuse (Listof Path-String)])
(Serialized-Blm . ≜ . (List -l (List -l I... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/signatures.rkt | racket | "primitives/signatures.rkt") | #lang typed/racket/base
(provide (all-defined-out))
(require typed/racket/unit
set-extras
bnf
"ast/signatures.rkt"
"runtime/signatures.rkt"
(Runnable . ::= . -prog -e [#:reuse (Listof Path-String)])
(Serialized-Blm . ≜ . (List -l (List -l Integer Integer) (List -l Integer Integer... |
bbf162458c1d15d9d3148419824c74df29c8c2e7fff7b3e6a65c32acdb1e8cdc | hiredman/clojurebot | schedule.clj | (ns hiredman.schedule
(:import (java.util.concurrent ScheduledThreadPoolExecutor TimeUnit)))
(def unit {:minutes TimeUnit/MINUTES :seconds TimeUnit/SECONDS :hours TimeUnit/HOURS})
(def tasks (ref {}))
(def #^{:doc "ScheduledThreadPoolExecutor for scheduling repeated/delayed tasks"}
task-runner (ScheduledTh... | null | https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/src/hiredman/schedule.clj | clojure | example usage
(fixedrate | (ns hiredman.schedule
(:import (java.util.concurrent ScheduledThreadPoolExecutor TimeUnit)))
(def unit {:minutes TimeUnit/MINUTES :seconds TimeUnit/SECONDS :hours TimeUnit/HOURS})
(def tasks (ref {}))
(def #^{:doc "ScheduledThreadPoolExecutor for scheduling repeated/delayed tasks"}
task-runner (ScheduledTh... |
4c85052c64fca3602f01cf688857129a8f10f6c0ece52de50a54335f220475b8 | synsem/texhs | Types.hs | ----------------------------------------------------------------------
-- |
Module : Text . . Types
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
-- License : GPL-3
--
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
Types and utilit... | null | https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/src/Text/TeX/Parser/Types.hs | haskell | --------------------------------------------------------------------
|
License : GPL-3
Maintainer :
Stability : experimental
--------------------------------------------------------------------
* TeX types
* TeXAtom predicates
* Access arguments
* Argument specification
------------------ TeX types... | Module : Text . . Types
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
Portability : GHC
Types and utility functions for TeX documents .
module Text.TeX.Parser.Types
TeX
, TeXAtom(..)
, Arg(..)
, Args
, MathType(..)
, isPlain
, isCommand
, is... |
59354dac7db08d61524dd93ae13bde232c56d67ed1309d808120fdcf966bcf10 | input-output-hk/cardano-wallet | HashSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Wallet.Primitive.Types.HashSpec
( spec
) where
import Prelude
import Cardano.Wa... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/5efe75a5b531824a8407653fd99c2d2d410b8f1e/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/HashSpec.hs | haskell | No Shrinking | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Wallet.Primitive.Types.HashSpec
( spec
) where
import Prelude
import Cardano.Wa... |
ecb051d5e1391a01de57c42a416c678ad6fa55c51e8f8ff237a8f941ac16fa4b | tnelson/Forge | simplerTrace.rkt | #lang forge
sig Node {
edges: set Node
}
/*(declare-sig Node (
(edges Node)
))*/
/* stats are for exactly 5 Node * from least to most strict */
// fact edges: default
/* problem size: variables = 858, clauses = 1438, state = 35 bits
solving time (ms): total = 85, parsing = -1, translation = 73, SAT =... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/examples/simplerTrace.rkt | racket | #lang forge
sig Node {
edges: set Node
}
/*(declare-sig Node (
(edges Node)
))*/
/* stats are for exactly 5 Node * from least to most strict */
// fact edges: default
/* problem size: variables = 858, clauses = 1438, state = 35 bits
solving time (ms): total = 85, parsing = -1, translation = 73, SAT =... | |
12a3ecbd432df95fb7c8f16e9442766244808316613b755e2b3d3d11ea7cb41a | byorgey/bin | repocheck.hs | -- Compile to 'rc'
import Data.List (isPrefixOf)
import Control.Monad
import System.Directory
import System.Exit
import System.FilePath
import System.Process
-- TODO:
2 . colorize output ?
3 . inline , interactive rectification ( i.e. opportu... | null | https://raw.githubusercontent.com/byorgey/bin/7370e6cc77be375c9e5e00718d15773169534c10/repocheck.hs | haskell | Compile to 'rc'
TODO:
and push in each repo before moving on to the next)?
hmm... seems like more trouble than it's worth. Just open a new
terminal.
True <=> dirty, # ahead
putStrLn $ "Checking darcs repo: " ++ repo
True <=> clean |
import Data.List (isPrefixOf)
import Control.Monad
import System.Directory
import System.Exit
import System.FilePath
import System.Process
2 . colorize output ?
3 . inline , interactive rectification ( i.e. opportunity to record
checkGitRepo... |
e31dfa7648c16b82601cfa0f3a7b363dc9d30a50f955b9c710de7d0e4e20856f | theodormoroianu/SecondYearCourses | HaskellChurch_20210415162606.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415162606.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: C... |
9ae9fba4c319aa2d2af9ab60b4cdb11588b775e05267ee143e8e6cfcd896aea8 | nikita-volkov/rerebase | Isomorphism.hs | module Data.Isomorphism
(
module Rebase.Data.Isomorphism
)
where
import Rebase.Data.Isomorphism
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Isomorphism.hs | haskell | module Data.Isomorphism
(
module Rebase.Data.Isomorphism
)
where
import Rebase.Data.Isomorphism
| |
ca7d72364f2a6f134b25455a0b674bf7df5fc82bc93e612e5a434c42c465f9ca | phadej/zinza | Licenses.hs | # LANGUAGE DeriveGeneric #
module Licenses where
import GHC.Generics (Generic (..))
import Test.QuickCheck (Arbitrary (..), genericShrink)
import Zinza
newtype Licenses = Licenses { licenses :: [License] }
deriving (Eq, Show, Generic)
instance Zinza Licenses where
toType = genericToType id
toValu... | null | https://raw.githubusercontent.com/phadej/zinza/80cc8e62ba479df192a46bc4a0dc1eff16d61194/test/Licenses.hs | haskell | # LANGUAGE DeriveGeneric #
module Licenses where
import GHC.Generics (Generic (..))
import Test.QuickCheck (Arbitrary (..), genericShrink)
import Zinza
newtype Licenses = Licenses { licenses :: [License] }
deriving (Eq, Show, Generic)
instance Zinza Licenses where
toType = genericToType id
toValu... | |
b6d3d088a96d4c0418d51c3b4b6e0be04b166d3312cae8311f330687e0dd71e9 | GaloisInc/saw-script | PreludeM.hs | # LANGUAGE TemplateHaskell #
|
Module : Verifier . SAW.Cryptol . Prelude
Copyright : Galois , Inc. 2012 - 2015
License : :
Stability : experimental
Portability : non - portable ( language extensions )
Module : Verifier.SAW.Cryptol.Prelude
Copyright : Galois, Inc. 2012-2015
L... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/56ae651833c28b2a1e74b8632e9da4b3686faa80/cryptol-saw-core/src/Verifier/SAW/Cryptol/PreludeM.hs | haskell | # LANGUAGE TemplateHaskell #
|
Module : Verifier . SAW.Cryptol . Prelude
Copyright : Galois , Inc. 2012 - 2015
License : :
Stability : experimental
Portability : non - portable ( language extensions )
Module : Verifier.SAW.Cryptol.Prelude
Copyright : Galois, Inc. 2012-2015
L... | |
35d2cc8aafa16e57032c8661501ba35e82a98e585825c4f6ba2090e02e799a9f | vlstill/hsExprTest | simple-1.q.hs | expr = "f"
f = 2^2^2
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/test/simple-1.q.hs | haskell | expr = "f"
f = 2^2^2
| |
280a3910f9b9fd7c47711b7788dac847c7e1832ca6516a77873651b01e939707 | jarvinet/scheme | load3.scm | (display (current-input-port))
(newline)
| null | https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/test/load3.scm | scheme | (display (current-input-port))
(newline)
| |
e542a4123faca69adeab08c69053a7e780f71cad28346565341c8d7ff772408b | kompendium-ano/factom-haskell-client | DirectoryBlockHead.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeOperators #-}
module Factom.RPC.Types.DirectoryBlockHead where
import Control.Applicative
import Con... | null | https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Types/DirectoryBlockHead.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------ | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Factom.RPC.Types.DirectoryBlockHead where
import Control.Applicative
import Control.Monad (forM_, join, mzero)
import Data.Aeson (FromJSON (.... |
0aaa5fdd0d9b94920cb4d937d13deaf3c11083b97198f91500fa3499d73f3b8b | erlyvideo/publisher | mp3_reader.erl | @author < > [ ]
2009
%%% @doc MP3 reader for erlyvideo
%%% @reference See <a href="/" target="_top"></a> for more information
%%% @end
%%%
%%% This file is part of erlyvideo.
%%%
%%% erlyvideo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publ... | null | https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/erlmedia/src/mp3_reader.erl | erlang | @doc MP3 reader for erlyvideo
@reference See <a href="/" target="_top"></a> for more information
@end
This file is part of erlyvideo.
erlyvideo is free software: you can redistribute it and/or modify
(at your option) any later version.
erlyvideo is distributed in the hope that it will be useful,
but... | @author < > [ ]
2009
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
-module(mp3_reader).
-author('Max Lapshin <>').
-include("../include/vid... |
68ec88deeefe11fa77143ffc11af05d635464076443e823d64ec469d2a4ea764 | takikawa/racket-ppa | printer.rkt | #lang racket/base
;; This module provides functions for printing types and related
;; data structures such as propositions and objects
(require racket/require racket/match racket/dict racket/string racket/promise
racket/pretty
racket/list
racket/set
syntax/id-set
(path-up ... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/typed-racket-lib/typed-racket/types/printer.rkt | racket | This module provides functions for printing types and related
data structures such as propositions and objects
do we attempt to find instantiations of polymorphic types to print?
do we use simple type aliases in printing
this parameter controls how far down the type to expand type names
interp. 0 -> don't expand
... | #lang racket/base
(require racket/require racket/match racket/dict racket/string racket/promise
racket/pretty
racket/list
racket/set
syntax/id-set
(path-up "rep/type-rep.rkt" "rep/prop-rep.rkt" "rep/object-rep.rkt"
"rep/core-rep.rkt" "rep/values-rep.rkt" ... |
d23c61f4fd4da478199500d0955ea6d88a2ec18ec75fb2588d34e9a917a99657 | Mesabloo/HaSM | Architecture.hs | module Language.HaSM.CodeGen.Architecture where
data Arch
= X86
-- | MIPS
instance Show Arch where
show X86 = "x86" | null | https://raw.githubusercontent.com/Mesabloo/HaSM/7d75f0a81055d1e9c9dd0d351f3e9b9c00c7dadd/src/Language/HaSM/CodeGen/Architecture.hs | haskell | | MIPS | module Language.HaSM.CodeGen.Architecture where
data Arch
= X86
instance Show Arch where
show X86 = "x86" |
307a0289358ff879403caef3953fc55af0447d80be04892280a139863257ff18 | Ericson2314/lighthouse | StdMenu.hs | -----------------------------------------------------------------------------
-- |
Module : StdMenu
Copyright : ( c ) 2002
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
StdMenu defines functions on menus .
--
-------------------------... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/ObjectIO/Graphics/UI/ObjectIO/StdMenu.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
* Opening a menu.
* Closing a menu.
* Enabling and disabling o... | Module : StdMenu
Copyright : ( c ) 2002
StdMenu defines functions on menus .
module Graphics.UI.ObjectIO.StdMenu
(
Menus(..),
closeMenu,
* Enabling and disabling of the MenuSystem
enableMenuSystem
, disableMenuSystem,
enableMen... |
07cfc3ab552cf78e8208930d46dad51612ae57d43c70e914316057c610210ae4 | GlideAngle/flare-timing | Prove.hs | module Flight.Mask.Tag.Prove (keepCrossing, prove, proveCrossing) where
import Prelude hiding (span)
import Data.Maybe (fromMaybe)
import Data.Time.Clock (UTCTime)
import Control.Lens ((^?), element)
import Flight.Units ()
import qualified Flight.Kml as Kml (Fix)
import Flight.Comp (TimePass)
import Flight.Track.Cros... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/34873946be9b93c37048ed118ef5b4649c71d630/lang-haskell/mask/library/Flight/Mask/Tag/Prove.hs | haskell | | Prove from the fixes and mark that the crossing exits. We don't know the
interpolated crossing point and time yet so we'll accept a crossing where
one of the fixes passes the time check. | module Flight.Mask.Tag.Prove (keepCrossing, prove, proveCrossing) where
import Prelude hiding (span)
import Data.Maybe (fromMaybe)
import Data.Time.Clock (UTCTime)
import Control.Lens ((^?), element)
import Flight.Units ()
import qualified Flight.Kml as Kml (Fix)
import Flight.Comp (TimePass)
import Flight.Track.Cros... |
998d9aa77b6c27d600b5ad6b352dc09207abb6b22f3e0b507aa1711a282f1515 | CryptoKami/cryptokami-core | Rollback.hs |
| Rollback logic in Poll .
module Pos.Update.Poll.Logic.Rollback
( rollbackUS
) where
import qualified Data.HashMap.Strict as HM
import Universum
import Pos.Core (ApplicationName, BlockVersion, NumSoftwareVersion, SoftwareVersion (..))
import Pos.Core.Update (UpId)
impo... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/update/Pos/Update/Poll/Logic/Rollback.hs | haskell | itself and undo data.
Note: here we use explicit pattern-matching which forces us to
enumerate all fields to avoid situation when we add something new
Rollback proposals
Rollback block version. It's important to do it before next step,
because setAdoptedBV takes state from Poll, not as argument. |
| Rollback logic in Poll .
module Pos.Update.Poll.Logic.Rollback
( rollbackUS
) where
import qualified Data.HashMap.Strict as HM
import Universum
import Pos.Core (ApplicationName, BlockVersion, NumSoftwareVersion, SoftwareVersion (..))
import Pos.Core.Update (UpId)
impo... |
ba2abdf42c67c4d5d146fdf3d54def1ecb2d07f5216d9866919e00b52fd46c04 | mclumd/Meta-AQUA | hypo-form.lisp | (in-package :user)
(use-package :poirot-connector)
;;;;
;;;; This file will house the code that formulates learning hypotheses for
;;;; Meta-AQUA.
;;;;
Dummy from 's code as modified by rpg .
(defun gen-hypo-old (app)
Construct a hypothesis
(let* ((hyp1-triple
(create-instance-triple ap... | null | https://raw.githubusercontent.com/mclumd/Meta-AQUA/e4d4f83330fd07d1354aec245a49bde9e246c618/Poirot/hypo-form.lisp | lisp |
This file will house the code that formulates learning hypotheses for
Meta-AQUA.
Create a single hypothesis
| (in-package :user)
(use-package :poirot-connector)
Dummy from 's code as modified by rpg .
(defun gen-hypo-old (app)
Construct a hypothesis
(let* ((hyp1-triple
(create-instance-triple app "hypothesis" "hypothesis-lisp-1"))
(hyp1 (triple-subject hyp1-triple))
(thesis1-triple (create-inst... |
ac3befaec8d6882fb6f8a39045cc408ea28f0a4f5c3972e50e6f986c40eb4f97 | jumarko/web-development-with-clojure | project.clj | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/guestbook-cljs/project.clj | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(defproject guestbook "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[org.clojure/cloj... |
9a9af95344a029fd14d1dc06a9c89095658aee126b5125c3558c191734218795 | psibi/yesod-rest | Settings.hs | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
In addition ,... | null | https://raw.githubusercontent.com/psibi/yesod-rest/01deecd92e10378926085e418a35bdc09e8e0b18/src/Settings.hs | haskell | # LANGUAGE OverloadedStrings #
| Settings are centralized, as much as possible, into this file. This
includes database connection settings, static file locations, etc.
| Runtime settings to configure this application. These settings can be
loaded from various sources: defaults, environment variables, config files,
... | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .
module Settings... |
2e6c37e6750768dc88c1975b8e251e21a0baa8132d36d35bf1026cb45eb66702 | marick/fp-oo | t_scheduling_variant.clj | (ns sources.t-scheduling-variant
(:use midje.sweet)
(:import java.util.Date))
(load-file "sources/scheduling-variant.clj")
(fact "the solution sorts and whatnot"
(solution [{:course-name "AM1", :morning? true, :limit 5, :registered 3}
{:course-name "AM2", :morning? true, :limit 5, :registered 2}
... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/test/sources/t_scheduling_variant.clj | clojure | (ns sources.t-scheduling-variant
(:use midje.sweet)
(:import java.util.Date))
(load-file "sources/scheduling-variant.clj")
(fact "the solution sorts and whatnot"
(solution [{:course-name "AM1", :morning? true, :limit 5, :registered 3}
{:course-name "AM2", :morning? true, :limit 5, :registered 2}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.