_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 |
|---|---|---|---|---|---|---|---|---|
21bffded3ba8b6d80459a01268135d7946fcd652ffbc4fb8ffc51e2300f6bdb8 | cardmagic/lucash | errno.scm | ;;; Errno constant definitions.
Copyright ( c ) 1993 by . See file COPYING .
AIX version by
is not a legit Scheme symbol . , lose .
(define-enum-constants errno
;; POSIX:
(perm 1) ; Operation not permitted
(noent 2) ; No such file or directory
(srch 3) ; No such process
(intr 4) ; Interru... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/aix/errno.scm | scheme | Errno constant definitions.
POSIX:
Operation not permitted
No such file or directory
No such process
Interrupted function call
Input/output error
No such device or address
Arg list too long
Bad file descriptor
No child processes
Resource temporarily unavailable
Not enough space
Permission denied
Bad addr... | Copyright ( c ) 1993 by . See file COPYING .
AIX version by
is not a legit Scheme symbol . , lose .
(define-enum-constants errno
Exec format error
Invalid argument
Invalid seek
Resource deadlock avoided
Unformatted media
Protocol family not supported
Network is unreachable
Network... |
68e9ce2c8bc184d6718f459aa9193f5ea42d256b93bd5ca14e8ffe9f92a1b24e | thoughtbot/carnival | Validation.hs | module Helper.Validation where
import Import
runValidation :: Validation a -> a -> (a -> Handler b) -> Handler b
runValidation validate thing onSuccess =
case validate thing of
Right v -> onSuccess v
Left es -> sendResponseStatus status400 $ object
["errors" .= map toJSON es]
| null | https://raw.githubusercontent.com/thoughtbot/carnival/1cd4bd02ea6884b86020029257ab69ec3892a168/Helper/Validation.hs | haskell | module Helper.Validation where
import Import
runValidation :: Validation a -> a -> (a -> Handler b) -> Handler b
runValidation validate thing onSuccess =
case validate thing of
Right v -> onSuccess v
Left es -> sendResponseStatus status400 $ object
["errors" .= map toJSON es]
| |
78d3900e39b52bcd475a2b072ca44fa6ede7db6a24a4d4756f24445ff366cabf | basho/riak_cs | regression_tests_2.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/riak_test/tests/regression_tests_2.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
244a93100e63c845a613fb8956a0ec9ae1e3829bb5c21f8446fc904b1e4ec852 | manuel-serrano/bigloo | scm_main.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / examples / Embedded / scm - main.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/examples/Embedded/scm_main.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / bigloo / examples / Embedded / scm - main.scm * /
* Author : * /
* Creation : We d Feb 14 09:05:59 1996 * /
* Last change : We d Feb 14 09:16:16 1996 ( serrano ) * /
* ... |
613a8f5b9754191155953b1526cb29bb9d4028b5fb24aa76abe074d9e4042bbf | ahrefs/bs-atdgen-codec-runtime | atdgen_codec_runtime.mli | * bs - json adapter for atdgen
* Module signature required of any json adapter .
For example , an ATD annotation
[ < json
adapter.ocaml="Atdgen_codec_runtime . Json.adapter . " ]
refers to the OCaml module
[ Atdgen_codec_runtime . Json_adapter . ] .
For example, an ATD annotati... | null | https://raw.githubusercontent.com/ahrefs/bs-atdgen-codec-runtime/3824db53f7f4464921bb763160da3cea5fc5b658/src/atdgen_codec_runtime.mli | ocaml | * bs - json adapter for atdgen
* Module signature required of any json adapter .
For example , an ATD annotation
[ < json
adapter.ocaml="Atdgen_codec_runtime . Json.adapter . " ]
refers to the OCaml module
[ Atdgen_codec_runtime . Json_adapter . ] .
For example, an ATD annotati... | |
950492ad9946f4910ba14dee59f9fa42e3288cd18ebf91743c83bbc64cde713f | brownplt/LambdaS5 | gml.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/lib/ocamlgraph/gml.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
$ I d :... |
a2a5c7bbfbdd225bfe5ba7e235f3e8611ce3dc9fbd498e14e840f84ab900ecd0 | serioga/webapp-clojure-2020 | hikari_data_source_mixin.clj | (ns app.system.integrant-config.hikari-data-source-mixin
"Config template mixin for Hikari-CP data source.
Example:
{::data-source-read-write #::config{:mixins [::hikari-data-source-mixin]}
::data-source-read-only #::config{:mixins [::hikari-data-source-mixin]
:config {:r... | null | https://raw.githubusercontent.com/serioga/webapp-clojure-2020/b581cab79d131df344dee0889782972dfeca06e4/src/app/system/integrant_config/hikari_data_source_mixin.clj | clojure | (ns app.system.integrant-config.hikari-data-source-mixin
"Config template mixin for Hikari-CP data source.
Example:
{::data-source-read-write #::config{:mixins [::hikari-data-source-mixin]}
::data-source-read-only #::config{:mixins [::hikari-data-source-mixin]
:config {:r... | |
bafa5073365b2b1a18258814d39d91724453d1fde39c896e90ef80baf6518a2b | slagyr/speclj | core_spec.cljc | (ns speclj.core-spec
(#?(:clj :require :cljs :require-macros)
[speclj.core :refer [describe it context tags focus-describe focus-context focus-it
should should-be-same should-not-be-same should=
before after before-all after-all
with with! wit... | null | https://raw.githubusercontent.com/slagyr/speclj/d6e9f7e954700165e0c657666e29d0981118c2ca/spec/speclj/core_spec.cljc | clojure |
FOCUS SPECS (remain commented except when 'fiddling') ;;
| (ns speclj.core-spec
(#?(:clj :require :cljs :require-macros)
[speclj.core :refer [describe it context tags focus-describe focus-context focus-it
should should-be-same should-not-be-same should=
before after before-all after-all
with with! wit... |
1bb28fc8e0a43e7d91da23cb027bc24afcde82abe4fab43d8729e122a36a7f57 | jdreaver/eventful | Memory.hs | # LANGUAGE FlexibleContexts #
module Eventful.Store.Memory
( tvarEventStoreReader
, tvarEventStoreWriter
, tvarGlobalEventStoreReader
, stateEventStoreReader
, stateEventStoreWriter
, stateGlobalEventStoreReader
, embeddedStateEventStoreReader
, embeddedStateEventStoreWriter
, embeddedStateGlobalEven... | null | https://raw.githubusercontent.com/jdreaver/eventful/3f0c604e5bb2dcf5bacf0a2e01edf6a5e9c5e22e/eventful-memory/src/Eventful/Store/Memory.hs | haskell | | Internal data structure used for the in-memory event stores.
| Analog of 'tvarEventStoreReader' for a 'GlobalEventStoreReader'
| Specialized version of 'embeddedStateEventStoreReader' that only contains an
'EventMap' in the state.
| Specialized version of 'embeddedStateEventStoreWriter' that only contains an
'E... | # LANGUAGE FlexibleContexts #
module Eventful.Store.Memory
( tvarEventStoreReader
, tvarEventStoreWriter
, tvarGlobalEventStoreReader
, stateEventStoreReader
, stateEventStoreWriter
, stateGlobalEventStoreReader
, embeddedStateEventStoreReader
, embeddedStateEventStoreWriter
, embeddedStateGlobalEven... |
72d3df5ad954308431ef0797c64f40f372ea136f15402f462ee4abe158d5104d | maximedenes/native-coq | mod_checking.ml |
open Pp
open Errors
open Util
open Names
open Term
open Inductive
open Reduction
open Typeops
open Indtypes
open Modops
open Subtyping
open Declarations
open Environ
(************************************************************************)
(* Checking constants *)
let refresh_arity ar =
let ctxt, hd = decompose_p... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/checker/mod_checking.ml | ocaml | **********************************************************************
Checking constants
let env = add_constraints cb.const_constraints env in
**********************************************************************
Checking modules
If the type of a constant is generated, it may mention
non-variable algebr... |
open Pp
open Errors
open Util
open Names
open Term
open Inductive
open Reduction
open Typeops
open Indtypes
open Modops
open Subtyping
open Declarations
open Environ
let refresh_arity ar =
let ctxt, hd = decompose_prod_assum ar in
match hd with
Sort (Type u) when not (Univ.is_univ_variable u) ->
le... |
813a7aa0fd867726cf1448659b3a6a19913567960395646bd25d2f5a7c36b113 | aprell/compiler-potpourri | dom.mli | open Cfg
val dominators : Cfg.t -> unit
val immediate_dominators : Cfg.t -> unit
module Domtree : sig
type t
val create : Cfg.t -> t
val output_dot : ?filename:string -> t -> unit
end
val dominance_frontiers : Cfg.t -> Domtree.t -> NodeSet.t array
| null | https://raw.githubusercontent.com/aprell/compiler-potpourri/a668b71f392abf1810a1f33f362a1d96bc5eebce/control_flow/analysis/dom.mli | ocaml | open Cfg
val dominators : Cfg.t -> unit
val immediate_dominators : Cfg.t -> unit
module Domtree : sig
type t
val create : Cfg.t -> t
val output_dot : ?filename:string -> t -> unit
end
val dominance_frontiers : Cfg.t -> Domtree.t -> NodeSet.t array
| |
12b0cd4c94663fb746525ef9b66f5ada844f7489ee7dcf9b08c2e36717255987 | essiene/smpp34 | smpp34_tx.erl | -module(smpp34_tx).
-include_lib("smpp34pdu/include/smpp34pdu.hrl").
-include("../util.hrl").
-behaviour(gen_server).
-export([start_link/3, stop/1]).
-export([send/3, send/4, ping/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
... | null | https://raw.githubusercontent.com/essiene/smpp34/9206b1d270dc77d65a64a539cbca41b8b003956a/src/mod/smpp34_tx.erl | erlang | -module(smpp34_tx).
-include_lib("smpp34pdu/include/smpp34pdu.hrl").
-include("../util.hrl").
-behaviour(gen_server).
-export([start_link/3, stop/1]).
-export([send/3, send/4, ping/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
... | |
1d29b13ed793edbb44f7da8eb8a12106980f380ac8e4baff7ec09609af8d2718 | aryx/lfs | bibtex.ml | module OptParam = struct let none = [] end
module IntervParam = struct let verbose = true end
module NamesInt = struct let names = ["year";"length";"volume";"number";"size";"w";"h";"x";"y";"z"] end
module AttrIntervInt = Pair.Make (Attr.Make(NamesInt)) (Opt.Make OptParam (Interv.Make(IntervParam)(Int.Make)))
module N... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/examples/bibtex.ml | ocaml | * Small program prompting the user to enter formulas, and answering whether this is syntactically correct. | module OptParam = struct let none = [] end
module IntervParam = struct let verbose = true end
module NamesInt = struct let names = ["year";"length";"volume";"number";"size";"w";"h";"x";"y";"z"] end
module AttrIntervInt = Pair.Make (Attr.Make(NamesInt)) (Opt.Make OptParam (Interv.Make(IntervParam)(Int.Make)))
module N... |
c9cc276014e27d76bdfa6d3bcba3751303c9a04fe545eef7dd352727e668acf3 | basho/riak_test | sweeper_bench.erl | -module(sweeper_bench).
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
%% @doc The large scale test is to test:
%%
%% Properties
%%
%% large scale
%% real time balance working
%% fullsync not halted by nodes up/down/add/remove
%% realtime not halted by nodes up/down/add/remove
Sweeper... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/sweeper_bench.erl | erlang | @doc The large scale test is to test:
Properties
large scale
real time balance working
fullsync not halted by nodes up/down/add/remove
realtime not halted by nodes up/down/add/remove
Speed up sweeping
enable_sweep_scheduling(Nodes) ->
lager:info("enable sweep scheduling"), | -module(sweeper_bench).
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
Sweeper AAE tree rebuild and Sweeper reaper
-behavior(riak_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-export([confirm/0]).
-define(DEFAULT_BENCH_DURATION, 15).
-define(HARNESS, (rt_co... |
6ce0d523c034dc64b029ea1419ef9f27b2bef0b2baa7df6aff1c43a62532da33 | Naproche-SAD/Naproche-SAD | Base.hs |
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 )
FoTheL state and state management , parsing of primitives , operations on
variables and macro expressions .
Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018)
FoTheL state and state management, parsing of primitives, operations on
variables an... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/ForTheL/Base.hs | haskell | Predicates: verbs and adjectives
Multi-subject predicates: [a,b are] equal
Notions and functions
Symbolic primitives
I added the deriving Show
adding error reporting to pattern parsing
at variable places
parses a symbolic pattern
we can parse "a commutes with c and d" as well as "a and b commute".
parses a no... |
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 )
FoTheL state and state management , parsing of primitives , operations on
variables and macro expressions .
Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018)
FoTheL state and state management, parsing of primitives, operations on
variables an... |
ea18dbb718f994721109fcae30ae912673c43c6406bcd44892844bfb843849e0 | yrashk/cutkey | cutkey_app.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2011 . All Rights Reserved .
%%
This file is provided to you 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 ... | null | https://raw.githubusercontent.com/yrashk/cutkey/9271e141b9777640aa0131172aa3234b3f48ed75/src/cutkey_app.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2011 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@private
-module(cutkey_app)... |
06cbec592d8530a6ac97832b8c81f03a275bdb6b4097a733c188f1c67e066b40 | wireapp/wire-server | Main.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/gundeck/test/bench/Main.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
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 PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Main
( main,
)
where... |
37fb8b46ab61c2fb782f3402be5b9474151dbda0731002c278d38ff532f47131 | patricoferris/ocaml-multicore-monorepo | pclock.mli |
* Copyright ( c ) 2015
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-clock/freestanding/pclock.mli | ocaml | * POSIX clock for MirageOS using paravirtual interfaces
Clock counting time since the Unix epoch. Subject to adjustment by
e.g. NTP. |
* Copyright ( c ) 2015
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR... |
d01740970842a0a60f93c58d77b95997830aeeb10444df32690af5726d085268 | 15Galan/asignatura-204 | DemoFordFulkerson.hs | -------------------------------------------------------------------------------
Ford - Fulkerson Algorithm . Maximal flow for a weighted directed graph .
--
Data Structures . en Informática . UMA .
-------------------------------------------------------------------------------
module FordFulkerson where
import D... | null | https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Ex%C3%A1menes/2020/Febrero/Haskell/DemoFordFulkerson.hs | haskell | -----------------------------------------------------------------------------
----------------------------------------------------------------------------- | Ford - Fulkerson Algorithm . Maximal flow for a weighted directed graph .
Data Structures . en Informática . UMA .
module FordFulkerson where
import DataStructures.Graph.FordFulkerson
import DataStructures.Graph.WeightedDiGraph
import DataStructures.Graph.WeightedDiGraphBFT
Some examples and expected results ... |
fa8fc82173ae15c9d587c8af6a978864d3c586be196f40a7cf997f50ece5944a | KirinDave/fuzed | stack.erl | -module(stack).
-export([start/0]).
start() ->
fuzed:start(),
fuzed_node:start(). | null | https://raw.githubusercontent.com/KirinDave/fuzed/56098d9e4c139613845289bdd5acebdfe608981a/elibs/stack.erl | erlang | -module(stack).
-export([start/0]).
start() ->
fuzed:start(),
fuzed_node:start(). | |
0911b539c351e436e1f04e1ec29c7ae327fe23baeed1627a1ce374dcd30b26c7 | MyDataFlow/ttalk-server | gen_mod.erl | %%%----------------------------------------------------------------------
%%% File : gen_mod.erl
Author : < >
%%% Purpose :
Created : 24 Jan 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under t... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/gen_mod.erl | erlang | ----------------------------------------------------------------------
File : gen_mod.erl
Purpose :
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without... | Author : < >
Created : 24 Jan 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
d9fcd91f3ab53ec78a7f5f6d39f4c8a8de71c376cba7e3b2bfcade5cc9e649c5 | sanette/bogue | b_window.ml | (* a 'window' is in fine just a layout *)
Do not mistake it with a hardware ( SDL ) window
open Tsdl
open B_utils
module Layout = B_layout
module Draw = B_draw
module Chain = B_chain
type t =
{ layout : Layout.t;
mutable is_fresh : bool;
mutable bogue : bool;
if bogue = false this means that bogue did n'... | null | https://raw.githubusercontent.com/sanette/bogue/d023d873bb5e1258b3187f3473506a88434565e5/lib/b_window.ml | ocaml | a 'window' is in fine just a layout
None means destroy window
physical size | Do not mistake it with a hardware ( SDL ) window
open Tsdl
open B_utils
module Layout = B_layout
module Draw = B_draw
module Chain = B_chain
type t =
{ layout : Layout.t;
mutable is_fresh : bool;
mutable bogue : bool;
if bogue = false this means that bogue did n't create the corresponding
SDL wi... |
48c0c32383e8e03d182fa568d0b364f09c5c1e8b5f488ea328273f14f0733b02 | wdebeaum/step | whack.lisp | ;;;;
;;;; W::whack
;;;;
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::whack
(wordfeats (W::morph (:forms (-vb) :nom W::whack)))
(SENSES
((LF-PARENT ONT::hitting)
(example "the man whacked the ball")
(SEM (F::Aspect F::bounded) (F::Time-span F::atomic))
(TEMPL AGENT-AFFEC... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/whack.lisp | lisp |
W::whack
|
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::whack
(wordfeats (W::morph (:forms (-vb) :nom W::whack)))
(SENSES
((LF-PARENT ONT::hitting)
(example "the man whacked the ball")
(SEM (F::Aspect F::bounded) (F::Time-span F::atomic))
(TEMPL AGENT-AFFECTED-XP-NP-TEMPL)
(m... |
bcca1273dfab6ea7b758483a756e2e70ae86a65bd752a44cae2755114f221975 | hiposfer/hive | directions.cljs | (ns hive.screens.home.directions
(:require [hive.screens.symbols :as symbols]
[react-native :as React]
[expo :as Expo]
[reagent.core :as r]
[hive.utils.geometry :as geometry]
[goog.date.duration :as duration]
[clojure.string :as str]
... | null | https://raw.githubusercontent.com/hiposfer/hive/f17a5a1d0e17f719487d5b7375aefd8dc07f64e1/src/hive/screens/home/directions.cljs | clojure | default
drop last arrow icon
check if there are any previous directions that we can go back to
goal - cannot change during this component lifetime | (ns hive.screens.home.directions
(:require [hive.screens.symbols :as symbols]
[react-native :as React]
[expo :as Expo]
[reagent.core :as r]
[hive.utils.geometry :as geometry]
[goog.date.duration :as duration]
[clojure.string :as str]
... |
8fc0f5dbd9aae3d4e73076415bdd8d104487b0ba8c52372344c0b2ee01272137 | s-expressionists/Cleavir | default-info-methods.lisp | (cl:in-package #:cleavir-environment)
;;;; This file contains methods on the generic functions defined in
the file that are specialized to the classed defined
;;;; in the file default-augmentation-classes.lisp.
;;;;
;;;; The implementation here is a bit twisted in that we pretty much
;;;; call a generic function fo... | null | https://raw.githubusercontent.com/s-expressionists/Cleavir/bc364b1f9f4d83ff052d2f7af469113cf63d39d9/Environment/default-info-methods.lisp | lisp | This file contains methods on the generic functions defined in
in the file default-augmentation-classes.lisp.
The implementation here is a bit twisted in that we pretty much
call a generic function for each elementary step. The reason for
this way of doing it is so as to allow for an implementation to
specializ... | (cl:in-package #:cleavir-environment)
the file that are specialized to the classed defined
(defgeneric make-info (system environment defining-info))
We proceed by first finding the DEFINING INFO for the variable .
when we found the first relevant modifying entry , or it continues
(defgeneric defining-variabl... |
8b6b4b473b7979ee72dc5f25c6b395eb52476fd3b0b3bf882a2df7b101d4af81 | ptaoussanis/tukey | tukey_tests.cljc | (ns taoensso.tukey-tests
(:require
[clojure.test :as test :refer [deftest testing is]]
[taoensso.encore :as enc]
[taoensso.tukey :as tukey]
[taoensso.tukey.impl :as impl]
[taoensso.tukey.sstats :as sstats]))
(comment
(remove-ns 'taoensso.tukey-tests)
(test/run-tests 'taoensso.tukey-tes... | null | https://raw.githubusercontent.com/ptaoussanis/tukey/7ef64a2564ae6c72a5d658ddef2ebe7da1f15752/test/taoensso/tukey_tests.cljc | clojure | (ns taoensso.tukey-tests
(:require
[clojure.test :as test :refer [deftest testing is]]
[taoensso.encore :as enc]
[taoensso.tukey :as tukey]
[taoensso.tukey.impl :as impl]
[taoensso.tukey.sstats :as sstats]))
(comment
(remove-ns 'taoensso.tukey-tests)
(test/run-tests 'taoensso.tukey-tes... | |
3a0df412ae15c70ddcabfc7e64198a5614f2eddbaf502c4cde3557e494d760b0 | REMath/mit_16.399 | aexp.ml | (* aexp.ml *)
open Abstract_Syntax
open Values
open Env
(* evaluation of arithmetic operations *)
let rec eval_aexp e r = match e with
| Abstract_Syntax.NAT i -> machine_int_of_string i
| VAR v -> get r v
| RANDOM -> machine_unary_random ()
| UPLUS a -> machine_unary_plus (eval_aexp a r)
| UMINUS a... | null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Standard-Interpreter/aexp.ml | ocaml | aexp.ml
evaluation of arithmetic operations | open Abstract_Syntax
open Values
open Env
let rec eval_aexp e r = match e with
| Abstract_Syntax.NAT i -> machine_int_of_string i
| VAR v -> get r v
| RANDOM -> machine_unary_random ()
| UPLUS a -> machine_unary_plus (eval_aexp a r)
| UMINUS a -> machine_unary_minus (eval_aexp a r)
| PLUS (a, b... |
a8a73399fdef9b18e2cea1d96a22d6177f92caeaa34a6dbcf6958fd589f7637b | k-bx/protocol-buffers | Films.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.ProtocolBuffers.Test.Tests.Films
( playlistQuickChecks
) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck as QC
import qualified Data.Aeson as J
import qualified Data.Sequence as Seq
import Data.Sequence (Seq)
import qualified Data.ByteStrin... | null | https://raw.githubusercontent.com/k-bx/protocol-buffers/a1d0fdf6b9df7ed066f623de618a4470f4493d33/protobuf-test-suite/test/src/Text/ProtocolBuffers/Test/Tests/Films.hs | haskell | # LANGUAGE OverloadedStrings # | module Text.ProtocolBuffers.Test.Tests.Films
( playlistQuickChecks
) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck as QC
import qualified Data.Aeson as J
import qualified Data.Sequence as Seq
import Data.Sequence (Seq)
import qualified Data.ByteString.Lazy.Char8 as LB
import Control.A... |
8ea918ab8443e5c3098fc48b26589eea3f5ce984d365ff24f5f21af8d3150088 | kmi/irs | old.lisp | Mode : Lisp ; Package :
Author :
The Open University
(in-package "OCML")
(in-ontology wsmo)
(def-class wsmo-entity ()
((has-non-functional-properties :type core-non-functional-properties)))
(def-class wsmo-web-service-entity (wsmo-entity)
((has-non-functional-properties :type web-service-non-function... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/wsmo/old.lisp | lisp | Package :
relation clashes with existing ocml relation so changed to has-relation |
Author :
The Open University
(in-package "OCML")
(in-ontology wsmo)
(def-class wsmo-entity ()
((has-non-functional-properties :type core-non-functional-properties)))
(def-class wsmo-web-service-entity (wsmo-entity)
((has-non-functional-properties :type web-service-non-functional-properties)))
(def-cla... |
f2804eacb0b2b220d3d03f2b96013e32aacbe3d097bcffcc40283a69013ac15a | CarlWright/NGerlguten | eg_font_4.erl | -module(eg_font_4).
-export([width/1, kern/2, fontName/0, firstChar/0,lastChar/0]).
-export([index/0,ascender/0,capHeight/0,descender/0,italicAngle/0]).
-export([xHeight/0, flags/0, type/0, stemV/0,fontBBox/0,widths/0]).
-export([encoding/0]).
fontName() -> "Courier-Oblique".
index() -> 4.
type() -> internal.
encoding(... | null | https://raw.githubusercontent.com/CarlWright/NGerlguten/3c87f2e3a44ae9069f9379933b99c0feb8262d66/lib/ngerlguten/src/eg_font_4.erl | erlang | -module(eg_font_4).
-export([width/1, kern/2, fontName/0, firstChar/0,lastChar/0]).
-export([index/0,ascender/0,capHeight/0,descender/0,italicAngle/0]).
-export([xHeight/0, flags/0, type/0, stemV/0,fontBBox/0,widths/0]).
-export([encoding/0]).
fontName() -> "Courier-Oblique".
index() -> 4.
type() -> internal.
encoding(... | |
96c9ce773431bb139c40fdff9aa0d6f37240159c0f58e581c14d3fd815404eb8 | cl-axon/cl-aima | test-agents.lisp | ;;; File: agents/test.lisp -*- Mode: Lisp; -*-
(deftest agents
"Test agents in the vacuum and wumpus worlds."
"Here is how to run an environment, in this case the vacuum world."
"We specify the maximum number of steps, but that is optional:"
((run-environment (make-vacuum-world :max-steps 10)))
"You can turn... | null | https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/agents/test-agents.lisp | lisp | File: agents/test.lisp -*- Mode: Lisp; -*- |
(deftest agents
"Test agents in the vacuum and wumpus worlds."
"Here is how to run an environment, in this case the vacuum world."
"We specify the maximum number of steps, but that is optional:"
((run-environment (make-vacuum-world :max-steps 10)))
"You can turn off the display (with :stream nil), and just s... |
aee223eddac13abe7a16e0876276c4cbeb87ea9aa4986b534d7066af185950d4 | Failproofshark/cl-sdl2-ttf | style.lisp | (in-package :sdl2-ttf)
(defconstant +style-bold+ #x1)
(defconstant +style-italic+ #x2)
(defconstant +style-underline+ #x4)
(defconstant +style-strike-through+ #x8)
(defmacro define-function-get-style (foreign-name wrapper-name low-level-name)
`(define-function ,foreign-name ,wrapper-name ,low-level-name
:int... | null | https://raw.githubusercontent.com/Failproofshark/cl-sdl2-ttf/ff2821a2787cb527ca643a0dbca6ab2171ce141d/src/style.lisp | lisp | (in-package :sdl2-ttf)
(defconstant +style-bold+ #x1)
(defconstant +style-italic+ #x2)
(defconstant +style-underline+ #x4)
(defconstant +style-strike-through+ #x8)
(defmacro define-function-get-style (foreign-name wrapper-name low-level-name)
`(define-function ,foreign-name ,wrapper-name ,low-level-name
:int... | |
975efe92210c0b366f99086777e7aa94c9096cfb9a47b06f3c704a8dd3de98a7 | janestreet/merlin-jst | includemod_errorprinter.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/9c3b60c98d80b56af18ea95c27a0902f0244659a/upstream/ocaml_414/typing/includemod_errorprinter.ml | ocaml | ************************************************************************
OCaml
... | , projet Cambium , Inria Paris
Copyright 2021 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Context = struct
type pos =
| Module of Ident.t
| Modtype of Ident.t
| Arg of Types.func... |
083043153e32a5703115ea975ede2d32dab9ccf0c6c5f0c2a12382961f6cf79a | haskell-tools/haskell-tools | Fields.hs | module Refactor.OrganizeImports.Fields where
import Control.Monad.Trans (MonadTrans(..))
import Control.Monad.State (Monad(..), StateT(runStateT))
x = runStateT (lift putStrLn >> return ()) ()
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/OrganizeImports/Fields.hs | haskell | module Refactor.OrganizeImports.Fields where
import Control.Monad.Trans (MonadTrans(..))
import Control.Monad.State (Monad(..), StateT(runStateT))
x = runStateT (lift putStrLn >> return ()) ()
| |
f51b0544ebd1d0acdaa751298295c00eafcce0dd3b67febf9b9a9bf562990210 | lspitzner/brittany | Test483.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
import Test
( abc
-- comment
)
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test483.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
comment | import Test
( abc
)
|
18271e5b102a99224ac14ddfe96578ff697fc02c7dd6812cfa2dc92e691d92ef | deepflowinc/guardian | GraphSpec.hs | # LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wno - type - defaults #
module Development.Guardian.GraphSpec where
import qualified Algebra.Graph as G
import qualified Algebra.Graph.ToGraph as AM
import qualified Data.HashMap.Strict as HM
import Data.List.NonEmpty (NonEmpty ((:|)))
imp... | null | https://raw.githubusercontent.com/deepflowinc/guardian/9409189a1149c63ea49055816efefeb873904883/test/Development/Guardian/GraphSpec.hs | haskell | # LANGUAGE OverloadedStrings #
B1
> B2
>B3
- > C1 < ----+
+ +--B1
> B2
>B3
-> C1 <----+
|
@ A B
+-------+ +-------+
| A1 |<-+----B1 |
| A2-+--+->B2 |
| A3 | | B3 |
+---+---+ +---+---+
| |
v C v
+---+----------+----+
| C1 ... | # LANGUAGE OverloadedLists #
# OPTIONS_GHC -Wno - type - defaults #
module Development.Guardian.GraphSpec where
import qualified Algebra.Graph as G
import qualified Algebra.Graph.ToGraph as AM
import qualified Data.HashMap.Strict as HM
import Data.List.NonEmpty (NonEmpty ((:|)))
import qualified Data.List.NonEmpty as... |
1a23ac283e446d48201d3d749de1dd759bd4f1760cb4f6673cdef1f7e915971c | wfnuser/sicp-solutions | e4-35.scm | (define (an-integer-between start end)
(require (<= start end))
(amb start (an-integer-between (+ start 1) end))
) | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch4/e4-35.scm | scheme | (define (an-integer-between start end)
(require (<= start end))
(amb start (an-integer-between (+ start 1) end))
) | |
4ad72032ff554ba30047a8cfd6839deb19fcc021f23911b1a021eda5930e37d0 | racket/compatibility | info.rkt | #lang info
(define collection 'multi)
(define deps '("base"
"scribble-lib"
"compatibility-lib"
"pconvert-lib"
"sandbox-lib"
"compiler-lib"
"gui-lib"
"racket-doc"))
(define pkg-desc "documentation part of \"compatibility\"... | null | https://raw.githubusercontent.com/racket/compatibility/5b2509e30e3b93ca9d6c9d6d8286af93c662d9a8/compatibility-doc/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("base"
"scribble-lib"
"compatibility-lib"
"pconvert-lib"
"sandbox-lib"
"compiler-lib"
"gui-lib"
"racket-doc"))
(define pkg-desc "documentation part of \"compatibility\"... | |
40a4d0056004dfc92f93df18eb552f760922fe9e099afdacd3cd84687c4ee5a2 | luqui/manifesto | ApproximationParser.hs | {-# OPTIONS -Wall #-}
# LANGUAGE DeriveFunctor #
module ApproximationParser where
import Control.Applicative (Alternative(..), liftA2)
import Data.Foldable (traverse_)
import Data.Monoid (First(..))
data Approx a
= Empty
| Definite a
| Indefinite
deriving (Functor)
instance Show a => Show (Approx a)... | null | https://raw.githubusercontent.com/luqui/manifesto/09a70581376295c14d24f8cd0771941d7a613361/ApproximationParser.hs | haskell | # OPTIONS -Wall #
Indefinite <*> Empty = Empty -- Though technically correct, this is not lazy enough
for our purposes.
erase: non-strict erasue -- approximation always succeeds
(use to erase infinite grammars to make them finitely approximable)
erase': strict erasure -- approximations allowed to fail
(use to ... | # LANGUAGE DeriveFunctor #
module ApproximationParser where
import Control.Applicative (Alternative(..), liftA2)
import Data.Foldable (traverse_)
import Data.Monoid (First(..))
data Approx a
= Empty
| Definite a
| Indefinite
deriving (Functor)
instance Show a => Show (Approx a) where
show Empty ... |
432b2f0e0d39cacc9e54eebfb02219b0b743b37b153349587a84625835f078f0 | josefs/Gradualizer | record_wildcard_pass.erl | -module(record_wildcard_pass).
-export([f/0, g/0, h/1]).
-record(rec, {apa = 1 :: integer()
,bepa = false :: boolean()
,cepa = undefined :: atom()
}).
f() ->
#rec{ apa = 1
, _ = true }.
-spec g() -> #rec{}.
g() ->
#rec{ apa = 1
, _ = tr... | null | https://raw.githubusercontent.com/josefs/Gradualizer/00d907accacfc29a3241dc42c1cd6d00f7e3ca37/test/should_pass/record_wildcard_pass.erl | erlang | wildcard in pattern matching | -module(record_wildcard_pass).
-export([f/0, g/0, h/1]).
-record(rec, {apa = 1 :: integer()
,bepa = false :: boolean()
,cepa = undefined :: atom()
}).
f() ->
#rec{ apa = 1
, _ = true }.
-spec g() -> #rec{}.
g() ->
#rec{ apa = 1
, _ = tr... |
e1a7408bc23f8834ea58a28b413e652637dd42a30a2fb01f1bace86be7bc1711 | ndmitchell/uniplate | Fusion.hs |
module Uniplate.Fusion(fusion) where
import Control.Exception
import Data.Char
import Data.Generics.Uniplate.Data
import Data.List
import Language.Haskell.Exts
import Uniplate.Timer
fusion :: IO ()
fusion = do
putStrLn "Testing transformBi fusion"
let file = "Data/Generics/Uniplate/Internal/Data.hs"
-- ... | null | https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Uniplate/Fusion.hs | haskell | let file = "Data.hs"
putStr "Prime the cache... "
t <- timer $ force (testOld res) >> force (testNew res) |
module Uniplate.Fusion(fusion) where
import Control.Exception
import Data.Char
import Data.Generics.Uniplate.Data
import Data.List
import Language.Haskell.Exts
import Uniplate.Timer
fusion :: IO ()
fusion = do
putStrLn "Testing transformBi fusion"
let file = "Data/Generics/Uniplate/Internal/Data.hs"
pu... |
142c99d418166b5d850e96f2903bcda3fd29f22e10777eecf16920bacddd3781 | brownplt/LambdaS5 | minsep.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/ocamlgraph-1.8.1/src/minsep.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
i $ I d :... |
22a98e16abc303438ea5f5467110235a62df02d78ad24fd1f6bab82fda6e18a9 | krajj7/BotHack | game.clj | (ns bothack.game
"representation of the game world"
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[bothack.player :refer :all]
[bothack.dungeon :refer :all]
[bothack.level :refer :all]
[bothack.fov :refer :all]
[bothack.... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/game.clj | clojure | (blank? tile) - not yet updated
temple will only be marked around the altar (boundary is harder to detect than for shops, should be sufficient anyway)
could be death drop
(swap! game add-prop-discovery (appearance-of item) :food true))
kicked out of quest
no message on fix :-(
might as well #quit
current
curre... | (ns bothack.game
"representation of the game world"
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[bothack.player :refer :all]
[bothack.dungeon :refer :all]
[bothack.level :refer :all]
[bothack.fov :refer :all]
[bothack.... |
fa1a75763356d301ee07a365178785d946783ad766cf91598b21e036e09ee6d6 | aaltodsg/instans | lexer.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
;;;
Author : ( )
;;;
(in-package #:instans)
(defun return-input-token (lexer type value)
(throw 'input-token (make-input-token :type type :value value :position (lexer-current-position lexer))))
(defun lexer-error (lexer fmt &rest ... | null | https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/parser/lexer.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
(inform "Got comment ~A" (lexer-previous-comment lexer))
Eating different kind of input-tokens
We saw _, must see : and PN_CHARS_U
(inform "Dropping trailin .")
prefix and ':' seen
Assuming we have eaten \ and seed u or U
Saw @
we saw '... | Author : ( )
(in-package #:instans)
(defun return-input-token (lexer type value)
(throw 'input-token (make-input-token :type type :value value :position (lexer-current-position lexer))))
(defun lexer-error (lexer fmt &rest args)
(declare (ignorable lexer))
(let ((msg (apply #'format nil fmt args)))
(r... |
fa1a91960244c21d389fa42cb62f4ba2cb7d7f58c203af47beac940942400f1e | aria42/infer | features_test.clj | (ns infer.features-test
(:use clojure.test)
(:use infer.matrix)
(:use infer.core)
(:use infer.features))
(deftest form-eqiv-classes
(is (= {1 0, 2 0, 3 0, 4 1, 5 1, 6 1}
(equivalence-classes {0 #{1 2 3}, 1 #{4 5 6}}))))
(deftest merge-into-equivalence-classes-test
(let [classes (equivalence-classes... | null | https://raw.githubusercontent.com/aria42/infer/9849325a27770794b91415592a8706fd90777469/test/infer/features_test.clj | clojure | (ns infer.features-test
(:use clojure.test)
(:use infer.matrix)
(:use infer.core)
(:use infer.features))
(deftest form-eqiv-classes
(is (= {1 0, 2 0, 3 0, 4 1, 5 1, 6 1}
(equivalence-classes {0 #{1 2 3}, 1 #{4 5 6}}))))
(deftest merge-into-equivalence-classes-test
(let [classes (equivalence-classes... | |
fb4a531b445350ea51b5ebfe644b6764f21fa43d6ad06adb96c4a9f97ca6d4d4 | PearsonEducation/subpub | sha2.erl | @author < > [ / ]
@doc Implementations of SHA-224 , SHA-256 , SHA-384 , SHA-512 in Erlang .
%%% @reference See <a href="-2/fips180-2withchangenotice.pdf">
the Secure Hash > and the < a href=" / wiki / SHA1">Wikipedia
article</a > . Find the code < a href=" / code / > .
@since 03 ... | null | https://raw.githubusercontent.com/PearsonEducation/subpub/f2275c5da24d8860d206cff81d1ce87ecd956c72/src/sha2.erl | erlang | @reference See <a href="-2/fips180-2withchangenotice.pdf">
@version 1.1
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
noti... | @author < > [ / ]
@doc Implementations of SHA-224 , SHA-256 , SHA-384 , SHA-512 in Erlang .
the Secure Hash > and the < a href=" / wiki / SHA1">Wikipedia
article</a > . Find the code < a href=" / code / > .
@since 03 Jan 2009
2009 , All rights reserved . Open source , BSD L... |
58133aecf39b9bee3d4ddfe4ab2cf577557be8293f75a5642c018a24699a31fd | cedlemo/OCaml-GI-ctypes-bindings-generator | Dialog_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Dialog_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Dialog_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Dialog_private"
| |
612f36732d71bb255946b0a75677db23eb8695318d8e7846c4b0424f3f8108e4 | W-Net-AI/LISP-CV | calib3d.lisp | ;;;; -*- mode: lisp; indent-tabs: nil -*-
;;;; calib3d.lisp
;;;; OpenCV bindings
;;;; Camera Calibration and 3D Reconstruction
(in-package :lisp-cv)
;;;; Camera Calibration and 3D Reconstruction
Mat findHomography(InputArray srcPoints , InputArray dstPoints , int method=0 , double ransacReprojThreshold=3 ,
;;... | null | https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/calib3d.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
calib3d.lisp
OpenCV bindings
Camera Calibration and 3D Reconstruction
Camera Calibration and 3D Reconstruction
OutputArray mask=noArray() ) |
(in-package :lisp-cv)
Mat findHomography(InputArray srcPoints , InputArray dstPoints , int method=0 , double ransacReprojThreshold=3 ,
Mat * cv_findHomography(Mat * srcPoints , Mat * dstPoints , int method , double ransacReprojThreshold , Mat * mask )
(defcfun ("cv_findHomography" %find-homography) mat
(s... |
280e7e9af7a05365882d8382f38edb81c09d9b43e2d867d2c63da035233bb7fd | ml4tp/tcoq | dumpglob.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/interp/dumpglob.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Dump of globalization (to be used b... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
let glob_file = r... |
a594377a26ca1996f9788a52363296480c2b7724fea84a337bf197b787205fb9 | edalorzo/learning-clojure | quoting_tokens.clj | (ns learn.macros.basics.quoting-tokens)
(comment
(class (quote 1)) ; Long
(class (quote 0xFF)) ; Long
(class (quote 017)) ; Long
(class (quote 2r1011)) ; Long
(class (quote 2.78)) ; Double
BigDecimal
(class (quote 7N)) ; BigInt
(class (quote 1/2)) ; Ratio
(class (quote "hel... | null | https://raw.githubusercontent.com/edalorzo/learning-clojure/b5db63d8e783767a85af19ccb8dbf4d4e0f53d62/src/learn/macros/basics/quoting_tokens.clj | clojure | Long
Long
Long
Long
Double
BigInt
Ratio
String
Symbol
Symbol | (ns learn.macros.basics.quoting-tokens)
(comment
BigDecimal
Keyworkd
)
|
68fde9fbf58ad683bc18f465a69857d96263c1070a9ba9badebd16411345949f | leo-project/leofs | leo_nfs_proto3_svc.erl | %%
%% src/leo_nfs_proto3_svc was generated by erpcgen (do not edit)
%%
-module(leo_nfs_proto3_svc).
-include("leo_nfs_proto3.hrl").
-export([nfs3_program_3/5]).
-export([init/1, handle_call/3, handle_cast/2,
handle_info/2, terminate/2]).
init(Args) ->
leo_nfs_proto3_server:init(Args).
handle_call(Req, F... | null | https://raw.githubusercontent.com/leo-project/leofs/4ff701e0f4a4cf39a968dbe078b9c2412a22f995/apps/leo_gateway/src/leo_nfs_proto3_svc.erl | erlang |
src/leo_nfs_proto3_svc was generated by erpcgen (do not edit)
| -module(leo_nfs_proto3_svc).
-include("leo_nfs_proto3.hrl").
-export([nfs3_program_3/5]).
-export([init/1, handle_call/3, handle_cast/2,
handle_info/2, terminate/2]).
init(Args) ->
leo_nfs_proto3_server:init(Args).
handle_call(Req, From, S) ->
leo_nfs_proto3_server:handle_call(Req, From, S).
handle... |
1346b838c0ddcb4f246dd4b4242a44cc2cd6beab5863f7ff4edef386a45e7589 | maitria/avi | t_panes.clj | (ns avi.t-panes
(:require [midje.sweet :refer :all]
[avi.layout :as layout]
[avi.layout.panes :as p]))
(defn all-panes
[tree]
(sequence p/all-panes (p/augmented-root-panes tree)))
(facts "about finding panes to render"
(fact "a single root pane fills the screen"
(all-panes {::layou... | null | https://raw.githubusercontent.com/maitria/avi/c641e9e32af4300ea7273a41e86b4f47d0f2c092/test/avi/t_panes.clj | clojure | (ns avi.t-panes
(:require [midje.sweet :refer :all]
[avi.layout :as layout]
[avi.layout.panes :as p]))
(defn all-panes
[tree]
(sequence p/all-panes (p/augmented-root-panes tree)))
(facts "about finding panes to render"
(fact "a single root pane fills the screen"
(all-panes {::layou... | |
b26fd2310a3b10a9a5b0ed0b4a3b62633782a899ea1285e3474878845a6e326e | juxt/skip | file_watcher.clj | (ns skip.file-watcher
(:require
[skip.notify :refer [notify]])
(:import
java.nio.file.StandardWatchEventKinds
java.nio.file.ClosedWatchServiceException
java.nio.file.FileSystems))
(defn register! [watcher file-proxy]
(let [filepath (.toAbsolutePath (.toPath (:file file-proxy)))]
(let [dirpath... | null | https://raw.githubusercontent.com/juxt/skip/114b3105993f8cd062be913e21b81a15af825702/src/skip/file_watcher.clj | clojure | TODO Figure out logging without a dependency
TODO Figure out logging without a dependency
TODO Figure out logging without a dependency | (ns skip.file-watcher
(:require
[skip.notify :refer [notify]])
(:import
java.nio.file.StandardWatchEventKinds
java.nio.file.ClosedWatchServiceException
java.nio.file.FileSystems))
(defn register! [watcher file-proxy]
(let [filepath (.toAbsolutePath (.toPath (:file file-proxy)))]
(let [dirpath... |
60fd59d0146a3f426ce668267ca8f4d22a0d7e9bd74b5ac0ba1264f0d0766fa5 | russell/cl-git | tree.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*-
;; cl-git is a Common Lisp interface to git repositories.
Copyright ( C ) 2011 - 2022 < >
;;
;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
as published by the Free ... | null | https://raw.githubusercontent.com/russell/cl-git/a4ed0aa5f7c3e2d4e3090c67f016a73b7bb4c0d2/tests/tree.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 -*-
cl-git is a Common Lisp interface to git repositories.
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;... |
Copyright ( C ) 2011 - 2022 < >
as published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
(in-package #:cl-git-tests)
(in-suite :cl-git)
(def-test tree-entries (:fixture repo... |
900030624a11a22fcb33d6240dff736d1aba47b6e3621fd8f69d99206e167046 | aantron/dream | mirage.ml | module Catch = Dream__server.Catch
module Error_template = Dream__server.Error_template
module Method = Dream_pure.Method
module Helpers = Dream__server.Helpers
module Log = Dream__server.Log
module Message = Dream_pure.Message
module Status = Dream_pure.Status
module Stream = Dream_pure.Stream
module Random = Dream__c... | null | https://raw.githubusercontent.com/aantron/dream/10a6e3459ffcf10e9174b7c2db1a99b3b452abff/src/mirage/mirage.ml | ocaml | Do the big call.
Extract the Dream response's headers.
TODO LATER There was something in the fork changelogs about not
requiring report_exn. Is it relevant to this?
let random =
Dream__cipher.Random.random
Types
Requests
Responses
Headers
Cookies
Bodies
Routing
Sessions
Flash ... | module Catch = Dream__server.Catch
module Error_template = Dream__server.Error_template
module Method = Dream_pure.Method
module Helpers = Dream__server.Helpers
module Log = Dream__server.Log
module Message = Dream_pure.Message
module Status = Dream_pure.Status
module Stream = Dream_pure.Stream
module Random = Dream__c... |
cf5346da0f7e5dfc8591a96905cd901f0d82784c0667a5d8aaedd770245c0d10 | ghc/packages-dph | Unlifted.hs | # LANGUAGE CPP , NoMonomorphismRestriction #
{-# OPTIONS -fno-warn-missing-signatures #-}
-- | Parallel implementation of the segmented array API defined in @dph-prim-interface@.
--
-- Some of them don't yet have parallel implementations, so we fall back
-- to the sequential ones from @dph-prim-seq@.
--
-- /WARNI... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted.hs | haskell | # OPTIONS -fno-warn-missing-signatures #
| Parallel implementation of the segmented array API defined in @dph-prim-interface@.
Some of them don't yet have parallel implementations, so we fall back
to the sequential ones from @dph-prim-seq@.
/WARNING:/ Although this library is intended to be used as a target... | # LANGUAGE CPP , NoMonomorphismRestriction #
for the DPH vectoriser , it is also fine to use it directly from non
DPH programs . However , this library does not support nested parallelism
This API is used by the @dph - lifted-*@ libraries , and is defined in
and We use header files to ensure
#include ... |
657f482c667a165c899e4f4f9d1aa44bcf4b6d08228704cfb12596f7871e269e | uim/sigscheme | bigloo-bool.scm | ;; A practical implementation for the Scheme programming language
;;
;; ,--^,
;; _ ___/ /|/
;; ,;'(... | null | https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/bigloo-bool.scm | scheme | A practical implementation for the Scheme programming language
,--^,
_ ___/ /|/
,;'( )__, ) ' ... | Copyright ( c ) 1992 - 2004
it under the terms of the GNU General Public License as published by
the terms of the GNU Library General Public License . The source code
of the Bigloo runtime system is located in the ./runtime directory .
The source code of the Fa... |
18719486f94168c3877efac1946101c705f8d0801b721bbdc68841caeab8b470 | ocaml-multicore/ocaml-tsan | printexc.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/printexc.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Printf
type t = exn = ..
let printers = Atomic.make []
let locfmt = format_of_string "File \"%s\"... |
c7874a1aa09f25e43dfdf10f6e55bfc154c794e0fb4f24d2b399ed97af3de580 | GaloisInc/daedalus | PathSymbolicM.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# Language GeneralizedNewtypeDeriving #
module Tal... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/782eb4f08e33aea2515136c92544af456dc37032/talos/src/Talos/Strategy/PathSymbolicM.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveTraversable #
FIXME: use .CPS
=============================================================================
(Path) Symbolic monad
^ Current slice
^ Current recursive depth (basically the sum of all back edge
calls, irrespective of source/targ... | # LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# Language GeneralizedNewtypeDeriving #
module Talos.Strategy.PathSymbolicM where
import Control.Lens
import Control.Monad.IO.C... |
c572705951754c6c3d3c75ece32ecfa553479dc3c670607b5c597407a18726ad | gbwey/predicate-typed | Misc.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFa... | null | https://raw.githubusercontent.com/gbwey/predicate-typed/51f8d51f662722e1109d2ff35644aea1e0371b42/src/Predicate/Misc.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds #
| helper methods
** useful type families
** extract values from the type level
** inductive tuples
** extract from n-tuple
** tuple classes
** primes
** regular expressions
** colors
** styles
** miscellane... | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE Pol... |
b9d194563f348e8b1e1964cd4a62ec7c94ce06f3ca4596156f319a361a72be65 | MLstate/opalang | w_TypeInfo.ml | let flag = true (*for measuring time*)
type obj = W_Algebra.simple_type_desc
type dir_info = QmlAst.qml_directive * Annot.label
type env_info = Ident.t * Annot.label
type exp_info = Annot.label
type info =
| FromEnv of env_info
| Directive of dir_info
| Location of Annot.label
| NoInfo of string
| Link of o... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libqmlcompil/typer_w/w_TypeInfo.ml | ocaml | for measuring time |
type obj = W_Algebra.simple_type_desc
type dir_info = QmlAst.qml_directive * Annot.label
type env_info = Ident.t * Annot.label
type exp_info = Annot.label
type info =
| FromEnv of env_info
| Directive of dir_info
| Location of Annot.label
| NoInfo of string
| Link of obj
| Exception
let cmp_info i1 i2 =
... |
9991f86d7727ce90cf850d32536df15025fd8c048308fb9896a72b5564116001 | gelisam/giggles-is-you | Interact.hs | {-# LANGUAGE RankNTypes #-}
module Graphics.Gloss.Internals.Interface.Interact
(interactWithBackend)
where
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Controller
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Data.ViewState
import Graphics.Gloss.Ren... | null | https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Internals/Interface/Interact.hs | haskell | # LANGUAGE RankNTypes #
^ Initial state of the backend.
^ Display config.
^ Background color.
^ The initial world.
^ A function to produce the current picture.
^ A function to handle input events.
^ Eat the controller
Viewport control with mouse
When we create the window we can pass a function to get a
refere... |
module Graphics.Gloss.Internals.Interface.Interact
(interactWithBackend)
where
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Controller
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Data.ViewState
import Graphics.Gloss.Rendering
import Graphics.Gloss... |
7a48958617aefa66e694557362f34afe51902a9ee55186f73f2a903820436d97 | generateme/cljplot | bayesian_optimisation.clj | (ns bayesian-optimisation
(:require [cljplot.render :as r]
[cljplot.build :as b]
[cljplot.common :refer :all]
[fastmath.core :as m]
[fastmath.random :as rnd]
[cljplot.core :refer :all]
[fastmath.optimization :as opt]
[fastmath.kernel ... | null | https://raw.githubusercontent.com/generateme/cljplot/1eb865439653c95940be18421298c574b7ce8db6/sketches/bayesian_optimisation.clj | clojure | first regression
=> (:x :y :util-fn :gp :xs :ys :util-best)
=>
=> (:x :y :util-fn :gp :xs :ys)
| (ns bayesian-optimisation
(:require [cljplot.render :as r]
[cljplot.build :as b]
[cljplot.common :refer :all]
[fastmath.core :as m]
[fastmath.random :as rnd]
[cljplot.core :refer :all]
[fastmath.optimization :as opt]
[fastmath.kernel ... |
19e54cf5b1ebba4640f53e876124d60a19f6b337c5e9c8af3bdc283cca1f0985 | geoffder/dometyl-keyboard | points.mli | open OCADml
open OSCADml
type t =
{ top_left : V3.t
; top_right : V3.t
; bot_left : V3.t
; bot_right : V3.t
; centre : V3.t
}
[@@deriving cad]
type pos =
[ `BL
| `BR
| `CN
| `TL
| `TR
]
val map : (V3.t -> V3.t) -> t -> t
val fold : ('a -> V3.t -> 'a) -> 'a -> t -> 'a
val to_cw_path : t -> Pat... | null | https://raw.githubusercontent.com/geoffder/dometyl-keyboard/5efa847361e0ceb80de5b03dd28a702d6b42412d/lib/points.mli | ocaml | open OCADml
open OSCADml
type t =
{ top_left : V3.t
; top_right : V3.t
; bot_left : V3.t
; bot_right : V3.t
; centre : V3.t
}
[@@deriving cad]
type pos =
[ `BL
| `BR
| `CN
| `TL
| `TR
]
val map : (V3.t -> V3.t) -> t -> t
val fold : ('a -> V3.t -> 'a) -> 'a -> t -> 'a
val to_cw_path : t -> Pat... | |
5a4c87229bb9595e1bfb81fbcb6184ddce5dbc00cb5fa3063996abf799dace34 | stchang/macrotypes | info.rkt | #lang info
(define scribblings
'(["scribblings/turnstile.scrbl" (multi-page)]))
| null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-doc/turnstile/info.rkt | racket | #lang info
(define scribblings
'(["scribblings/turnstile.scrbl" (multi-page)]))
| |
b2ec0724b9b07233d1c02f6f99a867b4e730401ed8f9b64b956b8074082dd991 | tmattio/js-bindings | events.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
(*
unknown identifiers:
- Disposable
*)
[@@@js.stop]
module type Missing = sig
module Disposable : sig
type t_0
val t_0_to_js: t_0 -> Ojs.t
val t_0_of_js: Ojs.t -> t_0
end
end
[@@@js.st... | null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-jsonrpc/_gen/events.mli | ocaml |
unknown identifiers:
- Disposable
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
[@@@js.stop]
module type Missing = sig
module Disposable : sig
type t_0
val t_0_to_js: t_0 -> Ojs.t
val t_0_of_js: Ojs.t -> t_0
end
end
[@@@js.start]
[@@@js.implem
module type Missing = si... |
3b1fc991595039e5734982983339530c060ef3d247cef9b57f344abed4f5299d | HunterYIboHu/htdp2-solution | ex166B-wage-v4.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex166B-wage-v4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section11-more-on-list/ex166B-wage-v4.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
(make-employee n c) combines the name (n) and the working code of
the employee.
Work is a structure (make-work Employee Number Number)
(make-work n r h c) combines the employee, the pay rate (r) and
- '()
- (cons... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex166B-wage-v4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct employee [name code])
Employee is a... |
01594419ccdb489b741aa7deb53e1b70aab3d03671a0b90eca7b7dc5ad927d4c | huangz1990/SICP-answers | test-36-cdr-n.scm | (load "test-manager/load.scm")
(load "36-cdr-n.scm")
(define-each-check
(equal? (cdr-n (list (list 1 2 3)
(list 4 5 6)
(list 7 8 9)))
(list (list 2 3)
(list 5 6)
(list 8 9)))
)
(run-registered-tests)
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-36-cdr-n.scm | scheme | (load "test-manager/load.scm")
(load "36-cdr-n.scm")
(define-each-check
(equal? (cdr-n (list (list 1 2 3)
(list 4 5 6)
(list 7 8 9)))
(list (list 2 3)
(list 5 6)
(list 8 9)))
)
(run-registered-tests)
| |
316e8bfa14cdf3e18f2b96c19e77288777d11a7e9a8db8a67bfc67465fda7456 | lehins/massiv | Unsafe.hs | # LANGUAGE FlexibleContexts #
-- |
-- Module : Data.Massiv.Vector.Unsafe
Copyright : ( c ) 2020 - 2022
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
module Data.Massiv.Vector.Unsafe (
-- * Vector
-- ** Accessors
-- *** Indexing
unsafeHea... | null | https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv/src/Data/Massiv/Vector/Unsafe.hs | haskell | |
Module : Data.Massiv.Vector.Unsafe
License : BSD3
Stability : experimental
Portability : non-portable
* Vector
** Accessors
*** Indexing
*** Monadic Indexing
*** Slicing
-- ** Modifying
-- *** Bulk updates
, unsafeUpdate_
-- *** Accumulation
, unsafeAccumulate_
-- ** Predicates
** Unbounde... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2020 - 2022
Maintainer : < >
module Data.Massiv.Vector.Unsafe (
unsafeHead,
unsafeLast,
unsafeIndexM,
unsafeHeadM,
unsafeLastM,
unsafeInit,
unsafeTail,
unsafeTake,
unsafeDrop,
, unsafeUpdate
,
, unsafeBackpermute
, unsafeParti... |
20b1ca185f5a22c7b8e9b578df0b7b06144c2adab43d85ae89b3321f06e17e6a | theodormoroianu/SecondYearCourses | LambdaChurch_20210415165520.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165520.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
80f0888f539b39de11448855c7e9ce73eba8a7494d486c0f3e241ab45a74cb3d | zotonic/zotonic | controller_website_redirect.erl | @author < >
2009 < >
Date : 2009 - 11 - 15
%% @doc Redirect to the URL of a resource of type 'website'.
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
%%
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/aa38d5bd01f20696a7c5230b97ea23d2d1678e79/apps/zotonic_mod_base/src/controllers/controller_website_redirect.erl | erlang | @doc Redirect to the URL of a resource of type 'website'.
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.... | @author < >
2009 < >
Date : 2009 - 11 - 15
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(controller_website_redirect).
-author("Arjan Scherpenisse <>").
-export([
resource_exists/1,
previousl... |
f106f0f0ed1fd8ac7aa9f67f007f78205b19e8b116ab0d3f47019951a7ac2383 | vikram/lisplibraries | packages.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
$ Header : /usr / local / cvsrep / url - rewrite / packages.lisp , v 1.8 2006/01/03 18:40:23 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/url-rewrite-0.1.1/packages.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
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... | $ Header : /usr / local / cvsrep / url - rewrite / packages.lisp , v 1.8 2006/01/03 18:40:23 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-pack... |
5fde85dc7b54af71f77b014825c50ce16b7a2048cec61d4f78a7924edfb83124 | ghosthamlet/algorithm-data-structure | trie_test.clj | (ns algorithm-data-structure.data-structures.trie-test
(:require [algorithm-data-structure.data-structures.trie :as t]
[algorithm-data-structure.data-structures.trie-node :as tn]
[clojure.test :refer :all]))
(def trie (t/create))
(deftest create-test
(is (= {:head (tn/create t/head-charact... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/test/algorithm_data_structure/data_structures/trie_test.clj | clojure | (ns algorithm-data-structure.data-structures.trie-test
(:require [algorithm-data-structure.data-structures.trie :as t]
[algorithm-data-structure.data-structures.trie-node :as tn]
[clojure.test :refer :all]))
(def trie (t/create))
(deftest create-test
(is (= {:head (tn/create t/head-charact... | |
10df3cd83261061bc1d83ec86908d41ae2e1f11bf2297463976c95b6d09d1b42 | nikita-volkov/rebase | Internal.hs | module Rebase.Data.ByteString.Internal
(
module Data.ByteString.Internal
)
where
import Data.ByteString.Internal
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/ByteString/Internal.hs | haskell | module Rebase.Data.ByteString.Internal
(
module Data.ByteString.Internal
)
where
import Data.ByteString.Internal
| |
b30e607a6e99f4fa94218b1b5ef35e2476b280e4f82195a880fd954dd3b01387 | rescript-lang/rescript-compiler | res_cli.ml |
This CLI is n't used apart for this repo 's testing purposes . The syntax
itself is used by 's compiler programmatically through various other apis .
This CLI isn't used apart for this repo's testing purposes. The syntax
itself is used by ReScript's compiler programmatically through various other apis.
*... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/4a94992b1d621671838ed7db6ce289b5847813ef/res_syntax/cli/res_cli.ml | ocaml | foreground
background
map a tag to a style, if the tag is known.
@raise Not_found otherwise
either prints the tag of [s] or delegates to [or_else]
add color handling to formatter [ppf]
enable tags
also setup margins
reasonable heuristic on whether colors should be enabled
initialize only once
co... |
This CLI is n't used apart for this repo 's testing purposes . The syntax
itself is used by 's compiler programmatically through various other apis .
This CLI isn't used apart for this repo's testing purposes. The syntax
itself is used by ReScript's compiler programmatically through various other apis.
*... |
bdfa6fe2fd9262e09151f37857fdce65b411adf1d42895105ceb873d8c094d58 | static-analysis-engineering/codehawk | bCHPowerPseudocode.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/87db5929b4e589511d644f84defd1b0a722a05b9/CodeHawk/CHB/bchlibpower32/bCHPowerPseudocode.ml | ocaml | chutil
bchlib
bchlibpower32 | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
c2b5ed922602b3d9466a6f0e3b024e7ec3ed4c4a16ebe8bca856ef5e795e6977 | NelosG/fp-tests | T3Spec.hs | # LANGUAGE QuasiQuotes #
module Hi.Test.T3Spec (spec) where
import HW3.Base
import Hi.Test.Common
import Text.RawString.QQ
spec :: Spec
spec = do
let
insert3 s = "1 " ++ s ++ " 2 " ++ s ++ " 3"
insert3r s = "1 " ++ s ++ " (2 " ++ s ++ " 3)"
describe "infix" $ do
it "from int-index" $ do
"2 + 2" ... | null | https://raw.githubusercontent.com/NelosG/fp-tests/90442f9ad7ec72136cbd29ffc289b924f9077309/hw3/test/Hi/Test/T3Spec.hs | haskell | # LANGUAGE QuasiQuotes #
module Hi.Test.T3Spec (spec) where
import HW3.Base
import Hi.Test.Common
import Text.RawString.QQ
spec :: Spec
spec = do
let
insert3 s = "1 " ++ s ++ " 2 " ++ s ++ " 3"
insert3r s = "1 " ++ s ++ " (2 " ++ s ++ " 3)"
describe "infix" $ do
it "from int-index" $ do
"2 + 2" ... | |
d75169d655e1188e70e11ad95bf1036d16eb2b7a5bcecb1d3dd696ffda00df6e | privet-kitty/cl-competitive | binom-quadratic.lisp | (defpackage :cp/binom-quadratic
(:use :cl)
(:export #:make-binom-table))
(in-package :cp/binom-quadratic)
(declaim (inline make-binom-table))
(defun make-binom-table (size element-type op)
"Generates table of binomial coefficients. Time and space complexity is
O(N^2).
OP := addition"
(declare ((integer 1) siz... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/binom-quadratic.lisp | lisp | (defpackage :cp/binom-quadratic
(:use :cl)
(:export #:make-binom-table))
(in-package :cp/binom-quadratic)
(declaim (inline make-binom-table))
(defun make-binom-table (size element-type op)
"Generates table of binomial coefficients. Time and space complexity is
O(N^2).
OP := addition"
(declare ((integer 1) siz... | |
425a17c718161d1cffaedb3833c17c9a6d414a180f6a18a43f0cac1e0c9c0ab8 | philc/watchman | pinger_test.clj | (ns watchman.test.pinger-test
(require [midje.sweet :refer :all]
[watchman.pinger :refer :all]
[midje.util :refer [testable-privates]]))
(testable-privates watchman.pinger alert-email-html)
(def check-status {:host_id 1
:hosts {:hostname "the-hostname.com"}
... | null | https://raw.githubusercontent.com/philc/watchman/15bbe618c11784ec1f6460d322ffa935cce06708/test/watchman/test/pinger_test.clj | clojure | (ns watchman.test.pinger-test
(require [midje.sweet :refer :all]
[watchman.pinger :refer :all]
[midje.util :refer [testable-privates]]))
(testable-privates watchman.pinger alert-email-html)
(def check-status {:host_id 1
:hosts {:hostname "the-hostname.com"}
... | |
b1a59d7f1c4b5345ae39cf34b2d102c2ebd64acc49f41cb7e51c5e8b090a4f48 | rpav/cl-cairo2 | user-font.lisp | (in-package :cl-cairo2)
;; Variables
(defvar *user-font-ptr-to-object* (make-hash-table))
(defvar *user-font-temp-context*
(make-instance 'context :width 0 :height 0 :pixel-based-p nil
:pointer nil)
"Temporary context so we don't allocate a new CONTEXT just to wrap
a pointer when rendering. N... | null | https://raw.githubusercontent.com/rpav/cl-cairo2/41ae45aac86553c46f4bb460f80e1fb620930f5b/src/user-font.lisp | lisp | Variables
Types
Callbacks
Methods | (in-package :cl-cairo2)
(defvar *user-font-ptr-to-object* (make-hash-table))
(defvar *user-font-temp-context*
(make-instance 'context :width 0 :height 0 :pixel-based-p nil
:pointer nil)
"Temporary context so we don't allocate a new CONTEXT just to wrap
a pointer when rendering. Not threadsafe, ... |
0056026f31e5fd84efeebdb5996733c88d2cf625e7217c7fc2a250a046c34e9b | ryukzak/nitta | TargetSystem.hs | # LANGUAGE TypeFamilies #
|
Module : NITTA.Model . TargetSystem
Description : Model of target system for synthesis and so on .
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Model.TargetSystem
Description : Model of target system for synthesis a... | null | https://raw.githubusercontent.com/ryukzak/nitta/1e1e571fd73b2cb9bea4e5781bf658e7edd264c0/src/NITTA/Model/TargetSystem.hs | haskell | | Model of target unit, which is a main subject of synthesis process and
synthesis graph.
^ model of target unit
^ whole application algorithm
inconsistent TargetSystem | # LANGUAGE TypeFamilies #
|
Module : NITTA.Model . TargetSystem
Description : Model of target system for synthesis and so on .
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Model.TargetSystem
Description : Model of target system for synthesis a... |
415c4431c15c5d06445d27823a530818a63704f78a4e73c6c7622b5cffa0860b | owickstrom/komposition | Store.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
-- | The 'ProjectStore' effect includes operations for creating,
-- saving, and opening projects.
module Komposition.Project.Store
( ProjectStore(..)
, createNewProject
, saveExistin... | null | https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/Project/Store.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
| The 'ProjectStore' effect includes operations for creating,
saving, and opening projects.
effect. Extract to some kind of user environment effect? | # LANGUAGE FlexibleContexts #
module Komposition.Project.Store
( ProjectStore(..)
, createNewProject
, saveExistingProject
, openExistingProject
, getDefaultProjectsDirectory
, getCacheDirectory
, SaveProjectError(..)
, OpenProjectError(..)
) where
import Komposition.Prelude hiding (Type... |
baae7ace6f37a9fa92e073228917791bf0ef65e0af4135ec7fca27d82cfb5603 | cstar/ejabberd-old | node_pep.erl | %%% ====================================================================
` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You should have received a copy of the
%%% Erlang Public License ... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/mod_pubsub/node_pep.erl | erlang | ====================================================================
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
th... | ` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Initial Developer of the Original Code is ProcessOne .
Portions created by ProcessOne are C... |
08dabd0733312688ec647e26415302ebba85ed1f92ced644608bf15cc0f788e3 | sKabYY/palestra | p67.scm | (load "stream.scm")
(define (pairs2 s t)
(cons
(list (stream-car s) (stream-car t))
(delay
(interleave
(interleave
(stream-map-n (lambda (x) (list (stream-car s) x))
(stream-cdr t))
(stream-map-n (lambda (x) (list x (stream-car t)))
... | null | https://raw.githubusercontent.com/sKabYY/palestra/0906cc3a1fb786093a388d5ae7d59120f5aae16c/old1/sicp/3/p67.scm | scheme | (load "stream.scm")
(define (pairs2 s t)
(cons
(list (stream-car s) (stream-car t))
(delay
(interleave
(interleave
(stream-map-n (lambda (x) (list (stream-car s) x))
(stream-cdr t))
(stream-map-n (lambda (x) (list x (stream-car t)))
... | |
1634b1a7334e571fd4ffa140a5010c7e7b90b76f8a7e58b393b97c74f429fa40 | ocaml/oasis | main.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestFull/dynlink/main.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
18fad63c6b4adfd9081c65d6e58dc68c7f7adda2ef5ed70f48f4fd61076329ad | jacobobryant/hallway | admin.clj | (ns findka.hallway.admin
(:require [biff.util :as bu]))
(comment
; Test out Girouette classes (only works in dev, not prod)
((requiring-resolve 'findka.hallway.dev.css/class-name->garden)
"bg-blue-200")
)
| null | https://raw.githubusercontent.com/jacobobryant/hallway/9326f972a25ca0f77c2901da2b253d149dc4a46d/src/findka/hallway/admin.clj | clojure | Test out Girouette classes (only works in dev, not prod) | (ns findka.hallway.admin
(:require [biff.util :as bu]))
(comment
((requiring-resolve 'findka.hallway.dev.css/class-name->garden)
"bg-blue-200")
)
|
672eb8e9dbe4d25d1bb51c9c47a25cdeb30015da2e1da0d0eaa1def3cd224324 | unison-code/unison | RenameMOperands.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Transformations/RenameMOperands.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
b42f90236e52e40814fb6f13e3728ffcf23d3143aa98e3256f2bc74acf4c0909 | lspitzner/brittany | Test263.hs | # LANGUAGE ImplicitParams #
foo :: (?bar::Bool) => ()
foo = ()
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test263.hs | haskell | # LANGUAGE ImplicitParams #
foo :: (?bar::Bool) => ()
foo = ()
| |
0e96c7eb608853bd81eb975262eee43592e64145599fa8bcb10bf9ef9dcaaa6b | chaoxu/fancy-walks | 71.hs |
try (p,q) n (a,b) (c,d)
| bd > n = (a,b)
| ac * q < p * bd = try (p,q) n (ac,bd) (c,d)
| otherwise = try (p,q) n (a,b) (ac,bd)
where
ac = a + c
bd = b + d
problem_71 = fst $ try (3,7) 1000000 (0,1) (1,1)
main = print problem_71
| null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/71.hs | haskell |
try (p,q) n (a,b) (c,d)
| bd > n = (a,b)
| ac * q < p * bd = try (p,q) n (ac,bd) (c,d)
| otherwise = try (p,q) n (a,b) (ac,bd)
where
ac = a + c
bd = b + d
problem_71 = fst $ try (3,7) 1000000 (0,1) (1,1)
main = print problem_71
| |
56336533a319c750ce96ce3a0a335052ee6dd8811ac900677599e138d865de0c | mokus0/junkbox | LetRec.hs | module LetRec where
import Control.Monad
import Language.Haskell.TH
|@letrec n@ defines a \"let rec\ " function for @n@ recursive bindings . In
particular , it takes @n+1@ arguments : the definitions of each of the @n@
recursive bindings as functions of all @n@ values , and the \"in\ " part of
the let expr... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Template%20Haskell/LetRec.hs | haskell |
variable names):
> \f g h expr -> let x = f x y z
> y = g x y z
> z = h x y z
> in expr x y z | module LetRec where
import Control.Monad
import Language.Haskell.TH
|@letrec n@ defines a \"let rec\ " function for @n@ recursive bindings . In
particular , it takes @n+1@ arguments : the definitions of each of the @n@
recursive bindings as functions of all @n@ values , and the \"in\ " part of
the let expr... |
c4960f533e77a22d6c412793fb5c641b5c8c2e9ddf59a4569f95200da0caca92 | steinuil/xobl | xobl_compiler.ml | module Parser = struct
type error = Parser_utils.error
let parse source =
Xmlm.make_input ~strip:true source
|> Patche.Xml.make_input |> Patche.Xml.run Parser.xcb
end
module Elaborate = Elaborate
module Parsetree = Parsetree
| null | https://raw.githubusercontent.com/steinuil/xobl/a5480d9ed51c6b9a51b3a7aa41f246a47ce1ecda/compiler/xobl_compiler.ml | ocaml | module Parser = struct
type error = Parser_utils.error
let parse source =
Xmlm.make_input ~strip:true source
|> Patche.Xml.make_input |> Patche.Xml.run Parser.xcb
end
module Elaborate = Elaborate
module Parsetree = Parsetree
| |
c8704a472fc872195faeef2e66ed7be167741f7f2d581d1bbd7a1fa69ebd8133 | simonmichael/hledger | hledger-check-postable.hs | #!/usr/bin/env stack
-- stack runghc --verbosity info --package hledger-lib --package hledger --package string-qq --package safe --package text
-- --package time
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
import Data . Either
import Data.Ma... | null | https://raw.githubusercontent.com/simonmichael/hledger/8b121bcf747287f397c8a8ff30ff533d940e8861/bin/hledger-check-postable.hs | haskell | stack runghc --verbosity info --package hledger-lib --package hledger --package string-qq --package safe --package text
--package time
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
--------------------------------------------------------------------------... | #!/usr/bin/env stack
# LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
import Data . Either
import Data.Maybe
import Data.String.QQ (s)
import Text.Printf
import Control.Monad
import Data.List
import qualified Data.Text as T
import Data . Time . Calendar
import Safe
import System.... |
ce1ae141debbec7eb877fe35352016340c933f3d127cce84fdadabeb5e55b2e4 | cbaggers/cepl | cepl-context.lisp | (in-package :cepl.context)
;;----------------------------------------------------------------------
;;
(defvar *contexts-lock* (bt:make-lock))
(defvar *contexts* nil)
(defun assert-no-other-context-is-bound-to-thread (this-thread)
(loop :for context :in *contexts* :do
(%with-cepl-context-slots (bound-thread) ... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/context/cepl-context.lisp | lisp | ----------------------------------------------------------------------
done!
----------------------------------------------------------------------
Implicit Context & Inlining Logic
l for local..bad name, but the others I had at the time were worse.
-----------------------------------------------------------------... | (in-package :cepl.context)
(defvar *contexts-lock* (bt:make-lock))
(defvar *contexts* nil)
(defun assert-no-other-context-is-bound-to-thread (this-thread)
(loop :for context :in *contexts* :do
(%with-cepl-context-slots (bound-thread) context
(let ((existing-context-thread bound-thread))
(asser... |
c2d5e77a1552ccd9186a7433c70c5e23200f591ae4a9be4cd412eb7b087ef213 | v-kolesnikov/sicp | 2_33.clj | (ns sicp.chapter02.2-33
(:refer-clojure :exclude [map]))
(defn map
[f coll]
(reduce #(concat %1 (list (f %2))) '() coll))
(defn append
[coll1 coll2]
(reduce #(concat %1 (list %2)) coll1 coll2))
(defn length
[coll]
(reduce (fn [acc x] (inc acc)) 0 coll))
| null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_33.clj | clojure | (ns sicp.chapter02.2-33
(:refer-clojure :exclude [map]))
(defn map
[f coll]
(reduce #(concat %1 (list (f %2))) '() coll))
(defn append
[coll1 coll2]
(reduce #(concat %1 (list %2)) coll1 coll2))
(defn length
[coll]
(reduce (fn [acc x] (inc acc)) 0 coll))
| |
1be2442e3df3e41f02ebddfd6e0a8fbfc4b6c9dddff43209783d7e0820bcc8be | covid-db/covid-scrapers | Covid19.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Covid19 where
------------------------------------------------------------------------------
import Control.Error
import Control.Lens
import Control.Monad
impor... | null | https://raw.githubusercontent.com/covid-db/covid-scrapers/145b11ba97b2b9f3a1e5ece116270992c056b88f/haskell/covid-scrape/lib/Covid19.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
, _env_dbConnectInfo :: DbConnect
runBeamPostgres conn... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Covid19 where
import Control.Error
import Control.Lens
import Control.Monad
import qualified Data.ByteString.Lazy as BL
import qualified Data.Csv as C
import Data.Csv.Lens
import ... |
cda051ea85d244c463b6534f224b8310d849d8b2250130278c58101a77e25780 | deps-app/versions | downloads_test.clj | (ns jarkeeper.downloads-test
(:require [clojure.test :refer :all])
(:require [jarkeeper.downloads :refer [format-downloads]]))
(deftest format-downloads-test
(are [given expected] (= expected (format-downloads given))
0 "0"
1 "1"
10 "10"
100 "100"
999 "999"
1000 "1000"
10000 "10K"
... | null | https://raw.githubusercontent.com/deps-app/versions/5e58ac456cb3ec90c5d87dbfdde8f9414f8b1f3b/test/jarkeeper/downloads_test.clj | clojure | (ns jarkeeper.downloads-test
(:require [clojure.test :refer :all])
(:require [jarkeeper.downloads :refer [format-downloads]]))
(deftest format-downloads-test
(are [given expected] (= expected (format-downloads given))
0 "0"
1 "1"
10 "10"
100 "100"
999 "999"
1000 "1000"
10000 "10K"
... | |
b2699a5d2c522746d457298272344acc418ac5e12a87d36c5876d0522bb60793 | gnarroway/hato | middleware_test.clj | (ns hato.middleware-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[cognitect.transit :as transit]
[hato.middleware :refer :all])
(:import (java.util.zip
GZIPOutputStream)
(java.io ByteArrayInputStream ByteArrayOutputStream InputStream))... | null | https://raw.githubusercontent.com/gnarroway/hato/711c6e88ecab39bf0e14156aa933fd3036e5182d/test/hato/middleware_test.clj | clojure | (ns hato.middleware-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[cognitect.transit :as transit]
[hato.middleware :refer :all])
(:import (java.util.zip
GZIPOutputStream)
(java.io ByteArrayInputStream ByteArrayOutputStream InputStream))... | |
fe708267a942c30f723dd6c7c1c69b7482f7767eb0cb44bcf929fa12da48575e | GlideAngle/flare-timing | FsArrivalOptions.hs | module FsArrivalOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
Extracts the arrival time, position and fraction from a competition.
|]
| null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/flare-timing/prod-apps/fs-arrival/FsArrivalOptions.hs | haskell | module FsArrivalOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
Extracts the arrival time, position and fraction from a competition.
|]
| |
5341725237c528233494dee05843d4a43d87a2db1dc2b9870e64774f361ad9c9 | shirok/Gauche | parser.scm | ;;;
;;; C Parser
;;;
Copyright ( c ) 2021 - 2022 < >
;;;
;;; 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
;;; notice... | null | https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/lib/lang/c/parser.scm | scheme |
C Parser
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
notice, this list of conditions and the following disclaimer.
2. Redistribu... | Copyright ( c ) 2021 - 2022 < >
" 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
(define-module lang.c.parser
(use file.uti... |
65a6a2ea67c180658d6af9f0aaba7663196bef7b81e9759cb5911bbcc7e20e29 | ocamllabs/ocaml-modular-implicits | stackoverflow.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/runtime-errors/stackoverflow.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let rec f x =
if not (x = 0 || x = 10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.