_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 |
|---|---|---|---|---|---|---|---|---|
047ce8b3e99f984df3b42233ecd987a0c72f66f16731495a75d8b9db009efac3 | stevenvar/OMicroB | tools.mli | val fail : ('a, unit, string, 'b) format4 -> 'a
val with_ic : string -> (in_channel -> 'a) -> 'a
val with_oc : string -> (out_channel -> 'a) -> 'a
val is_prefix : prefix:string -> string -> bool
val is_suffix : suffix:string -> string -> bool
| null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/src/bc2c/tools.mli | ocaml | val fail : ('a, unit, string, 'b) format4 -> 'a
val with_ic : string -> (in_channel -> 'a) -> 'a
val with_oc : string -> (out_channel -> 'a) -> 'a
val is_prefix : prefix:string -> string -> bool
val is_suffix : suffix:string -> string -> bool
| |
ca925d37d292f50f59edb13f6f830e1c36cdc968e765206a6addec740389f9f7 | dfithian/dfdb | Application.hs | module DFDB.Application where
import ClassyPrelude
import Control.Lens (use)
import Control.Monad.State (execStateT)
import System.Exit (exitSuccess)
import DFDB.Database (emptyDatabase, execute)
import DFDB.Persist (dbDir, loadDatabase, saveDatabase)
import DFDB.Statement (parseStatement, runParser)
import qualified... | null | https://raw.githubusercontent.com/dfithian/dfdb/72320317216f95df70cbf246375418503df4f150/src/DFDB/Application.hs | haskell | failed to parse command
successfully parsed command
some repl command | module DFDB.Application where
import ClassyPrelude
import Control.Lens (use)
import Control.Monad.State (execStateT)
import System.Exit (exitSuccess)
import DFDB.Database (emptyDatabase, execute)
import DFDB.Persist (dbDir, loadDatabase, saveDatabase)
import DFDB.Statement (parseStatement, runParser)
import qualified... |
5aae3b2ea4389975c61056e59d6e7a9a2b8faed385fccf2d523d1dfba8952460 | reflex-frp/reflex-gadt-api | Route.hs | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module C... | null | https://raw.githubusercontent.com/reflex-frp/reflex-gadt-api/835a7b7804de42bd6a33c8d187dd735359b0d388/example/common/src/Common/Route.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
You will probably want these imports for composing Encoders .
| Used to handle unparseable routes.
You can define any routes that will be handled specially by the backend here.
i.e. These do not serve the frontend, but do something different... | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Common.Route where
import Prelude hiding ( i d , ( . ) )
import Control . Category ... |
df2a30cf7041bffa13f0d3e5deb0746090b308e927ffd137600c11e28042c66e | aryx/ocamltarzan | poly.ml | type 'a mylist =
| Nil
| Cons of 'a * 'a mylist
| RegularList of 'a list
(* with tarzan *)
| null | https://raw.githubusercontent.com/aryx/ocamltarzan/4140f5102cee83a2ca7be996ca2d92e9cb035f9c/tests/poly.ml | ocaml | with tarzan | type 'a mylist =
| Nil
| Cons of 'a * 'a mylist
| RegularList of 'a list
|
5f4869c04d74ef67756635c49615ce23f191df8e1dd075b67997729f178a96b1 | wkok/openai-clojure | openai.clj | (ns ^:no-doc wkok.openai-clojure.openai
(:require
[clojure.java.io :as io]
[martian.hato :as martian-http]
[martian.core :as martian]
[martian.openapi :as openapi]
[martian.yaml :as yaml]
[wkok.openai-clojure.sse :as sse]))
(def add-headers
{:name ::add-headers
:enter (fn [ctx]
... | null | https://raw.githubusercontent.com/wkok/openai-clojure/5d781bae62001aa8d597fb62a3ed3bcc55ab1b66/src/wkok/openai_clojure/openai.clj | clojure | (ns ^:no-doc wkok.openai-clojure.openai
(:require
[clojure.java.io :as io]
[martian.hato :as martian-http]
[martian.core :as martian]
[martian.openapi :as openapi]
[martian.yaml :as yaml]
[wkok.openai-clojure.sse :as sse]))
(def add-headers
{:name ::add-headers
:enter (fn [ctx]
... | |
6bdd8d0cc7e0003ac191bcd36dda4f854b1e759f9c19631bbbcbbfc97f35d7ae | michalkonecny/aern2 | Derivative.hs | |
Module : AERN2.Poly . Cheb . Derivative
Description : Chebyshev basis derivative
Copyright : ( c ) , : :
Stability : experimental
Portability : portable
Chebyshev basis derivative
Module : AERN2.Poly.Cheb.Derivative
Descri... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-univariate/src/AERN2/Poly/Cheb/Derivative.hs | haskell | ( IsBall c
, CentreType c ~ Dyadic
=>
TODO: add check for domain?
trace("derivative exact of "++(show f)) $
trace("accuracy of f: "++(show $ getAccuracy f)) $
trace("deriavtive of f: "++(show $ aux (getPrecision f) (getPrecision f))) $
trace("accuracy of derivative: "++(show $ getAccuracy $ aux (getPrecision ... | |
Module : AERN2.Poly . Cheb . Derivative
Description : Chebyshev basis derivative
Copyright : ( c ) , : :
Stability : experimental
Portability : portable
Chebyshev basis derivative
Module : AERN2.Poly.Cheb.Derivative
Descri... |
a4599f1a4f5508f3324449e9f6be3f3ba4f2ff068cf113eb4c8af4f7cdddb35b | ayazhafiz/plts | eval.ml | open Language
(* Reference store *)
type store = term list
let emptystore = []
let extend_store store v = (List.length store, store @ [ v ])
let lookup_store store loc = List.nth store loc
let update_store store loc v =
let rec f toGo store =
let rest = List.tl store in
match toGo with 0 -> v :: rest | _... | null | https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/tapl/13-with_references_full/eval.ml | ocaml | Reference store | open Language
type store = term list
let emptystore = []
let extend_store store v = (List.length store, store @ [ v ])
let lookup_store store loc = List.nth store loc
let update_store store loc v =
let rec f toGo store =
let rest = List.tl store in
match toGo with 0 -> v :: rest | _ -> List.hd store :: f... |
bf5ae06aeaeee0f134aa5fd1e8bccec36db4ab04c749c76dd714b7715d910968 | clojure-interop/java-jdk | CSS.clj | (ns javax.swing.text.html.CSS
"Defines a set of
CSS attributes
as a typesafe enumeration. The HTML View implementations use
CSS attributes to determine how they will render. This also defines
methods to map between CSS/HTML/StyleConstants. Any shorthand
properties, such as font, are mapped to the intrinsic... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/html/CSS.clj | clojure | (ns javax.swing.text.html.CSS
"Defines a set of
CSS attributes
as a typesafe enumeration. The HTML View implementations use
CSS attributes to determine how they will render. This also defines
methods to map between CSS/HTML/StyleConstants. Any shorthand
properties, such as font, are mapped to the intrinsic... | |
3c681ebac0b5bf3381fc01d89c73ebc49fa1bc7f903e4bd3f5bf3611998f33ab | fukamachi/sxql | sxql.lisp | (in-package :cl-user)
(defpackage sxql
(:use :cl
:sxql.statement
:sxql.composed-statement
:sxql.clause)
(:shadow :primary-key
:foreign-key
:key)
(:import-from :sxql.sql-type
:sql-clause-list
:yield
:make-sql-symbol
... | null | https://raw.githubusercontent.com/fukamachi/sxql/c7889ba6b065b70d117cbb1ee1ff5177d0876706/src/sxql.lisp | lisp |
Clauses
Types | (in-package :cl-user)
(defpackage sxql
(:use :cl
:sxql.statement
:sxql.composed-statement
:sxql.clause)
(:shadow :primary-key
:foreign-key
:key)
(:import-from :sxql.sql-type
:sql-clause-list
:yield
:make-sql-symbol
... |
498ed378fbf8dadca2945569a3802887fc60c4669558cdcb761fdb48bd4c0076 | ucsd-progsys/nate | tkthread.mli | (***********************************************************************)
(* *)
(* LablTk, Tcl/Tk interface of Objective Caml *)
(* *)
, Nagoya Uni... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/support/tkthread.mli | ocaml | *********************************************************************
LablTk, Tcl/Tk interface of Objective Caml
... | , Nagoya University Mathematics Dept .
Copyright 2004 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
General Public License , with the special e... |
1cf373405328cc3d804d3126df939074c8943d44a3b4148c3c7a1b5ae0135101 | jgpc42/insn | util_test.clj | (ns insn.util-test
(:require [insn.util :as util]
[clojure.test :refer :all]))
(deftest test-class-desc
(testing "special keywords"
(binding [util/*this* "Foo"
util/*super* "Bar"]
(is (= "Foo" (util/class-desc :this)))
(is (= "Bar" (util/class-desc :super)))))
(testing ... | null | https://raw.githubusercontent.com/jgpc42/insn/3c12bb3c70e54e5091b79764c9776f72726266be/test/insn/util_test.clj | clojure | (ns insn.util-test
(:require [insn.util :as util]
[clojure.test :refer :all]))
(deftest test-class-desc
(testing "special keywords"
(binding [util/*this* "Foo"
util/*super* "Bar"]
(is (= "Foo" (util/class-desc :this)))
(is (= "Bar" (util/class-desc :super)))))
(testing ... | |
4952b83b2fac72a9e9f5964cf7ecbaaae5e2be11e67b64d73e86a3c48934d944 | processone/eturnal | mod_stats_influx.erl | eturnal STUN / TURN server module .
%%%
Copyright ( c ) 2020 < > .
Copyright ( c ) 2020 ProcessOne , SARL .
%%% All rights reserved.
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the ... | null | https://raw.githubusercontent.com/processone/eturnal/592c6d90e5b3225100e70d607b0879b1ec7bed6f/src/mod_stats_influx.erl | erlang |
All rights reserved.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific ... | eturnal STUN / TURN server module .
Copyright ( c ) 2020 < > .
Copyright ( c ) 2020 ProcessOne , SARL .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
This module logs STUN / TURN events with some metadata into a... |
d05f93e83eb4d2db4688bb01205d2c55f119c0529feef2e10116af9978b20b0b | russmatney/reframe-games | shapes.cljs | (ns games.puyo.shapes)
(defn build-piece-fn [colors]
(let [[colorA colorB] colors]
(fn [{x :x y :y}]
[{:x x :y y :anchor? true :color colorA}
{:x x :y (- y 1) :color colorB}])))
(defn next-bag
"'bag' terminology carried over from tetris."
[{:keys [game-opts min-queue-size]}]
(let [colors (:c... | null | https://raw.githubusercontent.com/russmatney/reframe-games/ff05f6ad4794e4505b6231522af0c90c3e212631/src/games/puyo/shapes.cljs | clojure | (ns games.puyo.shapes)
(defn build-piece-fn [colors]
(let [[colorA colorB] colors]
(fn [{x :x y :y}]
[{:x x :y y :anchor? true :color colorA}
{:x x :y (- y 1) :color colorB}])))
(defn next-bag
"'bag' terminology carried over from tetris."
[{:keys [game-opts min-queue-size]}]
(let [colors (:c... | |
60178d27569caaccfdccb4982e983acf1258236e91f7a012fe1057ca04a6a162 | spell-music/csound-expression | Midi.hs | {-# Language FlexibleContexts #-}
-- | Midi.
module Csound.Control.Midi(
MidiChn(..), MidiFun, toMidiFun, toMidiFun_,
Msg, Channel, midi, midin, pgmidi, ampCps,
midi_, midin_, pgmidi_,
-- * Mono-midi synth
monoMsg, holdMsg, trigNamedMono, genMonoMsg, smoothMonoArg,
genFilteredMonoMsg, genFiltere... | null | https://raw.githubusercontent.com/spell-music/csound-expression/e384b7e3f69345bbe236730dee2fb0864d575259/csound-expression/src/Csound/Control/Midi.hs | haskell | # Language FlexibleContexts #
| Midi.
* Mono-midi synth
** Custom temperament
* Midi event streams
* Reading midi note parameters
** Custom temperament
* Overload
* Other
| Specifies the midi channel or programm.
| Converts midi velocity number to amplitude.
| Midi message convertion with custom temperament... | module Csound.Control.Midi(
MidiChn(..), MidiFun, toMidiFun, toMidiFun_,
Msg, Channel, midi, midin, pgmidi, ampCps,
midi_, midin_, pgmidi_,
monoMsg, holdMsg, trigNamedMono, genMonoMsg, smoothMonoArg,
genFilteredMonoMsg, genFilteredMonoMsgTemp,
monoMsgTemp, holdMsgTemp, genMonoMsgTemp,
midiK... |
a91495abb82b4a4818c4106cd781062288c9a4081f91a4967459f4156e13a352 | williamleferrand/aws | fPS_factory.ml |
module Make = functor (HC : Aws_sigs.HTTP_CLIENT) ->
struct
module Util = Aws_util
module X = My_xml
open Creds
open Printf
open Lwt
let cbui_http_uri = "/cobranded-ui/actions/start"
let fps_http_uri = "/"
let sandbox_cbui_host = "authorize.payments-sandbox.amazon.com"
let production_cbui_host = "authorize.paym... | null | https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/src/fPS_factory.ml | ocaml | note capitalization of keys, different than [cbui_signature_params]
!!!
remember the leading '/' !
sign a request, and produce a url
signature
TODO: variant
start with signature params
address name
caller reference
city
cobranding style
cobranding image url
country
collect shipping address
... |
module Make = functor (HC : Aws_sigs.HTTP_CLIENT) ->
struct
module Util = Aws_util
module X = My_xml
open Creds
open Printf
open Lwt
let cbui_http_uri = "/cobranded-ui/actions/start"
let fps_http_uri = "/"
let sandbox_cbui_host = "authorize.payments-sandbox.amazon.com"
let production_cbui_host = "authorize.paym... |
d060a4f8289d383ec2c0f76661749010617732e7fc8a48437cf0b270561f3a99 | travitch/foreign-inference | Types.hs | module Foreign.Inference.Report.Types (
-- * Types
InterfaceReport(..)
) where
import Data.ByteString.Lazy.Char8 ( ByteString )
import Data.Map ( Map )
import Codec.Archive
import LLVM.Analysis
import Foreign.Inference.Interface
-- | An encapsulation of the report
data InterfaceReport =
InterfaceReport { rep... | null | https://raw.githubusercontent.com/travitch/foreign-inference/9cc0f7c730f7cd19afbd00d890abbc7109391cc6/src/Foreign/Inference/Report/Types.hs | haskell | * Types
| An encapsulation of the report | module Foreign.Inference.Report.Types (
InterfaceReport(..)
) where
import Data.ByteString.Lazy.Char8 ( ByteString )
import Data.Map ( Map )
import Codec.Archive
import LLVM.Analysis
import Foreign.Inference.Interface
data InterfaceReport =
InterfaceReport { reportModule :: Module
, reportFun... |
eca481d1aad652f345e0e5e9e23f9dc8fcb5479a0c7e263fd0007d4e4dae2d64 | ku-fpg/hermit | Map.hs | module Main where
import Data.Function(fix)
import Prelude hiding (abs, map)
data List2 a = Cons2 a a (List2 a)
| Singleton a
| Nil
rep :: [a] -> List2 a
rep [] = Nil
rep [x] = Singleton x
rep (x:y:xs) = Cons2 x y (rep xs)
abs :: List2 a -> [a]
abs Nil = []
abs (Singl... | null | https://raw.githubusercontent.com/ku-fpg/hermit/3e7be430fae74a9e3860b8b574f36efbf9648dec/examples/map/Map.hs | haskell | # RULES "ww" forall f . fix f = wrap (fix (unwrap . f . wrap)) #
# RULES "inline-fix" forall f . fix f = let work = f work in work #
# RULES "precondition2" forall xs . rep (abs xs) = xs #
can apply "ww" rule to this
can't apply "ww" rule to either of these... is it because of the forall type?
unwrap :: ((a -> b) -> ... | module Main where
import Data.Function(fix)
import Prelude hiding (abs, map)
data List2 a = Cons2 a a (List2 a)
| Singleton a
| Nil
rep :: [a] -> List2 a
rep [] = Nil
rep [x] = Singleton x
rep (x:y:xs) = Cons2 x y (rep xs)
abs :: List2 a -> [a]
abs Nil = []
abs (Singl... |
f6e496736767075bf3793ad343c5cf7beda16dc3fb7996c883f2c68ed8e6165d | jrwdunham/tegere | loader_test.clj | (ns tegere.loader-test
"Tests for the loading of feature and steps files."
(:require [tegere.loader :as sut]
[clojure.test :as t]))
(t/deftest find-feature-files-test
(t/testing "We can find feature files under a path"
(t/is (= (set (map str (sut/find-feature-files "examples/apes")))
... | null | https://raw.githubusercontent.com/jrwdunham/tegere/ee05eec87419d7d4cf91aebd2da121225bb8b3eb/test/tegere/loader_test.clj | clojure | (ns tegere.loader-test
"Tests for the loading of feature and steps files."
(:require [tegere.loader :as sut]
[clojure.test :as t]))
(t/deftest find-feature-files-test
(t/testing "We can find feature files under a path"
(t/is (= (set (map str (sut/find-feature-files "examples/apes")))
... | |
02cd102805ec144b1e8e4a48a4c40cd58c513646d7aab1e0be320abb391e8180 | clojure-interop/aws-api | AWSMarketplaceEntitlement.clj | (ns com.amazonaws.services.marketplaceentitlement.AWSMarketplaceEntitlement
"Interface for accessing AWS Marketplace Entitlement Service.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSMarketplaceEntitlement instead.
AWS Marketplace Entitlement S... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.marketplaceentitlement/src/com/amazonaws/services/marketplaceentitlement/AWSMarketplaceEntitlement.clj | clojure | (ns com.amazonaws.services.marketplaceentitlement.AWSMarketplaceEntitlement
"Interface for accessing AWS Marketplace Entitlement Service.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSMarketplaceEntitlement instead.
AWS Marketplace Entitlement S... | |
d55fa98ac521ffbb8c90a1196907955d547d6c65fe88aa4c9b398256a6547d9c | ghcjs/ghcjs-boot | Iconv.hs | # LANGUAGE Trustworthy #
{-# LANGUAGE CPP
, NoImplicitPrelude
, NondecreasingIndentation
#-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
Module : GHC.IO.Encoding . Iconv
Copyright : ( c ) The University of Glas... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/GHC/IO/Encoding/Iconv.hs | haskell | # LANGUAGE CPP
, NoImplicitPrelude
, NondecreasingIndentation
#
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Portability : non-portable
This module... | # LANGUAGE Trustworthy #
Module : GHC.IO.Encoding . Iconv
Copyright : ( c ) The University of Glasgow , 2008 - 2009
module GHC.IO.Encoding.Iconv (
#if !defined(mingw32_HOST_OS)
iconvEncoding, mkIconvEncoding,
localeEncodingName
#endif
) where
#include "MachDeps.h"
#include "HsBaseConfig.h"
#... |
d4e93dd97147e9e8d4488f1a050c31b83d447bd009fd257424f39c0094bf5550 | beijaflor-io/haskell-libui | ControlGallery.hs | {-# LANGUAGE RecursiveDo #-}
# LANGUAGE ScopedTypeVariables #
import Control.Concurrent
import Data.Time
import Graphics.LibUI
main :: IO ()
main = runUILoop $
window' def { uiWindowTitle = "Control Gallery"
, uiWindowWidth = 200
, uiWindowChild... | null | https://raw.githubusercontent.com/beijaflor-io/haskell-libui/4d1fad25e220071c4c977f79f05b482c2c36af84/examples/ControlGallery.hs | haskell | # LANGUAGE RecursiveDo # | # LANGUAGE ScopedTypeVariables #
import Control.Concurrent
import Data.Time
import Graphics.LibUI
main :: IO ()
main = runUILoop $
window' def { uiWindowTitle = "Control Gallery"
, uiWindowWidth = 200
, uiWindowChild = vbox $
mdo tim... |
5fcb588f797a8e79a4e977a14dde7cf530f73ff1b19a6dd505be6102326ef0c2 | metosin/metosin-common | cache_test.clj | (ns metosin.ring.util.cache-test
(:require [metosin.ring.util.cache :as cache]
[clojure.test :refer [deftest is]]))
(def handler (-> (fn [req]
(cond-> {:status 200 :body nil}
(:no-cache req) (cache/cache-control cache/no-cache)))
(cache/wrap-cache ... | null | https://raw.githubusercontent.com/metosin/metosin-common/94ae6ed819f1114e0cfd7d7fe7709b9480ad4b7c/test/clj/metosin/ring/util/cache_test.clj | clojure | (ns metosin.ring.util.cache-test
(:require [metosin.ring.util.cache :as cache]
[clojure.test :refer [deftest is]]))
(def handler (-> (fn [req]
(cond-> {:status 200 :body nil}
(:no-cache req) (cache/cache-control cache/no-cache)))
(cache/wrap-cache ... | |
c915e4793433994fcef6087b3a15115071ea86c5593d592f164ccebc4c3560c9 | zotonic/cowmachine | controller.erl | -module(controller).
-export([
execute/2,
process/4,
resource_exists/1,
content_types_provided/1,
content_types_accepted/1,
allowed_methods/1,
post_is_create/1,
create_path/1
]).
execute(Req, Env) ->
{ok, Req, Env#{ cowmachine_controller => ?MODULE }}.
process(<<"GET">>, _AcceptedCT, _Pro... | null | https://raw.githubusercontent.com/zotonic/cowmachine/6252b8cab6daa80f60dd40a5c8b0f6217d34b20d/examples/upload/src/controller.erl | erlang | io:format("FileNameListHtml=~p~n",[FileNameListHtml]),
% Controller export
io:format("resource_exists. Path=~p~n",[Path]),
io:format("resource_exists. Context=~p~n",[Context]),
io:format("~p~n",[content_types_accepted]),
io:format("content_types_accepted. ~p~n",[ContentType]),
io:format("~p~n",[content_typ... | -module(controller).
-export([
execute/2,
process/4,
resource_exists/1,
content_types_provided/1,
content_types_accepted/1,
allowed_methods/1,
post_is_create/1,
create_path/1
]).
execute(Req, Env) ->
{ok, Req, Env#{ cowmachine_controller => ?MODULE }}.
process(<<"GET">>, _AcceptedCT, _Pro... |
d1b9326ffe3ced3621ac4d792acf850f1fd9d9b83a1b054967d692f35bef1f77 | static-analysis-engineering/codehawk | jCHTransformUtils.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchsys/jCHTransformUtils.mli | ocaml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | |
951396e9b53dbbade6a19da927a0b92ab52d1092cdda829e3d31f38cf3105bfa | cyverse-archive/DiscoveryEnvironmentBackend | version.clj | (ns common-cli.version
(:require [trptcolin.versioneer.core :as version]))
(defn jar-domain
[]
(.. (class *ns*)
(getProtectionDomain)
(getCodeSource)
(getLocation)))
(defn jar-file-stream
[path-in-jar]
(.openStream
(java.net.URL.
(str "jar:"
(jar-domain)
path-in-ja... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/common-cli/src/common_cli/version.clj | clojure | (ns common-cli.version
(:require [trptcolin.versioneer.core :as version]))
(defn jar-domain
[]
(.. (class *ns*)
(getProtectionDomain)
(getCodeSource)
(getLocation)))
(defn jar-file-stream
[path-in-jar]
(.openStream
(java.net.URL.
(str "jar:"
(jar-domain)
path-in-ja... | |
14eb126677935398fe577fcc6a7aa66f12246c57a40860fd3643ea4353a44bbe | expipiplus1/vulkan | DescriptorUpdateTemplateCreateFlags.hs | {-# language CPP #-}
No documentation found for Chapter " DescriptorUpdateTemplateCreateFlags "
module Vulkan.Core11.Enums.DescriptorUpdateTemplateCreateFlags (DescriptorUpdateTemplateCreateFlags(..)) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulk... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Core11/Enums/DescriptorUpdateTemplateCreateFlags.hs | haskell | # language CPP #
| VkDescriptorUpdateTemplateCreateFlags - Reserved for future use
= Description
mask, but is currently reserved for future use.
= See Also
| No documentation found for Chapter " DescriptorUpdateTemplateCreateFlags "
module Vulkan.Core11.Enums.DescriptorUpdateTemplateCreateFlags (DescriptorUpdateTemplateCreateFlags(..)) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (en... |
cebfabf0094ec1d7741ec9de1a2c114c73f7096f88ffb87655c60db4fc6d611f | sbcl/sbcl | filesys.pure.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public domain and is provided with
;;;;... | null | https://raw.githubusercontent.com/sbcl/sbcl/87f72d9e2758e25d07b7d6ca3bda6e2597388efe/tests/filesys.pure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
DIRECTORY
In sbcl-0.6.9 DIRECTORY failed on paths with :WILD or
:WILD-INFERIORS in their d... | This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(defun truename-as-expected-p ()
#.(and (string= (pathname-name *load-pathname*) (pathname-name *load-truename*))
(string= (pathname-type *load-pathname*) (... |
7b2556d9294bf568574bd10bcd549df550e7f42606ad206a0d63198e541b6b8c | melisgl/mgl | core.lisp | (in-package :mgl-core)
(defsection @mgl-core (:title "Core")
(@mgl-persistence section)
(@mgl-model-stripe section)
(@mgl-executors section))
(defsection @mgl-persistence (:title "Persistence")
(load-state function)
(save-state function)
(read-state function)
(write-state function)
(read-state* gene... | null | https://raw.githubusercontent.com/melisgl/mgl/e697791a9bcad3b6e7b3845246a2aa55238cfef7/src/core.lisp | lisp | (in-package :mgl-core)
(defsection @mgl-core (:title "Core")
(@mgl-persistence section)
(@mgl-model-stripe section)
(@mgl-executors section))
(defsection @mgl-persistence (:title "Persistence")
(load-state function)
(save-state function)
(read-state function)
(write-state function)
(read-state* gene... | |
88a59c27bf6346f7244c4069c4ede129a4d30c9e4966cccbde11ebb7b0adb3e0 | racket/racket7 | regexp.rkt | #lang racket/base
(require "../common/error.rkt"
"../parse/main.rkt"
"../analyze/validate.rkt"
"../analyze/convert.rkt"
"../analyze/anchor.rkt"
"../analyze/must-string.rkt"
"../analyze/start-range.rkt"
"compile.rkt")
(provide (struct-out rx:regexp)
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/regexp/match/regexp.rkt | racket | a bytes matcher (as opposed to string matcher)?
original source string/bytes, but made immutable
compiled matcher function; see "compile.rkt"
number of `(...)` groups for reporting submatches
max lookbehnd
starts with `^`?
shortcut: a byte string that must appear in a match
shortcut: a range that must match the... | #lang racket/base
(require "../common/error.rkt"
"../parse/main.rkt"
"../analyze/validate.rkt"
"../analyze/convert.rkt"
"../analyze/anchor.rkt"
"../analyze/must-string.rkt"
"../analyze/start-range.rkt"
"compile.rkt")
(provide (struct-out rx:regexp)
... |
6bb9ace253c9f367ce1126c02cf3cfa592017c5f5d1f0a10e63645eacff18009 | inria-parkas/sundialsml | nvector_serial.mli | (***********************************************************************)
(* *)
(* OCaml interface to Sundials *)
(* *)
, , an... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/src/nvectors/nvector_serial.mli | ocaml | *********************************************************************
OCaml interface to Sundials
... | , , and
( / ENS ) ( / ENS ) ( UPMC / ENS / Inria )
Copyright 2014 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
* Standard serial nvectors of Sundials .
@nvect... |
78365a1f73fa4836570f5e7a9953cc45e75f243d37410aa7f20f16cd31430b8f | robert-strandh/SICL | enable-typep.lisp | (cl:in-package #:sicl-boot-phase-6)
(defun enable-typep (e5)
(let ((client (env:client e5)))
(setf (env:fdefinition client e5 'sicl-type:type-expander)
(lambda (type-descriptor)
(env:type-expander client e5 type-descriptor))))
(load-source-file "Types/Typep/typep-atomic.lisp" e5)
(load-... | null | https://raw.githubusercontent.com/robert-strandh/SICL/95bec48848029500a7a57f520e8bd86d95192c04/Code/Boot/Phase-6/enable-typep.lisp | lisp | (cl:in-package #:sicl-boot-phase-6)
(defun enable-typep (e5)
(let ((client (env:client e5)))
(setf (env:fdefinition client e5 'sicl-type:type-expander)
(lambda (type-descriptor)
(env:type-expander client e5 type-descriptor))))
(load-source-file "Types/Typep/typep-atomic.lisp" e5)
(load-... | |
95906a285e8e788b1bf8caf59ab0b1f295413d869808489434a8262afc7f34b0 | TrustInSoft/tis-kernel | inout_type.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value_types/inout_type.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
9baa690e72de531255d8482bf561e1f283630909096381999d991c4d8d66a726 | clojure/core.rrb-vector | debug_platform_dependent.clj | Copyright ( c ) and contributors . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing t... | null | https://raw.githubusercontent.com/clojure/core.rrb-vector/88c2f814b47c0bbc4092dad82be2ec783ed2961f/src/main/clojure/clojure/core/rrb_vector/debug_platform_dependent.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) and contributors . All rights reserved .
(ns clojure.core.rrb-vector.debug-platform-dependent
(:refer-clojure :exclude [format printf])
(:require [clojure.core.rrb-vector.parameters :as p]
clojure.core.rrb-vector.rrbt
[clojure.core.rrb-vector.nodes
:refer ... |
8516fac00dd19f559fe5407c692a9e632bd05ee5bb7ffe1d61ffa3a0789fea99 | replikativ/konserve | memory.cljc | (ns konserve.memory
"Address globally aggregated immutable key-value store(s)."
(:require [clojure.core.async :as async :refer [go <!]]
[konserve.protocols :refer [PEDNKeyValueStore -update-in
PBinaryKeyValueStore PKeyIterable]]
[konserve.utils #?(:clj... | null | https://raw.githubusercontent.com/replikativ/konserve/5a1cfb3c30f5b5dfdaa0b4564a4b76d004afa585/src/konserve/memory.cljc | clojure | (ns konserve.memory
"Address globally aggregated immutable key-value store(s)."
(:require [clojure.core.async :as async :refer [go <!]]
[konserve.protocols :refer [PEDNKeyValueStore -update-in
PBinaryKeyValueStore PKeyIterable]]
[konserve.utils #?(:clj... | |
a61dbcff2c0d4fb135f899763fe0a03b936f8e8c9434db416be67939a1ba8000 | brendanhay/amazonka | UpdateHostKey.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-transfer/gen/Amazonka/Transfer/UpdateHostKey.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates the description for the host key that\'s specified by the
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newUpdateHostKey' smart constructor.
| The identifier of the se... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
accee3c07b4a6c47b2573a9dd27b67ddc1764f6bc9fd03a9dcf12b04ac627c57 | erleans/vonnegut | vg_protocol.erl | -module(vg_protocol).
-export([encode_fetch/4,
encode_produce/3,
encode_record_batch/1,
encode_replicate/6,
encode_delete_topic/1,
encode_request/4,
encode_metadata_response/2,
encode_metadata_request/1,
encode_chains/1,
encode_array/1,
... | null | https://raw.githubusercontent.com/erleans/vonnegut/88693f192a4fc3da88e7b359e38e72cee25b3d24/src/vg_protocol.erl | erlang | encode requests
generic encode functions
fourth lowest bit is 0 for timestamp being for record create time
LastOffsetDelta
FirstSequence
PartitionLeaderEpoch
no key
Headers: ordered and can contain duplicates
encode responses
decode generic functions
decode requests
decode replicate
decode responses
We us... | -module(vg_protocol).
-export([encode_fetch/4,
encode_produce/3,
encode_record_batch/1,
encode_replicate/6,
encode_delete_topic/1,
encode_request/4,
encode_metadata_response/2,
encode_metadata_request/1,
encode_chains/1,
encode_array/1,
... |
74086361724448ac3732bc36322e3baf433f2035abf132f072e32b65e72bc7a9 | apache/couchdb-mochiweb | mochiweb_request.erl | @author < >
2007 Mochi Media , Inc.
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, ... | null | https://raw.githubusercontent.com/apache/couchdb-mochiweb/7c4d3110b1889a5d58eb4dda2b1ddbb5645df3e9/src/mochiweb_request.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright noti... | @author < >
2007 Mochi Media , Inc.
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
67a101dfc089e298e133b951921e33947ec48775574618d5164b45d420604db1 | MyDataFlow/ttalk-server | ejabberd_listener.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_listener.erl
Author : < >
%%% Purpose : Manage socket listener
Created : 16 Nov 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
%%%
%%% This program is free software; you can redistrib... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_listener.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_listener.erl
Purpose : Manage socket listener
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
... | Author : < >
Created : 16 Nov 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
a287ac6689db6a86a897fed59887c2a6768225be68e249ccd457da1c044b9621 | lijunsong/fl-compiler | assem.ml | type temp = Temp.temp
type label = Temp.label
type instr =
| OP of string * temp list * temp list * label list option
(** assembly, dst, src, jump *)
| LABEL of string * label
(** assembly, label *)
| MOVE of string * temp * temp
* assembly , dst , src
| null | https://raw.githubusercontent.com/lijunsong/fl-compiler/6d2938855012a7a0a8767dc342f6abb454c43eec/backend/assem.ml | ocaml | * assembly, dst, src, jump
* assembly, label | type temp = Temp.temp
type label = Temp.label
type instr =
| OP of string * temp list * temp list * label list option
| LABEL of string * label
| MOVE of string * temp * temp
* assembly , dst , src
|
d9cfd23681fa0c5557b8781b61614c0228b53921a0bf50a6d8580d257007f2f9 | anoma/juvix-circuits | package.lisp | (defpackage #:alu.log
(:documentation "Provides reporting functionality to the language")
(:local-nicknames (:spc :alu.spec))
(:shadow :error)
(:use #:common-lisp #:serapeum)
(:export
:report
:mode
:*mode*
:error
:data))
| null | https://raw.githubusercontent.com/anoma/juvix-circuits/13bab6fbc28aba2337a22fdd2d97e797493c4b9c/src/log/package.lisp | lisp | (defpackage #:alu.log
(:documentation "Provides reporting functionality to the language")
(:local-nicknames (:spc :alu.spec))
(:shadow :error)
(:use #:common-lisp #:serapeum)
(:export
:report
:mode
:*mode*
:error
:data))
| |
ebd938002052f5173e8ec67e749742704cd741412cce2f43bb45805e36e5558f | ijvcms/chuanqi_dev | mail_cache.erl | %%%-------------------------------------------------------------------
%%% @author tuhujia
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 05 . 八月 2015 15:36
%%%-------------------------------------------------------------------
-module(mail_cache).
-include("common.hrl").
-include("cache.hrl").
-include... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/mail/mail_cache.erl | erlang | -------------------------------------------------------------------
@author tuhujia
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
===============================================================... | ( C ) 2015 , < COMPANY >
Created : 05 . 八月 2015 15:36
-module(mail_cache).
-include("common.hrl").
-include("cache.hrl").
-include("record.hrl").
-include("config.hrl").
-export([
select_all/1,
select_row/2,
replace/1,
replace_to_db/1,
delete/2,
remove_cache/2,
get_all_player_mail_from_ets/1,
get_player_... |
66ed56d0d01705774cf2fe37846baa0b34308514d729a7eec45926788a792f41 | appleshan/cl-http | ir-utils.lisp | -*- Mode : LISP ; Package : lambda - ir ; BASE : 10 ; SYNTAX : ansi - common - lisp -*-
( C ) Copyright 1997 , ( ) .
;;; All Rights Reserved.
;;;
;;;
;;;-------------------------------------------------------------------
;;;
;;; Various utility functions
;;;
(in-package :lambda-ir)
;;;----------------... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lambda-ir/ir-utils.lisp | lisp | Package : lambda - ir ; BASE : 10 ; SYNTAX : ansi - common - lisp -*-
All Rights Reserved.
-------------------------------------------------------------------
Various utility functions
-------------------------------------------------------------------
PLATFORM SPECIFIC CODE
Catch array bounds errors.
... |
( C ) Copyright 1997 , ( ) .
(in-package :lambda-ir)
#+MCL
(defun zero-bit-vector (bit-vector)
(ccl::%simple-bit-boole boole-clr bit-vector bit-vector bit-vector))
#-MCL
(defun zero-bit-vector (bit-vector)
(fill bit-vector 0))
#+Genera
(declaim (inline bit-vector-cardinality))
#+Genera
(defun bit-vecto... |
a0edbd2e2e589f2d855ce08d25bb36088b1121d889b0e484c62346452d684fac | deadcode/Learning-CL--David-Touretzky | 8.47.lisp | (defun make-loaf-int (done all)
(if (> done all)
nil
(cons 'x (make-loaf-int (+ 1 done) all))))
(defun make-loaf (n)
(make-loaf-int 1 n))
(let ((test1 '(make-loaf 4)))
(format t "~s = ~s~%" test1 (eval test1)))
| null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.47.lisp | lisp | (defun make-loaf-int (done all)
(if (> done all)
nil
(cons 'x (make-loaf-int (+ 1 done) all))))
(defun make-loaf (n)
(make-loaf-int 1 n))
(let ((test1 '(make-loaf 4)))
(format t "~s = ~s~%" test1 (eval test1)))
| |
66a4866231adcc1b530fdda4d5450afea8af6b757cb3978ab6100b8f736cc082 | alexandergunnarson/quantum | compress.cljc | (ns
^{:attribution "alexandergunnarson"
:doc
"Compression."
:todo ["Extend functionality to all compression formats: .zip, .gzip, .tar, .rar, etc."]}
quantum.core.io.compress
(:refer-clojure :exclude
[into, conj! assoc!])
(:require
#?@(:clj [[clojure.java.io :as... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/io/compress.cljc | clojure | His lz4 is net.jpountz.lz4, which is the best
TODO THIS IS FROM RAYNES... GOOD STUFF WORTH INCORPORATING
"Create zip file(s) stream. You must provide a vector of the
following form:
You can provide either strings or byte-arrays as content.
The piped streams are used to create content on the fly, which mea... | (ns
^{:attribution "alexandergunnarson"
:doc
"Compression."
:todo ["Extend functionality to all compression formats: .zip, .gzip, .tar, .rar, etc."]}
quantum.core.io.compress
(:refer-clojure :exclude
[into, conj! assoc!])
(:require
#?@(:clj [[clojure.java.io :as... |
ffb529f5edbc358796cfde222c0badd446b5673ac50a701bef97a32355b02bb0 | PataphysicalSociety/soupault | path_options.ml | Soupault allows the user to restrict widgets and hooks to a subset of all pages :
the user can tell them to run only on certain pages , exclude certain pages ,
or mix those criteria .
- page / exclude page — for matching exact pages .
- section / exclude_section — for matching all pages within a ... | null | https://raw.githubusercontent.com/PataphysicalSociety/soupault/7e580f082bdda09f3b280a943162efe0abcdab8b/src/path_options.ml | ocaml | The underlying function of the [pathregex/exclude_path_regex] option.
Checks if a leaf file exists.
If it doesn't look like an index page, then there's no question: it's a normal (content) page.
If a page matches index.forced_indexing_path_regex, we treat it as a normal page regardless of its file name.
And if... | Soupault allows the user to restrict widgets and hooks to a subset of all pages :
the user can tell them to run only on certain pages , exclude certain pages ,
or mix those criteria .
- page / exclude page — for matching exact pages .
- section / exclude_section — for matching all pages within a ... |
e87de6f6c5da4594ec56208261dd1d02feaae340c0861fd56cd08e0b60d7ad19 | ndmitchell/hlint | Match.hs | {-# LANGUAGE RecordWildCards, NamedFieldPuns, TupleSections #-}
# LANGUAGE PatternGuards , ViewPatterns , FlexibleContexts #
The matching does a fairly simple unification between the two terms , treating
any single letter variable on the left as a free variable . After the matching
we substitute , transform and ... | null | https://raw.githubusercontent.com/ndmitchell/hlint/d06148be027179469333a892294fb7a90b9ea51c/src/Hint/Match.hs | haskell | # LANGUAGE RecordWildCards, NamedFieldPuns, TupleSections #
we spot both these rules can eta reduce with respect to x
we use the associativity of ( . ) to add
currently 36 of 169 rules have ( . ) equivalents
we spot both these rules can eta reduce with respect to x
we use the associativity of (.) to add
curren... | # LANGUAGE PatternGuards , ViewPatterns , FlexibleContexts #
The matching does a fairly simple unification between the two terms , treating
any single letter variable on the left as a free variable . After the matching
we substitute , transform and check the side conditions . We also " see through "
both ( $ )... |
ecbcafeddcc15b1ae8fce6e4174e150f17fcb14da3550c92446c1351e254979a | ygale/win-hp-path | use-hppath.hs | module Main where
import System.Win32.HPPath (winPath, unWinPath, clearPath, addHPPath,
isVersionOpt)
import System.Environment (getArgs, lookupEnv, setEnv)
import System.Exit (exitWith, ExitCode(ExitFailure))
import System.Process (callProcess)
import Data.Maybe (fromMaybe)
import Data.Version (showVersion)... | null | https://raw.githubusercontent.com/ygale/win-hp-path/cd8fb2c5f8f5e395179b2c681911e18a5443aa3f/src/use-hppath.hs | haskell | module Main where
import System.Win32.HPPath (winPath, unWinPath, clearPath, addHPPath,
isVersionOpt)
import System.Environment (getArgs, lookupEnv, setEnv)
import System.Exit (exitWith, ExitCode(ExitFailure))
import System.Process (callProcess)
import Data.Maybe (fromMaybe)
import Data.Version (showVersion)... | |
776259fab15714c929726c1240e1bb65830b83ad0dd35e9b30c3757a1e8e962c | tezos/tezos-mirror | baking_scheduling.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/f0fac81ca8d49f180e663316b2566780ddc1517e/src/proto_alpha/lib_delegate/baking_scheduling.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 AN... |
1a9ff8eac0fdb51b631112bb45dc8ee93079c0be1c9b37ab06d24420dd7da9ae | RefactoringTools/wrangler | full_fsm1.erl | %%% File : full_fsm1.erl
Author : < >
%%% Description :
Created : 22 Dec 2009 by Simon Thompson < >
Revised : 8 Jan 2010 by Simon Thompson after comments from Thomas Arts and
-module(full_fsm1).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_fsm.hrl").
-compile(export_all).
... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/examples/behaviour_extraction/freq_server/automatic_output/full_fsm1.erl | erlang | File : full_fsm1.erl
Description :
Definition of the states. Each state is represented by a function,
listing the transitions from that state, together with generators
for the calls to make each transition.
S is the current state, From and To are state names
Precondition (for state data). | Author : < >
Created : 22 Dec 2009 by Simon Thompson < >
Revised : 8 Jan 2010 by Simon Thompson after comments from Thomas Arts and
-module(full_fsm1).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_fsm.hrl").
-compile(export_all).
-define(NUM_FREQ,3).
-behaviour(full_fsm).
f... |
4f8cc97f218e7f4cfc28e751877335fa640342db65c88d3573a9abe3b095f8ae | KestrelInstitute/Specware | Tests.lisp | (test-directories ".")
(test
("Bug 0083 : Ambiguous op not detected"
:show "Ambop#C"
:output '((:optional "")
";;; Elaborating spec at $TESTDIR/Ambop#C"
";;; Elaborating spec at $TESTDIR/Ambop#A"
";;; Elaborating spec at $TESTDIR/Ambop#B"
"ERROR: in specificati... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0083/Tests.lisp | lisp | (test-directories ".")
(test
("Bug 0083 : Ambiguous op not detected"
:show "Ambop#C"
:output '((:optional "")
";;; Elaborating spec at $TESTDIR/Ambop#C"
";;; Elaborating spec at $TESTDIR/Ambop#A"
";;; Elaborating spec at $TESTDIR/Ambop#B"
"ERROR: in specificati... | |
d7dfb0e071fa7df57c702ef2587a8badad4b23e03b0538385f4f4d11abfa707a | PacktPublishing/Mastering-Clojure | implementing_transducers.clj | (ns m-clj.c5.implementing-transducers
(:refer-clojure :exclude [map filter take-while take transduce]))
Example 5.4
(defn map
([f]
(fn [step]
(fn
([] (step))
([result] (step result))
([result input]
(step result (f input))))))
([f coll]
(sequence (map f) coll)))
Exam... | null | https://raw.githubusercontent.com/PacktPublishing/Mastering-Clojure/5364ad907056c1c84c759491b17d45d06f4d7cdc/src/m_clj/c5/implementing_transducers.clj | clojure | user> (def r (reduced 0))
#'user/r
user> (reduced? r)
true
:too-big | (ns m-clj.c5.implementing-transducers
(:refer-clojure :exclude [map filter take-while take transduce]))
Example 5.4
(defn map
([f]
(fn [step]
(fn
([] (step))
([result] (step result))
([result input]
(step result (f input))))))
([f coll]
(sequence (map f) coll)))
Exam... |
ae0e6e868174f2dadc07c3c7def421a00dd9eea988beacf3bf643fa27692ba7b | wenkokke/MonoProc | TestCP2.hs | module Main where
import PROC
import PROC.MF.Analysis.CP
import PROC.Testing (testAnalysis)
import PROC.Parsing (pCP)
import Data.Foldable (forM_)
import Text.Printf (printf)
import qualified Data.Set as S (toList)
import Text.ParserCombinators.UU.Utils (runParser)
because CP analysis is non - distributive , I 'm ... | null | https://raw.githubusercontent.com/wenkokke/MonoProc/c3d00bd55ee8a6f2c12ebf5abb226c731e856350/test/TestCP2.hs | haskell | this one is kinda superfluous, since if we know that the
relation holds between these... well, then this will always succeed... | module Main where
import PROC
import PROC.MF.Analysis.CP
import PROC.Testing (testAnalysis)
import PROC.Parsing (pCP)
import Data.Foldable (forM_)
import Text.Printf (printf)
import qualified Data.Set as S (toList)
import Text.ParserCombinators.UU.Utils (runParser)
because CP analysis is non - distributive , I 'm ... |
a77c997b8b7b56d743377a6b2ac0acfd38fe244f6b23c1a1c298a47df483d49b | joearms/crypto_tutorial | challenge.erl | -module(challenge).
-compile(export_all).
test() ->
Server = spawn(?MODULE, server, []),
_Client = spawn(?MODULE, client, [Server, "joe", self()]),
receive X -> X end.
client(Server, Who, Parent) ->
Server ! {self(), {login,Who}},
receive
{Server, {challenge, X}} ->
Server ! {self(), {respon... | null | https://raw.githubusercontent.com/joearms/crypto_tutorial/e487699017dbd102f67d18f466ff44445d10ba3e/src/challenge.erl | erlang | -module(challenge).
-compile(export_all).
test() ->
Server = spawn(?MODULE, server, []),
_Client = spawn(?MODULE, client, [Server, "joe", self()]),
receive X -> X end.
client(Server, Who, Parent) ->
Server ! {self(), {login,Who}},
receive
{Server, {challenge, X}} ->
Server ! {self(), {respon... | |
49b41942f58b195ee963c5dff8f0b7a2393b452cac9f8cc49e6d91bdd71daa78 | Factual/skuld | core.clj | (ns skuld.core)
| null | https://raw.githubusercontent.com/Factual/skuld/79599f9b13aee35c680183d6bf9e2fcbfde1d7c7/src/skuld/core.clj | clojure | (ns skuld.core)
| |
426a26cf6d084ee50a20c2d2bb40ad4e707b9ac4a05adb2600143ae1f2907579 | clojure-interop/aws-api | AbstractAmazonLexModelBuilding.clj | (ns com.amazonaws.services.lexmodelbuilding.AbstractAmazonLexModelBuilding
"Abstract implementation of AmazonLexModelBuilding. Convenient method forms pass through to the corresponding
overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.lexmodelbuilding/src/com/amazonaws/services/lexmodelbuilding/AbstractAmazonLexModelBuilding.clj | clojure | (ns com.amazonaws.services.lexmodelbuilding.AbstractAmazonLexModelBuilding
"Abstract implementation of AmazonLexModelBuilding. Convenient method forms pass through to the corresponding
overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn... | |
24fed8b05a62eef26f05eaed39812534cd365067e290b3d78974764c51b18e1d | jessex/CLRS-implementations | 0171_quicksort.scm | QUICKSORT(A , p , r )
Sorts the given array from indices p to r using a Divide - and - Conquer approach
;; O(n^2)
Chapter 7 , Page 171
(define pivot
(lambda (lst)
(cond
((or (null? lst) (null? (cdr lst))) '())
((<= (car lst) (cadr lst)) (pivot (cdr lst)))
(else (car lst)))))
(def... | null | https://raw.githubusercontent.com/jessex/CLRS-implementations/ed5d3d89cf489646b15941c2529533e98389a58b/scheme/0171_quicksort.scm | scheme | O(n^2) | QUICKSORT(A , p , r )
Sorts the given array from indices p to r using a Divide - and - Conquer approach
Chapter 7 , Page 171
(define pivot
(lambda (lst)
(cond
((or (null? lst) (null? (cdr lst))) '())
((<= (car lst) (cadr lst)) (pivot (cdr lst)))
(else (car lst)))))
(define partit... |
f00dea499cbe56a413f412f46146ff21f2143cfbfb1438fe0ee61be49cb38f80 | the-little-typer/pie | basics.rkt | #lang typed/racket/base
;;; basics.rkt
;;;
;;; This file contains preliminary definitions that are needed in
;;; the rest of the system, including datatypes for ASTs, values,
;;; contexts, states, etc.
(require (for-syntax racket/base syntax/parse) racket/match
"fresh.rkt")
(provide (all-defined-out)
... | null | https://raw.githubusercontent.com/the-little-typer/pie/8f50608efedba6f52e5cf66418dd474df31e9029/basics.rkt | racket | basics.rkt
This file contains preliminary definitions that are needed in
the rest of the system, including datatypes for ASTs, values,
contexts, states, etc.
Source locations
it should not be a trivial value.
Keywords
Abstract syntax of high-level programs
@ associates a source location with a Pie expression ... | #lang typed/racket/base
(require (for-syntax racket/base syntax/parse) racket/match
"fresh.rkt")
(provide (all-defined-out)
(for-syntax (all-defined-out))
Precise-Loc
location?
syntax->location
location->srcloc
Srcloc)
(define-type Srcloc (List String... |
9b1decbc751677aff2651aedab42548221c0acd2a9f1555132e017109e1eba21 | ajhc/ajhc | Info.hs | # OPTIONS_JHC -fm4 -fffi #
module System.Info(compilerName,compilerVersion,os,arch) where
import Foreign.C.String
import Foreign
import Data.Version ( Version(..) )
compilerName = "ajhc"
compilerVersion :: Version
compilerVersion = Version (splitup "__JHC_VERSION__") []
where splitup s = case reads s of
... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/lib/haskell-extras/System/Info.hs | haskell | # OPTIONS_JHC -fm4 -fffi #
module System.Info(compilerName,compilerVersion,os,arch) where
import Foreign.C.String
import Foreign
import Data.Version ( Version(..) )
compilerName = "ajhc"
compilerVersion :: Version
compilerVersion = Version (splitup "__JHC_VERSION__") []
where splitup s = case reads s of
... | |
a6d624437171879c59ffc15564e60d57ef23767854dd4c240e856b0994abc276 | earl-ducaine/cl-garnet | c32dialog.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : C32 ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment
Copyright ( c ) 1990 Carnegie Mellon University
All rights reserved . The CMU software License Agreement specifies
... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/c32/c32dialog.lisp | lisp | Syntax : Common - Lisp ; Package : C32 ; Base : 10 -*-
the terms and conditions for use and redistribution.
If you want to use this code or anything developed as part of the
$Id:: $
This deals with popping up dialog boxes
Turns all strings into ato... | The Garnet User Interface Development Environment
Copyright ( c ) 1990 Carnegie Mellon University
All rights reserved . The CMU software License Agreement specifies
Garnet project , please contact ( . ) .
C32 is a spreadsheet interface for Garnet constraints
Designed and implemented by
(in-packa... |
b7f739f5047ac3ed1a6d71a2be6f83ef5aef614825ea87ad26e4a837934b1218 | heliaxdev/extensible-data | Mutual.hs | import Extensible
import MutualBase
data Ext
extendA "A" [] [t|Ext|] defaultExtA {
typeAX = [("AI", [[t|Int|]])]
}
extendB "B" [] [t|Ext|] defaultExtB {
typeBA = Just [[t|String|]]
}
main :: IO ()
main = pure ()
| null | https://raw.githubusercontent.com/heliaxdev/extensible-data/d11dee6006169cb537e95af28c3541a24194dea8/examples/mutual/Mutual.hs | haskell | import Extensible
import MutualBase
data Ext
extendA "A" [] [t|Ext|] defaultExtA {
typeAX = [("AI", [[t|Int|]])]
}
extendB "B" [] [t|Ext|] defaultExtB {
typeBA = Just [[t|String|]]
}
main :: IO ()
main = pure ()
| |
0e6e100a45c500b59b4dbf4914fe791211a1193a3a42de23bc73b99706c2c818 | jbrisbin/rabbit_common | rabbit_exchange_decorator.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/jbrisbin/rabbit_common/80814606ae23cc820c74e443383e192cd69ec030/src/rabbit_exchange_decorator.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
This is like an... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2016 Pivotal Software , Inc. All rights reserved .
... |
877fb9861f53a028d3df0aab027c14caa3254d44166816be1da8621b1e58f0dc | david-christiansen/tt-playground | tt-helpers.rkt | #lang typed/racket
(provide (all-defined-out))
;;;; Helpers
(: zip (All (a b) (-> (Listof a) (Listof b) (Listof (Pair a b)))))
(define (zip l1 l2) (zip-with #{cons @ a b} l1 l2))
(: zip-with (All (a b c)
(-> (-> a b c)
(Listof a)
(Listof b)
... | null | https://raw.githubusercontent.com/david-christiansen/tt-playground/ffb396d908c952bb522d01b465cfbe3dbcc686bf/tt-helpers.rkt | racket | Helpers | #lang typed/racket
(provide (all-defined-out))
(: zip (All (a b) (-> (Listof a) (Listof b) (Listof (Pair a b)))))
(define (zip l1 l2) (zip-with #{cons @ a b} l1 l2))
(: zip-with (All (a b c)
(-> (-> a b c)
(Listof a)
(Listof b)
(Listof c... |
857b5ce400ecd94047b3d6b37d379ae98966d2a5dd42a22985de8b3537623cce | janestreet/universe | attr.ml | open Core_kernel
open Virtual_dom.Vdom.Attr
module Number = Virtual_dom.Dom_float
type align_options =
| None
| X_max_y_max
| X_max_y_mid
| X_max_y_min
| X_mid_y_max
| X_mid_y_mid
| X_mid_y_min
| X_min_y_max
| X_min_y_mid
| X_min_y_min
type units =
| Object_bounding_box
| User_space_on_use
ty... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/virtual_dom/svg/src/attr.ml | ocaml | open Core_kernel
open Virtual_dom.Vdom.Attr
module Number = Virtual_dom.Dom_float
type align_options =
| None
| X_max_y_max
| X_max_y_mid
| X_max_y_min
| X_mid_y_max
| X_mid_y_mid
| X_mid_y_min
| X_min_y_max
| X_min_y_mid
| X_min_y_min
type units =
| Object_bounding_box
| User_space_on_use
ty... | |
e68d0b94d8df0f5f93bb358e6b2e0adba923f89e45441a36841357ba7945816e | bmeurer/ocamljit2 | findlib.ml | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/findlib.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 :
open My_std
open My_unix
open ... |
4da97636becd8602ae81ab4b4374d3844f084107653a1535ec7fe239cf75da94 | openmusic-project/openmusic | fluidsynth_ffi.lisp | This file was automatically generated by SWIG ( ) .
Version 2.0.10
;;;
;;; Do not make changes to this file unless you know what you are doing--modify
the SWIG interface file instead .
(in-package :cl-fluidsynth)
;;; LINK IN FLUIDSYNTH LIB:
(defparameter *fluidsynth-loaded* nil)
(defun cl-fluid-init-fluidsyn... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/ff552ffbde9178213db1b7d34c2a44012dc081ba/OPENMUSIC/code/projects/fluid/fluidsynth/fluidsynth_ffi.lisp | lisp |
Do not make changes to this file unless you know what you are doing--modify
LINK IN FLUIDSYNTH LIB:
wrapper code for various ../include/fluidsynth/*.h | This file was automatically generated by SWIG ( ) .
Version 2.0.10
the SWIG interface file instead .
(in-package :cl-fluidsynth)
(defparameter *fluidsynth-loaded* nil)
(defun cl-fluid-init-fluidsynth-ffi ()
(define-foreign-library fluidsynth
(t (:default "libfluidsynth")))
(setf *fluidsynth-loaded*
... |
7a451591925cbd63bf3ab9e796cff51d0f158b81f37ef0ede4134cf619082748 | open-telemetry/opentelemetry-erlang | opentelemetry_metrics_service.erl | %%%-------------------------------------------------------------------
%% @doc Client module for grpc service opentelemetry.proto.collector.metrics.v1.MetricsService.
%% @end
%%%-------------------------------------------------------------------
%% this module was generated and should not be modified manually
-module... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/28facc303d90a53c5bde3e6d08e88c113613be15/apps/opentelemetry_exporter/src/opentelemetry_metrics_service.erl | erlang | -------------------------------------------------------------------
@doc Client module for grpc service opentelemetry.proto.collector.metrics.v1.MetricsService.
@end
-------------------------------------------------------------------
this module was generated and should not be modified manually
@doc Unary RPC |
-module(opentelemetry_metrics_service).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("grpcbox/include/grpcbox.hrl").
-define(is_ctx(Ctx), is_tuple(Ctx) andalso element(1, Ctx) =:= ctx).
-define(SERVICE, 'opentelemetry.proto.collector.metrics.v1.MetricsService').
-define(PROTO_MODULE, 'opentelem... |
247affd0de7dcfd70261bf0b7d681ac4b108bd78442915a3953222b618ac488e | Plutonomicon/plutarch-plutus | RecursionSpec.hs | module Plutarch.RecursionSpec (spec) where
import Prelude hiding (succ)
import Plutarch
import Plutarch.Bool (pif, (#==))
import Plutarch.Integer (PInteger)
import Plutarch.Lift (pconstant)
import Plutarch.Test
import Test.Hspec
spec :: Spec
spec = do
describe "recursion" $ do
describe "example" . pgoldenSpec... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/plutarch-test/tests/Plutarch/RecursionSpec.hs | haskell | > PInteger)
> PInteger)
|
Example of a simple recursive function with pfix
> (a :--> a) :--> a :--> a)
> (a :--> a) :--> a :--> a) ->
> a) -> | module Plutarch.RecursionSpec (spec) where
import Prelude hiding (succ)
import Plutarch
import Plutarch.Bool (pif, (#==))
import Plutarch.Integer (PInteger)
import Plutarch.Lift (pconstant)
import Plutarch.Test
import Test.Hspec
spec :: Spec
spec = do
describe "recursion" $ do
describe "example" . pgoldenSpec... |
06b5114a8aff114bf302e1a7930d7b4a6263be7d4a7471af283296558e9d3f7d | ygrek/ocaml-extlib | dllist.ml |
* Dllist- a mutable , circular , doubly linked list library
* Copyright ( C ) 2004 ,
*
* 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 t... | null | https://raw.githubusercontent.com/ygrek/ocaml-extlib/69b77f0f0500c98371aea9a6f2abb56c946cdab0/src/dllist.ml | ocaml |
* Dllist- a mutable , circular , doubly linked list library
* Copyright ( C ) 2004 ,
*
* 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 t... | |
22553e1e3c0e016fd8626ef99e13d419376b4754f02e6cc1a8e3b0d810f6088c | yminer/libml | check.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/nn/error/check.ml | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | |
bb8ef4573ebd327c0dc05935a8811ef3eaae8f838eea8324fe8756fbfa7891e0 | coccinelle/herodotos | engine.ml | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/coccinelle/herodotos/5da230a18962ca445ed2368bc21abe0a8402e00f/menhirLib/engine.ml | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the GNU Library General Pu... |
d20a04404caee8ae8f3feb1a538b8439eeb376cdd8917ed9000a4ed7084cd35f | input-output-hk/cardano-sl | Internal.hs | -- | This module contains the top level API definition for frontend-related
-- tasks. The API endpoints presented here are intended for use with the
Daedalus client , and are n't useful for wallets , exchanges , and other users .
module Cardano.Wallet.API.Internal where
import Prelude
import Pos.Chain.Up... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/src/Cardano/Wallet/API/Internal.hs | haskell | | This module contains the top level API definition for frontend-related
tasks. The API endpoints presented here are intended for use with the | Daedalus client , and are n't useful for wallets , exchanges , and other users .
module Cardano.Wallet.API.Internal where
import Prelude
import Pos.Chain.Update (SoftwareVersion)
import Servant
import Cardano.Wallet.API.Response (APIResponse, ValidJSON)
import Cardano.Walle... |
918528ae95d5647356a32504cf1b41ffd29a9becee9a75de293bd18a4db535f7 | KULeuven-CS/CPL | LEXADDR.rkt | #lang eopl
(require "syntax.rkt")
(provide (all-defined-out))
;;; an expressed value is either a number, a boolean or a procval.
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?)))
;; expval->num : ExpVal -> Int
(define expval->num
(lambda... | null | https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/examsolution/CONTOUR/LEXADDR/LEXADDR.rkt | racket | an expressed value is either a number, a boolean or a procval.
expval->num : ExpVal -> Int
expval->bool : ExpVal -> Bool
expval->proc : ExpVal -> Proc
procedures ;;;;;;;;;;;;;;;;
proc? : SchemeVal -> Bool
procedure : Exp * Nameless-env -> Proc
there is no need to declare bound variables.
(bvar symbol?)
and th... | #lang eopl
(require "syntax.rkt")
(provide (all-defined-out))
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?)))
(define expval->num
(lambda (v)
(cases expval v
(num-val (num) num)
(else (expval-extractor-error 'num v)))))... |
f591d2bd43c946c61d1507b64a479a48556306e0e0720845db52e2cb6eb3ede8 | clj-commons/rewrite-clj | ci_unit_tests.clj | #!/usr/bin/env bb
(ns ci-unit-tests
(:require [cheshire.core :as json]
[clojure.string :as string]
[doric.core :as doric]
[helper.fs :as fs]
[helper.jdk :as jdk]
[helper.main :as main]
[helper.os :as os]
[helper.shell :as shell]
... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/8899b1b868130c71958de9b71686323da44bef93/script/ci_unit_tests.clj | clojure | else assume ubuntu
matrix params to be used on ci
shadow-cljs requires a min of jdk 11 so we'll test on that | #!/usr/bin/env bb
(ns ci-unit-tests
(:require [cheshire.core :as json]
[clojure.string :as string]
[doric.core :as doric]
[helper.fs :as fs]
[helper.jdk :as jdk]
[helper.main :as main]
[helper.os :as os]
[helper.shell :as shell]
... |
4f6d50b34dfc1290f5957f122e16cad323b49bb8558237c928eb4af7f0a984f8 | Octachron/codept | single.ml | (** Analysis on single files *)
type t =
| Approx_file
| One_pass
| M2l_info
| M2l
type single = string -> Io.writer -> Format.formatter -> Params.t
-> Common.info * string * Namespaced.t option -> unit
open Params
(** approx *)
let approx filename = Approx_parser.(to_upper_bound @@ lower_bound filename)
... | null | https://raw.githubusercontent.com/Octachron/codept/66fb4b2caac8e9757eefb3f4e605b392a0fa457f/core/single.ml | ocaml | * Analysis on single files
* approx
* Printing directly from source file |
type t =
| Approx_file
| One_pass
| M2l_info
| M2l
type single = string -> Io.writer -> Format.formatter -> Params.t
-> Common.info * string * Namespaced.t option -> unit
open Params
let approx filename = Approx_parser.(to_upper_bound @@ lower_bound filename)
let to_m2l policy sig_only (k,f,_n) =
match... |
055a4dd5c221367997b00da7d92e5b9872258c3d23330ed0b34ede088d7adb78 | haskellfoundation/error-message-index | DeriveNewtypeData.hs | # LANGUAGE DerivingStrategies #
module DeriveNewtypeData where
data Weekend = Saturday | Sunday
deriving newtype Show
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-10333/derive-newtype-data/before/DeriveNewtypeData.hs | haskell | # LANGUAGE DerivingStrategies #
module DeriveNewtypeData where
data Weekend = Saturday | Sunday
deriving newtype Show
| |
b4229f994dbd27b63e52b48e2586df5a52e2f3740faa5502b8c67e0b63e11259 | ReedOei/CMips | ArrayLength.hs | module Analysis.Analyzers.ArrayLength where
import Control.Applicative
import Control.Lens ((^.))
import Data.List
import Text.Read
import Analysis.Patterns
import Analysis.Resolution
import CLanguage
import Compiler.Context
import Types
arrayAccessSearch :: CExpression -> Bool
arrayAccessSearch (CArrayAccess _ _... | null | https://raw.githubusercontent.com/ReedOei/CMips/daae33aeba31d0f4b0a97fab206b2726566d5ee4/src/Analysis/Analyzers/ArrayLength.hs | haskell | | Takes in a context of an array access and attempts to resolve the length of the array.
If successful, will either return the variable containing the length or the actual length, if possible
arrayLengthContext context varName <|> | module Analysis.Analyzers.ArrayLength where
import Control.Applicative
import Control.Lens ((^.))
import Data.List
import Text.Read
import Analysis.Patterns
import Analysis.Resolution
import CLanguage
import Compiler.Context
import Types
arrayAccessSearch :: CExpression -> Bool
arrayAccessSearch (CArrayAccess _ _... |
a78815fc2538981f3fe938370f34a1d91efbcab353dcd87935412c0f74359477 | bmourad01/ocamlchess | caml_player.ml | open Core_kernel [@@warning "-D"]
open Chess
module Histogram = Position.Histogram
module Line = Search.Result.Line
let limits = ref None
let pp_pv ppf pv =
let rec aux = function
| [] -> ()
| [m] -> Format.fprintf ppf "%a%!" Position.San.pp m
| m :: ms ->
Format.fprintf ppf "%a %!" Position.San.... | null | https://raw.githubusercontent.com/bmourad01/ocamlchess/6318007919ceba60eb2b70a267221dd96abe07e6/chess/bin/caml_player.ml | ocaml | open Core_kernel [@@warning "-D"]
open Chess
module Histogram = Position.Histogram
module Line = Search.Result.Line
let limits = ref None
let pp_pv ppf pv =
let rec aux = function
| [] -> ()
| [m] -> Format.fprintf ppf "%a%!" Position.San.pp m
| m :: ms ->
Format.fprintf ppf "%a %!" Position.San.... | |
c56fb998e868118d1a5eb9b6a26f9dddde1492880ca8736e20bac508f89f5041 | mirage/ocaml-ipaddr | ipaddr_top.mli | val printers : string list
val eval_string :
?print_outcome:bool -> ?err_formatter:Format.formatter -> string -> bool
val install_printers : string list -> bool
| null | https://raw.githubusercontent.com/mirage/ocaml-ipaddr/d497beb2859ebdd08685236f0ddae22a98023d0c/lib/ipaddr_top.mli | ocaml | val printers : string list
val eval_string :
?print_outcome:bool -> ?err_formatter:Format.formatter -> string -> bool
val install_printers : string list -> bool
| |
11248c9251c4e6052d4d9b9a9f9498b21c18aa3eb1cbc0d5ac1aba2be3fe268a | gas2serra/cldk | image.lisp | (in-package :cldk-render-internals)
;;;
;;; conversion
;;;
(declaim (inline color-value->octet)
(ftype (function (real) octet) color-value->octet))
(defun color-value->octet (v)
(round (* 255 v)))
(declaim (inline color-octet->value)
(ftype (function (octet) real) color-octet->value))
(defun color-octet->value ... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/render/image.lisp | lisp |
conversion
Image mixins
(defclass image-adapter-mixin (image-mixin)
((img :initarg :image)))
Drawable Image
Image Design
Image Pattern
| (in-package :cldk-render-internals)
(declaim (inline color-value->octet)
(ftype (function (real) octet) color-value->octet))
(defun color-value->octet (v)
(round (* 255 v)))
(declaim (inline color-octet->value)
(ftype (function (octet) real) color-octet->value))
(defun color-octet->value (o)
(/ o 255))
(defg... |
3f4dbd14b6915541b5b7c72712bafa549c88d944531824d3bc743516caa82f87 | katydid/katydid-haskell | Suite.hs | -- |
-- Suite parses the testsuite folder and creates test cases
module Suite
( readTestCases
, tests
)
where
import qualified Test.Tasty as T
import qualified Test.Tasty.HUnit as HUnit
import System.Directory ( getCurrentDirectory
... | null | https://raw.githubusercontent.com/katydid/katydid-haskell/4588cd8676628cd15c671d61b65bdc2f3a199a38/test/Suite.hs | haskell | |
Suite parses the testsuite folder and creates test cases | module Suite
( readTestCases
, tests
)
where
import qualified Test.Tasty as T
import qualified Test.Tasty.HUnit as HUnit
import System.Directory ( getCurrentDirectory
, listDirectory
... |
86ec1534f4ea6104af0f4c0d30a8e4bad1570836c125ee1ef2b474f55b0e4c11 | quux00/go-lightly | google.clj | (ns thornydev.go-lightly.search.google
(:require [thornydev.go-lightly :as go]))
Implementation of Pike 's Google IO 2012 example
of a fake Google search
;; Uses the go-lightly library to do this in
a more - or - less idiomatic Clojure style
(defn fake-search [kind]
(fn [query]
(Thread/sleep (rand-i... | null | https://raw.githubusercontent.com/quux00/go-lightly/815052a72af678e8c84d7a9716c50f7008d8971e/go-lightly-examples/clj-examples/src/thornydev/go_lightly/search/google.clj | clojure | Uses the go-lightly library to do this in
---[ Google 1.0 Search ]--- ;;
---[ Google 2.0 Search ]--- ;;
each search transfers onto the same channel
use a timeout-channel to limit the round of searches
since the macro spawns this body into a separate future
and then cancels it, we have to push accumulated info
i... | (ns thornydev.go-lightly.search.google
(:require [thornydev.go-lightly :as go]))
Implementation of Pike 's Google IO 2012 example
of a fake Google search
a more - or - less idiomatic Clojure style
(defn fake-search [kind]
(fn [query]
(Thread/sleep (rand-int 100))
(format "%s result for '%s'\n" k... |
b1e454165de46752a0fb870417cc3eade0ca38000d1b2450b8bff6a58925ac33 | NorfairKing/the-notes | Resolution.hs | module Logic.PropositionalLogic.Resolution where
import Control.Monad (forM_, unless)
import Notes hiding (color, directed,
not, (=:))
import Data.Maybe ... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Logic/PropositionalLogic/Resolution.hs | haskell | Something that works. In practice this won't be necessary.
> n'
> n3
> n3 | module Logic.PropositionalLogic.Resolution where
import Control.Monad (forM_, unless)
import Notes hiding (color, directed,
not, (=:))
import Data.Maybe ... |
fe7bd3e175f0fe72f1b561fc6b0bba32d1c66ba2ac65dba4800dda7e52695e2a | greglook/vault | datom_test.clj | (ns vault.entity.datom-test
(:require
[clj-time.core :as time]
[clojure.test :refer :all]
[vault.blob.content :as content]
[vault.entity.datom :as datom]))
#_
(deftest entity-state
(let [t (time/date-time 2014 5 14 3 20 36)
root-id (content/hash (.getBytes "foo"))]
(is (thrown? Runtime... | null | https://raw.githubusercontent.com/greglook/vault/3c117589c574bf5d3028c745b24bb4f1ac688098/test/vault/entity/datom_test.clj | clojure | (ns vault.entity.datom-test
(:require
[clj-time.core :as time]
[clojure.test :refer :all]
[vault.blob.content :as content]
[vault.entity.datom :as datom]))
#_
(deftest entity-state
(let [t (time/date-time 2014 5 14 3 20 36)
root-id (content/hash (.getBytes "foo"))]
(is (thrown? Runtime... | |
b48439b0146ed74c538d04c6b1ac9f5e5fead0d0fd81e1e176ce07b1ecbfb4cb | anuragsoni/http_async | logger.mli | include Async.Log.Global_intf
| null | https://raw.githubusercontent.com/anuragsoni/http_async/2fe8ad7d0c587b286217dc7eb9e5d1afb008abe1/src/logger.mli | ocaml | include Async.Log.Global_intf
| |
0129682a2dffa24abc2b5c8b992538f0fd6ae9e83101372a6adfbbc1ac0dd449 | hyperledger-archives/fabric-chaintool-original | test_interface.clj | Copyright London Stock Exchange Group 2016 All Rights Reserved .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law... | null | https://raw.githubusercontent.com/hyperledger-archives/fabric-chaintool-original/fb214f89d0d6eb36e997f1c352c3320f55e2e55f/test/chaintool/build/test_interface.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language ... | Copyright London Stock Exchange Group 2016 All Rights Reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns chaintool.build.test_interface
(:require [clojure.test :refer :all]
[chaintool.build.interface :refer :all]
[slingshot.slingshot :as slingshot])
(:re... |
c20f41449ed02e528ade30ecbada30813b5cc99bf6f686f18b66be365e8f42bc | tolysz/ghcjs-stack | Program.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program
Copyright : 2006 , 2007 - 2009
--
-- Maintainer :
-- Portability : portable
--
-- This provides an abstraction which deals with configuring and running
-- programs. A 'Program'... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/Distribution/Simple/Program.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Program
Maintainer :
Portability : portable
This provides an abstraction which deals with configuring and running
programs. A 'Program' is a static notion of a known program. A
'ConfiguredProgra... | Copyright : 2006 , 2007 - 2009
finding its version . There is also a ' ProgramConfiguration ' type which holds
actions elsewhere in Cabal that need to look up and run programs . If we had
a Cabal monad , the ' ProgramConfiguration ' would probably be a reader or
The module also defines all the known ... |
3c841e0120bb69d00272702b8a35e7db7884afb1a9ade3ddf4db5a971d3de101 | processone/mysql | p1_mysql_sup.erl | %%%----------------------------------------------------------------------
%%% File : p1_mysql_sup.erl
Author : < >
Purpose : MySQL erlang driver supervisor
Created : 15 May 2013 by < >
%%%
%%%
p1_mysql , Copyright ( C ) 2002 - 2015 ProcessOne
%%%
%%% This program is free software; you can redistri... | null | https://raw.githubusercontent.com/processone/mysql/85d3263b906c1dcb7d7aae4b4e58ede082736d34/src/p1_mysql_sup.erl | erlang | ----------------------------------------------------------------------
File : p1_mysql_sup.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even ... | Author : < >
Purpose : MySQL erlang driver supervisor
Created : 15 May 2013 by < >
p1_mysql , Copyright ( C ) 2002 - 2015 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy... |
07a653b9c99a9825eb504c91a339ebcd48c3f2bd2f8d9c620d21e25355a61bd6 | dylex/haskell-nfs | If.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Network.WebDAV.NFS.If
( checkIfHeaders
) where
import Control.Applicative ((<|>))
import qualified Data.Attoparsec.ByteString as AP
import qualified Data.Attoparsec.ByteString.Char8 as APC
import qualified Data.ByteString as BS
import... | null | https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/webdav/Network/WebDAV/NFS/If.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: other resource
TODO: token | # LANGUAGE RecordWildCards #
module Network.WebDAV.NFS.If
( checkIfHeaders
) where
import Control.Applicative ((<|>))
import qualified Data.Attoparsec.ByteString as AP
import qualified Data.Attoparsec.ByteString.Char8 as APC
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as... |
231c314a1eeaad7c0d98847a4f66e034ab185592cb8cfd638ac4fa84054766d6 | sjl/advent | day-06.lisp | (advent:defpackage* :advent/2017/06)
(in-package :advent/2017/06)
(define-problem (2017 6) (data read-all) (6681 2392)
(let ((banks (coerce data 'vector))
(seen (make-hash-table :test 'equalp)))
(labels ((bank-to-redistribute ()
(iterate (for blocks :in-vector banks :with-index bank)
... | null | https://raw.githubusercontent.com/sjl/advent/dc3debda9bd1a0570a6ab06919b1af7b285413dc/src/2017/days/day-06.lisp | lisp | (advent:defpackage* :advent/2017/06)
(in-package :advent/2017/06)
(define-problem (2017 6) (data read-all) (6681 2392)
(let ((banks (coerce data 'vector))
(seen (make-hash-table :test 'equalp)))
(labels ((bank-to-redistribute ()
(iterate (for blocks :in-vector banks :with-index bank)
... | |
8336035fa00a6e25cd7b25f08cbc8c912ffe74bcb5d9dedf8a56203c3681f1dc | viercc/kitchen-sink-hs | cantor.hs | {-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE RankNTypes #-}
module Main(main) where
import Control.Applicative
import Control.Arrow ((***))
import Data.Foldable (toList)
import Numeric.In... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/5038b17a39e4e6f19e6fb4779a7c8aaddf64d922/lattices-example/cantor.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveTraversable #
# LANGUAGE RankNTypes # | module Main(main) where
import Control.Applicative
import Control.Arrow ((***))
import Data.Foldable (toList)
import Numeric.Interval
import Monad.Searchable
data Stream a = Stream a (Stream a)
deriving (Show, Functor, Foldable, Traversable)... |
e1bd530975c94ad9146635e8e659bcf4e64e0cfc82791a2c8dd4c12f914151cd | bondo/symbolic-execution | Main.hs | module Main (main) where
import Control.Monad (when)
import System.Environment (getArgs)
import Language.Python.Common.Pretty (pretty, render)
import Utils (instrumentModule)
main :: IO ()
main = do
args <- getArgs
when (length args /= 2) . ioError $ userError "Two arguments required: input file and output file... | null | https://raw.githubusercontent.com/bondo/symbolic-execution/27b199ec80744745f3b8a953d907678557a4154a/transformer/Main.hs | haskell | module Main (main) where
import Control.Monad (when)
import System.Environment (getArgs)
import Language.Python.Common.Pretty (pretty, render)
import Utils (instrumentModule)
main :: IO ()
main = do
args <- getArgs
when (length args /= 2) . ioError $ userError "Two arguments required: input file and output file... | |
692102bf51ceda6d51e38698246450149fb7367affe86aea5cfbc48052285d9b | digitallyinduced/ihp | Logs.hs | module IHP.IDE.Logs.View.Logs where
import IHP.ViewPrelude
import IHP.IDE.ToolServer.Types
import IHP.IDE.ToolServer.Layout ()
data LogsView = LogsView { standardOutput :: ByteString, errorOutput :: ByteString }
instance View LogsView where
html LogsView { .. } = [hsx|
<div id="logs">
<div cl... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/e0d9c66e0b5d13a156965014d542e62004d7580d/IHP/IDE/Logs/View/Logs.hs | haskell | module IHP.IDE.Logs.View.Logs where
import IHP.ViewPrelude
import IHP.IDE.ToolServer.Types
import IHP.IDE.ToolServer.Layout ()
data LogsView = LogsView { standardOutput :: ByteString, errorOutput :: ByteString }
instance View LogsView where
html LogsView { .. } = [hsx|
<div id="logs">
<div cl... | |
a02bab1218d557599b31a3cd2ee46ef7a7bb21b310e158dcfe5ab1b94c77a985 | wtfleming/clojurescript-examples | handler.clj | (ns hello-world.core.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[compojure.response :refer [render]]
[clojure.java.io :as io]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defn home
[req]
(render (io/resource "in... | null | https://raw.githubusercontent.com/wtfleming/clojurescript-examples/6f878f431a2cba405b6ae715199f776a19dda6f7/hello-world/src/clj/hello_world/core/handler.clj | clojure | (ns hello-world.core.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[compojure.response :refer [render]]
[clojure.java.io :as io]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defn home
[req]
(render (io/resource "in... | |
7606febc8a61ffd8c5e04db7e9ca98d34212def4988a9221777f3e1a73c10631 | NorfairKing/intray | DB.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies... | null | https://raw.githubusercontent.com/NorfairKing/intray/669b0939ca67535c2494ed84ecbcf2a62133db87/intray-web-server/src/Intray/Web/Server/DB.hs | haskell | # LANGUAGE GADTs #
# OPTIONS_GHC -Wno-name-shadowing # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE Undecidab... |
0f8cc68b0247603d0fb4ea23331a92412a1b6b832355f4e2b7b714591d4ee08e | kadena-io/pact | Types.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase ... | null | https://raw.githubusercontent.com/kadena-io/pact/e2f3dd1fd1952bb4f736042083769b52dbb2a819/src-tool/Pact/Analyze/Types/Types.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PatternSynonyms #
# LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
# LANGUAGE Rank2Types #
... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving ... |
692f0dae5fb8bb86027610dbb696f28045d4d6675a78dacbde53bae4c0c3ab19 | faylang/fay | T190_A.hs | module T190_A where
foo :: Int -> Fay ()
foo _ = putStrLn "WRONG!"
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/T190_A.hs | haskell | module T190_A where
foo :: Int -> Fay ()
foo _ = putStrLn "WRONG!"
| |
5f893d926a308ef4104c2c4845c012944738f02e7d9d07bd527f111ab70e3bde | k16shikano/hpdft | cidmapToList.hs | # LANGUAGE OverloadedStrings , FlexibleContexts #
import Data.List
import Data.Char
import Numeric (readHex)
import qualified Data.Map as Map
import qualified Data.Text as T
import System.Environment (getArgs)
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.UTF8 as BSLU
import Codec... | null | https://raw.githubusercontent.com/k16shikano/hpdft/97484e4ec5d698d403add2b92ff4b128c01e7ace/data/map/cidmapToList.hs | haskell | | Expand FontForge .cidmap entry
Examples:
(Range 62 63,Uni ']')
>>> expandEntry [] "0 /.notdef"
(CID 0,NOTDEF)
>>> expandEntry [] "1 0020,00a0"
(CID 1,Variation "\160 ")
error $ "No CID code for "++s
exerpt from -tex8r/527b977dec4165934d31 | # LANGUAGE OverloadedStrings , FlexibleContexts #
import Data.List
import Data.Char
import Numeric (readHex)
import qualified Data.Map as Map
import qualified Data.Text as T
import System.Environment (getArgs)
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.UTF8 as BSLU
import Codec... |
eeaa2d23920ec43fe8e1b008cd85143a0626047af3fcf7ed081be07acf465a9c | travelping/flower | flower_packet_v12.erl | -module(flower_packet_v12).
%% API
-export([encode/1, encode_msg/1, decode/1]).
%% constant mappers
-export([ofpt/1, ofp_packet_in_reason/1, ofp_config_flags/1,
ofp_flow_mod_command/1, eth_type/1]).
%% part encoders
-export([encode_actions/1,
encode_action/1]).
%% -------------------------------------------------... | null | https://raw.githubusercontent.com/travelping/flower/549015e8ef6e26d6b4bd10c5e527894e55218168/src/flower_packet_v12.erl | erlang | API
constant mappers
part encoders
--------------------------------------------------------------------
Include files
--------------------------------------------------------------------
--------------------------------------------------------------------
=========================================================... | -module(flower_packet_v12).
-export([encode/1, encode_msg/1, decode/1]).
-export([ofpt/1, ofp_packet_in_reason/1, ofp_config_flags/1,
ofp_flow_mod_command/1, eth_type/1]).
-export([encode_actions/1,
encode_action/1]).
-include("flower_packet.hrl").
-type int8() :: 0..16#ff.
-type int16() :: 0..16#ffff.
-type int... |
9af3a36b6247fee3c431066565328a659f79bd16ef4a95c9d2c1a4d92b437fa4 | mirleft/ocaml-tls | core.ml | (** Core type definitions *)
open Packet
open Ciphersuite
let (<+>) = Cstruct.append
let ( let* ) = Result.bind
let guard p e = if p then Ok () else Error e
let map_reader_error r = Result.map_error (fun re -> `Fatal (`ReaderError re)) r
type tls13 = [ `TLS_1_3 ]
let pp_tls13 ppf `TLS_1_3 = Fmt.string ppf "TLS 1... | null | https://raw.githubusercontent.com/mirleft/ocaml-tls/30f0a8680bfbd537c0918ea63ac04c5cc08555cf/lib/core.ml | ocaml | * Core type definitions
binder len
binder len
| `ED448
| `RSA_PSS_PSS_SHA256
| `RSA_PSS_PSS_SHA384
| `RSA_PSS_PSS_SHA512
only used internally in writer!!
only used internally in writer!!
only used internally in writer!!
| `SignatureAlgorithmsCert
origin : [ `Resumption | `External ] (* using di... |
open Packet
open Ciphersuite
let (<+>) = Cstruct.append
let ( let* ) = Result.bind
let guard p e = if p then Ok () else Error e
let map_reader_error r = Result.map_error (fun re -> `Fatal (`ReaderError re)) r
type tls13 = [ `TLS_1_3 ]
let pp_tls13 ppf `TLS_1_3 = Fmt.string ppf "TLS 1.3"
type tls_before_13 = [
... |
d61939f4b459feffc4f27d6ab8e22096214dc0206836f0dbc0e8d3a91e81c8fa | njordhov/clariform | format_test.cljs | (ns clariform.format-test
(:require
[cljs.test :refer (deftest is)]
[clojure.string :as string]
[shadow.resource :as rc]
[clariform.core :as clariform]
[clariform.ast.parser :as parser]
[clariform.format :as format]))
(def basic-contract (rc/inline "../basic.clar"))
(def malformed-contract (rc/i... | null | https://raw.githubusercontent.com/njordhov/clariform/fdf8fc454ef999645151a210444c114729c08b8b/src/test/clariform/format_test.cljs | clojure |
should not be default
should not be default | (ns clariform.format-test
(:require
[cljs.test :refer (deftest is)]
[clojure.string :as string]
[shadow.resource :as rc]
[clariform.core :as clariform]
[clariform.ast.parser :as parser]
[clariform.format :as format]))
(def basic-contract (rc/inline "../basic.clar"))
(def malformed-contract (rc/i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.