_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
44013ecb7a06c1a56d60eca12e7d6154035f4efe883faddc166c538f502e2ba9
codecov/codecov-racket
gitlab-service.rkt
#lang racket/base (provide gitlab-service@ gitlab-ci?) (require "ci-service.rkt" racket/unit racket/list racket/string) (define (gitlab-ci?) (and (getenv "CI") (getenv "GITLAB_CI"))) (define-unit gitlab-service@ (import) (export ci-service^) (define (query) (define project-url (getenv "CI_PROJECT_URL")) ...
null
https://raw.githubusercontent.com/codecov/codecov-racket/50388b36071d54b2beffc0cfd8ad17cad940f7a8/cover/private/gitlab-service.rkt
racket
#lang racket/base (provide gitlab-service@ gitlab-ci?) (require "ci-service.rkt" racket/unit racket/list racket/string) (define (gitlab-ci?) (and (getenv "CI") (getenv "GITLAB_CI"))) (define-unit gitlab-service@ (import) (export ci-service^) (define (query) (define project-url (getenv "CI_PROJECT_URL")) ...
a29ccac0b1515d6667231692ca366a87da8305e59c4ef463493db397f171a54c
heraldry/heraldicon
shield_separator.cljs
(ns heraldicon.heraldry.shield-separator (:require [heraldicon.heraldry.default :as default] [heraldicon.interface :as interface] [re-frame.core :as rf])) (defn shield-separator? [element] (-> element :type (= :heraldry/shield-separator))) (def remove-element-options {:post-fn (fn [elements...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/shield_separator.cljs
clojure
TODO: get rid of this
(ns heraldicon.heraldry.shield-separator (:require [heraldicon.heraldry.default :as default] [heraldicon.interface :as interface] [re-frame.core :as rf])) (defn shield-separator? [element] (-> element :type (= :heraldry/shield-separator))) (def remove-element-options {:post-fn (fn [elements...
a40d3fc4b6d4508767ae4c48133b385922b6add2beafc3ffc8a66693b74e0028
rizo/snowflake-os
marshal.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/marshal.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : marshal.mli , v 1.14 2005 - 1...
dd7af74d143d60c99684f6989285e7dc80186d9529e28fdb9cc2012f8dd485ae
mattjbray/ocaml-decoders
encode.mli
include Decoders.Encode.S with type value = Bencode.t val int64 : int64 encoder
null
https://raw.githubusercontent.com/mattjbray/ocaml-decoders/da05e541c1c587151ee3ccadf929e86b287215bb/src-bencode/encode.mli
ocaml
include Decoders.Encode.S with type value = Bencode.t val int64 : int64 encoder
0fb2317ed530866c351830fe1c849d5bb74eb1dd4f5f082301cc0e08072df45d
tonyrog/graph
graph_color.erl
@author < > ( C ) 2019 , %%% @doc %%% Graph coloring algorithm %%% @end Created : 22 Mar 2019 by < > -module(graph_color). -export([greedy/1, greedy/2, greedy/3]). -export([order_smallest_last/1]). -export([first_available/1]). greedy(G) -> Order = order_smallest_last(G), greedy(G, Order). ...
null
https://raw.githubusercontent.com/tonyrog/graph/c930de5707f5e66499b29646b05f4570163ce7c5/src/graph_color.erl
erlang
@doc Graph coloring algorithm @end List is a list of colors assigned to neighbours to V select the vertex V with minimum degree remove that and recurse (save the degree)
@author < > ( C ) 2019 , Created : 22 Mar 2019 by < > -module(graph_color). -export([greedy/1, greedy/2, greedy/3]). -export([order_smallest_last/1]). -export([first_available/1]). greedy(G) -> Order = order_smallest_last(G), greedy(G, Order). greedy(G, Order) when is_list(Order) -> Color ...
22faea33e8c7b476bae4506ace82a1a9d811ea1f7639eac8bd80bd0f1074ddbb
philipcristiano/sssftp
sssftp_user_session.erl
%%%------------------------------------------------------------------- @author philipcristiano 2016 philipcristiano %%% @doc %%% %%% @end %%%------------------------------------------------------------------- -module(sssftp_user_session). -behaviour(gen_server). -compile([{parse_transform, lager_transform}]). %...
null
https://raw.githubusercontent.com/philipcristiano/sssftp/186a2a0f77ef0dec7966414a3173d4a66a32d796/src/sssftp_user_session.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API functions gen_server callbacks API =================================================================== API functions ==============================================...
@author philipcristiano 2016 philipcristiano -module(sssftp_user_session). -behaviour(gen_server). -compile([{parse_transform, lager_transform}]). -export([start_link/0, start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, ...
a3e6df393920e97d2789a414cdf93df6498a94f8a779f85cc092f2b494bd3e4e
amosr/folderol
Map2Ignorant.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.Folderol.Kernel.Map2Ignorant where import Folderol import Folderol.Splice import P import qualified Data.Vector as Vector import System.IO map2_ignorant :: (a -> b) -> (b -> c) -> Vector.Vector a -> IO (Vector.Vector b) map2_ignorant f g = $$(...
null
https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/test/Test/Folderol/Kernel/Map2Ignorant.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.Folderol.Kernel.Map2Ignorant where import Folderol import Folderol.Splice import P import qualified Data.Vector as Vector import System.IO map2_ignorant :: (a -> b) -> (b -> c) -> Vector.Vector a -> IO (Vector.Vector b) map2_ignorant f g = $$(...
741a5984b67aa90be0ccfffa780632deb881ba7aaa6e574cdea536a124fd3aa9
hatashiro/line
TypesSpecHelper.hs
# LANGUAGE QuasiQuotes # module Line.Messaging.Webhook.TypesSpecHelper where import Text.RawString.QQ import qualified Data.ByteString.Lazy as BL goodBody :: BL.ByteString goodBody = [r| { "events": [] } |] badBody :: BL.ByteString badBody = [r| { "event": [] } |] goodUser :: BL.ByteString goodUser = [r| { "type":...
null
https://raw.githubusercontent.com/hatashiro/line/3b5ddb0b98e5937d86157308512c1c96cd49c86a/test/Line/Messaging/Webhook/TypesSpecHelper.hs
haskell
# LANGUAGE QuasiQuotes # module Line.Messaging.Webhook.TypesSpecHelper where import Text.RawString.QQ import qualified Data.ByteString.Lazy as BL goodBody :: BL.ByteString goodBody = [r| { "events": [] } |] badBody :: BL.ByteString badBody = [r| { "event": [] } |] goodUser :: BL.ByteString goodUser = [r| { "type":...
2ca4c7047dc28e93eb0a7c492badee2ffb6a7bbfb4dbee4f2fb605ca5423a97f
scalar-labs/scalar-jepsen
transfer_append_2pc.clj
(ns scalardb.transfer-append-2pc (:require [cassandra.conductors :as conductors] [cassandra.core :as cassandra] [clojure.core.reducers :as r] [jepsen [client :as client] [checker :as checker] [generator :as gen]] [scalardb.core :as...
null
https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/7bc8b695a24b3fca9c21c5587e8ffeec73e557fc/scalardb/src/scalardb/transfer_append_2pc.clj
clojure
(ns scalardb.transfer-append-2pc (:require [cassandra.conductors :as conductors] [cassandra.core :as cassandra] [clojure.core.reducers :as r] [jepsen [client :as client] [checker :as checker] [generator :as gen]] [scalardb.core :as...
2a0fffc47b247d60cc372ffd88c8424ea7454bc59282af33755f5d4117c353ab
arichiardi/replumb
console.cljs
(ns replumb-repl.console (:require [clojure.string :as s :refer [join]] [cljsjs.jqconsole] [replumb.core :as replumb])) (defn new-jqconsole "Creates a new instance of JQConsole which loads on the input selector (any jQuery selector will work) and configuration. The options are passed as...
null
https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/repl-demo/browser/cljs/replumb_repl/console.cljs
clojure
(ns replumb-repl.console (:require [clojure.string :as s :refer [join]] [cljsjs.jqconsole] [replumb.core :as replumb])) (defn new-jqconsole "Creates a new instance of JQConsole which loads on the input selector (any jQuery selector will work) and configuration. The options are passed as...
a2a1a60e29678de1f7d94558948311d7efd54bff6c952ad1e16eea64122ac3e7
orbitz/ocaml-pastry
routing_table_tests.ml
open Core.Std open OUnit let node_printer n = n |> Pastry.Node.key |> Pastry.Key.to_string |> Pastry.Hexstring.encode let node_option_printer = function | Some n -> "Some " ^ node_printer n | None -> "None" let node_option_compare x y = match (x, y) with | (Some n1, Some n2) -> let k1...
null
https://raw.githubusercontent.com/orbitz/ocaml-pastry/9a31bf0328ae44b4130d729845119b5bf0413b36/tests/routing_table_tests.ml
ocaml
open Core.Std open OUnit let node_printer n = n |> Pastry.Node.key |> Pastry.Key.to_string |> Pastry.Hexstring.encode let node_option_printer = function | Some n -> "Some " ^ node_printer n | None -> "None" let node_option_compare x y = match (x, y) with | (Some n1, Some n2) -> let k1...
b315ace4cc72b66bb3aa567432587b59238d089c635ef7e8a9e48da862f76a8f
tpine/.stumpwm.d
keybindings.lisp
(in-package :stumpwm) ;; Double check prefix-key is set correctly (set-prefix-key (kbd "C-t")) ;; Emacs Style Frame Splitting (define-key *root-map* (kbd "0") "remove") (define-key *root-map* (kbd "1") "only") (define-key *root-map* (kbd "2") "vsplit") (define-key *root-map* (kbd "3") "hsplit") (defmacro make-progra...
null
https://raw.githubusercontent.com/tpine/.stumpwm.d/7c26a095400165b4bea9d9c78d77b0932563ea84/keybindings.lisp
lisp
Double check prefix-key is set correctly Emacs Style Frame Splitting Setup bindings for less common aplications which would be opened then closed Shutdown and Reboot System Command Keymap
(in-package :stumpwm) (set-prefix-key (kbd "C-t")) (define-key *root-map* (kbd "0") "remove") (define-key *root-map* (kbd "1") "only") (define-key *root-map* (kbd "2") "vsplit") (define-key *root-map* (kbd "3") "hsplit") (defmacro make-program-binding (program-name window-class &optional alias) "Create run-or-rais...
00b903c2764fe30b2cd45add30a24019f77369a13d8c71c0e28038156dce0ac2
jimrthy/frereth
core_test.cljs
(ns frontend.core-test (:require [cljs.test :as test :refer-macros [deftest is testing]] [frontend.core :as core])) (deftest do-nothing-sanitation (let [doms [[:a {:href ""} "Github"] [:p "Hello " [:em "World!"]] [:div [:h1 foo-1829] [:div.btn-t...
null
https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/log-viewer/test/cljs/frontend/core_test.cljs
clojure
This would lead to sanitation :on-click :frontend.worker/button-+ :on-click :frontend.worker/button-- :on-click :frontend.worker/button-log
(ns frontend.core-test (:require [cljs.test :as test :refer-macros [deftest is testing]] [frontend.core :as core])) (deftest do-nothing-sanitation (let [doms [[:a {:href ""} "Github"] [:p "Hello " [:em "World!"]] [:div [:h1 foo-1829] [:div.btn-t...
8c98b41dba77aac3432e5a355cb796f10efe6c6c3d89e92edd563e27d75d1ac8
KaroshiBee/weevil
mdb_stepper.ml
TODO use lib_mockup one ? module Client_context_unix = Tezos_client_base_unix.Client_context_unix module Client_context = Tezos_client_base.Client_context open Mdb_import.Tez type code_trace = (Ctxt.Script.expr * Prot.Apply_internal_results.packed_internal_contents trace * Ctxt.Lazy_storage.diffs option) type t = ...
null
https://raw.githubusercontent.com/KaroshiBee/weevil/8565bf833db5114654495b361db5a4d53879e48b/bin/weevil_mdb_014/src/mdb_stepper.ml
ocaml
taken from proto_XXX.../lib_plugin/RPC.ml Scripts.register() Constants.hard_gas_limit_per_operation ctxt let*! () = Logs_lwt.debug (fun m -> m "doing client config init mockup - ONLY NEEDED FOR DISK BASED MOCKS") unix_mockup protocol_hash bootstrap_accounts_filename protocol_constants_file...
TODO use lib_mockup one ? module Client_context_unix = Tezos_client_base_unix.Client_context_unix module Client_context = Tezos_client_base.Client_context open Mdb_import.Tez type code_trace = (Ctxt.Script.expr * Prot.Apply_internal_results.packed_internal_contents trace * Ctxt.Lazy_storage.diffs option) type t = ...
ac0aa291e6dea1f583cfa2d0310c959f6bf5e8ecce1d2240b027d71e133d42ec
spell-music/csound-expression
Instr.hs
module Csound.Typed.GlobalState.Instr where import Control.Monad import Data.Map import Csound.Dynamic import qualified Csound.Typed.GlobalState.Elements as C import Csound.Typed.Types.MixSco import Csound.Typed.Types.Prim import Csound.Typed.GlobalState.GE import Csound.Typed.GlobalState.SE import Csound.Typed.Glob...
null
https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression-typed/src/Csound/Typed/GlobalState/Instr.hs
haskell
module Csound.Typed.GlobalState.Instr where import Control.Monad import Data.Map import Csound.Dynamic import qualified Csound.Typed.GlobalState.Elements as C import Csound.Typed.Types.MixSco import Csound.Typed.Types.Prim import Csound.Typed.GlobalState.GE import Csound.Typed.GlobalState.SE import Csound.Typed.Glob...
b086fd5ee28cc11845f5b9c2bfadbbc14ab50567cbcb399cd181f259d7c063da
MyDataFlow/ttalk-server
rest_expires_binary.erl
-module(rest_expires_binary). -export([init/3]). -export([content_types_provided/2]). -export([get_text_plain/2]). -export([expires/2]). init(_Transport, _Req, _Opts) -> {upgrade, protocol, cowboy_rest}. content_types_provided(Req, State) -> {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}. get_tex...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/test/http_SUITE_data/rest_expires_binary.erl
erlang
-module(rest_expires_binary). -export([init/3]). -export([content_types_provided/2]). -export([get_text_plain/2]). -export([expires/2]). init(_Transport, _Req, _Opts) -> {upgrade, protocol, cowboy_rest}. content_types_provided(Req, State) -> {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}. get_tex...
f979cd5d42305dc7063f9028d91878ba19ccc353a819d5ecaf06be18a93a3c60
Simspace/postgresql-tx
Internal.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TypeApplications # # LANGUAGE BlockArguments # # LANGUAGE DerivingStrategies # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE UndecidableInstances # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE GeneralisedNewtypeDeriving # module Database.PostgreSQL.Tx.Query.Internal...
null
https://raw.githubusercontent.com/Simspace/postgresql-tx/6769f10a4b928aa37c47ffa5f89f0fa3a9c6fc01/query/src/Database/PostgreSQL/Tx/Query/Internal.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE ConstraintKinds # * Disclaimer $disclaimer ** Internals | Runtime environment needed to run @postgresql-query@ via @postgresql-tx@. | Monad type alias for running @postgresql-query@ via @postgresql-tx@. | Re-export of 'Database.PostgreSQL.Tx.MonadLogger.Logger'. | Analogous ...
# LANGUAGE TypeApplications # # LANGUAGE BlockArguments # # LANGUAGE DerivingStrategies # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE UndecidableInstances # # LANGUAGE GeneralisedNewtypeDeriving # module Database.PostgreSQL.Tx.Query.Internal module Database.PostgreSQL.Tx.Query.Internal ) where ...
4d52c99be6c3ed35d072cf7c520bd01ce297b6a34c7802c180f929c99b2f8c20
alaricsp/chicken-scheme
fprint.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; File: fprint.sc Description : FPRINT benchmark Author : ;;; Created: 11-Apr-85 Modified : 9 - Jul-85 21:11:33 ( ) 24 - Jul-87 ( ) 16 - Nov-94 ( Qobi ) ;;; ...
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/benchmarks/fprint.scm
scheme
File: fprint.sc Created: 11-Apr-85 31-Mar-98 (Qobi) Language: Scheme Status: Public Domain Scheme->C can't READ original symbols
Description : FPRINT benchmark Author : Modified : 9 - Jul-85 21:11:33 ( ) 24 - Jul-87 ( ) 16 - Nov-94 ( Qobi ) 26 - Mar-00 ( flw ) FPRINT -- Benchmark to print to a file . (define test-atoms '(abcdef12 cdefgh23 efghij34 ghijkl45 ijklmn56 klm...
0f94e646d9a27baded5ace89737ebd6ffb08cdff33e93b80552fca5fedeeda5c
michaelballantyne/syntax-spec
props.rkt
#lang racket/base (require "../testing.rkt") (syntax-spec (extension-class dsl-macro) (nonterminal dsl-expr #:allow-extension dsl-macro form (form))) (define-syntax attach-property-to-argument (dsl-macro (syntax-parser [(_ f) (syntax-property #'f 'foo 'bar)]))) (define-syntax identi...
null
https://raw.githubusercontent.com/michaelballantyne/syntax-spec/87c308e1ea48a8ca02cc89552d15ecb71704482c/test/props.rkt
racket
#lang racket/base (require "../testing.rkt") (syntax-spec (extension-class dsl-macro) (nonterminal dsl-expr #:allow-extension dsl-macro form (form))) (define-syntax attach-property-to-argument (dsl-macro (syntax-parser [(_ f) (syntax-property #'f 'foo 'bar)]))) (define-syntax identi...
f1b16d72405f0fb3c28699c34d2a19206c0c25a27a087d02aa448aa2ea2f8acd
tobbebex/GPipe
Resources.hs
{-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- -- Module : Resources Copyright : -- License : BSD3 -- Maintainer : -- Stability : Experimental Portability : Portable -- -- | -- ----------------------------------------------...
null
https://raw.githubusercontent.com/tobbebex/GPipe/9ff3afde0416c118971c5a2f93effdc75ef59e88/src/Resources.hs
haskell
# LANGUAGE RankNTypes # --------------------------------------------------------------------------- Module : Resources License : BSD3 Stability : Experimental | --------------------------------------------------------------------------- | A structure describing how a texture is sampled | Filter ...
Copyright : Maintainer : Portability : Portable module Resources ( createProgramResource, createVertexBuffer, createIndexBuffer, useUniforms, useProgramResource, drawIndexVertexBuffer, drawVertexBuffer, VertexBuffer(..), IndexBuffer(..), UniformLocationSet, ...
e023d544f1d275be796152ffeb47def543c7c64c7ab92e452fefb173070da4aa
mabragor/cl-vhdl
parse-expressions.lisp
(in-package #:cl-vhdl) (defun populate-precedence (lst) (let ((res (make-hash-table :test #'eq))) (iter (for elt in lst) (for i from 1) (if (atom elt) (setf (gethash (intern (string elt) "KEYWORD") res) i) (iter (for sub-elt in elt) (setf (gethash (intern (string sub-elt) "KEYWORD") r...
null
https://raw.githubusercontent.com/mabragor/cl-vhdl/1ce015c90e02a6379ae5fc69b6b936988c564bc2/src/parse/parse-expressions.lisp
lisp
(defun %shunting-yard (my-iter) (iter (for elt in-it my-iter) (collect elt))) Report to higher levels new-op new-lhs new-rhs) Expressions and Names (define-ebnf-rule logical-expression ("relation { AND relation } | relation [ NAND relation ] | relation { OR relation }" (format t "~a" res) With re...
(in-package #:cl-vhdl) (defun populate-precedence (lst) (let ((res (make-hash-table :test #'eq))) (iter (for elt in lst) (for i from 1) (if (atom elt) (setf (gethash (intern (string elt) "KEYWORD") res) i) (iter (for sub-elt in elt) (setf (gethash (intern (string sub-elt) "KEYWORD") r...
f8aa6b06256b1509c7de4d0cb45ca60d50f82b7d235b2808be9b08ea7b4f4709
untangled-web/untangled-spec
router.cljs
(ns untangled-spec.router (:require [clojure.set :as set] [com.stuartsierra.component :as cp] [om.next :as om] [pushy.core :as pushy] [untangled-spec.renderer :as renderer] [untangled-spec.selectors :as sel] [untangled.client.mutations :as m]) (:import (goog.Uri QueryData))) (defn p...
null
https://raw.githubusercontent.com/untangled-web/untangled-spec/0d44863f627ed7311677b438b88bd6d424249507/src/untangled_spec/router.cljs
clojure
so we dont get an ugly escaped url
(ns untangled-spec.router (:require [clojure.set :as set] [com.stuartsierra.component :as cp] [om.next :as om] [pushy.core :as pushy] [untangled-spec.renderer :as renderer] [untangled-spec.selectors :as sel] [untangled.client.mutations :as m]) (:import (goog.Uri QueryData))) (defn p...
30b31eeea7ca70defe5a9322b0e9bf52063f22e05bcea7eee9dffe18ebf452f3
fluree/ledger
core.clj
(ns fluree.db.ledger.txgroup.core (:require [fluree.db.ledger.consensus.raft :as raft] [fluree.db.ledger.consensus.none :as none] [fluree.db.util.log :as log] [fluree.db.ledger.txgroup.txgroup-proto :as txproto])) (set! *warn-on-reflection* true) ;; ledger group consensus keys...
null
https://raw.githubusercontent.com/fluree/ledger/2b7819f38c6d9f8347028e4458fb8a301a3d9a35/src/fluree/db/ledger/txgroup/core.clj
clojure
ledger group consensus marks network as initialized ledger group storage options default private key if db is open last index point each index point and timestamp on when completed - to bring new server in sync and useful for centralized garbage collection blocks we are processing who internally is producing re...
(ns fluree.db.ledger.txgroup.core (:require [fluree.db.ledger.consensus.raft :as raft] [fluree.db.ledger.consensus.none :as none] [fluree.db.util.log :as log] [fluree.db.ledger.txgroup.txgroup-proto :as txproto])) (set! *warn-on-reflection* true) keys used across tx group ...
c434dd803c958bd179c83da86f3c5b03b95691e2177ab17f5e722b932f8ea82b
ItsMeijers/Lambdabox
Tradeable.hs
# LANGUAGE MultiParamTypeClasses # module Lambdabox.Trade.Tradeable ( Tradeable(..) ) where import Lambdabox.Box import Lambdabox.Exchange import Lambdabox.Symbol -- | The Tradeable class provides the possibilty of trading a pair of cryptos -- on a specific exchange. class (Symbol a, Symbol b, Exchange e) =>...
null
https://raw.githubusercontent.com/ItsMeijers/Lambdabox/c19a8ae7d37b9f8ab5054d558fe788a5d4483092/src/Lambdabox/Trade/Tradeable.hs
haskell
| The Tradeable class provides the possibilty of trading a pair of cryptos on a specific exchange.
# LANGUAGE MultiParamTypeClasses # module Lambdabox.Trade.Tradeable ( Tradeable(..) ) where import Lambdabox.Box import Lambdabox.Exchange import Lambdabox.Symbol class (Symbol a, Symbol b, Exchange e) => Tradeable e a b instance Tradeable Binance KEY BTC instance Tradeable Binance ETH BTC instance Tradeabl...
724cd605dad4fd648b5b69bb2d2ab59e52ca703a0073b374126a461a332e6640
Mathnerd314/stroscot
ReturnTypeOverloading_HM.hs
# LANGUAGE LambdaCase # type Lam = Value -> Value data Value = Int Integer | Bool Bool | Fn Type Type Lam | Undecided Type (Type -> Value) data Type = TyInt | TyBool | TyFn Type Type | TVar (IORef TVar) data TVar = Bound Type | Unbound TVar_ID Classes type TVar_ID = Int data Classes = ...
null
https://raw.githubusercontent.com/Mathnerd314/stroscot/db45e536ea7700bca10d3fda8dac41e43ece29c9/tests/ReturnTypeOverloading_HM.hs
haskell
Can a monomorphic TVar(a) be found inside this type? --------- ------------- ----------- ---------------
# LANGUAGE LambdaCase # type Lam = Value -> Value data Value = Int Integer | Bool Bool | Fn Type Type Lam | Undecided Type (Type -> Value) data Type = TyInt | TyBool | TyFn Type Type | TVar (IORef TVar) data TVar = Bound Type | Unbound TVar_ID Classes type TVar_ID = Int data Classes = ...
18dfa07c1cb8727004491448935fd1f517096f621391c60f5618296fd36b03c3
unnohideyuki/bunny
sample228.hs
main = do print $ gcd 14 (21::Int) print $ lcm 21 (14::Int)
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample228.hs
haskell
main = do print $ gcd 14 (21::Int) print $ lcm 21 (14::Int)
7c2b19c6e42ad3c646089a1b2205fb529db18bf2f251d239a3932c444e56aa3c
Idorobots/spartan
substitute.rkt
#lang racket ;; Binding aware variable substitution. (require "utils/utils.rkt") (require "utils/set.rkt") (require "ast.rkt") (provide substitute-symbols substitute make-subs extend-subs empty-subs? filter-subs apply-sub replace-sub) (define (substitute-symbols subs expr) (substitute (lambda (subs expr ...
null
https://raw.githubusercontent.com/Idorobots/spartan/ef3b032906655585d284f1c9a33a58f1e35cb180/src/compiler/substitute.rkt
racket
Binding aware variable substitution.
#lang racket (require "utils/utils.rkt") (require "utils/set.rkt") (require "ast.rkt") (provide substitute-symbols substitute make-subs extend-subs empty-subs? filter-subs apply-sub replace-sub) (define (substitute-symbols subs expr) (substitute (lambda (subs expr kont) (if (ast-symbol? e...
427c53d4dad986fb798878902e46f187772ffa52076341eab4a55638108bbedd
qfpl/reflex-tutorial
Bootstrap.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} module Util.Bootstrap ( panel , button , buttonClass ) where import Data.Monoid ((<>)) import Data.Text (Text) import Reflex.Dom.Core hiding (button) import qualified Util.Reflex as R button :: MonadWidget t m => Text -> m (Event t ()) button...
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/common/src/Util/Bootstrap.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs #
module Util.Bootstrap ( panel , button , buttonClass ) where import Data.Monoid ((<>)) import Data.Text (Text) import Reflex.Dom.Core hiding (button) import qualified Util.Reflex as R button :: MonadWidget t m => Text -> m (Event t ()) button = R.buttonClass "btn data61-green text-white p-2 mx-2" ...
ee8fa8d1b8bed4fd54370ef3316ecb449cde0ed636f5f7fc61279cf7a5a7b2a5
lpeterse/haskell-terminal
Main.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} module Main where import Control.Concurrent import Control.Monad.Catch import Control.Monad import Control.Monad.IO.Class import Data.Text.Prettyprint.Doc import System.Terminal import ...
null
https://raw.githubusercontent.com/lpeterse/haskell-terminal/994602af65e7f038bc387139ec961248760fd6e6/example/terminal-screen/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies #
module Main where import Control.Concurrent import Control.Monad.Catch import Control.Monad import Control.Monad.IO.Class import Data.Text.Prettyprint.Doc import System.Terminal import Prelude hiding ((<>)) main :: IO () main = ...
7c18be01adf5795c226c15221d9f9b728f68ccd78b43bdcc746bb88709b30418
discus-lang/ddc
Base.hs
{-# OPTIONS_HADDOCK hide #-} module DDC.Core.Check.Context.Base ( Context (..) -- * Construction , emptyContext , contextOfEnvT , contextOfEnvX , contextOfPrimEnvs -- * Projection , contextEquations , contextCapabilities , contextData...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Check/Context/Base.hs
haskell
# OPTIONS_HADDOCK hide # * Construction * Projection * Pushing * Marking * Popping * Lookup * Membership * Existentials * Lifting Context -------------------------------------------------------------------- | The type checker context. Holds a position counter and a stack of elements. The top of the st...
module DDC.Core.Check.Context.Base ( Context (..) , emptyContext , contextOfEnvT , contextOfEnvX , contextOfPrimEnvs , contextEquations , contextCapabilities , contextDataDefs , contextEnvT , pushType, pushTypes , pushKind, p...
9baf80387ba6a2bdc1cecc768bab520e8b57fbc2756ef0da66647bbb96e5780d
IBM-Watson/kale
create_test.clj
;; ( C ) Copyright IBM Corp. 2016 All Rights Reserved . ;; (ns kale.create-test (:require [kale.create :as sut] [kale.persistence :as persist] [kale.cloud-foundry :as cf] [kale.cloud-foundry-constants :as c] [cheshire.core :as json] [clj-time.core :refer ...
null
https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/test/kale/create_test.clj
clojure
( C ) Copyright IBM Corp. 2016 All Rights Reserved . (ns kale.create-test (:require [kale.create :as sut] [kale.persistence :as persist] [kale.cloud-foundry :as cf] [kale.cloud-foundry-constants :as c] [cheshire.core :as json] [clj-time.core :refer [in-mi...
7ecf211b9c4055301ff58a3b9e440f88ea3e27dd70563142b22cdd0c2cbe6372
kloimhardt/clj-tiles
tutorials_sicm2.cljs
(ns cljtiles.tutorials-sicm2 (:require [cljtiles.sicm :as sc])) (def bold {:style {:font-weight "bold"}}) (def e-vect [{:lable :free-particle :description [:div [:div bold "Description"] [:p "This is the Free Particle again. You reconize it: it was at the very beginning of the Driven Pendulum ch...
null
https://raw.githubusercontent.com/kloimhardt/clj-tiles/bf8856c1efae2d38eb083df6d18d95f9e52bdf83/src/cljtiles/tutorials_sicm2.cljs
clojure
(sc.api/defsc :brk-1) after 'Path-of-a-Free-Particle-num this is not needed anymore, as :solution was removed so the description is displayed anyway. It is kept here to remind that this feature exists as it is nowhere used
(ns cljtiles.tutorials-sicm2 (:require [cljtiles.sicm :as sc])) (def bold {:style {:font-weight "bold"}}) (def e-vect [{:lable :free-particle :description [:div [:div bold "Description"] [:p "This is the Free Particle again. You reconize it: it was at the very beginning of the Driven Pendulum ch...
ccfbb60d0b84eeab17500faa327734fc476c416c0fcc71ff7cd2828040077653
rudymatela/tankode
RatioMath.hs
-- | -- Module : RatioMath Copyright : ( c ) 2017 License : LGPL 2.1 ( see the file LICENSE ) -- -- Some mathematical functions over rationals. module RatioMath ( module Data.Ratio , sin, cos, tan, asin, acos, atan, pi , sqrt , precision , roundR , (///) ) where import Prelude hiding...
null
https://raw.githubusercontent.com/rudymatela/tankode/299ec6f78a9a18a8fc902be911a556d0497c30e1/runner/src/RatioMath.hs
haskell
| Module : RatioMath Some mathematical functions over rationals. maybe just 360 is enough
Copyright : ( c ) 2017 License : LGPL 2.1 ( see the file LICENSE ) module RatioMath ( module Data.Ratio , sin, cos, tan, asin, acos, atan, pi , sqrt , precision , roundR , (///) ) where import Prelude hiding (sin, cos, tan, asin, acos, atan, pi, sqrt) import qualified Prelude as P import ...
0b5da82391b5b57cd38d78af224bda3eec486852a3e8a50e048f9a25840e7414
tweag/ormolu
type-applications.hs
# LANGUAGE TypeApplications # type P = K @Bool @(Bool :: *) 'True 'False
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/type/type-applications.hs
haskell
# LANGUAGE TypeApplications # type P = K @Bool @(Bool :: *) 'True 'False
40142644e2b05c3682a483b50600d8c8d54510c85c98dbf8748622c1353efb85
vyorkin/tiger
canon.ml
open Core open Alcotest open Ch8 open Ch8.Ir let label_a = ~|(Temp.mk_label (Some "a")) let label_b = ~|(Temp.mk_label (Some "b")) module Linearize = struct let stmt = testable pp_stmt equal_stmt let ex1 = Expr (ESeq (label_a, ESeq (label_b, ~@ ~$1))) let ex1_expected = [label_a; label_b; Expr (~@ ~$...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter8/test/canon.ml
ocaml
open Core open Alcotest open Ch8 open Ch8.Ir let label_a = ~|(Temp.mk_label (Some "a")) let label_b = ~|(Temp.mk_label (Some "b")) module Linearize = struct let stmt = testable pp_stmt equal_stmt let ex1 = Expr (ESeq (label_a, ESeq (label_b, ~@ ~$1))) let ex1_expected = [label_a; label_b; Expr (~@ ~$...
31dafb4c4fbd6f7912085905b2aaebb7e31deaa8bc19cf862043050ccf61ebb3
input-output-hk/cardano-ledger-byron
KeyGen.hs
module Cardano.Crypto.Signing.KeyGen ( keyGen , deterministicKeyGen ) where import Cardano.Prelude import qualified Cardano.Crypto.Wallet as CC import Crypto.Random (MonadRandom, getRandomBytes) import Data.ByteArray (ScrubbedBytes) import qualified Data.ByteString as BS import Cardano.Crypto.Signing.Verificat...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/crypto/src/Cardano/Crypto/Signing/KeyGen.hs
haskell
TODO: this is just a placeholder for actual (not ready yet) derivation of keypair from seed in cardano-crypto API | Generate a key pair. It's recommended to run it with 'runSecureRandom' than the default IO generator.
module Cardano.Crypto.Signing.KeyGen ( keyGen , deterministicKeyGen ) where import Cardano.Prelude import qualified Cardano.Crypto.Wallet as CC import Crypto.Random (MonadRandom, getRandomBytes) import Data.ByteArray (ScrubbedBytes) import qualified Data.ByteString as BS import Cardano.Crypto.Signing.Verificat...
f71c1ae556a26a4e919a8ab921d3d6a1aa9ad83b56abfd69c3233a0a6f31e17d
vernemq/vernemq
vmq_webhooks_metrics.erl
-module(vmq_webhooks_metrics). -export([init/0, incr/2, incr/3, metrics/0]). -include_lib("vmq_server/include/vmq_metrics.hrl"). -type counter_type() :: requests | errors | bytes_sent. -type hook() :: on_register | on_register_m5 | auth_on_publish | auth_on_publish_m5 | auth_on_register | aut...
null
https://raw.githubusercontent.com/vernemq/vernemq/ce497e6d7018c09a6ad76d40b961c9e7d898c7ea/apps/vmq_webhooks/src/vmq_webhooks_metrics.erl
erlang
-module(vmq_webhooks_metrics). -export([init/0, incr/2, incr/3, metrics/0]). -include_lib("vmq_server/include/vmq_metrics.hrl"). -type counter_type() :: requests | errors | bytes_sent. -type hook() :: on_register | on_register_m5 | auth_on_publish | auth_on_publish_m5 | auth_on_register | aut...
1ccc2df266a119f0662167239e76ff589094bd3560c96560c9f871427df1aeca
LoupVaillant/Monokex
gen_code.mli
val header : (string * Proto.protocol) list -> string val source : (string * Proto.protocol) list -> string -> string
null
https://raw.githubusercontent.com/LoupVaillant/Monokex/ea8a16156164644dab25f6e7aefd85b169a4e7ee/src/gen_code.mli
ocaml
val header : (string * Proto.protocol) list -> string val source : (string * Proto.protocol) list -> string -> string
d3f20a6a095b570f50414e52f96e021aacd222bcaff03c13014c4d870c2b5e6d
VERIMAG-Polyhedra/VPL
CoqAddOn.mli
open Ascii open Datatypes open List0 open String0 val nl : char list val append1 : char list -> char -> char list val concat : char list -> char list list -> char list val substStr : char list -> char list list -> char list val sprintfAux : char list -> char list list -> char list -> char list val sprintf : char ...
null
https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/CoqAddOn.mli
ocaml
open Ascii open Datatypes open List0 open String0 val nl : char list val append1 : char list -> char -> char list val concat : char list -> char list list -> char list val substStr : char list -> char list list -> char list val sprintfAux : char list -> char list list -> char list -> char list val sprintf : char ...
83871b64d948d3f8798fda879ceb6bc08cc8a3d330e30adf82c0db71089606c8
typelead/intellij-eta
Utils.hs
# OPTIONS_GHC -fno - warn - missing - fields # module IntelliJ.Plugin.Eta.Lang.Utils where import P import Language.Eta.Main.DynFlags | Default flags which can be used to initialize the Eta Lexer . Adapted from Language . Eta . . Lexer.lexTokenStream defaultFlags :: DynFlags defaultFlags = flip gopt_set Opt_...
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/IntelliJ/Plugin/Eta/Lang/Utils.hs
haskell
accessed that isn't defined, we'll get an exception at runtime. Warnings suppressed with -fno-warn-missing-fields
# OPTIONS_GHC -fno - warn - missing - fields # module IntelliJ.Plugin.Eta.Lang.Utils where import P import Language.Eta.Main.DynFlags | Default flags which can be used to initialize the Eta Lexer . Adapted from Language . Eta . . Lexer.lexTokenStream defaultFlags :: DynFlags defaultFlags = flip gopt_set Opt_...
a2835eb5a2db4cc76c6846fd14ba6cca73fd1889e868b67c08c084d718c28caf
lsrcz/grisette
THCompat.hs
# LANGUAGE CPP # {-# LANGUAGE TemplateHaskellQuotes #-} # LANGUAGE Trustworthy # {- ORMOLU_DISABLE -} -- | Module : . Core . THCompat Copyright : ( c ) 2021 - 2023 -- License : BSD-3-Clause (see the LICENSE file) -- -- Maintainer : -- Stability : Experimental Portability : GHC ...
null
https://raw.githubusercontent.com/lsrcz/grisette/51d492f60fb37b74a626b591ec4c7ed128fa6217/src/Grisette/Core/THCompat.hs
haskell
# LANGUAGE TemplateHaskellQuotes # ORMOLU_DISABLE | License : BSD-3-Clause (see the LICENSE file) Maintainer : Stability : Experimental
# LANGUAGE CPP # # LANGUAGE Trustworthy # Module : . Core . THCompat Copyright : ( c ) 2021 - 2023 Portability : GHC only module Grisette.Core.THCompat (augmentFinalType) where import Data.Bifunctor import Language.Haskell.TH.Syntax import Grisette.Core.Control.Monad.Union import Grisette....
a94e0dcae271a026723ffb0ed36577b9aee6f5731a824d890478bb9cc96509ef
alvatar/spheres
avl-tree.scm
;;!!! AVL Tree .author , 2005 .author , 2015 ;; ;; This module provides a thread safe (TODO) implementation of AVL Trees. ;; AVL Trees are binary trees that have the nice property that they ;; are kept balanced. Actually, unlike normal binary trees, all insert, delete and find operations on AVL Trees are gu...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/structure/avl-tree.scm
scheme
!!! AVL Tree This module provides a thread safe (TODO) implementation of AVL Trees. AVL Trees are binary trees that have the nice property that they are kept balanced. Actually, unlike normal binary trees, all insert, to his homepage). after which the algorithm on the nodes is wrapped as a whole avl tree. Refe...
.author , 2005 .author , 2015 delete and find operations on AVL Trees are guarantied O(log n ) . See L < / wiki / AVL_tree| / wiki / AVL_tree > for more information on AVL Trees . This implementation has been derived from a C++ implementation of ( google : avl tree algorithm McKee will get you...
8624ff20d3a975c7e20b44b434755f77dbcea2ad41b225a313f8cc63f78b95e9
benoitc/erlang-nat
natpmp.erl
%%% -*- erlang -*- This file is part of erlang - nat released under the MIT license . %%% See the NOTICE for more information. %%% Copyright ( c ) 2016 - 2018 < > -module(natpmp). -export([get_device_address/1]). -export([get_external_address/1]). -export([get_internal_address/1]). -export([discover/0]). -expo...
null
https://raw.githubusercontent.com/benoitc/erlang-nat/529802a3e5bbabd8e70f027217cb12c4c930ee5d/src/natpmp.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc get external ip @doc get internal address used for this gateway @doc discover a Nat gateway @doc add a port mapping with default lifetime @doc add a port mapping @doc delete a port mapping From #section-3.4 : A client requests explicit deletion of a m...
This file is part of erlang - nat released under the MIT license . Copyright ( c ) 2016 - 2018 < > -module(natpmp). -export([get_device_address/1]). -export([get_external_address/1]). -export([get_internal_address/1]). -export([discover/0]). -export([add_port_mapping/4, add_port_mapping/5]). -export([delete_po...
b6b5317968401d63f71f213835df49812f99c1abdf787ab3b0f0ab7a188464b8
kudu-dynamics/blaze
SbbOp.hs
module Blaze.Types.Pil.Op.SbbOp where -- This module is generated. Please use app/gen_pil_ops/Main.hs to modify. import Blaze.Prelude data SbbOp expr = SbbOp { left :: expr , right :: expr , carry :: expr } deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON) instance Hashable...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Types/Pil/Op/SbbOp.hs
haskell
This module is generated. Please use app/gen_pil_ops/Main.hs to modify.
module Blaze.Types.Pil.Op.SbbOp where import Blaze.Prelude data SbbOp expr = SbbOp { left :: expr , right :: expr , carry :: expr } deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON) instance Hashable a => Hashable (SbbOp a)
37879915531667abf373fe6e06ef57b3510966487d33c3bd31fdc6ad9e3953a5
alanz/ghc-exactprint
T11192.hs
# LANGUAGE PartialTypeSignatures # module T11192 where fails :: a fails = let go :: _ go 0 a = a in go (0 :: Int) undefined succeeds :: a succeeds = let go :: _ go _ a = a in go (0 :: Int) undefined
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T11192.hs
haskell
# LANGUAGE PartialTypeSignatures # module T11192 where fails :: a fails = let go :: _ go 0 a = a in go (0 :: Int) undefined succeeds :: a succeeds = let go :: _ go _ a = a in go (0 :: Int) undefined
560173cc9255ceb1e57a2adaadaf4cffb96221f4da80c8b6cb9b6002013c11da
crate/craterl
craterl_gen_server_tests.erl
%%%------------------------------------------------------------------- ( C ) 2014 , CRATE Technology GmbH Licensed to CRATE Technology GmbH ( " Crate " ) under one or more contributor %%% license agreements. See the NOTICE file distributed with this work for %%% additional information regarding copyright ownershi...
null
https://raw.githubusercontent.com/crate/craterl/2b90bf61c3c3a0a62e82f8c1710d7825c879fb10/test/craterl_gen_server_tests.erl
erlang
------------------------------------------------------------------- license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Crate licenses obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, sof...
( C ) 2014 , CRATE Technology GmbH Licensed to CRATE Technology GmbH ( " Crate " ) under one or more contributor this file to you under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may distributed under the License is distribut...
701c72e47662af475c5af9ab70fc28cb5318a74d65c6f968ca322b13938cb946
xapi-project/message-switch
memory.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/message-switch/1d0d1aa45c01eba144ac2826d0d88bb663e33101/xapi-idl/memory/memory.ml
ocaml
=== Memory conversion factors ============================================ === Arithmetic functions ================================================= === Memory rounding functions ============================================ === Division functions =================================================== === Memory ...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
93950be37fd52202f33811e9018abbcce36edb4ef75011beede0c1241d8e95be
dakk/yallo-lang
btype.ml
type iden = string [@@deriving show {with_path = false}] type btype = | TAnnot of btype * iden | TAny | TUnit | TAddress | TInt | TChainId | TNat | TMutez | TTimestamp | TBool | TSignature | TKeyHash | TKey | TString | TBytes | TOperation | TLambda of btype * btype | TList of btype...
null
https://raw.githubusercontent.com/dakk/yallo-lang/55a1b379306c9f113bd707e78b6e0c1be81bb7be/lib/intermediate/3_bast/btype.ml
ocaml
type iden = string [@@deriving show {with_path = false}] type btype = | TAnnot of btype * iden | TAny | TUnit | TAddress | TInt | TChainId | TNat | TMutez | TTimestamp | TBool | TSignature | TKeyHash | TKey | TString | TBytes | TOperation | TLambda of btype * btype | TList of btype...
46bb5b12889048ee341b82e27b52527ec0d969c55ddb0c77cf5f434861633873
mentat-collective/sicm-scheme-exercises
scratch.scm
(define cake 10)
null
https://raw.githubusercontent.com/mentat-collective/sicm-scheme-exercises/323300c252641add067f266e23427afd0bb34d8a/ch1/scratch.scm
scheme
(define cake 10)
66ff2128d8a658e40d57f7638a0c96e4b3f1b9f7b9691d2ac06b1abc4feb92ab
awkward-squad/ki
Thread.hs
module Ki.Internal.Thread ( Thread, makeThread, await, ThreadAffinity (..), ThreadOptions (..), defaultThreadOptions, ThreadFailed (..), unwrapThreadFailed, ) where import Control.Exception ( BlockedIndefinitelyOnSTM (..), Exception (fromException, toException), MaskingState (...
null
https://raw.githubusercontent.com/awkward-squad/ki/e7f692630ec56bf9412ceee7647731a4a36e7f29/ki/src/Ki/Internal/Thread.hs
haskell
| A thread. ==== __👉 Details__ * A thread's lifetime is delimited by the scope in which it was created. * The thread that creates a scope is considered the parent of all threads created within it. * If an exception is raised in a child thread, the child either propagates the exception to its parent (see 'K...
module Ki.Internal.Thread ( Thread, makeThread, await, ThreadAffinity (..), ThreadOptions (..), defaultThreadOptions, ThreadFailed (..), unwrapThreadFailed, ) where import Control.Exception ( BlockedIndefinitelyOnSTM (..), Exception (fromException, toException), MaskingState (...
bf3ec190bebf3829941fbf09ce2001a049eeacebcf4ca86655857b2552b8f0e0
capsjac/opengles
Texture.hs
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Graphics.OpenGLES.Texture ( -- * Texture Texture, texSlot, glLoadKtx, glLoadKtxFile, -- ** Unsafe Operations glLoadTex2D, , glLoadTex3D, glLoadTex2DArray, -- * Sampler setSampler, Sampler(..), MagFilter, magNeare...
null
https://raw.githubusercontent.com/capsjac/opengles/23b78e5d1b058349a778a49310d867164ea1a529/src/Graphics/OpenGLES/Texture.hs
haskell
* Texture ** Unsafe Operations * Sampler XXX Texture DoubleBufferring class Tex a where fromTexture :: Texture b -> a b fromTexture = id | Assign a texture to a texture slot starts from 0. ^ texture slot index ^ the texture to be bound GL_TEXTURE_0 + slot ^ Uncompressed ^ PowerVR SGX(iOS ) , Samsung S5PC110...
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Graphics.OpenGLES.Texture ( Texture, texSlot, glLoadKtx, glLoadKtxFile, glLoadTex2D, , glLoadTex3D, glLoadTex2DArray, setSampler, Sampler(..), MagFilter, magNearest, magLinear, MinFilter, minNearest, minLine...
86595d9b8054e63cb472e4e854abe5d2ee01fb1c413822ee9a661b9555d9ffb8
eugeneia/athens
scrypt.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- (in-package :crypto) scrypt from " Stronger Key Derivation via Sequential Memory - Hard Functions " presented at BSDCan'09 , May 2009 . ;;; (defun scrypt-vector-salsa (b) (declare (type (simple-octet-vector 64) b)) (let ((x (make-array 16 :element-type '(...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/ironclad-v0.40/src/kdf/scrypt.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*-
(in-package :crypto) scrypt from " Stronger Key Derivation via Sequential Memory - Hard Functions " presented at BSDCan'09 , May 2009 . (defun scrypt-vector-salsa (b) (declare (type (simple-octet-vector 64) b)) (let ((x (make-array 16 :element-type '(unsigned-byte 32)))) (declare (type (simple-arra...
47fabee1bd226179ba8df018adb3b0b7409ee70c21802c8db6edef1e98e3e21c
avsm/eeww
redefinition_hints.ml
(* TEST * toplevel *) (* This is a toplevel test to trigger toplevel specific hints *) module Empty = struct end type u = A type v = B module type S = sig end let m = (module Empty:S) module M = struct type 'a t = X of 'a end let x =M.X (A,B,m);; module type S = sig end let m = (module Empty:S) type u = A ...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/testsuite/tests/tool-toplevel/redefinition_hints.ml
ocaml
TEST * toplevel This is a toplevel test to trigger toplevel specific hints
module Empty = struct end type u = A type v = B module type S = sig end let m = (module Empty:S) module M = struct type 'a t = X of 'a end let x =M.X (A,B,m);; module type S = sig end let m = (module Empty:S) type u = A type v = B module M = struct type 'a t = X of 'a end let y = M.X (A,B,m);; x = y;; typ...
7dd795f9153bb155f736b1c81e816334aaa31b7200d83ba1b80e5fbf190d3594
input-output-hk/marlowe-cardano
Random.hs
----------------------------------------------------------------------------- -- -- Module : $Headers License : Apache 2.0 -- -- Stability : Experimental Portability : Portable -- -- | Arbitrary instance for an existentially quantified JSON type. -- ------------------------------------------------...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/16d1e16b0aac74e63f090fca4fc1a40104b7b573/marlowe-test/src/Spec/Marlowe/Service/Random.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental | Arbitrary instance for an existentially quantified JSON type. --------------------------------------------------------------------------- * Testing | Generate an arbitrary value. ^...
License : Apache 2.0 Portability : Portable module Spec.Marlowe.Service.Random generateValue ) where import Data.Jsonable (generateJsonable) import Spec.Marlowe.Semantics.Arbitrary () import Spec.Marlowe.Service.Serialization (knownJsonTypes) import Spec.Marlowe.Service.Types (Seed(..), Size(..))...
c437d8c6076b9b04f64e41e8e30883347f62af0bda26b53649b2799b2614b4fd
igrishaev/farseer
jetty_test.clj
(ns farseer.jetty-test (:require [farseer.jetty :as jetty] [farseer.http :as http] [com.stuartsierra.component :as component] [clj-http.client :as client] [ring.middleware.basic-authentication :refer [wrap-basic-authentication]] [clojure.test :refer [deftest is]])) (def PORT 18008) (def PAT...
null
https://raw.githubusercontent.com/igrishaev/farseer/b3be93aaa6ca5d917664a06373a880a675206f32/farseer-jetty/test/farseer/jetty_test.clj
clojure
(ns farseer.jetty-test (:require [farseer.jetty :as jetty] [farseer.http :as http] [com.stuartsierra.component :as component] [clj-http.client :as client] [ring.middleware.basic-authentication :refer [wrap-basic-authentication]] [clojure.test :refer [deftest is]])) (def PORT 18008) (def PAT...
28a9ea68faa73defa4a9050b42cb26eaeae51270ecb4782f69c30921eed7b127
charlieg/Sparser
vacancy.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*- copyright ( c ) 1991 Content Technologies Inc. -- all rights reserved ;;; ;;; File: "vacancy" Module : " model;sl : whos news : " version : April 1991 system version 1.8.2 initiated 4/10 (in-package :CTI-source) #| a...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/sl/Who's-News/vacancy.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*- File: "vacancy" a set of syntactic rules that cover the presenting set of citations that talk about vacant positions and events over them, without trying to give the objects or events any denotations. --------- objects --------- -------...
copyright ( c ) 1991 Content Technologies Inc. -- all rights reserved Module : " model;sl : whos news : " version : April 1991 system version 1.8.2 initiated 4/10 (in-package :CTI-source) (def-cfr vacancy ("vacancy")) (def-cfr vacancy ("a" vacancy)) (def-cfr vacancy-event ("filling" v...
1efb3d0ff5da284fc0b6e73ea34625a4c40085847e61374930401246f90ed9df
bos/rwh
add.hs
{-- snippet add --} add a b = a + b {-- /snippet add --} {-- snippet myNot --} myNot True = False myNot False = True {-- /snippet myNot --} {-- snippet sumList --} sumList (x:xs) = x + sumList xs sumList [] = 0 {-- /snippet sumList --}
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch03/add.hs
haskell
- snippet add - - /snippet add - - snippet myNot - - /snippet myNot - - snippet sumList - - /snippet sumList -
add a b = a + b myNot True = False myNot False = True sumList (x:xs) = x + sumList xs sumList [] = 0
e2cf97925726d5deecc99b3f969d50f70e01cc17cfa7cd3bbba7e5ad90db6d9d
kaznum/programming_in_ocaml_exercise
fib.ml
let rec fib n = let rec fib_pair n = if n = 1 then (1, 0) else let (i, j) = fib_pair (n - 1) in (i + j, i) in let (i, _) = fib_pair n in i;;
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ch3/fib.ml
ocaml
let rec fib n = let rec fib_pair n = if n = 1 then (1, 0) else let (i, j) = fib_pair (n - 1) in (i + j, i) in let (i, _) = fib_pair n in i;;
2178dfa8c6a0cc698799705bddf5d772d918a71077ea35523936c9b0237da49c
ogaml/ogaml
vector2i.mli
Operation on immutable 2 ints vectors exception Vector2i_exception of string type t = {x : int; y : int} val make : int -> int -> t val zero : t val unit_x : t val unit_y : t val add : t -> t -> t val sub : t -> t -> t val prop : int -> t -> t val div : int -> t -> t val pointwise_product : t -> t -> t va...
null
https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/math/vector2i.mli
ocaml
Operation on immutable 2 ints vectors exception Vector2i_exception of string type t = {x : int; y : int} val make : int -> int -> t val zero : t val unit_x : t val unit_y : t val add : t -> t -> t val sub : t -> t -> t val prop : int -> t -> t val div : int -> t -> t val pointwise_product : t -> t -> t va...
cce93b57e9d61606edd9731b94c19c693dbd036c911bbaf26bd37afd19adb71c
slipstream/SlipStreamServer
evidence_record_test.cljc
(ns com.sixsq.slipstream.ssclj.resources.spec.evidence-record-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest]] [com.sixsq.slipstream.ssclj.resources.spec.evidence-record :as evspec] [com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu] [com.sixsq.slipstream.s...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/spec/evidence_record_test.cljc
clojure
:id (str ev/resource-url "/uuid") :resourceURI ev/resource-uri :created timestamp :updated timestamp :acl valid-acl :name "name" :description "short description", :properties {:a "one", mandatory keywords optional keywords
(ns com.sixsq.slipstream.ssclj.resources.spec.evidence-record-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest]] [com.sixsq.slipstream.ssclj.resources.spec.evidence-record :as evspec] [com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu] [com.sixsq.slipstream.s...
b1d72bd124c3760a70e60112305e20f0850968489b9a965d1bb1358fb8e62e9d
spechub/Hets
RigidCASL.hs
| Description : extension of CASL that distinguishes rigid and flexible symbols Copyright : ( c ) of Magdeburg License : GPLv2 or higher , see LICENSE.txt The " RigidCASL " folder contains the skeleton of an instance of " Logic . Logic " for RigidCASL , an extension of CASL that disting...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/RigidCASL.hs
haskell
| Description : extension of CASL that distinguishes rigid and flexible symbols Copyright : ( c ) of Magdeburg License : GPLv2 or higher , see LICENSE.txt The " RigidCASL " folder contains the skeleton of an instance of " Logic . Logic " for RigidCASL , an extension of CASL that disting...
296937694e93cb8d94ad64df4df92e541d5146ef3b6f39e02ab51106e5e9e1db
vlacs/helmsman
navigation.clj
(ns helmsman.navigation (:require [helmsman.request :as req] [helmsman.uri :as uri])) (defn get-route-by-id "Indexes are sets. In reality, no more than one route should have the same ID but if that ever is the case, we might as well keep it simple and take the first one in the set." [request route-id...
null
https://raw.githubusercontent.com/vlacs/helmsman/e2fe3e49801681b3f0b2d3192f222a5c579a9aaa/src/helmsman/navigation.clj
clojure
(ns helmsman.navigation (:require [helmsman.request :as req] [helmsman.uri :as uri])) (defn get-route-by-id "Indexes are sets. In reality, no more than one route should have the same ID but if that ever is the case, we might as well keep it simple and take the first one in the set." [request route-id...
0e8c04809df1987f107d9e9f9fa8cc8e57060289cf70aaa836e35bc2e1496cf8
hadolint/hadolint
DL3057Spec.hs
module Hadolint.Rule.DL3057Spec (spec) where import Data.Default import Data.Text as Text import Helpers import Test.Hspec spec :: SpecWith () spec = do let ?config = def describe "DL3057 - `HEALTHCHECK instruction missing" $ do it "warn with no HEALTHCHECK instructions" $ do let dockerfile = Text.un...
null
https://raw.githubusercontent.com/hadolint/hadolint/be6658f1a3a4f5f02d04f990e69fb28680491b71/test/Hadolint/Rule/DL3057Spec.hs
haskell
This will trigger DL3057 This will trigger DL3057
module Hadolint.Rule.DL3057Spec (spec) where import Data.Default import Data.Text as Text import Helpers import Test.Hspec spec :: SpecWith () spec = do let ?config = def describe "DL3057 - `HEALTHCHECK instruction missing" $ do it "warn with no HEALTHCHECK instructions" $ do let dockerfile = Text.un...
b1a5b8f20e5197b9ac4f97fc02c2b678f06fe98601033479ddbb6f309f935ada
basho/riak_test
replication2_dirty.erl
-module(replication2_dirty). -export([confirm/0]). -include_lib("eunit/include/eunit.hrl"). confirm() -> TestHash = erlang:md5(term_to_binary(os:timestamp())), TestBucket = <<TestHash/binary, "-systest_a">>, NumNodes = rt_config:get(num_nodes, 6), ClusterASize = rt_config:get(cluster_a_size, 4), l...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/replication2_dirty.erl
erlang
LeaderB = rpc:call(BFirst, riak_core_cluster_mgr, get_leader, []), nothing should be dirty initially write some data on A verify data is replicated to B manually set this for now to simulate source errors test multiple nodes dirty manually set this for now to simulate source errors test multiple nodes di...
-module(replication2_dirty). -export([confirm/0]). -include_lib("eunit/include/eunit.hrl"). confirm() -> TestHash = erlang:md5(term_to_binary(os:timestamp())), TestBucket = <<TestHash/binary, "-systest_a">>, NumNodes = rt_config:get(num_nodes, 6), ClusterASize = rt_config:get(cluster_a_size, 4), l...
23f08c0095ca566fafe41c76d20cf686d276c0960a3e5e45353651bbb799cfa5
MaartenFaddegon/Hoed
CNF.hs
# LANGUAGE DeriveGeneric # module CNF where import Debug.Hoed.Pure hiding (O) import Data.List data Prop = V Char | N Prop | O Prop Prop | A Prop Prop deriving (Eq, Show, Generic) instance Observable Prop anywhere :: (Prop -> Bool) -> Prop -> Bool anywhere f p = f p || anywhere' f p anywhere' :: (Pro...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/tests/Prop/t1/CNF.hs
haskell
negin' p = p
# LANGUAGE DeriveGeneric # module CNF where import Debug.Hoed.Pure hiding (O) import Data.List data Prop = V Char | N Prop | O Prop Prop | A Prop Prop deriving (Eq, Show, Generic) instance Observable Prop anywhere :: (Prop -> Bool) -> Prop -> Bool anywhere f p = f p || anywhere' f p anywhere' :: (Pro...
bf323196a822b79c153e4c42c33caddda1874d11ab735629c88285fadd93ba81
plumatic/grab-bag
linear.clj
(ns classify.linear "Training and evaluation for linear models." (:use plumbing.core) (:require [schema.core :as s] [plumbing.index :as index] [flop.map :as map] [flop.stats :as stats] flop.weight-vector [classify.algorithms.regression :as regression] [classify.learn :as learn]) (:import ...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/classify/src/classify/linear.clj
clojure
Ordinary linear predictors with l2 norm Simple averaging predictor Simple model that learns means for each bucket, and falls back to overall mean if no data.
(ns classify.linear "Training and evaluation for linear models." (:use plumbing.core) (:require [schema.core :as s] [plumbing.index :as index] [flop.map :as map] [flop.stats :as stats] flop.weight-vector [classify.algorithms.regression :as regression] [classify.learn :as learn]) (:import ...
6502be505dc6bf530e4c4c23e497803f591fba4fcdf4731a5d6a298cebe01870
Frama-C/Frama-C-snapshot
function_Froms.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value_types/function_Froms.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
faca4b4505364ae9eaa0fbdc745323adeb83d973c8b144a0aed646665248778b
huangz1990/SICP-answers
p234-make-tableau.scm
;;; p234-make-tableau.scm (define (make-tableau transform s) (cons-stream s (make-tableau transform (transform s))))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/p234-make-tableau.scm
scheme
p234-make-tableau.scm
(define (make-tableau transform s) (cons-stream s (make-tableau transform (transform s))))
ab9ad24f782753b5237e80fcce1c43dc8b8375546981580f8c58291d44b23006
xsc/ancient-clj
core_deprecated_test.clj
(ns ancient-clj.core-deprecated-test (:require [ancient-clj.core :as ancient] [version-clj.core :as v] [clojure.test :refer [deftest is testing]])) # # Fixtures (def snapshot-versions ["0.1.0-SNAPSHOT" "0.1.1-SNAPSHOT" "0.1.3-SNAPSHOT"]) (def snapshot-versions-sorted (v/version-sort s...
null
https://raw.githubusercontent.com/xsc/ancient-clj/c34d96553c74ee1909a71e014e54a718933d1dd0/test/ancient_clj/core_deprecated_test.clj
clojure
## Tests ## Integration Tests
(ns ancient-clj.core-deprecated-test (:require [ancient-clj.core :as ancient] [version-clj.core :as v] [clojure.test :refer [deftest is testing]])) # # Fixtures (def snapshot-versions ["0.1.0-SNAPSHOT" "0.1.1-SNAPSHOT" "0.1.3-SNAPSHOT"]) (def snapshot-versions-sorted (v/version-sort s...
536233aacfa643b08058480a87d2e9a3938e10f912f415eb4755d6918a439f2a
gwathlobal/CotD
buildings.lisp
(in-package :cotd) ;;-------------------------------------- GENERAL BUILDING TYPES ;;-------------------------------------- (defconstant +building-type-none+ 0) (defconstant +building-type-house+ 1) (defconstant +building-type-townhall+ 2) (defconstant +building-type-park+ 3) (defconstant +building-type-...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/buildings/buildings.lisp
lisp
-------------------------------------- -------------------------------------- -------------------------------------- SPECIFIC BUILDING TYPES -------------------------------------- building id dimensions on a grid map, type (X . Y) dimensions on an actual map, type (X . Y) function that places the building...
(in-package :cotd) GENERAL BUILDING TYPES (defconstant +building-type-none+ 0) (defconstant +building-type-house+ 1) (defconstant +building-type-townhall+ 2) (defconstant +building-type-park+ 3) (defconstant +building-type-lake+ 4) (defconstant +building-type-prison+ 5) (defconstant +building-type-church...
78819f5f6e7c08fe69bd4c04a66b6b80c27336c9bb8a0a59cdd142836aabf30a
gregr/racket-misc
csv-distinct.rkt
#lang racket/base (require "csv.rkt" (except-in racket/control set) racket/set) (define argv (current-command-line-arguments)) (define argv-expected '#(CSV_NAME FIELD_INDEX OUT_NAME)) (when (not (= (vector-length argv-expected) (vector-length argv))) (error 'cmd-line-args (format "expected ~s; given ~s" argv-...
null
https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/csv-distinct.rkt
racket
Print the distinct values of the indexed field. Skip header.
#lang racket/base (require "csv.rkt" (except-in racket/control set) racket/set) (define argv (current-command-line-arguments)) (define argv-expected '#(CSV_NAME FIELD_INDEX OUT_NAME)) (when (not (= (vector-length argv-expected) (vector-length argv))) (error 'cmd-line-args (format "expected ~s; given ~s" argv-...
3e14bd608bad56fd1a603102f592c59adafac9fa72f2c1347eff08cf950d3cfb
yuriy-chumak/ol
point_size_array.scm
; =========================================================================== OES_point_size_array ( included in OpenGL ES 1.1 ) ; ; ; ; Version Last Modifed Date : 23 Dec 2008 ; ; Overview ; (define-library (OpenGL OES point_size_array) ; --------------------------------------------...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/OpenGL/OES/point_size_array.scm
scheme
=========================================================================== Version Overview --------------------------------------------------------------------------- Dependencies --------------------------------------------------------------------------- ------------------------------------------------...
OES_point_size_array ( included in OpenGL ES 1.1 ) Last Modifed Date : 23 Dec 2008 (define-library (OpenGL OES point_size_array) (import (scheme core) (OpenGL ES platform)) (export OES_point_size_array POINT_SIZE_ARRAY_OES POINT_SIZE_ARRAY_TYPE_OES POINT_SIZE_ARRAY_STRIDE_O...
05d8dcb61ec99155f8ff760e74df1727103bb169e62283310e65ee0abdab78e9
theodormoroianu/SecondYearCourses
lab6-sol_20210115150206.hs
-- / import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115150206.hs
haskell
/
import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l + 1 -...
3c1b691ed7c3dc31b4dec5d2ef37a2b3d25e3ca1eaf7415033b32c869e7efbdc
janestreet/ecaml
directory.mli
open! Core open! Import open! Ecaml_filename (** [(describe-function 'make-directory)] [(Info-goto-node "(elisp)Create/Delete Dirs")] *) val create : ?parents:bool (** default is [false] *) -> Filename.t -> unit (** [(describe-function 'delete-directory)] [(Info-goto-node "(elisp)Create/Delete Dirs")] *) val ...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/directory.mli
ocaml
* [(describe-function 'make-directory)] [(Info-goto-node "(elisp)Create/Delete Dirs")] * default is [false] * [(describe-function 'delete-directory)] [(Info-goto-node "(elisp)Create/Delete Dirs")] * default is [false] * default is [false] * default is [false] * default is [true] * default is [false] * d...
open! Core open! Import open! Ecaml_filename * [ ( describe - function ' directory - files ) ] [ ( Info - goto - node " ( elisp)Contents of Directories " ) ] [(Info-goto-node "(elisp)Contents of Directories")]*) val files -> ?matching:Regexp.t -> Filename.t -> Filename.t list * [ ( describe - functi...
f518f08ba4ab0a1fc0f3cb29d59819a9b59c20c8fea16d9dac635e396b37aa15
gotthardp/lorawan-server
lorawan_admin_upload.erl
% Copyright ( c ) 2016 - 2019 < > % All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . % -module(lorawan_admin_upload). -export([init/2]). -export([allowed_methods/2]). -export([is_authorized/2]). -export([forbidden/2]). -export([content_types_accepted/2]). -export([ha...
null
https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_admin_upload.erl
erlang
All rights reserved. end of file
Copyright ( c ) 2016 - 2019 < > Distributed under the terms of the MIT License . See the LICENSE file . -module(lorawan_admin_upload). -export([init/2]). -export([allowed_methods/2]). -export([is_authorized/2]). -export([forbidden/2]). -export([content_types_accepted/2]). -export([handle_write/2]). -record(st...
ba6d445ab2d33e8418b9f466df41369fb3beda995596e962a2f46f68ab6b42d1
ucsd-progsys/liquidhaskell
AutoTerm.hs
module AutoTerm where data F = F | C Int F {-@ data F [lenF] @-} {-@ measure lenF @-} lenF :: F -> Int {-@ lenF :: xs:F -> Nat @-} lenF F = 0 lenF (C _ x) = 1 + lenF x bar :: F -> Int bar F = 0 bar (C x xs) = x + bar xs
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/terminate/pos/AutoTerm.hs
haskell
@ data F [lenF] @ @ measure lenF @ @ lenF :: xs:F -> Nat @
module AutoTerm where data F = F | C Int F lenF :: F -> Int lenF F = 0 lenF (C _ x) = 1 + lenF x bar :: F -> Int bar F = 0 bar (C x xs) = x + bar xs
c8d812d65fa35aec6ea5a3c86b96dd833362836e7058211c56d7a008665ae1ff
babashka/babashka
wiki-translate.clj
#!/usr/bin/env bb by shared on Clojurians Slack (require '[babashka.curl :as curl]) (let [url (str "/" (first *command-line-args*)) page (:body (curl/get url))] (cond (re-find #"Disambiguation" page) (doseq [item (map last (re-seq #"<li><a href...wiki/([^\"]+)" page))] (println item)) :el...
null
https://raw.githubusercontent.com/babashka/babashka/9241c8123878021390442ba483239f57553786fe/examples/wiki-translate.clj
clojure
#!/usr/bin/env bb by shared on Clojurians Slack (require '[babashka.curl :as curl]) (let [url (str "/" (first *command-line-args*)) page (:body (curl/get url))] (cond (re-find #"Disambiguation" page) (doseq [item (map last (re-seq #"<li><a href...wiki/([^\"]+)" page))] (println item)) :el...
6ee65d14c6b0e9706b2bf379de888078241645fb21508900266e7247b4baedba
hdbc/hdbc
TestSqlValue.hs
Copyright ( C ) 2009 < > All rights reserved . For license and copyright information , see the file COPYRIGHT Copyright (C) 2009 John Goerzen <> All rights reserved. For license and copyright information, see the file COPYRIGHT -} module TestSqlValue where import Test.QuickCheck hiding (Result) import T...
null
https://raw.githubusercontent.com/hdbc/hdbc/d038592e1679042b9da214a2aa5cd64ed714b36a/testsrc/TestSqlValue.hs
haskell
Copyright ( C ) 2009 < > All rights reserved . For license and copyright information , see the file COPYRIGHT Copyright (C) 2009 John Goerzen <> All rights reserved. For license and copyright information, see the file COPYRIGHT -} module TestSqlValue where import Test.QuickCheck hiding (Result) import T...
25516a5e250ea358236b8ee0c166ac5c9e47881d3ad569283eb8f3bee076f4db
binsec/binsec
sigs.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/base/sigs.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
ea3d24ce7be4dad43a12f60baac5a9cc035e695f644b859b9e8c269eadc05173
fugue/fregot
Sem.hs
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Semantic pretty - printer Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability...
null
https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/PrettyPrint/Sem.hs
haskell
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Semantic pretty - printer Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability...
76007e30e86cbcf161225f5cd8cdb8c0fe1d43d89a8f7a6bceef895f002206d4
ocsigen/js_of_ocaml
file.ml
Js_of_ocaml library * / * Copyright ( C ) 2011 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/lib/js_of_ocaml/file.ml
ocaml
Js_of_ocaml library * / * Copyright ( C ) 2011 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
8466f8178295d4cb523bf415504fb55b7601b00178dbe7b704f40b266b544f91
ocaml-multicore/parafuzz
cmdline_prog.ml
let () = for i = 1 to (Array.length Sys.argv) - 1 do Printf.printf "%s\n" Sys.argv.(i) done
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/lib-unix/common/cmdline_prog.ml
ocaml
let () = for i = 1 to (Array.length Sys.argv) - 1 do Printf.printf "%s\n" Sys.argv.(i) done
94c629a9393c01c2493f2bd1152439049dece0c687970aad5827b0fff2433945
masateruk/micro-caml
unused_fun.ml
let () = let rec f x = x + 1 in print_int 0
null
https://raw.githubusercontent.com/masateruk/micro-caml/0c0bd066b87cf54ce33709355c422993a85a86a1/test/unused_fun.ml
ocaml
let () = let rec f x = x + 1 in print_int 0
c36938a279936efff84ea09e6f39643e69a2768ee093b7757bb36b08a3374f24
lettier/parsing-with-haskell-parser-combinators
srt-file-parser.hs
SRT File Parser ( C ) 2019 lettier.com SRT File Parser (C) 2019 David Lettier lettier.com -} # LANGUAGE NamedFieldPuns # NamedFieldPuns #-} import Control.Applicative ((<|>)) import Control.Monad import Text.ParserCombinators.ReadP import Data.Char import Data.Maybe type TagAttribut...
null
https://raw.githubusercontent.com/lettier/parsing-with-haskell-parser-combinators/d2ddec4cddecd50907c2908cb70fab4cec7e2294/src/srt-file-parser.hs
haskell
SRT File Parser ( C ) 2019 lettier.com SRT File Parser (C) 2019 David Lettier lettier.com -} # LANGUAGE NamedFieldPuns # NamedFieldPuns #-} import Control.Applicative ((<|>)) import Control.Monad import Text.ParserCombinators.ReadP import Data.Char import Data.Maybe type TagAttribut...
32af150745e9437283720fdca437db4dbd6cb7cd15f433d4257a89deda4a8234
2600hz/kazoo
kzs_util.erl
%%%----------------------------------------------------------------------------- ( C ) 2011 - 2020 , 2600Hz %%% @doc kazoo data utils %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%%...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_data/src/kzs_util.erl
erlang
----------------------------------------------------------------------------- @doc kazoo data utils @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc @end ------------------------------------------...
( C ) 2011 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kzs_util). -export([db_classification/1 ,db_priority/1 ,bind_db_classify/3, unbind_db_cla...
39d4eebc46589807a3e9426f827b12061d2b40cc7e4249972c902c0d3f5d9bcd
ckirkendall/enfocus-charts
project.clj
(defproject enfocus-charts "0.1.0-SNAPSHOT" :description "project for building charts in clojurescript" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.4.0"] [enfocus "2.0.0-SNAPSHOT"]] :plugins [[lein-cljsbuild "0.3.0"]] ...
null
https://raw.githubusercontent.com/ckirkendall/enfocus-charts/902becf3465d8328ff76e60b037f05bb8365aa1e/project.clj
clojure
(defproject enfocus-charts "0.1.0-SNAPSHOT" :description "project for building charts in clojurescript" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.4.0"] [enfocus "2.0.0-SNAPSHOT"]] :plugins [[lein-cljsbuild "0.3.0"]] ...
754397ffeba2f0ad221cebb80467f3a7ce47e1f7f7a6a487ae3696e1144e2e09
aeternity/aesophia_http
aesophia_http_handler.erl
-module(aesophia_http_handler). -include_lib("aebytecode/include/aeb_fate_data.hrl"). -include_lib("kernel/include/logger.hrl"). -export([init/2, handle_request_json/2,content_types_provided/2, allowed_methods/2,content_types_accepted/2 ]). -record(state, { spec :: jsx:json_text() ...
null
https://raw.githubusercontent.com/aeternity/aesophia_http/0f44b2c9487dc8edb7a4bbc2226bc2df116e41ca/apps/aesophia_http/src/aesophia_http_handler.erl
erlang
-- Helper functions -------------------------------------------------------
-module(aesophia_http_handler). -include_lib("aebytecode/include/aeb_fate_data.hrl"). -include_lib("kernel/include/logger.hrl"). -export([init/2, handle_request_json/2,content_types_provided/2, allowed_methods/2,content_types_accepted/2 ]). -record(state, { spec :: jsx:json_text() ...
6ff1889ae7428a43b3c0a864bef420264c33da7e50e8528abef05b9f27bada0b
Clojure2D/clojure2d-examples
scene.clj
(ns rt4.the-next-week.ch02.scene (:require [fastmath.vector :as v] [fastmath.core :as m] [rt4.the-next-week.ch02.hittable :as hittable] [rt4.the-next-week.ch02.interval :as interval] [rt4.the-next-week.ch02.material :as material] [rt4.common :as common] ...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch02/scene.clj
clojure
(ns rt4.the-next-week.ch02.scene (:require [fastmath.vector :as v] [fastmath.core :as m] [rt4.the-next-week.ch02.hittable :as hittable] [rt4.the-next-week.ch02.interval :as interval] [rt4.the-next-week.ch02.material :as material] [rt4.common :as common] ...
bb0abf1d7223fe94409b0e3bd1a18e1dd57b407a488d9a98f95daa378c9be00e
ruricolist/FXML
suite.lisp
(in-package #:fxml.test) (def-suite fxml) (in-suite fxml) (test parse-rod (finishes (fxml:parse-rod "<div>hello <i>world</i></div>" nil))) (def-suite defused-xml :in fxml) (in-suite defused-xml) (test simple-parse (finishes (parse-test-file xml-simple))) (test simple-parse-ns (finishes (parse-test-file xml-simp...
null
https://raw.githubusercontent.com/ruricolist/FXML/a0e73bb48ef03adea94a55986cc27f522074c8e1/test/suite.lisp
lisp
-valid-output-of-broadcast-handler-in-common-lisp-closure-xml-package/28528117#28528117 Conversely, we also don't care about cases that
(in-package #:fxml.test) (def-suite fxml) (in-suite fxml) (test parse-rod (finishes (fxml:parse-rod "<div>hello <i>world</i></div>" nil))) (def-suite defused-xml :in fxml) (in-suite defused-xml) (test simple-parse (finishes (parse-test-file xml-simple))) (test simple-parse-ns (finishes (parse-test-file xml-simp...
e1ccaa62714e855536bafab8ad777413b67cc49261c7fc3a322cdc9bb8a883ad
ijvcms/chuanqi_dev
push_db.erl
%%%------------------------------------------------------------------- %%% @author qhb ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 20 . 七月 2016 下午2:36 %%%------------------------------------------------------------------- -module(push_db). %% API -export([ init_mysql/0 ]). init_mysql() -> [Host, ...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/push/push_db.erl
erlang
------------------------------------------------------------------- @author qhb @doc @end ------------------------------------------------------------------- API
( C ) 2016 , < COMPANY > Created : 20 . 七月 2016 下午2:36 -module(push_db). -export([ init_mysql/0 ]). init_mysql() -> [Host, Port, User, Password, _DBName, Encode] = config:get_mysql_config(mysql_conn), PoolId = list_to_atom(lists:concat([pool])), NewDBName = "chuanqi_mg", case mysql:start_link(PoolId, Host,...
30dbd9ad013cbf83cf6eb84c8ac2a89564e0d0af3b43d28550f083f8b862bcc6
Naproche-SAD/Naproche-SAD
Base.hs
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 ) Core functions on formulas . Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018) Core functions on formulas. -} module SAD.Data.Formula.Base where import Control.Monad import Data.Maybe import qualified Data.Monoid as Monoid import SAD.Data.Ta...
null
https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Data/Formula/Base.hs
haskell
Traversing functions map a function over the next structure level of a formula map a monadic action over the next structure level of a formula Logical traversing same as roundFM but without the monadic action. traverse the structure of a formula with a monadic action all while keeping track of local premises,...
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 ) Core functions on formulas . Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018) Core functions on formulas. -} module SAD.Data.Formula.Base where import Control.Monad import Data.Maybe import qualified Data.Monoid as Monoid import SAD.Data.Ta...
b2dd0f48a94d765fb3fd3fc20d42a5cdb61bb443f850bc2602b3486b3c80f55d
instedd/planwise
home.clj
(ns planwise.endpoint.home (:require [compojure.core :refer :all] [planwise.boundary.maps :as maps] [planwise.boundary.auth :as auth] [planwise.util.ring :as util] [planwise.config :as config] [integrant.core :as ig] [cheshire.core :as json] ...
null
https://raw.githubusercontent.com/instedd/planwise/824b3c630ae6ac15150105fefa99515f5c5c39f0/src/planwise/endpoint/home.clj
clojure
(ns planwise.endpoint.home (:require [compojure.core :refer :all] [planwise.boundary.maps :as maps] [planwise.boundary.auth :as auth] [planwise.util.ring :as util] [planwise.config :as config] [integrant.core :as ig] [cheshire.core :as json] ...
8b1f44e19156810007ef2b8b1574c283b3cf33ee941a41d3f0550c51d8c8da22
opencog/miner
jsd.scm
Rule to calculate the Jensen - Shannon Distance between the empirical ;; truth value and the truth value estimate of a pattern according to ;; some db. ;; ;; Semi-formally ;; ;; Evaluation <emp-tv> Predicate " emp " ;; List ;; <pattern> ;; <db> ;; Evaluation <est-tv> ;; Predicate "est" ;; List ;; ...
null
https://raw.githubusercontent.com/opencog/miner/4774a964306f9c60fd2355dde5ded4f2008c772b/opencog/miner/scm/miner/rules/jsd.scm
scheme
truth value and the truth value estimate of a pattern according to some db. Semi-formally Evaluation <emp-tv> List <pattern> <db> Evaluation <est-tv> Predicate "est" List <pattern> <db> |- Evaluation <jsd-tv> Predicate "jsd" List <pattern> <db> Variables Types Cl...
Rule to calculate the Jensen - Shannon Distance between the empirical Predicate " emp " (load "miner-rule-utils.scm") (define (gen-jsd-rule) (pattern (Variable "$pattern")) (db (Variable "$db")) (LambdaT (Type "LambdaLink")) (ConceptT (Type "ConceptNode")) Vardecls ...
35c26fddd0ac9d6c5810f598ba937fef6711f6606d135ba8a2098ce81b280095
IronScheme/IronScheme
mktests.scm
#!r6rs ;;; Code that accompanies ``The Reasoned Schemer'' , and MIT Press , Cambridge , MA , 2005 ;;; ;;; All the examples used in the book ;;; This file was generated by writeminikanren.pl Generated at 2005 - 08 - 12 11:27:16 For IronScheme , run in REPL with ( include " mktests.scm " ) (import (rnr...
null
https://raw.githubusercontent.com/IronScheme/IronScheme/687cde5d4e463a119e4ba28296f2af42a5c4a9df/IronScheme/IronScheme.Console/lib/minikanren/mktests.scm
scheme
Code that accompanies ``The Reasoned Schemer'' All the examples used in the book This file was generated by writeminikanren.pl Comment out this definition to test divergent code (Chez Scheme only) 5.2.1 10.19.1
#!r6rs , and MIT Press , Cambridge , MA , 2005 Generated at 2005 - 08 - 12 11:27:16 For IronScheme , run in REPL with ( include " mktests.scm " ) (import (rnrs) (minikanren mk) (minikanren mkextraforms)) (define nil '()) (define-syntax test-check (syntax-rules () ((_ title tes...
57f5486e87527b831004845708e41bb886c09d89c63bcb1cc272d75b37dcceba
stchang/macrotypes
typed-var-example.rkt
#lang turnstile/quicklang (provide define #%datum Int ann λ →) (define-base-type Int) (define-type-constructor → #:arity >= 1) (define-typed-syntax define [(_ x:id e) ≫ -------- [≻ (define-typed-variable x e)]]) (define-typed-syntax #%datum [(_ . n:integer) ≫ -------- [⊢ (#%datum- . n) ⇒ Int]] [(...
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/typed-var-stx/typed-var-example.rkt
racket
see PR #99: this tests ⇐ case, ⇒ case always errs
#lang turnstile/quicklang (provide define #%datum Int ann λ →) (define-base-type Int) (define-type-constructor → #:arity >= 1) (define-typed-syntax define [(_ x:id e) ≫ -------- [≻ (define-typed-variable x e)]]) (define-typed-syntax #%datum [(_ . n:integer) ≫ -------- [⊢ (#%datum- . n) ⇒ Int]] [(...
d31ee6ecc0210183030ff6a7e5f28704a0186216b9613e1e218023dc910f0336
MassD/99
tries.ml
type ('a,'b) ternary_tries = Leaf | Node of 'a * ('a,'b) ternary_tries * ('a,'b) ternary_tries * ('a,'b) ternary_tries * 'b option let empty = Leaf let rec add kl vl tt = match kl,tt with | [], _ -> tt | hd::[], Leaf -> Node (hd, Leaf, Leaf, Leaf, Some vl) | hd::tl, Leaf -> Node (hd, Leaf, add tl vl Lea...
null
https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/91-99-misc/91-99/94/tries.ml
ocaml
type ('a,'b) ternary_tries = Leaf | Node of 'a * ('a,'b) ternary_tries * ('a,'b) ternary_tries * ('a,'b) ternary_tries * 'b option let empty = Leaf let rec add kl vl tt = match kl,tt with | [], _ -> tt | hd::[], Leaf -> Node (hd, Leaf, Leaf, Leaf, Some vl) | hd::tl, Leaf -> Node (hd, Leaf, add tl vl Lea...
e1fa6f978e47f1480594c1452fad531b3b087053e14713e2bdac8f31c35e7b91
AbstractMachinesLab/caramel
lock_file.ml
type t = Unix.file_descr let create_internal op path = Path.mkdir_p (Path.parent_exn path); let fd = Unix.openfile (Path.to_string path) [ Unix.O_CREAT; Unix.O_RDWR ] 0o600 and pid = string_of_int (Unix.getpid ()) in let pid_len = String.length pid in fcntl would enable to downgrade the lock to a read lo...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/lock_file.ml
ocaml
type t = Unix.file_descr let create_internal op path = Path.mkdir_p (Path.parent_exn path); let fd = Unix.openfile (Path.to_string path) [ Unix.O_CREAT; Unix.O_RDWR ] 0o600 and pid = string_of_int (Unix.getpid ()) in let pid_len = String.length pid in fcntl would enable to downgrade the lock to a read lo...
3adec319c4ad2e0dd0cb54e2c229f3c3b88c970fcc2b986f3fa4e49e697ec705
ghosthamlet/algorithm-data-structure
pascal_triangle.clj
(ns algorithm-data-structure.algorithms.math.pascal-triangle) (defn run [line-number] (loop [current-line [(bigint 1)] num-index 1] (if (= num-index (inc line-number)) current-line (recur (conj current-line (/ (* (current-line (dec num-index)) (inc...
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/math/pascal_triangle.clj
clojure
(ns algorithm-data-structure.algorithms.math.pascal-triangle) (defn run [line-number] (loop [current-line [(bigint 1)] num-index 1] (if (= num-index (inc line-number)) current-line (recur (conj current-line (/ (* (current-line (dec num-index)) (inc...
28d8c6966a35b5b52f1d37ca4381c6cf31cfd96077c678ad857606a8a9d21aa0
reborg/clojure-essential-reference
5.clj
(def seasons ["spring" "summer" "autumn" "winter"]) < 1 > autumn < 2 > " autumn "
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/ReducersandTransducers/Transducers/cat/5.clj
clojure
(def seasons ["spring" "summer" "autumn" "winter"]) < 1 > autumn < 2 > " autumn "
0ce991c8d61af5fc01f799904a7d06e8e26ade6cfec130765f585152987d0b72
wireapp/wire-server
Config.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE StrictData #-} # LANGUAGE TemplateHaskell # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Publi...
null
https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/libs/wire-api/src/Wire/API/Call/Config.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE StrictData # This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied...
# LANGUAGE TemplateHaskell # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along mo...