_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 |
|---|---|---|---|---|---|---|---|---|
225bf97e8d07cc72218bd130bec06ce219ea7ca4c8e70b7dc566f7626ced4ec3 | ParaPhraseAGH/erlang-mas | mas_topology.erl | @author jstypka < >
%% @version 1.0
%% @doc This module handles current islands topology info and also computes destination for migrating agents
-module(mas_topology).
-behaviour(gen_server).
%% API
-export([start_link/3, helloPort/0, emigrant/1, getDestination/1, close/0]).
%% gen_server
-export([init/1, handle_c... | null | https://raw.githubusercontent.com/ParaPhraseAGH/erlang-mas/e53ac7ace59b50696bd5e89a1e710d88213e2b1d/src/utils/mas_topology.erl | erlang | @version 1.0
@doc This module handles current islands topology info and also computes destination for migrating agents
API
gen_server
====================================================================
API functions
====================================================================
==========================... | @author jstypka < >
-module(mas_topology).
-behaviour(gen_server).
-export([start_link/3, helloPort/0, emigrant/1, getDestination/1, close/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-export_type([topology/0]).
-type topology() :: mesh | ring.
-spec ... |
4b0071318402360579ea9e5c487c40f0cec80161f3fbd6abfc67209e5f0fb013 | opencog/opencog | PREP.scm | ; This rule is for sentences in which the main predicate is basically a preposition,
; as in "The book is ON the table." "You are OVER the top." This rule only assigns
; the preposition to the subject, the object of the preposition is assigned by another
; rule.
( AN June 2015 )
(define PREP
(BindLink
(Variable... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/relex2logic/rules/PREP.scm | scheme | This rule is for sentences in which the main predicate is basically a preposition,
as in "The book is ON the table." "You are OVER the top." This rule only assigns
the preposition to the subject, the object of the preposition is assigned by another
rule.
This is function is not needed. It is added so as not to br... | ( AN June 2015 )
(define PREP
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$subj" "WordInstanceNode")
(var-decl "$prep" "WordInstanceNode")
(var-decl "$obj" "WordInstanceNode")
)
(AndLink
(word-in-parse "$subj" "$a-parse")
(word-in-parse "$prep" "$a-parse")
(word-... |
69610ba108c0bda95ca27ddcdfee95f6f3ec15c08dfdbda440f7b6eebc355d84 | DSiSc/why3 | why3.ml | (* This file is a stub for ocamldep. Do not delete it. *)
| null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/lib/why3/why3.ml | ocaml | This file is a stub for ocamldep. Do not delete it. | |
a1f1e5e1b226cb9142f3e407c35778832553ebee99567555862276383ef9cd0a | mbj/stratosphere | SampleUtteranceProperty.hs | module Stratosphere.Lex.Bot.SampleUtteranceProperty (
SampleUtteranceProperty(..), mkSampleUtteranceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SampleU... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/lex/gen/Stratosphere/Lex/Bot/SampleUtteranceProperty.hs | haskell | module Stratosphere.Lex.Bot.SampleUtteranceProperty (
SampleUtteranceProperty(..), mkSampleUtteranceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SampleU... | |
d7d80445c4e8752f395b654794df0add87e1a546b2d12a4e770cf77c00578893 | ocaml-omake/omake | omake_exec_id.ml |
(*
* A job identifier is just an integer.
*)
type t = int
module IdTable = Lm_map.LmMake (struct
type t = int
let compare = (-)
end)
let pp_print_pid = Format.pp_print_int
(* Id allocation. *)
let null_id = 0
let index = ref 1
let create () =
let id = !index in
index := succ id;
id
(*
... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/exec/omake_exec_id.ml | ocaml |
* A job identifier is just an integer.
Id allocation.
* Marshaling.
|
type t = int
module IdTable = Lm_map.LmMake (struct
type t = int
let compare = (-)
end)
let pp_print_pid = Format.pp_print_int
let null_id = 0
let index = ref 1
let create () =
let id = !index in
index := succ id;
id
let marshal_id id : Lm_marshal.msg =
List [Magic IdMagic; Int id]
le... |
8a1a7dfd166ed130c357f2d93972a93672f2724d585abe853257c7f8c5b11189 | seckcoder/course-compiler | s2_17.rkt | This is precisely the running example in chapter 5 of the book .
(vector-ref (vector-ref (vector (vector 42)) 0) 0)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s2_17.rkt | racket | This is precisely the running example in chapter 5 of the book .
(vector-ref (vector-ref (vector (vector 42)) 0) 0)
| |
dfa3b91713b973b680e12331b2527073a4ba4958b82e0da0f9f4abb7d189a9f0 | jnear/compiler-construction-assignments | runtime-config.rkt | #lang racket
(require racket/contract)
(provide
(contract-out
[rootstack-size (parameter/c exact-nonnegative-integer?)]
[heap-size (parameter/c exact-nonnegative-integer?)]))
;; We provide this interface so that we have a uniform means of
;; playing with the runtime configuration parameters of your compiler... | null | https://raw.githubusercontent.com/jnear/compiler-construction-assignments/17a1edbd59627341622203056180d9af7830756d/runtime-config.rkt | racket | We provide this interface so that we have a uniform means of
playing with the runtime configuration parameters of your compiler.
Please require this file and use these parameters when needing
to determining the rootstack-size and heap-size.
Parameter that determines what the initial rootstack size of the program i... | #lang racket
(require racket/contract)
(provide
(contract-out
[rootstack-size (parameter/c exact-nonnegative-integer?)]
[heap-size (parameter/c exact-nonnegative-integer?)]))
in order to set this value to ( expt 2 8) use ( rootstack - size ( expt 2 8) )
(define rootstack-size
(make-parameter (expt 2 ... |
9469f0f23804bc0ccfed9a378e59f0d998b87fa8933e8daff88abaa1c5cce474 | astrada/ocaml-extjs | msg_box.ml | let () =
Ext.instance##require(
Js.array [|
Js.string "Ext.window.MessageBox";
Js.string "Ext.tip.*"
|],
Js.undefined,
Js.undefined,
Js.undefined)
let ext_example_msg args =
Js.Unsafe.fun_call
(Js.Unsafe.variable "Ext.example.msg")
args
let showResult = (fun btn _ _ ->
ex... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/examples/message_box/msg_box.ml | ocaml | this hideous block creates the bogus progress
custom class in msg-box.html
This simulates a long-running operation like a database save or
* XHR call.
In real code, this would be in a callback function.
Add these values dynamically so they aren't hard-coded in the html | let () =
Ext.instance##require(
Js.array [|
Js.string "Ext.window.MessageBox";
Js.string "Ext.tip.*"
|],
Js.undefined,
Js.undefined,
Js.undefined)
let ext_example_msg args =
Js.Unsafe.fun_call
(Js.Unsafe.variable "Ext.example.msg")
args
let showResult = (fun btn _ _ ->
ex... |
985a51eec0853efdc80a2cba834802d9ca4e21e88eae88dbf0642340b65de2ae | nuprl/gradual-typing-performance | pre.rkt | #lang racket/base
;; Most of db/base and db/sqlite3, used by core Racket (pre-pkg)
(require "generic/interfaces.rkt")
(provide (struct-out simple-result)
(struct-out rows-result)
statement-binding?
(struct-out exn:fail:sql)
connection?
dbsystem?
prepared-statement... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/typed-db/private/pre.rkt | racket | Most of db/base and db/sqlite3, used by core Racket (pre-pkg) | #lang racket/base
(require "generic/interfaces.rkt")
(provide (struct-out simple-result)
(struct-out rows-result)
statement-binding?
(struct-out exn:fail:sql)
connection?
dbsystem?
prepared-statement?)
(require "generic/sql-data.rkt")
(provide sql-null
s... |
4b3053c743a0cb0dde08436cd56bc5e1b31aeca7e5ae09089bd265b0686a2f5a | mistupv/cauder | purchase_fixed.erl | FASE 2014 example
-module(purchase_fixed).
-export([main/0, asynchAnd/2, checkCredit/2, checkAddress/1, checkItem/1]).
main() ->
Pid = spawn(?MODULE, asynchAnd, [3, self()]),
spawn(?MODULE, checkCredit, [15, Pid]),
spawn(?MODULE, checkAddress, [Pid]),
spawn(?MODULE, checkItem, [Pid]),
receive
... | null | https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/case-studies/purchase/purchase_fixed.erl | erlang | FASE 2014 example
-module(purchase_fixed).
-export([main/0, asynchAnd/2, checkCredit/2, checkAddress/1, checkItem/1]).
main() ->
Pid = spawn(?MODULE, asynchAnd, [3, self()]),
spawn(?MODULE, checkCredit, [15, Pid]),
spawn(?MODULE, checkAddress, [Pid]),
spawn(?MODULE, checkItem, [Pid]),
receive
... | |
9bde1ba5e31b49c77f2b1ce0bf564921b9447698dcc3fbcb3ee0c669bfab07d7 | haskell/hie-bios | Logger.hs | # LANGUAGE BangPatterns , CPP #
module HIE.Bios.Ghc.Logger (
withLogger
) where
import GHC (DynFlags(..), SrcSpan(..), GhcMonad, getSessionDynFlags)
import qualified GHC as G
import Control.Monad.IO.Class
#if __GLASGOW_HASKELL__ >= 902
import GHC.Data.Bag
import GHC.Data.FastString (unpackFS)
import GHC.Driver... | null | https://raw.githubusercontent.com/haskell/hie-bios/ba6d3b3408b1ab23822d831d86ff8a8ff488631e/src/HIE/Bios/Ghc/Logger.hs | haskell | --------------------------------------------------------------
--------------------------------------------------------------
| Set the session flag (e.g. "-Wall" or "-w:") then
executes a body. Log messages are returned as 'String'.
Right is success and Left is failure.
-----------------------------------------... | # LANGUAGE BangPatterns , CPP #
module HIE.Bios.Ghc.Logger (
withLogger
) where
import GHC (DynFlags(..), SrcSpan(..), GhcMonad, getSessionDynFlags)
import qualified GHC as G
import Control.Monad.IO.Class
#if __GLASGOW_HASKELL__ >= 902
import GHC.Data.Bag
import GHC.Data.FastString (unpackFS)
import GHC.Driver... |
53e206ecce5c88419672a419dddf19819a97a0d7c18cd57ab666a1d1b87e7214 | camlp4/camlp4 | pr_extend.ml | camlp4r q_MLast.cmo ./pa_extfun.cmo
(***********************************************************************)
(* *)
Camlp4
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/unmaintained/etc/pr_extend.ml | ocaml | *********************************************************************
... | camlp4r q_MLast.cmo ./pa_extfun.cmo
Camlp4
, projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Pca... |
de5a62ef2377fef0fb5bc49c4ed8f0e589e5b2f071716f5623ecdf14dba2cf95 | synduce/Synduce | largest_even_pos.ml | * @synduce
type 'a clist =
| Elt of 'a
| Cons of 'a * 'a clist
let rec is_sorted = function
| Elt x -> true
| Cons (hd, tl) -> aux hd tl
and aux prev = function
| Elt x -> prev >= x
| Cons (hd, tl) -> prev >= hd && aux hd tl
;;
let rec lpen = function
| Elt x -> if x mod 2 = 0 then x else 0
| Cons (... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/sortedlist/largest_even_pos.ml | ocaml | * @synduce
type 'a clist =
| Elt of 'a
| Cons of 'a * 'a clist
let rec is_sorted = function
| Elt x -> true
| Cons (hd, tl) -> aux hd tl
and aux prev = function
| Elt x -> prev >= x
| Cons (hd, tl) -> prev >= hd && aux hd tl
;;
let rec lpen = function
| Elt x -> if x mod 2 = 0 then x else 0
| Cons (... | |
e5ab8aad89da422ed6acbb5c915a325d377e251c480d622b3cf5728a33e2219f | sealchain-project/sealchain | ObjUtil.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExplicitNamespaces #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE PolyKinds ... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src/Pact/Analyze/Types/ObjUtil.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
singletons.
* Normalization
* Union
* Insert... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
| Type definitions and utilities for for building ' HList 's and object schema
module Pact.Analyze.Types.Obj... |
7e215f50b118087addf0090de10250f030549de4c9c95243914f8d5930b78b61 | input-output-hk/cardano-ledger | BaseTypesSpec.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Cardano.Ledger.BaseTypesSpec (spec) where
import Cardano.Ledger.BaseTypes
import Cardano.Ledger.Binary
import Data.Aeson
import Data.ByteString.Lazy (ByteString)
import Data.E... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/libs/cardano-ledger-core/test/Test/Cardano/Ledger/BaseTypesSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Cardano.Ledger.BaseTypesSpec (spec) where
import Cardano.Ledger.BaseTypes
import Cardano.Ledger.Binary
import Data.Aeson
import Data.ByteString.Lazy (ByteString)
import Data.Either
import Data.GenValidity (GenV... |
0984cdca99b6342f2633a25c647b4f698043bea97a2b2f23858ca0fb49d431db | onedata/op-worker | qos_expression.erl | %%%--------------------------------------------------------------------
@author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
This module contains functions ope... | null | https://raw.githubusercontent.com/onedata/op-worker/b09f05b6928121cec4d6b41ce8037fe056e6b4b3/src/modules/qos/expression/qos_expression.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
@end
--------------------------------------------------------------------
API
number allowed only as right side operand, after a comparator
The infix type stores expr... | @author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
This module contains functions operating on QoS expression .
-module(qos_expression).
-author("Michal Stanisz").
-include("modules/datastore/qos.hrl").
-include_lib("ctool/include/errors.hrl").
-... |
640b4e2e1c3f995fda2805828d43e40c21ba34fc56bd437bfb6cd6ce28c956ae | mzp/scheme-abc | revList.ml | (**
Index immutable Set.
If you add some elements to a set, [index] is not change.
*)
open Base
type 'a t = 'a list
let empty =
[]
let add x xs =
x::xs
let add_list xs ys =
List.fold_left (flip add) ys xs
let rec index x =
function
[] ->
raise Not_found
| y::ys ->
if x = y then
List.length ... | null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/swflib/revList.ml | ocaml | *
Index immutable Set.
If you add some elements to a set, [index] is not change.
| open Base
type 'a t = 'a list
let empty =
[]
let add x xs =
x::xs
let add_list xs ys =
List.fold_left (flip add) ys xs
let rec index x =
function
[] ->
raise Not_found
| y::ys ->
if x = y then
List.length ys
else
index x ys
let to_list xs =
List.rev xs
let mem x xs =
List.mem x xs
|
675969f9dc96242a305169646ebf9be0926dd3f027df95ad92f6a6ab31d2fa61 | kudu-dynamics/blaze | CallGraph.hs | module Blaze.Types.CallGraph where
import Blaze.Prelude hiding (Symbol)
import Blaze.Types.Graph.Alga (AlgaGraph)
import Blaze.Types.Function (Function)
-- TODO: Consider adding information about call sites as edge metadata
type CallGraph = AlgaGraph () Int Function
type CallEdge = (Function, Function)
data CallSite... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/63e30781f4c7bd816118e855f6fa4ae6e59949fe/src/Blaze/Types/CallGraph.hs | haskell | TODO: Consider adding information about call sites as edge metadata | module Blaze.Types.CallGraph where
import Blaze.Prelude hiding (Symbol)
import Blaze.Types.Graph.Alga (AlgaGraph)
import Blaze.Types.Function (Function)
type CallGraph = AlgaGraph () Int Function
type CallEdge = (Function, Function)
data CallSite
= CallSite
{ caller :: Function,
address :: Address,
... |
53f6a91b0dbbe6cf4b958f3de33587f1f0abce9b36250cf5267d9f6aafff1fb5 | ruhler/smten | Trans.hs |
# LANGUAGE NoImplicitPrelude #
module Smten.Control.Monad.Trans (
MonadTrans(..),
MonadIO(..),
) where
import Smten.Prelude
class MonadTrans t where
lift :: Monad m => m a -> t m a
class (Monad m) => MonadIO m where
liftIO :: IO a -> m a
instance MonadIO IO where
liftIO = id
| null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Control/Monad/Trans.hs | haskell |
# LANGUAGE NoImplicitPrelude #
module Smten.Control.Monad.Trans (
MonadTrans(..),
MonadIO(..),
) where
import Smten.Prelude
class MonadTrans t where
lift :: Monad m => m a -> t m a
class (Monad m) => MonadIO m where
liftIO :: IO a -> m a
instance MonadIO IO where
liftIO = id
| |
7028db1040118ce31b9c6118de13bd7a30eeae94ce522c1ee4cb62f372c00b8c | ice1000/learn | even-or-odd.hs | module EvenOrOdd where
evenOrOdd :: Integral a => a -> [Char]
evenOrOdd n = if mod n 2 == 0 then "Even" else "Odd"
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/even-or-odd.hs | haskell | module EvenOrOdd where
evenOrOdd :: Integral a => a -> [Char]
evenOrOdd n = if mod n 2 == 0 then "Even" else "Odd"
| |
9b3dd5168d625b1b876d3e2d8f45528ef041eddadb35321610fb90bb1c75c92c | dbuenzli/remat | brc.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-www/brc.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... | |
4de8e9eb45928ef71322dc986c726717752a129ba3883e49d5b40609eb3c5a63 | fossas/fossa-cli | Apk.hs | module Strategy.AlpineLinux.Apk (analyze) where
import Container.OsRelease (OsInfo (OsInfo))
import Control.Effect.Diagnostics (
Diagnostics,
context,
warn,
)
import Data.Either (lefts, rights)
import Data.Foldable (traverse_)
import Data.String.Conversion (toText)
import DepTypes (
DepType (LinuxAPK),
Depe... | null | https://raw.githubusercontent.com/fossas/fossa-cli/fc517bd0aedbbad731703f7bfd1b946a8bdcd419/src/Strategy/AlpineLinux/Apk.hs | haskell | module Strategy.AlpineLinux.Apk (analyze) where
import Container.OsRelease (OsInfo (OsInfo))
import Control.Effect.Diagnostics (
Diagnostics,
context,
warn,
)
import Data.Either (lefts, rights)
import Data.Foldable (traverse_)
import Data.String.Conversion (toText)
import DepTypes (
DepType (LinuxAPK),
Depe... | |
fe481db48bd41c509dc547c541705d9a1b91ec478b0f31946d0851c41b3de8b6 | KMahoney/kuljet | Value.hs | module Kuljet.Value where
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.ByteString as BS
import qualified Network.HTTP.Types.Status as HTTP
import qualified Network.HTTP.Types.Header as HTTP
import qualified Data.ByteString.Lazy as LBS
imp... | null | https://raw.githubusercontent.com/KMahoney/kuljet/01e32aefd9e59a914c87bde52d5d6660bdea283d/kuljet/src/Kuljet/Value.hs | haskell | module Kuljet.Value where
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.ByteString as BS
import qualified Network.HTTP.Types.Status as HTTP
import qualified Network.HTTP.Types.Header as HTTP
import qualified Data.ByteString.Lazy as LBS
imp... | |
1ece6b7fd9b5fc7b3930aed8f17374f95bbf0c3fce3e2414f32e5fd768c7c9ec | Quickscript-Competiton/July2020entries | preview-markdown.rkt | #lang racket/base
Author :
License : [ Apache License , Version 2.0]( / licenses / LICENSE-2.0 ) or
[ MIT license]( / licenses / MIT ) at your option .
;;; From: -Competiton/July2020entries/issues/19
(require racket/gui/base
racket/class
racket/path
net/sendurl
ma... | null | https://raw.githubusercontent.com/Quickscript-Competiton/July2020entries/b6406a4f021671bccb6b464042ba6c91221286fe/scripts/preview-markdown.rkt | racket | From: -Competiton/July2020entries/issues/19 | #lang racket/base
Author :
License : [ Apache License , Version 2.0]( / licenses / LICENSE-2.0 ) or
[ MIT license]( / licenses / MIT ) at your option .
(require racket/gui/base
racket/class
racket/path
net/sendurl
markdown
quickscript)
(script-help-strin... |
68c1718bc1d283018c512e842358a81b51fb8ba6c520c04afe5394828c7ef4ac | threatgrid/ctia | firehose.clj | (ns ctia.lib.firehose
(:require
[clojure.string :as string]
[clojure.tools.logging :as log])
(:import
[java.net URI]
[software.amazon.awssdk.regions Region]
[software.amazon.awssdk.core SdkBytes]
[software.amazon.awssdk.auth.credentials
AwsBasicCredentials StaticCredentialsProvider]
[softwa... | null | https://raw.githubusercontent.com/threatgrid/ctia/f70ee898556f673073350fd16238261dc1cbf524/src/ctia/lib/firehose.clj | clojure | (ns ctia.lib.firehose
(:require
[clojure.string :as string]
[clojure.tools.logging :as log])
(:import
[java.net URI]
[software.amazon.awssdk.regions Region]
[software.amazon.awssdk.core SdkBytes]
[software.amazon.awssdk.auth.credentials
AwsBasicCredentials StaticCredentialsProvider]
[softwa... | |
8100a33c925ba98b55a98b22231b1d131f52167f03d78cca4e5a03eae4da3430 | dancrossnyc/multics | emacs-compilations.lisp | ;;; ***********************************************************
;;; * *
* Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
;;; * *
* Copyright ( c ) 1978 by Massachusetts Institute of ... | null | https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_emacs_packages_.s.archive/emacs-compilations.lisp | lisp | ***********************************************************
* *
* *
* *
***********************************************************
HISTORY COMMEN... | * Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
* Copyright ( c ) 1978 by Massachusetts Institute of *
* Technology and Honeywell Information Systems , Inc. *
1 ) change(86 - 04 - 23,Margolin ) , approve(86 - 04 - 23,MCR7325 ) ,
2 ) change(86 - 11 - 24,Margolin ) , approve(87 ... |
a16a8fc594372342df8a442cc76306348289893f5d8f7eec52c3267fb766b77c | tolysz/ghcjs-stack | HttpUtils.hs | # LANGUAGE CPP , BangPatterns #
-----------------------------------------------------------------------------
-- | Separate module for HTTP actions, using a proxy server if one exists.
-----------------------------------------------------------------------------
module Distribution.Client.HttpUtils (
DownloadResult... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/Distribution/Client/HttpUtils.hs | haskell | ---------------------------------------------------------------------------
| Separate module for HTTP actions, using a proxy server if one exists.
---------------------------------------------------------------------------
----------------------------------------------------------------------------
^ What to downlo... | # LANGUAGE CPP , BangPatterns #
module Distribution.Client.HttpUtils (
DownloadResult(..),
configureTransport,
HttpTransport(..),
HttpCode,
downloadURI,
transportCheckHttps,
remoteRepoCheckHttps,
remoteRepoTryUpgradeToHttps,
isOldHackageURI
) where
import Network.HTTP
( R... |
d7f68f7da45f30033dd42f6094c067d32bd79de0d0ac64ad6159fdfc5118b349 | tommyengstrom/domaindriven | Text.hs | module DomainDriven.Internal.Text where
import Data.Char
( toLower
, toUpper
)
import Data.Text (Text)
import qualified Data.Text as T
import Prelude
lowerFirst :: String -> String
lowerFirst = \case
[] -> []
c : cs -> toLower c : cs
lowerFirstT :: Text -> Text
lowerFirstT = T.pack . lowerFirst .... | null | https://raw.githubusercontent.com/tommyengstrom/domaindriven/fb56041bb24b24b81aba26d1cf5b1dd91f91c2a2/domaindriven/src/DomainDriven/Internal/Text.hs | haskell | module DomainDriven.Internal.Text where
import Data.Char
( toLower
, toUpper
)
import Data.Text (Text)
import qualified Data.Text as T
import Prelude
lowerFirst :: String -> String
lowerFirst = \case
[] -> []
c : cs -> toLower c : cs
lowerFirstT :: Text -> Text
lowerFirstT = T.pack . lowerFirst .... | |
2a62f184173adb261524d9d8f58e22992d139ba3e582df72ac9c2f4b80aa6676 | kupl/LearnML | patch.ml | let rec uniq (lst : 'a list) : 'b list =
let rec loop (l : 'a list) n : 'a list =
match l with
| [] -> l
| hd :: tl -> if n = hd then loop tl n else hd :: loop tl n
in
match lst with [] -> lst | hd :: tl -> hd :: loop (uniq tl) hd
let (_ : int list) = uniq [ 5; 6; 5; 4 ]
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/uniq/sub20/patch.ml | ocaml | let rec uniq (lst : 'a list) : 'b list =
let rec loop (l : 'a list) n : 'a list =
match l with
| [] -> l
| hd :: tl -> if n = hd then loop tl n else hd :: loop tl n
in
match lst with [] -> lst | hd :: tl -> hd :: loop (uniq tl) hd
let (_ : int list) = uniq [ 5; 6; 5; 4 ]
| |
27cc7cae8eafefa3bcaccf800f250b0fd4a6b3eb491af19b7fc96b63db179113 | returntocorp/semgrep | Immutable_buffer.ml |
*
* Copyright ( C ) 2019 - 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... | null | https://raw.githubusercontent.com/returntocorp/semgrep/e0d996ed1e4d76d0dafd34aec96bde3b718ac05e/libs/commons/Immutable_buffer.ml | ocaml |
*
* Copyright ( C ) 2019 - 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... | |
6a9c90174cdaeab270d8d788c0fbbecedfbafa393b0865de58316d196de50f7b | chef/sqerl | sqerl_integration_SUITE.erl | -module(sqerl_integration_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-define(FIRST(Record), {first_as_record, [Record, Record:fields()]}).
-compile([export_all]).
-define(NAMES, [["Kevin", "Smith", 666, <<"2011-10-01 16:47:46">>, true],
["Mark", "And... | null | https://raw.githubusercontent.com/chef/sqerl/a27e3e58da53240dc9925ec03ecdb894b8231cf9/common_test/sqerl_integration_SUITE.erl | erlang | Doesn't matter what we do from here; we're just testing operations with
a depleted pool
former select_created_by_lname() ->
former select_lname_by_created() ->
Tests for execute interface
select_simple_with_parameters() ->
This is kind of a silly way to do it, but wrapping these in fun()s lets
us reuse varaib... | -module(sqerl_integration_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-define(FIRST(Record), {first_as_record, [Record, Record:fields()]}).
-compile([export_all]).
-define(NAMES, [["Kevin", "Smith", 666, <<"2011-10-01 16:47:46">>, true],
["Mark", "And... |
4eedce4d77a9784a96fe756742fe070419e3d6db7c47c97fae01015b1b24d54d | cldm/cldm | repository.lisp | (in-package :cldm.cli)
(defparameter +repo-commands+
(list
(cons "add"
(clon:defsynopsis (:make-default nil :postfix "NAME TYPE ARGS")
(text :contents "Adds a CLD repository to the configuration")
(flag :short-name "h" :long-name "help"
:description "Print this help... | null | https://raw.githubusercontent.com/cldm/cldm/899f1a92d52245ef0fc84d073ac35c4b0d2e9609/src/cli/repository.lisp | lisp | Process the config command | (in-package :cldm.cli)
(defparameter +repo-commands+
(list
(cons "add"
(clon:defsynopsis (:make-default nil :postfix "NAME TYPE ARGS")
(text :contents "Adds a CLD repository to the configuration")
(flag :short-name "h" :long-name "help"
:description "Print this help... |
c7c7d8ddee4c40b53bff6249d5c767daed19fa18e067ac013e0c3629c0ce6d03 | nathell/cartestian | core.cljc | (ns cartestian.core
(:require [cartestian.sample :as sample]
#?(:clj [cartestian.product]
:cljs [cartestian.product :refer [CartesianProduct]]))
#?(:clj (:import [cartestian.product CartesianProduct])))
(defn- map->dimension-list [m]
(mapv (fn [[k v]]
{:name k, :dimension v})... | null | https://raw.githubusercontent.com/nathell/cartestian/c6cb24aa8ae9e08a6f6cfccee0a606bfba965fa0/src/cartestian/core.cljc | clojure | (ns cartestian.core
(:require [cartestian.sample :as sample]
#?(:clj [cartestian.product]
:cljs [cartestian.product :refer [CartesianProduct]]))
#?(:clj (:import [cartestian.product CartesianProduct])))
(defn- map->dimension-list [m]
(mapv (fn [[k v]]
{:name k, :dimension v})... | |
f2d4a91e0bd231629313aa7cac1222d3a78794d294a18c654210c9a872d2e12a | racket/pict | balloon.rkt | #lang racket/base
(require pict/private/pict
pict/private/utils
racket/draw
mzlib/class
mzlib/math)
(provide wrap-balloon pip-wrap-balloon
place-balloon
pin-balloon
(rename-out [mk-balloon balloon])
make-balloon
balloon?
balloon... | null | https://raw.githubusercontent.com/racket/pict/add4f1deba60fe284016ad889a49941a0ff1c3df/pict-lib/texpict/balloon.rkt | racket | up-side down! | #lang racket/base
(require pict/private/pict
pict/private/utils
racket/draw
mzlib/class
mzlib/math)
(provide wrap-balloon pip-wrap-balloon
place-balloon
pin-balloon
(rename-out [mk-balloon balloon])
make-balloon
balloon?
balloon... |
22f67d08a00483a61229854a96c1b3b988171ebd511e0b55be0c2b7ed2dd14a3 | EligiusSantori/L2Apf | idle.scm | (module ai racket/base
(require
racket/undefined
"program.scm"
)
(provide make-program-idle)
(define (make-program-idle)
(make-program 'program-idle
(lambda args (void)) ; Do nothing
)
)
)
| null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/program/idle.scm | scheme | Do nothing | (module ai racket/base
(require
racket/undefined
"program.scm"
)
(provide make-program-idle)
(define (make-program-idle)
(make-program 'program-idle
)
)
)
|
400a348d4b944c45017cc69b48650fefb30999a2de6968b7f9ae9687785aec51 | Gandalf-/coreutils | DirnameSpec.hs | module DirnameSpec (spec) where
import Coreutils.Dirname
import Test.Hspec
spec :: Spec
spec = parallel $
describe "posix" $ do
it "simple cases" $ do
dirname "/usr/bin" `shouldBe` "/usr"
dirname "/a/b/c" `shouldBe` "/a/b"
dirname "/a" `shouldBe` "/... | null | https://raw.githubusercontent.com/Gandalf-/coreutils/d76bd5a2698e9dc8f548698cded1a873a196a4dc/test/DirnameSpec.hs | haskell | module DirnameSpec (spec) where
import Coreutils.Dirname
import Test.Hspec
spec :: Spec
spec = parallel $
describe "posix" $ do
it "simple cases" $ do
dirname "/usr/bin" `shouldBe` "/usr"
dirname "/a/b/c" `shouldBe` "/a/b"
dirname "/a" `shouldBe` "/... | |
4d4399e9712c48c1bb17a4a10c1c7499490d5f5ea96256000d3ffcfa3bb94184 | jrm-code-project/LISP-Machine | sim-asm.lisp | -*- Mode : LISP ; Package : SIM ; : CL ; -*-
(defvar *local-symbols*)
; dest, s1, s2 could be:
( open 4 )
( active 2 )
; (return 0)
( global 555 )
; (func vma)
( alu dest < - s1 aluop s2 )
; (jump condition target)
; (jump-xct-next condition target)
; (sim sim-halt)
(defprop halt ((%%i-halt 1)... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/sim/sim-asm.lisp | lisp | Package : SIM ; : CL ; -*-
dest, s1, s2 could be:
(return 0)
(func vma)
(jump condition target)
(jump-xct-next condition target)
(sim sim-halt)
(setq load-time-stuff (append `(%%i-jump-adr (jump-target ,clause)) load-time-stuff)))
the declare may be absent
don't use 0 |
(defvar *local-symbols*)
( open 4 )
( active 2 )
( global 555 )
( alu dest < - s1 aluop s2 )
(defprop halt ((%%i-halt 1)) sim-asm)
(defun assemble-inst (sym-inst)
(when (eq (car sym-inst) 'vma-start-read)
(setq sym-inst `(alu (func ,(car sym-inst)) <- ,(cadr sym-inst) setl (garbage))))
(let (... |
d8db40d586b57fd28047cd6ad024f80010c5f208c56f678fc67c25dcd34fc693 | haroldcarr/learn-haskell-coq-ml-etc | TTG.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE Standalon... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/trees-that-grow-and-shrink/2017-09-spj-trees-that-grow/TTG.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE GADTs #
# LANGUAGE PackageImports #
# LANGUAGE PatternSynonyms #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
------------------------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module TTG where
import Test.HUnit (Counts, Test (TestList), runTestTT)
import qualified Test.HUnit.Util as U (t)
Trees That Grow
Shayan Najd , ... |
9c9438ac4cc3c329e16b68e128189f19b15aacaa5af8ff71146fd48510b065dc | mkoeppe/cl-bibtex | test.lisp | ;;; Tests for CL-BibTeX
(defvar *tetex-bibliography-styles*
'("amsalpha.bst"
"amsplain.bst"
"amsxport.bst"
"abbrv.bst"
"alpha.bst"
"apalike.bst"
"ieeetr.bst"
"plain.bst"
"siam.bst"
"unsrt.bst"
"gerabbrv.bst"
"geralpha.bst"
"gerapali.bst"
"gerplain.bst"
"geruns... | null | https://raw.githubusercontent.com/mkoeppe/cl-bibtex/17a16f564b72da681b1e2cf7afbb496836781828/test.lisp | lisp | Tests for CL-BibTeX
contains broken code in format.thesis.type
"biblio/bibtex/contrib/cell.bst" ; broken
"biblio/bibtex/contrib/directory/address-html.bst" ; broken in format.years
"biblio/bibtex/contrib/geralpha/geralpha.bst" ; leading garbage
broken in misc
"biblio/bibtex/utils/refer-tools/refer.bst" ; contain... |
(defvar *tetex-bibliography-styles*
'("amsalpha.bst"
"amsplain.bst"
"amsxport.bst"
"abbrv.bst"
"alpha.bst"
"apalike.bst"
"ieeetr.bst"
"plain.bst"
"siam.bst"
"unsrt.bst"
"gerabbrv.bst"
"geralpha.bst"
"gerapali.bst"
"gerplain.bst"
"gerunsrt.bst"
"acm.bst"
... |
d9ae6bc688bfb3c91fe23637100080c5abc7206415c25d9449c693071e30e9cd | ucsd-progsys/liquidhaskell | Sum.hs | module Sum where
{-@ ssum :: forall<p :: a -> Bool, q :: a -> Bool>.
{{v:a | v == 0} <: a<q>}
{x::a<p> |- {v:a | x <= v} <: a<q>}
xs:[{v:a<p> | 0 <= v}] -> {v:a<q> | len xs >= 0 && 0 <= v } @-}
ssum :: Num a => [a] -> a
ssum [] = 0
ssum [x] = x
ssum (x:xs) = x + ssum x... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/Sum.hs | haskell | @ ssum :: forall<p :: a -> Bool, q :: a -> Bool>.
{{v:a | v == 0} <: a<q>}
{x::a<p> |- {v:a | x <= v} <: a<q>}
xs:[{v:a<p> | 0 <= v}] -> {v:a<q> | len xs >= 0 && 0 <= v } @ | module Sum where
ssum :: Num a => [a] -> a
ssum [] = 0
ssum [x] = x
ssum (x:xs) = x + ssum xs
|
aaf6b60cf4588dd04792c5ca4cf1206d89c47ab7314f923bb60ba67e7127adbf | sebsheep/elm2node | Interface.hs | # OPTIONS_GHC -Wall #
module Elm.Interface
( Interface(..)
, Union(..)
, Alias(..)
, Binop(..)
, fromModule
, toPublicUnion
, toPublicAlias
, DependencyInterface(..)
, public
, private
, privatize
, extractUnion
, extractAlias
)
where
import Control.Monad (liftM, liftM3, liftM4, liftM5)
... | null | https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Elm/Interface.hs | haskell | INTERFACE
FROM MODULE
TO PUBLIC
DEPENDENCY INTERFACE
BINARY | # OPTIONS_GHC -Wall #
module Elm.Interface
( Interface(..)
, Union(..)
, Alias(..)
, Binop(..)
, fromModule
, toPublicUnion
, toPublicAlias
, DependencyInterface(..)
, public
, private
, privatize
, extractUnion
, extractAlias
)
where
import Control.Monad (liftM, liftM3, liftM4, liftM5)
... |
c495b0d15b919759a17dc4f078b65225184f5caaf4858ee77fbb671746ab92eb | morgenthum/lambda-heights | Pattern.hs | module LambdaHeights.Play.Pattern
( PatternEntry (..),
combine,
leftRightPattern,
boostPattern,
stairsPattern,
highPattern,
)
where
import LambdaHeights.Vectors
-- | Represents a template for a layer.
data PatternEntry
= PatternEntry
{ entryId :: Int,
entrySize :: WorldSize,
... | null | https://raw.githubusercontent.com/morgenthum/lambda-heights/0a86ead23e8c223ba2672fa314666a06eb669fe2/lambda-heights/src/LambdaHeights/Play/Pattern.hs | haskell | | Represents a template for a layer.
| x = delta from left side, y = delta y from previous layer
| Generates entries with increasing ids from given Int.
| Combines results of generators with contiguous ids. | module LambdaHeights.Play.Pattern
( PatternEntry (..),
combine,
leftRightPattern,
boostPattern,
stairsPattern,
highPattern,
)
where
import LambdaHeights.Vectors
data PatternEntry
= PatternEntry
{ entryId :: Int,
entrySize :: WorldSize,
entryPosition :: WorldPos
}
... |
66b292ef0ccfc8409e1c29c2bbb4f90860ae39ea01b78f6f947650a0621bc4cf | emaphis/HtDP2e-solutions | 10_01_164_dollars_to_euros.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 10_01_164_dollars_to_euros) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor ... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/2-Arbitrarily-Large-Data/10-More-on-Lists/10_01_164_dollars_to_euros.rkt | racket | about the language level of this file in a form that our tools can easily process.
Dollar to Euro Converter
Design the function convert-euro, which converts a list of US$ amounts into
a list of € amounts. Look up the current exchange rate on the web.
exchange rate and a list of US$ amounts and converts the latter ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 10_01_164_dollars_to_euros) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 10 More on Lists
10.1 Functions... |
f1c2e4307cac1736d0129b1f8319b98c5f7cb358ca669232546096ebac312ba9 | replikativ/hitchhiker-tree | messaging.cljc | (ns hitchhiker.tree.messaging
(:refer-clojure :exclude [subvec])
(:require
[hitchhiker.tree.utils.async :as ha]
[hitchhiker.tree.op :as op]
[hitchhiker.tree.node :as n]
[hitchhiker.tree.key-compare :as c]
[clojure.core.rrb-vector :as rrb]
[hasch.core :as h]
[hitchhiker.tree :as tree :include-ma... | null | https://raw.githubusercontent.com/replikativ/hitchhiker-tree/e8f5dd7aec343437aac1dc84ef2b92ddd7fa5a45/src/hitchhiker/tree/messaging.cljc | clojure | need to return ops to apply to the tree proper...
will there be enough space?
must be a stable sort
Any changes to the current child?
save a write
fast track for number keys
highest node should be last in seq
must be a stable sort
We'll need to find the smallest last-key of the left siblings along the path
are w... | (ns hitchhiker.tree.messaging
(:refer-clojure :exclude [subvec])
(:require
[hitchhiker.tree.utils.async :as ha]
[hitchhiker.tree.op :as op]
[hitchhiker.tree.node :as n]
[hitchhiker.tree.key-compare :as c]
[clojure.core.rrb-vector :as rrb]
[hasch.core :as h]
[hitchhiker.tree :as tree :include-ma... |
63032c71ce74e873ca1302943a5361eef80362692ac42434ecc787e9448d6ef7 | kubernetes-client/haskell | Apiregistration.hs |
Kubernetes
No description provided ( generated by Openapi Generator -generator )
OpenAPI Version : 3.0.1
Kubernetes API version : release-1.20
Generated by OpenAPI Generator ( -generator.tech )
Kubernetes
No description provided (generated by Openapi Generator -generator)
OpenAPI... | null | https://raw.githubusercontent.com/kubernetes-client/haskell/edfb4744a40be1d6a4b9d4a7d060069f2367884a/kubernetes/lib/Kubernetes/OpenAPI/API/Apiregistration.hs | haskell | |
Module : Kubernetes.OpenAPI.API.Apiregistration
# LANGUAGE OverloadedStrings #
* Operations
*** getAPIGroup
| @GET \/apis\/apiregistration.k8s.io\/@
get information of a group
| @application/json@
| @application/vnd.kubernetes.protobuf@
| @application/yaml@ |
Kubernetes
No description provided ( generated by Openapi Generator -generator )
OpenAPI Version : 3.0.1
Kubernetes API version : release-1.20
Generated by OpenAPI Generator ( -generator.tech )
Kubernetes
No description provided (generated by Openapi Generator -generator)
OpenAPI... |
7ba0bff0e3d263e68b1b38fc5ba9a0d5801c81e87ddb3d72502d43660d557d98 | SevereOverfl0w/bukkure | items.clj | ;; TODO: Check this file manually
(ns bukkure.items
(:require [bukkure.util :as util]
[bukkure.logging :as log])
(:require [bukkure.entity :as ent])
(:import [org.bukkit TreeSpecies Material])
(:import [org.bukkit.material
MaterialData Tree Dispenser Sandstone Bed PoweredRail DetectorRai... | null | https://raw.githubusercontent.com/SevereOverfl0w/bukkure/2091d70191127e617c1a7ce12f1c7b96585f124e/src/bukkure/items.clj | clojure | TODO: Check this file manually
Whew. | (ns bukkure.items
(:require [bukkure.util :as util]
[bukkure.logging :as log])
(:require [bukkure.entity :as ent])
(:import [org.bukkit TreeSpecies Material])
(:import [org.bukkit.material
MaterialData Tree Dispenser Sandstone Bed PoweredRail DetectorRail Wool Chest Crops
Pis... |
1610faa1db533a503f2ae687d25b7039f7b62223d5b7225a60bd3e25659b8b76 | typelead/eta | PmExpr.hs |
Author : >
Haskell expressions ( as used by the pattern matching checker ) and utilities .
Author: George Karachalias <>
Haskell expressions (as used by the pattern matching checker) and utilities.
-}
# LANGUAGE CPP #
module Eta.DeSugar.PmExpr (
PmExpr(..), PmLit(..), SimpleEq, ComplexEq, toComple... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/compiler/Eta/DeSugar/PmExpr.hs | haskell | sLit
%************************************************************************
%* *
Lifted Expressions
%* *
%**********************************************... |
Author : >
Haskell expressions ( as used by the pattern matching checker ) and utilities .
Author: George Karachalias <>
Haskell expressions (as used by the pattern matching checker) and utilities.
-}
# LANGUAGE CPP #
module Eta.DeSugar.PmExpr (
PmExpr(..), PmLit(..), SimpleEq, ComplexEq, toComple... |
9455c687407deddff571524a1e426da7b56549d87329dd22ff80b02022af9bc0 | camlspotter/ocamloscope.2 | packpath.mli | (** Module to handle package names as paths, ex. {stdlib}. *)
open Opamfind
val make_from_names : string list -> string
* Make a unique path name for given OCamlFind package names ,
like [ " { compiler - libs.commn , compiler - libs.bytecomp } " ] .
like ["{compiler-libs.commn,compiler-libs.bytecomp}"].... | null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/packpath.mli | ocaml | * Module to handle package names as paths, ex. {stdlib}. |
open Opamfind
val make_from_names : string list -> string
* Make a unique path name for given OCamlFind package names ,
like [ " { compiler - libs.commn , compiler - libs.bytecomp } " ] .
like ["{compiler-libs.commn,compiler-libs.bytecomp}"].
*)
val make : Ocamlfind.Analyzed.t list -> string
* Make a... |
b3d8f065ffb7b53ddb4b81f4bb246f24adec69f1e1ec3add3b25e71a12a4105f | Spivoxity/obc-3 | sourcebook.ml |
* sourcebook.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2008
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistributi... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/49e37c4f391cd1aa16ef4d4d89c342b6c49b7d61/debugger/sourcebook.ml | ocaml | Clicked on a breakpoint: unset it
Find a line that will take a breakpoint
Page not loaded yet
Can't find the file |
* sourcebook.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2008
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistributi... |
a5f698ebf5449fe8a3ad6a84ee62e2c99420ca6b4ceea7d81460a359915472da | vii/dysfunkycom | globals.lisp | SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ...
( C)2006 Justin Heyes - Jones < > and < >
Thanks to and
;; see COPYING for license
This file contains some useful functions for using SDL from Common lisp
;; using sdl.lisp (the CFFI wrapper)
(in-package #:lispbuilder-sd... | null | https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/sdl/globals.lisp | lisp | see COPYING for license
using sdl.lisp (the CFFI wrapper)
Globals
[WITH-DEFAULT-FONT](#with-default-font),
(defvar *renderer* nil)
(defvar *quit* nil)
little-endian is `SDL:AUDIO-S16LSB`, big-endian is `SDL:AUDIO-S16MSB`.
(declaim (INLINE renderer))
(defun renderer ()
*renderer*)
(defun set-renderer (ren... | SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ...
( C)2006 Justin Heyes - Jones < > and < >
Thanks to and
This file contains some useful functions for using SDL from Common lisp
(in-package #:lispbuilder-sdl)
(defvar *default-surface* nil
"Functions that accept the ... |
9927c31c2ed6966d728c1051dc1874857016dd8dba0b3a534667f0a4ad168f68 | vseloved/cl-nlp | ms-ngrams.lisp | ( c ) 2013 Vsevolod Dyomkin
(in-package #:nlp.contrib.ms-ngrams)
(named-readtables:in-readtable rutils-readtable)
(defclass ms-ngrams (ngrams)
((count :initform -1) ; special value to inidicate that we don't know it :)
(url :initarg :url :accessor ms-ngrams-url
:initform "-ngram.research.microsoft.co... | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/contrib/ms-ngrams.lisp | lisp | special value to inidicate that we don't know it :)
end of marolet
end of marolet | ( c ) 2013 Vsevolod Dyomkin
(in-package #:nlp.contrib.ms-ngrams)
(named-readtables:in-readtable rutils-readtable)
(defclass ms-ngrams (ngrams)
(url :initarg :url :accessor ms-ngrams-url
:initform "-ngram.research.microsoft.com/rest/lookup.svc")
(user-token :initarg :user-token :accessor ms-ngrams-use... |
3ca903c596e1e38859d635b5da98993f728052ff49d9a80a10bbb7f1dc650bfb | GlideAngle/flare-timing | MaskEffortOptions.hs | module MaskEffortOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
By masking the track logs with the zones, works out how far pilots got along
the course if they landed out.
Where 'c' is the comp name, 'p' is... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/flare-timing/prod-apps/mask-effort/MaskEffortOptions.hs | haskell | module MaskEffortOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
By masking the track logs with the zones, works out how far pilots got along
the course if they landed out.
Where 'c' is the comp name, 'p' is... | |
23b6b8163e420bad66f0ff7399b4415f0e843763192a774a867e800d8e38011b | russmatney/reframe-games | events.cljs | (ns games.debug.events
(:require
[re-frame.core :as rf]
[games.events.interceptors :refer [game-db-interceptor]]
[games.debug.core :as debug]
[games.events :as events]))
;; register game events
(events/reg-game-events
{:n (namespace ::x)
TODO handle no - step cases , optional timers
:step-fn... | null | https://raw.githubusercontent.com/russmatney/reframe-games/ff05f6ad4794e4505b6231522af0c90c3e212631/src/games/debug/events.cljs | clojure | register game events | (ns games.debug.events
(:require
[re-frame.core :as rf]
[games.events.interceptors :refer [game-db-interceptor]]
[games.debug.core :as debug]
[games.events :as events]))
(events/reg-game-events
{:n (namespace ::x)
TODO handle no - step cases , optional timers
:step-fn identity})
(events/reg... |
934bd12e301c3450d39eae97b53b22e05c338e6ec49073ee56cae531df06fb83 | ghc/packages-Cabal | setup.test.hs | import Test.Cabal.Prelude
TODO : Enable this test on Windows
main = setupAndCabalTest $ do
skipIf =<< isWindows
withSymlink "bin/ghc-7.10" "ghc" $ do
env <- getTestEnv
let cwd = testCurrentDir env
ghc_path <- programPathM ghcProgram
r <- withEnv [("WITH_GHC", Just ghc_path)]
... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkGhcVersion/setup.test.hs | haskell | import Test.Cabal.Prelude
TODO : Enable this test on Windows
main = setupAndCabalTest $ do
skipIf =<< isWindows
withSymlink "bin/ghc-7.10" "ghc" $ do
env <- getTestEnv
let cwd = testCurrentDir env
ghc_path <- programPathM ghcProgram
r <- withEnv [("WITH_GHC", Just ghc_path)]
... | |
b3070ec2226eb28552e834e7dfd33b793d016c3083642a60ac63bb279a19e133 | digital-asset/ghc | T12918b.hs | # LANGUAGE DefaultSignatures #
{-# LANGUAGE RankNTypes #-}
module T12918b where
class Foo1 a where
-- These ones should be rejected
bar1 :: a -> b
default bar1 :: b -> a
bar1 = undefined
bar2 :: a -> b
default bar2 :: x
bar2 = undefined
bar3 :: a -> b
default bar3 :: a -> In... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T12918b.hs | haskell | # LANGUAGE RankNTypes #
These ones should be rejected
These ones are OK | # LANGUAGE DefaultSignatures #
module T12918b where
class Foo1 a where
bar1 :: a -> b
default bar1 :: b -> a
bar1 = undefined
bar2 :: a -> b
default bar2 :: x
bar2 = undefined
bar3 :: a -> b
default bar3 :: a -> Int
bar3 = undefined
bar4 :: a -> Int
default bar4... |
cdf663f05ff69ba30dee883e60d462b7dd773e8ad69d56b15052d818b11a2a6d | archaelus/erms | db.erl | {tables,[{user,[{record_name,user},
{attributes,[name,password,realname,email]},
{type, set},
{disc_copies, ['erms@127.0.0.1']}]},
{shortcode,[{record_name,shortcode},
{attributes,[name,description,mt_rules,mo_rules]},
{t... | null | https://raw.githubusercontent.com/archaelus/erms/5dbe5e79516a16e461e7a2a345dd80fbf92ef6fa/priv/text/db.erl | erlang | {tables,[{user,[{record_name,user},
{attributes,[name,password,realname,email]},
{type, set},
{disc_copies, ['erms@127.0.0.1']}]},
{shortcode,[{record_name,shortcode},
{attributes,[name,description,mt_rules,mo_rules]},
{t... | |
571fd1433d25e67c0533555001414dac5ba5b1a153d3dcd9144b8bbe516d703d | returntocorp/semgrep | Test_metachecking.mli | val test_rules : ?unit_testing:bool -> Common.path list -> unit
| null | https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/metachecking/Test_metachecking.mli | ocaml | val test_rules : ?unit_testing:bool -> Common.path list -> unit
| |
58908b4371490814f9d5e6e8dce9f81d6c561af937d3b25cfe324c3ff79d35ac | snape/Loopless-Functional-Algorithms | Setup.hs | This file is part of " Loopless Functional Algorithms " .
--
SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory
SPDX - License - Identifier : Apache-2.0
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the Lic... | null | https://raw.githubusercontent.com/snape/Loopless-Functional-Algorithms/b96759a40fcdfad10734071776936514ace4dfa1/Setup.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | This file is part of " Loopless Functional Algorithms " .
SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory
SPDX - License - Identifier : Apache-2.0
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS... |
cb95823bc46ed651ebfe0775f1f5d25f56d665d46f0173ff14d970f033673f2f | esl/erlang-web | erlydtl_parser.erl | -module(erlydtl_parser).
-export([parse/1, parse_and_scan/1, format_error/1]).
-file("/usr/lib/erlang/lib/parsetools-2.0/include/yeccpre.hrl", 0).
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version ... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/erlydtl-0.5.3/src/erlydtl/erlydtl_parser.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | -module(erlydtl_parser).
-export([parse/1, parse_and_scan/1, format_error/1]).
-file("/usr/lib/erlang/lib/parsetools-2.0/include/yeccpre.hrl", 0).
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you... |
d9c1d320f2839eb7b5a02bcd87c75966cbb12e151bf31aff1605392bcaf6b2b7 | alanz/ghc-exactprint | NoAnnotations.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Test.NoAnnotations where
import Control . Monad . State
import Data.Algorithm.Diff
import Data.Algorithm.DiffOutput
import Data . Data ( Data , toConstr , , cast... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/3b36f5d0a498e31d882fe111304b2cf5ca6cad22/tests/Test/NoAnnotations.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
---------------------------------------------------------------------
---------------------------------------------------------------------
res <- parseModuleApiAnnsWithCpp defaultCppOptions origFile
------------------------------------------------------------------... | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Test.NoAnnotations where
import Control . Monad . State
import Data.Algorithm.Diff
import Data.Algorithm.DiffOutput
import Data . Data ( Data , toConstr , , cast )
import Data . Generics ( extQ , ext1Q , ext2Q , gmapQ... |
109230535d70391876befb61e0dc86ca6276e3fb4f73704e2f8c9adce6d77b7d | vaclavsvejcar/headroom | Variables.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
-- |
-- Module : Headroom.Variables
-- Description : Support for template v... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/Variables.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Headroom.Variables
Description : Support for template variables
License : BSD-3-Clause
Maintainer :
Stability : experimental
Portability : POSIX
Module containing costructor and useful functions for the 'Variables' data type.
* Con... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2019 - 2022
module Headroom.Variables
mkVariables
, dynamicVariables
, parseVariables
, compileVar... |
1d5450463273a382402663553e19bcda3d94eaf9718c2d87a2e1aea8b6434dfd | wh5a/thih | Representation.hs | ------------------------------------------------------------------------------
Copyright : and The Hatchet Team
( see file Contributors )
Module : Representation
Primary Authors : and
Description :... | null | https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/Representation.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
------------------------------------------------------------------------------
Types
... |
Copyright : and The Hatchet Team
( see file Contributors )
Module : Representation
Primary Authors : and
Description : The basic data types for representing objects
... |
a6c116a8b5d22f4e76922c0397477787f96faab503ccfdb57b87e3b09ce10f97 | ocaml-omake/omake | omake_ir_util.ml |
module SimpleVarCompare =
struct
type t = Omake_ir.simple_var_info
let compare (s1, v1) (s2, v2) =
match s1, s2 with
Omake_ir.VarScopePrivate, Omake_ir.VarScopePrivate
| VarScopeThis, VarScopeThis
| VarScopeVirtual, VarScopeVirtual
| VarScopeGlobal, VarScopeGlobal ->
Lm_symbol.comp... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/ir/omake_ir_util.ml | ocaml |
module SimpleVarCompare =
struct
type t = Omake_ir.simple_var_info
let compare (s1, v1) (s2, v2) =
match s1, s2 with
Omake_ir.VarScopePrivate, Omake_ir.VarScopePrivate
| VarScopeThis, VarScopeThis
| VarScopeVirtual, VarScopeVirtual
| VarScopeGlobal, VarScopeGlobal ->
Lm_symbol.comp... | |
ae208a259bd773e75c93f0da227d50407351d176bf670a71426b2316d3a0505c | clklein/decompose-plug | context.rkt | #lang racket
(require (prefix-in 2: 2htdp/image)
slideshow
(only-in mrlib/image-core render-image)
"util.rkt")
(provide context-picture)
(define (i->p i)
(dc (λ (dc dx dy)
(render-image i dc dx dy))
(2:image-width i)
(2:image-height i)))
(define C (pat pat_1))
(define ... | null | https://raw.githubusercontent.com/clklein/decompose-plug/5bb1acff487d055386c075581b395eb3cfdc12e9/pld-talk/context.rkt | racket | #lang racket
(require (prefix-in 2: 2htdp/image)
slideshow
(only-in mrlib/image-core render-image)
"util.rkt")
(provide context-picture)
(define (i->p i)
(dc (λ (dc dx dy)
(render-image i dc dx dy))
(2:image-width i)
(2:image-height i)))
(define C (pat pat_1))
(define ... | |
aa256a53cfe9af7f671bee2c4f9fada85aeda43f09aab36503d0453c64dfe99f | YoshikuniJujo/test_haskell | Type.hs | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Image.Type where
import GHC.TypeLits
import qualified Gpu.Vulkan.TypeEnum as T
import qualified Gpu.Vulkan.Image.Middle as M
newtype I s = I M.I
newtype Binded si sm = Binded M.I
newtype INew s (nm :: Sym... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/5098bab92d61e0ef1c9e05913b1923a785bed5de/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Image/Type.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Image.Type where
import GHC.TypeLits
import qualified Gpu.Vulkan.TypeEnum as T
import qualified Gpu.Vulkan.Image.Middle as M
newtype I s = I M.I
newtype Binded si sm = Binded M.I
newtype INew s (nm :: Sym... | |
a32be7559624b1e857bda33a84470f10886a76205eb49c9393e01bb583c146a5 | coast-framework/coast | env.clj | (ns coast.env
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.edn :as edn]
[coast.utils :as utils]))
(defn fmt
"This formats .env keys that LOOK_LIKE_THIS to keys that :look-like-this"
[m]
(->> (map (fn [[k v]] [(-> k .toLowerCase (utils/kebab) keywor... | null | https://raw.githubusercontent.com/coast-framework/coast/f31c74c7a875207a717a407e52c6449a53da2c69/src/coast/env.clj | clojure | (ns coast.env
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.edn :as edn]
[coast.utils :as utils]))
(defn fmt
"This formats .env keys that LOOK_LIKE_THIS to keys that :look-like-this"
[m]
(->> (map (fn [[k v]] [(-> k .toLowerCase (utils/kebab) keywor... | |
0a15a5722ed805da9dfe80633e17e71a67a96e825a424787bd0810f17cdf66f0 | janestreet/core_bench | linear_algebra_wrapper.ml | open Core
open Poly
let debug = false
let random_indices_in_place ~max arr =
let len = Array.length arr in
for i = 0 to len - 1 do
arr.(i) <- Random.int max
done
;;
[ quantile_of_array ] sorts the array and returns the values at the quantile indices . If
we ever expose this function , we should ch... | null | https://raw.githubusercontent.com/janestreet/core_bench/746d2440aa10795f1ef286df64be46e7d4ff768c/internals/linear_algebra_wrapper.ml | ocaml | [extended_get i] retrieves entry [i] from [arr], pretending that
[arr.(i) = infinity] when [i > len - 1], and that [arr.(i) = neg_infinity]
when [i < failures].
It assumes [i >= 0] and that entries with [i < failures] are already [neg_infinity].
For the low_quantile calculation, if the index is too ... | open Core
open Poly
let debug = false
let random_indices_in_place ~max arr =
let len = Array.length arr in
for i = 0 to len - 1 do
arr.(i) <- Random.int max
done
;;
[ quantile_of_array ] sorts the array and returns the values at the quantile indices . If
we ever expose this function , we should ch... |
616a898aec9197ef4573ead2e97ebbcd694da6153123bf143eb568ab35db17ce | suhailshergill/extensible-effects | QuickStart.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
-- | This module contains several tiny examples of how to use effects.
-- For technical details, see the documentation in the effect-modules.
--
-- Note that most examples given here are very small. For them,
using ` Eff ` mon... | null | https://raw.githubusercontent.com/suhailshergill/extensible-effects/249073ccc26f0c49b4bb72cc577d75ef19635f06/src/Control/Eff/QuickStart.hs | haskell | | This module contains several tiny examples of how to use effects.
For technical details, see the documentation in the effect-modules.
Note that most examples given here are very small. For them,
approach.
The power of extensible effects lie in the fact that these computations can
be used to construct much more... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
using ` Eff ` monad is more complicated compared to a standard functional
{ -\ # LANGUAGE ScopedTypeVariables \#- }
{ -\ # LANGUAGE FlexibleContexts \#- }
{ -\ # LANGUAGE MonoLocalBinds \#- }
import Control . Eff
imp... |
32c7cff9be8c3671fe50e876602cb3a5f984d72daae25796c0f017e681a4a3c6 | runtimeverification/haskell-backend | Total.hs | module Test.Kore.Attribute.Pattern.Total (
test_instance_Synthetic,
) where
import Data.Maybe (
fromJust,
)
import Kore.Attribute.Pattern.Total
import Kore.Attribute.Synthetic
import Kore.Builtin.AssociativeCommutative qualified as Ac
import Kore.Internal.InternalSet
import Kore.Internal.TermLike (
Key,
... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/93a705112305a2d7e084e98dca93ec33e0d661d5/kore/test/Test/Kore/Attribute/Pattern/Total.hs | haskell | module Test.Kore.Attribute.Pattern.Total (
test_instance_Synthetic,
) where
import Data.Maybe (
fromJust,
)
import Kore.Attribute.Pattern.Total
import Kore.Attribute.Synthetic
import Kore.Builtin.AssociativeCommutative qualified as Ac
import Kore.Internal.InternalSet
import Kore.Internal.TermLike (
Key,
... | |
51b7a64dff354f3623c0a1417ea2f715436611f64b3d3bfecd90b7d248358d43 | HeinrichApfelmus/frp-guides | 02-behavior-textbox.hs | ----------------------------------------------------------------------------
" Functional Reactive Programming "
bobkonf 2016
Example
Applying a function to a Behavior
-----------------------------------------------------------------------------
"Functional Reactive Programming"
... | null | https://raw.githubusercontent.com/HeinrichApfelmus/frp-guides/d96c485a7c9f431907328965cb03a80644e63f64/apfelmus/frp-intro/02-behavior-textbox.hs | haskell | --------------------------------------------------------------------------
---------------------------------------------------------------------------
----------------------------------------------------------------------------}
----------------------------------------------------------------------------
------------... | " Functional Reactive Programming "
bobkonf 2016
Example
Applying a function to a Behavior
"Functional Reactive Programming"
Heinrich Apfelmus
bobkonf 2016
Example
Applying a function to a Behavior
# LANGUAGE ScopedTypeVariables #
import qualified Graphics.UI.... |
c0e5f397d3987baf51f49e28b00c7fe6971ccc68a8ed71257bb3647541b14b37 | khmelevskii/duct-pedestal-reitit | router.clj | (ns duct-pedestal-reitit.router
(:require
[integrant.core :as ig]
[reitit.http :as http]
[reitit.coercion.spec]
[reitit.http.coercion :as coercion]
[reitit.http.interceptors.parameters :as parameters]
[muuntaja.interceptor :as muuntaja]
[duct-pedestal-reitit.interceptors.exception :as exception])... | null | https://raw.githubusercontent.com/khmelevskii/duct-pedestal-reitit/f1d27bc81f1ffa91633fc12771e316515b8de0df/src/duct_pedestal_reitit/router.clj | clojure | query-params & form-params
content-negotiation
handle exceptions
encoding response body
decoding request body
coercing response bodys
coercing request parameters | (ns duct-pedestal-reitit.router
(:require
[integrant.core :as ig]
[reitit.http :as http]
[reitit.coercion.spec]
[reitit.http.coercion :as coercion]
[reitit.http.interceptors.parameters :as parameters]
[muuntaja.interceptor :as muuntaja]
[duct-pedestal-reitit.interceptors.exception :as exception])... |
94b6d8e4558a9f4d16649c69caf57cd3583dd65de738d55d5f958f0c12350efb | well-typed/full-text-search | ExtractNameTerms.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module ExtractNameTerms (
extractPackageNameTerms,
extractModuleNameTerms,
) where
import Data.Text (Text)
import qualified Data.Text as T
import Data.Char (isUpper, isDigit)
import Data.List
import Data.List.Split hiding (Splitter)
import Data.Maybe (maybeToList)
im... | null | https://raw.githubusercontent.com/well-typed/full-text-search/a87317c94f326fc7fb83ef998d84d1ccaac1f4ea/demo/ExtractNameTerms.hs | haskell | | Set.notMember (T.pack w) ws
-----------------
Main experiment
wordsFile < - T.readFile " /usr / share / dict / words "
let ws = Set.fromList ( map T.toLower $ T.lines wordsFile )
print " forcing pkgs ... "
evaluate ( foldl ' ( \a p - > seq p a ) ( ) pkgs )
-----------------
Main experi... | # LANGUAGE GeneralizedNewtypeDeriving #
module ExtractNameTerms (
extractPackageNameTerms,
extractModuleNameTerms,
) where
import Data.Text (Text)
import qualified Data.Text as T
import Data.Char (isUpper, isDigit)
import Data.List
import Data.List.Split hiding (Splitter)
import Data.Maybe (maybeToList)
im... |
233dfd1b16f1d8f8af14549cfee1f9520cd0f7ef65b8570b2e92535657fa188a | rdnetto/powerline-hs | Shell.hs | module Segments.Shell where
import Data.Aeson (Value(..))
import Data.List (isPrefixOf)
import qualified Data.Map.Strict as Map
import Data.Maybe (catMaybes, fromMaybe, maybeToList)
import System.Directory (getCurrentDirectory, getHomeDirectory)
import System.FilePath (joinPath, splitPath, dropTrailingPathSeparator)
... | null | https://raw.githubusercontent.com/rdnetto/powerline-hs/6569a88455e8d98d0327743df13b05947f35efb3/src/Segments/Shell.hs | haskell | Common logic for exit code segments
powerline.segments.shell.cwd
Path is normally provided via rendererArgs, but fallback to syscall if its not (e.g. for bash)
If combineSegs, use a single segment instead of multiple
powerline.segments.shell.jobnum
powerline.segments.shell.mode
powerline.segments.shell.continuat... | module Segments.Shell where
import Data.Aeson (Value(..))
import Data.List (isPrefixOf)
import qualified Data.Map.Strict as Map
import Data.Maybe (catMaybes, fromMaybe, maybeToList)
import System.Directory (getCurrentDirectory, getHomeDirectory)
import System.FilePath (joinPath, splitPath, dropTrailingPathSeparator)
... |
628bbaf19a076f975fd2d8b3f0aefb86ea8b0dcc370b67c5542fc4ebe4407041 | gator1/jepsen | reconnect.clj | (ns jepsen.reconnect
"Stateful wrappers for automatically reconnecting network clients.
A wrapper is a map with a connection atom `conn` and a pair of functions:
`(open)`, which opens a new connection, and `(close conn)`, which closes a
connection. We use these to provide a with-conn macro that acquires the
... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/jepsen/src/jepsen/reconnect.clj | clojure | We want to hold the read lock while executing the body, but we're going to
release it in complicated ways, so we can't use the with-read-lock macro
here.
We can't acquire the write lock until we release our read lock,
because ???
This is the same conn that yielded the error
We don't want to lose the original exc... | (ns jepsen.reconnect
"Stateful wrappers for automatically reconnecting network clients.
A wrapper is a map with a connection atom `conn` and a pair of functions:
`(open)`, which opens a new connection, and `(close conn)`, which closes a
connection. We use these to provide a with-conn macro that acquires the
... |
3b79305a2c0ead2a9a0cfce7cbb196bf2e87ff7dfeb642094f32fbbbe3052eea | MaskRay/CamlFeatherweight | implementation.ml | open Back
open Builtin
open Emit
open Error
open Front
open Global
open Instruction
open Lambda
open Printer
open Syntax
open Type
open Typing
let stage = ref 4
let verbose = ref false
let typing_impl_expr loc e =
push_level();
let ty = typing_expr [] e in
pop_level();
if should_generate e then
gen_type t... | null | https://raw.githubusercontent.com/MaskRay/CamlFeatherweight/989319a830dcf1ae30a4b4ccefb59f73bf966363/implementation.ml | ocaml | TODO kind
pop_level() included
pop_level() included
print_endline "+ gen";
print_endline "+ restrict"; | open Back
open Builtin
open Emit
open Error
open Front
open Global
open Instruction
open Lambda
open Printer
open Syntax
open Type
open Typing
let stage = ref 4
let verbose = ref false
let typing_impl_expr loc e =
push_level();
let ty = typing_expr [] e in
pop_level();
if should_generate e then
gen_type t... |
7794a26826d96481fe87b5d11a126d0842870a9b3f5cc463a15767bd36063782 | alexkazik/qnap-decrypt | QNAP.hs | -- | This is the heart of the qnap-decrypt package. It provides the function
to decrypt the files encryped by QNAP 's Hybrid Backup Sync .
# LANGUAGE ScopedTypeVariables #
module Crypto.QNAP
(
-- * Decrypt
decrypt
-- * Errors
, DecryptError(..)
) where
import Control.Exception (... | null | https://raw.githubusercontent.com/alexkazik/qnap-decrypt/a87d0e8bbf1c6047ea5eea755157138cdf21f5b7/src/Crypto/QNAP.hs | haskell | | This is the heart of the qnap-decrypt package. It provides the function
* Decrypt
* Errors
| Errors the decrypter could run into
The Exception instance has a specialized 'displayException' function
/Since 0.3.0/
^ Password is empty
^ Invalid encryption key
^ Unknown file type (the file is not encrypted o... | to decrypt the files encryped by QNAP 's Hybrid Backup Sync .
# LANGUAGE ScopedTypeVariables #
module Crypto.QNAP
(
decrypt
, DecryptError(..)
) where
import Control.Exception (Exception (displayException), IOException, catch, handle, throw, throwIO)
import Control.Monad ... |
4d4867ff592bcdf8c6ad5e8516b2fbe903d4bfd2287f2744ae7c7fecaf0122a1 | grin-compiler/ghc-wpc-sample-programs | Directives.hs | |
Module : . Directives
Description : Act upon directives .
License : : The Idris Community .
Module : Idris.Directives
Description : Act upon Idris directives.
License : BSD3
Maintainer : The Idris Community.
-}
module Idris.Directives(directiveAction) where
import Idris.AbsSynta... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Directives.hs | haskell | | Run the action corresponding to a directive
just name, search on loading ibc | |
Module : . Directives
Description : Act upon directives .
License : : The Idris Community .
Module : Idris.Directives
Description : Act upon Idris directives.
License : BSD3
Maintainer : The Idris Community.
-}
module Idris.Directives(directiveAction) where
import Idris.AbsSynta... |
9acd6203e2596529920d9d9bff248c21516666e620fef6751f2afcbb1978e8a7 | totakke/jungerer | io.clj | (ns jungerer.io
"Functions to load/save external graph formats."
(:require [clojure.java.io :as io]
[clojure.string :as string]
[jungerer.graph :as g])
(:import com.google.common.base.Function
edu.uci.ics.jung.graph.Hypergraph
[edu.uci.ics.jung.io GraphMLReader GraphM... | null | https://raw.githubusercontent.com/totakke/jungerer/426f41015188a457aac4c2289ad84fb146bc2677/src/jungerer/io.clj | clojure | (ns jungerer.io
"Functions to load/save external graph formats."
(:require [clojure.java.io :as io]
[clojure.string :as string]
[jungerer.graph :as g])
(:import com.google.common.base.Function
edu.uci.ics.jung.graph.Hypergraph
[edu.uci.ics.jung.io GraphMLReader GraphM... | |
a3a993856dc37db4c7d416bf8436bc5207c5f65ebf600218bb4e96bb2cc0b1b3 | lopec/LoPEC | common_SUITE.erl | -module(common_SUITE).
% easier than exporting by name
-compile(export_all).
% required for common_test to work
-include_lib("common_test/include/ct.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% common test callbacks %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
all() ->
[unittest].
init_per_suite(Config) ->
% do custom per sui... | null | https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/common/test/common_SUITE.erl | erlang | easier than exporting by name
required for common_test to work
common test callbacks %%
do custom per suite setup here
required, but can just return Config. this is a suite level tear down function.
optional, can do function level setup for all functions,
optional, can do function level tear down for all funct... | -module(common_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
all() ->
[unittest].
init_per_suite(Config) ->
error_logger:tty(false),
Config.
end_per_suite(_Config) ->
ok.
or for individual functions by matching on .
init_per_testcase(unittest, Config) ->
Config... |
01339b8432afd1ae428febcced87638a870b329ab0e0129877ab980743bcdc9a | mirage/ocaml-matrix | filter.ml | open Json_encoding
open Matrix_common
module Event_filter = struct
type t = {
limit: int option;
not_senders: string list option;
not_types: string list option;
senders: string list option;
types: string list option;
}
[@@deriving accessor]
let encoding =
let to_tuple t = t.limit, t.no... | null | https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/lib/matrix-ctos/filter.ml | ocaml | open Json_encoding
open Matrix_common
module Event_filter = struct
type t = {
limit: int option;
not_senders: string list option;
not_types: string list option;
senders: string list option;
types: string list option;
}
[@@deriving accessor]
let encoding =
let to_tuple t = t.limit, t.no... | |
9fb5dbba4b7682ea96e025567464f2df6b176f815c3a4dcdde46d35984e344a5 | ahrefs/atd | string_match.mli | *
Compilation of string pattern matching into something faster than
what does .
Compilation of string pattern matching into something faster than
what ocamlopt does.
*)
type position = [ `Length | `Position of int | `End ]
type value = [ `Int of int | `Char of char ]
type 'a tree =
[ `Node of (... | null | https://raw.githubusercontent.com/ahrefs/atd/9a3cb984a695563c04b41cdd7a1ce9454eb40e1c/atdgen/src/string_match.mli | ocaml | * For internal use only | *
Compilation of string pattern matching into something faster than
what does .
Compilation of string pattern matching into something faster than
what ocamlopt does.
*)
type position = [ `Length | `Position of int | `End ]
type value = [ `Int of int | `Char of char ]
type 'a tree =
[ `Node of (... |
b6c99cc73314cf6fdcf5d0807dd9572a248e8a043948e5d6a6a80806036fe9a4 | oakmac/chessboard2 | math.cljs | (ns com.oakmac.chessboard2.util.math)
(defn hypotenuse
[a b]
(js/Math.sqrt
(+ (js/Math.pow a 2)
(js/Math.pow b 2))))
(defn half
[x]
(/ x 2))
| null | https://raw.githubusercontent.com/oakmac/chessboard2/8edd5e199d0cf464a04839cf73c59c24e1f7d467/src-cljs/com/oakmac/chessboard2/util/math.cljs | clojure | (ns com.oakmac.chessboard2.util.math)
(defn hypotenuse
[a b]
(js/Math.sqrt
(+ (js/Math.pow a 2)
(js/Math.pow b 2))))
(defn half
[x]
(/ x 2))
| |
f73206a0d286fa64098f7c1f68ce23d93f853f55291565af4988d98275ea924d | hipsleek/hipsleek | cprint.ml |
*
* Copyright ( c ) 2001 - 2003 ,
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/frontc/cprint.ml | ocaml | let lu = {line = -1; file = "loc unknown";}
** FrontC Pretty printer
stub out the old-style manual space functions
we may implement some of these later
sm: for some reason I couldn't just call print from frontc.... ?
** Useful primitives
** Base Type Printing
print "struct foo", but with specified keywor... |
*
* Copyright ( c ) 2001 - 2003 ,
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*... |
97dfeec1b858fb821446a4877ad512941f27c70ce209087f131dc023b7b3ec80 | alexander-yakushev/foreclojure-android | utils.clj | (ns org.bytopia.foreclojure.utils
(:require [neko.activity :as a]
[neko.listeners.view :refer [on-click-call]]
[neko.notify :refer [toast]]
[neko.resource :refer [get-string]]
[neko.threading :refer [on-ui]]
[neko.ui :as ui]
[neko.ui.mapping :ref... | null | https://raw.githubusercontent.com/alexander-yakushev/foreclojure-android/912529f9ea7c13874ffaa37a015c62a5165223b5/src/clojure/org/bytopia/foreclojure/utils.clj | clojure | (ns org.bytopia.foreclojure.utils
(:require [neko.activity :as a]
[neko.listeners.view :refer [on-click-call]]
[neko.notify :refer [toast]]
[neko.resource :refer [get-string]]
[neko.threading :refer [on-ui]]
[neko.ui :as ui]
[neko.ui.mapping :ref... | |
3d207538d92909bd4c50f77b8e886111bcc455e23a7dbb91a4b01afa370d18bd | joehillen/craft | Sourced.hs | module Craft.File.Sourced where
import Control.Lens
import Craft
import qualified Craft.File as File
data SourcedFile
= SourcedFile
{ _destination :: File
, _sourcer :: IO FilePath
}
makeLenses ''SourcedFile
sourcedFile :: (IO FilePath) -> AbsFilePath -> SourcedFile
source... | null | https://raw.githubusercontent.com/joehillen/craft/de31caa7f86cceaab23dbef0f05208bb853cf73b/src/Craft/File/Sourced.hs | haskell | module Craft.File.Sourced where
import Control.Lens
import Craft
import qualified Craft.File as File
data SourcedFile
= SourcedFile
{ _destination :: File
, _sourcer :: IO FilePath
}
makeLenses ''SourcedFile
sourcedFile :: (IO FilePath) -> AbsFilePath -> SourcedFile
source... | |
8b70bb0458ec52c55fb2d0cd5130af97fbaa3850c9cdac0f86c1b6fa0f2bbc0e | Kappa-Dev/KappaTools | blackboard.ml | *
* blackboard.ml
*
* Creation : < 2011 - 09 - 05 feret >
* Last modification : Time - stamp : < 2016 - 02 - 03 20:48:34 >
*
* Causal flow compression : a module for * , projet Abstraction , INRIA Paris - Rocquencourt
* , Université Paris - Diderot , CNRS
*
... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cflow/blackboard.ml | ocaml | * blackboard matrix
* blackboard
blackboard, once finalized
* initialisation
* output result
* iteration
* exporting result
*pretty printing
* blackboard matrix
* blackboard
* maps each wire id to its wire label
*pretty printing
* propagation request
* output result
* iteration
* exporting result | *
* blackboard.ml
*
* Creation : < 2011 - 09 - 05 feret >
* Last modification : Time - stamp : < 2016 - 02 - 03 20:48:34 >
*
* Causal flow compression : a module for * , projet Abstraction , INRIA Paris - Rocquencourt
* , Université Paris - Diderot , CNRS
*
... |
737baad119564edeb3ae5b8ce4169a09a742d146504a02524332cc41fb4d6fcd | mirage/ocaml-matrix | post.ml | open Lwt.Infix
type t = Client.t
let id = "matrix-post"
module Key = struct
type t = {key: string; room_id: string}
let digest {key; room_id} = key ^ "@" ^ room_id
end
module Value = struct
type t = Matrix_common.Events.Event_content.Message.t
let digest v =
Json_encoding.construct Matrix_common.Event... | null | https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/ci-client/post.ml | ocaml | open Lwt.Infix
type t = Client.t
let id = "matrix-post"
module Key = struct
type t = {key: string; room_id: string}
let digest {key; room_id} = key ^ "@" ^ room_id
end
module Value = struct
type t = Matrix_common.Events.Event_content.Message.t
let digest v =
Json_encoding.construct Matrix_common.Event... | |
0b6bbde5f83019ab6ccc6399a12790dfd8de7c577f930d1ec0ade621616a93e4 | lipas-liikuntapaikat/lipas | db.cljs | (ns lipas.ui.admin.db
(:require
[lipas.data.styles :as styles]))
(def default-db
{:selected-tab 0
:users-status "active"
:magic-link-dialog-open? false
:magic-link-variants [{:value "lipas" :label "Lipas"}
{:value "portal" :labe... | null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f75b11473beb4f81f2d1bfdfbe6d3f0fb220be30/webapp/src/cljs/lipas/ui/admin/db.cljs | clojure | (ns lipas.ui.admin.db
(:require
[lipas.data.styles :as styles]))
(def default-db
{:selected-tab 0
:users-status "active"
:magic-link-dialog-open? false
:magic-link-variants [{:value "lipas" :label "Lipas"}
{:value "portal" :labe... | |
abe1657a1a165989422df4fefee27ab1a59de5c66edebd0e60d88e7707196249 | satori-com/mzbench | bench_loop.erl | -module(bench_loop).
-export([main/1]).
rates() ->
[
1000
, 500000
, 1000000
, 1500000
, 2000000
, 2500000
, 2800000
, 3000000
, 3300000
, 3600000
, 4000000
].
duration() -> 5.
main(_Args) ->
Stats = [[R, bench_rps(constant, R), bench_rps(ramp, R)]
... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/bench_loop/bench_loop.erl | erlang | -module(bench_loop).
-export([main/1]).
rates() ->
[
1000
, 500000
, 1000000
, 1500000
, 2000000
, 2500000
, 2800000
, 3000000
, 3300000
, 3600000
, 4000000
].
duration() -> 5.
main(_Args) ->
Stats = [[R, bench_rps(constant, R), bench_rps(ramp, R)]
... | |
8a62076e5a62f989e2d76448cd312ebbb05e27322f8b7a41a39ef985a9c86701 | mhuebert/chia | other.cljs | (ns chia.util.other
"Temp namespace for stuff that should go somewhere else")
(defn focus-first-input [^js root-element]
(some-> root-element
(.querySelector "textarea, input, input[type=text], select")
(.focus))) | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/util/src/chia/util/other.cljs | clojure | (ns chia.util.other
"Temp namespace for stuff that should go somewhere else")
(defn focus-first-input [^js root-element]
(some-> root-element
(.querySelector "textarea, input, input[type=text], select")
(.focus))) | |
073a513a84ce98a1449ed543be7fba17e307535d2b4d27e9f60f9bfb642c7555 | andrewmcveigh/cljs-time | local_test.cljs | (ns cljs-time.local-test
(:refer-clojure :exclude [extend second])
(:require-macros
[cljs-time.macros :refer [do-at]]
[cljs-time.core-test :refer [when-available when-not-available]])
(:require
[cljs.test :refer-macros [deftest is]]
[cljs-time.core :as time]
[cljs-time.extend]
[cljs-time.format ... | null | https://raw.githubusercontent.com/andrewmcveigh/cljs-time/7f86226ef2bc5e1c8e00ab9c36096e76f84a73e1/test/cljs_time/local_test.cljs | clojure | (deftest test-now
(local-now)))))
(format-local-time 0 :basic-date-time)))
(to-local-date-time "04/25/1998 11:59:01")))
(is (= (time/default-time-zone)
(prn 'test-local-formatters (to-local-date-time "04/25/1998 11:59:01"))
(time/time-zone-for-offset (int hour... | (ns cljs-time.local-test
(:refer-clojure :exclude [extend second])
(:require-macros
[cljs-time.macros :refer [do-at]]
[cljs-time.core-test :refer [when-available when-not-available]])
(:require
[cljs.test :refer-macros [deftest is]]
[cljs-time.core :as time]
[cljs-time.extend]
[cljs-time.format ... |
25f22461f7c6cad5cffc02dddc6e883b6f6807457988a8bbb7ed74044dd2d4ce | grin-compiler/grin | SyntaxDefs.hs | # LANGUAGE DeriveDataTypeable , DeriveGeneric , StandaloneDeriving , LambdaCase #
module Grin.ExtendedSyntax.SyntaxDefs where
import Data.Text (Text, unpack)
import Data.Binary
import Control.DeepSeq
import GHC.Generics (Generic)
import Data.Data
import Data.String
import Text.Printf
import Lens.Micro.Platform
Na... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Grin/ExtendedSyntax/SyntaxDefs.hs | haskell | when we seralize the Exp
missing parameter count | # LANGUAGE DeriveDataTypeable , DeriveGeneric , StandaloneDeriving , LambdaCase #
module Grin.ExtendedSyntax.SyntaxDefs where
import Data.Text (Text, unpack)
import Data.Binary
import Control.DeepSeq
import GHC.Generics (Generic)
import Data.Data
import Data.String
import Text.Printf
import Lens.Micro.Platform
Na... |
c45c0f684d2acb7d17753108fe9bd49df4ee7be97226cc9c05f7c349bcb605fa | francescoc/scalabilitywitherlangotp | frequency.erl | -module(frequency).
-behaviour(gen_server).
-export([start_link/0, stop/0, allocate/0, deallocate/1]).
-export([init/1, handle_call/3, handle_cast/2, terminate/2, handle_info/2]).
-export([format_status/2]).
%% CLIENT FUNCTIONS
%% start() -> {ok, pid()} | {error, Reason}
%% Starts the frequency server. Called by sup... | null | https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch7/frequency.erl | erlang | CLIENT FUNCTIONS
start() -> {ok, pid()} | {error, Reason}
Starts the frequency server. Called by supervisor
stop() -> ok.
Stops the frequency server.
If available, it returns a frequency used to make a call.
Frequency must be deallocated on termination.
deallocate() -> ok
Frees a frequency so it can be used by... | -module(frequency).
-behaviour(gen_server).
-export([start_link/0, stop/0, allocate/0, deallocate/1]).
-export([init/1, handle_call/3, handle_cast/2, terminate/2, handle_info/2]).
-export([format_status/2]).
start_link() ->
gen_server:start_link({local, frequency}, frequency, [], []).
stop() ->
gen_server... |
5198e05e8a42e1d7fb13ef8e96edec0fc2a6898f0ecab6dcc8443e3ed25678dc | Zulu-Inuoe/clution | setup.lisp | (in-package #:quicklisp)
(defun show-wrapped-list (words &key (indent 4) (margin 60))
(let ((*print-right-margin* margin)
(*print-pretty* t)
(*print-escape* nil)
(prefix (make-string indent :initial-element #\Space)))
(pprint-logical-block (nil words :per-line-prefix prefix)
(pprint-fill ... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/systems/cl-clution/quicklisp/quicklisp/setup.lisp | lisp | Only show package markers when compiling. Showing
them when loading shows a bunch of ASDF system
package noise.
resignal
Error isn't from a system dependency, so there's
nothing to autoload | (in-package #:quicklisp)
(defun show-wrapped-list (words &key (indent 4) (margin 60))
(let ((*print-right-margin* margin)
(*print-pretty* t)
(*print-escape* nil)
(prefix (make-string indent :initial-element #\Space)))
(pprint-logical-block (nil words :per-line-prefix prefix)
(pprint-fill ... |
51dc273060412bd1ad304b6dd27fb1011dc51541eed682384cf76b443a639a0a | rfkm/zou | figwheel_test.clj | (ns zou.cljs.figwheel-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[zou.cljs.figwheel :as sut]))
(t/deftest figwheel-test
TODO
(fact 1 => 1))
| null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/cljs-devel/test/zou/cljs/figwheel_test.clj | clojure | (ns zou.cljs.figwheel-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[zou.cljs.figwheel :as sut]))
(t/deftest figwheel-test
TODO
(fact 1 => 1))
| |
b0bb6a10b3e0cb4adff61935901bb9e21ad82dcacca88def9cab1d02d903ae99 | haskell-tools/haskell-tools | TypeRole.hs | # LANGUAGE RoleAnnotations #
module Decl.TypeRole where
type role Foo representational representational
data Foo a b = Foo Int
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Decl/TypeRole.hs | haskell | # LANGUAGE RoleAnnotations #
module Decl.TypeRole where
type role Foo representational representational
data Foo a b = Foo Int
| |
ab06619a49907e74cbf4cee7a67e8ba91312c4e52df20c9134d6b2feb599e1ba | TyOverby/mono | row.mli | open! Core
type t =
{ symbol : string
; edge : float
; max_edge : float
; bsize : int
; bid : float
; ask : float
; asize : int
; position : int
; last_fill : Time_ns.t option
; trader : string
}
[@@deriving compare, fields, typed_fields]
val many_random : int -> t String.Map.t
| null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/partial_render_table/src/row.mli | ocaml | open! Core
type t =
{ symbol : string
; edge : float
; max_edge : float
; bsize : int
; bid : float
; ask : float
; asize : int
; position : int
; last_fill : Time_ns.t option
; trader : string
}
[@@deriving compare, fields, typed_fields]
val many_random : int -> t String.Map.t
| |
48255ce402f768e01342d2468d871d1d479b2928e3d4d60f4a591c07d42ee0b7 | MarkCurtiss/sicp | 5_7_to_5_13_spec.scm | (load "5_7_to_5_13.scm")
(describe "Register machine simulator"
(it "can simulate a recursive exponentiation machine"
(lambda ()
(load "book_code/ch5-regsim.scm")
(define expt-machine
(make-machine
'(b n continue val)
(list
(list '= =)
(list '- -)
(list '* *))
'((assign continue (lab... | null | https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_5_exercises/spec/5_7_to_5_13_spec.scm | scheme | set up to compute Fib(n - 1)
save old value of n
clobber n to n - 1
perform recursive call
set up to compute Fib(n - 2)
Fib(n - 1) + Fib(n - 2)
return to caller, answer is in val
base case: Fib(n) = n
set up to compute Fib(n - 1)
save old value of n
clobber n to n - 1
perform recursive call
set up to co... | (load "5_7_to_5_13.scm")
(describe "Register machine simulator"
(it "can simulate a recursive exponentiation machine"
(lambda ()
(load "book_code/ch5-regsim.scm")
(define expt-machine
(make-machine
'(b n continue val)
(list
(list '= =)
(list '- -)
(list '* *))
'((assign continue (lab... |
68737d92625562f19582f4baa406289e7e42c58ed3b1824b7a89de6c89d0d8f0 | input-output-hk/cardano-sl | NetworkAddress.hs | module Pos.Core.NetworkAddress
( NetworkAddress
, localhost
, addrParser
, addrParserNoWildcard
) where
import Universum
import qualified Data.ByteString.Char8 as BS8
import qualified Serokell.Util.Parse as P
We should really be using here instead of Parsec , but that
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/NetworkAddress.hs | haskell | have that dependency bubble up.
| @"127.0.0.1"@.
| Full node address. | module Pos.Core.NetworkAddress
( NetworkAddress
, localhost
, addrParser
, addrParserNoWildcard
) where
import Universum
import qualified Data.ByteString.Char8 as BS8
import qualified Serokell.Util.Parse as P
We should really be using here instead of Parsec , but that
... |
8b58522aef760e963d79f979e4c5cc0593c1023b0fd3cd87cbc232c613004105 | Leberwurscht/Diaspora-User-Directory | index.ml | (************************************************************************)
This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/index.ml | ocaml | **********************************************************************
*********************************************************************
******************************************************************
******************************************************************
*********************************************... | This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
This program is distributed in ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.