_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 |
|---|---|---|---|---|---|---|---|---|
ed5ac5287df1f4e4c29d58e19fe613da7e28a7ba097c7cbfacc0372792716520 | xguerin/ocaml-indexeddb | store.mli |
* Copyright ( c ) 2019 < >
* Copyright ( c ) 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWAR... | null | https://raw.githubusercontent.com/xguerin/ocaml-indexeddb/0560527b41f6741aa660c5b355ee94de928814c3/lib/store.mli | ocaml |
* Creation/deletion.
* Data operation.
* Iterators.
* Index.
* Creation/deletion.
* Data operations.
* Iterators.
|
* Copyright ( c ) 2019 < >
* Copyright ( c ) 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWAR... |
bf69808aef090e2630a99953c5c58b5b9559c74e146fd3e6a54746d1eaeb6e85 | Decentralized-Pictures/T4L3NT | test_sampling_code.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_benchmark/test/test_sampling_code.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
aedb1b6f32ba0b3954cfe5e04121daf605752105ef16b0a553ccc8e23e16d121 | pkaleta/kivi | CaseTransformer.hs | module CaseTransformer where
import Common
import Utils
import NameSupply
import ParserTypes
import Data.Char
defaultTag :: Int
defaultTag = -1
transformCase :: [DataType] -> Expr Pattern -> Expr Pattern
transformCase dts (EAp e1 e2) = EAp (transformCase dts e1) (transformCase dts e2)
transformCase dts (ELam args... | null | https://raw.githubusercontent.com/pkaleta/kivi/95d9a7c8023598c3ed634b9a7dbecaee3c6478fe/CaseTransformer.hs | haskell | case expressions, namely constructors and numbers. What is more they
cannot exist in single case expression because earlier stage - type
checking would prevent such situation. | module CaseTransformer where
import Common
import Utils
import NameSupply
import ParserTypes
import Data.Char
defaultTag :: Int
defaultTag = -1
transformCase :: [DataType] -> Expr Pattern -> Expr Pattern
transformCase dts (EAp e1 e2) = EAp (transformCase dts e1) (transformCase dts e2)
transformCase dts (ELam args... |
550b6005e47c21cc05f656b5172a91bb7e006d04d2760bacab301276d029012f | graninas/Hydra | Extra.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
module Hydra.Language.Extra where
import Hydra.Prelude
import qualified Hydra.Core.Language as L
import qualified Hydra.Domain as D
import qualified Hydra.Framework.Language as L
... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/src/Hydra/Language/Extra.hs | haskell | # LANGUAGE ScopedTypeVariables #
| Get existing SQL connection, or init a new connection.
TODO: rework it | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
module Hydra.Language.Extra where
import Hydra.Prelude
import qualified Hydra.Core.Language as L
import qualified Hydra.Domain as D
import qualified Hydra.Framework.Language as L
getOrInitSqlConn :: D.DBConfig beM -> ... |
f6fc81193b2cd5df007327a6130cce8a33116ad55a0aa8d349d38d7f1eda764f | clojurecup2014/parade-route | hydrate.clj | (ns unity.hydrate
(:require [unity.internal.map-utils :as mu]
[unity.reflect :as r]
[clojure.string :as string]
[clojure.set :as sets]
[clojure.edn :as edn]
clojure.walk
[clojure.clr.io :as io])
(:import UnityEditor.AssetDatabase
[Sy... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Libraries/unity/hydrate.clj | clojure | not sure this works
generate more if you feel it worth testing for
good enough for now
this is stupid
weirdly, you have to filter. looks redundant but you hit
something weird, see problematic_typesyms.edn
============================================================
==============================================... | (ns unity.hydrate
(:require [unity.internal.map-utils :as mu]
[unity.reflect :as r]
[clojure.string :as string]
[clojure.set :as sets]
[clojure.edn :as edn]
clojure.walk
[clojure.clr.io :as io])
(:import UnityEditor.AssetDatabase
[Sy... |
02a9b3098b2a908f52cf938460c42de456bc3ebb5822bbde0b3e3ac182ef57c0 | ldnclj/predators-and-prey | vectors.clj | (ns predators-and-prey.vectors)
(defn ortho [[x y]]
[(- y) x])
(defn add [[u v] [x y]]
[(+ u x) (+ v y)])
(defn sub [[u v] [x y]]
[(- u x) (- v y)])
(defn len [[x y]]
(Math/sqrt (+ (* x x) (* y y))))
(defn unit [[x y]]
[(/ x (vlen [x y]))
(/ y (vlen [x y]))])
(defn mul [a [x y]]
[(* a x) (* a y)])
| null | https://raw.githubusercontent.com/ldnclj/predators-and-prey/56cef14501beda07c4b72b760813a58e97afc9e2/src/predators_and_prey/vectors.clj | clojure | (ns predators-and-prey.vectors)
(defn ortho [[x y]]
[(- y) x])
(defn add [[u v] [x y]]
[(+ u x) (+ v y)])
(defn sub [[u v] [x y]]
[(- u x) (- v y)])
(defn len [[x y]]
(Math/sqrt (+ (* x x) (* y y))))
(defn unit [[x y]]
[(/ x (vlen [x y]))
(/ y (vlen [x y]))])
(defn mul [a [x y]]
[(* a x) (* a y)])
| |
58661e5b092a726c76c35e078b8997b3f0951e2580ba2b548dd78a4fc0dffe7f | AbstractMachinesLab/caramel | omd_backend.ml | (***********************************************************************)
omd : frontend in OCaml
( c ) 2013 by < >
(* Licence : ISC *)
(* -support-policy/isc-license/ *)
(*********************************... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/omd/src/omd_backend.ml | ocaml | *********************************************************************
Licence : ISC
-support-policy/isc-license/
*********************************************************************
Buffer.add_string b t;
Printf.bprintf b " %s='%s'" a a
else
HTML5
... | omd : frontend in OCaml
( c ) 2013 by < >
type code_stylist = lang:string -> string -> string
open Printf
open Omd_representation
open Omd_utils
let default_language = ref ""
let text_of_md md =
let b = Buffer.create 128 in
let rec loop = function
... |
4c74641606f0ac8b0abb5e15d34b19bbc84e109f6abd99a80c8952fa78aab128 | ftovagliari/ocamleditor | build_script_command.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/79669e14163420170e3e2ebb8da54ebe4e5a3dce/src/build_script_command.ml | ocaml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... | |
7c9a415160d9f69ec8077f59850115be03de08da961af08a952badbbab0ff520 | erlang/rebar3 | rebar_deps_SUITE.erl | -module(rebar_deps_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() -> [sub_app_deps, newly_added_dep, newly_added_after_empty_lock, no_deps_empty_lock,
http_proxy_settings, https_proxy_settings,
http_os_proxy_settings, https_o... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_deps_SUITE.erl | erlang | Create private rebar.config
Insert proxy variables into config
Create private rebar.config
Insert proxy variables into config
Add a bad value by default to show config overtakes default
Create private rebar.config
Insert proxy variables into os env, but not config
Create private rebar.config
Insert proxy varia... | -module(rebar_deps_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() -> [sub_app_deps, newly_added_dep, newly_added_after_empty_lock, no_deps_empty_lock,
http_proxy_settings, https_proxy_settings,
http_os_proxy_settings, https_o... |
c4dffd8dd2eaf0a62abe49c2fa161d8fdc6fb649fbfa07948437dc20be8af8e9 | kazu-yamamoto/quic | Integer.hs | # LANGUAGE BinaryLiterals #
module Network.QUIC.Types.Integer (
encodeInt
, encodeInt8
, encodeInt'
, encodeInt'2
, encodeInt'4
, decodeInt
, decodeInt'
) where
import Data.ByteString.Internal (unsafeCreate)
import Foreign.Ptr
import Foreign.Storable
import System.IO.Unsafe (unsafeDupablePerformIO)
... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/6e6543ad0db6ce3f88fde649bc733b80aa9da89a/Network/QUIC/Types/Integer.hs | haskell | $setup
>>> :set -XOverloadedStrings
--------------------------------------------------------------
|
"c2197c5eff14e88c"
"9d7f3e7d"
>>> enc16 $ encodeInt 15293
"7bbd"
>>> enc16 $ encodeInt 37
# INLINE go' #
--------------------------------------------------------------
|
>>> decodeInt (dec16 "c2197c5eff14e88c"... | # LANGUAGE BinaryLiterals #
module Network.QUIC.Types.Integer (
encodeInt
, encodeInt8
, encodeInt'
, encodeInt'2
, encodeInt'4
, decodeInt
, decodeInt'
) where
import Data.ByteString.Internal (unsafeCreate)
import Foreign.Ptr
import Foreign.Storable
import System.IO.Unsafe (unsafeDupablePerformIO)
... |
ef34f37289f967d0e2a553837a9dd7fca5cbc2f4b621ebf40cdefa92c4b41068 | jacquev6/General | Number.ml | #include "../Generated/Concepts/Number.ml"
module Tests = struct
include Tests_
module MakeExamples(M: Testable.S0)(E: Examples.S0 with type t := M.t) = struct
include E
let equalities = equalities @ [
[M.zero; M.of_int 0; M.of_float 0.; M.of_string "0"];
[M.one; M.of_int 1; M.of_float 1.; M.... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Concepts/Number.ml | ocaml | #include "../Generated/Concepts/Number.ml"
module Tests = struct
include Tests_
module MakeExamples(M: Testable.S0)(E: Examples.S0 with type t := M.t) = struct
include E
let equalities = equalities @ [
[M.zero; M.of_int 0; M.of_float 0.; M.of_string "0"];
[M.one; M.of_int 1; M.of_float 1.; M.... | |
abc47520ee974c4eb8615a21c188a8dcae9f2ff4c0b806782570ac0c1eb442f0 | BrianChevalier/radiant | core.cljc | (ns radiant.core
"Core functions for converting Clojure data to CSS"
(:require [clojure.string :as s]))
(defn- normalize-css-key
"Normalize css keyword to string"
[k]
(cond
(symbol? k) (name k)
(keyword? k) (name k)
(string? k) k))
(def accepts-unitless-values
;; There may be some missing.
... | null | https://raw.githubusercontent.com/BrianChevalier/radiant/673f6db5141afd244a1b2aef17b96b38271e4169/src/radiant/core.cljc | clojure | There may be some missing.
the content css property requires quotes around the value
Given a nested vector grid template area convert to string
with double quotes around each row specification.
vectors of selectors creates descendant selector
single selectors
Pseudo class selectors
Media queries
:style/keyfr... | (ns radiant.core
"Core functions for converting Clojure data to CSS"
(:require [clojure.string :as s]))
(defn- normalize-css-key
"Normalize css keyword to string"
[k]
(cond
(symbol? k) (name k)
(keyword? k) (name k)
(string? k) k))
(def accepts-unitless-values
#{:animation-iteration-count
... |
0739ee10c3312170d192bee06d3a149f98d1b6a2ce710deb870c3162139e904e | exercism/erlang | hello_world.erl | -module(hello_world).
-export([hello/0]).
hello() -> "Goodbye, Mars!".
| null | https://raw.githubusercontent.com/exercism/erlang/9b3d3c14ef826e7efbc4fcd024fd20ed09332562/exercises/practice/hello-world/src/hello_world.erl | erlang | -module(hello_world).
-export([hello/0]).
hello() -> "Goodbye, Mars!".
| |
d01c496afa1d818884d54a7c54a6b79139c4eb0166e52e53476686f3588e0965 | s-expressionists/Eclector | client.lisp | (cl:in-package #:eclector.reader.test)
(def-suite* :eclector.reader.client
:in :eclector.reader)
;;; Test customizing INTERPRET-SYMBOL
(defvar *mock-packages*)
(defclass mock-package ()
((%name :initarg :name
:reader name)
(%symbols :initarg :symbols
:reader %symbols
... | null | https://raw.githubusercontent.com/s-expressionists/Eclector/acd141db4efdbd88d57a8fe4f258ffc18cc47baa/test/reader/client.lisp | lisp | Test customizing INTERPRET-SYMBOL
Non-existent package
Keyword
COMMON-LISP package
User package
Test customizing FIND-CHARACTER
Errors
Single character
Multiple characters
Test customizing EVALUATE-EXPRESSION
Errors
No errors
Test customizing {CHECK,EVALUATE}-FEATURE-EXPRESSION
Errors
No errors
Test cus... | (cl:in-package #:eclector.reader.test)
(def-suite* :eclector.reader.client
:in :eclector.reader)
(defvar *mock-packages*)
(defclass mock-package ()
((%name :initarg :name
:reader name)
(%symbols :initarg :symbols
:reader %symbols
:initform (make-hash-table :tes... |
7aa94a651d3d5b0179c4cd99d06547e1f8b0604f8ee2ed8ff56204d2994c8bd5 | jeffshrager/biobike | subranges.lisp | ;;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: utils; -*-
(in-package :utils)
;;; +=========================================================================+
| Copyright ( c ) 2005 JP , , , |
;;; | |
;;; | Permission is hereby gr... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Utils/subranges.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: utils; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and ... |
(in-package :utils)
| Copyright ( c ) 2005 JP , , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to |
| i... |
4cc14c9b6c30b82c04b65fd7f51f9ab29e65ba272370c033071faf170d919a76 | naveensundarg/prover | code-for-bags4.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: code-for-bags4.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
Softwa... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/code-for-bags4.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: code-for-bags4.lisp
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specif... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 .
... |
ad4c76d7efcb260c35588e7df081c076dfa2d2c59d76e185a44af2d8b3924279 | FPBench/FPBench | filter.rkt | #lang racket
(require "../src/common.rkt" "../src/fpcore-checker.rkt" "../src/fpcore-reader.rkt" "../src/supported.rkt")
(define/contract ((filter type values) core)
(-> symbol? (listof string?) (-> fpcore? boolean?))
(match* (type values)
[((or 'operator 'operation) (list value))
(set-member? (operator... | null | https://raw.githubusercontent.com/FPBench/FPBench/43a8f4854baebce88614059e4b48bcfc08d97f61/infra/filter.rkt | racket | #lang racket
(require "../src/common.rkt" "../src/fpcore-checker.rkt" "../src/fpcore-reader.rkt" "../src/supported.rkt")
(define/contract ((filter type values) core)
(-> symbol? (listof string?) (-> fpcore? boolean?))
(match* (type values)
[((or 'operator 'operation) (list value))
(set-member? (operator... | |
eb103e87db98ca9eb84c032eeccd7267c87800e26de88afebbf54094881277f7 | airalab/hs-web3 | MagicNumber.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
-- |
Module : Network . Polkadot . Metadata . MagicNumber
Copyright : 2016 - 2021
-- License : Apache-2.0
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
Metadata V9 data type .
--
module Netwo... | null | https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
|
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : portable
| 32-bit prefix magic sentence. |
Module : Network . Polkadot . Metadata . MagicNumber
Copyright : 2016 - 2021
Metadata V9 data type .
module Network.Polkadot.Metadata.MagicNumber where
import Codec.Scale.Class (Decode (..), Encode (..))
import Codec.Scale.Core ()
import Control.Monad (when)
im... |
3d8e2c89f2b62160088e6648eb3400d1d44893ca0b3f77c41cf7955d29695adb | artolevi/cl-darksky | http.lisp | (in-package :cl-user)
(defpackage cl-darksky.http
(:use #:cl)
(:export #:http-get))
(in-package :cl-darksky.http)
(defun http-get (url)
(handler-bind ((dex:http-request-failed (dex:retry-request 10)))
(jonathan:parse (dex:get url) :as :alist)))
| null | https://raw.githubusercontent.com/artolevi/cl-darksky/2a1adac81c8a461c6a1db19984c55182c7feebff/src/http.lisp | lisp | (in-package :cl-user)
(defpackage cl-darksky.http
(:use #:cl)
(:export #:http-get))
(in-package :cl-darksky.http)
(defun http-get (url)
(handler-bind ((dex:http-request-failed (dex:retry-request 10)))
(jonathan:parse (dex:get url) :as :alist)))
| |
a02b4e84a880fd0029bab41dfa7f2a932722f6a09800fa65503594bfb28e827b | kompendium-ano/factom-haskell-client | ActiveIdentityKeys.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeOperators #-}
module Factom.RPC.Types.ActiveIdentityKeys where
import Control.Applicative
import Con... | null | https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Types/ActiveIdentityKeys.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------ | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Factom.RPC.Types.ActiveIdentityKeys where
import Control.Applicative
import Control.Monad (forM_, join, mzero)
import Data.Aeson (FromJSON (.... |
595d316060cbff589dc18363afafcdd49295e6114e25c8bb834f482e25715af2 | ocamllabs/opam-doc | bindoc_errors.mli |
type parser_error =
Unclosed of Location.t * string * string
| Expecting of string
type lexer_error =
Unmatched_verbatim
| Unmatched_target
| Unmatched_code
| Unmatched_pre_code
| Unmatched_html_code
| Unterminated_verbatim
| Unterminated_target
| Unterminated_code
| Unterminated_pre_code
| Unterminated_ref
| U... | null | https://raw.githubusercontent.com/ocamllabs/opam-doc/4f5a332750177e3016b82d5923a681510335af4c/src/bin-doc/bindoc_errors.mli | ocaml |
type parser_error =
Unclosed of Location.t * string * string
| Expecting of string
type lexer_error =
Unmatched_verbatim
| Unmatched_target
| Unmatched_code
| Unmatched_pre_code
| Unmatched_html_code
| Unterminated_verbatim
| Unterminated_target
| Unterminated_code
| Unterminated_pre_code
| Unterminated_ref
| U... | |
66c44298d6393f82ebe70675da869d1b57f736f55571f1c676e6ebf16233a0f3 | matterhorn-chat/mattermost-api | Types.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
module Network.Mattermost.Types
( module Network.Mattermost.Types
, module Network.Mattermost.Types.Base
... | null | https://raw.githubusercontent.com/matterhorn-chat/mattermost-api/66f9736de4dbcd695248fe77534c8b7d5c780c6a/src/Network/Mattermost/Types.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Creates a structure representing a connection to the server.
public chat channels
like Ordinary but not visible to non-members
between a selected set of users
For converting from type specific Id to generic Id
This type only exists so that we can strip ... | # LANGUAGE RecordWildCards #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
module Network.Mattermost.Types
( module Network.Mattermost.Types
, module Network.Mattermost.Types.Base
, ConnectionType(..)
, connectionDataURL
, ServerBa... |
e7bfad5b56e9896ecc0fea5382fdf6d3e9dcab049c68efef850198e726ae1fd2 | wimvanderbauwhede/tytra | ParseTree.hs | {-# LANGUAGE DeriveDataTypeable #-}
module ParseTree where
import Data.Data
import Data.Generics
import Data.Typeable
data Name = MkName String deriving (Data, Typeable, Show, Eq, Ord)
data Program = MkProgram [TypeDecl] LetAssignment
deriving (Data, Typeable, Show, Eq)
data TypeDec... | null | https://raw.githubusercontent.com/wimvanderbauwhede/tytra/6787f845a878e0b008bf966015ad6faca6cf0ec7/TyTra-CL/src/ParseTree.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module ParseTree where
import Data.Data
import Data.Generics
import Data.Typeable
data Name = MkName String deriving (Data, Typeable, Show, Eq, Ord)
data Program = MkProgram [TypeDecl] LetAssignment
deriving (Data, Typeable, Show, Eq)
data TypeDecl = MkTypeDecl Name [Type] Bool
de... |
02781ba60209c1607a448bed4709d220ddd21c16fbd48299581d113958f80e72 | travelping/tetrapak | tpk.erl | Copyright 2010 - 2011 , Travelping GmbH < >
% Permission is hereby granted, free of charge, to any person obtaining a
% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
% the rights to use, copy, modify, merge, pu... | null | https://raw.githubusercontent.com/travelping/tetrapak/48033a25d7f10ad2f60a7436d97fc27b285bc714/src/tpk.erl | erlang | Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright 2010 - 2011 , Travelping GmbH < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI... |
0babc80632db68a9a08989ef4a02e4c649e1c638f7e98fb57a2e27a8b2d6b9d4 | pveber/bistro | shell_command.mli | open Bistro_internals
type file_dump = File_dump of {
text : string ;
path : string ;
}
type t
val make :
Execution_env.t ->
Workflow.container_image list ->
Execution_env.insert Command.t ->
t
val text : t -> string
val file_dumps : t -> file_dump list
val run : t -> (int * bool) Lwt.t
val contai... | null | https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/engine/shell_command.mli | ocaml | open Bistro_internals
type file_dump = File_dump of {
text : string ;
path : string ;
}
type t
val make :
Execution_env.t ->
Workflow.container_image list ->
Execution_env.insert Command.t ->
t
val text : t -> string
val file_dumps : t -> file_dump list
val run : t -> (int * bool) Lwt.t
val contai... | |
a0a8bc3db8347bae478046a65957d217165b6e9f9446bdd96947cab92bc24259 | fujita-y/digamma | char.scm | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(define-library (scheme char)
(import (core unicode) (core unicode-assistants))
(export char-alphabetic?
char-ci<?
char-ci>=?
char-downcase
ch... | null | https://raw.githubusercontent.com/fujita-y/digamma/58cccd77bd2c208ec58d3cd634cbe65e32b3c7ec/stdlib/scheme/char.scm | scheme | See LICENSE file for terms and conditions of use. | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(define-library (scheme char)
(import (core unicode) (core unicode-assistants))
(export char-alphabetic?
char-ci<?
char-ci>=?
char-downcase
char-lower-case?
char-upcase
char-wh... |
24325aec8a1563fdd5a2cfd705cb9760c11a3c992e290dbb2c2eb0a815c83768 | metabase/metabase | core.clj | (ns metabase.automagic-dashboards.core
"Automatically generate questions and dashboards based on predefined
heuristics."
(:require
[buddy.core.codecs :as codecs]
[cheshire.core :as json]
[clojure.math.combinatorics :as math.combo]
[clojure.string :as str]
[clojure.walk :as walk]
[clojure.zip :a... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/automagic_dashboards/core.clj | clojure | Handle integer Field IDs.
handle field string names. Only if we have result metadata. (Not sure why)
otherwise this isn't returning something, and that's probably an error. Log it.
We use :id here as it might not be a concrete field but rather one from a nested query which
does not have an ID.
We use :id here as ... | (ns metabase.automagic-dashboards.core
"Automatically generate questions and dashboards based on predefined
heuristics."
(:require
[buddy.core.codecs :as codecs]
[cheshire.core :as json]
[clojure.math.combinatorics :as math.combo]
[clojure.string :as str]
[clojure.walk :as walk]
[clojure.zip :a... |
317af7d4e319379234129b6bf0c763d9c4c45faf2dd275df0698b5cee4bc557e | pNre/Hera | feed_date.ml | (* Taken from / *)
open Core
let int_of_month = function
| "Jan" -> 1
| "Feb" -> 2
| "Mar" -> 3
| "Apr" -> 4
| "May" -> 5
| "Jun" -> 6
| "Jul" -> 7
| "Aug" -> 8
| "Sep" -> 9
| "Oct" -> 10
| "Nov" -> 11
| "Dec" -> 12
| _ -> invalid_arg "RFC822.int_of_month"
;;
let parse_offset = function
|... | null | https://raw.githubusercontent.com/pNre/Hera/204a961b3010009fbbb2818cfe2daea8860908e3/hera/module_feeds/feed_date.ml | ocaml | Taken from / |
open Core
let int_of_month = function
| "Jan" -> 1
| "Feb" -> 2
| "Mar" -> 3
| "Apr" -> 4
| "May" -> 5
| "Jun" -> 6
| "Jul" -> 7
| "Aug" -> 8
| "Sep" -> 9
| "Oct" -> 10
| "Nov" -> 11
| "Dec" -> 12
| _ -> invalid_arg "RFC822.int_of_month"
;;
let parse_offset = function
| "UT" | "GMT" | "Z"... |
4194fad3ee0ae59a0f619087c47ac478d5a5bdd55cb5f5fd5c4fffc75695279d | well-typed/large-records | R080.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
{-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}
{-# OPTIONS_GHC -fplugin-opt=Data.Record.Anon.Plugin:noapply #-}
module Experiment.Con... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/ConstructNoApply/Sized/R080.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
# OPTIONS_GHC -fplugin-opt=Data.Record.Anon.Plugin:noapply #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ConstructNoApply.Sized.R080 where
import Data.Record.Anon.Simple (Record)
import Bench.Types
import Common.RowOfSize.Row080
record :: Word -> Record ExampleRow
record x = ANON {
t00 = MkT x
, t01 = MkT x
, t02 = MkT x
, t03 =... |
dc4e6e152598028417b68e6e05137eb1167fa4bbcbc11e8ce83b917a5e3723b2 | clojurecademy/clojurecademy | learn.clj | (ns clojurecademy.controller.course.learn
(:require [clojurecademy.dao.progress :as progress.dao]
[clojurecademy.dao.sub-instruction :as sub-ins.dao]
[clojurecademy.dao.user :as user.dao]
[clojurecademy.dao.course :as course.dao]
[clojurecademy.dao.chapter :as chapter.d... | null | https://raw.githubusercontent.com/clojurecademy/clojurecademy/97dc7f9b91a90a3f30ca5a3de88542c90a50ce01/src/clj/clojurecademy/controller/course/learn.clj | clojure | (ns clojurecademy.controller.course.learn
(:require [clojurecademy.dao.progress :as progress.dao]
[clojurecademy.dao.sub-instruction :as sub-ins.dao]
[clojurecademy.dao.user :as user.dao]
[clojurecademy.dao.course :as course.dao]
[clojurecademy.dao.chapter :as chapter.d... | |
d0c0440a9a4b55f353845ec87970cb4f5c47a063cc1b5dcac599d5e09d3ee96b | JHU-PL-Lab/jaylang | zlist.ml | open! Core
open! Z3
let ctx = Z3.mk_context []
module Z3API = Z3_api.Make (struct
let ctx = ctx
end)
let int_sort = Arithmetic.Integer.mk_sort ctx
let int_list_sort =
Z3List.mk_sort ctx (Z3.Symbol.mk_string ctx "a_list") int_sort
let cons_decl = Z3List.get_cons_decl int_list_sort
let is_cons_decl = Z3List.get_... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/a88468ce8fb7507ec77a88a4cf8146da104328fb/src-vendor/sudu/zlist.ml | ocaml | API
Example
s0_choices | open! Core
open! Z3
let ctx = Z3.mk_context []
module Z3API = Z3_api.Make (struct
let ctx = ctx
end)
let int_sort = Arithmetic.Integer.mk_sort ctx
let int_list_sort =
Z3List.mk_sort ctx (Z3.Symbol.mk_string ctx "a_list") int_sort
let cons_decl = Z3List.get_cons_decl int_list_sort
let is_cons_decl = Z3List.get_... |
5331c8710cacf6140fb6b21903f0d76b083623d9d316b9b2d52bea2b59883aab | BillHallahan/G2 | BadNames1.hs | module BadNames1 where
data X' = X' X' | Y' | Z' deriving Eq
abs' :: Int -> Int
abs' x
| x >= 0 = x
| otherwise = -x
xswitch :: X' -> X'
xswitch (X' x) = X' (xswitch x)
xswitch Y' = Z'
xswitch Z' = Y'
| null | https://raw.githubusercontent.com/BillHallahan/G2/521ac4f4a6573f15521765cefc3255be33249d2e/tests/TestFiles/BadNames1.hs | haskell | module BadNames1 where
data X' = X' X' | Y' | Z' deriving Eq
abs' :: Int -> Int
abs' x
| x >= 0 = x
| otherwise = -x
xswitch :: X' -> X'
xswitch (X' x) = X' (xswitch x)
xswitch Y' = Z'
xswitch Z' = Y'
| |
4ff4ffa7e794f6f360c9d59ac93dbd8ef9eb4551f7b767749de69f9500946ec8 | elpinal/modules | RRD2014.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonadComprehensions #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE ViewPatterns #
|
Module : Language .... | null | https://raw.githubusercontent.com/elpinal/modules/aa8f2725a770edb06626aeaf8716da90dfa06823/src/Language/Modules/RRD2014.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonadComprehensions #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
|
Module : Language . Modules . RRD2014
License : MIT
, and .
F - ing modules . ... |
f9b17a38490934e0c7ebf260f143a15be35871c6cfa19ee9bf3c1a29832519aa | anwarmamat/cmsc330spring19-public | nfa.ml | open List
open Sets
(*********)
(* Types *)
(*********)
type ('q, 's) transition = 'q * 's option * 'q
type ('q, 's) nfa_t = {
sigma: 's list;
qs: 'q list;
q0: 'q;
fs: 'q list;
delta: ('q, 's) transition list;
}
(***********)
(* Utility *)
(***********)
(* explode converts a string to a character list *)... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/project4/src/nfa.ml | ocaml | *******
Types
*******
*********
Utility
*********
explode converts a string to a character list
**************
**************
*****************************
***************************** | open List
open Sets
type ('q, 's) transition = 'q * 's option * 'q
type ('q, 's) nfa_t = {
sigma: 's list;
qs: 'q list;
q0: 'q;
fs: 'q list;
delta: ('q, 's) transition list;
}
let explode (s: string) : char list =
let rec exp i l =
if i < 0 then l else exp (i - 1) (s.[i] :: l)
in
exp (String.le... |
c874ad82acd2ff14b43b78c0a44d97525cea6f67a5705b9b77a982d1876bb79a | dyoo/whalesong | racket-impl.rkt | #lang racket
(require (only-in '#%unsafe unsafe-car unsafe-cdr))
(provide unsafe-car unsafe-cdr)
| null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/lang/unsafe/racket-impl.rkt | racket | #lang racket
(require (only-in '#%unsafe unsafe-car unsafe-cdr))
(provide unsafe-car unsafe-cdr)
| |
461c7dd4dbbb0f7cd7a6ada74ce3869a514bccf73874f86766f36185996d5700 | jellelicht/guix | gexp.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 , 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/gexp.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 , 2015 , 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix gexp)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (... |
dcd2cbc2c311bdb3bea9b9d151c43298159b8318628bb6339c7a9f19aa70a98d | yav/graphmod | CabalSupport.hs | {-# language CPP #-}
module Graphmod.CabalSupport (parseCabalFile,Unit(..),UnitName(..)) where
import Graphmod.Utils(ModName,fromHierarchy)
import Data.Maybe(maybeToList)
import System.FilePath((</>))
Interface to cabal .
import Distribution.Verbosity(silent)
import Distribution.PackageDescription
( Gener... | null | https://raw.githubusercontent.com/yav/graphmod/983c38f73d3d6d232c954416fd1ab019f24c9fc5/src/Graphmod/CabalSupport.hs | haskell | # language CPP #
Note that this isn't nested under the above #if because we need
| This is our abstraction for something in a cabal file.
other modules?
other modules?
we just ignore flags |
module Graphmod.CabalSupport (parseCabalFile,Unit(..),UnitName(..)) where
import Graphmod.Utils(ModName,fromHierarchy)
import Data.Maybe(maybeToList)
import System.FilePath((</>))
Interface to cabal .
import Distribution.Verbosity(silent)
import Distribution.PackageDescription
( GenericPackageDescription,... |
8846f580a2ea40174c9b1c28949302ddb090b8b9dc5b9548795368bee561da3e | realark/vert | core-test.lisp | (in-package :recurse.vert)
;;;; coord transforms
(prove:deftest test-obb-local-world-points
(let* ((obj1 (make-instance 'obb
:width 10
:height 10
:x 10.0
:y 20.0
:z 2... | null | https://raw.githubusercontent.com/realark/vert/4cb88545abc60f1fba4a8604ce85e70cbd4764a2/t/core-test.lisp | lisp | coord transforms
rotated floats need to be rounded for meaningful comparison
collisions | (in-package :recurse.vert)
(prove:deftest test-obb-local-world-points
(let* ((obj1 (make-instance 'obb
:width 10
:height 10
:x 10.0
:y 20.0
:z 2.0))
(scaled-... |
c39f8e4605eef4eda7c47efde38f9df13233d1b2afbfaf51f000d7891740d084 | namin/metamk | preduce-tests.scm | (load "mk2.scm")
(load "meta.scm")
(load "ex-ndfa.scm")
(load "preduce.scm")
(load "refl.scm")
(load "test-check.scm")
(define (ndfa-program p)
((refl-prog ndfa-pclause) p))
(test-check "sanity-check-nda-program"
(run 1 (p)
(ndfa-program p))
'(((<- (accept _.0) ((initial _.1) (accept2 _.0 _.1)))
(<- (a... | null | https://raw.githubusercontent.com/namin/metamk/8a6084888c87444a84f18cf6e470456837b75cfc/preduce-tests.scm | scheme | (load "mk2.scm")
(load "meta.scm")
(load "ex-ndfa.scm")
(load "preduce.scm")
(load "refl.scm")
(load "test-check.scm")
(define (ndfa-program p)
((refl-prog ndfa-pclause) p))
(test-check "sanity-check-nda-program"
(run 1 (p)
(ndfa-program p))
'(((<- (accept _.0) ((initial _.1) (accept2 _.0 _.1)))
(<- (a... | |
1c7ce60c04169680604659ade8d1f4f84b14a1750be42034a9db23d5c613a119 | yakaz/yamerl | yamerl_node_seq.erl | %-
Copyright ( c ) 2012 - 2014 Yakaz
Copyright ( c ) 2016 - 2022 < >
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
1 . Redistributions of source code must retain the above copyright... | null | https://raw.githubusercontent.com/yakaz/yamerl/bf9d8b743bfc9775f2ddad9fb8d18ba5dc29d3e1/src/yamerl_node_seq.erl | erlang | -
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.
notice, this list of conditions and the following disclaimer in the
documen... | Copyright ( c ) 2012 - 2014 Yakaz
Copyright ( c ) 2016 - 2022 < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ` ` AS IS '' AND
IMPLIED WARRANTIES OF MERC... |
e2c90f1e3a66699f5c817c6c1248c48da7a70b0d7ddf0c7bd36a9974cc68e6b8 | babashka/nbb | example.cljs | (ns example
(:require ["rqlite-js$default" :as rq]
[promesa.core :as p]))
(def client (rq/DataApiClient. ":4001"))
(defn query-by-name [name]
(str "SELECT id FROM foo WHERE name = \"" name "\""))
(p/let [results (.query client (query-by-name "fiona"))]
(when-not (.hasError results)
(-> results
... | null | https://raw.githubusercontent.com/babashka/nbb/0f195a17bf2577bf5a31eee1f58fee3bc710aa27/examples/rqlite/example.cljs | clojure | (ns example
(:require ["rqlite-js$default" :as rq]
[promesa.core :as p]))
(def client (rq/DataApiClient. ":4001"))
(defn query-by-name [name]
(str "SELECT id FROM foo WHERE name = \"" name "\""))
(p/let [results (.query client (query-by-name "fiona"))]
(when-not (.hasError results)
(-> results
... | |
5a85438194cd32d54111acaacbb6063c6f9f808c72c43fe6020e5d7bd76d0249 | igorhvr/bedlam | comlist.scm | ;;"comlist.scm" Implementation of COMMON LISP list functions for Scheme
Copyright ( C ) 1991 , 1993 , 1995 , 2001 , 2003 .
Copyright ( C ) 2000
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the follo... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/comlist.scm | scheme | "comlist.scm" Implementation of COMMON LISP list functions for Scheme
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and... | Copyright ( C ) 1991 , 1993 , 1995 , 2001 , 2003 .
Copyright ( C ) 2000
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
(require 'multiarg-apply)
... |
a0bf04f3eca557f0d759fd514bc3b2595e5859a1ee99d4a616a3d3302204e654 | lynaghk/cljx | b.cljs | (ns cljx.b
( :require-macros
[foo.bar]))
(defn cljs-only [x] "Internets time")
(defn x
[y]
( - y y))
;;;;;;;;;;;; This file autogenerated from test/cljx/b.cljx
| null | https://raw.githubusercontent.com/lynaghk/cljx/3156b25e64aa13a0a72a5ad4fe509e71684af50e/test-output/cljx/b.cljs | clojure | This file autogenerated from test/cljx/b.cljx | (ns cljx.b
( :require-macros
[foo.bar]))
(defn cljs-only [x] "Internets time")
(defn x
[y]
( - y y))
|
0ebadffa1876ec399f737018403ac9d16dea869de35809a625a6c56853b7b2c3 | AntidoteDB/antidote | clocksi_vnode.erl | %% -------------------------------------------------------------------
%%
Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
%% >
%%
This file is provided... | null | https://raw.githubusercontent.com/AntidoteDB/antidote/32a89d42be644d3ba616ebf705fce4fa43e781ab/apps/antidote/src/clocksi_vnode.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 expressed or implied. See the License for the
specific language governing perm... | Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
This file is provided to you under the Apache License ,
except in compliance with the License . You... |
c4d906b870b610769d390c361f5236dfabb8b0f2c06113c5c60329a6f570be0b | jaybosamiya/automatic-differentiation | dual_number.ml | module Dual = struct
type t = float * float
let from_floats a b : t = a, b
let real (a, _ : t) = a
let non_real (_, b : t) = b
module Infix = struct
let ( ! ) ((a, b) : t) : t =
(a, -. b)
let ( + ) ((a, b) : t) ((c, d) : t) : t =
(a +. c, b +. d)
let ( - ) ((a, b) : t) ((c, d) ... | null | https://raw.githubusercontent.com/jaybosamiya/automatic-differentiation/b7935851afaaaca317d78f6cf187a94adfaa795f/dual_number.ml | ocaml | module Dual = struct
type t = float * float
let from_floats a b : t = a, b
let real (a, _ : t) = a
let non_real (_, b : t) = b
module Infix = struct
let ( ! ) ((a, b) : t) : t =
(a, -. b)
let ( + ) ((a, b) : t) ((c, d) : t) : t =
(a +. c, b +. d)
let ( - ) ((a, b) : t) ((c, d) ... | |
68fb194f9c6caa229394eaccdb49301205f026958a384ccbfe1a5091b3ebf314 | pallet/pallet | versions_test.clj | (ns pallet.versions-test
(:require
[clojure.test :refer :all]
[pallet.versions :refer :all]))
(deftest version-vector-test
(is (= [1] (version-vector "1")))
(is (= [1 2] (version-vector "1.2")))
(is (= [1 2 3] (version-vector "1.2.3"))))
(deftest as-version-vector-test
(is (= [1] (as-version-vector "1... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/test/pallet/versions_test.clj | clojure | (ns pallet.versions-test
(:require
[clojure.test :refer :all]
[pallet.versions :refer :all]))
(deftest version-vector-test
(is (= [1] (version-vector "1")))
(is (= [1 2] (version-vector "1.2")))
(is (= [1 2 3] (version-vector "1.2.3"))))
(deftest as-version-vector-test
(is (= [1] (as-version-vector "1... | |
fedcdc6315efa5d88ba1be20252ce88128db3deaeb1905d8c0fd644f0ac4fdcf | komcrad/webdriver | core_test.clj | (ns webdriver.core-test
(:require [clojure.test :refer :all]
[webdriver.core :refer :all]
[clojure.java.io :as io]
[clojure.string :as s]
[digest :as digest]
[komcrad-utils.io :as kio]))
(def test-html-file-url (str "file://" (.getCanonicalPath (io/file "tes... | null | https://raw.githubusercontent.com/komcrad/webdriver/19a651d1e5e5e63b7d9fecf5f454e9e74e58311a/test/webdriver/core_test.clj | clojure | (ns webdriver.core-test
(:require [clojure.test :refer :all]
[webdriver.core :refer :all]
[clojure.java.io :as io]
[clojure.string :as s]
[digest :as digest]
[komcrad-utils.io :as kio]))
(def test-html-file-url (str "file://" (.getCanonicalPath (io/file "tes... | |
9103aaeb937a02372fa3b4a35ebefb3243deb0d875370f8eeda2894273f9473d | circuithub/haskell-gerber | Polarity.hs | module Gerber.Polarity ( Polarity(..) ) where
data Polarity = Clear | Dark
deriving ( Bounded, Enum, Eq, Ord, Read, Show )
| null | https://raw.githubusercontent.com/circuithub/haskell-gerber/c1ef0273e9dcf98d731a63ffc6aeb1b4c884bd8d/gerber/lib/Gerber/Polarity.hs | haskell | module Gerber.Polarity ( Polarity(..) ) where
data Polarity = Clear | Dark
deriving ( Bounded, Enum, Eq, Ord, Read, Show )
| |
ff70a91f688ff53b786449131623cd44f966e80ea0b5c32ba80b39e9fbfff902 | PeterDWhite/Osker | Test.hs | module Main where
import IO
import List
import Monad
import qualified System as SYS
DaVinci imports
import qualified DVDeep as DVD
import qualified DaVinciTypes as DT
-- Graph imports
import qualified Deep as D
imports
import qualified ParseFileName as PFN
import qualified FileName as FN
-- Local imports
import qu... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Kernel/FileSystem/Test.hs | haskell | Graph imports
Local imports
How to print a node name
Dump out a node name in the file system
outNodeName ss = error ("long node name: " ++ FN.outFileName ss)
Print a file system graph node | module Main where
import IO
import List
import Monad
import qualified System as SYS
DaVinci imports
import qualified DVDeep as DVD
import qualified DaVinciTypes as DT
import qualified Deep as D
imports
import qualified ParseFileName as PFN
import qualified FileName as FN
import qualified FileSystem as FS
Print ... |
8d2d46e3ec91cc71db73fadccc96f1228a1919545bb9474ae42ad8248f41b6ac | cardmagic/lucash | srfi-11.scm |
Taken directly from the SRFI document .
(define-syntax let-values
(syntax-rules ()
((let-values (?binding ...) ?body0 ?body1 ...)
(let-values "bind" (?binding ...) () (begin ?body0 ?body1 ...)))
((let-values "bind" () ?tmps ?body)
(let ?tmps ?body))
((let-values "bind" ((?b0 ?e0) ?... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/srfi/srfi-11.scm | scheme |
Taken directly from the SRFI document .
(define-syntax let-values
(syntax-rules ()
((let-values (?binding ...) ?body0 ?body1 ...)
(let-values "bind" (?binding ...) () (begin ?body0 ?body1 ...)))
((let-values "bind" () ?tmps ?body)
(let ?tmps ?body))
((let-values "bind" ((?b0 ?e0) ?... | |
8e635e789e7d6bf493ce468046fa6498e6a65bc3f9ee7a2b42e022951246fd6d | webyrd/mediKanren | common.rkt | #lang racket/base
(provide (all-from-out "base.rkt"
"db/semmed.rkt"
"db/rtx2-20210204.rkt"
"db/kgx-synonym.rkt") ; workaround:
so long as KGX_synonym is n't specified in config.scm
this wo n't signal an error even if KGX is n't present
cp... | null | https://raw.githubusercontent.com/webyrd/mediKanren/0da0306e602b1f8d8691dfe50f8e702f75f6c08d/medikanren2/common.rkt | racket | workaround:
TODO: define higher-level relations over the db-specific relations
tag argument 0 (the edge id) with database name
usage:
thunk -- procedure that takes no arguments | #lang racket/base
(provide (all-from-out "base.rkt"
"db/semmed.rkt"
"db/rtx2-20210204.rkt"
so long as KGX_synonym is n't specified in config.scm
this wo n't signal an error even if KGX is n't present
cprop edge eprop
triple quad triple/eid is-a is-a/qu... |
36835d0aee97a059305eba6a377e232f13fdaf971383605ac03d0587a0f8c105 | jepsen-io/tendermint | project.clj | (defproject jepsen.tendermint "0.1.0"
:description "Jepsen tests for the Tendermint Byzantine consensus system"
:url "-io/tendermint"
:license {:name "Apache License, version 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.typed "0.4.0"]
... | null | https://raw.githubusercontent.com/jepsen-io/tendermint/184f9b4b62fb721a6ea4c1e93e82ce23f19ff7e8/project.clj | clojure | (defproject jepsen.tendermint "0.1.0"
:description "Jepsen tests for the Tendermint Byzantine consensus system"
:url "-io/tendermint"
:license {:name "Apache License, version 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.typed "0.4.0"]
... | |
78ac0d7d2886ffe7c0d438c1bbcc243b04fe5f96636c088e06b9d96b5de9f33f | ucsd-progsys/dsolve | tests_rec_stable_sort_inc.ml | let rec split_aux lst left right =
match lst with
| [] -> (left, right)
| [x] -> (x :: left, right)
| x :: y :: ys -> split_aux ys (x :: left) (y :: right)
let split lst =
split_aux lst [] []
let rec len xs =
match xs with
| [] -> 0
| x::xs' -> 1 + len xs'
let rec chop k l l' =
... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/ml/old/tests_rec_stable_sort_inc.ml | ocaml | let rec split_aux lst left right =
match lst with
| [] -> (left, right)
| [x] -> (x :: left, right)
| x :: y :: ys -> split_aux ys (x :: left) (y :: right)
let split lst =
split_aux lst [] []
let rec len xs =
match xs with
| [] -> 0
| x::xs' -> 1 + len xs'
let rec chop k l l' =
... | |
847e89dd7b5e7a399b6a4754372cda736c022ef6de88fb2590df54fff0c5232f | gafiatulin/codewars | Group10.hs | Group in 10s
-- /
module Codewars.Kata.Group10 where
import Data.List (sort, groupBy)
import Data.Function (on)
import Control.Arrow ((&&&))
import Data.Maybe (fromMaybe)
groupIn10s :: [Int] -> [[Int]]
groupIn10s [] = []
groupIn10s xs = map (fromMaybe [] . (`lookup` d)) [0.. (`div` 10) . maximum $ xs]
where d ... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Group10.hs | haskell | / | Group in 10s
module Codewars.Kata.Group10 where
import Data.List (sort, groupBy)
import Data.Function (on)
import Control.Arrow ((&&&))
import Data.Maybe (fromMaybe)
groupIn10s :: [Int] -> [[Int]]
groupIn10s [] = []
groupIn10s xs = map (fromMaybe [] . (`lookup` d)) [0.. (`div` 10) . maximum $ xs]
where d = map... |
cc881fa809bd0d6e0402ba21aac45782923a2e09307bf4791825cd02a41138f8 | aantron/dream | graphql.ml | type user = {id : int; name : string}
let hardcoded_users = [
{id = 1; name = "alice"};
{id = 2; name = "bob"};
]
let user =
Graphql_lwt.Schema.(obj "user"
~fields:[
field "id"
~typ:(non_null int)
~args:Arg.[]
~resolve:(fun _info user -> user.id);
field "name"
~ty... | null | https://raw.githubusercontent.com/aantron/dream/c34e116773d2ed6dbdfd460c25037441cf369067/example/i-graphql/graphql.ml | ocaml | type user = {id : int; name : string}
let hardcoded_users = [
{id = 1; name = "alice"};
{id = 2; name = "bob"};
]
let user =
Graphql_lwt.Schema.(obj "user"
~fields:[
field "id"
~typ:(non_null int)
~args:Arg.[]
~resolve:(fun _info user -> user.id);
field "name"
~ty... | |
a7e914040bd6f66225d487f709b894f8de9622c1c07b43f5f964564aca0bdccc | gsakkas/rite | 20060420-14:42:50-174cee33963e34fe367d8a7099d076f7.seminal.ml |
exception Unimplemented
exception RuntimeTypeError
exception DoesNotTypecheck of string
(****** Syntax for our language, including types (do not change) *****)
type exp = Var of string
| Lam of string * typ * exp
| Apply of exp * exp
| Closure of string * exp * (env ref)
| Int of int
| Pl... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060420-14%3A42%3A50-174cee33963e34fe367d8a7099d076f7.seminal.ml | ocaml | ***** Syntax for our language, including types (do not change) ****
***** Interpreter for our language (do not change) ****
**** helper functions provided to you (do not change) ****
********* examples and testing ********** |
exception Unimplemented
exception RuntimeTypeError
exception DoesNotTypecheck of string
type exp = Var of string
| Lam of string * typ * exp
| Apply of exp * exp
| Closure of string * exp * (env ref)
| Int of int
| Plus of exp * exp
| If of exp * exp * exp
| RecordE of (string * exp)... |
76358bd39ee63efba0501aded4f028a2315d7994c5194db5cc3dc4ef31ffef38 | slipstream/SlipStreamServer | external_object_template_generic.clj | (ns com.sixsq.slipstream.ssclj.resources.external-object-template-generic
(:require
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.external-object :as eo]
[com.sixsq.slipstream.ssclj.resources.external-object-template :as eot]
[com.sixsq.slipstream.sscl... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/external_object_template_generic.clj | clojure |
resource
description
initialization: register this external object generic template
multimethods for validation
| (ns com.sixsq.slipstream.ssclj.resources.external-object-template-generic
(:require
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.external-object :as eo]
[com.sixsq.slipstream.ssclj.resources.external-object-template :as eot]
[com.sixsq.slipstream.sscl... |
770b071cfb50e4a088a2f67857dd5629c8fd1fc0be89f5b6a6f753030d1aa49d | rescript-lang/rescript-compiler | res_parens.ml | module ParsetreeViewer = Res_parsetree_viewer
type kind = Parenthesized | Braced of Location.t | Nothing
let expr expr =
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
match optBraces with
| Some ({Location.loc = bracesLoc}, _) -> Braced bracesLoc
| _ -> (
match expr with
| {
Parsetr... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/6e345ff6e256620a4b4fb4b8713a86bee5114e75/res_syntax/src/res_parens.ml | ocaml | readability? maybe remove
a && b || c, add parens to (a && b) for readability, who knows the difference by heart…
%extension.x vs (%extension).x | module ParsetreeViewer = Res_parsetree_viewer
type kind = Parenthesized | Braced of Location.t | Nothing
let expr expr =
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
match optBraces with
| Some ({Location.loc = bracesLoc}, _) -> Braced bracesLoc
| _ -> (
match expr with
| {
Parsetr... |
0a5589d246fd168f3928b6cedf75e2625913abdb16766868687c0354b807e430 | shentufoundation/deepsea | test.ml | open Ast
let _ =
let lexbuf = Lexing.from_channel stdin in
let program = Parser.program Scanner.token lexbuf in
print_endline (string_of_program program) | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/OpenSC/src/test.ml | ocaml | open Ast
let _ =
let lexbuf = Lexing.from_channel stdin in
let program = Parser.program Scanner.token lexbuf in
print_endline (string_of_program program) | |
314de19aaa764110a0373d834fcf3b0eb2bd94e5877ddcf1eef702e21b2a2530 | jamesdabbs/pi-base.hs | Helpers.hs | module Handler.Helpers
( paged
, preview
, plural
, render
, authButton
, flash
, FlashClass (..)
) where
import Import hiding (toLower)
import Data.Char (toLower)
import qualified Data.Text as T
import Yesod.Paginator hiding (paginate)
render :: Text -> Widget -> Handler Html
render title w = defaultLayout $ do
... | null | https://raw.githubusercontent.com/jamesdabbs/pi-base.hs/1c7cb1f87c6525bd4844842b3f9442634f8dccd3/Handler/Helpers.hs | haskell | This is clearly "wrong", but works for all the cases we need | module Handler.Helpers
( paged
, preview
, plural
, render
, authButton
, flash
, FlashClass (..)
) where
import Import hiding (toLower)
import Data.Char (toLower)
import qualified Data.Text as T
import Yesod.Paginator hiding (paginate)
render :: Text -> Widget -> Handler Html
render title w = defaultLayout $ do
... |
22c400f72232730abc8b0c4f12176557a29f93a1db65639f83f21e57d505f8cd | tomfaulhaber/cl-format | format_base.clj | Copyright ( c ) , Dec 2008 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/tomfaulhaber/cl-format/5b8d89951c33dfc81fdb7e717084b2debc802d30/com/infolace/format_base.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Dec 2008 . All rights reserved .
(in-ns 'com.infolace.format)
(declare compile-format)
(declare execute-format)
(declare init-navigator)
(defn cl-format
"An implementation of a Common Lisp compatible format function"
[stream format-in & args]
(let [compiled-format (if (string? format-i... |
362beef1f670060421b4685433b3a8186ea9b0a7e739b6d41392bfe4d43528b4 | the-concurrent-schemer/scm | scmi_types.erl | %%% The MIT License
%%%
Copyright ( C ) 2013 - 2014 by < >
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%%% to u... | null | https://raw.githubusercontent.com/the-concurrent-schemer/scm/1726ec2e94e766893d80c286f816599defb6a524/src/scmi_types.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( C ) 2013 - 2014 by < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
2f801e4d4b98466fb57c73b6bafcf515b6ef999a07fd373680fc5f14d2dce167 | janestreet/ocaml_plugin | run.ml | open! Core
open! Async
(*
For that sample, we will assume that the command ocamlopt.opt
refer to the same executable used to compile run.exe
This sample does not use the binutils packaging, it only
tests the Loader module.
*)
let ocamlopt_opt = "ocamlopt.opt"
(*
We use a local build dir not in tmp so t... | null | https://raw.githubusercontent.com/janestreet/ocaml_plugin/8f167657ce5dd3e9dbb0f0e28c7243a1946d86c0/sample/bin/run.ml | ocaml |
For that sample, we will assume that the command ocamlopt.opt
refer to the same executable used to compile run.exe
This sample does not use the binutils packaging, it only
tests the Loader module.
We use a local build dir not in tmp so that we can have a look
there and see what is generated and com... | open! Core
open! Async
let ocamlopt_opt = "ocamlopt.opt"
let builddir = Filename.concat (Sys_unix.getcwd ()) "_build"
For building this example , we use 3 config files
-config_01.ml is a version 1 of the Dsl 's config
-config_02.ml is a version 2 of the Dsl 's config
-config_util.ml is a utility ... |
28b9ea48b21c72cb24bb7c0541c1987e9f2efbdc1af5aefb6a977ce373167047 | mzp/coq-ide-for-ios | sequent.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/firstorder/sequent.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : sequent.mli 13323 2... |
0abd6015419ae211c2aba7d739cf5fb89a11cec05f7a03ca8618e0948574a052 | jepsen-io/knossos | dll_history_test.clj | (ns knossos.wgl.dll-history-test
(:require [clojure.test :refer :all]
[knossos.wgl.dll-history :as d]
[knossos.op :as op]
[knossos.history :as history]
[knossos.core-test :as ct]
[clojure.pprint :refer [pprint]]))
(deftest roundtrip-test
(testing "empty"
... | null | https://raw.githubusercontent.com/jepsen-io/knossos/1cb706f979c1712add47f0519d9e1dcb85635635/test/knossos/wgl/dll_history_test.clj | clojure | shifted up
reordered info | (ns knossos.wgl.dll-history-test
(:require [clojure.test :refer :all]
[knossos.wgl.dll-history :as d]
[knossos.op :as op]
[knossos.history :as history]
[knossos.core-test :as ct]
[clojure.pprint :refer [pprint]]))
(deftest roundtrip-test
(testing "empty"
... |
04c34929378477bf03e5da311014b4e0ff1ca2a29c9ae54f6591bb2c237f0e57 | logseq/logseq | db.cljs | (ns logseq.db
"Main namespace for public db fns"
(:require [logseq.db.default :as default-db]
[logseq.db.schema :as db-schema]
[datascript.core :as d]))
(defn start-conn
"Create datascript conn with schema and default data"
[]
(let [db-conn (d/create-conn db-schema/schema)]
(d/tra... | null | https://raw.githubusercontent.com/logseq/logseq/a368cab5e40b5c5cf81d8be46fc82dac7e0a45e9/deps/db/src/logseq/db.cljs | clojure | (ns logseq.db
"Main namespace for public db fns"
(:require [logseq.db.default :as default-db]
[logseq.db.schema :as db-schema]
[datascript.core :as d]))
(defn start-conn
"Create datascript conn with schema and default data"
[]
(let [db-conn (d/create-conn db-schema/schema)]
(d/tra... | |
6c88cbcfe2bfedf8e3cd88c4f00644e1c40dde21fb1250b24283ab99a9e553da | skrah/minicaml | Env.ml |
* Copyright ( c ) 2015 . All rights reserved .
*
* This file is distributed under the terms of the Q Public License
* version 1.0 .
* Copyright (c) 2015 Stefan Krah. All rights reserved.
*
* This file is distributed under the terms of the Q Public License
* version 1.0.
*)
include Map.Make(Strin... | null | https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/Env.ml | ocaml |
* Copyright ( c ) 2015 . All rights reserved .
*
* This file is distributed under the terms of the Q Public License
* version 1.0 .
* Copyright (c) 2015 Stefan Krah. All rights reserved.
*
* This file is distributed under the terms of the Q Public License
* version 1.0.
*)
include Map.Make(Strin... | |
e20e063b70c4917fab9cad384e827df0d98024cd118af6348d5ff98efc4c4b7b | proglang/ldgv | ArithmeticSpec.hs | # OPTIONS_GHC -Wall #
module ArithmeticSpec (spec) where
import Test.Hspec
import Utils
import Syntax
import Kinds
spec :: Spec
spec =
describe "LDGV parser arithmetic tests" $ do
it "parses an addition" $ do
"val f (m:Int) (n:Int) = m + n" `shouldParseDecl`
DFun "f" [(MMany,"m",TInt),(MMany,"n"... | null | https://raw.githubusercontent.com/proglang/ldgv/8d37669019cdc0464e0d5ab22b69f60585d641a5/test/ArithmeticSpec.hs | haskell | # OPTIONS_GHC -Wall #
module ArithmeticSpec (spec) where
import Test.Hspec
import Utils
import Syntax
import Kinds
spec :: Spec
spec =
describe "LDGV parser arithmetic tests" $ do
it "parses an addition" $ do
"val f (m:Int) (n:Int) = m + n" `shouldParseDecl`
DFun "f" [(MMany,"m",TInt),(MMany,"n"... | |
7f23aa6d2eff09d5a3454e9da318fa352df29e4e323b8585b234b10b8dda8e26 | ghcjs/ghcjs-boot | Syntax.hs | # LANGUAGE CPP , DeriveDataTypeable , ,
RoleAnnotations , DeriveGeneric , FlexibleInstances #
RoleAnnotations, DeriveGeneric, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.Syntax
Copyright : ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/template-haskell/Language/Haskell/TH/Syntax.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.Haskell.Syntax
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------... | # LANGUAGE CPP , DeriveDataTypeable , ,
RoleAnnotations , DeriveGeneric , FlexibleInstances #
RoleAnnotations, DeriveGeneric, FlexibleInstances #-}
Copyright : ( c ) The University of Glasgow 2003
Abstract syntax definitions for Template Haskell .
module Language.Haskell.TH.Synta... |
2ad79671b9b442bf9a9ea6fb705494a0c7e1e4eadc5b0495d08e5a3677ce6b84 | vmchale/command-line-tweeter | Tweet.hs | -- | Various utilities to tweet using the twitter api
--
Make sure you have a file credentials file ( default the executable looks for is @$HOME/.cred.toml@ ) with the following info :
--
-- @
--
api - key = " API_KEY "
--
-- api-sec = "API_SECRET"
--
-- tok = "OAUTH_TOKEN"
--
tok - sec = " TOKEN_SECRET "
--
-- @... | null | https://raw.githubusercontent.com/vmchale/command-line-tweeter/53314340c5bc7dda4de78072790c2c36e180c0ca/src/Web/Tweet.hs | haskell | | Various utilities to tweet using the twitter api
@
api-sec = "API_SECRET"
tok = "OAUTH_TOKEN"
@
* Functions to tweet
* Data type for a tweet
* Various API calls
* Functions to sign API requests
* Functions to generate a URL string from a `Tweet`
* Timeline filters
* Helper function to print a bird
... | Make sure you have a file credentials file ( default the executable looks for is @$HOME/.cred.toml@ ) with the following info :
api - key = " API_KEY "
tok - sec = " TOKEN_SECRET "
module Web.Tweet
(
basicTweet
, thread
, reply
, module Web.Tweet.Types
, module Web.Tweet.API
, modul... |
a950fb5585d5fb48d38f9f4fa52bb6e63a42448ab8c84bca609e5758a35a6efd | helium/router | router_console_sup.erl | -module(router_console_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(WORKER(I, Args), #{
id => I,
start => {I, start_link, Args},
restart => permanent,
shutdown => 5000,
type => worker,
modules => [I]
}).
-define(FLAGS, #{
... | null | https://raw.githubusercontent.com/helium/router/9e8bc47e25eb12a07e968dc60dee30e06805ad36/src/apis/router_console_sup.erl | erlang | API
Supervisor callbacks
====================================================================
API functions
====================================================================
====================================================================
Supervisor callbacks
=================================================... | -module(router_console_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(WORKER(I, Args), #{
id => I,
start => {I, start_link, Args},
restart => permanent,
shutdown => 5000,
type => worker,
modules => [I]
}).
-define(FLAGS, #{
strategy => rest_for_one,
... |
716788380740224393bef8b41ca224083383da15381b6b1f0adb4ee364397849 | ygrek/mldonkey | commonSwarming.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonSwarming.ml | ocaml | network "frontend"/"view"/... to a swarmer
glossary:
network frontend use "chunks" of data,
swarmer use "blocks" of data
information available to
check data correctness
function to call
when a chunk is verified;
... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... |
ff3278b810d5d11fe5d087be59b8bc618beffd19b9c688b5b243540f375e60dd | icicle-lang/icicle-ambiata | IO.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoImplicitPrelude #
module Icicle.Runtime.Data.IO (
EntityHash(..)
, EntityId(..)
, EntityKey(..)
, MaximumMapSize(..)
, SnapshotKey(..)
, SnapshotTime(..)
, ChordKey(..)
, ChordDescriptor(..)... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Runtime/Data/IO.hs | haskell | # LANGUAGE BangPatterns #
* Icicle.Data.Name re-exports
| /invariant: length inputTime = sum inputLength/
| /invariant: length inputColumn = sum inputLength/
| # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoImplicitPrelude #
module Icicle.Runtime.Data.IO (
EntityHash(..)
, EntityId(..)
, EntityKey(..)
, MaximumMapSize(..)
, SnapshotKey(..)
, SnapshotTime(..)
, ChordKey(..)
, ChordDescriptor(..)
, Label(..)
, QueryTime(... |
9fbd3bb9e4a8ca0fe0616b1a8525d739e622556185b84e53e3af89b818cc5915 | onyx-platform/onyx-kafka | information_model.cljc | (ns onyx.kafka.information-model)
(def model
{:catalog-entry
{:onyx.plugin.kafka/read-messages
{:summary "An input task to read messages from a Kafka topic."
:model {:kafka/topic
{:doc "The topic name to read from."
:type :string}
:kafka/group-id
{:do... | null | https://raw.githubusercontent.com/onyx-platform/onyx-kafka/8353ed5ff1a9f41da836a0069cdf6ba6da91f613/src/onyx/kafka/information_model.cljc | clojure | (ns onyx.kafka.information-model)
(def model
{:catalog-entry
{:onyx.plugin.kafka/read-messages
{:summary "An input task to read messages from a Kafka topic."
:model {:kafka/topic
{:doc "The topic name to read from."
:type :string}
:kafka/group-id
{:do... | |
0ffccf2f4f085dce8e825a2379a96b3f32b8a7b94e440715f66667e58fb3a28c | gafiatulin/codewars | Unique 2.hs | -- All unique
-- /
module Codewars.Kata.Unique where
import Data.List (sort, group)
hasUniqueChar :: String -> Bool
hasUniqueChar = not . any ((> 1) . length) . group . sort
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Unique%202.hs | haskell | All unique
/ |
module Codewars.Kata.Unique where
import Data.List (sort, group)
hasUniqueChar :: String -> Bool
hasUniqueChar = not . any ((> 1) . length) . group . sort
|
e333ac91f6b82b3181e1a4d04ac9910ae662790df1696f08704e40c6153544b5 | nikodemus/SBCL | seq.lisp | ;;;; generic SEQUENCEs
;;;;
: comment from original CMU CL source :
;;;; Be careful when modifying code. A lot of the structure of the
;;;; code is affected by the fact that compiler transforms use the
;;;; lower level support functions. If transforms are written for
;;;; some sequence operation, note how th... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/seq.lisp | lisp | generic SEQUENCEs
Be careful when modifying code. A lot of the structure of the
code is affected by the fact that compiler transforms use the
lower level support functions. If transforms are written for
some sequence operation, note how the END argument is handled
in other operations with transforms.
... | : comment from original CMU CL source :
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
(defun %check-generic-sequence-bounds (seq start end)
... |
d2247e67426483fc07f85326cd5ec47953e736d91c6b9ce2f7f10814fc131b03 | ian-ross/hnetcdf | test-get.hs | # LANGUAGE ScopedTypeVariables #
import Test.Framework (defaultMain, testGroup, Test)
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test, assert)
import qualified Data.Vector.Storable as SV
import qualified Data.Array.Repa as R
import qualified Data.Array.Repa.Eval as RE
import Data.Array.Repa.Repr.Fo... | null | https://raw.githubusercontent.com/ian-ross/hnetcdf/d334efc0b0b4f39a1ed4f45a8b75663c2171af6a/test/test-get.hs | haskell | ------------------------------------------------------------------------------
SINGLE ITEM READ
------------------------------------------------------------------------------
------------------------------------------------------------------------------
WHOLE VARIABLE READ
--------------------------------------... | # LANGUAGE ScopedTypeVariables #
import Test.Framework (defaultMain, testGroup, Test)
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test, assert)
import qualified Data.Vector.Storable as SV
import qualified Data.Array.Repa as R
import qualified Data.Array.Repa.Eval as RE
import Data.Array.Repa.Repr.Fo... |
6d665402d1b2ee0410d63897c1f12769d15732f61ee4a5e1f3826e53c6e39005 | mbutterick/aoc-racket | star1.rkt | 8214
hxtvlmkl | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d14/star1.rkt | racket | 8214
hxtvlmkl | |
ef7e7a396b2fbc6899caf791e8cac4812a483e8507904c9ab6bb938110a1dd9f | erlangonrails/devdb | exmpp_server_legacy_auth.erl | Copyright ProcessOne 2006 - 2010 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this s... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/server/exmpp_server_legacy_auth.erl | erlang |
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the Licens... | Copyright ProcessOne 2006 - 2010 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
@author < >
side of legacy authen... |
ffa4eac92a465a20d6bb20cb48b42ec80b01403cbc35d5dbcf5384a2a015a721 | dmitryvk/sbcl-win32-threads | test-utils.lisp | (in-package :sb-concurrency-test)
#+sb-thread
(progn
(defparameter +timeout+ 120.0)
(defun make-threads (n name fn)
(loop for i from 1 to n
collect (make-thread fn :name (format nil "~A-~D" name i))))
(defun timed-join-thread (thread &optional (timeout +timeout+))
(handler-case (sb-sys:with-deadline (:s... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/contrib/sb-concurrency/tests/test-utils.lisp | lisp | (in-package :sb-concurrency-test)
#+sb-thread
(progn
(defparameter +timeout+ 120.0)
(defun make-threads (n name fn)
(loop for i from 1 to n
collect (make-thread fn :name (format nil "~A-~D" name i))))
(defun timed-join-thread (thread &optional (timeout +timeout+))
(handler-case (sb-sys:with-deadline (:s... | |
01469a606b0aab7cc5ea348c02d318687d5459f714eb0356cde1c1560c3c58a9 | ribelo/doxa | query.cljc | (ns ribelo.doxa.query
(:require
[clojure.set :as set]
[ribelo.extropy :as ex]
[ribelo.doxa.protocols :as p]
[ribelo.doxa.util :as u]
[ribelo.doxa.pull-api :as dxp])
#?(:clj
(:import
(ribelo.doxa.util CachedResult))))
#?(:clj (set! *warn-on-reflection* true))
(def -resolve-fn
{'= =, '==... | null | https://raw.githubusercontent.com/ribelo/doxa/b2aa9efe04d4c34c30cf2d225e420d3ce8630e63/src/main/ribelo/doxa/query.cljc | clojure | 'and and-fn, 'or or-fn,
[?e :name]
[?e :name ?name]
[?e ?a ?v]
[(+ ?a ?b) ?c]] | (ns ribelo.doxa.query
(:require
[clojure.set :as set]
[ribelo.extropy :as ex]
[ribelo.doxa.protocols :as p]
[ribelo.doxa.util :as u]
[ribelo.doxa.pull-api :as dxp])
#?(:clj
(:import
(ribelo.doxa.util CachedResult))))
#?(:clj (set! *warn-on-reflection* true))
(def -resolve-fn
{'= =, '==... |
3cc27ddf17f17f5284cbfc5ed3939a44678fe2bac82a85016861290ad0c495fd | raptazure/experiments | Show.hs | module Web.View.Posts.Show where
import Web.View.Prelude
data ShowView = ShowView {post :: Include "comments" Post}
instance View ShowView where
html ShowView {..} =
[hsx|
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href={PostsAction}>Posts</a></li>
... | null | https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/ihp-blog/Web/View/Posts/Show.hs | haskell | module Web.View.Posts.Show where
import Web.View.Prelude
data ShowView = ShowView {post :: Include "comments" Post}
instance View ShowView where
html ShowView {..} =
[hsx|
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href={PostsAction}>Posts</a></li>
... | |
3df202367e86ac0fc7505aed4769427312268ddfa0fb8780607ae8596cc8ade3 | ReilySiegel/clojure-sheets | key_fns.cljc | (ns clojure-sheets.key-fns
(:require [clojure.string :as str]))
(defn make-keyword [parts]
(let [ns (butlast parts)
n (last parts)]
(if ns
(keyword (str/join "." ns) n)
(keyword n))))
(defn idiomatic-keyword [header]
(-> header
(str/lower-case)
(str/replace #"\s+" "-")
... | null | https://raw.githubusercontent.com/ReilySiegel/clojure-sheets/f084c8cff8b8fb7698ffad8fbce2d23a31d307c5/src/clojure_sheets/key_fns.cljc | clojure | (ns clojure-sheets.key-fns
(:require [clojure.string :as str]))
(defn make-keyword [parts]
(let [ns (butlast parts)
n (last parts)]
(if ns
(keyword (str/join "." ns) n)
(keyword n))))
(defn idiomatic-keyword [header]
(-> header
(str/lower-case)
(str/replace #"\s+" "-")
... | |
cc22e5546055a8615200357fadf68f4ab8268310ea2e053ce789a620ac194091 | lorepub/moot | Main.hs | module Main where
import Prelude
import Model
main :: IO ()
main = do
runDevDB runMigrations
| null | https://raw.githubusercontent.com/lorepub/moot/793c72d046762ec01a250416667e041b35eec7f8/app/migration/Main.hs | haskell | module Main where
import Prelude
import Model
main :: IO ()
main = do
runDevDB runMigrations
| |
5be428acc2cc8c4bb7d1ded82a67843381d2a75d743078649e30854d1547d3c2 | daslu/tenzing-re-frame-todomvc | app.cljs | (ns tenzing-re-frame-todomvc.app
(:require-macros [secretary.core :refer [defroute]])
(:require [goog.events :as events]
[reagent.core :as reagent :refer [atom]]
[re-frame.core :refer [dispatch dispatch-sync]]
[secretary.core :as secretary]
[tenzing-re-frame-todomvc.h... | null | https://raw.githubusercontent.com/daslu/tenzing-re-frame-todomvc/3ac0711c8a22ddd3e0642c7d2d47a70d7c6dcc38/src/cljs/tenzing_re_frame_todomvc/app.cljs | clojure | -- Routing -----------------------------------------------------------------
-- Entry Point ------------------------------------------------------------- | (ns tenzing-re-frame-todomvc.app
(:require-macros [secretary.core :refer [defroute]])
(:require [goog.events :as events]
[reagent.core :as reagent :refer [atom]]
[re-frame.core :refer [dispatch dispatch-sync]]
[secretary.core :as secretary]
[tenzing-re-frame-todomvc.h... |
af4e4455fcb2c13cb86d7a7b3a0ab0e97726f8b0cfeaddb5794cb115825f9673 | expipiplus1/vulkan | ExternalMemoryHandleTypeFlagBits.hs | {-# language CPP #-}
-- No documentation found for Chapter "ExternalMemoryHandleTypeFlagBits"
module Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits ( ExternalMemoryHandleTypeFlags
, ExternalMemoryHandleTypeFlagBits( EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_F... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Core11/Enums/ExternalMemoryHandleTypeFlagBits.hs | haskell | # language CPP #
No documentation found for Chapter "ExternalMemoryHandleTypeFlagBits"
| VkExternalMemoryHandleTypeFlagBits - Bit specifying external memory
handle types
= Description
Some external memory handle types can only be shared within the same
underlying physical device and\/or the same driver version,... | module Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits ( ExternalMemoryHandleTypeFlags
, ExternalMemoryHandleTypeFlagBits( EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT
... |
d16c29c99b28dc3e3a7a0d4b26da08dee4abf1d66d91c67b8671051022b99f79 | ds-wizard/engine-backend | Detail_GET.hs | module Registry.Specs.API.DocumentTemplate.Detail_GET (
detail_get,
) where
import Data.Aeson (encode)
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith)
import Test.Hspec.Wai.Matcher
import Registry.Api.Resource.DocumentTemplate.DocumentTem... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-registry/test/Registry/Specs/API/DocumentTemplate/Detail_GET.hs | haskell | ------------------------------------------------------------------------
GET /document-templates/{documentTemplateId}
------------------------------------------------------------------------
----------------------------------------------------
----------------------------------------------------
-----------------... | module Registry.Specs.API.DocumentTemplate.Detail_GET (
detail_get,
) where
import Data.Aeson (encode)
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith)
import Test.Hspec.Wai.Matcher
import Registry.Api.Resource.DocumentTemplate.DocumentTem... |
97402f9249c1063ce67d25c6779244f0dcbbc030f46ccc8554def7d604ccc18b | ghcjs/ghcjs-dom-hello | WKWebView.hs | module Main (
main
) where
import Language.Javascript.JSaddle.WKWebView (run)
import HelloMain (helloMain)
main :: IO ()
main = run helloMain
| null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom-hello/48c6c65409fcddd531f0bbdbaf0658eab88e3385/src-bin/WKWebView.hs | haskell | module Main (
main
) where
import Language.Javascript.JSaddle.WKWebView (run)
import HelloMain (helloMain)
main :: IO ()
main = run helloMain
| |
3f792d09e568380f481dddd1cdf55478f942fe36cbff19745f6bae342fba74df | otabat/couchbase-clj | future.clj | (ns couchbase-clj.future
(:import [java.util.concurrent Future TimeUnit TimeoutException]
[net.spy.memcached CASResponse]
[net.spy.memcached.internal BulkGetFuture GetFuture OperationFuture]
[com.couchbase.client CouchbaseConnectionFactory]
[com.couchbase.client.internal Ht... | null | https://raw.githubusercontent.com/otabat/couchbase-clj/5f975dc85d0eec554034eefa9d97f1ee7ad9e84a/src/couchbase_clj/future.clj | clojure | (ns couchbase-clj.future
(:import [java.util.concurrent Future TimeUnit TimeoutException]
[net.spy.memcached CASResponse]
[net.spy.memcached.internal BulkGetFuture GetFuture OperationFuture]
[com.couchbase.client CouchbaseConnectionFactory]
[com.couchbase.client.internal Ht... | |
a7c12482e0426348a62cfa574af7475a0dc4c563ac326bc4d71a336566cb0eba | ocaml-multicore/ocaml-tsan | rotor_example.ml | (* TEST
flags = "-dshape"
* expect
*)
We depart slightly from the example in the PLDI'19 paper , which actually
does n't type ...
doesn't type... *)
module type Stringable = sig
type t
val to_string : t -> string
end
[%%expect{|
{
"Stringable"[module type] -> <.2>;
}
module type Stringable = sig... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/shapes/rotor_example.ml | ocaml | TEST
flags = "-dshape"
* expect
|
We depart slightly from the example in the PLDI'19 paper , which actually
does n't type ...
doesn't type... *)
module type Stringable = sig
type t
val to_string : t -> string
end
[%%expect{|
{
"Stringable"[module type] -> <.2>;
}
module type Stringable = sig type t val to_string : t -> string end
|}]
... |
25b468ea4d5b0f2b46774247075bd49dcdc0698ea54202714ba1e7a44b44d3b4 | rbkmoney/erlang_capi_v2 | capi_client_searches.erl | -module(capi_client_searches).
-export([search_invoices/3]).
-export([search_payments/3]).
-export([search_refunds/3]).
-export([search_payouts/3]).
-type context() :: capi_client_lib:context().
-type search_query() :: capi_client_lib:search_query().
-spec search_invoices(context(), binary(), search_query()) -> {ok,... | null | https://raw.githubusercontent.com/rbkmoney/erlang_capi_v2/438d0a603475c57dddade8c419f0d70fdf86438d/apps/capi_client/src/capi_client_searches.erl | erlang | -module(capi_client_searches).
-export([search_invoices/3]).
-export([search_payments/3]).
-export([search_refunds/3]).
-export([search_payouts/3]).
-type context() :: capi_client_lib:context().
-type search_query() :: capi_client_lib:search_query().
-spec search_invoices(context(), binary(), search_query()) -> {ok,... | |
ea5e0a3bac1f1f52aa205e62f0165f258bac2687ce148aeed0564d8ef5914e2c | clojure/clojurescript | foo.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/0572fd555b01d4b0ea51acce75c32951a43434f2/src/test/cljs/cljs/ns_test/foo.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.ns-test.foo
(:require [cljs.test :refer-macros [deftest is]]
[made.up.lib :as-alias lib]))
(defn baz [] 123)
(def kw ::foo)
(def qkw '::foo)
(deftest test-namespaced-keywords
(is (= (str kw) ":cljs.ns-test... |
94b044eb488f5184edfd72fddbd633211bee85470ff440c470e715826b9da25a | duncanatt/detecter | hello_erlang_sup.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020
%%% @version 0.9
%%%
%%% @doc
%%%
%%% @end
Created : 26 . Sep 2020
%%%
Copyright ( c ) 2020 < >
%%%
%%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Gener... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowboy_apps/hello/hello_erlang_sup.erl | erlang | -------------------------------------------------------------------
@version 0.9
@doc
@end
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the impl... | @author
( C ) 2020
Created : 26 . Sep 2020
Copyright ( c ) 2020 < >
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(hello_erlang_sup... |
808eb2aaec93e84097c7bda2070916fc425afedae04146d84542df8dc1e2ed14 | ecraven/r7rs-benchmarks | Petite-prelude.scm | (import
(only (chezscheme)
current-time
machine-type
scheme-version-number
time-nanosecond
time-second)
(except
(rename (rnrs) (define-record-type r6rs:define-record-type))
bitwise-and
bitwise-not
div
mod
partition)
(rnrs mutable-pairs)
(rnrs mutable-strings)
(rnrs ... | null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Petite-prelude.scm | scheme | Simplistic R7RS to R6RS define-record-type transformation. | (import
(only (chezscheme)
current-time
machine-type
scheme-version-number
time-nanosecond
time-second)
(except
(rename (rnrs) (define-record-type r6rs:define-record-type))
bitwise-and
bitwise-not
div
mod
partition)
(rnrs mutable-pairs)
(rnrs mutable-strings)
(rnrs ... |
22440139f99f3e8885abe290c826c5c8bc5193daf12994a858a649813663b0e6 | oofp/Beseder | BoolHelper.hs | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies #-... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Utils/BoolHelper.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances # | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE FunctionalDependencies #
#... |
5f1cedad93d9f134152a9c4bae355af8413d48925935d95ee35e376927f40a68 | jaked/ooauth | myocamlbuild.ml | open Ocamlbuild_plugin
ocamlfind integration following
(* these functions are not really officially exported *)
let run_and_read = Ocamlbuild_pack.My_unix.run_and_read
let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings
(* this lists all supported packages *)
let find_packages () =
blank_sep_string... | null | https://raw.githubusercontent.com/jaked/ooauth/8fa9d19570c7c5dea1036b5e9f5bbd945e51166d/myocamlbuild.ml | ocaml | these functions are not really officially exported
this lists all supported packages
ocamlfind command
override default commands by ocamlfind ones | open Ocamlbuild_plugin
ocamlfind integration following
let run_and_read = Ocamlbuild_pack.My_unix.run_and_read
let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings
let find_packages () =
blank_sep_strings &
Lexing.from_string &
run_and_read "ocamlfind list | cut -d' ' -f1"
let ocamlfind x... |
bfca1b3bb1c164221fb56a0a7fc9585b5063fd2d00fbcc6b7a19b1c74cc3ce39 | dparis/cooler | gcra.clj | (ns cooler.rate-limiter.gcra
"Implementation of GCRA rate limiting algorithm. For more details,
see the following links:
* -limiting
*
*
Credit to Brandur Leach and Andrew Metcalf for their work in implementing
GCRA in the throttled library, upon which this implementation is based."
(:require [coole... | null | https://raw.githubusercontent.com/dparis/cooler/38b2efb3c4efb32d1b3d03c70176f690555f94d1/src/cooler/rate_limiter/gcra.clj | clojure | If tat-val is nil, a tat has not been set for k in store.
When tat-val is nil, attempt to init the tat for k.
If init-tat! fails, attempt perform-rate-limit! again.
When tat-val is not nil, attempt to update tat. | (ns cooler.rate-limiter.gcra
"Implementation of GCRA rate limiting algorithm. For more details,
see the following links:
* -limiting
*
*
Credit to Brandur Leach and Andrew Metcalf for their work in implementing
GCRA in the throttled library, upon which this implementation is based."
(:require [coole... |
3e4d8dc09ef453004fd151953e8002ec5ca166366a683ed4c0f139047a00d547 | danicuki/Erlang-Chat | lib_chan_auth.erl | %% ---
Excerpted from " Programming Erlang " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for any purpose.
%%... | null | https://raw.githubusercontent.com/danicuki/Erlang-Chat/386e4cc52956f014a8f1dcf3f4d5741baf7220ed/chat/lib_chan_auth.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
random_string(N) -> a random string with N characters. | Excerpted from " Programming Erlang " ,
published by The Pragmatic Bookshelf .
-module(lib_chan_auth).
-export([make_challenge/0, make_response/2, is_response_correct/3]).
make_challenge() ->
random_string(25).
make_response(Challenge, Secret) ->
lib_md5:string(Challenge ++ Secret).
is_response_correc... |
770bef2079b9a02f9a69beece4a5162176e48dcb8179cfadb059e6ac9e64e6e5 | unisonweb/unison | FoldingRange.hs | # LANGUAGE DataKinds #
module Unison.LSP.FoldingRange where
import Control.Lens hiding (List)
import Language.LSP.Types hiding (line)
import Language.LSP.Types.Lens hiding (id, to)
import qualified Unison.ABT as ABT
import qualified Unison.DataDeclaration as DD
import qualified Unison.Debug as Debug
import Unison.LSP... | null | https://raw.githubusercontent.com/unisonweb/unison/ff2ec98e30007ac109cf1e5843b411e48546eb73/unison-cli/src/Unison/LSP/FoldingRange.hs | haskell | | Return a folding range for each top-level definition
constructors using their monoid instance. | # LANGUAGE DataKinds #
module Unison.LSP.FoldingRange where
import Control.Lens hiding (List)
import Language.LSP.Types hiding (line)
import Language.LSP.Types.Lens hiding (id, to)
import qualified Unison.ABT as ABT
import qualified Unison.DataDeclaration as DD
import qualified Unison.Debug as Debug
import Unison.LSP... |
e3809114987a298a717f2112ee484aa4ac531169c529a3f4ae73d9a91707d2f6 | patoline/patoline | Badness.ml |
Copyright Florian Hatat , , ,
Pierre - Etienne Meunier , , 2012 .
This file is part of Patoline .
Patoline 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 th... | null | https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/typography/Badness.ml | ocaml | let _=Graphics.wait_next_event [Graphics.Key_pressed] in |
Copyright Florian Hatat , , ,
Pierre - Etienne Meunier , , 2012 .
This file is part of Patoline .
Patoline 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 th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.