_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 |
|---|---|---|---|---|---|---|---|---|
880075fad433e8a95fd7cdd968a47f347a2d78fa22e85b3004f82ea32b3438ba | mrphlip/aoc | 05.hs | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Control.Exception
import Utils
getInput :: IO [Integer]
getInput = do
dat <- readFile "05.txt"
return $ map readPass $ lines dat
readPass :: String -> Integer
readPass = fromBaseN 2 . map charToBinary
where
charToBinary 'F' = 0
charToBinary 'B' = 1
charToBi... | null | https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/2020/05.hs | haskell | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Control.Exception
import Utils
getInput :: IO [Integer]
getInput = do
dat <- readFile "05.txt"
return $ map readPass $ lines dat
readPass :: String -> Integer
readPass = fromBaseN 2 . map charToBinary
where
charToBinary 'F' = 0
charToBinary 'B' = 1
charToBi... | |
da648db225b1ddf3d78dd65f9183f4673bd8d414d0b61861b5b092d15650b5bb | lisp/de.setf.wilbur | useful.lisp | -*- package : ; Syntax : Common - lisp ; Base : 10 -*-
;;;
useful.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
;;;
Copyright ( c ) 2001 - 2009 Nokia Corp. and/or its s... | null | https://raw.githubusercontent.com/lisp/de.setf.wilbur/c5c1321e6a05cead8b90e54116f14c3810d520e2/src/useful.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
--------------------------------------------------------------------------------------
This program is licensed under the terms of the GNU Lesser General Public License
however that a preamble attached below also applies to this program.
-------------------------... |
useful.lisp
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2009 Nokia Corp. and/or its subsidiaries . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights Reserved .
Contributor(s ): ( mailto: )
as published by the Free So... |
73b9ddcd1b2e2e247c04d90195bba64b97b930e1dee63c5b3ac6b03606112375 | batsh-dev-team/Batsh | winbat_functions.ml | open Core_kernel
open Winbat_ast
let rec expand_command (name : varstrings) (args : parameters) =
match name with
| [`Str "bash"] ->
`Empty
| [`Str "batch"] -> (
match args with
| [[`Str raw]] ->
`Raw raw
| _ ->
failwith "batch raw command must have 1 argument of string lite... | null | https://raw.githubusercontent.com/batsh-dev-team/Batsh/5c8ae421e0eea5dcb3da01643152ad96af941f07/lib/winbat_functions.ml | ocaml | open Core_kernel
open Winbat_ast
let rec expand_command (name : varstrings) (args : parameters) =
match name with
| [`Str "bash"] ->
`Empty
| [`Str "batch"] -> (
match args with
| [[`Str raw]] ->
`Raw raw
| _ ->
failwith "batch raw command must have 1 argument of string lite... | |
05b93df42af24f5673e70dc080d194f708b0d5b20f02af086673fbb0b0b013c7 | erlangonrails/devdb | nodetree_tree_odbc.erl | %%% ====================================================================
` ` 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 License ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/mod_pubsub/nodetree_tree_odbc.erl | erlang | ====================================================================
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 via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
th... | ` ` 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 "
The Initial Developer of the Original Code is ProcessOne .
Portions created by ProcessOne are C... |
d12e49860ae34e6d1093e70cbcd99cfe9f5986702e3d6e3af148955691abf014 | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-script/gen/Gogol/Script/Processes/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
List information about processes made by or on behalf of a user, such as process type and current status.
/See:/ <-script/api/ Apps Script API Reference> for @script.processes.list@.
* Resource
** Constructing a Request
| A r... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
2caf6764e13beed904331ae826de9fd94db4e27b510fe32e6c829fcd32c45398 | johnelse/mkaudio | mkaudio.ml | open Cmdliner
(* man page definition. *)
let help man_format cmds topic =
match topic with
| None -> `Help (`Pager, None)
| Some topic ->
let topics = "topics" :: cmds in
let conv, _ = Arg.enum (List.rev_map (fun s -> (s, s)) topics) in
match conv topic with
| `Error e -> `Error (false, e)
| ... | null | https://raw.githubusercontent.com/johnelse/mkaudio/172fc14443feafae2f0542948e53c1621f42bed2/bin/mkaudio.ml | ocaml | man page definition.
Argument definitions.
Command definitions. | open Cmdliner
let help man_format cmds topic =
match topic with
| None -> `Help (`Pager, None)
| Some topic ->
let topics = "topics" :: cmds in
let conv, _ = Arg.enum (List.rev_map (fun s -> (s, s)) topics) in
match conv topic with
| `Error e -> `Error (false, e)
| `Ok t when t = "topics" ->
... |
7b1c24f16751395b64e70d529d0002041cfdcb00f4ccdee1c69032691dfc2311 | dancrossnyc/multics | pe550.ctl.lisp | ;;; ***********************************************************
;;; * *
* Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
;;; * *
* Copyright ( c ) 1978 by Massachusetts Institute of ... | null | https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_emacs_ctls_.s.archive/pe550.ctl.lisp | lisp | ***********************************************************
* *
* *
* *
***********************************************************
pe550ctl - B... | * Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
* Copyright ( c ) 1978 by Massachusetts Institute of *
* Technology and Honeywell Information Systems , Inc. *
FOX-1100 control package
GMP on 08/17/78
(declare (special X Y screenheight screenlinelen ospeed))
(declare (special tty... |
afa332d35b97ef0cb17e4789f3bbda06479942600dec6c904f0e4c035b581866 | acieroid/scala-am | church-6.scm | (letrec ((zero (lambda (f x) x))
(inc (lambda (n)
(lambda (f x)
(f (n f x)))))
(plus (lambda (m n)
(lambda (f x)
(m f (n f x))))))
((plus (inc (inc (inc zero))) (plus (inc (inc zero)) (inc zero))) (lambda (x) (+ x 1)) 0))
| null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/church-6.scm | scheme | (letrec ((zero (lambda (f x) x))
(inc (lambda (n)
(lambda (f x)
(f (n f x)))))
(plus (lambda (m n)
(lambda (f x)
(m f (n f x))))))
((plus (inc (inc (inc zero))) (plus (inc (inc zero)) (inc zero))) (lambda (x) (+ x 1)) 0))
| |
7562776f8948c70bc6251eba4054a5c25411ef58a1fd28033e5b9eecc6a6c5b9 | c-cube/qcheck | QCheck_tests.ml | (** QCheck(1) tests **)
(* Please add any additional tests to both [QCheck_tests.ml] and [QCheck2_tests.ml].
This ensures that both generator approaches continue to work as expected
and furthermore allows us to compare their behaviour with
[diff -y test/core/QCheck_expect_test.expected test/core/QCheck2_expec... | null | https://raw.githubusercontent.com/c-cube/qcheck/063c1d74795a24eb77fa661d218c4715382df566/test/core/QCheck_tests.ml | ocaml | * QCheck(1) tests *
Please add any additional tests to both [QCheck_tests.ml] and [QCheck2_tests.ml].
This ensures that both generator approaches continue to work as expected
and furthermore allows us to compare their behaviour with
[diff -y test/core/QCheck_expect_test.expected test/core/QCheck2_expect_test.... |
module IntTree = struct
open QCheck
type tree = Leaf of int | Node of tree * tree
let leaf x = Leaf x
let node x y = Node (x,y)
let rec depth = function
| Leaf _ -> 1
| Node (x, y) -> 1 + max (depth x) (depth y)
let rec print_tree = function
| Leaf x -> Printf.sprintf "Leaf %d" x
| Nod... |
be3091abc32d05ffbd11fb342f41797ac503d5300b12fcab06f5678e0c0c5b52 | dbuenzli/brr | brr_io.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/brr/b074832ae363ff9f68d52a2db31b3a83a94ee445/src/brr_io.mli | ocaml | * Clipboard, Form, Fetch, Geolocation, Media and Storage APIs.
* Clipboard access
See the {{:-US/docs/Web/API/Clipboard}
Clipboard API}.
* Clipboard items.
* Presentation style enum.
* The type for
{{:-apis/#enumdef-presentationstyle}
presentation} style values.
* The type for
... | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... |
dc91418fb5ed22ba13f66436ca6be13f62ef50b87a417f4ae714674c312afb3c | phronmophobic/clong | libz.clj | (ns com.phronemophobic.libz
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer [pprint]]
[clojure.edn :as edn]
[com.phronemophobic.clong.clang :as clong]
[com.phronemophobic.clong.gen.jna :as gen])
(:import
java.io.Pushba... | null | https://raw.githubusercontent.com/phronmophobic/clong/bb4cb74c14f787b1c1dc8a4c9178d897e25557bb/examples/libz/src/clong/libz.clj | clojure | (ns com.phronemophobic.libz
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer [pprint]]
[clojure.edn :as edn]
[com.phronemophobic.clong.clang :as clong]
[com.phronemophobic.clong.gen.jna :as gen])
(:import
java.io.Pushba... | |
3fad5aa0948a50cacbec1b8a3f0bbb86984c48a5646859d3ea743ab3d96c0ed8 | ocsigen/ocsigenserver | ocsigen_server.mli | Ocsigen
*
* Copyright ( C ) 2005
* , , ,
*
* 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 the Licens... | null | https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/server/ocsigen_server.mli | ocaml | * Reload the configuration of the server. The optional parameter
[?file] may be used to read the configuration from another
file.
* Start the server. Never returns.
*/* | Ocsigen
*
* Copyright ( C ) 2005
* , , ,
*
* 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 the Licens... |
98fca0e98dc194ab27fffb5e1aa7af36fb4467cf77c53da12fdb2ec11dcbc6b3 | NSO-developer/genet | genet_logging.erl | %%% @doc Logging group definitions, supposed to be used in compile
%%% time by aop.
%%%
%%% This module needs to export function `log_groups/0' which returns
%%% a tuple consisting of log groups and assignment of groups to log
%%% levels. The value is used in compile time to instrument functions
%%% with "advices".
%%... | null | https://raw.githubusercontent.com/NSO-developer/genet/bc22f28c56b9cc9373b8580536e6d99cb724da4e/src/erlang-lib/ec_genet/src/logging/genet_logging.erl | erlang | @doc Logging group definitions, supposed to be used in compile
time by aop.
This module needs to export function `log_groups/0' which returns
a tuple consisting of log groups and assignment of groups to log
levels. The value is used in compile time to instrument functions
with "advices".
@end |
-module(genet_logging).
-export([log_groups/0]).
-include("log_groups.hrl").
log_groups() ->
{?LOG_GROUPS, ?LOG_LEVELS}.
|
23693e97d8d959d417efe7d62e4b7e87e79fd52dd0abbb5f28ebe264ab05e569 | Zulu-Inuoe/clution | ldap.lisp | (in-package :cl-user)
(defpackage quri.uri.ldap
(:use :cl)
(:import-from :quri.uri
:uri
:scheme
:port
:uri-path
:uri-query)
(:import-from :quri.port
:scheme-default-port)
(:import-from :split-sequence
... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/quri-20161204-git/src/uri/ldap.lisp | lisp | ignore | (in-package :cl-user)
(defpackage quri.uri.ldap
(:use :cl)
(:import-from :quri.uri
:uri
:scheme
:port
:uri-path
:uri-query)
(:import-from :quri.port
:scheme-default-port)
(:import-from :split-sequence
... |
dd295e8fcf34d0d858fdf053fa0d62dae04f226c729d225a835d3c32cc2b9347 | jumarko/web-development-with-clojure | doo_runner.cljs | (ns picture-gallery.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[picture-gallery.core-test]))
(doo-tests 'picture-gallery.core-test)
| null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/examples/picture-gallery/test/cljs/picture_gallery/doo_runner.cljs | clojure | (ns picture-gallery.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[picture-gallery.core-test]))
(doo-tests 'picture-gallery.core-test)
| |
9d2d6f14b1e59b05cf8a63a331c111af4557677caae39089aa9f3ab384d7d3a1 | realworldocaml/book | renaming.mli | (* A renaming is a mapping from type variable name to type variable name.
In definitions such as:
type 'a t =
| A : <type> -> 'b t
| B of 'a
we generate a function that takes an sexp_of parameter named after 'a, but 'a is not in
scope in <type> when handling the constructor A (because A is a gadt co... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_sexp_conv/expander/renaming.mli | ocaml | A renaming is a mapping from type variable name to type variable name.
In definitions such as:
type 'a t =
| A : <type> -> 'b t
| B of 'a
we generate a function that takes an sexp_of parameter named after 'a, but 'a is not in
scope in <type> when handling the constructor A (because A is a gadt cons... | open! Base
open! Ppxlib
type t
val without_type : unit -> t
val of_type_declaration : type_declaration -> prefix:string -> t
val add_universally_bound : t -> string loc -> prefix:string -> t
module Binding_kind : sig
type t =
| Universally_bound of Fresh_name.t
| Existentially_bound
end
val binding_kind... |
0bf6939e52631228aa50d30be594ca2a72b3edddf81c68b76fded31bc70c9875 | typedclojure/typedclojure | destructure.clj | (ns typed-test.clj.ext.clojure.core.succeed.destructure
(:import (clojure.lang APersistentVector APersistentMap))
(:require [typed.clojure :as t :refer [ann-form]]))
;; map destructuring
(let [{:keys [b] :or {b 3}} {}]
(ann-form b Number))
clojure < = 1.10 kv destructuring
(let* [map__65083 {}
map__65... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/lib.clojure/test/typed_test/clj/ext/clojure/core/succeed/destructure.clj | clojure | map destructuring
vector destructuring
could do a bit better there
vectors
lists | (ns typed-test.clj.ext.clojure.core.succeed.destructure
(:import (clojure.lang APersistentVector APersistentMap))
(:require [typed.clojure :as t :refer [ann-form]]))
(let [{:keys [b] :or {b 3}} {}]
(ann-form b Number))
clojure < = 1.10 kv destructuring
(let* [map__65083 {}
map__65083 (if (seq? map__65... |
e345d2fe8596000997e78d169931decdab116278d14da0b98fd1d4c1bae2aba3 | monadbobo/ocaml-core | fqueue.ml | (** Simple implementation of a polymorphic functional queue *)
* Invariants :
- iff queue is not empty , outlist is not empty
- iff queue has more than 1 element , then inlist is not empty
- queue.length = queue.outlist + List.length queue.inlist
- iff queue is not empty, outlist is ... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/fqueue.ml | ocaml | * Simple implementation of a polymorphic functional queue
* enqueue el on the top of the queue, effectively making it
the least recently enqueued element
* returns bottom (most-recently enqueued) item
* returns top (least-recently enqueued) item
* returns top of queue and queue with top removed
* returns qu... |
* Invariants :
- iff queue is not empty , outlist is not empty
- iff queue has more than 1 element , then inlist is not empty
- queue.length = queue.outlist + List.length queue.inlist
- iff queue is not empty, outlist is not empty
- iff queue has more than 1 element, then inlis... |
1658a0b92110bc01162b5db9270b083cb25665a8ef0617a1f07c72be50591dbb | Simre1/haskell-game | CollisionHandler.hs | module Scene.Level.Initialize.CollisionHandler where
import Control.Monad.IO.Class (MonadIO)
import ECS.Apecs (SystemT, newEntity, Proxy(..), destroy)
import ECS.Physics (mkBeginCB, CollisionHandler(..), Collision(..), Shape, Body, CollisionSource(Between), addPostStepCallback)
import Scene.Level.World (World, Bulle... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/app/Scene/Level/Initialize/CollisionHandler.hs | haskell | module Scene.Level.Initialize.CollisionHandler where
import Control.Monad.IO.Class (MonadIO)
import ECS.Apecs (SystemT, newEntity, Proxy(..), destroy)
import ECS.Physics (mkBeginCB, CollisionHandler(..), Collision(..), Shape, Body, CollisionSource(Between), addPostStepCallback)
import Scene.Level.World (World, Bulle... | |
1364d032a6b15af3abaeda45d9725e4fa92ba90538c4e60fd7b701c797703a87 | vbmithr/ocaml-thrift-lib | TThreadedServer.ml |
Licensed to the Apache Software Foundation ( ASF ) under one
or more contributor license agreements . See the NOTICE file
distributed with this work for additional information
regarding copyright ownership . The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
" License " ) ;... | null | https://raw.githubusercontent.com/vbmithr/ocaml-thrift-lib/70669ce410e99389975384b46492f9a55281ca10/src/TThreadedServer.ml | ocaml |
Licensed to the Apache Software Foundation ( ASF ) under one
or more contributor license agreements . See the NOTICE file
distributed with this work for additional information
regarding copyright ownership . The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
" License " ) ;... | |
036140b79c33cf3ae0ad5ac2d22090360d44da97265cb566843a0f48bd507c84 | mbutterick/aoc-racket | star1.rkt | 360603
2
2
1
2
-2
2
1
1
-4
-2
1
-3
-9
2
0
1
-8
-9
-12
2
-5
-8
0
-11
-3
-1
2
-20
-21
-18
-25
-25
-16
-18
-27
-25
-17
-13
-9
-35
-25
-1
-20
-22
-11
-3
-26
-32
-33
-21
-3
-42
-4
-48
-36
-15
-20
-29
-32
-12
-53
-32
0
-4
-2
-32
-55
-49
-23
-18
-34
-39
-70
-4
-64
-58
-66
-59
1
-36
-19
-38
-55
-25
-15
-65
-66
-65
-58
-53
-5... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d05/star1.rkt | racket | 360603
2
2
1
2
-2
2
1
1
-4
-2
1
-3
-9
2
0
1
-8
-9
-12
2
-5
-8
0
-11
-3
-1
2
-20
-21
-18
-25
-25
-16
-18
-27
-25
-17
-13
-9
-35
-25
-1
-20
-22
-11
-3
-26
-32
-33
-21
-3
-42
-4
-48
-36
-15
-20
-29
-32
-12
-53
-32
0
-4
-2
-32
-55
-49
-23
-18
-34
-39
-70
-4
-64
-58
-66
-59
1
-36
-19
-38
-55
-25
-15
-65
-66
-65
-58
-53
-5... | |
a40447f7b00149082851e62d1550273b902a1c86adabfddca10ddf7d3e2bf0be | prowdsponsor/fb | Graph.hs | # LANGUAGE ConstraintKinds , CPP , DeriveDataTypeable , FlexibleContexts , OverloadedStrings #
module Facebook.Graph
( getObject
, postObject
, deleteObject
, searchObjects
, (#=)
, SimpleType(..)
, Place(..)
, Location(..)
, GeoCoordinates(..)
, Tag(..)
) where
import Cont... | null | https://raw.githubusercontent.com/prowdsponsor/fb/596f2633e017e1765c58a913949b4c4948a5455e/src/Facebook/Graph.hs | haskell | ^ Path (should begin with a slash @\/@)
^ Optional access token
^ Path (should begin with a slash @\/@)
^ Access token
^ Path (should begin with a slash @\/@)
^ Access token
| Helper function used by 'postObject' and 'deleteObject'.
^ Path (should begin with a slash @\/@)
^ Access token
^ The keyword to searc... | # LANGUAGE ConstraintKinds , CPP , DeriveDataTypeable , FlexibleContexts , OverloadedStrings #
module Facebook.Graph
( getObject
, postObject
, deleteObject
, searchObjects
, (#=)
, SimpleType(..)
, Place(..)
, Location(..)
, GeoCoordinates(..)
, Tag(..)
) where
import Cont... |
26fd876323313c6c9e3ba9e0086c8938900beda61cdaf55ef8aa2bfcd3ba758e | mdaley/charlatan | core_test.clj | (ns charlatan.core-test
(:require [cheshire.core :as json]
[clj-http.client :as http]
[clojure.test :refer :all]
[charlatan.core :refer :all]
[charlatan.mountebank :as mb]))
(def mb-port 2525)
(def port 8080)
(deftest simple-response-to-ping
(testing "mountebank sim... | null | https://raw.githubusercontent.com/mdaley/charlatan/8115f957187aa015428b686a099767b727cc8930/test/charlatan/core_test.clj | clojure | (ns charlatan.core-test
(:require [cheshire.core :as json]
[clj-http.client :as http]
[clojure.test :refer :all]
[charlatan.core :refer :all]
[charlatan.mountebank :as mb]))
(def mb-port 2525)
(def port 8080)
(deftest simple-response-to-ping
(testing "mountebank sim... | |
954946ef5d67d4d67723dd3c6e8213790b77a46b14f48866a65b622c550abe17 | blockchain-unica/defi-workbench | wallet.mli | (* type of the wallet *)
type t
(* type of the users' balance *)
type bt
val make : Address.t -> bt -> t
val empty : Address.t -> t
val balance : Token.t -> t -> int
val update : Token.t -> int -> t -> t
val get_address : t -> Address.t
val get_balance : t -> bt
val set_balance : bt -> t -> t
val balance_of_li... | null | https://raw.githubusercontent.com/blockchain-unica/defi-workbench/a3606bf425cef8e81d1f12b13dc1410a48f3e860/lib/wallet.mli | ocaml | type of the wallet
type of the users' balance | type t
type bt
val make : Address.t -> bt -> t
val empty : Address.t -> t
val balance : Token.t -> t -> int
val update : Token.t -> int -> t -> t
val get_address : t -> Address.t
val get_balance : t -> bt
val set_balance : bt -> t -> t
val balance_of_list : (Token.t * int) list -> bt
val list_of_balance : bt ... |
a1ab8dae0bf4234b2d3ccd075970f1b629898da737f80507e17f6e65fdb6797e | johnyob/dromedary | structure.mli | (*****************************************************************************)
(* *)
Dromedary
(* *)
... | null | https://raw.githubusercontent.com/johnyob/dromedary/721e6ac3df867c54af669d5a68cd9536341a1910/lib/constraints/structure.mli | ocaml | ***************************************************************************
... | Dromedary
, University of Cambridge
Copyright 2021 .
All rights reserved . This file is distributed under the terms of the MIT
open! Import
module type Identifiabl... |
d4fc33815a181cebd03993316ebf0cdba89e65df4e15a835e7eac8ed43c3823d | Nick-Chapman/niz | numbers.ml | open Core
16 bit unsigned : 0 .. 0xFF
type t [@@deriving sexp]
val of_char : char -> t
val to_char : t -> char
val of_int_exn : int -> t
val to_int : t -> int
val zero : t
val is_zero : t -> bool
val bitN : int -> t -> bool
val set_bitN : int -> t -> t
val clear_bitN : int -> t -> t
val to... | null | https://raw.githubusercontent.com/Nick-Chapman/niz/603a437ace7c6babcb08648a98c6ace099e99216/lib/numbers.ml | ocaml | open Core
16 bit unsigned : 0 .. 0xFF
type t [@@deriving sexp]
val of_char : char -> t
val to_char : t -> char
val of_int_exn : int -> t
val to_int : t -> int
val zero : t
val is_zero : t -> bool
val bitN : int -> t -> bool
val set_bitN : int -> t -> t
val clear_bitN : int -> t -> t
val to... | |
12fac4a38bb4a3a829b21f819a00f99456be89271155d3c880a7a01ea5c6c302 | joearms/elib1 | elib1_doc.erl | Copyright ( c ) 2006 - 2009
See MIT - LICENSE for licensing information .
-module(elib1_doc).
%% -compile(export_all).
-export([batch/1, file/1, file/2, setup/1]).
%% takes a file like this <html> ... </html>
strips the header and replaces with a valid xhml header
%% expands <e>...</e>
-import(lists, [map/2... | null | https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/lib/src/elib1_doc.erl | erlang | -compile(export_all).
takes a file like this <html> ... </html>
expands <e>...</e> | Copyright ( c ) 2006 - 2009
See MIT - LICENSE for licensing information .
-module(elib1_doc).
-export([batch/1, file/1, file/2, setup/1]).
strips the header and replaces with a valid xhml header
-import(lists, [map/2, reverse/1, reverse/2]).
batch([X]) ->
File = filename:rootname(atom_to_list(X)),
... |
5f32d8c7cd84b54ddd9c602c09b8a013b92f3f41c3e2178a746ba5106f36fff7 | erlangonrails/devdb | authmod_gssapi.erl | %%%-------------------------------------------------------------------
%%% File : authmod_gssapi.erl
Author : < >
Description : Negotiate authentication module supporting GSSAPI
%%% and SPNEGO
%%%
Created : 17 May 2007 by < >
%%%----------------------------------------------------------------... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/contrib/yaws/src/authmod_gssapi.erl | erlang | -------------------------------------------------------------------
File : authmod_gssapi.erl
and SPNEGO
-------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided... | Author : < >
Description : Negotiate authentication module supporting GSSAPI
Created : 17 May 2007 by < >
Copyright ( c ) 2007
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the copy... |
b741f2685600019cab19884e9fafc5daf88d8d85bdba2efa837406521ee11486 | kazu-yamamoto/http2 | Worker.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
module Network.HTTP2.Server.Worker (
worker
, WorkerConf(..)
, fromContext
) where
import Control.Exception (AsyncException(..))
import Data.IORef
import qualified Network.HTTP.Types as H
i... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/88b3c192c251c15fa4dc426aa0372841dc3fee49/Network/HTTP2/Server/Worker.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------
--------------------------------------------------------------
parent stream
request
fixme: this value can be Nothing
| This function is passed to workers.
They also pass 'Response's from a server to this function.
T... | # LANGUAGE NamedFieldPuns #
# LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
module Network.HTTP2.Server.Worker (
worker
, WorkerConf(..)
, fromContext
) where
import Control.Exception (AsyncException(..))
import Data.IORef
import qualified Network.HTTP.Types as H
import qualified System.TimeManager ... |
6dc5cd46123652afdea98fdfb819b6f1e41edb80a72479c6364ad97410af9b68 | haskell-github/github | Webhooks.hs | -----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
Maintainer : < >
--
module GitHub.Data.Webhooks where
import GitHub.Data.Id (Id)
import GitHub.Data.URL (URL)
import GitHub.Internal.Prelude
import Prelude ()
import qualified Da... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/src/GitHub/Data/Webhooks.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-3-Clause
| See </#events>.
JSON instances | Maintainer : < >
module GitHub.Data.Webhooks where
import GitHub.Data.Id (Id)
import GitHub.Data.URL (URL)
import GitHub.Internal.Prelude
import Prelude ()
import qualified Data.Map as M
import qualified Data.Text as T
data RepoWebhook = RepoWebhook
{ repoWebhookUrl :: !URL
... |
9e23d07ec69d763ca566b4cfab37a6c569a510ea8b781f4aace4e1ce75f0ff1a | wavewave/hoodle | Coroutine.hs | # LANGUAGE ScopedTypeVariables #
-- |
-- Module : Hoodle.Script.Coroutine
Copyright : ( c ) 2012 - 2015
--
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Portability : GHC
module Hoodle.Script.Coroutine where
import Control.Lens (view)
import Control.Monad.State (get, li... | null | https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/Script/Coroutine.hs | haskell | |
Module : Hoodle.Script.Coroutine
License : BSD3
Stability : experimental
|
|
|
|
| temporary
| temporary | # LANGUAGE ScopedTypeVariables #
Copyright : ( c ) 2012 - 2015
Maintainer : < >
Portability : GHC
module Hoodle.Script.Coroutine where
import Control.Lens (view)
import Control.Monad.State (get, liftIO)
import Control.Monad.Trans.Maybe (MaybeT (..))
import Data.Hoodle.Simple (Hoodle)
import qualif... |
5ca5b53a1cd24b627b5c818c66de921874b20d1df82d8c5c67c41ca4cabf99a9 | AccelerationNet/function-cache | ordered.lisp | (in-package :function-cache)
(deftype cache-node () '(or null cnode))
(defstruct (cnode
(:constructor cnode (cache-key result &optional older newer)))
cache-key
result
(older nil :type cache-node)
(newer nil :type cache-node))
(defclass ordered-cache-mixin (cache-capacity-mixin)
((oldest :init... | null | https://raw.githubusercontent.com/AccelerationNet/function-cache/6a5ada401e57da2c8abf046f582029926e61fce8/src/ordered.lisp | lisp | Move the result to the end if there was a cached result. | (in-package :function-cache)
(deftype cache-node () '(or null cnode))
(defstruct (cnode
(:constructor cnode (cache-key result &optional older newer)))
cache-key
result
(older nil :type cache-node)
(newer nil :type cache-node))
(defclass ordered-cache-mixin (cache-capacity-mixin)
((oldest :init... |
2f8deaf080737b799335e7335d658ccb4db3b7ba93e432cbb22d4b301e53f258 | naominitel/hmx | hmx.ml | type const =
| CInt of int
| CBool of bool
type term =
| Var of string
| App of term * term
| Abs of string * term
| Let of string * term * term
| Const of const
type ty =
| TConst of string
| TVar of var
| TApp of ty * ty
and var = var_descr Union_find.point
and var_descr = {
mutable ... | null | https://raw.githubusercontent.com/naominitel/hmx/ed9ca9863a6a7691b50cd1f12440c410bc1f0b8a/hmx.ml | ocaml | type const =
| CInt of int
| CBool of bool
type term =
| Var of string
| App of term * term
| Abs of string * term
| Let of string * term * term
| Const of const
type ty =
| TConst of string
| TVar of var
| TApp of ty * ty
and var = var_descr Union_find.point
and var_descr = {
mutable ... | |
765a7f3f9b67029f2ee0af07bd5b88728e0bbed3f02cace32146667f8ed7eaeb | ngless-toolkit/ngless | Transform.hs | Copyright 2016 - 2022 NGLess Authors
- License : MIT
- License: MIT
-}
# LANGUAGE FlexibleContexts #
module Transform
( transform
, pureTransform
, isVarUsed
, isVarUsed1
) where
import qualified Data.Text as T
import Control.Monad.Trans.Cont
import Control.Monad.Except
import Control.Mo... | null | https://raw.githubusercontent.com/ngless-toolkit/ngless/ddbc751270a624550d9e82328336a9c9ffdb4382/NGLess/Transform.hs | haskell | Hashing should be based on what the user input (pre-transforms)
whenJust block (checkSimple1 . blockBody)
-> Expression` into the generic `[(Int, Expression)] -> NGLessIO [(Int, Expression)]`
| Add an argument to a function call iff the expression includes that function call
^ function name
^ new argument
^ expr... | Copyright 2016 - 2022 NGLess Authors
- License : MIT
- License: MIT
-}
# LANGUAGE FlexibleContexts #
module Transform
( transform
, pureTransform
, isVarUsed
, isVarUsed1
) where
import qualified Data.Text as T
import Control.Monad.Trans.Cont
import Control.Monad.Except
import Control.Mo... |
8adcdf04d758feb091a64ba6b1f636555eba458756887832b431ac5f7b4fec73 | exercism/ocaml | example.ml |
let to_roman n =
assert (n <= 3000);
let build ones halves tens = function
| 0 -> ""
| 1 -> ones
| 2 -> ones ^ ones
| 3 -> ones ^ ones ^ ones
| 4 -> ones ^ halves
| 5 -> halves
| 6 -> halves ^ ones
| 7 -> halves ^ ones ^ ones
| 8 -> halves ^ ones ^ ones ^ ones
| 9 -> ones ... | null | https://raw.githubusercontent.com/exercism/ocaml/914e58d48e58a96fe7635fe4b06cc103af4ed683/exercises/practice/roman-numerals/.meta/example.ml | ocaml |
let to_roman n =
assert (n <= 3000);
let build ones halves tens = function
| 0 -> ""
| 1 -> ones
| 2 -> ones ^ ones
| 3 -> ones ^ ones ^ ones
| 4 -> ones ^ halves
| 5 -> halves
| 6 -> halves ^ ones
| 7 -> halves ^ ones ^ ones
| 8 -> halves ^ ones ^ ones ^ ones
| 9 -> ones ... | |
ad47e5fd34b109b0ed5fbd57a7612da76de1d4e2b8d16b2f8212381aec630a9d | spawnfest/eep49ers | snmp_pdus_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2020 . 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 of the License at
%%
%% -2.0
%%
%% Unless required by applica... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/snmp/test/snmp_pdus_SUITE.erl | erlang |
%CopyrightBegin%
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 la... | Copyright Ericsson AB 2003 - 2020 . 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(snmp_pdus_SUITE).
-include_lib("common_test/include/ct.hrl").
-include("snmp_test_lib.hrl").
-include_lib(... |
c4abca788e5c4ad3939f12a60abfd8c0fb302aeb8bbaa829dc1d2fbedae8e546 | raviksharma/bartosz-basics-of-haskell | mymap.hs | import Data.Char -- for the example
import Prelude hiding (map)
-- show
map :: (a -> b) -> [a] -> [b]
map _ [] = []
map f (a : as) = f a : map f as
main = print $ map toUpper "hello world!"
| null | https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/07-tokenizer-higher-order-functions/mymap.hs | haskell | for the example
show | import Prelude hiding (map)
map :: (a -> b) -> [a] -> [b]
map _ [] = []
map f (a : as) = f a : map f as
main = print $ map toUpper "hello world!"
|
9346072b9ea3a32837749ce66a56ed3b1dee58b1b15c5e4b0d619455de4307c2 | sadiqj/ocaml-esp32 | testerror.ml | (** Test that the right message errors are emitted by Arg *)
let usage= "Arg module testing"
let test total i (spec,anon,argv) =
let argv = Array.of_list ("testerror" :: argv) in
try Arg.parse_argv ~current:(ref 0) argv spec anon usage with
| Arg.Bad s-> Printf.printf "(%d/%d) Bad:\n%s\n" (i+1) total s
| Arg... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/lib-arg/testerror.ml | ocaml | * Test that the right message errors are emitted by Arg
* missing argument error
* No argument expected
* help message
* wrong argument type
* unknown option
* user-error in anon fun
* user-error in anon fun |
let usage= "Arg module testing"
let test total i (spec,anon,argv) =
let argv = Array.of_list ("testerror" :: argv) in
try Arg.parse_argv ~current:(ref 0) argv spec anon usage with
| Arg.Bad s-> Printf.printf "(%d/%d) Bad:\n%s\n" (i+1) total s
| Arg.Help s -> Printf.printf "(%d/%d) Help:\n%s\n" (i+1) total s
... |
66417ee0793e40cda12ee75d31f2c14f35a205493fa787df7d31d9ba1bac6317 | dradtke/Lisp-Text-Editor | button.lisp | (in-package :gtk-cffi)
(defclass button (bin)
())
(defcfun "gtk_button_new" :pointer)
(defcfun "gtk_button_new_with_label" :pointer (label gtk-string))
(defcfun "gtk_button_new_with_mnemonic" :pointer (label gtk-string))
(defcfun "gtk_button_new_from_stock" :pointer (label gtk-string))
(defmethod gconstructor (... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/gtk/button.lisp | lisp | (in-package :gtk-cffi)
(defclass button (bin)
())
(defcfun "gtk_button_new" :pointer)
(defcfun "gtk_button_new_with_label" :pointer (label gtk-string))
(defcfun "gtk_button_new_with_mnemonic" :pointer (label gtk-string))
(defcfun "gtk_button_new_from_stock" :pointer (label gtk-string))
(defmethod gconstructor (... | |
833959d3978876bf08ad0cfb3de0c5256a482d3e29d73af0fbe789665a4c28a4 | haskell-repa/repa | Source.hs |
module Data.Array.Repa.Flow.Seq.Source
( module Data.Array.Repa.Flow.Base
, Source (..)
, Step1 (..)
, Step8 (..)
, SourceState (..)
, startSource
, joinSourceStates
, getSourceState
, flow
, flowGuts)
where
import... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-flow/Data/Array/Repa/Flow/Seq/Source.hs | haskell | | A `Source` is an incremental element producer.
We can pull elements from a source without knowing where they come from.
optional optimisation.
| Representation of the source state depends on whether the
source has already been started.
| How many elements are still available.
| Report the current sta... |
module Data.Array.Repa.Flow.Seq.Source
( module Data.Array.Repa.Flow.Base
, Source (..)
, Step1 (..)
, Step8 (..)
, SourceState (..)
, startSource
, joinSourceStates
, getSourceState
, flow
, flowGuts)
where
import... |
cde1719dfb71816f4dc12e812308b3e183354a16ee9218c0935008d111bb00b4 | ideas-edu/ideas | TestSuite.hs | -----------------------------------------------------------------------------
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 .
-------... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Utils/TestSuite.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
introduces the notion of a test suite, and it stores the test results for
is a monoid.
--------------------... | 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 )
A lightweight wrapper for organizing... |
cc893f8449e58775d38427114ff8773a11ab9e1cbb322011f37ca3683c011033 | Fresheyeball/Shpadoinkle | Types.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleIn... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/5e5fb636fb0b0e99f04bae0d75cff722a10463ae/examples/servant-crud/Types.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE OverloadedLabels #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RankNTypes #
... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses ... |
ade8d047cf7f61bbc1f9623b5a9b64c81610bcc52615f6faec36cebfa90a7474 | mk270/archipelago | parser.ml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/server/parser.ml | ocaml | this needs to become a tuple
we now have all potentially searchable objects
ignore case of unparsed words at end |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... |
3ad817af22cd1395340ef426c339d005a4553ddfde57dda87db4cbd03bea082e | kelamg/HtDP2e-workthrough | ex282.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex282) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Abstraction/ex282.rkt | racket | about the language level of this file in a form that our tools can easily process.
Number -> Boolean | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex282) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define (f-plain x)
(* 10 x))
(define f-lambda
(l... |
47d336c65d7b31bc6494b1ce94d22ff44f494a038dfb1af81b13dc5d6966b818 | OCamlPro/ocamlexc | tbl.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/utils/tbl.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . Distributed only by permission .
$ I d : tbl.ml , v 1.2 1999/02/15 15:00:35 pessaux Exp $
type ('a, 'b) t =
Empty
| Node of ('a, 'b) t *... |
f5874a98c2303bdf2d6e865c4ad433e1a67cb41afce1cbf27d9acd80f722a538 | aryx/fork-efuns | color.mli |
(* helper to colorize a buffer *)
val color: Efuns.buffer -> Str.regexp -> bool (* strict *) -> Text.attribute ->
unit
(* to be set by each major programming mode *)
val color_func: (Efuns.buffer -> Text.point -> Text.point -> unit) Var.t
val color_region: Efuns.action
val color_buffer: Efuns.action
(* to be used ... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/features/color.mli | ocaml | helper to colorize a buffer
strict
to be set by each major programming mode
to be used in 'install' of a mode |
unit
val color_func: (Efuns.buffer -> Text.point -> Text.point -> unit) Var.t
val color_region: Efuns.action
val color_buffer: Efuns.action
val color_buffer_buf: Efuns.buffer -> unit
|
ac7519840c4ba4207a34c23ecca5470c01e331945c937be2bb667f56385a860b | ekmett/indexed | Product.hs | # LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Indexed.Product
Copyright : ( C ) 2012
-- License : BSD-style (see the file LICENSE)
Maintainer : < ... | null | https://raw.githubusercontent.com/ekmett/indexed/331b5dd12eee9dfa89d8bf2dda18dce04030167b/src/Indexed/Product.hs | haskell | # LANGUAGE GADTs #
---------------------------------------------------------------------------
|
Module : Indexed.Product
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
Products of indexed functors
----------------------------------------------------... | # LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
Copyright : ( C ) 2012
Maintainer : < >
module Indexed.Product
( (*)(..)
, ifst
, isnd
) where
import Control.Applicative
import Data.Monoid
import Indexed.Functor
import Indexed.Foldable
import Indexed.Traversable
impor... |
9374d54c2b554c4a2bae424e56b43d60ea6e74bb5026ab4c29402bbb004824ff | huangjs/cl | diffop.lisp | ;;; -*- Lisp -*-
DIFFOP : A Library for making ' a more useful character in
;;;
;;; Loading this file sets things up so that you can do
;;;
;;; DEPENDS(F,X); => [F(X)]
;;;
;;; F'; => dF/dX
;;;
3
F'3 ; or F '' ' ; = > d F
;;; -----
;;; 3
;;; dX
;;;
If a variable has ... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/misc/diffop.lisp | lisp | -*- Lisp -*-
Loading this file sets things up so that you can do
DEPENDS(F,X); => [F(X)]
F'; => dF/dX
or F '' ' ; = > d F
-----
3
dX
which will be used is undefined.
variable to differentiate by.
Makes awfully big assumptions about the internals of GRAM | DIFFOP : A Library for making ' a more useful character in
3
If a variable has more than one DEPENDS property , the variable
If a variable has no DEPENDS property , UND will be used as the
(DEFUN INFER-DEPENDENCY (X)
(OR (CAR (MGET (CADR ($LISTOFVARS X)) 'DEPENDS)) '$UND))
(DECLARE... |
83bd28009c6255b7db0ce561ec6c99a753350bcb2f11251f58abce55e8698cd9 | jacquev6/DrawGrammar | DrawingTests.ml | Copyright 2017 < >
open General.Abbr
open DrawGrammar
let single_rule_grammars =
Grammar.[
("terminal", terminal "in a rounded rectangle");
("token", token "in a rounded rectangle");
("rule with a name longer than its definition", terminal "short");
("non-terminal", non_terminal "in a rectangle... | null | https://raw.githubusercontent.com/jacquev6/DrawGrammar/ee056a086ca0d8b18889fa06883287fda84807c3/src/DrawingTests.ml | ocaml | Copyright 2017 < >
open General.Abbr
open DrawGrammar
let single_rule_grammars =
Grammar.[
("terminal", terminal "in a rounded rectangle");
("token", token "in a rounded rectangle");
("rule with a name longer than its definition", terminal "short");
("non-terminal", non_terminal "in a rectangle... | |
7498cfa9c1baa4ebd4fb7db050354b142d2bec554411a66147f5af6b161dd5f4 | mejgun/haskell-tdlib | GroupCallParticipantVideoInfo.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.GroupCallParticipantVideoInfo where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.GroupCallVideoSourceGroup as GroupCallVideoSourceGroup
import qualified Utils as U
-- |
data GroupCallParticipantVideoInfo = -- |... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/GroupCallParticipantVideoInfo.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Contains information about a group call participant's video channel
| True, if the video is paused. This flag needs to be ignored, if new video frames are received
| Video channel endpoint identifier
| List of synchronization source groups of the video |
module TD.Data.GroupCallParticipantVideoInfo where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.GroupCallVideoSourceGroup as GroupCallVideoSourceGroup
import qualified Utils as U
GroupCallParticipantVideoInfo
is_paused :: Maybe Bool,
endpoint_id :: Maybe ... |
195c56674cde7e12f78bed31e0c007b78754abbae68e69b94b653f3b07da66e9 | steshaw/PLAR | tactics.ml | (* ========================================================================= *)
Goals , LCF - like tactics and - like proofs .
(* *)
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
(* ===... | null | https://raw.githubusercontent.com/steshaw/PLAR/c143b097d1028963f4c1d24f45a1a56c8b65b838/tactics.ml | ocaml | =========================================================================
=========================================================================
-------------------------------------------------------------------------
---------------... | Goals , LCF - like tactics and - like proofs .
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
type goals =
Goals of ((string * fol formula) list * fol formula)list *
(thm list -> thm);;
Printer for goals ( just shows first goal plus total numb... |
efaf7e28a91dd345fba4f2a56100b745bcd2df48b8c32c58119d503469d8b869 | abdulapopoola/SICPBook | 4.57.scm | #lang racket
(rule (can-replace ?person-1 ?person-2)
(and (or (and (job ?person-1 ?job)
(job ?person-2 ?job))
(and (job ?person-1 ?job1)
(job ?person-2 ?job2)
(can-do-job ?job1 ?job2)))
(not (same ?person-1 ?person-2))))
(can-... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%204/4.4/4.57.scm | scheme | #lang racket
(rule (can-replace ?person-1 ?person-2)
(and (or (and (job ?person-1 ?job)
(job ?person-2 ?job))
(and (job ?person-1 ?job1)
(job ?person-2 ?job2)
(can-do-job ?job1 ?job2)))
(not (same ?person-1 ?person-2))))
(can-... | |
f232c4c87e78560c15453d8e5080d1f5edd9d6fe384367b89a1fbf387fb56981 | zachgk/catln | Parser.hs | --------------------------------------------------------------------
-- |
Module : Syntax . Ct .
Copyright : ( c ) 2019
License : MIT
-- Maintainer:
-- Stability : experimental
-- Portability: non-portable
--
-- This module is the main module for parsing. It will read in files
from their file... | null | https://raw.githubusercontent.com/zachgk/catln/3427e1d67e076bf84969f7f57ff1e66ae02c7b00/src/Syntax/Ct/Parser.hs | haskell | ------------------------------------------------------------------
|
Maintainer:
Stability : experimental
Portability: non-portable
This module is the main module for parsing. It will read in files
------------------------------------------------------------------
# LANGUAGE OverloadedStrings # | Module : Syntax . Ct .
Copyright : ( c ) 2019
License : MIT
from their file paths and then parse into a ' RawPrgm ' .
module Syntax.Ct.Parser where
import Control.Applicative hiding (many, some)
import Text.Megaparsec
import Text.Megaparsec.Char
import ... |
f2e83689fe4bec04a43c8d97912da1c2a6465f1da45a8277ad2fc170eb9c361e | flipstone/orville | Entity.hs | module StrangeFieldNames.Entity where
import Data.Int (Int32)
import qualified Database.Orville.PostgreSQL as O
-- field is generic and is meant to be used with different column names to test
-- that crud actions work with various name styles Ex. camelCase, snake_case etc.
data CrudEntity key = CrudEntity
{ crudEn... | null | https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/test/StrangeFieldNames/Entity.hs | haskell | field is generic and is meant to be used with different column names to test
that crud actions work with various name styles Ex. camelCase, snake_case etc.
Take in the column name so we can test different styles. | module StrangeFieldNames.Entity where
import Data.Int (Int32)
import qualified Database.Orville.PostgreSQL as O
data CrudEntity key = CrudEntity
{ crudEntityId :: key
, crudEntityField :: Int32
} deriving (Show, Eq)
newtype CrudEntityId = CrudEntityId
{ unCrudEntityId :: Int32
} deriving (Show, Eq)
crudE... |
cb0e1cd144fa196105cfc1872b1b13ab3a0c613c75260f28bc0e6dd36e8eb8be | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | Main.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
-- | Functionality to Generate Haskell Code out of an OpenAPI definition File
module OpenAPI.Generate.Main where
import Control.Monad
import qualified Data.Bifunctor as BF
import qualified Data.Map as Map
import qualifi... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/84e78c2c89ed7931a345ca4fe540c748c2600389/openapi3-code-generator/src/OpenAPI/Generate/Main.hs | haskell | # LANGUAGE OverloadedStrings #
| Functionality to Generate Haskell Code out of an OpenAPI definition File
| Defines all the operations as functions and the common imports
| Defines the @defaultURL@ and the @defaultConfiguration@ containing this URL.
| Defines all models in the components.schemas section of the 'OAT... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TemplateHaskell #
module OpenAPI.Generate.Main where
import Control.Monad
import qualified Data.Bifunctor as BF
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as T
i... |
848e1b19f923bd28bb85ffa3b5ce4f4aa530a33ee910bd5fc634e481a3ae4ad5 | axman6/amazonka-s3-streaming | StreamingUpload.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ParallelListComp #
# LANGUAGE ScopedTypeVariables #
module Amazonka.S3.StreamingUpload
( ... | null | https://raw.githubusercontent.com/axman6/amazonka-s3-streaming/4d1aa55fa5fc347f46567fd4efdd0da0a69cda96/src/Amazonka/S3/StreamingUpload.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
Making this 5MB+1 seemed to cause AWS to complain
^ Optional chunk size
^ Upload location
collect all the parts
in case of an exception, return Left
The number of bytes remaining in a buffer, and the pointer that backs it.
Didn't fill the buffer, updated b... | # LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ParallelListComp #
# LANGUAGE ScopedTypeVariables #
module Amazonka.S3.StreamingUpload
( streamUpload
, ChunkSize
, minimumChunkSize
, NumThreads
... |
7d17be652659b6458509fed608741ddaeafcf78677b2d13441db487a89e3eb5a | yuanqing/code-problems | test.ml | open Bubble_sort
open OUnit2
let () = run_test_tt_main ("bubble_sort compare xs" >::: [
"empty list" >:: (fun _ ->
assert_equal [] (bubble_sort compare [])
);
"single item" >:: (fun _ ->
assert_equal [42] (bubble_sort compare [42])
);
"multiple items; ascending order" >:: (fun _ ->
assert_equa... | null | https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/bubble_sort/test.ml | ocaml | open Bubble_sort
open OUnit2
let () = run_test_tt_main ("bubble_sort compare xs" >::: [
"empty list" >:: (fun _ ->
assert_equal [] (bubble_sort compare [])
);
"single item" >:: (fun _ ->
assert_equal [42] (bubble_sort compare [42])
);
"multiple items; ascending order" >:: (fun _ ->
assert_equa... | |
371dc7fd9eb9c2db55da015a4265bce1d9ccd8aed5d8c1cde5c1de10029326bb | callum-oakley/advent-of-code | 04.clj | (ns aoc.2019.04
(:require
[clojure.test :refer [deftest is]]))
(defn parse [s]
(->> s (re-seq #"\d+") (map read-string)))
(defn valid? [f pass]
(let [digits (map int (str pass))]
(and (apply <= digits)
(some #(f 2 (count %)) (partition-by identity digits)))))
(defn part-* [input f]
(->> input... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/16a98d33fd8158a1b4f00776e74ead3242519833/src/aoc/2019/04.clj | clojure | (ns aoc.2019.04
(:require
[clojure.test :refer [deftest is]]))
(defn parse [s]
(->> s (re-seq #"\d+") (map read-string)))
(defn valid? [f pass]
(let [digits (map int (str pass))]
(and (apply <= digits)
(some #(f 2 (count %)) (partition-by identity digits)))))
(defn part-* [input f]
(->> input... | |
02c7eb32b80b81ab5a5e144cc80504173cc55c9295a6275d8ec190cd03692358 | collaborativetrust/WikiTrust | author_sig_7_4.ml |
Copyright ( c ) 2007 - 2008 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/author_sig_7_4.ml | ocaml | * Type of author signature
* [is_author_in_sigs id w sigs] returns [true] if author [id] is in the signatures [sigs] of
word [w], and returns [false] otherwise. |
Copyright ( c ) 2007 - 2008 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... |
792f5159d1eae344c938bdb267150f3fb0e7081b7d42c77225c92d76b3d8d626 | dpiponi/Moodler | sum4.hs | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
sum49 <- new' "sum4"
container7 <- container' "panel_sum4.png" (x+(0.0), y+(0.0)) (Inside root)
plugin10 <- plugin' (sum49 ! "signal1") (x+(-60.0), y+(72.0)) (Outside container7)
setColour plugin10 "#sample"
... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/sum4.hs | haskell | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
sum49 <- new' "sum4"
container7 <- container' "panel_sum4.png" (x+(0.0), y+(0.0)) (Inside root)
plugin10 <- plugin' (sum49 ! "signal1") (x+(-60.0), y+(72.0)) (Outside container7)
setColour plugin10 "#sample"
... | |
e20d96c5699d7f3e99ab4e8469537ed56cdbfdf66f9c0f707ab6a315a77b4ff3 | bucko909/erlcapnp | capnp_raw.erl | -module(capnp_raw).
-compile([export_all]).
-record(message, {
segments :: tuple(),
current_segment :: binary(),
current_offset :: integer(),
depth=0
}).
-record(struct, {
data :: binary(),
pointers :: list(term())
}).
-record(list, {
data :: list(term())
}).
read_message(<<SegmentCountM1:32/unsig... | null | https://raw.githubusercontent.com/bucko909/erlcapnp/813d314ec02f7ca634d4b296e2f57fecf67173d0/src/capnp_raw.erl | erlang | io:format("Capability: ~p, ~p~n", [P, CapabilityOffset]),
io:format("Junk: ~p~n", [Junk]),
io:format("Data: ~p; Pointers: ~p~n", [Data, Pointers]),
io:format("List pointers: ~p~n", [Pointers]),
io:format("Struct list.~n"),
io:format("decode_list_elements ~p ~p ~p~n", [S, L, Data]), | -module(capnp_raw).
-compile([export_all]).
-record(message, {
segments :: tuple(),
current_segment :: binary(),
current_offset :: integer(),
depth=0
}).
-record(struct, {
data :: binary(),
pointers :: list(term())
}).
-record(list, {
data :: list(term())
}).
read_message(<<SegmentCountM1:32/unsig... |
037bd0aac324a40403f6ee15ddc91f764b8ffddeee54b3958bdb2b0a74ab6938 | jg513/enif_protobuf | ep_issue_19_tests.erl |
Copyright ( c ) ,
-module(ep_issue_19_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("gpb/include/gpb.hrl").
-record(m1, {a}).
issue_19_test() ->
Defs = [
{{msg, m1}, [
#field{name = a, fnum = 1, rnum = #m1.a, type = uint64, occurrence = required... | null | https://raw.githubusercontent.com/jg513/enif_protobuf/15861eacfd87925297dd7a8a3acbaee42a1cfd4a/test/ep_issue_19_tests.erl | erlang |
Copyright ( c ) ,
-module(ep_issue_19_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("gpb/include/gpb.hrl").
-record(m1, {a}).
issue_19_test() ->
Defs = [
{{msg, m1}, [
#field{name = a, fnum = 1, rnum = #m1.a, type = uint64, occurrence = required... | |
d780b241b8e1d28e6e681175462da87abd6b66baffdbe6f56b3238638d6ad715 | heraldry/heraldicon | text_field.cljs | (ns heraldicon.frontend.element.text-field
(:require
[heraldicon.frontend.element.core :as element]
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.tooltip :as tooltip]
[heraldicon.interface :as interface]
[re-frame.core :as rf]))
(defn text-field [context & {:keys [on-change style]}]
... | null | https://raw.githubusercontent.com/heraldry/heraldicon/a931cf3affe14fcb0e2785744733af4389dd4a75/src/heraldicon/frontend/element/text_field.cljs | clojure | (ns heraldicon.frontend.element.text-field
(:require
[heraldicon.frontend.element.core :as element]
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.tooltip :as tooltip]
[heraldicon.interface :as interface]
[re-frame.core :as rf]))
(defn text-field [context & {:keys [on-change style]}]
... | |
62899075e0cb6df69186329c27c7273b63fa61015d070a9d2d519ac1e92d33d7 | bos/llvm | Util.hs | {-# LANGUAGE ForeignFunctionInterface, ScopedTypeVariables, DeriveDataTypeable #-}
module LLVM.Core.Util(
-- * Module handling
Module(..), withModule, createModule, destroyModule, writeBitcodeToFile, readBitcodeFromFile,
getModuleValues, getFunctions, getGlobalVariables, valueHasType,
-- * Module provid... | null | https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/LLVM/Core/Util.hs | haskell | # LANGUAGE ForeignFunctionInterface, ScopedTypeVariables, DeriveDataTypeable #
* Module handling
* Module provider handling
* Pass manager handling
* Instruction builder
* Basic blocks
* Functions
* Structs
* Globals
* Instructions
* Uses and Users
* Misc
* Transformation passes
----------------------------... | module LLVM.Core.Util(
Module(..), withModule, createModule, destroyModule, writeBitcodeToFile, readBitcodeFromFile,
getModuleValues, getFunctions, getGlobalVariables, valueHasType,
ModuleProvider(..), withModuleProvider, createModuleProviderForExistingModule,
PassManager(..), withPassManager, createPas... |
9bb1a4325e72746d24daa104fd7df5bf1797fab270fbd34eef6da73468fb8e81 | plumatic/grab-bag | config.clj | {:machine {:instance-type :r3.8xlarge
:tags {:owner "grabbag-corp"}}
:service {:server-port 80}
:parameters {:swank-port 6446
:yourkit-port 10001
:forward-ports {6666 :swank-port
10001 :yourkit-port}
:email-level :fatal}
:envs {:crunk... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/model-explorer/src/model_explorer/config.clj | clojure | {:machine {:instance-type :r3.8xlarge
:tags {:owner "grabbag-corp"}}
:service {:server-port 80}
:parameters {:swank-port 6446
:yourkit-port 10001
:forward-ports {6666 :swank-port
10001 :yourkit-port}
:email-level :fatal}
:envs {:crunk... | |
b988dce345ab76461b9f8fa6013247903a090e1c1e925b1f51c605c1a87ccca0 | stylewarning/quickutil | management.lisp | ;;;; management.lisp
Copyright ( c ) 2013
(defpackage #:quickutil-client-management
(:use #:cl #:asdf)
(:export #:load-quickutil-utilities
#:unload-quickutil-utilities
#:with-quickutil-utilities
#:*verbose*))
(in-package #:quickutil-client-management)
(defvar *verbose* nil
... | null | https://raw.githubusercontent.com/stylewarning/quickutil/5adb3463d99095145325c4013117bd08a8f6cac2/quickutil-client/management.lisp | lisp | management.lisp
Clean up all the symbols.
Delete the package. | Copyright ( c ) 2013
(defpackage #:quickutil-client-management
(:use #:cl #:asdf)
(:export #:load-quickutil-utilities
#:unload-quickutil-utilities
#:with-quickutil-utilities
#:*verbose*))
(in-package #:quickutil-client-management)
(defvar *verbose* nil
"Dictates whether loa... |
6efb35f8fdc8067fa34e9872904ba9dc74bb1ae03f4a4338460b97546e481da8 | geophf/1HaskellADay | Exercise.hs | module Y2020.M08.D26.Exercise where
import Y2020.M08.D25.Exercise
-
Yesterday , we read in the top - downloaded project gutenberg books with their
associated URLs to the book - pages , but , if you followed any of those links
you see those links are n't the books , themselves , but are the anchor - pages
to l... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M08/D26/Exercise.hs | haskell | } | module Y2020.M08.D26.Exercise where
import Y2020.M08.D25.Exercise
-
Yesterday , we read in the top - downloaded project gutenberg books with their
associated URLs to the book - pages , but , if you followed any of those links
you see those links are n't the books , themselves , but are the anchor - pages
to l... |
27555bd2b2a27f79d98b57dd453a68fd88a9e60bb580d4b3209525d1d5ef6418 | souenzzo/pedestal-native | log.clj | (ns io.pedestal.log)
(defn default-tracer [& _])
(defn active-span [& _])
(defn TraceSpanBaggage [& _])
(defn -log-span [& _])
(defn log [& _])
(defn -counter [& _])
(defn jmx-reporter [& _])
(defn span-log-error-kind [& _])
(defn log-span [& _])
(defn -register [& _])
(defn LoggingMDC [& _])
(defn span [& _])
(defn ^... | null | https://raw.githubusercontent.com/souenzzo/pedestal-native/46e516751c12e70be8b3b2ff2e4ffc3e6afffc7d/projects/log-noop/src/io/pedestal/log.clj | clojure | (ns io.pedestal.log)
(defn default-tracer [& _])
(defn active-span [& _])
(defn TraceSpanBaggage [& _])
(defn -log-span [& _])
(defn log [& _])
(defn -counter [& _])
(defn jmx-reporter [& _])
(defn span-log-error-kind [& _])
(defn log-span [& _])
(defn -register [& _])
(defn LoggingMDC [& _])
(defn span [& _])
(defn ^... | |
935879ed78c3ddc37c33411fb9067fb88313b1afca42dca71eee725e71ceadc4 | yetanalytics/dl4clj | iterators.clj | (ns dl4clj.datasets.iterators
(:import [org.deeplearning4j.datasets.datavec RecordReaderDataSetIterator
RecordReaderMultiDataSetIterator$Builder RecordReaderMultiDataSetIterator
SequenceRecordReaderDataSetIterator]
[org.deeplearning4j.datasets.iterator
DoublesDataSetIter... | null | https://raw.githubusercontent.com/yetanalytics/dl4clj/9ef055b2a460f1a6246733713136b981fd322510/src/dl4clj/datasets/iterators.clj | clojure |
multimethod
record reader dataset iterator mulimethods
dataset iterator mulimethods
default dataset iterator mulimethods
spark dataset iterator mulimethods
going to update once I get to updating spark stuff
update after refactor of multi method
currently can't test this until I figure out the issu... | (ns dl4clj.datasets.iterators
(:import [org.deeplearning4j.datasets.datavec RecordReaderDataSetIterator
RecordReaderMultiDataSetIterator$Builder RecordReaderMultiDataSetIterator
SequenceRecordReaderDataSetIterator]
[org.deeplearning4j.datasets.iterator
DoublesDataSetIter... |
f505f1f1ce8d36338ca2ba774684b3730814c60388fd7fe407cd852ebf54fc4a | mstksg/advent-of-code-2022 | Prelude.hs | {-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
-- |
-- Module : AOC.Prelude
Copyright : ( c ) 2021
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- Custom Prelude while developing challenges. Ideally, once challenges
-- are completed, an imp... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2022/bfbd94a1ed72ce6a0784677c4584f6a5308153ef/src/AOC/Prelude.hs | haskell | # OPTIONS_GHC -Wno-compat-unqualified-imports #
|
Module : AOC.Prelude
License : BSD3
Stability : experimental
Portability : non-portable
Custom Prelude while developing challenges. Ideally, once challenges
are completed, an import to this module would be replaced with explicit
ones for future rea... |
Copyright : ( c ) 2021
Maintainer :
module AOC.Prelude (
module P
) where
import AOC.Common as P
import AOC.Common.Point as P
import AOC.Common.Search as P
import AOC.Solver as P
import AOC.Util ... |
7c7c147075e59f728f9e81cd75f274bccaa29576d0bf07d6ed018826a2700345 | skanev/playground | 80-tests.scm | (require rackunit rackunit/text-ui)
(load "../80.scm")
(define sicp-3.80-tests
(test-suite
"Tests for SICP exercise 3.80"
(check-equal? (stream-take (RLC1 10 0) 4)
'((10 . 0)
(10 . 1.0)
(9.5 . 1.9)
(8.55 . 2.66)))
))
(run-tests s... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/80-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../80.scm")
(define sicp-3.80-tests
(test-suite
"Tests for SICP exercise 3.80"
(check-equal? (stream-take (RLC1 10 0) 4)
'((10 . 0)
(10 . 1.0)
(9.5 . 1.9)
(8.55 . 2.66)))
))
(run-tests s... | |
b4023aeb8eaa490cb8988899aeb31af41c59ff078f76fdc637cbdb96c68da2fa | tweag/ormolu | empty-classes-out.hs | module Main where
-- | Foo!
class Foo a
-- | Bar!
class Bar a
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/class/empty-classes-out.hs | haskell | | Foo!
| Bar! | module Main where
class Foo a
class Bar a
|
504cf44867d03b457234f65eae71c75e50eeb2c8d646d05dc2d722cb0e853c19 | nuscr/nuscr | pragma.mli | (** This module contains variables configuarations, to be set by pragmas or
command line arguments, not to be changed for the duration of the program *)
type t =
| NestedProtocols
| ShowPragmas
| PrintUsage
| RefinementTypes
| SenderValidateRefinements
| ReceiverValidateRefinements
| ValidateRefineme... | null | https://raw.githubusercontent.com/nuscr/nuscr/7f350b978712dc639620f05c8e51ec261691f7cf/lib/utils/pragma.mli | ocaml | * This module contains variables configuarations, to be set by pragmas or
command line arguments, not to be changed for the duration of the program
* Set solver_show_queries
* Set nested_protocol_enabled
* Whether RefinementTypes pragma is enabled
* Set refinement_type
* When refinement types are enabled, send... |
type t =
| NestedProtocols
| ShowPragmas
| PrintUsage
| RefinementTypes
| SenderValidateRefinements
| ReceiverValidateRefinements
| ValidateRefinementSatisfiability
| ValidateRefinementProgress
[@@deriving show]
val pragma_of_string : string -> t
type pragmas = (t * string option) list [@@deriving sh... |
f83dbf5bb827f31f21322aa232a1b05ebec5176f375232786ebd9c0bb41f5dab | soupi/yh | VN.hs |
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module VN where
import qualified SDL
import qualified Play.Engine.MySDL.MySDL as MySDL
import Play.Engine.Uti... | null | https://raw.githubusercontent.com/soupi/yh/4cfbcc7da6f3ca5e330b7fd7d4adeacee7e2dff4/app/VN.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
module VN where
import qualified SDL
import qualified Play.Engine.MySDL.MySDL as MySDL
import Play.Engine.Utils
import Play.Engine.Types
import ... |
a3080f5d09c04e62abe096d419b71d7a35c1958f9b8d30617157432b18e0642a | skymountain/MLSR | typing.ml | module S = Syntax
module T = Type
exception Error of string
;;
let err s = raise @@ Error s
;;
let type_const = function
| S.CInt _ -> T.TyInt
| S.CBool _ -> T.TyBool
| S.CStr _ -> T.TyStr
| S.CFloat _ -> T.TyFloat
| S.CUnit -> T.TyUnit
;;
let constraints_of_subst s =
List.map (fun (x, ty) -> (T.TyVar x... | null | https://raw.githubusercontent.com/skymountain/MLSR/4da4eaccb596e4678838c272b78872073f43e29c/lib/typing.ml | ocaml | module S = Syntax
module T = Type
exception Error of string
;;
let err s = raise @@ Error s
;;
let type_const = function
| S.CInt _ -> T.TyInt
| S.CBool _ -> T.TyBool
| S.CStr _ -> T.TyStr
| S.CFloat _ -> T.TyFloat
| S.CUnit -> T.TyUnit
;;
let constraints_of_subst s =
List.map (fun (x, ty) -> (T.TyVar x... | |
8a06d1b1f9d0f57ce85a023e1f1ba0837e82dc059b7c7042ee776c8a430eb2a2 | ztellman/lamina | queue.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/lamina/07c3fb84fdb3f4a4892c0bdbe3abf28788bdeb29/test/lamina/test/queue.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 lamina.test.queue
(:use
[clojure test]
[lamina.test utils]
[lamina.time :only (invoke-in)])
(:require
[lamina.core.queue :as q]
[lamina.core.result :as r])
(:import
[lamina.core.queue Message]))
(defn enqueue
([q msg]
(q/enqueue q ... |
c514414f651d527095ff3516bf4e014e683328afd64b206e830c4a2787614bbd | Ledest/otpbp | otpbp_error_logger.erl | -module(otpbp_error_logger).
-compile([{parse_transform, otpbp_pt}]).
-ifdef(HAVE_error_logger__get_format_depth_0).
-import(error_logger, [get_format_depth/0]).
-endif.
-ifndef(HAVE_error_logger__limit_term_1).
OTP 20.0
-export([limit_term/1]).
-endif.
-ifndef(HAVE_error_logger__get_format_depth_0).
OTP 20.0
-... | null | https://raw.githubusercontent.com/Ledest/otpbp/f93923239b33cc05500733027e6e775090ac80ad/src/otpbp_error_logger.erl | erlang | -module(otpbp_error_logger).
-compile([{parse_transform, otpbp_pt}]).
-ifdef(HAVE_error_logger__get_format_depth_0).
-import(error_logger, [get_format_depth/0]).
-endif.
-ifndef(HAVE_error_logger__limit_term_1).
OTP 20.0
-export([limit_term/1]).
-endif.
-ifndef(HAVE_error_logger__get_format_depth_0).
OTP 20.0
-... | |
9a2195f7e3087538b1f1912329c09302af214cd25b75bb450747829f32f730ae | pjotrp/guix | refresh.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 < >
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General ... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/guix/scripts/refresh.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 < >
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix s... |
2ff8fee761d56e55687da6d46d11ddd6e2bfb40e24985e594a0d2afe657669dd | WhatsApp/eqwalizer | eqwalizer_specs.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(eqwalizer_specs).
-typing([eqwalizer]).
-compile([export_all, nowarn_export_all]).
%% --------... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/mini-elp/test_projects/parse_error/eqwalizer/src/eqwalizer_specs.erl | erlang |
the LICENSE file in the root directory of this source tree.
-------- erlang --------
-------- gb_sets --------
-------- lists --------
-------- maps --------
-------- proplists --------
-------- timer -------- | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(eqwalizer_specs).
-typing([eqwalizer]).
-compile([export_all, nowarn_export_all]).
-spec 'erlang:abs'(number()) -> number().
'erlang:abs'(_) -> error(eqwalizer_s... |
874f8e62860e342f05755f7a29b8b9761cc736442c50ee0817a5b3b360a67916 | flodihn/NextGen | libid_sup.erl | %%----------------------------------------------------------------------
@author < >
%% @doc
This is the supervisor for the i d library ' ' .
%% @end
%%---------------------------------------------------------------------
-module(libid_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/AreaServer/src/libid/libid_sup.erl | erlang | ----------------------------------------------------------------------
@doc
@end
--------------------------------------------------------------------- | @author < >
This is the supervisor for the i d library ' ' .
-module(libid_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
]).
start_link() ->
supervisor:start_link({local, libid_sup}, libid_sup, []).
init([]) ->
RestartStrategy = one_for_one,
MaxRestarts = 10,
M... |
705f0826e6461c92badfecfa29b18db44f02290b8d6f6a5e982874e21b6ba857 | PacktWorkshops/The-Clojure-Workshop | tennis.clj | (ns packt-clj.tennis
(:require [clojure.math.numeric-tower :as math]
[clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.set :as set]
[semantic-csv.core :as sc]))
(defn match-probability [player-1-rating player-2-rating]
(/ 1
(+ 1 (math/expt 10 (/ (- p... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter05/Activity5.01/tennis.clj | clojure | to call multi-elo
packt-clj.tennis> | (ns packt-clj.tennis
(:require [clojure.math.numeric-tower :as math]
[clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.set :as set]
[semantic-csv.core :as sc]))
(defn match-probability [player-1-rating player-2-rating]
(/ 1
(+ 1 (math/expt 10 (/ (- p... |
64069b62b6931c84775911c9a576c55790dbc10c3b6754fb7ab04374b49ecf30 | YoshikuniJujo/funpaala | bmi.hs | bmi :: Double -> Double -> Double
bmi h w = w / (h / 100) ^ 2
isObese :: Double -> Double -> Bool
isObese h w = bmi h w >= 25
| null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/06_type/bmi.hs | haskell | bmi :: Double -> Double -> Double
bmi h w = w / (h / 100) ^ 2
isObese :: Double -> Double -> Bool
isObese h w = bmi h w >= 25
| |
ca05588ac1e7eef22b9ebb05cc9409a9c561593b72517bb09fae4365cdd3b9b5 | UU-ComputerScience/uhc | ClassCtxtRed1.hs | {- ----------------------------------------------------------------------------------------
what : correct context reduction, not failing with 'cannot prove' Integral a
expected: ok
---------------------------------------------------------------------------------------- -}
module ClassCtxtRed1 where
import D... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/ClassCtxtRed1.hs | haskell | ----------------------------------------------------------------------------------------
what : correct context reduction, not failing with 'cannot prove' Integral a
expected: ok
----------------------------------------------------------------------------------------
|
module ClassCtxtRed1 where
import Debug.Trace
data FM a = FM a
lkup :: (Eq a, Show a) => FM a -> a -> a
main = return ()
|
86cf684ca45bfd012cdafc96496f7e7577b26abdba3a6e4886c2243b82f90f6d | racket/racket7 | contract.rkt | #lang racket/base
(require (for-syntax racket/base))
(provide check)
(define-syntax-rule (check who pred arg)
(unless (pred arg)
(raise-argument-error who (as-string pred) arg)))
(define-syntax (as-string stx)
(syntax-case stx ()
[(_ id)
(datum->syntax stx (symbol->string (syntax-e #'id)) stx)]))
| null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/common/contract.rkt | racket | #lang racket/base
(require (for-syntax racket/base))
(provide check)
(define-syntax-rule (check who pred arg)
(unless (pred arg)
(raise-argument-error who (as-string pred) arg)))
(define-syntax (as-string stx)
(syntax-case stx ()
[(_ id)
(datum->syntax stx (symbol->string (syntax-e #'id)) stx)]))
| |
5a5a7242ee85e27e2346ecbc34ecead2ce7df4452a1d75b1dd3bb8b3b06293e2 | jiangpengnju/htdp2e | space_invader_game.v0.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname designing_with_itemizations_again) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t const... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/itemizations_and_structures/space_invader_game.v0.rkt | racket | about the language level of this file in a form that our tools can easily process.
playing a simple space invader game.
The palyer is in control of a tank (a small rectangle) that must defend our
planet (the buttom of the canvas) from a UFO that descends from the top of
the canvas to the bottom. In order to stop t... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname designing_with_itemizations_again) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Sample Problem : Design a game progr... |
78db294f4e48c51991bb35de8ecf871afd5317794e8584ee6f82b74615a437c4 | ocharles/blog | 2014-03-24-loops.hs | # LANGUAGE GeneralizedNewtypeDeriving #
import Control.Applicative
import Data.IORef
import Control.Monad (join)
import Control.Concurrent.MVar
import Data.Map (Map)
import Data.Traversable (for)
import qualified Data.Map as Map
import Data.Functor.Compose
import Data.Foldable
getAllUsers :: IO [Bool]
getAllUsers = un... | null | https://raw.githubusercontent.com/ocharles/blog/fa8e911d3c03b134eee891d187a1bb574f23a530/code/2014-03-24-loops.hs | haskell | Create a IORef to keep track of requested keys and result MVars
Check which keys were requested and perform a query
Populate all MVars with results | # LANGUAGE GeneralizedNewtypeDeriving #
import Control.Applicative
import Data.IORef
import Control.Monad (join)
import Control.Concurrent.MVar
import Data.Map (Map)
import Data.Traversable (for)
import qualified Data.Map as Map
import Data.Functor.Compose
import Data.Foldable
getAllUsers :: IO [Bool]
getAllUsers = un... |
8ea6fe46f9cd74d62423b1caf6b07064cc06a2788f8ad2e3cdf75f0e8902aed8 | teamwalnut/graphql-ppx | log.ml | let log msg = if Ppx_config.verbose_logging () then print_endline msg
let error_log = prerr_endline
| null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/log.ml | ocaml | let log msg = if Ppx_config.verbose_logging () then print_endline msg
let error_log = prerr_endline
| |
3ef72419c558593569176a16b23bc8638f524c2dba594b4e3fdbfa90ab7e31f4 | RichiH/git-repair | Git.hs | git repository handling
-
- This is written to be completely independant of git - annex and should be
- suitable for other uses .
-
- Copyright 2010 - 2012 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- This is written to be completely independant of git-annex and should be
... | null | https://raw.githubusercontent.com/RichiH/git-repair/c61b677e7a67a286df34c0629c52aeae9be9299a/Git.hs | haskell | User-visible description of a git repo.
Location of the repo, either as a path or url.
Path to a local repository's .git directory.
Some code needs to vary between URL and normal repos,
- or bare and non-bare, these functions help with that.
git treats these the same as ssh
Path to a repository's gitattribut... | git repository handling
-
- This is written to be completely independant of git - annex and should be
- suitable for other uses .
-
- Copyright 2010 - 2012 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- This is written to be completely independant of git-annex and should be
... |
5842b8ca9a417abe81fd2b869d151e7dcb28f67a89b58533cece0090f460d1c9 | well-typed/large-records | Rewriter.hs | {-# LANGUAGE LambdaCase #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE ViewPatterns #-}
# LANGUAGE NamedFieldPuns #
module Data.Record.Anon.Internal.Plugin.TC.Rewriter (rewrite) where
import Data.Record.Anon.Internal.Plugin.TC.Row.KnownRow (KnownRow)
import Data.Record.Anon.Internal.Plugin.TC.Row.ParsedRow (Fi... | null | https://raw.githubusercontent.com/well-typed/large-records/fb983aa136c2602499c2421323bd52b6a54b7c9a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/Rewriter.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
| Functor argument, if any
| Known record, if all fields are known
trace _debugInput $
trace _debugParsed $ | # LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
module Data.Record.Anon.Internal.Plugin.TC.Rewriter (rewrite) where
import Data.Record.Anon.Internal.Plugin.TC.Row.KnownRow (KnownRow)
import Data.Record.Anon.Internal.Plugin.TC.Row.ParsedRow (Fields)
import Data.Record.Anon.Internal.Plugin.TC.GhcTcPluginAPI
im... |
659219fedaf62b3d03f7151fe98abb71e848635262da9ef735faed298929df4e | w3ntao/sicp-solution | circuit.rkt | #lang racket
(require (combine-in (only-in "../AbstractionOfData/table.rkt"
make-table
insert!
lookup)
(only-in "wire.rkt"
make-wire
set-signal!
... | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/ToolBox/IntegratedCircuit/circuit.rkt | racket | build n bits circuit | #lang racket
(require (combine-in (only-in "../AbstractionOfData/table.rkt"
make-table
insert!
lookup)
(only-in "wire.rkt"
make-wire
set-signal!
... |
44a71c3d1ca8e16434187b38af26bafb2c1717d29504b01e5c3e5b4f7d0d2f5a | Incanus3/ExiL | backward.lisp | (in-package :integration-tests)
(declaim (optimize (compilation-speed 0) (debug 3) (space 0) (speed 0)))
(defclass backward-integration-tests (integration-tests) ())
(defmethod set-up ((tests backward-integration-tests))
(call-next-method)
(unwatch all))
(def-test-method test-fact-matching ((tests backward-integ... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/tests/integration/backward.lisp | lisp |
this actually adds conditions to goals again, but since only
assertions are allowed in backward-chaining rules' activations
this will never cycle
(textui-test-run (get-suite backward-integration-tests)) | (in-package :integration-tests)
(declaim (optimize (compilation-speed 0) (debug 3) (space 0) (speed 0)))
(defclass backward-integration-tests (integration-tests) ())
(defmethod set-up ((tests backward-integration-tests))
(call-next-method)
(unwatch all))
(def-test-method test-fact-matching ((tests backward-integ... |
04e250fcc9aeecc952eaae5633cf52bf38e5506141f40072367373c94fb81e77 | babashka/book | compile.clj | #!/usr/bin/env bb
(require '[babashka.process :as p])
(def out-page (str "gh-pages/"
(or (System/getenv "BABASHKA_BOOK_MAIN")
"master")
".html"))
(-> (p/$ asciidoctor src/book.adoc -o ~out-page -a docinfo=shared)
(p/check))
(binding [*out* *err*]
(pr... | null | https://raw.githubusercontent.com/babashka/book/e64c94c6649d76a7b3dae51fd1875e5eb9cd3dc0/script/compile.clj | clojure | #!/usr/bin/env bb
(require '[babashka.process :as p])
(def out-page (str "gh-pages/"
(or (System/getenv "BABASHKA_BOOK_MAIN")
"master")
".html"))
(-> (p/$ asciidoctor src/book.adoc -o ~out-page -a docinfo=shared)
(p/check))
(binding [*out* *err*]
(pr... | |
290e8e877228482e57d335072ecbd1dfc262eed11abab1cbf1551aff85c454c4 | Clozure/ccl-tests | declaration.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun May 29 07:16:15 2005
;;;; Contains: Tests of the DECLARATION declarations
(in-package :cl-test)
(deftest declaration.1
(progn (declaim (declaration)) nil)
nil)
(deftest declaration.2
(progn (proclaim '(declaration)) nil)
nil)
(deftest declaration.3
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/declaration.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the DECLARATION declarations
For the error tests, see the page in the CLHS for TYPE:
"A symbol cannot be both the name of a type and the name
of a declaration. Defining a symbol as the name of a class,
structure, condition, or type, when the symbol has been
declared as... | Author :
Created : Sun May 29 07:16:15 2005
(in-package :cl-test)
(deftest declaration.1
(progn (declaim (declaration)) nil)
nil)
(deftest declaration.2
(progn (proclaim '(declaration)) nil)
nil)
(deftest declaration.3
(let ((sym (gensym))
(sym2 (gensym)))
(proclaim `(declaration ,sym ,sy... |
6caad76cf3d923a0e7b985a7122dcbe7412965240150ed62e8612b33bfaee0de | Helium4Haskell/helium | ImportTwo2.hs | module ImportTwo2 where
y = 3 | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/ImportTwo2.hs | haskell | module ImportTwo2 where
y = 3 | |
eb98d91819d6077a04a4889651a63e075d1c2d7083a25ff3c8a20224161add85 | BranchTaken/Hemlock | test_stress2.ml | open! Basis.Rudiments
open! Basis
open Ordset
let test () =
(* test is n^2 time complexity, so keep n small. *)
let rec test n i e ordset = begin
match i < n with
| false -> ordset
| true -> begin
(* Hash i in order to test semi-random insertion order. *)
let h = Hash.(t_of_state (Uns.h... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a21b462fe7f70475591d2ffae185c91552bf6372/bootstrap/test/basis/ordset/test_stress2.ml | ocaml | test is n^2 time complexity, so keep n small.
Hash i in order to test semi-random insertion order. | open! Basis.Rudiments
open! Basis
open Ordset
let test () =
let rec test n i e ordset = begin
match i < n with
| false -> ordset
| true -> begin
let h = Hash.(t_of_state (Uns.hash_fold i State.empty)) in
let ordset' = remove h (test n (succ i) e (insert h ordset)) in
assert (equal... |
57fb6c362e5948915116b347dd47dbf74400b6764e40d16fc03d74ef363f0912 | cedlemo/OCaml-GI-ctypes-bindings-generator | Pack_direction.mli | open Ctypes
type t = Ltr | Rtl | Ttb | Btt
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val t_view: t typ
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Pack_direction.mli | ocaml | open Ctypes
type t = Ltr | Rtl | Ttb | Btt
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val t_view: t typ
| |
cf5c9b33cf98b977cd0432f008b36bd1353a39d98c25eeb7b8ad48e2b6007c40 | holdybot/holdybot | computation.clj | (ns parky.computation
(:require [java-time :as jt]
[parky.layout :refer [*identity*]]
[postal.core :as postal]
[parky.config :refer [env]]
[parky.db.core :as db]
[clojure.tools.logging :as log]
[conman.core :as conman]
[clj-http.clien... | null | https://raw.githubusercontent.com/holdybot/holdybot/1039abe34fd58eaf1a62bbea6592db678cb6aef6/src/clj/parky/computation.clj | clojure | we need to shuffle here, to randomize prefered type requests
fixme copy/paste
fixme perf | (ns parky.computation
(:require [java-time :as jt]
[parky.layout :refer [*identity*]]
[postal.core :as postal]
[parky.config :refer [env]]
[parky.db.core :as db]
[clojure.tools.logging :as log]
[conman.core :as conman]
[clj-http.clien... |
97df0dbc676f917d10c0f70147eb34babb3cccf02ce906a2522f349316cbbeda | larcenists/larceny | prefix-larceny.scm | ;INSERTCODE
;------------------------------------------------------------------------------
(error-handler
(lambda l
(decode-error l)
(display "bench DIED!") (newline) (exit 118)))
(define (run-bench name count ok? run)
(let loop ((i 0) (result (list 'undefined)))
(if (< i count)
(loop (+ i 1) (ru... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/CrossPlatform/prefix/prefix-larceny.scm | scheme | INSERTCODE
------------------------------------------------------------------------------
From the draft reference implementation of R6RS generic arithmetic.
------------------------------------------------------------------------------
(define-syntax quotient
(syntax-rules ()
FIXME
(define-syntax modulo
(syntax-... | (error-handler
(lambda l
(decode-error l)
(display "bench DIED!") (newline) (exit 118)))
(define (run-bench name count ok? run)
(let loop ((i 0) (result (list 'undefined)))
(if (< i count)
(loop (+ i 1) (run))
result)))
(define (run-benchmark name count ok? run-maker . args)
(newline)
(... |
247c161c252216a6b6f6224a4b320d007d459afdf932d276ed5f6d906b4f05f5 | brendanhay/gogol | Patch.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-classroom/gen/Gogol/Classroom/Courses/CourseWorkMaterials/Patch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
'ClassroomCoursesCourseWorkMaterialsPatch' request conforms to.
/See:/ 'newClassroomCoursesCourseWorkMaterialsPatch' smart constructor.
| V1 error format.
| OAuth access token.
| Identi... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
9cf9b881eb4e0884fd7c5c4ec0fbf0fb83c87d92fd49c995fce17c91b78e4010 | RefactoringTools/HaRe | D.hs | module C where
-- Test for refactor of if to case
-- The comments on the then and else legs should be preserved
foo x = if (odd x)
then do
-- This is an odd result
bob x 1
else do
-- This is an even result
bob x 2
bob x y = x + y
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Case/D.hs | haskell | Test for refactor of if to case
The comments on the then and else legs should be preserved
This is an odd result
This is an even result | module C where
foo x = if (odd x)
then do
bob x 1
else do
bob x 2
bob x y = x + y
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.