_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 |
|---|---|---|---|---|---|---|---|---|
11e774a7ba80a69f882ca0451b7c5e68e85edce9b7d7e763c543a8383487bb73 | billstclair/trubanc-lisp | cookies.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : DRAKMA ; Base : 10 -*-
$ Header : /usr / local / cvsrep / drakma / cookies.lisp , v 1.15 2008/01/14 01:57:01 edi Exp $
Copyright ( c ) 2006 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; mod... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/drakma-1.0.0/cookies.lisp | lisp | Syntax : COMMON - LISP ; Package : DRAKMA ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the fo... | $ Header : /usr / local / cvsrep / drakma / cookies.lisp , v 1.15 2008/01/14 01:57:01 edi Exp $
Copyright ( c ) 2006 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :... |
50aff8ae6a0d0d5c045476efc935c864431c85becfdd82d04d2611f237b18f44 | ekmett/rounded | Unsafe.hs | # LANGUAGE ForeignFunctionInterface #
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.MPFR.Raw.Unsafe
Copyright : ( C ) 2012 - 2014 ,
( C ) 2013 - 2019
-- License : BSD3
Maintainer : < >
-- Stability : experi... | null | https://raw.githubusercontent.com/ekmett/rounded/c468acd3933c9fdcbb1bb66c53ab203f1ea41f0a/src/Numeric/MPFR/Raw/Unsafe.hs | haskell | ---------------------------------------------------------------------------
|
Module : Numeric.MPFR.Raw.Unsafe
License : BSD3
Stability : experimental
Portability : non-portable
-------------------------------------------------------------------------- | # LANGUAGE ForeignFunctionInterface #
Copyright : ( C ) 2012 - 2014 ,
( C ) 2013 - 2019
Maintainer : < >
This module contains FFI imports as unsafe ccalls .
module Numeric.MPFR.Raw.Unsafe where
import Foreign.C (CInt(..), CIntMax(..), CSize(..), CChar(..), CLong(..))
impor... |
6a5cb6bee60214616c2573a2c5a54340e7231c0c3d977b22e8bdc5608018aa2f | fccm/OCamlSDL2 | sdlinit.mli | OCamlSDL2 - An OCaml interface to the SDL2 library
Copyright ( C ) 2013
This software is provided " AS - IS " , without any express or implied warranty .
In no event will the authors be held liable for any damages arising from
the use of this software .
Permission is granted to anyone to use this... | null | https://raw.githubusercontent.com/fccm/OCamlSDL2/73a378d63db7fc1dfba0148225e3f4ab9cffd953/src/sdlinit.mli | ocaml | * Initialisation
* {{:}api doc} | OCamlSDL2 - An OCaml interface to the SDL2 library
Copyright ( C ) 2013
This software is provided " AS - IS " , without any express or implied warranty .
In no event will the authors be held liable for any damages arising from
the use of this software .
Permission is granted to anyone to use this... |
d7204b423d45d3dc9f62101e1cbfb2c82f24cb0c8eefc192ced4ef0c114b5b2d | yav/hobbit | CheckDefs.hs | -- XXX: this needs to be fixed
-- perhaps moved earlier in the compiler pipeline.
module CheckDefs(checkDefs) where
import AST(ADT,ADT'(..),ADTCtr'(..),poly)
import AST.SIL
import qualified BDD
import qualified Pass
import Error
import PP
import Utils
import Data.List
import Data.Word
import MonadLib
type M ... | null | https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/CheckDefs.hs | haskell | XXX: this needs to be fixed
perhaps moved earlier in the compiler pipeline.
Data structures -------------------------------------------------------------
variable matches constructor
variable matches bin. pat.
Analysis --------------------------------------------------------------------
syntactic not semantic!
... |
module CheckDefs(checkDefs) where
import AST(ADT,ADT'(..),ADTCtr'(..),poly)
import AST.SIL
import qualified BDD
import qualified Pass
import Error
import PP
import Utils
import Data.List
import Data.Word
import MonadLib
type M = ReaderT [ADT] (WriterT [Warning] Id)
checkDefs :: [ADT] -> [Decl] -> Pass.P... |
a0121acbfb2bf3227edefd428a407aa82e779ca20dcad4c5d72d7e41acc79123 | ninenines/cowboy | rest_pastebin_app.erl | %% Feel free to use, reuse and abuse the code in this file.
@private
-module(rest_pastebin_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/[:paste_id]", toppage_h, []}
]}
]),
{ok, _} = cowboy:start... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/examples/rest_pastebin/src/rest_pastebin_app.erl | erlang | Feel free to use, reuse and abuse the code in this file.
API.
API. |
@private
-module(rest_pastebin_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/[:paste_id]", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
env => #{dispatch => Dispatch}
}),
rest_... |
e30854519d094557b45ffae20b5804e2e26977149caf0b485bb86769a4a6a4b2 | jyh/metaprl | tacticals_boot.mli | x
* Some basic tacticals .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / de... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/tactics/proof/tacticals_boot.mli | ocaml |
* -*-
* Local Variables:
* Caml-master: "editor.run"
* End:
* -*-
| x
* Some basic tacticals .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / de... |
e4fac24b69d5b2e48bb87284282b0b2a4ed965048ca0b7a1f5894f028248f91e | chrisdone/prana | Compat.hs | # LANGUAGE CPP #
| Compatibility between GHC API versions .
module Intero.Compat
( ghc_getModuleGraph
, ghc_getInfo
, ghc_defaultDynFlags
, ghc_topSortModuleGraph
, ghc_mkWarn
, ghc_mkErr
, ghc_errMsg
, ghc_warnMsg
, ghc_tyConFlavour
, StageReaderName
, StageReaderRdrName
, StageReaderId
)... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-ghc/app/Intero/Compat.hs | haskell | # LANGUAGE CPP #
| Compatibility between GHC API versions .
module Intero.Compat
( ghc_getModuleGraph
, ghc_getInfo
, ghc_defaultDynFlags
, ghc_topSortModuleGraph
, ghc_mkWarn
, ghc_mkErr
, ghc_errMsg
, ghc_warnMsg
, ghc_tyConFlavour
, StageReaderName
, StageReaderRdrName
, StageReaderId
)... | |
350ba5cf3ceca29d995c6d4d7171bb12f1bfa8c41d1403e278c0e6e570482fd2 | bpiel/guildsman | utils.cljs | (ns ^:figwheel-no-load figwheel.client.utils
(:require [clojure.string :as string]
[goog.string :as gstring]
[goog.object :as gobj]
[cljs.reader :refer [read-string]]
[cljs.pprint :refer [pprint]]
[goog.userAgent.product :as product])
(:import [goog]
... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/resources/public/js/compiled/out/figwheel/client/utils.cljs | clojure | don't auto reload this file it will mess up the debug printing
Custom Event must exist before calling this
in windows world
this will probably not work at some point in
Deferred helpers that focus on guaranteed successful side effects
not very monadic but it meets our needs
persistent storage of configuration ke... | (ns ^:figwheel-no-load figwheel.client.utils
(:require [clojure.string :as string]
[goog.string :as gstring]
[goog.object :as gobj]
[cljs.reader :refer [read-string]]
[cljs.pprint :refer [pprint]]
[goog.userAgent.product :as product])
(:import [goog]
... |
d879146514572845f6e10630798d1086f026afdcb03c50d04a0562e13d4135df | hkuplg/fcore | Simplify.hs | # LANGUAGE TypeOperators , FlexibleInstances , MultiParamTypeClasses , RankNTypes #
# OPTIONS_GHC -Wall #
|
Module : Simplify
Description : The simplifier turns SystemFI into Core .
Copyright : ( c ) 2014—2015 The F2J Project Developers ( given in AUTHORS.txt )
License : BSD3
Maintain... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/frontend/simplify/Simplify.hs | haskell | # LANGUAGE TypeOperators , FlexibleInstances , MultiParamTypeClasses , RankNTypes #
# OPTIONS_GHC -Wall #
|
Module : Simplify
Description : The simplifier turns SystemFI into Core .
Copyright : ( c ) 2014—2015 The F2J Project Developers ( given in AUTHORS.txt )
License : BSD3
Maintain... | |
a4fb1ac2d43ee41f28cfe6df69d1c3fcfffe1d690ae792c34959cb8f7849d781 | klutometis/clrs | fibonacci.scm | (define (fibonacci-heap-change-key! heap node k)
(let ((key (fibonacci-node-key node)))
(cond ((= k key))
((< k key) (fibonacci-heap-decrease-key! heap node k))
(else
(let ((children (children node)))
(for-each (cut cut! heap <> node) children)
(set-fibonac... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/20/fibonacci.scm | scheme | (define (fibonacci-heap-change-key! heap node k)
(let ((key (fibonacci-node-key node)))
(cond ((= k key))
((< k key) (fibonacci-heap-decrease-key! heap node k))
(else
(let ((children (children node)))
(for-each (cut cut! heap <> node) children)
(set-fibonac... | |
fb9b3b048d6361baef9bc18578c91d92cc7e0097fec9bcac400fe13a81944da4 | TeMPOraL/alice | local-config-template.lisp | (in-package #:alice)
;; basic configuration
(setf *pushover-token* "insert token"
*pushover-admin-user* "insert pushover user / group key for admin (for emergency / debug notifications)"
*wolfram-app-id* "insert app id"
*mailgun-domain* "insert mailgun domain"
*mailgun-key* "insert mailgun ke... | null | https://raw.githubusercontent.com/TeMPOraL/alice/4621a53ccd459bebf0b34c531dab49f7b42f35c7/local-config-template.lisp | lisp | basic configuration | (in-package #:alice)
(setf *pushover-token* "insert token"
*pushover-admin-user* "insert pushover user / group key for admin (for emergency / debug notifications)"
*wolfram-app-id* "insert app id"
*mailgun-domain* "insert mailgun domain"
*mailgun-key* "insert mailgun key"
*github-token... |
e29bf2f2dfa31432e3672dd8c4d2a55df96c6ddf6d465ec79e75e795eb4b1f9b | the-little-typer/pie | print-gui.rkt | #lang racket/base
(require racket/function racket/list racket/match)
(require "pie-styles.rkt" "../basics.rkt" "../resugar.rkt")
(require racket/gui framework)
(require pict)
(provide pie-feedback%)
(define indentation (make-parameter 0))
(define-syntax indented
(syntax-rules ()
[(_ i e ...)
(parameteriz... | null | https://raw.githubusercontent.com/the-little-typer/pie/a698d4cacd6823b5161221596d34bd17ce5282b8/gui/print-gui.rkt | racket | Always display something, even if the print code is borked | #lang racket/base
(require racket/function racket/list racket/match)
(require "pie-styles.rkt" "../basics.rkt" "../resugar.rkt")
(require racket/gui framework)
(require pict)
(provide pie-feedback%)
(define indentation (make-parameter 0))
(define-syntax indented
(syntax-rules ()
[(_ i e ...)
(parameteriz... |
446a4274a2524bdf7afe5e654314ccb8dd72742de2e62ca4f965b213ec58f43d | B-Lang-org/bsc | SpeedyString.hs | {-# LANGUAGE DeriveDataTypeable #-}
module SpeedyString(SString, toString, fromString, (++), concat, filter) where
import Prelude hiding((++), concat, filter)
import qualified Prelude((++), filter)
import IOMutVar(MutableVar, newVar, readVar, writeVar)
import System.IO.Unsafe(unsafePerformIO)
import qualified Data.Int... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/SpeedyString.hs | haskell | # LANGUAGE DeriveDataTypeable #
unique id
public
private
toNotSoSpeedyString :: SString -> NotSoSpeedyString.SString
internal representation
unique id factory | module SpeedyString(SString, toString, fromString, (++), concat, filter) where
import Prelude hiding((++), concat, filter)
import qualified Prelude((++), filter)
import IOMutVar(MutableVar, newVar, readVar, writeVar)
import System.IO.Unsafe(unsafePerformIO)
import qualified Data.IntMap as M
import qualified NotSoSpe... |
87e4faf7a096ea250cb9115acf8cda5b5927c26c9086e877a9433a9dffd255ab | emqx/emqx | emqx_conf.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 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/emqx/emqx/73d5592b5af0cbbf347e5dc2b9b865b41228249f/apps/emqx_conf/src/emqx_conf.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 ) 2020 - 2023 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_conf).
-compile({no_auto_import, [get/1, get/2]}).
-include_lib("emqx/include/logge... |
bb5da43aca1bd8c4dc604733f5fc81dc8db4147514b4893d44a47fab4055115e | census-instrumentation/opencensus-erlang | oc_tag_ctx_header.erl | %%%-------------------------------------------------------------------------
Copyright 2018 , OpenCensus Authors
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
%%
%% Unles... | null | https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/src/oc_tag_ctx_header.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 2018 , OpenCensus Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(oc_tag_ctx_header).
-export([field_name/0,
encode/1,
decode/1,
format_error/1]).
-include("opencensus.... |
66448b317b44df6a567c3b0194b0c64bce38afcd13cd3dd77ea461080b64e3c0 | jrh13/hol-light | pa_j_3.1x_6.02.1.ml | (* ------------------------------------------------------------------------- *)
(* New version. *)
(* ------------------------------------------------------------------------- *)
(* camlp5r *)
$ I d : pa_o.ml , v 6.33 2010 - 11 - 16 16:48:21 deraugla Exp $... | null | https://raw.githubusercontent.com/jrh13/hol-light/ea44a4cacd238d7fa5a397f043f3e3321eb66543/pa_j_3.1x_6.02.1.ml | ocaml | -------------------------------------------------------------------------
New version.
-------------------------------------------------------------------------
camlp5r
-------------------------------------------------------------------------
The m... |
$ I d : pa_o.ml , v 6.33 2010 - 11 - 16 16:48:21 deraugla Exp $
Copyright ( c ) INRIA 2007 - 2010
#load "pa_extend.cmo";
#load "q_MLast.cmo";
#load "pa_reloc.cmo";
open Pcaml;
Pcaml.syntax_name.val := "OCaml";
Pcaml.no_constructors_arity.val := True;
$ I d : reloc.ml , v 6.16 2010 - 11 - 21 17:17:45 deraugl... |
2ff7a504354575bd7fa452df16a74dc671ef904aca84d50b37a0712f230df954 | ahungry/defjs | package.lisp | defjs - Common Lisp REPL fun in Javascript
Copyright ( C ) 2014
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later vers... | null | https://raw.githubusercontent.com/ahungry/defjs/655d04b1164cd2008db0eae848a8621ebbdd0161/package.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(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 General Public... | defjs - Common Lisp REPL fun in Javascript
Copyright ( C ) 2014
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
package.lisp
(defpackage #:defjs
(:... |
a69a7675b06f20fd60ea3cd920a854814fdce19eb862a00079bb404880a5f838 | circuithub/rel8 | Order.hs | # language DerivingStrategies #
# language GeneralizedNewtypeDeriving #
# language StandaloneKindSignatures #
module Rel8.Order
( Order(..)
)
where
-- base
import Data.Functor.Contravariant ( Contravariant )
import Data.Kind ( Type )
import Prelude
-- contravariant
import Data.Functor.Contravariant.Divisible ( D... | null | https://raw.githubusercontent.com/circuithub/rel8/2e82fccb02470198297f4a71b9da8f535d8029b1/src/Rel8/Order.hs | haskell | base
contravariant
opaleye
'Rel8.asc' and 'Rel8.desc', and you can combine @Order@ via its various
instances.
A common pattern is to use '<>' to combine multiple orderings in sequence,
and 'Data.Functor.Contravariant.>$<' to select individual columns. | # language DerivingStrategies #
# language GeneralizedNewtypeDeriving #
# language StandaloneKindSignatures #
module Rel8.Order
( Order(..)
)
where
import Data.Functor.Contravariant ( Contravariant )
import Data.Kind ( Type )
import Prelude
import Data.Functor.Contravariant.Divisible ( Decidable, Divisible )
im... |
dfd4cb35afa77e461a7d63126aaedc0b2cb34253e641c7fa821e718a3bd20a09 | madgen/exalog | Foreign.hs | # LANGUAGE DataKinds #
module Fixture.Foreign
-- Leq100
( programLeq100
, initLeq100EDB
, leq100Pred
, leq100Tuples
PrefixOf
, programPrefixOf
, initPrefixOfEDB
, prefixOfPred
, prefixOfTuples
Cartesian
, programCartesian23
, initCartesian23EDB
, cartesian23Pred
, cartesian23Tuples
-... | null | https://raw.githubusercontent.com/madgen/exalog/7d169b066c5c08f2b8e44f5e078df264731ac177/fixtures/Fixture/Foreign.hs | haskell | Leq100
Impure
------------------------------------------------------------------------------
leq100 Fixture
------------------------------------------------------------------------------
------------------------------------------------------------------------------
prefixOf Fixture
---------------------------------... | # LANGUAGE DataKinds #
module Fixture.Foreign
( programLeq100
, initLeq100EDB
, leq100Pred
, leq100Tuples
PrefixOf
, programPrefixOf
, initPrefixOfEDB
, prefixOfPred
, prefixOfTuples
Cartesian
, programCartesian23
, initCartesian23EDB
, cartesian23Pred
, cartesian23Tuples
, programImpu... |
d7b1b54ecd130666ae93a76a2d690bed4bea2264f1865796e164585738f715bd | ferdinand-beyer/init | build.clj | (ns build
(:require [clojure.tools.build.api :as b]))
(def lib 'init/todo-app)
(def version (format "1.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis))
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
(defn clean [_]
(b/delete {:path "target"}))... | null | https://raw.githubusercontent.com/ferdinand-beyer/init/62414dae2b7af6ea2e3036db0b2f6e2bdf3d8e65/examples/todo-app/build.clj | clojure | (ns build
(:require [clojure.tools.build.api :as b]))
(def lib 'init/todo-app)
(def version (format "1.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis))
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
(defn clean [_]
(b/delete {:path "target"}))... | |
5e39b39222ce69e31116a50f0a9e94229832da51c845c2043963e73841a89b7d | cardmagic/lucash | lmsort.scm | ;;; list merge & list merge-sort -*- Scheme -*-
Copyright ( c ) 1998 by .
;;; This code is open-source; see the end of the file for porting and
;;; more copyright information.
;;; Exports:
;;; (list-merge < lis lis) -> list
;;; (list-merge! < lis lis) -> list
;;; (list-merge-sort < lis) -> list
;;; (list-mer... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/sort/lmsort.scm | scheme | list merge & list merge-sort -*- Scheme -*-
This code is open-source; see the end of the file for porting and
more copyright information.
Exports:
(list-merge < lis lis) -> list
(list-merge! < lis lis) -> list
(list-merge-sort < lis) -> list
(list-merge-sort! < lis) -> list
A stable list merge sort of my own... | Copyright ( c ) 1998 by .
Two variants : pure & destructive
O(n lg n ) .
recursion stack . It 's actually quite simple -- ten lines of code .
( ( ( var - list mv - exp ) ... ) body ... )
A LET * form that handles multiple values . Move this into the two clients
(syntax-rules ()
((mlet ((() e... |
2a37aeea100316420c967ac01da7d8bcc84c3e367de339feb5b50b6f219b899e | robrix/sequoia | Value.hs | # LANGUAGE UndecidableInstances #
module Sequoia.Profunctor.Value
( -- * Value profunctor
type (∘)(..)
-- * Value abstraction
, Value(..)
-- * Construction
, idV
, constV
-- * Coercion
, _V
) where
import Control.Category (Category)
import Data.Distributive
import Data.Functor.Identity
import Data.Functor.Rep ... | null | https://raw.githubusercontent.com/robrix/sequoia/1895ab90eb2fd7332ffb901fd8d932ad7637a695/src/Sequoia/Profunctor/Value.hs | haskell | * Value profunctor
* Value abstraction
* Construction
* Coercion
Value profunctor
Value abstraction
Construction
Coercion | # LANGUAGE UndecidableInstances #
module Sequoia.Profunctor.Value
type (∘)(..)
, Value(..)
, idV
, constV
, _V
) where
import Control.Category (Category)
import Data.Distributive
import Data.Functor.Identity
import Data.Functor.Rep as Co
import Data.Profunctor
import Data.Profunctor.Rep as Pro
import Data.Profunctor... |
990a0def9d9313b2a603cd687da5926b21294e2f3ef439d7ac74fb5a455f545a | mflatt/macro-dsl-tutorial | house-4.rkt | #lang racket
(require "form-4.rkt")
(form Box1HouseOwning
[hasSoldHouse "Did you sell a house in 2010?" boolean]
(when hasSoldHouse
[sellingPrice "Price the house was sold for:" money]
[privateDebt "Private debts for the sold house:" money]
[valueResidue "Value residue:" money (- se... | null | https://raw.githubusercontent.com/mflatt/macro-dsl-tutorial/76e979d24c2e05bd1457e3a859645cddfee0cbd1/ql/house-4.rkt | racket | #lang racket
(require "form-4.rkt")
(form Box1HouseOwning
[hasSoldHouse "Did you sell a house in 2010?" boolean]
(when hasSoldHouse
[sellingPrice "Price the house was sold for:" money]
[privateDebt "Private debts for the sold house:" money]
[valueResidue "Value residue:" money (- se... | |
2ebadca19488c8f7e0a562fa2d35f96b27b61c674c75f44887a82af021a48629 | Chattered/proplcf | Bootstrap.hs | -- | Just enough theorems to get us going with conversions, proven using a tree
-- notation that allows us to make assumptions.
module Bootstrap where
import Data.Foldable
import Data.List
import Utils
| Proof terms with assumptions . In the notes , we write to denote a proof
-- with conclusion P and assumptio... | null | https://raw.githubusercontent.com/Chattered/proplcf/dddfb1f5717207c3c65bc6a31619d04db3c14c09/Bootstrap.hs | haskell | | Just enough theorems to get us going with conversions, proven using a tree
notation that allows us to make assumptions.
with conclusion P and assumptions Γ. Proofs are not guaranteed to be valid, and
are pushed through the kernel via verify.
| sequent (Γ ⊢ P) yields (Γ, P)
| concl (Γ ⊢ P) yields P
| concl (Γ ⊢... |
module Bootstrap where
import Data.Foldable
import Data.List
import Utils
| Proof terms with assumptions . In the notes , we write to denote a proof
data Proof a = Assume (Term a)
| UseTheorem (Theorem a)
| MP (Proof a) (Proof a)
deriving Eq
sequent :: (Ord a, Show a) =>... |
a7d8e41d870799a0d9801fa4eb50d6d1ba4f72d0f9d2df83163489b71b0cc62b | tarides/dune-release | prompt.ml | type answer = Yes | No
open Bos_setup.R.Infix
let ask_yes_no f ~default_answer =
let options : ('a, Format.formatter, unit, unit) format4 =
match default_answer with Yes -> " [Y/n]" | No -> " [y/N]"
in
App_log.question (fun l ->
f (fun ?header ?tags fmt -> l ?header ?tags (fmt ^^ options)))
let rec l... | null | https://raw.githubusercontent.com/tarides/dune-release/6bfed0f299b82c0931c78d4e216fd0efedff0673/lib/prompt.ml | ocaml | type answer = Yes | No
open Bos_setup.R.Infix
let ask_yes_no f ~default_answer =
let options : ('a, Format.formatter, unit, unit) format4 =
match default_answer with Yes -> " [Y/n]" | No -> " [y/N]"
in
App_log.question (fun l ->
f (fun ?header ?tags fmt -> l ?header ?tags (fmt ^^ options)))
let rec l... | |
a79f90496d1a33ec5f2fb8c51f14a710a0192e2cf84720df2d64876132e49486 | pirapira/coq2rust | modops.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/checker/modops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Various operations on modules a... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Cic
open Envi... |
6229c91d8c97dab983456f88981c3c425cacfe9e7620a61579ebdbf4b54764f4 | Chouser/spread | spread.clj | (ns us.chouser.spread
(:require [clojure.core.reducers :as r]))
(defn ^:private collect-expr
"Conj expr onto the vector exprs, unless expr is a literal map that can be
merged into a existing map at the end of the vector."
[exprs expr]
(if (and (map? (peek exprs)) (map? expr))
(conj (pop exprs) (merge (pe... | null | https://raw.githubusercontent.com/Chouser/spread/43f72129703eea7624d4d7fe1429367dcce7d289/src/us/chouser/spread.clj | clojure | (ns us.chouser.spread
(:require [clojure.core.reducers :as r]))
(defn ^:private collect-expr
"Conj expr onto the vector exprs, unless expr is a literal map that can be
merged into a existing map at the end of the vector."
[exprs expr]
(if (and (map? (peek exprs)) (map? expr))
(conj (pop exprs) (merge (pe... | |
43f187ce4a844730a800660baa3a06e79dce4f93c835d0716052f5904ef6358e | dwayne/haskell-programming | doesItCompile.hs | -- N.B. Yes = it squawks, No = it doesn't squawk i.e. it works
1
bigNum = (^) 5 $ 10
wahoo = bigNum $ 10
-- Yes, because we're trying to apply a number to a number
is one possile fix
2
x = print
y = print "woohoo!"
z = x "hello world"
-- No
3
a = (+)
b = 5
c = b 10
d = c 200
Yes , because b is not a fu... | null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch5/doesItCompile.hs | haskell | N.B. Yes = it squawks, No = it doesn't squawk i.e. it works
Yes, because we're trying to apply a number to a number
No
is one possible fix
is one possible fix |
1
bigNum = (^) 5 $ 10
wahoo = bigNum $ 10
is one possile fix
2
x = print
y = print "woohoo!"
z = x "hello world"
3
a = (+)
b = 5
c = b 10
d = c 200
Yes , because b is not a function that takes two args
4
a = 12 + b
b = 10000 * c
Yes , because c is not defined ( assuming 3 was not defined in this f... |
22b3cb165569fcb23e3d6b0e654b274eafaec6625089cb3cbd0f42a5bb118755 | project-oak/hafnium-verification | cFrontend_errors.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/clang/cFrontend_errors.ml | ocaml | FIXME(t21762295): we do not expect this to happen but it does |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
2113a919ec19ea9e12a6207798a98ab96e71e0767870b2fefe23d4984f480508 | mhaemmerle/grimoire | session.clj | (ns grimoire.session
(:use [lamina core executor]
grimoire.registry)
(:import (org.jboss.netty.util HashedWheelTimer Timeout TimerTask)
(java.util.concurrent TimeUnit))
(:require [grimoire.config :as config]
[grimoire.node :as node]
[grimoire.storage :as storage]
... | null | https://raw.githubusercontent.com/mhaemmerle/grimoire/1fe3506838ec125888fe9241bb14ad57018c3835/src/grimoire/session.clj | clojure | {:keys [async?] :or {:async? false} :as options}
(util/log-with-thread "generic-event-stage - start sleep")
(util/log-with-thread "generic-event-stage - done sleeping")
watch for async tags
instead of resetting the session on the setup call
why not do it instantly?
global-start (* (node/get-node-id) runs)] | (ns grimoire.session
(:use [lamina core executor]
grimoire.registry)
(:import (org.jboss.netty.util HashedWheelTimer Timeout TimerTask)
(java.util.concurrent TimeUnit))
(:require [grimoire.config :as config]
[grimoire.node :as node]
[grimoire.storage :as storage]
... |
508ef22350ac1afe69c42b29c77c3ca6c5fb018e91288d6ae3c87dbb699d0f5f | lucywang000/clj-statecharts | delayed.cljc | (ns statecharts.delayed
(:require [clojure.walk :refer [postwalk]]
[statecharts.utils :as u]))
(defprotocol IScheduler
(schedule [this fsm state event delay])
(unschedule [this fsm state event]))
(defn scheduler? [x]
(satisfies? IScheduler x))
(def path-placeholder [:<path>])
(defn delay-fn-id [... | null | https://raw.githubusercontent.com/lucywang000/clj-statecharts/60a0ce554cf8f07d88962e2f1ba960ed64773080/src/statecharts/delayed.cljc | clojure | When the delay is a context function, after each
reload its value of change, causing the delayed
event can't find a match in :on keys. To cope with
this we extract the function name as the event
element instead.
statecharts.impl/T_DelayedTransition
=>
TODO: the transition's entry/exit shall be grouped by delay,... | (ns statecharts.delayed
(:require [clojure.walk :refer [postwalk]]
[statecharts.utils :as u]))
(defprotocol IScheduler
(schedule [this fsm state event delay])
(unschedule [this fsm state event]))
(defn scheduler? [x]
(satisfies? IScheduler x))
(def path-placeholder [:<path>])
(defn delay-fn-id [... |
be2536c7c097035cf0993ac859694ebce5d2bfabb0120f45d78a8bbc72b48376 | serokell/edna | Handlers.hs | SPDX - FileCopyrightText : 2021 >
--
SPDX - License - Identifier : AGPL-3.0 - or - later
module Edna.Web.Handlers
( ednaHandlers
) where
import Servant.API.Generic (ToServant)
import Servant.Server.Generic (AsServerT, genericServerT)
import qualified Edna.Dashboard.Web.API as Dashboard
import qualified Ed... | null | https://raw.githubusercontent.com/serokell/edna/2ef945254631e469e8b1e9be6027367a9c593fa5/backend/src/Edna/Web/Handlers.hs | haskell |
| Server handler implementation for Edna API. | SPDX - FileCopyrightText : 2021 >
SPDX - License - Identifier : AGPL-3.0 - or - later
module Edna.Web.Handlers
( ednaHandlers
) where
import Servant.API.Generic (ToServant)
import Servant.Server.Generic (AsServerT, genericServerT)
import qualified Edna.Dashboard.Web.API as Dashboard
import qualified Edna.... |
c91a7bdebc81d17ff9a2a93e331d4d51bed2de980e358f2c5105d9f9adb5dbb0 | hspec/hspec | ResultSpec.hs | # LANGUAGE RecordWildCards #
module Test.Hspec.Core.Runner.ResultSpec (spec) where
import Prelude ()
import Helper
import Test.Hspec.Core.Format
import Test.Hspec.Core.Runner.Result
spec :: Spec
spec = do
describe "Summary" $ do
let
summary :: Summary
summar... | null | https://raw.githubusercontent.com/hspec/hspec/a344c428bb28d1a0787792d9befdbb8c8ec2381c/hspec-core/test/Test/Hspec/Core/Runner/ResultSpec.hs | haskell | # LANGUAGE RecordWildCards #
module Test.Hspec.Core.Runner.ResultSpec (spec) where
import Prelude ()
import Helper
import Test.Hspec.Core.Format
import Test.Hspec.Core.Runner.Result
spec :: Spec
spec = do
describe "Summary" $ do
let
summary :: Summary
summar... | |
8cf63efde31b6df487efcc229802e4b2ec3247a033d7ca08d4afd0c09550f6c0 | hexlet-basics/exercises-clojure | index.clj | ;BEGIN
(def result ((fn [x y] (/ (+ x y) 2)) 2 4))
(println result)
;END
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/c5e884e3e65573ef1ff466e5bd29f44dd3e366d5/modules/15-definitions/25-definitions-lambda-call/index.clj | clojure | BEGIN
END | (def result ((fn [x y] (/ (+ x y) 2)) 2 4))
(println result)
|
db509b61454b6fb4f294a98b2d697a438fe65c8eddb966f079e0ab802351da9e | mirage/io-page | config.ml | open Mirage
let io_page =
foreign "Unikernel.Make"
(console @-> job)
let () =
register "io-page" ~packages:[ package "io-page" ]
[ io_page $ default_console ]
| null | https://raw.githubusercontent.com/mirage/io-page/cc82c9cbd1e1caf7c40e12891b9e668d94b06b88/unikernel/config.ml | ocaml | open Mirage
let io_page =
foreign "Unikernel.Make"
(console @-> job)
let () =
register "io-page" ~packages:[ package "io-page" ]
[ io_page $ default_console ]
| |
0838ae2ff07091db1f89ad7533f8a807076af3dfb5128da44e8ea9c1f9844a13 | tidalcycles/tidal-fuzz-completer | listen.hs | import Sound.OSC.FD as O
import Control.Concurrent
import Control.Concurrent.MVar
import qualified Network.Socket as N
import qualified Sound.Tidal.Tempo as Tempo
-listener/wiki
-listener/wiki
-}
import Sound.Tidal.Ngrams
import Sound.Tidal.Types
import Sound.Tidal.Tokeniser
import System.Environment
data State... | null | https://raw.githubusercontent.com/tidalcycles/tidal-fuzz-completer/82fde69132fa234b7c9ca9b243c153e44fbfad46/src/listen.hs | haskell | listen
sendMessage r $ Message "/reply" [string "['jux', 'rev', 'sound', '\"bd sn\"']"]
sendMessage r $ Message "/reply" [string "[\"jux\", \"rev\", \"sound\", \"'bd sn cp hh'\"]"]
sendMessage r $ Message "/reply" [string "[\" (#) (every (fast '3 4 5' 1) rev $ jux $ rev $ sound $ 'bd sn cp hh'\"]"] | import Sound.OSC.FD as O
import Control.Concurrent
import Control.Concurrent.MVar
import qualified Network.Socket as N
import qualified Sound.Tidal.Tempo as Tempo
-listener/wiki
-listener/wiki
-}
import Sound.Tidal.Ngrams
import Sound.Tidal.Types
import Sound.Tidal.Tokeniser
import System.Environment
data State... |
098e6b3ce80732b99b1897a017a93dce144c20e5336495d7a50db8ebe30acc41 | scymtym/architecture.builder-protocol | mixins.lisp | ;;;; mixins.lisp --- Mixin classes for builder classes.
;;;;
Copyright ( C ) 2016 , 2018 , 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:architecture.builder-protocol)
;;; `delegating-mixin'
(defclass delegating-mixin ()
((target :initarg :target
:reader target
:accessor %tar... | null | https://raw.githubusercontent.com/scymtym/architecture.builder-protocol/a48abddff7f6e0779b89666f46ab87ef918488f0/src/mixins.lisp | lisp | mixins.lisp --- Mixin classes for builder classes.
`delegating-mixin'
`forwarding-mixin'
A delegating builder mixin that forwards all (un)builder protocol
calls to the target builder.
`prepare' and `wrap' cannot be delegated naively all other methods
can.
The target builder's `prepare' method is allowed to r... | Copyright ( C ) 2016 , 2018 , 2019 Jan Moringen
Author : < >
(cl:in-package #:architecture.builder-protocol)
(defclass delegating-mixin ()
((target :initarg :target
:reader target
:accessor %target
:documentation
"Stores the builder to which `make-node',
... |
d7c0ee118bcd9e45a9a8654c368669b8da9ed0dea1d0b64eb59f8ac761e62a52 | modular-macros/ocaml-macros | t04.ml | (** Testing display of inline record.
@test_types_display
*)
module A = struct
type a = A of {lbl:int}
end
module type E = sig
exception E of {lbl:int}
end
module E_bis= struct
exception E of {lbl:int}
end
| null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocamldoc/t04.ml | ocaml | * Testing display of inline record.
@test_types_display
|
module A = struct
type a = A of {lbl:int}
end
module type E = sig
exception E of {lbl:int}
end
module E_bis= struct
exception E of {lbl:int}
end
|
b2a98cf675fb41c028f30d23afef491f255125d1a292d0d017fe0ee87c12eb36 | jasongilman/crdt-edit | runner.clj | (ns crdt-edit.runner
(:require [crdt-edit.system :as system]
[clojure.tools.cli :as cli])
(:import java.net.InetAddress)
(:gen-class))
(def cli-options
;; An option with a required argument
[["-p" "--port PORT" "Port number"
:id :port
:default 3000
:parse-fn #(Integer/parseInt %)
... | null | https://raw.githubusercontent.com/jasongilman/crdt-edit/2b8126632bc7f204cb3979e9c51f7ab363704f29/src/crdt_edit/runner.clj | clojure | An option with a required argument
A boolean option defaulting to nil | (ns crdt-edit.runner
(:require [crdt-edit.system :as system]
[clojure.tools.cli :as cli])
(:import java.net.InetAddress)
(:gen-class))
(def cli-options
[["-p" "--port PORT" "Port number"
:id :port
:default 3000
:parse-fn #(Integer/parseInt %)
:validate [#(< 0 % 0x10000) "Must be a n... |
7176ccfc7aeab6f41e3037191107e7ed08a7e2d36d7f903222ed014fd14a1970 | bitblaze-fuzzball/fuzzball | options_solver.mli |
Copyright ( C ) BitBlaze , 2009 - 2011 , and copyright ( C ) 2010 Ensighta
Security Inc. All rights reserved .
Copyright (C) BitBlaze, 2009-2011, and copyright (C) 2010 Ensighta
Security Inc. All rights reserved.
*)
val solver_cmdline_opts : (string * Arg.spec * string) list
val solvers_table :
(s... | null | https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/options_solver.mli | ocaml |
Copyright ( C ) BitBlaze , 2009 - 2011 , and copyright ( C ) 2010 Ensighta
Security Inc. All rights reserved .
Copyright (C) BitBlaze, 2009-2011, and copyright (C) 2010 Ensighta
Security Inc. All rights reserved.
*)
val solver_cmdline_opts : (string * Arg.spec * string) list
val solvers_table :
(s... | |
3658664a10b2fdeb7e58fd59b539a78320d573017ef9415c448e73c53d60bb4f | albertoruiz/easyVision | GNS.hs | module Contours.GNS(
GN,
prepareGNS, prepareGNP,
stepGN, stepGN', featF, mktP, featRS)
where
import Util.Geometry
import Contours.Base
import Contours.Fourier
import Util.Homogeneous
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Util(col,(?),(¿),diagl)
import Util.Misc(rotateLeft,degree)
impo... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/contours/contours/src/Contours/GNS.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
res... | module Contours.GNS(
GN,
prepareGNS, prepareGNP,
stepGN, stepGN', featF, mktP, featRS)
where
import Util.Geometry
import Contours.Base
import Contours.Fourier
import Util.Homogeneous
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Util(col,(?),(¿),diagl)
import Util.Misc(rotateLeft,degree)
impo... |
203d29443a212445fc403414f79b2251739f7c523e7d5fa7058c234ead3e36fd | clojure/core.typed | collatz.clj | (ns clojure.core.typed.test.collatz
(:require [clojure.core.typed :refer [ann] :as t]))
(ann collatz [Number -> Number])
(defn collatz [n]
(cond
(= 1 n)
1
(and (integer? n)
(even? n))
(collatz (/ n 2))
:else
(collatz (inc (* 3 n)))))
(collatz 10)
| null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/collatz.clj | clojure | (ns clojure.core.typed.test.collatz
(:require [clojure.core.typed :refer [ann] :as t]))
(ann collatz [Number -> Number])
(defn collatz [n]
(cond
(= 1 n)
1
(and (integer? n)
(even? n))
(collatz (/ n 2))
:else
(collatz (inc (* 3 n)))))
(collatz 10)
| |
b5e6eb73e32e0bd31e4919d77afd056b7980a368bf2282ef22e7032254f9c49a | emotiq/emotiq | package.lisp | (defpackage :emotiq/model/wallet
(:use :cl)
(:nicknames :model/wallet)
(:export
#:mock
#:transactions
#:recovery-phrase
#:get-wallet
#:enumerate-wallets
#:get-wallet-addresses)
(:export
#:enumerate-dictionaries
#:get-dictionary))
| null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/model/package.lisp | lisp | (defpackage :emotiq/model/wallet
(:use :cl)
(:nicknames :model/wallet)
(:export
#:mock
#:transactions
#:recovery-phrase
#:get-wallet
#:enumerate-wallets
#:get-wallet-addresses)
(:export
#:enumerate-dictionaries
#:get-dictionary))
| |
8803230a32fd2707eb000a465e2ee2b50ded8ef17cfbde4d5acb3806d0c6fd13 | Vigilans/hscc | RegexSpec.hs | module Text.Lexer.DFA.RegexSpec where
import Test.Hspec
import Test.QuickCheck
import Text.Lexer.Regex
import Text.Lexer.DFA.Regex
import Text.Lexer.DFA
import qualified Data.Map as M
import qualified Data.Set.Monad as S
regex :: Regex
regex = readRegex "(a|b)*abb"
regex' :: Regex
regex'= augment regex
state :: [In... | null | https://raw.githubusercontent.com/Vigilans/hscc/d612c54f9263d90fb01673aea1820a62fdf62551/test/Text/Lexer/DFA/RegexSpec.hs | haskell | module Text.Lexer.DFA.RegexSpec where
import Test.Hspec
import Test.QuickCheck
import Text.Lexer.Regex
import Text.Lexer.DFA.Regex
import Text.Lexer.DFA
import qualified Data.Map as M
import qualified Data.Set.Monad as S
regex :: Regex
regex = readRegex "(a|b)*abb"
regex' :: Regex
regex'= augment regex
state :: [In... | |
26bbbe5d3ebdf30ffd25cbda98a61408f126ed7c7e26cdeace49b37620737b50 | NB-Iot/emqx-hw-coap | emqx_hw_coap_config.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2013 - 2017 EMQ Enterprise , Inc. ( )
%%
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
%%
%% ... | null | https://raw.githubusercontent.com/NB-Iot/emqx-hw-coap/76436492a22eaa0cd6560b4f135275ecf16245d0/src/emqx_hw_coap_config.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 ) 2013 - 2017 EMQ Enterprise , Inc. ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module (emqx_hw_coap_config).
-include("emqx_hw_coap.hrl").
-export ([register/0, unregister/0]).
register() ->
... |
3697393180a7e9ad19c3e4af6903e0b1283914dad8b2c5a0a25da38a74a0c95a | rizo/snowflake-os | ICH0.ml |
open PCI
open AudioMixer
The ' ICH0 ' sound driver
two sets of port i / o spaces
type io_space = {
read8 : int -> int;
read16 : int -> int;
read32 : int -> int32;
write8 : int -> int -> unit;
write16 : int -> int -> unit;
write32 : int -> int32 -> unit;
}
let make_io_space resource = {
read8 = Addre... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/ICH0.ml | ocaml | set up our i/o spaces
some helper functions rarely used
get buffer descriptor pointers
isr & output routines
the length = total size of input - current position
let samples = Array1.dim block_input.data - block_input.pos in
we've finished!
we can shuffle more data into the card
wait for a free buffer
g... |
open PCI
open AudioMixer
The ' ICH0 ' sound driver
two sets of port i / o spaces
type io_space = {
read8 : int -> int;
read16 : int -> int;
read32 : int -> int32;
write8 : int -> int -> unit;
write16 : int -> int -> unit;
write32 : int -> int32 -> unit;
}
let make_io_space resource = {
read8 = Addre... |
f285ae3bc8bb89ee2f32e853d8e31b81b80d8defc5d45c4dce3fac98c29c0bde | remyzorg/pendulum | player.ml |
open Firebug
Jsoo boilerplate code
module Dom_html = struct
include Dom_html
open Js
class type _mediaElement = object
inherit mediaElement
method onprogress : (_mediaElement t, mouseEvent t) event_listener writeonly_prop
method ontimeupdate : (_mediaElement t, mouseEvent t) event_listener writeo... | null | https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/examples/player/player.ml | ocaml | ========================
Updates the progress bar value proportionnaly to current time
Updates the time of the current position of the cursor over it
Sets the current time of the media tag in proportion
Apply the state switching to the video by calling pause/play action
Update the displayed current time
Th... |
open Firebug
Jsoo boilerplate code
module Dom_html = struct
include Dom_html
open Js
class type _mediaElement = object
inherit mediaElement
method onprogress : (_mediaElement t, mouseEvent t) event_listener writeonly_prop
method ontimeupdate : (_mediaElement t, mouseEvent t) event_listener writeo... |
42c8bb5bf69c23c452dd098a638dd830ba33ab7b0a1e04b18e0248c2e7e2c6ac | ml4tp/tcoq | tacworkertop.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/stm/tacworkertop.ml | 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 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
module W = AsyncTaskQueue.Mak... |
5425364c2da23e9b329e7d6c25b54c8d6263cfb9f8a0c6d1d8016c82e9611fbb | ravichugh/djs | test00.ml |
let _ :: {(= v 3)} = js_plus (1, 2) in
let _ :: {(= v (+ 1 2))} = js_plus (1, 2) in
let _ :: {(= (tag v) "number")} = js_plus (1, 2) in
let _ :: Num = js_plus (1, 2) in
let _ :: {(integer v)} = js_plus (1, 2) in
let _ :: Int = js_plus (1, 2) in
0
| null | https://raw.githubusercontent.com/ravichugh/djs/c4a13e06adb3e0945f39966523a4d944448c1941/tests/functional/numbers/test00.ml | ocaml |
let _ :: {(= v 3)} = js_plus (1, 2) in
let _ :: {(= v (+ 1 2))} = js_plus (1, 2) in
let _ :: {(= (tag v) "number")} = js_plus (1, 2) in
let _ :: Num = js_plus (1, 2) in
let _ :: {(integer v)} = js_plus (1, 2) in
let _ :: Int = js_plus (1, 2) in
0
| |
ad04139cc092ec7726e7afb5765e5139f10f6f98e81fcbd7be38a8bf10813ee6 | j-mie6/ParsleyHaskell | Machine.hs | |
Module : Parsley . Internal . Backend . Machine
Description : The implementation of the low level parsing machinery is found here
License : BSD-3 - Clause
Maintainer : : unstable
@since 0.1.0.0
Module : Parsley.Internal.Backend.Machine
Description : The implementation of the low ... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley-core/src/ghc-8.10%2B/Parsley/Internal/Backend/Machine.hs | haskell | instance Input CacheText
instance Input Lazy.ByteString | |
Module : Parsley . Internal . Backend . Machine
Description : The implementation of the low level parsing machinery is found here
License : BSD-3 - Clause
Maintainer : : unstable
@since 0.1.0.0
Module : Parsley.Internal.Backend.Machine
Description : The implementation of the low ... |
82f1815a5a1b526b1a81ef2dc61ac0f1dffa76164e610855b403b8731a1d8159 | huangjs/cl | ztpmv.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/blas/ztpmv.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
e63701f93eec6d20f8dfb84ce6fbaf0f926f828b2b5d67d6d96d744f968ffaa2 | karimarttila/clojure | user.clj | (ns user
(:require [integrant.repl :refer [reset]]
;[integrant.repl :refer [clear go halt prep init reset reset-all]]
[integrant.repl.state :as state]
[simpleserver.core :as core]))
(integrant.repl/set-prep! core/system-config-start)
(defn system [] (or state/system (throw (ex-in... | null | https://raw.githubusercontent.com/karimarttila/clojure/8fa3b9b6504389619bc9af014f48848e104376ba/webstore-demo/re-frame-demo/src/clj/user.clj | clojure | [integrant.repl :refer [clear go halt prep init reset reset-all]]
M-h: go
M-j: reset
M-k: halt
ctlr+T alt+h: go
M-j: reset
ctlr+T alt+k: halt
alt+j hotkey in Cursive | (ns user
(:require [integrant.repl :refer [reset]]
[integrant.repl.state :as state]
[simpleserver.core :as core]))
(integrant.repl/set-prep! core/system-config-start)
(defn system [] (or state/system (throw (ex-info "System not running" {}))))
(defn env [] (:backend/env (system)))
(defn ser... |
b52dcba0399b660a3623c489c52abc918398b17c0c4dab14db60769f40a75066 | manuel-serrano/hop | cps.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / js2scheme / cps.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/48dcc32fab96323bbafb18bfbe30ede33d5f49fd/js2scheme/cps.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* JavaScript CPS transformation */
* -----------------------... | * serrano / prgm / project / hop / hop / js2scheme / cps.scm * /
* Author : * /
* Creation : We d Sep 11 14:30:38 2013 * /
* Last change : Fri Jan 13 13:51:21 2023 ( serrano ) * /
* Cop... |
cb4c6f58feb45a96ec993594e243d18460f565f0eb101313fa18846b39d5bd48 | footprintanalytics/footprint-web | fingerprinters_test.clj | (ns metabase.sync.analyze.fingerprint.fingerprinters-test
(:require [cheshire.core :as json]
[clojure.string :as str]
[clojure.test :refer :all]
[metabase.models.field :as field :refer [Field]]
[metabase.models.interface :as mi]
[metabase.sync.analyze.finger... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/sync/analyze/fingerprint/fingerprinters_test.clj | clojure | we want to test h2 and postgres, because h2 doesn't
support overriding the timezone for a session / report
LocalDateTime
int
long
string | (ns metabase.sync.analyze.fingerprint.fingerprinters-test
(:require [cheshire.core :as json]
[clojure.string :as str]
[clojure.test :refer :all]
[metabase.models.field :as field :refer [Field]]
[metabase.models.interface :as mi]
[metabase.sync.analyze.finger... |
23a264d2e274b5b04707d22a611efede94f57d6f1ac59795596666d73de2f212 | TyOverby/mono | v2.ml | open Core
open Async
open Private_ssl.V2
type addr =
[ `OpenSSL of Ipaddr_sexp.t * int * Ssl.Config.t
| `TCP of Ipaddr_sexp.t * int
| `Unix_domain_socket of string ]
[@@deriving sexp_of]
let connect ?interrupt dst =
match dst with
| `TCP (ip, port) ->
let endp = Host_and_port.create ~host:(Ipaddr.to_s... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-conduit/src/conduit-async/v2.ml | ocaml | open Core
open Async
open Private_ssl.V2
type addr =
[ `OpenSSL of Ipaddr_sexp.t * int * Ssl.Config.t
| `TCP of Ipaddr_sexp.t * int
| `Unix_domain_socket of string ]
[@@deriving sexp_of]
let connect ?interrupt dst =
match dst with
| `TCP (ip, port) ->
let endp = Host_and_port.create ~host:(Ipaddr.to_s... | |
f1b1bdeeef75c04f0272c79fefc9865f0f44c61ccc9c69b5e5caa3c038e8ba9b | dbuenzli/lit | check.ml | ----------------------------------------------------------------------------
Copyright ( c ) 2007 , . All rights reserved .
Distributed under a BSD license , see .. /LICENSE .
----------------------------------------------------------------------------
Copyright (c) 2007, Daniel C. Bünzli. All right... | null | https://raw.githubusercontent.com/dbuenzli/lit/4058b8a133cd51d3bf756c66b9ab620e39e1d2c4/attic/check.ml | ocaml | ----------------------------------------------------------------------------
Copyright ( c ) 2007 , . All rights reserved .
Distributed under a BSD license , see .. /LICENSE .
----------------------------------------------------------------------------
Copyright (c) 2007, Daniel C. Bünzli. All right... | |
3cb222625691298281e8cb66894a99349377b3a76ffd3e9726fbe50798aff685 | lispnik/cl-http | dom-server.lisp | ;;; -*- Package: ("HTTP"); -*-
(in-package "HTTP")
"<DOCUMENTATION>
<DESCRIPTION>
server interface to generation functions
<P>
they will attempt to serve in the form which the client accepts.
which means xml-capable clients get xml, html-capable get the
xml restyled to html elements...
see <A HREF='/Do... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/janderson/xml-1999-05-03/dom-server.lisp | lisp | -*- Package: ("HTTP"); -*-
XML:dom-exports.lisp'>dom-exports.lisp</A>
html is printed with the default namespace set so as to leave the tokens unqualified. |
(in-package "HTTP")
"<DOCUMENTATION>
<DESCRIPTION>
server interface to generation functions
<P>
they will attempt to serve in the form which the client accepts.
which means xml-capable clients get xml, html-capable get the
xml restyled to html elements...
for the url exports.
"
(defMethod dom-document... |
1bb13f2fce9e7651623438f09613660ec7d1b6fcb7b7d9cf54beac7f8fd61c3d | kennytilton/cells | observer.lisp | ;; -*- mode: Lisp; Syntax: Common-Lisp; Package: triple-cells; -*-
;;;
;;;
Copyright ( c ) 2008 by .
;;;
(in-package :3c)
(defmacro make-observer (id form)
`(call-make-observer ,id
'(lambda (s p new-value prior-value prior-value?)
(declare (ignorable s p new-value prior-value prior-value?))
... | null | https://raw.githubusercontent.com/kennytilton/cells/64d05c83e155d5f35b3bd115dcd07f152ef79c39/triple-cells/observer.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: triple-cells; -*-
while we're at it
(trc "observing" p new-value)
just need one to decide to schedule
(let ((o (new-blank-node))) ;; o = observation, an instance of a cell to be observed and its parameters
(defun process-observer-queue ()
(index-new-triples)... | Copyright ( c ) 2008 by .
(in-package :3c)
(defmacro make-observer (id form)
`(call-make-observer ,id
'(lambda (s p new-value prior-value prior-value?)
(declare (ignorable s p new-value prior-value prior-value?))
,form)))
(defun call-make-observer (id observer)
(add-triple id !ccc:obser... |
ec4be5f6297a1e6f200c5a107886a7608bc574f2c38d4cd90fd56c7ea44d5a19 | ghcjs/ghcjs | t9844.hs | {-# LANGUAGE BangPatterns #-}
module Main where
import Debug.Trace
newtype N = N Int
f0 :: N -> Int
f0 n = case n of
!(N _) -> 0
f1 :: N -> Int
f1 n = n `seq` case n of
N _ -> 0
main = do
print $ f0 (trace "evaluated f0" (N 1))
print $ f1 (trace "evaluated f1" (N 1))
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/deSugar/t9844.hs | haskell | # LANGUAGE BangPatterns # | module Main where
import Debug.Trace
newtype N = N Int
f0 :: N -> Int
f0 n = case n of
!(N _) -> 0
f1 :: N -> Int
f1 n = n `seq` case n of
N _ -> 0
main = do
print $ f0 (trace "evaluated f0" (N 1))
print $ f1 (trace "evaluated f1" (N 1))
|
25daa0d8a3929e2db5e0bdb8ba2db6000cee54f2426624afb2ab2f722af0df5c | ruhatch/mirage-btrees | node.ml | module type NODE = sig
type t
type pointer
type key
type value
val create : int -> t
val noKeys : t -> int
val setNoKeys : t -> int -> unit
val minDegree : t -> int
val pageSize : t -> int
val leaf : t -> bool
val setLeaf : t -> bool -> unit
val getChild : t -> int -> pointer
val ... | null | https://raw.githubusercontent.com/ruhatch/mirage-btrees/902decc6948f49034c87b5b20270a2d686476aea/lib/node.ml | ocaml | module type NODE = sig
type t
type pointer
type key
type value
val create : int -> t
val noKeys : t -> int
val setNoKeys : t -> int -> unit
val minDegree : t -> int
val pageSize : t -> int
val leaf : t -> bool
val setLeaf : t -> bool -> unit
val getChild : t -> int -> pointer
val ... | |
e36165ffbdc266c7496461af9bee3b7ef19ecf33672e47097a00bf372c610137 | mfoemmel/erlang-otp | wxListView.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxListView.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxListView).
-include("wxe.hrl").... |
b1bb15f833813169698f96fb5fbcb965afd2c409c0ed7f44407d23a2b546ff20 | danx0r/festival | singing-mode.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Festival Singing Mode
;;;
Written by
Carnegie Mellon University
11 - 752 - " Speech : Phonetics , Prosody , Perception and Synthesis "
Spring 2001
;;;
Extended by < > , 2006 :
;;; - Slur support.
- Czech support .
;;; - Some... | null | https://raw.githubusercontent.com/danx0r/festival/6701715566aee6519a8b7949b567f2fdad1e2772/lib/singing-mode.scm | scheme |
Festival Singing Mode
- Slur support.
- Some cleanup.
- Print debugging information only when singing-debug is true.
This code is public domain; anyone may use it freely.
Set this to t to enable debugging messages:
XML parsing functions
This variable defines the actions that are to be taken when
... | Written by
Carnegie Mellon University
11 - 752 - " Speech : Phonetics , Prosody , Perception and Synthesis "
Spring 2001
Extended by < > , 2006 :
- Czech support .
(require_module 'rxp)
(xml_register_id "-//SINGING//DTD SINGING mark up//EN"
(path-append xml_dtd_dir "Singing.v0_1.dtd")
)
(xml_reg... |
dad7d301b2454cfe6dcc98f5d756f71af7f7a2c086416325e68c766fe8ea9d1a | yurug/ocaml4.04.0-copatterns | typemod.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/typing/typemod.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Longident
open Path
open Asttypes
open Parsetree
open Types
open Format
type error =
... |
8b8b77dcb9715d0aadf9082fcd24d46521676d7bda9296755110596c78550746 | mejgun/haskell-tdlib | SetChatPhoto.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.SetChatPhoto where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.InputChatPhoto as InputChatPhoto
import qualified Utils as U
-- |
-- Changes the photo of a chat. Supported only for basic groups, supergroups an... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Query/SetChatPhoto.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
| New chat photo; pass null to delete the chat photo
| Chat identifier |
module TD.Query.SetChatPhoto where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.InputChatPhoto as InputChatPhoto
import qualified Utils as U
data SetChatPhoto = SetChatPhoto
photo :: Maybe InputChatPhoto.InputChatPhoto,
chat_id :: Maybe Int
}
deriving (... |
0e968185a03e301d3f8903970c4cf29ffa359908c0965d526646ebd49b0ce901 | ivanjovanovic/sicp | 5.2.scm | (load "../common.scm")
; In order to test if machines we design are returning proper results, we are
; going to build a simulator that will run the machine. In that way, we'll see
; how our machines behave.
;
; Generally, machines will be defined by the interface of for procedures
;
; (make-machine <register-names> <op... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.2/5.2.scm | scheme | In order to test if machines we design are returning proper results, we are
going to build a simulator that will run the machine. In that way, we'll see
how our machines behave.
Generally, machines will be defined by the interface of for procedures
(make-machine <register-names> <operations> <controller>)
(set-... | (load "../common.scm")
one example is gcd machine
( branch ( label gcd - done ) )
( goto ( label test - b ) )
(define (make-machine register-names ops controller-text)
creating one empty machine model
(for-each (lambda (register-name)
register-names)
machine))
(define (make-register name... |
370837aa15afdc9bd79ebd35aa2f3196ceeb26bf42103ed0b9f5ca57d8e5cfc3 | 8c6794b6/guile-tjit | t-pic-01.scm | ;;; Test for deoptimization. Running procedure `loop' with small integer
arguments for first time , then re - run the procedure with floating
;;; point number as arguments.
(define (loop n incr)
(let lp ((n n) (acc 0))
(if (< 0 n)
(lp (- n 1) (+ acc incr))
acc)))
(list (loop #e1e3 125)
(... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-pic-01.scm | scheme | Test for deoptimization. Running procedure `loop' with small integer
point number as arguments. | arguments for first time , then re - run the procedure with floating
(define (loop n incr)
(let lp ((n n) (acc 0))
(if (< 0 n)
(lp (- n 1) (+ acc incr))
acc)))
(list (loop #e1e3 125)
(loop #e1e3 1.25)
(loop #e1e3 125)
(loop #e1e3 1.25))
|
63cc7167b73866339eec419cbf450371e9dc139cd432140eabe3676f9504c562 | AccelerateHS/accelerate-examples | Step.hs |
module Step (
stepRank, Update, PageGraph
) where
import Page
import Data.Array.Accelerate as A
type PageGraph = Vector Link
type Update = (PageId, Rank)
-
-- | Find the page rank contribution of one edge in the page graph .
contribution
: : Acc ( Vector Int ) -- ^ Number o... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/pagerank/Step.hs | haskell | | Find the page rank contribution of one edge in the page graph .
^ Number of outgoing links for each page .
^ Old ranks vector .
^ A link .
^ New rank .
| Updates a vector of ranks by a given vector of updates .
^ Old partial ranks .
^ Updates .
^ New partial ranks .
Sizes .
Initial ranks .
Fina... |
module Step (
stepRank, Update, PageGraph
) where
import Page
import Data.Array.Accelerate as A
type PageGraph = Vector Link
type Update = (PageId, Rank)
-
contribution
contribution sizes ranks link
= let ( from , to ) = unlift link : : ( Exp PageId , Exp PageId )
in lift ( to ... |
d46f3c246a93a9491c07d13a16288ae68867cdfa99e7e81bc2836d0ad30d0502 | softlab-ntua/bencherl | comm_server.erl | 2008 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/src/comm_layer/comm_server.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2008 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc : CommLayer : Management of comm_connection processes .
@author < >
@author < >
@version $ I d : comm_server.erl 25... |
d39101ccfb71cd10e9cdb3464ea0e37a280bedd7c2523266128235b52f42a34e | CLowcay/hgbc | CommandLine.hs | module HGBC.Config.CommandLine
( Options (..),
parse,
)
where
import qualified Data.Text as T
import HGBC.Config.Decode (decodeColorCorrection, decodeMode)
import qualified Machine.GBC.Color as Color
import Machine.GBC.Mode (EmulatorMode)
import Options.Applicative (Parser, ParserInfo, action, auto, completeWi... | null | https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/main/src/HGBC/Config/CommandLine.hs | haskell | module HGBC.Config.CommandLine
( Options (..),
parse,
)
where
import qualified Data.Text as T
import HGBC.Config.Decode (decodeColorCorrection, decodeMode)
import qualified Machine.GBC.Color as Color
import Machine.GBC.Mode (EmulatorMode)
import Options.Applicative (Parser, ParserInfo, action, auto, completeWi... | |
9f12f6871bed6739091c7cadab3a2305fc626b953b5b8e79113103c81e4067de | caisah/sicp-exercises-and-examples | ex.3.67.scm | ;; Modify the pairs procedure so that (pairs integers integers) will produce the stream
;; of all pairs of integers (i, j) (without the condition i<=j). Hint: You will need to
;; mix in an additional stream.
(define integers
(cons-stream 0 (stream-map 1+ integers)))
(define (all-pairs s t)
(cons-stream
(list ... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.5.3-exploiting_the_stream_paradigm/ex.3.67.scm | scheme | Modify the pairs procedure so that (pairs integers integers) will produce the stream
of all pairs of integers (i, j) (without the condition i<=j). Hint: You will need to
mix in an additional stream. |
(define integers
(cons-stream 0 (stream-map 1+ integers)))
(define (all-pairs s t)
(cons-stream
(list (stream-car s) (stream-car t))
(interleave
(interleave
(stream-map (lambda (x) (list (stream-car s) x))
(stream-cdr t))
(all-pairs (stream-cdr s) (stream-cdr t)))
(stream... |
677c4dcb3a257f9f1843ff787ba76563ef308a95b4fc6ae300fe4a3aea1fb5b1 | ivanjovanovic/sicp | e-1.5.scm | Exercise 1.5
has invented a test to determine whether the interpreter he is faced with is using
applicative - order evaluation or normal - order evaluation . He defines the following two procedures :
; self referencing procedure that will end up in endless recursion when evaluated.
(define (p) (p))
test is ... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/1.1/e-1.5.scm | scheme | self referencing procedure that will end up in endless recursion when evaluated.
then he tests the interpreter with
Normal order evaluation:
In this case operand (p) will not be evaluated until it is needed by
some primitive operation and thus this will return 0 as result.
Applicative order evaluation:
In... | Exercise 1.5
has invented a test to determine whether the interpreter he is faced with is using
applicative - order evaluation or normal - order evaluation . He defines the following two procedures :
(define (p) (p))
test is procedure that has 2 branches based on input x so we can choose if we evaluate the ... |
2b83ce8f57b0b5c14bd5b842224079acf6e9de3fe8fa2c0483e348ef645cdc30 | EFanZh/EOPL-Exercises | exercise-1.20.rkt | #lang eopl
Exercise 1.20 [ ★ ] ( count - occurrences ) returns the number of occurrences of s in slist .
;;
;; > (count-occurrences 'x '((f x) y (((x z) x))))
3
;; > (count-occurrences 'x '((f x) y (((x z) () x))))
3
;; > (count-occurrences 'w '((f x) y (((x z) x))))
;; 0
(define count... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-1.20.rkt | racket |
> (count-occurrences 'x '((f x) y (((x z) x))))
> (count-occurrences 'x '((f x) y (((x z) () x))))
> (count-occurrences 'w '((f x) y (((x z) x))))
0 | #lang eopl
Exercise 1.20 [ ★ ] ( count - occurrences ) returns the number of occurrences of s in slist .
3
3
(define count-occurrences-sexp
(lambda (s sexp)
(if (symbol? sexp)
(if (eqv? sexp s) 1 0)
(count-occurrences s sexp))))
(define count-occurrences
(lambda (s slist)
... |
0784a40fae4985377eed2e1ab7690f7dc35897cdd864401824398618b832e7c8 | geophf/1HaskellADay | Solution.hs | module Y2020.M10.D15.Solution where
import Y2020.M10.D12.Solution -- for Country-type
import Y2020.M10.D14.Solution
{--
...
-- sigh.
But, of course, now that I have ContinentMap, I don't want that.
I want to know the continent of a given country, and I don't want to do
a reverse lookup to find that contin... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M10/D15/Solution.hs | haskell | for Country-type
-
...
-- sigh.
But, of course, now that I have ContinentMap, I don't want that.
I want to know the continent of a given country, and I don't want to do
a reverse lookup to find that continent. What I'm really after is this:
-
But, given ContinentMap, it's 'easy' to derive CountryMap
} | module Y2020.M10.D15.Solution where
import Y2020.M10.D14.Solution
import Data.Tuple (swap)
import Data.Map (Map)
import qualified Data.Map as Map
type CountryMap = Map Country Continent
Today 's problem is for you to do so .
countryMap :: ContinentMap -> CountryMap
countryMap = Map.fromList . map swap . conc... |
0bc7be0be16747c22592b9809d079f6801251adc1c686847895a440262d0d38a | Enecuum/Node | Validation.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
module Enecuum.TestData.Validation where
import Enecuum.Prelude
import Data.Validation
import Control.Lens
import qualified Enecuum.Language as L
data ValidationRequest = ValidRequest | Inv... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/test-framework/Enecuum/TestData/Validation.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DuplicateRecordFields #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
module Enecuum.TestData.Validation where
import Enecuum.Prelude
import Data.Validation
import Control.Lens
import qualified Enecuum.Language as L
data ValidationRequest = ValidRequest | InvalidRequest
deriving (Show, Eq... |
0a8d304c61f54eba7d62258776b510b73fca32bf80e4a05b380e36249c61a79e | TrustInSoft/tis-kernel | Aorai_test.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/aorai/tests/aorai/Aorai_test.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
open Kernel
module StdString = String
include Plugin.Register
(struct
let name = "aorai testing ... |
32d2d9b6b18dab27becc25be544b3717b0f5dc044cc66f1cd42c74faa061b3c2 | KitchenTableCoders/immutable-stack-2 | figwheel.clj | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!
{:figwheel-options {}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel true
:source-paths ["src"]
:compiler {:main 'breakout2.core
:asset-path "js"
:output-to... | null | https://raw.githubusercontent.com/KitchenTableCoders/immutable-stack-2/12beb62b09d3025645d83778a6963ef763ad5b96/om/breakout2/script/figwheel.clj | clojure | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!
{:figwheel-options {}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel true
:source-paths ["src"]
:compiler {:main 'breakout2.core
:asset-path "js"
:output-to... | |
7b8d8d767f422f31bdd45f04d766e6a00489289fd4850fae4ebb64e20efffeb0 | fulcrologic/guardrails | utils.cljc | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -2.0/ )
;; 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 ... | null | https://raw.githubusercontent.com/fulcrologic/guardrails/17b47a7869314efbffe5dbe0c0daea7c30ed9006/src/main/com/fulcrologic/guardrails/utils.cljc | clojure | The use and distribution terms for this software are covered by the
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 remove this notice, or any other, from this software.
Note `ma... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -2.0/ )
(ns ^:no-doc com.fulcrologic.guardrails.utils
#?(:cljs (:require-macros com.fulcrologic.guardrails.utils))
(:require
#?(:clj [clojure.stacktrace :as st])
[clojure.walk :as walk]))
(defn cljs-env? [env] (boolean (:ns env)))
... |
c1455ee82f5113950f7aab25fb8f8714af90ea94d6afeff878a25bc70b05468d | rd--/hsc3 | bufAllpassC.help.hs | -- bufAllpassC ; filtered decaying noise bursts
let b = localBufId 'α' 1 44100
d = dustId 'β' ar 1
n = whiteNoiseId 'γ' ar
x = decay d 0.2 * n * 0.25
in bufAllpassC b x 0.25 6
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/bufAllpassC.help.hs | haskell | bufAllpassC ; filtered decaying noise bursts | let b = localBufId 'α' 1 44100
d = dustId 'β' ar 1
n = whiteNoiseId 'γ' ar
x = decay d 0.2 * n * 0.25
in bufAllpassC b x 0.25 6
|
8316f36b279d2da82ac7437e6707f7774538c12cfdcfe6b733d912c934fff6d6 | ucsd-progsys/dsolve | assume.ml | let f x =
assume (x > 0);
assert (x > 0)
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/postests/assume.ml | ocaml | let f x =
assume (x > 0);
assert (x > 0)
| |
32d4b28715751a9969757b9a40cefd7b9281a274957e562dc963a5e99857ac0c | marick/structural-typing | pseudopreds.clj | (ns ^:no-doc structural-typing.guts.preds.pseudopreds
"Preds that are used througout"
(:use structural-typing.clojure.core)
(:require [structural-typing.guts.preds.wrap :as wrap]
[structural-typing.guts.expred :as expred]
[structural-typing.guts.explanations :as explain]
[struc... | null | https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/src/structural_typing/guts/preds/pseudopreds.clj | clojure | When called directly, it can't get a 'missing' value, so it's the same
as `reject-nil`. | (ns ^:no-doc structural-typing.guts.preds.pseudopreds
"Preds that are used througout"
(:use structural-typing.clojure.core)
(:require [structural-typing.guts.preds.wrap :as wrap]
[structural-typing.guts.expred :as expred]
[structural-typing.guts.explanations :as explain]
[struc... |
4b141b9590f5b4192c733b3aff9bf02b9467061dd466af3de5cfdc73bd4b0b8c | youngker/clj-opengrok | core_test.clj | (ns clj-opengrok.core-test
(:require [clojure.test :refer :all]
[clj-opengrok.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/youngker/clj-opengrok/120881cab93a2d88384bef99219e99c53c3307d1/test/clj_opengrok/core_test.clj | clojure | (ns clj-opengrok.core-test
(:require [clojure.test :refer :all]
[clj-opengrok.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
f692710954de82fbf087ee7bd8b224ee7cea878aa7bd44c6e060ca9a4e4d997d | haskell-tools/haskell-tools | Extensions.hs | -- all extensions should be matched
module Language.Haskell.Tools.Refactor.Utils.Extensions
( module Language.Haskell.Tools.Refactor.Utils.Extensions
, GHC.Extension(..)
) where
import Data.Maybe (fromMaybe)
import Control.Reference ((^.), _1, _2, _3)
import Language.Haskell.Extension (KnownExtension(..))
imp... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/Language/Haskell/Tools/Refactor/Utils/Extensions.hs | haskell | all extensions should be matched
| Expands an extension into all the extensions it implies (keeps original as well)
| Replaces deprecated extensions with their new counterpart
This is a helper function for parsing extensions
Should be always used in composition with show (@seriealizeExt . show@)
when refactoring ... |
module Language.Haskell.Tools.Refactor.Utils.Extensions
( module Language.Haskell.Tools.Refactor.Utils.Extensions
, GHC.Extension(..)
) where
import Data.Maybe (fromMaybe)
import Control.Reference ((^.), _1, _2, _3)
import Language.Haskell.Extension (KnownExtension(..))
import qualified Language.Haskell.TH.Lan... |
e931c6f8963cc50adcc66470509da6871ce0c9e3068e620a5344759c4eaef1d7 | ghcjs/ghcjs-dom | HTMLMenuElement.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.HTMLMenuElement
(js_setCompact, setCompact, js_getCompact, getCompact,
HTMLMenu... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLMenuElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.HTMLMenuElement
(js_setCompact, setCompact, js_getCompact, getCompact,
HTMLMenuElement(..), gTypeHTMLMenuElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, ... |
1f72b36726595038edbcb3520b02b4e46b8ff3a50ece2ec4132af5a5287975d1 | spurious/chibi-scheme-mirror | numeric-tests.scm |
;; these tests are only valid if chibi-scheme is compiled with full
;; numeric support (USE_BIGNUMS, USE_FLONUMS and USE_MATH)
(cond-expand
(modules (import (only (chibi test) test-begin test test-end)))
(else #f))
(test-begin "numbers")
(define (integer-neighborhoods x)
(list x (+ 1 x) (+ -1 x) (- x) (- 1 x) (... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/numeric-tests.scm | scheme | these tests are only valid if chibi-scheme is compiled with full
numeric support (USE_BIGNUMS, USE_FLONUMS and USE_MATH)
fix x fix
fix x big
big x fix
big x bigger
bigger x big |
(cond-expand
(modules (import (only (chibi test) test-begin test test-end)))
(else #f))
(test-begin "numbers")
(define (integer-neighborhoods x)
(list x (+ 1 x) (+ -1 x) (- x) (- 1 x) (- -1 x)))
(test '(536870912 536870913 536870911 -536870912 -536870911 -536870913)
(integer-neighborhoods (expt 2 29)))
(t... |
a3fda6f7ad6fa02f214976d062bd3ef656f37873881c2091c1b93d904ecc7602 | jaspervdj/patat | Extended.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Data.Aeson.Extended
( module Data.Aeson
, FlexibleNum (..)
) where
import Data.Aeson
import qualified Data.Text as T
import Prelude
import Text.Read (readMaybe)
-- | This can be parsed from a JSON string in addition to a JSON ... | null | https://raw.githubusercontent.com/jaspervdj/patat/9e0d0ccde9afee07ea23521546c406033afeb4f9/lib/Data/Aeson/Extended.hs | haskell | | This can be parsed from a JSON string in addition to a JSON number. | # LANGUAGE GeneralizedNewtypeDeriving #
module Data.Aeson.Extended
( module Data.Aeson
, FlexibleNum (..)
) where
import Data.Aeson
import qualified Data.Text as T
import Prelude
import Text.Read (readMaybe)
newtype FlexibleNum a = FlexibleNum {unFlexibleNum :: a}
deri... |
83084997dd5c0fe67e0a0783c518bd41b78eb544f2563d5603d94c0f706457c5 | tweag/pirouette | Monadic.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# ... | null | https://raw.githubusercontent.com/tweag/pirouette/35c88ead8bc0b2222d94b1349fe42cf3ea3b1fa5/src/Pirouette/SMT/Monadic.hs | haskell | # LANGUAGE RankNTypes #
* Convenient re-exports
OLD CODE
| Solver monad for a specific solver, passed as a phantom type variable @s@ (refer to 'IsSolver' for more)
to know the supported solvers. That's a phantom type variable used only to distinguish
solver-specific operations, such as initialization
an action ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstance... |
0646cf7839bff0298d790152f1e5a52c636a402fa035951fdecd2cd32e1da120 | LaurentRDC/hakyll-images | Images.hs | -- |
-- Module : Hakyll.Images
-- Description : Hakyll utilities for image files
Copyright : ( c ) , 2019 - present
-- License : BSD3
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
This package defines a few Hakyll compilers . These compilers help deal with images
in the... | null | https://raw.githubusercontent.com/LaurentRDC/hakyll-images/5f9284a97f3fc8f056a79fd5321c39e56622c93f/library/Hakyll/Images.hs | haskell | |
Module : Hakyll.Images
Description : Hakyll utilities for image files
License : BSD3
Maintainer :
Stability : unstable
Portability : portable
Items must be loaded before compilers can be used, like so:
@
, resizeImageCompiler
)... | Copyright : ( c ) , 2019 - present
This package defines a few Hakyll compilers . These compilers help deal with images
in the context of Hakyll programs , such as JPEG compression or image resizing .
import Hakyll
import Hakyll . Images ( loadImage
route idRoute
... |
6af4953a37d3886cac422055527435357b23f66954cd39827cfbb9ab2648783c | mbj/stratosphere | StreamModeDetailsProperty.hs | module Stratosphere.Kinesis.Stream.StreamModeDetailsProperty (
StreamModeDetailsProperty(..), mkStreamModeDetailsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/kinesis/gen/Stratosphere/Kinesis/Stream/StreamModeDetailsProperty.hs | haskell | module Stratosphere.Kinesis.Stream.StreamModeDetailsProperty (
StreamModeDetailsProperty(..), mkStreamModeDetailsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value... | |
113b51c5dad0a8a7d67cfecf6de3878a50d3f31ba7a8d7ffb01313b5d74457b2 | HaxeFoundation/ocamllibs | tTFSwfWriter.ml |
* Copyright ( C)2005 - 2014 Haxe Foundation
*
* Permission is hereby granted , free of charge , to any person obtaining a
* copy of this software and associated documentation files ( the " Software " ) ,
* to deal in the Software without restriction , including without limitation
* the rights to... | null | https://raw.githubusercontent.com/HaxeFoundation/ocamllibs/97e498e1b3bc2b3f08cfcae874b8529e4292bc3d/ttflib/tTFSwfWriter.ml | ocaml | fix or check |
* Copyright ( C)2005 - 2014 Haxe Foundation
*
* Permission is hereby granted , free of charge , to any person obtaining a
* copy of this software and associated documentation files ( the " Software " ) ,
* to deal in the Software without restriction , including without limitation
* the rights to... |
d6af93ac3e29e507f550ac4c6643833696923d2f4755e8ff3b929fbf4f0d69a0 | expipiplus1/vulkan | VK_EXT_acquire_xlib_display.hs | {-# language CPP #-}
-- | = Name
--
VK_EXT_acquire_xlib_display - instance extension
--
= = VK_EXT_acquire_xlib_display
--
-- [__Name String__]
-- @VK_EXT_acquire_xlib_display@
--
-- [__Extension Type__]
-- Instance extension
--
-- [__Registered Extension Number__]
90
--
-- [__Revision__]
1
--
-... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_EXT_acquire_xlib_display.hs | haskell | # language CPP #
| = Name
[__Name String__]
@VK_EXT_acquire_xlib_display@
[__Extension Type__]
Instance extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_EXT_direct_mode_display@ to be enabled
[__Contact__]
== Other Ex... | VK_EXT_acquire_xlib_display - instance extension
= = VK_EXT_acquire_xlib_display
90
1
- Requires support for Vulkan 1.0
-
< -Docs/issues/new?body=[VK_EXT_acquire_xlib_display ] @cubanismo%0A*Here describe the issue or question you have about the VK_EXT_acquire_xlib_display ... |
7ca415e31e1035baf0bfe2acc3ebf7cfb699d0cd4db5359f32243630076dd091 | chunsj/TH | generator.lisp | (declaim (optimize (speed 3) (debug 1) (safety 0)))
(in-package :th)
(defmethod $copy! ((generator generator) from)
(let ((gen (make-instance 'generator))
(h (th-generator-copy ($handle generator)
($handle from))))
(setf ($handle gen) h)
#+sbcl (sb-ext:finalize gen (lam... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/binding/generator.lisp | lisp | (declaim (optimize (speed 3) (debug 1) (safety 0)))
(in-package :th)
(defmethod $copy! ((generator generator) from)
(let ((gen (make-instance 'generator))
(h (th-generator-copy ($handle generator)
($handle from))))
(setf ($handle gen) h)
#+sbcl (sb-ext:finalize gen (lam... | |
438bafb0ded2c77ad553b05afd5ef6a426c7c0b977a78f9adb4fee0e4a19c846 | satori-com/mzbench | mzb_worker_runner.erl | -module(mzb_worker_runner).
-export([run_worker_script/5]).
-include_lib("mzbench_language/include/mzbl_types.hrl").
-spec run_worker_script([script_expr()], worker_env() , module(), Pool :: pid(), PoolName ::string())
-> ok.
run_worker_script(Script, Env, Worker, PoolPid, PoolName) ->
_ = random:seed(now())... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/node/apps/mzbench/src/mzb_worker_runner.erl | erlang | we don't want to call terminate if init crashes
we also don't want to call terminate if another terminate crashes
do not call terminate in this case because worker provider
needs it's state to call worker's terminate function | -module(mzb_worker_runner).
-export([run_worker_script/5]).
-include_lib("mzbench_language/include/mzbl_types.hrl").
-spec run_worker_script([script_expr()], worker_env() , module(), Pool :: pid(), PoolName ::string())
-> ok.
run_worker_script(Script, Env, Worker, PoolPid, PoolName) ->
_ = random:seed(now())... |
e283c89d4d11772558e0ea4d570108b4ad4db5975f0c1503b004050d432ae115 | altsun/My-Lisps | (TL) Tong chieu dai -DoanQuyen.lsp |
;;;--------------------------------------------------------------------
(defun Length1(e) (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)))
;;;--------------------------------------------------------------------
(defun C:TL( / ss L e)
(setq
ss (ssget (list (cons 0 "LINE,ARC,CIRCLE,POLYLINE,LWPOLYLINE,ELLIPSE,S... | null | https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Common/Length/(TL)%20Tong%20chieu%20dai%20-DoanQuyen.lsp | lisp | --------------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------------------------- |
(defun Length1(e) (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)))
(defun C:TL( / ss L e)
(setq
ss (ssget (list (cons 0 "LINE,ARC,CIRCLE,POLYLINE,LWPOLYLINE,ELLIPSE,SPLINE")))
L 0.0
)
(vl-load-com)
(while (setq e (ssname ss 0))
(setq L (+ L (length1 e)))
(ssdel e ss)
)
(alert (strcat "Total length = " (rtos L... |
e3f7f5cc79f561de156b78bd568c429914c783173ea27af57588f013f4b53c22 | dada-lang/dada-model | smoke-test.rkt | #lang racket
(require redex)
(require "../dada.rkt")
(dada-check-program-ok
(test-program () ()))
(; fn identity(x: int) -> int { x.give }
dada-check-program-ok
(test-program
()
((hello-world (fn (() ((x int)) -> int) = (give (x))))))) | null | https://raw.githubusercontent.com/dada-lang/dada-model/8725154c144c181633c62e7c18879642f91cf98c/racket/z-tests/smoke-test.rkt | racket | fn identity(x: int) -> int { x.give } | #lang racket
(require redex)
(require "../dada.rkt")
(dada-check-program-ok
(test-program () ()))
dada-check-program-ok
(test-program
()
((hello-world (fn (() ((x int)) -> int) = (give (x))))))) |
110ae044b95db15666c52e79826dbd6247217b80779627b6dde370b21b4561d6 | msakai/toysolver | build_artifacts.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
script for building artifacts on AppVeyor and
import Turtle
import qualified Control.Foldl as L
import Control.Monad
import Distribution.Package
import Distribution.PackageDescription
import Distribution.PackageDescription.Parsec
import Distribution.Pretty
#if ... | null | https://raw.githubusercontent.com/msakai/toysolver/5c6244e303ac3d4a87b2bf916e7c834cdab600e5/misc/build_artifacts.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
script for building artifacts on AppVeyor and
import Turtle
import qualified Control.Foldl as L
import Control.Monad
import Distribution.Package
import Distribution.PackageDescription
import Distribution.PackageDescription.Parsec
import Distribution.Pretty
#if MIN_VERSION_Cabal(3,8,0)
import Dis... |
499ac35e7c3103c345439b8a2e4a7fcf8494e29716b606448879ce35cc427dde | ocsigen/ocsigen-start | demo_pgocaml_db.ml | (* This file was generated by Ocsigen Start.
Feel free to use it, modify it, and redistribute it as you wish. *)
open Os_db
We are using PGOCaml to make type safe DB requests to Postgresql .
The Makefile automatically compiles
all files * _ db.ml with PGOCaml 's ppx syntax extension .
The Makefile... | null | https://raw.githubusercontent.com/ocsigen/ocsigen-start/ec2c827682bcb1f6a60fa65ba9ca8d67d8b64429/template.distillery/demo_pgocaml_db.ml | ocaml | This file was generated by Ocsigen Start.
Feel free to use it, modify it, and redistribute it as you wish. |
open Os_db
We are using PGOCaml to make type safe DB requests to Postgresql .
The Makefile automatically compiles
all files * _ db.ml with PGOCaml 's ppx syntax extension .
The Makefile automatically compiles
all files *_db.ml with PGOCaml's ppx syntax extension.
*)
let get () =
full_transactio... |
2cc61f712ee295449c2d191f72df740f813778565c3456d56b3b835088fb7317 | Clozure/ccl-tests | imagpart.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Sep 7 07:47:43 2003
Contains : Tests of IMAGPART
(in-package :cl-test)
(deftest imagpart.error.1
(signals-error (imagpart) program-error)
t)
(deftest imagpart.error.2
(signals-error (imagpart #c(1.0 2.0) nil) program-error)
t)
(deftest imagpart.e... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/imagpart.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Sun Sep 7 07:47:43 2003
Contains : Tests of IMAGPART
(in-package :cl-test)
(deftest imagpart.error.1
(signals-error (imagpart) program-error)
t)
(deftest imagpart.error.2
(signals-error (imagpart #c(1.0 2.0) nil) program-error)
t)
(deftest imagpart.error.3
(check-type-err... |
6e413a67537e160b57e5afd191fe6f2a64b57f3d72f4c7e1ae152b8a7be8761e | mirage/wodan | test_wodan.ml |
* Copyright ( c ) 2013 - 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/wodan/fd70abdb45fa176557178435217e0ab114e4e4d0/tests/wodan-irmin/test_wodan.ml | ocaml |
* Copyright ( c ) 2013 - 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | |
4a5707948c11b01acbe6ea3f8e3bce46dc1291f2d4772958bdf3189d43402fe0 | Opetushallitus/ataru | question_util.clj | (ns ataru.applications.question-util
(:require [ataru.translations.texts :refer [base-education-2nd-module-texts]]
[clojure.walk :refer [keywordize-keys]]
[ataru.component-data.base-education-module-2nd :refer [base-education-choice-key base-education-wrapper-key base-education-2nd-language-va... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/d92d3fcd097d3a4f535c28be17e7e189d7449451/src/clj/ataru/applications/question_util.clj | clojure | This should at some point be replaced by hardcoded id's for the fields. | (ns ataru.applications.question-util
(:require [ataru.translations.texts :refer [base-education-2nd-module-texts]]
[clojure.walk :refer [keywordize-keys]]
[ataru.component-data.base-education-module-2nd :refer [base-education-choice-key base-education-wrapper-key base-education-2nd-language-va... |
77015f705af55a2852a08732df5d25a64981c6674f9c8229ec6547ce347d8c49 | GNOME/gimp-tiny-fu | palette-export.scm | ; -----------------------------------------------------------------------------
; GIMP palette export toolkit -
Written by < >
;
This script includes various exporters for GIMP palettes , and other
; utility function to help in exporting to other (text-based) formats.
; See instruction on adding new exporters at... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/palette-export.scm | scheme | -----------------------------------------------------------------------------
GIMP palette export toolkit -
utility function to help in exporting to other (text-based) formats.
See instruction on adding new exporters at the end
-----------------------------------------------------------------------------
Number... | Written by < >
This script includes various exporters for GIMP palettes , and other
(define conversion-digits (list "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
"a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k"
"l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v"
"w" "x" "y" "z"))
(define (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.