_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 |
|---|---|---|---|---|---|---|---|---|
ee2562e25f1cd0d91287c66d7be91333a3b36425feb4eddf41163b50dccca716 | hjcapple/reading-sicp | exercise_3_67.scm | #lang racket
P237 - [ 练习 3.67 ]
(require "stream.scm")
(require "infinite_stream.scm")
(define (interleave s1 s2)
(if (stream-null? s1)
s2
(cons-stream (stream-car s1)
(interleave s2 (stream-cdr s1)))))
将其分成 4 块
; 左上角一个数字,最上面一行,最左边一行,右下角一大块
(define (all-pairs s t)
(cons-stream... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_67.scm | scheme | 左上角一个数字,最上面一行,最左边一行,右下角一大块
| #lang racket
P237 - [ 练习 3.67 ]
(require "stream.scm")
(require "infinite_stream.scm")
(define (interleave s1 s2)
(if (stream-null? s1)
s2
(cons-stream (stream-car s1)
(interleave s2 (stream-cdr s1)))))
将其分成 4 块
(define (all-pairs s t)
(cons-stream
(list (stream-car s) (st... |
af80fbaf85cb7d60c7295eaf9d4d72d48b5cd0ecfa3dcb21cc7fc74836bab243 | arttuka/reagent-material-ui | date_picker.cljs | (ns reagent-mui.x.date-picker
"Imports @mui/x-date-pickers/DatePicker as a Reagent component.
Original documentation is at -pickers/date-picker/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/DatePicker" :as MuiDatePicker]))
(def date-picker (r/adapt-react-class MuiDatePicker/DatePicker))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/x/reagent_mui/x/date_picker.cljs | clojure | (ns reagent-mui.x.date-picker
"Imports @mui/x-date-pickers/DatePicker as a Reagent component.
Original documentation is at -pickers/date-picker/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/DatePicker" :as MuiDatePicker]))
(def date-picker (r/adapt-react-class MuiDatePicker/DatePicker))
| |
8aa5e47f291dd8071d62a231a22d55118bdc172fdbf96b634a74ee878ab8c776 | gren-lang/compiler | Instantiate.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wall #
module Type.Instantiate
( FreeVars,
fromSrcType,
)
where
import AST.Canonical qualified as Can
import Data.Map.Strict ((!))
import Data.Map.Strict qualified as Map
import Data.Name qualified as Name
import Type.Type
FREE VARS
type FreeVars =
Map.M... | null | https://raw.githubusercontent.com/gren-lang/compiler/49d5e5c5994a846d82c9518dcee06112c7630664/compiler/src/Type/Instantiate.hs | haskell | # LANGUAGE OverloadedStrings #
FROM SOURCE TYPE | # OPTIONS_GHC -Wall #
module Type.Instantiate
( FreeVars,
fromSrcType,
)
where
import AST.Canonical qualified as Can
import Data.Map.Strict ((!))
import Data.Map.Strict qualified as Map
import Data.Name qualified as Name
import Type.Type
FREE VARS
type FreeVars =
Map.Map Name.Name Type
fromSrcType :: ... |
df0797d69a6f6e744b034508c46f2b68db0bb62495b54191d2f818dd03c4ff9a | josephwilk/stereotype | entities.clj | (ns stereotype.entities)
(defn id-for [identifier]
(cond
(map? identifier)
(:name identifier)
:else
identifier))
(defn- var-called [identifier]
(let [possible-var
(-> identifier
name
symbol
resolve)]
(if possible-var
(var-get possible-var)
... | null | https://raw.githubusercontent.com/josephwilk/stereotype/49c845ec7e5b401f5cd6c6e8de6c79fbe60eade8/src/stereotype/entities.clj | clojure | (ns stereotype.entities)
(defn id-for [identifier]
(cond
(map? identifier)
(:name identifier)
:else
identifier))
(defn- var-called [identifier]
(let [possible-var
(-> identifier
name
symbol
resolve)]
(if possible-var
(var-get possible-var)
... | |
bf2bbb72ce1dcec4b7c7f9342356efa2d9af01a5c1030ad5e474da8dae44585b | CorticalComputer/DXNN2 | cortex.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This source code and work is provided and developed by . COM
%
The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print I... | null | https://raw.githubusercontent.com/CorticalComputer/DXNN2/d57d43a91f125f3930e06611f5fce15a0462b32f/src/cortex.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | This source code and work is provided and developed by . COM
The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print ISBN : 978 - 1 - 4614 - 4462 - 6 ebook ISBN : 978 - 1 - 4614 - 4463 - 6 .
Co... |
6a82f5cda23d682f771ea94aecf960cd7a0c071ba05382320f18539396f2c766 | EligiusSantori/L2Apf | login_auth.scm | (module system racket/base
(provide login-client-packet/login-auth)
(require "../../../library/rsa.scm")
(require "../../packet.scm")
(define (login-client-packet/login-auth struct)
(let ((s (open-output-bytes)) (rsa-key (cdr (assoc 'rsa-key struct))))
(if rsa-key
(begin
(write-bytes (make-b... | null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/login/client/login_auth.scm | scheme | (module system racket/base
(provide login-client-packet/login-auth)
(require "../../../library/rsa.scm")
(require "../../packet.scm")
(define (login-client-packet/login-auth struct)
(let ((s (open-output-bytes)) (rsa-key (cdr (assoc 'rsa-key struct))))
(if rsa-key
(begin
(write-bytes (make-b... | |
49418236cc61f1cab01d4fd4a24b32b6011fad3977e4f248356f30f99864e82a | nikodemus/SBCL | array.lisp | the MIPS definitions for array operations
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public doma... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/mips/array.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Allocator for the array header.
Remove the extraneous fixnum tag bits because TYPE and RANK
were fixnums
Additional accessors and setters fo... | the MIPS definitions for array operations
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(define-vop (make-array-header)
(:policy :fast-safe)
(... |
61ee35006652478311abd7dc046a44534e6a12f9d64d49f0edefe5cd884c8a51 | namin/metamk | ex-cbv-lc-tests.scm | (load "mk2.scm")
(load "utils.scm")
(load "vanilla.scm")
(load "meta.scm")
(load "ex-cbv-lc.scm")
(load "preduce.scm")
(load "test-check.scm")
(test-check "1 CBV LC"
(run* (q) (eval-expo '((lambda (x) (x x)) (lambda (x) x)) '() q))
'((closure x x ())))
(test-check "2 CBV LC"
(run 10 (q) (eval-expo q '() '(closu... | null | https://raw.githubusercontent.com/namin/metamk/8a6084888c87444a84f18cf6e470456837b75cfc/ex-cbv-lc-tests.scm | scheme | TODO: need to figure out fold/unfold
TODO: what do we want? | (load "mk2.scm")
(load "utils.scm")
(load "vanilla.scm")
(load "meta.scm")
(load "ex-cbv-lc.scm")
(load "preduce.scm")
(load "test-check.scm")
(test-check "1 CBV LC"
(run* (q) (eval-expo '((lambda (x) (x x)) (lambda (x) x)) '() q))
'((closure x x ())))
(test-check "2 CBV LC"
(run 10 (q) (eval-expo q '() '(closu... |
3ca44d1eab07ec440882e51636966f4887025698a3c28990df43335764e4eeb8 | rtoy/ansi-cl-tests | member-if-not.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Mar 28 07:39:29 1998
;;;; Contains: Tests of MEMBER-IF-NOT
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest member-if-not.1
(member-if-not #'listp nil)
nil)
(deftest member-if-not.2
(member-if-not #'(lambda (x) (eqt x 'a)) '(a 1 2 a 3 4... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/member-if-not.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of MEMBER-IF-NOT
Order of evaluation tests
Keyword tests
Error tests | Author :
Created : Sat Mar 28 07:39:29 1998
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest member-if-not.1
(member-if-not #'listp nil)
nil)
(deftest member-if-not.2
(member-if-not #'(lambda (x) (eqt x 'a)) '(a 1 2 a 3 4))
(1 2 a 3 4))
(deftest member-if-not.3
(member-if-not #... |
477e6afec502997a888216c6f6d4b1be150199917a6306fecb9c6ae6885091b3 | tlaplus/tlapm | fingerprints.mli | Computing fingerprints of proof obligations .
Copyright ( C ) 2011 INRIA and Microsoft Corporation
Copyright (C) 2011 INRIA and Microsoft Corporation
*)
(* tlapm.ml *)
val write_fingerprint:
Proof.T.obligation -> Proof.T.obligation
| null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/backend/fingerprints.mli | ocaml | tlapm.ml | Computing fingerprints of proof obligations .
Copyright ( C ) 2011 INRIA and Microsoft Corporation
Copyright (C) 2011 INRIA and Microsoft Corporation
*)
val write_fingerprint:
Proof.T.obligation -> Proof.T.obligation
|
d0d88246b8691945a516ae3cec203514ef2c461315794a4f76134fe4aca86f09 | potatosalad/erlang-jose | jose_xchacha20_poly1305.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 14 Sep 2019 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Types
jose_block_encryptor callbacks
jose_xchacha20_poly1305 callbacks
==================================================================... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 14 Sep 2019 by < >
-module(jose_xchacha20_poly1305).
-behaviour(jose_block_encryptor).
-type additional_authenticated_data() :: binary().
-type cipher_text() :: binary().
-t... |
9f227e684f856ac93e1293beb1a350a4388b712f6f905614e3e538a90101ab28 | nubank/selvage | flow.clj | (ns selvage.test.flow
"clojure.test version of the flow macro"
(:require [schema.core :as s]
[selvage.core :as core]
[clojure.spec.test.alpha :as spec.test]
[clojure.test :as t]
[selvage.visibility :as vis]
[taoensso.timbre :as timbre])
(:import [j... | null | https://raw.githubusercontent.com/nubank/selvage/3b2da9c95e82c7f2cbacb6cae3ed3af131d8a5e4/src/selvage/test/flow.clj | clojure | time accounting might be improved | (ns selvage.test.flow
"clojure.test version of the flow macro"
(:require [schema.core :as s]
[selvage.core :as core]
[clojure.spec.test.alpha :as spec.test]
[clojure.test :as t]
[selvage.visibility :as vis]
[taoensso.timbre :as timbre])
(:import [j... |
bc720096a67e0341855906e694a2b8446040cbd04143aae42f739eb75f7ad747 | mmottl/gsl-ocaml | blas.mli |
(** BLAS support *)
type order =
| RowMajor
| ColMajor
type transpose =
| NoTrans
| Trans
| ConjTrans
type uplo =
| Upper
| Lower
type diag =
| NonUnit
| Unit
type side =
| Left
| Right
open Matrix
open Vector
* { 3 LEVEL 1 }
external dot : vector -> vector -> float
= "ml_gsl_blas_dd... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/blas.mli | ocaml | * BLAS support |
type order =
| RowMajor
| ColMajor
type transpose =
| NoTrans
| Trans
| ConjTrans
type uplo =
| Upper
| Lower
type diag =
| NonUnit
| Unit
type side =
| Left
| Right
open Matrix
open Vector
* { 3 LEVEL 1 }
external dot : vector -> vector -> float
= "ml_gsl_blas_ddot"
external nrm2 :... |
e9b313c6d76fdb339bf4384baa34b4977b5b8312ce2d3564b1115e1ffa23e53a | babariviere/guix-emacs | melpa-build-system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2018 , 2019 < >
;;;
;;; 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 ... | null | https://raw.githubusercontent.com/babariviere/guix-emacs/089646a93f9735995d0d4d998066d84e5feea961/emacs/build/melpa-build-system.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 © 2015 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2018 , 2019 < >
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 (emacs build m... |
aa85d542ab76dd971626abded9ad9e2090f2ea303e3e2839ae38a33d0627cb48 | ocaml-opam/opam-0install-solver | opam_0install_cudf.mli | type t
type selections
type diagnostics
val create :
?prefer_oldest:bool ->
constraints:(Cudf_types.pkgname * (Cudf_types.relop * Cudf_types.version)) list ->
Cudf.universe ->
t
(** [create ~constraints universe] is a solver that gets candidates from [universe],
filtering them using [constraints].
@... | null | https://raw.githubusercontent.com/ocaml-opam/opam-0install-solver/0512f1a6e62995cf56183b69910b621d265dc42e/lib-cudf/opam_0install_cudf.mli | ocaml | * [create ~constraints universe] is a solver that gets candidates from [universe],
filtering them using [constraints].
@param prefer_oldest if [true] the solver is set to return the least
up-to-date version of each package, if a solution exists. This is [false] by
default.
@before 0.4 the [prefer_o... | type t
type selections
type diagnostics
val create :
?prefer_oldest:bool ->
constraints:(Cudf_types.pkgname * (Cudf_types.relop * Cudf_types.version)) list ->
Cudf.universe ->
t
val solve :
t ->
(Cudf_types.pkgname * [`Essential | `Recommended]) list ->
(selections, diagnostics) result
val packages_o... |
f14171672773f813cd9a4b387b58793eb395fd9f43952364dc2a29628bfd7200 | pelzlpj/orpie | rcfile.ml | Orpie -- a fullscreen RPN calculator for the console
* Copyright ( C ) 2003 - 2004 , 2005 , 2006 - 2007 , 2010 , 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License , Version 3 ,
* as published by the Free Soft... | null | https://raw.githubusercontent.com/pelzlpj/orpie/8b3bb833cedad0125aa9e9cb01d253156993e20b/src/orpie/rcfile.ml | ocaml | These hashtables store conversions between curses keys and the operations
* they are associated with.
Default editor for fullscreen viewing
Whether or not to hide the help panel
Whether or not to conserve memory in favor of faster display
Autobinding keys
List of included rc files
Unit definition table
... | Orpie -- a fullscreen RPN calculator for the console
* Copyright ( C ) 2003 - 2004 , 2005 , 2006 - 2007 , 2010 , 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License , Version 3 ,
* as published by the Free Soft... |
67bd15d11404fc12a340cb32c5da20660976e7aa510260a6f9822610494a6bfa | takikawa/racket-ppa | wxme.rkt | (module wxme mzscheme
(require mzlib/port
mzlib/string
mzlib/kw
racket/class
racket/contract
mzlib/list
scheme/gui/dynamic
syntax/modread
(only racket/snip/private/snip int->img-type)
(only racket/base make-hash hash-re... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/wxme-lib/wxme/wxme.rkt | racket | ----------------------------------------
only a few
built-in classes are required
Built-in snip class:
Extension snip class:
Return bytes for the stream:
Filter the non-bytes result, and then wrap it as
a special stream result:
----------------------------------------
previously-read-bytes : (or/c #f hash?)... | (module wxme mzscheme
(require mzlib/port
mzlib/string
mzlib/kw
racket/class
racket/contract
mzlib/list
scheme/gui/dynamic
syntax/modread
(only racket/snip/private/snip int->img-type)
(only racket/base make-hash hash-re... |
36f2d0eaa34acc0cfa6115b176d6ff2d9215c8c0db82304ef4b6dda7a015bb6e | kozross/mtl-ng | State.hs | # LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
module MTL.State
( -- * Type class
MonadState (..),
-- * Helper functions
modify,
-- * Derivation helper
Lif... | null | https://raw.githubusercontent.com/kozross/mtl-ng/a4ddb98d1320a49193bf91d56f4af4fdd0c41eea/src/MTL/State.hs | haskell | * Type class
* Helper functions
* Derivation helper
| Laws
* /Get-get/: @'get' '*>' 'get'@ @=@ @'get'@
* /Get-put/: @'get' '>>=' 'put'@ @=@ @'pure' ()@
* /Put-put/: @'put' x '*>' 'put' y@ @=@ @'put' y@
@since 1.0.0
@since 1.0.0
| A convenience newtype for writing \'lifted\' instances over transformers.
@... | # LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
module MTL.State
MonadState (..),
modify,
LiftingState (..),
)
where
import Control.Category ((>>>))
import Data.Fu... |
4d4fe6ea1cf68f81f2ccfce7309363a212687edbef93a24c9e63ff8c9a5c8e96 | abarbu/haskell-torch | Types.hs | # LANGUAGE OverloadedStrings , QuasiQuotes , ScopedTypeVariables , TemplateHaskell #
| All of the types we need to talk to PyTorch . These will be wrapped and not
-- shown to users.
module Torch.C.Types where
import qualified Data.Map as Map
import Data.Monoid (mempty, (<>))
... | null | https://raw.githubusercontent.com/abarbu/haskell-torch/e0afcaf81b78e9211ba120dcd247f9a6112b57ab/haskell-torch-cbindings/src/Torch/C/Types.hs | haskell | shown to users.
Tensors
Jit
tensors
variables | # LANGUAGE OverloadedStrings , QuasiQuotes , ScopedTypeVariables , TemplateHaskell #
| All of the types we need to talk to PyTorch . These will be wrapped and not
module Torch.C.Types where
import qualified Data.Map as Map
import Data.Monoid (mempty, (<>))
import Fo... |
4be2dec48bfca9ed9be96b7092fdddcbe2ce14cabb34f3db1ce3ff37dad60dce | inhabitedtype/ocaml-aws | createResourceDataSync.ml | open Types
open Aws
type input = CreateResourceDataSyncRequest.t
type output = unit
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service reg... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/createResourceDataSync.ml | ocaml | open Types
open Aws
type input = CreateResourceDataSyncRequest.t
type output = unit
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service reg... | |
e31ef21834116e8b3cf74132671360785383e7eef793574d6c2d5337868b7a4d | pirapira/coq2rust | extraction.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/extraction/extraction.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
s Extraction from Coq terms t... |
b47c542364e01924e949b096183bb6ef51c0c0907d677cfb64af116fdcb2c35c | tfausak/exercism-solutions | queen-attack_test.hs | import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import Queens (boardString, canAttack)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
t... | null | https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/queen-attack/queen-attack_test.hs | haskell | import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import Queens (boardString, canAttack)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
t... | |
f6dbd0b6c068efad26551761e219ef1aa2347d7fac0a88c72a471d4d345a1550 | felipeZ/Haskell-abinitio | ParsecTools.hs |
module Science.QuantumChemistry.ParsecTools where
import Science.QuantumChemistry.ParsecTools.ParserBasis
import Science.QuantumChemistry.ParsecTools.ParseUtils
| null | https://raw.githubusercontent.com/felipeZ/Haskell-abinitio/c019bc37c8de78affddf97eb858c1ef18af76d83/Science/QuantumChemistry/ParsecTools.hs | haskell |
module Science.QuantumChemistry.ParsecTools where
import Science.QuantumChemistry.ParsecTools.ParserBasis
import Science.QuantumChemistry.ParsecTools.ParseUtils
| |
dca47860b38c2bbfcec3473d08f5fbdb86001a86bf1bfe84ef30d14da35abd10 | clojure-vim/neovim-client | nvim.clj | (ns neovim-client.nvim
(:require [clojure.core.async :as async]
[clojure.string :as str]
[clojure.tools.logging :as log]
[neovim-client.message :as message :refer [->request-msg]]
[neovim-client.parser :as parser]
[neovim-client.rpc :as rpc])
(:import (jav... | null | https://raw.githubusercontent.com/clojure-vim/neovim-client/664813b6890b9acdf4cdf58ea72049744898159f/src/neovim_client/nvim.clj | clojure | This could be a problem, making a synchronous call here, but we
want a way from preventing attempts against a bad api version.
allocates a new channel. | (ns neovim-client.nvim
(:require [clojure.core.async :as async]
[clojure.string :as str]
[clojure.tools.logging :as log]
[neovim-client.message :as message :refer [->request-msg]]
[neovim-client.parser :as parser]
[neovim-client.rpc :as rpc])
(:import (jav... |
febf927cc40119f3713b07a646ac7e6fd2024a4820f8374d163f0ef6698b9b35 | jamis/rtc-ocaml | RTCConst.ml | let epsilon = 0.0001
| null | https://raw.githubusercontent.com/jamis/rtc-ocaml/f5ba04e874ef0b54d100cdabfe9a67c2b80a643f/src/RTCConst.ml | ocaml | let epsilon = 0.0001
| |
835ce656249370a48ef2813e1f6bb98731c2e57c278fa79a2f3984de56156e61 | heraldry/heraldicon | chief.cljs | (ns heraldicon.heraldry.ordinary.type.chief
(:require
[clojure.string :as str]
[heraldicon.context :as c]
[heraldicon.heraldry.cottising :as cottising]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.line.core :as line]
[heraldicon.heraldry.ordinary.interface :as ordinar... | null | https://raw.githubusercontent.com/heraldry/heraldicon/54e003614cf2c14cda496ef36358059ba78275b0/src/heraldicon/heraldry/ordinary/type/chief.cljs | clojure | (ns heraldicon.heraldry.ordinary.type.chief
(:require
[clojure.string :as str]
[heraldicon.context :as c]
[heraldicon.heraldry.cottising :as cottising]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.line.core :as line]
[heraldicon.heraldry.ordinary.interface :as ordinar... | |
2af97d34a6380f36df15ab843c52ad42b3a8420914ccf120683237a3dff4c371 | alpacaaa/zero-bullshit-haskell | CaseMatch.hs | module Ex03CaseMatch.CaseMatch where
import qualified Zero.Server as Server
caseHandler :: Server.Request -> Server.Response
caseHandler req
= Server.stringResponse res
where
res
= case Server.requestBody req of
"1" -> "one"
"2" -> "two"
"3" -> "three"
_ -> "Wh... | null | https://raw.githubusercontent.com/alpacaaa/zero-bullshit-haskell/6463b9bfd175ac50e82c326c6eda61d11751cab7/exercises/src/Ex03CaseMatch/CaseMatch.hs | haskell | module Ex03CaseMatch.CaseMatch where
import qualified Zero.Server as Server
caseHandler :: Server.Request -> Server.Response
caseHandler req
= Server.stringResponse res
where
res
= case Server.requestBody req of
"1" -> "one"
"2" -> "two"
"3" -> "three"
_ -> "Wh... | |
6cc4408b3a41e657fd579855978fe526a8e49907ec94fcf6d20f181f08a7014c | mjsottile/publicstuff | KDTree2d.hs | {-# LANGUAGE BangPatterns #-}
--
-- KDTree code
--
--
--
module KDTree2d (
KDTreeNode(..),
newKDTree,
kdtAddPoints,
kdtAddPoint,
kdtRangeSearch,
kdtCollisionDetect,
kdtInBounds,
dumpKDTree,
mapKDTree,
kdtreeToList
) where
import Vec2
import Data.Maybe
import System.IO
data KDTreeNode a =
Empt... | null | https://raw.githubusercontent.com/mjsottile/publicstuff/46fccc93cc62eb9de46186f53012381750fbb17b/boids/KDTree2d.hs | haskell | # LANGUAGE BangPatterns #
KDTree code
X dimension
Y dimension | module KDTree2d (
KDTreeNode(..),
newKDTree,
kdtAddPoints,
kdtAddPoint,
kdtRangeSearch,
kdtCollisionDetect,
kdtInBounds,
dumpKDTree,
mapKDTree,
kdtreeToList
) where
import Vec2
import Data.Maybe
import System.IO
data KDTreeNode a =
Empty
| Node !(KDTreeNode a) !Vec2 !a !(KDTreeNode a)
deri... |
156e294db586266c2fb8314afd4528a847e92f39acfbfdfa01d6a88106108105 | kupl/LearnML | patch.ml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec eval (f : formula) : bool =
let rec exptoint (e : exp) : int =... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub88/patch.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec eval (f : formula) : bool =
let rec exptoint (e : exp) : int =... | |
be07032c9dab1187bab3a4c9c4ed4f1fee3fc759e4eeb868700b0aeb83ba7665 | picty/concerto | testJson.ml | let rec handle_lines f =
let line =
try Some (input_line f)
with End_of_file -> None
in
match line with
| None -> ()
| Some l ->
let json = Yojson.Safe.from_string l in
let pretty = Yojson.Safe.pretty_to_string ~std:true json in
print_endline pretty;
print_newline ();
handle_l... | null | https://raw.githubusercontent.com/picty/concerto/fac5dd04a5a3dcd91782e17b7bd3e0f4a9ddd2e0/testJson.ml | ocaml | let rec handle_lines f =
let line =
try Some (input_line f)
with End_of_file -> None
in
match line with
| None -> ()
| Some l ->
let json = Yojson.Safe.from_string l in
let pretty = Yojson.Safe.pretty_to_string ~std:true json in
print_endline pretty;
print_newline ();
handle_l... | |
87ce2d97be37a789f094b66ddea2b51f2685c4ad776b7c85bb15edf480f680c3 | simmone/racket-simple-qr | qr-write.rkt | #lang racket
(provide (contract-out
[qr-write (->* (string? path-string?)
(
#:mode string?
#:error_level string?
#:module_width exact-nonnegative-integer?
#:color (cons/c string? ... | null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/write/qr-write.rkt | racket | data to bits
add mode and count indicator
add terminator
repeat padding
to decimal list
group data
split decimal list on contract
calculate error code
interleave data group
padded remainder bits
draw data on coodinate trace
mask data | #lang racket
(provide (contract-out
[qr-write (->* (string? path-string?)
(
#:mode string?
#:error_level string?
#:module_width exact-nonnegative-integer?
#:color (cons/c string? ... |
a22d14ae2e6503257d1648f8c8302c0030c80702f6973da72ae4e193aba6de1a | nebogeo/weavingcodes | maths.scm | Planet Fluxus Copyright ( C ) 2013
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program i... | null | https://raw.githubusercontent.com/nebogeo/weavingcodes/e305a28a38ef745ca31de3074c8aec3953a72aa2/dyadic/scm/maths.scm | scheme |
This program is free software: you can redistribute it and/or modify
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Af... | Planet Fluxus Copyright ( C ) 2013
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU Affero General Public License
(js "var sin=Math.sin")
(js "var cos=Math.cos")
(define (sqrt a) (Mat... |
fbc1e146b96d4252d2fca2f7093270f2e42d79419a1b4b1a2515a49aceafb94a | metabase/metabase | streaming_response.clj | (ns metabase.async.streaming-response
(:require
[cheshire.core :as json]
[clojure.core.async :as a]
[compojure.response]
[metabase.async.streaming-response.thread-pool :as thread-pool]
[metabase.async.util :as async.u]
[metabase.server.protocols :as server.protocols]
[metabase.util :as u]
[met... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/async/streaming_response.clj | clojure | if the request is canceled, `.read`
was completed) then close `canceled-status-chan` which will kill the underlying thread
sync responses only (in some cases?)
async responses only | (ns metabase.async.streaming-response
(:require
[cheshire.core :as json]
[clojure.core.async :as a]
[compojure.response]
[metabase.async.streaming-response.thread-pool :as thread-pool]
[metabase.async.util :as async.u]
[metabase.server.protocols :as server.protocols]
[metabase.util :as u]
[met... |
47fdf3e424ddfdc6c6ee3fe826dd65c7503caf1954f18bb7401908e9b26c006b | grin-compiler/grin | Base.hs | # LANGUAGE EmptyCase #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
module Reducer.Interpreter.Base
( module Reducer.Interpreter.Base
) where
import Control.Monad.Fail
import Control.Monad.Trans (MonadIO)
import Data.Function (fix)
import Data.Map.Strict (Map, fromList)
import Grin... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Reducer/Interpreter/Base.hs | haskell | # LANGUAGE RankNTypes #
* Interpreter
Open recursion and monadic interpreter.
Type class
Values that can be placed in registers/variables
Values for the Store, Fetch, Update parameters
A type to represent an Address
Conversions, but m type is needed for type inference
Value of the given literal: Only applicable... | # LANGUAGE EmptyCase #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
module Reducer.Interpreter.Base
( module Reducer.Interpreter.Base
) where
import Control.Monad.Fail
import Control.Monad.Trans (MonadIO)
import Data.Function (fix)
import Data.Map.Strict (Map, fromList)
import Grin.ExtendedSyntax.Syntax hidin... |
34fc367ddba44eee5fb70725c53e5506f15bc7870d0c78b10b3c436705b188ba | overtone/overtone | event_test.clj | (ns overtone.event-test
(:require [overtone.config.log :as log])
(:use overtone.libs.event
clojure.test))
(log/set-level! :debug)
(deftest handler-test
(let [counter (atom 0)]
(on-sync-event :test-event (fn [_] (swap! counter inc)) :a)
(on-event :test-event (fn [_] (swap! counter inc)) :b)
(... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/test/overtone/event_test.clj | clojure | (ns overtone.event-test
(:require [overtone.config.log :as log])
(:use overtone.libs.event
clojure.test))
(log/set-level! :debug)
(deftest handler-test
(let [counter (atom 0)]
(on-sync-event :test-event (fn [_] (swap! counter inc)) :a)
(on-event :test-event (fn [_] (swap! counter inc)) :b)
(... | |
1a331936149a96b6525a58341b290e6224835f063d244ba4e1ede217f15ec334 | kaznum/programming_in_ocaml_exercise | map.ml | let rec map f x =
match x with
`Nil -> `Nil
| `Cons(a, b) -> `Cons(f a, map f b);;
map (( * ) 2) `Nil;;
map (( * ) 2) (`Cons(1, `Nil));;
map (( * ) 2) (`Cons(2, (`Cons(4, `Nil))));;
| null | https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex14.1/map.ml | ocaml | let rec map f x =
match x with
`Nil -> `Nil
| `Cons(a, b) -> `Cons(f a, map f b);;
map (( * ) 2) `Nil;;
map (( * ) 2) (`Cons(1, `Nil));;
map (( * ) 2) (`Cons(2, (`Cons(4, `Nil))));;
| |
da9cef92076cf1d4c829a496184e4794462d4ffcff785853b476d3a178e265f1 | alvatar/spheres | crypto-hmac.scm | (##spheres-load energy: testing)
(##spheres-load crypto: hmac version: (debug))
(test-begin "Hash-based Message Authentication Code")
(define (test-hex p data key expected-result)
(test-equal (p (hex-string->u8vector data #f) (hex-string->u8vector key #f))
expected-result))
;; Vectors provided by
-... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/test/crypto-hmac.scm | scheme | Vectors provided by
Double-checked using
-MD5-AES-HMAC-SHA-DES-RABBIT/en?command=UTILITY&ID=2
and / :
Double-checked using / : | (##spheres-load energy: testing)
(##spheres-load crypto: hmac version: (debug))
(test-begin "Hash-based Message Authentication Code")
(define (test-hex p data key expected-result)
(test-equal (p (hex-string->u8vector data #f) (hex-string->u8vector key #f))
expected-result))
-based_message_authentic... |
94a131b93dc74d76bf53abdf838f9ef53a1f0136caf9ebe526a29a5dab7233f5 | dbousque/lymp | myocamlbuild.ml | OASIS_START
(* DO NOT EDIT (digest: 7c79194eb16194bf2a2a530cc49aff34) *)
module OASISGettext = struct
# 22 " src / oasis / OASISGettext.ml "
let ns_ str = str
let s_ str = str
let f_ (str: ('a, 'b, 'c, 'd) format4) = str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
fmt2^^""
... | null | https://raw.githubusercontent.com/dbousque/lymp/863d134b33499a7234ae6a5e43d40e3357867031/myocamlbuild.ml | ocaml | DO NOT EDIT (digest: 7c79194eb16194bf2a2a530cc49aff34)
Start with a _ if digit
ocamlfind command
This lists all supported packages.
Mock to list available syntaxes.
By using Before_options one let command line options have an higher
* priority on the contrary using After_options will guarantee to ha... | OASIS_START
module OASISGettext = struct
# 22 " src / oasis / OASISGettext.ml "
let ns_ str = str
let s_ str = str
let f_ (str: ('a, 'b, 'c, 'd) format4) = str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
fmt2^^""
let init = []
end
module OASISString = struct
# 22 " src /... |
559be0aa8ecfb736a58339b686118224cad0b683f1accd55744ed17085a2f017 | bubba/racket-llvm | definer.rkt | #lang racket
(require ffi/unsafe
ffi/unsafe/define)
(define (get-llvm-lib-dir)
(let ([path (find-executable-path "llvm-config")])
(if (not path)
(list "/usr/local/opt/llvm/lib"
"/usr/lib/llvm-6.0") ; fallback
(list (string-trim
(with-output-to-string
... | null | https://raw.githubusercontent.com/bubba/racket-llvm/f638818154bf0d9e24af3cbc227d03fe335e3c6d/definer.rkt | racket | fallback
TODO: Add more search directories | #lang racket
(require ffi/unsafe
ffi/unsafe/define)
(define (get-llvm-lib-dir)
(let ([path (find-executable-path "llvm-config")])
(if (not path)
(list "/usr/local/opt/llvm/lib"
(list (string-trim
(with-output-to-string
(λ () (system* path "--libdir"))))))))
(de... |
b8a3e06ca5606077f97e9cb3e190331957b5764401f52627fc62740292d1f379 | Octachron/codept | user.ml | open Amap.A
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/aliases/user.ml | ocaml | open Amap.A
| |
bd505874a3c79ab07355cfc4b109b305f7f29c2603f54c9730c650686c883aa4 | marick/fp-oo | klass-1.clj | (declare class-from-instance send-to apply-message-to)
;; This imports a function from another namespace. (Think package or module.)
(use '[clojure.pprint :only [cl-format]])
;;; Functions that construct the different kinds of objects
(def basic-object
(fn [class-symbol]
{:__class_symbol__ class-symbol})... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/sources/klass-1.clj | clojure | This imports a function from another namespace. (Think package or module.)
Functions that construct the different kinds of objects
Here are methods that take a class-symbol or instance containing one and follow it somewhere.
The public interface
Anything
Class
An example class: | (declare class-from-instance send-to apply-message-to)
(use '[clojure.pprint :only [cl-format]])
(def basic-object
(fn [class-symbol]
{:__class_symbol__ class-symbol}))
(def basic-class
(fn [my-name
_left left-symbol
_up up-symbol
instance-methods]
(assert (= _l... |
3cc0145c9ec310b9e62101cc6dd42aa752d0d6bd07924283a937279dde74cd7d | yurug/ocaml4.04.0-copatterns | ast_helper.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/parsing/ast_helper.ml | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Helpers to produce Parsetree fragments
open Asttypes
open Parsetree
open Docstrings
type lid = Longide... |
76b7b6fe137208e21045ee3a9e704767fef3abea196a3de58195678b42fbd379 | ocamllabs/vscode-ocaml-platform | extension_instance.mli | open Import
type t
val make : unit -> t
val sandbox : t -> Sandbox.t
val set_sandbox : t -> Sandbox.t -> unit
val language_client : t -> LanguageClient.t option
val ocaml_lsp : t -> Ocaml_lsp.t option
val start_documentation_server :
t -> path:Path.t -> (Documentation_server.t, unit) result Promise.t
val stop... | null | https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/4e96bfb5f3e8756460a847857822c38f22626b57/src/extension_instance.mli | ocaml | open Import
type t
val make : unit -> t
val sandbox : t -> Sandbox.t
val set_sandbox : t -> Sandbox.t -> unit
val language_client : t -> LanguageClient.t option
val ocaml_lsp : t -> Ocaml_lsp.t option
val start_documentation_server :
t -> path:Path.t -> (Documentation_server.t, unit) result Promise.t
val stop... | |
48038737d98f03f533782bd5e4785d221452079fc58f768eedcf29fbd4eb6701 | hengchu/tiger-haskell | tigersemant.hs | module TigerSemant
(
transprog
)
where
import TigerSemTr
import TigerSemantTypes
import qualified TigerLexer as TLex
import qualified TigerAbsyn as TAbs
import qualified TigerSymbol as TSym
import qualified TigerTemp as TTmp
import qualified TigerTranslate as TTra
import qualified D... | null | https://raw.githubusercontent.com/hengchu/tiger-haskell/ec6809500c245ea99d2329e8255a67bdb57cf579/src/tigersemant.hs | haskell | Functions used to report error | module TigerSemant
(
transprog
)
where
import TigerSemTr
import TigerSemantTypes
import qualified TigerLexer as TLex
import qualified TigerAbsyn as TAbs
import qualified TigerSymbol as TSym
import qualified TigerTemp as TTmp
import qualified TigerTranslate as TTra
import qualified D... |
e9b540ec405e113bafaa70895c71f2956c15b51fd85fe3e53a340e9cb0dbae30 | GaloisInc/HaNS | RecvWindow.hs | # LANGUAGE RecordWildCards #
# LANGUAGE PatternGuards #
{-# LANGUAGE MultiWayIf #-}
module Hans.Tcp.RecvWindow (
-- * Receive Window
Window(),
emptyWindow,
recvSegment,
rcvWnd,
rcvNxt, setRcvNxt,
rcvRight,
moveRcvRight,
-- ** Sequence Numbers
sequenceNumberValid,
) where
im... | null | https://raw.githubusercontent.com/GaloisInc/HaNS/2af19397dbb4f828192f896b223ed2b77dd9a055/src/Hans/Tcp/RecvWindow.hs | haskell | # LANGUAGE MultiWayIf #
* Receive Window
** Sequence Numbers
Segments --------------------------------------------------------------------
^ The last byte occupied by this segment
| The next segment number, directly after this one.
| Drop data off of the front of this segment.
adjust the length to account for sy... | # LANGUAGE RecordWildCards #
# LANGUAGE PatternGuards #
module Hans.Tcp.RecvWindow (
Window(),
emptyWindow,
recvSegment,
rcvWnd,
rcvNxt, setRcvNxt,
rcvRight,
moveRcvRight,
sequenceNumberValid,
) where
import Hans.Lens
import Hans.Tcp.Packet
import qualified Dat... |
1238049a47dfb6b765133b931c214c44668f3dd1070da21f1f29e61ed23b62b6 | jrh13/hol-light | dlo.ml | (* ========================================================================= *)
Dense linear order decision procedure for reals , by .
(* ========================================================================= *)
prioritize_real();;
(* ----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Examples/dlo.ml | ocaml | =========================================================================
=========================================================================
----------------------------------------------------------------------
Util
---------------------... | Dense linear order decision procedure for reals , by .
prioritize_real();;
let list_conj =
let t_tm = `T` in
fun l -> if l = [] then t_tm else end_itlist (curry mk_conj) l;;
let mk_lt = mk_binop `(<)`;;
cnnf
let DOUBLE_NEG_CONV =
... |
14129e05c0fdfa096ebef42d6222023b7a4e566e6e69a86acf296aa2eb876b3f | mput/sicp-solutions | 1_08.rkt | #lang racket
Solution for exercise 1_08 .
(provide cube-root)
(require rackunit "../solutions/utils.rkt")
(require rackunit "../solutions/1_07.rkt")
(define (cube-root value)
(cube-root-iter value 1.0 0))
(define (cube-root-iter value guess priv-guess)
(if (good-enough? guess priv-guess)
guess
(cube-ro... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/1_08.rkt | racket | #lang racket
Solution for exercise 1_08 .
(provide cube-root)
(require rackunit "../solutions/utils.rkt")
(require rackunit "../solutions/1_07.rkt")
(define (cube-root value)
(cube-root-iter value 1.0 0))
(define (cube-root-iter value guess priv-guess)
(if (good-enough? guess priv-guess)
guess
(cube-ro... | |
b6e6d10e1d4e4a9fb2267f05f1c658885ef907fa6fe52c9f72bc3b42ea6178c2 | mstksg/inCode | VecInductive.hs | #!/usr/bin/env stack
-- stack --install-ghc runghc --resolver nightly-2017-08-20 --package singletons -- -Wall
{-# LANGUAGE DataKinds #-}
# LANGUAGE EmptyCase #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
{-# L... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/fixvec-2/VecInductive.hs | haskell | stack --install-ghc runghc --resolver nightly-2017-08-20 --package singletons -- -Wall
# LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators #
^ if we have an ith index into a vector... | #!/usr/bin/env stack
# LANGUAGE EmptyCase #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
import Data.Kind
import Data.Singletons
import Data.Singletons.Decide
import Data.Singletons.TH
import Prelude hidin... |
a7d7fba71eb9f17db4240d146efce10dd6d0598c461e87cef13f85e25d7a4aa7 | heroku/logplex | live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
OldVsn = "v81",
NextVsn = "v82",
case logplex_app:config(git_branch) of
OldVsn ->
io:format(whereis(user), "at=upgrade_start cur_vsn=~p~n", [tl(OldVsn)]);
NextVsn ->
io:format(whereis(user),
"at=upgrade typ... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/upgrades/v81_v82/live_upgrade.erl | erlang | load the new version of the module | f(UpgradeNode).
UpgradeNode = fun () ->
OldVsn = "v81",
NextVsn = "v82",
case logplex_app:config(git_branch) of
OldVsn ->
io:format(whereis(user), "at=upgrade_start cur_vsn=~p~n", [tl(OldVsn)]);
NextVsn ->
io:format(whereis(user),
"at=upgrade typ... |
e33f2f41ddb152d38689e5ddffdb6facc289bf40dc721a48c8ba77cd6d273e5c | kowainik/shortcut-links | ShortcutLinks.hs | |
Copyright : ( c ) 2015 - 2019 Aelve
( c ) 2019 - 2021 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Copyright: (c) 2015-2019 Aelve
(c) 2019-2021 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
-}
module ShortcutLinks
( Result(..)
, ... | null | https://raw.githubusercontent.com/kowainik/shortcut-links/54c283c449046eec875a69d5b5216044401ec2bd/src/ShortcutLinks.hs | haskell | ^ Shortcut name
^ Option
^ Link text
^ Resulting URL
^ Shortcut name
^ Option
^ Link text
^ Resulting URL | |
Copyright : ( c ) 2015 - 2019 Aelve
( c ) 2019 - 2021 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Copyright: (c) 2015-2019 Aelve
(c) 2019-2021 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
-}
module ShortcutLinks
( Result(..)
, ... |
f117cfcabb8228d6f5f57f8b0fd17b31a9cebb0bf27f1607266951ef234d125f | dgiot/dgiot | emqx_mqtt_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2019 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/test/emqx_mqtt_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2019 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_mqtt_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("emq... |
03c88f92d37e92e25f02b366ec66e8a0d52fa3d5783a8021b5d9253f4ac93c86 | braidchat/braid | user_results.cljs | (ns braid.search.ui.user-results
(:require
[braid.core.client.ui.views.user-hover-card :as user-card]
[braid.core.client.ui.styles.hover-cards :as card-styles]))
(defn search-users-view
[_ users]
[:div.result.user
[:div.description
(str (count users) " user" (when (not= (count users) 1) "s"))]
[:... | null | https://raw.githubusercontent.com/braidchat/braid/e9e5cefc13f73814bd69fc8d50849fd63925fee7/src/braid/search/ui/user_results.cljs | clojure | would like to just do "flex-wrap: wrap" but apparently a
flex-direction: column + flex-wrap: wrap doesn't grow the width
of the parent when it wraps, so then this ends up overlapping
with the search results next to it | (ns braid.search.ui.user-results
(:require
[braid.core.client.ui.views.user-hover-card :as user-card]
[braid.core.client.ui.styles.hover-cards :as card-styles]))
(defn search-users-view
[_ users]
[:div.result.user
[:div.description
(str (count users) " user" (when (not= (count users) 1) "s"))]
[:... |
af604818fd5bc8dc118fa61ec099fc36388c782917175ac6fc99ad7f73808c8d | tommaisey/aeon | decay2.help.scm | ;; Used as an envelope
(hear
(mul3 (decay2 (impulse ar (x-line kr 1 50 20 remove-synth) 0.25) 0.01 0.2)
(f-sin-osc ar 600 0)
0.25))
;; Compare the above with decay used as the envelope.
(hear
(mul3 (decay (impulse ar (x-line kr 1 50 20 remove-synth) 0.25) 0.01)
(f-sin-osc ar 600 0)
0.25... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/controls/decay2.help.scm | scheme | Used as an envelope
Compare the above with decay used as the envelope. |
(hear
(mul3 (decay2 (impulse ar (x-line kr 1 50 20 remove-synth) 0.25) 0.01 0.2)
(f-sin-osc ar 600 0)
0.25))
(hear
(mul3 (decay (impulse ar (x-line kr 1 50 20 remove-synth) 0.25) 0.01)
(f-sin-osc ar 600 0)
0.25))
|
76b9ebec1e7bf7c1e90b6a2982846687842514f7a893d808aaedaff3863d7bab | ruhler/smten | Prim.hs |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE MagicHash #
module Smten.Compiled.GHC.Prim (
GHC.Prim.realWorld#, GHC.Prim.State#, GHC.Prim.RealWorld, GHC.Prim.Addr#,
module Smten.Runtime.Char,
module Smten.Runtime.Int,
) where
import qualified GHC.Prim
import Smten.Runtime.Char
import Smten.Runtime.Int
| null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Compiled/GHC/Prim.hs | haskell |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE MagicHash #
module Smten.Compiled.GHC.Prim (
GHC.Prim.realWorld#, GHC.Prim.State#, GHC.Prim.RealWorld, GHC.Prim.Addr#,
module Smten.Runtime.Char,
module Smten.Runtime.Int,
) where
import qualified GHC.Prim
import Smten.Runtime.Char
import Smten.Runtime.Int
| |
860460d72fd0319184a958a8d3e887a728a870937d29e2e503baf9237d42b280 | bhaskara/programmable-reinforcement-learning | function-utils.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; function-utils.lisp
;; general utilities for functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package utils)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Buildin... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/misc/function-utils.lisp | lisp |
function-utils.lisp
general utilities for functions
Building functions from other functions
|
(in-package utils)
TODO correct in compose case
(defmacro fn (expr &optional (num-args 1) )
"Macro FN EXPR &optional (NUM-ARGS 1). Build up complex functions from expressions. E.g. (fn (and integerp oddp)) expands to a function that returns true iff its argument is an odd integer. Taken from Paul G... |
d7a34554b2b74f60b38bcb952e876f5bb5189085843b84bf4c58dde941aa82c0 | hhucn/decide3 | build.clj | (ns build
(:require
[clojure.tools.build.api :as b]))
(def lib 'decide)
(def version (format "3.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def uber-file (format "target/%s.jar" (name lib)))
(defn clean [_]
(b/delete {:path "target"}))
... | null | https://raw.githubusercontent.com/hhucn/decide3/ed76777dc6e4c6e4f94973b6efe901086c1f2d24/build.clj | clojure | (ns build
(:require
[clojure.tools.build.api :as b]))
(def lib 'decide)
(def version (format "3.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def uber-file (format "target/%s.jar" (name lib)))
(defn clean [_]
(b/delete {:path "target"}))
... | |
6783a33336202e6d1439321ce270da1c572f6c654163a0016845eb193f55481c | hanshuebner/vlm | robust-MBIN.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Patch file for Private version 0.0
Reason : Function D,#TD1Ps T[Begin using 006 escapes](1 0 ( NIL 0 ) ( NIL : BOLD NIL ) " CPTFONTCB")(clos : method minimaccess::discard - transmit - buffer ( minimaccess::udp - acc... | null | https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/support/robust-MBIN.lisp | lisp | Syntax : Common - lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Variable 1minimaccess::*remote-memory-retransmission-interval*0: .
Function (CLOS:METHOD MINIMACCESS::INITIALIZE-ACCESS-PATH (MINIMACCESS::CACHED-ACCESS-PATH) :AFTER): .
Variable MINIMACCESS::*SAVED-WORLD-HEADER*: .
Function MINIMACCES... | Patch file for Private version 0.0
Reason : Function D,#TD1Ps T[Begin using 006 escapes](1 0 ( NIL 0 ) ( NIL : BOLD NIL ) " CPTFONTCB")(clos : method minimaccess::discard - transmit - buffer ( minimaccess::udp - access - path : .
Function 1(clos : method minimaccess::remote - memory - mbin - advance - o... |
05470e6c04d951052eee6d6a091bc047362e68d0b3d87eccabf662a5895488e0 | eugeneia/athens | interface.lisp | (in-package #:jpl-queues)
(defclass queue ()
()
(:documentation "Abstract class for queues.
Unless noted otherwise, subclasses do no synchronization. It is the
client's responsibility to ensure no two operations occur
simultaneously.
The usual time complexity for each operation is documented in the
generic func... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/jpl-queues-0.1/interface.lisp | lisp | (in-package #:jpl-queues)
(defclass queue ()
()
(:documentation "Abstract class for queues.
Unless noted otherwise, subclasses do no synchronization. It is the
client's responsibility to ensure no two operations occur
simultaneously.
The usual time complexity for each operation is documented in the
generic func... | |
1f01ffe643233d5305f1eded29de2aa7f3cf87dfa672b950b3a9231083b517cc | xh4/web-toolkit | ironclad.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
;;;; ironclad.lisp -- tests for non-cryptography functionality
(in-package :crypto-tests)
(rtest:deftest quotationp.1
(crypto::quotationp '(quote foo))
t)
(rtest:deftest quotationp.2
(crypto::quotationp '(quote foo bar))
nil)
(rtest:deftest unquote.1
(crypto:... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/testing/test-vectors/ironclad.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
ironclad.lisp -- tests for non-cryptography functionality |
(in-package :crypto-tests)
(rtest:deftest quotationp.1
(crypto::quotationp '(quote foo))
t)
(rtest:deftest quotationp.2
(crypto::quotationp '(quote foo bar))
nil)
(rtest:deftest unquote.1
(crypto::unquote (quote foo))
foo)
(rtest:deftest unquote.2
(crypto::unquote 2)
2)
(rtest:deftest unquote.3
... |
6f0db7196b532024a53d1d6deb7107c563ea34d17270946542240250457d6740 | greglook/solanum | config_test.clj | (ns solanum.config-test
(:require
[clojure.java.io :as io]
[clojure.test :refer [deftest testing is]]
[solanum.config :as config]
[solanum.output.core :as output]
[solanum.source.core :as source]
[solanum.test-util :refer [boom!]]))
(def path-a "target/test/config-a.yml")
(def path-b "target... | null | https://raw.githubusercontent.com/greglook/solanum/5b0fed6cc897e691bb93aeb5d4bfea892b425d54/test/solanum/config_test.clj | clojure | (ns solanum.config-test
(:require
[clojure.java.io :as io]
[clojure.test :refer [deftest testing is]]
[solanum.config :as config]
[solanum.output.core :as output]
[solanum.source.core :as source]
[solanum.test-util :refer [boom!]]))
(def path-a "target/test/config-a.yml")
(def path-b "target... | |
ed1346623c4d997979239fc4892cb005efa798324ed6f87d4ed6b7c790e44d49 | Jaxan/nominal-lstar | Bollig.hs | {-# language FlexibleContexts #-}
{-# language PartialTypeSignatures #-}
{-# language TypeFamilies #-}
{-# OPTIONS_GHC -Wno-partial-type-signatures #-}
module Bollig where
import AbstractLStar
import qualified BooleanObservationTable as BOT
import ObservationTableClass
import qualified SimpleObservationTable as SOT
im... | null | https://raw.githubusercontent.com/Jaxan/nominal-lstar/98f9c6e295583a7ea52e528665f50af855ad852b/src/Bollig.hs | haskell | # language FlexibleContexts #
# language PartialTypeSignatures #
# language TypeFamilies #
# OPTIONS_GHC -Wno-partial-type-signatures #
because we do not have a map data structure. (So the only way
is by taking a product and filtering on equal inputs.)
So instead of considering a row as E -> 2, we simply take it
as... | module Bollig where
import AbstractLStar
import qualified BooleanObservationTable as BOT
import ObservationTableClass
import qualified SimpleObservationTable as SOT
import Teacher
import Data.List (tails)
import Debug.Trace (trace, traceShow)
import NLambda hiding (alphabet)
import Prelude (Bool (..), Int, Maybe (..)... |
5aeab96666bba5120cc1b6f2f15210f31ed7e617537309d26645f2d374ce6a27 | compufox/with-user-abort | package.lisp | (in-package :cl-user)
(defpackage with-user-abort
(:use :cl)
(:export :user-abort
:with-user-abort))
| null | https://raw.githubusercontent.com/compufox/with-user-abort/60693b4a1354faf17107ad6003b0b870cca37081/package.lisp | lisp | (in-package :cl-user)
(defpackage with-user-abort
(:use :cl)
(:export :user-abort
:with-user-abort))
| |
8d7ae864b10be1e6312bf3a610da8954d7917c038ab183aa6910a04d0d12a3f1 | scheme/scsh | process-high-level.scm | ;;;; Process->Scheme interface forms: run/collecting, run/port, run/string, ...
( run / collecting FDS . EPF )
;;; --------------------------
;;; RUN/COLLECTING and RUN/COLLECTING* run processes that produce multiple
;;; output streams and return ports open on these streams.
;;;
To avoid issues of deadlock , RUN /... | null | https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/scheme/process-high-level.scm | scheme | Process->Scheme interface forms: run/collecting, run/port, run/string, ...
--------------------------
RUN/COLLECTING and RUN/COLLECTING* run processes that produce multiple
output streams and return ports open on these streams.
with output to temp files, then returns the ports open on the temp files.
files. The... |
( run / collecting FDS . EPF )
To avoid issues of deadlock , RUN / COLLECTING first runs the process
( run / collecting ( 1 2 ) ( ls ) )
runs ls with stdout ( fd 1 ) and stderr ( fd 2 ) redirected to temporary files .
When ls is done , RUN / COLLECTING returns two ports open on the temporary
The FDS list o... |
03347b2a2d6a3dd281f62a1583537efc1bdcc0daf2ff776c8c314dc9bc7a8e77 | RRethy/nvim-treesitter-textsubjects | textsubjects-smart.scm | ((comment) @_start @_end
(#make-range! "range" @_start @_end))
TODO This query does n't work for comment groups at the start and end of a
; file
; See -sitter/tree-sitter/issues/1138
(((_) @head . (comment) @_start . (comment)+ @_end (_) @tail)
(#not-has-type? @tail "comment")
(#not-has-type? @head "com... | null | https://raw.githubusercontent.com/RRethy/nvim-treesitter-textsubjects/9994933abe14fc9f2739820a2576eea5005f6411/queries/javascript/textsubjects-smart.scm | scheme | file
See -sitter/tree-sitter/issues/1138
jsx | ((comment) @_start @_end
(#make-range! "range" @_start @_end))
TODO This query does n't work for comment groups at the start and end of a
(((_) @head . (comment) @_start . (comment)+ @_end (_) @tail)
(#not-has-type? @tail "comment")
(#not-has-type? @head "comment")
(#make-range! "range" @_start @_en... |
95116e267317acb1ada855547b36dbef3c03c091ca36cb1f0e263e31fb90454a | tolysz/prepare-ghcjs | Generics.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LA... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base-pure/GHC/Generics.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving ... | # LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PolyKinds #
# LANGUAGE UndecidableInstances #
Copyright : ( c ) Universiteit Utrecht 2010 - 2011 , University of Oxford 2012 - 2014
@since 4.6.0.0
module GHC.Generics (
... |
56106a50e6fcf5eed5ca56cb09da5b9667e3f71c8b7394e399a395154477974c | jackfirth/rebellion | mutable-red-black-tree-regression-test.rkt | #lang racket/base
(module+ test
(require racket/sequence
rackunit
rebellion/base/comparator
rebellion/collection/private/mutable-red-black-tree-base
rebellion/collection/private/mutable-red-black-tree-insertion
rebellion/collection/private/mutable-red-black-tre... | null | https://raw.githubusercontent.com/jackfirth/rebellion/206ced365b07d1c6da5dcbe93f892fbb9bd7ba72/collection/private/mutable-red-black-tree-regression-test.rkt | racket | @---------------------------------------------------------------------------------------------------- | #lang racket/base
(module+ test
(require racket/sequence
rackunit
rebellion/base/comparator
rebellion/collection/private/mutable-red-black-tree-base
rebellion/collection/private/mutable-red-black-tree-insertion
rebellion/collection/private/mutable-red-black-tre... |
e4d741e40b3463d03f1b771e81aad85d7331b86d56015c45efb906566563393f | siraben/haoc-2021 | day9.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE TupleSections #
import Criterion.Main
import Data.IntMap (IntMap)
import qualified Data.IntMap as IM
import Data.IntSet (IntSet)
import qualified Data.IntSet as IS
type Pt = (Int, Int)
type Grid = IntMap Int
to :: Pt -> Int
to (x, y) = 1000 * x + y
from :: Int -> Pt
from n ... | null | https://raw.githubusercontent.com/siraben/haoc-2021/6eceb20e18aff79750b442fb275c332f7dd0952f/day9.hs | haskell | # LANGUAGE BangPatterns #
neighbors
Given a grid and its basin points | # LANGUAGE TupleSections #
import Criterion.Main
import Data.IntMap (IntMap)
import qualified Data.IntMap as IM
import Data.IntSet (IntSet)
import qualified Data.IntSet as IS
type Pt = (Int, Int)
type Grid = IntMap Int
to :: Pt -> Int
to (x, y) = 1000 * x + y
from :: Int -> Pt
from n = (n `div` 1000, n `mod` 1000)... |
d046e2229e7041d7f14fe2f401faf161670de8aeae72dc59dcea9ba3cb1a5014 | typelead/eta | tc091.hs | { - # OPTIONS_GHC -fno - warn - redundant - constraints # - }
-- !!! Test polymorphic recursion
-- With polymorphic recursion this one becomes legal
SLPJ June 97 .
To : < >
Cc : , ( Yale ) < > ,
Subject : Type checking matter
Date : Fri , 23 Oct 92 15:28:38 +0100
From : < >
... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc091.hs | haskell | !!! Test polymorphic recursion
With polymorphic recursion this one becomes legal
----- Forwarded Message
Lennart
----- End of forwarded message -------
----- Forwarded Message
Lennart
----- End of forwarded message -------
This signature is WRONG | { - # OPTIONS_GHC -fno - warn - redundant - constraints # - }
SLPJ June 97 .
To : < >
Cc : , ( Yale ) < > ,
Subject : Type checking matter
Date : Fri , 23 Oct 92 15:28:38 +0100
From : < >
I 've looked at the enclosed again . It seems to me that
since " s " includes a re... |
18b62fb77af21c88c303e2a5e7ac056ced7c7dc363804920b55f5ecd44baa475 | Kakadu/fp2022 | tests.mli | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
(** [Tests] contains most test written for our mini-language.*)
val test_factorial_definition : string
val test_factorial_call : string
val test_factorial_expression : string
val test_factorial_expected : int
val test_... | null | https://raw.githubusercontent.com/Kakadu/fp2022/5365f2f52e3e173cdb052abcfdbfb66fc70fe799/OCamlLabeledArgs/lib/tests.mli | ocaml | * [Tests] contains most test written for our mini-language. | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
val test_factorial_definition : string
val test_factorial_call : string
val test_factorial_expression : string
val test_factorial_expected : int
val test_x_power_y_definition : string
val test_x_power_y_call : string
v... |
8cf2cbee9a303121ed5e9869a29cb627c5379c4d110b90b75bc2fa7eec1ffe29 | mtolly/onyxite-customs | Rocksmith.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE OverloadedRecordDot #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Onyx.Build.Rocksmith (rsRules) where
import Control.Monad... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Build/Rocksmith.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
this has to be named same as audio + "_preview" for CST to load it
NOTE this is required! CST breaks if the filename does not have "vocals"
see -custom-song-toolkit/blob/fa63cc4e0075/RocksmithToolkitLib/XML/Song2014.cs#L347
similarly, we'... | # LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE RecordWildCards #
module Onyx.Build.Rocksmith (rsRules) where
import Control.Monad.Extra
import qualified Data.Aeson as A
import Data.Co... |
340be2188497277ce9654d109876d120f05c08bd8fa655d88f641d8ab1ec6210 | ocaml/oasis2debian | ActHelp.ml | (******************************************************************************)
oasis2debian : Create and maintain Debian package for an OASIS package
(* *)
Copyright ( C ) 2013 ,
(* ... | null | https://raw.githubusercontent.com/ocaml/oasis2debian/41d268cada4afdac8c906ac99277d7c685bc15ae/src/ActHelp.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | oasis2debian : Create and maintain Debian package for an OASIS package
Copyright ( C ) 2013 ,
the Free Software Foundation ; either version 2.1 of the License , or ( at
You should have received a copy of the GNU Lesser General Public License
along with t... |
85107d2e54ea6d9f3dfba027d555b8a07e748f5343bc3f8d5c22ecf5ed4bfec5 | Elzair/nazghul | fing.scm | ;;----------------------------------------------------------------------------
;; Constants
;;----------------------------------------------------------------------------
;;----------------------------------------------------------------------------
;; Schedule
;;
In Oparine .
;;------------------------------------... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/fing.scm | scheme | ----------------------------------------------------------------------------
Constants
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Schedule
------------------------------------------------------------------... |
In Oparine .
(kern-mk-sched 'sch_fing
(list 0 0 sea-witch-bay "idle")
(list 6 0 sea-witch-shore "idle")
(list 8 0 sea-witch-bay "idle")
(list 20 0 sea-witch-shore "idle")
)
(define (fing-mk) nil)
Fing is a m... |
b3f7a91e1c54a1482cef9d5a330652995ee38ad38645310500f9e96a97c51e52 | OtpChatBot/Ybot | ybot_notification_handler.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
%%% Ybot notification handler.
%%% @end
%%%-----------------------------------------------------------------------------
-module(ybot_notification_handler).
-behaviour(gen_server).
-export([start_link/2]).
... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/ybot_notification_handler.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
Ybot notification handler.
@end
-----------------------------------------------------------------------------
gen_server callbacks
transports for notifications
plugin language
plugin file path
notification timeou... | -module(ybot_notification_handler).
-behaviour(gen_server).
-export([start_link/2]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-record(state, {
transports = [],
lang = "",
plugin_path = "",
... |
979d768825c4589f427d3ab92597149978b58e4dd6b435460feb2e99de34379f | graninas/Functional-Design-and-Architecture | Runtime.hs | module Framework.Logging.StructuredLogger.Runtime where
import Framework.Logging.Types
import qualified Framework.Logging.StructuredLogger.Config as Cfg
import qualified Framework.Logging.StructuredLogger.Language as L
import qualified Framework.Logging.StructuredLogger.Impl.Sentry as S
data StructuredLoggerRuntime... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/17c555a35dd884415a4aeedf1e1ba1416dc35cb1/Second-Edition-Manning-Publications/BookSamples/CH10/Section10p1/src/Framework/Logging/StructuredLogger/Runtime.hs | haskell | module Framework.Logging.StructuredLogger.Runtime where
import Framework.Logging.Types
import qualified Framework.Logging.StructuredLogger.Config as Cfg
import qualified Framework.Logging.StructuredLogger.Language as L
import qualified Framework.Logging.StructuredLogger.Impl.Sentry as S
data StructuredLoggerRuntime... | |
8a05f80273b69734a3eb09a1e4e4d778fe49a99a4345e7f3c6941ebe2bb0e77c | cedlemo/OCaml-GI-ctypes-bindings-generator | Handle_box.mli | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val get_child_detached :
t -> bool
val get_handle_position :
t -> Position_type.t
val get_shadow_type :
t -> Shadow_type.t
val get_snap_edge :
t -> Position_type.t
val set_handle_position :
t -> Position_type.t -> unit
val set_shadow_t... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Handle_box.mli | ocaml | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val get_child_detached :
t -> bool
val get_handle_position :
t -> Position_type.t
val get_shadow_type :
t -> Shadow_type.t
val get_snap_edge :
t -> Position_type.t
val set_handle_position :
t -> Position_type.t -> unit
val set_shadow_t... | |
edca507daeafa122b0d88587b4487b7d1b4686ebe7863a52a8d228fdd4a698e3 | anik545/OwlPPL | plot.mli | * Plotting utilies
[ Plot ] provides helper functions that wrap [ Owl_plplot ] to graph PPL distributions
[Plot] provides helper functions that wrap [Owl_plplot] to graph PPL distributions
*)
(**/**)
type handle = Owl_plplot.Plot.handle
type 'a dist = 'a Dist.dist
(**/**)
type options = [ `X_label of... | null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/lib/plot.mli | ocaml | */*
*/*
*
*
*
*
*
*
*
*
* | * Plotting utilies
[ Plot ] provides helper functions that wrap [ Owl_plplot ] to graph PPL distributions
[Plot] provides helper functions that wrap [Owl_plplot] to graph PPL distributions
*)
type handle = Owl_plplot.Plot.handle
type 'a dist = 'a Dist.dist
type options = [ `X_label of string | `Y_lab... |
34bffbc59a4dd15204974504bd38bcdbfde6690a11be1827f680fd2e73438f95 | uncomplicate/clojurecl | protocols.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/clojurecl/58f8b9dc42a9b7faa526687c836be23cc2b6e7fd/src/clojure/uncomplicate/clojurecl/internal/protocols.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.clojurecl.internal.protocols)
(defprotocol Mem
"An object that represents memory that participates in OpenCL operations.
It can be on the device ([[CLMem]]), or on the host. Built-in implementations:
cl buffer, Java p... |
29ac63fd7bf51a7be524813e428905dfd1784e488d36e2b495880be8c6a74bbf | panda-planner-dev/ipc2020-domains | p-07.lisp | (defproblem problem domain
(
(In_City O27 Ulm)
(In_City O28 Ulm)
(At_Vehicle Pferd O27)
(Empty CraneO27)
(Available CraneO27)
(At_Equipment CraneO27 O27)
(Empty CraneO28)
(Available CraneO28)
(At_Equipment CraneO28 O28)
(Connects James_Franck_Ring O27 O28)
(Available James... | null | https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/UM-Translog/other/SHOP2/p-07.lisp | lisp | (defproblem problem domain
(
(In_City O27 Ulm)
(In_City O28 Ulm)
(At_Vehicle Pferd O27)
(Empty CraneO27)
(Available CraneO27)
(At_Equipment CraneO27 O27)
(Empty CraneO28)
(Available CraneO28)
(At_Equipment CraneO28 O28)
(Connects James_Franck_Ring O27 O28)
(Available James... | |
9812657b5b80f3061f32e4c4ded5577c005b3124996e5466112819b0fb2552aa | nikivazou/liquid-meta | Implies.hs | {-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
module Substitutions.Implies where
import Propositions
import Syntax
import Substitutions.Expressions
| null | https://raw.githubusercontent.com/nikivazou/liquid-meta/c3e9f85529ab6d1135ca886bfb2808737e134f22/src/Substitutions/Implies.hs | haskell | @ LIQUID "--reflection" @
@ LIQUID "--ple" @ |
module Substitutions.Implies where
import Propositions
import Syntax
import Substitutions.Expressions
|
ece63b85cf08898dbc75509a05a515ac14a298d8abf202d782d641ce7bb5dca1 | nrepl/nrepl | server.clj | (ns nrepl.server
"Default server implementations"
{:author "Chas Emerick"}
(:require
[nrepl.ack :as ack]
[nrepl.middleware.dynamic-loader :as dynamic-loader]
[nrepl.middleware :as middleware]
nrepl.middleware.completion
nrepl.middleware.interruptible-eval
nrepl.middleware.load-file
nrepl.midd... | null | https://raw.githubusercontent.com/nrepl/nrepl/083006096cc8b92711880c7ca6d341853ba36deb/src/clojure/nrepl/server.clj | clojure | should always be true for the socket server...
these
| (ns nrepl.server
"Default server implementations"
{:author "Chas Emerick"}
(:require
[nrepl.ack :as ack]
[nrepl.middleware.dynamic-loader :as dynamic-loader]
[nrepl.middleware :as middleware]
nrepl.middleware.completion
nrepl.middleware.interruptible-eval
nrepl.middleware.load-file
nrepl.midd... |
7b24ace7fc0f2e177cc64c1a5b0bb35686ade604fe6273cdf62735c505eb2d65 | Glue42/gateway-modules | agm.cljc | (ns gateway.state.spec.agm
(:require [clojure.spec.alpha :as s]
[gateway.state.spec.restrictions :as rs]
[gateway.state.spec.mthds :as methods]
[gateway.state.spec.common :as common]))
(s/def ::method_id ::methods/id)
(s/def ::invocation_id ::common/request_id)
(s/def ::subscript... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/state/spec/agm.cljc | clojure | (ns gateway.state.spec.agm
(:require [clojure.spec.alpha :as s]
[gateway.state.spec.restrictions :as rs]
[gateway.state.spec.mthds :as methods]
[gateway.state.spec.common :as common]))
(s/def ::method_id ::methods/id)
(s/def ::invocation_id ::common/request_id)
(s/def ::subscript... | |
ac94ee281fc0b130cd25e9de466df5803b2516c42e655e16f6fa5c105a1299b8 | adambard/failjure | project.clj | (defproject failjure "2.2.0"
:description "Simple helpers for treating failures as values"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:repl-options {:init-ns failjure.core}
:plugins [[lein-cljsbuild "1.1.8"]
[lein-doo "0.1.1... | null | https://raw.githubusercontent.com/adambard/failjure/c6e528c1eda6ad5eaab0f1fb2a97e766bf41fdd5/project.clj | clojure | (defproject failjure "2.2.0"
:description "Simple helpers for treating failures as values"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:repl-options {:init-ns failjure.core}
:plugins [[lein-cljsbuild "1.1.8"]
[lein-doo "0.1.1... | |
29199debfb736162535a6e563b80a035e3bd3d5fa060345eb478455602d28cb2 | webyrd/tabling | tabling-only-tests.scm | (mtest "why-we-dont-table-full-substitutions-non-tabled-a"
(let ((f (lambda (z) (== z 6))))
(run* (q)
(fresh (x y)
(conde
((== x 5) (f y))
((f y)))
(== `(,x ,y) q))))
'((5 6) (_.0 6)))
(mtest "why-we-dont-table-full-substitutions-non-tabled-b"
(let ((f (tabled (z) (=... | null | https://raw.githubusercontent.com/webyrd/tabling/3ace7adfd272a99ca20a01c2b47cbfe14a830729/tabling-only-tests.scm | scheme | search strategy dependent
search strategy dependent
(skip "subsumption")
succeeds with duplicates (see below) | (mtest "why-we-dont-table-full-substitutions-non-tabled-a"
(let ((f (lambda (z) (== z 6))))
(run* (q)
(fresh (x y)
(conde
((== x 5) (f y))
((f y)))
(== `(,x ,y) q))))
'((5 6) (_.0 6)))
(mtest "why-we-dont-table-full-substitutions-non-tabled-b"
(let ((f (tabled (z) (=... |
e7cbe10e0f1189358b24eae2e4b7471f29a7ba0287753f919b87b7dd76f232f6 | snowleopard/alga | Transitive.hs | -----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Relation.Transitive
Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
-- An abstract implementation of transitive binary relati... | null | https://raw.githubusercontent.com/snowleopard/alga/399b5dc538a2496b67f9322dc7247e06a4ec326b/src/Algebra/Graph/Relation/Transitive.hs | haskell | ---------------------------------------------------------------------------
|
Module : Algebra.Graph.Relation.Transitive
Maintainer :
Stability : experimental
An abstract implementation of transitive binary relations. Use
---------------------------------------------------------------------------
* Data st... | Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
" Algebra . Graph . Class " for polymorphic construction and manipulation .
module Algebra.Graph.Relation.Transitive (
TransitiveRelation, fromRelation, toRelation
) where
import Algebra.Graph.Relation
import Control.DeepSeq
imp... |
51dfccdd48b9a009a6fd24c76712b619dba268b7125f30d787cbc02a1ad4625c | manuel-serrano/hop | scheme-program.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / js2scheme / scheme - program.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/4de0f0e1f21dd7e30be35625d3b9498279410055/js2scheme/scheme-program.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Program node compilation */
*===========================... | * serrano / prgm / project / hop / hop / js2scheme / scheme - program.scm * /
* Author : * /
* Creation : Thu Jan 18 08:03:25 2018 * /
* Last change : Sun Nov 27 08:59:19 2022 ( serrano ) * /
* Co... |
9e30d249d78fbdaabbde6bf29f9dbed2ad4c34231ba6c045a82f763b19b6c232 | jeromesimeon/Galax | rewriting_rules_typing.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/rewriting/rewriting_rules_typing.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : rewriting_rules_typing.ml , v 1.39 2008/03/25 01:47:28 mff Exp $
open Error
open Namespace_names
open Namespace_builtin
open Datatypes
open Norm_util
open Xquery_common_ast
open Xquery_common_ast_util
open Xquery_core_ast
open X... |
5e723596b659d63bd404642a0839b0468d78a7b6c43ad818facf85a56bb76cfb | vollmerm/lalla-chess | piece.lisp | ;;;; piece.lisp
;;;;
;;;; This file takes care of basic piece handling, and some stuff for move generation.
;;;; I'm on the fence about whether this file should exist or if it should be merged
;;;; into move.lisp.
(in-package #:lalla)
(declaim (optimize speed))
Pieces are 4 - bit words
They consist of a color bit... | null | https://raw.githubusercontent.com/vollmerm/lalla-chess/62e4068eba7f3288c6e99a7977bd0cc4f4f4190b/piece.lisp | lisp | piece.lisp
This file takes care of basic piece handling, and some stuff for move generation.
I'm on the fence about whether this file should exist or if it should be merged
into move.lisp.
Piece types:
Piece steps define the number of steps each piece takes. The move generator
So, for example, if the move gene... |
(in-package #:lalla)
(declaim (optimize speed))
Pieces are 4 - bit words
They consist of a color bit and a 3 - bit piece type
1 . White pawn
2 . Black pawn
3 .
4 . Bishop
5 . Rook
6 . Queen
7 . King
(defun* (piece-color -> (unsigned-byte 1)) ((p (unsigned-byte 4)))
(ldb (byte 1 3) p))
(def... |
aa4687de6c3c9962d785acdd47adc3206e723ef2338a8beb8481b8ff4206b88e | tebello-thejane/bitx.hs | Internal.hs | # LANGUAGE QuasiQuotes , OverloadedStrings , TemplateHaskell , TypeFamilies , FlexibleContexts ,
FlexibleInstances , DataKinds , CPP , RecordWildCards , GeneralizedNewtypeDeriving #
FlexibleInstances, DataKinds, CPP, RecordWildCards, GeneralizedNewtypeDeriving #-}
module Network.Bitcoin.BitX.Types.Internal
... | null | https://raw.githubusercontent.com/tebello-thejane/bitx.hs/d5b1211656192b90381732ee31ca631e5031041b/src/Network/Bitcoin/BitX/Types/Internal.hs | haskell | $setup
>>> import Test.QuickCheck
|
prop> \ n -> (timeToTimestamp $ timestampParse_ $ _unUnixStampMS n) == _unUnixStampMS n
| Wrappers around Scientific and Int, and FromJSON instance, to facilitate automatic JSON instances
| Wrapper around UTCTime and FromJSON instance, to facilitate automatic JSON instances
--... | # LANGUAGE QuasiQuotes , OverloadedStrings , TemplateHaskell , TypeFamilies , FlexibleContexts ,
FlexibleInstances , DataKinds , CPP , RecordWildCards , GeneralizedNewtypeDeriving #
FlexibleInstances, DataKinds, CPP, RecordWildCards, GeneralizedNewtypeDeriving #-}
module Network.Bitcoin.BitX.Types.Internal
... |
31304af2290480dd17e3822174c5f1867d41aedbe747b6eeb32ede7eb7ff413a | onedata/op-worker | archivisation_callback.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Helper module used for performing ... | null | https://raw.githubusercontent.com/onedata/op-worker/6b4eae12034bb469f49200c32c32f37c9179ac6a/src/modules/archive/archivisation_callback.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Helper module used for performing requests to URL callbacks
notifying about operations executed on archives.
@end
-------------------------------------------------------... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(archivisation_callback).
-author("Jakub Kudzia").
-include_lib("ctool/include/http/headers.hrl").
-include_lib("ctool/include/logging.hrl").
-include_lib("ctool/include/http/codes.hrl").
-... |
19a91a73af816033f78f8807fc8131cd8a19045b9f46f008d3ab7cf9c8b1486d | clojure-interop/aws-api | AmazonSQSClient.clj | (ns com.amazonaws.services.sqs.AmazonSQSClient
"Client for accessing Amazon SQS. All service calls made using this client are blocking, and will not return until the
service call completes.
Welcome to the Amazon Simple Queue Service API Reference.
Amazon Simple Queue Service (Amazon SQS) is a reliable, high... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.sqs/src/com/amazonaws/services/sqs/AmazonSQSClient.clj | clojure | (ns com.amazonaws.services.sqs.AmazonSQSClient
"Client for accessing Amazon SQS. All service calls made using this client are blocking, and will not return until the
service call completes.
Welcome to the Amazon Simple Queue Service API Reference.
Amazon Simple Queue Service (Amazon SQS) is a reliable, high... | |
f18cb4f911322a90d3588fd6bd8f352bd9b22759782c9e70875ecd08607c576f | tjammer/raylib-ocaml | generate_c_functions.ml | let () =
print_endline "#include <raylib.h>";
Cstubs.write_c Format.std_formatter ~prefix:Sys.argv.(1)
(module Raylib_functions.Description)
| null | https://raw.githubusercontent.com/tjammer/raylib-ocaml/0bf114c7102edea6d7d97fcc166204f289b60c61/src/c/stubgen/generate_c_functions.ml | ocaml | let () =
print_endline "#include <raylib.h>";
Cstubs.write_c Format.std_formatter ~prefix:Sys.argv.(1)
(module Raylib_functions.Description)
| |
3c552fdfebb42831715077cac0c192f443f45332ceb4e918e90033d49ccce03c | cojna/iota | SmallestEnclosingCircle.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
module Geometry.SmallestEnclosingCircle where
import Data.Function
import qualified Data.List as L
import qualified Data.Vector.Generic as G
import Geometry
import Geometry.Circle
import System.Random.XoRoShiRo
smallestEnclosingCircle ::
(Floating a, Ord ... | null | https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Geometry/SmallestEnclosingCircle.hs | haskell | # LANGUAGE BangPatterns #
not equal to the smallest enclosing circle | # LANGUAGE FlexibleContexts #
module Geometry.SmallestEnclosingCircle where
import Data.Function
import qualified Data.List as L
import qualified Data.Vector.Generic as G
import Geometry
import Geometry.Circle
import System.Random.XoRoShiRo
smallestEnclosingCircle ::
(Floating a, Ord a, G.Vector v (Point a)) => v ... |
71e928236e133432dd6a563c3bd4c007e78ff4b8e7f3cbb485fbae626efcb7bf | zotonic/zotonic | action_admin_zmedia_choose.erl | @author < >
2009
%% @doc A media item has been chosen for insertion in the body text.
Copyright 2009
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_admin/src/actions/action_admin_zmedia_choose.erl | erlang | @doc A media item has been chosen for insertion in the body text.
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... | @author < >
2009
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(action_admin_zmedia_choose).
-author("Arjan Scherpenisse <>").
-include_lib("zotonic_core/include/zotonic.hrl").
-export... |
c28c4b2c164150ecd2e190c28a217ad65d3f1786d4a4db243b9ef4f674ae63cf | wdhowe/telegrambot-lib | stickers.clj | (ns telegrambot-lib.api.stickers
"Telegram Stickers - function implementations.
- <#stickers>
Most functions are multi-arity with the following options:
- Send all parameters in a 'content' map.
- Send only the required parameters as simple values.
- Send the required paraemters as simple values and t... | null | https://raw.githubusercontent.com/wdhowe/telegrambot-lib/590ed016f0dca394559f29ade8bb7ddddaeffa1a/src/telegrambot_lib/api/stickers.clj | clojure | a bot instance
id of the target thread of the forum.
true to send message silently
protect content from forwarding/saving
id of original message if reply
true to send message even if replied-to message is not found
additional interface options"
a bot instance
name of the sticker set"
a bot instance
a list of... | (ns telegrambot-lib.api.stickers
"Telegram Stickers - function implementations.
- <#stickers>
Most functions are multi-arity with the following options:
- Send all parameters in a 'content' map.
- Send only the required parameters as simple values.
- Send the required paraemters as simple values and t... |
602fea0eb6566dc03836592966992c28308275069802d0f17c6c487358315348 | jrm-code-project/LISP-Machine | bfoo.lisp | -*- Mode : LISP ; Package : USER ; : CL ; -*-
(defun lines-in-system (x)
(let ((l (mapcar #'lines-in-file (si:system-source-files (si:find-system-named x)))))
(format t "~&~%Total for system ~A,~%~D code lines, ~D comment lines ~D blank lines~%"
x
(apply '+ (mapcar #'car l))
... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjc/bfoo.lisp | lisp | Package : USER ; : CL ; -*-
(aref line 0)) |
(defun lines-in-system (x)
(let ((l (mapcar #'lines-in-file (si:system-source-files (si:find-system-named x)))))
(format t "~&~%Total for system ~A,~%~D code lines, ~D comment lines ~D blank lines~%"
x
(apply '+ (mapcar #'car l))
(apply '+ (mapcar #'cadr l))
(appl... |
609e0f11181315143d93650290d4a653566175c693e726a94d9e3d661e14fc8b | coq/coq | univProblem.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/fbe061dec85080fece2a6dbfc6521864e991655c/engine/univProblem.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
f5ddb19e954db14fd573692cc23affeaa6358df58e0414ac7b3648b47abd949c | tnelson/Forge | quant-bug.rkt | #lang forge
abstract sig Char {}
one sig A extends Char {}
one sig B extends Char {}
one sig C extends Char {}
one sig D extends Char {}
one sig E extends Char {}
one sig F extends Char {}
one sig G extends Char {}
sig seqChar {
r: set Int -> Char
}
pred isSeqOf[r: set Int -> univ, d: set univ] {
r in Int -... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/example/store/quant-bug.rkt | racket | #lang forge
abstract sig Char {}
one sig A extends Char {}
one sig B extends Char {}
one sig C extends Char {}
one sig D extends Char {}
one sig E extends Char {}
one sig F extends Char {}
one sig G extends Char {}
sig seqChar {
r: set Int -> Char
}
pred isSeqOf[r: set Int -> univ, d: set univ] {
r in Int -... | |
04931424ca56f35f118834d9c8df2d0d90eb9f1323fb662860876855f879bc37 | futurice/haskell-mega-repo | Capacities.hs | # LANGUAGE ApplicativeDo #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
module Futuqu.Strm.Capacities (capacitiesStrm) where
import Futurice.Integrations
import Futurice.Prelude
import Futurice.Time.Month
import Prelude ()
import qualified Servant.Types.SourceT as SourceT
import Futuqu.NT
import Futuqu.... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/futuqu/src/Futuqu/Strm/Capacities.hs | haskell | # LANGUAGE RankNTypes #
a month below which we don't cache | # LANGUAGE ApplicativeDo #
# LANGUAGE TypeOperators #
module Futuqu.Strm.Capacities (capacitiesStrm) where
import Futurice.Integrations
import Futurice.Prelude
import Futurice.Time.Month
import Prelude ()
import qualified Servant.Types.SourceT as SourceT
import Futuqu.NT
import Futuqu.Rada.Capacities
capacitiesStrm... |
28c10ff46d9014191f84083ac106381ba34bb15c49076d8074acb9c750a8b77f | NinjaTrappeur/ex-hack | Ghc.hs | |
Module : ExHack . Ghc
Description : GHC - API programs .
Copyright : ( c ) , 2018
License : GPL-3
Stability : experimental
Portability : POSIX
Module : ExHack.Ghc
Description : GHC-API programs.
Copyright : (c) Félix Baylac-Jacqué, 2018
License : GPL-3
Stability : exper... | null | https://raw.githubusercontent.com/NinjaTrappeur/ex-hack/dace36926065d5a0dd0076beec1a6eeacd848732/src/ExHack/Ghc.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
This will fails if the pointed source code is not valid.
| Retrieves a module's imported symbols.
This will fails if the pointed source code is not valid.
| Retrieve all the symbols used in the module body.
| Retrieves a `DesugaredModule` exp... | |
Module : ExHack . Ghc
Description : GHC - API programs .
Copyright : ( c ) , 2018
License : GPL-3
Stability : experimental
Portability : POSIX
Module : ExHack.Ghc
Description : GHC-API programs.
Copyright : (c) Félix Baylac-Jacqué, 2018
License : GPL-3
Stability : exper... |
5209ccf5448fec8d631619f430deab410d2462dc86158b1ef9a7278486d512e2 | lambdageek/centrinel | CompilationDatabase.hs | | Process Clang 's JSON Compilation Database for centrinel 's purposes .
{-# language NamedFieldPuns, OverloadedStrings #-}
module Centrinel.Util.CompilationDatabase (parseCompilationDatabase
, RunLikeCC (..)
, makeStandaloneRunLikeCC... | null | https://raw.githubusercontent.com/lambdageek/centrinel/412b620b77c6cb569811fec845b89d04585c1332/src/Centrinel/Util/CompilationDatabase.hs | haskell | # language NamedFieldPuns, OverloadedStrings #
| The list of arguments that were passed to the compiler.
Double quotes and backslashes are escaped with a backslash. | | Process Clang 's JSON Compilation Database for centrinel 's purposes .
module Centrinel.Util.CompilationDatabase (parseCompilationDatabase
, RunLikeCC (..)
, makeStandaloneRunLikeCC
, Invoke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.