_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 |
|---|---|---|---|---|---|---|---|---|
77ed6e8c4eee4853ddd7ecbb4e1fbcd4d9bdfb55f823835005e3d4d14bf25373 | acl2/acl2 | logior-b@useless-runes.lsp | (LOGTAIL-OF-LOGIOR
(2880 80 (:DEFINITION NATP))
(1717 72 (:LINEAR LOGIOR-BOUND-LINEAR-2))
(1717 72 (:LINEAR LOGIOR-BOUND-LINEAR))
(1144 1144 (:TYPE-PRESCRIPTION <-OF-LOGIOR-AND-0-TYPE))
(689 1 (:REWRITE FLOOR-UNIQUE-EQUAL-VERSION))
(619 619 (:TYPE-PRESCRIPTION <=-OF-FLOOR-AND-0-WHEN-NONPOSITIVE-AND-NONNEGATIVE-TY... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv/.sys/logior-b%40useless-runes.lsp | lisp | (LOGTAIL-OF-LOGIOR
(2880 80 (:DEFINITION NATP))
(1717 72 (:LINEAR LOGIOR-BOUND-LINEAR-2))
(1717 72 (:LINEAR LOGIOR-BOUND-LINEAR))
(1144 1144 (:TYPE-PRESCRIPTION <-OF-LOGIOR-AND-0-TYPE))
(689 1 (:REWRITE FLOOR-UNIQUE-EQUAL-VERSION))
(619 619 (:TYPE-PRESCRIPTION <=-OF-FLOOR-AND-0-WHEN-NONPOSITIVE-AND-NONNEGATIVE-TY... | |
5ca595eda57703464f0e9008ee59c31bf6a9b141ab73666ef02fcdb1f818cbe2 | nilern/fell | core.cljc | (ns fell.core
"The Eff a.k.a. Freer Monad."
(:require [cats.core :refer [extract]]
[fell.eff :as eff :refer [#?@(:cljs [Pure Impure]) ->Pure]]
[fell.queue :as q :refer [singleton-queue]]
[fell.continuation :as cont])
#?(:clj (:import [fell.eff Pure Impure])))
(def pure
"Inje... | null | https://raw.githubusercontent.com/nilern/fell/57b2d7eaafefc2e311d6fa8b316bc03405258b3e/src/fell/core.cljc | clojure | TODO: Improve `weave` nomenclature: | (ns fell.core
"The Eff a.k.a. Freer Monad."
(:require [cats.core :refer [extract]]
[fell.eff :as eff :refer [#?@(:cljs [Pure Impure]) ->Pure]]
[fell.queue :as q :refer [singleton-queue]]
[fell.continuation :as cont])
#?(:clj (:import [fell.eff Pure Impure])))
(def pure
"Inje... |
015ca9c89b607e838eb21ea8f3ed4100a8de63dc5dcd6e72172c0e24d23fbf5d | lisp-mirror/clpm | update.lisp | ;;;; Basic update support
;;;;
This software is part of CLPM . See README.org for more information . See
;;;; LICENSE for license information.
(uiop:define-package #:clpm/update
(:use #:cl
#:alexandria
#:clpm/context
#:clpm/context-diff
#:clpm/install/defs
#:clpm... | null | https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/clpm/update.lisp | lisp | Basic update support
LICENSE for license information.
Map all systems to their corresponding projects. | This software is part of CLPM . See README.org for more information . See
(uiop:define-package #:clpm/update
(:use #:cl
#:alexandria
#:clpm/context
#:clpm/context-diff
#:clpm/install/defs
#:clpm/log
#:clpm/resolve
#:clpm/session
#:cl... |
c0aabc23387253844e9efd7bfcb9f878d20bb012847bdcb376d9c9e7d0f14050 | ekmett/lens | Level.hs | # LANGUAGE CPP #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Lens.Level
Copyright : ( C ) 2012 - 16
-- License : BSD-style (see the file LICENSE)
Maintaine... | null | https://raw.githubusercontent.com/ekmett/lens/a26281a49e85af46821964d8f7455b82cfd4251d/src/Control/Lens/Level.hs | haskell | # LANGUAGE Rank2Types #
---------------------------------------------------------------------------
|
Module : Control.Lens.Level
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : Rank2Types
This module provides combinators for breadth-first searching within
arbitra... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE Trustworthy #
Copyright : ( C ) 2012 - 16
Maintainer : < >
module Control.Lens.Level
( Level
, levels
, ilevels
) where
import Control.Applicative
import Control.Lens.Internal.Bazaar
import Control.Lens.Internal.Context
import Control... |
5acfe479de35ed6aea17efb2f55e570abcb5cf12cf18ce7a56b128a05f5d3ed1 | peterholko/pax_server | file_appender.erl | -module(file_appender).
-author("Ahmed Al-Issaei").
-license("MPL-1.1").
-behaviour(gen_event).
-include("../include/log4erl.hrl").
-include_lib("kernel/include/file.hrl").
-import(log4erl_utils, [to_list/1, to_atom/1, to_int/1]).
%% gen_event callbacks
-export([init/1, handle_event/2, handle_call/2, ... | null | https://raw.githubusercontent.com/peterholko/pax_server/62b2ec1fae195ff915d19af06e56a7c4567fd4b8/lib/log4erl/src/file_appender.erl | erlang | gen_event callbacks
======================================
gen_event callback functions
======================================
in case format doesn't exist
This one with custom format
Check Rot >= 0
======================================
internal callback functions
======================================
... | -module(file_appender).
-author("Ahmed Al-Issaei").
-license("MPL-1.1").
-behaviour(gen_event).
-include("../include/log4erl.hrl").
-include_lib("kernel/include/file.hrl").
-import(log4erl_utils, [to_list/1, to_atom/1, to_int/1]).
-export([init/1, handle_event/2, handle_call/2,
handle_info/2, termi... |
7d8c442e9cc5995b6456b3a8342c1b68c8a2e22c8a7dfd09b2949d795dbcad0e | jkachmar/servant-persistent-realworld | Main.hs | module Main where
import App (startApp)
import ClassyPrelude
main :: IO ()
main = startApp
| null | https://raw.githubusercontent.com/jkachmar/servant-persistent-realworld/0b01f85492d931d48bae24e674cfc022c420f50c/app/Main.hs | haskell | module Main where
import App (startApp)
import ClassyPrelude
main :: IO ()
main = startApp
| |
b907cca6b1efbf3aa3f3c24083dcec84bdfa354638ba339775e202c8209224c8 | elaforge/karya | Bali_test.hs | Copyright 2016
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Cmd.Instrument.Bali_test where
import Util.Test
import qualified Cmd.Instrument.Bali as Bali
import qualified Derive.Scale as Scale
import qualified Perform.Pitch as Pitch
test_w... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Cmd/Instrument/Bali_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2016
module Cmd.Instrument.Bali_test where
import Util.Test
import qualified Cmd.Instrument.Bali as Bali
import qualified Derive.Scale as Scale
import qualified Perform.Pitch as Pitch
test_wrap_octaves :: Test
test_wrap_octaves = do
let f low high = unpitch
. Bali.wrap_octaves (Scale.Ra... |
b088b58a02a350246a744c5ef048abbbffef581360279fa7c02bf76263ee8980 | dhall-lang/dhall-json | JSON.hs | # LANGUAGE ApplicativeDo #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
| This library only exports a single ` dhallToJSON ` function for translating a
Dhall syntax tree to a JSON syntax tree ( i.e. a ` Value ` ) f... | null | https://raw.githubusercontent.com/dhall-lang/dhall-json/082fb2403acd636fdd05e21c96005e455e256a86/src/Dhall/JSON.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
* Dhall to JSON
* Exceptions
| Omit record fields that are @null@
^ Describe the input for the sake of error location.
^ Input text. | # LANGUAGE ApplicativeDo #
# LANGUAGE OverloadedLists #
# LANGUAGE RecordWildCards #
| This library only exports a single ` dhallToJSON ` function for translating a
Dhall syntax tree to a JSON syntax tree ( i.e. a ` Value ` ) for the @aeson@
library
NOTE : The @yaml@ library uses the s... |
ea831cab3156d1ef86ff701e3739948f85bcd89701ad08a4c7fc5e3a94824234 | waldheinz/ads | Utils.hs |
module Utils (
bsFromStrict, bsToStrict
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
-- |
Ca n't use the one from BSL as it 's not available with GHC 7.4 .
bsFromStrict :: BS.ByteString -> BSL.ByteString
bsFromStrict bs = BSL.fromChunks [bs]
-- |
Ca n't use the... | null | https://raw.githubusercontent.com/waldheinz/ads/7695a157d76f35849351b2e039890eae1b419088/src/lib/Utils.hs | haskell | |
| |
module Utils (
bsFromStrict, bsToStrict
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
Ca n't use the one from BSL as it 's not available with GHC 7.4 .
bsFromStrict :: BS.ByteString -> BSL.ByteString
bsFromStrict bs = BSL.fromChunks [bs]
Ca n't use the one from ... |
ffac2272abb166ddf9b70473e597845ac6a1a9e16e830b06b21ed36071f462a3 | dktr0/estuary | Loadable.hs | module Estuary.Resources.Loadable where
Instances of the class represent resources that are initiated / allocated
-- by starting an asynchronous URL request, and can report/keep track of the status
of that asynchronous request ( LoadStatus ) .
import GHCJS.Types
import Data.Text
import Data.Map
import Data.IORe... | null | https://raw.githubusercontent.com/dktr0/estuary/9595417c374fe969d095f6a84b52af9571a1e515/client/src/Estuary/Resources/Loadable.hs | haskell | by starting an asynchronous URL request, and can report/keep track of the status
arguments are URL and a callback when loading succeeds | module Estuary.Resources.Loadable where
Instances of the class represent resources that are initiated / allocated
of that asynchronous request ( LoadStatus ) .
import GHCJS.Types
import Data.Text
import Data.Map
import Data.IORef
class Loadable a where
loadStatus :: a -> IO LoadStatus
data LoadStatus =
N... |
f67409fb1ab41ff095be88bd875a0962458c8f88b3dfb49e95eccee252f6d1ef | kayhman/lisphys | vector3.lisp | (in-package #:lisphys)
(defclass vector3 (math)
((x :reader vector3-x :initarg :x :initform 0.0)
(y :reader vector3-y :initarg :y :initform 0.0)
(z :reader vector3-z :initarg :z :initform 0.0)))
(defmethod (setf vector3-x) (x (v vector3))
(setf (slot-value v 'x) x))
(defmethod (setf vector3-y) (y (v vector... | null | https://raw.githubusercontent.com/kayhman/lisphys/4e339022f2e2ea886d598dfce2365958ff5b87bb/src/lib/vector3.lisp | lisp | (setq v (make-instance 'vector3 ))
(funcall (vector3-add v) 1 2 3)
(funcall (vector3-add vp) 1 2 3)
AD methods ;;
Helper ;;
| (in-package #:lisphys)
(defclass vector3 (math)
((x :reader vector3-x :initarg :x :initform 0.0)
(y :reader vector3-y :initarg :y :initform 0.0)
(z :reader vector3-z :initarg :z :initform 0.0)))
(defmethod (setf vector3-x) (x (v vector3))
(setf (slot-value v 'x) x))
(defmethod (setf vector3-y) (y (v vector... |
3283a804e6aadfab3b671777432de8be52d89b62fdc7b7569b02bf14c5a0d0ac | omcljs/om | dom.cljs | (ns om.dom
(:refer-clojure :exclude [map mask meta time select])
(:require-macros [om.dom :as dom])
(:require [cljsjs.react]
[cljsjs.react.dom]
[om.util :as util]
[goog.object :as gobj]))
(dom/gen-react-dom-fns)
(defn- update-state
"Updates the state of the wrapped input el... | null | https://raw.githubusercontent.com/omcljs/om/3a1fbe9c0e282646fc58550139b491ff9869f96d/src/main/om/dom.cljs | clojure | an element have changed. We detect this and render
element as-is, hoping that next onChange will
eventually come and bring our modifications anyways.
Ignoring this causes skipped letters in controlled
components
-project/reagent/issues/253
TODO: Find a better solution, since this conflicts
with controlled/u... | (ns om.dom
(:refer-clojure :exclude [map mask meta time select])
(:require-macros [om.dom :as dom])
(:require [cljsjs.react]
[cljsjs.react.dom]
[om.util :as util]
[goog.object :as gobj]))
(dom/gen-react-dom-fns)
(defn- update-state
"Updates the state of the wrapped input el... |
37d3dfc44f0eb801a7ba64445534701421cb3a8803ccb93a87b951cab13a7d9b | ertugrulcetin/procedure.async | user.clj | (ns user
"Userspace functions you can run by default in your local REPL."
(:require
[favorite-songs.config :refer [env]]
[clojure.pprint]
[clojure.spec.alpha :as s]
[expound.alpha :as expound]
[mount.core :as mount]
[favorite-songs.core :refer [start-app]]))
(alter-var-root #'s/*explain-out*... | null | https://raw.githubusercontent.com/ertugrulcetin/procedure.async/2f9af363904c297ef8332e4710db899c5c94e7cd/examples/favorite-songs/env/dev/clj/user.clj | clojure | (ns user
"Userspace functions you can run by default in your local REPL."
(:require
[favorite-songs.config :refer [env]]
[clojure.pprint]
[clojure.spec.alpha :as s]
[expound.alpha :as expound]
[mount.core :as mount]
[favorite-songs.core :refer [start-app]]))
(alter-var-root #'s/*explain-out*... | |
e58b406568cf01d52091b74d0b3b2a2b0596a06d7b2e892682767ea08ba18a55 | hyperthunk/rebar_alien_plugin | rebar_it_demo.erl | -module(rebar_it_demo).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
ignored.
... | null | https://raw.githubusercontent.com/hyperthunk/rebar_alien_plugin/3fbb1b7cbca45d3097e42a5962ea0dcc8e4b839b/examples/custom/src/rebar_it_demo.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(rebar_it_demo).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
ignored.
stop(_State) ->
ok.
|
54370ddaea7140e9bd283699fa04ff06f6cfe5ad7810952c3024cf4ed59636b7 | emil0r/reverie | module.clj | (ns reverie.test.module
(:require
[hiccup.page :refer [html5]]
[reverie.core :refer [area]]
[reverie.module :as module]
[reverie.route :as route]
[reverie.render :as render]
[reverie.system :as sys]
[reverie.template :as template]
[midje.sweet :refer :all]))
(defn get-renderer
([]
(get... | null | https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-test/test/reverie/test/module.clj | clojure | (ns reverie.test.module
(:require
[hiccup.page :refer [html5]]
[reverie.core :refer [area]]
[reverie.module :as module]
[reverie.route :as route]
[reverie.render :as render]
[reverie.system :as sys]
[reverie.template :as template]
[midje.sweet :refer :all]))
(defn get-renderer
([]
(get... | |
e952389782110458ee59406787596fbc9169f816837ab17a86f7d24cf45a3ea0 | andrewthad/haskell-ip | IPv4ByteString1.hs | module IPv4ByteString1 where
import Net.Types (IPv4(..))
import Data.ByteString.Internal as I
import Data.Bits
import Foreign.Ptr
import Foreign.Storable
import Data.Word
encode :: IPv4 -> ByteString
encode (IPv4 w) = I.unsafeCreateUptoN 15 (\ptr1 ->
do (len1,ptr2) <- writeWord ptr1 w1
poke ptr2 dot
(len... | null | https://raw.githubusercontent.com/andrewthad/haskell-ip/4782c5cb44aa6e04c9dbfb4c43909a07ff668216/test/IPv4ByteString1.hs | haskell | module IPv4ByteString1 where
import Net.Types (IPv4(..))
import Data.ByteString.Internal as I
import Data.Bits
import Foreign.Ptr
import Foreign.Storable
import Data.Word
encode :: IPv4 -> ByteString
encode (IPv4 w) = I.unsafeCreateUptoN 15 (\ptr1 ->
do (len1,ptr2) <- writeWord ptr1 w1
poke ptr2 dot
(len... | |
810383dbd06d282c5718aeceaacd032f8f113cc530e253edf4c1bd0209ab5392 | ghcjs/ghcjs | dsrun013.hs | # LANGUAGE UnboxedTuples #
This one killed GHC 6.4.1 , because the pattern match on the
-- unboxed tuple generates a failure case, which defeated the
-- rather fragile code in the desugarer
See DsExpr.lhs , the HsCase case
module Main where
foo xs ys = case (# null xs, null ys #) of
(# True, False ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/deSugar/dsrun013.hs | haskell | unboxed tuple generates a failure case, which defeated the
rather fragile code in the desugarer | # LANGUAGE UnboxedTuples #
This one killed GHC 6.4.1 , because the pattern match on the
See DsExpr.lhs , the HsCase case
module Main where
foo xs ys = case (# null xs, null ys #) of
(# True, False #) -> "One"
(# False, True #) -> "Two"
main :: IO ()
main = print (foo [] "ok")
|
c1d29780c926ce15f5e3a44099b1d210c81db94c50b1c0286136ca9f78a55c07 | macourtney/Dark-Exchange | development.clj | (ns config.environments.development
(:import [org.apache.log4j ConsoleAppender FileAppender Level Logger PatternLayout]
[org.apache.log4j.varia LevelRangeFilter]))
; Sets up the logger for development mode.
(def output-pattern (new PatternLayout "%d{ISO8601} %-5p [%c]: %m%n"))
(def file-appender (new Fil... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/config/environments/development.clj | clojure | Sets up the logger for development mode. | (ns config.environments.development
(:import [org.apache.log4j ConsoleAppender FileAppender Level Logger PatternLayout]
[org.apache.log4j.varia LevelRangeFilter]))
(def output-pattern (new PatternLayout "%d{ISO8601} %-5p [%c]: %m%n"))
(def file-appender (new FileAppender output-pattern "log/development.l... |
2a7a1434ef62c566917e98c15a1939eb491d326a45ee741fbf10cc126176fd5b | binsec/haunted | natural.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/base/natural.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... |
2b7eb6a3d9093ded8647a9658eb5430438153e45b507545829045c0f877978d6 | darkleaf/app-from-scratch | app.clj | (ns app.app
(:require
[clojure.pprint :as pp]
[com.stuartsierra.component :as component]
[ring.adapter.jetty :as jetty]))
(defn handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body (with-out-str (pp/pprint req))})
(defrecord Jetty [val]
component/Lifecycle
(start [this]
(... | null | https://raw.githubusercontent.com/darkleaf/app-from-scratch/f5ade8f90f20d6856ab4f5830264437f55027d96/sources/4-web/2-component/src/app/app.clj | clojure | (ns app.app
(:require
[clojure.pprint :as pp]
[com.stuartsierra.component :as component]
[ring.adapter.jetty :as jetty]))
(defn handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body (with-out-str (pp/pprint req))})
(defrecord Jetty [val]
component/Lifecycle
(start [this]
(... | |
ab7aa34878d44c6e43c7a9b6eeb62a639f04d429b356ba168f1088343ac0d79b | links-lang/links | sugartypes.ml | open CommonTypes
open Operators
open SourceCode
open Utility
(** The syntax tree created by the parser. *)
let internal_error message =
Errors.internal_error ~filename:"sugartypes.ml" ~message
module Binder: sig
type t
and with_pos = t WithPos.t
[@@deriving show]
val make : ?name:Name.t -> ?ty:Types.datat... | null | https://raw.githubusercontent.com/links-lang/links/c0091f46a6eae791d02c20432b9756a180427bba/core/sugartypes.ml | ocaml | * The syntax tree created by the parser.
Note that an unresolved type variable does not contain information
about its primary kind. This is filled in when resolving the variable
FIXME: the above comment may well be false now - check
Store the denotation along with the notation once it's computed
spawnClient ... | open CommonTypes
open Operators
open SourceCode
open Utility
let internal_error message =
Errors.internal_error ~filename:"sugartypes.ml" ~message
module Binder: sig
type t
and with_pos = t WithPos.t
[@@deriving show]
val make : ?name:Name.t -> ?ty:Types.datatype -> unit -> t
val to_name : with_pos -> ... |
a0bbb194e0d5a3a0612eddf563ef27a34b633a52397c46a313b6868095561aac | fulcrologic/fulcro-rad | save_middleware.cljc | (ns com.fulcrologic.rad.middleware.save-middleware
(:require
[com.fulcrologic.rad.form :as form]
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.algorithms.tempid :as tempid]))
(defmulti rewrite-value
"
[save-env ident save-diff]
Given the save-env, ident of an entity, and incoming save diff (ma... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad/d2a40fdd7ca6ee0ec5fdb3897d5764bb6c5f7800/src/main/com/fulcrologic/rad/middleware/save_middleware.cljc | clojure | (ns com.fulcrologic.rad.middleware.save-middleware
(:require
[com.fulcrologic.rad.form :as form]
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.algorithms.tempid :as tempid]))
(defmulti rewrite-value
"
[save-env ident save-diff]
Given the save-env, ident of an entity, and incoming save diff (ma... | |
3a7f9360db99731952081b780c0fece7bfd18a4156ac505148d5db8d3e3b43b6 | katychuang/getting-started-with-haskell | clay-simple.hs | -- clay-simple.hs
-- -web-programming/news.html
{-# LANGUAGE OverloadedStrings #-}
import Clay
main :: IO ()
main = putCss exampleStylesheet
exampleStylesheet :: Css
exampleStylesheet = body ? fontFamily ["Baskerville", "Georgia", "Garamond", "Times"] [serif]
- Compile with the command ` ghc --make execute ... | null | https://raw.githubusercontent.com/katychuang/getting-started-with-haskell/98cbead7a720a210043d027b1acb7bb73a8ef46b/tutorials/clay/clay-simple.hs | haskell | clay-simple.hs
-web-programming/news.html
# LANGUAGE OverloadedStrings #
make execute ` ./clay - simple ` to generate the css output
make clay-simple.hs` |
import Clay
main :: IO ()
main = putCss exampleStylesheet
exampleStylesheet :: Css
exampleStylesheet = body ? fontFamily ["Baskerville", "Georgia", "Garamond", "Times"] [serif]
-
- Then execute `./clay-simple` to generate the css output
- -}
|
0faad6ef77e33bcd72d11ff643487f0f2e4b13725df60b43c1924487ef7ded71 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415164745.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164745.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
6930a3f7703388cedee4ce61528dcfadfcf2255998ff7fdd9369d63da2e7bd32 | cl-axon/shop2 | run.lisp | (format t "*** Assume SHOP2 has been loaded ***~%~%")
(load "../../../solution-converter.lisp")
(load "../zenotravelTime.lisp")
(defun solve-domain (pname)
(load (concatenate 'string pname ".lisp"))
(multiple-value-bind (sol soltime) (find-plans (read-from-string pname))
(if sol
(progn
(format ... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/examples/IPC-2002/ZenoTravel/Time/easy_probs/run.lisp | lisp | (format t "*** Assume SHOP2 has been loaded ***~%~%")
(load "../../../solution-converter.lisp")
(load "../zenotravelTime.lisp")
(defun solve-domain (pname)
(load (concatenate 'string pname ".lisp"))
(multiple-value-bind (sol soltime) (find-plans (read-from-string pname))
(if sol
(progn
(format ... | |
c152c3d4080251239921b53d795034c6a8119eaa589d669fc1b1477f2e84f2af | GaloisInc/tower | Component.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
module Tower.Mini.Component where
import Prelude ()
import Prelude.Compat
... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-mini/src/Tower/Mini/Component.hs | haskell | # LANGUAGE Rank2Types #
| An channel implemented by an external C module.
^ Symbol @sym@ for a C function @bool sym(t *data)@ where
@data@ is an output parameter and the return value indicates
whether valid data has been written to @data@
^ Header file where the @get@ function is defined
^ Symbol @sym@ for a C fu... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
module Tower.Mini.Component where
import Prelude ()
import Prelude.Compat
import MonadLib hiding (loc... |
e5949d76920e55a6fb98ead301a70e4bba81bd481d04d244676611aa189a2483 | eeng/shevek | refresh.cljs | (ns shevek.pages.designer.actions.refresh
(:require [shevek.rpc :as rpc]
[shevek.reflow.db :as db]
[shevek.reflow.core :refer [dispatch] :refer-macros [defevh]]
[shevek.pages.designer.helpers :refer [send-designer-query send-pinboard-queries]]
[shevek.components.refresh... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/designer/actions/refresh.cljs | clojure | Do not refresh again if there is a slow query still running | (ns shevek.pages.designer.actions.refresh
(:require [shevek.rpc :as rpc]
[shevek.reflow.db :as db]
[shevek.reflow.core :refer [dispatch] :refer-macros [defevh]]
[shevek.pages.designer.helpers :refer [send-designer-query send-pinboard-queries]]
[shevek.components.refresh... |
64eb32cae1770f33fd322c9da75b94d71f4af2429b5ff75910d128c5fdabc685 | bmeurer/ocaml-arm | subst.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/typing/subst.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Types
type t
Subs... |
9f28787b6f22f69c7c76e1eb739e03a2ab299bbdc437050242e2e36df8ade4bd | andrewthad/ping | Debug.hs | module Network.Icmp.Ping.Debug
( debug
) where
debug :: String -> IO ()
debug = putStrLn
| null | https://raw.githubusercontent.com/andrewthad/ping/b503843ff47f3ec6d7747618ce73b34a67d3000d/src-debug/Network/Icmp/Ping/Debug.hs | haskell | module Network.Icmp.Ping.Debug
( debug
) where
debug :: String -> IO ()
debug = putStrLn
| |
32b62b14e44c9ef6eac89ab9284f6cfe8e84a3f0622d4653787ed2d8b7d2f604 | geophf/1HaskellADay | Solution.hs | {-# LANGUAGE DeriveAnyClass, OverloadedStrings #-}
module Y2018.M02.D12.Solution where
-
We have CSV stored locally here . it .
Of course , it 's more ' fun ' than just parsing CSV , so , read on !
-
We have CSV stored locally here. Parse it.
Of course, it's more 'fun' than just parsing CSV, so, read on!
--}... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M02/D12/Solution.hs | haskell | # LANGUAGE DeriveAnyClass, OverloadedStrings #
}
the file is:
}
From a row of data, parse in an article:
}
- BONUS -----------------------------------------------------------------
Output these rows as (pretty-printed) JSON
-
and tie that all together:
} |
module Y2018.M02.D12.Solution where
-
We have CSV stored locally here . it .
Of course , it 's more ' fun ' than just parsing CSV , so , read on !
-
We have CSV stored locally here. Parse it.
Of course, it's more 'fun' than just parsing CSV, so, read on!
import qualified Codec.Compression.GZip as GZ
import... |
c52c96ddbca73f805f2dd7265b2c0857a722463e09cd119388f80b8e78b9d9d6 | haskell/ThreadScope | Sparks.hs | module GUI.Timeline.Sparks (
treesProfile,
maxSparkRenderedValue,
renderSparkCreation,
renderSparkConversion,
renderSparkPool,
renderSparkHistogram,
) where
import GUI.Timeline.Render.Constants
import Events.HECs
import Events.SparkTree
import qualified Events.SparkStats as SparkStats
impor... | null | https://raw.githubusercontent.com/haskell/ThreadScope/8f51f5ca445ab335c6e2ac44f05c44ae6c48d5cc/GUI/Timeline/Sparks.hs | haskell | Rendering sparks. No approximation nor extrapolation is going on here.
The sample data, recalculated for a given slice size in sparkProfile,
before these functions are called, is straightforwardly rendered.
in pixels
maxSpkValue is maximal spark transition rate, so
maxSliceSpark is maximal number of sparks per sl... | module GUI.Timeline.Sparks (
treesProfile,
maxSparkRenderedValue,
renderSparkCreation,
renderSparkConversion,
renderSparkPool,
renderSparkHistogram,
) where
import GUI.Timeline.Render.Constants
import Events.HECs
import Events.SparkTree
import qualified Events.SparkStats as SparkStats
impor... |
f2a9f3f793b6f9a0d59bb291d68e12a6eee39bd81a9acf8eaa862b9bff7b33c7 | ormf/cm | msutils.lisp | (in-package :cm)
Define Midishare ports in 5065 ( Micro Express )
(defparameter *qt* 0) ; quicktime
(defparameter *jv* 2) ; jv-35
(defparameter *dk* 4) ; disklavier
(defparameter *ms* nil) ;global var for ms stream.
(defun int (n)
(values (floor n)))
(defun sec->milli (s)
(int (* s 1000)))
(defun milli->... | null | https://raw.githubusercontent.com/ormf/cm/26843eec009bd6c214992a8e67c49fffa16d9530/doc/404B-SoundSynth-AlgoComp/www-camil.music.uiuc.edu_16080/classes/404B/lisp/msutils.lisp | lisp | quicktime
jv-35
disklavier
global var for ms stream.
MidiEv Predicates
the "true" value is the black pitch class
the "true" value is the white pitch class | (in-package :cm)
Define Midishare ports in 5065 ( Micro Express )
(defun int (n)
(values (floor n)))
(defun sec->milli (s)
(int (* s 1000)))
(defun milli->sec (m)
(/ m 1000.0))
(defun amp->vel (a)
(int (* a 127)))
(defun keyEv? (ev)
true if type is 1 or 2 ( typeKeyOn typeKeyOff )
(< 0 (ms:evType ... |
47b673625f330c4f973a3bd3d0f58cefca3d4b07bcc3b30142bf833d336fbb37 | adrieng/pulsar | loc.mli | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* 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 3 of the License , or ... | null | https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/pulsar-lib/loc.mli | ocaml | * A (column, line) position in a source file
* Create a position; [lnum] and [cnum] should be non-negative
* Pretty-print a position
* Return the minimum position in the lexicographic order
* Return the maximum position in the lexicographic order
* Extract the line number of a position
* Extract the column number... | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* 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 3 of the License , or ... |
fd122e4aba92e592150bee3db1771477ecd6aff534ac743405148162b7a3e428 | simonmar/parconc-examples | AccelerateCompat.hs | # LANGUAGE CPP #
#if MIN_VERSION_accelerate(1, 0, 0)
module AccelerateCompat (A.min, A.max) where
import Data.Array.Accelerate as A
#elif MIN_VERSION_accelerate(0, 14, 0)
module AccelerateCompat (min, max) where
#else
module AccelerateCompat (A.min, A.max) where
import Data.Array.Accelerate as A
#endif
| null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/AccelerateCompat.hs | haskell | # LANGUAGE CPP #
#if MIN_VERSION_accelerate(1, 0, 0)
module AccelerateCompat (A.min, A.max) where
import Data.Array.Accelerate as A
#elif MIN_VERSION_accelerate(0, 14, 0)
module AccelerateCompat (min, max) where
#else
module AccelerateCompat (A.min, A.max) where
import Data.Array.Accelerate as A
#endif
| |
2948366c74f3aec1cfacb802ff891c36b3a62107d180fe0f0a68864d8868dd1f | MaskRay/OJHaskell | 1.hs | main = print $ sum [x | x <- [1..1000-1], x `mod` 3 == 0 || x `mod` 5 == 0]
| null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/1.hs | haskell | main = print $ sum [x | x <- [1..1000-1], x `mod` 3 == 0 || x `mod` 5 == 0]
| |
6f6c08646f61ea72a7518855f57e73bb91734d09fc77cb04a0c2d8a3127a79f9 | ninenines/cowboy | ws_timeout_hibernate.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(ws_timeout_hibernate).
-export([init/2]).
-export([websocket_init/1]).
-export([websocket_handle/2]).
-export([websocket_info/2]).
init(Req, _) ->
{cowboy_websocket, Req, undefined, #{
idle_timeout => 1000
}}.
websocket_init(State) ->
{ok, Sta... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/ws_SUITE_data/ws_timeout_hibernate.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(ws_timeout_hibernate).
-export([init/2]).
-export([websocket_init/1]).
-export([websocket_handle/2]).
-export([websocket_info/2]).
init(Req, _) ->
{cowboy_websocket, Req, undefined, #{
idle_timeout => 1000
}}.
websocket_init(State) ->
{ok, State, hibernate}.
websocket_handle(_Frame, State) ->
{ok, St... |
8d598535828e5d55bdcd5f4653b498eb08030369a2e58672be4eec2bc6136e28 | Odie/gd-edit | quest.clj | (ns gd-edit.quest
(:require clojure.data
[clojure.java.io :as io]
[clojure.string :as str]
[com.rpl.specter :as specter]
[gd-edit.game-dirs :as dirs]
[gd-edit.globals :as globals]
[gd-edit.io.arc :as arc]
[gd-edit.io.gdd :as gdd]
... | null | https://raw.githubusercontent.com/Odie/gd-edit/abc91b6350ca0faa60e6b448cdfaddf056dafa04/src/gd_edit/quest.clj | clojure | Turn the paths into maps we can work with
We're only interested quest progress for the main game map.
Load the quest progress
The loaded progress into a map keyed by difficulty
load contents as {recordname, content} maps
Read in each record and return it as a map
Annotate the quest progress with readable names
... | (ns gd-edit.quest
(:require clojure.data
[clojure.java.io :as io]
[clojure.string :as str]
[com.rpl.specter :as specter]
[gd-edit.game-dirs :as dirs]
[gd-edit.globals :as globals]
[gd-edit.io.arc :as arc]
[gd-edit.io.gdd :as gdd]
... |
dfe11276a8050fc4b76afd3a625098d5697d06efd04c951d5276c58d63d47d06 | mark-watson/lisp_practical_semantic_web | load.lisp |
(load "FastTag")
(defpackage kbnlp
(:use :cl :asdf)
(:export
:make-text-object)
(:documentation "Mark Watson's NLP utilities released under the AGPL"))
(in-package :kbnlp)
(load "KBtm")
(in-package :kbnlp)
(defun cload (path)
(format t "\n*** starting to load ~A\n" path)
(compile-file (format nil "~A.... | null | https://raw.githubusercontent.com/mark-watson/lisp_practical_semantic_web/2d9d5bb06b574ab0bff15664fe747a5b99e1fb1b/knowledgebooks_nlp/load.lisp | lisp | utilities: |
(load "FastTag")
(defpackage kbnlp
(:use :cl :asdf)
(:export
:make-text-object)
(:documentation "Mark Watson's NLP utilities released under the AGPL"))
(in-package :kbnlp)
(load "KBtm")
(in-package :kbnlp)
(defun cload (path)
(format t "\n*** starting to load ~A\n" path)
(compile-file (format nil "~A.... |
dc7188e2a9445cea46c99b20a3b4bdf61489c9c7e775168571e0e5e7fc937ccb | haskell-foundation/foundation | Zippable.hs | -- |
-- Module : Foundation.Collection.Zippable
-- License : BSD-style
-- Maintainer : foundation
-- Stability : experimental
-- Portability : portable
--
-- Common functions (e. g. 'zip', 'zipWith') that are useful for combining
-- multiple collections.
--
# LANGUAGE FlexibleInstances #
# LANGUAGE Mul... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/39985b94b4de4d02e8decb5e378b53ad3f72c0cc/foundation/Foundation/Collection/Zippable.hs | haskell | |
Module : Foundation.Collection.Zippable
License : BSD-style
Maintainer : foundation
Stability : experimental
Portability : portable
Common functions (e. g. 'zip', 'zipWith') that are useful for combining
multiple collections.
# LANGUAGE StandaloneDeriving #
| 'zipWith' generalises 'zip' by z... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeOperators #
module Foundation.Collection.Zippable
( BoxedZippable(..)
, Zippable(..)
) where
import qualified Basement.UArray as UV
import qualified Basement.BoxedArray as BA
import... |
ccfcc9a0fc562454490ad0c86b862f278a55efb25428caa49e2c9977429be7d2 | craff/pacomb | comb.mli | * { 1 Combinator library , using continuation }
As usual left recursion is not supported , but the library is intended to be
used through the [ Grammar ] module that provides elimination of left
recursion . However , a cache combinatr is supported to overcome the cost of
... | null | https://raw.githubusercontent.com/craff/pacomb/3e83f56bc483f6b9c495ae91d773aa9b484eb321/lib/comb.mli | ocaml | * The type of combinator
* Partial parsing. Beware, the returned position is not the maximum position
that can be reached by the grammar.
* Returns all possible parse trees. Usefull for natural languages but also to
debug ambiguity in a supposed non ambiguous grammar. If end of input is not
parsed in ... | * { 1 Combinator library , using continuation }
As usual left recursion is not supported , but the library is intended to be
used through the [ Grammar ] module that provides elimination of left
recursion . However , a cache combinatr is supported to overcome the cost of
... |
e6d6e84e202a19de2ac2b1c7055255cc50209d6c1403ead04d4450f943ec4fad | NorfairKing/mergeless | SingleClientSpec.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Data.Mergeless.Persistent.SingleClientSpec
( spec,
)
where
import Control.Monad
import Control.Monad.Reader
import Data.GenValidity.Mergeless
import Data.List
import qualified Data.Map as M
import Data.Mergeless
import D... | null | https://raw.githubusercontent.com/NorfairKing/mergeless/77fc3d9a66ec4573156116591dbf9e87d61ba3dd/mergeless-persistent/test/Data/Mergeless/Persistent/SingleClientSpec.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Data.Mergeless.Persistent.SingleClientSpec
( spec,
)
where
import Control.Monad
import Control.Monad.Reader
import Data.GenValidity.Mergeless
import Data.List
import qualified Data.Map as M
import Data.Mergeless
import Data.Mergeless.Persistent
imp... |
b4256e4e11f446be26609cd3d4ba44dc7bceddbf203e504712373ac722906690 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.parent.widgets.layout.banner.views
(:require
[webchange.ui.index :as ui]))
(defn banner
[]
[:div.parent--layout--banner
[:div.banner--message
[:h1 "Thank You for Beta Testing our Games!"]
[:p "Please help us improve our games by sending comments, bug reports, and suggestions using ou... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/02c3025e05fe48feba48080de4f7c439856789c1/src/cljs/webchange/parent/widgets/layout/banner/views.cljs | clojure | (ns webchange.parent.widgets.layout.banner.views
(:require
[webchange.ui.index :as ui]))
(defn banner
[]
[:div.parent--layout--banner
[:div.banner--message
[:h1 "Thank You for Beta Testing our Games!"]
[:p "Please help us improve our games by sending comments, bug reports, and suggestions using ou... | |
320a7146ebd85253a2d15551507188526e087a147af02691f5d484ecadcbe5ad | reifyhealth/specmonstah | 09.clj | (ns reifyhealth.specmonstah-tutorial.09
(:require [reifyhealth.specmonstah.core :as sm]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[reifyhealth.specmonstah.spec-gen :as sg]))
(s/def ::id (s/and pos-int? #(< % 100)))
(s/def ::not-empty-string (s/and string? not-emp... | null | https://raw.githubusercontent.com/reifyhealth/specmonstah/afe38e7a39149836c31719f7e36a7504c14dbb80/tutorial/reifyhealth/specmonstah_tutorial/09.clj | clojure | =>
=>
=> | (ns reifyhealth.specmonstah-tutorial.09
(:require [reifyhealth.specmonstah.core :as sm]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[reifyhealth.specmonstah.spec-gen :as sg]))
(s/def ::id (s/and pos-int? #(< % 100)))
(s/def ::not-empty-string (s/and string? not-emp... |
d1b6b805c3250d012016d5ded217d439cf58dd966483e0b2689e4b31f9e45230 | camllight/camllight | trstream.ml | (* streams.ml: translation of streams *)
#open "const";;
#open "syntax";;
#open "prim";;
#open "lambda";;
#open "matching";;
#open "tr_env";;
The following constants must be kept in sync with the definition
of type stream in file .. /lib / stream.ml
of type stream in file ../lib/stream.ml *)
let sempty_tag... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/compiler/trstream.ml | ocaml | streams.ml: translation of streams
The following constant must be kept in sync with STREAM_PARSE_FAILURE
in file ../runtime/fail.h
Translation of stream expressions
Translation of stream parsers
env
env |
#open "const";;
#open "syntax";;
#open "prim";;
#open "lambda";;
#open "matching";;
#open "tr_env";;
The following constants must be kept in sync with the definition
of type stream in file .. /lib / stream.ml
of type stream in file ../lib/stream.ml *)
let sempty_tag = ConstrRegular(0,5)
and scons_tag = Co... |
ed7239c4b9c405ebb0fd4d3817f22c04b1f135cb91d95efd238ef5dea9cc7198 | pascal-knodel/haskell-craft | E'6'59.hs | --
--
--
-----------------
Exercise 6.59 .
-----------------
--
--
--
module E'6'59 where
import E'6'53 ( CardType )
type Hand = [CardType]
| null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'6'59.hs | haskell |
---------------
---------------
| Exercise 6.59 .
module E'6'59 where
import E'6'53 ( CardType )
type Hand = [CardType]
|
664351aa52cebd68563060e8e5cd08d47986697a468141f440427ad4e67d10ff | samply/blaze | search_param_value_resource_spec.clj | (ns blaze.db.impl.index.compartment.search-param-value-resource-spec
(:require
[blaze.byte-string :refer [byte-string?]]
[blaze.byte-string-spec]
[blaze.coll.core-spec]
[blaze.db.impl.codec-spec]
[blaze.db.impl.index.compartment.search-param-value-resource :as c-sp-vr]
[blaze.db.impl.iterators... | null | https://raw.githubusercontent.com/samply/blaze/7afce7769059a68561b76fe756ff858b6d9813d7/modules/db/test/blaze/db/impl/index/compartment/search_param_value_resource_spec.clj | clojure | (ns blaze.db.impl.index.compartment.search-param-value-resource-spec
(:require
[blaze.byte-string :refer [byte-string?]]
[blaze.byte-string-spec]
[blaze.coll.core-spec]
[blaze.db.impl.codec-spec]
[blaze.db.impl.index.compartment.search-param-value-resource :as c-sp-vr]
[blaze.db.impl.iterators... | |
dd1858572bbff139663cbf4e5c5adb6832c57aebcf404c6a1fadfba401bab9fe | PacktPublishing/Mastering-Clojure | quoting.clj | (ns m-clj.c4.quoting)
;; user> 'x
;; x
;; user> (quote x)
;; x
;;; other data structures can be quoted as well
user > ( def a 1 )
;; #'user/a
user > ` ( list ~a 2 3 )
( clojure.core/list 1 2 3 )
user > ` ( list ~@[1 2 3 ] )
( clojure.core/list 1 2 3 )
user > ( def a 1 )
;; #'user/a
user > ` ( list ~a ... | null | https://raw.githubusercontent.com/PacktPublishing/Mastering-Clojure/5364ad907056c1c84c759491b17d45d06f4d7cdc/src/m_clj/c4/quoting.clj | clojure | user> 'x
x
user> (quote x)
x
other data structures can be quoted as well
#'user/a
#'user/a
user> `(vector x y z)
(clojure.core/vector user/x user/y user/z)
user> `(vector ~'x ~'y ~'z)
(clojure.core/vector x y z)
user> `[1 ~'b ~(+ 1 2)]
user> (def ops ['first 'second])
#'user/ops
:a (first xs)} | (ns m-clj.c4.quoting)
user > ( def a 1 )
user > ` ( list ~a 2 3 )
( clojure.core/list 1 2 3 )
user > ` ( list ~@[1 2 3 ] )
( clojure.core/list 1 2 3 )
user > ( def a 1 )
user > ` ( list ~a 2 3 )
( clojure.core/list 1 2 3 )
user > ' ( list ~a 2 3 )
( list ( clojure.core/unquote a ) 2 3 )
user... |
60bb192d51346111e63c2d415526fe04dfad7dd9aa7cda2d7bad368791684c3b | spawnfest/nakaz | nakaz_sup.erl | -module(nakaz_sup).
-behaviour(supervisor).
%% API
-export([start_link/1]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type),
{I, {I, start_link, []}, permanent, 5000, Type, [I]}).
-define(CHILD(I, Type, Args),
{I, {I, start_link, ... | null | https://raw.githubusercontent.com/spawnfest/nakaz/9570f338b42ddbb5a12e4d75126a2a4ebcaf65f2/src/nakaz_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
API functions
Supervisor callbacks | -module(nakaz_sup).
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
-define(CHILD(I, Type),
{I, {I, start_link, []}, permanent, 5000, Type, [I]}).
-define(CHILD(I, Type, Args),
{I, {I, start_link, Args}, permanent, 5000, Type, [I]}).
start_link(ConfPath) ->
supervisor:start_... |
26cc5aa1fe2b39b33de486fb91b4bc94d49871c5ed6d9a7c395d8d20beb8db9f | amccausl/Swish | Ruleset.hs | {-# OPTIONS -XMultiParamTypeClasses #-}
--------------------------------------------------------------------------------
$ I d : Ruleset.hs , v 1.9 2004/01/07 19:49:13 graham Exp $
--
Copyright ( c ) 2003 , . All rights reserved .
-- See end of this file for licence information.
---------------------... | null | https://raw.githubusercontent.com/amccausl/Swish/9a7356300960c62e3f0468067bda0c34ee3606bd/Swish/HaskellRDF/Ruleset.hs | haskell | # OPTIONS -XMultiParamTypeClasses #
------------------------------------------------------------------------------
See end of this file for licence information.
------------------------------------------------------------------------------
|
Module : Ruleset
Stability : provisional
Portabili... |
$ I d : Ruleset.hs , v 1.9 2004/01/07 19:49:13 graham Exp $
Copyright ( c ) 2003 , . All rights reserved .
Copyright : ( c ) 2003 ,
License : GPL V2
Maintainer :
about a ruleset that may contribute torwards inferences in RDF ;
e.g. RDF and RDFS are rulesets .
... |
48b097cd0c383bfae162d8d2c3b0ab541fcd9f18b3fbc5cad87f737b9e2d8ef9 | weyrick/roadsend-php | streams-c-bindings.scm | ;; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation ; either version 2.... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/standard/streams-c-bindings.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
4de13eef0b051cb4d3f086db770e2b3b64bcd3b1ba6ff23a676386655b84b067 | jcfaracco/lispvirt | lispvirt.lisp | ;;;-------------------------------------------------------------------------
Lispvirt - Common LISP bindings for Libvirt .
;;;
Copyright ( C ) 2015
;;;
lispvirt.lisp is part of Lispvirt .
;;;
Lispvirt is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public Lice... | null | https://raw.githubusercontent.com/jcfaracco/lispvirt/568495b00bb19b46a40f4669b8b21395e5f5fe74/lispvirt/src/lispvirt.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.
-------------------------------... | Lispvirt - Common LISP bindings for Libvirt .
Copyright ( C ) 2015
lispvirt.lisp is part of Lispvirt .
Lispvirt is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or... |
f0aa9776030322ef5dc11bc1e4498487e471181029150184c67c81bc5cd4c285 | r0man/sqlingvo | types_test.cljc | (ns sqlingvo.types-test
(:require #?(:clj [sqlingvo.test :refer [db sql=]]
:cljs [sqlingvo.test :refer [db] :refer-macros [sql=]])
[clojure.test :refer [deftest is]]
[sqlingvo.core :as sql]))
(deftest test-create-enum-type
(sql= (sql/create-type db :mood
(sql/enum [... | null | https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/test/sqlingvo/types_test.cljc | clojure | (ns sqlingvo.types-test
(:require #?(:clj [sqlingvo.test :refer [db sql=]]
:cljs [sqlingvo.test :refer [db] :refer-macros [sql=]])
[clojure.test :refer [deftest is]]
[sqlingvo.core :as sql]))
(deftest test-create-enum-type
(sql= (sql/create-type db :mood
(sql/enum [... | |
5f37feb35b5a05f3d4c8c15b48c620011615aac20851c02520f148d37424b5fe | rtoy/cmucl | control.lisp | ;;; -*- Package: C; Log: C.Log -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/compiler/control.lisp $")
;;... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/control.lisp | lisp | -*- Package: C; Log: C.Log -*-
**********************************************************************
**********************************************************************
The control analysis pass in the compiler. This pass determines the
order in which the IR2 blocks are to be emitted, attempting to min... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/compiler/control.lisp $")
unreachable but still appear in the DFO , due in inadequate optimization ,
Written by
(in-package "C")
(intl:textd... |
9545ea72cb11d410f732bdf772ac3134ffac9e16352546cc3beaf095067fe684 | thelema/ocaml-community | rawwidget.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/support/rawwidget.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
1a19feac54b6f5f3e3262144f0dd3f9213939e5616c6990b4696c42293490d64 | donaldsonjw/bigloo | pgp_logic.scm | ;*=====================================================================*/
;* .../prgm/project/bigloo/api/openpgp/src/Llib/pgp_logic.scm */
;* ------------------------------------------------------------- */
* Author : * /
* Creation : Fri Aug 13 ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/openpgp/src/Llib/pgp_logic.scm | scheme | *=====================================================================*/
* .../prgm/project/bigloo/api/openpgp/src/Llib/pgp_logic.scm */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*===========================... | * Author : * /
* Creation : Fri Aug 13 08:28:04 2010 * /
* Last change : Fri Apr 27 11:21:28 2012 ( serrano ) * /
* Copyright : 2010 - 12 , * /
* OpenPGP logic ... |
710b8b3b9af7a19094c78823f6f8e28caf718046dad895fe08450d625b520a1b | pepeiborra/term | Rules.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances , TypeSynonymInstances #
# LANGUAGE OverlappingInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# L... | null | https://raw.githubusercontent.com/pepeiborra/term/7644e0f8fbc81754fd5255602dd1f799adcd5938/Data/Term/Annotated/Rules.hs | haskell | | This module works with an abstract notion of rule.
A rule is a set of terms (generally a pair) which must
be treated as a whole. Concrete examples include
term rewriting rules and prolog clauses.
To do this the module provides
generalizations of the unify, match, equiv, fresh and vars
operat... | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances , TypeSynonymInstances #
# LANGUAGE OverlappingInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# L... |
44697b9874c7e310539d03a1b829acd04b33bc1219702369a7934b860abac87e | weldr/bdcs | UtilsSpec.hs | Copyright ( C ) 2017 Red Hat , Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
--
-- This libr... | null | https://raw.githubusercontent.com/weldr/bdcs/cf360c3240644b4847336b9d58b2067f3aa1ec50/src/tests/BDCS/RPM/UtilsSpec.hs | haskell |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU... | Copyright ( C ) 2017 Red Hat , Inc.
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
module BDCS.RPM.UtilsSpec(spec)
where
import Test.Hspec
import BDCS.RPM.Ut... |
5d5fa63dafb43bfa7588c618a73900d1d130b8960fda64ac772c0d8e81e1910a | votinginfoproject/data-processor | polling_location.clj | (ns vip.data-processor.output.v3-0.polling-location
(:require [vip.data-processor.output.v3-0.address :refer [address]]
[vip.data-processor.output.xml-helpers :refer :all]
[korma.core :as korma]))
(defn ->xml [{:keys [id
directions
polling_hours
... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/output/v3_0/polling_location.clj | clojure | (ns vip.data-processor.output.v3-0.polling-location
(:require [vip.data-processor.output.v3-0.address :refer [address]]
[vip.data-processor.output.xml-helpers :refer :all]
[korma.core :as korma]))
(defn ->xml [{:keys [id
directions
polling_hours
... | |
942dfb42321242a7cc83c07fb9dfb1f7d7668dca103292127fca4de875c641d9 | dnaeon/cl-rfc4251 | test-suite.lisp | Copyright ( c ) 2020 Nikolov < >
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
1 . Redistributions of source code must retain the above copyright
;; notice, this list of co... | null | https://raw.githubusercontent.com/dnaeon/cl-rfc4251/72813cf6a38f59f7ce1a9930eb6a92c38382746e/t/test-suite.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer
in this position and unchanged.
notice, this list of conditions and the fo... | Copyright ( c ) 2020 Nikolov < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES... |
5fd200c79c909cf2a4a4e48553246fb7ced75147cde2a4bc89afbb395a540b0c | fukamachi/clack | clack.lisp | (in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (find-package :clack)
(defpackage clack
(:use :cl)
(:import-from :clack.handler
:run
:stop)
(:import-from :clack.util
:find-handler)
(:import-fro... | null | https://raw.githubusercontent.com/fukamachi/clack/53a93ff396d178dfb41fafb99d23d4446d864351/src/clack.lisp | lisp | Ensure the handler to be loaded. | (in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (find-package :clack)
(defpackage clack
(:use :cl)
(:import-from :clack.handler
:run
:stop)
(:import-from :clack.util
:find-handler)
(:import-fro... |
46d65581d71ee64a64d68463d5c4115b538d12f384898d1b945fdecb8013693f | rbkmoney/hellgate | hg_woody_wrapper.erl | -module(hg_woody_wrapper).
handler
-behaviour(woody_server_thrift_handler).
-export([handle_function/4]).
-export_type([handler_opts/0]).
-export_type([client_opts/0]).
-type handler_opts() :: #{
handler := module(),
party_client => party_client:client(),
default_handling_timeout => timeout(),
u... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/c3e7413db06296a72fb64268eca98e63379d2ef5/apps/hg_proto/src/hg_woody_wrapper.erl | erlang | Callbacks
API | -module(hg_woody_wrapper).
handler
-behaviour(woody_server_thrift_handler).
-export([handle_function/4]).
-export_type([handler_opts/0]).
-export_type([client_opts/0]).
-type handler_opts() :: #{
handler := module(),
party_client => party_client:client(),
default_handling_timeout => timeout(),
u... |
d1149bf9c873fb81f57365043c0338ab09d50542265fc8997ab5dc83df8454e7 | vii/dysfunkycom | library.lisp | ;;; -*- lisp -*-
(in-package #:lispbuilder-sdl-cffi)
;;#+windows(eval-when (:compile-toplevel :load-toplevel :execute)
( pushnew ( merge - pathnames " .. /bin/ "
;; (directory-namestring (or *load-truename* *default-pathname-defaults*)))
;; cffi:*foreign-li... | null | https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/cffi/library.lisp | lisp | -*- lisp -*-
#+windows(eval-when (:compile-toplevel :load-toplevel :execute)
(directory-namestring (or *load-truename* *default-pathname-defaults*)))
cffi:*foreign-library-directories*
:test #'equal)) |
(in-package #:lispbuilder-sdl-cffi)
( pushnew ( merge - pathnames " .. /bin/ "
#+windows(eval-when (:compile-toplevel :load-toplevel :execute)
(pushnew sdl-bin:*dll-path*
cffi:*foreign-library-directories*
:test #'equ... |
fab1a321209b407c0810f5c820480e77cd205922bd82aa96c6ed8662b5dc7f87 | yesodweb/yesod | Auth.hs | # LANGUAGE CPP #
# LANGUAGE ViewPatterns #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DefaultSignatures #
# LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings ... | null | https://raw.githubusercontent.com/yesodweb/yesod/ccfd77192e14256b613d439b6f4658f9ff78f67d/yesod-auth/Yesod/Auth.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
* Subsite
* Plugin interface
* User functions
* Exception
* Helper
* Internal
| The result of an authentication based on credentials
^ Authenticated successfully
^ Invalid credentials provided by user
^ Some other error
| Us... | # LANGUAGE CPP #
# LANGUAGE ViewPatterns #
# LANGUAGE DefaultSignatures #
# LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Yesod.Auth
... |
c054ad691ff0173b04a2b9b72c34e18cbf57339062ed2a8ada12767ee91ce01b | ocaml-multicore/tezos | test_script_cache.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
2dd58be8982947a96dc7063c30100a5ea201598d75cd9c8ac07c2cac56fe221b | tschady/advent-of-code | d20.clj | (ns aoc.2016.d20
(:require
[aoc.file-util :as file-util]))
(def input (file-util/read-ranges "2016/d20.txt"))
(def max-ip 4294967295)
(defn- overlap? [[_ hi1] [lo2 _]] (>= 1 (- lo2 hi1)))
(defn- merge-ips [[lo1 hi1] [lo2 hi2]] [(min lo1 lo2) (max hi1 hi2)])
(defn merge-ranges [ranges r2]
(let [r1 (peek rang... | null | https://raw.githubusercontent.com/tschady/advent-of-code/ae2b390867b333ea2a2f18503355b4d3a8a04f2f/src/aoc/2016/d20.clj | clojure | (ns aoc.2016.d20
(:require
[aoc.file-util :as file-util]))
(def input (file-util/read-ranges "2016/d20.txt"))
(def max-ip 4294967295)
(defn- overlap? [[_ hi1] [lo2 _]] (>= 1 (- lo2 hi1)))
(defn- merge-ips [[lo1 hi1] [lo2 hi2]] [(min lo1 lo2) (max hi1 hi2)])
(defn merge-ranges [ranges r2]
(let [r1 (peek rang... | |
32d386584d07ee773d46b406ce1ed88a1a105219ebf3d81fa59d1f33c35d2da5 | quil/quil | debugging.cljc | (ns quil.snippets.debugging
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]])
[quil.core :as q :include-macros true]
quil.snippets.all-snippets-internal)
#?(:cljs
(:use-macros [quil.snippets.macro :only [defsnippet]])))
(defsnippet print-first-n
"print-first-n"
{:skip-im... | null | https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/src/cljc/quil/snippets/debugging.cljc | clojure | (ns quil.snippets.debugging
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]])
[quil.core :as q :include-macros true]
quil.snippets.all-snippets-internal)
#?(:cljs
(:use-macros [quil.snippets.macro :only [defsnippet]])))
(defsnippet print-first-n
"print-first-n"
{:skip-im... | |
f1abb5cb5f12412ac5945b49403b323e4a9d08b46f956001e0bcdfc37313c968 | perkss/clojure-kafka-examples | core.clj | (ns kafka-example.core
(:gen-class)
(:require [clojure.tools.logging :as log]
[environ.core :refer [env]])
(:import [org.apache.kafka.clients.admin AdminClientConfig NewTopic KafkaAdminClient]
org.apache.kafka.clients.consumer.KafkaConsumer
[org.apache.kafka.clients.producer Kafk... | null | https://raw.githubusercontent.com/perkss/clojure-kafka-examples/e16aa41f6085d86a70846ff3a977dd354da814c9/kafka-producer-consumer-example/src/kafka_example/core.clj | clojure | "Create the kafka producer to send on messages received" | (ns kafka-example.core
(:gen-class)
(:require [clojure.tools.logging :as log]
[environ.core :refer [env]])
(:import [org.apache.kafka.clients.admin AdminClientConfig NewTopic KafkaAdminClient]
org.apache.kafka.clients.consumer.KafkaConsumer
[org.apache.kafka.clients.producer Kafk... |
33dcf63ba6467f1a80f93bc8dcb91a839980a450135a4d159bbbd59463871640 | haskell/statistics | Types.hs | -- |
-- Module : Statistics.Matrix.Types
Copyright : 2014
-- License : BSD3
--
-- Basic matrix operations.
--
There is n't a widely used matrix package for yet , so
-- we implement the necessary minimum here.
module Statistics.Matrix.Types
(
Vector
, MVector
, Matrix(..)
, MMatrix(..)... | null | https://raw.githubusercontent.com/haskell/statistics/a2aa25181e50cd63db4a785c20c973a3c4dd5dac/dense-linear-algebra/src/Statistics/Matrix/Types.hs | haskell | |
Module : Statistics.Matrix.Types
License : BSD3
Basic matrix operations.
we implement the necessary minimum here.
# UNPACK #
^ Rows of matrix.
# UNPACK #
^ Columns of matrix.
^ Matrix data.
# UNPACK #
# UNPACK #
The Show instance is useful only for debugging. | Copyright : 2014
There is n't a widely used matrix package for yet , so
module Statistics.Matrix.Types
(
Vector
, MVector
, Matrix(..)
, MMatrix(..)
, debug
) where
import Data.Char (isSpace)
import Numeric (showFFloat)
import qualified Data.Vector.Unboxed as U
import qualified Da... |
7089c48b6064407906ba19f2a2252566a53f9525c8d94734519a6b786eed6be2 | tmattio/js-bindings | vscode_languageclient_workspace_folders.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
import { WorkspaceFolder as VWorkspaceFolder , WorkspaceFoldersChangeEvent as
VWorkspaceFoldersChangeEvent } from ' vscode ' ;
VWorkspaceFoldersChangeEvent } from 'vscode'; *)
import { DynamicFeature , Registr... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageclient/vscode_languageclient_workspace_folders.mli | ocaml | FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
TODO: Move me | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
import { WorkspaceFolder as VWorkspaceFolder , WorkspaceFoldersChangeEvent as
VWorkspaceFoldersChangeEvent } from ' vscode ' ;
VWorkspaceFoldersChangeEvent } from 'vscode'; *)
import { DynamicFeature , Registr... |
ff2f8fb89d1b67d107a1277defb34f55240beede24e0fa6740c784f617fb65b5 | BillHallahan/G2 | M13.hs | {-@ LIQUID "--no-termination" @-}
module M19 (main) where
data Peano = Succ Peano | Nil
@ main : : Peano - > Bool - > { b : | b } @
main :: Peano -> Bool -> Bool
main xs flag =
case while xs cond loop (flag, 2, 0) of
(_, j, k) -> if k /= 0 then j == 2 * k + 2 else True
while :: Peano -> (Peano -> a -> ... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M13.hs | haskell | @ LIQUID "--no-termination" @
@ cond :: Peano -> (Bool, Int, Int) -> Bool @
@ loop :: (Bool, Int, Int) -> (Bool, Int, Int) @ |
module M19 (main) where
data Peano = Succ Peano | Nil
@ main : : Peano - > Bool - > { b : | b } @
main :: Peano -> Bool -> Bool
main xs flag =
case while xs cond loop (flag, 2, 0) of
(_, j, k) -> if k /= 0 then j == 2 * k + 2 else True
while :: Peano -> (Peano -> a -> Bool) -> (a -> a) -> a -> a
while ... |
99c7fc4d1f75b1a14396851d72f9ae1d49e758ffac99049eb75dea415d4894c3 | ocaml/ocaml-lsp | ocamlformat.mli | (** Generic formatting facility for OCaml and Reason sources.
Relies on [ocamlformat] for OCaml and [refmt] for reason *)
open Import
type error =
| Unsupported_syntax of Document.Syntax.t
| Missing_binary of { binary : string }
| Unexpected_result of { message : string }
| Unknown_extension of Uri.t
va... | null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/398c31e2b7ba5de95ed2e073811375fffdfa96e3/ocaml-lsp-server/src/ocamlformat.mli | ocaml | * Generic formatting facility for OCaml and Reason sources.
Relies on [ocamlformat] for OCaml and [refmt] for reason |
open Import
type error =
| Unsupported_syntax of Document.Syntax.t
| Missing_binary of { binary : string }
| Unexpected_result of { message : string }
| Unknown_extension of Uri.t
val message : error -> string
val run :
Document.t -> Fiber.Cancel.t option -> (TextEdit.t list, error) result Fiber.t
|
105b820f4d48c9cfa122ef1002443a2037d1b327d1c05fca7be8007e77cda6c1 | montelibero-org/veche | Telegram.hs | module Model.Telegram (
* Telegram account binding
EntityField (Telegram_chatid),
Key (TelegramKey),
Telegram (..),
TelegramId,
-- * Telegram bot state
TelegramState (..),
dbGetState,
dbSetOffset,
) where
-- prelude
import Import.NoFoundation
-- global
import Database.Persist (select... | null | https://raw.githubusercontent.com/montelibero-org/veche/02b44d3c3ba128627a9dda82b5f02428e1bdcacc/veche-web/src/Model/Telegram.hs | haskell | * Telegram bot state
prelude
global
component | module Model.Telegram (
* Telegram account binding
EntityField (Telegram_chatid),
Key (TelegramKey),
Telegram (..),
TelegramId,
TelegramState (..),
dbGetState,
dbSetOffset,
) where
import Import.NoFoundation
import Database.Persist (selectFirst, updateWhere, (=.))
import Model (EntityFi... |
34f3fcd3685a093c3da95451c82604da24e05cdb745c16241e5e3d289d3b95a5 | bvaugon/ocapic | serial.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/extra/serial.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
exception Exn of string
exception Restart
let atom0_adr = 0xF88;;
let int32_custom_adr = 0x15E0;;
let int64_custom_adr = 0x15F0;;
let serialize_buffer_length = 2000;;
type tictac =... |
cd12caf22bcba926b6e38aa06193d3d10fff55d87e9b969c44f10635e0898ca8 | ijvcms/chuanqi_dev | chat_cache.erl | %%%-------------------------------------------------------------------
%%% @author tuhujia
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 03 . 八月 2015 16:25
%%%-------------------------------------------------------------------
-module(chat_cache).
-include("common.hrl").
-include("cache.hrl").
-include... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/chat/chat_cache.erl | erlang | -------------------------------------------------------------------
@author tuhujia
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
===============================================================... | ( C ) 2015 , < COMPANY >
Created : 03 . 八月 2015 16:25
-module(chat_cache).
-include("common.hrl").
-include("cache.hrl").
-include("record.hrl").
-include("proto.hrl").
-export([
get_chat_list/1,
save_chat/2,
delete_chat/2
]).
1 世界 2 公会 3 队伍 4 私聊 5 系统
-define(WORD_CHAT_MAX_NUM, 20).
获取聊天保存信息
get_c... |
ec68b270e1d51368458abbe3ef80c96a490d5848aa5640c94eabc6fd348dd699 | tmfg/mmtis-national-access-point | pre_notice.cljs | (ns ote.style.pre-notice
"Styles for pre notice related things"
(:require [stylefy.core :as stylefy]))
(def comment-container {:margin-top "1em"})
(def comment-style {:margin-top "1em"})
| null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/style/pre_notice.cljs | clojure | (ns ote.style.pre-notice
"Styles for pre notice related things"
(:require [stylefy.core :as stylefy]))
(def comment-container {:margin-top "1em"})
(def comment-style {:margin-top "1em"})
| |
d9bec2716702d3936559ffe30781e922ecb232328fbca4d86b49fa31f32d8f7a | NorfairKing/smos | PostLogin.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Smos.Server.Handler.PostLogin where
import qualified Data.Text as T
import Data.Text.Encoding (decodeUtf8)
import Servant.Auth.Server
import Smos.Server.Handler.Import
se... | null | https://raw.githubusercontent.com/NorfairKing/smos/91efacaede3574e2f8f9d9601bf0383897eebfd8/smos-server/src/Smos/Server/Handler/PostLogin.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Smos.Server.Handler.PostLogin where
import qualified Data.Text as T
import Data.Text.Encoding (decodeUtf8)
import Servant.Auth.Server
import Smos.Server.Handler.Import
servePostLogin ::
Login ->
ServerHandler (Headers '[Head... |
bb96deb43acb254f677e3695063dfd7720bcfe7eb24c554e18b1f3f1df5bc82b | takikawa/racket-ppa | reader.rkt | #lang s-exp deinprogramm/sdp/private/reader
deinprogramm/sdp/vanilla
'vanilla
| null | https://raw.githubusercontent.com/takikawa/racket-ppa/d336bb10e3e0ec3a20020e9ade9e77d2f6f80b6d/share/pkgs/deinprogramm/deinprogramm/sdp/lang/reader.rkt | racket | #lang s-exp deinprogramm/sdp/private/reader
deinprogramm/sdp/vanilla
'vanilla
| |
915dd00ca00536f57fa7415227503ad80a3f0510d8f23dd5e7858a98bd6661fe | arachne-framework/factui | bench.cljc | (ns factui.bench
(:require
[factui.api :as api :include-macros true]
[factui.facts :as f]
[factui.bench.basic-rules :as br]
[clojure.pprint :refer [pprint]]
#?(:clj [clojure.pprint :refer [pprint]]
:cljs [cljs.pprint :refer [pprint]])
#?(:clj [clara.rules :as cr]
:cljs [clara.rules... | null | https://raw.githubusercontent.com/arachne-framework/factui/818ea79d7f84dfe80ad23ade0b6b2ed5bb1c6287/test/factui/bench.cljc | clojure | Run tests at the root level, in CLJS | (ns factui.bench
(:require
[factui.api :as api :include-macros true]
[factui.facts :as f]
[factui.bench.basic-rules :as br]
[clojure.pprint :refer [pprint]]
#?(:clj [clojure.pprint :refer [pprint]]
:cljs [cljs.pprint :refer [pprint]])
#?(:clj [clara.rules :as cr]
:cljs [clara.rules... |
1766498e62bb7a8cade9f3d16628d05ccc9ad5d219089e740d8200a908eb6169 | plumatic/grab-bag | libsvm_test.clj | (ns classify.libsvm-test
(:use clojure.test plumbing.test plumbing.core)
(:require
[plumbing.index :as plumbing-index]
[flop.map :as map]
[classify.libsvm :as libsvm]
[classify.features :as features]
[classify.features-test :as features-test]))
(deftest libsvm-data-line-test
(is-= "1 0:1 3:2.002"
... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/classify/test/classify/libsvm_test.clj | clojure | (ns classify.libsvm-test
(:use clojure.test plumbing.test plumbing.core)
(:require
[plumbing.index :as plumbing-index]
[flop.map :as map]
[classify.libsvm :as libsvm]
[classify.features :as features]
[classify.features-test :as features-test]))
(deftest libsvm-data-line-test
(is-= "1 0:1 3:2.002"
... | |
0a2ddaf91311adbc5e45ac6654a6c4a50aab60f38823678c359bc2ed5f71c125 | Viasat/halite | utils.clj | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.doc.utils
(:require [cheshire.core :as json]
[clojure.edn :as edn]
[clojure.java.io :as io]
[com.viasat.halite.lib.fixed-decimal :as fixed-decimal]
[com.viasat.jadeite :as jadei... | null | https://raw.githubusercontent.com/Viasat/halite/1145fdf49b5148acb389dd5100059b0d2ef959e1/src/com/viasat/halite/doc/utils.clj | clojure | this is a string that, in the case of halite, has been custom formatted by hand in the example | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.doc.utils
(:require [cheshire.core :as json]
[clojure.edn :as edn]
[clojure.java.io :as io]
[com.viasat.halite.lib.fixed-decimal :as fixed-decimal]
[com.viasat.jadeite :as jadei... |
3cb8b6a0e71e032941846bf20c9fe14944c8ac3b8855f30345c2c6f79d38dbf5 | slipstream/SlipStreamServer | session_lifecycle_test.clj | (ns com.sixsq.slipstream.ssclj.resources.session-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.lifecycle-test-utils :as ltu]
[com.si... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/session_lifecycle_test.clj | clojure | (ns com.sixsq.slipstream.ssclj.resources.session-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.lifecycle-test-utils :as ltu]
[com.si... | |
db5a685695a6c480d66f2a947cb708534ae3331084d3b0269fde64a8227d4ebf | bmeurer/ocamljit2 | ocamlbuild_executor.ml | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/ocamlbuild_executor.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
Original author :
Ocamlbuild_executor
open Uni... |
82e4b0e3c268cc2bfb4f368ad1efcf73f3c1268b1f65e6fa0795aee70d93c1a0 | NorfairKing/smos | GetAgendaReport.hs | module Smos.Server.Handler.GetAgendaReport
( serveGetAgendaReport,
)
where
import Conduit
import Data.Time
import Smos.Report.Agenda
import Smos.Report.Agenda.Types
import Smos.Report.Period
import Smos.Report.TimeBlock
import Smos.Server.Handler.Import
serveGetAgendaReport :: AuthNCookie -> ServerHandler AgendaR... | null | https://raw.githubusercontent.com/NorfairKing/smos/91efacaede3574e2f8f9d9601bf0383897eebfd8/smos-server/src/Smos/Server/Handler/GetAgendaReport.hs | haskell | module Smos.Server.Handler.GetAgendaReport
( serveGetAgendaReport,
)
where
import Conduit
import Data.Time
import Smos.Report.Agenda
import Smos.Report.Agenda.Types
import Smos.Report.Period
import Smos.Report.TimeBlock
import Smos.Server.Handler.Import
serveGetAgendaReport :: AuthNCookie -> ServerHandler AgendaR... | |
cc7aa10a9e075478ace1877fafbd56b47975e869e9c0e05ea444334d396e8b62 | monadbobo/ocaml-core | multi_map.mli | (**
Maps with mutliple bindings.
This is a map that allows multiple binding. Each key can have several values
associated to it.
*)
open Core.Std
type ('k,'v) t
include Sexpable.S2 with type ('a,'b) t := ('a,'b) t
val empty : ('k,'v) t
val singleton : 'k -> 'v -> ('k,'v) t
val is_empty : ('k,'v) t -> bo... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/multi_map.mli | ocaml | *
Maps with mutliple bindings.
This is a map that allows multiple binding. Each key can have several values
associated to it.
* [find m key] returns all the elements that where added to [key] in [m] in
the reverse order in which they where added. If no element where added an
empty list is returne... | open Core.Std
type ('k,'v) t
include Sexpable.S2 with type ('a,'b) t := ('a,'b) t
val empty : ('k,'v) t
val singleton : 'k -> 'v -> ('k,'v) t
val is_empty : ('k,'v) t -> bool
val add : key:'k -> data:'v -> ('k, 'v) t -> ('k, 'v) t
val find : ('k, 'v) t -> 'k -> 'v list
val remove : ('k, 'v) t -> ... |
d0e2646d0257b477bb6d1c52becd97492a7a51f533df2e850bedeff148893fb7 | stumpwm/stumpwm-contrib | urgentwindows.lisp | (in-package #:urgentwindows)
(export '(
raise-urgent
*urgent-window-message*))
(defvar *urgent-windows-stack* nil
"Stack of windows gone urgent. After activating a window from the stack,
it goes off the stack")
(defvar *urgent-window-message* "~a needs your attention."
"Message template to be displayed to g... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/19c231b2518efe71cb6dade3ad4cf573377902c3/util/urgentwindows/urgentwindows.lisp | lisp | (in-package #:urgentwindows)
(export '(
raise-urgent
*urgent-window-message*))
(defvar *urgent-windows-stack* nil
"Stack of windows gone urgent. After activating a window from the stack,
it goes off the stack")
(defvar *urgent-window-message* "~a needs your attention."
"Message template to be displayed to g... | |
0cdd6d2714a67668c741a4cb888debeb1c1962a8cd4f4b1b2ceade3bd2c1b255 | matt77hias/erl-smallpt | image_io.erl | -module(image_io).
-export([gamma/0, write_ppm/3, write_ppm/4]).
gamma() -> 2.2.
write_ppm(Width, Height, Ls) ->
write_ppm(Width, Height, Ls, "erl-image.ppm").
write_ppm(Width, Height, Ls, Fname) ->
{ok, Stream} = file:open(Fname, [write]),
io:format(Stream, "P3~n~p ~p~n255~n", [Width, Height]),
write_ppm_Ls(St... | null | https://raw.githubusercontent.com/matt77hias/erl-smallpt/3b30af7487c425cc646241d26ac19f0b59c66ebf/src/image_io.erl | erlang | -module(image_io).
-export([gamma/0, write_ppm/3, write_ppm/4]).
gamma() -> 2.2.
write_ppm(Width, Height, Ls) ->
write_ppm(Width, Height, Ls, "erl-image.ppm").
write_ppm(Width, Height, Ls, Fname) ->
{ok, Stream} = file:open(Fname, [write]),
io:format(Stream, "P3~n~p ~p~n255~n", [Width, Height]),
write_ppm_Ls(St... | |
b3bf9c3026e08e026f44406e93ef4f14fe09091ba4d16d886bb0240e52f987a4 | footprintanalytics/footprint-web | preview_embed.clj | (ns metabase.api.preview-embed
"Endpoints for previewing how Cards and Dashboards will look when embedding them.
These endpoints are basically identical in functionality to the ones in `/api/embed`, but:
1. Require admin access
2. Ignore the values of `:enabled_embedding` for Cards/Dashboards
3. Ignor... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/api/preview_embed.clj | clojure | (ns metabase.api.preview-embed
"Endpoints for previewing how Cards and Dashboards will look when embedding them.
These endpoints are basically identical in functionality to the ones in `/api/embed`, but:
1. Require admin access
2. Ignore the values of `:enabled_embedding` for Cards/Dashboards
3. Ignor... | |
af7426d9a20385760ccf019a46c43460f694f066d4c052fcc261cb8d0b0f1c5e | kyleburton/sandbox | core.cljs | (ns mysterious-messages.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(defonce app-state (atom {:text "Hello Chestnut!"}))
(defn main []
(om/root
(fn [app owner]
(reify
om/IRender
(render [_]
(dom/h1 nil (:text app)))))... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/mysterious-messages/src/cljs/mysterious_messages/core.cljs | clojure | (ns mysterious-messages.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(defonce app-state (atom {:text "Hello Chestnut!"}))
(defn main []
(om/root
(fn [app owner]
(reify
om/IRender
(render [_]
(dom/h1 nil (:text app)))))... | |
d3adc685873bffe4ba54462efd1d6eaa88c11b13816a8f298ffa7f7418cde489 | chaoxu/fancy-walks | A.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Dat... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%202010/Round%202/A.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS... |
ec1fc77f9ff80789e2bef65e08db457e556fc6aaeb25e460d28a57a7f938d3cc | jgoerzen/ftphs | Server.hs | arch - tag : FTP server support
Copyright ( C ) 2004 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation ; either version 2.1 of the License , or
( at your option ) any later ve... | null | https://raw.githubusercontent.com/jgoerzen/ftphs/f4a4838e92ddd97c24f045b7901aa070165bfe3b/src/Network/FTP/Server.hs | haskell | | Send a reply code, handling multi-line text as necessary.
Close any existing connection
Close any existing connection
this, so I do too.. | arch - tag : FTP server support
Copyright ( C ) 2004 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation ; either version 2.1 of the License , or
( at your option ) any later ve... |
a215cec7752a5bd7d1e0a1e00a3c73ed0c133c131733d4da01183addd8491ff3 | well-typed/optics | VL.hs | -- |
-- Module: Optics.VL
--
This module provides compatibility layer for converting from / to
encoding of ' 's , ' Prism 's , ' Lens'es , ' , ' AffineTraversal 's ,
' IxAffineTraversal 's , ' Traversal 's and ' 's to their optics
-- equivalents.
module Optics.VL
(
*
IsoVL
, IsoVL'
, isoVL
, t... | null | https://raw.githubusercontent.com/well-typed/optics/ba3c5a4d2f110c82238bc2fe7bb187023ab516f5/optics-vl/src/Optics/VL.hs | haskell | |
Module: Optics.VL
equivalents.
* Prism
* Lens
* IxLens
* IxAffineTraversal
* Traversal
# INLINE left' #
# INLINE right' #
--------------------------------------
# INLINE left' #
# INLINE right' #
--------------------------------------
# INLINE withIsoVL #
--------------------------------------
# INLINE prism... | This module provides compatibility layer for converting from / to
encoding of ' 's , ' Prism 's , ' Lens'es , ' , ' AffineTraversal 's ,
' IxAffineTraversal 's , ' Traversal 's and ' 's to their optics
module Optics.VL
(
*
IsoVL
, IsoVL'
, isoVL
, toIsoVL
, withIsoVL
, PrismVL
, PrismVL'... |
2d00b6b159b081659237eb0e6bc2004ff0dad23ba57460b7b312a9be5fadda6a | shamazmazum/easy-audio | ape-tags-v2.lisp | Copyright ( c ) 2012 - 2016 ,
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
1 . Redistributions of source code must retain the above copyright notice , this
;; list of conditions and... | null | https://raw.githubusercontent.com/shamazmazum/easy-audio/4944f4ac12ffbe96f2d6bb7b116deae8203080e8/ape/ape-tags-v2.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:
list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation
and/or other materi... | Copyright ( c ) 2012 - 2016 ,
1 . Redistributions of source code must retain the above copyright notice , this
2 . Redistributions in binary form must reproduce the above copyright notice ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND
DISCLAIMED . IN NO EVENT SHALL TH... |
37323144929f5aef38104b16d0e7b5e5451cd10e41300e14b021c45d649dd7af | diku-dk/futhark | ISRWIM.hs | # LANGUAGE TypeFamilies #
| scans with inner maps .
module Futhark.Pass.ExtractKernels.ISRWIM
( iswim,
irwim,
rwimPossible,
)
where
import Control.Arrow (first)
import Control.Monad.State
import Futhark.IR.SOACS
import Futhark.MonadFreshNames
import Futhark.Tools
-- | Interchange Scan With Inner Map. ... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/Pass/ExtractKernels/ISRWIM.hs | haskell | | Interchange Scan With Inner Map. Tries to turn a @scan(map)@ into a
@map(scan)
| Interchange Reduce With Inner Map. Tries to turn a @reduce(map)@ into a
@map(reduce)
FIXME? Can we reasonably assume that the accumulator is a
replicate? We also assume that it is non-empty.
| Does this reduce operator contain a... | # LANGUAGE TypeFamilies #
| scans with inner maps .
module Futhark.Pass.ExtractKernels.ISRWIM
( iswim,
irwim,
rwimPossible,
)
where
import Control.Arrow (first)
import Control.Monad.State
import Futhark.IR.SOACS
import Futhark.MonadFreshNames
import Futhark.Tools
iswim ::
(MonadBuilder m, Rep m ~ SO... |
f973da2e512efc692002c388474538a134348fb6deadce84c807f53b84fa60dd | fros1y/epo-download | Main.hs | module Main where
import Control.Lens.Operators
import qualified Data.Ini as Ini
import qualified Data.Patent.Citation.Format as Format
import qualified Data.Patent.Citation.Parse as Parse
import qualified Data.Patent.Providers.EPO as EPO
import qualified Data.Patent.Providers.... | null | https://raw.githubusercontent.com/fros1y/epo-download/c27530c931165a0aed5fba0cd436e7a66f651c57/app/Main.hs | haskell | module Main where
import Control.Lens.Operators
import qualified Data.Ini as Ini
import qualified Data.Patent.Citation.Format as Format
import qualified Data.Patent.Citation.Parse as Parse
import qualified Data.Patent.Providers.EPO as EPO
import qualified Data.Patent.Providers.... | |
a71f0191e15e5c84c5fbe82da9a40e9b6158a773d03fcd69cc13d9c5d5b87055 | biegunka/biegunka | Check.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE NamedFieldPuns #
-- | Check interpreter
module Control.Biegunka.Check (check) where
import Control.Concurrent.Async (async, waitCatch)
import Control.Exception (bracket)
import Control.Lens
import Control.Monad
import Control.Monad.Fre... | null | https://raw.githubusercontent.com/biegunka/biegunka/74fc93326d5f29761125d7047d5418899fa2469d/src/Control/Biegunka/Check.hs | haskell | # LANGUAGE GADTs #
| Check interpreter
| Split the filepath into the list of directories and the filename | # LANGUAGE NamedFieldPuns #
module Control.Biegunka.Check (check) where
import Control.Concurrent.Async (async, waitCatch)
import Control.Exception (bracket)
import Control.Lens
import Control.Monad
import Control.Monad.Free (iter)
import System.FilePath (spl... |
9833b5ec65abc2267e3661bb46488e233b88c779caeee6d80c0ba3bcdcbc3ad1 | morpheusgraphql/morpheus-graphql | Name.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/a5ca49ff4cb693831b7c75280afb27eddf5717db/morpheus-graphql-core/src/Data/Morpheus/Types/Internal/AST/Name.hs | haskell | # LANGUAGE OverloadedStrings #
# INLINE isNotSystemFieldName # | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Types.Internal.AST.Name
( Name,
... |
96ad3175233e65d069586b6c5f22f8e982978b46958220f35b1ed4a1f3f08372 | janestreet/core | memo.mli | open! Import
* Memoization of OCaml functions of a single argument .
The default caching policy is to remember everything for the lifetime of the returned
closure , but [ ] allows one to specify an upper bound on cache size .
Whenever a cache entry must be forgotten in order to obey this bound , we... | null | https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/memo.mli | ocaml | * A type definition to indicate that the expected use outputs a function
* Returns a memoized version of a function with a single argument.
Of course, if the supplied function is recursive, only the outer calls are memoized;
recursive calls are not. For that, see [recursive] below.
* efficient special case f... | open! Import
* Memoization of OCaml functions of a single argument .
The default caching policy is to remember everything for the lifetime of the returned
closure , but [ ] allows one to specify an upper bound on cache size .
Whenever a cache entry must be forgotten in order to obey this bound , we... |
f1c59e9f6b054a4ac9c7c2e61ef94469932ac4d779d2891dee83e7d75b3b0797 | uwplse/synapse | kmeans-ris-test.rkt | #lang s-exp rosette
(require
"../opsyn/engine/metasketch.rkt" "../opsyn/engine/eval.rkt" "../opsyn/engine/util.rkt"
"../opsyn/bv/lang.rkt" "../opsyn/metasketches/imetasketch.rkt"
"../benchmarks/parrot/specs.rkt" "../benchmarks/parrot/kmeans.rkt" "../opsyn/engine/solver+.rkt"
rosette/solver/smt/z3
rackunit ... | null | https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/test/kmeans-ris-test.rkt | racket | too slow to run by default | #lang s-exp rosette
(require
"../opsyn/engine/metasketch.rkt" "../opsyn/engine/eval.rkt" "../opsyn/engine/util.rkt"
"../opsyn/bv/lang.rkt" "../opsyn/metasketches/imetasketch.rkt"
"../benchmarks/parrot/specs.rkt" "../benchmarks/parrot/kmeans.rkt" "../opsyn/engine/solver+.rkt"
rosette/solver/smt/z3
rackunit ... |
af1c5081ed0bbb252fe43eb9de9d8b4002a3ef6f8c6f0584c5cda1e224356e70 | doomeer/factorio | factoriojs.ml | (******************************************************************************)
Copyright ( c ) 2016
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining *)
(* a... | null | https://raw.githubusercontent.com/doomeer/factorio/78de4b9a1031d31cc8d7cd8ab6a92f8bf561f684/factoriojs.ml | ocaml | ****************************************************************************
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without lim... | Copyright ( c ) 2016
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
TH... |
6da7ef0c5b4173cfe5453212a55ef73f359a67555dbc619246793c5d587e7de8 | seereason/logic-classes | Resolution.hs | # LANGUAGE FlexibleContexts , RankNTypes , ScopedTypeVariables , TypeFamilies #
{-# OPTIONS -Wall -Wwarn #-}
{- Resolution.hs -}
,
module Data.Logic.Resolution
( prove
, getSetOfSupport
, SetOfSupport
, Unification
, isRenameOfAtomEq
, getSubstAtomEq
) where
import Data.Logic.ATP.Ap... | null | https://raw.githubusercontent.com/seereason/logic-classes/819059218027c3ee77bd2ef3a873fcca230d54b4/Data/Logic/Resolution.hs | haskell | # OPTIONS -Wall -Wwarn #
Resolution.hs
^ Recursion limit. We continue recursing until this
it overflows the stack.
prove ss1 [] _kb = (False, ss1)
prove ss1 (s:ss2) kb =
let
in
if tf then
(True, (ss1 ++ [s] ++ss'))
else
prove (ss1 ++ [s]) ss' (fst s:kb)
|Convert the "qu... | # LANGUAGE FlexibleContexts , RankNTypes , ScopedTypeVariables , TypeFamilies #
,
module Data.Logic.Resolution
( prove
, getSetOfSupport
, SetOfSupport
, Unification
, isRenameOfAtomEq
, getSubstAtomEq
) where
import Data.Logic.ATP.Apply (HasApply(TermOf, PredOf, applyPredicate))
im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.