_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 |
|---|---|---|---|---|---|---|---|---|
6e4816d68ff45c5f7d7a551d58ec3ab9f9aef47cb2db3459b5fb13feb60ffcd3 | JacquesCarette/Drasil | Changes.hs | module Drasil.GlassBR.Changes (likelyChgs, unlikelyChgs) where
--A list of likely and unlikely changes for GlassBR
import Language.Drasil hiding (variable)
import Language.Drasil.Chunk.Concept.NamedCombinators
import Data.Drasil.Concepts.Documentation (condition, goal, input_, likeChgDom,
software, system, unlikeC... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/21904c715546944d36e75a4ca91c710d92e98149/code/drasil-example/glassbr/lib/Drasil/GlassBR/Changes.hs | haskell | A list of likely and unlikely changes for GlassBR
-LIKELY CHANGES- | module Drasil.GlassBR.Changes (likelyChgs, unlikelyChgs) where
import Language.Drasil hiding (variable)
import Language.Drasil.Chunk.Concept.NamedCombinators
import Data.Drasil.Concepts.Documentation (condition, goal, input_, likeChgDom,
software, system, unlikeChgDom, value, variable)
import Data.Drasil.Concepts.... |
2d4fa8a637c560a0b1fab1f3157255338e41a05f9fdc4b77a8079f49ba5026f3 | spawnfest/eep49ers | xpath_lib.erl | %%%-------------------------------------------------------------------
%%% File : xpath_lib.erl
Author : < bertil@finrod >
%%% Description :
%%%
Created : 13 Jan 2006 by < bertil@finrod >
%%%-------------------------------------------------------------------
-module(xpath_lib).
-export([test/0,check_node... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/xmerl/test/xmerl_SUITE_data/xpath/xpath_lib.erl | erlang | -------------------------------------------------------------------
File : xpath_lib.erl
Description :
-------------------------------------------------------------------
contents would be empty in the above expression
//e, which represents the set of e elements in the document.
document:
ok = Test(Doc2,"... | Author : < bertil@finrod >
Created : 13 Jan 2006 by < bertil@finrod >
-module(xpath_lib).
-export([test/0,check_node_set/2,ticket_6873/0]).
-include_lib("common_test/include/ct.hrl").
-include_lib("xmerl/include/xmerl.hrl").
test() ->
{E,_} = xmerl_scan:file("myBS_model.xml"),
Res1 = xmerl_xpath:st... |
eb867301d68c98260f5a9241e7410f9b7f1b922341437ab9afae6ff0d27da3a0 | Clozure/ccl | arm-utils.lisp | -*- Mode : Lisp ; Package : CCL ; -*-
;;;
;;; Copyright 2010 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by appli... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-0/ARM/arm-utils.lisp | lisp | Package : CCL ; -*-
Copyright 2010 Clozure Associates
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.... | distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(defarmlapfunction %address-of ((arg arg_z))
(test-fixnum arg)
(mov imm0 arg_z)
(bxeq lr)
(spjump .SPmakeu32))
(defarmlapfunction %normalize-areas ()
(let ((address imm0)
(temp imm2))
Update active poi... |
5c292e326402b4cd94feb2d659e234abb14335bed56584cdee7fbfa504f013f5 | drlivingston/kabob | refseq_entity_typing_rules.clj | ;; This rule set applies a sequence type to RefSeq identifiers based on
the molecular type field in the RefSeq release catalog file records
;;
RefSeq Ids can represent Genomic , RNA , mRNA , or Protein sequences
;; Gene types and their definitions obtained from:
;;
;; Possible gene types include:
;; AC_ (Gen... | null | https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/entity_typing/refseq_entity_typing_rules.clj | clojure | This rule set applies a sequence type to RefSeq identifiers based on
Gene types and their definitions obtained from:
Possible gene types include:
AC_ (Genomic) - Alternate complete genomic molecule. This prefix is used for
records that are provided to reflect an alternate assembly or
... | the molecular type field in the RefSeq release catalog file records
RefSeq Ids can represent Genomic , RNA , mRNA , or Protein sequences
assembly or annotation . The AP _ prefix was originally
NC _ ( Genomic ) - Complete genomic molecules including genomes , chromosomes ,
NT _ ( Genomic ) - In... |
7e23b14c066d823a6440ce25811c16c99d6d5b40e0a5e9d6a6bafac573f7fcf2 | dongcarl/guix | lego.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 , 2017 , 2019 < >
Copyright © 2018 , 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free S... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/lego.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 , 2017 , 2019 < >
Copyright © 2018 , 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages lego)
#:use-module ((guix licenses... |
4845c9db44e307624e6c5d2a4b8b9d51c5d53e30ec61eee128a3e3c5576665fa | inhabitedtype/ocaml-aws | getCalendarState.mli | open Types
type input = GetCalendarStateRequest.t
type output = GetCalendarStateResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/getCalendarState.mli | ocaml | open Types
type input = GetCalendarStateRequest.t
type output = GetCalendarStateResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
ebe5b14f8a9ef08e698b8b19ef56d329adefdbb10edf354e995530a607a55a16 | pflanze/chj-schemelib | interpolate.scm | Copyright 2014 - 2019 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require eas... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/math/interpolate.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
*does* work on imaginary numbers, too: | Copyright 2014 - 2019 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy
test)
(export interpolate
interpolate*)
(include "../cj-standarddeclares.scm")
(def (interpol... |
c86d5f70c68c2392ca04f3a8ac578ff4c8578246740dec60649ae184eb4f5ed6 | rtrusso/scp | util.scm | (define nasm-x86-registers
'((accum . "eax") (operand . "ebx") (this . "ecx") (index . "edx")
(link . "edi") (pointer . "esi")))
(define nasm-x86-sys-registers
'((frame-pointer . "ebp") (stack-pointer . "esp")))
(define (nasm-x86-register-lsb-alias reg)
(case (string->symbol (register reg))
((... | null | https://raw.githubusercontent.com/rtrusso/scp/d647639ecb8e5a87c0a31a7c9d4b6a26208fbc53/src/sasm/nasmx86/util.scm | scheme | (define nasm-x86-registers
'((accum . "eax") (operand . "ebx") (this . "ecx") (index . "edx")
(link . "edi") (pointer . "esi")))
(define nasm-x86-sys-registers
'((frame-pointer . "ebp") (stack-pointer . "esp")))
(define (nasm-x86-register-lsb-alias reg)
(case (string->symbol (register reg))
((... | |
dfb358164da8d86120d4fcf1b981071e142dc1ad9abc27144b7f4ff85a466089 | hellonico/origami-fun | cartoon.clj | (ns opencv4.video.cartoon
(:require
[opencv4.core :refer :all]
[opencv4.video :as v]
[opencv4.cartoon]
[opencv4.utils :as u]))
(defn -main [& args]
(u/simple-cam-window
(fn[buffer]
(-> buffer
(opencv4.cartoon/cartoon-2)))))
| null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/video/cartoon.clj | clojure | (ns opencv4.video.cartoon
(:require
[opencv4.core :refer :all]
[opencv4.video :as v]
[opencv4.cartoon]
[opencv4.utils :as u]))
(defn -main [& args]
(u/simple-cam-window
(fn[buffer]
(-> buffer
(opencv4.cartoon/cartoon-2)))))
| |
6940bc14cb1c7e0d5f5369074fec0842cffd377748a98db9060cc191e4561c46 | nitrogen/NitrogenProject.com | demos_dragdrop.erl | -module (demos_dragdrop).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demos46.html" }.
title() -> "Drag and Drop".
headline() -> "Drag and Drop".
left() ->
[
"
<p>
The <code>#draggable{}</code> and <code>#droppable{}</code... | null | https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_dragdrop.erl | erlang | -module (demos_dragdrop).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demos46.html" }.
title() -> "Drag and Drop".
headline() -> "Drag and Drop".
left() ->
[
"
<p>
The <code>#draggable{}</code> and <code>#droppable{}</code... | |
9cbe75d051b9641143b240420417a06c16fcbbacb4199dde2a871318f161c893 | ghc/testsuite | T7019.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE UndecidableInstances #
module T7019a where
newtype Free c a = Free { runFree :: forall r. c r => (a -> r) -> r }
type C c = forall a. c (Free c a)
-- Notice... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/T7019.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE RankNTypes #
# LANGUAGE ConstraintKinds #
Notice that C is a synonym, illegal! | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module T7019a where
newtype Free c a = Free { runFree :: forall r. c r => (a -> r) -> r }
type C c = forall a. c (Free c a)
instance C c => Monad (Free c) where
return a = Free ($ a)
Free f >>= g = f g
|
31cd0ba6f9e8d899cdddccfdb5ce6a3d5f8ed8000dab23021e4e67d38ccc5a03 | juspay/medea | Analysis.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Data.Medea.Analysis
( AnalysisError (..),
ArrayType (..),
CompiledSchema (..),
TypeNode (..),
compileSchemata,
arrayBounds,
)
where
import Algebra.Graph.Acyclic.AdjacencyMap ... | null | https://raw.githubusercontent.com/juspay/medea/b493dd96f7f8d465ec95d3dafa0da430625c9c87/src/Data/Medea/Analysis.hs | haskell | # UNPACK #
# UNPACK #
# UNPACK #
We need a 'getRefs' argument here so that we can differentiate between
different kinds of Dangling references(type/property/list/tuple).
Helpers | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Data.Medea.Analysis
( AnalysisError (..),
ArrayType (..),
CompiledSchema (..),
TypeNode (..),
compileSchemata,
arrayBounds,
)
where
import Algebra.Graph.Acyclic.AdjacencyMap ... |
a6ca71ba7dbeb201a8d2c0c480e428597f3ff0b37cf9c0ed0b7db3d62b30a6a6 | yomimono/stitchcraft | symbol.ml | type font = [ `Zapf of string | `Symbol of string ]
type t = {
uchar : Uchar.t;
pdf : font;
}
let default =
{ uchar = Uchar.of_int 0x20;
pdf = `Symbol "\x20" }
let printable_symbols = [
{ uchar = Uchar.of_int 0x23; pdf = `Symbol "\x23" };
{ uchar = Uchar.of_int 0x25; pdf = `Symbol "\x25" };
{ uch... | null | https://raw.githubusercontent.com/yomimono/stitchcraft/329e528544c22971182c310d1240050ef8273960/stitchy/lib/symbol.ml | ocaml | type font = [ `Zapf of string | `Symbol of string ]
type t = {
uchar : Uchar.t;
pdf : font;
}
let default =
{ uchar = Uchar.of_int 0x20;
pdf = `Symbol "\x20" }
let printable_symbols = [
{ uchar = Uchar.of_int 0x23; pdf = `Symbol "\x23" };
{ uchar = Uchar.of_int 0x25; pdf = `Symbol "\x25" };
{ uch... | |
3d35bf94b6d29a3746150e8e6fc9fdc6bcf213e2db2b45d1efa5ad163c53b1ca | bondy-io/bondy | bondy_telemetry.erl | -module(bondy_telemetry).
-export([trace_id/0]).
%% =============================================================================
%% API
%% =============================================================================
%% -----------------------------------------------------------------------------
@doc Genera... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_telemetry.erl | erlang | =============================================================================
API
=============================================================================
-----------------------------------------------------------------------------
@end
-----------------------------------------------------------------------... | -module(bondy_telemetry).
-export([trace_id/0]).
@doc Generates a 128 bit random integer to use as a trace i d.
-spec trace_id() -> integer().
trace_id() ->
2 shifted left by 127 = = 2 ^ 128
rand:uniform(2 bsl 127 - 1). |
521a146f3589906b3eea0b86dbbd86560555ea9a453bc2ba14e2a0c3cf3365d2 | ahungry/ruse | core_test.clj | (ns ruse.core-test
(:require [clojure.test :refer :all]
[ruse.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/ahungry/ruse/2a648dbc50cdc4ba0fc7eca2052fed71b62447d7/test/ruse/core_test.clj | clojure | (ns ruse.core-test
(:require [clojure.test :refer :all]
[ruse.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
74d45f18a474487d7a5547dbe1d4fa618a9752b47a8b4dd905d6c5d4d77e9efa | xtdb/xtdb | memory.clj | (ns ^:no-doc xtdb.memory
(:require [clojure.tools.logging :as log]
[xtdb.io :as xio]
[juxt.clojars-mirrors.nippy.v3v1v1.taoensso.nippy :as nippy])
(:import xtdb.ByteUtils
[java.io DataInputStream DataOutputStream]
java.nio.Buffer
java.nio.ByteBuffer
... | null | https://raw.githubusercontent.com/xtdb/xtdb/0a275cf182f02e0023c0c3eeb142d61cd50e0794/core/src/xtdb/memory.clj | clojure | TODO: This slice is safer if the byte buffer itself is used,
but slower. | (ns ^:no-doc xtdb.memory
(:require [clojure.tools.logging :as log]
[xtdb.io :as xio]
[juxt.clojars-mirrors.nippy.v3v1v1.taoensso.nippy :as nippy])
(:import xtdb.ByteUtils
[java.io DataInputStream DataOutputStream]
java.nio.Buffer
java.nio.ByteBuffer
... |
b8b2e89fd719f39b8a7b6d7e8c691b4bfa78eea76dc9950234879e1a7d171639 | wdebeaum/step | tripsParser.lisp | (in-package parser)
;; From ../../Ontology/Code/KROntology/hierarchy-functions.lisp
(declaim (special *warned-already*))
;;
;; robustParser.lisp
;;
This file contains the code for the ROBUST PARSER . It provides interface functions
to the interface , and contains the code that extracts speech acts from the
... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/Parser/Trips-parser/tripsParser.lisp | lisp | From ../../Ontology/Code/KROntology/hierarchy-functions.lisp
robustParser.lisp
Chart.
CONTROL VARIABLES
supress low probability and empty speech acts
minimum weight for a speech act to be considered
; number of speech act interpretations desired
discourse state variables
================
TOP-LEVEL FUNCTIO... | (in-package parser)
(declaim (special *warned-already*))
This file contains the code for the ROBUST PARSER . It provides interface functions
to the interface , and contains the code that extracts speech acts from the
when NIL , it suppresses all output until an SA_GO - ONLINE is detected
(defvar *cur... |
6b3a40356a93d2a1aef085dc8988d96e5e4f78672be7c3b3c05d5949b703afbd | eighttrigrams/cljc-minimals | app.clj | (ns example.feat.app
(:require [com.biffweb :as biff]
[example.ui :as ui]
[xtdb.api :as xt]))
(defn set-foo [{:keys [params] :as req}]
(biff/submit-tx req
[{:db/op :update
:db/doc-type :user
:xt/id "ID"
:user/foo ... | null | https://raw.githubusercontent.com/eighttrigrams/cljc-minimals/dc1398be1d12ae5386692067495f81de4f2be1dc/biff/src/example/feat/app.clj | clojure | (ns example.feat.app
(:require [com.biffweb :as biff]
[example.ui :as ui]
[xtdb.api :as xt]))
(defn set-foo [{:keys [params] :as req}]
(biff/submit-tx req
[{:db/op :update
:db/doc-type :user
:xt/id "ID"
:user/foo ... | |
6a3227490fd92bdfed137fff9639a2f11c6cddc7bf5cde5ab8d134501696791b | mirage/irmin | push.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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... | null | https://raw.githubusercontent.com/mirage/irmin/347d885fd9d7f7605f4a980a3f733f44c7ccaede/examples/push.ml | ocaml | Simple example of Git push |
* Copyright ( c ) 2013 - 2022 < >
*
* 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... |
9234bf49b67608e65d703b9d2a11385617b0d8496d3294ff73d107b5e91b4c17 | ixy-languages/ixy.ml | log.mli | type log_level =
| STFU
| ERROR
| WARNING
| INFO
| DEBUG
val log_level : log_level ref
(** Setting [log_level] to a specific value will mute all messages above this level.
Default: [INFO] *)
val color : bool ref
(** Setting [color] to [false] will prevent colored output.
Default: [true] *)
val out_... | null | https://raw.githubusercontent.com/ixy-languages/ixy.ml/e79dcc4a19afd8e531346c27624c54224f942dc9/lib/log.mli | ocaml | * Setting [log_level] to a specific value will mute all messages above this level.
Default: [INFO]
* Setting [color] to [false] will prevent colored output.
Default: [true]
* Setting [out_channel] to a specific channel will cause all functions to
print to this channel.
Default: [stdout]
* [error fmt ... | type log_level =
| STFU
| ERROR
| WARNING
| INFO
| DEBUG
val log_level : log_level ref
val color : bool ref
val out_channel : out_channel ref
val error : ('a, unit, string, 'b) format4 -> 'a
val errors : string list -> 'a
val warn : ('a, unit, string, unit) format4 -> 'a
val info : ('a, unit, string, u... |
81491c598a6b8c2601645dfdc5031777658479fe1cda98f36e671c66f31b7be0 | klutometis/sicp-chicken | sicp-concurrency.scm | @(heading "sicp-concurrency")
(module sicp-concurrency
@("Concurrency procedures from section 3.4")
(make-serializer
parallel-execute
with-mutex-locked)
(import chicken scheme)
(include "sicp-concurrency-core.scm"))
| null | https://raw.githubusercontent.com/klutometis/sicp-chicken/0f65de82acb06ae6abcff655dc1aea115cfdc142/sicp-concurrency.scm | scheme | @(heading "sicp-concurrency")
(module sicp-concurrency
@("Concurrency procedures from section 3.4")
(make-serializer
parallel-execute
with-mutex-locked)
(import chicken scheme)
(include "sicp-concurrency-core.scm"))
| |
a2ae1e6315ea28c6a05015cbf80894e46a9c197ed3a0962cef6a70e95b1d9c56 | malcolmreynolds/GSLL | histogram.lisp | ;; The histogram structure
, Mon Jan 1 2007 - 11:32
Time - stamp : < 2009 - 01 - 25 10:03:15EST histogram.lisp >
$ Id$
(in-package :gsl)
Define , make , copy histograms in one or two dimensions .
/usr / include / gsl / gsl_histogram.h
;; /usr/include/gsl/gsl_histogram2d.h
(defmobject histogram
"gs... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/histogram/histogram.lisp | lisp | The histogram structure
/usr/include/gsl/gsl_histogram2d.h
C function for reinitialization means; assumed to be error code.
C function for set-ranges-uniform means; assumed to be error code.
C function means; assumed to be error code. | , Mon Jan 1 2007 - 11:32
Time - stamp : < 2009 - 01 - 25 10:03:15EST histogram.lisp >
$ Id$
(in-package :gsl)
Define , make , copy histograms in one or two dimensions .
/usr / include / gsl / gsl_histogram.h
(defmobject histogram
"gsl_histogram"
((number-of-bins sizet))
"one-dimensional histog... |
c913cc3dab9caedc48a1d76e381a9490305625e1c6835e2d0edefb339fcf0ba7 | overtone/overtone | pitch_test.clj | (ns overtone.music.pitch-test
(:use overtone.music.pitch
clojure.test))
(deftest invert-chord-works-properly
(let [notes '(12 16 19 23)]
(is (= (invert-chord notes 2) '(19 23 24 28)))
(is (= (invert-chord notes -3) '(4 7 11 12)))))
(deftest chord-inversion-is-correct
(is (= (chord :F3 :major 1) ... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/test/overtone/music/pitch_test.clj | clojure | (ns overtone.music.pitch-test
(:use overtone.music.pitch
clojure.test))
(deftest invert-chord-works-properly
(let [notes '(12 16 19 23)]
(is (= (invert-chord notes 2) '(19 23 24 28)))
(is (= (invert-chord notes -3) '(4 7 11 12)))))
(deftest chord-inversion-is-correct
(is (= (chord :F3 :major 1) ... | |
bd11e6a13fef6b8dd126d9617421a793fc1ca724eabf897dd0f2c206b3fadf26 | fogus/minderbinder | angle.clj | (ns minderbinder.angle
(:require [minderbinder.core :refer (defunits-of)]))
(defunits-of angle :radian
""
;; The angle subtended at the center of a circle by
;; an arc equal in length to the radius of the
;; circle.
:radian #{:rad}) | null | https://raw.githubusercontent.com/fogus/minderbinder/35b10b279b241fbeab38f63af568e6302f40930a/src/minderbinder/angle.clj | clojure | The angle subtended at the center of a circle by
an arc equal in length to the radius of the
circle. | (ns minderbinder.angle
(:require [minderbinder.core :refer (defunits-of)]))
(defunits-of angle :radian
""
:radian #{:rad}) |
151bd34e9bcd6af9333821143699964d35a0d3d75dcdd61ab68acaf166ad4f0b | fpco/stackage-curator | PackageIndexSpec.hs | # LANGUAGE OverloadedStrings , NoImplicitPrelude #
module Stackage.PackageIndexSpec (spec) where
import Stackage.PackageIndex
import Stackage.Prelude
import Test.Hspec
import System.Directory (doesFileExist, getAppUserDataDirectory)
spec :: Spec
spec = do
it "works" $ ifIndexExists $ runConduitRes $ sourcePackage... | null | https://raw.githubusercontent.com/fpco/stackage-curator/c25cf6959a1d1b3129b18855ddbc7974324cc422/test/Stackage/PackageIndexSpec.hs | haskell | # LANGUAGE OverloadedStrings , NoImplicitPrelude #
module Stackage.PackageIndexSpec (spec) where
import Stackage.PackageIndex
import Stackage.Prelude
import Test.Hspec
import System.Directory (doesFileExist, getAppUserDataDirectory)
spec :: Spec
spec = do
it "works" $ ifIndexExists $ runConduitRes $ sourcePackage... | |
754936fcb5eb443b8f480ab03950fc55d1afde9587744a63d8717746ce69dbc7 | emlyn/tortilla | wrap.clj | (ns tortilla.wrap
(:require [clojure.set :as set]
[clojure.string :as str]
[tortilla.coerce])
(:import [java.lang.reflect Constructor Method Modifier]))
;; General
(defn camel->kebab
[string]
(-> string
(str/replace #"(.)([A-Z][a-z]+)" "$1-$2")
(str/replace #"([a-z0-9])([A-... | null | https://raw.githubusercontent.com/emlyn/tortilla/e12ecdd48cd4d14593da3ed057f257cdeffa35b0/src/main/tortilla/wrap.clj | clojure | General
Class
Member (method, constructor)
so just emit a call and let the compiler deal with it:
Generate form for the highest/variadic arity of a member
Generate defn form for all arities of a named member
no more members so return, generating variadic form if necessary
there are more members, so continue
el... | (ns tortilla.wrap
(:require [clojure.set :as set]
[clojure.string :as str]
[tortilla.coerce])
(:import [java.lang.reflect Constructor Method Modifier]))
(defn camel->kebab
[string]
(-> string
(str/replace #"(.)([A-Z][a-z]+)" "$1-$2")
(str/replace #"([a-z0-9])([A-Z])" "$1-$2... |
4b1e971b572c8d926ea77c0f134d808bf842b068ad7653019bd891cbe8d5e69e | realworldocaml/book | super_context.ml | open Import
let default_context_flags (ctx : Context.t) ~project =
let cflags = Ocaml_config.ocamlc_cflags ctx.ocaml_config in
let cxxflags =
List.filter cflags ~f:(fun s -> not (String.is_prefix s ~prefix:"-std="))
in
let c, cxx =
match Dune_project.use_standard_c_and_cxx_flags project with
| None... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/super_context.ml | ocaml | * context env with additional variables
We recompute the scope on every recursive call, even though it should be
unchanged. If this becomes a problem, we can memoize [find_by_dir].
Add the section of the site mentioned in stanzas (it could be a site
of an external package)
Env node that represents... | open Import
let default_context_flags (ctx : Context.t) ~project =
let cflags = Ocaml_config.ocamlc_cflags ctx.ocaml_config in
let cxxflags =
List.filter cflags ~f:(fun s -> not (String.is_prefix s ~prefix:"-std="))
in
let c, cxx =
match Dune_project.use_standard_c_and_cxx_flags project with
| None... |
96fff3e437829794b3a71dfc356ae646387fe4425c95b247f3a385a7504db855 | mondemand/mondemand-server | mondemand_server_backend.erl | -module (mondemand_server_backend).
-callback start_link(Config :: list()) -> supervisor:startlink_ret().
-callback process(Event :: term()) -> ok.
-callback required_apps () -> list().
-callback type() -> supervisor | worker.
| null | https://raw.githubusercontent.com/mondemand/mondemand-server/88e57ef8ece8a0069a747620f4585104cb560840/src/mondemand_server_backend.erl | erlang | -module (mondemand_server_backend).
-callback start_link(Config :: list()) -> supervisor:startlink_ret().
-callback process(Event :: term()) -> ok.
-callback required_apps () -> list().
-callback type() -> supervisor | worker.
| |
948890991d502f9c2d7374f384e6e0ad2fdaa76a31ae8f69899a3024872bc213 | basho/yokozuna | yz_general_sup.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 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 . You may ob... | null | https://raw.githubusercontent.com/basho/yokozuna/e15fe64f9ef9318c0cc21754f3dfdd073d2dc77d/src/yz_general_sup.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 ) 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
becau... |
d63fe4adf89b2787dd3a1fe246ceff69cf49a6edd44974781daa9626d6adf5b5 | walkable-server/walkable | sqlite_test.clj | (ns walkable.integration-test.sqlite-test
{:integration true :sqlite true}
(:require [walkable.integration-test.helper :refer [run-scenario-tests]]
[walkable.integration-test.common :refer [common-scenarios]]
[clojure.java.io :as io]
[integrant.core :as ig]
[duct.core... | null | https://raw.githubusercontent.com/walkable-server/walkable/0af68e02b69fb9726b622294345c0db8e5b67fba/dev/test/walkable/integration_test/sqlite_test.clj | clojure | (ns walkable.integration-test.sqlite-test
{:integration true :sqlite true}
(:require [walkable.integration-test.helper :refer [run-scenario-tests]]
[walkable.integration-test.common :refer [common-scenarios]]
[clojure.java.io :as io]
[integrant.core :as ig]
[duct.core... | |
6b203842a2c63b127bb589b74038a766e26300af0a45cacf1cc2414fe882e2cf | pykello/racket-visualization | fig132.rkt | #lang racket
(require metapict
racket/math
"../common.rkt")
(set-curve-pict-size 250 250)
(define fig132
(let* ([ps (for/list ([θ (in-range 0 (* 2 pi) (/ (* 2 pi) 7))])
(pt@ 1 θ))]
[vs (for/list ([p ps])
(dot-node p "black"))]
[es (for*/list ([p1 ps... | null | https://raw.githubusercontent.com/pykello/racket-visualization/7c4dccfd59123fcb7c144ad8ed89dffdc57290df/metapict-examples/metapost/fig132.rkt | racket | #lang racket
(require metapict
racket/math
"../common.rkt")
(set-curve-pict-size 250 250)
(define fig132
(let* ([ps (for/list ([θ (in-range 0 (* 2 pi) (/ (* 2 pi) 7))])
(pt@ 1 θ))]
[vs (for/list ([p ps])
(dot-node p "black"))]
[es (for*/list ([p1 ps... | |
a2e897756d4d96986e0481f99f87160f2a79296b7cfd7542e77b38fd09c683de | 12urenloop/cvc | Modulo.hs | --------------------------------------------------------------------------------
module CountVonCount.Counter.Modulo
( Modulo
, toModulo
, fromModulo
, (.+.)
, (.-.)
, (.*.)
, (./.)
) where
--------------------------------------------------------------------------------
-- | Double-bas... | null | https://raw.githubusercontent.com/12urenloop/cvc/f8a0d57775fc6b50f18f96b9a17cb8baf4a1f1ee/count-von-count/lib/CountVonCount/Counter/Modulo.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
| Double-based modulo arithmetic
------------------------------------------------------------------------------
| Convert a double to a double in modulo arithme... | module CountVonCount.Counter.Modulo
( Modulo
, toModulo
, fromModulo
, (.+.)
, (.-.)
, (.*.)
, (./.)
) where
newtype Modulo = Modulo (Double -> Double)
toModulo :: Double -> Modulo
toModulo = Modulo . modulo
fromModulo :: Modulo -> Double -> [Double]
fromModulo (Modulo f) m = let x... |
8b6368d2b27c2b4555aa17bfbb19a1d34a5611c20629971128fc5d1c83777f65 | herd/herdtools7 | classify.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/aac49c1df2497b600ba03680f5e54dfab9f747f0/gen/classify.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
01f42d88ae4e1a39a25cd2917d60b886268deb30a7778348bacc59d6da4418cc | well-typed/optics | Properties.hs | module Optics.Tests.Properties (propertiesTests) where
import Data.Either (isRight)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Test.QuickCheck (Fun, expectFailure, applyFun, applyFun2, Property, (===), (==>))
import Test.QuickCheck.Poly (A, B, C, OrdA)
import Optics
imp... | null | https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics/tests/Optics/Tests/Properties.hs | haskell | also prisms
affine traversals are trickier, atraversal doesn't just bundle | module Optics.Tests.Properties (propertiesTests) where
import Data.Either (isRight)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Test.QuickCheck (Fun, expectFailure, applyFun, applyFun2, Property, (===), (==>))
import Test.QuickCheck.Poly (A, B, C, OrdA)
import Optics
imp... |
eb91a8439a8755c98071aa1a61ebf4d7dbc7dbdc7f565c30dee25ab449bb2d5d | clckwrks/clckwrks | Types.hs | # LANGUAGE DeriveDataTypeable , DeriveGeneric , TemplateHaskell , TypeFamilies #
module Clckwrks.ProfileData.Types
( DisplayName(..)
, ProfileData(..)
, Role(..)
, defaultProfileDataFor
, emptyProfileData
, Username(..)
) where
import Data.Data (Data, Typeable)
import Data.IxSet ... | null | https://raw.githubusercontent.com/clckwrks/clckwrks/dd4ea1e2f41066aa5779f1cc22f3b7a0ca8a0bed/Clckwrks/ProfileData/Types.hs | haskell | ^ now comes from happstack-authenticate
^ now comes from happstack-authenticate | # LANGUAGE DeriveDataTypeable , DeriveGeneric , TemplateHaskell , TypeFamilies #
module Clckwrks.ProfileData.Types
( DisplayName(..)
, ProfileData(..)
, Role(..)
, defaultProfileDataFor
, emptyProfileData
, Username(..)
) where
import Data.Data (Data, Typeable)
import Data.IxSet ... |
d136d253d7272e764d93ff7e6014055dd4ded6fea58904eb3f3ad01ad6e7c19a | rizo/snowflake-os | snowflake.ml |
open Bigarray
let () =
Random.self_init (); (* seed the random number generator *)
Debug.init (); (* replace stderr with one that writes to serial port *)
Ovt100.init (); (* replace stdout with one that writes to whatever the current console is *)
(* turn on backtrace stuff; need to fix threading for th... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/snowflake.ml | ocaml | seed the random number generator
replace stderr with one that writes to serial port
replace stdout with one that writes to whatever the current console is
turn on backtrace stuff; need to fix threading for this...
Printexc.record_backtrace true;
initialise a bunch of devices
doesn't get linked in!
MusicPlay... |
open Bigarray
let () =
Printf.printf "init starting...\n";
Printf.eprintf "Random, Debug, Ovt100 initialised\n";
Vga.init ();
Printf.eprintf "Vga initialised\n";
GraphicsConsole.init ( ) ;
Printf.eprintf " GraphicsConsole initialised\n " ;
Printf.eprintf "GraphicsConsole initialised\n";*)
Key... |
703e068e4a9a8fc8527cc5437c197f9cf5c4e2ed7a010cb00fcaaefbc1c6b8bf | janegca/htdp2e | Exercise-287-SimplifyingSubstituteV3.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-281-SimplifyingSubstituteV3) (read-case-sensitive #t) (teachpacks ()) (htdp-setti... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intertwined%20Data/Exercise-287-SimplifyingSubstituteV3.rkt | racket | about the language level of this file in a form that our tools can easily process.
Copy and paste the above definition (for the substitute function)
suite passes. As you read along the remainder of this section, perform the
edits and re-run the test suites to confirm the validity of our arguments.
Any -> Boolean... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-281-SimplifyingSubstituteV3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 287 .
into , ... |
cf95d5540d57f3414ffbca0669d403a1c7354fca2454eb96b8da9e7bdd414cb6 | metabase/connection-pool | connection_pool.clj | (ns metabase.connection-pool
"Low-level logic for creating connection pools for a JDBC-based database. Used by both application DB and connected
data warehouse DBs.
The aim here is to completely encapsulate the connection pool library we use -- that way we can swap it out if we
want to at some point without ha... | null | https://raw.githubusercontent.com/metabase/connection-pool/68b9967ab179a9f1551a29171d52ca306bd71217/src/metabase/connection_pool.clj | clojure | ------------------------------------------------ Proxy DataSource ------------------------------------------------ | (ns metabase.connection-pool
"Low-level logic for creating connection pools for a JDBC-based database. Used by both application DB and connected
data warehouse DBs.
The aim here is to completely encapsulate the connection pool library we use -- that way we can swap it out if we
want to at some point without ha... |
66dfe58b9ab9b450db5241194a4b5b3843ac830e9a6d179f9ab846a109ac701e | vmchale/apple | M.hs | {-# LANGUAGE OverloadedStrings #-}
module R.M ( RM
, runR
, nextN
, nextU
) where
import Control.Monad.State.Strict (State, get, modify, runState)
import Data.Functor (($>))
import qualified Data.Text as T
import ... | null | https://raw.githubusercontent.com/vmchale/apple/72f301b6a8f7d1afdd75e2e4b4fa1b6bfef82a65/src/R/M.hs | haskell | # LANGUAGE OverloadedStrings # |
module R.M ( RM
, runR
, nextN
, nextU
) where
import Control.Monad.State.Strict (State, get, modify, runState)
import Data.Functor (($>))
import qualified Data.Text as T
import Name
import U
type RM = ... |
678507df753a3f43a16a5a2d5610d734648bb1a53e83cda7d9926278d31bf2f1 | voicerepublic/vr-logorrhoe | project.clj | (defproject vr_logorrhoe "0.1.0-SNAPSHOT"
:description "VoiceRepublic.com *re-stream* Desktop Client"
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[seesaw "1.4.5"]
[com.climate/java.shell2 "0.1.0"]
[clj-http "2.1.0"]
... | null | https://raw.githubusercontent.com/voicerepublic/vr-logorrhoe/e01c4a8599cdbbd25f982acece474669dd7fd6ef/project.clj | clojure | If a repository contains releases only setting
:snapshots to false will speed up dependencies.
Disable signing releases deployed to this repo.
(Not recommended.)
You can also set the policies for how to handle
:checksum failures to :fail, :warn, or :ignore.
How often should this repository be checked for
You ca... | (defproject vr_logorrhoe "0.1.0-SNAPSHOT"
:description "VoiceRepublic.com *re-stream* Desktop Client"
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[seesaw "1.4.5"]
[com.climate/java.shell2 "0.1.0"]
[clj-http "2.1.0"]
... |
c565a4a1dfadbfcbe70be0bd021840ba624adfcc93aa1ac2527779694a7adc87 | rd--/hsc3 | loopBuf.help.hs | -- loopBuf
let bf = control kr "bufnum" 0
rt = control kr "rate" 1
gl = control kr "glide" 0
gt = control kr "gate" 1
lr = control kr "loopRel" 0
sp = control kr "startPos" 0
sl = control kr "startLoop" 0 -- FRAME
el = control kr "endLoop" 0 -- FRAME
ip = control kr "ipol" 2
am = con... | null | https://raw.githubusercontent.com/rd--/hsc3/bb12d02f09481e7cb59ae2e9e5119d1f7c4c98c9/Help/Ugen/loopBuf.help.hs | haskell | loopBuf
FRAME
FRAME
-- ; read audio file into memory
-- ; send control messages
hosc
louder
backwards
forwards
change loop points
change loop points
up an octave
backwards
back to normal
no interpolation
linear interpolation
cubic interpolation
release gate to hear post-loop
release instrument without... | let bf = control kr "bufnum" 0
rt = control kr "rate" 1
gl = control kr "glide" 0
gt = control kr "gate" 1
lr = control kr "loopRel" 0
sp = control kr "startPos" 0
ip = control kr "ipol" 2
am = control kr "amp" 0.1
rt' = lag rt gl * bufRateScale kr bf
e = let d = envAdsr 0.1 0.2 1 2 ... |
79bed5b10ebd1349bf6f894684fce0e10257d66478b7e4fde0fc77a8216e4a62 | softwarelanguageslab/maf | R5RS_gambit_mazefun-3.scm | ; Changes:
* removed : 0
* added : 2
* swaps : 0
* negated predicates : 3
* swapped branches : 1
* calls to i d fun : 1
(letrec ((foldr (lambda (f base lst)
(letrec ((foldr-aux (lambda (lst)
(if (<change> (null? lst) (not (null? lst)))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_mazefun-3.scm | scheme | Changes: | * removed : 0
* added : 2
* swaps : 0
* negated predicates : 3
* swapped branches : 1
* calls to i d fun : 1
(letrec ((foldr (lambda (f base lst)
(letrec ((foldr-aux (lambda (lst)
(if (<change> (null? lst) (not (null? lst)))
... |
c07f453de5f5f79879d94db8d936db99f830cb72571353eb3e29deeb87f33cb7 | tommaisey/aeon | lf-pulse.help.scm | (let ((f (mul-add (lf-pulse kr 3 0 0.3) 200 200)))
(audition (out 0 (mul (lf-pulse ar f 0 0.2) 0.1))))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/lf-pulse.help.scm | scheme | (let ((f (mul-add (lf-pulse kr 3 0 0.3) 200 200)))
(audition (out 0 (mul (lf-pulse ar f 0 0.2) 0.1))))
| |
b06fee41a95bf376ff698dd4549e100794247c934302be07a2f136491a3da96d | wireapp/wire-server | Validation.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- 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 Fou... | null | https://raw.githubusercontent.com/wireapp/wire-server/09cfa0e602321ef753f771a7171ba6c39b5ac976/services/galley/src/Galley/Validation.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... | # LANGUAGE GeneralizedNewtypeDeriving #
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 Licens... |
ad9ca16a7f80d46ddad51710a11f07d5b05f0e3741b752e98a360951e22a80ad | offby1/anagrams | anagrams.scm | (define (all-anagrams-internal bag dict)
(define rv '())
(let loop ((dict dict))
(if (null? dict)
rv
(let ((key (caar dict))
(words (cdar dict)))
(let ((smaller-bag (subtract-bags bag key)))
(define pruned
(filter (lambda (entry) (subtract-bags smaller-b... | null | https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/scsh/anagrams.scm | scheme | (define (all-anagrams-internal bag dict)
(define rv '())
(let loop ((dict dict))
(if (null? dict)
rv
(let ((key (caar dict))
(words (cdar dict)))
(let ((smaller-bag (subtract-bags bag key)))
(define pruned
(filter (lambda (entry) (subtract-bags smaller-b... | |
9fade7ddcd1fbc72ded5f01e26ce3c04b3326adc98ecb057c89301a4ad951d2a | escherize/bask | bask_test.clj | (ns bask.bask_test
(:require
[clojure.test :refer [deftest is]]
[babashka.tasks :refer [shell]]
[clojure.string :as str]))
(defn prompt+
[value]
(str "[32m ? [0m[37m[37m[37m[0m[0m[0m: \"" value "\"\n"))
(defn word-seq []
(repeatedly #(apply str (repeatedly
(rand-in... | null | https://raw.githubusercontent.com/escherize/bask/247bf01d969864d3486fd5c33eea7b681ecc0c5c/test/bask/bask_test.clj | clojure | (ns bask.bask_test
(:require
[clojure.test :refer [deftest is]]
[babashka.tasks :refer [shell]]
[clojure.string :as str]))
(defn prompt+
[value]
(str "[32m ? [0m[37m[37m[37m[0m[0m[0m: \"" value "\"\n"))
(defn word-seq []
(repeatedly #(apply str (repeatedly
(rand-in... | |
f073658a6c9d646ef659dc9e3796b3e857b4b611b52a7f2b773b5f534f3d00a1 | nyu-acsys/drift | sum6.ml |
let rec sum n =
if n <= 0
then 0
else n + sum (n - 1)
let main (mn:int(*-:{v:Int | true}*)) =
assert (6 * mn - 15 <= sum mn)
let _ =
for i = 1 to 1000 do
main ( Random.int 1000 )
done
for i = 1 to 1000 do
main (Random.int 1000)
done *) | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DRIFT/first/sum6.ml | ocaml | -:{v:Int | true} |
let rec sum n =
if n <= 0
then 0
else n + sum (n - 1)
assert (6 * mn - 15 <= sum mn)
let _ =
for i = 1 to 1000 do
main ( Random.int 1000 )
done
for i = 1 to 1000 do
main (Random.int 1000)
done *) |
657232448c216717a2f0b1a083a155ea6cd9f2e5f14c674eb7f291277c2ceeb9 | haskell-webgear/webgear | QueryParam.hs | module Properties.Trait.QueryParam (
tests,
) where
import Data.Functor.Identity (runIdentity)
import Data.String (fromString)
import Data.Text.Encoding (encodeUtf8)
import Network.Wai (defaultRequest, queryString)
import Test.QuickCheck (Property, allProperties, counterexample, property, (===))
import Test.QuickChe... | null | https://raw.githubusercontent.com/haskell-webgear/webgear/60e5547f9450aac36727e8d9980e0a8cbdb69660/webgear-server/test/Properties/Trait/QueryParam.hs | haskell | module Properties.Trait.QueryParam (
tests,
) where
import Data.Functor.Identity (runIdentity)
import Data.String (fromString)
import Data.Text.Encoding (encodeUtf8)
import Network.Wai (defaultRequest, queryString)
import Test.QuickCheck (Property, allProperties, counterexample, property, (===))
import Test.QuickChe... | |
c10e188afed8edbaff75874a63190b43b633a6f8d31e98cae7c2f5cf814786b9 | lichenscript/lichenscript | parser_env.mli | open Lichenscript_lex
type env
val init_env: Lichenscript_lex.File_key.t option -> ?filter_platform:string -> string -> env
val add_top_level: env -> name:string -> loc:Loc.t -> visibility:Asttypes.visibility option -> unit
val get_top_level: env -> Top_level.t
val include_module_ids: env -> string list
val add_i... | null | https://raw.githubusercontent.com/lichenscript/lichenscript/7fe051778d125210dd53ebc494a5a970353eaf1b/lib/parsing/parser_env.mli | ocaml | open Lichenscript_lex
type env
val init_env: Lichenscript_lex.File_key.t option -> ?filter_platform:string -> string -> env
val add_top_level: env -> name:string -> loc:Loc.t -> visibility:Asttypes.visibility option -> unit
val get_top_level: env -> Top_level.t
val include_module_ids: env -> string list
val add_i... | |
d263511d9ea4c8c0520109c7aa6346bd2112e1e12c3f2c65ce2b065421ee40dd | jumarko/web-development-with-clojure | gallery.cljs | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/picture-gallery-war/src/cljs/picture_gallery/components/gallery.cljs | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(ns picture-gallery.components.gallery
(:require [picture-gallery.components.common :as c]
[reagent.core :as reag... |
7adf42216e7b9f3b3906260e38021d75364d001dfc71284d967e7cfae7a41f7a | ekmett/exceptions | Tests.hs | module Main where
import Test.Framework (defaultMain)
import qualified Control.Monad.Catch.Tests
main :: IO ()
main = defaultMain
[ Control.Monad.Catch.Tests.tests
]
| null | https://raw.githubusercontent.com/ekmett/exceptions/d0e7e68a465831887aacf656373cd795dddf7f0e/tests/Tests.hs | haskell | module Main where
import Test.Framework (defaultMain)
import qualified Control.Monad.Catch.Tests
main :: IO ()
main = defaultMain
[ Control.Monad.Catch.Tests.tests
]
| |
fd386aa9860ec0cb70da4e12ac918506262d5c4921054de6b6975ab4d6a446c3 | tov/shcaml | amb.ml | #!/usr/bin/env ocamlscript
This script demonstrates how can be used to implement the AMB
* operator -- it runs two processes in the background , and when one
* completes , it kills the other .
* operator -- it runs two processes in the background, and when one
* completes, it kills the other. *)
Ocaml.pack... | null | https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/examples/amb.ml | ocaml | Another example (without the recursion). | #!/usr/bin/env ocamlscript
This script demonstrates how can be used to implement the AMB
* operator -- it runs two processes in the background , and when one
* completes , it kills the other .
* operator -- it runs two processes in the background, and when one
* completes, it kills the other. *)
Ocaml.pack... |
c628ea518c641d34ba4174024685ee8df8c7b6c6e997d97514478abd20e95071 | rumuki/rumuki-server | Import.hs | module Import
( module Import
) where
import Foundation as Import
import Handler.Extension as Import
import Import.NoFoundation as Import
import Model.RemoteTransferType as Import
| null | https://raw.githubusercontent.com/rumuki/rumuki-server/59798656e9eb440a2344223850dbd1f9f77060ca/src/Import.hs | haskell | module Import
( module Import
) where
import Foundation as Import
import Handler.Extension as Import
import Import.NoFoundation as Import
import Model.RemoteTransferType as Import
| |
643b00544b459e43ef70956bed8a9afd945bd746c4d6608e6f684fe85118d509 | ujamjar/hardcaml-zinc | trace.mli | open Base
val showfields : bool ref
val value : ?chan:Stdio.Out_channel.t -> Machine.state -> Int64.t -> unit
val machine : ?chan:Stdio.Out_channel.t -> Machine.state -> unit
val root : ?chan:Stdio.Out_channel.t -> Machine.state -> Int64.t -> unit
val instr : ?chan:Stdio.Out_channel.t -> Machine.state -> unit
| null | https://raw.githubusercontent.com/ujamjar/hardcaml-zinc/ad9360a66ddd239550623e3a92fe5328934706fa/src/trace.mli | ocaml | open Base
val showfields : bool ref
val value : ?chan:Stdio.Out_channel.t -> Machine.state -> Int64.t -> unit
val machine : ?chan:Stdio.Out_channel.t -> Machine.state -> unit
val root : ?chan:Stdio.Out_channel.t -> Machine.state -> Int64.t -> unit
val instr : ?chan:Stdio.Out_channel.t -> Machine.state -> unit
| |
bc16d192615d592a03fbbb38c1978d1df79171c5a0d8d4812cb9edc13525d767 | brendanhay/amazonka | GetAnswer.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wellarchitected/gen/Amazonka/WellArchitected/GetAnswer.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Get the answer to a specific question in a workload review.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| Input to get answer.
/See:/ 'newGetAnswer' smart constructor.
|
The foll... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
359ce08322044cab8525ed106b5dec8d23034539bbfb0cbf385ab1920d3dd00c | clj-commons/iapetos | collectors.clj | (ns iapetos.registry.collectors
(:require [iapetos.metric :as metric]
[iapetos.registry.utils :as utils]
[iapetos.collector :as collector])
(:import [io.prometheus.client Collector CollectorRegistry]))
;; ## Init
(defn initialize
"Initialize map for collectors.
- ::path-cache meta us... | null | https://raw.githubusercontent.com/clj-commons/iapetos/493b38c0d22afc5a4cd409bdd9748e15a960aa44/src/iapetos/registry/collectors.clj | clojure | ## Init | (ns iapetos.registry.collectors
(:require [iapetos.metric :as metric]
[iapetos.registry.utils :as utils]
[iapetos.collector :as collector])
(:import [io.prometheus.client Collector CollectorRegistry]))
(defn initialize
"Initialize map for collectors.
- ::path-cache meta used to preve... |
4130f64d46b1e77201056b0a284447ac1721a06693239cbb3f0406e803281f0b | UU-ComputerScience/uhc | PatMatchConst1.hs | {- ----------------------------------------------------------------------------------------
what : bugfix triggered: multiple constant pattern matches
expected: ok
---------------------------------------------------------------------------------------- -}
module PatMatchConst1 where
f :: String -> String
f (... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/PatMatchConst1.hs | haskell | ----------------------------------------------------------------------------------------
what : bugfix triggered: multiple constant pattern matches
expected: ok
---------------------------------------------------------------------------------------- |
module PatMatchConst1 where
f :: String -> String
f ('a':'-':xs) = xs++xs
f ('a':c :xs) = xs
f _ = "should not arrive here"
main :: IO ()
main
= do putStrLn (f "abc")
putStrLn (f "a-c")
|
a16038cd888f592dcefb2bf596177bd104e13a4aea3844f1814a465ccdd3d8be | morloc-project/morloc | Common.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
|
Module : Morloc . CodeGenerator . Grammars . Common
Description : A common set of utility functions for language templates
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morl... | null | https://raw.githubusercontent.com/morloc-project/morloc/c4e76083afaaaeae2bb53a65fe23604200fdf2e0/library/Morloc/CodeGenerator/Grammars/Common.hs | haskell | # LANGUAGE OverloadedStrings #
Stores pieces of code made while building a pool
^ completely generated manifolds
^ the inplace expression
^ lines to precede the returned expression
^ expressions that should precede this manifold, may include helper
functions or imports
| Merge a series of pools, keeping prior li... | # LANGUAGE ViewPatterns #
|
Module : Morloc . CodeGenerator . Grammars . Common
Description : A common set of utility functions for language templates
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.CodeGenerator.Grammars.Common
De... |
dd9dbf51180c69d4640facbe8605e9a99ff0a47c3090af7faa8a322b1246e821 | returntocorp/semgrep | Parse_ruby_tree_sitter.ml |
*
* Copyright ( C ) 2020 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... | null | https://raw.githubusercontent.com/returntocorp/semgrep/bd5f0a47efc42b16f2772514eb4fb83676a3e3be/languages/ruby/tree-sitter/Parse_ruby_tree_sitter.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Helpers
************************************************************************... |
*
* Copyright ( C ) 2020 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... |
d4bfaea12d3feb69666fd1ad79b0e6c3f2c94cc08197997d248ae00e2cce3b18 | ivanperez-keera/dunai | VectorSpace.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
-----------------------------------------------------------------------------------------
-- |
Module : .
Copyright : ( c ) and , Yale University , 2003
-- License : BSD-style (see t... | null | https://raw.githubusercontent.com/ivanperez-keera/dunai/d0f0a326847c4f409ee70c5154c5120b8cd521e3/dunai-frp-bearriver/src/FRP/Yampa/VectorSpace.hs | haskell | ---------------------------------------------------------------------------------------
|
License : BSD-style (see the LICENSE file in the distribution)
Maintainer :
Stability : provisional
Vector space type relation and basic instances.
Bearrriver does not enforce the use of a particular vector spa... | # LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
Module : .
Copyright : ( c ) and , Yale University , 2003
Portability : non - portable ( GHC extensions )
Bearriver uses vector spaces in time - aware primitives like ' integral ' .... |
77c90251669fb397714d5427ce5bfd026581dc059969248687007130aac49fb2 | Relph1119/sicp-solutions-manual | p1-3-bigger-sum-of-squares.scm | (define (square x) (* x x))
(define (sum-of-squares x y)
(+ (square x)
(square y)))
(define (bigger-sum-of-squares a b c)
(cond ((and (>= a c) (>= b c)) (sum-of-squares a b))
((and (>= a b) (>= c b)) (sum-of-squares a c))
((and (>= b a) (>= c a)) (sum-of-squares b c))
)) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/390f07e7dd599eb11d735a75da4c88efb2a23fbb/src/practices/ch01/p1-3-bigger-sum-of-squares.scm | scheme | (define (square x) (* x x))
(define (sum-of-squares x y)
(+ (square x)
(square y)))
(define (bigger-sum-of-squares a b c)
(cond ((and (>= a c) (>= b c)) (sum-of-squares a b))
((and (>= a b) (>= c b)) (sum-of-squares a c))
((and (>= b a) (>= c a)) (sum-of-squares b c))
)) | |
66bd5d764c812025c92c7ad7ae5f050a15982c3ae81d65a55051f323539065b4 | mikera/orculje | world.clj | (ns mikera.orculje.demo.world
(:use mikera.orculje.core))
(set! *warn-on-reflection* true)
(set! *unchecked-math* true)
;; WORLD SIMULATION
;; everything internal to the game goes in here
;; ======================================================
;; key external functions (called by main namespace)
(defn new-game... | null | https://raw.githubusercontent.com/mikera/orculje/4c7f9af78f9a8744e1ab3aef3ded151306883083/src/main/clojure/mikera/orculje/demo/world.clj | clojure | WORLD SIMULATION
everything internal to the game goes in here
======================================================
key external functions (called by main namespace) | (ns mikera.orculje.demo.world
(:use mikera.orculje.core))
(set! *warn-on-reflection* true)
(set! *unchecked-math* true)
(defn new-game []
(let [game (empty-game)]
(merge {:turn 0})))
(defn handle-command
"Handles a command, expressed as a complete command String"
[game k]
(let [turn (inc (:turn game... |
b25d7d20e1926f83e3ad5003f448136a3e0af10ee0b3aed755f3ed368686f427 | malcolmreynolds/GSLL | vector-max.lisp | Regression test VECTOR - MAX for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST VECTOR-MAX
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 8.24)
(MULTIPLE-VALUE-LIST
... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/vector-max.lisp | lisp | Regression test VECTOR - MAX for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST VECTOR-MAX
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 8.24)
(MULTIPLE-VALUE-LIST
... | |
bfbbe8017ee00c10eb87783c08131d44e69cd462fb25f7659106d76c485d9d88 | takikawa/racket-ppa | side-effect.rkt | #lang racket/base
(require "../common/set.rkt"
"built-in-symbol.rkt"
"self-quoting.rkt"
"known.rkt"
"../host/correlate.rkt")
;; To support extraction of a bootstrapped version of the expander, we
;; need to be able to prune unused module content. Pruning is usefully
;; improved by a... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/src/expander/compile/side-effect.rkt | racket | To support extraction of a bootstrapped version of the expander, we
need to be able to prune unused module content. Pruning is usefully
improved by a simple analysis of whether a module body has any
side-effects.
See "known.rkt" for classifications of definitions and locals
compiled expression
number of expected... | #lang racket/base
(require "../common/set.rkt"
"built-in-symbol.rkt"
"self-quoting.rkt"
"known.rkt"
"../host/correlate.rkt")
(provide any-side-effects?)
(define (effects? e expected-results locals)
(any-side-effects? e expected-results
#:known-locals ... |
587366531e493cd88e4fb3a0d8191fae455939c11e6a4d3a6caf7142e2c85e1c | ucsd-progsys/dsolve | map_all.ml | Adapted from OCaml 's Map module by -bin/cvsweb/~checkout~/ocaml/stdlib/map.ml?rev=1.15.6.2;content-type=text%2Fplain
* -bin/cvsweb/~checkout~/ocaml/stdlib/map.ml?rev=1.15.6.2;content-type=text%2Fplain
*)
type 'a t =
Empty
| Node of 'a * int * 'a t * 'a t * int
let height t =
match t with
| Empty... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/run/map_all.ml | ocaml | invalid_arg "Map.bal"
invalid_arg "Map.bal"
invalid_arg "Map.bal"
invalid_arg "Map.bal"
let c = Ord.compare x v in
a ghost function for verification that instantiates all universally embedded
* facts about t | Adapted from OCaml 's Map module by -bin/cvsweb/~checkout~/ocaml/stdlib/map.ml?rev=1.15.6.2;content-type=text%2Fplain
* -bin/cvsweb/~checkout~/ocaml/stdlib/map.ml?rev=1.15.6.2;content-type=text%2Fplain
*)
type 'a t =
Empty
| Node of 'a * int * 'a t * 'a t * int
let height t =
match t with
| Empty... |
7522b5f6e4445150a1e275f04cf5f0471476c54a3e8a016fb87f9f78d5be28e0 | VisionsGlobalEmpowerment/webchange | wrapper.cljs | (ns webchange.interpreter.renderer.scene.components.rectangle.wrapper
(:require
[webchange.interpreter.renderer.scene.filters.filters :as f]
[webchange.interpreter.renderer.scene.components.utils :as utils]
[webchange.interpreter.renderer.scene.components.wrapper :refer [create-wrapper]]))
(defn- get-bor... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fe9738f5c1d32036e7cd8a3744ee3774bc8a5748/src/cljs/webchange/interpreter/renderer/scene/components/rectangle/wrapper.cljs | clojure | (ns webchange.interpreter.renderer.scene.components.rectangle.wrapper
(:require
[webchange.interpreter.renderer.scene.filters.filters :as f]
[webchange.interpreter.renderer.scene.components.utils :as utils]
[webchange.interpreter.renderer.scene.components.wrapper :refer [create-wrapper]]))
(defn- get-bor... | |
619b5bb2bf53bd7245f87623b8f48fe8a7058bb31cfe6613cda75f8482dcbb06 | Plutonomicon/plutarch-plutus | Map.hs | # LANGUAGE QuantifiedConstraints #
module Plutarch.Extra.Map (
-- * Lookup
ptryLookup,
-- * Comparisons
pkeysEqual,
pkeysEqualUnsorted,
-- * Modification
pupdate,
padjust,
pmapWithKey,
-- * Folds
pfoldMapWithKey,
pfoldlWithKey,
-- * Conversion
pkeys,
-- * Key-value pair manipulation
... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/plutarch-extra/Plutarch/Extra/Map.hs | haskell | * Lookup
* Comparisons
* Modification
* Folds
* Conversion
* Key-value pair manipulation
| Like regular 'fmap' but it provides key of each element that is being
modified.
> b ) : -- > PMap keysort k a : -- > PMap ' Unsorted k b )
| If a value exists at the specified key, apply the function argument to it... | # LANGUAGE QuantifiedConstraints #
module Plutarch.Extra.Map (
ptryLookup,
pkeysEqual,
pkeysEqualUnsorted,
pupdate,
padjust,
pmapWithKey,
pfoldMapWithKey,
pfoldlWithKey,
pkeys,
pkvPairKey,
pkvPairValue,
pkvPairLt,
) where
import Plutarch.Api.V1.AssocMap (
KeyGuarantees (Sorted, Unsorted... |
38ce557e2e492351235f3dadc6b6c631343fa13510753bf2dfcb0b0364a0cc86 | euhmeuh/web-galaxy | info.rkt | #lang info
(define collection 'multi)
(define deps '("base" "anaphoric" "web-server-lib"))
(define build-deps '())
(define pkg-desc "Implementation (no documentation) part of \"web-galaxy\"")
(define pkg-authors '(euhmeuh))
(define version "0.1.0")
| null | https://raw.githubusercontent.com/euhmeuh/web-galaxy/2d9d5710aec25d961dcfc37a2e88c3c0f435021f/web-galaxy-lib/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("base" "anaphoric" "web-server-lib"))
(define build-deps '())
(define pkg-desc "Implementation (no documentation) part of \"web-galaxy\"")
(define pkg-authors '(euhmeuh))
(define version "0.1.0")
| |
525e05f4887f44fee6a4fae48b45f4a30d69f19efab4fa1433acd27b8ba7669b | jordanthayer/ocaml-search | vacuum_interfaces.ml | *
@author jtd7
@since 2010 - 10 - 25
@author jtd7
@since 2010-10-25
*)
open Vacuum
let symmetric_interface w lim =
let hd = (fun n -> let v = spanning_tree_heuristic n in v,v)
and rh = make_reverse_spanning_tree_heuristic w in
(Search_interface.make
~h:spanning_tree_heuristic
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/vacuum/vacuum_interfaces.ml | ocaml | *
@author jtd7
@since 2010 - 10 - 25
@author jtd7
@since 2010-10-25
*)
open Vacuum
let symmetric_interface w lim =
let hd = (fun n -> let v = spanning_tree_heuristic n in v,v)
and rh = make_reverse_spanning_tree_heuristic w in
(Search_interface.make
~h:spanning_tree_heuristic
... | |
ff0110ede1120a6401a2e6b7ef3d49e1a62cc1988ee1f47ef0658d84b9638684 | piotr-yuxuan/choose-a-new-phone | db.cljc | (ns choose-a-new-phone.db
(:require [cognitect.transit :as t]
[choose-a-new-phone.domain :as domain])
#?(:cljs (:require-macros [choose-a-new-phone.core :refer [dehydrated-default-db]])))
(def ui-default-page-lenth
"Educated guess. Should be enough to make `choose-a-new-phone.components.visible-back-... | null | https://raw.githubusercontent.com/piotr-yuxuan/choose-a-new-phone/b66affc9383cb0b0515dfb2f10d90f4964c2b869/src/choose_a_new_phone/db.cljc | clojure | (ns choose-a-new-phone.db
(:require [cognitect.transit :as t]
[choose-a-new-phone.domain :as domain])
#?(:cljs (:require-macros [choose-a-new-phone.core :refer [dehydrated-default-db]])))
(def ui-default-page-lenth
"Educated guess. Should be enough to make `choose-a-new-phone.components.visible-back-... | |
050d9f40fb21da918690850d1aa47d23f17261767ea98aa0e61affd3282881f2 | d-plaindoux/transept | parser.ml | module Utils = Transept_utils.Fun
module Monadic_via_response (R : Transept_specs.RESPONSE) = struct
let ( <$> ) p f s =
let open R in
fold (p s)
(fun (s, a, consumed) -> success (s, f a, consumed))
(fun (s, consumed) -> failure (s, consumed))
;;
let ( >>= ) p f s =
let open R in
fol... | null | https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_core/parser.ml | ocaml | sequence is tail recursive | module Utils = Transept_utils.Fun
module Monadic_via_response (R : Transept_specs.RESPONSE) = struct
let ( <$> ) p f s =
let open R in
fold (p s)
(fun (s, a, consumed) -> success (s, f a, consumed))
(fun (s, consumed) -> failure (s, consumed))
;;
let ( >>= ) p f s =
let open R in
fol... |
b09cde70e3c69057974276c91913cde8a7dbea8d2d6782f97df87a010a2c8d6c | TheRiver/CL-HEAP | condition.lisp | Copyright 2009 - 2010 < > .
;;;
This file is part of CL - HEAP
;;;
CL - HEAP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later ver... | null | https://raw.githubusercontent.com/TheRiver/CL-HEAP/e5796706c7db9302d7518241dd3baa8c018983b9/condition.lisp | lisp |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
----------------------------------------------------------------
-------------------------------------... | Copyright 2009 - 2010 < > .
This file is part of CL - HEAP
CL - HEAP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
CL - HEAP is distributed in the hope that ... |
de47ce4d11867fe4b185c25b78404a808281b06baac24c5b80761ab3eb788894 | re-ops/re-core | rpi.clj | (ns re-mote.repl.rpi
(:require
[re-mote.repl.output :refer (refer-out)]
[re-mote.repl.base :refer (refer-base)]
[re-cog.scripts.rpi :refer (set-screen)]))
(refer-base)
(refer-out)
(defn screen-on [hs]
(run (exec hs (set-screen :on)) | (pretty "screen-on")))
(defn screen-off [hs]
(run (exec hs (set-scr... | null | https://raw.githubusercontent.com/re-ops/re-core/077fe28c972ccc03459d29dcf9f0d150f66fa5c7/src/re_mote/repl/rpi.clj | clojure | (ns re-mote.repl.rpi
(:require
[re-mote.repl.output :refer (refer-out)]
[re-mote.repl.base :refer (refer-base)]
[re-cog.scripts.rpi :refer (set-screen)]))
(refer-base)
(refer-out)
(defn screen-on [hs]
(run (exec hs (set-screen :on)) | (pretty "screen-on")))
(defn screen-off [hs]
(run (exec hs (set-scr... | |
d02530c1b955f8b36b231fcdee0a732945ee2d0b14d5c770fc6b3824f757be7b | erlcloud/erlcloud | erlcloud_tests.erl | -module(erlcloud_tests).
-include_lib("eunit/include/eunit.hrl").
erlcloud_test_() ->
{foreach,
fun () ->
true = code:add_path(get_test_dir())
end,
[{<<"Single .hrl inclusion: check that 1 .hrl inclusion is enough, when the .hrl is required.">>,
fun include_one_by_one... | null | https://raw.githubusercontent.com/erlcloud/erlcloud/d1d60130929436b5524a0e70ae17f6da6a2a14b9/test/erlcloud_tests.erl | erlang | rebar3
rebar3 | -module(erlcloud_tests).
-include_lib("eunit/include/eunit.hrl").
erlcloud_test_() ->
{foreach,
fun () ->
true = code:add_path(get_test_dir())
end,
[{<<"Single .hrl inclusion: check that 1 .hrl inclusion is enough, when the .hrl is required.">>,
fun include_one_by_one... |
858fb92e20572095c00811378e389c2ec17de3c3f135ad261b383e4fe06afb93 | simingwang/emqx-plugin-kafkav5 | ssl_config.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/ssl-10.7/src/ssl_config.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2007 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ssl_config).
-include("ssl_internal.hrl").
-include("ssl_connection.hrl").
-include_lib("public_key/includ... |
43741413e73eadbd7de2ca90bf38b7eee9f6df6b3c535ed21c793aa476fc17d1 | evrim/core-server | blog.lisp | (in-package :core-server)
;; +----------------------------------------------------------------------------
;; | Core Server Example - Blog
;; +----------------------------------------------------------------------------
(defpackage :blog
(:use :cl :core-server :arnesi))
(in-package :blog)
;;
;; A persistent multi-u... | null | https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/examples/blog.lisp | lisp | +----------------------------------------------------------------------------
| Core Server Example - Blog
+----------------------------------------------------------------------------
A persistent multi-user blog example.
To run this example type in the repl:
(in-package :blog)
(register *server* *app*)
(s... | (in-package :core-server)
(defpackage :blog
(:use :cl :core-server :arnesi))
(in-package :blog)
:8080 / blog / index.core
(defclass+ author (object-with-id)
((email :initform (error "Please specify :email"))
(password :initform (error "Please specify :password"))
(name :initform nil)
(creation-date :i... |
58e6d85cb3bb10745ba49fa5df833ddce9c28d347c665e3fb765f275a9f84df6 | eyedouble/couchdb | edoc_modern.erl |
% -include("./edoc_modern_doc.hrl").
%% =====================================================================
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may
%% not use this file except in compliance with the License. You may obtain
%% a copy of the License at <-2.0>
%%
%% Unless requ... | null | https://raw.githubusercontent.com/eyedouble/couchdb/39830e536e803dfb492bfdb8b3644839cdd7e356/doc/_priv/edoc_modern.erl | erlang | -include("./edoc_modern_doc.hrl").
=====================================================================
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 ... |
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may
distributed under the License is distributed on an " AS IS " BASIS ,
General Public License ( the " LGPL " ) as published by the Free Software
Foundation ; either version 2.1 , or ( at your option ) any later version .
either the... |
30974546ee64edfc8b365c42b4d5da4b2e3c9a871cbfa49d5f419655e93d06e7 | BoeingX/haskell-programming-from-first-principles | WriteFilterFunctionSpec.hs | module Foldable.ChapterExercises.WriteFilterFunctionSpec where
import Data.Monoid
import Test.Hspec
import Foldable.ChapterExercises.WriteFilterFunction
spec :: Spec
spec = do
describe "Test filterF" $ do
it "filterF (const False) (1, 1)" $ do
(filterF (const False) (1, 1) :: (Sum Integer, Pro... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/test/Foldable/ChapterExercises/WriteFilterFunctionSpec.hs | haskell | module Foldable.ChapterExercises.WriteFilterFunctionSpec where
import Data.Monoid
import Test.Hspec
import Foldable.ChapterExercises.WriteFilterFunction
spec :: Spec
spec = do
describe "Test filterF" $ do
it "filterF (const False) (1, 1)" $ do
(filterF (const False) (1, 1) :: (Sum Integer, Pro... | |
4834daedf84e582d373507ece547d468f99538c3fdef11b6836299184e05a8fa | abrantesasf/sicp-abrantes-study-guide | barb-2005-recitation1.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MIT 6.001 Spring/2005 ; ; ; ; ;
1 : scheme expressions ; ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Student : ; ; ; ; ;
Date : 2019 -... | null | https://raw.githubusercontent.com/abrantesasf/sicp-abrantes-study-guide/c8d41093ed3d9944f003e88b7e1b7b29fbb6874a/recitations/1/barb-2005-recitation1.scm | scheme |
; ; ; ;
; ; ; ;
; ; ; ;
; ; ; ;
Evaluate:
Error, there is no name "b"
of the bind "define -> procedure to name things"!
#t
#f
expression return #f because Scheme evaluate the "#f" subexpression and
this alone was sufficient to determine the whole value of expression
to be false.
the boind "and -> boolea... |
(* 2 3)
6
(*2 3)
Error , there is no " * 2 " name binded to something
((*2 3))
Error , could not apply ( 6 )
(define a 5)
bound the name " a " with the value of expression " 5 " , is 5
a
5
b
(define b (+ a 2))
bound the name " b " with the value 7
a
5
b
7
(define a 3)
bound the name " a " ... |
eda8b557c901f631447bb290e6c59cc883c73263e2682d65900e4187055caa10 | bobatkey/CS316-18 | Lec11Live.hs | module Lec11Live where
import Prelude hiding (Functor (..), Applicative (..), Monad (..))
LECTURE 11 : APPLICATIVES AND MONADS
data Expr
= Number Int
| Add Expr Expr
| Mul Expr Expr
| If0ThenElse Expr Expr Expr
| Throw
| Catch Expr Expr
| Print String Expr
deriving Show
evaluate :: Expr... | null | https://raw.githubusercontent.com/bobatkey/CS316-18/282dc3c876527c14acfed7bd38f24c9ff048627a/lectures/Lec11Live.hs | haskell | (<*>) :: f a -> f (a -> b) -> f b
doOp :: (a -> b -> c) -> f a -> f b -> f c
class Monoid m where
mempty :: m
mappend :: m -> m -> m
ap :: f (a -> b) -> f a -> f b | module Lec11Live where
import Prelude hiding (Functor (..), Applicative (..), Monad (..))
LECTURE 11 : APPLICATIVES AND MONADS
data Expr
= Number Int
| Add Expr Expr
| Mul Expr Expr
| If0ThenElse Expr Expr Expr
| Throw
| Catch Expr Expr
| Print String Expr
deriving Show
evaluate :: Expr... |
417fea2f3cf6274b596a926f6faf4bb2c35956add037dd1a15b50d46ea22ce44 | antono/guix-debian | noweb.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/noweb.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages noweb)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (... |
5229808fcba70220a3249c71b91529781ac931b22db68a2fc728de8efba9221e | city41/mario-review | trouble-with-videos.cljs | (ns mario.trouble-with-videos
(:require [om.core :as om :include-macros true]
[mario.util :as util]
[sablono.core :as html :refer-macros [html]]))
(defn should-display-for-video []
#js {:display (if (util/must-use-gifs) "none" "")})
(defn should-display-for-gif []
#js {:display (if (util... | null | https://raw.githubusercontent.com/city41/mario-review/1b6ebfff88ad778a52865a062204cabb8deed0f9/review-app/src/client/trouble-with-videos.cljs | clojure | (ns mario.trouble-with-videos
(:require [om.core :as om :include-macros true]
[mario.util :as util]
[sablono.core :as html :refer-macros [html]]))
(defn should-display-for-video []
#js {:display (if (util/must-use-gifs) "none" "")})
(defn should-display-for-gif []
#js {:display (if (util... | |
ac908c8b29dfe20175d36ace0cfa8e3b5ed8baf849d732185986ecba56a98367 | leksah/leksah | WKWebView.hs | module Main (main) where
import Data.Default (def)
import Language.Javascript.JSaddle.WKWebView as JSaddleWK (runHTMLWithBaseURL)
import IDE.Web.Main (newIDE, startJSaddle)
main :: IO ()
main =
newIDE $ startJSaddle 3367 (\html url -> JSaddleWK.runHTMLWithBaseURL html url def)
| null | https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/main/WKWebView.hs | haskell | module Main (main) where
import Data.Default (def)
import Language.Javascript.JSaddle.WKWebView as JSaddleWK (runHTMLWithBaseURL)
import IDE.Web.Main (newIDE, startJSaddle)
main :: IO ()
main =
newIDE $ startJSaddle 3367 (\html url -> JSaddleWK.runHTMLWithBaseURL html url def)
| |
a4234d504d6459ce4395f5e18baf7a7d3a38aa4b4226a4afeb0723ffce4d359a | manetu/temporal-clojure-sdk | project.clj | (defproject io.github.manetu/temporal-sdk "0.12.2-SNAPSHOT"
:description "A Temporal SDK for Clojure"
:url "-clojure-sdk"
:license {:name "Apache License 2.0"
:url "-2.0"
:year 2022
:key "apache-2.0"}
:plugins [[lein-cljfmt "0.9.0"]
[lein-kibit "0.1.8"]
... | null | https://raw.githubusercontent.com/manetu/temporal-clojure-sdk/f28a099942b2c6b931bf6887df2c711a93a660f7/project.clj | clojure | (defproject io.github.manetu/temporal-sdk "0.12.2-SNAPSHOT"
:description "A Temporal SDK for Clojure"
:url "-clojure-sdk"
:license {:name "Apache License 2.0"
:url "-2.0"
:year 2022
:key "apache-2.0"}
:plugins [[lein-cljfmt "0.9.0"]
[lein-kibit "0.1.8"]
... | |
74437759c1a8f34eaa22b24ec2f2280b58e363fa9722ef350884614d5644abd7 | qnikst/okasaki | ex3_3.hs |
import Data.LeftishHeap
import Data.Heap.Class
fromList' :: Ord a => [a] -> LeftishHeap a
fromList' = head . go . (map singleton)
where
go [] = [empty]
go [x1] = [x1]
go [x1,x2] = [x1 `merge` x2]
go (x1:x2:xs) = go $ (x1 `merge` x2) : go xs
| null | https://raw.githubusercontent.com/qnikst/okasaki/f6f3c4211df16e4dde3a5cb4d6aaf19a68b99b0e/ch03/ex3_3.hs | haskell |
import Data.LeftishHeap
import Data.Heap.Class
fromList' :: Ord a => [a] -> LeftishHeap a
fromList' = head . go . (map singleton)
where
go [] = [empty]
go [x1] = [x1]
go [x1,x2] = [x1 `merge` x2]
go (x1:x2:xs) = go $ (x1 `merge` x2) : go xs
| |
95a4d2985f1c6c2385e65866238effeb5cb1ab8ec897b95464733866ad7e6717 | exclipy/pdata | BitUtil.hs | module Data.BitUtil where
import Data.Bits
import Data.Word
import Data.Int
import Data.List (foldl')
-- Bit operations
-- Given a bitmap and a subhash, this function returns the index into the list
fromBitmap :: (Integral b, Integral c) => Int32 -> b -> c
fromBitmap bitmap subHash =
let mask = fromIntegral (pre... | null | https://raw.githubusercontent.com/exclipy/pdata/b03682176f506c3484f4dcb39af82149c72772d0/Data/BitUtil.hs | haskell | Bit operations
Given a bitmap and a subhash, this function returns the index into the list | module Data.BitUtil where
import Data.Bits
import Data.Word
import Data.Int
import Data.List (foldl')
fromBitmap :: (Integral b, Integral c) => Int32 -> b -> c
fromBitmap bitmap subHash =
let mask = fromIntegral (pred (toBitmap subHash :: Word32)) :: Int32
in bitCount32 $ bitmap .&. mask
toBitmap :: (Bi... |
fbb9a3888501b56031e19d1960889248ab23df2d0e6e0f57bb71c937ab553740 | Twinside/Eq | Repl.hs | module Language.Eq.Repl( repl ) where
import qualified Data.Map as Map
import Language.Eq.Algorithm.Utils
import Language.Eq.Types
import Language.Eq.Renderer.Ascii
import Language.Eq.Renderer.RenderConf
import Language.Eq.BaseLibrary
import Language.Eq.InputParser.EqCode
import Language.Eq.EvaluationContext
import ... | null | https://raw.githubusercontent.com/Twinside/Eq/60105372d55420735b722245db7021c239c812f4/Language/Eq/Repl.hs | haskell | module Language.Eq.Repl( repl ) where
import qualified Data.Map as Map
import Language.Eq.Algorithm.Utils
import Language.Eq.Types
import Language.Eq.Renderer.Ascii
import Language.Eq.Renderer.RenderConf
import Language.Eq.BaseLibrary
import Language.Eq.InputParser.EqCode
import Language.Eq.EvaluationContext
import ... | |
4a8e569131c463c3b476114f701bd52ab7b26b86c12c83793175b82b53a4bd77 | hasktorch/ffi-experimental | NNSpec.hs | # LANGUAGE RecordWildCards #
# LANGUAGE FunctionalDependencies #
# LANGUAGE DeriveGeneric #
# LANGUAGE NoMonomorphismRestriction #
module NNSpec(spec) where
import Test.Hspec
import Control.Exception.Safe
import Control.Monad.State.Strict
import Torch.Tensor
import Torch.NN
import GHC.Generics
spec :: Spec
spec = d... | null | https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/hasktorch/test/NNSpec.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE FunctionalDependencies #
# LANGUAGE DeriveGeneric #
# LANGUAGE NoMonomorphismRestriction #
module NNSpec(spec) where
import Test.Hspec
import Control.Exception.Safe
import Control.Monad.State.Strict
import Torch.Tensor
import Torch.NN
import GHC.Generics
spec :: Spec
spec = d... | |
c448844d74ea293dd713e459db9ab4e3289decfefc2ef9fd8ade7eec41af9f0f | privet-kitty/cl-competitive | 2d-rolling-hash.lisp | (defpackage :cp/2d-rolling-hash
(:use :cl)
(:export #:make-rhash2d #:rhash2d-matrix-hash)
(:documentation "Provides 2D rolling hash.
Key length: 32-bit"))
(in-package :cp/2d-rolling-hash)
This table consists of pairs of primes less than 2 ^ 32 and the random
primitive roots modulo them larger than 10 ^ 9 . ... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/6616d697c7ad4d5ed5dcdb2bcd0576e865d0f835/module/2d-rolling-hash.lisp | lisp | adopt the prime as modulus and the primitive root as base.
avoid the same modulus
compute hash values in the horizontal direction
compute hash values in the vertical direction
compute hash values in the horizontal direction | (defpackage :cp/2d-rolling-hash
(:use :cl)
(:export #:make-rhash2d #:rhash2d-matrix-hash)
(:documentation "Provides 2D rolling hash.
Key length: 32-bit"))
(in-package :cp/2d-rolling-hash)
This table consists of pairs of primes less than 2 ^ 32 and the random
primitive roots modulo them larger than 10 ^ 9 . ... |
345d7fc7d1c1d81054ff92771d6d06831b82a5e34329313006f93e81c65b629e | gren-lang/compiler | Terminal.hs | module Terminal
( app,
prefix,
Command (..),
Summary (..),
Flags,
noFlags,
flags,
(|--),
Flag,
flag,
onOff,
Parser (..),
Args,
noArgs,
required,
optional,
zeroOrMore,
oneOrMore,
oneOf,
require0,
require1,
require2,
require3,
r... | null | https://raw.githubusercontent.com/gren-lang/compiler/7b98ca5979e2c5c0698af2943c936f731d5dee1b/terminal/impl/Terminal.hs | haskell | ),
COMMAND
PREFIX
AUTO-COMPLETE
) :: Flags (a -> b) -> Flag a -> Flags b
) =
FLAG
FANCY ARGS
SIMPLE ARGS
SUGGEST FILES
file names:
suggestFiles [] -- suggests any file
suggests only .gren files
suggests only .js and .html files
Notice that you can limit the suggestion by the file extension!... | module Terminal
( app,
prefix,
Command (..),
Summary (..),
Flags,
noFlags,
flags,
Flag,
flag,
onOff,
Parser (..),
Args,
noArgs,
required,
optional,
zeroOrMore,
oneOrMore,
oneOf,
require0,
require1,
require2,
require3,
require4,
... |
f7a4c0b3a8b80d62cdb3b1aae6c87bc4bf3f5bc607b55de131fdbfed78017fdf | clojure-interop/aws-api | AbstractAmazonKinesis.clj | (ns com.amazonaws.services.kinesis.AbstractAmazonKinesis
"Abstract implementation of AmazonKinesis. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazo... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.kinesis/src/com/amazonaws/services/kinesis/AbstractAmazonKinesis.clj | clojure | (ns com.amazonaws.services.kinesis.AbstractAmazonKinesis
"Abstract implementation of AmazonKinesis. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazo... | |
7036a04530c2ea495623b5aa821b73415fdf61064fb8c6e3d4e836bb4bbbb2b6 | typedclojure/typedclojure | typedclojure_ann.cljc | (ns typed-example.zero-deps.typedclojure-ann
(:require [typed.clojure :as t]
[typed-example.zero-deps :as-alias zd]))
(t/defalias MyStr t/Str)
(t/ann zd/foo [(t/Vec MyStr) :-> (t/Vec MyStr)])
| null | https://raw.githubusercontent.com/typedclojure/typedclojure/f20949883029f3875457ffc6e446afbee8531fb3/example-projects/zero-deps/src/typed_example/zero_deps/typedclojure_ann.cljc | clojure | (ns typed-example.zero-deps.typedclojure-ann
(:require [typed.clojure :as t]
[typed-example.zero-deps :as-alias zd]))
(t/defalias MyStr t/Str)
(t/ann zd/foo [(t/Vec MyStr) :-> (t/Vec MyStr)])
| |
a334a7593d3ac5701842e30509d3b73f6531a87dd5fa2322d5e6369b994722ab | alexandroid000/improv | GetMapActionGoal.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Nav_msgs.GetMapActionGoal where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBin... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Nav_msgs/Ros/Nav_msgs/GetMapActionGoal.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Nav_msgs.GetMapActionGoal where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
... |
975037ab34742faa2f8acf302c6762d927784faa45392fe5914ce040fc7cc1e6 | avsm/eeww | exn.mli | (** Exceptions.
[sexp_of_t] uses a global table of sexp converters. To register a converter for a new
exception, add [[@@deriving sexp]] to its definition. If no suitable converter is
found, the standard converter in [Printexc] will be used to generate an atomic
S-expression. *)
open! Import
type t ... | null | https://raw.githubusercontent.com/avsm/eeww/49cbc7b7250611c1e909d4defde0027a5ef28157/lib/base/src/exn.mli | ocaml | * Exceptions.
[sexp_of_t] uses a global table of sexp converters. To register a converter for a new
exception, add [[@@deriving sexp]] to its definition. If no suitable converter is
found, the standard converter in [Printexc] will be used to generate an atomic
S-expression.
* Same as [raise], except ... |
open! Import
type t = exn [@@deriving_inline sexp_of]
val sexp_of_t : t -> Sexplib0.Sexp.t
[@@@end]
include Pretty_printer.S with type t := t
* Raised when finalization after an exception failed , too .
The first exception argument is the one raised by the initial
function , the second exception the o... |
0e1e7b0d43026086156ecc776ff44668d33bd7d954fe8cd41af997cfc008d7b9 | coq-community/coqffi | type_aliases.ml | type 'a u
type v = int u
type t
module T = struct
type key = t
type 'a t = 'a option
end
| null | https://raw.githubusercontent.com/coq-community/coqffi/0e31ff7bcced176afd6233c7825f4bd41ab894ce/examples/src/type_aliases.ml | ocaml | type 'a u
type v = int u
type t
module T = struct
type key = t
type 'a t = 'a option
end
| |
5a3ea91333b4cc92bb36c63e37001c499776be04155720cceaae3a6635a150fb | tomjridge/tjr_kv | dummy_dmap_layer.ml | * { 2 Archived dummy Pcache and pcache_thread ; do not use }
open Tjr_monad . With_lwt
open Kv_intf
open Lwt_aux ( * provides various msg queues
open Tjr_monad.With_lwt
open Kv_intf
open Lwt_aux (* provides various msg queues *)
open Config
open Kv_profilers
module S = struct
type k = string
let com... | null | https://raw.githubusercontent.com/tomjridge/tjr_kv/68b3d2fa0c7a144765a3720d78cffb96d5478b32/src/_archive/dummy_dmap_layer.ml | ocaml | provides various msg queues
NOTE queues are mutable
* NOTE the following enqueues a find event on the msg queue, and
constructs a promise that waits for the result
Printf.printf "bt_handle_detach start\n%!";
Printf.printf "bt_handle_detach end\n%!";
FIXME we really want an implementation that uses polyma... | * { 2 Archived dummy Pcache and pcache_thread ; do not use }
open Tjr_monad . With_lwt
open Kv_intf
open Lwt_aux ( * provides various msg queues
open Tjr_monad.With_lwt
open Kv_intf
open Config
open Kv_profilers
module S = struct
type k = string
let compare: k -> k -> int = Pervasives.compare
typ... |
30d3fc93ae602146cd3007a452663263e1192999493cad316fc73dae13f2e6de | discus-lang/salt | Exp.hs |
module Salt.Core.Exp
( module Salt.Core.Exp.Name
, module Salt.Core.Exp.Ups
, module Salt.Core.Exp.Snv
, module Salt.Core.Exp.Type
, module Salt.Core.Exp.TypeEnv
, module Salt.Core.Exp.Term
, module Salt.Core.Exp.TermEnv
, module Salt.Core.Exp.Term.Predic... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Exp.hs | haskell |
module Salt.Core.Exp
( module Salt.Core.Exp.Name
, module Salt.Core.Exp.Ups
, module Salt.Core.Exp.Snv
, module Salt.Core.Exp.Type
, module Salt.Core.Exp.TypeEnv
, module Salt.Core.Exp.Term
, module Salt.Core.Exp.TermEnv
, module Salt.Core.Exp.Term.Predic... | |
70537c7ed2d232e97eb5be81a57d9e3cefc9e47a559c92ddcc531ec0588dcfe3 | nuvla/ui | events.cljs | (ns sixsq.nuvla.ui.routing.events
(:require [re-frame.core :refer [reg-event-db reg-event-fx]]
[reitit.frontend :refer [match-by-path]]
[reitit.frontend.controllers :as rfc]
[sixsq.nuvla.ui.main.spec :as main-spec]
[sixsq.nuvla.ui.routing.effects :as fx]
[si... | null | https://raw.githubusercontent.com/nuvla/ui/2a8b023aaea65934f2fb57bb2c3b6df84f37258c/code/src/cljs/sixsq/nuvla/ui/routing/events.cljs | clojure | In case of normal anchor tag click, we do not fire ::history-events/navigate
which then fires `on-navigate` after URL changed already.
That's why we test here for changes-protection? (which we also do in ::history-events/navigate)
and revert by navigating back if changes-protection? is true.
In case of not confirm... | (ns sixsq.nuvla.ui.routing.events
(:require [re-frame.core :refer [reg-event-db reg-event-fx]]
[reitit.frontend :refer [match-by-path]]
[reitit.frontend.controllers :as rfc]
[sixsq.nuvla.ui.main.spec :as main-spec]
[sixsq.nuvla.ui.routing.effects :as fx]
[si... |
096aea9e1404984aa145d8aabd3cde988a077e3d1e579e4afd0e329b863133a5 | garrigue/lablgtk | testgoocanvas2.ml |
let locale = GtkMain.Main.init ()
let add_stuff ?pixfile canvas =
let group = canvas#get_root_item in
let r1 = GooCanvas.rect
~props: [`X 10. ; `Y 50. ; `WIDTH 200. ; `HEIGHT 100. ;
`LINE_WIDTH 1. ; `FILL_COLOR "red"] group
in
let text =
let font_desc = Pango.Font.from_string "Sans 14" in
le... | null | https://raw.githubusercontent.com/garrigue/lablgtk/ff9f912ebc9c26c581d7ba5bad548a8841e52ea4/examples/goocanvas2/testgoocanvas2.ml | ocaml |
let locale = GtkMain.Main.init ()
let add_stuff ?pixfile canvas =
let group = canvas#get_root_item in
let r1 = GooCanvas.rect
~props: [`X 10. ; `Y 50. ; `WIDTH 200. ; `HEIGHT 100. ;
`LINE_WIDTH 1. ; `FILL_COLOR "red"] group
in
let text =
let font_desc = Pango.Font.from_string "Sans 14" in
le... | |
57b812b82009c402ff142b397b3db732f8fdf8f2ecb2e21e9b09601934fd2aab | jacius/lispbuilder | pixel.lisp |
(in-package #:lispbuilder-sdl)
;; (defun write-pixel (x y color &key (surface *default-surface*) (raw-color nil))
;; (funcall (pixel-writer surface) x y (if raw-color
;; color
;; (map-color color surface))))
( defun read - pixel ( x y & key ( surface * default - surface * ) )
;; (funcall (pixel... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/sdl/pixel.lisp | lisp | (defun write-pixel (x y color &key (surface *default-surface*) (raw-color nil))
(funcall (pixel-writer surface) x y (if raw-color
color
(map-color color surface))))
(funcall (pixel-reader surface) x y)) |
(in-package #:lispbuilder-sdl)
( defun read - pixel ( x y & key ( surface * default - surface * ) )
(defun bit-depth (&optional (surface *default-surface*))
"Returns the number of bytes per pixel, or bpp, of `SURFACE`."
(check-type surface sdl-surface)
(with-foreign-slots ((sdl-cffi::BitsPerPixel)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.