_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
5371bc5ef6ff0f344bde0ec7ec4b59749236207749cc4daaae8eeca1cc1beda0
esl/erlang-web
e_dict.erl
The contents of this file are subject to the Erlang Web Public License , Version 1.0 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the Erlang Web Public License along with this software . If not , it can be %% retrieved via the world...
null
https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/eptic-1.4.1/src/e_dict.erl
erlang
compliance with the License. You should have received a copy of the retrieved via the world wide web at -consulting.com/. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ---------------------------------...
The contents of this file are subject to the Erlang Web Public License , Version 1.0 , ( the " License " ) ; you may not use this file except in Erlang Web Public License along with this software . If not , it can be Software distributed under the License is distributed on an " AS IS " The Initial Developer o...
c4823128b16bd89e749f026afa8b7840f12d5f6fc21d75b3170b76c03794b74b
PESchoenberg/g2q
example10.scm
#! /usr/local/bin/guile -s !# ;; ============================================================================= ;; ;; example10.scm ;; ;; This program shows how to use functions from module g2q3 to easily create ;; QASM2 programs with multiple QPU calls and measurements. ;; ;; =========================================...
null
https://raw.githubusercontent.com/PESchoenberg/g2q/8b971d9e5073ab9f1ccd1b7bbce07e95eb4fefee/examples/example10.scm
scheme
============================================================================= example10.scm This program shows how to use functions from module g2q3 to easily create QASM2 programs with multiple QPU calls and measurements. ============================================================================= This p...
#! /usr/local/bin/guile -s !# Copyright ( C ) 2018 - 2022 Pablo Edronkin ( pablo.edronkin at yahoo.com ) the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU Lesser General Public License (use-modules (g2q g2q0) (g2q g2q1) (g2q g2q2) ...
dad3f2da64f88734836ff5ac2ff112ac6e89a46b09be4dce9d37cc47e1235fc0
nasa/Common-Metadata-Repository
geotiff.clj
(ns ^:system cmr.opendap.tests.system.app.sizing.geotiff "Note: this namespace is exclusively for system tests; all tests defined here will use one or more system test fixtures. Definition used for system tests: * #System_testing" (:require [clojure.string :as string] [clojure.test :refer :all] [...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/service-bridge/test/cmr/opendap/tests/system/app/sizing/geotiff.clj
clojure
all tests defined
(ns ^:system cmr.opendap.tests.system.app.sizing.geotiff here will use one or more system test fixtures. Definition used for system tests: * #System_testing" (:require [clojure.string :as string] [clojure.test :refer :all] [cmr.http.kit.request :as request] [cmr.opendap.testing.system :as test-...
209eb6f25bae2855f6e360c1c7b925d9c5244eb704dc0152fe7977946404bd35
ucsd-progsys/dsolve
heap.ml
(**************************************************************************) (* *) Copyright ( C ) (* *) (* This software is free software;...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/run/heap.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking Heaps are encoded as complete binary trees , i.e. , binary trees which are full expect , may be , on the bot...
176d05b40ee32e83ec8f57dee7681ed44c23e4d71d6df32ca162dc8f80501705
futurice/haskell-mega-repo
Identifier.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | Copyright : ( c ) 2015 Futurice Oy -- License : BSD3 Maintainer : < > module PlanMill.Types.Identifier ( Iden...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/e301c08c8dfdcca048fe82fecce6bb2d02e9558a/planmill-client/src/PlanMill/Types/Identifier.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # | License : BSD3 | Tagged identifier | Identities with identifier.
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # Copyright : ( c ) 2015 Futurice Oy Maintainer : < > module PlanMill.Types.Identifier ( Identifier(..), HasIdentifier(..), IdentifierToHtml(..), ) where import Data.Aeson.Types (FromJSONKey (..), ToJSONKey (..), contr...
5e7131ad1b34cab7a3d90a6b18a4567c55bd0a8207a128b5e05c85339970a852
RedlineResearch/floorplan
Internal.hs
| Module : Language . Rust . Pretty . Internal Description : Rust pretty printer Copyright : ( c ) , 2017 - 2018 License : BSD - style Maintainer : Stability : experimental Portability : portable The pretty printing facilities in this file are re - exported to ' Language . Rust . ...
null
https://raw.githubusercontent.com/RedlineResearch/floorplan/dbaa7e6649eed18707ff8a27ee3c33fa83b47fcf/src/Language/Rust/Pretty/Internal.hs
haskell
# OPTIONS_HADDOCK hide, not-home # # LANGUAGE OverloadedStrings # * Pretty printers As much as possible, these functions should say which function in the @rustc@ printer they are emulating. ** Top level ** General ** Paths ** Attributes ** Literals ** Expressions ** Types and lifetimes ** Patterns ** Statem...
| Module : Language . Rust . Pretty . Internal Description : Rust pretty printer Copyright : ( c ) , 2017 - 2018 License : BSD - style Maintainer : Stability : experimental Portability : portable The pretty printing facilities in this file are re - exported to ' Language . Rust . ...
9b7a9d7cc0d64b1702716d58f7dfa2cf8dc10624a68d45c6c5efd00be5b5af41
spectrum-finance/cardano-dex-backend
LoggingGen.hs
module Gen.LoggingGen where import Control.Monad.IO.Class ( MonadIO (liftIO) ) import Control.Monad ( void ) import System.Logging.Hlog ( MakeLogging (..), Logging (..), Loggable (..) ) mkMakeLogging :: MonadIO f => MakeLogging f f mkMakeLogging = MakeLogging (const mkLogging) mkLogging :: MonadIO f => f (...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/69d3ee06b33c966c2d21281214252c1fd2e77325/amm-executor/test/Gen/LoggingGen.hs
haskell
module Gen.LoggingGen where import Control.Monad.IO.Class ( MonadIO (liftIO) ) import Control.Monad ( void ) import System.Logging.Hlog ( MakeLogging (..), Logging (..), Loggable (..) ) mkMakeLogging :: MonadIO f => MakeLogging f f mkMakeLogging = MakeLogging (const mkLogging) mkLogging :: MonadIO f => f (...
7360e5aae8b3c227bb939293e1aaf87aacf41058b0b404fa18a66b715cc0e1b5
ghcjs/ghcjs-boot
Functions.hs
{-# LANGUAGE Safe #-} -- This module deliberately declares orphan instances: # OPTIONS_GHC -fno - warn - orphans # ----------------------------------------------------------------------------- -- | -- Module : Text.Show.Functions Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Text/Show/Functions.hs
haskell
# LANGUAGE Safe # This module deliberately declares orphan instances: --------------------------------------------------------------------------- | Module : Text.Show.Functions License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable...
# OPTIONS_GHC -fno - warn - orphans # Copyright : ( c ) The University of Glasgow 2001 > showsPrec _ _ = " module Text.Show.Functions () where instance Show (a -> b) where showsPrec _ _ = showString "<function>"
4b2a8d51b5618a5fc48ec21c4f3b8874caecb35505da814b8c4d2431eea47bd1
redbadger/karma-tracker
commands.clj
(ns karma-tracker.commands (:require [environ.core :refer [env]] [karma-tracker.api.core :as api] [karma-tracker.update :refer [update-events]])) (defmulti execute (fn [_ [command] & args] command)) (defmethod execute :default [_ command] (throw (ex-info "Command not implemented" {:c...
null
https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/src/karma_tracker/commands.clj
clojure
(ns karma-tracker.commands (:require [environ.core :refer [env]] [karma-tracker.api.core :as api] [karma-tracker.update :refer [update-events]])) (defmulti execute (fn [_ [command] & args] command)) (defmethod execute :default [_ command] (throw (ex-info "Command not implemented" {:c...
8abf9779b4885b31629acfa699d9267b949b53709b7a49112b38d9d0344b6e00
taktoa/hsdm
HSDM.hs
# LANGUAGE DeriveGeneric # # LANGUAGE ViewPatterns # module System.HSDM where import Control.Concurrent --import Control.Concurrent.MVar --import Control.Exception.Lens --import Control.Lens import Control.Monad import Control.Monad.Catch import ...
null
https://raw.githubusercontent.com/taktoa/hsdm/e088ddbd20da76ac40450ae4cca9b1f87d042c58/haskell/src/System/HSDM.hs
haskell
import Control.Concurrent.MVar import Control.Exception.Lens import Control.Lens import Graphics.X11.Xlib import System.Process ( _, _, _, ph) <- createProcess $ shell "id" code <- waitForProcess ph result <- takeMVar mutex if result then looper f pid mutex else err...
# LANGUAGE DeriveGeneric # # LANGUAGE ViewPatterns # module System.HSDM where import Control.Concurrent import Control.Monad import Control.Monad.Catch import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as LBSC import Data.Monoid import Foreign....
64619ad0c14362bfc1ad201dccd8816df34532f27e9949a7ae87cd34d0ba04fd
mbutterick/beautiful-racket
expr.rkt
#lang br (provide b-sum b-expr) (define (b-sum . vals) (apply + vals)) (define (b-expr expr) (if (integer? expr) (inexact->exact expr) expr))
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-2a/expr.rkt
racket
#lang br (provide b-sum b-expr) (define (b-sum . vals) (apply + vals)) (define (b-expr expr) (if (integer? expr) (inexact->exact expr) expr))
9327518d13863995fd6476b7df25cfef55a4d86063347988e6dcd07c3f8f102b
jeapostrophe/racket-android
devices.rkt
#lang racket/base (define PIXEL-W 2560) (define PIXEL-H 1688) (define NEXUS-10-W 2560) (define NEXUS-10-H 1504) (provide (all-defined-out))
null
https://raw.githubusercontent.com/jeapostrophe/racket-android/fd2c14ff6c292f62902e7577615c4b4278923fb5/rkt/devices.rkt
racket
#lang racket/base (define PIXEL-W 2560) (define PIXEL-H 1688) (define NEXUS-10-W 2560) (define NEXUS-10-H 1504) (provide (all-defined-out))
a6279f7472bb2148dadd603a155d50f61e3fbc89a077ecdd42a97d06612f1513
djs55/ocaml-fd-send-recv
myocamlbuild.ml
OASIS_START DO NOT EDIT ( digest : 6c6c0b77fd2ecae21cd2e4a5e68756f3 ) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else fmt2^^"" l...
null
https://raw.githubusercontent.com/djs55/ocaml-fd-send-recv/f05e338db2b425710566482112c8c45ec2c7df06/myocamlbuild.ml
ocaml
Start with a _ if digit ocamlfind command This lists all supported packages. Mock to list available syntaxes. By using Before_options one let command line options have an higher * priority on the contrary using After_options will guarantee to have * the higher priority override default comman...
OASIS_START DO NOT EDIT ( digest : 6c6c0b77fd2ecae21cd2e4a5e68756f3 ) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else fmt2^^"" l...
1254cf674fb43e466c1e0da09ea356160ee3ba15292c535096ec7836e9161955
inaka/lsl
lsl.erl
%%% @doc Main Application Module -module(lsl). -author(''). -behaviour(application). -export([ start/0 , stop/0 , start/2 , start_phase/3 , stop/1 ]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Start / Stop %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
null
https://raw.githubusercontent.com/inaka/lsl/fdb5690fa51bc2f7fe8b50a22caca78fd9d8a7a5/src/core/lsl.erl
erlang
@doc Main Application Module @doc Starts the Application @doc Stops the Application Behaviour Callbacks
-module(lsl). -author(''). -behaviour(application). -export([ start/0 , stop/0 , start/2 , start_phase/3 , stop/1 ]). Start / Stop -spec start() -> {ok, [atom()]} | {error, term()}. start() -> application:ensure_all_started(?MODULE). -spec stop() -> ok | {error, term()}. st...
98a15b6720d30bdfd1cc4a92318c27cde77f358c33a35e6d9fef7939493e0085
JeffreyBenjaminBrown/digraphs-with-text
levels.hs
module Experim where import Control.Monad (void) import Text.Megaparsec import Text.Megaparsec.Expr import Text.Megaparsec.String -- input stream is of type ‘String’ import qualified Text.Megaparsec.Lexer as L import Data.Maybe Goal : transform from a statement ( see the-hash-language....
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/digraphs-with-text/34e47a52aa9abb6fd42028deba1623a92e278aae/Hash/levels.hs
haskell
input stream is of type ‘String’ "bob #needs #someday cabbage" is invalid: either a member should be specified between needs and someday, or they should be part of the same rel-word (like "bob #needs-someday cabbage") to write nothing is to express nothing somehow this is an intermediate type the maybe is the rel,...
module Experim where import Control.Monad (void) import Text.Megaparsec import Text.Megaparsec.Expr import qualified Text.Megaparsec.Lexer as L import Data.Maybe Goal : transform from a statement ( see the-hash-language.md ) to an Expr data Expr = ExprAtom String | Expr {...
9a7f85d5fd805a458573bb5ad4fce564a2620f652dcce00cebd7ca221a5b17e7
richmit/mjrcalc
use-cmp.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file use-cmp.lisp @author < > ;; @brief Floating...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/use-cmp.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file use-cmp.lisp @brief Floating point comparison: best guess.@EOL @std Common Lisp @see tst-cmp.lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided...
@author < > @parblock Copyright ( c ) 1996,1997,2008,2013,2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyrigh...
1b91e5bf3ccd0f50a4e888acf74d98c7ea372f57a804243e6b331a501f7b0f19
serokell/ariadne
Settings.hs
module Ariadne.UI.Qt.Widgets.Dialogs.Settings ( Settings , initSettings , showSettingsWindow ) where import Control.Lens (makeLensesWith) import Data.Version (showVersion) import Web.Browser (openBrowser) import Graphics.UI.Qtah.Signal (connect_) import Graphics.UI.Qtah.Widgets.QSizePolicy (QSizePolic...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ui/qt-lib/src/Ariadne/UI/Qt/Widgets/Dialogs/Settings.hs
haskell
module Ariadne.UI.Qt.Widgets.Dialogs.Settings ( Settings , initSettings , showSettingsWindow ) where import Control.Lens (makeLensesWith) import Data.Version (showVersion) import Web.Browser (openBrowser) import Graphics.UI.Qtah.Signal (connect_) import Graphics.UI.Qtah.Widgets.QSizePolicy (QSizePolic...
1b609d3a839b172dd7808aa9d072d1e6cea982a0a1e2957ad0309d0b52b46abf
ocaml/odoc
codefmt.ml
open! Compat open Types type out = Source.t module State = struct type t = { context : (out * Source.tag) Stack.t; mutable current : out; mutable ignore_all : int; } let create () = { context = Stack.create (); current = []; ignore_all = 0 } let push state elt = if state.ignore_all = 0 then ...
null
https://raw.githubusercontent.com/ocaml/odoc/a684fc0ae9a077de872fbe694f6ed4bdf42f5062/src/document/codefmt.ml
ocaml
open! Compat open Types type out = Source.t module State = struct type t = { context : (out * Source.tag) Stack.t; mutable current : out; mutable ignore_all : int; } let create () = { context = Stack.create (); current = []; ignore_all = 0 } let push state elt = if state.ignore_all = 0 then ...
06e879abb96d15d1d79587b18efdedf4cc876b5452fb37a60e61c67c5a268a3a
iskandr/parakeet-retired
FnTable.ml
(* pp: -parser o pa_macro.cmo *) open Base type t = { fundefs: (FnId.t, TypedSSA.fn) Hashtbl.t; unoptimized_queue : FnId.t Queue.t; arities : (FnId.t, int) Hashtbl.t; } let add ?(opt_queue=true) fundef (cache:t) = let id = fundef.TypedSSA.fn_id in Hashtbl.add cache.fundefs id fundef; let arity = TypedSSA...
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/SSA/FnTable.ml
ocaml
pp: -parser o pa_macro.cmo
open Base type t = { fundefs: (FnId.t, TypedSSA.fn) Hashtbl.t; unoptimized_queue : FnId.t Queue.t; arities : (FnId.t, int) Hashtbl.t; } let add ?(opt_queue=true) fundef (cache:t) = let id = fundef.TypedSSA.fn_id in Hashtbl.add cache.fundefs id fundef; let arity = TypedSSA.input_arity fundef in Hashtbl....
2b63054e1c09f1466e1e252169062fdd1e51eb6ebcb3a44228fbd9e409265e8c
eschulte/curry-compose-reader-macros
curry-compose-reader-macros.lisp
;;; curry-compose-reader-macros --- partial application and composition Copyright ( C ) 2013 ;; Placed in the public domain. ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT ;; LIMITED TO, THE IMPLIED WARRANTIES OF MERC...
null
https://raw.githubusercontent.com/eschulte/curry-compose-reader-macros/242d91ca601aae1b27fac7a109b8320348338320/curry-compose-reader-macros.lisp
lisp
curry-compose-reader-macros --- partial application and composition Placed in the public domain. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SERVICES; LOSS OF US...
Copyright ( C ) 2013 " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR HOWEVER CAUSED AND ON ANY THEORY OF...
5b4437a6403953cd5eba6bd80198eb315cb66e406e5714efdd2cc506e5cec917
SahilKang/cl-avro
string.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro 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. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/test/primitive/string.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t...
Copyright 2021 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro/test/string (:use #:cl #:1am) (:l...
81e8e75bc1985bb627321f06da147ad5f94f02efba46fe2a8c629149d023fa53
WormBase/wormbase_rest
gene_cluster.clj
(ns rest-api.classes.gene-cluster (:require [rest-api.classes.gene-cluster.widgets.overview :as overview] [rest-api.classes.gene-cluster.widgets.references :as references] [rest-api.classes.graphview.widget :as graphview] [rest-api.routing :as routing])) (routing/defroutes {:entity-ns "gene-cluster...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/gene_cluster.clj
clojure
(ns rest-api.classes.gene-cluster (:require [rest-api.classes.gene-cluster.widgets.overview :as overview] [rest-api.classes.gene-cluster.widgets.references :as references] [rest-api.classes.graphview.widget :as graphview] [rest-api.routing :as routing])) (routing/defroutes {:entity-ns "gene-cluster...
8341e13e2c1fbbb42217bdc483bda63a7f470916993e93b78cc9b7126f4e00be
kowainik/typerep-map
CMap.hs
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver # {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module CMap ( spec ) where import Prelude hiding (lookup) import Cr...
null
https://raw.githubusercontent.com/kowainik/typerep-map/901820103363cfa41bc334f6764c0c2b7d624f65/benchmark/CMap.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies #
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module CMap ( spec ) where import Prelude hiding (lookup) import Criterion.Main (bench, env, nf, whnf) import Data.Kind (Type) import Data.Maybe (fromJust) import Data.Proxy (Proxy ...
682510df7d3e51034d19ede08bcbf3635403ff782885b1f43895f91bf46f1e78
sweet-tooth-clojure/endpoint
middleware_test.clj
(ns sweet-tooth.endpoint.module.middleware-test (:require [clojure.test :refer [deftest is]] [duct.core :as duct] [duct.middleware.buddy :as dbuddy] [integrant.core :as ig] [sweet-tooth.endpoint.middleware :as em] [sweet-tooth.endpoint.handler :as eh])) (du...
null
https://raw.githubusercontent.com/sweet-tooth-clojure/endpoint/c1a9b0aa26ac854567316a94235b7bc6d4c30b91/test/sweet_tooth/endpoint/module/middleware_test.clj
clojure
(ns sweet-tooth.endpoint.module.middleware-test (:require [clojure.test :refer [deftest is]] [duct.core :as duct] [duct.middleware.buddy :as dbuddy] [integrant.core :as ig] [sweet-tooth.endpoint.middleware :as em] [sweet-tooth.endpoint.handler :as eh])) (du...
299c41e1ab141af6a9ed55e0356c21a2c73445081f16d26134df1ad007fc6aec
pgj/mirage-kfreebsd
client.ml
* Copyright ( c ) 2006 - 2011 Anil Madhavapeddy < > * * 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 PROVID...
null
https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/dhcp/client.ml
ocaml
Send a client broadcast packet Receive a DHCP UDP packet For debugging, print out the DHCP response we are expecting an offer we are expecting an ACK Start a DHCP discovery off on an interface DHCP state thred For now, just send out regular discoveries until we have a lease TODO: This should be looking...
* Copyright ( c ) 2006 - 2011 Anil Madhavapeddy < > * * 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 PROVID...
5bf66de416e6f952dc5566658e49f4378c710fa9b58c6a3bd08ff3728742cb37
clj-kondo/clj-kondo
string.clj
(ns ^{:no-doc true} clj-kondo.impl.rewrite-clj.node.string (:require [clj-kondo.impl.rewrite-clj.node.protocols :as node] [clj-kondo.impl.toolsreader.v1v2v2.clojure.tools.reader.edn :as edn] [clojure.string :as string])) ;; ## Node (defn- wrap-string [s] (format "\"%s\"" s)) (defn- join...
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/a87ce1ec9147416c34cf5395ddf5baadc87f77db/parser/clj_kondo/impl/rewrite_clj/node/string.clj
clojure
## Node
(ns ^{:no-doc true} clj-kondo.impl.rewrite-clj.node.string (:require [clj-kondo.impl.rewrite-clj.node.protocols :as node] [clj-kondo.impl.toolsreader.v1v2v2.clojure.tools.reader.edn :as edn] [clojure.string :as string])) (defn- wrap-string [s] (format "\"%s\"" s)) (defn- join-lines [l...
8adba9bf62a77404457ca0ceccfeec8912c4c58c023bcd930d4fae9399f2b201
Shimuuar/histogram-fill
Cereal.hs
# LANGUAGE ScopedTypeVariables # module Test.Cereal ( tests ) where import Data.Typeable import Data.Serialize import Test.QuickCheck import Test.Tasty (TestTree,testGroup) import Test.Tasty.QuickCheck (testProperty) import Data.Histogram import Data.Histogram.Bin.MaybeBin import Data.Histogram.QuickChe...
null
https://raw.githubusercontent.com/Shimuuar/histogram-fill/3dff15027390cf64e7fc3fbaac34c28ffcdacbd6/histogram-fill-tests/Test/Cereal.hs
haskell
# LANGUAGE ScopedTypeVariables # module Test.Cereal ( tests ) where import Data.Typeable import Data.Serialize import Test.QuickCheck import Test.Tasty (TestTree,testGroup) import Test.Tasty.QuickCheck (testProperty) import Data.Histogram import Data.Histogram.Bin.MaybeBin import Data.Histogram.QuickChe...
541bae1f62773d0c48804c336d74c40f53e30e5794ad79ea545a5d47e7bee8e5
Bluehouse-Technology/grpc
h2_SUITE.erl
-module(h2_SUITE). -include_lib("common_test/include/ct.hrl"). -compile(export_all). %%-------------------------------------------------------------------- %% Run tests via erlang.mk: %% $> make ct %% or: %% $> make SKIP_DEPS=1 ct %% %% To run only this suite: %% $> make SKIP_DEPS=1 ct-h2 %% These tests assume that...
null
https://raw.githubusercontent.com/Bluehouse-Technology/grpc/cdb7ab70c57e248d474369d6b3c5de77151f52f7/test/h2_SUITE.erl
erlang
-------------------------------------------------------------------- Run tests via erlang.mk: $> make ct or: $> make SKIP_DEPS=1 ct To run only this suite: $> make SKIP_DEPS=1 ct-h2 The go module in test/golang/server.go can be used for this: $> go run server.go ----------------------------------------------...
-module(h2_SUITE). -include_lib("common_test/include/ct.hrl"). -compile(export_all). These tests assume that an HTTP/2 server is running on port 10000 . -define(BVM_TRAIL, "Berkshire Valley Management Area Trail, Jefferson, NJ, USA"). -define(BVM_TRAIL_POINT, #{latitude => 409146138, long...
e5da6f5e49d25f206512f1cf51f6f0205425119342d6c9e6df0a2470c32f8f20
kubernetes-client/haskell
Core.hs
Kubernetes No description provided ( generated by Openapi Generator -generator ) OpenAPI Version : 3.0.1 Kubernetes API version : release-1.20 Generated by OpenAPI Generator ( -generator.tech ) Kubernetes No description provided (generated by Openapi Generator -generator) OpenAPI...
null
https://raw.githubusercontent.com/kubernetes-client/haskell/edfb4744a40be1d6a4b9d4a7d060069f2367884a/kubernetes/lib/Kubernetes/OpenAPI/API/Core.hs
haskell
| Module : Kubernetes.OpenAPI.API.Core # LANGUAGE OverloadedStrings # * Operations ** Core *** getAPIVersions | @GET \/api\/@ get available API versions | @application/json@ | @application/vnd.kubernetes.protobuf@ | @application/yaml@
Kubernetes No description provided ( generated by Openapi Generator -generator ) OpenAPI Version : 3.0.1 Kubernetes API version : release-1.20 Generated by OpenAPI Generator ( -generator.tech ) Kubernetes No description provided (generated by Openapi Generator -generator) OpenAPI...
0a2c3492e37d3fdf44b1cb2d9cb79c38f79db440e28fa3a875428dca06cd7b5c
mirage/mirage-logs
mirage_logs.mli
Copyright ( C ) 2016 , < > See the README file for details . See the README file for details. *) * MirageOS support for the Logs library . To use this reporter , add a call to [ run ] at the start of your program : { [ module . Make(PClock ) let start ( ) = ( S...
null
https://raw.githubusercontent.com/mirage/mirage-logs/73a19bf55f81be048189b14cd66d89246a6c12c9/src/mirage_logs.mli
ocaml
* A function that gives a threshold level for a given log source. Only messages at or above the returned level will be processed. * [run t fn] installs the reporter [t] as the current [Logs] reporter and runs [fn ()]. If [t] has a ring buffer and [fn] returns an error then the contents of the ri...
Copyright ( C ) 2016 , < > See the README file for details . See the README file for details. *) * MirageOS support for the Logs library . To use this reporter , add a call to [ run ] at the start of your program : { [ module . Make(PClock ) let start ( ) = ( S...
9b2ae14c01543f7fc77b80cd98a08542d3990e509403db2e343e8f1ec6985a2d
Ptival/language-ocaml
Loc.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.Loc ( locPP, ) where import Language.OCaml.Definitions.Parsing.ASTTypes (Loc (txt)) import Prettyprinter (Doc, Pretty (pretty)) locPP :: (Pretty a) => Loc a -> Doc b locPP = pretty...
null
https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/Loc.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.Loc ( locPP, ) where import Language.OCaml.Definitions.Parsing.ASTTypes (Loc (txt)) import Prettyprinter (Doc, Pretty (pretty)) locPP :: (Pretty a) => Loc a -> Doc b locPP = pretty . txt instance Pretty a => Pretty...
08053abfa5e43cf7e3f3d1f52542dd2ad6eb5095bca91d6ab234f76f91884ac1
well-typed/large-records
R100.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif # LANGUAGE OverloadedLabels # {-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-} module Experiment.UpdateOne.Sized.R100 where import Da...
null
https://raw.githubusercontent.com/well-typed/large-records/cbeb9e710f297a2afd579b8d475e3734b80a9ccc/large-records-benchmarks/bench/large-anon/Experiment/UpdateOne/Sized/R100.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings # # OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif # LANGUAGE OverloadedLabels # module Experiment.UpdateOne.Sized.R100 where import Data.Record.Anon.Simple (Record) import qualified Data.Record.Anon.Simple as Anon import Bench.Types import Common.RowOfSize.Row100 updateOne :: Record ExampleRow -> Record Examp...
782cf5c3a67b1cf7b143ea6e92587d04db16093a2bcfebaee6f6a46afa711d2a
Carnap/Carnap
RenderFormulas.hs
# LANGUAGE FlexibleContexts # module Carnap.GHCJS.Action.RenderFormulas (renderFormulasAction) where import Lib import Data.Map as M import GHCJS.DOM.Element import GHCJS.DOM.HTMLElement (setInnerText, castToHTMLElement) import Control.Monad (mplus) import Text.Parsec import Carnap.Calculi.Tableau.Data import Carnap.C...
null
https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap-GHCJS/src/Carnap/GHCJS/Action/RenderFormulas.hs
haskell
# LANGUAGE FlexibleContexts # module Carnap.GHCJS.Action.RenderFormulas (renderFormulasAction) where import Lib import Data.Map as M import GHCJS.DOM.Element import GHCJS.DOM.HTMLElement (setInnerText, castToHTMLElement) import Control.Monad (mplus) import Text.Parsec import Carnap.Calculi.Tableau.Data import Carnap.C...
825e2781b61b66ed2e0c4a789ff7b406b44335eba5ca0c06da5c2d9a191c7d4c
Gadjib/ocamlhomeworks
p3.ml
open List;; type t2 = B of t2 list;; let rec main t = match t with |B [] -> print_string "B[]" |B (hd::tl) -> print_string "B["; main hd; print_string ";"; for i = 0 to (length tl)-1 do main (nth tl i) done; print_string "]" ;; let t = B [ B [B[];B[]];B[];B[]];; main t;; print_newline();;
null
https://raw.githubusercontent.com/Gadjib/ocamlhomeworks/d5568d4830d4306ea56749f17af355bc35001eff/8%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81/%D0%9A%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F%202019-04-27/p3.ml
ocaml
open List;; type t2 = B of t2 list;; let rec main t = match t with |B [] -> print_string "B[]" |B (hd::tl) -> print_string "B["; main hd; print_string ";"; for i = 0 to (length tl)-1 do main (nth tl i) done; print_string "]" ;; let t = B [ B [B[];B[]];B[];B[]];; main t;; print_newline();;
48a248ae2c4b0d1690b5d02c048659eb17fdcdec2bbc8f27271cb72cbad87d6b
bugczw/Introduction-to-Functional-Programming-in-OCaml
W5_S1.ml
UNRAVELING THE AUTOMATIC GRADER ( 60/60 points ) In this exercise , we will unveil the basics of the grading system . Note : This exercise is about exceptions , but it uses the unit type that is only presented in the next sequence . For each question , we call both your function and a reference function on ...
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W5_ALL/Exercise/W5_S1.ml
ocaml
UNRAVELING THE AUTOMATIC GRADER ( 60/60 points ) In this exercise , we will unveil the basics of the grading system . Note : This exercise is about exceptions , but it uses the unit type that is only presented in the next sequence . For each question , we call both your function and a reference function on ...
d9f9db29ba37fdea859d65c45148f54c4ea80a0c5320b595e48fe728eb4e8b1c
nandor/llir-ocaml
deadcode.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/nandor/llir-ocaml/9c019f15c444e30c825b1673cbe827e0497868fe/asmcomp/deadcode.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2014 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Mach module Int = Numbers.Int type d = { indexes of Iexit instructions " live before " [ i ] } ...
3f96bf109bdeb15b589824b7d0a4a62eb65b13b4818b8b6b9851547d04f625ef
BranchTaken/Hemlock
test_get_length_is_empty.ml
open! Basis.Rudiments open! Basis open Array let test () = let test_length arr = begin File.Fmt.stdout |> (pp Uns.pp) arr |> Fmt.fmt ": length=" |> Uns.pp (length arr) |> Fmt.fmt ", is_empty=" |> Bool.pp (is_empty arr) |> Fmt.fmt "\n" |> ignore end in test_length [||]; test_leng...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/array/test_get_length_is_empty.ml
ocaml
open! Basis.Rudiments open! Basis open Array let test () = let test_length arr = begin File.Fmt.stdout |> (pp Uns.pp) arr |> Fmt.fmt ": length=" |> Uns.pp (length arr) |> Fmt.fmt ", is_empty=" |> Bool.pp (is_empty arr) |> Fmt.fmt "\n" |> ignore end in test_length [||]; test_leng...
20592ae5f899dd711e6eec503b12fc2f89ba34068993deffad16e7f52d7798e8
ocaml-community/lambda-term
lTerm_key.mli
* lTerm_key.mli * ------------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * lTerm_key.mli * ------------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) (** Keys *) (** Type of k...
null
https://raw.githubusercontent.com/ocaml-community/lambda-term/8d323b24135a97e30f9a4d10baf93612dc871c1c/src/lTerm_key.mli
ocaml
* Keys * Type of key code. * A unicode character. * Type of key. * Is the control key down ? * Is the meta key down ? * Is the shift key down ? * The code of the key. * Same as [Pervasives.compare]. * Returns the string representation of the given key.
* lTerm_key.mli * ------------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * lTerm_key.mli * ------------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) type code = | Char of U...
0f506b8011c3e9e8da58990f4fb2f4d227ea919c8251940520350cebcb023396
semerdzhiev/fp-2020-21
higher-order.rkt
#lang racket ; Throwback: Последния път говорехме за рекурсия ( опашкова ) и видове рекурсивни ; процеси. : функциите в които са опашкови , генерират итеративен рекурсивен . Функциите , останали , можем да ги подаваме като функции . Такава функция , друга функция , наричаме функция от по...
null
https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-d/03/higher-order.rkt
racket
Throwback: процеси. Очаква се f да бъде функция и в тялото на binary-op я използваме като такава. Анонимна (ламбда) функции (lambda (<arg1> <arg2> .. <argn>) <body>) TODO примери
#lang racket Последния път говорехме за рекурсия ( опашкова ) и видове рекурсивни : функциите в които са опашкови , генерират итеративен рекурсивен . Функциите , останали , можем да ги подаваме като функции . Такава функция , друга функция , наричаме функция от по - висок ред . (define ...
2be1fa9497c5358bf0123c88d55564988ef85dcbdec625f63477cd7864347612
nvim-treesitter/nvim-treesitter
indents.scm
[ (entry) ] @indent [ "{" "}" ] @branch (comment) @ignore
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/bibtex/indents.scm
scheme
[ (entry) ] @indent [ "{" "}" ] @branch (comment) @ignore
75a923191cf447d9fb72433ceb172a79b134039a7574e62dc80d4b7f0939f08a
lemmaandrew/CodingBatHaskell
makeLast.hs
From Given an int array , return a new array with double the length where its last element is the same as the original array , and all the other elements are 0 . The original array will be length 1 or more . Note : by default , a new int array contains all 0 's . Given an int array, return a new array with d...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-1/makeLast.hs
haskell
From Given an int array , return a new array with double the length where its last element is the same as the original array , and all the other elements are 0 . The original array will be length 1 or more . Note : by default , a new int array contains all 0 's . Given an int array, return a new array with d...
931eaa224cd85a871abe8c2c5dbbf9f4be5b5051b9a4ea62b40873a1d49a26b2
janestreet/universe
join.mli
* A module internal to Incremental . Users should see { ! Incremental_intf } . An [ ' a Join.t ] is a type of DAG node . An ['a Join.t] is a type of DAG node. *) open! Core_kernel open! Import include module type of struct include Types.Join end include Invariant.S1 with type 'a t := 'a t include Sex...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/incremental/src/join.mli
ocaml
* A module internal to Incremental . Users should see { ! Incremental_intf } . An [ ' a Join.t ] is a type of DAG node . An ['a Join.t] is a type of DAG node. *) open! Core_kernel open! Import include module type of struct include Types.Join end include Invariant.S1 with type 'a t := 'a t include Sex...
0885f687f3d58d1c8fe9fd96bc3d40170e9bb67eeffa161659c9f62096402f59
g-andrade/quack
quic_frame_stream.erl
-module(quic_frame_stream). -include("quic_frame.hrl"). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([decode/5]). -export([encode/1]). %% ---------------------------------------------------...
null
https://raw.githubusercontent.com/g-andrade/quack/b6decb23674dd97f6918d8ac637ede2ef7bcc507/src/quic_frame_stream.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ API Function Definitions ------------------------------------------------------------------ ...
-module(quic_frame_stream). -include("quic_frame.hrl"). -export([decode/5]). -export([encode/1]). decode(Data, FinBit, DataLengthBit, OffsetHeaderEncoding, StreamIdEncoding) -> {ChunkA, StreamId} = quic_proto_varint:decode_u32(Data, StreamIdEncoding), {ChunkB, Offset} = quic_proto_varint:decode_u64(ChunkA,...
7b01cc9bbc0153acca87efbd746c012111579120bb0a5a0299ff14d80f03c799
samoht/camloo
printf.scm
;; Le module (module __caml_printf (import __caml_arg __caml_baltree __caml_char __caml_eq __caml_exc __caml_fchar __caml_filename __caml_float __caml_fstring __caml_fvect __caml_genlex __caml_hashtbl __caml_int __caml_io __caml_lexing __caml_list ...
null
https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/runtime/Llib.bootstrap/printf.scm
scheme
Le module Les variables globales Les expressions globales
(module __caml_printf (import __caml_arg __caml_baltree __caml_char __caml_eq __caml_exc __caml_fchar __caml_filename __caml_float __caml_fstring __caml_fvect __caml_genlex __caml_hashtbl __caml_int __caml_io __caml_lexing __caml_list __caml_map ...
909ce7d7d086ece3f9310aa1397f4d51e35fbae58ca60157bf7cab99dda92960
fpco/unliftio
Foreign.hs
# LANGUAGE CPP # -- | Unlifted "Foreign". -- @since 0.2.5.0 module UnliftIO.Foreign ( -- * Re-exported modules module Data.Bits , module Data.Int , module Data.Word , module Foreign.C.Types -- * Unlifted "Foreign.C.String" , CString , CStringLen , peekCString , peekCStringLen , newCString ...
null
https://raw.githubusercontent.com/fpco/unliftio/d7ac43b9ae69efea0ca911aa556852e9f95af128/unliftio/src/UnliftIO/Foreign.hs
haskell
| Unlifted "Foreign". * Re-exported modules * Unlifted "Foreign.C.String" * Unlifted "Foreign.C.Error" * Unlifted "Foreign.Ptr" * Unlifted "Foreign.ForeignPtr" * Unlifted "Foreign.StablePtr" * Unlifted "Foreign.Storable" * Unlifted "Foreign.Marshal.Alloc" * Unlifted "Foreign.Marshal.Array" * Unlifted "Forei...
# LANGUAGE CPP # @since 0.2.5.0 module UnliftIO.Foreign ( module Data.Bits , module Data.Int , module Data.Word , module Foreign.C.Types , CString , CStringLen , peekCString , peekCStringLen , newCString , newCStringLen , withCString , withCStringLen , charIsRepresentable , castCharToC...
74b6cc444da1aaf588408a46452831c6cdb7abb912fa0399fc6c5a2f9a13ff86
liquidz/jubot
memory_test.clj
(ns jubot.brain.memory-test (:require [com.stuartsierra.component :as component] [jubot.brain.memory :refer :all] [clojure.test :refer :all])) (def ^:private brain (map->MemoryBrain {})) (deftest test-MemoryBrain (testing "start brain" (let [brain (component/start brain)] (are [k] (con...
null
https://raw.githubusercontent.com/liquidz/jubot/0a2d7b18db801c3fe72f7ff216e8381df9b40815/test/jubot/brain/memory_test.clj
clojure
(ns jubot.brain.memory-test (:require [com.stuartsierra.component :as component] [jubot.brain.memory :refer :all] [clojure.test :refer :all])) (def ^:private brain (map->MemoryBrain {})) (deftest test-MemoryBrain (testing "start brain" (let [brain (component/start brain)] (are [k] (con...
463815574c805ee4ae2f63813178b7a7919d8e2cd9e5e9191f19cdab25840852
gowthamk/ocaml-irmin
canvas.ml
module Make = struct pixel is a record type which consist of parameters r , and b where all of them are of int32 type type pixel = {r: int32; g: int32; b: int32} (* default_pixel is a variable which represents the default pixel value *) let default_pixel = { r = Char.chr 255 ; g = Char.chr 255 ; b = Char.chr ...
null
https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/canvas/canvas.ml
ocaml
default_pixel is a variable which represents the default pixel value canvas is a record type ----- blank is a leaf node with default_pixel If the max_x and max_y is less than the loc where we want to set pixel then we return a leaf node with pixel px This is a recursive function top-left quadrant top-right...
module Make = struct pixel is a record type which consist of parameters r , and b where all of them are of int32 type type pixel = {r: int32; g: int32; b: int32} let default_pixel = { r = Char.chr 255 ; g = Char.chr 255 ; b = Char.chr * 255 } * 255}*) let default_pixel = {r= 0l; g= 0l; b= 0l} type t ...
b5f8eab69c74667e6a9427be1e29a8c1be6410b4fe8a5d58e965b5cab0b5187f
samply/blaze
statement.clj
(ns blaze.page-store.cassandra.statement (:import [com.datastax.oss.driver.api.core ConsistencyLevel DefaultConsistencyLevel] [com.datastax.oss.driver.api.core.cql SimpleStatement])) (set! *warn-on-reflection* true) (def get-statement "The get statement retrieves the content according to the `token`. ...
null
https://raw.githubusercontent.com/samply/blaze/d10c9b7c02bb4a4e4efa95579e4ad3b1f4110c5f/modules/page-store-cassandra/src/blaze/page_store/cassandra/statement.clj
clojure
(ns blaze.page-store.cassandra.statement (:import [com.datastax.oss.driver.api.core ConsistencyLevel DefaultConsistencyLevel] [com.datastax.oss.driver.api.core.cql SimpleStatement])) (set! *warn-on-reflection* true) (def get-statement "The get statement retrieves the content according to the `token`. ...
be7805e9729653e77d146217dd10b625b07e7c3fd65de0a52fbe3650f3e01ca1
nikodemus/SBCL
test-util.lisp
(defpackage :test-util (:use :cl :sb-ext) (:export #:with-test #:report-test-status #:*failures* #:really-invoke-debugger #:*break-on-failure* #:*break-on-expected-failure* #:make-kill-thread #:make-join-thread)) (in-package :test-util) (defvar *test-count* 0) (defvar *test-file* ...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/test-util.lisp
lisp
(defpackage :test-util (:use :cl :sb-ext) (:export #:with-test #:report-test-status #:*failures* #:really-invoke-debugger #:*break-on-failure* #:*break-on-expected-failure* #:make-kill-thread #:make-join-thread)) (in-package :test-util) (defvar *test-count* 0) (defvar *test-file* ...
666bacbe86a85cba4ab1a473bc52dbdec7da8b325fbdf146b00426b9eb00aa53
ocaml-sf/learn-ocaml-corpus
template.ml
let pairwise_distinct (lup, rup, llp, rlp) = "Replace this string with your implementation." ;; let wellformed (lup, rup, llp, rlp) = "Replace this string with your implementation." ;; let rotate_point (x, y) = "Replace this string with your implementation." ;; let reorder (p1, p2, p3, p4) = "Replace this st...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week2/seq1/ex1/template.ml
ocaml
let pairwise_distinct (lup, rup, llp, rlp) = "Replace this string with your implementation." ;; let wellformed (lup, rup, llp, rlp) = "Replace this string with your implementation." ;; let rotate_point (x, y) = "Replace this string with your implementation." ;; let reorder (p1, p2, p3, p4) = "Replace this st...
16c4084cd140c53c6902554504ae5613b4aa3c27e26270ec15794a5c1e69bfc4
8thlight/hyperion
sql_spec.clj
(ns hyperion.sql-spec (:require [speclj.core :refer :all] [hyperion.abstr :refer :all] [hyperion.api :refer :all] [hyperion.log :as log] [hyperion.sql :refer :all] [hyperion.sql.key :refer [compose-key]] [hyperion.sql.query-builder :refer [new-qu...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/sql/spec/hyperion/sql_spec.clj
clojure
(ns hyperion.sql-spec (:require [speclj.core :refer :all] [hyperion.abstr :refer :all] [hyperion.api :refer :all] [hyperion.log :as log] [hyperion.sql :refer :all] [hyperion.sql.key :refer [compose-key]] [hyperion.sql.query-builder :refer [new-qu...
419229e7cb2e457461ab0e548712b7755cebb215ee486d073236dc7b7811e9b4
ssor/erlangDemos
default_handler.erl
%% Feel free to use, reuse and abuse the code in this file. -module(default_handler). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/2]). init({_Any, http}, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {ok, Req2} = cowboy_http_req:reply(200, [], <<"I Just Reply!">>, Req), {ok, Re...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/command_transfer/src/default_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(default_handler). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/2]). init({_Any, http}, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {ok, Req2} = cowboy_http_req:reply(200, [], <<"I Just Reply!">>, Req), {ok, Req2, State}. terminate(_Req, _State) -> ok.
2e5989c3d272d32ac3b9996922592072c49508e3d067abe4c9ffe97c6806516e
SimulaVR/godot-haskell
VisualScriptVariableSet.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualScriptVariableSet (Godot.Core.VisualScriptVari...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualScriptVariableSet.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualScriptVariableSet (Godot.Core.VisualScriptVari...
a4ac144055015b8fb4f592eae67ee56c0f01bdddc10ec2b65f0df8a565645b08
shortishly/tansu
tansu_stream.erl
Copyright ( c ) 2016 < > %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under...
null
https://raw.githubusercontent.com/shortishly/tansu/154811fff81855419de9af380c81c7ae14e435d0/src/tansu_stream.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissi...
Copyright ( c ) 2016 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(tansu_stream). -export([chunk/3]). -export([chunk/4]). chunk(Id, Event, Req) -> cowboy_req:chunk( ["id: ", any:to_lis...
9f48918e963262f71233be7438bfecd5fa816bee02342e633b1822822e6efa39
elastic/eui-cljs
icon_arrow_down.cljs
(ns eui.icon-arrow-down (:require ["@elastic/eui/lib/components/icon/assets/arrow_down.js" :as eui])) (def arrowDown eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_arrow_down.cljs
clojure
(ns eui.icon-arrow-down (:require ["@elastic/eui/lib/components/icon/assets/arrow_down.js" :as eui])) (def arrowDown eui/icon)
70e472ee4293974cb7fd88dc9013cff0133414a5d4794779ddf042f82b5b4ab4
van-clj/zetta-parser
string_test.clj
(ns zetta.parser.string-test (:require [clojure.test :refer :all] [zetta.core :refer :all] [zetta.parser.string :as p])) (deftest take-with-test (let [result (parse-once (p/take-with 4 (partial every? #(Character/isDigit ^java.lang.Character %))) ...
null
https://raw.githubusercontent.com/van-clj/zetta-parser/303cee3dab514ba615fd032cb1fff2405a33ce82/test/zetta/parser/string_test.clj
clojure
(ns zetta.parser.string-test (:require [clojure.test :refer :all] [zetta.core :refer :all] [zetta.parser.string :as p])) (deftest take-with-test (let [result (parse-once (p/take-with 4 (partial every? #(Character/isDigit ^java.lang.Character %))) ...
6159e0ad04c71c4c540a5e49f1d6ebdea8792ed4417e4c783f22228c7e1117eb
locusmath/locus
object.clj
(ns locus.set.mapping.invertible.function.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.con.core.object :refer :all] [locus.con.core.setpart :refer :all] ...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/mapping/invertible/function/object.clj
clojure
An invertible function is a function f: A -> B with a corresponding inverse function f^(-1) : B -> A. It is still treated as a member of the topos of sets and functions in this class instead of being given its own topos. It is equivalently an isomorphism in the topos Sets. Conversion routines Composition and iden...
(ns locus.set.mapping.invertible.function.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.con.core.object :refer :all] [locus.con.core.setpart :refer :all] ...
d12ad3fb7b3444af6c428ecac7963c4c0d7c7f762b913dfd0f41a4dde1243318
mroman42/discokitty
Vectorspaces.hs
| Module : Vectorspaces Description : Sparse representation of vectors over an arbitrary semiring . License : GPL-3 An implementation of the cups of the category of matrices over an arbitary semiring . In this module we call " vector space " to what would be more generally a module over a semiring . The ...
null
https://raw.githubusercontent.com/mroman42/discokitty/c9e6af9327b187549a3b0e2f3bb14657279ecdc5/source/Discokitty/Models/Vectorspaces.hs
haskell
| A vector is given internally by a map representing the coefficients of each basis element. | Shows the coefficients of the vector. | Creates a sparse vector from a list of basis elements multiplied by scalars. | Creates a sparse vector from a map assigning a scalar to each base element. | Outputs a map assign...
| Module : Vectorspaces Description : Sparse representation of vectors over an arbitrary semiring . License : GPL-3 An implementation of the cups of the category of matrices over an arbitary semiring . In this module we call " vector space " to what would be more generally a module over a semiring . The ...
7ecd469436e91d3c48ecc16ba96bd2022762fbc939cf37a8375f71d850c1d9c3
landakram/kiwi-desktop
events.cljs
(ns kiwi.settings.events (:require [re-frame.core :as re-frame :refer [after enrich path reg-event-db reg-event-fx reg-fx]] [kiwi.storage :as storage] [kiwi.db :as page-db])) (reg-fx :set-wiki-dir (fn [wiki-dir] (page-db/set-wiki-dir! wiki-dir))) (defn assoc-wiki-root-dir [{:keys [db]}...
null
https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/settings/events.cljs
clojure
(ns kiwi.settings.events (:require [re-frame.core :as re-frame :refer [after enrich path reg-event-db reg-event-fx reg-fx]] [kiwi.storage :as storage] [kiwi.db :as page-db])) (reg-fx :set-wiki-dir (fn [wiki-dir] (page-db/set-wiki-dir! wiki-dir))) (defn assoc-wiki-root-dir [{:keys [db]}...
b52dce32a4213c529f7556bfdfffe2954fe13fb35ae9fa280b77dbdb363f8c93
dinosaure/bob
getline.ml
let reporter ppf = let report src level ~over k msgf = let k _ = over (); k () in let with_metadata header _tags k ppf fmt = Format.kfprintf k ppf ("%a[%a]: " ^^ fmt ^^ "\n%!") Logs_fmt.pp_header (level, header) Fmt.(styled `Magenta string) (Logs.Src.name ...
null
https://raw.githubusercontent.com/dinosaure/bob/25d00efa7dbf116045b8ec6992a101590b090eaf/bin/getline.ml
ocaml
Windows compatibility.
let reporter ppf = let report src level ~over k msgf = let k _ = over (); k () in let with_metadata header _tags k ppf fmt = Format.kfprintf k ppf ("%a[%a]: " ^^ fmt ^^ "\n%!") Logs_fmt.pp_header (level, header) Fmt.(styled `Magenta string) (Logs.Src.name ...
a70c24582d77eff2cd561deaa45ceb9718b2a778dd57fa956b028733ecb7348d
pirapira/coq2rust
rules.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/firstorder/rules.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** connection rules right connective...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Errors open Util open Na...
06ca657fbe56042e517599e08cd5199abab44a42991c83f1f5a9350c3897ff17
rundis/acme-buddy
core.clj
(ns acme-catalog.core (:require [compojure.core :refer [defroutes ANY]] [ring.middleware.params :refer [wrap-params]] [ring.middleware.keyword-params :refer [wrap-keyword-params]] [ring.middleware.json :refer [wrap-json-params]] [clojure.java.io :as io] [bud...
null
https://raw.githubusercontent.com/rundis/acme-buddy/4134ee33391c858c1c6c517eb22f65aaff34a40e/acme-catalog/src/acme_catalog/core.clj
clojure
(ns acme-catalog.core (:require [compojure.core :refer [defroutes ANY]] [ring.middleware.params :refer [wrap-params]] [ring.middleware.keyword-params :refer [wrap-keyword-params]] [ring.middleware.json :refer [wrap-json-params]] [clojure.java.io :as io] [bud...
e0196f10ae146ecf2187b4312cbfb22bd3b80b2411818e946c546a26a38f4a23
eshamster/watson
macro.lisp
(defpackage :watson/t/default/macro (:use #:cl #:rove #:watson/default/macro) (:import-from #:watson/env/built-in-func #:i32.add #:i32.sub #:i32.mul #:i32.div-s #:i32.div-u) (:import-from #:watson/env/const-func ...
null
https://raw.githubusercontent.com/eshamster/watson/0525f4a657298cec74121162c3cd3dec953c7a25/t/default/macro.lisp
lisp
The following will be ignored. i32 i64
(defpackage :watson/t/default/macro (:use #:cl #:rove #:watson/default/macro) (:import-from #:watson/env/built-in-func #:i32.add #:i32.sub #:i32.mul #:i32.div-s #:i32.div-u) (:import-from #:watson/env/const-func ...
8f451c7dd3783fc666de97d2b2645d466ad93eca52d7d527991f1506bb167b8d
chrisdone/forge
Types.hs
# LANGUAGE FunctionalDependencies # # LANGUAGE DataKinds # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DeriveFunctor # # LANGUAGE StandaloneDeriving # {-# LANGUAGE RankNTypes #-} # LANGUAGE UndecidableInstances # # LA...
null
https://raw.githubusercontent.com/chrisdone/forge/e910ba810f249ba7921ea0f43f416d3d05e8c4ed/src/Forge/Internal/Types.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE RankNTypes # # LANGUAGE GADTs # | Web forms interface. * Main form type $form-type * Classes * Field names $field-names * Generation $generated * Inputs to a form | A form indexed by some type @index@ (a phantom type), returning a You can use 'fmap' (aka '<$>') over...
# LANGUAGE FunctionalDependencies # # LANGUAGE DataKinds # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # ...
ce68d9e4bf168ab12fbd60d66fc2c6f7010f96ad6fcce3ba188f85608fd134cd
Bodigrim/arithmoi
SmoothNumbers.hs
-- | Module : Math . . SmoothNumbers Copyright : ( c ) 2018 , 2018 - 2019 Licence : MIT Maintainer : < > -- -- A < smooth number> -- is an number, which can be represented as a product of powers of elements from a given set ( smooth basis ) . , 48 = 3 * 4 * 4 is smooth over a set {...
null
https://raw.githubusercontent.com/Bodigrim/arithmoi/df789d23341247e9cdb4f690595ea99c89836d09/Math/NumberTheory/SmoothNumbers.hs
haskell
| A < smooth number> is an number, which can be represented as a product of powers of elements # LANGUAGE FlexibleContexts # | An abstract representation of a smooth basis. ^ Unwrap elements of a smooth basis. | A generalization of 'smoothOver', suitable for non-'Integral' domains. < Ideal norm> function,...
Module : Math . . SmoothNumbers Copyright : ( c ) 2018 , 2018 - 2019 Licence : MIT Maintainer : < > from a given set ( smooth basis ) . , 48 = 3 * 4 * 4 is smooth over a set { 3 , 4 } , and 24 is not . # LANGUAGE ScopedTypeVariables # module Math.NumberTheory.SmoothNumbers ( Sm...
6f2ea26674d7d0e208ef323e02b8343598962c58bd247a4f8b9443d00b710214
caradoc-org/caradoc
aes.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2016 - 2017 (* *) (* This program ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/crypto/aes.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2016 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have received a copy of the GNU General Public License along with this program ; if...
bb9d1c915f0fdac5de748a3342ad3a9f6f3e05a462515b663d3bc35989571687
takikawa/racket-ppa
framework-types.rkt
#lang typed/racket ;; Types for the framework library (require "../racket/private/gui-types.rkt") ;; Frequently reused types (define-type Style-Delta%-Instance (Instance Style-Delta%)) (define-type Snip%-Instance (Instance Snip%)) (define-type Color%-Instance (Instance Color%)) (define-type Frame:Basic<%>-Instance (...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/share/pkgs/typed-racket-more/typed/private/framework-types.rkt
racket
Types for the framework library Frequently reused types 3 Autosave TODO: I'm not sure about interface for classes FIXME: see frame cases TODO: refine return type? note, no `editor` init argument FIXME: fishy docs The documentation claims this should be applied to frames, but apply it to other top level window...
#lang typed/racket (require "../racket/private/gui-types.rkt") (define-type Style-Delta%-Instance (Instance Style-Delta%)) (define-type Snip%-Instance (Instance Snip%)) (define-type Color%-Instance (Instance Color%)) (define-type Frame:Basic<%>-Instance (Instance Frame:Basic<%>)) (define-type Canvas%-Instance (Insta...
47cdd123688217be4b87e2c1d9eb92603d05eb1d71b46893617a185993feda7d
HiiGHoVuTi/Catrina
Program.hs
{-# LANGUAGE OverloadedStrings #-} module Interpreter.Program ( interpretProgram, start ) where import Data.Text (Text) import Data.Map hiding (foldl) import Interpreter.Declaration import Interpreter.Expr import Interpreter.Value import Syntax.Program import Types.Category import Types.Ca...
null
https://raw.githubusercontent.com/HiiGHoVuTi/Catrina/7219de0088471ccf136b4917d0d469cabaf0f6dc/app/Interpreter/Program.hs
haskell
# LANGUAGE OverloadedStrings #
module Interpreter.Program ( interpretProgram, start ) where import Data.Text (Text) import Data.Map hiding (foldl) import Interpreter.Declaration import Interpreter.Expr import Interpreter.Value import Syntax.Program import Types.Category import Types.Categories.Base start :: Map Text Ca...
510717290517cbd55e104f3fdc327c17196812b423697f2c233bec656819c72a
cloverage/cloverage
raw.clj
(ns cloverage.report.raw (:require [clojure.java.io :as io] [clojure.pprint] [cloverage.report :refer [with-out-writer]])) (defn report [^String out-dir stats covered] (let [raw-data-file (io/file out-dir "raw-data.clj") raw-stats-file (io/file out-dir "raw-stats.clj")] (println "Writing raw ...
null
https://raw.githubusercontent.com/cloverage/cloverage/87fd10f82ea7c0f47c03354105e513b160d1e047/cloverage/src/cloverage/report/raw.clj
clojure
(ns cloverage.report.raw (:require [clojure.java.io :as io] [clojure.pprint] [cloverage.report :refer [with-out-writer]])) (defn report [^String out-dir stats covered] (let [raw-data-file (io/file out-dir "raw-data.clj") raw-stats-file (io/file out-dir "raw-stats.clj")] (println "Writing raw ...
be9fadf743e25342e023ece84e0dfe5041031df5829dae2a2a9a34085847bb45
haskell/haskell-ide-engine
Package.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # -- | Commands and code actions for adding package dependencies into .cabal and -- package.yaml files module Haskell.Ide.Engine.Plugin.Package where impo...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/src/Haskell/Ide/Engine/Plugin/Package.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveAnyClass # # LANGUAGE RankNTypes # | Commands and code actions for adding package dependencies into .cabal and package.yaml files ^ The root directory. ^ A path to a module inside the library/executable/test-suite you want to absolute path, thus, must be normalised....
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE TupleSections # module Haskell.Ide.Engine.Plugin.Package where import Haskell.Ide.Engine.MonadTypes import qualified Haskell.Ide.Engine.Support.Hoogle as Hoogle import Haskell.Ide.Engine.PluginUtils import Haskell.Ide.Engine.Support....
6bb55c1fb9c898811c115fea6f348e9183ee737dfd6d52419d7f091aa91808c5
MyDataFlow/ttalk-server
rec_test2.erl
Copyright 2010 - 2011 < > , < > and < > %%% This file is part of PropEr . %%% %%% PropEr 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 o...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/proper/test/rec_test2.erl
erlang
PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License fo...
Copyright 2010 - 2011 < > , < > and < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Pub...
93a5f5d51cf3f86604c50f7a271484c0354685b0a389a07a3ece1c57cdbc24c2
dancrossnyc/multics
lisp_loop_.lisp
;;; ************************************************************** ;;; * * * Copyright , ( C ) Massachusetts Institute of Technology , 1982 * ;;; * * ;;; **********************************************...
null
https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_lisp_library_.s.archive/lisp_loop_.lisp
lisp
************************************************************** * * * * ************************************************************** LOOP -*- Mode:LISP; Package:System-Internals; Base:8; Lowerc...
* Copyright , ( C ) Massachusetts Institute of Technology , 1982 * * * * * ( C ) COPYRIGHT 1980 , 1981 MASSACHUSETTS INSTITUTE OF TECHNOLOGY * * LOOP Iteration Macro ( Is this necessary anymore ? LOOP is now in the Lisp Machine system and Printed documentation is available as MIT - LCS Technical Memo 169 , ...
ed80ccb8076ea673f07c1ec5fe323287450d70439628417a75a5bff8f3494663
google/ormolu
multi-line-out.hs
type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> "route2" :> ApiRoute2 -- comment here :<|> OmitDocs :> "i" :> ASomething API
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/type-synonyms/multi-line-out.hs
haskell
comment here
type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> OmitDocs :> "i" :> ASomething API
8a04252ad1b113b933d9edfe23c8f252942e531563be2f4e7c0965c446799ec7
OlivierSohn/hamazed
FromMonadIO.hs
{-# OPTIONS_HADDOCK hide #-} | This example is related to " Imj . Graphics . Render . Delta " : /from a ' MonadIO'/ module Imj.Example.DeltaRender.FromMonadIO ( main ) where import Imj.Prelude import Imj.Graphics.Color import Imj.Graphics.Render.Delta helloWorld :: (MonadIO m) => DeltaEnv -> m () helloWorld ...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-base/src/Imj/Example/DeltaRender/FromMonadIO.hs
haskell
# OPTIONS_HADDOCK hide #
| This example is related to " Imj . Graphics . Render . Delta " : /from a ' MonadIO'/ module Imj.Example.DeltaRender.FromMonadIO ( main ) where import Imj.Prelude import Imj.Graphics.Color import Imj.Graphics.Render.Delta helloWorld :: (MonadIO m) => DeltaEnv -> m () helloWorld env = do drawStr' env "Hell...
6c5e992904917334f3b009e6998792a072d013692366f3ad1bee296982309c69
unison-code/uni-instr-sel
OpTypes.hs
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
null
https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/OpTypes.hs
haskell
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
7e95de861ef3d777f42dc7183346f493245f4804f4493bd1dd78be5c392a61e7
racket/compiler
embed-me6b.rkt
(module embed-me6b racket/base (with-output-to-file (build-path (find-system-path 'temp-dir) "stdout") (lambda () (printf "This is 6\n") (with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))]) (printf "~a\n" (and (dynamic-require 'racket/fixnum #f) #t)))) #:exists 'append))
null
https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/embed/embed-me6b.rkt
racket
(module embed-me6b racket/base (with-output-to-file (build-path (find-system-path 'temp-dir) "stdout") (lambda () (printf "This is 6\n") (with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))]) (printf "~a\n" (and (dynamic-require 'racket/fixnum #f) #t)))) #:exists 'append))
c54b8df5b44c5093a2417ad64df410d2f867e2df73907f6c23c620a6827dfebe
diku-dk/futhark
SOAC.hs
# LANGUAGE TypeFamilies # module Futhark.AD.Rev.SOAC (vjpSOAC) where import Control.Monad import Futhark.AD.Rev.Hist import Futhark.AD.Rev.Map import Futhark.AD.Rev.Monad import Futhark.AD.Rev.Reduce import Futhark.AD.Rev.Scan import Futhark.AD.Rev.Scatter import Futhark.Analysis.PrimExp.Convert import Futhark.Builde...
null
https://raw.githubusercontent.com/diku-dk/futhark/b9acc013a235d747525e343db1cea54d533ec212/src/Futhark/AD/Rev/SOAC.hs
haskell
We split any multi-op scan or reduction into multiple operations so again. We split multi-op histograms into multiple operations so we can take advantage of special cases. Post-AD, the result may be fused again. unfusing a map-histogram construct into a map and a histogram. Differentiating Reduces Differentiati...
# LANGUAGE TypeFamilies # module Futhark.AD.Rev.SOAC (vjpSOAC) where import Control.Monad import Futhark.AD.Rev.Hist import Futhark.AD.Rev.Map import Futhark.AD.Rev.Monad import Futhark.AD.Rev.Reduce import Futhark.AD.Rev.Scan import Futhark.AD.Rev.Scatter import Futhark.Analysis.PrimExp.Convert import Futhark.Builde...
da819da5bcd4494fbb3ba893a1c9ae55887c95cc9608b566def4d22c0b9b07ff
joelburget/react-haskell
immutable.hs
-- I think building ASTs like this could lead to advantages: -- * performance improvements - the StatefulReactT monad is really a function from state to AST and -- a new state. to get the AST you need to evaluate the function. react -- also has planned support for defining the virtual dom in this way -- ...
null
https://raw.githubusercontent.com/joelburget/react-haskell/5de76473b7cfdd6b85ac618bea31e658794b54e2/sketches/immutable.hs
haskell
I think building ASTs like this could lead to advantages: * performance improvements a new state. to get the AST you need to evaluate the function. react also has planned support for defining the virtual dom in this way rather than by function calls, the idea being that things like react-haskell c...
- the StatefulReactT monad is really a function from state to AST and - you can inspect a piece of DOM being passed around without ReactNode already exists , but it 's not convenient . main = do Just elem <- elemById "inject" render elem $ Div [("className", Str "foo")] [ [ Text [...
a3c599f15f2cf15b14d0b74334602416826ec47bc060c924a339406a81422e67
camlp5/camlp5
mLast.mli
(* camlp5r *) (* mLast.mli,v *) Copyright ( c ) INRIA 2007 - 2017 (* #load "pa_macro.cmo" *) Module [ MLast ] : abstract syntax tree . This is undocumented because the AST is not supposed to be used directly ; the good usage is to use the quotations representing these values in concrete syntax ( s...
null
https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/ocaml_src/main/mLast.mli
ocaml
camlp5r mLast.mli,v #load "pa_macro.cmo"
Copyright ( c ) INRIA 2007 - 2017 Module [ MLast ] : abstract syntax tree . This is undocumented because the AST is not supposed to be used directly ; the good usage is to use the quotations representing these values in concrete syntax ( see the Camlp5 documentation ) . See also the file q_ML...
9e2934b57cf86b34edc7160c27677f411b38c44c821587e746765d1698e380a0
input-output-hk/casino
Game.hs
Represent a Generic DSL for game like operation -- with a built-in interruptible API. # LANGUAGE DataKinds # # LANGUAGE KindSignatures # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE NoImplicitPrelude # module Crypto.Poker.Game where import qualified Crypto.Casino.Primitives.TEG as TEG (PublicBroadcast) import qualifi...
null
https://raw.githubusercontent.com/input-output-hk/casino/3434448e657aa9bfdfc9216f8fb9d7984460b95b/poker/src/Crypto/Poker/Game.hs
haskell
with a built-in interruptible API. # LANGUAGE ConstraintKinds # order of players | This represent a DSL of all possible operations.
Represent a Generic DSL for game like operation # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE NoImplicitPrelude # module Crypto.Poker.Game where import qualified Crypto.Casino.Primitives.TEG as TEG (PublicBroadcast) import qualified Crypto.Casino.Primitives.SIG as SIG (VerifyKey) import Bas...
032442c8da8aab579b4083d3523df9b6f9ce258d2c71a20c3059324225f07658
maximedenes/native-coq
ccalgo.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/cc/ccalgo.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file implements the basic cong...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Downey , and Tarjan . ope...
6100c5e9c05592e5332e9a60db37352b5c92346044646a12dbd9af27a1548bfe
donatello/minio-hs-archived
getObject.hs
#!/usr/bin/env stack stack --resolver runghc --package minio - hs {-# Language OverloadedStrings #-} import Network.Minio import qualified Data.Conduit as C import qualified Data.Conduit.Binary as CB import Prelude | The following example uses 's play server at -- :9000. The endpoint and ...
null
https://raw.githubusercontent.com/donatello/minio-hs-archived/c808dc1be2a5b15c2c714c0052f1d6a7bc98a809/examples/getObject.hs
haskell
resolver runghc --package minio - hs # Language OverloadedStrings # :9000. The endpoint and associated
#!/usr/bin/env stack import Network.Minio import qualified Data.Conduit as C import qualified Data.Conduit.Binary as CB import Prelude | The following example uses 's play server at credentials are provided via the libary constant , > minioPlayCI : : ConnectInfo main :: IO () main = do ...
5f090259e4873b94ac21422ef1d732f20da0c980454d055b339eb999551d1856
Practical-Formal-Methods/adiff
TypeConversions.hs
module Language.C.Analysis.TypeConversions ( arithmeticConversion, floatConversion, intConversion ) where import Language.C.Analysis.SemRep -- | For an arithmetic operator, if the arguments are of the given -- types, return the type of the full expression. arithmeticConversion :: TypeName -> TypeName ->...
null
https://raw.githubusercontent.com/Practical-Formal-Methods/adiff/c18872faf3e31572437686d766f9972e00274588/language-c-extensible/src/Language/C/Analysis/TypeConversions.hs
haskell
| For an arithmetic operator, if the arguments are of the given types, return the type of the full expression. XXX: I'm assuming that double `op` complex float = complex double. The standard seems somewhat unclear on whether this is really the case.
module Language.C.Analysis.TypeConversions ( arithmeticConversion, floatConversion, intConversion ) where import Language.C.Analysis.SemRep arithmeticConversion :: TypeName -> TypeName -> Maybe TypeName arithmeticConversion (TyComplex t1) (TyComplex t2) = Just $ TyComplex $ floatConversion t1 t2 arithme...
86ca4f25f027deee4e9b0838b508d7fc4e8904bc09002252b15b82626bfbf493
dharrigan/startrek
authentication_errors.clj
(ns startrek.core.security.authentication-errors {:author "David Harrigan"}) (set! *warn-on-reflection* true) (def missing-or-invalid-basic-credentials {:message "Missing or invalid Basic credentials" :data {:error :missing.or.invalid.basic.credentials}}) (def missing-or-invalid-token-credentials {:message "Missing...
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/core/security/authentication_errors.clj
clojure
(ns startrek.core.security.authentication-errors {:author "David Harrigan"}) (set! *warn-on-reflection* true) (def missing-or-invalid-basic-credentials {:message "Missing or invalid Basic credentials" :data {:error :missing.or.invalid.basic.credentials}}) (def missing-or-invalid-token-credentials {:message "Missing...
3834e4fc65ce6d037cecf88dbe8534d8f96ff0784cdffca7fd565e389f8efa50
JeffreyBenjaminBrown/hode
TUI.hs
# LANGUAGE ScopedTypeVariables # module Hode.Test.TUI where import Control.Lens import qualified Data.Set as S import qualified Data.List.PointedList as P import qualified Test.HUnit as T import Test.HUnit hiding (Test, test) import Hode.Hash.Types import ...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode-test/Hode/Test/TUI.hs
haskell
# LANGUAGE ScopedTypeVariables # module Hode.Test.TUI where import Control.Lens import qualified Data.Set as S import qualified Data.List.PointedList as P import qualified Test.HUnit as T import Test.HUnit hiding (Test, test) import Hode.Hash.Types import ...
35ec0a5a6252c8a5e2012e38e7f39d600270f11085a034d965cbf8b8e1aad916
emotiq/emotiq
address-tests.lisp
;;;; address-tests.lisp (in-package :cosi-bls-test) (define-test public-key-to-key-hash-as-address-test (let* ((k (make-key-pair :test)) (public-key (keying-triple-pkey k)) (public-key-as-hex-string (hex-str public-key)) (public-key-byte-vector (...
null
https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/Cosi-BLS/test/address-tests.lisp
lisp
address-tests.lisp stop encouraging the use of untypted bignums and byte vectors... ---------------------------------------------------------------------------------------- THIS IS NOT HELPFUL - WE ARE NOT BITCOIN -- OUR KEYING IS ENTIRELY DIFFERENT ------------------------------------------------------------...
(in-package :cosi-bls-test) (define-test public-key-to-key-hash-as-address-test (let* ((k (make-key-pair :test)) (public-key (keying-triple-pkey k)) (public-key-as-hex-string (hex-str public-key)) (public-key-byte-vector (bev-vec public-key)) ...
b38bcf793eb2b4e8a0f3c73d951cc14bc5e066bb59f09a0f28345c27fb0f23b4
manavpatnaik/haskell
2_filter.hs
import Prelude main = do -- filter: applies a function to a list and returns the list of -- only those elements that return true after evaluating the function print(filter (<3) [1,2,3,4,5]) print(filter (<=3) [1,2,3,4,5]) print(filter (odd) [1,2,3,4,5]) print(filter (even) [1,2,3,4,5])
null
https://raw.githubusercontent.com/manavpatnaik/haskell/9e7c805afb2607468c2e2977247266ccc19d24b6/higher_order_functions/2_filter.hs
haskell
filter: applies a function to a list and returns the list of only those elements that return true after evaluating the function
import Prelude main = do print(filter (<3) [1,2,3,4,5]) print(filter (<=3) [1,2,3,4,5]) print(filter (odd) [1,2,3,4,5]) print(filter (even) [1,2,3,4,5])
e1df13fef772ef4876b72bf098aa49e1cc8789bb080b7afc29bfa33333a3a978
richcarl/eunit
eunit_proc.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may %% not use this file except in compliance with the License. You may obtain %% a copy of the License at <-2.0> %% %% Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/richcarl/eunit/cb7eb2bc2cec01e405c717b6f6b551be7d256f06/src/eunit_proc.erl
erlang
not use this file except in compliance with the License. You may obtain a copy of the License at <-2.0> Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and ...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may distributed under the License is distributed on an " AS IS " BASIS , General Public License ( the " LGPL " ) as published by the Free Software Foundation ; either version 2.1 , or ( at your option ) any later version . either the Ap...
f7ae6666be2ae6b215a27d99a06cb3e0f4240f57238ecfe6d383002168597ee4
wireless-net/erlang-nommu
wxBrush.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxBrush.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxBrush). -include("wxe.hrl"). -e...
c9b88f89ecc7d6a456c7b0f589ba1d800a1656c5d4f97085273cb8df41872656
unisonweb/unison
UnisonFile.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # module Unison.UnisonFile ( -- * UnisonFile UnisonFile (..), pattern UnisonFile, allWatches, dataDeclarations, declsToTypeLookup, dependencies, effectDeclarations, typ...
null
https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/UnisonFile.hs
haskell
# LANGUAGE OverloadedStrings # * UnisonFile Converts a file to a single let rec with a body of `()`, for purposes of typechecking. we make sure each test has type Test.Result backwards compatibility with the old data type includes watches | A mapping of all terms in the file by their var name. The returned term...
# LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # module Unison.UnisonFile UnisonFile (..), pattern UnisonFile, allWatches, dataDeclarations, declsToTypeLookup, dependencies, effectDeclarations, typecheckingTerm, watchesOfKind, * Typechecked...
292e8aa20397b371170160e9eae256663f6d2a008f9bf0edee598a45051224b0
ds-wizard/engine-backend
ContextLenses.hs
module Wizard.Model.Context.ContextLenses where import Data.Pool (Pool) import qualified Data.UUID as U import Database.PostgreSQL.Simple (Connection) import GHC.Records import Network.Minio (MinioConn) import Shared.Model.Config.BuildInfoConfig import Shared.Model.Config.ServerConfig import Wizard.Api.Resource.User....
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/72eb656dcce17115acf304438198aad11219db11/engine-wizard/src/Wizard/Model/Context/ContextLenses.hs
haskell
module Wizard.Model.Context.ContextLenses where import Data.Pool (Pool) import qualified Data.UUID as U import Database.PostgreSQL.Simple (Connection) import GHC.Records import Network.Minio (MinioConn) import Shared.Model.Config.BuildInfoConfig import Shared.Model.Config.ServerConfig import Wizard.Api.Resource.User....
78e5ec10f3f4ac41e569c16261dd59b40ad7dabcca63275ba67e6e1251d60a28
Bodigrim/arithmoi
Diophantine.hs
-- Module for Diophantine Equations and related functions module Math.NumberTheory.Diophantine ( cornacchiaPrimitive , cornacchia ) where import Math.NumberTheory.Moduli.Sqrt ( sqrtsModFactorisation ) import Math.NumberTheory.Primes ( factorise ...
null
https://raw.githubusercontent.com/Bodigrim/arithmoi/df789d23341247e9cdb4f690595ea99c89836d09/Math/NumberTheory/Diophantine.hs
haskell
Module for Diophantine Equations and related functions | See `cornacchiaPrimitive`, this is the internal algorithm implementation | as described at If s = sqrt((m - r*r) / d) is an integer then (r, s) is a solution | Finds all primitive solutions (x,y) to the diophantine equation | x^2 + d*y^2 = m | Given ...
module Math.NumberTheory.Diophantine ( cornacchiaPrimitive , cornacchia ) where import Math.NumberTheory.Moduli.Sqrt ( sqrtsModFactorisation ) import Math.NumberTheory.Primes ( factorise , unPrime ...
59907f8c03fbeb054f6b3f5a3d5b8724e06675f1ec06af54068f5748bb781274
xtdb/xtdb
codemirror.cljs
(ns xtdb.ui.codemirror (:require cljsjs.codemirror cljsjs.codemirror.mode.clojure cljsjs.codemirror.mode.javascript cljsjs.codemirror.addon.edit.closebrackets cljsjs.codemirror.addon.edit.matchbrackets cljsjs.codemirror.addon.hint.show-hint cljsj...
null
https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/modules/http-server/src-cljs/xtdb/ui/codemirror.cljs
clojure
reset the cursor to the end of the text, if the text was changed externally
(ns xtdb.ui.codemirror (:require cljsjs.codemirror cljsjs.codemirror.mode.clojure cljsjs.codemirror.mode.javascript cljsjs.codemirror.addon.edit.closebrackets cljsjs.codemirror.addon.edit.matchbrackets cljsjs.codemirror.addon.hint.show-hint cljsj...
49c7543b6eae8d95c0c8925f892b300d5b16c1a5c6a8aba4e0b235b204ccee96
timbertson/passe
json_ext.ml
include Yojson.Safe type json = t let to_string = pretty_to_string ~std:true let print_chan = Yojson.Safe.pretty_to_channel ~std:true let print_str () = to_string let print = print_str let fmt formatter obj = Format.pp_print_string formatter (to_string obj) let to_single_line_string j = let rv = Yojson.Safe.to_string...
null
https://raw.githubusercontent.com/timbertson/passe/a0aa00695022657a222ea06a4796da36141aaa1a/src/common/json_ext.ml
ocaml
include Yojson.Safe type json = t let to_string = pretty_to_string ~std:true let print_chan = Yojson.Safe.pretty_to_channel ~std:true let print_str () = to_string let print = print_str let fmt formatter obj = Format.pp_print_string formatter (to_string obj) let to_single_line_string j = let rv = Yojson.Safe.to_string...
dc79ce0e0a7e540e0d6edf0d0da1c080a8a41fdd9086ab25d11f65fcc600cfac
ksuandi/role-based-auth-api
dbname.clj
(ns role-based-auth-api.db.dbname (:require [yesql.core :refer [defqueries]] [taoensso.timbre :as log] [role-based-auth-api.db.pool :refer [pool]] [role-based-auth-api.utils :refer [parse-int]])) (defqueries "sql/dbname.sql" {:connection (pool)}) (defn- get-value [dataset...
null
https://raw.githubusercontent.com/ksuandi/role-based-auth-api/e22af336650a2e3663292775c29ac1b3bead05dd/src/role_based_auth_api/db/dbname.clj
clojure
(ns role-based-auth-api.db.dbname (:require [yesql.core :refer [defqueries]] [taoensso.timbre :as log] [role-based-auth-api.db.pool :refer [pool]] [role-based-auth-api.utils :refer [parse-int]])) (defqueries "sql/dbname.sql" {:connection (pool)}) (defn- get-value [dataset...
fdf91cd06066efbd81e66a3f832ba3d02b643ff3fddd41454f9333ed86c9961d
kaznum/programming_in_ocaml_exercise
listbox.ml
15.2.10 open Tk let top = openTk() let i = ref 0 and lb = Listbox.create top let b = Button.create top ~text: "Press me!" ~command: (fun () -> Listbox.insert ~index:`End ~texts:[string_of_int !i] lb; incr i) let () = pack [coe lb; coe b] ~side:`Top; mainLoop()
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ch15/listbox.ml
ocaml
15.2.10 open Tk let top = openTk() let i = ref 0 and lb = Listbox.create top let b = Button.create top ~text: "Press me!" ~command: (fun () -> Listbox.insert ~index:`End ~texts:[string_of_int !i] lb; incr i) let () = pack [coe lb; coe b] ~side:`Top; mainLoop()
f99596ae6c74d5b668e108fa0fa3ce36ec78708c39522183d68b399758e37978
unix1/nuk
nuk_user.erl
%%%------------------------------------------------------------------- %% @doc `nuk_user' module %% %% This module is used to operate on {@link nuk_user:user()} data type. This data type is used when dealing with users in , for example , when calling { @link nuk_users : put/1 } and { @link nuk_users : get/1 } . %%...
null
https://raw.githubusercontent.com/unix1/nuk/ad771c8b164c305408d8076627228024c4955ec1/src/nuk_user.erl
erlang
------------------------------------------------------------------- @doc `nuk_user' module This module is used to operate on {@link nuk_user:user()} data type. This @end ------------------------------------------------------------------- API operate on this data type. Data type for user name, can be any string o...
data type is used when dealing with users in , for example , when calling { @link nuk_users : put/1 } and { @link nuk_users : get/1 } . -module(nuk_user). -export([new/2, check_password/2, get_username/1]). -export_type([user/0]). -export_type([username/0]). -opaque user() :: #{username => username(), password ...
7dd1cc33a25fe2927855156bd375c1308e5c0108e8096052e36f46287479872e
imrehg/ypsilon
key.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gtk key) (export gtk_key_snooper_install gtk_key_snooper_remove) (import (rnrs) (ypsilon ffi)) (define lib-name (cond ...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gtk/key.scm
scheme
[end]
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gtk key) (export gtk_key_snooper_install gtk_key_snooper_remove) (import (rnrs) (ypsilon ffi)) (define lib-name (cond ...
d2d7e95b4b52a6869c850cfb4e9b7dd3f0f76db7aa39f88239514cb41c7a18f1
well-typed/cborg
GeneralisedUTF8.hs
{-# LANGUAGE BangPatterns #-} module Codec.Serialise.Internal.GeneralisedUTF8 ( encodeGenUTF8 , UTF8Encoding(..) , decodeGenUTF8 -- * Utilities , isSurrogate , isValid ) where import Control.Monad.ST import Data.Bits import Data.Char import Data.Word import qualified Codec.CBOR.ByteArray...
null
https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/src/Codec/Serialise/Internal/GeneralisedUTF8.hs
haskell
# LANGUAGE BangPatterns # * Utilities return a flag indicating whether the encoded string contained any surrogate We slightly over-allocate such that we won't need to copy in the ASCII-only case. We ran out of room; reallocate and copy Is this a surrogate character? | Is the given byte sequence valid under the g...
module Codec.Serialise.Internal.GeneralisedUTF8 ( encodeGenUTF8 , UTF8Encoding(..) , decodeGenUTF8 , isSurrogate , isValid ) where import Control.Monad.ST import Data.Bits import Data.Char import Data.Word import qualified Codec.CBOR.ByteArray.Sliced as BAS import Data.Primitive.ByteArray dat...
f37a16a2c2f20664e0988124b17e10b2b3d6d6d0cdc7d6a0b933ad7d9a0877e3
spechub/Hets
DataP.hs
| Module : $ Id$ Copyright : ( c ) DFKI GmbH License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Adaptation and extension of a parser for data definitions given in appendix of paper - Monadic Parser Combinators . ...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/utils/DrIFT-src/DataP.hs
haskell
type name Parameters derived classes -------------------------------------------------------------------------- ------------------------------------------------------------------------- well, it has the same form ------------------------------------------------------------------------- fn proper application v...
| Module : $ Id$ Copyright : ( c ) DFKI GmbH License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Adaptation and extension of a parser for data definitions given in appendix of paper - Monadic Parser Combinators . ...