_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 |
|---|---|---|---|---|---|---|---|---|
9b8b8addca37b282593a64ed1390eae88dda1640ebfc0a4c5a572a76a6a6f2ff | vasilisp/inez | mono_chain_harder.ml | open Core.Std ;;
open Script ;;
(* input *)
let n =
if not !Sys.interactive && Array.length argv >= 2 then
int_of_string argv.(1)
else
10 ;;
let unsat = Array.length argv >= 3 && argv.(2) = "--unsat" ;;
assert (n >= 0) ;;
(* monotonically increasing function f *)
let f _ = ~free ;;
assert_axiom
(~f... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/examples/axioms/mono_chain_harder.ml | ocaml | input
monotonically increasing function f
function g
variables
constraints | open Core.Std ;;
open Script ;;
let n =
if not !Sys.interactive && Array.length argv >= 2 then
int_of_string argv.(1)
else
10 ;;
let unsat = Array.length argv >= 3 && argv.(2) = "--unsat" ;;
assert (n >= 0) ;;
let f _ = ~free ;;
assert_axiom
(~forall a (~forall b ([a <= b], f a <= f b))) ;;
let g... |
1a4c2d90245f9f77c851b82d5aefe2d6ec25a79726310749f23edd4ecaaeff03 | clojars/clojars-web | uploads_test.clj | (ns clojars.integration.uploads-test
(:require
[cemerick.pomegranate.aether :as aether]
[clj-http.client :as client]
[clj-http.cookies :as http-cookies]
[clj-http.core :as http-core]
[clojars.config :refer [config]]
[clojars.db :as db]
[clojars.email :as email]
[clojars.file-utils :as fu]
[... | null | https://raw.githubusercontent.com/clojars/clojars-web/22f831c9e8749ac7933af48655764ad5f5bdc3e8/test/clojars/integration/uploads_test.clj | clojure | we have to clear sessions on each deploy to mimic having new processes
deploying.
deploy to the groups with an unscoped token so they will show
as options for token scoping
see -web/issues/640
we use clj-http here instead of aether to have control over the
order the files are uploaded
see -web/issues/640
we us... | (ns clojars.integration.uploads-test
(:require
[cemerick.pomegranate.aether :as aether]
[clj-http.client :as client]
[clj-http.cookies :as http-cookies]
[clj-http.core :as http-core]
[clojars.config :refer [config]]
[clojars.db :as db]
[clojars.email :as email]
[clojars.file-utils :as fu]
[... |
e5b192fe953ee2c71fadf729a364aa71e392f64761bb5d617845a41cbcf0dcf7 | mfikes/fifth-postulate | ns8.cljs | (ns fifth-postulate.ns8)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs ... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns8.cljs | clojure | (ns fifth-postulate.ns8)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs ... | |
a8dfe33e7ebefd4861f9c84dcac4fa6b9d0da58ea9a33489492ba3a9365eab6d | degree9/uikit-hl | sortable.cljs | (ns uikit-hl.sortable
(:require [hoplon.core :as h]
[hoplon.jquery]
[uikit-hl.core :as uk]))
(defmulti uk-sortable! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-sortable! elem key val))
(defn- format-sortable [sortable]
(str "uk-sortable-" sortable... | null | https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/sortable.cljs | clojure | (ns uikit-hl.sortable
(:require [hoplon.core :as h]
[hoplon.jquery]
[uikit-hl.core :as uk]))
(defmulti uk-sortable! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-sortable! elem key val))
(defn- format-sortable [sortable]
(str "uk-sortable-" sortable... | |
082c29444c8700635b76be99dbc6c224b31871cd50f976fff356399967c8ca81 | YoshikuniJujo/test_haskell | Type.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
{-# LANGUAGE KindSignatures, TypeOperators #-}
{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Pipeline.Graphics.Type (G(..)) where
import GHC.TypeNats
import Data.Kind
import qualified Gpu.Vulkan.Pipeline.Graphic... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/a82da99fe768bd48a88fa806eb6f4abd903167ff/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Pipeline/Graphics/Type.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE KindSignatures, TypeOperators #
# LANGUAGE PatternSynonyms, ViewPatterns # | # LANGUAGE DataKinds #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Pipeline.Graphics.Type (G(..)) where
import GHC.TypeNats
import Data.Kind
import qualified Gpu.Vulkan.Pipeline.Graphics.Middle as M
newtype G s (vs :: [Type]) (ts :: [(Nat, Type)]) = G M.G
|
56cd29fe2e8c065bb6859407a1a6f9b589fa95eb8c683b226ee50b04542539d7 | damballa/parkour | word_count.clj | (ns parkour.example.word-count
(:require [clojure.string :as str]
[clojure.core.reducers :as r]
[parkour (conf :as conf) (fs :as fs) (mapreduce :as mr)
, (graph :as pg) (toolbox :as ptb) (tool :as tool)]
[parkour.io (text :as text) (seqf :as seqf)])
(:import [o... | null | https://raw.githubusercontent.com/damballa/parkour/2b3c5e1987e18b4c4284dfd4fcdaba267a4d7fbc/examples/parkour/example/word_count.clj | clojure | (ns parkour.example.word-count
(:require [clojure.string :as str]
[clojure.core.reducers :as r]
[parkour (conf :as conf) (fs :as fs) (mapreduce :as mr)
, (graph :as pg) (toolbox :as ptb) (tool :as tool)]
[parkour.io (text :as text) (seqf :as seqf)])
(:import [o... | |
a8ab22f7e4bfabb6ba6620e98da6e8b111efea54cbfbbbb5e32f7ba849a2d404 | ucsd-progsys/liquidhaskell | Liquid.hs | # LANGUAGE ScopedTypeVariables #
{-@ LIQUID "--diff" @-}
module Language.Haskell.Liquid.Liquid (
-- * Single query
runLiquid
-- * Ghci State
, MbEnv
-- * Liquid Constraint Generation
, liquidConstraints
-- * Checking a single module
, checkTargetInfo
) where
import Prelude hi... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/d2800bf98a551b6d6ec82c26f62fe23f8755ac59/src/Language/Haskell/Liquid/Liquid.hs | haskell | @ LIQUID "--diff" @
* Single query
* Ghci State
* Liquid Constraint Generation
* Checking a single module
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-----------------------------------------------... | # LANGUAGE ScopedTypeVariables #
module Language.Haskell.Liquid.Liquid (
runLiquid
, MbEnv
, liquidConstraints
, checkTargetInfo
) where
import Prelude hiding (error)
import Data.Bifunctor
import qualified Data.HashSet as S
import System.Exit
import Text.PrettyP... |
d69f23b1faeb1080425258ae822e527d091fd43f837b0ee0ee556c819250f1d8 | archimag/mongo-cl-driver | packages.lisp | packages.lisp
;;;;
;;;; This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(defpackage #:mongo-cl-driver
(:nicknames #:mongo )
(:use #:cl
#:iter #:alexandria
#:blackbird
#:mongo-cl-driver.wire
#:mon... | null | https://raw.githubusercontent.com/archimag/mongo-cl-driver/300c10bd3d0b3ca3a82c8b32087bddbc7b6a86c3/driver/packages.lisp | lisp |
This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
See file COPYING for details.
conditions
#:timeout-failure
#:invalid-operation
write concern
server config
database
collection
cursor
indexes | packages.lisp
Author : < >
(defpackage #:mongo-cl-driver
(:nicknames #:mongo )
(:use #:cl
#:iter #:alexandria
#:blackbird
#:mongo-cl-driver.wire
#:mongo-cl-driver.adapters
#:mongo-cl-driver.sugar)
(:import-from #:mongo-cl-driver.adapters #:mongo-client-close)
(:sh... |
65861895a211af349e4a642e832997de3f5f2033a55c5011ac5d2249be6d3d16 | AlexKnauth/music | metadata.rkt | #lang agile
;; ------------------------------------------------------------------------
(provide metadata work creator)
A MetaData is a
;; (metedata [Maybe Work]
;; [Maybe Number]
;; [Maybe String]
;; [Maybe Creator])
(struct metadata
[work
movement-number
movement-title
co... | null | https://raw.githubusercontent.com/AlexKnauth/music/b4489c27d7c0f7116d769344c787fa76b479e5fa/music/data/score/metadata.rkt | racket | ------------------------------------------------------------------------
(metedata [Maybe Work]
[Maybe Number]
[Maybe String]
[Maybe Creator])
A Work is a (work [Maybe String])
A Creator is a (creator [Maybe String])
-----------------------------------------------------------------... | #lang agile
(provide metadata work creator)
A MetaData is a
(struct metadata
[work
movement-number
movement-title
composer]
#:transparent)
(struct work [title] #:transparent)
(struct creator [composer] #:transparent)
|
2daf01671c7f7edbce51a3bd5eaec8259e5fb2f00dd0ba89467773933416e792 | elaforge/karya | Slice.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
# LANGUAGE CPP #
| Slicing is chopping the block horizontally , so that the horizontal chunks
can act like their own little blocks .
For the sake of convenient notation , t... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/Slice.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Ask 'slice' to synthesize a note track and insert it at the leaves of
the sliced tree.
are not trimmed off.
| The TrackId for the track created for this event. This is required
so it can collect a TrackD... | Copyright 2013
# LANGUAGE CPP #
| Slicing is chopping the block horizontally , so that the horizontal chunks
can act like their own little blocks .
For the sake of convenient notation , this is done in several places .
1 . A note with subtracks will slice out the subevents within its range . ... |
cdcf2f4f3c8ae58acfa54803086fa988a196a4fd8906198b28384dfb3720ad10 | hypernumbers/hypernumbers | hn_updater.erl | %%%-------------------------------------------------------------------
@author
( C ) 2009 - 2014 , Hypernumbers.com
%%% @doc hot code loader, etc
%%% @end
%%% Created : by
%%%-------------------------------------------------------------------
%%%------------------------------------------------------... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/hypernumbers-1.0/src/hn_updater.erl | erlang | -------------------------------------------------------------------
@doc hot code loader, etc
@end
Created : by
-------------------------------------------------------------------
-------------------------------------------------------------------
LICENSE
This program is free software: you can redistribu... | @author
( C ) 2009 - 2014 , Hypernumbers.com
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3
You should have received a copy of the GNU Affero General Public License
-module(hn_updater).
-export([do/1, migrate/0, migrate/1]).
do(sus... |
070962e1cf3e38d4b571af2c9148aa5dcfb5c5da355152d40abd14b7467027b4 | boomerang-lang/boomerang | my_set.ml | open Core
open Util
open My_dict
(* parameter to Set modules -- we must pass in some
* type for the elements of a set, a comparison
* function, and a way to stringify it.
*)
module SetOf(C : Data) =
struct
module D = DictOf(C)(UnitModule)
type elt = D.key
[@@deriving ord, show, hash]
type t = D.t
[@@de... | null | https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/stdlib/my_set.ml | ocaml | parameter to Set modules -- we must pass in some
* type for the elements of a set, a comparison
* function, and a way to stringify it.
| open Core
open Util
open My_dict
module SetOf(C : Data) =
struct
module D = DictOf(C)(UnitModule)
type elt = D.key
[@@deriving ord, show, hash]
type t = D.t
[@@deriving ord, show, hash]
let empty = D.empty
let insert x s = D.insert s x ()
let singleton x = insert x empty
let union s1 s2 = D.fold (... |
0d154f0f1707c97768b3397e98b973fb151e090697e2508887f81b50edaeb398 | mtgred/netrunner | hosting.clj | (ns game.core.hosting
(:require
[game.core.card :refer [assoc-host-zones corp? get-card program? rezzed? runner?]]
[game.core.card-defs :refer [card-def]]
[game.core.effects :refer [register-constant-effects register-floating-effect unregister-constant-effects]]
[game.core.eid :refer [make-eid]]
[... | null | https://raw.githubusercontent.com/mtgred/netrunner/c6b8d71f1ca4bd9ed7f6156398e93387d6d04f0d/src/clj/game/core/hosting.clj | clojure | hosted cards should not be in :discard or :hand etc
Update any cards hosted by the target, so their :host has the updated zone.
Otherwise just register events and constant effects
Update all constant and floating effects | (ns game.core.hosting
(:require
[game.core.card :refer [assoc-host-zones corp? get-card program? rezzed? runner?]]
[game.core.card-defs :refer [card-def]]
[game.core.effects :refer [register-constant-effects register-floating-effect unregister-constant-effects]]
[game.core.eid :refer [make-eid]]
[... |
b40cabb9f99a618baf53a97345cdd0deda55304b0b077b26df81a1958177387f | ArtichOwO/r86 | exceptions.ml | Lexing errors
exception Invalid_character of char
exception String_never_terminated
exception Asm_never_starts
exception Asm_never_terminated
(* Parsing errors *)
exception Pointer_overflow
exception Integer_overflow
exception String_as_words
exception Label_redefinition of string
exception Label_not_define... | null | https://raw.githubusercontent.com/ArtichOwO/r86/810580d5fa03d7c217261201abd6c7770d4107a5/lib/exceptions.ml | ocaml | Parsing errors | Lexing errors
exception Invalid_character of char
exception String_never_terminated
exception Asm_never_starts
exception Asm_never_terminated
exception Pointer_overflow
exception Integer_overflow
exception String_as_words
exception Label_redefinition of string
exception Label_not_defined of string
exceptio... |
53b4eb5aefe4ee2038cf5a181c5f45ea112e0259a666a58eb08b9b5b4d57551c | analytics/analytics | Wind.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ExistentialQuantification #
module Wind where
import Control.Applicative
import Control.Monad
import Control.Monad.Trans
import Data.IORef
data Frame r m a b where
FFrame :: (a -> b) -> Frame r m a b
MFrame :: (a -> ContT r m b) -> Frame r m a b
... | null | https://raw.githubusercontent.com/analytics/analytics/43cc3b9250b4955c1a3c3a6edc248e3f9f1ffe8b/contrib/Wind.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE ExistentialQuantification #
module Wind where
import Control.Applicative
import Control.Monad
import Control.Monad.Trans
import Data.IORef
data Frame r m a b where
FFrame :: (a -> b) -> Frame r m a b
MFrame :: (a -> ContT r m b) -> Frame r m a b
BFrame :: m () -> m () -> Frame r m a a
data Stack... |
eaf63ceb69de85c0216f142fb951d19a09cf5784c13eac9f1d22d43b06bd0f75 | dmitryvk/sbcl-win32-threads | sap.lisp | ;;;; the HPPA VM definition of SAP operations
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public do... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/hppa/sap.lisp | lisp | the HPPA VM definition of SAP operations
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Moves and coercions:
Move untagged sap values.
Move untagged sap args/return-values.
Use standard ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
Move a tagged SAP to an untagged representation .
(define-vop (move-to-sap)
(:args (x :scs (any-r... |
cc73ea274dc71fa2c3ec80f0c0b3f4f83de83391b330eb41143cc4ffdf3357dd | haskell-CI/hackage-matrix-builder | PkgIdxTsSet.hs | # LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
-- |
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
--
module PkgIdxTsSet
( PkgIdxTsSet
, null
, size
, empty
, fromSet
, fromDistinctAscList
, toAscList
, toSet
, member... | null | https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-lib/PkgIdxTsSet.hs | haskell | |
finds largest entry smaller than/equal 'x'; except when there isn't
invariant: li < ui
closest match
exact match
go left
go right
invariant: li < ui
close match
go left
exact match
go right
to, but not including, the size of the set.
| Find largest element smaller or equal to the given one.
| Find lar... | # LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
module PkgIdxTsSet
( PkgIdxTsSet
, null
, size
, empty
, fromSet
, fromDistinctAscList
, toAscList
, toSet
, member
, l... |
d7cb312411aa9a19d14114c5c7dfe5e7074b761c2c25830e5e8f88757ee13121 | sharplispers/montezuma | term-doc-enum.lisp | (in-package #:montezuma)
(defclass term-doc-enum ()
())
(defmethod skip-to ((self term-doc-enum) target)
(while (> target (doc self))
(unless (next? self)
(return-from skip-to NIL)))
T)
(defclass segment-term-doc-enum (term-doc-enum)
((parent :initarg :parent :reader parent)
(freq-stream :reader... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/index/term-doc-enum.lisp | lisp | te can be a term, term-enum or term-info object.
If we found something to skip, then skip it.
Done skipping, now just scan. | (in-package #:montezuma)
(defclass term-doc-enum ()
())
(defmethod skip-to ((self term-doc-enum) target)
(while (> target (doc self))
(unless (next? self)
(return-from skip-to NIL)))
T)
(defclass segment-term-doc-enum (term-doc-enum)
((parent :initarg :parent :reader parent)
(freq-stream :reader... |
7179085ac34ded89383d9984953a581a5d8f594dc0520ae96ea94ec6a1c30df3 | eugeneia/athens | mac.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
;;;; macs.lisp -- common functions for message authentication codes
(in-package :crypto)
(defgeneric update-mac (mac thing &key &allow-other-keys)
(:documentation "Update the internal state of MAC with THING.
The exact method is determined by the type of THING."))
(d... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/ironclad-v0.40/src/macs/mac.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
macs.lisp -- common functions for message authentication codes |
(in-package :crypto)
(defgeneric update-mac (mac thing &key &allow-other-keys)
(:documentation "Update the internal state of MAC with THING.
The exact method is determined by the type of THING."))
(defgeneric produce-mac (mac &key digest digest-start)
(:documentation "Return the hash of the data processed by
MA... |
93857eadca83b65fddff30f125b2a78a755684b09975e63349238a8b588306de | diagrams/geometry | Path.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeCla... | null | https://raw.githubusercontent.com/diagrams/geometry/945c8c36b22e71d0c0e4427f23de6614f4e7594a/src/Geometry/Path.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE UndecidableInstances #
---------------------------------------------------------------------------
|
Module : Geometry.Path
License : BSD-style (see LICENSE)
Maintainer :
This module defines /paths/, w... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving ... |
ad568bb8434d6f55ecd9644221f54d75153968134150e1f041e1d86969583394 | jimcrayne/jhc | tc152.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
# LANGUAGE UndecidableInstances #
-XUndecidableInstances now needed because the Coverage Condition fails
This one blew up Hugs ( Apr 02 )
module ShouldCompile where
-- Context reduction can introduce opportunities for context improvement,
-- so add an additional `improve' ste... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc152.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
Context reduction can introduce opportunities for context improvement,
so add an additional `improve' step afterwards. The bug is demonstrated by
the following code:
This line blows up w/ unresolved top-level overloading | # LANGUAGE UndecidableInstances #
-XUndecidableInstances now needed because the Coverage Condition fails
This one blew up Hugs ( Apr 02 )
module ShouldCompile where
class C a b c | a b -> c where
m :: a -> b -> c
instance C Integer Integer Integer where
m = error "urk"
newtype T a = T a
... |
a38680cca7f7b4854de7cf1e0f576f33f549933b702a5b68e436d530709f12eb | BetterThanTomorrow/joyride | utils.cljs | (ns joyride.utils
(:require ["fdir" :refer [fdir]]
["vscode" :as vscode]
[clojure.pprint :as pprint]
[clojure.string :as str]
[joyride.db :as db]
[promesa.core :as p]))
(defn jsify [clj-thing]
(clj->js clj-thing))
(defn cljify [js-thing]
(js->clj js-th... | null | https://raw.githubusercontent.com/BetterThanTomorrow/joyride/0db51d7298ef68536dd7157424a3ec19c02053a9/src/joyride/utils.cljs | clojure | (ns joyride.utils
(:require ["fdir" :refer [fdir]]
["vscode" :as vscode]
[clojure.pprint :as pprint]
[clojure.string :as str]
[joyride.db :as db]
[promesa.core :as p]))
(defn jsify [clj-thing]
(clj->js clj-thing))
(defn cljify [js-thing]
(js->clj js-th... | |
371423db2d9e2e895d1c67a90509faacd9bf359c8a351bcb4594cac3bb8e6354 | nyu-acsys/drift | pldi082_unbounded2.ml |
let rec loop (lx:int) (ly:int) (ln:int) =
let ny =
if (lx <= ln) then ly + 1
else if (lx >= ln+1) then ly - 1
else (-4) in
if (ny < 0) then
if ln >= 0 then
if ny = (-1) then (lx < 2 * ln + 3)
else false
el... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DOrder/first/pldi082_unbounded2.ml | ocaml | -:{v:Int | true} |
let rec loop (lx:int) (ly:int) (ln:int) =
let ny =
if (lx <= ln) then ly + 1
else if (lx >= ln+1) then ly - 1
else (-4) in
if (ny < 0) then
if ln >= 0 then
if ny = (-1) then (lx < 2 * ln + 3)
else false
el... |
51ff415f6d6869067a5cb7bf837c38c0a924729952ff1382fdf328baa59f8afd | travisbrady/flajolet | test_histogram.ml | open Core.Std
open OUnit2
let d = List.range 1 10 |> List.map ~f:Float.of_int
let nd = [-10.0; -9.0; -8.0; -7.0; -6.0; -5.0; -4.0; -3.0; -2.0]
let test_zero _ =
let h = Histogram.create 10 in
assert_equal None (Histogram.median h)
let test_simple _ =
let h = List.fold d ~init:(Histogram.create 10) ~f:His... | null | https://raw.githubusercontent.com/travisbrady/flajolet/a6c530bf1dd73b9fa8b7185d84a5e20458a3d8af/lib_test/test_histogram.ml | ocaml | open Core.Std
open OUnit2
let d = List.range 1 10 |> List.map ~f:Float.of_int
let nd = [-10.0; -9.0; -8.0; -7.0; -6.0; -5.0; -4.0; -3.0; -2.0]
let test_zero _ =
let h = Histogram.create 10 in
assert_equal None (Histogram.median h)
let test_simple _ =
let h = List.fold d ~init:(Histogram.create 10) ~f:His... | |
e5c36590b09c36868a3d6a989ac3ad7dbb8328fad10b7ecd9046f1ecd631695e | bvaugon/ocapic | component.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/simulator/circuit/component.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Printf;;
open Simul;;
open Window;;
type led = {
led_x : int;
led_y : int;
led_radius : int;
led_color : Color.t;
led_pin : pin;
led_inv : bool;
}
t... |
226ec2d76565f7931775249df7f35aad93abc06a1a3e24f127f98d8f80634f7e | ocaml-multicore/effects-examples | algorithmic_differentiation.ml | Reverse - mode Algorithmic differentiation using effect handlers .
Adapted from .
See for more information .
Adapted from .
See for more information. *)
open Effect
open Effect.Deep
module F : sig
type t
val mk : float -> t
val (+.) : t -> t -> t
val ( *. ) : t -> t -> t
val grad : (t -... | null | https://raw.githubusercontent.com/ocaml-multicore/effects-examples/4f07e1774b726eec0f6769da0a16b402582d37b5/algorithmic_differentiation.ml | ocaml | f = x + x^3 =>
df/dx = 1 + 3 * x^2
f = x^2 + x^3 =>
df/dx = 2*x + 3 * x^2 | Reverse - mode Algorithmic differentiation using effect handlers .
Adapted from .
See for more information .
Adapted from .
See for more information. *)
open Effect
open Effect.Deep
module F : sig
type t
val mk : float -> t
val (+.) : t -> t -> t
val ( *. ) : t -> t -> t
val grad : (t -... |
62b92340196a60f50c5744a6a4a743733d143707c2a10aaf2adbe26f4d6ae494 | olsner/sedition | LivePred.hs | # LANGUAGE FlexibleInstances , GADTs , TypeFamilies , StandaloneDeriving , CPP , ScopedTypeVariables , FlexibleContexts #
module LivePred (livePredPass) where
import Compiler.Hoopl as H
--import Debug.Trace
import Collections
import IR
type LivePredFact = PredSet
liveLattice :: DataflowLattice LivePredFact
liveLat... | null | https://raw.githubusercontent.com/olsner/sedition/483e283289a84764eec71c39dd66b017b8b00bf8/LivePred.hs | haskell | import Debug.Trace | # LANGUAGE FlexibleInstances , GADTs , TypeFamilies , StandaloneDeriving , CPP , ScopedTypeVariables , FlexibleContexts #
module LivePred (livePredPass) where
import Compiler.Hoopl as H
import Collections
import IR
type LivePredFact = PredSet
liveLattice :: DataflowLattice LivePredFact
liveLattice = DataflowLattic... |
dda024bf29367f1e203fb9b0a8f3d69e689095c1f2ca35ab1d98ecf4cfed6608 | borodust/bodge-nanovg | packages.lisp | (uiop:define-package :nanovg
(:nicknames :nvg)
(:use :cl :alexandria)
(:export #:make-context
#:destroy-context
#:make-image
#:make-rgba-image
#:destroy-image))
| null | https://raw.githubusercontent.com/borodust/bodge-nanovg/57b72625979dfb5575720eea6ad46e0bb55f71e2/src/packages.lisp | lisp | (uiop:define-package :nanovg
(:nicknames :nvg)
(:use :cl :alexandria)
(:export #:make-context
#:destroy-context
#:make-image
#:make-rgba-image
#:destroy-image))
| |
4c5cbba337cdf64bd8b0315e07f12ac1194c7a5508989e771d70d75efa089cbb | cpsc411/cpsc411-pub | reader.rkt | #lang s-exp syntax/module-reader
racket
#:read $-read
#:read-syntax $-read-syntax
(require (prefix-in $- "../test-mlang.rkt"))
| null | https://raw.githubusercontent.com/cpsc411/cpsc411-pub/757ececf84d54d86cfa0c2c6c84f1456c8765db9/cpsc411-lib/cpsc411/test-lang/lang/reader.rkt | racket | #lang s-exp syntax/module-reader
racket
#:read $-read
#:read-syntax $-read-syntax
(require (prefix-in $- "../test-mlang.rkt"))
| |
8d04293b4c0213856aa052201d8ed65086ff697c4bc8251dd450a2f40a26c82d | input-output-hk/plutus | Code.hs | -- editorconfig-checker-disable-file
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RoleAnnot... | null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-tx/src/PlutusTx/Code.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
We do not use qualified import because the whole module contains off-chain code
The final type parameter is ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module PlutusTx.Code where
import PlutusCore qualified as PLC
import PlutusIR qualified as PIR
import Pl... |
b0c3de0332bf0d2c64af40affc55f1aad8569d732a34631a3f94c4f2611376f4 | haskell/haskell-ide-engine | FunctionalCodeActionsSpec.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module FunctionalCodeActionsSpec where
import Control.Applicative.Combinators
import Control.Lens hiding (List)
import Control.Monad
import Control.Monad.IO.Class
import Data.Aeson
import Data.Default
impor... | null | https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/functional/FunctionalCodeActionsSpec.hs | haskell | # LANGUAGE OverloadedStrings #
Evaluate became redundant id in later hlint versions
---------------------------------
Evaluate became redundant id in later hlint versions
---------------------------------
Evaluate became redundant id in later hlint versions
-----------------------------------
No Formatting:
---... | # LANGUAGE CPP #
module FunctionalCodeActionsSpec where
import Control.Applicative.Combinators
import Control.Lens hiding (List)
import Control.Monad
import Control.Monad.IO.Class
import Data.Aeson
import Data.Default
import qualified Data.HashMap.Strict as ... |
1b31b8c09360f8f941520ac3aa5c12d13e6850e3e72c3595040d1248f2b2061e | futurice/haskell-mega-repo | Integrations.hs | -- |
--
-- @
--
-- @
module Futurice.Integrations (
-- * Serv
Serv (..),
ServFUM, ServFUM6, ServGH, ServGO, ServOK, ServPE, ServPK, ServPM, ServPO, ServSL,
AllServs,
-- * Modules
module Futurice.Integrations.Classes,
module Futurice.Integrations.Types,
module Futurice.Integrations.Common... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/e301c08c8dfdcca048fe82fecce6bb2d02e9558a/futurice-integrations/src/Futurice/Integrations.hs | haskell | |
@
@
* Serv
* Modules | module Futurice.Integrations (
Serv (..),
ServFUM, ServFUM6, ServGH, ServGO, ServOK, ServPE, ServPK, ServPM, ServPO, ServSL,
AllServs,
module Futurice.Integrations.Classes,
module Futurice.Integrations.Types,
module Futurice.Integrations.Common,
module Futurice.Integrations.Monad,
) wher... |
183747fbf5ac3dce6ecf8c1ca2181ff12fc9c400a5a6802c4cc8a7f49954c0e5 | cxxxr/valtan | must-cons.lisp | Copyright ( C ) 2002 - 2004 , < >
;; ALL RIGHTS RESERVED.
;;
$ I d : must - cons.lisp , v 1.4 2004/02/20 07:23:42 yuji Exp $
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributions of sou... | null | https://raw.githubusercontent.com/cxxxr/valtan/ec3164d42b86869357dc185b747c5dfba25c0a3c/tests/sacla-tests/must-cons.lisp | lisp | ALL RIGHTS RESERVED.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistribu... | Copyright ( C ) 2002 - 2004 , < >
$ I d : must - cons.lisp , v 1.4 2004/02/20 07:23:42 yuji Exp $
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILIT... |
102fe4a620743e88713da4ae910d2e616f17647fc3e41daeb5c5a2065c1576f2 | lispgames/perfectstorm | launch.lisp |
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :asdf))
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:operate 'asdf:load-op :perfectstorm))
(in-package :storm)
(storm)
how to quit now ?
| null | https://raw.githubusercontent.com/lispgames/perfectstorm/a21e0420deb3ec83e9d776241ab37e78c5f29b94/perfectstorm/launch.lisp | lisp |
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :asdf))
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:operate 'asdf:load-op :perfectstorm))
(in-package :storm)
(storm)
how to quit now ?
| |
e557581148f0fe98b347d4d23d144b589f69dfb48ee8f0f5f22c1f25d529edf2 | 5HT/ant | CharCode.mli |
open Unicode.Types;
type cat_code =
[ Letter
| Newline
| Space
| Escape
| BeginGroup
| EndGroup
| BeginOptional
| EndOptional
| Macro
| Comment
| Other
| EOF
];
value macro_char : uc_char;
value comment_char : uc_char;
value escape_char : uc_char;
value begin_optional_char : uc_char;
value en... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Markup/CharCode.mli | ocaml |
open Unicode.Types;
type cat_code =
[ Letter
| Newline
| Space
| Escape
| BeginGroup
| EndGroup
| BeginOptional
| EndOptional
| Macro
| Comment
| Other
| EOF
];
value macro_char : uc_char;
value comment_char : uc_char;
value escape_char : uc_char;
value begin_optional_char : uc_char;
value en... | |
372da2fc2c260150663bab94924ed6705bb8304569561364372a484e2d0ea74d | xxyzz/SICP | Exercise_4_26.rkt | #lang racket/base
(define (unless? exp) (tagged-list? exp 'unless))
(define (unless->if exp)
(make-if (cadr exp)
(cadddr exp)
(caddr exp)))
(define primitive-procedures
(list (list 'car car)
(list 'cdr cdr)
(list 'cons cons)
(list 'null? null?)
(list 'list lis... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/4_Metalinguistic_Abstraction/4.2_Variations_on_a_Scheme_Lazy_Evaluation/Exercise_4_26.rkt | racket | 'ok
Unbound variable unless
`unless` is not a procedure | #lang racket/base
(define (unless? exp) (tagged-list? exp 'unless))
(define (unless->if exp)
(make-if (cadr exp)
(cadddr exp)
(caddr exp)))
(define primitive-procedures
(list (list 'car car)
(list 'cdr cdr)
(list 'cons cons)
(list 'null? null?)
(list 'list lis... |
9735e9ed5e2c932439620218d3805dfee67d038a12561614efdab329da8948ad | evincarofautumn/kitten | Quantify.hs | |
Module : Kitten . Quantify
Description : Quantifying generic terms
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.Quantify
Description : Quantifying generic terms
Copyright : (c) Jon Purdy, 2016
License : ... | null | https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Quantify.hs | haskell | to an expression, thereby making the expression generic, e.g.:
>
> Λβ:*. dup | |
Module : Kitten . Quantify
Description : Quantifying generic terms
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.Quantify
Description : Quantifying generic terms
Copyright : (c) Jon Purdy, 2016
License : ... |
ccb31baec72289e7e18baa0c21c13afaa5553b8920e0123db5a76b05d00660a4 | bmeurer/ocaml-experimental | fileselect.ml | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/browser/fileselect.ml | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open StdLabels
open Str
open... |
56e4ca4dfe09088b947d7371aa68c9a4c0e80272a17260e0099aeadb0d05606e | PuercoPop/Movitz | symbols.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2001 - 2004 ,
Department of Computer Science , University of Tromso , Norway .
;;;;
;;;; For distribution policy, see the accompanying file COPYING.
;;;;
;;;; Filename: symbols.lisp
;;;; Description: Symbo... | null | https://raw.githubusercontent.com/PuercoPop/Movitz/7ffc41896c1e054aa43f44d64bbe9eaf3fcfa777/losp/muerte/symbols.lisp | lisp | ------------------------------------------------------------------
For distribution policy, see the accompanying file COPYING.
Filename: symbols.lisp
Description: Symbol accessors.
Created at: Tue Sep 4 23:55:41 2001
---------------------------------------------... | Copyright ( C ) 2001 - 2004 ,
Department of Computer Science , University of Tromso , Norway .
Author : < >
$ I d : symbols.lisp , v 1.31 2008 - 04 - 21 19:43:47 ffjeld Exp $
(require :muerte/basic-macros)
(require :muerte/typep)
(provide :muerte/symbols)
(in-package muerte)
(define-compil... |
d6ac0ab410fe97b5fb38d30356ffce488ef53ae766623b1430878baefbc83f41 | overtone/overtone | demand.clj | (ns overtone.sc.cgens.demand
(:use [overtone.sc defcgen ugens]
[overtone.helpers lib]))
(defcgen duty
"Demand results according to a stream of duration values"
[dur {:default 1.0 :doc "time values. Can be a demand ugen or any signal. The next level is acquired after duration.
"}
reset {:default 0.0 :d... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/cgens/demand.clj | clojure | (ns overtone.sc.cgens.demand
(:use [overtone.sc defcgen ugens]
[overtone.helpers lib]))
(defcgen duty
"Demand results according to a stream of duration values"
[dur {:default 1.0 :doc "time values. Can be a demand ugen or any signal. The next level is acquired after duration.
"}
reset {:default 0.0 :d... | |
faf32695ab0b8017e78f0821ececea6ab1e6803a7b4fc198a5ea58de7c765311 | melange-re/melange | js_fold.ml |
open J
let [@inline] unknown _self _ = _self
let [@inline] option sub self = fun v ->
match v with
| None -> self
| Some x -> sub self x
let rec list (sub : 'self_type -> 'a -> 'self_type) self = fun v ->
match v with
| [] -> self
| x::xs ->
let self = sub ... | null | https://raw.githubusercontent.com/melange-re/melange/24083b39f10d8df40a786d890d7530b514ba70a4/jscomp/core/js_fold.ml | ocaml |
open J
let [@inline] unknown _self _ = _self
let [@inline] option sub self = fun v ->
match v with
| None -> self
| Some x -> sub self x
let rec list (sub : 'self_type -> 'a -> 'self_type) self = fun v ->
match v with
| [] -> self
| x::xs ->
let self = sub ... | |
00a17635ed80638e1958cd4f75685040bb6d1703dd1048ccd8b34964eb166562 | heyoka/dfs | dfs_std_lib.erl | Date : 21.02.17 - 13:45
Ⓒ 2017 LineMetrics GmbH
-module(dfs_std_lib).
-author("Alexander Minichmair").
%% API
-export([
bool/1,
int/1,
float/1,
string/1]).
-export([
abs/1,
round/1,
floor/1,
min/2,
max/2]
).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | null | https://raw.githubusercontent.com/heyoka/dfs/ad9e4abb857bd5535b37db1ec7acd7e2323bb105/src/dfs_std_lib.erl | erlang | API
Data Type Conversions
@doc type conversion to a boolean value
any empty binary or binary-string : 'false',
the atom false: 'false',
anything else : 'true'
@doc type conversion to an integer value
@doc type conversion to a float value
@doc type conversion to a binary-string value
String Manipulati... | Date : 21.02.17 - 13:45
Ⓒ 2017 LineMetrics GmbH
-module(dfs_std_lib).
-author("Alexander Minichmair").
-export([
bool/1,
int/1,
float/1,
string/1]).
-export([
abs/1,
round/1,
floor/1,
min/2,
max/2]
).
any number less than zero : ' false ' ,
-spec bool(any()) -> true|false.
bool(V) ... |
d83cef9c38a9008e959d6c5ef5378996f8523c19c2b9189dfc5eff65bf2a6fe5 | circuithub/rel8 | OnConflict.hs | # language DuplicateRecordFields #
{-# language FlexibleContexts #-}
# language GADTs #
# language LambdaCase #
# language NamedFieldPuns #
# language RecordWildCards #
# language StandaloneKindSignatures #
# language StrictData #
module Rel8.Statement.OnConflict
( OnConflict(..)
, Upsert(..)
, ppOnConflict
)
... | null | https://raw.githubusercontent.com/circuithub/rel8/5d2b9e4cdaa3ebcdaf49a66f39db0913df020e44/src/Rel8/Statement/OnConflict.hs | haskell | # language FlexibleContexts #
base
opaleye
pretty
rel8
| 'OnConflict' represents the @ON CONFLICT@ clause of an @INSERT@
rows proposed for insertion conflict with an existing row in the table.
^ Abort the transaction if there are conflicting rows (Postgres' default)
^ @ON CONFLICT DO NOTHING@
^ @ON CONFLICT DO... | # language DuplicateRecordFields #
# language GADTs #
# language LambdaCase #
# language NamedFieldPuns #
# language RecordWildCards #
# language StandaloneKindSignatures #
# language StrictData #
module Rel8.Statement.OnConflict
( OnConflict(..)
, Upsert(..)
, ppOnConflict
)
where
import Data.Foldable ( toLi... |
19636769dce190f6f6fb2e53bedbf1d8783a3a65760338e6ea8fae45fb80e35d | jordanthayer/ocaml-search | potential_hhat.ml | *
@author @since 2011 - 06 - 18
@author jordan
@since 2011-06-18
*)
type fp_values = {
h : float;
d : float;
h_err : float;
d_err : float;
g : float;
f : float;
est_f : float;
est_d : float;
potential : float;
}
type int_vals = {
mutable pos : int;
depth : int... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/bounded_cost/potential_hhat.ml | ocaml | ************** Utility functions *************
* Performs an A* search from the initial state to a goal,
for domains where duplicates are frequently encountered.
must have g=0 as base for others, and
f<others to prevent re-opening | *
@author @since 2011 - 06 - 18
@author jordan
@since 2011-06-18
*)
type fp_values = {
h : float;
d : float;
h_err : float;
d_err : float;
g : float;
f : float;
est_f : float;
est_d : float;
potential : float;
}
type int_vals = {
mutable pos : int;
depth : int... |
b65ba7116cafccd5282f132e51504eb5704950aaf82e350ddb040d521c08b8fa | thoughtbot/typebot | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
module Utils (removeCommandChars, authorized, requireParameter, lookupParameter, opts) where
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ask, lift)
import Data.Default.Class (def)
import Data.Maybe (catMaybes, isJust, l... | null | https://raw.githubusercontent.com/thoughtbot/typebot/b9b53e4e90835928e302ae8bf3112f334c718ab2/src/Utils.hs | haskell | # LANGUAGE OverloadedStrings # |
module Utils (removeCommandChars, authorized, requireParameter, lookupParameter, opts) where
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ask, lift)
import Data.Default.Class (def)
import Data.Maybe (catMaybes, isJust, listToMaybe)
import Data.T... |
026c74d17919d3e8574a3bb71597c89a899657f26c06e2d85def0b0355f1522a | gonzojive/elephant | RUNTEST.lisp | ;;; RUNTEST.lisp
;;;
;;; part of
;;;
Elephant : an object - oriented database for Common Lisp
;;;
Copyright ( c ) 2005,2006,2007 by
;;; <>
;;;
;;; Elephant users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
;;; (), also known as the L... | null | https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/tests/RUNTEST.lisp | lisp | RUNTEST.lisp
part of
<>
Elephant users are granted the rights to distribute and use this software
(), also known as the LLGPL.
Test BDB backend
Test Postmodern interface to Postgres
in order for this to work.
The Postemodern interface also apparently requries that "plpgsql language be loaded as
a query l... | Elephant : an object - oriented database for Common Lisp
Copyright ( c ) 2005,2006,2007 by
as governed by the terms of the Lisp Lesser GNU Public License
If you are only using one back - end , you may prefer :
SQLDB-test.lisp or BerkeleyDB-tests.lisp
(asdf:operate 'asdf:load-op :elephant)
(asdf:operate 'a... |
acaa2e851d851e8fce3a180b79c792bd91026d7cd669ec095fbbde2ab242d094 | jacekschae/learn-re-frame-course-files | core.cljs | (ns app.core
(:require [reagent.core :as r]
[re-frame.core :as rf]
[app.db]
;; -- auth --
[app.auth.views.profile :refer [profile]]
;; -- become-a-chef --
[app.become-a-chef.views.become-a-chef :refer [become-a-chef]]
;; -- inbox --
... | null | https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/11-public/src/app/core.cljs | clojure | -- auth --
-- become-a-chef --
-- inbox --
-- nav --
-- recipes -- | (ns app.core
(:require [reagent.core :as r]
[re-frame.core :as rf]
[app.db]
[app.auth.views.profile :refer [profile]]
[app.become-a-chef.views.become-a-chef :refer [become-a-chef]]
[app.inbox.views.inboxes :refer [inboxes]]
[app.nav.views.nav :re... |
b8cf49b1d44c2354ece7361e8024e757d2ca891c74d89fb6d462d17916162fa2 | peak6/mmd_core | pub.erl | Copyright 2012 PEAK6 Investments , L.P.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/peak6/mmd_core/f90469ea9eac8cd607aa6ec5b9ad6ff003a35572/src/pub.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2012 PEAK6 Investments , L.P.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author
( C ) 2012 , PEAK6 Investments , L.P.
Created : Thr May 03 09:19:16 CDT 2011
-module(pub).
-export([start_link/0]).
-... |
869fcf323558705e1715eb5a6afc69ac66bec9d5b6bbb9377f05cdbf5eb52208 | narkisr-deprecated/core | gc.clj | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
Licensed under the Apache License,
Version 2.0 (the "License") you may not use this file except in compliance with the License.
You may obtain a copy of the License at -2.0
Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/openstack/gc.clj | clojure | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
Licensed under the Apache License,
Version 2.0 (the "License") you may not use this file except in compliance with the License.
You may obtain a copy of the License at -2.0
Unless required by applicable law or agreed to in writing, software
... | |
99e9050fcfd8b9664c7a1b35210a07ac5e975b92895f53e258650e757d899b4c | mirage/mirage-clock | mirage_clock.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/mirage-clock/74a02c9df3770bcd9d704c39cc6582b11f80e551/src/mirage_clock.ml | ocaml | * Clock devices for MirageOS
This module define clock devices signatures for MirageOS.
{e Release %%VERSION%%}
* [period_d_ps ()] is [Some (d, ps)] representing the clock's picosecond
period [d] * 86'400e12 + [ps], if known. [ps] is in the range
\[[0];[86_399_999_999_999_999L]\].
* [period_ns ()... |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
24aff2d47b4ccb1cf8e4df74ac7e8052c6f86f5033164ff00d2648c25bb4d0e2 | erlangonrails/devdb | ejabberd_auth_external.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_auth_external.erl
Author : < >
%%% Purpose : Authentification via LDAP external script
Created : 12 Dec 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free sof... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/ejabberd_auth_external.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_auth_external.erl
Purpose : Authentification via LDAP external script
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope t... | Author : < >
Created : 12 Dec 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
3bae39e24a5d546648946d6735cb750f899bd065dc85c18c5f8194968b4d8c1f | adinapoli/mandrill | Online.hs | {-# LANGUAGE OverloadedStrings #-}
module Online where
import Data.Aeson
import qualified Data.ByteString.Char8 as C8
import Data.Either
import Network.API.Mandrill.Messages.Types
import Network.API.Mandrill.Users.Types
import RawData
import Tes... | null | https://raw.githubusercontent.com/adinapoli/mandrill/3e57e9a2851df70a21ffe96c0cca14a575923334/test/Online.hs | haskell | # LANGUAGE OverloadedStrings #
Users calls
Messages calls
Inbound calls
| module Online where
import Data.Aeson
import qualified Data.ByteString.Char8 as C8
import Data.Either
import Network.API.Mandrill.Messages.Types
import Network.API.Mandrill.Users.Types
import RawData
import Test.QuickCheck
import Test.... |
f56c7610ffce1c6f3659fcfd3d8dbb14962cbbc925c88f3cd9c7095cc0035fd3 | avsm/eeww | atomic.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/avsm/eeww/23ca8b36127b337512e13c6fb8e86b3a7254d4f9/boot/ocaml/stdlib/atomic.mli | ocaml | ************************************************************************
OCaml
... | , University of Cambridge
, projet Partout , INRIA Paris - Saclay
Copyright 2017 - 2018 University of Cambridge .
Copyright 2020 Institut National de Recherche en Informatique et
the GNU Lesser General Public License ... |
644a7471b1498a6ab79353f03d830c87f04bd3c53b9392e1b1952da8c18d4db7 | nd/sicp | 2.22.scm | (define (square-list items)
(define (iter things result)
(if (null? things)
result
(iter (cdr things)
(append result (list (square (car things)))))))
(iter items (list))) | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch02/2.22.scm | scheme | (define (square-list items)
(define (iter things result)
(if (null? things)
result
(iter (cdr things)
(append result (list (square (car things)))))))
(iter items (list))) | |
93a2d381afba1bb242498b9a9fd0bc882a26e7f42564b3e7a01a76f2badc3964 | inhabitedtype/angstrom | pure_benchmark.ml | open Core
open Core_bench
let read file =
let open Unix in
let size = Int64.to_int_exn (stat file).st_size in
let buf = Bytes.create size in
let rec loop pos len fd =
let n = read ~pos ~len ~buf fd in
if n > 0 then loop (pos + n) (len - n) fd
in
with_file ~mode:[O_RDONLY] file ~f:(fun fd ->
lo... | null | https://raw.githubusercontent.com/inhabitedtype/angstrom/f3bc7269f7ad41e8d8ca3d740117716d37d1a6cd/benchmarks/pure_benchmark.ml | ocaml | open Core
open Core_bench
let read file =
let open Unix in
let size = Int64.to_int_exn (stat file).st_size in
let buf = Bytes.create size in
let rec loop pos len fd =
let n = read ~pos ~len ~buf fd in
if n > 0 then loop (pos + n) (len - n) fd
in
with_file ~mode:[O_RDONLY] file ~f:(fun fd ->
lo... | |
016e4339e181c1ca2083eb9843b15cad0de04095dc94ded7f0186b6d6767653a | bubba/lsp-test | Decoding.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE TypeInType #-}
module Language.LSP.Test.Decoding where
import Prelude hiding ( id )
import Data.Aeson
import Data.Aeson.Types
import Data... | null | https://raw.githubusercontent.com/bubba/lsp-test/e5f79572bad3163f6f60a3f9254e8eda9e78f8b9/src/Language/LSP/Test/Decoding.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
# LANGUAGE TypeInType #
| Fetches the next message bytes based on
the Content-Length header | # LANGUAGE TupleSections #
# LANGUAGE KindSignatures #
module Language.LSP.Test.Decoding where
import Prelude hiding ( id )
import Data.Aeson
import Data.Aeson.Types
import Data.Foldable
import Data.Functor.Product
import Data.Functor.Const
im... |
6332f28692bf25569a725f0bc8f073be2186c7f80b8a00cb3f081e9bd14307d7 | maitria/packthread | core.cljs | (ns packthread.core
(:require-macros packthread.core))
| null | https://raw.githubusercontent.com/maitria/packthread/b283c3f3ba439a0d39f53288a4deb274e27345fe/src/packthread/core.cljs | clojure | (ns packthread.core
(:require-macros packthread.core))
| |
36e9269fef767bc901f557d57b07a9d7a2c025f224f5f0f7724ac49ff60e86d7 | sebsheep/elm2node | String.hs | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
# LANGUAGE BangPatterns , MagicHash , OverloadedStrings , UnboxedTuples #
module Parse.String
( string
, character
)
where
import qualified Data.Utf8 as Utf8
import Data.Word (Word8, Word16)
import Foreign.Ptr (Ptr, plusPtr, minusPtr)
import qualified El... | null | https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Parse/String.hs | haskell | CHARACTER
'
'
\n
"
\
STRINGS
"
SINGLE STRINGS
"
\n
'
\
MULTI STRINGS
"
'
\n
\
ESCAPE CHARACTERS
n
r
t
"
'
\
u
{
}
'
"
n
r
replacement character | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
# LANGUAGE BangPatterns , MagicHash , OverloadedStrings , UnboxedTuples #
module Parse.String
( string
, character
)
where
import qualified Data.Utf8 as Utf8
import Data.Word (Word8, Word16)
import Foreign.Ptr (Ptr, plusPtr, minusPtr)
import qualified El... |
9dd8ff34979b386434fed198f25c1dbf3529252aa7cc3f5e8bfa27cacf92a982 | alesaccoia/festival_flinger | scfg.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;;; ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/scfg.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission is hereby granted, free of charge, to use and distribute ;;
this softwar... |
(require_module 'parser)
(define (scfg_simplify tree)
"(scfg_brackets_only tree)
Output only the bracketing and the bottom level pos and words."
(cond
((not tree) nil)
((car (cdr (assoc 'pos (car (cdr (car tree))))))
(list
(car (cdr (assoc 'pos (car (cdr (car tree))))))
(car (car tree))))
(... |
ac8f7ec45a9c6cab406163fe1a433fdf6b68bb09935e1be56c3810a7916853fd | ragkousism/Guix-on-Hurd | scripts.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/scripts.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (test-scripts)
#:use-module (guix scripts)
#:use-module ((guix scripts build)
... |
e2f88599328198795db66aabdf90c3aafdf8d4947fc1f831f4bc24aa9093e25d | montelibero-org/veche | About.hs | # LANGUAGE TemplateHaskell #
module Handler.About (getAboutR) where
import Import
getAboutR :: Handler Html
getAboutR = defaultLayout $(widgetFile "about")
| null | https://raw.githubusercontent.com/montelibero-org/veche/d3d92b47006381e230fd0355228ba4ec28905901/veche-web/src/Handler/About.hs | haskell | # LANGUAGE TemplateHaskell #
module Handler.About (getAboutR) where
import Import
getAboutR :: Handler Html
getAboutR = defaultLayout $(widgetFile "about")
| |
85692abfd70e5779a830de969ba79d1d336cb76b515018d1f1e10327384602d9 | quil-lang/qvm | grovel-shared-memory.lisp | (in-package #:qvm)
#+unix
(progn
;; Includes - POSIX
(include "sys/mman.h")
(include "sys/stat.h")
(include "stddef.h")
(include "fcntl.h")
;; Types
(ctype size_t "size_t")
(ctype mode_t "mode_t")
(ctype off_t "off_t")
;; Constants/Enums
(constant ($map-failed "MAP_FAILED") :optional nil)
(co... | null | https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/src/grovel-shared-memory.lisp | lisp | Includes - POSIX
Types
Constants/Enums
Variables | (in-package #:qvm)
#+unix
(progn
(include "sys/mman.h")
(include "sys/stat.h")
(include "stddef.h")
(include "fcntl.h")
(ctype size_t "size_t")
(ctype mode_t "mode_t")
(ctype off_t "off_t")
(constant ($map-failed "MAP_FAILED") :optional nil)
(constant ($map-shared "MAP_SHARED") :optional nil)
(c... |
d3af20af36b539451492f80a0636d8d4ad2de7edb632beaa99abb26dc5a5b44f | craigfe/ppx_irmin | raise.ml |
* Copyright ( c ) 2019 - 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/craigfe/ppx_irmin/06d764c6f1049131f1c4c7a3fbc59ff516c9d679/lib/raise.ml | ocaml |
* Copyright ( c ) 2019 - 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | |
14f9875483b67108d6de16f3a8d5927274923af5a6ab30ab61251268bf76afa9 | OCamlPro/ocamlexc | list.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/stdlib/list.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : list.ml , v 1.1 1998/08/19 13:29:07 pessaux Exp $
let rec length_aux len = function
[] -> len
... |
806043526c9ab67194ce360d6304e270e4344be84cd1bf59d1768b4ec7b96157 | haskell-tools/haskell-tools | Function_res.hs | module Refactor.RenameDefinition.Function where
q :: Int -> Int
q x = x
g = q | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/RenameDefinition/Function_res.hs | haskell | module Refactor.RenameDefinition.Function where
q :: Int -> Int
q x = x
g = q | |
490378cb09fed8f8709fd7205f6a14ba0fbb985fd98472f6d39b27c7cc33b4a9 | facebook/flow | getDef_js.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/c58b3d503aeaaa955275d68aaa244aade5d5c1be/src/services/get_def/getDef_js.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
8ca4048763704513a3fd50c383a0c826eca5ad176241ecd448b1c0eda249949f | input-output-hk/cardano-wallet | ExtraSigs.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TypeFamilies #
-- |
Copyright : © 2020 - 2022 IOHK
-- License: Apache-2.0
--
module Cardano.Wallet.Read.Primitive.Tx.Features.ExtraSigs
( extraSigs )
where
import Prelude
import Cardano.Crypto.Hash
( H... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/0694cbed340204f6036d80fb75a1014a59260ae0/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/ExtraSigs.hs | haskell | |
License: Apache-2.0
| # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TypeFamilies #
Copyright : © 2020 - 2022 IOHK
module Cardano.Wallet.Read.Primitive.Tx.Features.ExtraSigs
( extraSigs )
where
import Prelude
import Cardano.Crypto.Hash
( Hash (..) )
import Cardano.Ledge... |
47cf41dfcba9e07c0871ec65c63cb6bb4f0dff881dc90e1225159dcd788fbe33 | samrushing/irken-compiler | fetch.scm | ;; -*- Mode: Irken -*-
(require "lib/basis.scm")
(require "doom/doom.scm")
(define (fetch-head ip)
(let ((sock (doom/make (tcp4-sock)))
(addr (address/make4 ip 80)))
(sock.connect addr)
(sock.send "HEAD / HTTP/1.0\r\n\r\n")
(printf (string (sock.recv)) "\n")
(sock.close)
))
(let ((ip "72.52.84... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/doom/fetch.scm | scheme | -*- Mode: Irken -*- |
(require "lib/basis.scm")
(require "doom/doom.scm")
(define (fetch-head ip)
(let ((sock (doom/make (tcp4-sock)))
(addr (address/make4 ip 80)))
(sock.connect addr)
(sock.send "HEAD / HTTP/1.0\r\n\r\n")
(printf (string (sock.recv)) "\n")
(sock.close)
))
(let ((ip "72.52.84.226"))
(poller/fork ... |
615126eee0805474d83e2c518056818ec140602a8d5700fe9642a3bcd1a23f7c | aggieben/weblocks | dataview.lisp |
(in-package :weblocks-test)
;;; Test view-caption
(deftest dataview-view-caption-1
(view-caption (make-instance 'data-view
:caption "foo"))
"foo")
;;; Test data view with-view-header
(deftest-html data-view-with-view-header-1
(with-view-header (make-instance 'data-view)
*joe* nil
(lambda (... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/views/dataview/dataview.lisp | lisp | Test view-caption
Test data view with-view-header
Test data view render-view-field
Test data view render-view-field-value
Test highlight-regex-matches
Test data view print-view-field-value
Test data view render-object-view
Test render-view (we'll test on data view) |
(in-package :weblocks-test)
(deftest dataview-view-caption-1
(view-caption (make-instance 'data-view
:caption "foo"))
"foo")
(deftest-html data-view-with-view-header-1
(with-view-header (make-instance 'data-view)
*joe* nil
(lambda (&rest args)
(declare (ignore args))))
#.(data-header-te... |
771405afdf938cb163131e79501e54150495486edee250f242fed630052b7663 | UU-ComputerScience/uhc | C.hs | # LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -XNoImplicitPrelude #
# EXCLUDE_IF_TARGET js #
{-# EXCLUDE_IF_TARGET cr #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C
Copyright : ( c ) The FFI task force 2001
-- License : BSD-style (see the fi... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/uhcbase/Foreign/C.hs | haskell | # EXCLUDE_IF_TARGET cr #
---------------------------------------------------------------------------
|
Module : Foreign.C
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
---------------------------------------------------------------------... | # LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -XNoImplicitPrelude #
# EXCLUDE_IF_TARGET js #
Copyright : ( c ) The FFI task force 2001
Maintainer :
Bundles the C specific FFI library functionality
module Foreign.C
( module Foreign.C.Types
, module Foreign.C.String
, module Foreig... |
ae8bbbbc1e58a11653392fa7923eed8c320e5cbb91f45e1befeeb90e86d0b65c | cyverse-archive/DiscoveryEnvironmentBackend | c210_2015080701.clj | (ns facepalm.c210-2015080701
(:use [korma.core]))
(def ^:private version
"The destination database version."
"2.1.0:20150807.01")
(defn convert
[]
(println "Performing the conversion for" version)
(exec-raw "ALTER TABLE attributes ALTER COLUMN required SET DEFAULT FALSE"))
| null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/databases/metadata/src/main/conversions/c210_2015080701.clj | clojure | (ns facepalm.c210-2015080701
(:use [korma.core]))
(def ^:private version
"The destination database version."
"2.1.0:20150807.01")
(defn convert
[]
(println "Performing the conversion for" version)
(exec-raw "ALTER TABLE attributes ALTER COLUMN required SET DEFAULT FALSE"))
| |
d521c37a3d88d35cc6881138639a9b5b98815fcf77f5cdbbb5db691944286887 | simingwang/emqx-plugin-kafkav5 | inet.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/inet.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1997 - 2021 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(inet).
-include("inet.hrl").
-include("inet_int.hrl").
-include("inet_sctp.hrl").
-export([peername/1, sock... |
5a6e97e25b2bf360687b9718ce09649a67179052c7ea8591035be4bde9798a5f | erlang/rebar3 | rebar_prv_packages.erl | -module(rebar_prv_packages).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
-include_lib("providers/include/providers.hrl").
-define(PROVIDER, pkgs).
-define(DEPS, []).
-spec init(rebar_state:t()) -> {ok, reba... | null | https://raw.githubusercontent.com/erlang/rebar3/2189a408d6c8ae239f730ca41a5ad3c651a90643/apps/rebar/src/rebar_prv_packages.erl | erlang | -module(rebar_prv_packages).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
-include_lib("providers/include/providers.hrl").
-define(PROVIDER, pkgs).
-define(DEPS, []).
-spec init(rebar_state:t()) -> {ok, reba... | |
f3da5dad8d6543e8b6330fc87a83b02dfcc3528b9eb4d81b720c03d3d9fcd357 | uw-unsat/serval-sosp19 | riscv-common.rkt | #lang rosette
(require (prefix-in riscv: serval/riscv/interp))
(provide (all-defined-out))
(define DEFAULT_SIZE 4)
(define (rv_r_insn rs2 rs1 rd opcode)
(riscv:instr opcode rd rs1 rs2 #f DEFAULT_SIZE))
(define (rv_i_insn imm11_0 rs1 rd opcode)
(riscv:instr opcode rd rs1 #f (if (integer? imm11_0) (bv imm11_0 12... | null | https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/bpf/jit/riscv-common.rkt | racket | #lang rosette
(require (prefix-in riscv: serval/riscv/interp))
(provide (all-defined-out))
(define DEFAULT_SIZE 4)
(define (rv_r_insn rs2 rs1 rd opcode)
(riscv:instr opcode rd rs1 rs2 #f DEFAULT_SIZE))
(define (rv_i_insn imm11_0 rs1 rd opcode)
(riscv:instr opcode rd rs1 #f (if (integer? imm11_0) (bv imm11_0 12... | |
bf715b7067407edc099b881e6b91a469e23e20ae9b8b94f1277d97a617c5568f | rwmjones/guestfs-tools | sysprep_operation_udev_persistent_net.ml | virt - sysprep
* Copyright ( C ) 2012 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ver... | null | https://raw.githubusercontent.com/rwmjones/guestfs-tools/3a498512f58bc431db490e96cdb712b19389bda4/sysprep/sysprep_operation_udev_persistent_net.ml | ocaml | virt - sysprep
* Copyright ( C ) 2012 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ver... | |
59e7ff26ebbaba24a1a2b6c0731d872d9f707282310ccee552d1b3de7cf718b4 | re-ops/re-cog | file.clj | (ns re-cog.scripts.file
"FS scripts"
(:require [pallet.stevedore :refer (script)]))
(defn purge [n dest]
(let [arg-n (str "+" n)]
(script
;; ls -tp | grep -v '/$' | tail -n +6 | xargs -I {} rm -- {}
("cd" ~dest)
(pipe
(pipe
(pipe ("/bin/ls" "-tp") ("/bin/grep" "-v" "'/$'"))
... | null | https://raw.githubusercontent.com/re-ops/re-cog/025b26e9e3911e34a16ae91c739c74342d91f5c1/src/re_cog/scripts/file.clj | clojure | ls -tp | grep -v '/$' | tail -n +6 | xargs -I {} rm -- {} | (ns re-cog.scripts.file
"FS scripts"
(:require [pallet.stevedore :refer (script)]))
(defn purge [n dest]
(let [arg-n (str "+" n)]
(script
("cd" ~dest)
(pipe
(pipe
(pipe ("/bin/ls" "-tp") ("/bin/grep" "-v" "'/$'"))
("/usr/bin/tail" "-n" ~arg-n))
("/usr/bin/xargs" "-I" "{}" ... |
a327bdcc1aae2e07d33cae4fc8d96f13d78fd1c423bda5db847d541b93347645 | CodyReichert/qi | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - ppcre / specials.lisp , v 1.43 2009/10/28 07:36:15 edi Exp $
;;; globally declared special variables
Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in ... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-ppcre-master/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
globally declared special variables
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
n... | $ Header : /usr / local / cvsrep / cl - ppcre / specials.lisp , v 1.43 2009/10/28 07:36:15 edi Exp $
Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-packa... |
66f885350888bf2a55232d7cf5e5e69592e74bebcea74bb1445e68e27fbd69e8 | bobzhang/fan | gram_pat.ml | let pp_print_string = StdFan.pp_print_string
let pp_print_vid' = Objs.pp_print_vid'
let pp_print_vid = Objs.pp_print_vid
let pp_print_alident = Objs.pp_print_alident
let pp_print_ant = Objs.pp_print_ant
let fprintf = Format.fprintf
open Astf
let pp_print_loc = function | _f -> (function | _loc -> ())
class mapbase =
... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/tests/asts/failed_eq/gram_pat.ml | ocaml | let pp_print_string = StdFan.pp_print_string
let pp_print_vid' = Objs.pp_print_vid'
let pp_print_vid = Objs.pp_print_vid
let pp_print_alident = Objs.pp_print_alident
let pp_print_ant = Objs.pp_print_ant
let fprintf = Format.fprintf
open Astf
let pp_print_loc = function | _f -> (function | _loc -> ())
class mapbase =
... | |
e85d7958066df05a4659be3fc1d32e69df641e4ba33422ff0df953549ff60f00 | mfikes/fifth-postulate | ns219.cljs | (ns fifth-postulate.ns219)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns219.cljs | clojure | (ns fifth-postulate.ns219)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
0973face4cb3730317b9a9e0927ffe4b420f5a2816029040d4ac9fe187607f56 | clash-lang/clash-compiler | VMerge.hs | module VMerge where
import Clash.Prelude
import Clash.Explicit.Testbench
topEntity :: (Vec 2 Int,Vec 2 Int) -> Vec 4 Int
topEntity (x,y) = merge x y
{-# NOINLINE topEntity #-}
testBench :: Signal System Bool
testBench = done
where
testInput = pure (iterateI (+1) 1,iterateI (+1) 3)
expectedOutput = out... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Vector/VMerge.hs | haskell | # NOINLINE topEntity # | module VMerge where
import Clash.Prelude
import Clash.Explicit.Testbench
topEntity :: (Vec 2 Int,Vec 2 Int) -> Vec 4 Int
topEntity (x,y) = merge x y
testBench :: Signal System Bool
testBench = done
where
testInput = pure (iterateI (+1) 1,iterateI (+1) 3)
expectedOutput = outputVerifier' clk rst ((1:>3... |
c1a1d80c3bb3b5f0f9ab736d4f899f33924e62e5da71607c38b02fe7c775849c | astrada/ocaml-extjs | ext_dd_DDProxy.mli | * A DragDrop implementation that inserts an empty , b ...
{ % < p > A DragDrop implementation that inserts an empty , bordered div into
the document that follows the cursor during drag operations . At the time of
the click , the frame div is resized to the dimensions of the linked html
element , and move... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_dd_DDProxy.mli | ocaml | * {% <p>By default the frame is positioned exactly where the drag element is, so
we use the cursor offset provided by <a href="#!/api/Ext.dd.DD" rel="Ext.dd.DD" class="docClass">Ext.dd.DD</a>. Another option that works only if
you do not have constraints on the obj is to have the drag frame centered
around the cursor.... | * A DragDrop implementation that inserts an empty , b ...
{ % < p > A DragDrop implementation that inserts an empty , bordered div into
the document that follows the cursor during drag operations . At the time of
the click , the frame div is resized to the dimensions of the linked html
element , and move... |
d6ceecfa11bec2a5dcc2e3597511d165005208315e987ae63d4d5d2d066435b7 | MichaelXavier/cron | Cron.hs | # LANGUAGE RecordWildCards #
TODO : internal module , quickcheck
module System.Cron
( module System.Cron.Types
, module System.Cron.Parser
, module System.Cron.Schedule
, module System.Cron.Describe
, scheduleMatches
, nextMatch
) where
-----------------------------------------------------... | null | https://raw.githubusercontent.com/MichaelXavier/cron/4e0db74b626ba10279c1761834cfa9814642e595/src/System/Cron.hs | haskell | -----------------------------------------------------------------------------
----------------------------------------------------------------------------- | # LANGUAGE RecordWildCards #
TODO : internal module , quickcheck
module System.Cron
( module System.Cron.Types
, module System.Cron.Parser
, module System.Cron.Schedule
, module System.Cron.Describe
, scheduleMatches
, nextMatch
) where
import System.Cron.Internal.Check
import ... |
5e58103660d3b9ba12b418944343a8b5575ed73fe2166512fc0d72601a53848c | TrustInSoft/tis-interpreter | dataflow2.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/analysis/dataflow2.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
390329e41a4c3c10a176d83e7ec6d326749ec2f653196e8b585ff52950e114e3 | footprintanalytics/footprint-web | markdown_test.clj | (ns metabase.pulse.markdown-test
(:require [clojure.test :refer :all]
[metabase.public-settings :as public-settings]
[metabase.pulse.markdown :as markdown]
[metabase.test.util :as tu]))
(defn- slack
[markdown]
(markdown/process-markdown markdown :slack))
(defn- escape
[text... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/pulse/markdown_test.clj | clojure | (ns metabase.pulse.markdown-test
(:require [clojure.test :refer :all]
[metabase.public-settings :as public-settings]
[metabase.pulse.markdown :as markdown]
[metabase.test.util :as tu]))
(defn- slack
[markdown]
(markdown/process-markdown markdown :slack))
(defn- escape
[text... | |
1af738a2752ac5ec94b2f9f3b345ab69a13f40f8ae051e7453dd7f86ad4d01cf | keera-studios/haskell-game-programming | example1.hs | import Control.Monad (forever)
import Graphics.UI.SDL as SDL
main :: IO ()
main = do
SDL.init [InitVideo]
screen <- SDL.setVideoMode 480 320 32 [SWSurface]
forever $ do
let format = surfaceGetPixelFormat screen
green <- SDL.mapRGB format 0 0xFF 0
SDL.fillRect screen Nothing green
SDL.flip scree... | null | https://raw.githubusercontent.com/keera-studios/haskell-game-programming/d4998decb4664a978c87199347f53b420d763b1e/tutorials/sdl/sdl1/time/example1.hs | haskell | NEW | import Control.Monad (forever)
import Graphics.UI.SDL as SDL
main :: IO ()
main = do
SDL.init [InitVideo]
screen <- SDL.setVideoMode 480 320 32 [SWSurface]
forever $ do
let format = surfaceGetPixelFormat screen
green <- SDL.mapRGB format 0 0xFF 0
SDL.fillRect screen Nothing green
SDL.flip scree... |
e37c5c8db518d02fe90e1e03c8a0a25d9de4755b07951ff202f11c37d01ce1bd | gusenov/stepik-functional-programming-hs | Demo.hs |
Реализуйте функцию , задающую циклическое .
rotate : : Int - > [ a ] - > [ a ]
rotate n xs = undefined
При положительном значении целочисленного , при отрицательном - вправо .
GHCi > rotate 2 " abcdefghik "
" "
GHCi > rotate ( -2 ) " abcdefghik "
" ikabcdefgh "
Не забывайте обеспечить рабо... | null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/RotateList/Demo.hs | haskell |
+clojure+scala+haskell/lists/modification/rotate
/~bcw/comp524-sp14/examples/haskell/soln.hs
|
Реализуйте функцию , задающую циклическое .
rotate : : Int - > [ a ] - > [ a ]
rotate n xs = undefined
При положительном значении целочисленного , при отрицательном - вправо .
GHCi > rotate 2 " abcdefghik "
" "
GHCi > rotate ( -2 ) " abcdefghik "
" ikabcdefgh "
Не забывайте обеспечить рабо... |
5df60886862909eb3a8bf338af40e07a2e2ec393fba7bda4d0b90a06ea364c68 | appleby/99-lisp-problems | p14.lisp | ;;;; (*) Duplicate the elements of a list.
;;;; Example:
* ( dupli ' ( a b c c d ) )
;;;; (A A B B C C C C D D)
(in-package :99-problems)
(defun dupli (lst)
(mapcan (lambda (x) (list x x)) lst))
(define-test dupli-test
(assert-equal '() (dupli '()))
(assert-equal '(a a b b c c c c d d) (dupli '(a b c c d))))
| null | https://raw.githubusercontent.com/appleby/99-lisp-problems/a12b2a585ac5af06f456f844d308bbada78e647c/p14.lisp | lisp | (*) Duplicate the elements of a list.
Example:
(A A B B C C C C D D) | * ( dupli ' ( a b c c d ) )
(in-package :99-problems)
(defun dupli (lst)
(mapcan (lambda (x) (list x x)) lst))
(define-test dupli-test
(assert-equal '() (dupli '()))
(assert-equal '(a a b b c c c c d d) (dupli '(a b c c d))))
|
9915847635515571823c6563da571bb5f8ba8e3e74dbc68f894c101517c2586d | Tim-ats-d/Indigobi | test.ml | let () =
Gemtext.pass ();
Url.pass ()
| null | https://raw.githubusercontent.com/Tim-ats-d/Indigobi/dee46e999c23e2fa6fb6fa1fd728322e0e4dceba/test/test.ml | ocaml | let () =
Gemtext.pass ();
Url.pass ()
| |
5c9ddc8db18e8adb864d9d47b748d4cc85405e2dfc191706aade85e46b844f84 | gtod/postgres-json | transactions.lisp | (in-package :postgres-json)
Postmodern transactions with isolation levels and RO , RW
;;;; settings plus serialization failure handling.
;;; The following adds support for setting the isolation level of a
;;; Postmodern transaction, and setting the read only or read write
;;; status of that transaction at the same ... | null | https://raw.githubusercontent.com/gtod/postgres-json/a545b6c61ca6ee4c6a579c77dbe6856013c7c34f/postgres/transactions.lisp | lisp | settings plus serialization failure handling.
The following adds support for setting the isolation level of a
Postmodern transaction, and setting the read only or read write
status of that transaction at the same time. See
-set-transaction.html
There is also support for a rudimentary retry loop to catch the
cl-p... | (in-package :postgres-json)
Postmodern transactions with isolation levels and RO , RW
SUPERSEDE keeping a full history under the covers ...
A small change to Postmodern is required to support these
additions , see postgres / postmodern.lisp
(define-constant +serializable-rw+
"isolation level serializabl... |
e20d545162f73e2c46779d50ee192dd4ce3dec8fe72981d92d83079153685559 | avsm/eeww | unix.ml | type file_descr = [`Open | `Closed] Atomic.t
let make () = Atomic.make `Open
let close t =
if not (Atomic.compare_and_set t `Open `Closed) then
failwith "Already closed!"
| null | https://raw.githubusercontent.com/avsm/eeww/684af99c194ff082836dbb1ada05c8a023dbd844/lib/eio/lib_eio/tests/dscheck/unix.ml | ocaml | type file_descr = [`Open | `Closed] Atomic.t
let make () = Atomic.make `Open
let close t =
if not (Atomic.compare_and_set t `Open `Closed) then
failwith "Already closed!"
| |
de75d39ed097e2a974e6903a38d8522156a7aaefdb7dba555867bba3d14443ad | acl2/acl2 | secp256k1-group-prime@useless-runes.lsp | (PRIMES::SECP256K1-GROUP-PRIME)
(PRIMES::PRIMEP-OF-SECP256K1-GROUP-PRIME-CONSTANT)
(PRIMES::PRIMEP-OF-SECP256K1-GROUP-PRIME)
(PRIMES::SECP256K1-GROUP-PRIME-LINEAR)
(DM::PRIMEP1125000892)
(DM::PRIMEP1104440444
(1 1 (:REWRITE DEFAULT-CDR))
(1 1 (:REWRITE DEFAULT-CAR))
)
| null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/crypto/primes/.sys/secp256k1-group-prime%40useless-runes.lsp | lisp | (PRIMES::SECP256K1-GROUP-PRIME)
(PRIMES::PRIMEP-OF-SECP256K1-GROUP-PRIME-CONSTANT)
(PRIMES::PRIMEP-OF-SECP256K1-GROUP-PRIME)
(PRIMES::SECP256K1-GROUP-PRIME-LINEAR)
(DM::PRIMEP1125000892)
(DM::PRIMEP1104440444
(1 1 (:REWRITE DEFAULT-CDR))
(1 1 (:REWRITE DEFAULT-CAR))
)
| |
2be9db7087e529c8df42ec26071c13ce9789e44309dfd27a5857d4df0fa569a1 | hackwaly/ocamlearlybird | typenv.ml | *
* Copyright ( C ) 2021
*
* 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 , or ( at your option ) any later version .
*
* Th... | null | https://raw.githubusercontent.com/hackwaly/ocamlearlybird/e483beb6e9080352234be45ab7309254ad7aaa37/src/typenv/411/typenv.ml | ocaml | HACK
/HACK | *
* Copyright ( C ) 2021
*
* 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 , or ( at your option ) any later version .
*
* Th... |
41137b0e9ff1990523e278435e9bc354a7b8c86e23b0600caa9ab64b96175685 | hyperfiddle/electric | diff.clj | (ns geoffrey.diff
(:require [datascript.core :as d]
[missionary.core :as m]
[clojure.set :as set]
[minitest :refer [tests]]))
(defn fixtures [$]
(-> $
(d/with [{:dustingetz/type :dustingetz/gender :db/ident :dustingetz/male}
{:dustingetz/type :dustingetz/gen... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2021/diff.clj | clojure | ¹ (UnsupportedOperationException) at datascript.impl.entity.Entity/empty
(entity.cljc:47) | (ns geoffrey.diff
(:require [datascript.core :as d]
[missionary.core :as m]
[clojure.set :as set]
[minitest :refer [tests]]))
(defn fixtures [$]
(-> $
(d/with [{:dustingetz/type :dustingetz/gender :db/ident :dustingetz/male}
{:dustingetz/type :dustingetz/gen... |
24eb8aca120a9cc0c9c3b8406b4ff16055dd118de99611843e0248d9add36214 | mbg/wai-rate-limit | Redis.hs | --------------------------------------------------------------------------------
-- Rate Limiting Middleware for WAI --
--------------------------------------------------------------------------------
This source code is licensed under the MIT license found in the LICENSE ... | null | https://raw.githubusercontent.com/mbg/wai-rate-limit/3746decc5358f1c79cb598c7f8bf13e0d4e65103/wai-rate-limit-redis/src/Network/Wai/RateLimit/Redis.hs | haskell | ------------------------------------------------------------------------------
Rate Limiting Middleware for WAI --
------------------------------------------------------------------------------
file in the root directory of this source tree. --
---... |
module Network.Wai.RateLimit.Redis (
RedisBackendError(..),
redisBackend
) where
import Control.Exception
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C8
import Database.Redis as Redis
import Network.Wai.RateLimit.Backend
data RedisBackendError
= RedisBackendReply... |
2065a8db4170a04e55cf86c39f1b317ba98feeefff17335f617d23ea4a2e1aa6 | haskell-gi/haskell-gi | Type.hs | -- | An abstraction for representing type constructors. This is a very
simplified version of ` Data . , which we do n't use directly
-- to avoid compatibility headaches.
module Data.GI.CodeGen.Type
Reexported for convenience .
, BasicType(..)
, TypeRep
, con
, con0
, typeShow
, typeConN... | null | https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/lib/Data/GI/CodeGen/Type.hs | haskell | | An abstraction for representing type constructors. This is a very
to avoid compatibility headaches.
| A fully applied type.
| A type constructor. We single out some specific constructors
| Return a textual representation of the type constructor for the
| Type constructor applied to the given types.
| A shortha... | simplified version of ` Data . , which we do n't use directly
module Data.GI.CodeGen.Type
Reexported for convenience .
, BasicType(..)
, TypeRep
, con
, con0
, typeShow
, typeConName
, io
, ptr
, funptr
, maybeT
) where
#if !MIN_VERSION_base(4,11,0)
import Data.Mon... |
8ff78bfa302e4513f94deccff9d553ddcf451d1e9395f8330f5d3f674d53c99a | apache/couchdb-couch-replicator | couch_replicator_filtered_tests.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-couch-replicator/d00b981445c03622497088eb872059ab4f48b298/test/couch_replicator_filtered_tests.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_replicator_filtered_tests).
-include_lib("couch/include/couch_eunit.hrl").
-include_lib("couch/include/couch_db.hrl").
-include_lib("couch_re... |
ddec1da65ddf94eac831325ad725eac1b03132d9b6de58b0631c8109f376a609 | someodd/burrow | Markdown.hs | | Markdown to a protocol menu .
# LANGUAGE CPP #
# LANGUAGE BangPatterns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE UndecidableInstances ... | null | https://raw.githubusercontent.com/someodd/burrow/fe93397c0339274f7c54bda0557d0030e9896f1e/src/Markdown.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE UndecidableInstances #
# LANGUAGE OverloadedStrings #
| Stuff to make available to the parser.
^ Used to render headings.
^ If nothing will assume a plain text file, won't do anything particular
for links. If defined will use the host and port.
^ us... | | Markdown to a protocol menu .
# LANGUAGE CPP #
# LANGUAGE BangPatterns #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Markdown
( Environment(..)
,... |
2ec51a7a4be91306edf21a257836a24045d3301f913beaae2934f53528ac05b9 | tweag/ormolu | inline-comment-0.hs | x = ({-a-}b, c)
y = ({-a-}b)
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/other/inline-comment-0.hs | haskell | a
a | |
bfffaf997bf9c2fcf0ee6bd1594078717a56861e67745b8cba603b8ff02ba64c | zcaudate/hara | type.clj | (ns hara.object.element.impl.type
(:require [hara.string :as string]
[hara.protocol.string :as protocol.string]
[hara.object.element.modifier :as modifier]
[hara.object.element.class :as class]))
(defonce +override+
(doto (.getDeclaredField java.lang.reflect.AccessibleObject "ov... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/object/element/impl/type.clj | clojure | (ns hara.object.element.impl.type
(:require [hara.string :as string]
[hara.protocol.string :as protocol.string]
[hara.object.element.modifier :as modifier]
[hara.object.element.class :as class]))
(defonce +override+
(doto (.getDeclaredField java.lang.reflect.AccessibleObject "ov... | |
b8a04deae022b1253880bc8cea6dd3822827de4b1f64fbe260727364e5a88ad6 | anmonteiro/ocaml-h2 | lwt_get.ml | open H2
module Client = H2_lwt_unix.Client
let response_handler notify_response_received _response response_body =
let rec read_response () =
Body.Reader.schedule_read
response_body
~on_eof:(fun () -> Lwt.wakeup_later notify_response_received ())
~on_read:(fun bigstring ~off ~len ->
let... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/1aea7e0aebb2c440dc35ef35ca15d87d44799f4e/examples/lwt/lwt_get.ml | ocaml | open H2
module Client = H2_lwt_unix.Client
let response_handler notify_response_received _response response_body =
let rec read_response () =
Body.Reader.schedule_read
response_body
~on_eof:(fun () -> Lwt.wakeup_later notify_response_received ())
~on_read:(fun bigstring ~off ~len ->
let... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.