_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 |
|---|---|---|---|---|---|---|---|---|
0f757260b01111644fc458b968f006525973e929eedfbb37655bd58e30ce66d9 | gafiatulin/codewars | AlternatingCase.hs | altERnaTIng cAsE < = >
--
module Codewars.Kata.AlternatingCase where
import Data.Char(isLower, toUpper, toLower)
toAlternatingCase :: String -> String
toAlternatingCase = map (\x -> if isLower x then toUpper x else toLower x) | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/8%20kyu/AlternatingCase.hs | haskell | altERnaTIng cAsE < = >
module Codewars.Kata.AlternatingCase where
import Data.Char(isLower, toUpper, toLower)
toAlternatingCase :: String -> String
toAlternatingCase = map (\x -> if isLower x then toUpper x else toLower x) | |
d21ba22906f549e2ac150a28ba1ef22265522dc746a62648a22c61287085afe3 | crategus/cl-cffi-gtk | pango.glyph.lisp | ;;; ----------------------------------------------------------------------------
;;; pango.glyph.lisp
;;;
;;; The documentation of this file is taken from the Pango Reference Manual
Version 1.48 and modified to document the Lisp binding to the Pango library .
;;; See <>. The API documentation of the Lisp binding is
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/pango/pango.glyph.lisp | lisp | ----------------------------------------------------------------------------
pango.glyph.lisp
The documentation of this file is taken from the Pango Reference Manual
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of t... | Version 1.48 and modified to document the Lisp binding to the Pango library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2011 - 2020
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Public License that clarifies the terms for use
GNU Lesser General Public ... |
ec6d70d68f0e06637344ba9208bf9bd184ff1b3546d5ab5491e58d1b9c25a9f1 | fiddlerwoaroof/cl-git | branch.lisp | (in-package :fwoar.cl-git)
(defun get-local-unpacked-branches (root)
(mapcar (data-lens:juxt #'pathname-name
(alexandria:compose #'serapeum:trim-whitespace
#'alexandria:read-file-into-string))
(uiop:directory*
(merge-pathnam... | null | https://raw.githubusercontent.com/fiddlerwoaroof/cl-git/fb9deed060d49dbb52f390f67b1783a13edf71b6/branch.lisp | lisp | (in-package :fwoar.cl-git)
(defun get-local-unpacked-branches (root)
(mapcar (data-lens:juxt #'pathname-name
(alexandria:compose #'serapeum:trim-whitespace
#'alexandria:read-file-into-string))
(uiop:directory*
(merge-pathnam... | |
654c8620985c3a79af5cd2f6abdddc8e59f4dde0728408dfac0592833148c1f4 | Netflix/mantis-mql | util.clj | ;
Copyright 2019 Netflix , Inc.
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
distributed unde... | null | https://raw.githubusercontent.com/Netflix/mantis-mql/94600fc687afd380e6a063806a5f0dd0be218f34/mql-jvm/src/main/clojure/io/mantisrx/mql/jvm/util.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | Copyright 2019 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns io.mantisrx.mql.jvm.util)
(defn map-assoc-in!
"Associates a value in a nested TreeMap using mutable behavior.
This function mimics the behavior of assoc-in and will create
new nested TreeMaps as necessary... |
9b49bab444a8d7604b1d09f1ac1e824c63dfba815d5c8137c78f516294bee2bf | GaoYusong/erlang-traffic-control | traffic_control_lib.erl | -module(traffic_control_lib).
-export([get_infos_from_state/2]).
get_infos_from_state(State, StateTuple) ->
{_, Infos} = lists:foldl(
fun(Info, {Count, Result}) ->
{Count + 1, [{Info, element(Count + 1, State)} | Result]}
end,
{1, []}, tuple_to_list(StateTuple)),
Infos.
| null | https://raw.githubusercontent.com/GaoYusong/erlang-traffic-control/002a1d637a368d58e65f9f81c79f4c7b6612388e/src/traffic_control_lib.erl | erlang | -module(traffic_control_lib).
-export([get_infos_from_state/2]).
get_infos_from_state(State, StateTuple) ->
{_, Infos} = lists:foldl(
fun(Info, {Count, Result}) ->
{Count + 1, [{Info, element(Count + 1, State)} | Result]}
end,
{1, []}, tuple_to_list(StateTuple)),
Infos.
| |
d3f232ccd17f8903147462ebbe8165a2f74e5527d6c327abb6edf22ce4f9b041 | webyrd/n-grams-for-synthesis | s48-read.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 - 2004 by and . See file COPYING .
;;; From Scheme48's COPYING file:
Copyright ( c ) 1993 - 2004 and
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permi... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-62/s48-read.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
From Scheme48's COPYING file:
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer... | Copyright ( c ) 1993 - 2004 by and . See file COPYING .
Copyright ( c ) 1993 - 2004 and
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of the authors may not be used to endorse or promote products
... |
c592f20bad04fde707763b9061ae015316547a87bad0cf2920dd52fe23b3d2fd | jasonkuhrt-archive/hpfp-answers | QuickCheckTests.hs | module QuickCheckTests where
import Test.QuickCheck
import Data.List
cons = (:)
join = (++)
mul = (*)
eq = (==)
neq = (/=)
main :: IO ()
main = do
quickCheck halfAddHalfIdentProp
quickCheck halfAddHalfIdentityProp
quickCheck sortOrdersListProp
quickCheck plusAssociativeProp
quickCheck plusCommutativeProp... | null | https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-14/QuickCheckTests/QuickCheckTests.hs | haskell | quickCheck powAssociativeProp -- False property
quickCheck powCommutativeProp -- False property
False property
quickCheck takeCountEqLengthProp -- False property
half
sort
first iteration
plus
multiply
5 -- quot/rem & div/mod laws
Is ` ^ ` associative ? commutative ?
No, it is not!
No, it is not!
reverse ... | module QuickCheckTests where
import Test.QuickCheck
import Data.List
cons = (:)
join = (++)
mul = (*)
eq = (==)
neq = (/=)
main :: IO ()
main = do
quickCheck halfAddHalfIdentProp
quickCheck halfAddHalfIdentityProp
quickCheck sortOrdersListProp
quickCheck plusAssociativeProp
quickCheck plusCommutativeProp... |
e0a1165cf7597ea64dc204acacb8db8316b6bd5515f9492a134decb6d95c1dbf | GaloisInc/llvm-verifier | BitBlast.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
{-# LANGUAGE PatternGuards #-}
|
Module : $ Header$
Description : A symbolic backend that bitblasts
License ... | null | https://raw.githubusercontent.com/GaloisInc/llvm-verifier/d97ee6d2e731f48db833cc451326e737e1e39963/src/Verifier/LLVM/Backend/BitBlast.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE PatternGuards #
* Re-exports to create and interact with backend.
Memmodel code
for testing only
import qualified Data.Vector.Storable as LV
Utility functions and declarations { { { 1
^ n
^ bitvector to split.
| Concatenate a vector of vectors... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
Module : $ Header$
Description : A symbolic backend that bitblasts
License : BSD3
Stability : provisional
Point - of - contact : atomb , jhendrix
M... |
637f0a431246876ee4f15c404e55efa1a8373322ee4866a24335f7fec7c0f038 | rbkmoney/fistful-server | ff_bin_data.erl | -module(ff_bin_data).
-include_lib("binbase_proto/include/binbase_binbase_thrift.hrl").
-include_lib("binbase_proto/include/binbase_msgpack_thrift.hrl").
-type token() :: binary().
-type issuer_country() :: atom().
-type payment_system() :: binary().
-type payment_system_deprecated() :: atom().
-type response_data()... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/04292c3bc3c8928f4202e5976828c4eadae8a767/apps/fistful/src/ff_bin_data.erl | erlang | as stolen from `machinery_msgpack`
string
binary
API
| -module(ff_bin_data).
-include_lib("binbase_proto/include/binbase_binbase_thrift.hrl").
-include_lib("binbase_proto/include/binbase_msgpack_thrift.hrl").
-type token() :: binary().
-type issuer_country() :: atom().
-type payment_system() :: binary().
-type payment_system_deprecated() :: atom().
-type response_data()... |
03ac1df46123def6c417b41cfa123ce4634bcb1dfbac7bcbfbfd21b65e2b3589 | MinaProtocol/mina | block_response.ml |
* This file has been generated by the OCamlClientCodegen generator for openapi - generator .
*
* Generated by : -generator.tech
*
* Schema Block_response.t : A BlockResponse includes a fully - populated block or a partially - populated block with a list of other transactions to fetch ( other_transactions... | null | https://raw.githubusercontent.com/MinaProtocol/mina/a80b00221953c26ff158e7375a948b5fa9e7bd8b/src/lib/rosetta_models/block_response.ml | ocaml | Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned. |
* This file has been generated by the OCamlClientCodegen generator for openapi - generator .
*
* Generated by : -generator.tech
*
* Schema Block_response.t : A BlockResponse includes a fully - populated block or a partially - populated block with a list of other transactions to fetch ( other_transactions... |
e55b0ad813e04698699722ed1908c6c0c371e49872c3c06ed28016271fe41113 | wireapp/wire-server | SMTP.hs | {-# OPTIONS_GHC -Wno-deferred-out-of-scope-variables #-}
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
module SMTP where
import qualified Bilge
import Brig.SMTP
import Control.Exception
import Data.Bifunctor
import qualified Data.ByteString as B
import qualified Data.Byt... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/brig/test/integration/SMTP.hs | haskell | # OPTIONS_GHC -Wno-deferred-out-of-scope-variables #
Disabling to stop warnings on HasCallStack
# OPTIONS_GHC -Wno-redundant-constraints #
| Contains all data sent to the SMTP server for this mail. (Including
a lie; it's way more. |
module SMTP where
import qualified Bilge
import Brig.SMTP
import Control.Exception
import Data.Bifunctor
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C
import Data.Streaming.Network (bindRandomPortTCP)
import Data.Text (unpack)
import Data.Text.Lazy (fromStrict)
import Data.Time.Uni... |
12a9bec84085632fc2f53543281aa06f8306e77da37351ae6fb50b4786235b79 | andrewthad/contiguous | UnitTests.hs | # language ExistentialQuantification #
# language GeneralizedNewtypeDeriving #
{-# language ScopedTypeVariables #-}
{-# language UndecidableInstances #-}
module Main (main) where
import Data.Functor.Identity (Identity(..))
import Data.Monoid
import Data.Primitive
import Prelude
import Test.QuickCheck
import Test.Quic... | null | https://raw.githubusercontent.com/andrewthad/contiguous/b13c19dd1bed9b8233994d68758abcf6974df2af/test/UnitTests.hs | haskell | # language ScopedTypeVariables #
# language UndecidableInstances #
Verbosity with which to run tests.
| Hide the prop type.
hack to let us get away with stuffing different
prop types in a list
quiet output of a test
verbose output of a test
Useful for failing tests
Get around quickcheck not generating multiple ... | # language ExistentialQuantification #
# language GeneralizedNewtypeDeriving #
module Main (main) where
import Data.Functor.Identity (Identity(..))
import Data.Monoid
import Data.Primitive
import Prelude
import Test.QuickCheck
import Test.QuickCheck.Instances ()
import qualified Data.Maybe as P
import qualified Data.... |
1c38be3dde60220c0493912d34351f830bb7fd9163931a66bb4c3bcf62ea0b88 | IBM/wcs-ocaml | spel_j.mli |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/wcs-lib/spel_j.mli | ocaml | * Spel/JSON conversions. |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License... |
560a622d4701d3520a5d1704f48beed7a946f38e5aee3f7595c02ed8d14ead6d | riak-haskell-client/riak-haskell-client | Internal.hs | # LANGUAGE CPP , OverloadedStrings , RecordWildCards , ScopedTypeVariables , FlexibleContexts , MultiWayIf #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module: Network.Riak.Connection.Internal
Copyright : ( c ) 2011 MailRank , Inc.
License : Apache
Maintainer : < > , < >
-- Stability: e... | null | https://raw.githubusercontent.com/riak-haskell-client/riak-haskell-client/a1eafc4c16b85a98b2d29e306165f4d93819609f/riak/src/Network/Riak/Connection/Internal.hs | haskell | |
Module: Network.Riak.Connection.Internal
Stability: experimental
Portability: portable
Low-level network connection management.
* Connection management
* Client configuration
* Requests and responses
** Sending and receiving requests and responses
* Low-level protocol operations
** Sending and rece... | # LANGUAGE CPP , OverloadedStrings , RecordWildCards , ScopedTypeVariables , FlexibleContexts , MultiWayIf #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : ( c ) 2011 MailRank , Inc.
License : Apache
Maintainer : < > , < >
module Network.Riak.Connection.Internal
(
Network.Riak.Conne... |
fff95e0fa1399e12e009e061c1c355fa4096f64dfd053624c42d801aa6e0e632 | juspay/atlas | Flow.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Product/FareCalculator/Flow.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
54b3b6235ae2be6e070581f3f70916051a972b294b48c64fea697c29e5067a2a | poscat0x04/telegram-types | GetUpdates.hs | module Web.Telegram.Types.Internal.API.GetUpdates where
import Common
import Web.Telegram.Types.Internal.UpdateType
data GetUpdates = GetUpdates
{ offset :: Maybe Int,
limit :: Maybe Int,
timeout :: Maybe Int,
allowedUpdates :: Maybe [UpdateType]
}
deriving stock (Show, Eq)
mkLabel ''GetUpdates
der... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/GetUpdates.hs | haskell | module Web.Telegram.Types.Internal.API.GetUpdates where
import Common
import Web.Telegram.Types.Internal.UpdateType
data GetUpdates = GetUpdates
{ offset :: Maybe Int,
limit :: Maybe Int,
timeout :: Maybe Int,
allowedUpdates :: Maybe [UpdateType]
}
deriving stock (Show, Eq)
mkLabel ''GetUpdates
der... | |
3c0a2e7788fa2ee4473e4c7a21dd120439c136385298cdb422920112ddf9eaaf | poscat0x04/telegram-types | User.hs | module Web.Telegram.Types.Internal.User where
import Common
data User = User
{ -- | Unique identifier for this user or bot
id :: Int,
-- | True, if this user is a bot
isBot :: Bool,
| User 's or bot 's first name
firstName :: Text,
-- | User's or bot's last name
lastName :: Maybe Text,
... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/User.hs | haskell | | Unique identifier for this user or bot
| True, if this user is a bot
| User's or bot's last name
| User's or bot's username
| [IETF language tag]() of the user's language
| True, if the bot can be invited to groups. Returned only in getMe
| True, if privacy mode is disabled for the bot. Returned only in getMe
... | module Web.Telegram.Types.Internal.User where
import Common
data User = User
id :: Int,
isBot :: Bool,
| User 's or bot 's first name
firstName :: Text,
lastName :: Maybe Text,
username :: Maybe Text,
languageCode :: Maybe Text,
canJoinGroups :: Maybe Bool,
canReadAllGroupMessages ::... |
452b433b44cf6c782de0943a8fe2160a8b3016f4ebc40c7bb4a6452d50e5814a | erlang/erlide_kernel | testlauncher.erl | Author : < >
Created : 17 - 02 - 2011
%% Description: test launcher for testing cover plugin
%%----------------------------------------------
-module(testlauncher).
-behaviour(gen_server).
%%----------------------------------------------
%% Include files
%%----------------------------------------------
-include... | null | https://raw.githubusercontent.com/erlang/erlide_kernel/763a7fe47213f374b59862fd5a17d5dcc2811c7b/debugger/erlide_debugger/src/testlauncher.erl | erlang | Description: test launcher for testing cover plugin
----------------------------------------------
----------------------------------------------
Include files
----------------------------------------------
----------------------------------------------
Exported Functions
--------------------------------------------... | Author : < >
Created : 17 - 02 - 2011
-module(testlauncher).
-behaviour(gen_server).
-include("test.hrl").
-include("coverage.hrl").
-export([start/1,
start_link/1,
stop/0,
run_tests/2,
set_output_dir/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
terminate/2,
code_change/3... |
6a79c808cf9d7f970a975169c11b7a44f79e2b195ffd33801badd823c5674e4f | camlunity/ocaml-react | myocamlbuild.ml | OASIS_START
(* DO NOT EDIT (digest: bc205c86c7b1a38ef8f0f54dbdb19c98) *)
module OASISGettext = struct
# 21 "/home/typhon/data/kamlo/oasis-0.2.1~alpha1/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
i... | null | https://raw.githubusercontent.com/camlunity/ocaml-react/e492c3a508ec25c2c07622f155c3a2d5bb364dd1/myocamlbuild.ml | ocaml | DO NOT EDIT (digest: bc205c86c7b1a38ef8f0f54dbdb19c98)
these functions are not really officially exported
this lists all supported packages
this is supposed to list available syntaxes, but I don't know how to do it.
ocamlfind command
by using Before_options one let command line options have an higher priorit... | OASIS_START
module OASISGettext = struct
# 21 "/home/typhon/data/kamlo/oasis-0.2.1~alpha1/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
fmt2^^""
let ... |
4c551489037d40227f99de614d99f0857a4051b1ebfe27add04cb07776b6fd2d | manuel-serrano/hop | svg.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / runtime / svg.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/2f687a900e00b527d6661d72e4a8522467718913/runtime/svg.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Hop SVG support. */
*===========================... | * serrano / prgm / project / hop / hop / runtime / svg.scm * /
* Author : * /
* Creation : Tue Oct 2 08:22:25 2007 * /
* Last change : Tue Nov 8 08:30:10 2022 ( serrano ) * /
* Co... |
15ec14c81d64e6f8dcc96e4eaaacfee8841d23f75b4f4efa3fb3cda66d48566f | public-law/nevada-revised-statutes-parser | TextUtil.hs | module TextUtil where
import BasicPrelude
import Data.Char ( isAlpha )
import qualified Data.Text as T
import Text.HTML.TagSoup
titleize :: Text -> Text
titleize = unwords . titleizeWords . words
titleizeWords :: [Text] -> [Text]
titleizeWords ... | null | https://raw.githubusercontent.com/public-law/nevada-revised-statutes-parser/88a886debdab6ce5bd6cf5819c846cec1ffb9220/src/TextUtil.hs | haskell | Titleize the word only if it's usually capitalized. Else,
return it in lower case.
Titleize the word without being fooled by leading punctuation.
Words which are not usually capitalized in titles. | module TextUtil where
import BasicPrelude
import Data.Char ( isAlpha )
import qualified Data.Text as T
import Text.HTML.TagSoup
titleize :: Text -> Text
titleize = unwords . titleizeWords . words
titleizeWords :: [Text] -> [Text]
titleizeWords ... |
37a2890f291c2fe48f4172d51ee9f36562035980a2659dc3e77bd7dfb6656849 | travelping/ergw | tdf_SUITE.erl | Copyright 2019 , Travelping GmbH < >
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(tdf_SUITE).
-co... | null | https://raw.githubusercontent.com/travelping/ergw/544c12f06ba9d3891156e1ed243f0a09d0630e39/apps/ergw_core/test/tdf_SUITE.erl | erlang | This program is free software; you can redistribute it and/or
-include("ergw_pgw_test_lib.hrl").
Handler Under Test
===================================================================
Config
===================================================================
force cth_log to async mode, never block the tests
A/AAA... | Copyright 2019 , Travelping GmbH < >
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 .
-module(tdf_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("kernel/inc... |
ae66e9333bdacb4e66e235a7a082aade9be26cc8c0373af96e1fdfd868e4d768 | jtuple/riak_zab | riak_zab_log.erl | -module(riak_zab_log).
-compile(export_all).
-define(BC, riak_zab_bitcask_backend).
-record(synclog, {sync_log :: term(),
sync_idx :: non_neg_integer()}).
-define(DOUT(Msg , ) , io : format(Msg , ) ) .
-define(DOUT(Msg, Args), true).
%% History API
init_history_log(VG) ->
<<P:128/integer>> =... | null | https://raw.githubusercontent.com/jtuple/riak_zab/ebd54aa540cf65e49d6e0890005e714ee756914a/src/riak_zab_log.erl | erlang | History API
Old History API
init_history_log() ->
get_old_proposals(#state{history=History,
last_committed_zxid=LastCommittedZxid}) ->
lists:keysort(1, dict:to_list(dict:filter(fun(K,_V) -> (K > LastCommittedZxid) end, History))).
log_proposal(Zxid, Msg, History) ->
get_proposal(Zxid, ... | -module(riak_zab_log).
-compile(export_all).
-define(BC, riak_zab_bitcask_backend).
-record(synclog, {sync_log :: term(),
sync_idx :: non_neg_integer()}).
-define(DOUT(Msg , ) , io : format(Msg , ) ) .
-define(DOUT(Msg, Args), true).
init_history_log(VG) ->
<<P:128/integer>> = crypto:md5(ter... |
526bf9f73cbbb2306bda3a37f6f866daebf95814ed2d767a58b325d73f056f54 | piotr-yuxuan/choose-a-new-phone | effects.cljc | (ns choose-a-new-phone.effects
(:require [re-frame.core :as re-frame]
[re-frame.interop :as re-frame.interop] ;; keep it as a hint when you'll need it to actually dispatch an event in an effect handler.
#?(:clj [clj-http.client :as client])
#?(:clj [clj-http.conn-mgr :as conn-mgr])... | null | https://raw.githubusercontent.com/piotr-yuxuan/choose-a-new-phone/656304e34a41122e515418072c7ebf6524032fc6/src/choose_a_new_phone/effects.cljc | clojure | keep it as a hint when you'll need it to actually dispatch an event in an effect handler.
ClojureScript code for ::http-xhrio
arbitrary number, works on my machine
You don't want this to be evaluated on bootstrap -- hint: it
hangs REPL bootstrap.
End of code for ::http-xhrio | (ns choose-a-new-phone.effects
(:require [re-frame.core :as re-frame]
#?(:clj [clj-http.client :as client])
#?(:clj [clj-http.conn-mgr :as conn-mgr])))
(def ^:private protected-effects
#{:db :cofx})
(re-frame/reg-event-fx
::dispatch
(fn [_ [_ effect arg]]
(when-not (protected-effec... |
4edc62a9ab8c87ed48848ece33d9b944c6d9dcafd9395671d7772d9a3306cd49 | Bogdanp/racket-dbg | dot.rkt | #lang racket/base
(require racket/format
racket/match
racket/port
racket/string
racket/system
"common.rkt")
(provide
write-graph-pdf)
(define (write-graph-pdf target graph start)
(define metadata (hash-ref graph 'metadata))
(define links (hash-ref graph 'links))
(d... | null | https://raw.githubusercontent.com/Bogdanp/racket-dbg/61301be81d74e049d0dc48f4d4f2229639eff01a/dbg-ui/ui/dot.rkt | racket | #lang racket/base
(require racket/format
racket/match
racket/port
racket/string
racket/system
"common.rkt")
(provide
write-graph-pdf)
(define (write-graph-pdf target graph start)
(define metadata (hash-ref graph 'metadata))
(define links (hash-ref graph 'links))
(d... | |
6a51f5852c6c3bdc4501a1a598f9f7f38b84830744975f6e36fd091d1555d35e | thephoeron/black-stone | packages.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : BLACK - STONE ; Base : 10 -*-
file : packages.lisp
Copyright ( c ) 2013 - -2015 , " the Phoeron " < //thephoeron.com >
;;;; See LICENSE for additional information.
(in-package :cl-user)
(defpackage #:black-stone
(:use :cl)
(:export #:*black-stone-app-... | null | https://raw.githubusercontent.com/thephoeron/black-stone/c8f1d76d81de3c9862520c8ddac62e73e831ea55/packages.lisp | lisp | Syntax : COMMON - LISP ; Package : BLACK - STONE ; Base : 10 -*-
See LICENSE for additional information.
qtypes.lisp
circuit.lisp
oracles.lisp
generic.lisp
internal.lisp
see asdf system definition | file : packages.lisp
Copyright ( c ) 2013 - -2015 , " the Phoeron " < //thephoeron.com >
(in-package :cl-user)
(defpackage #:black-stone
(:use :cl)
(:export #:*black-stone-app-name*
#:*black-stone-version*
#:*black-stone-version-codename*
#:*black-stone-app-banner*
... |
936dfffac9a4fc146f60ebea4a00b773a4cd725620929aaa91bc7c3e7a152fd1 | raptazure/experiments | Lib.hs | module Lib
( someFunc,
)
where
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as B
import System.Random
someFunc :: IO ()
someFunc = putStrLn "someFunc"
threeCoins :: StdGen -> (Bool, Bool, Bool)
threeCoins gen =
let (firstCoin, newGen) = random gen
(secondCoin, newGen') = ra... | null | https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/learnyouahaskell/ch09e/src/Lib.hs | haskell | randomR :: RandomGen g => (a, a) -> g -> (a, g)
strict version: cons' - insert a lot of bytes | module Lib
( someFunc,
)
where
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as B
import System.Random
someFunc :: IO ()
someFunc = putStrLn "someFunc"
threeCoins :: StdGen -> (Bool, Bool, Bool)
threeCoins gen =
let (firstCoin, newGen) = random gen
(secondCoin, newGen') = ra... |
139765d36eca6d409d4aadcbca7edad86472e130752012df997dea47c96d50a8 | sru-systems/protobuf-simple | MessageMsg.hs | -- Generated by protobuf-simple. DO NOT EDIT!
module Types.MessageMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
import qualified Types.Message
newtype MessageMsg = MessageMsg
{ value :: Types.Message.Message
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.... | null | https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/MessageMsg.hs | haskell | Generated by protobuf-simple. DO NOT EDIT! | module Types.MessageMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
import qualified Types.Message
newtype MessageMsg = MessageMsg
{ value :: Types.Message.Message
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default MessageMsg where
defaultVal = Messag... |
74a8c1bbbc739fe8fffb61d9be2790bb5ab311d4bd2644eaae4fc7a42573992d | basho/riak_test | kv679_dataloss_fb.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2017 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/kv679_dataloss_fb.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2017 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
( C ) 2017 , Basho Technologi... |
9b52b31ccfb6cce6457c8a56d2d63db6d3b3b3043c41a3755c243a40616bea92 | con-kitty/categorifier-c | Error.hs | # LANGUAGE QuasiQuotes #
-- | Error tools for random expression test generation.
module Categorifier.C.KGenGenerate.Test.Error
( KSelectIndexError (..),
throwKSelectIndexError,
)
where
import qualified Categorifier.Common.IO.Exception as Exception
import Control.Exception (throw)
import GHC.Stack (CallStack)
... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/test-lib/Categorifier/C/KGenGenerate/Test/Error.hs | haskell | | Error tools for random expression test generation.
or a fixed-size `Data.Distributive.Distributive` functor might be more appropriate.
throw an exception. | # LANGUAGE QuasiQuotes #
module Categorifier.C.KGenGenerate.Test.Error
( KSelectIndexError (..),
throwKSelectIndexError,
)
where
import qualified Categorifier.Common.IO.Exception as Exception
import Control.Exception (throw)
import GHC.Stack (CallStack)
import PyF (fmt)
| The ` Categorifier . C.KTypes . Co... |
22f9e471a69ce252ae4ba5cf8c13726fc750f4d691685ee80c443ae833fc9ed0 | zotonic/zotonic | filter_is_rtl.erl | @author < >
2011 - 2021
%% @doc Check if the given language is a rtl or ltr language
Copyright 2011 - 2021
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2... | null | https://raw.githubusercontent.com/zotonic/zotonic/340392021a71acbcf1927ecf7f928181601c42ab/apps/zotonic_mod_translation/src/filters/filter_is_rtl.erl | erlang | @doc Check if the given language is a rtl or ltr language
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... | @author < >
2011 - 2021
Copyright 2011 - 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(filter_is_rtl).
-export([
is_rtl/2
]).
is_rtl(Id, Context) when is_integer(Id) ->
is_rtl(filter_la... |
69a23df5c6b717173adcadf2a3aefd31361d3c548f94680ac33e2f298eccde54 | runtimeverification/haskell-backend | Debug.hs | module Test.Debug (
test_debug,
test_debugPrec,
test_Debug,
test_diff,
) where
import Debug
import GHC.Generics qualified as GHC
import Generics.SOP qualified as SOP
import Kore.Sort
import Kore.Syntax.Variable
import Prelude.Kore
import Pretty qualified
import Test.Kore
import Test.Tasty
import Test.T... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/a87661036129b72f5031e94f083ee790dde6c09c/kore/test/Test/Debug.hs | haskell | A record type
A sum type with unary constructors
A complex algebraic data type
A product type with an infix constructor
A product type with a prefix constructor and an auxiliary fixity declaration
A newtype
A record newtype
A record | module Test.Debug (
test_debug,
test_debugPrec,
test_Debug,
test_diff,
) where
import Debug
import GHC.Generics qualified as GHC
import Generics.SOP qualified as SOP
import Kore.Sort
import Kore.Syntax.Variable
import Prelude.Kore
import Pretty qualified
import Test.Kore
import Test.Tasty
import Test.T... |
7cc2a0bea778aec8a826ea5f0f8675492f18ed84a550b5819fc9e899d0fb0051 | realworldocaml/examples | compare_example.ml | compare x y < 0 (* x < y *)
compare x y = 0 (* x = y *)
compare x y > 0 (* x > y *)
| null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/functors/compare_example.ml | ocaml | x < y
x = y
x > y | |
e4e0b56d1a3ec75d37b6384e577978c98b1a4a4a282578065ce9ca1d50336575 | linkfluence/inventory | project.clj | (defproject linkfluence/inventory "0.16.13-SNAPSHOT"
:description "Rtgi inventory App"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
;; logging stuff
[org.clojure/tools.logging "1.2.1"]
... | null | https://raw.githubusercontent.com/linkfluence/inventory/b69110494f8db210d14cc7093834c441440cd4e8/project.clj | clojure | logging stuff
time mgt
web service
for proxy
aws
internal cloud lib
scheduling
async op
Storage
consul
prometheus
Networking automation
journal storer, esfs object saver
conf template (dns conf generation)
distributed queing | (defproject linkfluence/inventory "0.16.13-SNAPSHOT"
:description "Rtgi inventory App"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/tools.logging "1.2.1"]
[org.slf4j/slf4j-api "1.7.32"]
... |
a3c2bdc966ca4bdf95201a8aadfb8bf13fb0413f40f3bb6dff5c728ee11e01b1 | samrushing/irken-compiler | f_datatype0.scm |
(datatype list
(nil)
(cons 'a list)
)
(let ((l0 (list:cons 4 (list:nil)))
(l1 (list:cons #t (list:nil)))
(l2 (list:cons "hey" (list:nil)))
)
(set! l0 (list:cons #t l0))
l0
)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/f_datatype0.scm | scheme |
(datatype list
(nil)
(cons 'a list)
)
(let ((l0 (list:cons 4 (list:nil)))
(l1 (list:cons #t (list:nil)))
(l2 (list:cons "hey" (list:nil)))
)
(set! l0 (list:cons #t l0))
l0
)
| |
21af1ea0ef596f97e070e717953756f4a1d57584c76e203a30c230fb237f3a71 | Kalimehtar/russian-lang | info.rkt | #lang setup/infotab
(define version "0.41")
(define collection 'multi)
(define deps '("base" "scribble-lib" "racket-doc" "rackunit-lib" "parser-tools-lib"))
(define license 'MIT) | null | https://raw.githubusercontent.com/Kalimehtar/russian-lang/096dbda926fb011c1b1a745f7e4f791bbe0d9d12/info.rkt | racket | #lang setup/infotab
(define version "0.41")
(define collection 'multi)
(define deps '("base" "scribble-lib" "racket-doc" "rackunit-lib" "parser-tools-lib"))
(define license 'MIT) | |
3df38a0e69a15f3242c511d405c78da3161cc12fd096d1fcd0e9395f4819974e | masatoi/clgp | utils.lisp | (defpackage #:clgp/core/utils
(:use #:cl)
(:import-from #:alexandria
#:symbolicate)
(:export #:missing
#:supplied-p
#:define-typed-function
#:random-string))
(in-package #:clgp/core/utils)
(defmacro eval-when-always (&body body)
`(eval-when (:compile-toplevel :l... | null | https://raw.githubusercontent.com/masatoi/clgp/54b145d3dfbe56a7d530bbe728a186663ea0ec82/core/utils.lisp | lisp | (defpackage #:clgp/core/utils
(:use #:cl)
(:import-from #:alexandria
#:symbolicate)
(:export #:missing
#:supplied-p
#:define-typed-function
#:random-string))
(in-package #:clgp/core/utils)
(defmacro eval-when-always (&body body)
`(eval-when (:compile-toplevel :l... | |
c687842677aef2f1d3734b5583ad3975acc282340d94ececca20cabeb2e877a1 | fission-codes/fission | Types.hs | module Fission.CLI.Environment.Types (Env (..)) where
import Network.IPFS.CID.Types
import qualified Network.IPFS.Types as IPFS
import Fission.Prelude
import Fission.Error.Types
import Fission.User.Username.Types
import Web.DID.Types
-- | "Global" environm... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-cli/library/Fission/CLI/Environment/Types.hs | haskell | | "Global" environment
^ Passing through verbatim for ipfsignore
Server
Account
Releases | module Fission.CLI.Environment.Types (Env (..)) where
import Network.IPFS.CID.Types
import qualified Network.IPFS.Types as IPFS
import Fission.Prelude
import Fission.Error.Types
import Fission.User.Username.Types
import Web.DID.Types
data Env = Env
IPFS
... |
d1391bded699f87ed03ac6cc4d86e4cd39b121d98e669839bcc3b328a2bfb18a | jrh13/hol-light | feuerbach.ml | (* ========================================================================= *)
's theorem .
(* ========================================================================= *)
needs "Multivariate/convex.ml";;
(* ----------------------------------------------------... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/100/feuerbach.ml | ocaml | =========================================================================
=========================================================================
-------------------------------------------------------------------------
-------------------------------------------------------------------------
---------------... | 's theorem .
needs "Multivariate/convex.ml";;
Algebraic condition for two circles to be tangent to each other .
let CIRCLES_TANGENT = prove
(`!r1 r2 c1 c2.
&0 <= r1 /\ &0 <= r2 /\
(dist(c1,c2) = r1 + r2 \/ dist(c1,c2) = abs(r1 - r2... |
ab3445b50ebb42778faf6f6e3f729e56e6b2e83c6eb7e155efa1ace90e9fcfc2 | erlang/otp | beam_ssa_alias.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/erlang/otp/01723d597fb72ca087b690a15ab834d7339d53c7/lib/compiler/src/beam_ssa_alias.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(beam_ssa_alias).
-export([opt/2]).
-import(lists, [foldl/3, reverse/1, zip/2]).
-define(MAX_REPETITIONS, 16).
-... |
da0dac78f2b832603621f5e92fb833e5d2522935125f280c7d65b3705897c275 | Mayvenn/storefront | add.cljc | (ns checkout.add
(:require
#?@(:cljs [[storefront.accessors.auth :as auth]
[storefront.api :as api]
[storefront.history :as history]])
[api.catalog :refer [select ?addons ?discountable]]
api.orders
api.current
api.products
clojure.set
[storefront.component :as componen... | null | https://raw.githubusercontent.com/Mayvenn/storefront/843fd2931b620ab1504bdb0218fead895d5a7f57/src-cljc/checkout/add.cljc | clojure | GROT(SRV)
GROT(SRV)
GROT(SRV)
GROT(SRV)
GROT(SRV)
GROT(SRV) | (ns checkout.add
(:require
#?@(:cljs [[storefront.accessors.auth :as auth]
[storefront.api :as api]
[storefront.history :as history]])
[api.catalog :refer [select ?addons ?discountable]]
api.orders
api.current
api.products
clojure.set
[storefront.component :as componen... |
f28261c167a16cae0cee78929e0958675ec0d3677f39e2c4e6ef927b355ef0c2 | janestreet/command_rpc | command_rpc_test_protocol.ml | open! Core
open! Async
module Caller_implementations_rpcs = Caller_implementations_rpcs
module Rpc_logged_to_stderr = Rpc_logged_to_stderr
module Exit_zero_rpc = Exit_zero_rpc
module Heartbeat_pipe_rpc = Heartbeat_pipe_rpc
module Heartbeat_pipe_direct_rpc = Heartbeat_pipe_direct_rpc
module Heartbeat_state_rpc = Heartbe... | null | https://raw.githubusercontent.com/janestreet/command_rpc/ed71056e7a305f38e58a3235414d8709c60e9838/test/protocol/command_rpc_test_protocol.ml | ocaml | open! Core
open! Async
module Caller_implementations_rpcs = Caller_implementations_rpcs
module Rpc_logged_to_stderr = Rpc_logged_to_stderr
module Exit_zero_rpc = Exit_zero_rpc
module Heartbeat_pipe_rpc = Heartbeat_pipe_rpc
module Heartbeat_pipe_direct_rpc = Heartbeat_pipe_direct_rpc
module Heartbeat_state_rpc = Heartbe... | |
17d412e0727982a841a598c38add793a5bd1a90bd6f02c8ffe1b319e7ab67865 | DaMSL/K3 | Driver.hs | # LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
-- | Primary Driver for the K3 Ecosystem.
module Language.K3.Driver.Driver where
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Except
import Control.Monad.State
import Data.Char
import Data.Maybe
import Debug... | null | https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Driver/Driver.hs | haskell | | Primary Driver for the K3 Ecosystem.
| Stage-based transformation pipeline
| Driver printing helpers
| AST formatting.
| Evaluate any metaprograms present in a program.
| Program minimization.
| Compiler dispatch.
| KTrace dispatch
| Interpreter dispatch.
| Mode dispatch.
Typechecking dispatch.
^ Process ... | # LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Language.K3.Driver.Driver where
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Except
import Control.Monad.State
import Data.Char
import Data.Maybe
import Debug.Trace
import Criterion.Measurement
impor... |
8feec1009de774eb1da60211d4d1fc1482eafcf8b88591f9652e99e4aaa3efa0 | vouillon/osm | table.mli | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... | null | https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/database/table.mli | ocaml | ** | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... |
6679025cd20650f22fee3a491b4daaeec72c311b9b2d999b1e236ec49a7d19ad | RamV13/scrabble | httpServer.ml |
open Lwt
open Cohttp
open Cohttp_lwt_unix
type meth = Code.meth
type uri = Uri.t
type request = {
headers : Header.t;
params : (string * string) list;
req_body : string
}
type response = {
headers : Header.t;
stat... | null | https://raw.githubusercontent.com/RamV13/scrabble/07731680eaadf51c6b5cb3fc329056743f015215/server/httpServer.ml | ocaml |
open Lwt
open Cohttp
open Cohttp_lwt_unix
type meth = Code.meth
type uri = Uri.t
type request = {
headers : Header.t;
params : (string * string) list;
req_body : string
}
type response = {
headers : Header.t;
stat... | |
445a6dc7a39e6facd28755b5a3c0d9f5ab2fc8abf96e62d16a43bd9e2184c3db | tolitius/boot-check | html.clj | (ns tolitius.reporter.html
(:require [tolitius.core.reporting :as r]
[hiccup.core :refer :all]))
(defn- severity-style [severity]
(cond
(= severity "normal") "table-warning"
(= severity "severe") "table-danger"
:else ""))
(defn- report-header []
[:nav {:class "navbar navbar-expand-lg nav... | null | https://raw.githubusercontent.com/tolitius/boot-check/e9d766532e7e8d2a7c4e11ee016922789e35d6d2/src/tolitius/reporter/html.clj | clojure | (ns tolitius.reporter.html
(:require [tolitius.core.reporting :as r]
[hiccup.core :refer :all]))
(defn- severity-style [severity]
(cond
(= severity "normal") "table-warning"
(= severity "severe") "table-danger"
:else ""))
(defn- report-header []
[:nav {:class "navbar navbar-expand-lg nav... | |
efaced4d39c4c8c1b7520c21961f1b4556476dc11dd24fc8aef865ba9c39217e | polygonhell/Clash6502 | Decode.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Decode where
import CLaSH.Prelude
import CLaSH.Sized.Unsigned
import qualified Data.List as L
import Text.Printf | null | https://raw.githubusercontent.com/polygonhell/Clash6502/a684dd7bee153ebb43cfc26bd0f020bc08e9afd6/Decode.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Decode where
import CLaSH.Prelude
import CLaSH.Sized.Unsigned
import qualified Data.List as L
import Text.Printf | |
d93247b00c78c28f9ae5ec1dd5ac90cbd375323956bf0d234018fd2717e5042e | alanzplus/EOPL | a2-tests.rkt | #lang racket
(require rackunit "a2.rkt")
(require rackunit/text-ui)
(define a-list `((c . ,(box 15)) (e . ,(box 'f)) (b . ,(box 'c)) (a . ,(box 'b))))
(define tests
(test-suite "A2:"
(test-suite "list-ref"
(test-equal? "case1" (list-ref '(a b c) 2) 'c)
(test-equal? "case2" (lis... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/Indiana-CS311/a2-Free%2C%20Bound%2C%20and%20Lexical%20Address/a2-tests.rkt | racket | #lang racket
(require rackunit "a2.rkt")
(require rackunit/text-ui)
(define a-list `((c . ,(box 15)) (e . ,(box 'f)) (b . ,(box 'c)) (a . ,(box 'b))))
(define tests
(test-suite "A2:"
(test-suite "list-ref"
(test-equal? "case1" (list-ref '(a b c) 2) 'c)
(test-equal? "case2" (lis... | |
85d582a43a4384a74b982bb23e6c0499b72e68028751474862dcb9a299d4084f | ThoughtWorksInc/stonecutter | authorise_failure.clj | (ns stonecutter.test.view.authorise-failure
(:require [midje.sweet :refer :all]
[net.cgrand.enlive-html :as html]
[stonecutter.test.view.test-helpers :as th]
[stonecutter.view.authorise-failure :refer [show-authorise-failure]]
[stonecutter.translation :as t]
... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/test/view/authorise_failure.clj | clojure | (ns stonecutter.test.view.authorise-failure
(:require [midje.sweet :refer :all]
[net.cgrand.enlive-html :as html]
[stonecutter.test.view.test-helpers :as th]
[stonecutter.view.authorise-failure :refer [show-authorise-failure]]
[stonecutter.translation :as t]
... | |
603133d6a84831627d50d142ee5a263ccbc63f4a076b50319ace2a9feffbed80 | takikawa/racket-ppa | bind-top.rkt | #lang racket/base
(require "../syntax/syntax.rkt"
"../syntax/scope.rkt"
"root-expand-context.rkt"
"context.rkt"
"def-id.rkt"
"dup-check.rkt"
"use-site.rkt")
;; When compiling `(define-values (x) ...)` at the top level, we need
;; `x` to have a binding to give the d... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/expander/expand/bind-top.rkt | racket | When compiling `(define-values (x) ...)` at the top level, we need
`x` to have a binding to give the definition an expand-time meaning.
We don't want that binding to take effect outside of evaluation,
however; the permanent binding should happen when the
`define-values` for is evaluated. So, we use a distinct scop... | #lang racket/base
(require "../syntax/syntax.rkt"
"../syntax/scope.rkt"
"root-expand-context.rkt"
"context.rkt"
"def-id.rkt"
"dup-check.rkt"
"use-site.rkt")
(provide as-expand-time-top-level-bindings)
(define (as-expand-time-top-level-bindings ids s ctx)
(defin... |
5cd83f46e8b7f075fe20a70257252e6634c56bf1d873cd07becea113cefc4981 | TyOverby/mono | expert_intf.ml | open! Core
open! Import
module type S = sig
module Theme : T
module type S = sig
class t :
object
method background_color : string
method foreground_color : string
method button : string -> on_click:unit Effect.t -> Vdom.Node.t
end
end
val default_theme : Theme.t
val... | null | https://raw.githubusercontent.com/TyOverby/mono/ea7c54c2223fb89685aa0ba8bc7ae770814d1ea7/lib/view_prototype/src/expert_intf.ml | ocaml | open! Core
open! Import
module type S = sig
module Theme : T
module type S = sig
class t :
object
method background_color : string
method foreground_color : string
method button : string -> on_click:unit Effect.t -> Vdom.Node.t
end
end
val default_theme : Theme.t
val... | |
3306421a113dc2ef6db1a47b400dd3b8c09150f4ca21bea0a91ed99ea4e82adb | cac-t-u-s/om-sharp | interfacebox.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/80f9537368471d0e6e4accdc9fff01ed277b879e/src/visual-language/patch/interfacebox.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
(defclass OMInterfaceBox (OMBox) ())
(defmethod lock-state ((self OMInterfaceBox)) nil)
(defmethod box-symbol ((self OMInterfaceBox)) 'interface)
(defmethod get-properties-list ((self OMInterfaceBox))
(hide-property (call-next-method) '(:text-font :align :group-id)))
(defmet... |
22cb91b141907846cf52493ecc70ec5f2eb661bbe2161f44d5bb0580899a4197 | froggey/Mezzano | sync.lisp | ;;;; Syncronization primitives.
;;;;
;;;; This is the high-level side, expanding on what the supervisor provides.
(defpackage :mezzano.sync
(:use :cl)
(:local-nicknames (:sup :mezzano.supervisor))
(:import-from :mezzano.supervisor
#:wait-for-objects
#:get-object-event
... | null | https://raw.githubusercontent.com/froggey/Mezzano/8552452b83aad4460a8dbcb5a778b24bdb79c8b5/system/sync.lisp | lisp | Syncronization primitives.
This is the high-level side, expanding on what the supervisor provides.
No timeout.
Arbitrary timeout.
Public API:
Public API:
Messages pending.
This was the last message.
Messages pending.
Watchable set.
A set of objects that reports when objects are added or removed.
Public API... |
(defpackage :mezzano.sync
(:use :cl)
(:local-nicknames (:sup :mezzano.supervisor))
(:import-from :mezzano.supervisor
#:wait-for-objects
#:get-object-event
#:thread-pool-block)
(:export #:wait-for-objects
#:wait-for-objects-with-timeout
#:get... |
40a423947b81a3ca11f54e11c97ccdc238bf2ae0bce8bb42633a6150136bb79d | rabbitmq/rabbitmq-erlang-client | amqp_connection_sup.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
@private
-module(amqp_connection_sup).
-includ... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-erlang-client/2022e01c515d93ed1883e9e9e987be2e58fe15c9/src/amqp_connection_sup.erl | erlang |
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
--------------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
@private
-module(amqp_connection_sup).
-include("amq... |
90e19901dc1cb317ab398ab5110af7e772c6c90608bf03a5073ab953517654ec | bydriv/mhc | mhc.hs | MHC : Minimal Haskell Compiler © 2018 < >
--
-- MHC is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
-- MHC is distributed in... | null | https://raw.githubusercontent.com/bydriv/mhc/8d09a407cc069e1212f10bef16c4604a47192f51/tools/mhc.hs | haskell |
MHC is free software: you can redistribute it and/or modify
(at your option) any later version.
MHC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more ... | MHC : Minimal Haskell Compiler © 2018 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Main where
import qualified Control.Monad.Identity ... |
356073be6d715934664ac2097b6c5d3cb962e092ba0f29803d11ab0e0295a00d | icicle-lang/icicle-ambiata | Check.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Icicle.Core.Stream.Check (
checkStream
) where
import Icicle.Common.Type
import Icicle.Core.Exp
import Icicle.Core.Stream.Stream
import Icicle.Core.Stream.Error
import P
import... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-core/src/Icicle/Core/Stream/Check.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Icicle.Core.Stream.Check (
checkStream
) where
import Icicle.Common.Type
import Icicle.Core.Exp
import Icicle.Core.Stream.Stream
import Icicle.Core.Stream.Error
import P
import... | |
8816aa79fab8002e12bdd834f9a9d9ef248b97b2abedc921a7cdd988cf3685fb | newque/newque | message.mli | open Core
type t
val of_string_coll :
atomic:bool ->
string Collection.t ->
t
val of_string :
format:Http_format.t ->
mode:Mode.Write.t ->
splitter:Util.splitter ->
string ->
(t, string) Result.t
val of_stream :
format:Http_format.t ->
mode:Mode.Write.t ->
splitter:Util.splitter ->
buffer_si... | null | https://raw.githubusercontent.com/newque/newque/dee73e2cb7be8700847f9e5cf900731cc20b1b8c/src/serialization/message.mli | ocaml | open Core
type t
val of_string_coll :
atomic:bool ->
string Collection.t ->
t
val of_string :
format:Http_format.t ->
mode:Mode.Write.t ->
splitter:Util.splitter ->
string ->
(t, string) Result.t
val of_stream :
format:Http_format.t ->
mode:Mode.Write.t ->
splitter:Util.splitter ->
buffer_si... | |
ce10a7dc19fb70c4ec380855c814d2e32f58331bab63f174c9c20366c2593397 | maoe/lifted-async | RegressionTests.hs | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE TemplateHaskell #
import Control.Monad (when, void)
import Data.Function (fix)
import Data.IORef
import Foreign.C.Types (CUInt(..))
import Control.Concurrent.Async.Lifted
import Test.Tasty.TH
import Test.Tasty.HUnit
main :: IO ()
main = $defaultMainGenerator
-- -asyn... | null | https://raw.githubusercontent.com/maoe/lifted-async/922f5469acb09d66e4dbb996167f963cc811d52a/tests/RegressionTests.hs | haskell | -async/issues/1 | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE TemplateHaskell #
import Control.Monad (when, void)
import Data.Function (fix)
import Data.IORef
import Foreign.C.Types (CUInt(..))
import Control.Concurrent.Async.Lifted
import Test.Tasty.TH
import Test.Tasty.HUnit
main :: IO ()
main = $defaultMainGenerator
case_iss... |
129a2d9ce21c5d5d52a035ffea6445acc24701caa1c7a80ac808c3e2c5a6b468 | Yuras/pdf-toolbox | GlyphList.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Mapping from glyph names to unicode characters
module Pdf.Content.GlyphList
(
adobeGlyphList
)
where
import Data.ByteString (ByteString)
import Data.Map (Map)
import qualified Data.Map as Map
-- | Glyph list
adobeGlyphList :: Map ByteString Char
adobeGlyphList = Map.fromL... | null | https://raw.githubusercontent.com/Yuras/pdf-toolbox/f1d20479fe6782bc293468ac05186e658216388b/content/lib/Pdf/Content/GlyphList.hs | haskell | # LANGUAGE OverloadedStrings #
| Mapping from glyph names to unicode characters
| Glyph list |
module Pdf.Content.GlyphList
(
adobeGlyphList
)
where
import Data.ByteString (ByteString)
import Data.Map (Map)
import qualified Data.Map as Map
adobeGlyphList :: Map ByteString Char
adobeGlyphList = Map.fromList
[("A", '\x0041')
,("AE", '\x00C6')
,("AEacute", '\x01FC')
,("AEmacron", '\x01E2')
,("AEsm... |
ec96d56d2a05b46b18afa2a2e781fcc0625189d37c97610f352c725a4d2f89ec | larcenists/larceny | destruc.scm | ;;; DESTRUC -- Destructive operation benchmark.
(import (scheme base)
(scheme read)
(scheme write)
(scheme time))
(define (append-to-tail! x y)
(if (null? x)
y
(let loop ((a x) (b (cdr x)))
(if (null? b)
(begin
(set-cdr! a y)
x)
(loop b (cdr ... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/destruc.scm | scheme | DESTRUC -- Destructive operation benchmark. |
(import (scheme base)
(scheme read)
(scheme write)
(scheme time))
(define (append-to-tail! x y)
(if (null? x)
y
(let loop ((a x) (b (cdr x)))
(if (null? b)
(begin
(set-cdr! a y)
x)
(loop b (cdr b))))))
(define (destructive n m)
(let ((l (d... |
becf959788b1b1895eb9c4c0bdaeb1d9bad05fabad3e637f021654203a93a38c | braidchat/braid | seed.clj | (ns braid.chat.seed
(:require
[braid.lib.uuid :as uuid]
[braid.chat.db.group :as group]
[braid.chat.db.tag :as tag]
[braid.chat.db.user :as user]
[braid.base.server.cqrs :as cqrs]
[braid.core.server.db :as db]
[taoensso.timbre :as timbre]))
(def groups
[{:group/id (uuid/squuid)
:gro... | null | https://raw.githubusercontent.com/braidchat/braid/7d6efd6014ac095b656b3097e3d27cef0b89a970/src/braid/chat/seed.clj | clojure | thread 0 | (ns braid.chat.seed
(:require
[braid.lib.uuid :as uuid]
[braid.chat.db.group :as group]
[braid.chat.db.tag :as tag]
[braid.chat.db.user :as user]
[braid.base.server.cqrs :as cqrs]
[braid.core.server.db :as db]
[taoensso.timbre :as timbre]))
(def groups
[{:group/id (uuid/squuid)
:gro... |
20ded669cdb33f72c3567a1c0af67bcec88781e5437c0a0cc7b5e792ccdd2371 | tarides/opam-monorepo | test_parallel.ml | let test_parallel =
let make_test ~name ~input ~f ~expected () =
let test_name = Printf.sprintf "map: %s" name in
let test_fun () =
let actual = Duniverse_lib.Parallel.map ~f input in
Alcotest.(check (slist int ( - ))) test_name expected actual
in
(test_name, `Quick, test_fun)
in
let i... | null | https://raw.githubusercontent.com/tarides/opam-monorepo/9262e7f71d749520b7e046fbd90a4732a43866e9/test/lib/test_parallel.ml | ocaml | let test_parallel =
let make_test ~name ~input ~f ~expected () =
let test_name = Printf.sprintf "map: %s" name in
let test_fun () =
let actual = Duniverse_lib.Parallel.map ~f input in
Alcotest.(check (slist int ( - ))) test_name expected actual
in
(test_name, `Quick, test_fun)
in
let i... | |
10c9b85dcd5529d08a76c6689321422b51d905f497fb6fd3754e0c9dc041f37c | huangz1990/SICP-answers | 73-tag.scm | ;;; 73-tag.scm
(define (attach-tag type-tag x y)
(list type-tag x y))
(define (type-tag datumn)
(car datumn))
(define (contents datumn)
(cdr datumn))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/73-tag.scm | scheme | 73-tag.scm |
(define (attach-tag type-tag x y)
(list type-tag x y))
(define (type-tag datumn)
(car datumn))
(define (contents datumn)
(cdr datumn))
|
dd766d2b1f8e4b0262997e3493fb07b621995bdb93dcb0d668c1316f46c8e665 | clj-kondo/clj-kondo | rum.clj | (ns hooks.rum
(:require [clj-kondo.hooks-api :as api]))
(defn f [{:keys [:node]}]
(let [args (rest (:children node))
component-name (first args)
args (next args)
body
(loop [args* args
mixins []]
(if (seq args*)
(let [a (first args*)]
... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/.clj-kondo/hooks/rum.clj | clojure | (prn (meta sexpr))
(prn expr) | (ns hooks.rum
(:require [clj-kondo.hooks-api :as api]))
(defn f [{:keys [:node]}]
(let [args (rest (:children node))
component-name (first args)
args (next args)
body
(loop [args* args
mixins []]
(if (seq args*)
(let [a (first args*)]
... |
13bec2d38e905773b500ce8e8640ffe8abcbe782347bd29098cbc27e654e40fa | ocaml-batteries-team/batteries-included | batConcreteQueue_403.ml | [@@@warning "-37"]
Disable warning 37 ( Unused constructor ):
Cons is never used to build values ,
but it is used implicitly in [ of_abstr ]
Cons is never used to build values,
but it is used implicitly in [of_abstr] *)
type 'a cell =
| Nil
| Cons of { content: 'a; mutable next: 'a cell }
type '... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/e39846091efc66f054ea82370e40fb75d6aa2255/src/batConcreteQueue_403.ml | ocaml | find_next returns the next 'true' cell, or Nil
last is the last known 'true' Cons cell
(may be Nil if no true cell has be found yet)
next is the next candidate true cell
(may be Nil if there is no next cell) | [@@@warning "-37"]
Disable warning 37 ( Unused constructor ):
Cons is never used to build values ,
but it is used implicitly in [ of_abstr ]
Cons is never used to build values,
but it is used implicitly in [of_abstr] *)
type 'a cell =
| Nil
| Cons of { content: 'a; mutable next: 'a cell }
type '... |
45038552aa5de5f90ea04475d6c6451bc5d8f6f4e1a4668f354ee6ece7ceadfe | lowasser/TrieMap | Base.hs | # LANGUAGE CPP , UnboxedTuples , MagicHash , NamedFieldPuns , BangPatterns , TypeFamilies , StandaloneDeriving , MultiParamTypeClasses #
# LANGUAGE GeneralizedNewtypeDeriving , TypeSynonymInstances , FlexibleInstances #
{-# OPTIONS -funbox-strict-fields #-}
module Data.TrieMap.OrdMap.Base (
module Data.TrieMap.Trie... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/OrdMap/Base.hs | haskell | # OPTIONS -funbox-strict-fields #
insertMin and insertMax don't perform potentially expensive comparisons.
-----------------------------------------------------------------
-----------------------------------------------------------------
------------------------------------------------------------------}
-----------... | # LANGUAGE CPP , UnboxedTuples , MagicHash , NamedFieldPuns , BangPatterns , TypeFamilies , StandaloneDeriving , MultiParamTypeClasses #
# LANGUAGE GeneralizedNewtypeDeriving , TypeSynonymInstances , FlexibleInstances #
module Data.TrieMap.OrdMap.Base (
module Data.TrieMap.TrieKey,
module Data.TrieMap.OrdMap.Ba... |
01612ae5ae0387965d7e5bfd6d3af450e07808148d4a8918cf55bedf18f313a5 | weyrick/roadsend-php | lexers.scm | ;; ***** BEGIN LICENSE BLOCK *****
;; Roadsend PHP Compiler
Copyright ( C ) 2007 - 2008 Roadsend , Inc.
;;
;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License ,... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/compiler/lexers.scm | scheme | ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright ( C ) 2007 - 2008 Roadsend , Inc.
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301... |
5efe81b3bb43cf2e4f96753a91f9d75b33b1bb2496054a0a6ff97c4964990d17 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415170245.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170245.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
af65175bc441a4895337260c9d7fa3f3190e5added29f88873b437694eb914a7 | PLTools/GT | test813htmlTy.ml | (* generating HTML5 with TyXML is not repaired *)
open Html_tyxml_api
type t = { a : int ; b : string }
[ @@deriving gt ~options:{html } ]
type ' a t2 = A of int | C of ' a * int
[ @@deriving gt ~options:{html } ]
type t3 = D of t | E of int t2
[ @@deriving gt ~options:{html } ]
type t4 = int t2
[... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test813htmlTy.ml | ocaml | generating HTML5 with TyXML is not repaired |
open Html_tyxml_api
type t = { a : int ; b : string }
[ @@deriving gt ~options:{html } ]
type ' a t2 = A of int | C of ' a * int
[ @@deriving gt ~options:{html } ]
type t3 = D of t | E of int t2
[ @@deriving gt ~options:{html } ]
type t4 = int t2
[ @@deriving gt ~options:{html } ]
let ( ) =
... |
a9966d114f6e418409b4553887b650eb3ed1c5df2b44ba085075182da21190d5 | 2600hz/kazoo | pqc_cb_media.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
%%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_media.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
API requests
take :port/v2/... and get /v2/.../{regex} | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(pqc_cb_media).
-export([summary/2
,create/3
,fetch/3, fetch/4
,fetch_... |
e458d1cf34400608588d04f3dace416b806c80136a7fdc868ed3429cf3b1ade8 | Datomic/dev.datafy | clojure.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in wri... | null | https://raw.githubusercontent.com/Datomic/dev.datafy/67a0923c3e0492503a44672b5bf74a9b35e0e46f/src/datomic/dev/datafy/clojure.clj | clojure | All rights reserved.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific... | Copyright ( c ) Cognitect , Inc.
distributed under the License is distributed on an " AS - IS " BASIS ,
(ns datomic.dev.datafy.clojure
(:require
[clojure.core.protocols :as p]
[clojure.string :as str])
(:import [java.lang.reflect Field]))
(set! *warn-on-reflection* true)
(defn- reify-impl-detail-name
... |
420b098e11875361dc0a58f420bd5785a390611e283766243f19ed227fa4b3b9 | lukaszkorecki/taskmaster | operation.clj | (ns taskmaster.operation
(:require
[clojure.tools.logging :as log]
[utility-belt.sql.conv]
[utility-belt.sql.helpers :as sql]
;; load coercions
[utility-belt.sql.model :as model])
(:import
(com.zaxxer.hikari
HikariDataSource)
(com.zaxxer.hikari.pool
HikariProxyConnection)
(org.postgr... | null | https://raw.githubusercontent.com/lukaszkorecki/taskmaster/f8803e2cb4e093d4148316787285a8c53eae7e5f/src/taskmaster/operation.clj | clojure | load coercions
noop | (ns taskmaster.operation
(:require
[clojure.tools.logging :as log]
[utility-belt.sql.conv]
[utility-belt.sql.helpers :as sql]
[utility-belt.sql.model :as model])
(:import
(com.zaxxer.hikari
HikariDataSource)
(com.zaxxer.hikari.pool
HikariProxyConnection)
(org.postgresql
PGConnection... |
4d2eaeade52df699f56867f6dd37506541d6d2b4ed3e512954e7d8fe2d176860 | m-n/repl-utilities | package.lisp | package.lisp
(defpackage :repl-utilities
(:use :cl)
(:export
#:dev
#:*dev-hooks*
#:bring
#:*bring-hooks*
#:print-hash
#:doc
#:trace-package
#:deflex
#:lex
#:readme
#:summary
#:package-apropos
#-(or clisp ccl) ;; causes a symbol conflict
#:arglist
#:de
#:nic
#:de... | null | https://raw.githubusercontent.com/m-n/repl-utilities/7e300df663177ea4581f4e7e9c601377881dd986/package.lisp | lisp | causes a symbol conflict | package.lisp
(defpackage :repl-utilities
(:use :cl)
(:export
#:dev
#:*dev-hooks*
#:bring
#:*bring-hooks*
#:print-hash
#:doc
#:trace-package
#:deflex
#:lex
#:readme
#:summary
#:package-apropos
#:arglist
#:de
#:nic
#:dependency-locations
#:dbgv
#:repeatably
... |
e78fa53d03662eac205f176049f3dc3dfe479fa97d6af515042ad9e77c2bc154 | dym/movitz | special-operators-cl.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
;;;;
;;;; Filename: special-operators-cl.lisp
;;;; Description: Special operators in the COMMON-LISP package.
Author : ... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/special-operators-cl.lisp | lisp | ------------------------------------------------------------------
Filename: special-operators-cl.lisp
Description: Special operators in the COMMON-LISP package.
Distribution: See the accompanying file COPYING.
------------------------------------------------------------... | Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
Author : < >
Created at : Fri Nov 24 16:31:11 2000
$ I d : special - operators - cl.lisp , v 1.55 2008 - 07 - 09 19:57:02 Exp $
(in-package movitz)
(define-special-operator progn (&all all &fo... |
ce2785af729f01a80a7e165abcc15796bfa65da76d15f4a09a45d02cdf69654a | oklm-wsh/MrMime | mimeVersion.ml | type version = Rfc2045.version
type field = [ `MimeVersion of version ]
let pp = Format.fprintf
let pp fmt (a, b) =
pp fmt "(%d, %d)" a b
let default = (1, 0)
module Encoder =
struct
open Encoder
let w_version (a, b) =
let open Wrap in
hovbox 0
$ string (string_of_int a)
$ close_box
$ s... | null | https://raw.githubusercontent.com/oklm-wsh/MrMime/4d2a9dc75905927a092c0424cff7462e2b26bb96/lib/mimeVersion.ml | ocaml | type version = Rfc2045.version
type field = [ `MimeVersion of version ]
let pp = Format.fprintf
let pp fmt (a, b) =
pp fmt "(%d, %d)" a b
let default = (1, 0)
module Encoder =
struct
open Encoder
let w_version (a, b) =
let open Wrap in
hovbox 0
$ string (string_of_int a)
$ close_box
$ s... | |
5e642457dca86d2a3942b89935631d2e0e12af2cae8ef1843a1a368e120d539e | thi-ng/thingybot | core.clj | (ns thingybot.core
(:require
[thingybot.config :as config]
[thingybot.twitter :as twitter]
[thingybot.modules.lsys.core :as lsys]
[thingybot.modules.usage.core :as usage]
[thi.ng.strf.core :as f]
[environ.core :refer [env]]
[clojure.core.async :as async :refer [go-loop chan <! close! alts! timeou... | null | https://raw.githubusercontent.com/thi-ng/thingybot/37eafbaa870ad7bacb235c84f6a00faa25f4eed2/src/thingybot/core.clj | clojure | (ns thingybot.core
(:require
[thingybot.config :as config]
[thingybot.twitter :as twitter]
[thingybot.modules.lsys.core :as lsys]
[thingybot.modules.usage.core :as usage]
[thi.ng.strf.core :as f]
[environ.core :refer [env]]
[clojure.core.async :as async :refer [go-loop chan <! close! alts! timeou... | |
8ff120bf360abf5350ad57fb22df4ee70e8ffee1db1ce82622240b1fbbabcc27 | opencog/opencog | filter-#10.scm | ;; anaphor is "it"
;; antecedent is "plural"
;; Examples:
;; "There are some apples in the corner. It is beautiful."
;; "It" should not refer to "apples"
(define filter-#10
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$word-inst-antecedent")
(Type... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/filters/filter-%2310.scm | scheme | anaphor is "it"
antecedent is "plural"
Examples:
"There are some apples in the corner. It is beautiful."
"It" should not refer to "apples"
filter |
(define filter-#10
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$word-inst-antecedent")
(TypeNode "WordInstanceNode")
)
(TypedVariableLink
(VariableNode "$word-inst-anaphor")
(TypeNode "WordI... |
136ac000f6974e6eb1eeb91abcdb2c5048237e190f555506434c576fb7c1e1cb | ChaosEternal/guile-scsh | here-strings.scm | ;;; Python style here-string support for guile.
by
modified by Chaos Eternal to be integrated in guile - scsh
Licensed under or later .
;;; Usage: just put (use-module (scsh here-strings)) in the beginning of your code.
;;; Block starts with #""", ends with """ and no escape sequences apply.
;;; for example... | null | https://raw.githubusercontent.com/ChaosEternal/guile-scsh/1a76e006e193a6a8c9f93d23bacb9e51a1ff6c4c/scsh/here-strings.scm | scheme | Python style here-string support for guile.
Usage: just put (use-module (scsh here-strings)) in the beginning of your code.
Block starts with #""", ends with """ and no escape sequences apply.
for example:
(run (cat ) (<< #"""
here strings
with " " and
"""))
(define (read-here-string c port)
(unless (a... | by
modified by Chaos Eternal to be integrated in guile - scsh
Licensed under or later .
(define-module (scsh here-strings)
#:use-module (ice-9 match))
(define (read-here-string c port)
(unless (and (char=? #\" (read-char port))
(char=? #\" (read-char port)))
(error "Invalid here-s... |
41930e9673574ca8e6ca5bcf9a24731467742f139a91d9aefdc5a49e196427cd | takahisa/finale | iso_partial.mli |
* Copyright ( c ) 2017 - 2018 < > All rights reserved .
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to deal
* in the Software without restriction , including without limitation the right... | null | https://raw.githubusercontent.com/takahisa/finale/8571cc152cc3d88be1d0be1c62112b4b960a9410/lib/iso_partial.mli | ocaml |
* Copyright ( c ) 2017 - 2018 < > All rights reserved .
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to deal
* in the Software without restriction , including without limitation the right... | |
1b76803d2f85658d91941bc100290d016beaa6d07fe406ff5449de9e30eb06c1 | karamellpelle/grid | MEnv.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/MEnv/MEnv.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
# LANGUAGE GeneralizedNewtypeDeriving , MultiParamT... |
aaab9621794f8f6713b78acb97ece5e849b08fea023017c71a872268616df0d1 | SimulaVR/godot-haskell | CSGCylinder.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.CSGCylinder
(Godot.Core.CSGCylinder.get_height,
... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/CSGCylinder.hs | haskell | # NOINLINE bindCSGCylinder_set_height # | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.CSGCylinder
(Godot.Core.CSGCylinder.get_height,
... |
2df42fc83223759525320f80094279b2f372529537ebfc2dce2f16f347724723 | Hexstream/trivial-jumptables | vectorize.lisp | (in-package #:trivial-jumptables)
(defvar jumpcase:*environment* nil)
(defparameter jumpcase:*vectorize* #-ccl t #+ccl nil)
(defparameter jumpcase:*vectorization-threshold* 2/3)
(defun jumpcase:standard-vectorization-threshold (case-count)
(let ((threshold jumpcase:*vectorization-threshold*))
(check-type thre... | null | https://raw.githubusercontent.com/Hexstream/trivial-jumptables/f12fbda4d3622c63d0d7b58b90e7bfe77116a309/vectorize.lisp | lisp | (in-package #:trivial-jumptables)
(defvar jumpcase:*environment* nil)
(defparameter jumpcase:*vectorize* #-ccl t #+ccl nil)
(defparameter jumpcase:*vectorization-threshold* 2/3)
(defun jumpcase:standard-vectorization-threshold (case-count)
(let ((threshold jumpcase:*vectorization-threshold*))
(check-type thre... | |
f4de6618fbc0fb8cc47f50ff14fdc9f5cd4675b3bebfc37599fec5f182ebfd95 | blambo/accelerate-repa | Fold.hs | import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Repa as Repa
main :: IO ()
main = do
putStrLn $ Repa.run $ Acc.fold (\x y -> x) 1 $ use $ fromList (Z:.(1::Int)) [3::Int]
| null | https://raw.githubusercontent.com/blambo/accelerate-repa/5ea4d40ebcca50d5b952e8783a56749cea4431a4/examples/Fold.hs | haskell | import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Repa as Repa
main :: IO ()
main = do
putStrLn $ Repa.run $ Acc.fold (\x y -> x) 1 $ use $ fromList (Z:.(1::Int)) [3::Int]
| |
11c39294a105c7c129e413e41d384442addc80f0aab33c7d9cf177d81cadb71f | tek/polysemy-hasql | Update.hs | module Polysemy.Hasql.Table.Query.Update where
import Exon (exon)
import Hasql.DynamicStatements.Snippet (Snippet, encoderAndParam, sql)
import Polysemy.Db.Data.Partial (PartialFor)
import qualified Polysemy.Db.Data.PartialField as PartialField
import Polysemy.Db.Data.PartialField (PartialField)
import Polysemy.Db.Dat... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/2bdfb5c4a0c15b66a33412e24c1668efa7e66e08/packages/hasql/lib/Polysemy/Hasql/Table/Query/Update.hs | haskell | module Polysemy.Hasql.Table.Query.Update where
import Exon (exon)
import Hasql.DynamicStatements.Snippet (Snippet, encoderAndParam, sql)
import Polysemy.Db.Data.Partial (PartialFor)
import qualified Polysemy.Db.Data.PartialField as PartialField
import Polysemy.Db.Data.PartialField (PartialField)
import Polysemy.Db.Dat... | |
08fc5fb724b6bf7d1a2c566c46a52f9f277adf908340e84ca47e55df5610535e | BekaValentine/SimpleFP | Parser.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeSynonymInstances #-}
module Quasiquote.Core.Parser where
import System.IO.Unsafe
import Control.Applicative ((<$>),(<*>),(*>),(<*))
import Control.Monad.Reader
import Data.List (foldl')
import Text.Parsec
import qualified Text.Parsec.To... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP/3cff456be9f0b99509e5cbe809be1055009b32df/src/Quasiquote/Core/Parser.hs | haskell | # LANGUAGE TypeSynonymInstances #
Language Definition
names
open settings
term parsers
program parsers | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Quasiquote.Core.Parser where
import System.IO.Unsafe
import Control.Applicative ((<$>),(<*>),(*>),(<*))
import Control.Monad.Reader
import Data.List (foldl')
import Text.Parsec
import qualified Text.Parsec.Token as Token
import Abs
import Plicit... |
42483ca48287e9825af072c12d77cfee115272747a4b16f6f5c008bfc06568d0 | dwayne/haskell-programming | numberish.hs | module Numberish where
class Numberish a where
fromNumber :: Integer -> a
toNumber :: a -> Integer
defaultNumber :: a
newtype Age = Age Integer deriving (Eq, Show)
instance Numberish Age where
fromNumber n = Age n
toNumber (Age n) = n
defaultNumber = Age 65
newtype Year = Year Integer deriving (Eq, Show... | null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch6/numberish.hs | haskell | module Numberish where
class Numberish a where
fromNumber :: Integer -> a
toNumber :: a -> Integer
defaultNumber :: a
newtype Age = Age Integer deriving (Eq, Show)
instance Numberish Age where
fromNumber n = Age n
toNumber (Age n) = n
defaultNumber = Age 65
newtype Year = Year Integer deriving (Eq, Show... | |
c17017944cd6fdb2cf9ee5648d16922ebccf4ff0f9e513e156727dd7da446eeb | yariv/twoorl | navbar_controller.erl | This file is part of Twoorl .
%%
%% Twoorl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later version.
%%
%% Twoorl is distributed in the ho... | null | https://raw.githubusercontent.com/yariv/twoorl/77b6bea2e29283d09a95d8db131b916e16d2960b/src/components/navbar_controller.erl | erlang |
Twoorl is free software: you can redistribute it and/or modify
(at your option) any later version.
Twoorl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License f... | This file is part of Twoorl .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
along with . If not , see < / > .
Copyright , 2008
@author < > [ ... |
1e41825329e00e73b4a5c79ddbaa6f36bbe0d40f5e0d90527d87aeb7b3d1bda9 | nomasystems/npqueue | npqueue_router.erl | Copyright 2022 Nomasystems , S.L.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distri... | null | https://raw.githubusercontent.com/nomasystems/npqueue/503aebe934db9c307bdf760b61e66026f3f5fec0/src/npqueue_router.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2022 Nomasystems , S.L.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(npqueue_router).
-export([in/2, in/3]).
in(QueueName, Item) ->
in(QueueName, Item, fun default_partition_selector/2).
in(... |
dbcc0325f2cdcfb990b0700b035bdcb5530c5ec6bb7571c37d24c0ea94484e05 | astrada/ocaml-extjs | ext_ElementLoader.mli | * A class used to load remote content to an Element . ...
{ % < p > A class used to load remote content to an Element . Sample usage:</p >
< pre><code><a href="#!/api / Ext - method - get " rel="Ext - method - get " class="docClass">Ext.get</a>('el').load(\ {
url : ' myPage.php ' ,
scripts : true ... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_ElementLoader.mli | ocaml | * {% <p>Destroys the loader. Any active requests will be aborted.</p> %}
* {% <p>Returns the target of this loader.</p> %}
{b Returns}:
{ul {- [#Ext_Component.t Js.t]
{% <p>The target or null if none exists.</p> %}
}
}
* {% <p>Any additional options to be passed to the request, for ex... | * A class used to load remote content to an Element . ...
{ % < p > A class used to load remote content to an Element . Sample usage:</p >
< pre><code><a href="#!/api / Ext - method - get " rel="Ext - method - get " class="docClass">Ext.get</a>('el').load(\ {
url : ' myPage.php ' ,
scripts : true ... |
860bcf2220c03212ba74fd598c862f0cbf76594dda79fe5cb042752a4a349dea | haskell-servant/servant | HoistClientSpec.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANG... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant-client/test/Servant/HoistClientSpec.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -freduction - depth=100 #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Se... |
919823a293d77e1d3d03634974e33b9aeb42b33c98faaaee85683350097e5dcb | pyr/jcipher | main.clj | (ns jcipher.main
(:require [jcipher.pbe :as pbe]
[jcipher.b64 :as b64]
[clojure.tools.cli :refer [cli]])
(:gen-class))
(defn encrypt
[key input]
(b64/encode (pbe/encrypt key input)))
(defn decrypt
[key input]
(String. (pbe/decrypt key (b64/decode input)) "UTF-8"))
(def... | null | https://raw.githubusercontent.com/pyr/jcipher/d78061a4a975f2587d5f6669b14bd5f367010dd4/src/jcipher/main.clj | clojure | (ns jcipher.main
(:require [jcipher.pbe :as pbe]
[jcipher.b64 :as b64]
[clojure.tools.cli :refer [cli]])
(:gen-class))
(defn encrypt
[key input]
(b64/encode (pbe/encrypt key input)))
(defn decrypt
[key input]
(String. (pbe/decrypt key (b64/decode input)) "UTF-8"))
(def... | |
6d0989fbc76ff0bf2830bb329a13f6a6156ca7439be39e13285cb9a36626de35 | GillianPlatform/Gillian | Expr.ml | open Names
(** GIL Expressions *)
type t = TypeDef__.expr =
| Lit of Literal.t (** GIL literals *)
| PVar of string (** GIL program variables *)
| LVar of LVar.t (** GIL logical variables *)
| ALoc of string (** GIL abstract locations *)
| UnOp of UnOp.t * t (** Unary operators *)
... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/eaa028aaed7414c216b04ee25e0332dbc3d3cf8b/GillianCore/GIL_Syntax/Expr.ml | ocaml | * GIL Expressions
* GIL literals
* GIL program variables
* GIL logical variables
* GIL abstract locations
* Unary operators
* Binary operators
* Sublist or (list, start, len)
* n-ary operators
* Lists of expressions
* Sets of expressions
* Map over expressions
Appl... | open Names
type t = TypeDef__.expr =
[@@deriving eq, ord]
let to_yojson = TypeDef__.expr_to_yojson
let of_yojson = TypeDef__.expr_of_yojson
* { 3 builders }
let lit x = Lit x
let num n = lit (Num n)
let num_int n = lit (Num (float_of_int n))
let int n = lit (Int (Z.of_int n))
let int_z z = lit (Int z)
let string s ... |
73c3e4c528d03026a7c718734ccaf5935cca6e1b9b9f443996b142296ccae0b6 | plumatic/grab-bag | queue_test.clj | (ns plumbing.queue-test
(:use plumbing.core clojure.test)
(:require [plumbing.queue :as queue]))
(defn priority [x y]
(> (:priority x)
(:priority y)))
(defn- basic-queue-test [q]
(queue/offer q "b")
(queue/offer q "a")
(is (= 2 (count q)))
(is (= (queue/peek q) "b"))
(is (= (queue/poll q) "b")))
... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/test/plumbing/queue_test.clj | clojure | (ns plumbing.queue-test
(:use plumbing.core clojure.test)
(:require [plumbing.queue :as queue]))
(defn priority [x y]
(> (:priority x)
(:priority y)))
(defn- basic-queue-test [q]
(queue/offer q "b")
(queue/offer q "a")
(is (= 2 (count q)))
(is (= (queue/peek q) "b"))
(is (= (queue/poll q) "b")))
... | |
47ae0d8191b5cda708710f9d7d9b87bce4a66af94ab9ba7d122aac8726c74e68 | ChrisPenner/rasa | ActionsSpec.hs | module Rasa.Internal.ActionsSpec where
import Test.Hspec
spec :: Spec
spec = return ()
| null | https://raw.githubusercontent.com/ChrisPenner/rasa/a2680324849088ee92f063fab091de21c4c2c086/rasa/test/Rasa/Internal/ActionsSpec.hs | haskell | module Rasa.Internal.ActionsSpec where
import Test.Hspec
spec :: Spec
spec = return ()
| |
f8c32c29dcdf80220e68764559ac91c9f3c4795d77a5819fe819d16efb357f95 | CRogers/obc | 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/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/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... |
82c41335b30184631038a9e1d41515ba95e83f891c32971e3d71e776611a8565 | carl-eastlund/mischief | memoize.rkt | #lang racket/base
(provide
memo-table?
make-memo-table
clear-memo-table!
memoize
call/memoize
memoize-procedure
lambda/memoize
case-lambda/memoize
define/memoize
let/memoize)
(require
(for-syntax
racket/base
racket/syntax
syntax/name
syntax/parse
mischief/parse)
racket/list... | null | https://raw.githubusercontent.com/carl-eastlund/mischief/ce58c3170240f12297e2f98475f53c9514225825/mischief/memoize.rkt | racket | Cache = (WeakHashEq Key (Value Key))
(Value final-key) = (Promise Any)
(Value Key) = (Ephemeron Key Cache) otherwise | #lang racket/base
(provide
memo-table?
make-memo-table
clear-memo-table!
memoize
call/memoize
memoize-procedure
lambda/memoize
case-lambda/memoize
define/memoize
let/memoize)
(require
(for-syntax
racket/base
racket/syntax
syntax/name
syntax/parse
mischief/parse)
racket/list... |
1bdbb4d12db30bd519d23632dea06fdd91ec0d2f8f7dd8a9c70ee99ee1532a6b | qiao/sicp-solutions | 2.60.scm | (define (element-of-set? x set)
(cond ((null? set) false)
((equal? x (car set)) true)
(else (element-of-set? x (cdr set)))))
(define (adjoin-set x set)
(cons x set))
(define (intersection-set set1 set2)
(cond ((or (null? set1) (null? set2)) '())
((element-of-set? (car set1) set2)
... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.60.scm | scheme | (define (element-of-set? x set)
(cond ((null? set) false)
((equal? x (car set)) true)
(else (element-of-set? x (cdr set)))))
(define (adjoin-set x set)
(cons x set))
(define (intersection-set set1 set2)
(cond ((or (null? set1) (null? set2)) '())
((element-of-set? (car set1) set2)
... | |
f653866590d71f2e00d159496c6973a13bec9e5f4faeebc5b1b5155fc85f542f | fossas/fossa-cli | DockerEngineApi.hs | {-# LANGUAGE GADTs #-}
module Control.Carrier.DockerEngineApi (runDockerEngineApi) where
import Conduit (runConduit, runResourceT, (.|))
import Control.Carrier.Diagnostics (errorBoundaryIO)
import Control.Carrier.Simple (Has, SimpleC, interpret)
import Control.Effect.Diagnostics (fatalText, fromMaybeText)
import Cont... | null | https://raw.githubusercontent.com/fossas/fossa-cli/af5f1c2c4043f6744fdf4afa8d2214b02ded6c2d/src/Control/Carrier/DockerEngineApi.hs | haskell | # LANGUAGE GADTs #
TODO: Replace it with docker inspect <image>, and docker save <image> -o <filepath>?
We should just use `docker` executable, having docker engine is nice and all
for full compatibility with other builder tools.but in practice, most users will be using docker executable.
| Exports Docker Image to... |
module Control.Carrier.DockerEngineApi (runDockerEngineApi) where
import Conduit (runConduit, runResourceT, (.|))
import Control.Carrier.Diagnostics (errorBoundaryIO)
import Control.Carrier.Simple (Has, SimpleC, interpret)
import Control.Effect.Diagnostics (fatalText, fromMaybeText)
import Control.Effect.Diagnostics ... |
88b78f5c4f9c89cd66524bd401bdca8b5910053708bd9ae692eb768570de0d77 | BinaryAnalysisPlatform/bap | bap_arch.mli | open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_common_types
val of_string : string -> arch option
val addr_size : arch -> addr_size
val endian : arch -> endian
val slot : (Theory.program, arch) KB.slot
val unit_slot : (Theory.Unit.cls, arch) KB.slot
include Regular.S with type t :... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/lib/bap_types/bap_arch.mli | ocaml | open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_common_types
val of_string : string -> arch option
val addr_size : arch -> addr_size
val endian : arch -> endian
val slot : (Theory.program, arch) KB.slot
val unit_slot : (Theory.Unit.cls, arch) KB.slot
include Regular.S with type t :... | |
7d253d70bb70e05c02fcc76cb015d27b158e7d4471ed2d5b236dda0c793ba236 | borgeby/jarl | bundle.clj | (ns jarl.bundle
(:require [clojure.string :as str]
[jarl.builtins.utils :as utils])
(:import (java.io File)
(java.io FileInputStream InputStream ByteArrayOutputStream)
(org.apache.commons.compress.archivers.tar TarArchiveInputStream TarArchiveEntry)
(org.apache.commons.c... | null | https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/main/clj/jarl/bundle.clj | clojure | (ns jarl.bundle
(:require [clojure.string :as str]
[jarl.builtins.utils :as utils])
(:import (java.io File)
(java.io FileInputStream InputStream ByteArrayOutputStream)
(org.apache.commons.compress.archivers.tar TarArchiveInputStream TarArchiveEntry)
(org.apache.commons.c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.