_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 |
|---|---|---|---|---|---|---|---|---|
5f2aec1c1e65a90bacae31370b2757e99b0537e9874274d20682ab415a52be2b | slepher/lenses | iso_test_SUITE.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2017 ,
%%% @doc
%%%
%%% @end
Created : 20 Oct 2017 by < >
%%%-------------------------------------------------------------------
-module(iso_test_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl"... | null | https://raw.githubusercontent.com/slepher/lenses/3f979746e2c570d4808cce7106ac8b2110eed5c1/test/iso_test_SUITE.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
Info = [tuple()]
@end
--------------------------------------------------------------------
---------... | @author < >
( C ) 2017 ,
Created : 20 Oct 2017 by < >
-module(iso_test_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
@spec suite ( ) - > Info
suite() ->
[{timetrap,{seconds,30}}].
@spec init_per_suite(Config0 ) - >
Con... |
717e7ae5816f70de2f19c54b41b1135646a72faa71aaf78743abb6fe8c427f45 | MassD/99 | p4.ml |
Find the number of elements of a list . ( easy )
OCaml standard library has but we ask that you reimplement it . Bonus for a tail recursive solution .
Find the number of elements of a list. (easy)
OCaml standard library has List.length but we ask that you reimplement it. Bonus for a tail recursive solution.... | null | https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/1-28-lists/p4.ml | ocaml |
Find the number of elements of a list . ( easy )
OCaml standard library has but we ask that you reimplement it . Bonus for a tail recursive solution .
Find the number of elements of a list. (easy)
OCaml standard library has List.length but we ask that you reimplement it. Bonus for a tail recursive solution.... | |
384c5c046424750a4da85b517345d1a50681d367b27a39329dd38f9496723dcf | joelburget/lvca | Binding_aware_pattern.ml | open Base
open Lvca_provenance
open Option.Let_syntax
module Util = Lvca_util
module String = Util.String
module Format = Stdlib.Format
module SMap = Util.String.Map
module Tuple2 = Util.Tuple2
module Term = Nominal.Term
module Scope = Nominal.Scope
let ( >> ) = Lvca_util.(( >> ))
module Capture_type = struct
type ... | null | https://raw.githubusercontent.com/joelburget/lvca/c5a13f2c5403a6ac4f9a0b71907632d4dd52039d/syntax/Binding_aware_pattern.ml | ocaml | TODO: error
TODO: error
TODO: kind check
Check the body with the new binders environment
0123456
012345678901
012345678901 | open Base
open Lvca_provenance
open Option.Let_syntax
module Util = Lvca_util
module String = Util.String
module Format = Stdlib.Format
module SMap = Util.String.Map
module Tuple2 = Util.Tuple2
module Term = Nominal.Term
module Scope = Nominal.Scope
let ( >> ) = Lvca_util.(( >> ))
module Capture_type = struct
type ... |
85187c4d3a27683abb164461bcc90d96d3665456e9740a1e54e8a7efe7872c3a | into-docker/pem-reader | core.clj | (ns pem-reader.core
(:refer-clojure :exclude [read])
(:require [pem-reader.readers
[pkcs1 :refer [read-pkcs1-spec]]]
[pem-reader
[parse :refer [parse-pem]]
[rsa :as rsa]]
[clojure.java.io :as io])
(:import (java.security
KeyPair
... | null | https://raw.githubusercontent.com/into-docker/pem-reader/1b66040d3530c9fb5e08da15494e338efcda144c/src/pem_reader/core.clj | clojure | ## Readers | (ns pem-reader.core
(:refer-clojure :exclude [read])
(:require [pem-reader.readers
[pkcs1 :refer [read-pkcs1-spec]]]
[pem-reader
[parse :refer [parse-pem]]
[rsa :as rsa]]
[clojure.java.io :as io])
(:import (java.security
KeyPair
... |
700385f8d913354c2999098e97791841f3646b93e7f656aba08f988cef88edd9 | LadyBoonami/wsedit | ParserSpec.hs | module WSEdit.Arguments.ParserSpec (spec) where
import Test.Hspec
import Test.QuickCheck
import Text.Parsec
import WSEdit.Data
import WSEdit.Arguments.Data
import WSEdit.Arguments.Parser
import Base
testBase :: CanonicalPath
testBase = CanonicalPath "/usr"
testParser :: WSParser a -> String -> Either ParseError... | null | https://raw.githubusercontent.com/LadyBoonami/wsedit/e836b81b743123df2fa21470072ccd5ee1083ee4/test/WSEdit/Arguments/ParserSpec.hs | haskell | module WSEdit.Arguments.ParserSpec (spec) where
import Test.Hspec
import Test.QuickCheck
import Text.Parsec
import WSEdit.Data
import WSEdit.Arguments.Data
import WSEdit.Arguments.Parser
import Base
testBase :: CanonicalPath
testBase = CanonicalPath "/usr"
testParser :: WSParser a -> String -> Either ParseError... | |
eafe4f7f29ab27b439e19808ba2453923291c3a02c304083548572e1cf411b20 | hanazuki/miniml | assertion.ml | open OUnit
let assert_type typ exp =
let result, _ = Interpret.interpretmany_string Prelude.env exp in
let _, ty, _ = List.hd result in
assert_equal typ (Typing.string_of_ty ty)
let assert_value vstr exp =
let result, _ = Interpret.interpretmany_string Prelude.env exp in
let _, _, v = List.hd result in
as... | null | https://raw.githubusercontent.com/hanazuki/miniml/012f268b4d3bb91d234eaa941b0e7bf58a0dd7cc/test/assertion.ml | ocaml | open OUnit
let assert_type typ exp =
let result, _ = Interpret.interpretmany_string Prelude.env exp in
let _, ty, _ = List.hd result in
assert_equal typ (Typing.string_of_ty ty)
let assert_value vstr exp =
let result, _ = Interpret.interpretmany_string Prelude.env exp in
let _, _, v = List.hd result in
as... | |
05747516ba51c2afed66555bdedda7a4c5715c76cc5bc4287fc45c5dd6d10e90 | khibino/haskell-relational-record | ContextType.hs | {-# LANGUAGE EmptyDataDecls #-}
-- |
Module : Database . Relational . Internal . ContextType
Copyright : 2013 - 2017
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- This module defines query context tag types.
module Database.Relational.Internal.Co... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/Internal/ContextType.hs | haskell | # LANGUAGE EmptyDataDecls #
|
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module defines query context tag types.
| Type tag for flat (not-aggregated) query
| Type tag for aggregated query
| Type tag for exists predicate
| Type tag for window function building
| ... |
Module : Database . Relational . Internal . ContextType
Copyright : 2013 - 2017
module Database.Relational.Internal.ContextType (
Flat, Aggregated, Exists, OverWindow,
Set, SetList, Power,
) where
data Flat
data Aggregated
data Exists
data OverWindow
data Set
data SetList
data Power
|
a50357e20d60956bdeec930f384e73ffa18b8c3703f3ef5bfa33310b86f2338f | vii/dysfunkycom | stefil.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; -*-
;;;
Copyright ( c ) 2006 by the authors .
;;;
;;; See LICENCE for details.
(in-package :stefil)
#.(file-header)
Warning : setf - ing these variables in not a smart idea because other systems may rely on their default value .
It 's smarter to rebind them in an : arou... | null | https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/stefil/_darcs/pristine/stefil.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; -*-
See LICENCE for details.
their keyword counterparts.
this is not thread-safe, but...
conditions
some classes
make sure the specialized writer below is triggered
test repository
the real thing
index in the ~[] conditional
drop failures recorded by the previous ru... | Copyright ( c ) 2006 by the authors .
(in-package :stefil)
#.(file-header)
Warning : setf - ing these variables in not a smart idea because other systems may rely on their default value .
It 's smarter to rebind them in an : around method from your .asd or shadow stefil : deftest with your own that sets
(defva... |
556965fe8b702e0a8ea0910c678178cfc563772ae20466aca240d41610ed0381 | privet-kitty/cl-competitive | undoable-disjoint-set.lisp | (defpackage :cp/test/undoable-disjoint-set
(:use :cl :fiveam :cp/undoable-disjoint-set)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/undoable-disjoint-set)
(in-suite base-suite)
(define-undoable-disjoint-set undoable-disjoint-set
:element-type double-float
:identity 0d0
:operator #'max
:... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/undoable-disjoint-set.lisp | lisp | FIXME: more organized manual test or randomized test
state 0
state 0
undo empty record | (defpackage :cp/test/undoable-disjoint-set
(:use :cl :fiveam :cp/undoable-disjoint-set)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/undoable-disjoint-set)
(in-suite base-suite)
(define-undoable-disjoint-set undoable-disjoint-set
:element-type double-float
:identity 0d0
:operator #'max
:... |
d366770e9f9e8dac382b3690c137b19b8e2d0e5a682a577b0d1a7aad25664538 | Enecuum/Node | Dump.hs | module Enecuum.Samples.Assets.Nodes.GraphService.DB.Dump where
import Enecuum.Prelude
import qualified Enecuum.Samples.Blockchain.DB as D
import qualified Enecuum.Samples.Blockchain.DB.Lens as Lens
import qualified Enecuum.Samples.Blockchain.Lens ... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Samples/Assets/Nodes/GraphService/DB/Dump.hs | haskell | module Enecuum.Samples.Assets.Nodes.GraphService.DB.Dump where
import Enecuum.Prelude
import qualified Enecuum.Samples.Blockchain.DB as D
import qualified Enecuum.Samples.Blockchain.DB.Lens as Lens
import qualified Enecuum.Samples.Blockchain.Lens ... | |
bbe26c23116d695a67af3b337148ee0bc7616637394cb23d9f1f1960f1b0924d | jeffshrager/biobike | staphylococcus-data.lisp | ;;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: bbi; -*-
(IN-PACKAGE :bbi)
(defmethod vpl-data-menu-variables
((instance cl-user:biolingua)
(organism-descriptor (eql :staphylococcus)))
(append
*common-vpl-data-menu-variables*
;; put any variables specific to staphylococcus in a qu... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/bike/staphylococcus-data.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: bbi; -*-
put any variables specific to staphylococcus in a quoted list here |
(IN-PACKAGE :bbi)
(defmethod vpl-data-menu-variables
((instance cl-user:biolingua)
(organism-descriptor (eql :staphylococcus)))
(append
*common-vpl-data-menu-variables*
nil
))
(defmethod organism-subset-variables ((descriptor (eql :staphylococcus)))
(copy-list
'(*all-staphyl... |
aaf7953594aed136ac95c33d28b67cd22a9b97ee4401175baca9b100f1fad661 | programaker-project/Programaker-Core | automate_bot_engine.erl | %%%-------------------------------------------------------------------
%% @doc automate_bot_engine public
%% @end
%%%-------------------------------------------------------------------
-module(automate_bot_engine).
%% Application callbacks
-export([ stop_program_threads/1
, change_program_status/2
... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/10625e7f5d639f2b062ff9536d7226f23c005d0d/backend/apps/automate_bot_engine/src/automate_bot_engine.erl | erlang | -------------------------------------------------------------------
@doc automate_bot_engine public
@end
-------------------------------------------------------------------
Application callbacks
|
-module(automate_bot_engine).
-export([ stop_program_threads/1
, change_program_status/2
, get_user_from_pid/1
, get_bridges_on_program/1
, get_user_generated_logs/1
]).
-include("../../automate_storage/src/records.hrl").
-spec stop_program_threads(binary()) -> ok... |
eef8954a1e74fa640edff91aa41cc94a364df7fd23b6666d19458b373221f98f | ds-wizard/engine-backend | LocaleCreateDTO.hs | module Wizard.Api.Resource.Locale.LocaleCreateDTO where
import qualified Data.ByteString.Char8 as BS
import GHC.Generics
data LocaleCreateDTO = LocaleCreateDTO
{ name :: String
, description :: String
, code :: String
, localeId :: String
, version :: String
, license :: String
, readme :: String
, re... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Resource/Locale/LocaleCreateDTO.hs | haskell | module Wizard.Api.Resource.Locale.LocaleCreateDTO where
import qualified Data.ByteString.Char8 as BS
import GHC.Generics
data LocaleCreateDTO = LocaleCreateDTO
{ name :: String
, description :: String
, code :: String
, localeId :: String
, version :: String
, license :: String
, readme :: String
, re... | |
d899e4409ef592cd8041122e93bd023ecd3a65f074132aeb1a214c6d3a610030 | unisonweb/unison | Serialization.hs | {-# LANGUAGE RankNTypes #-}
module Unison.Codebase.Serialization where
import Data.ByteString (ByteString, readFile, writeFile)
import Data.Bytes.Get (MonadGet, runGetS)
import Data.Bytes.Put (MonadPut, runPutS)
import System.FilePath (takeDirectory)
import UnliftIO (MonadIO, liftIO)
import UnliftIO.Directory (create... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/Codebase/Serialization.hs | haskell | # LANGUAGE RankNTypes #
todo: do we use this? |
module Unison.Codebase.Serialization where
import Data.ByteString (ByteString, readFile, writeFile)
import Data.Bytes.Get (MonadGet, runGetS)
import Data.Bytes.Put (MonadPut, runPutS)
import System.FilePath (takeDirectory)
import UnliftIO (MonadIO, liftIO)
import UnliftIO.Directory (createDirectoryIfMissing, doesFile... |
70a7777d168853edd6ece88099b8a78d1d62cbe8247469b2012e87b0212c93cb | AbstractMachinesLab/caramel | char.ml | include Stdlib.Char
let is_digit = function
| '0' .. '9' -> true
| _non_digit_char -> false
let is_lowercase_hex = function
| '0' .. '9'
| 'a' .. 'f' ->
true
| _non_lowercase_hex_char -> false
| null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/char.ml | ocaml | include Stdlib.Char
let is_digit = function
| '0' .. '9' -> true
| _non_digit_char -> false
let is_lowercase_hex = function
| '0' .. '9'
| 'a' .. 'f' ->
true
| _non_lowercase_hex_char -> false
| |
01daa9c56a2409b92f54cb6cae95499c4bcebe7bafebff1edf055fb7d3d36efa | owlbarn/owl_symbolic | onnx_types.ml | [@@@ocaml.warning "-27-30-39"]
type version =
| Start_version
| Ir_version_2017_10_10
| Ir_version_2017_10_30
| Ir_version_2017_11_3
| Ir_version_2019_1_22
| Ir_version_2019_3_18
| Ir_version
type attribute_proto_attribute_type =
| Undefined
| Float
| Int
| String
| Tensor
| Graph
| Sparse... | null | https://raw.githubusercontent.com/owlbarn/owl_symbolic/dc853a016757d3f143c5e07e50075e7ae605d969/src/onnx_specs/onnx_types.ml | ocaml | [@@@ocaml.warning "-27-30-39"]
type version =
| Start_version
| Ir_version_2017_10_10
| Ir_version_2017_10_30
| Ir_version_2017_11_3
| Ir_version_2019_1_22
| Ir_version_2019_3_18
| Ir_version
type attribute_proto_attribute_type =
| Undefined
| Float
| Int
| String
| Tensor
| Graph
| Sparse... | |
974f3ca0b7fbe0a23b987d13878c534bd0308fa4bff0cf85e94c7dc2dac077b4 | jaspervdj/advent-of-code | 21.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
import Control.Monad (foldM)
import qualified Data.Bits as Bits
import qualified Data.... | null | https://raw.githubusercontent.com/jaspervdj/advent-of-code/75f426c4fc149cf6ab5fb6d95c96f3132097bdfd/2017/21.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
------------------------------------------------------------------------------
| A square grid.
| Print a grid in human-readable notation.
| Count the number of 'True's in a boolean grid.
-----... | # LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
import Control.Monad (foldM)
import qualified Data.Bits as Bits
import qualified Data.ByteString.Char8 as BC8
import qualified Data.IntMap as IM
import Data.List (foldl')
import qualified Data.V... |
5585568861c2080d62eb4cce6520913d67936c0e0cc1181b3e75024cde045763 | cram2/cram | axpy.lisp | Regression test AXPY for GSLL , automatically generated
;;
Copyright 2009 , 2011 , 2014
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Soft... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/axpy.lisp | lisp |
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 implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test AXPY for GSLL , automatically generated
Copyright 2009 , 2011 , 2014
Distributed under the terms of the GNU General Public License
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 recei... |
9bc8daf3ed5c8bea8f5fd6d2bb514dddd945d45e6bc9707a3abd917d7aff69f4 | penpot/penpot | exports.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.data.exports
(:require
[app.common.uuid :as uuid]
[app.main.data.modal :as modal]
[app... | null | https://raw.githubusercontent.com/penpot/penpot/746f4926322643f7b98b38379db7ef55db4e4de5/frontend/src/app/main/data/exports.cljs | clojure |
Copyright (c) KALEIDOS INC
only clear if the existing export is the same
best effort .
Launch the exportation process and stores the resource id
locally.
We proceed to update the export state with incoming
progress updates. We delay the stoper for give some time
to update the status with ended or errored statu... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.data.exports
(:require
[app.common.uuid :as uuid]
[app.main.data.modal :as modal]
[app.main.data.workspace.persistence ... |
3ecf9935e0e9565b765df96f1a3fdac4a2bd4bbcb45f4c86fad4be186a397615 | discus-lang/salt | Term.hs |
module Salt.Core.Eval.Term where
import Salt.Core.Eval.Type
import Salt.Core.Eval.Error
import Salt.Core.Eval.Base
import Salt.Core.Analysis.Support ()
import Salt.Core.Transform.StripAnnot
import qualified Salt.Core.Prim.Ops as Ops
import Control.Exception
import Control.Monad
import qualified Data.Map ... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Eval/Term.hs | haskell | ----------------------------------------------------------------------------------------- Term --
| Evaluate a term in the given environment.
This is a definitional interpreter that evaluates types as well as terms
for ill-formed terms, such as when we don't have the same number of field
names as field terms... |
module Salt.Core.Eval.Term where
import Salt.Core.Eval.Type
import Salt.Core.Eval.Error
import Salt.Core.Eval.Base
import Salt.Core.Analysis.Support ()
import Salt.Core.Transform.StripAnnot
import qualified Salt.Core.Prim.Ops as Ops
import Control.Exception
import Control.Monad
import qualified Data.Map ... |
110237a504c8136c1c642c16d1cbb6134ba67dde772b464d7a9b848354032961 | sinasamavati/leptus | leptus_debug_log.erl | Copyright ( c ) 2013 - 2015 Sina Samavati < >
%%
%% 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, me... | null | https://raw.githubusercontent.com/sinasamavati/leptus/e0d9bd2270dfa85bd5922e0a5c2d0289d2dc0ef9/src/leptus_debug_log.erl | erlang |
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 notice ... | Copyright ( c ) 2013 - 2015 Sina Samavati < >
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 ... |
3cac72b463fdfc270769fd47252452f8f78ad85b2723ae3c613c67e20172f827 | clojars/clojars-web | build_search_index.clj | (ns clojars.tools.build-search-index
(:gen-class)
(:require
[clojars.config :refer [config]]
[clojars.search :as search]
[clojars.system :as system]
[com.stuartsierra.component :as component]))
(defn -main [env]
(let [system (component/start (system/base-system (config (keyword env))))]
(search/g... | null | https://raw.githubusercontent.com/clojars/clojars-web/7e5723025251c7f301d56fcfb004c7634a39f686/src/clojars/tools/build_search_index.clj | clojure | (ns clojars.tools.build-search-index
(:gen-class)
(:require
[clojars.config :refer [config]]
[clojars.search :as search]
[clojars.system :as system]
[com.stuartsierra.component :as component]))
(defn -main [env]
(let [system (component/start (system/base-system (config (keyword env))))]
(search/g... | |
4c27bf24e23f1cc2640eb81df0c46a7adcf01d1e175b05f5dd806cf319fbb0e4 | FranklinChen/hugs98-plus-Sep2006 | Internals.hs | # OPTIONS_GHC -cpp -fffi #
-----------------------------------------------------------------------------
-- |
-- Module : System.Process.Internals
Copyright : ( c ) The University of Glasgow 2004
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : expe... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/System/Process/Internals.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Process.Internals
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
-------------------------------------------------------------... | # OPTIONS_GHC -cpp -fffi #
Copyright : ( c ) The University of Glasgow 2004
Operations for creating and interacting with sub - processes .
module System.Process.Internals (
#ifndef __HUGS__
ProcessHandle(..), ProcessHandle__(..),
PHANDLE, closePHANDLE, mkProcessHandle,
withProcessHandle, withProcessHandl... |
febe2a1c4eb31c2b83edd01d894839b0f57ed33d4c92e94fd3c0592a1cd033f2 | hopv/r_type | r_type.ml | open Core
open Lib
module Map = Identity.Map
module Typ = Type.RefType
let print_type_env type_env model =
Format.printf "Program is safe with types@.@." ;
let types = Cond.UnknownSubst.Map.empty in
Type.Env.assign_unknown type_env types |> Type.Env.to_string
|> Format.printf "%s" ;
if Poly.(model <> []) t... | null | https://raw.githubusercontent.com/hopv/r_type/7120b74912118a8eced8e63d1792907702e090dc/src/r_type.ml | ocaml | open Core
open Lib
module Map = Identity.Map
module Typ = Type.RefType
let print_type_env type_env model =
Format.printf "Program is safe with types@.@." ;
let types = Cond.UnknownSubst.Map.empty in
Type.Env.assign_unknown type_env types |> Type.Env.to_string
|> Format.printf "%s" ;
if Poly.(model <> []) t... | |
fc4965bb1bbff8fa5c0a78d73e9a0fb7b7b3641f4bfaf9aada62cea4a4d35ca3 | racket/deinprogramm | prim-ops.rkt | #reader scribble/reader
#lang scheme/base
(require scribblings/htdp-langs/common
scribble/decode
scribble/struct
scribble/scheme
scheme/list
scheme/pretty
syntax/docprovide)
(provide prim-ops
prim-op-defns)
(define (maybe-make-table l t)
(if (paragraph?... | null | https://raw.githubusercontent.com/racket/deinprogramm/e9fb68455641ae7d409ddb48f5e584c9d014ef4f/deinprogramm/deinprogramm/scribblings/prim-ops.rkt | racket | #reader scribble/reader
#lang scheme/base
(require scribblings/htdp-langs/common
scribble/decode
scribble/struct
scribble/scheme
scheme/list
scheme/pretty
syntax/docprovide)
(provide prim-ops
prim-op-defns)
(define (maybe-make-table l t)
(if (paragraph?... | |
b3e4e3c1cd79fdd6cc5f24b5bd54040791cd180359a54813d12417edc87bc470 | inconvergent/weird | kdtree.lisp |
(in-package :weir)
(deftype index-array () `(simple-array fixnum))
(defmacro -ind (a dim i leap)
`(the fixnum (+ (the fixnum (* ,dim (the fixnum (aref ,a ,i)))) ,leap)))
(defstruct (node (:constructor node (leap ind left right)))
(left nil :read-only t)
(right nil :read-only t)
(leap -1 :type fixnum :read-... | null | https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/src/weir/kdtree.lisp | lisp |
(in-package :weir)
(deftype index-array () `(simple-array fixnum))
(defmacro -ind (a dim i leap)
`(the fixnum (+ (the fixnum (* ,dim (the fixnum (aref ,a ,i)))) ,leap)))
(defstruct (node (:constructor node (leap ind left right)))
(left nil :read-only t)
(right nil :read-only t)
(leap -1 :type fixnum :read-... | |
70ceaed14289ad1ed9b94d02c5614878dd6bc50c9fcf78910168e12688b92e3e | ertugrulcetin/kezban | nnth_test.clj | (ns kezban.core.nnth-test
(:require [clojure.test :refer :all]
[kezban.core :refer :all]))
(deftest test-nil
(is (= (nnth nil 0) nil))
(is (= (nnth [] 0) nil))
(is (= (nnth '() 0) nil)))
(deftest test-like-nth
(is (= (nnth [0 1 2 3] 0) 0))
(is (= (nnth [0 1 2 3] 1) 1))
(is (= (nnth [0 1 2 3]... | null | https://raw.githubusercontent.com/ertugrulcetin/kezban/18d884b0ff10b967eb0e26d0a1553e12b45190f7/test/kezban/core/nnth_test.clj | clojure | (ns kezban.core.nnth-test
(:require [clojure.test :refer :all]
[kezban.core :refer :all]))
(deftest test-nil
(is (= (nnth nil 0) nil))
(is (= (nnth [] 0) nil))
(is (= (nnth '() 0) nil)))
(deftest test-like-nth
(is (= (nnth [0 1 2 3] 0) 0))
(is (= (nnth [0 1 2 3] 1) 1))
(is (= (nnth [0 1 2 3]... | |
e056ec873c739c4190ca5d79a5d67fe6ef97e88715bf0093ff228fa32ab9849d | sarabander/p2pu-sicp | 3.61.scm |
(define (invert-unit-series s)
(cons-stream
1 (mul-series (scale-stream (stream-cdr s) -1)
(invert-unit-series s))))
(print-n
(mul-series exp-series
(invert-unit-series exp-series))
12)
= > 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ...
(print-n
(mul-series cos-series
... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/3.5/3.61.scm | scheme |
(define (invert-unit-series s)
(cons-stream
1 (mul-series (scale-stream (stream-cdr s) -1)
(invert-unit-series s))))
(print-n
(mul-series exp-series
(invert-unit-series exp-series))
12)
= > 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ...
(print-n
(mul-series cos-series
... | |
1a9e0fafe46e0f826115ab150734877caab6efb20b76b77d343f58e0347779a7 | xtdb/xtdb | replicator_test.clj | (ns xtdb.replicator-test
(:require [clojure.java.io :as io]
[clojure.test :as t]
[cognitect.transit :as transit]
[xtdb.api :as xt]
[xtdb.fixtures :as fix]
[xtdb.replicator :as replicator])
(:import java.io.File))
(def ^:dynamic ^File *log-dir*)
(t/use-fi... | null | https://raw.githubusercontent.com/xtdb/xtdb/de2538fceaf3abe2840fcefa96e0ecbae4fb5443/modules/replicator/test/xtdb/replicator_test.clj | clojure | (ns xtdb.replicator-test
(:require [clojure.java.io :as io]
[clojure.test :as t]
[cognitect.transit :as transit]
[xtdb.api :as xt]
[xtdb.fixtures :as fix]
[xtdb.replicator :as replicator])
(:import java.io.File))
(def ^:dynamic ^File *log-dir*)
(t/use-fi... | |
38eb06b5fe8b72ef293d7aec11a9a1259c5d4933b28ae5fe45adfbdf994129bf | chetmurthy/ensemble | endpt.ml | (**************************************************************)
ENDPT.ML
Author : , 7/95
(**************************************************************)
open Trans
open Util
(**************************************************************)
let name = Trace.file "ENDPT"
let failwith = Trace.make_failwith name
(**... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/type/endpt.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
anonymous endpoints
named endpoints
externally named
*****************... | ENDPT.ML
Author : , 7/95
open Trans
open Util
let name = Trace.file "ENDPT"
let failwith = Trace.make_failwith name
type id =
type full = id * Addr.set
let id u = Anon(Unique.id u)
let named u s = Named((Unique.id u),s)
let extern unique_string = External unique_string
let string_of_id = function
| Anon id... |
0f6795d35031d0c57c06d4a4309906fe72efc887d35c568b5ed0c929fc1f2798 | herbelin/coq-hh | ppvernac.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/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/parsing/ppvernac.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/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Genarg
open Vern... |
afae4f7d7bfa48922b4d0343cb4cc61b01fb3fd80c3503315a40385da704d687 | protolude/protolude | Either.hs | # LANGUAGE CPP #
{-# LANGUAGE Safe #-}
# LANGUAGE NoImplicitPrelude #
module Protolude.Either (
maybeToLeft
, maybeToRight
, leftToMaybe
, rightToMaybe
, maybeEmpty
, maybeToEither
, fromLeft
, fromRight
) where
import Data.Function (const)
import Data.Monoid (Monoid, mempty)
import Data.Maybe (Maybe(Nothing, Just)... | null | https://raw.githubusercontent.com/protolude/protolude/e613ed4dd20b7b860fca326e11269af2104a196e/src/Protolude/Either.hs | haskell | # LANGUAGE Safe #
| Return the contents of a 'Right'-value or a default value otherwise.
| Return the contents of a 'Right'-value or a default value otherwise. | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
module Protolude.Either (
maybeToLeft
, maybeToRight
, leftToMaybe
, rightToMaybe
, maybeEmpty
, maybeToEither
, fromLeft
, fromRight
) where
import Data.Function (const)
import Data.Monoid (Monoid, mempty)
import Data.Maybe (Maybe(Nothing, Just), maybe)
import Data.E... |
f7f327ae9411937572e6f650c8fbe65e0c390c43c05090f33efa2870bfde5678 | geophf/1HaskellADay | Solution.hs | {-# LANGUAGE OverloadedStrings #-}
module Y2021.M01.D22.Solution where
import Control.Arrow ((&&&))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Foldable (toList)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
import Data.Set (Set)
import ... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2021/M01/D22/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
}
same drill: load in the JSON file
}
cool! How many unique countries are in the wiki data set?
}
Okay, for the graph database: how many unique countries does it have?
do the magic to extract a set of countries from the graph
}
Now: how many countries intersect?
}
How many countries... |
module Y2021.M01.D22.Solution where
import Control.Arrow ((&&&))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Foldable (toList)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
import Data.Set (Set)
import qualified Data.Set as Set
import G... |
0384f612ee5d0fb745772274bdc159336fcdaf34c778d76a63da4c89aa10e872 | CorticalComputer/Book_NeuroevolutionThroughErlang | tuning_selection.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_17/tuning_selection.erl | erlang |
All rights reserved.
io:format("ChosenN_IdPs:~p~n",[ChosenN_IdPs]),
that the number will be = < 2 , 25 % that it will be > = 2 , 11 % that it will be > =3 ... Everytime this selection function is executed , the AgeLimit is generated anew , thus different times it will produce different neuron i d pools for tuning .
... | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(t... |
15c7327ca8ada5290970162940aaadb0c5ca50d29a73f1fbd03a78cf02281b0e | berberman/arch-hs | Hackage.hs | # LANGUAGE TypeApplications #
| Copyright : ( c ) 2020 - 2021 berberman
SPDX - License - Identifier : MIT
Maintainer : < >
-- Stability: experimental
-- Portability: portable
-- This module provides functions operating with 'HackageDB' and 'GenericPackageDescription'.
module Distribution.ArchHs.Hackage
( loo... | null | https://raw.githubusercontent.com/berberman/arch-hs/94ad1bd361ebb40be5ce82b357a4df3ea4cea823/src/Distribution/ArchHs/Hackage.hs | haskell | Stability: experimental
Portability: portable
This module provides functions operating with 'HackageDB' and 'GenericPackageDescription'.
| Look up hackage tarball path from @~/.cabal@.
Arbitrary hackage mirror is potential to be selected.
Preferred to @01-index.tar@, whereas fallback to @00-index.tar@.
| Read an... | # LANGUAGE TypeApplications #
| Copyright : ( c ) 2020 - 2021 berberman
SPDX - License - Identifier : MIT
Maintainer : < >
module Distribution.ArchHs.Hackage
( lookupHackagePath,
loadHackageDB,
insertDB,
parseCabalFile,
getLatestCabal,
getCabal,
getPackageFlag,
traverseHackage,
... |
1ecd4d4242f30e80a891a6f93d79da6867c75d062870b611c757616b25ecfbb0 | AbstractMachinesLab/caramel | either0.mli | * @since
type ('f, 's) t = First of 'f | Second of 's
| null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocamlformat-0.17.0/vendor/compat/either0.mli | ocaml | * @since
type ('f, 's) t = First of 'f | Second of 's
| |
d0d5b17dda522a27df0415dff2a7e09ecdd742c6757104dfd6a40aeb4616280f | KingoftheHomeless/in-other-words | Derive.hs | # OPTIONS_HADDOCK not - home #
-- | Module exporting typical type classes that are newtype-derived by Carriers
module Control.Effect.Internal.Derive
( Alternative, MonadPlus
, MonadFix, Fail.MonadFail, MonadIO
, MonadThrow, MonadCatch, MonadMask
, MonadBase, MonadBaseControl
, MonadTrans, MonadTransControl
... | null | https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/9c864c81beb4fdf71d363b6962db5c90275c57ef/src/Control/Effect/Internal/Derive.hs | haskell | | Module exporting typical type classes that are newtype-derived by Carriers | # OPTIONS_HADDOCK not - home #
module Control.Effect.Internal.Derive
( Alternative, MonadPlus
, MonadFix, Fail.MonadFail, MonadIO
, MonadThrow, MonadCatch, MonadMask
, MonadBase, MonadBaseControl
, MonadTrans, MonadTransControl
, IdentityT(..)
) where
TODO(KingoftheHomeless ? ): Make a TH macro which m... |
12f92f7d49b669afba9d35da8307dca4f54e0618eb8480f4cdee2efeb723c9f8 | locusmath/locus | algebraic.clj | (ns locus.set.copresheaf.topoi.copresheaf.algebraic
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/copresheaf/topoi/copresheaf/algebraic.clj | clojure | Graph category
Graphs as disets
Even though they are not typically considered in these terms, it is possible to consider
instead of in terms of the span category. Both approaches our supported here.
Copresheaf representation of functional algebras | (ns locus.set.copresheaf.topoi.copresheaf.algebraic
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.copresheaf.structure.core.protocols :refer :all]
[locus.... |
bec762490ae3fa8dd06439662280837c77aa395e86249f8b73bdcb83f6f9bee6 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.ui.components.select.views
(:require
[webchange.ui.components.icon.views :refer [system-icon]]
[webchange.ui.components.input-error.views :refer [input-error]]
[webchange.ui.components.input-label.views :refer [input-label]]
[webchange.ui.components.select.utils :refer [empty-value? fix-... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/07ab8bb00cf8fee60cbcf1ac1519e3409a7b681e/src/cljs/webchange/ui/components/select/views.cljs | clojure | (ns webchange.ui.components.select.views
(:require
[webchange.ui.components.icon.views :refer [system-icon]]
[webchange.ui.components.input-error.views :refer [input-error]]
[webchange.ui.components.input-label.views :refer [input-label]]
[webchange.ui.components.select.utils :refer [empty-value? fix-... | |
0023415c0d8f25d71e92aba5f2e437752a8017da8ea442410873cd48b468085c | juspay/atlas | Booking.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/Storage/Queries/Booking.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
b57538941d87c44edba9d1ead01c3ab0b5a61d66da28a2565d2937c8ea1fdef1 | zenspider/schemers | exercise.5.46.scm | #!/usr/bin/env csi -s
(require rackunit)
Exercise 5.46
Carry out an analysis like the one in * Note Exercise 5 - 45 : : to
;; determine the effectiveness of compiling the tree-recursive
;; Fibonacci procedure
;;
;; (define (fib n)
;; (if (< n 2)
;; n
;; (+ (fib (- n 1)) (fib (- ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_5/exercise.5.46.scm | scheme | determine the effectiveness of compiling the tree-recursive
Fibonacci procedure
(define (fib n)
(if (< n 2)
n
(+ (fib (- n 1)) (fib (- n 2)))))
compared to the effectiveness of using the special-purpose
the time resource used is not linear in n; hence the ratios of
stack ope... | #!/usr/bin/env csi -s
(require rackunit)
Exercise 5.46
Carry out an analysis like the one in * Note Exercise 5 - 45 : : to
Fibonacci machine of * Note Figure 5 - 12 : : . ( For measurement of the
interpreted performance , see * Note Exercise 5 - 29 : : . ) For ,
|
b1fa2417ca6340fd0903aac9660e16196a19c4613120746a55a104d1824497ef | korma/Korma | fns.clj | (ns korma.sql.fns
(:require [korma.db :as db]
[korma.sql.engine :as eng]
[korma.sql.utils :as utils])
(:use [korma.sql.engine :only [infix group-with sql-func trinary wrapper]]))
;;*****************************************************
;; Predicates
;;****************************************... | null | https://raw.githubusercontent.com/korma/Korma/6b76592dd54ba2b03c5862701c8d18a8eea8c040/src/korma/sql/fns.clj | clojure | *****************************************************
Predicates
*****************************************************
*****************************************************
Aggregates
***************************************************** | (ns korma.sql.fns
(:require [korma.db :as db]
[korma.sql.engine :as eng]
[korma.sql.utils :as utils])
(:use [korma.sql.engine :only [infix group-with sql-func trinary wrapper]]))
(defn pred-and [& args]
(apply eng/pred-and args))
(defn pred-or [& args] (group-with " OR " args))
(defn p... |
8007088cc271fd99e43dd31d366fa3ec74b128dec9d8467e9c86ff8ce0975c47 | mokus0/junkbox | monad-nums.hs | {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
import Monad
import System
-- Haskell kicks ass.
instance (Monad m, Num a, Eq (m a), Show (m a)) => Num (m a)
where
(+) = liftM2 (+)
(*) = liftM2 (*)
(-) = liftM2 (-)
negate = liftM negate
abs = liftM abs
signum = liftM signum
fromIntege... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/monad-nums.hs | haskell | # OPTIONS -fglasgow-exts -fallow-undecidable-instances #
Haskell kicks ass.
Early haskell experimentation, with some later updates.
congruent: given a modulus and a (ordered) list of numbers less than the
modulus, generate an infinite (ordered) list of numbers congruent to the
numbers in the list modulo the given m... | import Monad
import System
instance (Monad m, Num a, Eq (m a), Show (m a)) => Num (m a)
where
(+) = liftM2 (+)
(*) = liftM2 (*)
(-) = liftM2 (-)
negate = liftM negate
abs = liftM abs
signum = liftM signum
fromInteger = return . fromInteger
instance (Monad m, Fractional a, Eq (m a), Show (m a)) => ... |
75170aeedd5e8da062b9680d87f8b9eadbd5a90cab041d9767d450f5958cd2c7 | jrm-code-project/LISP-Machine | fast-eval.lisp | ;;; -*- Mode:LISP; Package:MICRO; Base:8 -*-
(define-micro-function fast-eval (form)
(declare (:support-vector (i-arg-eval 'eval)))
((m-t) pdl-pop)
(popj-data-type-equal m-t (a-constant (byte-value q-data-type dtp-fix)))
(jump-data-type-equal m-t (a-constant (byte-value q-data-type dtp-symbol)) a-symbol)
(c... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/fast-eval.lisp | lisp | -*- Mode:LISP; Package:MICRO; Base:8 -*- |
(define-micro-function fast-eval (form)
(declare (:support-vector (i-arg-eval 'eval)))
((m-t) pdl-pop)
(popj-data-type-equal m-t (a-constant (byte-value q-data-type dtp-fix)))
(jump-data-type-equal m-t (a-constant (byte-value q-data-type dtp-symbol)) a-symbol)
(call p3zero)
((arg-call ref-support-vector) ... |
a4af8fe70ecbe5f8731369445ad56088275f968b1d8c5f01502d4683b188a357 | nikita-volkov/rerebase | Strict.hs | module Data.IntMap.Strict
(
module Rebase.Data.IntMap.Strict
)
where
import Rebase.Data.IntMap.Strict
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/IntMap/Strict.hs | haskell | module Data.IntMap.Strict
(
module Rebase.Data.IntMap.Strict
)
where
import Rebase.Data.IntMap.Strict
| |
3a137005d8ae4cef8d3bbfcd7123a36d330efd0a9ede5966356a15ba1a90c173 | tmattio/js-bindings | encoding.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
(*
unknown identifiers:
- Message
- Promise<T1>
- RAL.MessageBufferEncoding
- RAL.WritableStream
- Uint8Array
*)
[@@@js.stop]
module type Missing = sig
module Message : sig
type t_0
v... | null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-jsonrpc/_gen/encoding.mli | ocaml |
unknown identifiers:
- Message
- Promise<T1>
- RAL.MessageBufferEncoding
- RAL.WritableStream
- Uint8Array
import { Message } from './messages'; | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
[@@@js.stop]
module type Missing = sig
module Message : sig
type t_0
val t_0_to_js: t_0 -> Ojs.t
val t_0_of_js: Ojs.t -> t_0
end
module Promise : sig
type 'T1 t_1
val t_1_to_js: ('T... |
50b4a2454cb6d702dd89acb4515c012afbd30dbe10149305f4c81d5d9391e420 | erleans/vonnegut | prop_vg.erl | -module(prop_vg).
-include_lib("proper/include/proper.hrl").
-define(MODEL, vg_statem).
prop_test() ->
?FORALL(Cmds, more_commands(8, commands(?MODEL)),
begin
lager:start(),
lager:set_loglevel(lager_console_backend, error),
application:ensure_all_starte... | null | https://raw.githubusercontent.com/erleans/vonnegut/88693f192a4fc3da88e7b359e38e72cee25b3d24/test/prop_vg.erl | erlang | -module(prop_vg).
-include_lib("proper/include/proper.hrl").
-define(MODEL, vg_statem).
prop_test() ->
?FORALL(Cmds, more_commands(8, commands(?MODEL)),
begin
lager:start(),
lager:set_loglevel(lager_console_backend, error),
application:ensure_all_starte... | |
57e3051de11ffd76e325f8dea907cd519b5e8c75c6c383ef273a342d26f08bfb | shayan-najd/NativeMetaprogramming | Verbosity.hs | module Options.Verbosity where
import Types
verbosityOptions :: [Flag]
verbosityOptions =
[ flag { flagName = "-v"
, flagDescription = "verbose mode (equivalent to ``-v3``)"
, flagType = DynamicFlag
}
, flag { flagName = "-v⟨n⟩"
, flagDescription = "set verbosity level"
... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/utils/mkUserGuidePart/Options/Verbosity.hs | haskell | module Options.Verbosity where
import Types
verbosityOptions :: [Flag]
verbosityOptions =
[ flag { flagName = "-v"
, flagDescription = "verbose mode (equivalent to ``-v3``)"
, flagType = DynamicFlag
}
, flag { flagName = "-v⟨n⟩"
, flagDescription = "set verbosity level"
... | |
3fb2598148b61559718957d67c86e9e1fc040363e81c57a2c8fd5c33bc408012 | luminus-framework/luminus-template | auth_base.clj | (ns leiningen.new.auth-base
(:require [leiningen.new.common :refer :all]))
(defn auth-base-features [[assets options :as state]]
(if (some #{"+auth-base"} (:features options))
[assets
(-> options
(assoc :auth true)
(append-options :dependencies [['buddy/buddy-auth "3.0.323"]
... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/f0a0b2e9e2823965abe93e65920d92b9581d5a65/src/leiningen/new/auth_base.clj | clojure | (ns leiningen.new.auth-base
(:require [leiningen.new.common :refer :all]))
(defn auth-base-features [[assets options :as state]]
(if (some #{"+auth-base"} (:features options))
[assets
(-> options
(assoc :auth true)
(append-options :dependencies [['buddy/buddy-auth "3.0.323"]
... | |
586e5887f53e8a39c4e1a0e65b562c9bdd7c55cf1d854c7edc1d2efb93d87839 | ghc/packages-Cabal | SrcDist.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.SrcDist
Copyright : 2004
-- License : BSD3
--
-- Maintainer :
-- Portability : portable
--
-- This handles the @sdist@ com... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Simple/SrcDist.hs | haskell | # LANGUAGE RankNTypes #
---------------------------------------------------------------------------
|
Module : Distribution.Simple.SrcDist
License : BSD3
Maintainer :
Portability : portable
This handles the @sdist@ command. The module exports an 'sdist' action but
also some of the phases that ma... | # LANGUAGE FlexibleContexts #
Copyright : 2004
The ' createArchive ' action uses the external @tar@ program and assumes that
it accepts the @-z@ flag . Neither of these assumptions are valid on Windows .
module Distribution.Simple.SrcDist (
sdist,
printPackageProblems,
prepareTree,
createArchiv... |
938ed205bdc8150e3e0ef839ae42ae6cc5695b4d0c375da740528021e6e0fb97 | pflanze/chj-schemelib | tree-util.scm | Copyright 2014 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require easy-1
(... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/tree-util.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
part of easy-1 ? | Copyright 2014 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy-1
test)
(export flatten/
flatten
flatten*)
(def (flatten/ drop-false?)
(named flatten
(lam... |
9ff10ec3771efe044655419800d1fa7e00712cefb1a4c5b3597fcd8d3faf615c | qnikst/imagemagick | modulate.hs | {-# LANGUAGE OverloadedStrings #-}
From : -server/viewtopic.php?f=1&t=12640
Read the logo : image and use PixelIterators to produce two new images .
Convert the image to the HSB and HSL colourspaces , cut the Lightness / Brightness
by half and then write the images as logo_hsb.jpg and logo_hsl.jpg... | null | https://raw.githubusercontent.com/qnikst/imagemagick/bc9e7ac85749f42a87901b722c5d36a8bed07d5c/examples/modulate.hs | haskell | # LANGUAGE OverloadedStrings #
Even though we won't be reading these images they must be initialized
readImage mwb "xs:none"
Create iterators for each image
write the results
Get the RGB quanta from the source image
Convert the source quanta to HSL |
From : -server/viewtopic.php?f=1&t=12640
Read the logo : image and use PixelIterators to produce two new images .
Convert the image to the HSB and HSL colourspaces , cut the Lightness / Brightness
by half and then write the images as logo_hsb.jpg and logo_hsl.jpg
Note the colour distortion i... |
25bb039e43936ad76603edbbf08215a1d23c5994e6631d0186f71df5e186ccdd | pascal-knodel/haskell-craft | E'12''5.hs | --
--
--
-----------------
Exercise 12.5 .
-----------------
--
--
--
module E'12''5 where
import Pictures
(
Picture
)
type Rep = ( Int , Int , [(Int , Int)] )
-- "rotate":
------------
rotate90 :: Rep -> Rep
rotate90 ( w , h , ps ) -- "w"; width, "h"; height, "ps"; positions
= ( h , w , map ( ... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'12''5.hs | haskell |
---------------
---------------
"rotate":
----------
"w"; width, "h"; height, "ps"; positions
.......##..........##...
.....##..#.......##..#..
...##.....#....##.....#.
..#.......#...#.......#.
..#...#...#...#...#...#.
..#...###.#...#...###.#.
..#...#.......#...#.....
...#...#.......#...#....
....#..#.... | Exercise 12.5 .
module E'12''5 where
import Pictures
(
Picture
)
type Rep = ( Int , Int , [(Int , Int)] )
rotate90 :: Rep -> Rep
= ( h , w , map ( \(hp , wp) -> (wp, h - hp - 1) ) ps )
GHCi >
: load E'12''3 E'12''4 E'12''5
: m + E'12''3 E'12''4 E'12''5 Pictures
let picture = horse `... |
45d9b631d5340109e4fc922a47d519e2a8d102c0ac52852d2ea2d21ad9c8be78 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | SetupIntentPaymentMethodOptions.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema SetupIntentPaymentMethodOptions
module StripeAPI.Types.SetupIntentPaymentMe... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SetupIntentPaymentMethodOptions.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema SetupIntentPaymentMethodOptions
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
| Defines the object schema located at @components.schemas.setup_intent_payment_method_options@ ... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.SetupIntentPaymentMethodOptions where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
im... |
b4d151e08376c1f17cd35ea7feed59cf8fe0ae299ca484aa5d2d8c1cdadd2d64 | georgegarrington/Syphon | Util.hs | module Parse.Util where
import Prelude hiding (log, init, fail)
import Control.Monad.Reader
import Control.Monad.State.Strict
import Text.Megaparsec as MP
import qualified Text.Megaparsec.Char.Lexer as L
import Text.Megaparsec.Char
import Text.Show.Pretty
--The parser context
type Parser = ParsecT ParseErr String (... | null | https://raw.githubusercontent.com/georgegarrington/Syphon/402a326b482e3ce627a15b651b3097c2e09e8a53/src/Parse/Util.hs | haskell | The parser context
The environment the parser works in
My custom error type
Make sure my custom error is printable
The file to parse as a string, which parser to parse, an initial enivonment to run in and return wither error string or parsed thingy
Similar to line fold but we can specify how many levels we want to
Con... | module Parse.Util where
import Prelude hiding (log, init, fail)
import Control.Monad.Reader
import Control.Monad.State.Strict
import Text.Megaparsec as MP
import qualified Text.Megaparsec.Char.Lexer as L
import Text.Megaparsec.Char
import Text.Show.Pretty
type Parser = ParsecT ParseErr String (Reader ParseEnv)
dat... |
77dd21bc379aba7e9f4819afe9a9ce6ec47c49ff25acf1ebd1e246b38f8ee537 | aantron/dream | session.ml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
module Dream = Dream_pure
module Cookie = Dream__server.Cookie
module Session = Dream__server.Session
let (|>?) =
Opt... | null | https://raw.githubusercontent.com/aantron/dream/180da09056dad32f07b4c08258b1477cad5e66db/src/sql/session.ml | ocaml | TODO Session sharing is greatly complicated by the backing store; is it ok to
just work with snapshots? All kinds of race conditions may be possible,
unless there is a generation value or the like.
TODO The in-memory sessions manager should actually be re-done in terms of
the cache, just with no persistent ... | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
module Dream = Dream_pure
module Cookie = Dream__server.Cookie
module Session = Dream__server.Session
let (|>?) =
Opt... |
78bdcb5a788fa2494cfd4abbe924938237cf8c25024602ff0f6825dd0efa7109 | deplinenoise/c-amplify | main.lisp | (in-package #:se.defmacro.c-amplify)
(defvar *c-systems* (make-hash-table))
(defparameter *output-extension* "c"
"File extension of files produced.")
(defparameter *input-extension* "ca"
"File extension of files read.")
(defun %eval-ca-phase1 (expanded-forms)
(dolist (form expanded-forms)
(parse-c-stmt-ph... | null | https://raw.githubusercontent.com/deplinenoise/c-amplify/f8ad953e8bc7eb0004c6cee0460793893d5aec8c/code/main.lisp | lisp | load, macro-expand and evaluate all its | (in-package #:se.defmacro.c-amplify)
(defvar *c-systems* (make-hash-table))
(defparameter *output-extension* "c"
"File extension of files produced.")
(defparameter *input-extension* "ca"
"File extension of files read.")
(defun %eval-ca-phase1 (expanded-forms)
(dolist (form expanded-forms)
(parse-c-stmt-ph... |
2b5212e03e4a210a1ae5d81660b80d8ec0b5157e270d1d0feb569b2c60ddbc9c | johnstonskj/simple-oauth2 | clients.rkt | #lang racket/base
;;
;; simple-oauth2 - oauth2/storage/clients.
;; Simple OAuth2 client and server implementation
;;
Copyright ( c ) 2019 ( ) .
;; Racket Style Guide: -lang.org/style/index.html
(require racket/contract)
(provide get-client
set-client!
load-clients
save-clients)
;; ... | null | https://raw.githubusercontent.com/johnstonskj/simple-oauth2/b8cb40511f64dcb274e17957e6fc9ab4c8a6cbea/storage/clients.rkt | racket |
simple-oauth2 - oauth2/storage/clients.
Simple OAuth2 client and server implementation
Racket Style Guide: -lang.org/style/index.html
---------- Requirements
---------- Implementation
(hash/c application-name? (client?))
note, we only decrypt on access, not on load.
note, we always encrypt into the cache, a... | #lang racket/base
Copyright ( c ) 2019 ( ) .
(require racket/contract)
(provide get-client
set-client!
load-clients
save-clients)
(require racket/bool
racket/file
net/url-structs
oauth2
oauth2/private/logging
oauth2/private/privacy
... |
4a86837f04732e18e4f2af0fb7cc10d7b279c6255f440b64f23df0247cafca12 | kupl/FixML | sub20.ml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula
let rec eval : formula -> bool
=fun f -> match f with
True -> true
| False -> false
| Neg p -> if p=True then false else true
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula2/submissions/sub20.ml | ocaml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula
let rec eval : formula -> bool
=fun f -> match f with
True -> true
| False -> false
| Neg p -> if p=True then false else true
... | |
f83cd6c88c8ca45cb1b828879433ecf4be8170de36dcf9976793fc4d70d59be1 | jabber-at/ejabberd | replaced_tests.erl | %%%-------------------------------------------------------------------
Author : < >
Created : 16 Nov 2016 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2017 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License ... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/test/replaced_tests.erl | erlang | -------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | Author : < >
Created : 16 Nov 2016 by < >
ejabberd , Copyright ( C ) 2002 - 2017 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
18ab3639e164c34878522b5ffdc2426f07b44d39345ce6923e95e78b8613c345 | prg-titech/Kani-CUDA | type.rkt | #lang rosette
(provide int float bool double)
(define int integer?)
(define float real?)
(define bool boolean?)
(define double real?) | null | https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/type.rkt | racket | #lang rosette
(provide int float bool double)
(define int integer?)
(define float real?)
(define bool boolean?)
(define double real?) | |
5520c5c8566ecc84751e0e8d4da30b4d71ed283e53c443e36486e6d2de5ad637 | SKA-ScienceDataProcessor/RC | ddp-in-memory-collector.hs | # LANGUAGE TemplateHaskell #
module Main(main) where
import DNA
import DDP
import DDP_Slice
----------------------------------------------------------------
-- Distributed dot product
----------------------------------------------------------------
-- | Actor for calculating dot product
ddpDotProduct :: Actor Slic... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS3/dna-programs/ddp-in-memory-collector.hs | haskell | --------------------------------------------------------------
Distributed dot product
--------------------------------------------------------------
| Actor for calculating dot product
Vector size:
> 4 nodes
Run it | # LANGUAGE TemplateHaskell #
module Main(main) where
import DNA
import DDP
import DDP_Slice
ddpDotProduct :: Actor Slice Double
ddpDotProduct = actor $ \size -> do
shell <- startGroup (Frac 1) (NNodes 1) $ do
useLocal
return $(mkStaticClosure 'ddpProductSlice)
shCol <- startCollector (N 0) ... |
b180049e6c424f2826edfa95ad10e2119a763c86396c6b76cbb3ee9786154ed8 | Ailrun/core-lang-haskell | GMachine.hs | # LANGUAGE CPP #
module Language.GMachine
#if __CLH_EXERCISE_1__ >= 8
( run
, showResults
, eval
, compile
)
#endif
where
#if __CLH_EXERCISE_1__ >= 8
import Data.List
import Data.ISeq
import Language.Parser
import Language.Prelude
import Language.Types
import Text.ParserCombinators.ReadP
import Util
run :: ... | null | https://raw.githubusercontent.com/Ailrun/core-lang-haskell/f6f700ad08fe31bd765381b7e18b747ff2f07c44/src/Language/GMachine.hs | haskell | # LANGUAGE CPP #
module Language.GMachine
#if __CLH_EXERCISE_1__ >= 8
( run
, showResults
, eval
, compile
)
#endif
where
#if __CLH_EXERCISE_1__ >= 8
import Data.List
import Data.ISeq
import Language.Parser
import Language.Prelude
import Language.Types
import Text.ParserCombinators.ReadP
import Util
run :: ... | |
f5c4895f4fc3e30aa07df725576b50e4b77ee27c387cddfeaf196025ad51ca93 | jhrcek/fundeps | Ansi.hs | {-# LANGUAGE OverloadedStrings #-}
module TUI.Ansi
( cliInfo
, cliWarn
)
where
import Data.Text (Text)
import Data.Text.IO qualified as Text
cliInfo, cliWarn :: Text -> IO ()
cliInfo msg = Text.putStrLn $ green msg
cliWarn msg = Text.putStrLn $ red msg
green :: Text -> Text
green t = greenCode <> t <>... | null | https://raw.githubusercontent.com/jhrcek/fundeps/47f2c37c0ced03eeec0de43d73129015401f7af7/src/TUI/Ansi.hs | haskell | # LANGUAGE OverloadedStrings # |
module TUI.Ansi
( cliInfo
, cliWarn
)
where
import Data.Text (Text)
import Data.Text.IO qualified as Text
cliInfo, cliWarn :: Text -> IO ()
cliInfo msg = Text.putStrLn $ green msg
cliWarn msg = Text.putStrLn $ red msg
green :: Text -> Text
green t = greenCode <> t <> resetCode
red :: Text -> Text
re... |
29a2400220e896aa1ec5a13bd3e8caedf951ddb5ddbddebb880e3b58b686f8f1 | unclebob/spacewar | explosions.cljc | (ns spacewar.game-logic.explosions
(:require
[spacewar.ui.config :as uic]
[clojure.spec.alpha :as s]))
(s/def ::x number?)
(s/def ::y number?)
(s/def ::type #{:phaser :torpedo :kinetic
:klingon :klingon-kinetic
:klingon-phaser :ship :corbomite-device})
(s/def ::age number?)
(s... | null | https://raw.githubusercontent.com/unclebob/spacewar/eaa155c76da7e83ffd6dddf404ddc31fc1f57cbe/src/spacewar/game_logic/explosions.cljc | clojure | (ns spacewar.game-logic.explosions
(:require
[spacewar.ui.config :as uic]
[clojure.spec.alpha :as s]))
(s/def ::x number?)
(s/def ::y number?)
(s/def ::type #{:phaser :torpedo :kinetic
:klingon :klingon-kinetic
:klingon-phaser :ship :corbomite-device})
(s/def ::age number?)
(s... | |
12c6e9913aab909420a2bcdc8bffa5685dad3faf2f3d9771527024b62c727384 | reenberg/wobot | NesCGen.hs | # LANGUAGE CPP #
# LANGUAGE QuasiQuotes #
Copyright ( c ) 2008
The President and Fellows of Harvard College .
--
-- 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 ... | null | https://raw.githubusercontent.com/reenberg/wobot/ce7f112096ba1abd43b8d29da7e8944c2a004125/flask/flask/Control/Monad/NesCGen.hs | haskell |
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
documentation and/or other mate... | # LANGUAGE CPP #
# LANGUAGE QuasiQuotes #
Copyright ( c ) 2008
The President and Fellows of Harvard College .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the University nor the names o... |
e7526cb4b99b0712c871c81eedd085a029b2df26bc83b31a1edd27ba0313611f | acieroid/scala-am | collatz-1.scm | (define (div2* n s)
(if (= (* 2 n) s)
n
(if (= (+ (* 2 n) 1) s)
n
(div2* (- n 1) s))))
(define (div2 n)
(div2* n n))
(define (hailstone* n count)
(if (= n 1)
count
(if (even? n)
(hailstone* (div2 n) (+ count 1))
(hailstone* (+ (* 3 n) 1)
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/collatz-1.scm | scheme | (define (div2* n s)
(if (= (* 2 n) s)
n
(if (= (+ (* 2 n) 1) s)
n
(div2* (- n 1) s))))
(define (div2 n)
(div2* n n))
(define (hailstone* n count)
(if (= n 1)
count
(if (even? n)
(hailstone* (div2 n) (+ count 1))
(hailstone* (+ (* 3 n) 1)
... | |
b83c07a00f21130fece9fb17f3819c7c88a2ced6f3c882687d6a609bc2cff8f2 | fossas/fossa-cli | Internal.hs | module Strategy.BerkeleyDB.Internal (
readBerkeleyDB,
BdbEntry (..),
) where
import App.Fossa.EmbeddedBinary (BinaryPaths, toPath, withBerkeleyBinary)
import Control.Effect.Diagnostics (Diagnostics, context, fatalOnSomeException, fatalText, fromEitherShow)
import Control.Effect.Lift (Lift, sendIO)
import Data.Byte... | null | https://raw.githubusercontent.com/fossas/fossa-cli/8d50a799fafa02c096998daa50b3bef4b2ff2b77/src/Strategy/BerkeleyDB/Internal.hs | haskell | | An entry in the database, consisting of the architecture, package, and version.
| FOSSA _requires_ that architecture is provided: #locators-for-linux-packages
| Packages are read as a JSON array of base64 strings.
This is necessary because the parser doesn't have access to the file system being read.
Handle the ... | module Strategy.BerkeleyDB.Internal (
readBerkeleyDB,
BdbEntry (..),
) where
import App.Fossa.EmbeddedBinary (BinaryPaths, toPath, withBerkeleyBinary)
import Control.Effect.Diagnostics (Diagnostics, context, fatalOnSomeException, fatalText, fromEitherShow)
import Control.Effect.Lift (Lift, sendIO)
import Data.Byte... |
beb7cf9a33bf3b977a1a412bff1bed28e479c87b5c08608671b61078f8434f6a | zerowidth/hansel | core.clj | (ns hansel.core
(:require [clojure.string :as str]
[hansel.grid :as grid]
[hansel.racetrack :as racetrack])
(:use [hansel.server :only [start-server]]
[hansel.text-interface :only [graph-from-text]]
[clojure.pprint]
[hansel.util :only [path]]
[hansel.astar :on... | null | https://raw.githubusercontent.com/zerowidth/hansel/9bcac5dcbabc3af6b0378030bcbbb39d69a7331c/src/hansel/core.clj | clojure | steps (astar graph)
(solve ". . . . . # . z
. . . . . # . .
. . # . . # . .
. . # . . . . .
a . # . . . . .")
(solve ". . # . .
a . # . z
. . . . .")
(solve "a # z")
(solve "a . z")
(solve "a . . . . . . . . z")
(solve ". . . . .
a . . . z
. . . . .... | (ns hansel.core
(:require [clojure.string :as str]
[hansel.grid :as grid]
[hansel.racetrack :as racetrack])
(:use [hansel.server :only [start-server]]
[hansel.text-interface :only [graph-from-text]]
[clojure.pprint]
[hansel.util :only [path]]
[hansel.astar :on... |
b949dce43590bbe667cb9dbc765b228ae9ea11da56da942dce6fbd19955316f8 | MinaProtocol/mina | versioned_util.ml | (* version_util.ml -- utility functions for versioning *)
open Core_kernel
open Ppxlib
let parse_opt = Ast_pattern.parse ~on_error:(fun () -> None)
let mk_loc ~loc txt = { Location.loc; txt }
let map_loc ~f { Location.loc; txt } = { Location.loc; txt = f txt }
let some_loc (x : 'a loc) = map_loc ~f:Option.some x
... | null | https://raw.githubusercontent.com/MinaProtocol/mina/8403887a428f56e91bfdf4187c6b8dc260e5424a/src/lib/ppx_version/versioned_util.ml | ocaml | version_util.ml -- utility functions for versioning |
open Core_kernel
open Ppxlib
let parse_opt = Ast_pattern.parse ~on_error:(fun () -> None)
let mk_loc ~loc txt = { Location.loc; txt }
let map_loc ~f { Location.loc; txt } = { Location.loc; txt = f txt }
let some_loc (x : 'a loc) = map_loc ~f:Option.some x
let check_modname ~loc name : string =
if String.equal n... |
fb95506cc33701f014cb9da39caf70193a8bec4bf49fa07c154ceda590e3ec1c | timjb/diagrams-rubiks-cube | Model.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module... | null | https://raw.githubusercontent.com/timjb/diagrams-rubiks-cube/904d62f09e8e3a41d3d31c7d19897b380fbae1cb/src/Diagrams/RubiksCube/Model.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# LANGUAGE Rank2Types #
* Constructing cubes
* Selecting rows and columns
* Traversing facets
** By layer
** By position
* Rotating the whole cube
* Moving layers of the cube
| The type of automorphisms
Natural numbers
Some type synonyms for natural numbers
|... | # LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Diagrams.RubiksCube.Model (
Side (..)
, topLeft, topCenter, topRight
, middle... |
ef49559db2d505645f6f3070b7897635483fd328f238c1d33a8845b54d81e346 | jyh/metaprl | czf_itt_group.mli |
* Group .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / default.html or vis... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/czf/czf_itt_group.mli | ocaml | ***********************************************************************
* TERMS *
***********************************************************************
The "carrier" set for the group
*******************************************************************... |
* Group .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / default.html or vis... |
7a7cdb13916d3ac1cebb50a31b47dd65bf915a57b42d3e1abcf7f24f405740bb | Vaguery/klapaucius | scalar_test.clj | (ns push.instructions.base.scalar_test
(:require [push.interpreter.core :as i])
(:use midje.sweet)
(:use [push.util.test-helpers])
(:use [push.type.definitions.quoted])
(:use [push.type.item.scalar])
)
;; conversions
(tabular
(fact ":scalar->code code-quotes the top :scalar item to :exec"
(register... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/instructions/base/scalar_test.clj | clojure | conversions
simple
consumes arg
missing args
predicates | (ns push.instructions.base.scalar_test
(:require [push.interpreter.core :as i])
(:use midje.sweet)
(:use [push.util.test-helpers])
(:use [push.type.definitions.quoted])
(:use [push.type.item.scalar])
)
(tabular
(fact ":scalar->code code-quotes the top :scalar item to :exec"
(register-type-and-check... |
b94a80e37e4c6cc9d4a7a7a34628ec994c0c2a9094e0fefd94c5df212401dcf8 | antono/guix-debian | http-client.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 < >
Copyright © 2012 Free Software Foundation , Inc.
;;;
;;; 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... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/http-client.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 © 2012 , 2013 , 2014 < >
Copyright © 2012 Free Software Foundation , Inc.
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 http-client)
#:use-module ... |
57909989f425fc2b1d115b6e7122206381abf1dcb88661e0533d3298b9dded35 | hidaris/thinking-dumps | interp.rkt | #lang typed/racket
(provide (all-defined-out))
(require/typed "parser.rkt"
[parse (-> String Program)])
(require "ast.rkt")
(require "utils.rkt")
(: apply-procedure (Closure (Listof Value) Environment -> Value))
(define (apply-procedure proc vals saved-env)
(match proc
[(Closure params body env trace?)
... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-35/ds-rep/interp.rkt | racket | #lang typed/racket
(provide (all-defined-out))
(require/typed "parser.rkt"
[parse (-> String Program)])
(require "ast.rkt")
(require "utils.rkt")
(: apply-procedure (Closure (Listof Value) Environment -> Value))
(define (apply-procedure proc vals saved-env)
(match proc
[(Closure params body env trace?)
... | |
3771d43e2b3874fed35ed965ab4270397ac96fb19a0644d976f0cac065f66dae | tsloughter/kuberl | kuberl_v1_secret.erl | -module(kuberl_v1_secret).
-export([encode/1]).
-export_type([kuberl_v1_secret/0]).
-type kuberl_v1_secret() ::
#{ 'apiVersion' => binary(),
'data' => maps:map(),
'kind' => binary(),
'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(),
'stringData' => maps:map(),
'type'... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_secret.erl | erlang | -module(kuberl_v1_secret).
-export([encode/1]).
-export_type([kuberl_v1_secret/0]).
-type kuberl_v1_secret() ::
#{ 'apiVersion' => binary(),
'data' => maps:map(),
'kind' => binary(),
'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(),
'stringData' => maps:map(),
'type'... | |
1dabae0daadd20e2de5d5292819b65ef9f2a67624f38b7d54c84d8fe9b9c0890 | input-output-hk/plutus | FsTree.hs | -- | Machinery defined in this module allows to export mulptiple Plutus Core definitions
-- (types and terms) as a single value which enables convenient testing of various procedures
-- (pretty-printing, type checking, etc): each time a function / data type is added to that value,
-- none of the tests is required to be... | null | https://raw.githubusercontent.com/input-output-hk/plutus/097f3e65789a51721152817b5c1c8eb0efedb441/plutus-core/plutus-core/src/PlutusCore/FsTree.hs | haskell | | Machinery defined in this module allows to export mulptiple Plutus Core definitions
(types and terms) as a single value which enables convenient testing of various procedures
(pretty-printing, type checking, etc): each time a function / data type is added to that value,
none of the tests is required to be adapted... |
module PlutusCore.FsTree
( FsTree (..)
, FolderContents (..)
, PlcEntity (..)
, PlcFsTree
, PlcFolderContents
, treeFolderContents
, plcTypeFile
, plcTermFile
, foldFsTree
, foldPlcFsTree
, foldPlcFolderContents
) where
import PlutusCore.Core
import PlutusCore.Name
W... |
8f8d9216670854d74195c39ae9d09dae7fbeae417d793c7c9a8a90748237906f | joom/WangsAlgorithm | Main.hs | # LANGUAGE RecordWildCards #
module Main where
import WangsAlgorithm.Prover
import WangsAlgorithm.LaTeX (latexProof)
import qualified WangsAlgorithm.Parser as P
import Options.Applicative
import Data.Semigroup ((<>))
data Backend =
Text
| LaTeX
deriving (Show, Eq, Read, Enum, Bounded)
allBackends :: [Backend... | null | https://raw.githubusercontent.com/joom/WangsAlgorithm/9f11ba27f744321a14ab91ed96b2e920aa63a389/execs/Main.hs | haskell | # LANGUAGE RecordWildCards #
module Main where
import WangsAlgorithm.Prover
import WangsAlgorithm.LaTeX (latexProof)
import qualified WangsAlgorithm.Parser as P
import Options.Applicative
import Data.Semigroup ((<>))
data Backend =
Text
| LaTeX
deriving (Show, Eq, Read, Enum, Bounded)
allBackends :: [Backend... | |
d9c144bd21e372b7b9d498c9b618b3bfe8239160828ca64e5edde809dec18010 | mukul-rathi/bolt | test_lexer.ml | open Parsing
open Lexer
open Parser
open Pprint_parser_tokens
open Core
let parser_token_testable =
Alcotest.testable pprint_tokens (fun token1 token2 -> token1 = token2)
let test_illegal_character () =
Alcotest.check_raises "Syntax Error" (SyntaxError "Lexer - Illegal character: ?")
(fun () -> ignore (read_t... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/alcotest/parsing/test_lexer.ml | ocaml | open Parsing
open Lexer
open Parser
open Pprint_parser_tokens
open Core
let parser_token_testable =
Alcotest.testable pprint_tokens (fun token1 token2 -> token1 = token2)
let test_illegal_character () =
Alcotest.check_raises "Syntax Error" (SyntaxError "Lexer - Illegal character: ?")
(fun () -> ignore (read_t... | |
746e4fb50445990a55e8fd49f22c37c652d0f94d27281d96b3bea2a14a005872 | IBM/probzelus | stats.ml |
* Copyright 2018 - 2020 IBM Corporation
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* -2.0
*
* Unless required by applicable law or agreed to in writin... | null | https://raw.githubusercontent.com/IBM/probzelus/3bdd60e3c4010452239bfe7bc79165802e5d941b/benchmarks/harness/stats.ml | ocaml | Per particles stats
Per step stats |
* Copyright 2018 - 2020 IBM Corporation
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* -2.0
*
* Unless required by applicable law or agreed to in writin... |
6f2e9ac870f2abfcd1595a0d06b9a311d6ade4bdc4057351c691aaa0c5049c93 | juspay/atlas | Registration.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/app-backend/src/Product/Registration.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
50c029b3d905d07829e44031b7f15e19a75dfb4af0854888351b4824bbd70059 | duncanatt/detecter | cow_http.erl | Copyright ( c ) 2013 - 2018 , < >
%%
%% Permission to use, copy, modify, and/or 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 SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowlib/cow_http.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2013 - 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cow_http).
-export([parse_request_line/1]).
... |
bf693f5aa2fc985c333c5661f47ea26282fdd0474115205cf4dfe251ee43ec48 | gvolpe/haskell-book-exercises | reverse.hs | module Reverse where
rvrs :: String -> String
rvrs x = (drop 9 x) ++ take 4 (drop 5 x) ++ (take 5 x)
main :: IO()
main = print $ rvrs "curry is awesome"
| null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter3/reverse.hs | haskell | module Reverse where
rvrs :: String -> String
rvrs x = (drop 9 x) ++ take 4 (drop 5 x) ++ (take 5 x)
main :: IO()
main = print $ rvrs "curry is awesome"
| |
83a81f094b69614e44a6b6c463925bbb710cba6abc88d0d83dfbfc6de68ba114 | McCLIM/McCLIM | sheets.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) Copyright 1998 - 2000 by < >
( c ) Copyright 2000 by Iban Hatchondo < >
( c ... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/edbc773336a15d368052d3d93d3e0cdb2acc4585/Core/windowing/sheets.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
The sheet protocol
non ... | ( c ) Copyright 1998 - 2000 by < >
( c ) Copyright 2000 by Iban Hatchondo < >
( c ) Copyright 2000 by < >
( c ) Copyright 2000,2014 by < >
( c ) Copyright 2001 by >
( c ) Copyright 2001 by < >
( c ) Copyright 2021 by < >
(in-package #:clim-internals)
(defgeneric raise-sheet-in... |
22bad0fed961899ce59aaae8f2db825682d24169cd7829f41eefa9d18dd0dfc8 | uw-unsat/serval-sosp19 | gen.rkt | #lang racket/base
(require web-server/templates
"generated.rkt")
(displayln (include-template "bpf_jit_comp32.c.tmpl"))
| null | https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/bpf/jit/gen.rkt | racket | #lang racket/base
(require web-server/templates
"generated.rkt")
(displayln (include-template "bpf_jit_comp32.c.tmpl"))
| |
f20411e734b548625b648fbb20bfd11cfac880bac35a3f9cfddadec5646bc6bb | clojerl/clojerl | erlang.Port.erl | -module('erlang.Port').
-behavior('clojerl.IStringable').
-behavior('clojerl.IHash').
-export([str/1]).
-export([hash/1]).
-export_type([type/0]).
-type type() :: port().
%% clojerl.IStringable
str(Port) when is_port(Port) ->
PortStr = erlang:port_to_list(Port),
<<"#Port<", PortBin/binary>> = list_to_binary(Po... | null | https://raw.githubusercontent.com/clojerl/clojerl/506000465581d6349659898dd5025fa259d5cf28/src/erl/erlang/erlang.Port.erl | erlang | clojerl.IStringable | -module('erlang.Port').
-behavior('clojerl.IStringable').
-behavior('clojerl.IHash').
-export([str/1]).
-export([hash/1]).
-export_type([type/0]).
-type type() :: port().
str(Port) when is_port(Port) ->
PortStr = erlang:port_to_list(Port),
<<"#Port<", PortBin/binary>> = list_to_binary(PortStr),
<<"#<Port ", ... |
168656dedc048f840cde2f0a53230bccd9d684bc6de64bbf247e5f463694c502 | CSVdB/pinky | Accuracy.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
module Pinky.ParamOpt.Accuracy
( ClassificationAccuracy(..)
, accuracy
, constructAccuracy
, showAccuracy
, showAccuracyFromNetwork
) where
import Import
import Pinky.Core
import Pinky... | null | https://raw.githubusercontent.com/CSVdB/pinky/e77a4c0812ceb4b8548c41a7652fb247c2ab39e0/pinky/src/Pinky/ParamOpt/Accuracy.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
module Pinky.ParamOpt.Accuracy
( ClassificationAccuracy(..)
, accuracy
, constructAccuracy
, showAccuracy
, showAccuracyFromNetwork
) where
import Import
import Pinky.Core
import Pinky... | |
8b1491fd588b45f49506214054bc6dd5a3cbcd1d28658e7afc16f596663a2f27 | ComputeSoftware/datomic-cloud-tools | list_running_systems.clj | (ns dc-tools.list-running-systems
(:require
[clojure.java.shell :as sh]))
(defn list-sh
[]
(let [{:keys [exit out err]}
(sh/sh "aws" "ec2" "describe-instances"
#_#_"--region" ""
"--filters" "Name=tag-key,Values=datomic:tx-group"
"Name=instance-state-name,V... | null | https://raw.githubusercontent.com/ComputeSoftware/datomic-cloud-tools/63194540aaa3ef8b73d95af8316da28b7f7fbff3/src/dc_tools/list_running_systems.clj | clojure | (ns dc-tools.list-running-systems
(:require
[clojure.java.shell :as sh]))
(defn list-sh
[]
(let [{:keys [exit out err]}
(sh/sh "aws" "ec2" "describe-instances"
#_#_"--region" ""
"--filters" "Name=tag-key,Values=datomic:tx-group"
"Name=instance-state-name,V... | |
9396e288cf765c6694da20f74756138946efd721eda78c8a2b5a33d8379eb041 | chef/chef-server | oc_chef_wm_named_group.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
Copyright Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance ... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_named_group.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
chef_wm beh... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is d... |
3d8995019c458ee6f39b732eb6527a73bf7684b1e88fd3315842203687aa07c6 | mirage/index | log.mli | The MIT License
Copyright ( c ) 2019 < >
< >
< >
< >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
... | null | https://raw.githubusercontent.com/mirage/index/fe5e962534d192389484ecc63a25e4ab4668a2f0/src/log.mli | ocaml | The MIT License
Copyright ( c ) 2019 < >
< >
< >
< >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
... | |
70fc9ce2f195ad6e8538a594b4affe097937b38631bf653bc4d9f37d5f9095e4 | colis-anr/morbig | options.mli | (**************************************************************************)
(* -*- tuareg -*- *)
(* *)
Copyright ( C ) 2017 - 2021 , ,
. ... | null | https://raw.githubusercontent.com/colis-anr/morbig/77c2ca402785979c4af351b412fe7be2d521838f/src/options.mli | ocaml | ************************************************************************
-*- tuareg -*-
This is free software: you... | Copyright ( C ) 2017 - 2021 , ,
.
under the terms of the GNU General Public License , version 3 .
type backend = Json | Bin | SimpleJson | Dot | NoSerialisation
val backend : unit -> backend
val input_files : unit -> string ... |
376b2dbde121eabff9c076bd6f6881d04001f232f5995b43cec680a750b3b500 | tmfg/mmtis-national-access-point | main.cljs | (ns dashboard.main
(:require [reagent.core :as r]
[tuck.core :as tuck]
[dashboard.view :refer [dashboard-view]]
[dashboard.events :refer [->FetchDashboard]]))
(def app (r/atom {}))
(defn dashboard-main [e! app]
(e! (->FetchDashboard))
(fn [e! app]
[dashboard-view e! app])... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/tools/dashboard/src/cljs/dashboard/main.cljs | clojure | (ns dashboard.main
(:require [reagent.core :as r]
[tuck.core :as tuck]
[dashboard.view :refer [dashboard-view]]
[dashboard.events :refer [->FetchDashboard]]))
(def app (r/atom {}))
(defn dashboard-main [e! app]
(e! (->FetchDashboard))
(fn [e! app]
[dashboard-view e! app])... | |
61b2f0c11335a8e9048e677896c68c8c4b9de0c774a956cff853630865445565 | dongcarl/guix | machine.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 < >
Copyright © 2019 < >
;;;
;;; 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 ; e... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/machine.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 © 2019 < >
Copyright © 2019 < >
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 (gnu machine)
#:use-module (gnu system)
#:use-module (guix derivatio... |
717c770e44fbbde5d0ef0417dc27ffe502e228d2eaf949755e7685c21cc004fe | hasufell/file-io | Posix.hs | module System.File.Posix where
import System.IO (IOMode(..), Handle)
import System.Posix.IO.PosixString
( defaultFileFlags,
fdToHandle,
openFd,
OpenFileFlags(noctty, nonBlock, creat, append, trunc),
OpenMode(ReadWrite, ReadOnly, WriteOnly) )
import System.OsPath.Posix ( PosixPath )
-- | Op... | null | https://raw.githubusercontent.com/hasufell/file-io/07cfd8023638fe0793972541ea8240bc26cc7d93/System/File/Posix.hs | haskell | | Open a file and return the 'Handle'.
| Open an existing file and return the 'Handle'. | module System.File.Posix where
import System.IO (IOMode(..), Handle)
import System.Posix.IO.PosixString
( defaultFileFlags,
fdToHandle,
openFd,
OpenFileFlags(noctty, nonBlock, creat, append, trunc),
OpenMode(ReadWrite, ReadOnly, WriteOnly) )
import System.OsPath.Posix ( PosixPath )
openFil... |
6f0ee258570d0d3ecdcde78bce8c8dc592f6842ca3cb10a8a2fcd0d28202e8bf | terry-xiaoyu/learn-erlang-in-30-mins | hello_world.erl | -module(hello_world).
-behaviour(gen_server).
%% API.
-export([start_link/0]).
%% gen_server.
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([terminate/2]).
-export([code_change/3]).
-record(state, {
}).
%% API.
-spec start_link() -> {ok, pid()}.
start_link... | null | https://raw.githubusercontent.com/terry-xiaoyu/learn-erlang-in-30-mins/5bf4a7278ec89c264084c335c11d6f52a68ab76f/hello_world/src/hello_world.erl | erlang | API.
gen_server.
API.
gen_server. | -module(hello_world).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([terminate/2]).
-export([code_change/3]).
-record(state, {
}).
-spec start_link() -> {ok, pid()}.
start_link() ->
gen_server:start_link(?... |
63ecab365d459177579c60df4ca4205889370797d824087e06689f42afa0cfa9 | mlabs-haskell/ogmios-datum-cache | Handlers.hs | module Spec.Api.Handlers (spec) where
import Servant.Server (Application)
import Test.Hspec (Spec, describe, it, pendingWith)
import Test.Hspec.Wai (
get,
shouldRespondWith,
with,
)
spec :: Either String Application -> Spec
spec (Left err) =
it "Handlers" $ pendingWith $ "test-env not runned: " <> err
spec (... | null | https://raw.githubusercontent.com/mlabs-haskell/ogmios-datum-cache/f7c748ef240b83ca1f1415d5cb7dd8f87400a426/test/Spec/Api/Handlers.hs | haskell | module Spec.Api.Handlers (spec) where
import Servant.Server (Application)
import Test.Hspec (Spec, describe, it, pendingWith)
import Test.Hspec.Wai (
get,
shouldRespondWith,
with,
)
spec :: Either String Application -> Spec
spec (Left err) =
it "Handlers" $ pendingWith $ "test-env not runned: " <> err
spec (... | |
9fada81e976198dbaaf4d5ffd30b70fc9b00b378e3b5c8495f05d87910e451fa | openworkload/swm-core | wm_virtres_SUITE.erl | -module(wm_virtres_SUITE).
-export([suite/0, all/0, groups/0, init_per_suite/1, end_per_suite/1, init_per_group/2, end_per_group/2]).
-export([activate/1, part_absent_create/1, part_spawned/1, part_fetched_not_up/1, part_fetched_up/1,
uploading_is_about_to_start/1, uploading_started/1, uploading_done/1, downl... | null | https://raw.githubusercontent.com/openworkload/swm-core/6880cb3c071fb4d61baf2e3ee6d2158a54796b69/test/wm_virtres_SUITE.erl | erlang | ============================================================================
Common test callbacks
============================================================================
============================================================================
Helpers
=====================================================... | -module(wm_virtres_SUITE).
-export([suite/0, all/0, groups/0, init_per_suite/1, end_per_suite/1, init_per_group/2, end_per_group/2]).
-export([activate/1, part_absent_create/1, part_spawned/1, part_fetched_not_up/1, part_fetched_up/1,
uploading_is_about_to_start/1, uploading_started/1, uploading_done/1, downl... |
453b0b702599e2d71e1472f4fc9724b8ff473e07cf6a70606860bf5ceae3138b | haskell/base64-bytestring | Base64.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
-- |
-- Module : Data.ByteString.Base64
Copyright : ( c ) 2010
--
-- License : BSD-style
Maintainer : < > ,
< > ,
< >
-- Stability : experimental
Portability : GHC
--
-- Fas... | null | https://raw.githubusercontent.com/haskell/base64-bytestring/719b6edf6bd4a6a0ee393712ab4723e78a22e7f5/Data/ByteString/Base64.hs | haskell | |
Module : Data.ByteString.Base64
License : BSD-style
Stability : experimental
Fast and efficient encoding and decoding of base64-encoded strings.
| Encode a string into base64 form. The result will always be a
| Decode a base64-encoded string. This function strictly follows
the specification in
... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
Copyright : ( c ) 2010
Maintainer : < > ,
< > ,
< >
Portability : GHC
@since 0.1.0.0
module Data.ByteString.Base64
( encode
, decode
, decodeLenient
) where
import Data.Byte... |
32af97869dab7ce69490d59528f0b3f978a20fdc5bd4fe18ac54aa68d0d283c0 | teamwalnut/graphql-ppx | union_partial.ml | open Test_shared
module MyQuery =
[%graphql
{|
{
dogOrHuman {
...on Dog {
name
barkVolume
}
}
}
|}]
type qt = MyQuery.t
let pp formatter (obj : qt) =
Format.fprintf formatter "< dogOrHuman = %a >"
(fun formatter -> function
| `Dog (dog : MyQuery.t_dogOrHuman_Dog) -... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/tests_native/union_partial.ml | ocaml | open Test_shared
module MyQuery =
[%graphql
{|
{
dogOrHuman {
...on Dog {
name
barkVolume
}
}
}
|}]
type qt = MyQuery.t
let pp formatter (obj : qt) =
Format.fprintf formatter "< dogOrHuman = %a >"
(fun formatter -> function
| `Dog (dog : MyQuery.t_dogOrHuman_Dog) -... | |
ef60fffe4da3a7cf057b4636d75c6c81d3bb4b4762da46e6fc20d592f004fa72 | c4-project/c4f | action_pool.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz_run/src/action_pool.mli | ocaml | * A pool of fuzzer actions.
The action pool contains both a weighted list of actions, known as the
'deck', and a queue of 'recommended' actions that have a higher chance of
being selected over deck actions.
* Opaque type of pools.
* [of_weighted_actions actions ~accept_rec_flag ~use_rec_flag] tries to
... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.