_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
2e5bbf8bd8c26cde13d53f1a139b9ce150de82ba47ef98630cf32425be3750c4
unbalancedparentheses/radioelm
uc_pinger_sup.erl
-module(uc_pinger_sup). -behaviour(supervisor). -export([ start_link/0, start/2, terminate/1 ]). -export([ init/1 ]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, {}). init({}) -> {ok, { #{strategy => simple_one_for_one, ...
null
https://raw.githubusercontent.com/unbalancedparentheses/radioelm/649ecff452bc3ddc8c316e7e5abf6e7523dc566e/api/src/uc_pinger_sup.erl
erlang
-module(uc_pinger_sup). -behaviour(supervisor). -export([ start_link/0, start/2, terminate/1 ]). -export([ init/1 ]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, {}). init({}) -> {ok, { #{strategy => simple_one_for_one, ...
2a1572318c8a023ce19b55dcdfb89fd117510ee8a00d62a067ddc9bef59188b5
luc-tielen/llvm-codegen
Name.hs
module LLVM.Codegen.Name ( Name(..) ) where import Data.Text import Data.String import LLVM.Pretty newtype Name = Name { unName :: Text } deriving (Eq, Ord, Show) instance IsString Name where fromString = Name . fromString instance Pretty Name where pretty (Name name) = pretty name
null
https://raw.githubusercontent.com/luc-tielen/llvm-codegen/5872c651b1dd16a73b48b9b5e076aca8413e63ef/lib/LLVM/Codegen/Name.hs
haskell
module LLVM.Codegen.Name ( Name(..) ) where import Data.Text import Data.String import LLVM.Pretty newtype Name = Name { unName :: Text } deriving (Eq, Ord, Show) instance IsString Name where fromString = Name . fromString instance Pretty Name where pretty (Name name) = pretty name
819d70ae2f93d8dfb7366cf91146a5e00ab45672941af7f8e6afebfd26930119
PacktPublishing/Haskell-High-Performance-Programming
lifted-names.hs
import Language.Haskell.TH right, left :: Name right = 'Right left = 'Left pi' = 'pi
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter09/lifted-names.hs
haskell
import Language.Haskell.TH right, left :: Name right = 'Right left = 'Left pi' = 'pi
4e242baad6ebaa131345a3d6ef0c90d1fe113e35e57d37b9ad2d4f23dd1945db
dcastro/twenty48
AlphaBeta.hs
# LANGUAGE RecordWildCards # module Game.AlphaBeta where import Data.Alternated (Alternated (..)) import qualified Data.Alternated as A import Data.Pair import qualified Data.Strict.Maybe as M import Game.Optimized.Board import Game.Optimized.Eval import ...
null
https://raw.githubusercontent.com/dcastro/twenty48/d4a58bfa389bb247525fd18f80ef428d84ef5fe9/src/Game/AlphaBeta.hs
haskell
----------------------------------------------------- ----------------------------------------------------- | Takes a potential maximum `Path` and the lists of minima for each subtree. | Takes a potential maximum `Path`, and a list of minima. | Returns true if any element in this subtree is less then the potential m...
# LANGUAGE RecordWildCards # module Game.AlphaBeta where import Data.Alternated (Alternated (..)) import qualified Data.Alternated as A import Data.Pair import qualified Data.Strict.Maybe as M import Game.Optimized.Board import Game.Optimized.Eval import ...
64aca2ab106f67f9d29ade9ef9b6ef5b1cef2558d846804ece1ee2f0204e8086
geoffder/dometyl-keyboard
curvature.ml
open! OCADml open! OSCADml open! Syntax type well = { radius : float ; angle : float ; tilt : float ; tilt_correction : xrot:float -> tilt:float -> float } type fan = { radius : float ; angle : float ; tilt : float } type curve = { well : well option ; fan : fan option } type custom = int ->...
null
https://raw.githubusercontent.com/geoffder/dometyl-keyboard/d6af46ea157a38167b50cc492e16428644806ddb/lib/curvature.ml
ocaml
open! OCADml open! OSCADml open! Syntax type well = { radius : float ; angle : float ; tilt : float ; tilt_correction : xrot:float -> tilt:float -> float } type fan = { radius : float ; angle : float ; tilt : float } type curve = { well : well option ; fan : fan option } type custom = int ->...
082bee130889699de39819ddd06b19216f15e53adf731fab4cef5760dcc19666
mfoemmel/erlang-otp
ex_grid.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public Lic...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/examples/demo/ex_grid.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 limita...
Copyright Ericsson AB 2009 . 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(ex_grid). -behaviour(wx_object). -expor...
e062eb3966c5db988975cc4b0a0a23eab7e4cdc27b966b8e4cd1f5072f9fda89
deadpendency/deadpendency
AppEventAdditional.hs
# OPTIONS_GHC -fno - warn - missing - export - lists # module Common.Effect.AppEventEmit.Model.AppEventAdditional where import Data.Aeson import Text.Show qualified (show) data AppEventAdditional where AppEventAdditional :: (ToJSON a) => a -> AppEventAdditional instance Eq AppEventAdditional where a == b = toJS...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/AppEventEmit/Model/AppEventAdditional.hs
haskell
# OPTIONS_GHC -fno - warn - missing - export - lists # module Common.Effect.AppEventEmit.Model.AppEventAdditional where import Data.Aeson import Text.Show qualified (show) data AppEventAdditional where AppEventAdditional :: (ToJSON a) => a -> AppEventAdditional instance Eq AppEventAdditional where a == b = toJS...
99c257ac605a9bae88118f91520ef2f58b5252eb7c8b7ee9f1e60af406930bef
dmitryvk/sbcl-win32-threads
mop.pure.lisp
miscellaneous non - side - effectful tests of the MOP This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This s...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/mop.pure.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. However, this seems a good a way as any of ensuring that we have no regressions. indirect ...
miscellaneous non - side - effectful tests of the MOP This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . Note that the MOP is not in an entirely supported state . (assert (subtypep 'sb-mop:funcallable-standard-obj...
dbd166082e502326961348ecf90a66e93a58029ee560f45de467356346d03265
mauny/the-functional-approach-to-programming
visages.ml
(* *) (* Projet Formel *) (* *) (* MLgraph example *) (* ...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/visages.ml
ocaml
Projet Formel MLgraph example ...
45 rue d'Ulm 75005 PARIS France $ I d : visages.mlp , v 1.1 1997/08/14 11:34:25 Visages.ml Naive picture using the chan...
8d1711d409aef23c67bea68a6b3f0b0ce2e14ae6fabff0f90fd4e7f8f936a013
klutometis/clrs
section.scm
(require-extension syntax-case (srfi 31)) (require '../6.4/section) (module section-2.3 (sum-search) (import* section-6.4 heapsort) (include "../2.3/sum-search.scm"))
null
https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/2.3/section.scm
scheme
(require-extension syntax-case (srfi 31)) (require '../6.4/section) (module section-2.3 (sum-search) (import* section-6.4 heapsort) (include "../2.3/sum-search.scm"))
417eef7ef5a411d2d87338bd57209cc354c82dda4235f13124972fd779eed6fb
shoreleave/shoreleave-remote
macros.clj
(ns shoreleave.remotes.macros "Macros to smooth over the use of RPC") ;; The macro calls are preferred to the raw calls. ;; Handling the "remote-name" correctly can be troublesome, ;; and the macro ensures uniform handling. (defmacro rpc [[sym & params] & [destruct & body]] (let [func (if destruct ...
null
https://raw.githubusercontent.com/shoreleave/shoreleave-remote/02869cea3bd12734d8b2de911f934f8fa0ee64d5/src/shoreleave/remotes/macros.clj
clojure
The macro calls are preferred to the raw calls. Handling the "remote-name" correctly can be troublesome, and the macro ensures uniform handling.
(ns shoreleave.remotes.macros "Macros to smooth over the use of RPC") (defmacro rpc [[sym & params] & [destruct & body]] (let [func (if destruct (if (some #{:on-success :on-error} body) (reduce (fn [callback-map [k v-form]] (assoc callback-map k `(fn ~destruct ~v-form))) ...
558ab8557f8a312a6b84fa7a0cd7619f9a096039a0b340cd334b450158a531b1
avsm/mirage-duniverse
main.ml
Copyright ( C ) Citrix Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/xen-evtchn/lib_test/main.ml
ocaml
Without this notify the after will block. This checks that the background thread is working.
Copyright ( C ) Citrix Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR...
0857bf5c8c7ea4ff4f54d58253fc37c77ef731be3c8883c7017ea546c1e3464f
clojure-emacs/refactor-nrepl
unreadable_file.clj
(ns unreadable-file
null
https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/b78e3545bc51208747cab4617f1672c0d265cde8/test-resources/unreadable_file.clj
clojure
(ns unreadable-file
5f71df570b988a1f7fcfef85b9bd1b034755620573bf905d1e461ea16457ee49
NetworkVerification/nv
UnboxUnits.ml
open Batteries open Nv_lang.Syntax Replace all instances of Unit with booleans ( set to false ) , so we do n't have to deal with them during SMT encoding have to deal with them during SMT encoding *) let ty_transformer _ ty = match ty with | TUnit -> Some TBool | _ -> None ;; let pattern_transformer ...
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/transformations/UnboxUnits.ml
ocaml
Preserves irrefutability
open Batteries open Nv_lang.Syntax Replace all instances of Unit with booleans ( set to false ) , so we do n't have to deal with them during SMT encoding have to deal with them during SMT encoding *) let ty_transformer _ ty = match ty with | TUnit -> Some TBool | _ -> None ;; let pattern_transformer ...
16de06ca5b850c898922eeaea21f6e9eab09bb44c7e8632288bb056fc04611db
morpheusgraphql/morpheus-graphql
Main.hs
module Main ( main, ) where import Server.Servant (servantServer) main :: IO () main = servantServer
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/f9684d1451fd4ee3aabdb821424fd352003a3982/examples/servant/src/Main.hs
haskell
module Main ( main, ) where import Server.Servant (servantServer) main :: IO () main = servantServer
fff88f9fbee0a2dd4732385e7e532d678b17e98d18bf2344f0b953c5321ac99d
janestreet/memtrace_viewer_with_deps
tls.mli
open! Core open! Async open! Import module Connection = Ssl.Connection * Accept TCP connections , do a TLS negotiation on each connection and call [ f ] with the encrypted channel . The connection is shutdown cleanly when [ f ] returns . encrypted channel. The connection is shutdown cleanly when...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/async_ssl/src/tls.mli
ocaml
open! Core open! Async open! Import module Connection = Ssl.Connection * Accept TCP connections , do a TLS negotiation on each connection and call [ f ] with the encrypted channel . The connection is shutdown cleanly when [ f ] returns . encrypted channel. The connection is shutdown cleanly when...
3b95ffb4326fb08427ed33cbceb44df7cf723c36d58382b6b9df91a63dc2f121
tweag/ormolu
type-operators3.hs
# LANGUAGE TypeFamilies , TypeOperators , NoStarIsType , PolyKinds # class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = ()
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/class/type-operators3.hs
haskell
# LANGUAGE TypeFamilies , TypeOperators , NoStarIsType , PolyKinds # class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = ()
17d1015de2946d333a0fa0d0ad2927f15443b480730f1bffa70501ea3846e45a
charlieg/Sparser
form-rules.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1992,1993,1994 -- all rights reserved ;;; ;;; File: "form rules" ;;; Module: "analyzers;psp:edges:" Version : 0.3 August 1994 ;; initiated 10/12/92 v2.3 0.1 ( ) allowed a default if the rule does n't specify the form ;...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/rules/edges/form-rules.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "form rules" Module: "analyzers;psp:edges:" initiated 10/12/92 v2.3 of the new edge a keyword
copyright ( c ) 1992,1993,1994 -- all rights reserved Version : 0.3 August 1994 0.1 ( ) allowed a default if the rule does n't specify the form 0.2 ( 6/16 ) added variation for explicitly specified lhs . ( 3/30/94 ) fixed missing arg in break stmt . 0.3 ( 8/5 ) for the ' .. explicit - lhs ' ...
b0cfb22cd1e05b5ca29e315707f36dde9260b8c740e5dd66910db9b6776f87a5
haskell/hackage-security
StrictMVar.hs
module TestSuite.Util.StrictMVar ( MVar -- opaque , newMVar , CC.withMVar , modifyMVar , modifyMVar_ , CC.readMVar ) where import Control.Concurrent (MVar) import Control.Exception import qualified Control.Concurrent as CC newMVar :: a -> IO (MVar a) newMVar x = CC.newMVar =<< evaluate x modifyMVar :...
null
https://raw.githubusercontent.com/haskell/hackage-security/048844cb006eb880e256d7393928d6fd422ab6dd/hackage-security/tests/TestSuite/Util/StrictMVar.hs
haskell
opaque
module TestSuite.Util.StrictMVar ( , newMVar , CC.withMVar , modifyMVar , modifyMVar_ , CC.readMVar ) where import Control.Concurrent (MVar) import Control.Exception import qualified Control.Concurrent as CC newMVar :: a -> IO (MVar a) newMVar x = CC.newMVar =<< evaluate x modifyMVar :: MVar a -> (a -> I...
d025f3c26c9ac77b90778a44336a3e894edfc864fff66c3850a136d014cf92c2
apache/couchdb-mochiweb
mochiweb_socket.erl
@copyright 2010 Mochi Media , Inc. @doc MochiWeb socket - wrapper for plain and ssl sockets . -module(mochiweb_socket). -export([listen/4, accept/1, transport_accept/1, finish_accept/1, recv/3, send/2, close/1, port/1, peername/1, setopts/2, getopts/2, type/1, exit_if_closed/1]). -def...
null
https://raw.githubusercontent.com/apache/couchdb-mochiweb/fce80ef5e2c105405a39d3cdf4615f21e0d1d734/src/mochiweb_socket.erl
erlang
Filter old map style cipher suites add_safe_protocol_versions/1 must have been called to ensure a {versions, _} tuple is present Filter new map style cipher suites Provided for backwards compatibility only
@copyright 2010 Mochi Media , Inc. @doc MochiWeb socket - wrapper for plain and ssl sockets . -module(mochiweb_socket). -export([listen/4, accept/1, transport_accept/1, finish_accept/1, recv/3, send/2, close/1, port/1, peername/1, setopts/2, getopts/2, type/1, exit_if_closed/1]). -def...
afc51ebfda4b43e81b2df1b5a53e832e2e97a64a09fe92bc9191140baff1fd5c
freizl/dive-into-haskell
Main.hs
module Main where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Monad.Trans.State import System.Environment import System.IO import System.Random import Text.Read (readEither) type Score = Int type PlayName = String data AppState = AppState { scores :: [(PlayNa...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/26/morra/Main.hs
haskell
maybe try
module Main where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Monad.Trans.State import System.Environment import System.IO import System.Random import Text.Read (readEither) type Score = Int type PlayName = String data AppState = AppState { scores :: [(PlayNa...
8dd0920d7554aac928fc8654786d2847a255a2ead9ca1cbde156216872575ca8
deadpendency/deadpendency
AssessDependencies.hs
# OPTIONS_GHC -fno - warn - missing - export - lists # module Gen.Effect.AssessDependencies where import CommonTest.Gen.General import CommonTest.Gen.Model.Assessment import Hedgehog import Hedgehog.Range qualified as Range import RG.Effect.AssessDependencies.Model.AssessDependenciesResult genAssessDependenciesResul...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/report-generator/test/Gen/Effect/AssessDependencies.hs
haskell
# OPTIONS_GHC -fno - warn - missing - export - lists # module Gen.Effect.AssessDependencies where import CommonTest.Gen.General import CommonTest.Gen.Model.Assessment import Hedgehog import Hedgehog.Range qualified as Range import RG.Effect.AssessDependencies.Model.AssessDependenciesResult genAssessDependenciesResul...
5479b0059048a0d42ba4e7122319c19696c9ef4eef45c42a30e552f4f13a50fe
basho/riak_search
riak_search_op_proximity.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . %% %% ------------------------------------------------------------------- -module(riak_search_op_proximity). -export([ extract_scoring_props/1, pre...
null
https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/src/riak_search_op_proximity.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- Conduct a proximity match over the terms. The #proximity operator expects to be handed a list of #term operators. The #term operator reads a sorted list of results from the inde...
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . -module(riak_search_op_proximity). -export([ extract_scoring_props/1, preplan/2, chain_op/4 ]). -include("riak_search.hrl"). -ifdef(TEST). -ifdef(EQC). -include_lib("eqc/include/eqc.hrl"). -endif. -inclu...
bdef65c189fd7a36d6aeb023d25dc51d37efc7a086d2717c5f9cc45165ab502a
dyzsr/ocaml-selectml
errortrace.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/typing/errortrace.ml
ocaml
************************************************************************ OCaml ...
, projet Cambium , Inria Paris Antal Spector - Zabusky , , New York Copyright 2018 Institut National de Recherche en Informatique et Copyright 2021 Jane Street Group LLC the GNU Lesser General Public License ve...
641c8c4ff54621dfa75bd97619e8916dabb58343cbe490ac562fb01e85c5d28f
ocsigen/eliom
eliommod_gc.mli
Ocsigen * * Module eliommod_gc.ml * Copyright ( C ) 2007 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of ...
null
https://raw.githubusercontent.com/ocsigen/eliom/a429f2d42757602410c25ef99982b100369ab6a3/src/lib/server/eliommod_gc.mli
ocaml
Ocsigen * * Module eliommod_gc.ml * Copyright ( C ) 2007 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of ...
0ef1a0e97124ee34890accc2c81c99df4ae0ea2c2d76e44623c74b08b3f8c820
crategus/cl-cffi-gtk
gtk.link-button.lisp
;;; ---------------------------------------------------------------------------- ;;; gtk.link-button.lisp ;;; ;;; The documentation of this file is taken from the GTK 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK library . ;;; See <>. The API documentation of the Lisp binding is...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.link-button.lisp
lisp
---------------------------------------------------------------------------- gtk.link-button.lisp The documentation of this file is taken from the GTK 3 Reference Manual See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms ...
Version 3.24 and modified to document the Lisp binding to the GTK library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for us...
e55c1f24593b6df8302c4ace3a59001e5eb937b919c945f8722ae44d29f88967
sacerdot/CovidMonitoring
test.erl
-module(test). -export([test/0]). test() -> spawn(server, start, []), util:sleep(1000), spawn(hospital, start, []), spawn(places, start, []), spawn(users, start, []).
null
https://raw.githubusercontent.com/sacerdot/CovidMonitoring/fe969cd51869bbe6479da509c9a6ab21d43e6d11/BecciBugo/test.erl
erlang
-module(test). -export([test/0]). test() -> spawn(server, start, []), util:sleep(1000), spawn(hospital, start, []), spawn(places, start, []), spawn(users, start, []).
a21d383cefa596b4447a07921be9ebc95b56cdf5094cab3afb262a5c4f2c5817
bennn/iPoe
form.rkt
#lang racket/base ;; Struct representing poem forms and a parser to read ;; an input port into a form. (provide (struct-out form) ;; Data structure representing a poem form (aka specification) make-form ;; (-> Input-Port Form) ;; Parse a poem form structure from an input stream form->validator ;; (->...
null
https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/ipoe/private/poem/form.rkt
racket
Struct representing poem forms and a parser to read an input port into a form. Data structure representing a poem form (aka specification) (-> Input-Port Form) Parse a poem form structure from an input stream (-> Form #'(-> Input-Port Poem)) Return a function to read and validate input given a poem spec Syntax...
#lang racket/base (provide (struct-out form) make-form form->validator validator-requires ) (require ipoe/private/poem ipoe/private/poem/rhymecheck ipoe/private/poem/spellcheck ipoe/private/poem/poetic-license ipoe/private/parameters ipoe/private/db (only-in ipoe/private/ui user-error) ...
fb34a7affd77ee0a5b051c0bfd08cab9a605de4279651cb77a0fb881d8ed0f14
zkincaid/duet
lirrSolver.mli
open Syntax module Model : sig type t val evaluate_formula : 'a context -> t -> 'a formula -> bool val nonnegative_cone : t -> PolynomialCone.t end module Solver : sig type 'a t val mk_solver : 'a context -> 'a t val add : 'a t -> 'a formula list -> unit val get_model : 'a t -> [ `Sat of Model.t | `Unsa...
null
https://raw.githubusercontent.com/zkincaid/duet/162d3da830f12ab8e8d51f7757cddcb49c4084ca/srk/src/lirrSolver.mli
ocaml
open Syntax module Model : sig type t val evaluate_formula : 'a context -> t -> 'a formula -> bool val nonnegative_cone : t -> PolynomialCone.t end module Solver : sig type 'a t val mk_solver : 'a context -> 'a t val add : 'a t -> 'a formula list -> unit val get_model : 'a t -> [ `Sat of Model.t | `Unsa...
98b822899a5e17c2cd8bc6ad91eb1a0a9ee27d3871f3ee6334ecb7f8241b8b59
eliast/edoop
edoop.erl
-module(edoop). -export([run/3]). run(_Args, Mapper, _Reducer) when _Args =:= "map" -> map(io:get_line(''), Mapper); run(_Args, _Map, _Reducer) when _Args =:= "reduce" -> groupby(io:get_line(""), _Reducer). map(eof, _Mapper) -> halt(0); map({error, _Reason}, _Mapper) -> halt(1); map(Line, _Mapper) -> _Map...
null
https://raw.githubusercontent.com/eliast/edoop/7af28b6782427bd09f56beedbc9a47da26806820/edoop.erl
erlang
Assumed to be a string
-module(edoop). -export([run/3]). run(_Args, Mapper, _Reducer) when _Args =:= "map" -> map(io:get_line(''), Mapper); run(_Args, _Map, _Reducer) when _Args =:= "reduce" -> groupby(io:get_line(""), _Reducer). map(eof, _Mapper) -> halt(0); map({error, _Reason}, _Mapper) -> halt(1); map(Line, _Mapper) -> _Map...
2c9ece1d5170039d85d13a97633aa3791778f4e75129f68b6881c2f258393462
thi-ng/demos
query.cljs
(ns ws-ldn-2.views.query (:require-macros [reagent.ratom :refer [reaction]] [cljs-log.core :refer [debug info warn]]) (:require [ws-ldn-2.state :as state] [ws-ldn-2.utils :as utils] [ws-ldn-2.components.dropdown :as dd] [ws-ldn-2.components.editor :as editor] [reagent.core :as r])) (defn resul...
null
https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-2/src/cljs/ws_ldn_2/views/query.cljs
clojure
(ns ws-ldn-2.views.query (:require-macros [reagent.ratom :refer [reaction]] [cljs-log.core :refer [debug info warn]]) (:require [ws-ldn-2.state :as state] [ws-ldn-2.utils :as utils] [ws-ldn-2.components.dropdown :as dd] [ws-ldn-2.components.editor :as editor] [reagent.core :as r])) (defn resul...
43c89543480db05d17729fb20ce97cc6e083e8148506dcfb595693aa9552cbe7
ferd/recon
recon.erl
@author < > %%% [/] %%% @doc Recon, as a module, provides access to the high-level functionality %%% contained in the Recon application. %%% It has functions in five main categories : %%% %%% <dl> %%% <dt>1. State information</dt> %%% <dd>Process information is everything that has to do with the %%% ...
null
https://raw.githubusercontent.com/ferd/recon/fa31440688d461e13785d532a1c980c1ddebef81/src/recon.erl
erlang
[/] @doc Recon, as a module, provides access to the high-level functionality contained in the Recon application. <dl> <dt>1. State information</dt> <dd>Process information is everything that has to do with the general state of the node. Functions such as {@link info/1} and {@link info...
@author < > It has functions in five main categories : ` erlang : process_info/1 ' , while providing it in a production - safe manner . They have equivalents to ` erlang : process_info/2 ' in the functions { @link info/2 } and { @link info/4 } , respectively.</dd > < proc_cou...
d34e82aafef31aa93bc3f1876f9bf63b3d377271940daef3f5f2968ba9124b8a
janestreet/stdio
in_channel.ml
open! Base type t = Stdlib.in_channel let equal (t1 : t) t2 = phys_equal t1 t2 let seek = Stdlib.LargeFile.seek_in let pos = Stdlib.LargeFile.pos_in let length = Stdlib.LargeFile.in_channel_length let stdin = Stdlib.stdin let create ?(binary = true) file = let flags = [ Open_rdonly ] in let flags = if binary the...
null
https://raw.githubusercontent.com/janestreet/stdio/89e153e382457427cf4e5550842f538dec25d661/src/in_channel.ml
ocaml
open! Base type t = Stdlib.in_channel let equal (t1 : t) t2 = phys_equal t1 t2 let seek = Stdlib.LargeFile.seek_in let pos = Stdlib.LargeFile.pos_in let length = Stdlib.LargeFile.in_channel_length let stdin = Stdlib.stdin let create ?(binary = true) file = let flags = [ Open_rdonly ] in let flags = if binary the...
5835f6000c0ca1c59919c69ff1ee92a7ccf0ecbf8db1dfc847d5b34673725c42
craigfe/oskel
oskel.ml
module License = License module Utils = Utils module Opam = Opam open Utils let stdout_is_tty = Unix.(isatty stdout) let progress_bar msg : (unit -> unit Lwt.t) * bool ref * bool ref = let ( >>= ) = Lwt.bind in let finished = ref false in let active = ref false in let shown_once = ref false in let rec frame...
null
https://raw.githubusercontent.com/craigfe/oskel/057129faaf8171ff4ed49022346e9179b04735b2/lib/oskel.ml
ocaml
Initial space Logs_lwt.app (fun m -> m "%s %s\r" (List.hd frames) msg)
module License = License module Utils = Utils module Opam = Opam open Utils let stdout_is_tty = Unix.(isatty stdout) let progress_bar msg : (unit -> unit Lwt.t) * bool ref * bool ref = let ( >>= ) = Lwt.bind in let finished = ref false in let active = ref false in let shown_once = ref false in let rec frame...
1da8b28a5e00730d171c3af87bf99447f761dd6114a4efa89253fd9fea3f685d
mikera/core.matrix
pprint.clj
(ns clojure.core.matrix.impl.pprint (:require [clojure.core.matrix.protocols :as mp]) (:import [java.lang StringBuilder] [clojure.lang IPersistentVector])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (def ^String NL (System/getProperty "line.separator")) ;; pretty-printing ...
null
https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/main/clojure/clojure/core/matrix/impl/pprint.clj
clojure
pretty-printing utilities for matrices explicity turned off column names 1D = single row no columns names present and not forced
(ns clojure.core.matrix.impl.pprint (:require [clojure.core.matrix.protocols :as mp]) (:import [java.lang StringBuilder] [clojure.lang IPersistentVector])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (def ^String NL (System/getProperty "line.separator")) (defn- format-num ...
4d588f62843b565667781d831d55f251d8f9d1ad8d70e10221c290d69073f18d
davidlazar/ocaml-semantics
arith05.ml
2/3 + 3/2
null
https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/arith05.ml
ocaml
2/3 + 3/2
8d0fde678c1a730e533256a8dee62256509d60f6c720f090cc4a33c2d44019bc
borkdude/speculative-kaocha-plugin
unit.cljc
(ns speculative_kaocha.unit (:require [clojure.test :as t :refer [deftest is are testing]] [respeced.test :refer [caught?]])) (deftest instrumented-test (is (caught? `flatten (flatten 1))))
null
https://raw.githubusercontent.com/borkdude/speculative-kaocha-plugin/9cd46d277afbb315f9b3d67eda08bb4bb532a579/test/speculative_kaocha/unit.cljc
clojure
(ns speculative_kaocha.unit (:require [clojure.test :as t :refer [deftest is are testing]] [respeced.test :refer [caught?]])) (deftest instrumented-test (is (caught? `flatten (flatten 1))))
9df8c6b609223dc43433f0c34a8d288786cc49b75bbe5f1f50729962ea342a35
melange-re/melange
typeof_test.ml
let string_or_number (type t) x = let ty = Js.Types.classify x in match ty with | JSString v -> Js.log (v ^ "hei") ; true (* type check *) | JSNumber v -> Js.log (v +. 3.); true (* type check *) | JSUndefined -> false | JSNull -> false | JSFalse | JSTrue -> false | JSFunction _ -> Js.log ("Fu...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/typeof_test.ml
ocaml
type check type check assert.notDeepEqual(undefined,null) raises ..
let string_or_number (type t) x = let ty = Js.Types.classify x in match ty with | JSUndefined -> false | JSNull -> false | JSFalse | JSTrue -> false | JSFunction _ -> Js.log ("Function"); false | JSObject _ -> false | JSSymbol _ -> false let suites = Mt.[ "int_type", (fun _ -> Eq(Js.typ...
9dd8bb4e8cb8e44724282a9a780f4a78e151d906fcab46b171897ef1b64d9d91
xach/zaws
credentials.lisp
;;;; Copyright ( c ) 2012 , All Rights Reserved ;;;; ;;;; Redistribution and use in source and binary forms, with or without ;;;; modification, are permitted provided that the following conditions ;;;; are met: ;;;; ;;;; * Redistributions of source code must retain the above copyright ;;;; notice, this list o...
null
https://raw.githubusercontent.com/xach/zaws/a13ff49b975b5385d486ded2181dce88e614bd31/credentials.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form...
Copyright ( c ) 2012 , All Rights Reserved DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package #:zaws) (defvar *credentials* nil "The credentials used for authenticating AWS requests. Built-in credentials can b...
49f4c72b554dd17708ce01d2b08809615289a453ec0f09d6d655682647fefc4e
elastic/es2unix
util.clj
(ns es.util) (defn maybe-get-in ([m & ks] (or (get-in m ks) " "))) (defn match-any? "If any of the string frags match string thing or there are no frags, return the thing. Otherwise nil." ([thing frags] (if (seq frags) (if (some #(.contains thing %) frags) thing) thing))) (de...
null
https://raw.githubusercontent.com/elastic/es2unix/87cd8d17faa07f964ac85505b744b6a4dfe813d4/src/es/util.clj
clojure
(ns es.util) (defn maybe-get-in ([m & ks] (or (get-in m ks) " "))) (defn match-any? "If any of the string frags match string thing or there are no frags, return the thing. Otherwise nil." ([thing frags] (if (seq frags) (if (some #(.contains thing %) frags) thing) thing))) (de...
1ecf95d2d3b79a0dee3cd95600bceaf8aa5e3ebd5d0288b434975f7b4a608b40
blambo/accelerate-repa
07_ScanFunctions.hs
import Data.Array.Accelerate as Acc hiding (fst, snd) import Data.Array.Accelerate.Repa as Repa main :: IO () main = do putStrLn "---SCANL---" putStrLn $ Repa.run $ Acc.scanl (+) (constant (0 :: Int)) $ generate (index1 10) (\_ -> 1) ' putStrLn "---SCANL'---" putStrLn $ Repa.run $ fst $ Acc.scanl...
null
https://raw.githubusercontent.com/blambo/accelerate-repa/5ea4d40ebcca50d5b952e8783a56749cea4431a4/examples/operations/07_ScanFunctions.hs
haskell
import Data.Array.Accelerate as Acc hiding (fst, snd) import Data.Array.Accelerate.Repa as Repa main :: IO () main = do putStrLn "---SCANL---" putStrLn $ Repa.run $ Acc.scanl (+) (constant (0 :: Int)) $ generate (index1 10) (\_ -> 1) ' putStrLn "---SCANL'---" putStrLn $ Repa.run $ fst $ Acc.scanl...
44dfeec6e3c5ddf3d7dfcc9375e30c73edb446e493a0da25fec602d71509b3c1
racket/racket7
create.rkt
#lang racket/base (require racket/match racket/format racket/file setup/pack file/zip file/tar openssl/sha1 "../strip.rkt" "metadata.rkt" "print.rkt" "params.rkt" "pkg-db.rkt" "lock.rkt") (provide pkg-create) (...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/pkg/private/create.rkt
racket
To make checksums more consistent, set a directory's timestamp to the latest time of any of its source files. We need to add a layer for zip/tgz if the package content is a single directory, which is an unlikely case. When only Racket v6.0.1.12 is later is relevant, we might prefer to always add a layer for consi...
#lang racket/base (require racket/match racket/format racket/file setup/pack file/zip file/tar openssl/sha1 "../strip.rkt" "metadata.rkt" "print.rkt" "params.rkt" "pkg-db.rkt" "lock.rkt") (provide pkg-create) (...
25d253efc138d736f2d8ee910e80d2b2f9996c617e07335b53a8099746088478
haskell-foundation/foundation
MemoryMap.hs
# LANGUAGE CPP # module Foundation.Foreign.MemoryMap ( fileMapRead , FileMapping(..) , fileMappingToFinalPtr ) where import Foundation.Foreign.MemoryMap.Types #ifdef mingw32_HOST_OS import Foundation.Foreign.MemoryMap.Windows #else import Foundation.Foreign.MemoryMap.Posix #endif fileMap : : Fd - > ...
null
https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/Foreign/MemoryMap.hs
haskell
# LANGUAGE CPP # module Foundation.Foreign.MemoryMap ( fileMapRead , FileMapping(..) , fileMappingToFinalPtr ) where import Foundation.Foreign.MemoryMap.Types #ifdef mingw32_HOST_OS import Foundation.Foreign.MemoryMap.Windows #else import Foundation.Foreign.MemoryMap.Posix #endif fileMap : : Fd - > ...
bc34ebb251221c1cff3574b37acb348f71f79fa7433b09fb9b24dcadc077fdef
turion/rhine
ResamplingBuffer.hs
{- | This module introduces 'ResamplingBuffer's, which are primitives that consume and produce data at different rates. Just as schedules form the boundaries between different clocks, (resampling) buffers form the boundaries between synchronous signal functions ticking at different speeds. -} {-# LANGUAGE RankNTypes #...
null
https://raw.githubusercontent.com/turion/rhine/068d9751f2c082be7563e872a85bfda8777a721b/rhine/src/FRP/Rhine/ResamplingBuffer.hs
haskell
| This module introduces 'ResamplingBuffer's, which are primitives that consume and produce data at different rates. Just as schedules form the boundaries between different clocks, (resampling) buffers form the boundaries between synchronous signal functions ticking at different speeds. # LANGUAGE RankNTypes # rhine...
# LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module FRP.Rhine.ResamplingBuffer ( module FRP.Rhine.ResamplingBuffer , module FRP.Rhine.Clock ) where import FRP.Rhine.Clock . Call it , @clb@ etc . when they are ' In ' or ' Out ' clocks , i.e. associated to particular boundary types @a@ , etc . ...
325f7e0195409e28695dfa74aa4f4ea89fb50123517af605a2dfce17e5223be5
jbclements/RSound
fsound.rkt
#lang racket/base ;; floating point double sounds. parallel development, for now. (require (only-in ffi/unsafe memcpy _double memset ptr-add ctype-sizeof) ffi/vector ;"read-wav.rkt" " write-wav.rkt " ;"network.rkt" "rsound.rkt" "define-argcheck.rkt" "common.rkt" ...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/fsound.rkt
racket
floating point double sounds. parallel development, for now. "read-wav.rkt" "network.rkt" TODO : C code for adding doubles "private/double-add.rkt" racket/match racket/list will we actually enforce clipping at this value? an fsound provides a representation for sounds that leaves them packed as C data, in double ...
#lang racket/base (require (only-in ffi/unsafe memcpy _double memset ptr-add ctype-sizeof) ffi/vector " write-wav.rkt " "rsound.rkt" "define-argcheck.rkt" "common.rkt" (only-in "rsound-commander.rkt" channels) racket/contract) (provide (struct-out fsound) ...
ff0db66b8ff7ba25829b654ec46120f72dceed9892c4fa7e5cbc4c6457380468
ztellman/penumbra
marble.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by...
null
https://raw.githubusercontent.com/ztellman/penumbra/db43d01c280305beab26d1004ae78b1777ab3fc7/test/example/opengl/marble.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns example.opengl.marble (:use [penumbra opengl compute] [penumbra.opengl core] [cantor]) (:require [penumbra.app :as app] [penumbra.text :as text] [penumbra.data :as data])) (defn reshape [[x y w h] state] (frustum-view 60....
d7d363b3059729070d136882e194f1d272327ded84d4e5c0727afffa6c18bf3e
dgiot/dgiot
modbus_tcp.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . %% 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...
null
https://raw.githubusercontent.com/dgiot/dgiot/2fda1eed7afdb6b1385020dbddb44fc14b0a4719/apps/dgiot_modbus/src/modbus/modbus_tcp.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 ...
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(modbus_tcp). -author("jonhl"). -define(consumer(ChannelId), <<"modbus_consumer_", Chan...
692e789a1dda00786ad8ed4a56aefa78525461db6cd408735571cfd0e111685d
glotcode/glot-www
Meta.hs
module Handler.Meta where import Import import Util.Handler (title) import qualified Util.Handler as Handler getMetaAboutR :: Handler Html getMetaAboutR = defaultLayout $ do setTitle $ title "About" Handler.setCanonicalUrl MetaAboutR $(widgetFile "meta/about") getMetaApiDocsR :: Handler ...
null
https://raw.githubusercontent.com/glotcode/glot-www/cef0d7d00c0b0501fa2fdc407a26d13b19b84bd9/Handler/Meta.hs
haskell
module Handler.Meta where import Import import Util.Handler (title) import qualified Util.Handler as Handler getMetaAboutR :: Handler Html getMetaAboutR = defaultLayout $ do setTitle $ title "About" Handler.setCanonicalUrl MetaAboutR $(widgetFile "meta/about") getMetaApiDocsR :: Handler ...
5760ac8fc0be7d0fc76c88c290f59fcb51ecfdad0cb1cf7e50bd810f47883425
weblocks-framework/weblocks
company.lisp
(in-package :weblocks-demo-popover) ;;; All companies (defun all-companies (&optional arg) "Accepts an argument (passed by dropdown choices) and returns all available companies." (declare (ignore arg)) (find-persistent-objects (sandbox-store) 'company :order-by (cons 'name :asc))) ;;...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/yarek/examples/weblocks-demo-popover/src/model/company.lisp
lisp
All companies Company Table View Form View
(in-package :weblocks-demo-popover) (defun all-companies (&optional arg) "Accepts an argument (passed by dropdown choices) and returns all available companies." (declare (ignore arg)) (find-persistent-objects (sandbox-store) 'company :order-by (cons 'name :asc))) (defclass company ()...
5326f5095dea2b81510d3bd25eba9bda8f99f48329929fe39e6136d52c50f371
gafiatulin/codewars
Tube.hs
-- Tube strike options calculator -- / module Codewars.Kata.Tube where import Codewars.Kata.Tube.Types calculator :: Double -> Double -> Double -> Decision calculator distance busDrive busWalk | 60 * (distance / 5) < 10 = Walk | 60 * (distance / 5) > 120 = Bus ...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Tube.hs
haskell
Tube strike options calculator /
module Codewars.Kata.Tube where import Codewars.Kata.Tube.Types calculator :: Double -> Double -> Double -> Decision calculator distance busDrive busWalk | 60 * (distance / 5) < 10 = Walk | 60 * (distance / 5) > 120 = Bus | (distance / 5) <= (...
fa9fc5e7515e78d855670121d43e4b31e8472f0a39fe1ee8e24c7af435cea416
TrustInSoft/tis-kernel
projectified_status.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/report/tests/report/projectified_status.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 open Cil_types let emitter = Emitter.create "Test" [ Emitter.Property_status ] ~correctness:[ ...
2f62089779e86e05beb179194c302d41fa45a9d4cf68943a8cdcfeb29fe8115d
TheMatten/first-class-instances
TH.hs
# language CPP , NoMonoLocalBinds , TemplateHaskell # -- | TH for dictionary representation generation. This module is internal and -- provides no guarantees about stability and safety of it's interface. module FCI.Internal.TH ( mkInst , unsafeMkInst , getClassDictInfo , dictInst ) where import Language.H...
null
https://raw.githubusercontent.com/TheMatten/first-class-instances/887983f0abf45e356e1ca8a085f0cf904db3efde/src/FCI/Internal/TH.hs
haskell
| TH for dictionary representation generation. This module is internal and provides no guarantees about stability and safety of it's interface. ----------------------------------------------------------------------------- representation is record of class members following simple format: * name of record construct...
# language CPP , NoMonoLocalBinds , TemplateHaskell # module FCI.Internal.TH ( mkInst , unsafeMkInst , getClassDictInfo , dictInst ) where import Language.Haskell.TH.Syntax import Control.Monad (when, unless) import Control.Monad.ST (runST) import Data.Char ...
3e8e3352e57fae600bb559e96f8e75480bfb63cfaf2aedec5a6b152f5fc1f574
dalaing/little-languages
Strict.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Small - step rules and helpers for the NB language . This is the strict evaluation variant . Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Por...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/nb/src/Term/Eval/SmallStep/Strict.hs
haskell
from 'base' local | The small-step rule for the 'pred O' case. | The small-step rule for the 'pred S' case. | The small-step rule for the 'S tm' where tm is not a value. | The small-step rule for the 'pred tm' where tm is not a value. | The small-step rule for the 'if true' case. | The small-step rule for the '...
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Small - step rules and helpers for the NB language . This is the strict evaluation variant . Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Por...
5edb05990dd1e8868cb48bc032fa2c95cb0742ebe2786a202727dbd35ab753a9
finnishtransportagency/harja
paallystys_ja_paikkaus_test.clj
(ns harja.domain.paallystys-ja-paikkaus-test (:require [clojure.test :refer [deftest is]] [harja.testi :refer :all] [harja.domain.paallystys-ja-paikkaus :as paallystys-ja-paikkaus])) (deftest muutos-kokonaishintaan-laskettu-oikein (let [tyot [{:tilattu-maara 10 :toteutunut-maara 15 :yksikko...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/test/clj/harja/domain/paallystys_ja_paikkaus_test.clj
clojure
Vain ennustettu -- Eipä kaaduta outoihin syötteisiin --
(ns harja.domain.paallystys-ja-paikkaus-test (:require [clojure.test :refer [deftest is]] [harja.testi :refer :all] [harja.domain.paallystys-ja-paikkaus :as paallystys-ja-paikkaus])) (deftest muutos-kokonaishintaan-laskettu-oikein (let [tyot [{:tilattu-maara 10 :toteutunut-maara 15 :yksikko...
7352485a1bec22f4b4db784848ced539ce72c0f4458af3438cb0bf60dd68ee64
project-oak/hafnium-verification
accessPathTestUtils.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/unit/accessPathTestUtils.ml
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
a619a986a66f10166f29e1d6456eb4d0d9e016eee8193535509009611fa9229c
anurudhp/CPHaskell
c.hs
import Control.Arrow ((>>>)) main :: IO () main = interact $ lines >>> drop 1 >>> map (words >>> map read) >>> process >>> map (map show >>> unwords) >>> unlines process :: [[Int]] -> [[Int]] process [] = [] process ([n, _]:xss) = let (xs, xss') = splitAt n xss in solve xs ++ process xss' solve :: [[I...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/codeforces/1438/c.hs
haskell
import Control.Arrow ((>>>)) main :: IO () main = interact $ lines >>> drop 1 >>> map (words >>> map read) >>> process >>> map (map show >>> unwords) >>> unlines process :: [[Int]] -> [[Int]] process [] = [] process ([n, _]:xss) = let (xs, xss') = splitAt n xss in solve xs ++ process xss' solve :: [[I...
44f13523b53c07006ce36fa768d6cd5e28e2d83e6c09089783e2255fa205d476
frenchy64/Logic-Starter
decl_model.clj
(ns logic-introduction.decl-model (:refer-clojure :exclude [== compile]) (:import [java.io Writer]) (:use [clojure.walk :only [walk prewalk postwalk]] [clojure.core.match [core :exclude [swap]]])) ;; See bottom of file for some thoughts (defprotocol LConsP (lfirst [this]) (lrest [this])) (defproto...
null
https://raw.githubusercontent.com/frenchy64/Logic-Starter/cc3999836759965e7dcc1a7d1c9731216681dcf8/src/logic_introduction/decl_model.clj
clojure
See bottom of file for some thoughts Polymorphic type TODO disequality Numbers Logical view: statement of logic Operational view: execution on a computer # Example with Functional Programming ## Logical semantics Return value is a appended to b ## Operational semantics If a is empty, return b, otherwise ...
(ns logic-introduction.decl-model (:refer-clojure :exclude [== compile]) (:import [java.io Writer]) (:use [clojure.walk :only [walk prewalk postwalk]] [clojure.core.match [core :exclude [swap]]])) (defprotocol LConsP (lfirst [this]) (lrest [this])) (defprotocol LConsPrint (toShortString [this]))...
5fa122191382ec613d76eb349dbe1e74251c97584478c3300884a75d03d96d48
gsakkas/rite
20060313-20:23:36-95bbcfafa3a38ccac06f556bd50a04cc.seminal.ml
exception InvalidVariable type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt type heapElement = IntEntry of int | HeapEnt...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060313-20%3A23%3A36-95bbcfafa3a38ccac06f556bd50a04cc.seminal.ml
ocaml
type heap = (string * int) list
exception InvalidVariable type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt type heapElement = IntEntry of int | HeapEnt...
33f215b960c3ee8e2a4d1d5784fb0512f1f69766af31b13e23b4797d0eb94f9e
project-oak/hafnium-verification
starvationDomain.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/concurrency/starvationDomain.ml
ocaml
* given the current thread state [caller_thread] and the thread state under which a critical pair occurred, [pair_thread], decide whether to throw away the pair (returning [None]) because it cannot occur within a call from the current state, or adapt its thread state appropriately. callee pair knows more ...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
30fa55b1caef7d2b32eb121f85562fb40dc7d606e1fc986b411920780db553a1
jeaye/orchestra
core.cljc
(ns orchestra.core (:require [orchestra.detail :as detail])) (defmacro defn-spec "Defines a function and the associated spec. Example usage: (defn-spec str->kw keyword? [s string?] (keyword s)) Multiple arities are also supported: (defn-spec inc' number? ([a number?] (inc' a 1))...
null
https://raw.githubusercontent.com/jeaye/orchestra/81e5181f7b42e5e2763a2b37db17954f3be0314e/src/cljc/orchestra/core.cljc
clojure
ClojureScript. There doesn't seem to be an official way to check this.
(ns orchestra.core (:require [orchestra.detail :as detail])) (defmacro defn-spec "Defines a function and the associated spec. Example usage: (defn-spec str->kw keyword? [s string?] (keyword s)) Multiple arities are also supported: (defn-spec inc' number? ([a number?] (inc' a 1))...
b90de5e631ff290d8cbefb3a01fe378addffe60a592e03297be1cd4ce2fc335a
blarney-lang/blarney
NetInline.hs
# LANGUAGE NoRebindableSyntax # | Module : . Netlist . Passes . NetInline Description : A blarney netlist pass to inline a Net into an other Net 's inputs Copyright : ( c ) , 2020 - 2021 License : MIT Stability : experimental ' MNetlistPass ' embedding ' Net 's with a single referenc...
null
https://raw.githubusercontent.com/blarney-lang/blarney/abc7f91485e48a6013b1a05c1b5e6a71dd55f68f/Haskell/Blarney/Netlist/Passes/NetInline.hs
haskell
| Helper to inline a 'Net''s inputs read ref count for our referenced 'Net' attempt inlining our referenced 'Net', and its inputs recursively, also returning if inlining could happen as a Bool | Single-reference 'Net' inlining pass reference count for each 'Net' list of nets with their index Inline each "inlina...
# LANGUAGE NoRebindableSyntax # | Module : . Netlist . Passes . NetInline Description : A blarney netlist pass to inline a Net into an other Net 's inputs Copyright : ( c ) , 2020 - 2021 License : MIT Stability : experimental ' MNetlistPass ' embedding ' Net 's with a single referenc...
c754d1060acf15c18f52c65e8a708fbc7dc3c429971d621e71686e2d39df7294
M4GNV5/Geschwindigkeitsficken
JSON.hs
module Brainfuck.Output.JSON (dumpStatements) where import Data.List import Data.Ratio import Control.Monad.State import qualified Data.Map.Lazy as M import qualified Data.Aeson as JSON import qualified Data.ByteString.Lazy.Char8 as BS import Brainfuck toJSON :: JSON.ToJSON a => a -> JSON.Value toJSON = JSON.toJSON...
null
https://raw.githubusercontent.com/M4GNV5/Geschwindigkeitsficken/1567ea4213f72212b43f97629809f255b6b5f8a3/src/Brainfuck/Output/JSON.hs
haskell
module Brainfuck.Output.JSON (dumpStatements) where import Data.List import Data.Ratio import Control.Monad.State import qualified Data.Map.Lazy as M import qualified Data.Aeson as JSON import qualified Data.ByteString.Lazy.Char8 as BS import Brainfuck toJSON :: JSON.ToJSON a => a -> JSON.Value toJSON = JSON.toJSON...
172f42ea916f9f79ad20a3c8ad4ea30f55cd6e14c1800383c0928d5e9f055550
gregtatcam/imaplet-lwt
lexable.ml
module type S = sig type t val to_lexbuf : t -> Lexing.lexbuf end
null
https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/parsemail/lexable.ml
ocaml
module type S = sig type t val to_lexbuf : t -> Lexing.lexbuf end
3183cfa484ed4930baf03d3746692733734967c8e7dd6172329941f43096161c
aconchillo/guile-oauth
response.scm
( oauth response ) --- Guile OAuth 1.0 implementation . Copyright ( C ) 2020 , 2021 Flaque < > ;; ;; This file is part of guile-oauth. ;; ;; guile-oauth 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 ...
null
https://raw.githubusercontent.com/aconchillo/guile-oauth/3a787b9d3579e703330fba288394af50dfcd0a83/oauth/oauth1/response.scm
scheme
This file is part of guile-oauth. guile-oauth is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. guile-oauth is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA...
( oauth response ) --- Guile OAuth 1.0 implementation . Copyright ( C ) 2020 , 2021 Flaque < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License OAuth 1.0 module for (define-module (oauth oauth1 response) #:use-mo...
0ad689689d6a23d5e222995b34f42b79b0ea4b200ded85247231e5c07f64cebb
Deducteam/Logipedia
matita.ml
module D = Core.Deps open Ast let sys = "matita" let sanitize id = if id = "return" || id = "and" then id ^ "_" else if String.sub id 0 1 = "_" then "j"^id else id let print_var oc id = Format.fprintf oc "%s" (sanitize id) let rec print_list sep pp oc = function | [] -> Format.fprintf oc "" | [x] -> Forma...
null
https://raw.githubusercontent.com/Deducteam/Logipedia/09797a35ae36ab671e40e615fcdc09a7bba69134/src/sttfa/export/matita.ml
ocaml
Some proofs are not in beta normal form FIXME: Probably there is something to do in case of a conflict name
module D = Core.Deps open Ast let sys = "matita" let sanitize id = if id = "return" || id = "and" then id ^ "_" else if String.sub id 0 1 = "_" then "j"^id else id let print_var oc id = Format.fprintf oc "%s" (sanitize id) let rec print_list sep pp oc = function | [] -> Format.fprintf oc "" | [x] -> Forma...
e279769460f989cf4458019d8b50df094e989f8241503c9c27d4dd5c73b42521
daangn/advent-of-code-2021
day3.ml
let test_input = "00100\n\ 11110\n\ 10110\n\ 10111\n\ 10101\n\ 01111\n\ 00111\n\ 11100\n\ 10000\n\ 11001\n\ 00010\n\ 01010" exception Invalid_input type bit = On | Off let parse input = input |> String.split_on_char '\n' |> List.map String.to_seq |> List.map (Seq.map (fu...
null
https://raw.githubusercontent.com/daangn/advent-of-code-2021/b0767fe707fe59ee46ee8dbfe9e70df14705e405/ocaml/lib/day3.ml
ocaml
let test_input = "00100\n\ 11110\n\ 10110\n\ 10111\n\ 10101\n\ 01111\n\ 00111\n\ 11100\n\ 10000\n\ 11001\n\ 00010\n\ 01010" exception Invalid_input type bit = On | Off let parse input = input |> String.split_on_char '\n' |> List.map String.to_seq |> List.map (Seq.map (fu...
77555cb54167498eb243486f2d8f71dd0f59f61d9eec9b1c3d9f5a2df6eb39c4
atdixon/me.untethr.nostr-relay
extra_test.clj
(ns test.extra-test (:require [clojure.test :refer :all] [me.untethr.nostr.extra :as extra] [me.untethr.nostr.util :as util])) (deftest query-params->filter (is (nil? (#'extra/query-params->filter nil))) (is (nil? (#'extra/query-params->filter {}))) (is (nil? (#'extra/query-params->filt...
null
https://raw.githubusercontent.com/atdixon/me.untethr.nostr-relay/1519b8f3ac42f64c81d077c872e0a446b0765565/test/test/extra_test.clj
clojure
(ns test.extra-test (:require [clojure.test :refer :all] [me.untethr.nostr.extra :as extra] [me.untethr.nostr.util :as util])) (deftest query-params->filter (is (nil? (#'extra/query-params->filter nil))) (is (nil? (#'extra/query-params->filter {}))) (is (nil? (#'extra/query-params->filt...
79bc85a623c27a0dc43eb1596fe13ebced7c7dd1b56d549ef495773235f403a3
argp/bap
optcomp_r.ml
* optcomp_r.ml * ------------ * Copyright : ( c ) 2009 , < > * Licence : BSD3 * optcomp_r.ml * ------------ * Copyright : (c) 2009, Jeremie Dimino <> * Licence : BSD3 *) Standalone version , revised syntax let module M = Camlp4OCamlRevisedParser.Make(Camlp4.PreCast.Syntax) in () let _ =...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/build/optcomp/optcomp_r.ml
ocaml
* optcomp_r.ml * ------------ * Copyright : ( c ) 2009 , < > * Licence : BSD3 * optcomp_r.ml * ------------ * Copyright : (c) 2009, Jeremie Dimino <> * Licence : BSD3 *) Standalone version , revised syntax let module M = Camlp4OCamlRevisedParser.Make(Camlp4.PreCast.Syntax) in () let _ =...
85a96741fd639ce74e37d1084085cbc94e6afce91525275c6cc3bf209c9eb3a5
ideas-edu/ideas
Evaluator.hs
# LANGUAGE GADTs , RankNTypes # ----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included...
null
https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Encoding/Evaluator.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional --------------------------------------------------------------------------- handle exceptions uncurry functio...
# LANGUAGE GADTs , RankNTypes # Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) modu...
b63620b157ae87e218440d036dbf65e05fad7de5c7d9cbdfb021b243b3005f04
yesodweb/yesod
Auth.hs
# LANGUAGE OverloadedStrings , TemplateHaskell , QuasiQuotes , TypeFamilies , MultiParamTypeClasses # module YesodCoreTest.Auth ( specs , Widget , resourcesApp ) where import Yesod.Core import Test.Hspec import Network.Wai.Test import Network.Wai import qualified Data.ByteString.Char8 as S8 import qual...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/test/YesodCoreTest/Auth.hs
haskell
^ method ^ path
# LANGUAGE OverloadedStrings , TemplateHaskell , QuasiQuotes , TypeFamilies , MultiParamTypeClasses # module YesodCoreTest.Auth ( specs , Widget , resourcesApp ) where import Yesod.Core import Test.Hspec import Network.Wai.Test import Network.Wai import qualified Data.ByteString.Char8 as S8 import qual...
6d8a933d0fcab6e0e444be5a17f40105d001d0fcf78ef14c50fa04ff7a701baf
OCamlPro/drom
commandTree.ml
(**************************************************************************) (* *) Copyright 2020 OCamlPro & Origin Labs (* *) (* All rights ...
null
https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/commandTree.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2020 OCamlPro & Origin Labs GNU Lesser General Public License version 2.1 , with the special open Ezcmd.V2 open Types open EzPrintTree let cmd_name = "tree" let string_of_version = function | Version -> "version" | Semantic (major, minor, fix) -> Printf.spr...
9739602e18f1d953aee3c6e2178521141b80c794de8fa4347e1024eac629bd5c
easyuc/EasyUC
test_common_module.ml
(* test_common_module.ml *) open Test_types open Unix exception Error of string (* print_expr together with print_list displays the content of a TEST file. This comes into the picture with DEBUG option *) let print_expr (e:expr) = match e with |Desc d -> print_string ("__description__\n"^ d ^"__end of d...
null
https://raw.githubusercontent.com/easyuc/EasyUC/f50a3391d01415a6531fbf8c6370874cfc5aed42/uc-dsl/testing/dsl-test-proj/src/test_common_module.ml
ocaml
test_common_module.ml print_expr together with print_list displays the content of a TEST file. This comes into the picture with DEBUG option get_desc is used in verbose mode to get desc of the TEST file The acceptable content of a directory are | TEST file + contents + optional sub directories | If...
open Test_types open Unix exception Error of string let print_expr (e:expr) = match e with |Desc d -> print_string ("__description__\n"^ d ^"__end of description__\n") |Args o -> print_endline "__args__"; List.iter print_endline o ; print_endline "__end of ARGS__" |Outcome (o1,o2) -> let...
ec1f4b632407cfa41d7091ab34a1a331f8c3a67e0851a555f276966c071b990d
albertoruiz/easyVision
Pure.hs
----------------------------------------------------------------------------- | Module : Image . Processing . IPP.Pure Copyright : ( c ) 2006 - 15 License : GPL Maintainer : < > Stability : provisional Module : Image.Processing.IPP.Pure Copyright : (c) Alberto ...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/ip/ippicv/src/Image/Processing/IPP/Pure.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- should be generic using clone ( must break cycle of import ) should be generic using clone (must break cycle of import) | image scaling | add constant | image s...
| Module : Image . Processing . IPP.Pure Copyright : ( c ) 2006 - 15 License : GPL Maintainer : < > Stability : provisional Module : Image.Processing.IPP.Pure Copyright : (c) Alberto Ruiz 2006-15 License : GPL Maintainer : Alberto Ruiz <> Stability : ...
7bb282357036d232f7b04680c7acea3be657ad6e5c63517796db946386acd18d
weblocks-framework/weblocks
number-range.lisp
(in-package :weblocks) (export '(number-range-presentation number-range-parser parse-float)) (defclass number-range-presentation (text-presentation input-presentation) () (:documentation "A presentation for number ranges.")) (defmethod render-view-field-value (value (presentation number-range-presentation) ...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/lpolzer/number-range.lisp
lisp
END defaults to the end of the string We don't accomplish this by sticking (end (length string)) in the lambda list because I've encountered too many implementations that don't handle such properly. Also, this will work ok if somebody calls the function with :end nil. Skip over whitespace. If there's nothing bu...
(in-package :weblocks) (export '(number-range-presentation number-range-parser parse-float)) (defclass number-range-presentation (text-presentation input-presentation) () (:documentation "A presentation for number ranges.")) (defmethod render-view-field-value (value (presentation number-range-presentation) ...
1ae40b5823b48f9135a5ff26968e90b8768b3d0713361a5aa35ae46a878b2498
chaoxu/fancy-walks
InverseFactoring.hs
module InverseFactoring where getTheNumber :: [Int] -> Int getTheNumber factors = maximum factors * minimum factors
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/www.topcoder.com/InverseFactoring.hs
haskell
module InverseFactoring where getTheNumber :: [Int] -> Int getTheNumber factors = maximum factors * minimum factors
ee3ce18d8d18b5eee289d0dcaeea79056d446c4dca0592babd84c84f9e862a67
OlafChitil/hat
DirectoryBuiltinTypes.hs
module DirectoryBuiltinTypes where data Permissions = Permissions { readable, writable, executable, searchable :: Bool }
null
https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/libraries/DirectoryBuiltinTypes.hs
haskell
module DirectoryBuiltinTypes where data Permissions = Permissions { readable, writable, executable, searchable :: Bool }
4f1a1c2214da3c715d798123c5a474a9bff195e3ae2dd60b611ca82ee9220316
serokell/importify
29-ListImplicitUnused.hs
module ListImplicitUnused where import Data.List
null
https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/base%40basic/29-ListImplicitUnused.hs
haskell
module ListImplicitUnused where import Data.List
35976b3b2daa536071568d138f88892d0a9d6fed116685f016577614f71e1fc6
papachan/data-covid19-colombia
crawler.clj
(ns demo.crawler (:require [clojure.set :as set] [clojure.edn :as edn] [clojure.string :as str] [clojure.java.io :as io] [clojure.data.csv :as csv] [cheshire.core :as json] [clj-time.format :as f] [clj-time.core :as t] [cl...
null
https://raw.githubusercontent.com/papachan/data-covid19-colombia/e7e8f72336a0ad9d7d0561332dd1ce8248bfe7e4/src/clj/demo/crawler.clj
clojure
look for all dates formats and use a single format date debug
(ns demo.crawler (:require [clojure.set :as set] [clojure.edn :as edn] [clojure.string :as str] [clojure.java.io :as io] [clojure.data.csv :as csv] [cheshire.core :as json] [clj-time.format :as f] [clj-time.core :as t] [cl...
9f312e08c6efc1c0d949dc5301ec7ae77080e080103d8d97fad202b26b049a87
RolfRolles/PandemicML
X86InternalOperand.mli
* This module should not be used outside of the typechecker and assembler . It defines a union describing the " abstract operand type " of a given operand . This information allows us to a given instruction : for example , consider the erroneous instruction [ mov 10 , 11 ] . There is no instruc...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/X86/DisassemblerSurgery/X86InternalOperand.mli
ocaml
*/*
* This module should not be used outside of the typechecker and assembler . It defines a union describing the " abstract operand type " of a given operand . This information allows us to a given instruction : for example , consider the erroneous instruction [ mov 10 , 11 ] . There is no instruc...
779eb2415658f0d74b3512954f28167c13de7b842b6709ca19f9235933e6a19e
justinethier/nugget
gcbench.scm
This is adapted from a benchmark written by and of Post Communications . It was modified by of Silicon Graphics . It was translated into Scheme by of Northeastern Univ . Last modified 24 November 2007 ( translated into R6RS Scheme ) . ; ; This is no substitute for real applications. No a...
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/benchmarks/chicken/gcbench.scm
scheme
This is no substitute for real applications. No actual application is likely to behave in exactly this way. However, this benchmark was designed to be more representative of real applications than other It attempts to model those properties of allocation requests that It is design...
This is adapted from a benchmark written by and of Post Communications . It was modified by of Silicon Graphics . It was translated into Scheme by of Northeastern Univ . Last modified 24 November 2007 ( translated into R6RS Scheme ) . Java GC benchmarks of which we are aware . ar...
bdad38101d10083a76203783b005763225b379d515a15a5823af3522917116fc
imdea-software/leap
LeapLib.mli
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/misc/LeapLib.mli
ocaml
********************************************************************* ...
LEAP , IMDEA Software Institute Copyright 2011 IMDEA Software Institute Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compl...
dbc5788a44f3bfea38fd2f43276248998d3f5a9805360daf45ba70c76ec8131d
bcc32/projecteuler-ocaml
interfaces.ml
module type Distribution = Distribution.S module type Number_theory = Number_theory.S module type Numerics = Numerics.S
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/src/interfaces.ml
ocaml
module type Distribution = Distribution.S module type Number_theory = Number_theory.S module type Numerics = Numerics.S
e11218e5bc8b7c7b7aab711c13874ff28c2cb43aff3f833777a2616956dd4d14
ChrisPenner/proton
State.hs
module Data.Profunctor.State where import Data.Profunctor import Control.Category (Category) import qualified Control.Category as C import Data.Bifunctor (first) import Data.Profunctor.State.Class newtype StateT s p a b = StateT (p (a, s) (b, s)) instance Profunctor p => Profunctor (StateT s p) where dimap f g (St...
null
https://raw.githubusercontent.com/ChrisPenner/proton/5e73abb67c8abe29e13b9b4a984ba75e5749e4f1/src/Data/Profunctor/State.hs
haskell
module Data.Profunctor.State where import Data.Profunctor import Control.Category (Category) import qualified Control.Category as C import Data.Bifunctor (first) import Data.Profunctor.State.Class newtype StateT s p a b = StateT (p (a, s) (b, s)) instance Profunctor p => Profunctor (StateT s p) where dimap f g (St...
16f7b6e89195cbfdfa259bb4db3ef3e77cf4f6afeef8ff93893c44d3e26040d6
kupl/LearnML
original.ml
let rec sigma (f : int -> int) (a : int) (b : int) : int = if b = a then a else f b + sigma f a (b - 1)
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/sigma/sub8/original.ml
ocaml
let rec sigma (f : int -> int) (a : int) (b : int) : int = if b = a then a else f b + sigma f a (b - 1)
e1afb36224a145e8ee2ea3b740d23f5aa569e76a32e63237faa714b53df1cd85
originrose/lazy-map
core_test.clj
(ns lazy-map.core-test (:require [lazy-map.core :refer :all] [clojure.test :refer :all] [clojure.pprint :as pp]) (:import [lazy_map.core LazyMap])) (defmacro error [& [msg]] `(let [msg# ~msg] (throw (if msg# (AssertionError. msg#) (AssertionError.))))) ...
null
https://raw.githubusercontent.com/originrose/lazy-map/119dda207fef90c1e26e6c01aa63e6cfb45c1fa8/test/lazy_map/core_test.clj
clojure
(ns lazy-map.core-test (:require [lazy-map.core :refer :all] [clojure.test :refer :all] [clojure.pprint :as pp]) (:import [lazy_map.core LazyMap])) (defmacro error [& [msg]] `(let [msg# ~msg] (throw (if msg# (AssertionError. msg#) (AssertionError.))))) ...
8cfc27f62bac334d96869e0fdacae2c9345cc42005ff3d5d5416f210647a897a
seagreen/hjsonschema
Reference.hs
-- | JSON Reference is described here: < -pbryan-zyp-json-ref-03 > -- -- And is extended for JSON Schema here: -- <-schema.org/latest/json-schema-core.html#anchor26> module JSONSchema.Validator.Reference where import Import import qualified Data.Text as T import System.FilePath (dropFileName, (<...
null
https://raw.githubusercontent.com/seagreen/hjsonschema/fde6e676f79f3f3320a558f20492ad816a2543a7/src/JSONSchema/Validator/Reference.hs
haskell
| JSON Reference is described here: And is extended for JSON Schema here: <-schema.org/latest/json-schema-core.html#anchor26> | TODO: no `type`s. ------------------------------------------------ * Helpers ------------------------------------------------ but just in case a user leaves one in we want to be sure t...
< -pbryan-zyp-json-ref-03 > module JSONSchema.Validator.Reference where import Import import qualified Data.Text as T import System.FilePath (dropFileName, (</>)) data Scope schema = Scope { _topLevelDocument :: schema , _documentURI :: Maybe Text , _currentBaseURI :: BaseURI...
a0b11154dfc5fc76d110507746d29ce98c6e74b209255bf87d550a7d501ed9a6
mmontone/erudite
includeA.lisp
;; This is includeA (print "include A")
null
https://raw.githubusercontent.com/mmontone/erudite/d421f4ed27faa636d5d4d768c4b64274023d63b2/test/includeA.lisp
lisp
This is includeA
(print "include A")
6fb663e138f00a8141195030a0ed4e75a9417f19bc5ad98e5dbe7ad41f120b2a
danilkolikov/dfl
Util.hs
| Module : Frontend . Desugaring . Grouping . Util Description : Utility functions for grouping Copyright : ( c ) , 2019 License : MIT Utility functions for the grouping Module : Frontend.Desugaring.Grouping.Util Description : Utility functions for grouping Copyright : (...
null
https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Desugaring/Grouping/Util.hs
haskell
| Module : Frontend . Desugaring . Grouping . Util Description : Utility functions for grouping Copyright : ( c ) , 2019 License : MIT Utility functions for the grouping Module : Frontend.Desugaring.Grouping.Util Description : Utility functions for grouping Copyright : (...
d99fcf2c945071bf866889f0ccf31d1b06728b6c783e547af6f49ec907b00f5f
dizzyd/epop
epop.erl
-module(epop). -author(''). %%%--------------------------------------------------------------------- %%% File : epop.erl Created : 3 Mar 1998 by %%% Function: A POP3 server/client package. %%% ==================================================================== The contents of this file are subject to the Erlan...
null
https://raw.githubusercontent.com/dizzyd/epop/41251928d48990603d04cbd5751eb6f158e738fa/src/epop.erl
erlang
--------------------------------------------------------------------- File : epop.erl Function: A POP3 server/client package. ==================================================================== except in compliance with the License. You may obtain a copy of the License at basis, WITHOUT WARRANTY OF ANY KIND...
-module(epop). -author(''). Created : 3 Mar 1998 by The contents of this file are subject to the Erlang Public License License , Version 1.0 , ( the " License " ) ; you may not use this file Software distributed under the License is distributed on an " AS IS " The Original Code is epop-2 - 3 The Initial De...
4669c026f0235884beebd8e986e7a38855825c4bd6768cab51a40df73f0e181d
derekslager/advent-of-code-2015
day4.clj
(ns advent-of-code-2015.day4 (:import java.math.BigInteger java.security.MessageDigest)) (defn candidates [key] (->> (interleave (repeat key) (range)) (partition 2) (map #(apply str %)))) (defn md5 [s] (let [digest (MessageDigest/getInstance "MD5") hash (.digest digest (.getByte...
null
https://raw.githubusercontent.com/derekslager/advent-of-code-2015/bbc589d29613c594178d9305741096f3688b05f2/src/advent_of_code_2015/day4.clj
clojure
(ns advent-of-code-2015.day4 (:import java.math.BigInteger java.security.MessageDigest)) (defn candidates [key] (->> (interleave (repeat key) (range)) (partition 2) (map #(apply str %)))) (defn md5 [s] (let [digest (MessageDigest/getInstance "MD5") hash (.digest digest (.getByte...
44675b302170ce543dcd5d11095440472bc83692b618265a737d1e49b995d73d
rzetterberg/orgmode-sql
Document.hs
{-| CRUD functionality for 'Document's. -} module Database.OrgMode.Internal.Query.Document where import Database.Esqueleto import qualified Database.Persist as P import Database.OrgMode.Internal.Import import Database.OrgMode.Internal.Types import qualified Database.OrgMode.Internal.Quer...
null
https://raw.githubusercontent.com/rzetterberg/orgmode-sql/98cf35b96e6ce63f60ce11ace18be55e5770352e/lib/Database/OrgMode/Internal/Query/Document.hs
haskell
| CRUD functionality for 'Document's. ----------------------------------------------------------------------------- * Creation | Creates a new document in the database with the given name and body text. ^ Name of the document ^ Body text ^ Key of the new document --------------------------------------------------...
module Database.OrgMode.Internal.Query.Document where import Database.Esqueleto import qualified Database.Persist as P import Database.OrgMode.Internal.Import import Database.OrgMode.Internal.Types import qualified Database.OrgMode.Internal.Query.Heading as HeadingQ add :: (MonadIO m) ...
02f15c5a073d380608299b75182793af2c0b1152f9bf99704340fcff4b4325e9
stepcut/plugins
Plugin.hs
module Plugin where import Data.Typeable import Data.Generics.Aliases import Data.Generics.Schemes import API resource = rsrc { field = id listify :: Typeable r => (r -> Bool) -> GenericQ [r] }
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/pdynload/poly/Plugin.hs
haskell
module Plugin where import Data.Typeable import Data.Generics.Aliases import Data.Generics.Schemes import API resource = rsrc { field = id listify :: Typeable r => (r -> Bool) -> GenericQ [r] }
ab976377ef50c04a253dd4c51d89cafd7dfb5427e113a568b6b6f2ed3be819a5
Naproche-SAD/Naproche-SAD
Prover.hs
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 ) , ( 2018 ) Prover interface : export a proof task to an external prover . Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018), Makarius Wenzel (2018) Prover interface: export a proof task to an external prover. -} module SAD.Export.Prover wher...
null
https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Export/Prover.hs
haskell
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 ) , ( 2018 ) Prover interface : export a proof task to an external prover . Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018), Makarius Wenzel (2018) Prover interface: export a proof task to an external prover. -} module SAD.Export.Prover wher...
c49434a36fa43bbd031f8350539965980a6f2599cde550d22ab8cb691217a83c
typelead/etlas
Time.hs
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # #ifdef ETA_VERSION # LANGUAGE MagicHash # #endif module Distribution.Compat.Time ( ModTime(..) -- Needed for testing , getModTime, getFileAge, getCurTime ...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Compat/Time.hs
haskell
# LANGUAGE RankNTypes # Needed for testing | An opaque type representing a file's modification time, represented | Return modification time of the given file. Works around the low clock Directly against the Win32 API. # CLASS "java.io.File" # Directly against the unix library. | Convert POSIX milliseconds to Mod...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # #ifdef ETA_VERSION # LANGUAGE MagicHash # #endif module Distribution.Compat.Time , getModTime, getFileAge, getCurTime , posixSecondsToModTime , calibrateMtimeChangeDelay ) ...
f162295c9c84d9763e14920ffdf4edaa7938a40e532ed18096b2e8b2e956ec6a
penpot/penpot
types_modifiers_test.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns common-tests.types-modifiers-test (:require [clojure.test :as t] [app.common.geom.matrix :as gmt] ...
null
https://raw.githubusercontent.com/penpot/penpot/c98635bca11637f73c0164199e35c695e2096729/common/test/common_tests/types_modifiers_test.cljc
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns common-tests.types-modifiers-test (:require [clojure.test :as t] [app.common.geom.matrix :as gmt] [app.common.geom.point :as gpt...
c7936d4c6d573e8b9a2054d748616ba5ed08d33b998d879e1c75a088b603db9b
lipas-liikuntapaikat/lipas
events.cljs
(ns lipas.ui.front-page.events (:require [ajax.core :as ajax] [re-frame.core :as re-frame])) (re-frame/reg-event-fx ::get-newsletter (fn [{:keys [db]}] {:db (assoc-in db [:front-page :newsletter :in-progress?] true) :http-xhrio {:method :post :uri (str (:backend-url db...
null
https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/5e9a7f31a9dca0cf8323f394ab9b46bf665bcacc/webapp/src/cljs/lipas/ui/front_page/events.cljs
clojure
(ns lipas.ui.front-page.events (:require [ajax.core :as ajax] [re-frame.core :as re-frame])) (re-frame/reg-event-fx ::get-newsletter (fn [{:keys [db]}] {:db (assoc-in db [:front-page :newsletter :in-progress?] true) :http-xhrio {:method :post :uri (str (:backend-url db...
560f744aa5ee592fb2cdeb39591d14448818f9c994edb50ea5fd8082b3272ece
dgiot/dgiot
dgiot_maintenance.erl
%%%------------------------------------------------------------------- @author jonhl ( C ) 2022 , < COMPANY > %%% @doc %%% %%% @end Created : 03 . 11月 2022 15:06 %%%------------------------------------------------------------------- -module(dgiot_maintenance). -author("jonhl"). %% API -export([get_initdata/2, i...
null
https://raw.githubusercontent.com/dgiot/dgiot/bf4f44202a5388d9f3b1d40cb86f87bf2c9ea3c4/apps/dgiot_device/src/dgiot_maintenance.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API 初始化工单巡检动态数据 下发巡检信息
@author jonhl ( C ) 2022 , < COMPANY > Created : 03 . 11月 2022 15:06 -module(dgiot_maintenance). -author("jonhl"). -export([get_initdata/2, init_inspection/1, get_inspection/1]). init_inspection(#{<<"objectId">> := MaintenanceId, <<"info">> := Info, <<"status">> := 1, <<"product">> := #{<<"objectId">> := Produ...
46c61353b6dfdda3ab0d4a554e1b01ad5e2e646e4b53952d5bfa01d5f47f959d
ivankelly/gambit
_thread#.scm
;;;============================================================================ File : " _ " , Time - stamp : < 2008 - 11 - 22 09:00:30 feeley > Copyright ( c ) 1994 - 2008 by , All Rights Reserved . ;;;============================================================================ ;;; Representation of excepti...
null
https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/lib/_thread%23.scm
scheme
============================================================================ ============================================================================ Representation of exceptions. ---------------------------------------------------------------------------- Define type checking macros. ----------------------------...
File : " _ " , Time - stamp : < 2008 - 11 - 22 09:00:30 feeley > Copyright ( c ) 1994 - 2008 by , All Rights Reserved . (define-library-type-of-exception deadlock-exception id: 54294cd7-1c33-40e1-940e-7400e1126a5a constructor: #f opaque: ) (define-library-type-of-exception abandoned-mutex-exception ...
880198a54be964b58c366b768ca919415994d3bb9fe30d074972931f6c44860c
BitGameEN/bitgamex
cow_http2.erl
Copyright ( c ) 2015 - 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/cowlib/src/cow_http2.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2015 - 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cow_http2). -export([parse/1]). -export([par...
5b560b1f9b238a54d6a427a086aa37c2143a9755a6b89128b9587885a23287a3
slipstream/SlipStreamServer
session_template_internal_lifecycle_test.clj
(ns com.sixsq.slipstream.ssclj.resources.session-template-internal-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstre...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/session_template_internal_lifecycle_test.clj
clojure
should be an existing template already session template should be visible via query as well should have one with the correct method name do full lifecycle for an internal session template delete the template verify that the template is gone session template should not be there anymore
(ns com.sixsq.slipstream.ssclj.resources.session-template-internal-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstre...