_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 |
|---|---|---|---|---|---|---|---|---|
01883032e1f1475ccc5da263e30024c28c70c87c7d85d16e36bbdd02e1be2050 | matterhorn-chat/mattermost-api | TH.hs | module Network.Mattermost.TH where
import qualified Language.Haskell.TH.Syntax as TH
import qualified Language.Haskell.TH.Lib as TH
import Lens.Micro ((&), (.~))
import Lens.Micro.TH (DefName(..), makeLensesWith, lensRules, lensField)
suffixLenses :: TH.Name -> TH.DecsQ
suffixLenses = makeLensesWith $
lensRules & ... | null | https://raw.githubusercontent.com/matterhorn-chat/mattermost-api/cd337d5129930e82401e4eaed1c7fa03eb2bc62c/src/Network/Mattermost/TH.hs | haskell | module Network.Mattermost.TH where
import qualified Language.Haskell.TH.Syntax as TH
import qualified Language.Haskell.TH.Lib as TH
import Lens.Micro ((&), (.~))
import Lens.Micro.TH (DefName(..), makeLensesWith, lensRules, lensField)
suffixLenses :: TH.Name -> TH.DecsQ
suffixLenses = makeLensesWith $
lensRules & ... | |
7816258906bcb1c3b4f6fe97525db6eb77efdc0a00a696af662d471baadde578 | immutant/boot-immutant | in_pod.clj | (ns boot.immutant.in-pod
(:require boot.aether
[boot.util :as util]
[cemerick.pomegranate.aether :as aether]
[clojure.java.io :as io]
[clojure.string :as str]
[fntest.core :as fntest]
[immutant.deploy-tools.war :as war])
(:import java.io.ByteAr... | null | https://raw.githubusercontent.com/immutant/boot-immutant/ea9cb87b48d5a611e0f5ba0fca5d41edfe15b32f/src/boot/immutant/in_pod.clj | clojure | (ns boot.immutant.in-pod
(:require boot.aether
[boot.util :as util]
[cemerick.pomegranate.aether :as aether]
[clojure.java.io :as io]
[clojure.string :as str]
[fntest.core :as fntest]
[immutant.deploy-tools.war :as war])
(:import java.io.ByteAr... | |
33226bf9aab34f3b400b8cd32ca99c3a6c9125ec1160cd1e2cf4fae4dbaf4f2f | 40ants/reblocks | widgets.lisp | (defpackage #:reblocks/doc/widgets
(:use #:cl)
(:import-from #:40ants-doc
#:defsection)
(:import-from #:reblocks/widget)
(:import-from #:reblocks/dependencies)
(:import-from #:reblocks/doc/example
#:defexample))
(in-package #:reblocks/doc/widgets)
(defsection @widgets (:title... | null | https://raw.githubusercontent.com/40ants/reblocks/2283d23a44252a59b5d7bef066869d9f1e950460/src/doc/widgets.lisp | lisp | But I was unable to run cl-selenium (-selenium-webdriver) headless yet. | (defpackage #:reblocks/doc/widgets
(:use #:cl)
(:import-from #:40ants-doc
#:defsection)
(:import-from #:reblocks/widget)
(:import-from #:reblocks/dependencies)
(:import-from #:reblocks/doc/example
#:defexample))
(in-package #:reblocks/doc/widgets)
(defsection @widgets (:title... |
4489c022130b80aa4c8756297d9cf46da6a10e8d9c7ddfd5078e80675ad82672 | tonyg/kali-scheme | buffer.scm |
; (port->stream port type) -> stream or error value
; (
;
;
;
(define-record-type stream
make-stream
(port port)
(type int8u)
(buffer int32) ; pointer the start of the buffer
(size int32)
(loc int32) ; pointer to the next char to be read or the next slot to
; be written
... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/test/buffer.scm | scheme | (port->stream port type) -> stream or error value
(
pointer the start of the buffer
pointer to the next char to be read or the next slot to
be written
end of the available characters |
(define-record-type stream
make-stream
(port port)
(type int8u)
(size int32)
(define buffer-size 1024)
(define (port->stream port type)
(let ((buffer (allocate-memory buffer-size))
(stream (make-stream)))
(if (or (null-memory? buffer)
(null-pointer? stream))
(error "out of memory"))
... |
bde8b0dd9d256d43f2ddf8149140d19dea05c270b7c3b9b3a739bee3aa8677b3 | helium/router | router_channel_aws_SUITE.erl | -module(router_channel_aws_SUITE).
-export([
all/0,
init_per_testcase/2,
end_per_testcase/2
]).
-export([aws_test/1]).
-include_lib("helium_proto/include/blockchain_state_channel_v1_pb.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("router_device_wor... | null | https://raw.githubusercontent.com/helium/router/84710b35c9a9b814151fe02d7d2d9bb853e709d9/test/router_channel_aws_SUITE.erl | erlang | --------------------------------------------------------------------
COMMON TEST CALLBACK FUNCTIONS
--------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Running tests for this suite
@end
-------------------------------------... | -module(router_channel_aws_SUITE).
-export([
all/0,
init_per_testcase/2,
end_per_testcase/2
]).
-export([aws_test/1]).
-include_lib("helium_proto/include/blockchain_state_channel_v1_pb.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("router_device_wor... |
78f534180f4693f1b4f9c0bb6d6383b3d4f56a39cfb49b2f710925b52d55551a | fumieval/free-game | Wave.hs | module FreeGame.Data.Wave (
Wave(..)
, _WaveData
, _WaveHash
, toWave
, makeWave
, loadWaveFromFile
, Voice(..)
) where
import Data.Hashable
import System.Random
import Data.WAVE
import Linear
import Control.Monad.IO.Class
instance Hashable a => Hashable (V2 a) where
h... | null | https://raw.githubusercontent.com/fumieval/free-game/bc31bb5baa6de75669eb581684dfe2d9a9684d70/FreeGame/Data/Wave.hs | haskell | | @'_WaveData' :: Lens' 'Wave' [V2 Float]@
| module FreeGame.Data.Wave (
Wave(..)
, _WaveData
, _WaveHash
, toWave
, makeWave
, loadWaveFromFile
, Voice(..)
) where
import Data.Hashable
import System.Random
import Data.WAVE
import Linear
import Control.Monad.IO.Class
instance Hashable a => Hashable (V2 a) where
h... |
b15fae537a1517c028d7beb5f73270ac65b5797197ce7e42a1574ef8cf75d9e3 | paf31/dovetail | Union.hs | # LANGUAGE BlockArguments #
# LANGUAGE ImportQualifiedPost #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Dovetail.Core.Record.Unsafe.Union where
import Data.HashMap.Strict (HashMap)
import Data.HashMap.Strict qu... | null | https://raw.githubusercontent.com/paf31/dovetail/60e00e247b643ad9c05e4137396ffddedcd8bcb6/dovetail-core/src/Dovetail/Core/Record/Unsafe/Union.hs | haskell | # LANGUAGE OverloadedStrings #
unsafeUnionFn :: forall r1 r2 r3. Fn2 (Record r1) (Record r2) (Record r3) | # LANGUAGE BlockArguments #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Dovetail.Core.Record.Unsafe.Union where
import Data.HashMap.Strict (HashMap)
import Data.HashMap.Strict qualified as HashMap
import Data.Text (... |
f6e856973964530bc9ba7853a53578580b953b356efc96ac03e7afcc2d2f2204 | xclerc/ocamljava | wrap_module_type.mli |
* This file is part of wrapper .
* Copyright ( C ) 2007 - 2015 .
*
* wrapper is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/wrapper/src/wrap_module_type.mli | ocaml | * Returns the abstract and final classes (with type parameters) wrapping the module whose name and type are passed. |
* This file is part of wrapper .
* Copyright ( C ) 2007 - 2015 .
*
* wrapper is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... |
8f605f98a7df4b7a1f8f69af741c36ef331ea6ec51165b6191f390a4217fc70d | DavidAlphaFox/RabbitMQ | rabbit_policy_validator.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_policy_validator.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
| The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
1f696f26eae287ba9374593638f216fa87c58ce7f9c61f66cd5590a18f92d074 | instedd/planwise | users_test.clj | (ns planwise.component.users-test
(:require [clojure.test :refer :all]
[planwise.boundary.users :as users]
[planwise.test-system :as test-system]
[integrant.core :as ig]
[clj-time.core :as time]
[clojure.java.jdbc :as jdbc]))
(def test-user-id 1)
(def tes... | null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/test/planwise/component/users_test.clj | clojure | depends on clock-synchronization between host and database
change it so now is read from the database, or to update the database with a
given timestamp | (ns planwise.component.users-test
(:require [clojure.test :refer :all]
[planwise.boundary.users :as users]
[planwise.test-system :as test-system]
[integrant.core :as ig]
[clj-time.core :as time]
[clojure.java.jdbc :as jdbc]))
(def test-user-id 1)
(def tes... |
7a084bbb509edc6b3b858bf75ade6eb8ff4ba98af5b3aebab13ec3dc815e215d | Bogdanp/koyo | job.rkt | #lang racket/base
(require (for-syntax racket/base
racket/stxparam
syntax/parse)
gregor
racket/contract
racket/stxparam
"broker.rkt"
"registry.rkt")
;; retries ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provid... | null | https://raw.githubusercontent.com/Bogdanp/koyo/93f3fd06ee596a62bb0b286cb6290a800e911154/koyo-lib/koyo/job/job.rkt | racket | retries ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
jobs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
scheduling ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | #lang racket/base
(require (for-syntax racket/base
racket/stxparam
syntax/parse)
gregor
racket/contract
racket/stxparam
"broker.rkt"
"registry.rkt")
(provide
exn:job:retry?
exn:job:retry-delay-ms
retry!)
(struct exn:job exn (... |
5fb0eb7e4737d05d23330df91cad184e3c21cc196fb63a6a0e6898cfb4e8dbd4 | snowleopard/alga | AdjacencyMap.hs | # LANGUAGE OverloadedLists , ViewPatterns #
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Bipartite.AdjacencyMap
Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
Tes... | null | https://raw.githubusercontent.com/snowleopard/alga/399b5dc538a2496b67f9322dc7247e06a4ec326b/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs | haskell | ---------------------------------------------------------------------------
|
Module : Algebra.Graph.Test.Bipartite.AdjacencyMap
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
* Testsuite
Help with type inference by shadowing overly polymor... | # LANGUAGE OverloadedLists , ViewPatterns #
Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
Testsuite for " Algebra . Graph . Bipartite . AdjacencyMap " .
module Algebra.Graph.Test.Bipartite.AdjacencyMap (
testBipartiteAdjacencyMap,
testBipartiteAdjacencyMapAlgorithm
) whe... |
893ad2693a9db1ffb0b7ff9f534590a307b38f413dade702ddb4055e0fa28161 | LexiFi/lrt | variant.ml | (******************************************************************************)
Copyright ( C ) 2020 by LexiFi .
(* *)
This source file is released under the terms of the MIT license as part ... | null | https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/lib/variant.ml | ocaml | ****************************************************************************
of the lrt package. Details can be found in the attached LICENSE file.
****************************************************************************
check accum... | Copyright ( C ) 2020 by LexiFi .
This source file is released under the terms of the MIT license as part
open Xtype
open Std
exception Variant_parser = Variant_lexer.Error
type t = Variant_lexer.t =
| Unit
| Bool of bool
| Int of int
| Float of float
| ... |
837102523fff8be2103d75cfa4a8d5fac7103c2f6571395a564e203beae2f333 | mirage/cowabloga | bootstrap.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/cowabloga/2c256a92258f012c095bb72edcb639ad2fe164b3/lib/bootstrap.ml | ocaml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
aaa773e22176822d89c74c482223f8ac37395ec4e632d0da737b617bb0333386 | SimulaVR/godot-haskell | VisualShaderNodeVectorCompose.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeVectorCompose () where
import Data.Coerce
i... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeVectorCompose.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeVectorCompose () where
import Data.Coerce
i... | |
b00870de6771925e8978b355cb5abe0c9ed8457c01bb3e8f304ea0fbb61e0314 | mlemerre/l-lang | cpsconvertclosures.ml | Copyright 2012
This module performs \emph{closure conversion } , i.e. removes the
\emph{free variables } from [ Lambda ] constructs . For a general
introduction to closure conversion in CPS form , see the book
" Compiling with continuations " , by .
\paragraph{Closure conversion : removing... | null | https://raw.githubusercontent.com/mlemerre/l-lang/88201e861c6cc30bb3b9510d7f55c681eded4085/src/cps/cpsconvertclosures.ml | ocaml | s Start of the algorithm.
s The main conversion function. The [f] argument tells which
variables are to be used in place of the free variables; [t] is
the expression to convert.
Note: the order of the variables in the environment is the
one in [nonrec_free_vars], and is not important; what is
... | Copyright 2012
This module performs \emph{closure conversion } , i.e. removes the
\emph{free variables } from [ Lambda ] constructs . For a general
introduction to closure conversion in CPS form , see the book
" Compiling with continuations " , by .
\paragraph{Closure conversion : removing... |
6c2165aabb4c7dfa2e11476cf1861adcb3c81669d6f01ffaf524e0b7bf6a420b | michaelpotter0207/gifcurry_gstreamer | Gifcurry.hs |
( C ) 2016
lettier.com
Gifcurry
(C) 2016 David Lettier
lettier.com
-}
{-# LANGUAGE
OverloadedStrings
, NamedFieldPuns
#-}
| Produces GIFs using FFmpeg and ImageMagick .
-- The main function is 'gif'.
module Gifcurry
( GifParams(..)
, PlayableMetadata(..)
, TextOverlay(..)
, TextOve... | null | https://raw.githubusercontent.com/michaelpotter0207/gifcurry_gstreamer/fda94bc73c201bb828ed82b9cb56cdd0f536d591/src/lib/Gifcurry.hs | haskell | # LANGUAGE
OverloadedStrings
, NamedFieldPuns
#
The main function is 'gif'.
| The data type record required by 'gif'.
| The data type that holds the probed results of a playable media file.
| The starting point for a text overlay.
| The version number.
| Convenience function that attempts to turn a string i... |
( C ) 2016
lettier.com
Gifcurry
(C) 2016 David Lettier
lettier.com
-}
| Produces GIFs using FFmpeg and ImageMagick .
module Gifcurry
( GifParams(..)
, PlayableMetadata(..)
, TextOverlay(..)
, TextOverlayOrigin(..)
, versionNumber
, findOrCreateTemporaryDirectory
, defaultTextOverla... |
618e8154698ef3a477fb07fc60c6f8de7fea652a74c7422edc57fd9c5726fe5d | simonmichael/hledger | RawOptions.hs | |
hledger 's modes parse command - line arguments to an
intermediate format , RawOpts ( an association list ) , rather than a
fixed ADT like CliOpts . This allows the modes and flags to be reused
more easily by hledger commands / scripts in this and other packages .
hledger's cmdargs modes parse command-l... | null | https://raw.githubusercontent.com/simonmichael/hledger/02b673e516f87a981aa500997592f4a33cf83b4d/hledger-lib/Hledger/Data/RawOptions.hs | haskell | | Is the named option present ?
for which the given predicate returns a Just value.
Useful for exclusive choice flags like --daily|--weekly|--quarterly...
>>> import Safe (readMay)
>>> choiceopt Just (RawOpts [("a",""), ("b",""), ("c","")])
Just "c"
Nothing
Just EQ
^ "parser" that returns 'Just' value for val... | |
hledger 's modes parse command - line arguments to an
intermediate format , RawOpts ( an association list ) , rather than a
fixed ADT like CliOpts . This allows the modes and flags to be reused
more easily by hledger commands / scripts in this and other packages .
hledger's cmdargs modes parse command-l... |
b26068e336ca6dc563249dbe98cd47d070291a93ba6a1da702d5b6cf18a257b9 | onaio/hatti | post_process.cljs | (ns hatti.ona.post-process
(:require [chimera.js-interop :refer [format]]
[chimera.om.state :refer [transact!]]
[chimera.seq :refer [filter-first]]
[chimera.urls :refer [url last-url-param]]
[clojure.string :refer [join split]]
[hatti.constants :refer [_atta... | null | https://raw.githubusercontent.com/onaio/hatti/7dc23c1c60b9fc46e1ff5b023eb6c794ebd04773/src/hatti/ona/post_process.cljs | clojure | IMAGE AND VIDEO POST-PROCESSING
returns a function from
If urlobj isn't found, we'll just return filename | (ns hatti.ona.post-process
(:require [chimera.js-interop :refer [format]]
[chimera.om.state :refer [transact!]]
[chimera.seq :refer [filter-first]]
[chimera.urls :refer [url last-url-param]]
[clojure.string :refer [join split]]
[hatti.constants :refer [_atta... |
437072e8108d57d5e9157aa8193f2b0018a92d7d5c16fe5dd6853e49cf3321c9 | BranchTaken/Hemlock | test_min_max.ml | open! Basis.Rudiments
open! Basis
open I256
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
File.Fmt.stdout
|> Fmt.fmt "min,max "
|> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " "
|> fmt ~alt:true ~... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/i256/test_min_max.ml | ocaml | open! Basis.Rudiments
open! Basis
open I256
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
File.Fmt.stdout
|> Fmt.fmt "min,max "
|> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " "
|> fmt ~alt:true ~... | |
e30af1f609f2617585123a7ef0db81ca5fe49284d70f60713707283d7defe469 | xh4/web-toolkit | asdf.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
asdf.lisp --- ASDF components for cffi / c2ffi .
;;;
Copyright ( C ) 2015 , < >
;;;
;;; 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 S... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cffi_0.20.1/src/c2ffi/asdf.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to... | asdf.lisp --- ASDF components for cffi / c2ffi .
Copyright ( C ) 2015 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WI... |
ab6c34b506be957efafeef03abe24ab7630e07147aa6cc7149d3ebbf92053cc0 | ocsigen/ojwidgets | ojw_popup.mli | (** Popups are a special kind of [alerts] that are automatically showed in
the middle of the screen. *)
include Ojw_popup_sigs.T
with module D = Ojw_dom.T
with module Alert = Ojw_alert
| null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/experimental/ojw_popup.mli | ocaml | * Popups are a special kind of [alerts] that are automatically showed in
the middle of the screen. |
include Ojw_popup_sigs.T
with module D = Ojw_dom.T
with module Alert = Ojw_alert
|
8e18c1d0ad08370f95dd4e595d3d9b719c8522a842dbf9465e25b5ab8e57ad2c | OCADml/OCADml | plotFunction.ml | open V
open Mesh0
let cartesian_plot ~min_x ~x_steps ~max_x ~min_y ~y_steps ~max_y plot =
let x_step = (max_x -. min_x) /. Float.of_int x_steps
and y_step = (max_y -. min_y) /. Float.of_int y_steps in
let max_x = max_x +. (0.001 *. x_step)
and max_y = max_y +. (0.001 *. y_step)
(* Stay above plane to guarant... | null | https://raw.githubusercontent.com/OCADml/OCADml/ceed2bfce640667580f7286b46864a69cdc1d4d7/lib/plotFunction.ml | ocaml | Stay above plane to guarantee manifold. Bottom always at 0. | open V
open Mesh0
let cartesian_plot ~min_x ~x_steps ~max_x ~min_y ~y_steps ~max_y plot =
let x_step = (max_x -. min_x) /. Float.of_int x_steps
and y_step = (max_y -. min_y) /. Float.of_int y_steps in
let max_x = max_x +. (0.001 *. x_step)
and max_y = max_y +. (0.001 *. y_step)
and min_plot = 0.0005 *. (x_st... |
885ed7a819cdba135396a20aebb69b21dfcd70f77611568974fc72951f52c811 | binsec/haunted | bigint.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/base/bigint.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
79e7b5007fb8f1c5d8bb5edda09cbd87f8b63c064f6c8c0eaad872880d515ca9 | squirrel-prover/squirrel-prover | tacticsArgs.mli | (** Arguments types for tactics, used to unify the declaration of tactics
requiring type conversions. *)
module L = Location
type lsymb = Theory.lsymb
(*------------------------------------------------------------------*)
(** Tactic target. *)
type in_target = [`Goal | `All | `Hyps of lsymb list]
(*------------... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/12424c7a975a54953428866908071bdf9765f398/src/tacticsArgs.mli | ocaml | * Arguments types for tactics, used to unify the declaration of tactics
requiring type conversions.
------------------------------------------------------------------
* Tactic target.
------------------------------------------------------------------
* '~id'
-------------------------------------------------------... |
module L = Location
type lsymb = Theory.lsymb
type in_target = [`Goal | `All | `Hyps of lsymb list]
* { 2 Tactics named arguments }
type named_arg =
type named_args = named_arg list
* { 2 Simplification item }
type s_item_body =
type s_item = s_item_body * named_args
* { 2 arguments for rewrite }
type rw_... |
ed8b54d5b0ed6849842bc16ff1ec24679f6fc6098dc3f0ae81bbdf8330151e23 | vulcanize/purplechain | Query.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Purplechain.Module.Query where
import Maker
import Polysemy (Members)
import Tendermint.SDK.BaseApp (QueryEffs, StoreLeaf, RouteQ, storeQueryHandler)
import qualified Tendermint.SDK.BaseApp.Store.Var as V
import Servant.API ((:>))
import Purplechain.Module.Type... | null | https://raw.githubusercontent.com/vulcanize/purplechain/a5921e6337c8e595cc869224c6051bc70f94799a/purplechain/src/Purplechain/Module/Query.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Purplechain.Module.Query where
import Maker
import Polysemy (Members)
import Tendermint.SDK.BaseApp (QueryEffs, StoreLeaf, RouteQ, storeQueryHandler)
import qualified Tendermint.SDK.BaseApp.Store.Var as V
import Servant.API ((:>))
import Purplechain.Module.Type... | |
0bf0b70acad5702f6ae2e181ae3d2a603f1fa894e8d40a6e7ed1d405139fc24b | fmw/alida | scrape.clj | src / / scrape.clj : scraping utility functions .
;;
Copyright 2012 , F.M. de Waard & Vixu.com < > .
;;
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 r... | null | https://raw.githubusercontent.com/fmw/alida/32be687a563e31a8ebad718de8f4c4aa36faf95d/src/alida/scrape.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | src / / scrape.clj : scraping utility functions .
Copyright 2012 , F.M. de Waard & Vixu.com < > .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns alida.scrape
(:require [clojure.string :as string]
[net.cgrand.enlive-html :as enlive]
[alida.util :as util]
... |
960c4b18c50e9607c2cd363e54dd00b035ceffabffbc060eef6089edcffd7428 | bolducp/SICP | 01.20.scm | ;The process that a procedure generates is of course dependent on the
;rules used by the interpreter. As an example, consider the iterative
;gcd procedure given above. Suppose we were to interpret this procedure
;using normal-order evaluation, as discussed in section 1.1.5.
( The normal - order - evaluation rule for if... | null | https://raw.githubusercontent.com/bolducp/SICP/871babe9296b84b2b9648a02f9202752d21ebf93/exercises/chapter_01/1.2_exercises/01.20.scm | scheme | The process that a procedure generates is of course dependent on the
rules used by the interpreter. As an example, consider the iterative
gcd procedure given above. Suppose we were to interpret this procedure
using normal-order evaluation, as discussed in section 1.1.5.
Using the substitution method (for normal order)... | ( The normal - order - evaluation rule for if is described in exercise 1.5 . )
generated in evaluating ( gcd 206 40 ) and indicate the remainder
(define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
(gcd 206 40)
= (if (= 40 0)
40
(gcd 40 (remainder 206 40)))
( if (= 6 0 ) ... ) 1 t... |
5b24710cf41dd96896d5cb53d2c2e886c2c35669af73ff8460457b2f2d8237fb | simoncourtenage/quanthas | ScheduleTest.hs | module Tests.ScheduleTest (scheduleTestGroup) where
import qualified QuantHas.Settings as Settings
import QuantHas.Time.Date
import QuantHas.Time.TimeUnit
import QuantHas.Time.BusinessDayConvention
import QuantHas.Time.DateGeneration
import QuantHas.Time.Period
import QuantHas.Time.Calendar.Calendar
import QuantHas.Ti... | null | https://raw.githubusercontent.com/simoncourtenage/quanthas/6e0b2cc9a60bb7d1709f98ed10d09aa6c071c8dd/testsuite/Tests/ScheduleTest.hs | haskell | }
utils | module Tests.ScheduleTest (scheduleTestGroup) where
import qualified QuantHas.Settings as Settings
import QuantHas.Time.Date
import QuantHas.Time.TimeUnit
import QuantHas.Time.BusinessDayConvention
import QuantHas.Time.DateGeneration
import QuantHas.Time.Period
import QuantHas.Time.Calendar.Calendar
import QuantHas.Ti... |
34244688cd56d4753af4e710f697892417095d8aa4cc92358c129dbc3c701f8d | exoscale/clojure-kubernetes-client | v1alpha1_role.clj | (ns clojure-kubernetes-client.specs.v1alpha1-role
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1alpha1-policy-rule :refer :all]
)
(:import (java.io Fil... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1alpha1_role.clj | clojure | (ns clojure-kubernetes-client.specs.v1alpha1-role
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1alpha1-policy-rule :refer :all]
)
(:import (java.io Fil... | |
b3640df31ba7c12dd2baac800d49910c85422302ebe704194093104e8fd562e1 | haskell-tools/haskell-tools | Definitions.hs | module Definitions where
data Rec = Rec { tup :: (Int, Int) }
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/TupleSectionsTest/Definitions.hs | haskell | module Definitions where
data Rec = Rec { tup :: (Int, Int) }
| |
8abe3a07ba4471efde1c7de16faecaacbdff83d249e5cf4f1aa7f88bf4eee2b5 | Chris00/mesh | level_display.ml | open Printf
open Bigarray
module M = Mesh_triangle
open Graphics
(* Rectangle *)
let pslg = object
inherit [_] M.pslg fortran_layout
method point = Array2.of_array float64 fortran_layout
[| [| -1.; 2.; 2.; -1. |];
[| -1.; -1.; 1.; 1. |]|]
method segment = Array2.of_array int fortran_layout
[| [... | null | https://raw.githubusercontent.com/Chris00/mesh/a998a3d898b0013517a5f7f6078791b61e6a0fe2/tests/level_display.ml | ocaml | Rectangle | open Printf
open Bigarray
module M = Mesh_triangle
open Graphics
let pslg = object
inherit [_] M.pslg fortran_layout
method point = Array2.of_array float64 fortran_layout
[| [| -1.; 2.; 2.; -1. |];
[| -1.; -1.; 1.; 1. |]|]
method segment = Array2.of_array int fortran_layout
[| [| 1; 2; 3; 4 |];... |
06f26cf6d1b687d2c7f6ed650320917bddd843b8deff735d015ef7331a927363 | Ramarren/cffi-clutter | tutorial.lisp | (in-package :clutter-examples)
;;; Implement tutorial from
;;;
(defun chapter-4-on-stage-button-press (stage event)
(declare (ignore stage))
(destructuring-bind (x y) (event-get-coords event)
(format t "Stage clicked at ~a ~a~&" x y))
(values t))
(defun chapter-4 ()
(with-color (stage-color 0 0 0 255)... | null | https://raw.githubusercontent.com/Ramarren/cffi-clutter/498314cf5aa593e57a724252ae65dcf4ac9a835d/examples/tutorial.lisp | lisp | Implement tutorial from
in case other examples were run before | (in-package :clutter-examples)
(defun chapter-4-on-stage-button-press (stage event)
(declare (ignore stage))
(destructuring-bind (x y) (event-get-coords event)
(format t "Stage clicked at ~a ~a~&" x y))
(values t))
(defun chapter-4 ()
(with-color (stage-color 0 0 0 255)
(init-clutter)
(let ((st... |
52e63413c99b4363b5570e3ac90068335d2cc7c1319513a5aa491dd77e210d8c | nikodemus/SBCL | target-main.lisp | functions from classic CMU CL src / compiler / main.lisp which are
;;;; needed only (and which may make sense only) on the
;;;; cross-compilation target, not the cross-compilation host
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/target-main.lisp | lisp | needed only (and which may make sense only) on the
cross-compilation target, not the cross-compilation host
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
a function that will signal the ... | functions from classic CMU CL src / compiler / main.lisp which are
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
CL :
(defun get-lambda-to-comp... |
06a2eea3de2fdb20b1d4ba3eda3c5165a6e20c59db7625ce5152901ef1e74492 | cobbpg/elerea-examples | Event.hs | # LANGUAGE DoRec #
module Event where
import Control.Applicative
import Control.Monad
import Control.Monad.Fix
import Data.Maybe
import FRP.Elerea.Param
import Util
-- | Events are signals with an option type.
type Event a = Signal (Maybe a)
-- | Sample a signal whenever a changing condition is true.
ifE :: Signal... | null | https://raw.githubusercontent.com/cobbpg/elerea-examples/2e0b40711a0594446e798c9c8fd73382e0385921/src/Bounce/Event.hs | haskell | | Events are signals with an option type.
| Sample a signal whenever a changing condition is true.
| Left-biased merge.
| Right-biased merge.
| Left-biased merge of several events.
a function to derive the corresponding signal of the removal
condition (the signal is removed when the associated removal signal | # LANGUAGE DoRec #
module Event where
import Control.Applicative
import Control.Monad
import Control.Monad.Fix
import Data.Maybe
import FRP.Elerea.Param
import Util
type Event a = Signal (Maybe a)
ifE :: Signal Bool -> Signal a -> Event a
ifE c s = c >>= \b -> if b then Just <$> s else return Nothing
leftE :: Eve... |
53cba1334e61bd467aadd856b6e7bf0e2d00729d900973cc564d9b1f9df63fb2 | christian-marie/git-vogue | git-vogue-stylish.hs | --
Copyright © 2013 - 2015 Anchor Systems , Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
the 3 - clause BSD licence .
--
-- | Description: Check and... | null | https://raw.githubusercontent.com/christian-marie/git-vogue/b9e9c5f0e0dc8d47bd0f397dea6fc64f41e04a8c/src/git-vogue-stylish.hs | haskell |
The code in this file, and the program it is a part of, is
made available to you by its authors as open source software:
you can redistribute it and/or modify it under the terms of
| Description: Check and fix style differences with stylish-haskell
Now double check they are fixed
| Try various configuration lo... | Copyright © 2013 - 2015 Anchor Systems , Pty Ltd and Others
the 3 - clause BSD licence .
module Main where
import Control.Monad
import Data.Algorithm.Diff
import Data.Algorithm.DiffOutput
import Data.Foldable
import Data.List hiding (and)
import ... |
bf3c1d3ee57ff54d23963d19b345f266bb90d2bb7f9fedfe3077536868079873 | tisnik/clojure-examples | 7_functions.clj | Examples for : Homoiconic JS with clojure syntax , s - expressions & macros
;
( C ) Copyright 2015
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/wisp/7_functions.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
anonymní funkce
dokumentační řetězec a metadata
přetěžování funkcí | Examples for : Homoiconic JS with clojure syntax , s - expressions & macros
( C ) Copyright 2015
-v10.html
Test překladu deklarace funkcí do JavaScriptu
(fn [x y] (+ x y))
funkce navázaná na symbol = = pojmenovaná funkce
(defn add
[x y]
(+ x y))
( proměnné )
(defn add-abs
[... |
fed1402aab61f40ae73c039467d268ab60c06b543ffb4829a6cc38930e74a522 | bishboria/learnyouahaskell | 15_maybe_tree.hs | data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show)
data Crumb a = LeftCrumb a (Tree a) | RightCrumb a (Tree a) deriving (Show)
type Breadcrumbs a = [Crumb a]
type Zipper a = (Tree a, Breadcrumbs a)
goLeft :: Zipper a -> Maybe (Zipper a)
goLeft (Node x l r, bs) = Just (l, LeftCrumb x r:bs)
goLeft (Empty, _)... | null | https://raw.githubusercontent.com/bishboria/learnyouahaskell/d8c7b41398e9672db18c1b1360372fc4a4adefa8/15/15_maybe_tree.hs | haskell | data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show)
data Crumb a = LeftCrumb a (Tree a) | RightCrumb a (Tree a) deriving (Show)
type Breadcrumbs a = [Crumb a]
type Zipper a = (Tree a, Breadcrumbs a)
goLeft :: Zipper a -> Maybe (Zipper a)
goLeft (Node x l r, bs) = Just (l, LeftCrumb x r:bs)
goLeft (Empty, _)... | |
ddb53b23c8a38dac49c8645ea6e9be6564e31e6540c330b6be2bab71caea208f | atlas-engineer/closure | dep-gcl.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CL-USER; -*-
;;; ---------------------------------------------------------------------------
Title : GCL dependent stuff + fixups
Created : 1999 - 05 - 25 22:31
Author : < >
License : MIT style ( see below )
;;; ------------------------------------... | null | https://raw.githubusercontent.com/atlas-engineer/closure/539ce81dbcb5fb46e19818a9bb35eeaf86042219/src/glisp/dep-gcl.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: CL-USER; -*-
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and asso... | Title : GCL dependent stuff + fixups
Created : 1999 - 05 - 25 22:31
Author : < >
License : MIT style ( see below )
( c ) copyright 1999 by
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
p... |
16ff66e8e1681002ef4818feb7b57f7f79072992973b3808279c5bba934837f9 | darkleaf/publicator | update_test.clj | (ns publicator.web.controllers.post.update-test
(:require
[publicator.utils.test.instrument :as instrument]
[publicator.web.routing :as routing]
[publicator.use-cases.interactors.post.update :as interactor]
[publicator.use-cases.test.factories :as factories]
[ring.mock.request :as mock.request]
[clo... | null | https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/web/test/publicator/web/controllers/post/update_test.clj | clojure | (ns publicator.web.controllers.post.update-test
(:require
[publicator.utils.test.instrument :as instrument]
[publicator.web.routing :as routing]
[publicator.use-cases.interactors.post.update :as interactor]
[publicator.use-cases.test.factories :as factories]
[ring.mock.request :as mock.request]
[clo... | |
a03ce1de83091998596ca840fbaedb7dd80c8ea1f755297459e4e624673cf115 | magthe/sandi | Base64UrlTest.hs | # LANGUAGE TemplateHaskell #
Copyright : ( c ) , 2013
License : BSD3 , found in the LICENSE file
module Codec.Binary.Base64UrlTest where
import Codec.TestUtils
import qualified Codec.Binary.Base64Url as B64U
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Data.Word (... | null | https://raw.githubusercontent.com/magthe/sandi/a8ef86ec3798a640d86342421a7fa7fa97bdedd4/sandi/test-src/Codec/Binary/Base64UrlTest.hs | haskell | _--_
_--_ | # LANGUAGE TemplateHaskell #
Copyright : ( c ) , 2013
License : BSD3 , found in the LICENSE file
module Codec.Binary.Base64UrlTest where
import Codec.TestUtils
import qualified Codec.Binary.Base64Url as B64U
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Data.Word (... |
023057e5ea2c1536e141a9831511a30c0403e52e71516e28a89009153f08ac87 | lspitzner/brittany | Test327.hs | a :: () ':- ()
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test327.hs | haskell | a :: () ':- ()
| |
3a604cec25c98bf6c39100b0d9a7be0c662aa6c0c76e446fd1a1b4219b946b0c | hatsugai/Guedra | test_checklistvs.ml | open Csp
open Guedra
let interval_map a b f =
let rec g rs k =
if k >= b then
List.rev rs
else
g ((f k)::rs) (k + 1)
in g [] a
let item_string _ _ = ""
let draw_item x y width height cs i sel ud dc act b_check =
(if i = sel then
(set_color o_o.color_fore;
fill_rect (flo x) (flo y... | null | https://raw.githubusercontent.com/hatsugai/Guedra/592e9b4cff151228735d2c61c337154cde8b5329/test/test_checklistvs.ml | ocaml | open Csp
open Guedra
let interval_map a b f =
let rec g rs k =
if k >= b then
List.rev rs
else
g ((f k)::rs) (k + 1)
in g [] a
let item_string _ _ = ""
let draw_item x y width height cs i sel ud dc act b_check =
(if i = sel then
(set_color o_o.color_fore;
fill_rect (flo x) (flo y... | |
2e4fe79a3a7789f1fe1a22200034c6ac6bf926c5aba226264943fea78e616167 | haskell-effectful/effectful | FileSizes.hs | # LANGUAGE BlockArguments #
# LANGUAGE CPP #
# LANGUAGE UndecidableInstances #
module FileSizes where
import Control.Exception
import Control.Monad.IO.Class
import Data.IORef
import Data.Text (Text)
import System.Posix
import qualified Data.Text as T
-- effectful
import qualified Effectful as E
import qualified Effec... | null | https://raw.githubusercontent.com/haskell-effectful/effectful/7becb972ea2e654030d5ce64d4142ff4b6c53e84/effectful/bench/FileSizes.hs | haskell | effectful
eff
freer-simple
fused-effects
polysemy
--------------------------------------
reference
# NOINLINE ref_program #
--------------------------------------
effectful
--------
--------------------------------------
eff
--------
--------------------------------------
--------
------------------------------... | # LANGUAGE BlockArguments #
# LANGUAGE CPP #
# LANGUAGE UndecidableInstances #
module FileSizes where
import Control.Exception
import Control.Monad.IO.Class
import Data.IORef
import Data.Text (Text)
import System.Posix
import qualified Data.Text as T
import qualified Effectful as E
import qualified Effectful.Dispatch... |
47483ecc45fff7dea3bf7d8da666a76aee5d9ac7746ef9b74898b07483972bd8 | heyoka/faxe | esp_jsonsize.erl | Date : 30.12.16 - 23:01
Ⓒ 2019 heyoka
%%
%% the jsonsize node converts incoming values to json and logs the resulting byte-size
%% emits data without touching it in any way
%%
-module(esp_jsonsize).
-author("Alexander Minichmair").
-include("faxe.hrl").
-behavior(df_component).
%% API
-export([init/3, process/3, ... | null | https://raw.githubusercontent.com/heyoka/faxe/ea4be3f1ec36e21be8473783776377ca1747dacd/apps/faxe/src/components/esp_jsonsize.erl | erlang |
the jsonsize node converts incoming values to json and logs the resulting byte-size
emits data without touching it in any way
API | Date : 30.12.16 - 23:01
Ⓒ 2019 heyoka
-module(esp_jsonsize).
-author("Alexander Minichmair").
-include("faxe.hrl").
-behavior(df_component).
-export([init/3, process/3, shutdown/1, options/0]).
-record(state, {
inject,
fieldname
}).
options() ->
[{inject, is_set}, {field, string, <<"jsonsize">>}].
in... |
15302b8e5152eae91efb1df6c960a8fdc71b98e5d29b415c3b25feec46c477d8 | Frama-C/Frama-C-snapshot | adpcm.ml |
ledit bin / toplevel.top -no - annot -deps -slicing_level 2 tests / slicing / adpcm.c
# use " tests / slicing / select.ml " ; ;
ledit bin/toplevel.top -no-annot -deps -slicing_level 2 tests/slicing/adpcm.c
#use "tests/slicing/select.ml";;
*)
include LibSelect;;
Kernel.slicing_level : = 2 ; ; = MinimizeNb... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/slicing/adpcm.ml | ocaml |
ledit bin / toplevel.top -no - annot -deps -slicing_level 2 tests / slicing / adpcm.c
# use " tests / slicing / select.ml " ; ;
ledit bin/toplevel.top -no-annot -deps -slicing_level 2 tests/slicing/adpcm.c
#use "tests/slicing/select.ml";;
*)
include LibSelect;;
Kernel.slicing_level : = 2 ; ; = MinimizeNb... | |
d43751c4ba5dc9144375f95e02b28fb71d4ba25d75c579b8146464aace377297 | ml4tp/tcoq | cErrors.mli | (***********************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/cErrors.mli | ocaml | *********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
*********************************************************************
* Create an anomaly.
* Raise an anomaly... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
* This modules imp... |
f2312ea5793cc637188e4ce43cd42164aaf52d4db91cf80964d46b16cda6ddcf | charlieg/Sparser | bankruptcy.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(interface-testing LISP) -*-
copyright ( c ) 1990 Content Technologies Inc. -- all rights reserved
;;;
;;; File: "bankruptcy"
;;; Module: "interface;PRW:rules:"
Version : 1.0 August 1990
;;;
(in-package :interface-testing)
;;;--------------------... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/CL/cfr/bankruptcy.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(interface-testing LISP) -*-
File: "bankruptcy"
Module: "interface;PRW:rules:"
---------------------------------------------------
"federal bankruptcy-court protection" in (BCY1)
---------------------------------------------------
------------------------------... | copyright ( c ) 1990 Content Technologies Inc. -- all rights reserved
Version : 1.0 August 1990
(in-package :interface-testing)
(def-cfr bankruptcy-court ("bankruptcy-court"))
(def-cfr bankruptcy-court ("federal" bankruptcy-court))
(def-cfr bankruptcy-court-protection
(bankruptcy-court "pr... |
ab462125483f7d0592ceb2abb7977da9fc3e41c109b8efc6565165fbcd8380fd | oliyh/pedestal-api | routes.clj | (ns pedestal-api.routes
(:require [route-swagger.doc :as sw.doc]
[io.pedestal.http.route :as route]
[clojure.string :as string]))
(defn replace-splat-parameters [route-table]
(map (fn [route]
(update route :path #(string/replace % "*" ":")))
route-table))
(defn update-handl... | null | https://raw.githubusercontent.com/oliyh/pedestal-api/1a90c29e97c3cccfe59a1f9d114765c104f70c13/src/pedestal_api/routes.clj | clojure | (ns pedestal-api.routes
(:require [route-swagger.doc :as sw.doc]
[io.pedestal.http.route :as route]
[clojure.string :as string]))
(defn replace-splat-parameters [route-table]
(map (fn [route]
(update route :path #(string/replace % "*" ":")))
route-table))
(defn update-handl... | |
5c538ad64f1f4441a07e23040826afd8b780a27685cdad38634e0c0c15e8cb37 | tommaisey/aeon | pan2.help.scm | (hear
(let ((p (f-sin-osc kr 2 0)))
(pan2 (pink-noise ar) p 0.3)))
(hear
(let ((x (mouse-x kr -1 1 0 0.1))
(y (mouse-y kr 0 0.1 0 0.1)))
(pan2 (pink-noise ar) x y)))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/panners/pan2.help.scm | scheme | (hear
(let ((p (f-sin-osc kr 2 0)))
(pan2 (pink-noise ar) p 0.3)))
(hear
(let ((x (mouse-x kr -1 1 0 0.1))
(y (mouse-y kr 0 0.1 0 0.1)))
(pan2 (pink-noise ar) x y)))
| |
cbf1f6eff069e04472e324fc3d951376aef22acb48054fafb1e6275c31dda1ab | the-real-blackh/cassandra-cql | test-timestamp.hs | # LANGUAGE OverloadedStrings ,
import Database.Cassandra.CQL
import Control.Monad
import Control.Monad.CatchIO
import Control.Monad.Trans (liftIO)
import Data.Int
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock
import Data.UUID
import System.Random
dropLists :: Query Schema () ()
drop... | null | https://raw.githubusercontent.com/the-real-blackh/cassandra-cql/681d900fadcede786d1008eac2270166ca915e8b/tests/test-timestamp.hs | haskell | Ignore the error if the table doesn't exist | # LANGUAGE OverloadedStrings ,
import Database.Cassandra.CQL
import Control.Monad
import Control.Monad.CatchIO
import Control.Monad.Trans (liftIO)
import Data.Int
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock
import Data.UUID
import System.Random
dropLists :: Query Schema () ()
drop... |
eaaa0aa519c8200f0367c2b555c3ebdb307427258b3af0ce9f81809bed1ef758 | AmpersandTarski/Ampersand | GenerateUML.hs | module Ampersand.FSpec.GenerateUML (generateUML) where
import Ampersand.ADL1
import Ampersand.Basics
TODO : Replace by RIO state
import Ampersand.Basics.BuildInfo_Generated (cabalVersionStr)
import Ampersand.FSpec
import Ampersand.Graphic.ClassDiagram
import Ampersand.Graphic.Fspec2ClassDiagrams
import Ampersand.Misc.... | null | https://raw.githubusercontent.com/AmpersandTarski/Ampersand/6ad8eb9b9cb0aa5e1335cf592f795d0760c675d7/src/Ampersand/FSpec/GenerateUML.hs | haskell | TODO: escape
TODO: names of model, package, assoc (empty?), etc.
WHY is the exporter not something like `Ampersand` (in the string below)?
BECAUSE then for some reason the importer doesn't show the properties of the requirements.
Requirements
, reqRef :: Text
fmap name (reqOrig r)
the xmi-id | module Ampersand.FSpec.GenerateUML (generateUML) where
import Ampersand.ADL1
import Ampersand.Basics
TODO : Replace by RIO state
import Ampersand.Basics.BuildInfo_Generated (cabalVersionStr)
import Ampersand.FSpec
import Ampersand.Graphic.ClassDiagram
import Ampersand.Graphic.Fspec2ClassDiagrams
import Ampersand.Misc.... |
8a365bc372494dd52c7339316ab5ae89bc2d5926245b90a9bf806b303dac771b | gedge-platform/gedge-platform | ranch_protocol.erl | Copyright ( c ) 2012 - 2021 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ranch/src/ranch_protocol.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2012 - 2021 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch_protocol).
-callback start_link(
Ref... |
d300f26781b93c7a441260a215bbdc7c42e2bc683f8e4125c18f09c8413b4fdd | thobbs/genartlib | curves.clj | (ns genartlib.curves
(:require
[genartlib.algebra :refer [interpolate point-dist lines-intersection-point]]
[genartlib.util :refer [enumerate w h]]))
(defn ^:private single-chaikin-step
[points tightness]
(mapcat (fn [[[start-x start-y] [end-x end-y]]]
(let [q-x (interpolate start-x end-x (+ ... | null | https://raw.githubusercontent.com/thobbs/genartlib/e6092cf32e2402fc4e6a3651ce291de1bc765210/src/clj/genartlib/curves.clj | clojure | we need to split
probably shouldn't happen?
we need to split
still in bounds
still out of bounds
entering the bounds
leaving the bounds
we need to split | (ns genartlib.curves
(:require
[genartlib.algebra :refer [interpolate point-dist lines-intersection-point]]
[genartlib.util :refer [enumerate w h]]))
(defn ^:private single-chaikin-step
[points tightness]
(mapcat (fn [[[start-x start-y] [end-x end-y]]]
(let [q-x (interpolate start-x end-x (+ ... |
c678995218d0218041893d1db143e361a08f6a1ff07511d86072d24b579500a2 | Noeda/dfterm3 | Types.hs | -- | Internal module to `Dfterm3.GameSubscription`. Implements data types.
--
# LANGUAGE GeneralizedNewtypeDeriving , DeriveDataTypeable #
# LANGUAGE TemplateHaskell , ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE TypeFamilies #
module Dfterm3.GameSubscription.Inte... | null | https://raw.githubusercontent.com/Noeda/dfterm3/6b33c9b4712da486bb84356f6c9f48abb8074faf/src/Dfterm3/GameSubscription/Internal/Types.hs | haskell | | Internal module to `Dfterm3.GameSubscription`. Implements data types.
| Class of publishable games.
The type variable is:
because this is saved on the disk. It should contain information on how to
launch the game and possibly other game-specific information that should
be saved.
Subscribers should n... |
# LANGUAGE GeneralizedNewtypeDeriving , DeriveDataTypeable #
# LANGUAGE TemplateHaskell , ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
# LANGUAGE TypeFamilies #
module Dfterm3.GameSubscription.Internal.Types
(
SubscriptionStatePersistent(..)
, SubscriptionState... |
0bb191e7f6a19f33958314cb31d26091306b7c7faec369706a01bb6c7e956419 | pfdietz/ansi-test | array.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Jan 25 08:46:58 2003
;;;; Contains: Tests of the ARRAY type specifier
;;; Tests of array by itself
(deftest array.1.1
(notnot-mv (typep #() 'array))
t)
(deftest array.1.2
(notnot-mv (typep #0aX 'array))
t)
(deftest array.1.3
(notnot-mv (typep #2a... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/arrays/array.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the ARRAY type specifier
Tests of array by itself
Tests of (array *)
Tests of (array * ())
The '1' indicates rank, so this is equivalent to 'vector'
Tests of (array * 0)
Tests of (array * *)
Testing '(array * (--)) | Author :
Created : Sat Jan 25 08:46:58 2003
(deftest array.1.1
(notnot-mv (typep #() 'array))
t)
(deftest array.1.2
(notnot-mv (typep #0aX 'array))
t)
(deftest array.1.3
(notnot-mv (typep #2a(()) 'array))
t)
(deftest array.1.4
(notnot-mv (typep #(1 2 3) 'array))
t)
(deftest array.1.5
... |
f3f61fc88a2fba9e04ba155e674e34f9588025b22b2fc9d15c309e982f4db50e | returntocorp/semgrep | Hybrid_print.mli | Implements hybrid printing of the generic AST . Augments any
* Ugly_print_AST.printer_t class with the ability to first try a different
* printing function for any given node .
*
* Uses inheritance via a functor so that this is accomplished via dynamic
* dispatch , so that printer authors do not have t... | null | https://raw.githubusercontent.com/returntocorp/semgrep/660ad4af824f84fd2d11f89e831495642792c191/src/fixing/Hybrid_print.mli | ocaml | Implements hybrid printing of the generic AST . Augments any
* Ugly_print_AST.printer_t class with the ability to first try a different
* printing function for any given node .
*
* Uses inheritance via a functor so that this is accomplished via dynamic
* dispatch , so that printer authors do not have t... | |
d03f6457898e0c11322e6e79164728d1258f50b410681cd2511d6a854f4546fc | McCLIM/McCLIM | fontconfig.lisp | (in-package #:mcclim-fontconfig)
(defvar *config* nil)
(defvar *property-names* '((:family . "family")
(:familylang . "familylang")
(:style . "style")
(:stylelang . "stylelang")
(:fullname . "fullname")
... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Extensions/fontconfig/src/fontconfig.lisp | lisp | (in-package #:mcclim-fontconfig)
(defvar *config* nil)
(defvar *property-names* '((:family . "family")
(:familylang . "familylang")
(:style . "style")
(:stylelang . "stylelang")
(:fullname . "fullname")
... | |
7f099c0022c0fb86b81ee5f05878dcc5b7740829e92f4e2337999b4c656235a7 | phronmophobic/membrane | deps.cljs | {:npm-deps {"opentype.js" "1.3.4"
"buffer" "4.9.2"}}
| null | https://raw.githubusercontent.com/phronmophobic/membrane/aaa07670bb32881cca9e5067fcad9fe3cde7fdc2/src/deps.cljs | clojure | {:npm-deps {"opentype.js" "1.3.4"
"buffer" "4.9.2"}}
| |
41042cb7587299287f1b8b2426abfffcb4c135994333856629111a23362a3a04 | input-output-hk/plutus-apps | State.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
{-# LANGUAGE DerivingVia #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstan... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-contract/src/Plutus/Contract/State.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DerivingVia #
# LANGUAGE NamedFieldPuns #
* Contract state
Types for initialising and running instances of 'Contract's. The types and
functions in this module are convenient wrappers around types and functions
'insertAndUp... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Plutus.Contract.State(
$ contractstate
Contract
, State(..)
, ContractRequest(..)
, ContractResponse(..)
, mapE
,... |
ebbcfcb0a28fdb22fde4592904378fa792a3245c51a0ad58bfbd3fb3e081858e | ricardobcl/DottedDB | dotted_db_coverage_fsm.erl | -module(dotted_db_coverage_fsm).
-include_lib("dotted_db.hrl").
-export([start_link/4, start/2]).
-export([init/2, process_results/2, finish/2]).
-behaviour(riak_core_coverage_fsm).
-record(state, {
req_id,
from,
request,
results=[]}).
%% API
start(Request, Timeout) ->
ReqId = dotted_db_utils:... | null | https://raw.githubusercontent.com/ricardobcl/DottedDB/e3b96a9ec77439af90f94a80b875a01732c1425e/src/dotted_db_coverage_fsm.erl | erlang | API
riak_core_coverage_fsm API | -module(dotted_db_coverage_fsm).
-include_lib("dotted_db.hrl").
-export([start_link/4, start/2]).
-export([init/2, process_results/2, finish/2]).
-behaviour(riak_core_coverage_fsm).
-record(state, {
req_id,
from,
request,
results=[]}).
start(Request, Timeout) ->
ReqId = dotted_db_utils:make_re... |
0cdc05078d6c467868c48929735d479dd1ebb4210774580d02a1c6dc23395edb | lojic/RacketChess | movement.rkt | #lang racket
(require "./board.rkt"
"./global.rkt"
"./move-ordering.rkt"
"./move.rkt"
"./piece.rkt"
"./state.rkt")
(require racket/performance-hint)
(provide generate-bishop-moves!
generate-king-moves!
generate-knight-moves!
generate-queen-moves!... | null | https://raw.githubusercontent.com/lojic/RacketChess/115ca7fecca9eaf31f9b2f4ef59935372c9920c8/src/movement.rkt | racket | --------------------------------------------------------------------------------------------
Public Interface
--------------------------------------------------------------------------------------------
To allow comparing with fx= below
------------------------------------------------------------------------------... | #lang racket
(require "./board.rkt"
"./global.rkt"
"./move-ordering.rkt"
"./move.rkt"
"./piece.rkt"
"./state.rkt")
(require racket/performance-hint)
(provide generate-bishop-moves!
generate-king-moves!
generate-knight-moves!
generate-queen-moves!... |
0de6e20b0ac90baee354ce8b61a5551fa4ffdd3198bb2d97808dc9dee48ce87a | soulomoon/SICP | Exercise4.47.scm | Exercise 4.47 : suggests that , since a verb phrase is either a verb or a verb phrase followed by a prepositional phrase , it would be much more straightforward to define the procedure parse - verb - phrase as follows ( and similarly for noun phrases ):
; (define (parse-verb-phrase)
; (amb (parse-word verbs)
; ... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.47.scm | scheme | (define (parse-verb-phrase)
(amb (parse-word verbs)
(list
'verb-phrase
(parse-verb-phrase)
(parse-prepositional-phrase))))
Does this work? Does the program’s behavior change if we interchange the order of expressions in the amb? | Exercise 4.47 : suggests that , since a verb phrase is either a verb or a verb phrase followed by a prepositional phrase , it would be much more straightforward to define the procedure parse - verb - phrase as follows ( and similarly for noun phrases ):
it is an infinite loop - -// (eval from left to right)
if it... |
ddd69978fe791b1972efa27763a2e30862074a04ce782beecd64c5faead588eb | Bogdanp/racket-component | main.rkt | #lang racket/base
(require "private/component.rkt"
"private/system.rkt")
(provide (all-from-out "private/component.rkt")
(all-from-out "private/system.rkt"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-component/3ca0ce9f27f7d2f0bc4e71434b558e3088d7da84/component-lib/component/main.rkt | racket | #lang racket/base
(require "private/component.rkt"
"private/system.rkt")
(provide (all-from-out "private/component.rkt")
(all-from-out "private/system.rkt"))
| |
3e14938531fe6cf7f8b800e75f91620025d38a037682ab5dd7d3ec349ad628c8 | bufferswap/ViralityEngine | matcap.lisp | (in-package #:virality.shader)
(defun matcap/v ((mesh-attrs mesh-attrs)
&uniforms
(model :mat4)
(view :mat4)
(proj :mat4)
(normal-matrix :mat3))
(with-slots (mesh/pos mesh/normal mesh/uv1) mesh-attrs
(let ((normal (normalize (* ... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/shader/matcap.lisp | lisp | not interchangable and we need to deal with it in some agnostic way.
Probably when loading the specific interchange model format (gltf,
formats to indicate in the texture descriptor expansions if we should
flip the y in the loading of the texture data or not. | (in-package #:virality.shader)
(defun matcap/v ((mesh-attrs mesh-attrs)
&uniforms
(model :mat4)
(view :mat4)
(proj :mat4)
(normal-matrix :mat3))
(with-slots (mesh/pos mesh/normal mesh/uv1) mesh-attrs
(let ((normal (normalize (* ... |
97414a253cba1e9f5e16c007959278694ed05a8aa69c3b70bf8ca68ce90f99da | Ekdohibs/camlboot | map.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/Ekdohibs/camlboot/506280c6e0813e0e794988151a8e46be55373ebc/miniml/interp/map.mli | 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
* Association tables over ordered types .
This module implements applicative association tables , a... |
94769c04451d1101a0a79557c24e5d962e2def12dc43753bcaec05258db8dc26 | hipsleek/hipsleek | cfout.ml | #include "xdebug.cppo"
this module contains funtions relating to output of
this module contains funtions relating to output of cformula
*)
open Globals
open Global_var
open VarGen
open Gen
open Exc.GTable
open VarGen
open Perm
open Label_only
open Label
open Cformula
module CP = Cpure
module MCP = Mcpure
let n_... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/cfout.ml | ocaml | (Str.global_replace reg "" id)^ "_" ^Globals.fresh_inf_number()
let cut_id = if Gen.BList.mem_eq (fun s1 s2 -> String.compare s1 s2 = 0) cut_id0 fields then
cut_id0 ^ pad
else cut_id0
in
(Str.global_replace reg "" id)^ "_" ^Globals.fresh_inf_number()
let r = (match re with
| CP.Var(sv, pos) -> sv
| _... | #include "xdebug.cppo"
this module contains funtions relating to output of
this module contains funtions relating to output of cformula
*)
open Globals
open Global_var
open VarGen
open Gen
open Exc.GTable
open VarGen
open Perm
open Label_only
open Label
open Cformula
module CP = Cpure
module MCP = Mcpure
let n_... |
147b92cb2f276e7bab6f1ed47ce9180a7fc0c6f926287b904ceed2a7857f01d0 | ocaml-multicore/ocaml-tsan | cmmgen.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/asmcomp/cmmgen.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
[@@@ocaml.warning "-40"]
open Misc
open Arch
open Asttypes
open Primitive
open Types
open Lambda
open C... |
ffbc96c36b60808ef4f52e2606dc0df02817135519c362798c9ff49d0dd379fd | input-output-hk/bech32 | Internal.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- |
Copyright : © 2017 , 2019 - 2020 IOHK
-- License: Apache-2.0
--
-- Implementation of the [Bech32]
( -0173.mediawiki )
-- address ... | null | https://raw.githubusercontent.com/input-output-hk/bech32/c33dbf2edeb6930328503871e145f011cb20127e/bech32/src/Codec/Binary/Bech32/Internal.hs | haskell | |
License: Apache-2.0
Implementation of the [Bech32]
address format.
[sipa/bech32]()
* Encoding & Decoding
* Data Part
* Human-Readable Part
* Bit Manipulation
* Character Manipulation
------------------------------------------------------------------------------
Data Part... | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Copyright : © 2017 , 2019 - 2020 IOHK
( -0173.mediawiki )
From an original implementation by :
module Codec.Binary.Bech32.Internal... |
6629d4091240d729a484935ba0a942b586f3fec59b003bc9dc0eb79d876c67a0 | uncomplicate/neanderthal | real.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/neanderthal/5c76fb83eb43b7aa3307e6e90d5025e41750a00f/src/clojure/uncomplicate/neanderthal/real.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.neanderthal.real
"Contains type-specific primitive floating point functions, equivalents of functions from the
[[uncomplicate.neanderthal.core]] namespace. Typically, you would want to require this namespace
if you need... |
c5259bcde9cec1fc310b2acc6cdf7819531100f608addcf4d211562616de46e3 | bmeurer/ocaml-experimental | b.ml | let () =
print_endline "B is running";
incr A.x;
Printf.printf "A.x = %i\n" !A.x
| null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/testsuite/tests/lib-dynlink-native/b.ml | ocaml | let () =
print_endline "B is running";
incr A.x;
Printf.printf "A.x = %i\n" !A.x
| |
c48052f93aed3eb765086c4f3db267c5bc8e090402b94f7e1232703bb837932f | mistupv/cauder-core | sum_tuple.erl | -module(sum_tuple).
-export([main/2, sum_tuple/1]).
main(X, Y) ->
Tuple = {X,Y},
spawn(?MODULE, sum_tuple, [Tuple, Y]).
sum_tuple({X,Y}) -> X + Y.
sum_tuple({X,Y}, Z) -> X + Y + Z.
| null | https://raw.githubusercontent.com/mistupv/cauder-core/b676fccd1bbd629eb63f3cb5259f7a9a8c6da899/examples/sum_tuple.erl | erlang | -module(sum_tuple).
-export([main/2, sum_tuple/1]).
main(X, Y) ->
Tuple = {X,Y},
spawn(?MODULE, sum_tuple, [Tuple, Y]).
sum_tuple({X,Y}) -> X + Y.
sum_tuple({X,Y}, Z) -> X + Y + Z.
| |
cd6f04d83fc158e056b7b70e6aa1295f108af4439552e86e1bb17626355efb99 | gusbicalho/haskell-todo | AesonHelpers.hs | module Common.Util.AesonHelpers where
dropPrefix_ :: String -> String
dropPrefix_ s = let suffix = drop 1 . dropWhile ('_' /=) $ s
in if suffix == "" then s else suffix
| null | https://raw.githubusercontent.com/gusbicalho/haskell-todo/f28b0d05ddb72764cf01d29fa978457ac455ac81/src/Common/Util/AesonHelpers.hs | haskell | module Common.Util.AesonHelpers where
dropPrefix_ :: String -> String
dropPrefix_ s = let suffix = drop 1 . dropWhile ('_' /=) $ s
in if suffix == "" then s else suffix
| |
7a3e105a5d94402f32aab079e1e23928a3ea515953066b193098d183ad83d476 | dmjio/LearnOpenGL.hs | Main.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
module Main where
import Control.Monad
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.ByteStri... | null | https://raw.githubusercontent.com/dmjio/LearnOpenGL.hs/b04d96ed6447bcac9983949985a83f46cc237aef/GettingStarted/HelloTriangle/Main.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE BlockArguments #
# LANGUAGE OverloadedStrings #
glPolygonMode GL_FRONT_AND_BACK GL_LINE | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE CPP #
module Main where
import Control.Monad
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteStri... |
2aad6572d2d427b5e1377298a211eb6aae8ba7120780684dc2d64f9b6608fa0d | sshirokov/CLSQL | mysql-objects.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
Name :
;;;; Purpose: CLSQL Object layer for MySQL
Created : May 2004
;;;;
CLSQL users are granted the rights to distribute and use... | null | https://raw.githubusercontent.com/sshirokov/CLSQL/c680432aea0177677ae2ee7b810a7404f7a05cab/db-mysql/mysql-objects.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Purpose: CLSQL Object layer for MySQL
(), also known as the LLGPL.
************************************************************************* | Name :
Created : May 2004
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:clsql-mysql)
(defmethod database-get-type-specifier ((type (eql 'wall-time)) args database
... |
a08e1cecc0ea18722e06c346271fd8f89993e7fa6ca074d23827b6a33e7e1ec9 | arichiardi/replumb | test_helpers.clj | (ns replumb.test-helpers
(:require [clojure.string :as s]))
(def ^:dynamic *ns-max-id* 1000)
(defn test-var-name
"Builds the name of the test, returns a string."
[strings]
(let [s (->> strings
(clojure.string/join " ")
((fn [s] (clojure.string/replace s #"[\s\.\/]" "-")))
... | null | https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/test/clj/replumb/test_helpers.clj | clojure | (ns replumb.test-helpers
(:require [clojure.string :as s]))
(def ^:dynamic *ns-max-id* 1000)
(defn test-var-name
"Builds the name of the test, returns a string."
[strings]
(let [s (->> strings
(clojure.string/join " ")
((fn [s] (clojure.string/replace s #"[\s\.\/]" "-")))
... | |
8722fcb1751feffcef5aca6b70f6a73c8543bde2ec93f9f4711b35a5817d3cce | coleslaw-org/coleslaw | cli.lisp | (defpackage :coleslaw-cli
(:use :cl :trivia)
(:export
#:copy-theme
#:setup
#:new
#:generate
#:preview
#:watch
#:watch-preview
#:help
#:stage
#:deploy))
(in-package :coleslaw-cli)
(defun setup-coleslawrc (user &aux (path (merge-pathnames ".coleslawrc")))
"Set up the default .coles... | null | https://raw.githubusercontent.com/coleslaw-org/coleslaw/c5b368aa8af7f63ba592e17445a84c8328670063/cli/cli.lisp | lisp | odd formatting in this source code because emacs has problem detecting the parenthesis inside a string
-*- mode : lisp -*-~%(~
Required information
to be placed on post pages and in the copyright/CC-BY-SA notice
to generate absolute links to the site content. Note: with :cname option of gh-pages, this requires a u... | (defpackage :coleslaw-cli
(:use :cl :trivia)
(:export
#:copy-theme
#:setup
#:new
#:generate
#:preview
#:watch
#:watch-preview
#:help
#:stage
#:deploy))
(in-package :coleslaw-cli)
(defun setup-coleslawrc (user &aux (path (merge-pathnames ".coleslawrc")))
"Set up the default .coles... |
7128820244f5a091f986bc4f0b76a6d62942f499fd15251db94ff6a9e96475c3 | vyzo/gerbil | common__rt.scm | (declare (block) (standard-bindings) (extended-bindings))
(load-module "gerbil/core$_expander-runtime___rt")
| null | https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/bootstrap/gerbil/expander/common__rt.scm | scheme | (declare (block) (standard-bindings) (extended-bindings))
(load-module "gerbil/core$_expander-runtime___rt")
| |
211a9226bbe43422dbb6f76221de86369269509e7f822a206d7abb271a51326f | elnewfie/lslforge | UnitTestEnv.hs | # LANGUAGE FlexibleContexts #
module Language.Lsl.UnitTestEnv(
simStep,
simFunc,
simSFunc,
hasFunc,
hasFunc1,
SimpleWorld,
TestEvent(..),
ExecutionInfo(..),
ExecCommand(..),
FrameInfo,
TestResult) where
import Control.Monad(liftM2)
import Control.Monad.Except(ExceptT(..),run... | null | https://raw.githubusercontent.com/elnewfie/lslforge/27eb84231c53fffba6bdb0db67bde81c1c12dbb9/lslforge/haskell/src/Language/Lsl/UnitTestEnv.hs | haskell | trace1 v = trace ("->>" ++ (show v)) v
------------------------------------------------
'Interactive' testing
simFunc' lib (moduleName,functionName) globs args =
let ep = ModuleFunc moduleName functionName
no more tests, not currently executing
not currently executing, more tests
currently executing | # LANGUAGE FlexibleContexts #
module Language.Lsl.UnitTestEnv(
simStep,
simFunc,
simSFunc,
hasFunc,
hasFunc1,
SimpleWorld,
TestEvent(..),
ExecutionInfo(..),
ExecCommand(..),
FrameInfo,
TestResult) where
import Control.Monad(liftM2)
import Control.Monad.Except(ExceptT(..),run... |
d51b89eb8267a544a2b954c123ad97ee72a5589799391f649d504211c2fe0656 | haas/harmtrace | BasePaths.hs | module HarmTrace.IO.BasePaths ( BasePaths (..), setPaths, getLogFile
, consBasePaths, basePathsExist) where
import System.FilePath ((</>), (<.>), takeFileName)
import HarmTrace.IO.Common (fileExists, dirExists)
import Constants ( defaultVampDir, defaultOutDir, defaultFeatDir, defaultLogDi... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/IO/BasePaths.hs | haskell | | A datatype for storing the base directories of the vamp plugins, feature
csv files, and the chord and log Files.
there is a specific function without id, but hackage is down
| contructs a new 'BasePaths' based on a VAMP transform directory,
a feature directory (to store the CSV files), and an output directory. | module HarmTrace.IO.BasePaths ( BasePaths (..), setPaths, getLogFile
, consBasePaths, basePathsExist) where
import System.FilePath ((</>), (<.>), takeFileName)
import HarmTrace.IO.Common (fileExists, dirExists)
import Constants ( defaultVampDir, defaultOutDir, defaultFeatDir, defaultLogDi... |
47768c7098734ac76159b7c3c1b811b9211b0b89791f96cd519c56ff92039a27 | Frama-C/Frama-C-snapshot | inout_parameters.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/inout/inout_parameters.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
bbe719072f2c0bf1b77293f48fd4602bdfb8bae33a277529ab65ef18551fd40d | Incubaid/baardskeerder | play.ml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/Incubaid/baardskeerder/3975cb7f0e92e1f35eeab17beeb906344e43dae0/src/play.ml | ocaml | "p";]
Printf.printf "leaf=%s\n" (Leaf.leaf2s leaf)
let () = Printf.printf "separator: %s =?= %s\n" ke k in
let _ = MDot.view_tree t0 in ();
let () = Mlog.dump t0 in |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... |
79578fa734d453ab9b0af6d6221b7ce2765ec8109793795a830b585b34ae11d9 | nilenso/time-tracker | spec.clj | (ns time-tracker.data-import.harvest.spec
(:require [clojure.spec :as s]
[time-tracker.spec :as core-spec]))
(s/def ::id ::core-spec/id)
(s/def ::name string?)
(s/def ::client
(s/keys :req-un [::id ::name]))
(s/def ::client-id ::id)
(s/def ::project
(s/keys :req-un [::id ::client-id ::name]))
(s/d... | null | https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/src/clj/time_tracker/data_import/harvest/spec.clj | clojure | (ns time-tracker.data-import.harvest.spec
(:require [clojure.spec :as s]
[time-tracker.spec :as core-spec]))
(s/def ::id ::core-spec/id)
(s/def ::name string?)
(s/def ::client
(s/keys :req-un [::id ::name]))
(s/def ::client-id ::id)
(s/def ::project
(s/keys :req-un [::id ::client-id ::name]))
(s/d... | |
6fd93a98f7f588f5dc0074e59b22ef20112c801e2ad3fdc807f77ae768009dc8 | mrphlip/aoc | 05.hs | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Data.List.Split (splitOn)
import Data.Maybe
import Control.Exception
import qualified Text.ParserCombinators.ReadP as P
import Utils
type Stacks = [[Char]]
type Move = (Integer, Integer, Integer)
getInput :: IO (Stacks, [Move])
getInput = do
dat <- readFile "05.txt... | null | https://raw.githubusercontent.com/mrphlip/aoc/612529c60a6863c88f3fbf933a787b610ada5122/2022/05.hs | haskell | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Data.List.Split (splitOn)
import Data.Maybe
import Control.Exception
import qualified Text.ParserCombinators.ReadP as P
import Utils
type Stacks = [[Char]]
type Move = (Integer, Integer, Integer)
getInput :: IO (Stacks, [Move])
getInput = do
dat <- readFile "05.txt... | |
520b65ac87756739e80689dcdfceb55b4dbfcb0698eee7154be7039c2d7619ee | K2InformaticsGmbH/imem | imem_cache.erl | -module(imem_cache).
-include("imem_meta.hrl").
-export([ read/1
, write/2
, clear/1
, clear_local/1
]).
read(Key) ->
case imem_meta:read(?CACHE_TABLE,Key) of
[] -> [];
[#ddCache{cvalue=Value}] -> [Value]
end.
write(Key,Value) ->
imem_meta:write(?CACH... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/src/imem_cache.erl | erlang | -module(imem_cache).
-include("imem_meta.hrl").
-export([ read/1
, write/2
, clear/1
, clear_local/1
]).
read(Key) ->
case imem_meta:read(?CACHE_TABLE,Key) of
[] -> [];
[#ddCache{cvalue=Value}] -> [Value]
end.
write(Key,Value) ->
imem_meta:write(?CACH... | |
f4e27d2f2a125bae0cd7f5e00fa42298b2437ecdef8e82bc367f0e489b42d985 | JoelSanchez/ventas | user.cljs | (ns ventas.server.api.user
(:require-macros
[ventas.server.api.core :refer [define-api-events-for-ns!]]))
(define-api-events-for-ns!) | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/server/api/user.cljs | clojure | (ns ventas.server.api.user
(:require-macros
[ventas.server.api.core :refer [define-api-events-for-ns!]]))
(define-api-events-for-ns!) | |
e61f1b4fc886a41ef06f9c74f5041b1fadd2643d43af80d669665e5ffd847a58 | mistupv/cauder | sum copy.erl | -module(sum).
-export([main/0]).
main() ->
{X, Y} = {1, 2},
X + Y.
| null | https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/examples/sum%20copy.erl | erlang | -module(sum).
-export([main/0]).
main() ->
{X, Y} = {1, 2},
X + Y.
| |
8babeaf9fef1a5015142c0d82a5c244532b28b738d98f1956e16d3ecdb82e272 | sweirich/dth | RegexpDependent.hs | # LANGUAGE TypeOperators , DataKinds , KindSignatures , TypeFamilies ,
PolyKinds , TypeInType , UndecidableInstances , GADTs ,
ScopedTypeVariables , InstanceSigs , TypeApplications ,
TypeFamilyDependencies ,
TemplateHaskell , AllowAmbiguousTypes ,
FlexibleContexts , TypeSynonymInstances , ... | null | https://raw.githubusercontent.com/sweirich/dth/a032e2bc90cebdc0ebb13633cf3ebd22516f9b49/regexp/src/RegexpDependent.hs | haskell | # OPTIONS_GHC -fdefer-type-errors #
# OPTIONS_GHC -fprint-expanded-synonyms #
| This module implements the regular expression type and several operations
for matching regular expressions against strings
regexp type
functions to construct regexps
occurrence dictionary
regexp matching functions
--------------------... | # LANGUAGE TypeOperators , DataKinds , KindSignatures , TypeFamilies ,
PolyKinds , TypeInType , UndecidableInstances , GADTs ,
ScopedTypeVariables , InstanceSigs , TypeApplications ,
TypeFamilyDependencies ,
TemplateHaskell , AllowAmbiguousTypes ,
FlexibleContexts , TypeSynonymInstances , ... |
b7b878b34c6061416ed980d6a6b0e6a797885f10330c29b6e6a39417e7c0ca76 | AndrasKovacs/ELTE-func-lang | gyakfeladatok_01_megoldas.hs |
Gyakorló feladatok ( ismétlés , függvények , , ADT - k )
--------------------------------------------------------------------------------
Definiáld a " xor " típuson . ,
-- vagy Prelude-ből standard függvényt.
xor :: Bool -> Bool -> Bool
xor = (/=)
Definiáld a , de
és totális függvényként ( végte... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-2/gyak_1/gyakfeladatok_01_megoldas.hs | haskell | ------------------------------------------------------------------------------
vagy Prelude-ből standard függvényt.
vagy exception).
f2 = id
f3 = (.)
f4 = flip
f5 = curry
üres.
működik
Írj "Eq a => Eq (Tree a)" instance-t |
Gyakorló feladatok ( ismétlés , függvények , , ADT - k )
Definiáld a " xor " típuson . ,
xor :: Bool -> Bool -> Bool
xor = (/=)
Definiáld a , de
és totális függvényként ( végtelen loop
f1 :: (a, (b, (c, d))) -> (b, c)
f1 (a, (b, (c, d))) = (b, c)
f2 :: (a -> b) -> a -> b
f3 :: (b -> c) -> (a ->... |
35db096234d2e1654ac5478f0b6275137da51d76f70e50af7ac2fe5a4189df7a | foreverbell/project-euler-solutions | 67.hs |
fromString :: [[String]] -> [[Int]]
fromString s = map (\x -> map (\y -> read y) x) s
dp :: Int -> [[Int]] -> [Int]
dp 0 triangle = head triangle
dp level triangle = zipWith (+) row (zipWith max (0 : bak) (bak ++ [0]))
where row = head triangle
bak = dp (level - 1) (tail triangle)
solve :: Strin... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/67.hs | haskell |
fromString :: [[String]] -> [[Int]]
fromString s = map (\x -> map (\y -> read y) x) s
dp :: Int -> [[Int]] -> [Int]
dp 0 triangle = head triangle
dp level triangle = zipWith (+) row (zipWith max (0 : bak) (bak ++ [0]))
where row = head triangle
bak = dp (level - 1) (tail triangle)
solve :: Strin... | |
9d51a7ad59c7ee91b9a1a6de28ed55c57ac34f92c623a46d807652ac4e28d7bb | multiformats/clj-multistream | transform_test.clj | (ns multistream.codec.transform-test
(:require
[clojure.test :refer :all]
[multistream.codec :as codec]
[multistream.codec.transform :as transform]))
(deftest transform-codec
(testing "empty codec"
(let [codec (transform/transform-codec "/foo/")]
(is (not (codec/processable? codec "/bin/")))... | null | https://raw.githubusercontent.com/multiformats/clj-multistream/c66d61a28bc9d54beb04a45f76b40a101a1f0a32/test/multistream/codec/transform_test.clj | clojure | (ns multistream.codec.transform-test
(:require
[clojure.test :refer :all]
[multistream.codec :as codec]
[multistream.codec.transform :as transform]))
(deftest transform-codec
(testing "empty codec"
(let [codec (transform/transform-codec "/foo/")]
(is (not (codec/processable? codec "/bin/")))... | |
279254760f016e327afa4e25166bc8c5877185cbf6fa6d8e619652c89539f5bb | rizo/snowflake-os | vga.ml |
open Asm
open Bigarray
let font_8x16 = [|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
17
18
19
(* 20 *) 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;
21
22
23
24
25
26
27
28
29
(* 30 *) 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/vga.ml | ocaml | 20
30
extended ASCII would follow
save registers
turn off even-odd addressing
set read plane
set write plane
restore registers |
open Asm
open Bigarray
let font_8x16 = [|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
17
18
19
21
22
23
24
25
26
27
28
29
31
<space> ! quot # $ % & ' ( ) * + ; - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
... |
4e56c11a9f07be9b897e808de3dc214d2f666835e35aa141e15cb385636ae7c4 | PseudoPower/AFSM | Auto.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.AFSM.Auto
Copyright : ( c ) , 2016 ,
License : MIT License
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
-------------------------------------------------------... | null | https://raw.githubusercontent.com/PseudoPower/AFSM/9d6ace9d279992a18f44856058040a0ef391abd6/src/Data/AFSM/Auto.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.AFSM.Auto
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
| Control.Arrow.Transformer.Automaton
data Auto f a b = fora... | Copyright : ( c ) , 2016 ,
License : MIT License
{ - # LANGUAGE ExistentialQuantification # - }
{ - # LANGUAGE FlexibleInstances , UndecidableInstances # - }
# LANGUAGE RankNTypes , ImpredicativeTypes , ExistentialQuantification #
module Data.AFSM.Auto where
import Control.Category
import Cont... |
23cdc4f58110242284c477560ac8799410a07e2c0a1670558c610866a4744fc5 | haskus/packages | List.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE BangPatterns #-}
-- | List utils
module Haskus.Utils.List
( at
, unsafeAt
, checkLength
, (++)
, replicate
, drop
, length
, take
, chunksOf
, pick1
, enumList
, zipLeftWith
, zipRightWith
, L.partition
, L.nub
, L.sort
, ... | null | https://raw.githubusercontent.com/haskus/packages/0f197852b9c268910da913691e7841f71a24afee/haskus-utils-data/src/lib/Haskus/Utils/List.hs | haskell | # LANGUAGE BangPatterns #
| List utils
* Split
| Safely index into a list
Nothing
| Unsafe `a`
| Check that a list has the given length (support infinite lists)
| Replicate
| Take
| Length
| Drop
| Apply some operation repeatedly, producing an element of output
and the remainder of the list.
| Split a... | # LANGUAGE ScopedTypeVariables #
module Haskus.Utils.List
( at
, unsafeAt
, checkLength
, (++)
, replicate
, drop
, length
, take
, chunksOf
, pick1
, enumList
, zipLeftWith
, zipRightWith
, L.partition
, L.nub
, L.sort
, L.intersperse
, L.foldl'
, L.head
, L... |
78439d7279508e2e48aa71afb53fe881881f6a1ff2021c028b38ac47053bc279 | craigfe/compact | type_equality.mli | type (_, _) t = Refl : ('a, 'a) t
| null | https://raw.githubusercontent.com/craigfe/compact/fcce0432d267babeb90dbdf4f49e2d2d067b2b0f/src/type_equality.mli | ocaml | type (_, _) t = Refl : ('a, 'a) t
| |
50bdf92b0cc5f8bdec06d4dde1d4c681e4ac072c0c51eec6df09b6a93ef896a0 | sadiqj/ocaml-esp32 | numbers.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/utils/numbers.mli | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
module Int : sig
include Identifiable.S with type t = int
* [ ze... |
a4e3e3bdcba4279126dbe697b8d37c837f1cc5afe0cffd6f02f6389ebf53ef48 | bennofs/th-lift-instances | Lift.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE TemplateHaskellQuotes #-}
{-# LANGUAGE DeriveLift #-}
# LANGUAGE StandaloneDeriving #
#else
# LANGUAGE TemplateHaskell #
#endif
module Instances.TH.Lift
| This module provides orphan ins... | null | https://raw.githubusercontent.com/bennofs/th-lift-instances/a4389321cbd89c7d482d62731297ee2aaec5cd93/src/Instances/TH/Lift.hs | haskell | # LANGUAGE TemplateHaskellQuotes #
# LANGUAGE DeriveLift #
Lift instances are useful to precompute values at compile time using template haskell. For example, if you write the following code,
you can make sure that @3 * 10@ is really computed at compile time:
> {-# LANGUAGE TemplateHaskell #-}
>
>
This will com... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#if __GLASGOW_HASKELL__ >= 800
# LANGUAGE StandaloneDeriving #
#else
# LANGUAGE TemplateHaskell #
#endif
module Instances.TH.Lift
| This module provides orphan instances for the ' Language . Haskell . TH.Syntax . Lift ' class from... |
eaa9f7ccddaabd6a8fe102aa88c4c2ecd74ba1a4a34cb5c094da699ec2033030 | superhuman/rxxr2 | PatternParser.mli | type token =
| Regex of ((int * int) * ParsingData.regex)
| Mod of (int)
| Eos
val parse :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> ParsingData.pattern
| null | https://raw.githubusercontent.com/superhuman/rxxr2/0eea5e9f0e0cde6c39e0fc12614f64edb6189cd5/code/PatternParser.mli | ocaml | type token =
| Regex of ((int * int) * ParsingData.regex)
| Mod of (int)
| Eos
val parse :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> ParsingData.pattern
| |
48f855a6b38b5a5407e366707d2b8195c4a630ea13b97f774f6a65f8f668a5f3 | qfpl/reflex-dom-canvas | CanvasTest2D.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
module CanvasTest2D (mainish) where
import Co... | null | https://raw.githubusercontent.com/qfpl/reflex-dom-canvas/b9131dffd521e4534eb2240e3fe0b7bfb70136a8/examples/src/CanvasTest2D.hs | haskell | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE RankNTypes #
import qualified Run
Create the canvas element
Create our canvas painter, will be restricted to 'context2d' because of the types! :D | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module CanvasTest2D (mainish) where
import Control.Lens (to, (^.))
import Reflex ((<@))
import Reflex.Dom (Monad... |
c706c3aa721dd68c8e83235a45f32fb1c411be8c9650f4ab22e3271da5b0cc17 | well-typed/large-records | R060.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
{-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}
module Experiment.ConstructNoTypeLet.Sized.R060 where
import Data.Record.Anon.Simple ... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/ConstructNoTypeLet/Sized/R060.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ConstructNoTypeLet.Sized.R060 where
import Data.Record.Anon.Simple (Record)
import Bench.Types
import Common.RowOfSize.Row060
record :: Word -> Record ExampleRow
record x = ANON {
t00 = MkT x
, t01 = MkT x
, t02 = MkT x
, t03... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.