_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
869542ac759a2b5ca96e7c786f9a3e2ee78761a03942434cae9108a86e3eabdb
e-bigmoon/haskell-blog
realBonus.hs
#!/usr/bin/env stack -- stack script --resolver lts-17.3 {-# LANGUAGE OverloadedStrings #-} import Network.HTTP.Client import Network.HTTP.Client.TLS import Text.HTML.DOM import Data.Conduit ((.|), runConduit, runConduitRes, ConduitT) import Conduit (runResourceT) impo...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap4/exercise/realBonus.hs
haskell
stack script --resolver lts-17.3 # LANGUAGE OverloadedStrings #
#!/usr/bin/env stack import Network.HTTP.Client import Network.HTTP.Client.TLS import Text.HTML.DOM import Data.Conduit ((.|), runConduit, runConduitRes, ConduitT) import Conduit (runResourceT) import Network.HTTP.Client.Conduit (bodyReaderSource) import ...
aad2233c02a6a518611315302f39ad4608dfb563d5caa89b076c67135537df52
herd/herdtools7
channel.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/4b39d90240b82b8f0b09dc6a468cff73a5cdbe00/internal/lib/channel.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
9932766eafa117be0a78d5eefe4497ef1ef8ff6803dbd6f89f1077ff8e92c6ab
nfrisby/coxswain
NormalForms.hs
{-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf #-} -- | Each data type in this module partitions 'Type' into somes cases -- of interest to the plugin's constraint simplifier. -- For each data type , there is a pair of @to*@ and @fr*@ functions -- witnessing an embe...
null
https://raw.githubusercontent.com/nfrisby/coxswain/bfd5777964a5b4ba64e1bcc4cf18df1c9d8fc558/coxswain/src/NormalForms.hs
haskell
# LANGUAGE GADTs # # LANGUAGE MultiWayIf # | Each data type in this module partitions 'Type' into somes cases of interest to the plugin's constraint simplifier. witnessing an embedding or isomorphism from 'Type'. * Column types * Row types * Predicates --- ^ @l .= t@ ^ @alpha@ ^ None of the other constructors...
# LANGUAGE KindSignatures # # LANGUAGE LambdaCase # For each data type , there is a pair of @to*@ and @fr*@ functions module NormalForms ( Col(..), eqCol, frCol, toCol, Row(..), RowRoot(..), eqRow, eqRowRoot, frRow, sizeRow, toRow, toRowAcc, Pred(..), Pred_(..), frPred, frPred_, ...
fc3bce789ecc8cf6970f83e0319e36c0241d6970b48af6da266b2927b8773b03
capital-match/hdo
Net.hs
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} -- | Interpreter for accessing DO API through the web us...
null
https://raw.githubusercontent.com/capital-match/hdo/79e46f182f11374ec85d7cb9f17ffd5a8ed2f9ad/src/Network/DO/Net.hs
haskell
# LANGUAGE DoAndIfThenElse # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # | Interpreter for accessing DO API through the web using [wreq ].
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # module Network.DO.Net(mkDOClient) where import Control.Applicative import Control.Comonad.Env.Class (ComonadEnv) import Control.Comonad.Trans.Cofree (CofreeT, coiterT) import ...
a004b120299415b8c35cbd196bf24327581ff43f23c3f900d31401ac7cebd693
paurkedal/ocaml-caqti
caqti_type.mli
Copyright ( C ) 2017 - -2022 Petter A. Urkedal < > * * This library 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 , either version 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/4fc64260d0bf4cdc6f5bcc9caedb8c5bc6c09ea5/caqti/lib/caqti_type.mli
ocaml
* Type descriptors for fields and tuples. * Facilities for extending and using primitive field types. * An extensible type describing primitive SQL types and types which can be converted to and from such types. When adding a new constructor, register the coding with {!Field.define_coding} if possible. O...
Copyright ( C ) 2017 - -2022 Petter A. Urkedal < > * * This library 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 , either version 3 of the License , or ( at your * option ) any la...
a218aead3c44fb27cf346b8b40a7cf17c7795364c8d2bee7c22b82b5a3892b6c
dabrady/LittleLogicLangs
micro.rkt
#lang racket (require "micro/miniKanren-micro.rkt") (provide (all-from-out "micro/miniKanren-micro.rkt"))
null
https://raw.githubusercontent.com/dabrady/LittleLogicLangs/9735f17281e2362d36ad245a1558cce3f93437a7/miniKanren/micro.rkt
racket
#lang racket (require "micro/miniKanren-micro.rkt") (provide (all-from-out "micro/miniKanren-micro.rkt"))
c6c678d5d95970c89c71048d50e60eef06e3473ccda1c03531a0f1cd2bb1ceb3
sol/hpack
RenderSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE OverloadedLists # module Hpack.RenderSpec (spec) where import Helper import Hpack.Syntax.DependencyVersion import Hpack.ConfigSpec hiding (spec) import Hpack.Config hiding (package) import Hpack.Render.Dsl import ...
null
https://raw.githubusercontent.com/sol/hpack/5afd6067eccc02f2fa480369007eeb4287b3c001/test/Hpack/RenderSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE OverloadedLists # module Hpack.RenderSpec (spec) where import Helper import Hpack.Syntax.DependencyVersion import Hpack.ConfigSpec hiding (spec) import Hpack.Config hiding (package) import Hpack.Render.Dsl import Hpack.Render library :: Library l...
737bb9b8a0a4e31e3eaab067cff038f9439103af93b8e0c710056c9a5d0ef40b
lokke-org/lokke
dynamic.scm
Copyright ( C ) 2019 - 2020 < > SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 + ;; This is in a separate file for now so that pr can depend on it without needing a full dependency on ( lokke base syntax ) . (define-module (lokke base dynamic) #:use-module ((guile) #:select ((set! . %set!))...
null
https://raw.githubusercontent.com/lokke-org/lokke/a6616b3de60b62d787bf9b98206f8ad9eeb10844/mod/lokke/base/dynamic.scm
scheme
This is in a separate file for now so that pr can depend on it Stores (module-name name fluid-name fluid)
Copyright ( C ) 2019 - 2020 < > SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 + without needing a full dependency on ( lokke base syntax ) . (define-module (lokke base dynamic) #:use-module ((guile) #:select ((set! . %set!))) #:use-module ((ice-9 match) #:select (match)) #:use-module (...
27e384135dcac7f96b105ff3b35c7083d05e1b2e3b46a7a298ac18eccb2be7b3
qfpl/reflex-workshop
Base.hs
| Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation License : : Stability : experimental Portability : non - portable Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation License : BSD3 Maintainer : Stability : experi...
null
https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/UI/Base.hs
haskell
| Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation License : : Stability : experimental Portability : non - portable Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation License : BSD3 Maintainer : Stability : experi...
cc30a4149d90b2416b4de1029f3aee00e6c51c33f5711bda1f4425dd883628cd
kind2-mc/kind2
lustrePath.ml
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/701bdf318852d30ceb5bd7cce7dd1e25fb9c41a4/src/lustre/lustrePath.ml
ocaml
Abbreviations Model for a node and its subnodes ********************************************************************** Reconstruct a model for a node hierarchy ********************************************************************** Map a state variable to its instance in the top ...
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
007dedb735c35987b7458cd6316eab091e6ce2d80f3033565dc1179e4e6fd104
mzp/scheme-abc
rename.ml
open Base type qname = string list * string type env = {env: (qname * int) list; current: string list} type rename_map = { map : (qname * qname) list } let update_env qname env = try let n = List.assoc qname env.env in let name' = Printf.sprintf "%s$%d" (snd qname) n in ({env with env = (qn...
null
https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/filter/rename.ml
ocaml
open Base type qname = string list * string type env = {env: (qname * int) list; current: string list} type rename_map = { map : (qname * qname) list } let update_env qname env = try let n = List.assoc qname env.env in let name' = Printf.sprintf "%s$%d" (snd qname) n in ({env with env = (qn...
431402932d67b01b58545b25520c95e5b9c198224c726f818c1f3bd7a08c2393
ocaml/dune
env_node.mli
(** An environment node represents an evaluated (env ..) stanza in a directory. *) open Import module Odoc : sig type warnings = Dune_env.Stanza.Odoc.warnings = | Fatal | Nonfatal type t = { warnings : warnings } end module Coq : sig type t = string list end type t val make : dir:Path.Build.t ...
null
https://raw.githubusercontent.com/ocaml/dune/96b42793c42530b82417d25769db2553620c82a2/src/dune_rules/env_node.mli
ocaml
* An environment node represents an evaluated (env ..) stanza in a directory.
open Import module Odoc : sig type warnings = Dune_env.Stanza.Odoc.warnings = | Fatal | Nonfatal type t = { warnings : warnings } end module Coq : sig type t = string list end type t val make : dir:Path.Build.t -> inherit_from:t Memo.Lazy.t option -> scope:Scope.t -> config_stanza:Dune_en...
cd08707f2e445d4494e974d0537c4b49c4f3da01f517e5a8a4e15b15f1a9304a
typelead/intellij-eta
JComponent.hs
module FFI.Javax.Swing.JComponent ( JComponent , emptyJComponent ) where import P.Base data JComponent = JComponent @javax.swing.JComponent deriving Class emptyJComponent :: Java a JComponent emptyJComponent = superCastJ newEmptyJComponent -- TODO: Workaround for lack of anonymous classes data EmptyJCompo...
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Javax/Swing/JComponent.hs
haskell
TODO: Workaround for lack of anonymous classes
module FFI.Javax.Swing.JComponent ( JComponent , emptyJComponent ) where import P.Base data JComponent = JComponent @javax.swing.JComponent deriving Class emptyJComponent :: Java a JComponent emptyJComponent = superCastJ newEmptyJComponent data EmptyJComponent = EmptyJComponent @com.typelead.intellij.pl...
b7140cf5627d2cd7ff590e836a6906e9d43dafe02fb85b6a6c3e8137bf920f02
nvim-treesitter/nvim-treesitter
injections.scm
Pass code blocks to highlighter (code (code_body) @cpp) ;; Pass identifiers to Go highlighter (Cheating I know) ;;((identifier) @lua) ;; Highlight regex syntax inside literal strings ((string_literal) @regex) Highlight PyFoam syntax as Python statements (pyfoam_variable code_body: (_) @python) (pyfoam_expressio...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/4cf688ee681bbe9a35651732b2d2281a01c40066/queries/foam/injections.scm
scheme
Pass identifiers to Go highlighter (Cheating I know) ((identifier) @lua) Highlight regex syntax inside literal strings
Pass code blocks to highlighter (code (code_body) @cpp) ((string_literal) @regex) Highlight PyFoam syntax as Python statements (pyfoam_variable code_body: (_) @python) (pyfoam_expression code_body: (_) @python)
d7adf73013ba34aab7a93e319b3e7947bdd4076fc2f36ded274183c2f3e68058
mirage/irmin
kv.ml
* Copyright ( c ) 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
null
https://raw.githubusercontent.com/mirage/irmin/31a3811d1d4eef3ee4189a28e3064e5dfb337e17/examples/irmin-pack/kv.ml
ocaml
A minimal example of instantiating a `irmin-pack.unix` key-value store. Compile-time configurations passed to a functor. Run-time configurations passed when instantiating a repository. * Choose what to do when the index log is full and a merge is in-progress. - [Block_writes] (the default) will block writi...
* Copyright ( c ) 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
c860dd31bfcebe2e6c0794a2e370d8e2944845d0afccd69e84da9ba9d312d3ed
p2pcollab/ocaml-p2p
test_tac_lwt.ml
Copyright ( C ) 2021 TG x This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License . This program is distributed in the hope that it will be usef...
null
https://raw.githubusercontent.com/p2pcollab/ocaml-p2p/121e86efff0e6edd7c498d17bf4cab7787991888/test/p2p-tac-lwt/test_tac_lwt.ml
ocaml
* [initiate_gossip t node xchg] sends [xchg] entries to node [dst] and returns response * [respond_gossip t node xchg] sends [xchg] entries in response to node [dst] * [gossip_recvd t view src recvd] is called after entries are received from node [src] during a gossip exchange * [view_updated...
Copyright ( C ) 2021 TG x This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License . This program is distributed in the hope that it will be usef...
6485a164bd58be12af85ed7fc6e679227e9a517e3cfb6f540718b19a5ba965d0
hsyl20/haskus-system
FileSystem.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE RecordWildCards # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # module Haskus.System.Linux.FileSystem ( FilePermission(..) , File...
null
https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/System/Linux/FileSystem.hs
haskell
# LANGUAGE DeriveAnyClass # ** Open/Close ** Synchronization ** Rename * Device | File permissions | Reposition read/write file offset, return the new position | Reposition read/write file offset | Access mode To test if a file exists, use no flag | Avoid duplication in *chown syscalls | chown | fchown | ...
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # module Haskus.System.Linux.FileSystem ( FilePermission(..) , FilePermissions , FileType(..) ...
a2f36e447d2898966d6f8d49b96001425b781704137c10129fcac325c8e02778
ucsd-progsys/nate
odoc_dag2html.ml
(***********************************************************************) (* OCamldoc *) (* *) , projet Cristal , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/ocamldoc/odoc_dag2html.ml
ocaml
********************************************************************* OCamldoc ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : odoc_dag2html.ml , v 1.4 2004/12...
8357cc985ce50e3d4cc6d35b48836eacc1ce461b9fce21720312ad28ecb63cbe
cabol/erlbus
ebus_sup.erl
%%%------------------------------------------------------------------- %%% @doc %%% Starts main supervisor. %%% @end %%%------------------------------------------------------------------- -module(ebus_sup). %% API -export([start_link/0]). %%%=================================================================== %%% API ...
null
https://raw.githubusercontent.com/cabol/erlbus/26e5422d9eb841fa78225d00443b9299d857f462/src/ebus_sup.erl
erlang
------------------------------------------------------------------- @doc Starts main supervisor. @end ------------------------------------------------------------------- API =================================================================== API functions ===========================================================...
-module(ebus_sup). -export([start_link/0]). -spec start_link() -> supervisor:startlink_ret(). start_link() -> PubSub = application:get_env(ebus, pubsub, []), Name = ebus_common:keyfind(name, PubSub, ebus:default_ps_server()), Adapter = ebus_common:keyfind(adapter, PubSub, ebus_ps_pg2), Adapter:start_link(Nam...
e8555e931d4ebe22989aa4cbed30eea28d6cb36e7be243b2da0b18607fb430e8
art-w/sherlocode
regex.ml
open Ast type t = Ast.t type query = | True | False | Exact of string | And of query list | Or of query list let rec interleave xs ys = match xs with | [] -> ys | x :: xs -> x :: interleave ys xs let conj a b = match a, b with | False, _ | _, False -> False | True, t | t, True -> t | And xs,...
null
https://raw.githubusercontent.com/art-w/sherlocode/7a14b9207a6da4007c40e4aee3fe314c25a23cf8/regex/regex.ml
ocaml
open Ast type t = Ast.t type query = | True | False | Exact of string | And of query list | Or of query list let rec interleave xs ys = match xs with | [] -> ys | x :: xs -> x :: interleave ys xs let conj a b = match a, b with | False, _ | _, False -> False | True, t | t, True -> t | And xs,...
18784f24a78e81e1002969430b2eab5159bd160e9f201f35fdf40116d29ed3c8
ledger/cl-ledger
entry.lisp
;; entry.lisp (declaim (optimize (safety 3) (debug 3) (speed 1) (space 0))) (in-package :ledger) (defun print-new-entry (xact-series &key (date nil) (payee nil) (account nil) (amount nil) (balance-account nil) (append nil) (output-stream *standard-output*) &allow-other-keys) (with-temporary-journal (journal)...
null
https://raw.githubusercontent.com/ledger/cl-ledger/e25d5f9f721bcf3b30d6569363e723f22d19a3a0/reports/entry.lisp
lisp
entry.lisp if this does not if this does not apply, the entry.lisp ends here
(declaim (optimize (safety 3) (debug 3) (speed 1) (space 0))) (in-package :ledger) (defun print-new-entry (xact-series &key (date nil) (payee nil) (account nil) (amount nil) (balance-account nil) (append nil) (output-stream *standard-output*) &allow-other-keys) (with-temporary-journal (journal) (let* ((e...
2e412e71bb1e68dab8ab843ef7023303f6ce97a6e0ca3a2b6d3169113d1c0f46
jwiegley/notes
test.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import IdeSession import Data.Function main = do sess <- initSession defaultSessionConfig { configDir = "." , configGenerateModInfo = True } let cb = \_ -> return () update = flip (update...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/misc/test.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import IdeSession import Data.Function main = do sess <- initSession defaultSessionConfig { configDir = "." , configGenerateModInfo = True } let cb = \_ -> return () update = flip (updateSession sess) cb update $ upda...
da59b33752fe0d9f8a95a9571d5f65b2e3a0ba052dbe0eeac1b94e9ddd0e940b
ijvcms/chuanqi_dev
instance_single_config.erl
%%%------------------------------------------------------------------- @author zhengsiying %%% @doc %%% 自动生成文件,不要手动修改 %%% @end Created : 2016/10/12 %%%------------------------------------------------------------------- -module(instance_single_config). -include("common.hrl"). -include("config.hrl"). -compile([ex...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/instance_single_config.erl
erlang
------------------------------------------------------------------- @doc 自动生成文件,不要手动修改 @end -------------------------------------------------------------------
@author zhengsiying Created : 2016/10/12 -module(instance_single_config). -include("common.hrl"). -include("config.hrl"). -compile([export_all]). get_list_conf() -> [ instance_single_config:get(X) || X <- get_list() ]. get_list() -> [1, 2, 3]. get(1) -> #instance_single_conf{ id = 1, scene_id = 30001 ...
777b7828a44e0f423158189019be67bedeb2cd30f86797e9c0793df3d011b2f0
zippy/anansi
xmpp_controller.clj
(ns anansi.test.streamscapes.channels.xmpp-controller (:use [anansi.streamscapes.channels.xmpp-controller] :reload) (:use [anansi.ceptr] [anansi.receptor.scape] [anansi.receptor.user :only [user-def]] [anansi.receptor.host :only [host-def]] [anansi.streamscapes.streamscapes] ...
null
https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/streamscapes/channels/xmpp_controller.clj
clojure
test without valid password test with valid password
(ns anansi.test.streamscapes.channels.xmpp-controller (:use [anansi.streamscapes.channels.xmpp-controller] :reload) (:use [anansi.ceptr] [anansi.receptor.scape] [anansi.receptor.user :only [user-def]] [anansi.receptor.host :only [host-def]] [anansi.streamscapes.streamscapes] ...
9df845fc140b6246dea13965cccaed5cbc591ae06d78a64b58cfdc9a70706716
ssm-lang/sslang
DesugarLists.hs
| ' ListExpr ' nodes into ' App ' nodes module Front.DesugarLists (desugarLists) where import qualified Common.Compiler as Compiler import Common.Identifiers import Data.Generics (everywhere, mkT) import qualified Front.Ast as A | nodes inside of an AST ' A.Program ' . desugarLists :: A.Program -> Compiler.Pa...
null
https://raw.githubusercontent.com/ssm-lang/sslang/d23597773d471fb222890e31a984d54289b45d28/src/Front/DesugarLists.hs
haskell
| ' ListExpr ' nodes into ' App ' nodes module Front.DesugarLists (desugarLists) where import qualified Common.Compiler as Compiler import Common.Identifiers import Data.Generics (everywhere, mkT) import qualified Front.Ast as A | nodes inside of an AST ' A.Program ' . desugarLists :: A.Program -> Compiler.Pa...
d03963412c58c1e8428c2dd922fb6cbe56c007cd1e4b8796d1304d099b047a23
dyoo/ragg
test-parser.rkt
#lang racket/base (require rackunit parser-tools/lex ragg/rules/parser ragg/rules/lexer ragg/rules/rule-structs) ;; quick-and-dirty helper for pos construction. (define (p x) (pos x #f #f)) FIXME : fix the test cases so they work on locations rather than just offsets . (ch...
null
https://raw.githubusercontent.com/dyoo/ragg/9cc648e045f7195702599b88e6b8db9364f88302/ragg/test/test-parser.rkt
racket
quick-and-dirty helper for pos construction.
#lang racket/base (require rackunit parser-tools/lex ragg/rules/parser ragg/rules/lexer ragg/rules/rule-structs) (define (p x) (pos x #f #f)) FIXME : fix the test cases so they work on locations rather than just offsets . (check-equal? (grammar-parser (tokenize (open-input...
d11fa5db05b56512f5ae0c8aae14f8449933109f58d025b942f028ce8d26298d
justinethier/cyclone
http-server.scm
(import (scheme base) (scheme write) ( srfi 18 ) (srfi 106)) (define *port* "8080") (define svr (make-server-socket *port*)) (let* ((s (socket-accept svr)) (data (socket-recv s 2048))) (display `("received: " ,(utf8->string data))) (newline) (socket-send s (string->utf8 "HTTP/1.1 200...
null
https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/examples/networking/http-server.scm
scheme
(import (scheme base) (scheme write) ( srfi 18 ) (srfi 106)) (define *port* "8080") (define svr (make-server-socket *port*)) (let* ((s (socket-accept svr)) (data (socket-recv s 2048))) (display `("received: " ,(utf8->string data))) (newline) (socket-send s (string->utf8 "HTTP/1.1 200...
4a404de813fe8b99493eb64f40f2e5d0a22ae77498cc513074a899ccfe95c37c
sgbj/MaximaSharp
dskfn.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/dskfn.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; $save stores Lisp e...
(in-package :maxima) * * ( c ) Copyright 1982 Massachusetts Institute of Technology * * (macsyma-module dskfn) (declare-top (special opers $packagefile aaaaa errset lessorder greatorder indlist $labels $aliases varlist *mopl* $props $infolists $features featurel savefile $gradefs $...
1d8a44913b6d8451741d7964199c90cf580e8fdc7ba8f3d26558da846556996a
2600hz/kazoo
kazoo_tts_ispeech.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc 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 /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_speech/src/tts/kazoo_tts_ispeech.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 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(kazoo_tts_ispeech). -behaviour(gen_tts_provider). -export([create/4 ,set_api_key/1 ]). ...
88c2a0fa305dada43f4b59562ea7b62da75f42595e449a1a78cd4ac7279adebb
overtone/overtone
mad.clj
(ns overtone.examples.notation.mad {:clj-kondo/config '{:linters {:unresolved-symbol {:level :off}}}} (:use overtone.live overtone.inst.synth)) ; Adapted from the music as data project, cool stuff! ; / (definst tone [note 60 amp 0.3 dur 0.4] (let [snd (sin-osc (midicps note)) env (env-gen (perc ...
null
https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/examples/notation/mad.clj
clojure
Adapted from the music as data project, cool stuff! / run this to play the pattern or this to play it forever before you stop, add some reverb (inst-fx! tone fx-reverb) call stop to kill the loop (stop) try it slow with an echo effect clear the fx for this instrument like so (clear-fx tone) (stop) uncomment ...
(ns overtone.examples.notation.mad {:clj-kondo/config '{:linters {:unresolved-symbol {:level :off}}}} (:use overtone.live overtone.inst.synth)) (definst tone [note 60 amp 0.3 dur 0.4] (let [snd (sin-osc (midicps note)) env (env-gen (perc 0.01 dur) :action FREE)] (* env snd amp))) (defn p ...
ef8119c470a2dd1f9b60ce751c310a7e441f82e32f96b555aa41f43c9764f358
facebook/pyre-check
callgraphTest.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/analysis/test/callgraphTest.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
ed1f9bc06fb845ec9499a49e2b708cab64e45f402880e4aaebdd6db829c242d1
cyga/real-world-haskell
HighestClose.hs
-- file: ch08/HighestClose.hs import qualified Data.ByteString.Lazy.Char8 as L closing = readPrice . (!!4) . L.split ',' -- file: ch08/HighestClose.hs readPrice :: L.ByteString -> Maybe Int readPrice str = case L.readInt str of Nothing -> Nothing Just (dollars,rest) -> case L.readI...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch08/HighestClose.hs
haskell
file: ch08/HighestClose.hs file: ch08/HighestClose.hs file: ch08/HighestClose.hs
import qualified Data.ByteString.Lazy.Char8 as L closing = readPrice . (!!4) . L.split ',' readPrice :: L.ByteString -> Maybe Int readPrice str = case L.readInt str of Nothing -> Nothing Just (dollars,rest) -> case L.readInt (L.tail rest) of Nothing -> Nothing ...
0c02c00f3dd2fe4b9440c0d4207b5039e83fa0c5691b80eef78418dbc4763696
uncomplicate/neanderthal
device_test.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/uncomplicate/neanderthal/5c76fb83eb43b7aa3307e6e90d5025e41750a00f/test/uncomplicate/neanderthal/device_test.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) . All rights reserved . (ns uncomplicate.neanderthal.device-test (:require [midje.sweet :refer :all] [uncomplicate.commons.core :refer [with-release]] [uncomplicate.neanderthal [core :refer :all] [math :refer [pow]] [vect-math :refe...
50b6023e5a5eb6494899c4d1250991f5ccdb4263988884d3c8451aacafd326e8
GaloisInc/mistral
Discover.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE DeriveDataTypeable #-} module Discover where import Options ( Options(..) ) import Mistral.Driver ( runDriver, tryMessages ) import Mistral.Parser ( parseModule ) import Mistral.Utils.PP ( pretty, pp, vcat ) import Control.Applicative ( (<$>) ) import Control.Monad ( ...
null
https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/tests/Discover.hs
haskell
# LANGUAGE DeriveDataTypeable # Mistral Tests --------------------------------------------------------------- ^ The source parses, and raises no errors. Warnings will be ignored. ^ An expected failure, with the expected output. Parse Tests ----------------------------------------------------------------- --------...
# LANGUAGE MultiParamTypeClasses # module Discover where import Options ( Options(..) ) import Mistral.Driver ( runDriver, tryMessages ) import Mistral.Parser ( parseModule ) import Mistral.Utils.PP ( pretty, pp, vcat ) import Control.Applicative ( (<$>) ) import Control.Monad ( guard, msum, mplus ) import Data.Lis...
7871b41f37107027e80e0636a2125a41793a89d1326f4f6643728d75af53ce9c
coq/coq
tacentries.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/29eac1001ac649422e62e851fec7cb8fd33ead8d/plugins/ltac/tacentries.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
d3e2b484e3791da011ced8cfdcfc5e66c3bab90e0d574104cfc0f0a3ed97a569
s312569/clj-biosequence
fasta.clj
(in-ns 'clj-biosequence.core) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sequence ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defrecord fastaSequence [acc description alphabet sequence]) (extend fastaSequence biosequenceID (assoc default-biosequence-id :accession (fn [this] ...
null
https://raw.githubusercontent.com/s312569/clj-biosequence/b4d2a2750d8fd6a2b398d859879c193e00212415/src/clj_biosequence/fasta.clj
clojure
sequence IO fasta files fasta string
(in-ns 'clj-biosequence.core) (defrecord fastaSequence [acc description alphabet sequence]) (extend fastaSequence biosequenceID (assoc default-biosequence-id :accession (fn [this] (:acc this)) :accessions (fn [this] (list (accession this)))) biosequenceDescription (assoc default-biosequence...
98421adf4170922790d431b6abbe1493afeb10533fae91a5aebb484f6332801a
kztk-m/sparcl
DebugPrint.hs
module Language.Sparcl.DebugPrint ( debugPrint, KeyDebugLevel, ) where import Control.Monad (when) import Control.Monad.IO.Class import Language.Sparcl.Class import Language.Sparcl.Pretty hiding ((<$>)) import System.IO (stderr) data ...
null
https://raw.githubusercontent.com/kztk-m/sparcl/f52d333ce50e0aa6cb307da08811719f8c684f7d/src/Language/Sparcl/DebugPrint.hs
haskell
module Language.Sparcl.DebugPrint ( debugPrint, KeyDebugLevel, ) where import Control.Monad (when) import Control.Monad.IO.Class import Language.Sparcl.Class import Language.Sparcl.Pretty hiding ((<$>)) import System.IO (stderr) data ...
1878d4d8d5bad1c989ed14efd5eebdb577ffa9176738c34a65e14d6cd61b5f63
synrc/rt
path.erl
-module(path). -export([escape/1, unescape/1]). escape(Path) -> R = reserved(), lists:append([char_encode(Char, R) || Char <- Path]). unescape(Str) -> http_uri:uri_string(Str). reserved() -> sets:from_list([$/, $\\, $:, $%]). char_encode(Char, Reserved) -> case sets:is_element(Char, Reserved) of ...
null
https://raw.githubusercontent.com/synrc/rt/0d556345d3a03385eec99e294a7ee9639a9907e1/src/path.erl
erlang
]). | http_util:integer_to_hexlist(Char)];
-module(path). -export([escape/1, unescape/1]). escape(Path) -> R = reserved(), lists:append([char_encode(Char, R) || Char <- Path]). unescape(Str) -> http_uri:uri_string(Str). char_encode(Char, Reserved) -> case sets:is_element(Char, Reserved) of false -> [Char] end.
96c1ae010d45441e010bcc68286a654e40f0cb1af3825a03f7c0a0ebadd325f8
locusmath/locus
transformation_monoid.clj
(ns locus.algebra.semigroup.transformation.transformation-monoid (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.con.core.setpart :refer :all] [locus.set.copresheaf.structu...
null
https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/algebra/semigroup/transformation/transformation_monoid.clj
clojure
Let C be a concrete category with a single object. Then by the fact that the set-valued functor on C is faithful, each element of C is uniquely mapped to a distinct function. It follows that C is equivalent to a transformation monoid. So in our categorical framework, we define transformation monoids to be single ob...
(ns locus.algebra.semigroup.transformation.transformation-monoid (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.con.core.setpart :refer :all] [locus.set.copresheaf.structu...
164715000975e4b837492473a23c4c96362691a8ac431644bc5cd6929df6e0db
RolfRolles/PandemicML
Nnf.ml
let rec pf_to_nnf = function | Not(Not(p)) -> pf_to_nnf p | Not(Constant(True)) -> False | Not(Constant(False)) -> True | Not(And(f1,f2)) -> Or (pf_to_nnf (Not(f1)), pf_to_nnf (Not(f2))) | Not(Or(f1,f2)) -> And(pf_to_nnf (Not(f1)), pf_to_nnf (Not(f2))) | Implies(f1,f2) -> Or (pf_to_nnf (Not(f...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/SMT/Propositional%20Logic/Attic/Nnf.ml
ocaml
Type declarations
let rec pf_to_nnf = function | Not(Not(p)) -> pf_to_nnf p | Not(Constant(True)) -> False | Not(Constant(False)) -> True | Not(And(f1,f2)) -> Or (pf_to_nnf (Not(f1)), pf_to_nnf (Not(f2))) | Not(Or(f1,f2)) -> And(pf_to_nnf (Not(f1)), pf_to_nnf (Not(f2))) | Implies(f1,f2) -> Or (pf_to_nnf (Not(f...
5545411dddd51758630f4d8776ce9404925c40e1d4ff0609ff5b4ef32af0b866
portkey-cloud/edn-to-cfn
elastic_load_balancing_v2.clj
(ns portkey.cloudformation.elastic-load-balancing-v2 "AUTOGENERATED clojure.spec definitions" (:require [clojure.spec.alpha] [portkey.cloudformation])) (do (clojure.core/defmethod portkey.cloudformation/resource-type-spec :portkey.cloudformation.elastic-load-balancing-v2/listener-rule [___19567_...
null
https://raw.githubusercontent.com/portkey-cloud/edn-to-cfn/7a3d247d35b7c4988c9b55634d03a008b87a2449/src/portkey/cloudformation/elastic_load_balancing_v2.clj
clojure
(ns portkey.cloudformation.elastic-load-balancing-v2 "AUTOGENERATED clojure.spec definitions" (:require [clojure.spec.alpha] [portkey.cloudformation])) (do (clojure.core/defmethod portkey.cloudformation/resource-type-spec :portkey.cloudformation.elastic-load-balancing-v2/listener-rule [___19567_...
36dabd327ef372a7a1e9a56c80ad4825effaeb6cb348257d33c272da0544e77c
CarlWright/NGerlguten
eg_hyphenate.erl
%%========================================================================== Copyright ( C ) 2003 %% %% 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 ...
null
https://raw.githubusercontent.com/CarlWright/NGerlguten/3c87f2e3a44ae9069f9379933b99c0feb8262d66/lib/ngerlguten/src/eg_hyphenate.erl
erlang
========================================================================== Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, following conditions: The above cop...
Copyright ( C ) 2003 " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to the in all copies or substantial portions of the Software . THE SOFTWAR...
d31ab1a507890dd06c3673703bc1104152b41a8d0d36d21470b8002b7aaa6f9b
GrammaTech/sel
change-constant.lisp
;;; change-constant.lisp --- Simple example to mutate constants in source. (defpackage :software-evolution-library/doc/examples/change-constant (:use :gt/full :software-evolution-library :software-evolution-library/software/clang)) (in-package :software-evolution-library/doc/examples/change-constant) ...
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/doc/examples/change-constant.lisp
lisp
change-constant.lisp --- Simple example to mutate constants in source. Show some mutations. Show the integer literals ASTs. Show the text of the integer literal ASTs. Evaluate fitness (looking at cycles to execute). Probably shouldn't see any timing effect.
(defpackage :software-evolution-library/doc/examples/change-constant (:use :gt/full :software-evolution-library :software-evolution-library/software/clang)) (in-package :software-evolution-library/doc/examples/change-constant) (in-readtable :curry-compose-reader-macros) (defparameter *sqrt* (from-f...
eb101e20c2463025a66f6c1da35bac43948e8a79a9b2399ada90d1178546f432
mirage/ocaml-matrix
search.ml
open Json_encoding open Matrix_common module Query = struct type t = {next_batch: string option} [@@deriving accessor] let args t = match t.next_batch with | None -> [] | Some next_batch -> ["next_batch", [next_batch]] end module Request = struct module Criteria = struct module Key = struct ...
null
https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/lib/matrix-ctos/search.ml
ocaml
open Json_encoding open Matrix_common module Query = struct type t = {next_batch: string option} [@@deriving accessor] let args t = match t.next_batch with | None -> [] | Some next_batch -> ["next_batch", [next_batch]] end module Request = struct module Criteria = struct module Key = struct ...
436bc2fdd9971d66d521a26a63e64013caf10c37966b64e54e9a1f8074aef43b
zkincaid/srk
srkZ3.ml
open Syntax open BatPervasives include Log.Make(struct let name = "srk.srkZ3" end) type z3_context = Z3.context type z3_expr = Z3.Expr.expr type z3_func_decl = Z3.FuncDecl.func_decl type 'a open_expr = [ | `Real of QQ.t | `App of z3_func_decl * 'a list | `Var of int * typ_fo | `Add of 'a list | `Mul of 'a ...
null
https://raw.githubusercontent.com/zkincaid/srk/4809f2b697c02d9e020e4de2c0b11ff4a0c59f7f/src/srkZ3.ml
ocaml
sym_of_decl is sufficient for round-tripping, since srk symbols become Z3 int symbols TODO: intepretations for arrays type-generic equality x * epsilon x + y*epsilon x*epsilon x - y*epsilon The hypothesis is assumed to not simplify to true/false -- otherwise, var_table isn't initialized
open Syntax open BatPervasives include Log.Make(struct let name = "srk.srkZ3" end) type z3_context = Z3.context type z3_expr = Z3.Expr.expr type z3_func_decl = Z3.FuncDecl.func_decl type 'a open_expr = [ | `Real of QQ.t | `App of z3_func_decl * 'a list | `Var of int * typ_fo | `Add of 'a list | `Mul of 'a ...
b5b63720fb1f85746e766224aa9e8518935c8005a9361c5d361ea551b0b66943
project-oak/hafnium-verification
Tenv.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/IR/Tenv.mli
ocaml
* Module for Type Environments. * Type for type environment. * Create a new type environment. * Load a type environment for a source file * read and return a type environment from the given file * Look up a name in the global type environment. * Add a field to a given struct in the global type environment. * pri...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
d8ca378ba0b841247a1904f11f5e0ddc7e8d3ca462e7e6215542c2cf7ffec167
honix/Lire
settings.lisp
;; ;; Lire - settable variables ;; (in-package :lire) ;; Window (defparameter *initial-width* 800) (defparameter *initial-height* 600) Canvas (defparameter *grid-size* 50) ; px (defparameter *zoom-max* 2) (defparameter *zoom-min* 0.2) (defparameter *double-click-limit* 0.3) ;; ...
null
https://raw.githubusercontent.com/honix/Lire/36c18b8944919ef428ed856935746955a4cc38cc/settings.lisp
lisp
Lire - settable variables Window px Menu px px px px ? px Color themes
(in-package :lire) (defparameter *initial-width* 800) (defparameter *initial-height* 600) Canvas (defparameter *zoom-max* 2) (defparameter *zoom-min* 0.2) (defparameter *double-click-limit* 0.3) Node (defparameter *node-text-height* (* *node-height* 0.7)) (progn (defparameter *...
5db74e6a2f4fb8b17f99c4cc2e99756a9484006e11c84ab2c7495f83a9e9677d
jaredponn/Fly-Plane-Fly
PlayerManager.hs
# LANGUAGE InstanceSigs # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # {-# LANGUAGE BangPatterns #-} module PlayerManager where import Linear.V2 import qualified SDL import Control.Monad.Reader import Control.Monad.State import Control.Lens import Foreign.C.Types import Aabb import GameVars class Mo...
null
https://raw.githubusercontent.com/jaredponn/Fly-Plane-Fly/8e250f29216f2f75dac2dd0235a2b0243d601620/src/PlayerManager.hs
haskell
# LANGUAGE BangPatterns #
# LANGUAGE InstanceSigs # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # module PlayerManager where import Linear.V2 import qualified SDL import Control.Monad.Reader import Control.Monad.State import Control.Lens import Foreign.C.Types import Aabb import GameVars class Monad m => PlayerManager m where ...
27f4e6490d1f9c77cbf23278cd5b488f051b3a270b99016655971df50044c858
haskell-trasa/trasa
Method.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE GeneralizedNewtypeDeriving # -- | This module exports symbols that will conflict with the standard prelude. It is recommended to be import qualified or just import ' Method ' and use its ' IsString ' instance . module Trasa.Method ( -- * Method Method , encodeMe...
null
https://raw.githubusercontent.com/haskell-trasa/trasa/bfc23d4fd5b895493ba650a7f607b5fa034179d7/trasa/src/Trasa/Method.hs
haskell
# LANGUAGE OverloadedStrings # | This module exports symbols that will conflict with the standard prelude. * Method * Convenience pre defined methods
# LANGUAGE GeneralizedNewtypeDeriving # It is recommended to be import qualified or just import ' Method ' and use its ' IsString ' instance . module Trasa.Method ( Method , encodeMethod , decodeMethod , get , post , head , put , delete , trace , connect , options , patch ) where import...
118afa5d6bf01851f786e22122687feb47942bb6c7feb5b7f1126949d2a8bc40
spartango/CS153
compile_tests.ml
open Test_framework open Pretty_print open Compile open Optimize open Ast open Mips module IList = RevList(struct type element = int end) (* Utility function tests *) let revapp_test = let (<@) a b = IList.app_list a b in let test = fun () -> let init_list = IList.rev_list [1;2;3] in let target_list =...
null
https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps2/compile_tests.ml
ocaml
Utility function tests Tests for collecting variables Tests for compiling expressions , (String.concat "" (code_to_string result))) Tests for compiling specific statements
open Test_framework open Pretty_print open Compile open Optimize open Ast open Mips module IList = RevList(struct type element = int end) let revapp_test = let (<@) a b = IList.app_list a b in let test = fun () -> let init_list = IList.rev_list [1;2;3] in let target_list = [4;5] in l...
b571f82ad2236b1df1b17ff5b67e75ed94596a53683117d553d5cf9c33ee6d57
sulami/spielwiese
example.hs
module Main where import Data.Matrix (fromLists) import Neural (mkNeuNet, run) main = do let net = mkNeuNet [2,2,1] x = fromLists [[0,0],[1,1],[-1,0.5]] print $ run net x
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hNeural/example.hs
haskell
module Main where import Data.Matrix (fromLists) import Neural (mkNeuNet, run) main = do let net = mkNeuNet [2,2,1] x = fromLists [[0,0],[1,1],[-1,0.5]] print $ run net x
a7d5f55a923dcd5f2a4d45a53c4e31fba8193dbd6749821aa1fcfac2edbb5888
ghc/ghc
T22728b_B.hs
-- inferred safe {-# LANGUAGE Haskell2010 #-} module T22728b_B where int :: Int int = 3
null
https://raw.githubusercontent.com/ghc/ghc/c79b2b65fff93b4f4e38e5d124f0cb8c6ef704c0/testsuite/tests/safeHaskell/warnings/T22728b_B.hs
haskell
inferred safe # LANGUAGE Haskell2010 #
module T22728b_B where int :: Int int = 3
51312346b07d1fd1166066a1bfafff3bdc2e9f6b2db7c0e6bee8fc89d4cfbdd1
MLanguage/mlang
partial_evaluation.ml
Copyright ( C ) 2019 - 2021 Inria , contributors : < > This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later ...
null
https://raw.githubusercontent.com/MLanguage/mlang/043516564f98f2ac8db88eff8a2cdc2ecd2db440/src/mlang/optimizing_ir/partial_evaluation.ml
ocaml
operations where undef is absorbing, such as the multiplication * The option at the leaves of the [BlockMap.t] is to account for definitions that are not literals but that are to be taken into account for validity of inlining later we only consider definitions that were partially evaluated to ...
Copyright ( C ) 2019 - 2021 Inria , contributors : < > This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later ...
ba7e22063529fff8ac376cdde2e6445431d9548365c84eeaddbe75814347621f
GrammaticalFramework/gf-core
CompactPrint.hs
module GF.Infra.CompactPrint where import Data.Char compactPrint = compactPrintCustom keywordGF (const False) compactPrintGFCC = compactPrintCustom (const False) keywordGFCC compactPrintCustom pre post = dps . concat . map (spaceIf pre post) . words dps = dropWhile isSpace spaceIf pre post w = case w of _ | pre...
null
https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/compiler/GF/Infra/CompactPrint.hs
haskell
module GF.Infra.CompactPrint where import Data.Char compactPrint = compactPrintCustom keywordGF (const False) compactPrintGFCC = compactPrintCustom (const False) keywordGFCC compactPrintCustom pre post = dps . concat . map (spaceIf pre post) . words dps = dropWhile isSpace spaceIf pre post w = case w of _ | pre...
9c2ab0ae4d378b5438d282b83e22b12a727b69e503200685a5eadb332d55456e
rm-hull/wam
assert_helpers.clj
The MIT License ( MIT ) ;; Copyright ( c ) 2015 ;; ;; 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, modif...
null
https://raw.githubusercontent.com/rm-hull/wam/09f0ecf33b3b81ac29a2d0bc2228899fd6f52641/test/wam/assert_helpers.clj
clojure
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...
The MIT License ( MIT ) Copyright ( c ) 2015 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI...
3cd238da310a2ccba9ca66de6b5b162064560cd52c087ed095f6d6b0087bd844
cxxxr/apispec
path.lisp
(defpackage #:apispec/classes/path (:use #:cl #:apispec/utils) (:import-from #:apispec/classes/parameter #:parameter) (:import-from #:apispec/classes/operation #:operation) (:import-from #:apispec/utils/path-template #:compile-path-template) (:export #:p...
null
https://raw.githubusercontent.com/cxxxr/apispec/4bdd238f6b5effed305d284e0e6b7cef214e94a2/src/classes/path.lisp
lisp
(defpackage #:apispec/classes/path (:use #:cl #:apispec/utils) (:import-from #:apispec/classes/parameter #:parameter) (:import-from #:apispec/classes/operation #:operation) (:import-from #:apispec/utils/path-template #:compile-path-template) (:export #:p...
920e0afb10c94f319ee14b58552a7c92ae42abe27ac6eb8c4c7e124935d14155
input-output-hk/plutus
Main.hs
-- editorconfig-checker-disable-file # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} # LANGUAGE NoImplicitPrelude # {-# LANGUAGE NumericUnderscores #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # {- | ...
null
https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-benchmark/ed25519-throughput/Main.hs
haskell
editorconfig-checker-disable-file # LANGUAGE DataKinds # # LANGUAGE NumericUnderscores # | Check how many Ed25519 signature verifications we can perform within the limits specified in the protocol parameters. | This is the "maximum transaction size". We're just comparing the size of the script with ...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # module Main (main) where import PlutusCore (DefaultFun, DefaultUni) import PlutusCore.Evaluation.Machine.ExBudget...
be5f76853f4208e5c88ba6905333c49c86785dbcffab822a4435914f9c266b14
project-oak/hafnium-verification
Issue.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/backend/Issue.ml
ocaml
* Wrapper of an issue that compares all parts except the procname ignore proc name FIXME(T54950303) replace use of filtering with deduplicate
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
c221b6fd771177fedddbd6d9f822f911f2f92ada361c25b752b1a0d48d75b2a1
wattlebirdaz/rclref
rclref_get_statem.erl
-module(rclref_get_statem). -behaviour(gen_statem). -export([start_link/1, stop/2]). -export([result_of_get/2]). -export([init/1, callback_mode/0, terminate/3, code_change/4]). -export([waiting/3, finalize/3]). -define(N, rclref_config:n_val()). -define(W, rclref_config:w_val()). -define(R, rclref_config:r_val()). -...
null
https://raw.githubusercontent.com/wattlebirdaz/rclref/0e31857de43e3930f69d4063f79a518fe9fdbb79/apps/rclref/src/rclref_get_statem.erl
erlang
API (called by vnodes) Callbacks When a vnode returns {ok, RObj} Update State When more than (N-R) vnodes responded with {error, VnodeError}, return all RObjs and VNodeErrors it has received to client When a vnode returns {error, VnodeError} Update State When more than (N-R) vnodes responded with {error, VnodeE...
-module(rclref_get_statem). -behaviour(gen_statem). -export([start_link/1, stop/2]). -export([result_of_get/2]). -export([init/1, callback_mode/0, terminate/3, code_change/4]). -export([waiting/3, finalize/3]). -define(N, rclref_config:n_val()). -define(W, rclref_config:w_val()). -define(R, rclref_config:r_val()). -...
8b86f430c2433fddf32326318244181f71061833c2156eec3d80b9038ecea4fe
hellopatrick/xmas
enum.ml
let[@inline] sum lst = List.fold_left ( + ) 0 lst
null
https://raw.githubusercontent.com/hellopatrick/xmas/ff2cbbfb2d569aabd33905e1caece50f88c8c54e/lib/enum.ml
ocaml
let[@inline] sum lst = List.fold_left ( + ) 0 lst
d10d9f433ac96339afee10c0b4259e13fea8955099ec348c77fa8d04f124d16a
metaocaml/ber-metaocaml
pr7718.ml
(* TEST *) let go () = Gc.full_major (); for i = 1 to 10_000 do let rec b = let x = (b, b) in Force the above allocation to be live across a GC , by allocating a large enough object that the allocations can not be combined . by allocating a large enough object that the allocations ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/regression/pr7718/pr7718.ml
ocaml
TEST
let go () = Gc.full_major (); for i = 1 to 10_000 do let rec b = let x = (b, b) in Force the above allocation to be live across a GC , by allocating a large enough object that the allocations can not be combined . by allocating a large enough object that the allocations cann...
ed6b85af2557af2f8fec0180c6ff1dda14f3c9518efc00be6eaa9f9fcc1299f6
austinhaas/kanren
demo.cljc
(ns pettomato.kanren.muKanren.demo (:refer-clojure :exclude [==]) (:require [pettomato.kanren.util.llist :refer [empty-llist llist llist* llist->seq]] [pettomato.kanren.muKanren.goals :refer [== emptyo conso membero appendo succeed anyo alwayso]] #?(:clj [pettomato.kanren.muKanren.extras-macros :refe...
null
https://raw.githubusercontent.com/austinhaas/kanren/f55b68279ade01dbaae67a074ea3441370a27f9e/src/pettomato/kanren/muKanren/demo.cljc
clojure
(ns pettomato.kanren.muKanren.demo (:refer-clojure :exclude [==]) (:require [pettomato.kanren.util.llist :refer [empty-llist llist llist* llist->seq]] [pettomato.kanren.muKanren.goals :refer [== emptyo conso membero appendo succeed anyo alwayso]] #?(:clj [pettomato.kanren.muKanren.extras-macros :refe...
0f6852980a4b7a83dbc072655b4b2b8e5d7f5f65ec73267bcaa3d65c1b915e2a
cyverse-archive/DiscoveryEnvironmentBackend
comments.clj
(ns metadata.routes.comments (:use [common-swagger-api.schema] [metadata.routes.domain.common] [metadata.routes.domain.comments] [ring.util.http-response :only [ok]]) (:require [metadata.services.comments :as comments])) (defroutes* data-comment-routes (context* "/filesystem/data" [] ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadata/src/metadata/routes/comments.clj
clojure
(ns metadata.routes.comments (:use [common-swagger-api.schema] [metadata.routes.domain.common] [metadata.routes.domain.comments] [ring.util.http-response :only [ok]]) (:require [metadata.services.comments :as comments])) (defroutes* data-comment-routes (context* "/filesystem/data" [] ...
6085a749389ed04160841fc8b229f579dc768651d087e029fe19394c1a889596
igrishaev/farseer
client.clj
(ns farseer.spec.client (:require [clojure.spec.alpha :as s])) (s/def :rpc/fn-id (s/or :id/int #{:id/int} :id/uuid #{:id/uuid} :id/fn fn?)) (s/def :rpc/fn-before-send fn?) (s/def :rpc/ensure? boolean?) (s/def :http/url string?) (s/def :http/method #{:get :post :put :delete}) (s/def :...
null
https://raw.githubusercontent.com/igrishaev/farseer/e3791cccae402cc613ea4ff737f554a033b248eb/farseer-client/src/farseer/spec/client.clj
clojure
(ns farseer.spec.client (:require [clojure.spec.alpha :as s])) (s/def :rpc/fn-id (s/or :id/int #{:id/int} :id/uuid #{:id/uuid} :id/fn fn?)) (s/def :rpc/fn-before-send fn?) (s/def :rpc/ensure? boolean?) (s/def :http/url string?) (s/def :http/method #{:get :post :put :delete}) (s/def :...
42ff37bc6f8f4a9d8f73287ea802eaf70953d10452ca173faa2a39cf800c9b67
cheopslab/cheops-logger
Logger.hs
-- | -- @cheops-logger@ is a highly opinionated logger, -- it is a tiny interface over [co-log-concurrent](-log-concurrent) -- that provides a functionality to store strucutred messages. It's used for some internal projects -- but should be sufficient for the wide use as well. The library itself does not provide -- muc...
null
https://raw.githubusercontent.com/cheopslab/cheops-logger/0737ee0235f255b2e8f070740f03ce50d49b42bf/cheops-logger/src/Cheops/Logger.hs
haskell
| @cheops-logger@ is a highly opinionated logger, it is a tiny interface over [co-log-concurrent](-log-concurrent) that provides a functionality to store strucutred messages. It's used for some internal projects but should be sufficient for the wide use as well. The library itself does not provide much flexibilit...
' withLogger ' config $ \initial_logger - > do ' ' ? logger " message2 " let ? logger = ' addContext ' ( ' sl ' " host " " 127.0.0.1 " ) ' ' ? logger " Host info will be added to this message " module Cheops.Logger withLogger , defCapacity , LoggerConfig(..) , module Colog.Json ) w...
d6bcb7d96dab8a6c914a656f0dbe69da5648033aa3ce83713100238c3475c961
REMath/mit_16.399
abexp.ml
(* abexp.ml *) open Linear_Syntax open Aenv (* abstract interpretation of linearized boolean operations *) exception Error of string let rec a_bexp b r = match b with | RANDOM_BEXP -> r | LTRUE -> r | LFALSE -> (Aenv.bot ()) | (LGE a) -> (Aenv.f_LGE a r) | (LEQ a) -> (Aenv.f_LEQ a r) | ...
null
https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-BW-REL-Abstract-Interpreter/abexp.ml
ocaml
abexp.ml abstract interpretation of linearized boolean operations
open Linear_Syntax open Aenv exception Error of string let rec a_bexp b r = match b with | RANDOM_BEXP -> r | LTRUE -> r | LFALSE -> (Aenv.bot ()) | (LGE a) -> (Aenv.f_LGE a r) | (LEQ a) -> (Aenv.f_LEQ a r) | (LAND l) -> let rec andlist l = match l with | [] -> (rais...
cbd277144aa7c60a604a2e4609aa99c995c1c9bdc5aadc9b9dbe28ee7f336d2c
hargettp/hh-aws
utils.lisp
Copyright ( c ) 2010 - 11 ;; Permission is hereby granted, free of charge, to any person obtaining a copy ;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights ;; to use, copy, modify, merge, publish, distrib...
null
https://raw.githubusercontent.com/hargettp/hh-aws/650d08b7db6d88bfccc6815da36321e4c73556db/utils.lisp
lisp
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 an...
Copyright ( c ) 2010 - 11 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS O...
46062be6ae3629b11965043b189577c3c1c031459f3544a0b4da4faf75842268
vlstill/hsExprTest
typecmp-a.6.hint.nok.hs
Int -> Int Double Integral c => c -> c -> (Integral d, Num b) => d -> b
null
https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/examples/typecmp-a.6.hint.nok.hs
haskell
Int -> Int Double Integral c => c -> c -> (Integral d, Num b) => d -> b
aac71ac2e52746cbf0b4aa06ec4c0e69055835a7e033582c9496359ebc8c5f58
sam-jay/shoo-lang
semant.ml
Authors : , , , open Ast open Sast module StringMap = Map.Make (String) exception Type_mismatch of string exception Undeclared_reference of string let builtinsFunc = [ ("println", Func({ param_typs = [String]; return_typ = Void })); ("print", Func({ param_typs = [String]; return_typ = Void })); ("st...
null
https://raw.githubusercontent.com/sam-jay/shoo-lang/75e2cff6a176d742f19bf9aa56490594c3683f92/src/semant.ml
ocaml
This function takes a tuple with the type and the map * as well as the variable name and the context map. * The map in the tuple is used for the member fields * in structs. The map is None unless you are adding a new * struct type. Returns a tuple with the type and the map and if * the variable is initalized o...
Authors : , , , open Ast open Sast module StringMap = Map.Make (String) exception Type_mismatch of string exception Undeclared_reference of string let builtinsFunc = [ ("println", Func({ param_typs = [String]; return_typ = Void })); ("print", Func({ param_typs = [String]; return_typ = Void })); ("st...
67280b9b646d1b8f47809e75a2637946ecee0f723782fd7a60bb209419fe8cc9
etorreborre/registry
Dot.hs
-- | -- Nested datatype to track the resolution algorithm -- -- From this data type we can draw a graph of the full -- instantiation of a value module Data.Registry.Internal.Dot where import Data.Hashable import Data.List (elemIndex) import Data.Map.Strict hiding (adjust) import Data.Registry.Internal.Statistics im...
null
https://raw.githubusercontent.com/etorreborre/registry/03d810ec8489a0b431a82d040ebd1cf01aff99e6/src/Data/Registry/Internal/Dot.hs
haskell
| Nested datatype to track the resolution algorithm From this data type we can draw a graph of the full instantiation of a value | Make a list of graph edges from the list of function applications when there are values of the same type and different hash values | List of value hashes by value type | Type a...
module Data.Registry.Internal.Dot where import Data.Hashable import Data.List (elemIndex) import Data.Map.Strict hiding (adjust) import Data.Registry.Internal.Statistics import Data.Registry.Internal.Types import Data.Text as T import Protolude as P import Type.Reflection makeEdges :: Operations -> [(Value, Value)] m...
b63ae20cdc6d1e9eec2bed3c814698c184d2745b3ea8f158dffae33bea0d10e8
cram2/cram
ptu.lisp
Copyright ( c ) 2015 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list o...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_common/cram_robot_interfaces/src/ptu.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Red...
Copyright ( c ) 2015 , < > * Neither the name of the Intelligent Autonomous Systems Group/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
f314a90e027d543b733a3da1204fbc2a297edfe2c4450eb0dcb8b78eb3defdda
eponai/sulolive
test_util.clj
(ns eponai.server.api.store.test-util (:require [eponai.server.external.aws-s3 :as s3] [eponai.common.database :as db] [clojure.core.async :as async] [eponai.server.external.stripe :as stripe] [eponai.server.external.cloudinary :as cloudinary])) (defn s3-test [chan] (reify s3/IAWSS3 (conver...
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/test/eponai/server/api/store/test_util.clj
clojure
(ns eponai.server.api.store.test-util (:require [eponai.server.external.aws-s3 :as s3] [eponai.common.database :as db] [clojure.core.async :as async] [eponai.server.external.stripe :as stripe] [eponai.server.external.cloudinary :as cloudinary])) (defn s3-test [chan] (reify s3/IAWSS3 (conver...
3c4c36afd3505fdb30d02d511d9c5c84ac372db48f0734e7aadb5c06b4223bb6
bevuta/pepa
filter.cljs
(ns pepa.components.filter (:require [om.core :as om :include-macros true] [clojure.string :as s] [pepa.navigation :as nav] [pepa.components.logo :as logo])) (defrecord Search [tags sort-key sort-order]) (defn search-field [search owner _])
null
https://raw.githubusercontent.com/bevuta/pepa/0a9991de0fd1714515ca3def645aec30e21cd671/src-cljs/pepa/components/filter.cljs
clojure
(ns pepa.components.filter (:require [om.core :as om :include-macros true] [clojure.string :as s] [pepa.navigation :as nav] [pepa.components.logo :as logo])) (defrecord Search [tags sort-key sort-order]) (defn search-field [search owner _])
23b6d4bb72961906f8a8b695092ee779ec10dd89258218ead920f0165bea979c
marigold-dev/deku
block_pool.ml
open Deku_concepts open Block (* TODO: clean block pool *) (* TODO: not accepted blocks and signatures are never removed *) type block_pool = | Pool of (Block.t option * Verified_signature.Set.t) Block_hash.Map.t Level.Map.t type t = block_pool (* helpers *) let find_by_hash hash map = match Block_hash.Map...
null
https://raw.githubusercontent.com/marigold-dev/deku/cdf82852196b55f755f40850515580be4fd9a3fa/deku-p/src/core/consensus/block_pool.ml
ocaml
TODO: clean block pool TODO: not accepted blocks and signatures are never removed helpers TODO: dedup TODO: not safe, doesn't check if signatures match validator
open Deku_concepts open Block type block_pool = | Pool of (Block.t option * Verified_signature.Set.t) Block_hash.Map.t Level.Map.t type t = block_pool let find_by_hash hash map = match Block_hash.Map.find_opt hash map with | Some (block, votes) -> (block, votes) | None -> (None, Verified_signature.Set....
d887cd3ce20e9fec34d8a25d031dfc60026a869a232fb1b670647293e454173b
jesperes/aoc_erlang
aoc2019_day08.erl
Advent of Code solution for 2019 day 08 . Created : 2019 - 12 - 08T06:56:28 + 00:00 -module(aoc2019_day08). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -define(W, 25). -define(H, 6). -define(LSIZE, 150). %% Number of pixels per layer -define(BLACK, $0). -...
null
https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2019/aoc2019_day08.erl
erlang
Number of pixels per layer kludge to trick code formatter Count 0/1/2 in this layer
Advent of Code solution for 2019 day 08 . Created : 2019 - 12 - 08T06:56:28 + 00:00 -module(aoc2019_day08). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -define(W, 25). -define(H, 6). -define(BLACK, $0). -define(WHITE, $1). -define(TRANSPARENT, $2). -spec...
7948194db60a83ae64a7aabb13db712f4606bfe5443a5e074635ac773cb3dcd9
corecursive/sicp-study-group
ex02_40.scm
* Exercise 2.40 :* Define a procedure ` unique - pairs ' that , given an integer n , generates the sequence of pairs ( i , j ) with 1 < = j < i < = ;; n. Use `unique-pairs' to simplify the definition of ;; `prime-sum-pairs' given above. ;; GIVEN DEFINITIONS (define (remove item sequence) (filte...
null
https://raw.githubusercontent.com/corecursive/sicp-study-group/343e6b4802a703cfbe77f6fdac171383b5e8d31d/plundaahl/exercises/ex02_40.scm
scheme
n. Use `unique-pairs' to simplify the definition of `prime-sum-pairs' given above. GIVEN DEFINITIONS ANSWER
* Exercise 2.40 :* Define a procedure ` unique - pairs ' that , given an integer n , generates the sequence of pairs ( i , j ) with 1 < = j < i < = (define (remove item sequence) (filter (lambda (x) (not (= x item))) sequence)) (define (accumulate op initial sequence) (if (null? sequence) ...
d62d09ccc10143046d719586ecbfdbe42278a6f20650d16675bdff0530ae29ae
babashka/babashka
core_test.clj
(ns gaka.core-test (:use gaka.core clojure.test)) (defmacro =? [& body] `(are [x# y#] (= x# y#) ~@body)) (deftest test-flatten (let [flatten-seqs #'gaka.core/flatten-seqs flatten-maps #'gaka.core/flatten-maps flatten-keyvals #'gaka.core/flatten-keyvals] (=? (flatten-seqs [1 '(...
null
https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/gaka/core_test.clj
clojure
(ns gaka.core-test (:use gaka.core clojure.test)) (defmacro =? [& body] `(are [x# y#] (= x# y#) ~@body)) (deftest test-flatten (let [flatten-seqs #'gaka.core/flatten-seqs flatten-maps #'gaka.core/flatten-maps flatten-keyvals #'gaka.core/flatten-keyvals] (=? (flatten-seqs [1 '(...
fe240e0559610f2e532f43e25606d95ce9f186ae6e208ef721a42d2866d69f36
JPMoresmau/dbIDE
hwide-test.hs
# OPTIONS_GHC -F -pgmF htfpp # -- | Entry point for tests module Main where import Test.Framework import {-@ HTF_TESTS @-} Language.Haskell.HWide.CabalTest -- | Test method main :: IO() main = htfMain htf_importedTests
null
https://raw.githubusercontent.com/JPMoresmau/dbIDE/dae37edf67fbe55660e7e22c9c5356d0ada47c61/hwide/test/hwide-test.hs
haskell
| Entry point for tests @ HTF_TESTS @ | Test method
# OPTIONS_GHC -F -pgmF htfpp # module Main where import Test.Framework main :: IO() main = htfMain htf_importedTests
26b97cef7e87749733f7e5adfc4ea3cfd0a7ef81e44eed0c89d266eb594fec59
nvbn/textarea-to-code-editor
core.cljs
(ns textarea-to-code-editor.content.core (:require-macros [cljs.core.async.macros :refer [go-loop]]) (:require [cljs.core.match :refer-macros [match]] [cljs.core.async :refer [<! chan]] [domina.css :refer [sel]] [textarea-to-code-editor.content.chrome :as c] [textarea...
null
https://raw.githubusercontent.com/nvbn/textarea-to-code-editor/16ce92bb1d17eccc5f49c893b31491738f4ba264/src/textarea_to_code_editor/content/core.cljs
clojure
(ns textarea-to-code-editor.content.core (:require-macros [cljs.core.async.macros :refer [go-loop]]) (:require [cljs.core.match :refer-macros [match]] [cljs.core.async :refer [<! chan]] [domina.css :refer [sel]] [textarea-to-code-editor.content.chrome :as c] [textarea...
1828eb0d6e5aa7cc2f1f54b377b13e4dca34ab8eaa99b6b0fa7784da5e2852dc
mishadoff/project-euler
problem051.clj
(ns project-euler (:use [clojure.contrib.lazy-seqs :only (primes)]) (:use [clojure.contrib.combinatorics :as comb])) (defn prime? [prime] (if (= 1 prime) false (not-any? #(zero? (rem prime %)) (take-while #(<= (* % %) prime) primes)))) (defn make-gold [nums patset] "Transforms digit array into gold patter...
null
https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem051.clj
clojure
(ns project-euler (:use [clojure.contrib.lazy-seqs :only (primes)]) (:use [clojure.contrib.combinatorics :as comb])) (defn prime? [prime] (if (= 1 prime) false (not-any? #(zero? (rem prime %)) (take-while #(<= (* % %) prime) primes)))) (defn make-gold [nums patset] "Transforms digit array into gold patter...
4b120f7d0b575cc65e025aacba9c44fadb11cf8778ad15d2ad4968bb9a554532
marineschimel/ilqr_vae
likelihoods.ml
open Base open Owl include Likelihoods_typ module Gaussian (X : sig val label : string val normalize_c : bool end) = struct module P = Owl_parameters.Make (Gaussian_P) open Gaussian_P type datum = AD.t type data = AD.t let requires_linesearch = false let label = X.label let init ?(sigma2 = 1.) ?(b...
null
https://raw.githubusercontent.com/marineschimel/ilqr_vae/8bdda2bfcf0729f965b2ab9e5aab5042a240c64d/lib/likelihoods.ml
ocaml
z is T x M z is T x M z is T x M redefine the link_function to include a safe floor
open Base open Owl include Likelihoods_typ module Gaussian (X : sig val label : string val normalize_c : bool end) = struct module P = Owl_parameters.Make (Gaussian_P) open Gaussian_P type datum = AD.t type data = AD.t let requires_linesearch = false let label = X.label let init ?(sigma2 = 1.) ?(b...
3318c42ca859b268edf6de239d5730f0baefa31f9780b0ed9efa760feb6298d2
jdsandifer/AutoLISP
RAIL_COUNT_SUB.lsp
;;;;;;;[ Top Rail Count Subfunstion ];;;;;;;;;;; ;; ;; ;; Does cut list count based on measurements ;; ;; of center lines. Prompts for stock length ;; and multiplier and stores in global ; ; ;; variables. ;; ;; (forked...
null
https://raw.githubusercontent.com/jdsandifer/AutoLISP/054c8400fae84c223c3113e049a1ab87d374ba37/Old/RAIL_COUNT_SUB.lsp
lisp
[ Top Rail Count Subfunstion ];;;;;;;;;;; ;; Does cut list count based on measurements ;; of center lines. Prompts for stock length ;; ; variables. ;; (forked from RAIL_COUNT_COM) ;; ; ...
(defun C:CountTopRail ( / stockLength layerToCount) (setq stockLength 242) (setq roundingFactor 3) (setq fudgeFactorToAdd 6) (setq layerToCount "A-HRAL-RAIL") (setq selSet (ssget (list (cons 8 layerToCount) '(-4 . "<or") '(0 . "*line") '(0 . "*polyline") '(-4 . "or>...
f85448ab03994b445c2ede7018a9295be52d94bfc315e62bae2eda5679d1567e
racket/unix-socket
unix-socket-ffi.rkt
FFI functions , constants , and types for unix domain sockets ( unsafe ) #lang racket/base (require ffi/unsafe ffi/unsafe/define ffi/unsafe/port) (provide (protect-out (all-defined-out))) platform : ( U ' bsd ' linux # f ) ;; Data structures and constants differ between platforms. ;; Mac OS X and...
null
https://raw.githubusercontent.com/racket/unix-socket/89007b9b5f2188a06ed656e0f2e4fa8d3472a085/unix-socket-lib/racket/private/unix-socket-ffi.rkt
racket
Data structures and constants differ between platforms. Mac OS X and the BSDs I tried seem to have consistent definitions. ======================================== Constants bsd / macosx : / socket.h bsd / macosx : / socket.h bsd / macosx : / errno.h bsd / macosx : / fcntl.h bsd / macosx : / socket.h bsd...
FFI functions , constants , and types for unix domain sockets ( unsafe ) #lang racket/base (require ffi/unsafe ffi/unsafe/define ffi/unsafe/port) (provide (protect-out (all-defined-out))) platform : ( U ' bsd ' linux # f ) (define platform (case (system-type 'os) [(macosx) 'bsd] [(unix)...
a7f8d1936f059d977ba895e6e42810886527c9a45a7cad54a973674085bfe16f
yav/hobbit
Logo.hs
module UI.Logo(logo) where import UI.ANSI hobbit = [" _ _ _ _ " ,"| | | | | | (_) _" ,"| |__ ___ | |__ | |__ _ _| |_" ,"| _ \\ / _ \\| _ \\| _ \\| (_ _)" ,"| | | | |_| | |_) ...
null
https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/UI/Logo.hs
haskell
module UI.Logo(logo) where import UI.ANSI hobbit = [" _ _ _ _ " ,"| | | | | | (_) _" ,"| |__ ___ | |__ | |__ _ _| |_" ,"| _ \\ / _ \\| _ \\| _ \\| (_ _)" ,"| | | | |_| | |_) ...
5ce8c6c554cccd51590e2270f728952e8546901e8ad3fdf9f9cfc5a7aff96e6b
janestreet/hardcaml_circuits
vec_intf.ml
(** A simple vector structure with insert and delete operations at arbitrary positions. *) open Base open Hardcaml module type Arg = sig (** Interface representing the data held in the vec. *) module Interface : Interface.S (** Construct a register spec for each field in the interface based on index. *) val ...
null
https://raw.githubusercontent.com/janestreet/hardcaml_circuits/1b0ab0e90597adbfb97abdc9462ca09944d77636/src/vec_intf.ml
ocaml
* A simple vector structure with insert and delete operations at arbitrary positions. * Interface representing the data held in the vec. * Construct a register spec for each field in the interface based on index. * Operation performed on the [vec] circuit. * Slot to perform operation at * Operation type (insert, r...
open Base open Hardcaml module type Arg = sig module Interface : Interface.S val spec : index:int -> Reg_spec.t -> Reg_spec.t Interface.t end module type S = sig type t type data type op = } val create : Reg_spec.t -> vec_size:int -> next:(index:int -> data -> data) -> op -> t val get : t -> in...
e0d3b92dc98d84c059376cbbf44978d63a2efa1f0fa5c1f90dc5136965ebcc6d
s-expressionists/ctype
negation.lisp
(in-package #:ctype) (defmethod ctypep (object (ct negation)) (not (ctypep object (negation-ctype ct)))) ;;; Negation identities: ;;; a ^ ~a = 0 ;;; a v ~a = T ;;; ~~a = a ;;; a = a v 0 = a v (b ^ ~b) = (a v b) ^ (a v ~b) ;;; 0 = a ^ 0 = a ^ (b ^ ~b) = (a ^ b) ^ (a ^ ~b) ;;; a = a ^ T = a ^ (b v ~b) = (a ^ b) v (a...
null
https://raw.githubusercontent.com/s-expressionists/ctype/2b13bc5a17fad0117b4a5860bade678ed6bf7c3c/negation.lisp
lisp
Negation identities: a ^ ~a = 0 a v ~a = T ~~a = a a = a v 0 = a v (b ^ ~b) = (a v b) ^ (a v ~b) 0 = a ^ 0 = a ^ (b ^ ~b) = (a ^ b) ^ (a ^ ~b) a = a ^ T = a ^ (b v ~b) = (a ^ b) v (a ^ ~b) T = a v T = a v (b v ~b) = (a v b) v (a v ~b) ~a <: ~b <=> ~a ^ ~b = ~a <=> ~(a v b) = ~a <=> a v b = a <=> b <: a a ^ b ...
(in-package #:ctype) (defmethod ctypep (object (ct negation)) (not (ctypep object (negation-ctype ct)))) (defmethod subctypep ((ct1 negation) (ct2 negation)) (subctypep (negation-ctype ct2) (negation-ctype ct1))) (defmethod subctypep ((ct1 ctype) (ct2 negation)) a < : ~b < = > a ^ ~b = a = > ( a ^ b ) ^ a = 0...
5388c390771de4b9080da42a47691705d300385757572a2d51124345fe0c50f2
fossas/fossa-cli
Registry.hs
module App.Fossa.Container.Sources.Registry ( analyzeFromRegistry, listTargetsFromRegistry, revisionFromRegistry, ) where import App.Fossa.Container.Sources.DockerArchive (analyzeFromDockerArchive, listTargetsFromDockerArchive, revisionFromDockerArchive) import Container.Docker.Credentials (useCredentialFromConf...
null
https://raw.githubusercontent.com/fossas/fossa-cli/62c25adda99bab2c80ef78ee78206a14ad0ab0fa/src/App/Fossa/Container/Sources/Registry.hs
haskell
module App.Fossa.Container.Sources.Registry ( analyzeFromRegistry, listTargetsFromRegistry, revisionFromRegistry, ) where import App.Fossa.Container.Sources.DockerArchive (analyzeFromDockerArchive, listTargetsFromDockerArchive, revisionFromDockerArchive) import Container.Docker.Credentials (useCredentialFromConf...
6521ecd1322ebbe6de96696db2c1f58f053af15c5506fa0866f087621d12aa35
babashka/pod-babashka-buddy
key_utils.clj
(ns pod.babashka.buddy.key-utils (:import [java.security KeyFactory PrivateKey PublicKey] [java.security.spec X509EncodedKeySpec PKCS8EncodedKeySpec] [org.bouncycastle.crypto.util PrivateKeyFactory PublicKeyFactory])) (defprotocol Algo (algo [this])) (extend-protocol Algo org.bouncycas...
null
https://raw.githubusercontent.com/babashka/pod-babashka-buddy/f548e63d8ef1e2414dbdaaa3b4f8ea9d306bc069/src/pod/babashka/buddy/key_utils.clj
clojure
(ns pod.babashka.buddy.key-utils (:import [java.security KeyFactory PrivateKey PublicKey] [java.security.spec X509EncodedKeySpec PKCS8EncodedKeySpec] [org.bouncycastle.crypto.util PrivateKeyFactory PublicKeyFactory])) (defprotocol Algo (algo [this])) (extend-protocol Algo org.bouncycas...
e58bc30d05d9425f862d30666790ea1f05f05bccaae70572dce40b8918751f7e
rowangithub/DOrder
cgr1.ml
let rec loop x y = if (Random.int 100 > 1) then loop (x+2) (y+2) else assert (x <> 4 || y <> 0) let main x y = if (0 <= x && x <= 2 && 0 <= y && y <= 2) then loop x y else () let _ = main 0 2 let _ = main 2 0 let _ = main 4 0 let _ = main 0 4 let _ = main (-1) (-1)
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/ice/cgr1.ml
ocaml
let rec loop x y = if (Random.int 100 > 1) then loop (x+2) (y+2) else assert (x <> 4 || y <> 0) let main x y = if (0 <= x && x <= 2 && 0 <= y && y <= 2) then loop x y else () let _ = main 0 2 let _ = main 2 0 let _ = main 4 0 let _ = main 0 4 let _ = main (-1) (-1)
0c5506579fe7b4e0640a513ecb863e9cf843f30c682e791f874e4ec9c565394a
tezos/tezos-mirror
test_reveal.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/195315d385d7e8e25fc599e7cb645b1429957183/src/lib_scoru_wasm/test/test_reveal.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
c6e2a358036e5154c76a1c48e3011c75c5f4bbe8fd4e0208fe2d01da7d4e7bef
macchiato-framework/macchiato-template
core_test.cljs
(ns {{project-ns}}.core-test (:require [pjstadig.humane-test-output] [cljs.test :refer-macros [is are deftest testing use-fixtures]] [{{project-ns}}.core])) (deftest test-core (is (= true true)))
null
https://raw.githubusercontent.com/macchiato-framework/macchiato-template/fff6f0cc640b43933d1e94c85a0b393e89cbe14d/resources/leiningen/new/macchiato/test/core_test.cljs
clojure
(ns {{project-ns}}.core-test (:require [pjstadig.humane-test-output] [cljs.test :refer-macros [is are deftest testing use-fixtures]] [{{project-ns}}.core])) (deftest test-core (is (= true true)))
1991cccf1c3a4aac6a9bd641d42404de923c10a69ae181528f8e7ee59e7975a5
christiankissig/ocaml99
problem85.ml
(*# P85 (**) Graph isomorphism # # Two graphs G1(N1,E1) and G2(N2,E2) are isomorphic if there is a bijection f: # N1 -> N2 such that for any nodes X,Y of N1, X and Y are adjacent if and only # if f(X) and f(Y) are adjacent. # # Write a predicate that determines whether two graphs are isomorphic. Hint: Use # an open-e...
null
https://raw.githubusercontent.com/christiankissig/ocaml99/c25f1790f695f9dd68b23abb472dc7c860d840f8/problem85.ml
ocaml
# P85 (*
# # Two graphs G1(N1,E1) and G2(N2,E2) are isomorphic if there is a bijection f: # N1 -> N2 such that for any nodes X,Y of N1, X and Y are adjacent if and only # if f(X) and f(Y) are adjacent. # # Write a predicate that determines whether two graphs are isomorphic. Hint: Use # an open-ended list to represent the func...
2c070ecc0373a83e2576d2da7335ee711d3f98774c665e0791426dda7fa42af5
paurkedal/batyr
user.ml
Copyright ( C ) 2022 < > * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later version . * * This p...
null
https://raw.githubusercontent.com/paurkedal/batyr/814791b6ce6476b79ecddc12b7d28fa4d23dc591/rockettime/lib/user.ml
ocaml
"... may return a null user". An example under "Private chat" suggests that * the null user is { "_id": null, "username": null }.
Copyright ( C ) 2022 < > * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later version . * * This p...
ab7be41ab89dc4a92c00d62ee402a32d0696dea2f60abb4ff006f5c6dc1dcf10
SamB/coq
inv.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/tactics/inv.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i $Id$ i i i
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open ...
998fe2af94aab89fffd2041da97bfb4ae59e33cc1e11f3360b32327e1d5534d3
FBoisson/Camllight
frx_entry.ml
#open "tk";; let version = "$Id: frx_entry.ml,v 1.3 1996/05/24 15:21:43 rouaix Exp $" ;; (* * Tk 4.0 has emacs bindings for entry widgets *) let new_label_entry parent txt action = let f = frame__create parent [] in let m = label__create f [Text txt] and e = entry__create f [Relief Sunken; TextWidth 20] in ...
null
https://raw.githubusercontent.com/FBoisson/Camllight/2e6d5ec31f93ec53d11232b7b2498adc719a8b13/contrib/camltk4/frx/frx_entry.ml
ocaml
* Tk 4.0 has emacs bindings for entry widgets
#open "tk";; let version = "$Id: frx_entry.ml,v 1.3 1996/05/24 15:21:43 rouaix Exp $" ;; let new_label_entry parent txt action = let f = frame__create parent [] in let m = label__create f [Text txt] and e = entry__create f [Relief Sunken; TextWidth 20] in tk__bind e [[], KeyPressDetail "Return"] (Bi...
ec386d86fa5ee13fe4cfc8ff52530fe645bc4cdfa1aaf6e1b9dfa0bfdef1944b
SleepyBag/leetcode-racket
149.rkt
(define (max-points points) (let cnt ([lst (apply append (for/list ([p points]) (for/list ( [q points] #:when (not (eq? p q))) (let* ([px (car p)] [py (...
null
https://raw.githubusercontent.com/SleepyBag/leetcode-racket/cdd0bff20209d6f9e04fd315dfe2927659952c83/149.rkt
racket
(define (max-points points) (let cnt ([lst (apply append (for/list ([p points]) (for/list ( [q points] #:when (not (eq? p q))) (let* ([px (car p)] [py (...
5bdcecadbefc9c1f098488d844b2b3957ed19f0aef385ff9a9ab99a47e0b6e4f
conreality/conreality
check_measures.ml
(* This is free and unencumbered software released into the public domain. *) open Check_common open Consensus.Measures (* Measures.Length *) module Length_test = struct let value = Length (1., meter) TODO end (* Measures.Mass *) module Mass_test = struct let value = Mass (1., kilogram) TODO end (* Meas...
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/test/consensus/check_measures.ml
ocaml
This is free and unencumbered software released into the public domain. Measures.Length Measures.Mass Measures.Time Measures.Current Measures.Temperature Test suite definition
open Check_common open Consensus.Measures module Length_test = struct let value = Length (1., meter) TODO end module Mass_test = struct let value = Mass (1., kilogram) TODO end module Time_test = struct let value = Time (1., second) TODO end module Current_test = struct let value = Current (1....
a988def6020250493de86bba685d54d3aad4a66801d92848aa682f5fd2c6ba3e
JohnnyJayJay/slash
core_test.clj
(ns slash.core-test (:require [clojure.test :refer :all] [slash.core :refer :all])) (def handlers {:ping (constantly :ping) :application-command (constantly :cmd) :message-component (constantly :cmp) :application-command-autocomplete (constantly :ac)}) (deftest routing-test (testing "Intera...
null
https://raw.githubusercontent.com/JohnnyJayJay/slash/5375702aa9e321e01721b38cda7bc496a1508159/test/slash/core_test.clj
clojure
(ns slash.core-test (:require [clojure.test :refer :all] [slash.core :refer :all])) (def handlers {:ping (constantly :ping) :application-command (constantly :cmd) :message-component (constantly :cmp) :application-command-autocomplete (constantly :ac)}) (deftest routing-test (testing "Intera...
24cde92b8e52628248625d0ecf6a18d9e3ff127aecf363df4595fbf2e759241d
xapi-project/xen-api
rrd2csv.ml
* Copyright ( C ) 2013 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 described in fi...
null
https://raw.githubusercontent.com/xapi-project/xen-api/6c2aadbb44166b389a3bd956c8a6af5787003d68/ocaml/rrd2csv/src/rrd2csv.ml
ocaml
Options Output helper functions Options execute f within an active session Returns true if d "passes" the filter f, i.e. if fields of d match the non-null fields of f Basic XML representation Xport.t structure XXX: remove when merging entries: Ds_selector.t list; XML converting operations func...
* Copyright ( C ) 2013 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 described in fi...
75820f41fd5dad1353ad61774215b090f93c1b87ef7666817461ea9f85d2bf07
jlouis/graphql-erlang
graphql_schema_canonicalize.erl
-module(graphql_schema_canonicalize). -include("graphql_schema.hrl"). -export([x/1]). -spec x(any()) -> any(). x({root, Root}) -> Q = root_query(Root), M = root_mutation(Root), S = root_subscription(Root), IFs = root_interfaces(Root), #root_schema { query = Q, mutation = M, ...
null
https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/src/graphql_schema_canonicalize.erl
erlang
-- ROOT ------------- -- FIELDS ---------- these functions are currently identical -- Directives -- Deprecation -- directive locations
-module(graphql_schema_canonicalize). -include("graphql_schema.hrl"). -export([x/1]). -spec x(any()) -> any(). x({root, Root}) -> Q = root_query(Root), M = root_mutation(Root), S = root_subscription(Root), IFs = root_interfaces(Root), #root_schema { query = Q, mutation = M, ...