_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 |
|---|---|---|---|---|---|---|---|---|
50b39b2ba1a5830ad88321bb9a12a778f6cbe813e8a44d755f85122f09947d65 | mlcfp/zenacy-html | Tests.hs | {-# LANGUAGE OverloadedStrings #-}
module Zenacy.HTML.Internal.Oper.Tests
( testOper
) where
import Zenacy.HTML
import Control.Monad
( (>=>)
)
import Data.Map
( Map
)
import qualified Data.Map as Map
( fromList
, lookup
)
import Data.Maybe
( fromJust
)
import Test.Framework
( Test
, testGrou... | null | https://raw.githubusercontent.com/mlcfp/zenacy-html/b4af86fecc6fbbe1c7501e2fa75e6aa28206ebcb/test/Zenacy/HTML/Internal/Oper/Tests.hs | haskell | # LANGUAGE OverloadedStrings # |
module Zenacy.HTML.Internal.Oper.Tests
( testOper
) where
import Zenacy.HTML
import Control.Monad
( (>=>)
)
import Data.Map
( Map
)
import qualified Data.Map as Map
( fromList
, lookup
)
import Data.Maybe
( fromJust
)
import Test.Framework
( Test
, testGroup
)
import Test.Framework.Provide... |
2d6d242c043402f97eb7faf039f96830a7018ba0f925afd8d668fe2c1f793635 | awolven/cl-vulkan | memory-pool.lisp | (in-package :vk)
(defclass memory-pool-mixin ()
((name)
(lock :initform (bt:make-lock))
(memory-allocation :reader allocation)
(allocated :initform (make-hash-table))
(small-free :initform nil :accessor memory-pool-small-free)
(medium-free :initform nil :accessor memory-pool-medium-free)
(... | null | https://raw.githubusercontent.com/awolven/cl-vulkan/988e0a644a15a45298572d08a13bcc3f55a3de46/src/memory-pool.lisp | lisp | with these current numbers, for an index buffer and a vertex buffer
| (in-package :vk)
(defclass memory-pool-mixin ()
((name)
(lock :initform (bt:make-lock))
(memory-allocation :reader allocation)
(allocated :initform (make-hash-table))
(small-free :initform nil :accessor memory-pool-small-free)
(medium-free :initform nil :accessor memory-pool-medium-free)
(... |
8a3e2f54fb1eb7d0499b96f0fd098383593657954bc53ef2dd7a66ad19fb3dfe | census-instrumentation/opencensus-erlang | oc_sweeper_SUITE.erl |
%%% ---------------------------------------------------------------------------
%%% @doc
%%% @end
%%% ---------------------------------------------------------------------------
-module(oc_sweeper_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-inc... | null | https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/test/oc_sweeper_SUITE.erl | erlang | ---------------------------------------------------------------------------
@doc
@end
---------------------------------------------------------------------------
wait until the sweeper sweeps away the parent span
sleep long enough that the reporter would have run again for sure
should be no reported spans
wait ... |
-module(oc_sweeper_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-include("oc_test_utils.hrl").
-include("opencensus.hrl").
all() ->
[storage_size,
drop,
finish,
failed_attribute_and_finish].
init_per_suite(Config) ->
appl... |
6d908a9e50e8ba8ecb9329441f4a36054cdfb39dc625b13e7b44530fb70f8420 | cyverse-archive/DiscoveryEnvironmentBackend | util.clj | (ns mescal.util
(:use [clojure.java.io :only [reader]]
[medley.core :only [find-first]]
[slingshot.slingshot :only [throw+]])
(:require [cheshire.core :as cheshire]
[clj-time.format :as tf]
[clojure.tools.logging :as log]
[clojure-commons.error-codes :as ce]))
(d... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/mescal/src/mescal/util.clj | clojure | (ns mescal.util
(:use [clojure.java.io :only [reader]]
[medley.core :only [find-first]]
[slingshot.slingshot :only [throw+]])
(:require [cheshire.core :as cheshire]
[clj-time.format :as tf]
[clojure.tools.logging :as log]
[clojure-commons.error-codes :as ce]))
(d... | |
cf106583e742b4befda43a637ad701b4c8a1ce0aca468b684d390c97fb292752 | armedbear/abcl | closure-serialization.lisp | compiler-tests.lisp
;;;
Copyright ( C ) 2010
;;;
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version ... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/test/lisp/abcl/closure-serialization.lisp | lisp |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more detail... | compiler-tests.lisp
Copyright ( C ) 2010
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - ... |
6014ddd7d22e137970e0608bf3f7aaea378d197d5d99dc2282d72360b0d4144c | musically-ut/haskell-dgim | DGIM.hs | module Data.Stream.Algorithms.DGIM (
-- * Type (no constructors)
DGIM
-- * External interface
, mkDGIM
, insert
, insert_
, querySince
, queryAll
, queryLen
) where
import Data.Stream.Algorithms.DGIM.Internal
| null | https://raw.githubusercontent.com/musically-ut/haskell-dgim/3efa4e49020ebd04d429bafb59e26e02284b6599/src/Data/Stream/Algorithms/DGIM.hs | haskell | * Type (no constructors)
* External interface | module Data.Stream.Algorithms.DGIM (
DGIM
, mkDGIM
, insert
, insert_
, querySince
, queryAll
, queryLen
) where
import Data.Stream.Algorithms.DGIM.Internal
|
a86e0ec0d906e2292af3616a73831f905c97e41d5635042757b23f87f13f17cb | european-lisp-symposium/els-web | global.lisp | (in-package #:els-web-editions)
(define-edition "global")
(in-package "global")
(define-person (:family-name "Verna"
:given-name "Didier")
:role (:administrator)
:email ""
:website "-lisp-symposium.org"
:organization "EPITA"
:address (:country "France"))
(define-person (:family-name "Hafner"... | null | https://raw.githubusercontent.com/european-lisp-symposium/els-web/b29b460cb4dae62db92d244394c4529ba0f19544/editions/global.lisp | lisp | (in-package #:els-web-editions)
(define-edition "global")
(in-package "global")
(define-person (:family-name "Verna"
:given-name "Didier")
:role (:administrator)
:email ""
:website "-lisp-symposium.org"
:organization "EPITA"
:address (:country "France"))
(define-person (:family-name "Hafner"... | |
e9c4c796d12b70cf29b438bba616f0b5b0cbca747674027128716c8e36d716f9 | softlab-ntua/bencherl | file_utils.erl | Copyright ( C ) 2003 - 2014
%
This file is part of the Ceylan Erlang library .
%
% This library is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License or
the GNU General Public License , as they are published by the Free Software
Foundation , eith... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/common/src/utils/file_utils.erl | erlang |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License or
any later version.
You can also redistribute it and/or modify it under the terms of the
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; w... | Copyright ( C ) 2003 - 2014
This file is part of the Ceylan Erlang library .
the GNU General Public License , as they are published by the Free Software
Foundation , either version 3 of these Licenses , or ( at your option )
Mozilla Public License , version 1.1 or later .
GNU Lesser General Public License... |
58e87c9d203e6ead9692b1239ebfad7c26a8b05f96578ce347626cd3a0383346 | michaelklishin/monger | util_test.clj | (ns monger.test.util-test
(:import com.mongodb.DBObject)
(:require [monger util conversion]
[clojure.test :refer :all]))
(deftest get-object-id
(let [clj-map { :_id (monger.util/object-id) }
db-object ^DBObject (monger.conversion/to-db-object clj-map)
_id (:_id clj-map)]
... | null | https://raw.githubusercontent.com/michaelklishin/monger/9f3d192dffb16da011f805355b87ae172c584a69/test/monger/test/util_test.clj | clojure | (ns monger.test.util-test
(:import com.mongodb.DBObject)
(:require [monger util conversion]
[clojure.test :refer :all]))
(deftest get-object-id
(let [clj-map { :_id (monger.util/object-id) }
db-object ^DBObject (monger.conversion/to-db-object clj-map)
_id (:_id clj-map)]
... | |
c8d50ac62fb16f21b63f1073f4f8f0b88ea1026ee66370f289a5dc3128b1f117 | xldenis/ill | DesugarDebug.hs | module DesugarDebug where
import Thrill.Syntax
import Thrill.Syntax.Core (bindings)
import Thrill.Infer
import Thrill.Infer.Monad
import Thrill.Options
import Thrill.Renamer
import Data.Function
import Control.Monad.State (runStateT)
import Control.Monad.Except (runExcept)
import Control.Monad
import Thrill.Binding... | null | https://raw.githubusercontent.com/xldenis/ill/46bb41bf5c82cd6fc4ad6d0d8d33cda9e87a671c/app/DesugarDebug.hs | haskell | module DesugarDebug where
import Thrill.Syntax
import Thrill.Syntax.Core (bindings)
import Thrill.Infer
import Thrill.Infer.Monad
import Thrill.Options
import Thrill.Renamer
import Data.Function
import Control.Monad.State (runStateT)
import Control.Monad.Except (runExcept)
import Control.Monad
import Thrill.Binding... | |
951b4b59732b59f79173ba4d22b88e474cc72fde48a07a3bf46891c67ace36ba | OpenC2-org/ocas | act_allow.erl | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_allow).
%%%-------------------------------------------------------------------
%%%
%%% All rights reserved.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%%
%%% Redistribution and use in source and binary forms, with or without
... | null | https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/action_servers/act_allow.erl | erlang | -------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this... | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_allow).
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( ... |
3b5e207ae10571b54f1238eb60703659afc5ac148c64edc23e7b0a6563610c1d | burtonsamograd/med | file.lisp | (in-package :med)
(defun find-file (path)
(setf path (merge-pathnames path))
(dolist (buffer (buffer-list))
(when (equal (buffer-property buffer 'path) path)
(setf (last-buffer *editor*) (current-buffer *editor*))
(switch-to-buffer buffer)
(setf (buffer-property buffer 'default-pathname-defau... | null | https://raw.githubusercontent.com/burtonsamograd/med/667c45032f60831447ad0eafd4d5c9a9748b4366/commands/file.lisp | lisp | read file
read directory
Loading the file will set the modified flag.
FIME: should be regexes and use ppcre to search the
list rather then just strings and search | (in-package :med)
(defun find-file (path)
(setf path (merge-pathnames path))
(dolist (buffer (buffer-list))
(when (equal (buffer-property buffer 'path) path)
(setf (last-buffer *editor*) (current-buffer *editor*))
(switch-to-buffer buffer)
(setf (buffer-property buffer 'default-pathname-defau... |
c78d5188ad9bd1a77fe5029363604bb82618927a68cbead527e3b156d1428515 | jimpil/hotel-nlp | tools_test.clj | (ns hotel-nlp.tools_test
(:require [clojure.test :refer :all]
[hotel_nlp.tools.normalito.core :refer :all]
[clojure.data.generators :refer [collection]])) ;;might come in handy
(defn- === [x y]
(and (= x y)
(= (class x)
(class y))))
(deftest ... | null | https://raw.githubusercontent.com/jimpil/hotel-nlp/2647f999b5998595a5edac1900e850140f374de6/test/hotel_nlp/tools_test.clj | clojure | might come in handy
not the same classes with persistent list, cannot use === | (ns hotel-nlp.tools_test
(:require [clojure.test :refer :all]
[hotel_nlp.tools.normalito.core :refer :all]
(defn- === [x y]
(and (= x y)
(= (class x)
(class y))))
(deftest normalito-test
(testing "String normalisation..."
(is (= "eat" (normalise "eat... |
e52a92c469bc00aac5fcddcef78488d38a44c642e54f7f97ab92e03cf7bb9294 | eglaysher/rldev | app.ml |
: RealLive archiver and disassembler
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option ) a... | null | https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/kprl/app.ml | ocaml |
: RealLive archiver and disassembler
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option ) a... | |
5749ff6a82e77fd435c378f9dc463a3a08b3944dc965e2107283754fb3074f18 | janestreet/accessor_base | accessor_bool.mli | open! Base
open! Import
(** Accesses [()] iff the boolean is [true]. *)
val true_ : (_, unit, bool, [< variant ]) Accessor.t
(** Accesses [()] iff the boolean is [false]. *)
val false_ : (_, unit, bool, [< variant ]) Accessor.t
(** Access a boolean as its inverse. *)
val negated : (_, bool, bool, [< isomorphism ]) A... | null | https://raw.githubusercontent.com/janestreet/accessor_base/8384c29a37e557168ae8a43b2a5a531f0ffc16e4/src/accessor_bool.mli | ocaml | * Accesses [()] iff the boolean is [true].
* Accesses [()] iff the boolean is [false].
* Access a boolean as its inverse. | open! Base
open! Import
val true_ : (_, unit, bool, [< variant ]) Accessor.t
val false_ : (_, unit, bool, [< variant ]) Accessor.t
val negated : (_, bool, bool, [< isomorphism ]) Accessor.t
|
35e1ec4054b82c7e966ceaf6b8d0c83540357518e87caa74004f574abfc998e2 | haskell-tools/haskell-tools | Infix.hs | module Pattern.Infix where
( a : b : c : d ) = [ " 1","2","3","4 " ]
Nothing:_ = undefined | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Pattern/Infix.hs | haskell | module Pattern.Infix where
( a : b : c : d ) = [ " 1","2","3","4 " ]
Nothing:_ = undefined | |
49d8ded92c22f70f137bcc14823354cd59f87da0d9800a02ce713e5bf2ce34f2 | clojure-interop/google-cloud-clients | GroupServiceStubSettings.clj | (ns com.google.cloud.monitoring.v3.stub.GroupServiceStubSettings
"Settings class to configure an instance of GroupServiceStub.
The default instance has everything set to sensible defaults:
The default service address (monitoring.googleapis.com) and default port (443) are used.
Credentials are acquired au... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.monitoring/src/com/google/cloud/monitoring/v3/stub/GroupServiceStubSettings.clj | clojure |
" | (ns com.google.cloud.monitoring.v3.stub.GroupServiceStubSettings
"Settings class to configure an instance of GroupServiceStub.
The default instance has everything set to sensible defaults:
The default service address (monitoring.googleapis.com) and default port (443) are used.
Credentials are acquired au... |
63a71e3b5d836ffb8bd35627420cd220354e92b6977b949928be802f25d19d86 | realworldocaml/book | version.mli | * Version numbers for ocamlc and ocamlopt
type t
val make : int * int * int -> t
val of_ocaml_config : Ocaml_config.t -> t
(** Does this support [-no-keep-locs]? *)
val supports_no_keep_locs : t -> bool
(** Does this support [-opaque] for [.mli] files? *)
val supports_opaque_for_mli : t -> bool
(** Does it read t... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/ocaml/version.mli | ocaml | * Does this support [-no-keep-locs]?
* Does this support [-opaque] for [.mli] files?
* Does it read the [.cmi] file of module alias even when [-no-alias-deps] is
passed?
* Does this support [OCAML_COLOR]?
* Does this this support [-args0]?
* Does ocamlmklib support [-args0]?
* Whether the standard library inc... | * Version numbers for ocamlc and ocamlopt
type t
val make : int * int * int -> t
val of_ocaml_config : Ocaml_config.t -> t
val supports_no_keep_locs : t -> bool
val supports_opaque_for_mli : t -> bool
val always_reads_alias_cmi : t -> bool
* Does this support [ ' color ' ] in [ OCAMLPARAM ] ?
val supports_color_... |
ecf80a4b92750495214b61140f5c0d975400bd428c28b7588548a448fe258388 | slyrus/mcclim-old | beagle-slider-pane.lisp |
(in-package :beagle)
;;; Limitations:
;;;
- ignores different NSControl sizes
- never restricts user to tickmark values only ( does ? )
;;; - no way to show current value
- no ' title ' ( not sure CLIM supports this anyway )
;;; - inherits from the 'standard' slider-pane, rather than from the abstract sl... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Backends/beagle/native-panes/beagle-slider-pane.lisp | lisp | Limitations:
- no way to show current value
- inherits from the 'standard' slider-pane, rather than from the abstract slider
Orientation is defined by the longer relative dimension in
if > maxy - miny , we will get a : horizontal
bar; otherwise we get a :vertical bar.
Sliders are disabled by default; enabl... |
(in-package :beagle)
- ignores different NSControl sizes
- never restricts user to tickmark values only ( does ? )
- no ' title ' ( not sure CLIM supports this anyway )
(defclass beagle-slider-pane (slider-pane)
((tk-obj :initform (%null-ptr) :accessor toolkit-object)))
(defmethod initialize-instance ... |
4a25cd028261a500fb71c2b4c22f9d2de227e796de6b65810eea050cb8bdc7bf | vernemq/vernemq | vmq_swc_app.erl | Copyright 2018 Octavo Labs AG Zurich Switzerland ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing... | null | https://raw.githubusercontent.com/vernemq/vernemq/eb1a262035af47e90d9edf07f36c1b1503557c1f/apps/vmq_swc/src/vmq_swc_app.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2018 Octavo Labs AG Zurich Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_swc_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
vmq_... |
f0b87dea224bcf0eb28bbbfd1a2683696fa8403e0207dcb623db3201325ed244 | aymanosman/cl-missile-command | sound.lisp | (in-package :raylib)
(defun sine-wave (x)
(sin x))
(defun square-wave (x)
(signum (sin x)))
(defun sawtooth-wave (x)
(let ((y (/ x (* 2 pi))))
(* 2 (- y (floor (+ y 0.5))))))
(defun noise-wave (x)
(* (random 1.0) (signum (sin x))))
(defun sweep (start end)
(lambda (x)
(- start (* x (- start end))... | null | https://raw.githubusercontent.com/aymanosman/cl-missile-command/5f99bc8cec1ff06a2450b9408feb2c57df1561b9/sound.lisp | lisp | (in-package :raylib)
(defun sine-wave (x)
(sin x))
(defun square-wave (x)
(signum (sin x)))
(defun sawtooth-wave (x)
(let ((y (/ x (* 2 pi))))
(* 2 (- y (floor (+ y 0.5))))))
(defun noise-wave (x)
(* (random 1.0) (signum (sin x))))
(defun sweep (start end)
(lambda (x)
(- start (* x (- start end))... | |
554a440f70a505ac7beeca56970c49cd2f374fefc5c80bb8eea159a893d77df9 | avsm/mirage-duniverse | tls_mirage.mli | * Effectful operations using Mirage for pure TLS .
open Result
(** TLS module given a flow *)
module Make (F : Mirage_flow_lwt.S) : sig
module FLOW : Mirage_flow_lwt.S
(** possible errors: incoming alert, processing failure, or a
problem in the underlying flow. *)
type error = [ `Tls_alert of Tls.Pac... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tls/mirage/tls_mirage.mli | ocaml | * TLS module given a flow
* possible errors: incoming alert, processing failure, or a
problem in the underlying flow.
* The type for write errors.
* we provide the FLOW interface
* [epoch flow] extracts information of the established session.
* X.509 handling given a key value store and a clock
* [authentic... | * Effectful operations using Mirage for pure TLS .
open Result
module Make (F : Mirage_flow_lwt.S) : sig
module FLOW : Mirage_flow_lwt.S
type error = [ `Tls_alert of Tls.Packet.alert_type
| `Tls_failure of Tls.Engine.failure
| `Read of F.error
| `Write of F.wri... |
cca74e4802e37e4ea6ec9c1de017ff0a6fdbfada3d9f5a68218d6b33388ee3ee | gonzojive/elephant | elet-package.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
;;; tests.lisp -- package definition
;;;
Initial version 9/02/2004 by
;;; <>
;;;
;;; part of
;;;
Elephant : an object - oriented database for Common Lisp
;;;
Copyright ( c ) 2004 by and
;;; <> <>
;;;
;;; Elephant users are granted the r... | null | https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/tests/elet-package.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
tests.lisp -- package definition
<>
part of
<> <>
Elephant users are granted the rights to distribute and use this software
(), also known as the LLGPL. | Initial version 9/02/2004 by
Elephant : an object - oriented database for Common Lisp
Copyright ( c ) 2004 by and
as governed by the terms of the Lisp Lesser GNU Public License
(defpackage elephant-tests
(:nicknames :ele-tests)
#+use-fiveam
(:use :common-lisp :elephant :5am :bordeaux-threads)
#-u... |
13bc40062e922543e0d819d4a01adf6f7c92aa11f06430ba52d08f16bbd886d4 | clash-lang/clash-compiler | ALU.hs | module ALU where
import Clash.Prelude
data OPC = ADD | MUL | SUB
topEntity :: OPC -> Integer -> Integer -> Integer
topEntity SUB = (-)
topEntity ADD = (+)
topEntity MUL = (*)
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/e0a532a9bbd0379c61b5387c05d01e262f4acf4d/examples/ALU.hs | haskell | module ALU where
import Clash.Prelude
data OPC = ADD | MUL | SUB
topEntity :: OPC -> Integer -> Integer -> Integer
topEntity SUB = (-)
topEntity ADD = (+)
topEntity MUL = (*)
| |
a4a29595cc5111506c2f7a7383cec1f67cd035ec732c06a38f27dad254a1c32f | GumTreeDiff/cgum | suffix_tree_ext.mli | (**
Generalized suffix trees (GSTs).
Computes generalized suffix trees from list of strings. A terminal symbol is
implicitly added to them, but is not returned in the word labeling nodes and
leaves. This should allow a rather transparent handling of GSTs.
Node-based accesses are provided (sequences, ro... | null | https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/commons/ocamlextra/suffix_tree_ext.mli | ocaml | *
Generalized suffix trees (GSTs).
Computes generalized suffix trees from list of strings. A terminal symbol is
implicitly added to them, but is not returned in the word labeling nodes and
leaves. This should allow a rather transparent handling of GSTs.
Node-based accesses are provided (sequences, root... | made by
extension by : the function add , allowing to extend a gst
( internally use now a DynArray instead of an Array )
(internally use now a DynArray instead of an Array)
*)
type node
type t
val make : string list -> t
val add : string -> t -> unit
val string_list : t -> string list
val strin... |
59d9104429abdb5a4550d1690f344add27959590e5c6d50e840c7f7898eb9472 | CSCfi/rems | duo.cljc | (ns rems.common.duo
(:require [medley.core :refer [distinct-by]]))
(def duo-restriction-label
{:collaboration :t.duo.restriction/collaboration
:date :t.duo.restriction/date
:institute :t.duo.restriction/institute
:location :t.duo.restriction/location
:mondo :t.duo.restriction/mondo
:months :t.duo.re... | null | https://raw.githubusercontent.com/CSCfi/rems/6c34d51199289c395b0cd0b9a3176bc5f0e83758/src/cljc/rems/common/duo.cljc | clojure | (ns rems.common.duo
(:require [medley.core :refer [distinct-by]]))
(def duo-restriction-label
{:collaboration :t.duo.restriction/collaboration
:date :t.duo.restriction/date
:institute :t.duo.restriction/institute
:location :t.duo.restriction/location
:mondo :t.duo.restriction/mondo
:months :t.duo.re... | |
9de9a6656f32ea7b1f84b807bb27eecc71cd747d6e7b1dd43a10e58e3f8377ed | shayne-fletcher/zen | snoc.ml | type 'a snoc_list =
| Empty | Snoc of 'a snoc_list * 'a
let hd : 'a snoc_list -> 'a = function
| Empty -> raise (Failure "hd") | Snoc (_, s) -> s
let tl : 'a snoc_list -> 'a snoc_list = function
| Empty -> raise (Failure "tl") | Snoc (l, _) -> l
let rec list_of_snoc_list : 'a snoc_list -> 'a list = function... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/snoc/snoc.ml | ocaml | type 'a snoc_list =
| Empty | Snoc of 'a snoc_list * 'a
let hd : 'a snoc_list -> 'a = function
| Empty -> raise (Failure "hd") | Snoc (_, s) -> s
let tl : 'a snoc_list -> 'a snoc_list = function
| Empty -> raise (Failure "tl") | Snoc (l, _) -> l
let rec list_of_snoc_list : 'a snoc_list -> 'a list = function... | |
1df26acb73771ec5ee512c5ffe6711142a12e411170d72d601410aa53b7c528e | eponai/sulolive | shipping.cljc | (ns eponai.web.ui.checkout.shipping
(:require
#?(:cljs [cljs.spec.alpha :as s]
:clj
[clojure.spec.alpha :as s])
#?(:cljs
[eponai.web.utils :as web-utils])
#?(:cljs
[eponai.web.google-places :as places])
[taoensso.timbre :refer [debug]]))
(def form-inputs
{:shipping/name ... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/ui/checkout/shipping.cljc | clojure | :shipping.address/street2 | (ns eponai.web.ui.checkout.shipping
(:require
#?(:cljs [cljs.spec.alpha :as s]
:clj
[clojure.spec.alpha :as s])
#?(:cljs
[eponai.web.utils :as web-utils])
#?(:cljs
[eponai.web.google-places :as places])
[taoensso.timbre :refer [debug]]))
(def form-inputs
{:shipping/name ... |
35a39917f7f72f5b93d2cc0929e38ebaaf589609e93eb8b38d5df6b91fd43979 | theodormoroianu/SecondYearCourses | lab6-sol_20210115150941.hs | -- /
import Data.Char
import Data.List
import Test.QuickCheck
1 .
rotate :: Int -> [Char] -> [Char]
rotate n l
| n > 0
, n < length l
= suf ++ pre
where
(pre, suf) = splitAt n l
rotate _ _ = error "număr negativ sau prea mare"
2 .
prop_rotate :: Int -> String -> Bool
prop_rotate k str = rotate (l ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115150941.hs | haskell | / |
import Data.Char
import Data.List
import Test.QuickCheck
1 .
rotate :: Int -> [Char] -> [Char]
rotate n l
| n > 0
, n < length l
= suf ++ pre
where
(pre, suf) = splitAt n l
rotate _ _ = error "număr negativ sau prea mare"
2 .
prop_rotate :: Int -> String -> Bool
prop_rotate k str = rotate (l + 1 -... |
2fe21b6898dd99773e1206967c67ff2c9b98ec6392b37ececa47f2a0bb1bd207 | unbounce/clojure-dogstatsd-client | project.clj | (defproject com.unbounce/clojure-dogstatsd-client "0.8.0-SNAPSHOT"
:description "A thin veneer over java-dogstatsd-client"
:url "-dogstatsd-client"
:license {:name "The MIT License (MIT)"
:url ""
:comments "Copyright (c) 2018 Unbounce Marketing Solutions Inc."}
:profiles {:dev {:dependen... | null | https://raw.githubusercontent.com/unbounce/clojure-dogstatsd-client/ef44e313aa1d36464d5ee72de16d35feac34187b/project.clj | clojure | (defproject com.unbounce/clojure-dogstatsd-client "0.8.0-SNAPSHOT"
:description "A thin veneer over java-dogstatsd-client"
:url "-dogstatsd-client"
:license {:name "The MIT License (MIT)"
:url ""
:comments "Copyright (c) 2018 Unbounce Marketing Solutions Inc."}
:profiles {:dev {:dependen... | |
40ac6162494c72ba1b856c355c51be88d2e911a247f607ae926fbf5923c6c1ed | zcaudate/hara | listener.clj | (ns hara.lib.aether.listener
(:require [hara.print :as print]
[hara.io.file :as fs]
[hara.module.artifact :as artifact]
[hara.object :as object])
(:import (org.eclipse.aether RepositoryEvent RepositoryListener)
(org.eclipse.aether.transfer TransferEvent TransferListene... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/lib/aether/listener.clj | clojure | (ns hara.lib.aether.listener
(:require [hara.print :as print]
[hara.io.file :as fs]
[hara.module.artifact :as artifact]
[hara.object :as object])
(:import (org.eclipse.aether RepositoryEvent RepositoryListener)
(org.eclipse.aether.transfer TransferEvent TransferListene... | |
d2bf2c5f792042adf31b60123770e01eeace073081f39713099412088cb520c4 | ghcjs/jsaddle-dom | IDBFactory.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.IDBFactory
(open, open_, deleteDatabase, deleteDatabase_, cmp, cmp_,
IDBFactory(..), gTypeIDBFactory)
... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/IDBFactory.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.IDBFactory
(open, open_, deleteDatabase, deleteDatabase_, cmp, cmp_,
IDBFactory(..), gTypeIDBFactory)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, f... |
2b00185bd356f75e02f0504c243a48b5c78fff1c125177fed554c3d04325fd54 | AnyChart/export-server | templates.clj | (ns export-server.browser.templates
(:require [clojure.java.io :as io]
[export-server.data.config :as config]))
(def anychart-binary (slurp (io/resource "js/anychart-bundle.min.js")))
(defn create-svg-html [svg]
(str "<html lang=\"en\">
<head>
<meta charset=\"UTF-8\">
<style>... | null | https://raw.githubusercontent.com/AnyChart/export-server/0ef2f084e07aaa144e38dff30e3283f686de1108/src/export_server/browser/templates.clj | clojure |
}
} | (ns export-server.browser.templates
(:require [clojure.java.io :as io]
[export-server.data.config :as config]))
(def anychart-binary (slurp (io/resource "js/anychart-bundle.min.js")))
(defn create-svg-html [svg]
(str "<html lang=\"en\">
<head>
<meta charset=\"UTF-8\">
<style>... |
1b73ed4ceb18041e0ee00cdc2215f97be235a127ad24abe6a7421e3b34685a05 | someodd/waffle | Main.hs | module Main where
import qualified Data.Text as T
import System.Environment
import BrickApp
import Config
import Config.ConfigOpen
import Config.Bookmarks
import Config.Homepage
import Config.Theme
handleArgs :: [String] -> IO ()
handleArgs [] = uiMain Nothing
handleArgs (hos... | null | https://raw.githubusercontent.com/someodd/waffle/71586b271878df4cb2368ae3bd6e2961cb79fa15/app/Main.hs | haskell | FIXME: hacky doing setup here...
maybe could have a cli option to reset even
Now run! | module Main where
import qualified Data.Text as T
import System.Environment
import BrickApp
import Config
import Config.ConfigOpen
import Config.Bookmarks
import Config.Homepage
import Config.Theme
handleArgs :: [String] -> IO ()
handleArgs [] = uiMain Nothing
handleArgs (hos... |
0d44d66362d760c01d18eecb3ee1e106234934c1afd292297fe7fd39108bd27b | ktakashi/sagittarius-scheme | request.scm | -*- mode : scheme;coding : utf-8 -*-
;;;
;;; net/http-client/request.scm - HTTP request/response of HTTP client
;;;
Copyright ( c ) 2021 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are m... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/bf27a91a3de6b94a62956f5ca509496459464329/sitelib/net/http-client/request.scm | scheme | coding : utf-8 -*-
net/http-client/request.scm - HTTP request/response of HTTP client
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 above copyright
... | Copyright ( c ) 2021 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (net http-client request)
... |
5797bfed66ff12b3d61a876f69dcb3d41ef0d91ba9778ac5f6dfbe0610a3ddb2 | gwathlobal/CotD | window-messages.lisp | (in-package :cotd)
(defclass message-window (window)
((cur-str :accessor cur-str)
(message-box :initarg :message-box :accessor message-window/message-box)
(header-str :initarg :header-str :accessor message-window/header-str)
))
(defmethod initialize-instance :after ((win message-window) &key)
(w... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/windows/window-messages.lisp | lisp | normalize mod
escape - quit
| (in-package :cotd)
(defclass message-window (window)
((cur-str :accessor cur-str)
(message-box :initarg :message-box :accessor message-window/message-box)
(header-str :initarg :header-str :accessor message-window/header-str)
))
(defmethod initialize-instance :after ((win message-window) &key)
(w... |
aa3ae4596dc9eb51869b9946e015c71096f85fe7a25ff589b092a4f5753918bb | static-analysis-engineering/codehawk | bCHTrace.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchanalyze/bCHTrace.mli | ocaml | xprlib
bchlib
bchlibx86 | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
6a95e738ef8336a4a241b10f77990b6f1d892ab1a55fb0926d2a81834deea953 | coding-robots/iwl | bayes.rkt | #lang racket
(require srfi/1
srfi/13
racket/serialize
racket/runtime-path)
(define *categories* (make-vector 0))
(define *totals* (make-hash))
(define *tokens* (make-hash))
(define *readabilities* (make-hash))
(define words-re (pregexp "(?>\\p{L}+-\\p{L}+|\\p{L}+)"))
(... | null | https://raw.githubusercontent.com/coding-robots/iwl/bf13ab3f75aff0fe63c07555a41574e919bb11db/bayes.rkt | racket | Flesch Reading Ease
Expands vector with value val and returns its index
Tokens
Generate list of probabilities per category for each token in text
Calculate single "rating" value from list of probabilities (including
readabilities) for each category for which we generated probabilities
Data saving and loading
I ... | #lang racket
(require srfi/1
srfi/13
racket/serialize
racket/runtime-path)
(define *categories* (make-vector 0))
(define *totals* (make-hash))
(define *tokens* (make-hash))
(define *readabilities* (make-hash))
(define words-re (pregexp "(?>\\p{L}+-\\p{L}+|\\p{L}+)"))
(... |
e1c47507eb87b137f1e5420d7b7afc07a88e2e6a7bfbd610239e9c3e7b6c93fc | chicken-mobile/chicken-sdl2-android-builder | event-array.scm | ;;
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
;;
Copyright © 2013 , 2015 - 2016 .
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; - Redistributions... | null | https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/arrays/event-array.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributio... | chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
Copyright © 2013 , 2015 - 2016 .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT N... |
0ed7bcd539f379a34dc9cd1868b9a2f40cd90641fc1935ae6820b823190f922e | parapluu/Concuerror | main_and_backup.erl | -module(main_and_backup).
-export([main_and_backup/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
main_and_backup() ->
register(parent, self()),
spawn(fun spawner/0),
spawn(fun spawner/0),
receive
ok ->
receive
ok -> ok
end
end,... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/main_and_backup.erl | erlang | We are it
Server registered, register as backup
Server registered, start backup | -module(main_and_backup).
-export([main_and_backup/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
main_and_backup() ->
register(parent, self()),
spawn(fun spawner/0),
spawn(fun spawner/0),
receive
ok ->
receive
ok -> ok
end
end,... |
8bb60c869bd88d0d15abadc3a4b84fd418278fe5220e1fbe7e58a9e62af6762a | conal/lambda-ccc | Run.hs | # LANGUAGE CPP #
# LANGUAGE TypeOperators , ExistentialQuantification , FlexibleContexts #
{-# LANGUAGE ConstraintKinds, StandaloneDeriving #-}
-- Okay
# LANGUAGE FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTIONS_GHC -fno ... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/Run.hs | haskell | # LANGUAGE ConstraintKinds, StandaloneDeriving #
Okay
TEMP
TEMP
--------------------------------------------------------------------
|
Module : Run
Maintainer :
Stability : experimental
--------------------------------------------------------------------
Tidy up later
# INLINE go' #
# INLINE goN... | # LANGUAGE CPP #
# LANGUAGE TypeOperators , ExistentialQuantification , FlexibleContexts #
# LANGUAGE FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wall #
#define MealyAsFun
Copyright : ( c ) 2014 Tabula , Inc.
Run a test : reify , CCC , circuit
module LambdaCCC.Run
( go,go',goSep,run,goM,go... |
0e456758cd50c50ae063eb9971d2dc8de61e9e654620f3a9a0628e7d8ce67ef9 | divipp/lensref | Elerea.hs | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
# LANGUAGE RecordWildCards #
# LANGUAGE RecursiveDo #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# L... | null | https://raw.githubusercontent.com/divipp/lensref/2f0b9a36ac8853780e2b09ad0769464dd3837dab/src/LensRef/Elerea.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
* The signal abstraction
* Embedding into I/O
* Basic building blocks
* Derived combinators
* Signals with side effects
import Debug.Trace
, stabilize_
------------------------------------------------------------------------------ core
... | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
# LANGUAGE RecordWildCards #
# LANGUAGE RecursiveDo #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAG... |
e1fadf0ea3d81d4fed41d99b12c946214f287525294ca84c8e7827e6a661fbef | Naproche-SAD/Naproche-SAD | Definition.hs | module SAD.Data.Definition where
import SAD.Data.Formula (Formula)
import qualified SAD.Data.Structures.DisTree as DT
import Data.IntMap (IntMap)
import Data.Maybe
data DefType = Signature | Definition deriving (Eq, Show)
data DefEntry = DE {
guards :: [Formula], -- guards of the definitions
formula :: Fo... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Data/Definition.hs | haskell | guards of the definitions
defining formula
proper definition or only sig extension
defined term
evidence from the defining formula
type-likes of the definition
yields information as to what can be unfolded
storage of definitions by term id
- guards | module SAD.Data.Definition where
import SAD.Data.Formula (Formula)
import qualified SAD.Data.Structures.DisTree as DT
import Data.IntMap (IntMap)
import Data.Maybe
data DefType = Signature | Definition deriving (Eq, Show)
data DefEntry = DE {
} deriving Show
isDefinition :: DefEntry -> Bool
isDefinition = (==) De... |
9f0c987cd62df3ddad197545bdec7dc8580e94a6e392661d4da3e27d4e01a9ec | arttuka/reagent-material-ui | view_compact_outlined.cljs | (ns reagent-mui.icons.view-compact-outlined
"Imports @mui/icons-material/ViewCompactOutlined as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def view-compact-ou... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/view_compact_outlined.cljs | clojure | (ns reagent-mui.icons.view-compact-outlined
"Imports @mui/icons-material/ViewCompactOutlined as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def view-compact-ou... | |
fa4c15ea0042b4f7e625ec516863bb563ec9c024343582a7f2aec598658fc784 | bamos/snowglobe | Main.hs | This is the main entry point for SnowGlobe analytics .
-- The command-line options are parsed and functionality is
-- delegated to other portions of the code.
--
< >
-- 2015.05.08
import Data.Char(ord)
import Data.Csv (HasHeader(NoHeader), decodeWith, decDelimiter,
defaultDecodeOptions)
import ... | null | https://raw.githubusercontent.com/bamos/snowglobe/b5211bbc2029b52339175af413aea52cf9ab2eb9/analysis/Main.hs | haskell | The command-line options are parsed and functionality is
delegated to other portions of the code.
2015.05.08
Argument syntax and help functions.
Load data from files and delegate functionality. | This is the main entry point for SnowGlobe analytics .
< >
import Data.Char(ord)
import Data.Csv (HasHeader(NoHeader), decodeWith, decDelimiter,
defaultDecodeOptions)
import Data.List(isInfixOf)
import Data.Time(defaultTimeLocale, getCurrentTime, getCurrentTimeZone,
utcToLocalT... |
8f3370f40ace340755cf2949d1befc72e87f13e023f856000f93be578f37c168 | kelsey-sorrels/robinson | actor_protocol.clj | (ns robinson.actor-protocol)
(defprotocol Actor
(receive [this state]))
| null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/actor_protocol.clj | clojure | (ns robinson.actor-protocol)
(defprotocol Actor
(receive [this state]))
| |
43fd9103d10b65c841d24268772ebe2d25c8dc0a5e0fed7a35ed60da3d33bafd | VisionsGlobalEmpowerment/webchange | state.cljs | (ns webchange.admin.pages.student-add.state
(:require
[re-frame.core :as re-frame]
[re-frame.std-interceptors :as i]
[webchange.admin.routes :as routes]))
(def path-to-db :page/student-add)
(re-frame/reg-sub
path-to-db
(fn [db]
(get db path-to-db)))
(re-frame/reg-event-fx
::init
[(i/path pa... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/a6846777664ff58d613235444893e0ac09fa563b/src/cljs/webchange/admin/pages/student_add/state.cljs | clojure | (ns webchange.admin.pages.student-add.state
(:require
[re-frame.core :as re-frame]
[re-frame.std-interceptors :as i]
[webchange.admin.routes :as routes]))
(def path-to-db :page/student-add)
(re-frame/reg-sub
path-to-db
(fn [db]
(get db path-to-db)))
(re-frame/reg-event-fx
::init
[(i/path pa... | |
4abadad601e657cafe6351b0bfa857a44cc4360e066fd1410ac8600663548cfb | stchang/macrotypes | more-utils.rkt | #lang turnstile
turnstile library of extra stx helpers
(provide (for-syntax x+τ stx-parse/fold transfer-type)
define-nested/R define-nested/L)
(begin-for-syntax
(define (transfer-type from to)
(if (typeof from)
(syntax-property to ': (typeof from))
to))
;; syntax class matching [... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-lib/turnstile/more-utils.rkt | racket | syntax class matching [x : τ], ie a parameter with type annotation
TODO: generalize to arbitrary tags (not always :)?
usage: (stx-parse/fold stx pattern)
foldl
R = like foldr, eg λ
L = like foldl, eg app
usage: (define-nested name name/1)
name = name of the curried form, eg λ/c
name/1 = name of the unit form, ... | #lang turnstile
turnstile library of extra stx helpers
(provide (for-syntax x+τ stx-parse/fold transfer-type)
define-nested/R define-nested/L)
(begin-for-syntax
(define (transfer-type from to)
(if (typeof from)
(syntax-property to ': (typeof from))
to))
(define-syntax-class x+τ
... |
2452044599c53e9e2c55997a7f9bd0b3d1e98587293066991aba643d119a4adb | dradtke/Lisp-Text-Editor | icon.lisp | (in-package :gtk-cffi)
(defcenum icon-size
:invalid
:menu
:small-toolbar
:large-toolbar
:button
:dnd
:dialog)
(defcenum state
:normal :active :prelight :selected :insensitive :inconsistent :focused)
(defclass icon-source (object) ())
(defcfun "gtk_icon_source_new" :pointer)
(defmethod gconstructor... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/gtk/icon.lisp | lisp | (in-package :gtk-cffi)
(defcenum icon-size
:invalid
:menu
:small-toolbar
:large-toolbar
:button
:dnd
:dialog)
(defcenum state
:normal :active :prelight :selected :insensitive :inconsistent :focused)
(defclass icon-source (object) ())
(defcfun "gtk_icon_source_new" :pointer)
(defmethod gconstructor... | |
42dd729b5585790d1dac27c10e306b18c1448375548e3045da735f75f989df8d | input-output-hk/cardano-wallet | PartialOrd.hs | # LANGUAGE ScopedTypeVariables #
-- |
Copyright : © 2018 - 2020 IOHK
-- License: Apache-2.0
--
-- Provides laws for the 'PartialOrd' class.
--
module Test.Utils.Laws.PartialOrd
( partialOrdLaws
) where
import Prelude
import Algebra.PartialOrd
( PartialOrd (..) )
import Data.Proxy
( Proxy )
import T... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/4dd33e7842f5cf3d33ffdfde35a3398504cc7dc0/lib/test-utils/src/Test/Utils/Laws/PartialOrd.hs | haskell | |
License: Apache-2.0
Provides laws for the 'PartialOrd' class.
| # LANGUAGE ScopedTypeVariables #
Copyright : © 2018 - 2020 IOHK
module Test.Utils.Laws.PartialOrd
( partialOrdLaws
) where
import Prelude
import Algebra.PartialOrd
( PartialOrd (..) )
import Data.Proxy
( Proxy )
import Test.QuickCheck
( Arbitrary, Property, property )
import Test.QuickCheck.Cla... |
5a1615c2896931f7d4868189be09df0aa7f9cd03030141cf467abcabb4018c79 | ctford/Idris-Elba-Dev | Colours.hs | module Idris.Colours (
IdrisColour(..),
ColourTheme(..),
defaultTheme,
colouriseKwd, colouriseBound, colouriseImplicit,
colouriseType, colouriseFun, colouriseData,
colourisePrompt,
ColourType(..)) where
import System.Console.ANSI
data IdrisColour = IdrisColour { colour :: Maybe Color
... | null | https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/Idris/Colours.hs | haskell | Set the colour of a string using POSIX escape codes | module Idris.Colours (
IdrisColour(..),
ColourTheme(..),
defaultTheme,
colouriseKwd, colouriseBound, colouriseImplicit,
colouriseType, colouriseFun, colouriseData,
colourisePrompt,
ColourType(..)) where
import System.Console.ANSI
data IdrisColour = IdrisColour { colour :: Maybe Color
... |
e8cf17e5dddf9137a9c249914094a7dbbdc5a44a386b81fcc8dcbc130b0e5a25 | dinosaure/art | atomic.ml | let parse s = Scanf.sscanf s "%d.%d" (fun major minor -> (major, minor))
let () =
let version = parse Sys.ocaml_version in
if version >= (4, 12) && version < (5, 0)
then print_string "atomic_stdlib.ml"
else print_string "atomic_pre412.ml"
| null | https://raw.githubusercontent.com/dinosaure/art/0c134cd24b28aaae2a6f7d22d5ad0b73e74ae375/conf/atomic.ml | ocaml | let parse s = Scanf.sscanf s "%d.%d" (fun major minor -> (major, minor))
let () =
let version = parse Sys.ocaml_version in
if version >= (4, 12) && version < (5, 0)
then print_string "atomic_stdlib.ml"
else print_string "atomic_pre412.ml"
| |
8a21ffc5a984c4ab96f834dd4d397617e4fc7273d51007ba6c2ef60fd27ec09d | ocaml/dune | env.ml | module Sys = Stdlib.Sys
module Var = struct
module T = struct
type t = string
let compare =
if Sys.win32 then fun a b ->
String.compare (String.lowercase a) (String.lowercase b)
else String.compare
let to_dyn = Dyn.string
end
let temp_dir = if Sys.win32 then "TEMP" else "TMPDIR... | null | https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/env.ml | ocaml | The use of [mutable] here is safe, since we never call (back) to the
memoization framework when computing [unix]. | module Sys = Stdlib.Sys
module Var = struct
module T = struct
type t = string
let compare =
if Sys.win32 then fun a b ->
String.compare (String.lowercase a) (String.lowercase b)
else String.compare
let to_dyn = Dyn.string
end
let temp_dir = if Sys.win32 then "TEMP" else "TMPDIR... |
bd7d4f1e6994ab7c7aad6bfabb0c6bc36793e0fab6bc7dee5e0e5ccb7f4c27aa | elaforge/karya | Serialize.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
# LANGUAGE ScopedTypeVariables #
| This module implements a Serialize class and serializers for basic types .
It duplicates a lot from the standard Serialize class , but this one... | null | https://raw.githubusercontent.com/elaforge/karya/89d1651424c35e564138d93424a157ff87457245/Util/Serialize.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
* magic
* util
* versions
* magic
must be ASCII.
The constructor is not exported, so all magics have to be defined here,
which should make it easy to avoid collisions.
^ result of 'File.writeGz'.
Appar... | Copyright 2013
# LANGUAGE ScopedTypeVariables #
| This module implements a Serialize class and serializers for basic types .
It duplicates a lot from the standard Serialize class , but this one at
least is under my control . The other one is not guaranteed to remain
compatible . Of course ... |
35b0b89d9fbb9dfb63797bf12a0886ea600c3df169699481738b3b5b3686d3a1 | softwarelanguageslab/maf | logm.scm | (define NumSeries (int-top))
(define NumComputers NumSeries)
(define NumWorkers NumSeries)
(define StartRate (int-top))
(define Increment (int-top))
(define (build-vector1 n f)
(letrec ((v (make-vector n (f 0)))
(loop1 (lambda (i)
(if (< i n)
(begin
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/contracts/savina/logm.scm | scheme | (become series-worker master computer cur-term)
(define master-actor (create master #f #f 0 0 0)) | (define NumSeries (int-top))
(define NumComputers NumSeries)
(define NumWorkers NumSeries)
(define StartRate (int-top))
(define Increment (int-top))
(define (build-vector1 n f)
(letrec ((v (make-vector n (f 0)))
(loop1 (lambda (i)
(if (< i n)
(begin
... |
c18f447b8771e71660dad8b4ecf62d2ac07fe1a8ae71faa957268b383410e8ad | dhleong/wish | sheets.cljs | (ns ^{:author "Daniel Leong"
:doc "sheets"}
wish.sheets
(:require [archetype.views.error-boundary :refer [error-boundary]]
[wish.sheets.dnd5e :as dnd5e]
[wish.sheets.dnd5e.builder :as dnd5e-builder]
[wish.sheets.dnd5e.campaign :as dnd5e-campaign]
[wish.sheets.dn... | null | https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/sheets.cljs | clojure | ======= const data =======================================
TODO we could use code splitting here to avoid loading
sheet templates that we don't care about
======= Public interface =================================
wish + sheet version numbers
date
wish + sheet version numbers
date
======= Views ===============... | (ns ^{:author "Daniel Leong"
:doc "sheets"}
wish.sheets
(:require [archetype.views.error-boundary :refer [error-boundary]]
[wish.sheets.dnd5e :as dnd5e]
[wish.sheets.dnd5e.builder :as dnd5e-builder]
[wish.sheets.dnd5e.campaign :as dnd5e-campaign]
[wish.sheets.dn... |
642c79cfcfa16ec3421a25a9660a39bfad58b9d46ab927701e803077fd1554ec | bsansouci/bsb-native | errors.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/driver/errors.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let report_error = Location.report_exc... |
2f9ed4d864cd2ddb1f0299139898868b857377ed8bda1b66dce11e520ed28ceb | sjoerdvisscher/data-category | Functor.hs | # LANGUAGE
GADTs
, PolyKinds
, RankNTypes
, , NoImplicitPrelude
, TypeOperators
, TypeFamilies
, PatternSynonyms
, FlexibleContexts
, FlexibleInstances
, UndecidableInstances
, GeneralizedNewtypeDeriving
#
GADTs
, PolyKinds
, RankNTypes
, ConstraintKinds
,... | null | https://raw.githubusercontent.com/sjoerdvisscher/data-category/ee9960c9aa3cd5a8cc20c5f430ab63dc8004632d/Data/Category/Functor.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Category.Functor
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable
---------------------------------------------------------------------------
*... | # LANGUAGE
GADTs
, PolyKinds
, RankNTypes
, , NoImplicitPrelude
, TypeOperators
, TypeFamilies
, PatternSynonyms
, FlexibleContexts
, FlexibleInstances
, UndecidableInstances
, GeneralizedNewtypeDeriving
#
GADTs
, PolyKinds
, RankNTypes
, ConstraintKinds
,... |
036e22b39f98a9718e4f8def3fa5d6692752df3667407dcc610507cdfd23032f | philnguyen/soft-contract | ex-4.rkt | #lang racket/base
(require soft-contract/fake-contract)
(define (p m n r)
(cond [(> r 0) (p m (- r 1) n)]
[(> n 0) (p r (- n 1) m)]
[else m]))
(provide
(contract-out
[p (exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer? . -> . exact-nonnegative-integer? #:total? #t... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/termination/fo-sc/ex-4.rkt | racket | #lang racket/base
(require soft-contract/fake-contract)
(define (p m n r)
(cond [(> r 0) (p m (- r 1) n)]
[(> n 0) (p r (- n 1) m)]
[else m]))
(provide
(contract-out
[p (exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer? . -> . exact-nonnegative-integer? #:total? #t... | |
d9fb5fbd52a5044cba85b0d215275290a0b76ef8e36be18b15a00a8571e3c266 | Eonblast/Scalaxis | api_tx_SUITE.erl | 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distribut... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/test/api_tx_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@author < >
@author < >
-module(api_tx_SUITE).
-author('').
-vsn('$Id$').
-compile(export_all).
-include("scalar... |
f60da64a81753365c1ca9afd88d9766b30f8a0111af316a549f8adb75e206988 | clj-kondo/clj-kondo | test.clj | (ns clj-kondo.impl.analyzer.test
{:no-doc true}
(:require
[clj-kondo.impl.analyzer.common :as common]
[clj-kondo.impl.macroexpand :as macros]
[clj-kondo.impl.utils :as utils]))
(defn analyze-deftest [ctx expr defined-by resolved-as-ns resolved-as-name]
(common/analyze-defn
ctx
(-> expr
(... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/851020d86cb58094f25518a4416d5e7362b4b3d7/src/clj_kondo/impl/analyzer/test.clj | clojure | (ns clj-kondo.impl.analyzer.test
{:no-doc true}
(:require
[clj-kondo.impl.analyzer.common :as common]
[clj-kondo.impl.macroexpand :as macros]
[clj-kondo.impl.utils :as utils]))
(defn analyze-deftest [ctx expr defined-by resolved-as-ns resolved-as-name]
(common/analyze-defn
ctx
(-> expr
(... | |
2d245e2eff28019a4375d30b5526c22e3528303c33cedb47f522101958f2c983 | mirage/ocaml-matrix | query.ml | open Json_encoding
module Directory = struct
module Response = struct
type t = {room_id: string; servers: string list} [@@deriving accessor]
let encoding =
let to_tuple t = t.room_id, t.servers in
let of_tuple v =
let room_id, servers = v in
{room_id; servers} in
let with_t... | null | https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/lib/matrix-stos/query.ml | ocaml | open Json_encoding
module Directory = struct
module Response = struct
type t = {room_id: string; servers: string list} [@@deriving accessor]
let encoding =
let to_tuple t = t.room_id, t.servers in
let of_tuple v =
let room_id, servers = v in
{room_id; servers} in
let with_t... | |
1e4b9f2bfa548c6aff1634dc9bb2b12f8576e88efa086da97b743aad2cfe08a4 | Tim-ats-d/Tim-lang | main.ml | let () = Core.Compiler.from_file "bin/foo.applescript"
| null | https://raw.githubusercontent.com/Tim-ats-d/Tim-lang/005d04de07871fe464fadbb80c3050b9bc9b0ace/bin/main.ml | ocaml | let () = Core.Compiler.from_file "bin/foo.applescript"
| |
0733a0811e375c9eada1e82607036fe01f1533fcdcd0a350ebaba6ddd5bbe0e0 | madgen/exalog | Logger.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Language.Exalog.Logger
( LoggerT
, Logger
, LoggerEnv(..)
, vanillaEnv
, runLoggerT
, whisper
, scold
, scream
, Err.Error
, Err.Severity(..)
) where
import Protolude hiding (log)
import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Mon... | null | https://raw.githubusercontent.com/madgen/exalog/7d169b066c5c08f2b8e44f5e078df264731ac177/src/Language/Exalog/Logger.hs | haskell | |Optional because test cases don't have source code | # LANGUAGE GeneralizedNewtypeDeriving #
module Language.Exalog.Logger
( LoggerT
, Logger
, LoggerEnv(..)
, vanillaEnv
, runLoggerT
, whisper
, scold
, scream
, Err.Error
, Err.Severity(..)
) where
import Protolude hiding (log)
import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Mon... |
ad695e19a9d6e85c0480207a5e6b6d7f9f14222e0b2722b3f61d6ec8d7b30790 | akazukin5151/kpxhs | Utils.hs | -- | Utils to navigate around the list
{-# LANGUAGE OverloadedStrings #-}
module ViewEvents.BrowserEvents.Utils
( listMoveWith
, listMovePageUp
, listMovePageDown ) where
import Brick.Util (clamp)
import qualified Brick.Widgets.List as L
import Data.Maybe (fromMaybe)
l... | null | https://raw.githubusercontent.com/akazukin5151/kpxhs/e3195b0ef5b8bee37593c7a5967ae476b1497fb7/src/kpxhs/ViewEvents/BrowserEvents/Utils.hs | haskell | | Utils to navigate around the list
# LANGUAGE OverloadedStrings #
Default page up and down functions too fast for me |
module ViewEvents.BrowserEvents.Utils
( listMoveWith
, listMovePageUp
, listMovePageDown ) where
import Brick.Util (clamp)
import qualified Brick.Widgets.List as L
import Data.Maybe (fromMaybe)
listMoveWith :: (L.Splittable t, Foldable t)
=> (Int -> Int) -> ... |
82e330687ccdaf5d36a9bdb55e14417c73828e8633000da6ae96dd72d84ebea0 | ucsd-progsys/dsolve | nestedmatch.ml | type t = Node of int
type tt = Pode of (int * int) * (int * int)
let printer z =
match z with Pode (z,z') ->
let (x,y) = z in
let (x',y') = z' in
x + y + x' + y'
let make x =
match x with None -> None | Some x -> Some (Node x)
let check x =
match x with
| Some y -> (match y with Node z -> as... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/nestedmatch.ml | ocaml | UNCOMMENT TO SEE CRASH:
| Some (Node x) -> assert (x > 0) | type t = Node of int
type tt = Pode of (int * int) * (int * int)
let printer z =
match z with Pode (z,z') ->
let (x,y) = z in
let (x',y') = z' in
x + y + x' + y'
let make x =
match x with None -> None | Some x -> Some (Node x)
let check x =
match x with
| Some y -> (match y with Node z -> as... |
2d9d4d007083a7f4f5aa3e9cbe25f44855f7798a44adbdd6a72882d6f63e1293 | patricoferris/ocaml-multicore-monorepo | linear_algebra.ml | Code under Apache License 2.0 - Jane Street Group , LLC < >
let col_norm a column =
let acc = ref 0. in
for i = 0 to Array.length a - 1 do
let entry = a.(i).(column) in
acc := !acc +. (entry *. entry)
done ;
sqrt !acc
let col_inner_prod t j1 j2 =
let acc = ref 0. in
for i = 0 to Array.length t ... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/eqaf/check/linear_algebra.ml | ocaml | Code under Apache License 2.0 - Jane Street Group , LLC < >
let col_norm a column =
let acc = ref 0. in
for i = 0 to Array.length a - 1 do
let entry = a.(i).(column) in
acc := !acc +. (entry *. entry)
done ;
sqrt !acc
let col_inner_prod t j1 j2 =
let acc = ref 0. in
for i = 0 to Array.length t ... | |
8f44894d48f475a7f6a9ce7889f06c99e0274637d321d59eb024696b784cee86 | kadena-io/chainweb-node | InMemTypes.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
| An in - memory backend that does n... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/17d69b99d79c56e282b72e3f19222974de784e18/src/Chainweb/Mempool/InMemTypes.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE RankNTypes #
----------------------------------------------------------------------------
internal imports
----------------------------------------------------------------------------
----------------------------------------------------------------------------
# UNPACK #
# UNPACK... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
| An in - memory backend that does not persist to disk .
module Chainweb.Mempool.InMemTypes
( ... |
a805ba345a669b41462c64ef5e54876e7b5dc735b449665ff07be2286f32c209 | input-output-hk/cardano-ledger-byron | ProtocolVersion.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Cardano.Chain.Update.ProtocolVersion
( ProtocolVersion(..)
)
where
import Cardano.Prelude
import Data.Aeson (ToJSON)
import Formattin... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Update/ProtocolVersion.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
| Communication protocol version
Used for debugging purposes only | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Cardano.Chain.Update.ProtocolVersion
( ProtocolVersion(..)
)
where
import Cardano.Prelude
import Data.Aeson (ToJSON)
import Formatting (bprint, shown)
import Formatting.Buildable (Buildable(..))
import qualified Prelude
import Cardano.Binar... |
991660fabb810737131f8526f066d5f9e5d3c63018f65f9b7c6271adce205378 | Gbury/dolmen | map.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
module type S = sig
type key
type 'a t
val empty : _ t
val find_exn : key -> 'a t -> 'a
(** Exception-raising find function.
@raise Not_found *)
val find_opt : key -> 'a t -> 'a option
(** Option-returnin... | null | https://raw.githubusercontent.com/Gbury/dolmen/21bfd8d221b39dfd72a7938a09a6b2ae85b3c391/src/interface/map.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information
* Exception-raising find function.
@raise Not_found
* Option-returning find function.
* Add a new binding, shadowing any earlier bdingin to the same key.
* Update the value bound to a key.
* Iter on the map.
* Fold on the m... |
module type S = sig
type key
type 'a t
val empty : _ t
val find_exn : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
val find_add : key -> ('a option -> 'a) -> 'a t -> 'a t
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> ... |
cb0dc8fa47db965392bd468e3b7a573ee27068822ca92fff848809f5ce9aa9e1 | job-streamer/job-streamer-control-bus | token_test.clj | (ns job-streamer.control-bus.component.token-test
(:require [job-streamer.control-bus.component.token :refer :all]
[com.stuartsierra.component :as component]
[clojure.pprint :refer :all]
[clojure.test :refer :all]))
(deftest token-provider-test
(testing "New token"
(let [tok... | null | https://raw.githubusercontent.com/job-streamer/job-streamer-control-bus/af38bc8838366c230e4f53f08b447eecc3e794b7/test/clj/job_streamer/control_bus/component/token_test.clj | clojure | (ns job-streamer.control-bus.component.token-test
(:require [job-streamer.control-bus.component.token :refer :all]
[com.stuartsierra.component :as component]
[clojure.pprint :refer :all]
[clojure.test :refer :all]))
(deftest token-provider-test
(testing "New token"
(let [tok... | |
45ec3322d5f22e988ebcc88b5ec5bfb47ead9e0a06904434dad4b189ac02bbbc | mks-m/wower | dbc.erl | -module(dbc).
-export([import/1, import_all/0]).
-import(packet_helper, [read_cstring/1]).
-include_lib("kernel/include/file.hrl").
-include("dbc_records.hrl").
-define(I, :32/integer-little).
-define(F, :32/float-little).
%% @type field_atom() = int | float | cstring.
%% @type field_type() = int() | float() | strin... | null | https://raw.githubusercontent.com/mks-m/wower/ce9724876cf57b67ce72f2a9a6f74bb1ebffd53a/realm/src/dbc.erl | erlang | @type field_atom() = int | float | cstring.
@type field_type() = int() | float() | string().
@type field_desc() = {atom(), field_atom(), int()}.
@spec import(atom()) -> ok.
@spec import(atom(), string(), [field_desc()]) -> ok.
@spec read_records(atom(), int(), [field_desc()], int(), binary(), binary()) -> ok.
@s... | -module(dbc).
-export([import/1, import_all/0]).
-import(packet_helper, [read_cstring/1]).
-include_lib("kernel/include/file.hrl").
-include("dbc_records.hrl").
-define(I, :32/integer-little).
-define(F, :32/float-little).
( ) - > ok .
import_all() ->
mnesia:start(),
ok = import(dbc_chr_race),
ok.
... |
431f6c009c3df323453bcea7d7a44c8991c4b649990a784f419d9e10abca596b | mirage/qubes-mirage-firewall | unikernel.ml | Copyright ( C ) 2015 , < >
See the README file for details .
See the README file for details. *)
open Lwt
open Qubes
let src = Logs.Src.create "unikernel" ~doc:"Main unikernel code"
module Log = (val Logs.src_log src : Logs.LOG)
module Main (R : Mirage_random.S)(Clock : Mirage_clock.MCLOCK)(Time : Mirag... | null | https://raw.githubusercontent.com/mirage/qubes-mirage-firewall/065c8bb69a0bc1d77c07a99ab276782fc4264bae/unikernel.ml | ocaml | Set up networking and listen for incoming packets.
Report success
Handle packets from both networks
Start qrexec agent and QubesDB agent in parallel
Wait for clients to connect
Watch for shutdown requests from Qubes
Set up networking
Read network configuration from QubesDB
Set up client-side networking... | Copyright ( C ) 2015 , < >
See the README file for details .
See the README file for details. *)
open Lwt
open Qubes
let src = Logs.Src.create "unikernel" ~doc:"Main unikernel code"
module Log = (val Logs.src_log src : Logs.LOG)
module Main (R : Mirage_random.S)(Clock : Mirage_clock.MCLOCK)(Time : Mirag... |
950a5105e709f3ef5ae988f0e6d6905351f1523040f99ea1edaa72b273e3c8f6 | LexiFi/menhir | infer.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/infer.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
e5754e85c43426b5c942bde71f732e7424d4797be1f426a7a56db7632d688f97 | lab-79/dspec | util.clj | (ns dspec.util
(:import (datomic.db DbId)))
(def db-id? #(or (integer? %)
(instance? DbId %)))
| null | https://raw.githubusercontent.com/lab-79/dspec/26f88e74066e381c8569d175c1bd5948a8005bd0/test/dspec/util.clj | clojure | (ns dspec.util
(:import (datomic.db DbId)))
(def db-id? #(or (integer? %)
(instance? DbId %)))
| |
2a8c5461580f9fe10b4d8d99f6997eb604b64e3cd6ad2a9d05d33f9ade906cb8 | atolab/apero-net | lcodec.ml | open Locator
open Apero
let decode_locator buf =
let s = decode_string buf in
Locator.of_string s
let encode_locator l =
encode_string (Locator.to_string l)
let decode_locators buf =
let ols = decode_seq decode_locator buf in
let ls = Option.get @@ Option.flatten ols in
Locators.of_list ls
le... | null | https://raw.githubusercontent.com/atolab/apero-net/d21290610d06a36f1ee571dea475f25ed5735151/lib/lcodec.ml | ocaml | open Locator
open Apero
let decode_locator buf =
let s = decode_string buf in
Locator.of_string s
let encode_locator l =
encode_string (Locator.to_string l)
let decode_locators buf =
let ols = decode_seq decode_locator buf in
let ls = Option.get @@ Option.flatten ols in
Locators.of_list ls
le... | |
47ae9ef9eccbb0a87308dc5f323d55f27433165f9477929b0297a81fc54348e5 | polytypic/par-ml | FibParCutoff.ml | open Par
let n = try int_of_string Sys.argv.(2) with _ -> 30
let cutoff = try int_of_string Sys.argv.(3) with _ -> 20
let rec fib_ser n = if n <= 1 then n else fib_ser (n - 1) + fib_ser (n - 2)
let rec fib n =
if n <= cutoff then fib_ser n
else
let n1, n2 = par (fun () -> fib (n - 1)) (fun () -> fib (n - 2)) ... | null | https://raw.githubusercontent.com/polytypic/par-ml/17e2ef61b334073cadc4b1d7de823a486bd2e51d/src/test/FibParCutoff.ml | ocaml | open Par
let n = try int_of_string Sys.argv.(2) with _ -> 30
let cutoff = try int_of_string Sys.argv.(3) with _ -> 20
let rec fib_ser n = if n <= 1 then n else fib_ser (n - 1) + fib_ser (n - 2)
let rec fib n =
if n <= cutoff then fib_ser n
else
let n1, n2 = par (fun () -> fib (n - 1)) (fun () -> fib (n - 2)) ... | |
fa5ddf0d6f8f3a653b696cadb6702711e86eccdb2f72a786b0d4bf45850c79e4 | Breezeemr/hitch | mutable_var.cljc | (ns hitch.selectors.mutable-var
(:require [hitch.oldprotocols :as oldproto]
[hitch.protocol :as proto]))
(defrecord MutableVar [name]
proto/StatefulSelector
(create [selector]
(proto/->StateEffect oldproto/NOT-FOUND-SENTINEL nil nil))
(destroy [selector state]
nil)
proto/CommandableSelec... | null | https://raw.githubusercontent.com/Breezeemr/hitch/79efea3cbf601a56060237fd9add2c0b68024a03/src/hitch/selectors/mutable_var.cljc | clojure | (ns hitch.selectors.mutable-var
(:require [hitch.oldprotocols :as oldproto]
[hitch.protocol :as proto]))
(defrecord MutableVar [name]
proto/StatefulSelector
(create [selector]
(proto/->StateEffect oldproto/NOT-FOUND-SENTINEL nil nil))
(destroy [selector state]
nil)
proto/CommandableSelec... | |
26f373efa4f65aeb927fd03f602c70962d46c67e8af111a3337097c0dc7cfb30 | facebook/infer | Source.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/d2e59e6df24858729129debcc2813ae3915c4f0a/infer/src/absint/Source.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
ba0ef132b164a3c5d9d9e05cdf820c26c0e2d54a4a62b5db5a30d388482e272f | yetanalytics/dave | path.clj | (ns com.yetanalytics.dave.filter-scratch.json.path
(:require [blancas.kern.core :as k]
[blancas.kern.lexer.basic :as kl]
[clojure.spec.alpha :as s]
[com.yetanalytics.dave.filter-scratch.json :as json]
[clojure.math.combinatorics :as combo]))
(s/def ::root
#{'$})
(de... | null | https://raw.githubusercontent.com/yetanalytics/dave/7a71c2017889862b2fb567edc8196b4382d01beb/scratch/filter-scratch/src/main/com/yetanalytics/dave/filter_scratch/json/path.clj | clojure | was this range bounded, or does it use a MAX_VALUE?
if the option is used, we're unbounded
double-quote
single quote
escape char
normal key
dot wildcard
double-dot wildcard
otherwise, itsa range spec
if the enum continues,
otherwise, itsa range spec
we don't prune at the top level, so this is simple
revers... | (ns com.yetanalytics.dave.filter-scratch.json.path
(:require [blancas.kern.core :as k]
[blancas.kern.lexer.basic :as kl]
[clojure.spec.alpha :as s]
[com.yetanalytics.dave.filter-scratch.json :as json]
[clojure.math.combinatorics :as combo]))
(s/def ::root
#{'$})
(de... |
70fae2544587dbd385ede929d26ac15e50b03e99186b8836eb7f631009dae604 | lehins/hip | Filter.hs | # LANGUAGE FlexibleContexts #
module Main where
import Criterion.Main
import Graphics.Image as I
import Graphics.Image.Processing.Canny as I
import Prelude as P
main :: IO ()
main = do
imgY <- readImageY "images/downloaded/frog-1280x824.jpg"
imgRGBD <- readImageRGB "images/downloaded/frog-1280x824.jpg"
default... | null | https://raw.githubusercontent.com/lehins/hip/1386e83ad4c3e1bdb01f3d6bdec6fe40489dabd1/hip/bench/Filter.hs | haskell | , env (return imgY) $ \img ->
bgroup
] | # LANGUAGE FlexibleContexts #
module Main where
import Criterion.Main
import Graphics.Image as I
import Graphics.Image.Processing.Canny as I
import Prelude as P
main :: IO ()
main = do
imgY <- readImageY "images/downloaded/frog-1280x824.jpg"
imgRGBD <- readImageRGB "images/downloaded/frog-1280x824.jpg"
default... |
24467efeb6853cd9db524ff12dfd4ac37468bc220bff974a60b6a93574c0a4a8 | int-index/kalium | Valueficate.hs | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
module Kalium.Nucleus.Scalar.Valueficate where
import Kalium.Prelude
import Control.Monad.Reader
import qualified Data.Map as M
import Kalium.Nucleus.Scalar.Program
class ValueficateSubstitu... | null | https://raw.githubusercontent.com/int-index/kalium/0653b4229001880322acf3016de595360de726ec/src/Kalium/Nucleus/Scalar/Valueficate.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
module Kalium.Nucleus.Scalar.Valueficate where
import Kalium.Prelude
import Control.Monad.Reader
import qualified Data.Map as M
import Kalium.Nucleus.Scalar.Program
class ValueficateSubstitu... | |
f723f9715e8cc8a1f122fee8d6307dfc93be205f4c87a1dca472ad9bffb46de8 | cedlemo/OCaml-GI-ctypes-bindings-generator | Event_box_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Event_box_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Event_box_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Event_box_private"
| |
279f6eab9878bc5a8db87f1ddebcbd6273b4df0239c1b0b41f858cdc1e094f2b | geo2a/redfin-lib | Parser.hs | |
Module : ISA.Types . Symbolic . Parser
Copyright : ( c ) 2019
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Parse symbolic expressions
Module : ISA.Types.Symbolic.Parser
Copyright : (c) Georgy Lukyanov 2019
License : MIT (see the file LI... | null | https://raw.githubusercontent.com/geo2a/redfin-lib/55fa785283b1a33976958a63cea557e38d76c5e3/src/ISA/Types/Symbolic/Parser.hs | haskell | pPredicate = do
symbol "->"
property <- pSym
pure (\expr -> subst expr var property) | |
Module : ISA.Types . Symbolic . Parser
Copyright : ( c ) 2019
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Parse symbolic expressions
Module : ISA.Types.Symbolic.Parser
Copyright : (c) Georgy Lukyanov 2019
License : MIT (see the file LI... |
245824024448fd655e2c99f4fc4b6a77d4fdca1fa0bad557524e02f393de51b9 | nilern/monnit | reader_macros.clj | (ns monnit.impl.reader-macros
(:require [monnit.core :as m]))
(defmacro defreadertype [name fields & impls]
(concat
`(deftype ~name ~fields ~@impls)
'(m/Functor
(-fmap [self f] (->FMap1 f self))
(-fmap [self f b] (->FMap2 f self b))
(-fmap [self f b c] (->FMap3 f self b c))
(-fmap [... | null | https://raw.githubusercontent.com/nilern/monnit/cc5fe2a031ef8540c4f77bb620d05a0f0564292b/src/monnit/impl/reader_macros.clj | clojure | (ns monnit.impl.reader-macros
(:require [monnit.core :as m]))
(defmacro defreadertype [name fields & impls]
(concat
`(deftype ~name ~fields ~@impls)
'(m/Functor
(-fmap [self f] (->FMap1 f self))
(-fmap [self f b] (->FMap2 f self b))
(-fmap [self f b c] (->FMap3 f self b c))
(-fmap [... | |
a57225cbf522eb6d6f342defe32b5c5c844c8bc19299717f2d8fb509b6fb9d83 | dvcrn/proton | core.cljs | (ns proton.layers.frameworks.django.core
(:use [proton.layers.base :only [init-layer! register-layer-dependencies]]))
(defmethod init-layer! :frameworks/django []
(register-layer-dependencies :lang/python [:atom-django]))
| null | https://raw.githubusercontent.com/dvcrn/proton/427d83ffdb61d84a04e3d30032b792a9cfbfc53f/src/cljs/proton/layers/frameworks/django/core.cljs | clojure | (ns proton.layers.frameworks.django.core
(:use [proton.layers.base :only [init-layer! register-layer-dependencies]]))
(defmethod init-layer! :frameworks/django []
(register-layer-dependencies :lang/python [:atom-django]))
| |
0ef2bf50121ccb5dda06b56cfce67bdadfeaa35be714489e4b3e42ae3161bbfe | finnishtransportagency/harja | roolit.cljc | (ns harja.domain.roolit
"Harjan käyttäjäroolit"
(:require
[clojure.set :refer [intersection]]
#?(:cljs [harja.tiedot.istunto :as istunto])
[taoensso.timbre :as log]
#?(:clj [slingshot.slingshot :refer [throw+]])))
(defrecord EiOikeutta [syy])
(defn ei-oikeutta? [arvo]
(instance? EiOikeutta arvo)... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/23a2e6a38b3482e3af0fb988ff567640091d25e2/src/cljc/harja/domain/roolit.cljc | clojure | VAIN BACKILLÄ
myös aina tilaaja
VAIN FRONTILLA | (ns harja.domain.roolit
"Harjan käyttäjäroolit"
(:require
[clojure.set :refer [intersection]]
#?(:cljs [harja.tiedot.istunto :as istunto])
[taoensso.timbre :as log]
#?(:clj [slingshot.slingshot :refer [throw+]])))
(defrecord EiOikeutta [syy])
(defn ei-oikeutta? [arvo]
(instance? EiOikeutta arvo)... |
77ddc8271ba4a41573fc128329828a7d2a251389a01d946c3bf3d467080a195c | clojure-interop/java-jdk | XPathException.clj | (ns javax.xml.xpath.XPathException
"XPathException represents a generic XPath exception."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.xpath XPathException]))
(defn ->x-path-exception
"Constructor.
Constructs a new XPathException
with the specified detail message.
The cause is... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/xpath/XPathException.clj | clojure | (ns javax.xml.xpath.XPathException
"XPathException represents a generic XPath exception."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.xpath XPathException]))
(defn ->x-path-exception
"Constructor.
Constructs a new XPathException
with the specified detail message.
The cause is... | |
b6145f95ac9ff51f185de3c06247eddd06095360bd871dfecba51a4f52a04a4f | soulomoon/haskell-katas | Isomorphism.hs | module Katas.Isomorphism where
import Kyu3.Isomorphism
import Test.Hspec
import Test.QuickCheck
import Data.Either
bISO :: ISO Bool Bool
bISO = (not, not)
lrl :: ISO a b -> (a -> a)
lrl (ab, ba) = ba . ab
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "IsomorphString" $ do
describe "subst" $ do
... | null | https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/test/Katas/Isomorphism.hs | haskell | module Katas.Isomorphism where
import Kyu3.Isomorphism
import Test.Hspec
import Test.QuickCheck
import Data.Either
bISO :: ISO Bool Bool
bISO = (not, not)
lrl :: ISO a b -> (a -> a)
lrl (ab, ba) = ba . ab
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "IsomorphString" $ do
describe "subst" $ do
... | |
d1e55cd76fabd751225bb8326c970ddad5f248e05e71a75cd35f26506fdc8592 | eugenehr/erlyconv | iso8859_8.erl | %% THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
FROM mappings / ISO8859/8859 - 8.TXT AT 2016 - 08 - 19
-module(iso8859_8).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
%% Public functions
to_unicode(16#AA) -> 16#00D7;
to_unicode(16#BA) -> 16#00F7;
to_unicode(16#DF) -> 16#2017;
to_unicode(16#E0) ->... | null | https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/src/iso8859_8.erl | erlang | THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
Public functions
Private functions | FROM mappings / ISO8859/8859 - 8.TXT AT 2016 - 08 - 19
-module(iso8859_8).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
to_unicode(16#AA) -> 16#00D7;
to_unicode(16#BA) -> 16#00F7;
to_unicode(16#DF) -> 16#2017;
to_unicode(16#E0) -> 16#05D0;
to_unicode(16#E1) -> 16#05D1;
to_unicode(16#E2) -> 16#05D2;
to_un... |
b2095cca92e836ba920476ae3ee7967c75b854c77485383dc33aa543c39ab146 | okeuday/erlbench | ntree.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
%%%
%%%------------------------------------------------------------------------
%%% @doc
= = N - tree data structure.==
Attempting to exploit flat tree hierarchies with an a... | null | https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/ntree.erl | erlang |
------------------------------------------------------------------------
@doc
@end
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Softwar... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
= = N - tree data structure.==
Attempting to exploit flat tree hierarchies with an adjustable size N.
MIT License
Copyright ( c ) 2012 - 2017 < mjtruog at protonmail d... |
390c47dec8b7316ea59db02fc1402e774e772de5023911dc997eeb696fa95ef4 | nushio3/learn-haskell | Vec.hs | module Data.Vec where
data Vec a = Vec a a a
(・) :: Vec a -> Vec a -> a
(Vec ax ay az) ・ (Vec bx by bz) = undefined
(×) :: Vec a -> Vec a -> Vec a
(Vec ax ay az) × (Vec bx by bz) = undefined
| null | https://raw.githubusercontent.com/nushio3/learn-haskell/eda0fd0b33e9c4b7552afd24c6a25a105cca5f94/exercise-6-1-data-Vec/src/Data/Vec.hs | haskell | module Data.Vec where
data Vec a = Vec a a a
(・) :: Vec a -> Vec a -> a
(Vec ax ay az) ・ (Vec bx by bz) = undefined
(×) :: Vec a -> Vec a -> Vec a
(Vec ax ay az) × (Vec bx by bz) = undefined
| |
dd4c5eb5377c09d1089b7d97254f5eb25e781cf89947335d6df3f23c2d6a46da | ndmitchell/catch | Evaluate.hs |
module Typey.Evaluate(evaluate) where
import Typey.Type
import Typey.Abstract
import Hite
import General.General
import Data.Maybe
import Data.List
import Typey.Faster
import Control.Monad
import Data.IORef
import qualified Data.Map as Map
type AbstractA = Abstract AExp
type Env = (Hite, DataM S... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Typey/Evaluate.hs | haskell | putStrLn $ "Cache hit, " ++ show (func,args,x)
putStrLn $ "Cache add, " ++ show (func,args,res)
the functions i call
do I need to fixed point
do I need to take the power of these arguments
the fast eval helper
++ show x
|
module Typey.Evaluate(evaluate) where
import Typey.Type
import Typey.Abstract
import Hite
import General.General
import Data.Maybe
import Data.List
import Typey.Faster
import Control.Monad
import Data.IORef
import qualified Data.Map as Map
type AbstractA = Abstract AExp
type Env = (Hite, DataM S... |
2c4de620d280bf3af016ff8f5bfcd9598c7c15fac5f696813f8ef9c7fb932177 | ideas-edu/ideas | EncoderXML.hs | {-# LANGUAGE GADTs #-}
-----------------------------------------------------------------------------
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 ... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Encoding/EncoderXML.hs | haskell | # LANGUAGE GADTs #
---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
---------------------------------------------------------------------------
---------------... | 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 )
Services using XML notation
modu... |
1da6ae368233d6b6b0bc1eb09c1590f702ef7b2565552d6b013d9b577243ed6f | mokus0/junkbox | invertible.hs | class Invertible f a b where
apply :: (Invertible f a b) => f -> a -> b
invert :: forall a b. forall g. (Invertible f a b, Invertible g b a) => f -> g
compose :: forall a b c. forall g h. (Invertible f a b, Invertible g b c, Invertible h a c) => f -> g -> h
data InvFunc a b = Inv (a->b) (b->a)
instance fora... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/invertible.hs | haskell | class Invertible f a b where
apply :: (Invertible f a b) => f -> a -> b
invert :: forall a b. forall g. (Invertible f a b, Invertible g b a) => f -> g
compose :: forall a b c. forall g h. (Invertible f a b, Invertible g b c, Invertible h a c) => f -> g -> h
data InvFunc a b = Inv (a->b) (b->a)
instance fora... | |
cce97b014464a45f647165a42433470bfa8d6c77997cb51efa544db4c06e0170 | jeffshrager/biobike | jhelp-structs.lisp | -*- Package : help ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :help)
;; Move here to avoid compiler warning -- JP.
(defparameter *jpage-count* 0)
(defparameter *jsymbol-count* 0)
(defun stringify (mess)
(if mess
(format nil "~a" mess)
"" ;; not "NIL".
)
)
Version 2 . Input si... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Help/jhelp-structs.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
Move here to avoid compiler warning -- JP.
not "NIL".
Currently used for incoming probe.
and wordIDs are sorted .
deprecated. Delete soon.
(wordbag-bag myWB) (wordbag-total myWB) (wordbag-bigrams myWB)
deprecated. Delete soon.
deprecated. Delet... | (in-package :help)
(defparameter *jpage-count* 0)
(defparameter *jsymbol-count* 0)
(defun stringify (mess)
(if mess
(format nil "~a" mess)
)
)
Version 2 . Input side .
( setf ( wordbag - bag myWB ) newList )
( make - wordbag : bag NIL : total 0 : )
( defstruct JDictionary wordentries )
... |
f32e0c526d70ab802780968937eea69bf4d5d89526d8a86caa2ec21801c5a243 | coq-community/coqffi | m2.mli | val to_bool : M1.t -> bool
| null | https://raw.githubusercontent.com/coq-community/coqffi/9307403abe0919665cd38dcc8f71582e950aa7c1/examples/src/m2.mli | ocaml | val to_bool : M1.t -> bool
| |
0f8a143aca78c633d59e4b1a1202f3aba9cf4eeb89474ca0223c3c4fcae33b1f | Soyn/sicp | Ex2.39.rkt | #lang racket
Ex 2.39
(define(accumulate op init seqs)
(if (null? seqs)
init
(op (car seqs)
(accumulate op init (cdr seqs)))))
(define (fold-right op init sequence)
(if (null? sequence)
init
(op (car sequence)
(accumulate op init (cdr sequence)))))
(define (fold-left op... | null | https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.2/Ex2.39.rkt | racket | test usage | #lang racket
Ex 2.39
(define(accumulate op init seqs)
(if (null? seqs)
init
(op (car seqs)
(accumulate op init (cdr seqs)))))
(define (fold-right op init sequence)
(if (null? sequence)
init
(op (car sequence)
(accumulate op init (cdr sequence)))))
(define (fold-left op... |
e53446ba51eee8b9d80a1306d32f77df5e52bfd00587884b81b2b98eed42fa7d | ocaml-multicore/tezos | main.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/main.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
a21e08ea81e2488bccd4761cec69cb29d38ea2fd1456b53ffaed1c94a67e3c3b | den1k/vimsical | branches.cljc | (ns vimsical.vcs.state.branches
"Keep track of the deltas for a branch"
(:require
[clojure.spec.alpha :as s]
[vimsical.vcs.alg.topo :as topo]
[vimsical.vcs.branch :as branch]
[vimsical.vcs.data.indexed.vector :as indexed]
[vimsical.vcs.delta :as delta]
[vimsical.vcs.data.splittable :as splittable]... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/vcs/vimsical/vcs/state/branches.cljc | clojure |
* Spec
* Internal
* API
| (ns vimsical.vcs.state.branches
"Keep track of the deltas for a branch"
(:require
[clojure.spec.alpha :as s]
[vimsical.vcs.alg.topo :as topo]
[vimsical.vcs.branch :as branch]
[vimsical.vcs.data.indexed.vector :as indexed]
[vimsical.vcs.delta :as delta]
[vimsical.vcs.data.splittable :as splittable]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.