_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 |
|---|---|---|---|---|---|---|---|---|
d4a2ff4f1413b2dfa0ca2e5318a3c8c567f5af35e75dc732d82316017badef13 | alavrik/piqi | expand.ml |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in ... | null | https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/src/expand.ml | ocaml | command-line arguments |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in ... |
ece4b01c03a60bf01975fdf54fb6a1513e3f8e446543adc3de38ddf4a2ea7203 | google/haskell-trainings | Codelab.hs | Copyright 2021 Google LLC
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distributed und... | null | https://raw.githubusercontent.com/google/haskell-trainings/214013fc324fd6c8f63b874a58ead0c1d3e6788c/haskell_101/codelab/03_lists/src/Codelab.hs | haskell |
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... | Copyright 2021 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTI... |
aa1cd8f37af584061daef4a21dea7c1bf8a9c4773fdcc49398e19a3b1c9ccf8e | spechub/Hets | AS.der.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./NeSyPatterns / AS.der.hs
Description : Abstract syntax for neural - symbolic patterns
Copyright : ( c ) , Uni Magdeburg 2022
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability :... | null | https://raw.githubusercontent.com/spechub/Hets/64b378dbf84168942ede394481f2f88e46ee1a29/NeSyPatterns/AS.der.hs | haskell | # LANGUAGE DeriveDataTypeable #
DrIFT command
| id is optional
written node -> ... -> node;
pos: "|->" | |
Module : ./NeSyPatterns / AS.der.hs
Description : Abstract syntax for neural - symbolic patterns
Copyright : ( c ) , Uni Magdeburg 2022
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Definition of abstrac... |
320ac3972b20ae1508009272acddeb90f8a1f82e67c7f6a5bb60b67148dbbef4 | aryx/xix | lazy.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/unused/lazy.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . Distributed only by permission .
$ I d : lazy.ml , v 1.2 1997/10/22 13:26:04 doligez Exp $
type 'a status =
| Delayed of (unit -> 'a)
| Val... |
c34adba1538bdc5078817b6ff5214c723a824ee5dd5cd22ef0b8ea0f71a703a6 | rleonid/oml | epsitst.ml | let dx = 2.22044e-16
let () =
Printf.printf "add eps to 1.0 %b\n" (1.0 +. epsilon_float = 1.0);
Printf.printf "sub eps from 1.0 %b\n" (1.0 -. epsilon_float = 1.0);
Printf.printf "add dx to 1.0 %b\n" (1.0 +. dx = 1.0);
Printf.printf "sub dx from 1.0 %b\n" (1.0 -. dx = 1.0);
Printf.printf "dx is less %b\n" (dx... | null | https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/scripts/epsitst.ml | ocaml | let dx = 2.22044e-16
let () =
Printf.printf "add eps to 1.0 %b\n" (1.0 +. epsilon_float = 1.0);
Printf.printf "sub eps from 1.0 %b\n" (1.0 -. epsilon_float = 1.0);
Printf.printf "add dx to 1.0 %b\n" (1.0 +. dx = 1.0);
Printf.printf "sub dx from 1.0 %b\n" (1.0 -. dx = 1.0);
Printf.printf "dx is less %b\n" (dx... | |
a044fe98946b379e8f0cad73cd23713058740bbf0de0ac9a54e1572492352756 | nikita-volkov/rerebase | Array.hs | module Data.Text.Array
(
module Rebase.Data.Text.Array
)
where
import Rebase.Data.Text.Array
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Text/Array.hs | haskell | module Data.Text.Array
(
module Rebase.Data.Text.Array
)
where
import Rebase.Data.Text.Array
| |
139fb83616646fed9f07ddf19581a9808d22bbdc1210e0eecb065cf197d56096 | EFanZh/EOPL-Exercises | exercise-2.28-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-2.28.rkt")
(check-equal? (unparse-lc-exp (var-exp 'a)) "a")
(check-equal? (unparse-lc-exp (lambda-exp 'a (var-exp 'b))) "(lambda (a) b)")
(check-equal? (unparse-lc-exp (app-exp (var-exp 'a) (var-exp 'b))) "(a b)")
(check-equal? (unparse-lc-exp (lamb... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-2.28-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-2.28.rkt")
(check-equal? (unparse-lc-exp (var-exp 'a)) "a")
(check-equal? (unparse-lc-exp (lambda-exp 'a (var-exp 'b))) "(lambda (a) b)")
(check-equal? (unparse-lc-exp (app-exp (var-exp 'a) (var-exp 'b))) "(a b)")
(check-equal? (unparse-lc-exp (lamb... | |
03761ff3dc60a3b93529dea6b50fd0a3f9a3aa31e489b48708a8385c9147b269 | namin/biohacker | abduction-ex.lisp | (in-ltre (create-ltre "Abduction Test"))
(rule ((:INTERN (son ?son of ?father) :var ?def))
(rassert! (:IMPLIES ?def (father ?father of ?son))
:EQUIVALENCE)
(rassert! (:IMPLIES ?def (related ?son ?father)) :FAMILY)
(rassert! (:IMPLIES ?def (related ?father ?son))) :FAMILY)
(rule ((:INTERN (father ... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/ltms/abduction-ex.lisp | lisp | (((BROTHERS AADEL MOHAMED))
((BROTHERS MOHAMED AADEL))
((FATHER MOHAMED OF AADEL))
((SON MOHAMED OF AADEL)) | (in-ltre (create-ltre "Abduction Test"))
(rule ((:INTERN (son ?son of ?father) :var ?def))
(rassert! (:IMPLIES ?def (father ?father of ?son))
:EQUIVALENCE)
(rassert! (:IMPLIES ?def (related ?son ?father)) :FAMILY)
(rassert! (:IMPLIES ?def (related ?father ?son))) :FAMILY)
(rule ((:INTERN (father ... |
550b66eeb155f2a8f7fdf22cad5a10b22efd7f01b5d128f90bcb8295249435b1 | lucasdicioccio/prodapi | BackgroundNetwork.hs |
module BackgroundNetwork where
import Prod.Background (background, BackgroundVal, readBackgroundVal)
import Prod.Tracer (Tracer(..), tracePrint, pulls, silent)
import Control.Concurrent.Chan (Chan, newChan, writeChan, readChan)
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
-- | Showcases h... | null | https://raw.githubusercontent.com/lucasdicioccio/prodapi/4c43e1d617832f8ae88cb15afada1d5ab5e46ea4/example/src/BackgroundNetwork.hs | haskell | | Showcases how one could use channels to perform scheduling
between different background values (some are polled, some are pushed, one is combining)
the composed background tasks actually is composed of a combination of |
module BackgroundNetwork where
import Prod.Background (background, BackgroundVal, readBackgroundVal)
import Prod.Tracer (Tracer(..), tracePrint, pulls, silent)
import Control.Concurrent.Chan (Chan, newChan, writeChan, readChan)
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
complicatedNetwo... |
4df9f2b4169112dccaa39602055c3bbf3e00329b2a6491dab44cab347f404d6d | OCamlPro/ocaml-benchs | date.mli | (***************************************************************************)
Copyright ( C ) 2000 - 2013 LexiFi SAS . All rights reserved .
(* *)
(* This program is free software: you can redistribute it and/or modify *)
it ... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/lexifi-g2pp/date.mli | ocaml | *************************************************************************
This program is free software: you can redistribute it and/or modify
or (at your option) any later version.
... | Copyright ( C ) 2000 - 2013 LexiFi SAS . All rights reserved .
it under the terms of the GNU General Public License as published
by the Free Software Foundation , either version 3 of the License ,
You should have received a copy of the GNU General Public License
type date
v... |
62235b742331092a3c6c9ff901b79fadeb3ad58afc04cff4543a0ab8d1100389 | idris-lang/Idris-dev | LangOpts.hs | |
Module : IRTS.LangOpts
Description : Transformations to apply to ' IR .
License : : The Idris Community .
Module : IRTS.LangOpts
Description : Transformations to apply to Idris' IR.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveFunctor, PatternGuards #-}
... | null | https://raw.githubusercontent.com/idris-lang/Idris-dev/a13caeb4e50d0c096d34506f2ebf6b9d140a07aa/src/IRTS/LangOpts.hs | haskell | # LANGUAGE DeriveFunctor, PatternGuards #
| Inline inside a declaration.
Variables are still Name at this stage. Need to preserve
uniqueness of variable names in the resulting definition, so invent
a new name for every variable we encounter
do some case floating, which might arise as a result
then, eta contract... | |
Module : IRTS.LangOpts
Description : Transformations to apply to ' IR .
License : : The Idris Community .
Module : IRTS.LangOpts
Description : Transformations to apply to Idris' IR.
License : BSD3
Maintainer : The Idris Community.
-}
module IRTS.LangOpts(inlineAll) where
import ... |
39b01c7115322045d7b15aee1b55318880f19ffec57c1e971655a1f118e6e256 | picty/parsifal | test_tls_client.ml | open Lwt
open Parsifal
open PTypes
open TlsEnums
open Tls
open TlsEngineNG
let test_client host port prefs =
let ctx = { (empty_context prefs) with direction = Some ClientToServer } in
resolve host port >>= (fun resolved_host -> init_client_connection resolved_host) >>= fun c_sock ->
let ch () = mk_client_hello ... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/ssl/test/test_tls_client.ml | ocaml | open Lwt
open Parsifal
open PTypes
open TlsEnums
open Tls
open TlsEngineNG
let test_client host port prefs =
let ctx = { (empty_context prefs) with direction = Some ClientToServer } in
resolve host port >>= (fun resolved_host -> init_client_connection resolved_host) >>= fun c_sock ->
let ch () = mk_client_hello ... | |
7f055d6a99a9c3af5f424274d5302bd843258f501b81a0b7f0747b2050e34801 | AccelerationNet/cl-csv | read-until.lisp | (in-package :cl-csv)
(defun read-into-buffer-until (buffer stream
&key (nl #\newline) nl-match
&aux
(c #\null)
(nl-idx (or nl-match -1))
(nl-len (etypecase nl
... | null | https://raw.githubusercontent.com/AccelerationNet/cl-csv/68ecb5d816545677513d7f6308d9e5e8d2265651/read-until.lisp | lisp | look for newlines
read some, then got an end of file
got a full buffer | (in-package :cl-csv)
(defun read-into-buffer-until (buffer stream
&key (nl #\newline) nl-match
&aux
(c #\null)
(nl-idx (or nl-match -1))
(nl-len (etypecase nl
... |
3890d1245b744c7fd1a0554539a66408b6577cfd56959d6dac51080c5da898c6 | ChrisPenner/Candor | Main.hs | {-# language OverloadedStrings #-}
# language GeneralizedNewtypeDeriving #
module Main where
import RIO
import System.IO
import Parse
import Eval
import AST
import CLI
import REPL
import Options.Applicative (execParser)
import qualified Data.Text as Text
newtype ParseError = ParseError String
instance Show ParseError... | null | https://raw.githubusercontent.com/ChrisPenner/Candor/a2e5052c2f264d51b539c8979d1758c08a9bc2e1/app/Main.hs | haskell | # language OverloadedStrings # | # language GeneralizedNewtypeDeriving #
module Main where
import RIO
import System.IO
import Parse
import Eval
import AST
import CLI
import REPL
import Options.Applicative (execParser)
import qualified Data.Text as Text
newtype ParseError = ParseError String
instance Show ParseError where
show (ParseError err) = "P... |
b88664f08af6ca54a5ed2dbd6f2f3120debc3f219fdaee5ddf484fde8afe35b7 | alanforr/complex | project.clj | (defproject complex "0.1.12"
:description "A Clojure library for doing fast complex number calculations that
wraps the Java commons-math3 Complex library."
:url ""
:uberjar {:aot :all}
:profiles {:dev {:dependencies [[criterium "0.4.3"]]}}
:deploy-repositories [["releases" {:sign-releases false :url ""}]
... | null | https://raw.githubusercontent.com/alanforr/complex/3cdd2d5c9c95454cc549b217acc368cc76f2416b/project.clj | clojure | (defproject complex "0.1.12"
:description "A Clojure library for doing fast complex number calculations that
wraps the Java commons-math3 Complex library."
:url ""
:uberjar {:aot :all}
:profiles {:dev {:dependencies [[criterium "0.4.3"]]}}
:deploy-repositories [["releases" {:sign-releases false :url ""}]
... | |
4a3340a836883e642a4020df8372bab83cac3f4e4fcf8495e1fb59ef4b7137cf | haskell-servant/servant | BaseUrl.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE ViewPatterns #-}
module Servant.Client.Core.BaseUrl (
BaseUrl (..),
Scheme (..),
showBaseUrl,
parseBaseUrl,
InvalidBaseUrlException (..),
) where
import Control.... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant-client-core/src/Servant/Client/Core/BaseUrl.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveLift #
# LANGUAGE ViewPatterns #
| URI scheme to use
^ http://
^ https://
| Simple data type to represent the target of HTTP requests
for servant's automatically-generated clients.
^ URI scheme to use
^ host (eg "haskell.org")
TODO: Add Hashable i... | # LANGUAGE DeriveGeneric #
module Servant.Client.Core.BaseUrl (
BaseUrl (..),
Scheme (..),
showBaseUrl,
parseBaseUrl,
InvalidBaseUrlException (..),
) where
import Control.DeepSeq
(NFData (..))
import Control.Monad.Catch
(Exception, Mon... |
fa74cc3ef9c26e118fa8c48da90cfcec0639a7a4078e105105488be38e7dfccc | Clozure/ccl | objc-runtime.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright 2002 - 2009 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by appli... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/objc-bridge/objc-runtime.lisp | lisp | Package : CCL -*-
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 la... | Copyright 2002 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
Utilities for interacting with the Apple / GNU Objective - C runtime
(eval-when (:compile-toplevel :load-toplevel :execute)
#+darwin-target (pushnew :apple-objc *features*)
#+(... |
d79622cdd93b70509e0dd961420d0dc8eb27fc7ba722f477ef73277eed1fc351 | metanivek/irmin-ipfs | conf.mli | module Key : sig
val fresh : bool Irmin.Backend.Conf.key
val name : string Irmin.Backend.Conf.key
end
val v : ?fresh:bool -> string -> Irmin.Backend.Conf.t
| null | https://raw.githubusercontent.com/metanivek/irmin-ipfs/4b51bd0ab62e8d82078823c0f2b835afa751ebcd/src/conf.mli | ocaml | module Key : sig
val fresh : bool Irmin.Backend.Conf.key
val name : string Irmin.Backend.Conf.key
end
val v : ?fresh:bool -> string -> Irmin.Backend.Conf.t
| |
9709083ed2860c958d0d3e3f9a075135d211e93f1573f7d693d36d240c2a4472 | zotonic/zotonic | controller_keyserver_key.erl | @author < >
2018 < >
%% @doc Retrieve the public key of the keyserver.
Copyright 2018
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unles... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/controllers/controller_keyserver_key.erl | erlang | @doc Retrieve the public key of the keyserver.
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 ... | @author < >
2018 < >
Copyright 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(controller_keyserver_key).
-author("Maas-Maarten Zeeman <>").
-export([
content_types_provided/1,
pro... |
942fa8f32eb9d13b69763789f2004fdd61cf0f54ce5bcf41ab15351450e72a6d | mwunsch/overscan | caps.rkt | #lang racket/base
(require ffi/unsafe/introspection
racket/contract
"private/core.rkt"
"private/structure.rkt")
(provide (contract-out [caps?
(-> any/c boolean?)]
[string->caps
(-> string? (or/c caps? false/c))]
... | null | https://raw.githubusercontent.com/mwunsch/overscan/f198e6b4c1f64cf5720e66ab5ad27fdc4b9e67e9/gstreamer/caps.rkt | racket | #lang racket/base
(require ffi/unsafe/introspection
racket/contract
"private/core.rkt"
"private/structure.rkt")
(provide (contract-out [caps?
(-> any/c boolean?)]
[string->caps
(-> string? (or/c caps? false/c))]
... | |
7beb2e424f68dea6222f8b38f1f885d7edebe41ca2f15023963c93805fb644cf | findmyway/reinforcement-learning-an-introduction | ten_armed_testbed.clj | gorilla-repl.fileformat = 1
;; @@
(ns rl.chapter02.ten-armed-testbed
(:require [incanter.stats :refer [sample-normal sample-binomial]]
[rl.util :refer [argmax rand-weighted]]
[clojure.core.matrix.stats :refer [mean]]
[clojure.core.matrix :refer [to-nested-vectors mset!]]
... | null | https://raw.githubusercontent.com/findmyway/reinforcement-learning-an-introduction/6911efbe7a6478658b188022ebad542751146ddd/src/rl/chapter02/ten_armed_testbed.clj | clojure | @@
@@
=>
{"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
<=
@@
@@
=>
{"type":"html","content":"<script src=\"-latest.min.js\" type=\"text/javascript\"></script>","value":"pr'ed value"}
<=
@@
@@
=>
{"type":"html","content":"<span class='clj-var'>#'rl.chapter02.ten-armed-test... | gorilla-repl.fileformat = 1
(ns rl.chapter02.ten-armed-testbed
(:require [incanter.stats :refer [sample-normal sample-binomial]]
[rl.util :refer [argmax rand-weighted]]
[clojure.core.matrix.stats :refer [mean]]
[clojure.core.matrix :refer [to-nested-vectors mset!]]
[... |
40fb1a4cab6356749677cc2ef0007022b7dc92426a8953a95007d1c8ab904cfe | racket/typed-racket | env-lang.rkt | #lang racket/base
(require "../utils/utils.rkt")
(require (for-syntax racket/base syntax/parse)
racket/stxparam
"../utils/tc-utils.rkt"
"../env/init-envs.rkt"
"../types/abbrev.rkt"
"../types/numeric-tower.rkt"
"../types/prop-ops.rkt")
(define-syntax (-#%module-be... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/base-env/env-lang.rkt | racket | shallow: don't check base-env functions unless specified | #lang racket/base
(require "../utils/utils.rkt")
(require (for-syntax racket/base syntax/parse)
racket/stxparam
"../utils/tc-utils.rkt"
"../env/init-envs.rkt"
"../types/abbrev.rkt"
"../types/numeric-tower.rkt"
"../types/prop-ops.rkt")
(define-syntax (-#%module-be... |
6a4003ed9228f43f4e5205d63e8fc911a2d403b93f5672e71edf54a04eb727b9 | nomaddo/loop | ast.ml | type direction =
| To
| Downto
[@@deriving show]
type expr =
| Var of Pident.path
| Iconst of int
| Rconst of string
| Call of Pident.path * expr list
| Aref of Pident.path * expr list
[@@deriving show]
type typ =
| Void
| Int
| Real
| Array of typ * expr
| Lambda of typ list *... | null | https://raw.githubusercontent.com/nomaddo/loop/cd2204208b67b7e1f386b730c953404482ca36d6/parsing/ast.ml | ocaml | type direction =
| To
| Downto
[@@deriving show]
type expr =
| Var of Pident.path
| Iconst of int
| Rconst of string
| Call of Pident.path * expr list
| Aref of Pident.path * expr list
[@@deriving show]
type typ =
| Void
| Int
| Real
| Array of typ * expr
| Lambda of typ list *... | |
afdc8b02a5552ac65fbea66afc2ca6d0227f4694d6f671c2370cfddcf73ac58d | andrenth/release | release.mli | * Release is a multi - process daemon library for OCaml . Its main goal is
to ease the development of servers following the common pattern of one
master process and one or many slave processes .
The usual tasks involved in setting up such process scheme are handled
by Release . These consist of... | null | https://raw.githubusercontent.com/andrenth/release/c88b472d8b142f7f306299d0f51cfd8add4a1a58/src/release.mli | ocaml | * This module defines a buffer type [Buffer.t] and a set of operations
on such buffers.
* The type of buffers.
* [create n] will create a buffer of [n] bytes.
* [make n c] will create a buffer of [n] bytes, all initialized to
character [c].
* Converts a string to a buffer.
* The type of configuration v... | * Release is a multi - process daemon library for OCaml . Its main goal is
to ease the development of servers following the common pattern of one
master process and one or many slave processes .
The usual tasks involved in setting up such process scheme are handled
by Release . These consist of... |
bff1a5ffe256f8e22604aefc6116ba3e194026afee4ce2a2001e98bb3b9ee881 | ertugrulcetin/jme-clj | hello_asset.clj | ;; Please start your REPL with `+test` profile
(ns examples.beginner-tutorials.hello-asset
"Clojure version of "
(:require [jme-clj.core :refer :all]))
(defn init []
(let [root-node (root-node)
mat-default (material "Common/MatDefs/Misc/ShowNormals.j3md")
teapot (load-model "Models/Teapot... | null | https://raw.githubusercontent.com/ertugrulcetin/jme-clj/167ef8f9e6396cc6e3c234290c5698c098fcad28/test/examples/beginner_tutorials/hello_asset.clj | clojure | Please start your REPL with `+test` profile
Create a wall with a simple texture from test_data
Display a line of text with a default font
Load a model from test_data (OgreXML + material + texture)
You must add a light to make the model visible | (ns examples.beginner-tutorials.hello-asset
"Clojure version of "
(:require [jme-clj.core :refer :all]))
(defn init []
(let [root-node (root-node)
mat-default (material "Common/MatDefs/Misc/ShowNormals.j3md")
teapot (load-model "Models/Teapot/Teapot.obj")
teapot (set* teapot ... |
71d4f3ce04cd5f22ed4de2457204c574b69a1d1fd1bfa0570b3b144ac2d3d3af | dyzsr/ocaml-selectml | pr5026_bad.ml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
type untyped;;
type -'a typed = privat... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-private-bugs/pr5026_bad.ml | ocaml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
type untyped;;
type -'a typed = privat... | |
108bbb081b62f21333c181811b0bae852a4b4d1a88f6aff278aef060b5253b86 | larcenists/larceny | control.sps | (import (tests r6rs control)
(tests scheme test)
(scheme write))
(display "Running tests for (rnrs control)\n")
(run-control-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/R7RS/Lib/tests/r6rs/run/control.sps | scheme | (import (tests r6rs control)
(tests scheme test)
(scheme write))
(display "Running tests for (rnrs control)\n")
(run-control-tests)
(report-test-results)
| |
2199691b217322a43d906c09256ebfb71c4ae5a65904d552c8842244e694dab3 | gwkkwg/trivial-shell | utilities.lisp | (in-package #:com.metabang.trivial-shell)
(defparameter *os-alist*
'((:windows :windows :mswindows :win32)
(:sun :solaris :sunos)
(:osx :macosx :darwin :apple)
(:linux :freebsd :netbsd :openbsd :bsd :linux :unix)))
(defun host-os ()
(dolist (mapping *os-alist*)
(destructuring-bind (os &rest featur... | null | https://raw.githubusercontent.com/gwkkwg/trivial-shell/e02ec191b34b52deca5d1c4ee99d4fa13b8772e0/dev/utilities.lisp | lisp | from asdf-install
using shell backquoting. Relying on the shell can cause a host of
problems with argument quoting, so we won't assume that
RETURN-OUTPUT-FROM-PROGRAM will use a shell. [dwm] | (in-package #:com.metabang.trivial-shell)
(defparameter *os-alist*
'((:windows :windows :mswindows :win32)
(:sun :solaris :sunos)
(:osx :macosx :darwin :apple)
(:linux :freebsd :netbsd :openbsd :bsd :linux :unix)))
(defun host-os ()
(dolist (mapping *os-alist*)
(destructuring-bind (os &rest featur... |
c9395bcb57ca4258fd542b60ba62635cf83549e8c92d1ae1f5b09386a5dfe913 | xtdb/core2 | tx_producer.clj | (ns core2.tx-producer
(:require [clojure.spec.alpha :as s]
[core2.error :as err]
core2.log
[core2.rewrite :refer [zmatch]]
[core2.sql :as sql]
[core2.types :as types]
[core2.util :as util]
[core2.vector.writer :as vw]
[jux... | null | https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/core/src/main/clojure/core2/tx_producer.clj | clojure | C1 importer
TODO check param count in each row, handle error | (ns core2.tx-producer
(:require [clojure.spec.alpha :as s]
[core2.error :as err]
core2.log
[core2.rewrite :refer [zmatch]]
[core2.sql :as sql]
[core2.types :as types]
[core2.util :as util]
[core2.vector.writer :as vw]
[jux... |
f7b498ad385cd073b7b59e7bea1a8bf97fb71cd66b8ec88314d7f6f390f5f5f1 | arvyy/racket-raylib-2d | colors.rkt | #lang racket/base
(provide (all-defined-out))
(require "structs.rkt")
(define LIGHTGRAY (make-Color 200 200 200 255 ))
(define GRAY (make-Color 130 130 130 255 ))
(define DARKGRAY (make-Color 80 80 80 255 ))
(define YELLOW (make-Color 253 249 0 255 ))
(define GOLD (make-Color 255 203 0 255 ))
(def... | null | https://raw.githubusercontent.com/arvyy/racket-raylib-2d/2f0b05f37e6bd81cf4246116c7d32f2744dc53c0/colors.rkt | racket | #lang racket/base
(provide (all-defined-out))
(require "structs.rkt")
(define LIGHTGRAY (make-Color 200 200 200 255 ))
(define GRAY (make-Color 130 130 130 255 ))
(define DARKGRAY (make-Color 80 80 80 255 ))
(define YELLOW (make-Color 253 249 0 255 ))
(define GOLD (make-Color 255 203 0 255 ))
(def... | |
1ed6f2eae26c1f59575ab7e146b74675bc68e4363955912af07091c5a936c010 | pirapira/coq2rust | ppstyle.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/printing/ppstyle.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Highlighting of printers. Used for... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* { 5 Style tags }
type t
... |
c3dad23d8774f3951398b8fa71a78cfbb285c4e7ff7b3c87f6ede24239fbdda2 | haskell-compat/base-compat | Batteries.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
| Reexports " Control . . Compat "
-- from a globally unique namespace.
module Control.Monad.Compat.Repl.Batteries (
module Control.Monad.Compat
) where
import "this" Control.Monad.Compat
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Control/Monad/Compat/Repl/Batteries.hs | haskell | # LANGUAGE PackageImports #
from a globally unique namespace. | # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
| Reexports " Control . . Compat "
module Control.Monad.Compat.Repl.Batteries (
module Control.Monad.Compat
) where
import "this" Control.Monad.Compat
|
9492dac9431598b1eb897c3d1b8222d78476b09a266a28d83cca2e5605737845 | holdybot/holdybot | dev_middleware.clj | (ns parky.dev-middleware
(:require [ring.middleware.reload :refer [wrap-reload]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]))
(defn wrap-dev [handler]
(-> handler
wrap-reload
wrap-error-page
(wrap-exceptions {:app-namespaces ['... | null | https://raw.githubusercontent.com/holdybot/holdybot/e65007a3113c89b3f457b9d966d6bf305983c975/env/dev/clj/parky/dev_middleware.clj | clojure | (ns parky.dev-middleware
(:require [ring.middleware.reload :refer [wrap-reload]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]))
(defn wrap-dev [handler]
(-> handler
wrap-reload
wrap-error-page
(wrap-exceptions {:app-namespaces ['... | |
f620d1aa68dcd716d41e14edf986b56e3767a5c34f1fe8c05d47b9d9021e2781 | melange-re/melange | ext_list.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/2293d9a3afff15b1853571a5fb2d15eb296437ed/jscomp/ext/ext_list.mli | ocaml | * [map_last f xs ]
will pass [true] to [f] for the last element,
[false] otherwise.
For empty list, it returns empty
* [last l]
return the last element
raise if the list is empty
* @unused
* [exclude p l] is the opposite of [filter p l]
*
[rev_map_append f l1 l2]
[map f l1] and reverse it ... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
6224ee32db101e9dedf9f549fd973576259acde787c72fae1a7e409568929523 | vonli/Ext2-for-movitz | special-operators.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 20012000 , 2002 - 2005 ,
Department of Computer Science , University of Tromso , Norway
;;;;
Filename : special-operators.lisp
;;;; Description: Compilation of internal special operators.
Author : ... | null | https://raw.githubusercontent.com/vonli/Ext2-for-movitz/81b6f8e165de3e1ea9cc7d2035b9259af83a6d26/special-operators.lisp | lisp | ------------------------------------------------------------------
Description: Compilation of internal special operators.
------------------------------------------------------------------
(when (eq result-mode :function)
(warn "test-returns: ~S" test-returns))
no ... | Copyright ( C ) 20012000 , 2002 - 2005 ,
Department of Computer Science , University of Tromso , Norway
Filename : special-operators.lisp
Author : < >
Created at : Fri Nov 24 16:22:59 2000
$ I d : special - operators.lisp , v 1.56 2007/02/26 18:25:21 Exp $
(in-package movitz)
... |
5394af00707c509bb061b7c9af9441a86bae0d7207b7c3a4ee721677911aec96 | WormBase/wormbase_rest | microarray_results.clj | (ns rest-api.classes.microarray-results
(:require
[rest-api.classes.microarray-results.widgets.overview :as overview]
[rest-api.classes.microarray-results.widgets.experiments :as experiments]
[rest-api.classes.graphview.widget :as graphview]
[rest-api.routing :as routing]))
(routing/defroutes
{:ent... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/microarray_results.clj | clojure | (ns rest-api.classes.microarray-results
(:require
[rest-api.classes.microarray-results.widgets.overview :as overview]
[rest-api.classes.microarray-results.widgets.experiments :as experiments]
[rest-api.classes.graphview.widget :as graphview]
[rest-api.routing :as routing]))
(routing/defroutes
{:ent... | |
a2c512ad1422ead5a5bba32931f92f121244e5ac54db131f95f2fef567699a23 | avsm/eeww | connection.mli | type t
(** The type of a bidirectional data connection between a local endpoint and a
remote endpoint *)
val create : params:Parameters.t -> Endpoint.t -> t
(** [create ~params endpoint] initialises a new connection to a remote endpoint *)
val set_queue : queue:Dispatch.Queue.t -> t -> unit
(** [set_queue ~queue ... | null | https://raw.githubusercontent.com/avsm/eeww/ab64c5391b67fb3f5b1d3de5e0a5a5cb4c80207b/lib/network/lib/connection.mli | ocaml | * The type of a bidirectional data connection between a local endpoint and a
remote endpoint
* [create ~params endpoint] initialises a new connection to a remote endpoint
* [set_queue ~queue conn] sets the dispatch queue on which all events are
delivered
* [retain t] -- connection objects close the underlyin... | type t
val create : params:Parameters.t -> Endpoint.t -> t
val set_queue : queue:Dispatch.Queue.t -> t -> unit
val retain : t -> unit
val start : t -> unit
val restart : t -> unit
val cancel : t -> unit
val copy_endpoint : t -> Endpoint.t
module State : sig
type t =
| Invalid
| Waiting
| Preparing... |
a8a267c193c994aeb72c7cd038a58d22f1ec760a18edaaaecf0a7341276d88c9 | aib/Project-Euler | euler14.hs | import Control.Arrow
import Data.List
import Data.Ord
-- More accurately called a hailstone sequence, but meh...
collatzSeq :: Integer -> [Integer]
collatzSeq 1 = [1]
collatzSeq n = n : collatzSeq nextN
where
nextN = if (odd n) then 3*n+1 else n `quot` 2
main = print $
maximumBy (comparing snd) $ map (id... | null | https://raw.githubusercontent.com/aib/Project-Euler/a01a142d360f3a30fcea69ab29d4d198160ee921/euler14.hs | haskell | More accurately called a hailstone sequence, but meh... | import Control.Arrow
import Data.List
import Data.Ord
collatzSeq :: Integer -> [Integer]
collatzSeq 1 = [1]
collatzSeq n = n : collatzSeq nextN
where
nextN = if (odd n) then 3*n+1 else n `quot` 2
main = print $
maximumBy (comparing snd) $ map (id &&& length . collatzSeq) [1..999999]
|
00e6147fabe2bfb79acb62912fc5e5791c951915e91226d5c5b4a52fc6a1dada | softwarelanguageslab/maf | R5RS_WeiChenRompf2019_the-little-schemer_ch6-5.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
* swapped branches : 1
; * calls to id fun: 0
(letrec ((atom? (lambda (x)
(if (<change> (not (pair? x)) (not (not (pair? x))))
(not (null? x))
#f)))
(numbered? (lambda... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_WeiChenRompf2019_the-little-schemer_ch6-5.scm | scheme | Changes:
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
* swapped branches : 1
(letrec ((atom? (lambda (x)
(if (<change> (not (pair? x)) (not (not (pair? x))))
(not (null? x))
#f)))
(numbered? (lambda (aexp)
(if ... |
32e44c29948a1a52cd4e26fbccb7816fc9f562dbc49f6f7cef83cf6955287211 | HunterYIboHu/htdp2-solution | ex364-represent-XML.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex364-represent-XML) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construc... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section22-the-commerce-of-XML/ex364-represent-XML.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
An Xexpr.v2 is a list:
– (cons Symbol XL)
– [List-of Xexpr.v2]
– (cons [List-of Attribute] [List-of Xexpr.v2])
(cons Symbol (cons String '()))
constants
<transition from="seen-e" to="seen-f" />
<ul><li><wo... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex364-represent-XML) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
An XL is one of :
An Attribute is a l... |
bc023f67ceb364c209874e6264d51041ccad748d5303d2f8d951d5dc8854d747 | AccelerateHS/accelerate-llvm | Compile.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module : Data.Array.Accelerate.LLVM.PTX.Compile
Copyright : [ 2014 .. 2020 ] The Accelerate Team
-... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/1da65b5951b1410b5e4e1a646fbe1b17bee780a8/accelerate-llvm-ptx/src/Data/Array/Accelerate/LLVM/PTX/Compile.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
|
Module : Data.Array.Accelerate.LLVM.PTX.Compile
License : BSD3
Stability : experimental
# UNPACK #
| Compile an Accelerate expression to object code.
This generates the target code together with a list of each kernel function
defined i... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : [ 2014 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.PTX.Compile (
modul... |
c11b8e65a50ac006de8ceb7b637fded99944b150a6737c65dbb324752c131226 | ivanjovanovic/sicp | e-3.38.scm | Exercise 3.38 . Suppose that , , and share a joint bank
account that initially contains $ 100 . Concurrently , deposits
$ 10 , withdraws $ 20 , and withdraws half the money in the
; account, by executing the following commands:
: ( set ! balance ( + balance 10 ) )
: ( set ! balance ( - balance... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.4/e-3.38.scm | scheme | account, by executing the following commands:
a. List all the different possible values for balance after these
b. What are some other values that could be produced if the system
allows the processes to be interleaved? Draw timing diagrams like the
------------------------------------------------------------
a) T... | Exercise 3.38 . Suppose that , , and share a joint bank
account that initially contains $ 100 . Concurrently , deposits
$ 10 , withdraws $ 20 , and withdraws half the money in the
: ( set ! balance ( + balance 10 ) )
: ( set ! balance ( - balance 20 ) )
: ( set ! balance ( - balance ( / ... |
faca50908c9b02c2fe429d796ebe0232ceb673217388af24270c5ea38c052e37 | huangjs/cl | dgamlm.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/dgamlm.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
2c058412d2a7b159d3bcb86dc4a77aa4ec8bc9f8072575384f2d12f5037dbe7d | mmottl/gpr | cov_lin_ard.ml | File : cov_lin_ard.ml
( C ) 2009-
email :
WWW :
This library 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 2.1 of the License... | null | https://raw.githubusercontent.com/mmottl/gpr/64c4dce01b1779feff85d36d5902afa3b143bdae/src/cov_lin_ard.ml | ocaml | File : cov_lin_ard.ml
( C ) 2009-
email :
WWW :
This library 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 2.1 of the License... | |
f097598fb865d4dcba30e96088ffa61f5e3212f7acd1774ae055bdcbc61ec07f | ocaml-multicore/tezos | fees_storage.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/fees_storage.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
3649899f64edef49281d4cf56966705088fb31aa711531c54244c7e2ff10387e | elaforge/karya | ResponderSync.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
{- | Subset of the responder that handles syncing from Ui.State to the UI.
-}
module Cmd.ResponderSync (Sync, sync) where
import qualified Control.Concurrent.MVar as MVar
import qualified... | null | https://raw.githubusercontent.com/elaforge/karya/c40949df6f9493ed85f16405a8c457e04a9cbfa3/Cmd/ResponderSync.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Subset of the responder that handles syncing from Ui.State to the UI.
| Sync @ui_to@ to the UI.
Returns both UI state and cmd state since verification may clean up the UI
state, and this is where the und... | Copyright 2013
module Cmd.ResponderSync (Sync, sync) where
import qualified Control.Concurrent.MVar as MVar
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Util.Debug as Debug
import qualified Util.Log as Log
import qualified Util.Trace as Trace
import qualified Cmd.Cmd as Cm... |
4fbc0011fb229ee1f58ef4c121ebbc2191684961d2200cce69281d32e4c681c1 | tezos/tezos-mirror | main.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2023 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/43d810498f9ce75a32cd72d7c57bf77c14556bc1/src/bin_testnet_scenarios/main.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2023 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
7a9aa7b4e66338faf39c4e71c8885ecf494862917f3341298ab07df99bf29d8d | dmitryvk/sbcl-win32-threads | alien.impure.lisp | ;;;; This file is for compiler tests which have side effects (e.g.
executing DEFUN ) but which do n't need any special side - effecting
environmental stuff ( e.g. DECLAIM of particular optimization
;;;; settings). Similar tests which *do* expect special settings may
be in files compiler-1.impure.lisp , compiler-2... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/alien.impure.lisp | lisp | This file is for compiler tests which have side effects (e.g.
settings). Similar tests which *do* expect special settings may
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CR... | executing DEFUN ) but which do n't need any special side - effecting
environmental stuff ( e.g. DECLAIM of particular optimization
be in files compiler-1.impure.lisp , compiler-2.impure.lisp , etc .
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU ... |
01ac1bbcb97fa332f8490f1cdbb078c2045191787ed329f3e4e22b361d79adfe | UU-ComputerScience/uhc | ReadP.hs | # LANGUAGE CPP #
# OPTIONS_GHC -XNoImplicitPrelude , CPP #
# LANGUAGE GenericDeriving #
-----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.ReadP
Copyright : ( c ) The University of Glasgow 2002
-- License : BSD-style (see the file lib... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/base/Text/ParserCombinators/ReadP.hs | haskell | ---------------------------------------------------------------------------
|
Module : Text.ParserCombinators.ReadP
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (local universal quantification)
It parses all alterna... | # LANGUAGE CPP #
# OPTIONS_GHC -XNoImplicitPrelude , CPP #
# LANGUAGE GenericDeriving #
Copyright : ( c ) The University of Glasgow 2002
This is a library of parser combinators , originally written by .
module Text.ParserCombinators.ReadP
(
#ifndef __NHC__
: : * - > * ; instance Functor , Monad , Mon... |
58bba20f1202a3b4903d7fa193f0c5212be8d23e0647fbd4446bdcaac53c73b7 | johnlawrenceaspden/hobby-code | naivebayes2.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def new-guy (make-space-bar-patron))
(reduce disj new-guy [:martian :venusian])
#{:tall :green :fat}
(let [m
(*
3055/10002
2439/3056
601/3056
v
(*
6947/10002
884/1737
(probability :green :venusian 1 1) ; 169/579
5629/6948
) ; ... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/naivebayes2.clj | clojure |
169/579
1460520058387/17472902391702 |
(def new-guy (make-space-bar-patron))
(reduce disj new-guy [:martian :venusian])
#{:tall :green :fat}
(let [m
(*
3055/10002
2439/3056
601/3056
v
(*
6947/10002
884/1737
5629/6948
]
[ 0.29015476 0.70984524 ]
70 % chance he 's a venusian too
# { : tall : green : : ... |
6e79cad3d9d47a187cc121ca279c2e28ddd08cc8c378311dd5845b7e098019a5 | 5HT/ant | ListBuilder.mli |
(* A |builder 'a| can be used to create a |list 'a| by successively appending
elements to the end of the list. *)
type builder 'a;
|make ( ) | creates a new list builder . O(1 )
value make : unit -> builder 'a;
(* |is_empty <b>| checks whether the current list is still empty.
O(1), pure *)
value is_empty ... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Tools/ListBuilder.mli | ocaml | A |builder 'a| can be used to create a |list 'a| by successively appending
elements to the end of the list.
|is_empty <b>| checks whether the current list is still empty.
O(1), pure
|add <b> <x>| adds the element <x> at the end of the current list.
|add_first <b> <x>| adds <x> to the front. O(1), non-pure... |
type builder 'a;
|make ( ) | creates a new list builder . O(1 )
value make : unit -> builder 'a;
value is_empty : builder 'a -> bool;
|clear < b>| empties the builder . O(1 ) , non - pure
value clear : builder 'a -> unit;
value add : builder 'a -> 'a -> unit;
value add_first : builder 'a -> 'a -> un... |
82dc5555bb318681339c5992e31ce114535af6bdcac67d2c9d539b0ac47ed232 | jeroanan/rkt-coreutils | tty.rkt | #lang s-exp "util/program/repl-program.rkt"
Copyright 2020
; See COPYING for details
(provide tty)
(require "libc/unistd.rkt")
(define tty
(λ ()
(displayln (get-ttyname))))
| null | https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/repl/tty.rkt | racket | See COPYING for details | #lang s-exp "util/program/repl-program.rkt"
Copyright 2020
(provide tty)
(require "libc/unistd.rkt")
(define tty
(λ ()
(displayln (get-ttyname))))
|
191c6f61b4d057a6e15e85b7fd99fbdf489fcc41fcfc8504763636a2cb2abe4b | project-oak/hafnium-verification | Maven.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/integration/Maven.ml | ocaml | indented so that users may copy it into their projects if they want to
whether we ever found a <profiles> tag
whether there already is an infer profile --this will always be true at the end
closing the root tag but no <profiles> tag found, add
<profiles>[infer profile]</profiles>
do not add <pro... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
2ae933d9d3fce1aa597195dce556267e760d70d92775b7acf7cac8de76e8bb8c | vehicle-lang/vehicle | Token.hs | module Vehicle.Syntax.Parse.Token where
import Data.Coerce (Coercible, coerce)
import Data.Function (on)
import Data.Text (Text)
import Data.Text qualified as T
| Position tokens in BNFC generated grammars are represented by a pair of a
-- position and the text token.
newtype Token = Tk ((Int, Int), Text)
derivi... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/ca99b8da9e5aabde2c94b758bb4141fbe53ebed5/vehicle-syntax/src/Vehicle/Syntax/Parse/Token.hs | haskell | position and the text token.
| Constraint for newtypes which are /position tokens/. Depends on the fact
text@ will be a newtype
wrapping '(Position, Name)', and hence all are coercible to it. This breaks
if the @--text@ option is not passed, or if the token is not marked with the
@position@ keyword.
| Conv... | module Vehicle.Syntax.Parse.Token where
import Data.Coerce (Coercible, coerce)
import Data.Function (on)
import Data.Text (Text)
import Data.Text qualified as T
| Position tokens in BNFC generated grammars are represented by a pair of a
newtype Token = Tk ((Int, Int), Text)
deriving (Eq, Ord, Show, Read)
pattern... |
60413b561b99bc6f3e0dac663f7fa752195790e5f06d47983fa163fe58380250 | jaredly/reason-language-server | lambda.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/lambda.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Misc
open Path
open Asttypes
type... |
fb6b7ba72eafcf8093e3e9fb6e8f4a1905d104a46d35af43c9a91c6fbc96cd01 | levex/wacc | Semantics.hs | module WACC.Semantics where
import qualified Data.Map as Map
import Control.Monad.Except
import Control.Monad.State
import WACC.Parser.Types
import WACC.Semantics.Types
import WACC.Semantics.Syntax
import WACC.Semantics.Semantics
import WACC.Semanti... | null | https://raw.githubusercontent.com/levex/wacc/c77164f0c9aeb53d3d13a0370fdedc448b6009a3/src/WACC/Semantics.hs | haskell | module WACC.Semantics where
import qualified Data.Map as Map
import Control.Monad.Except
import Control.Monad.State
import WACC.Parser.Types
import WACC.Semantics.Types
import WACC.Semantics.Syntax
import WACC.Semantics.Semantics
import WACC.Semanti... | |
07ce09abb449858163f377dd4b214ecbbcabff081cb9bf57d7487f4bbe035dd7 | comtihon/mongodb-erlang | mongo_protocol.erl | -module(mongo_protocol).
-export([
dbcoll/2,
put_message/3,
get_reply/1
]).
-export_type([notice/0, request/0, reply/0]).
-export_type([message/0]).
-export_type([requestid/0]).
-include("mongo_protocol.hrl").
-include_lib("bson/include/bson_binary.hrl").
% A notice is an asynchronous message sent to the server... | null | https://raw.githubusercontent.com/comtihon/mongodb-erlang/713e8bdf677567c6b21ecef8c103afecf824b16f/src/connection/mongo_protocol.erl | erlang | A notice is an asynchronous message sent to the server (no reply expected)
A request is a synchronous message sent to the server (reply expected)
A reply to a request
message id
@doc Concat db and collection name with period (.) in between | -module(mongo_protocol).
-export([
dbcoll/2,
put_message/3,
get_reply/1
]).
-export_type([notice/0, request/0, reply/0]).
-export_type([message/0]).
-export_type([requestid/0]).
-include("mongo_protocol.hrl").
-include_lib("bson/include/bson_binary.hrl").
-type notice() :: #insert{} | #update{} | #delete{} | #k... |
4a3a0e7ec30182146d62332f4bb3e7379905c3257b485e76540b8a6cb81380a8 | sirherrbatka/clusters | docstrings.lisp | (cl:in-package #:clusters.metric)
(docs:define-docs
:formatter docs.ext:rich-aggregating-formatter
(function
euclid
(:description "Calculates the Euclid distance between two simple-arrays of single-float"
:returns "Non-negative-single-float distance."))
(function
average
(:description "Calcula... | null | https://raw.githubusercontent.com/sirherrbatka/clusters/20b8b60005ac8e27d12d05d277b26d8b5ca5c238/source/metric/docstrings.lisp | lisp | (cl:in-package #:clusters.metric)
(docs:define-docs
:formatter docs.ext:rich-aggregating-formatter
(function
euclid
(:description "Calculates the Euclid distance between two simple-arrays of single-float"
:returns "Non-negative-single-float distance."))
(function
average
(:description "Calcula... | |
63ae485724bda9588db87fb5b606465758ed7b1e50105db6f130f68bb9fdda23 | sph-mn/sph-lib | base.scm | (define-module (sph server base))
(use-modules (sph) (sph exception)
((rnrs io simple) #:select (i/o-error?)) ((sph io) #:select (socket-create-bound)))
(export server-socket server-default-port server-exception-handler server-listen-queue-length)
(define server-listen-queue-length 1024)
(define server-default-port... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/server/base.scm | scheme | (define-module (sph server base))
(use-modules (sph) (sph exception)
((rnrs io simple) #:select (i/o-error?)) ((sph io) #:select (socket-create-bound)))
(export server-socket server-default-port server-exception-handler server-listen-queue-length)
(define server-listen-queue-length 1024)
(define server-default-port... | |
97fada2916334d70d0fb63b83f50c2f3da4478c21b3795f12f80bd9198385581 | scrive/haskell-soap | Stream.hs | # LANGUAGE CPP #
-- | Collection of helpers to use with Text.XML.Stream.Parse parsers.
--
-- > let sink = flaxTag "MethodNameResponse"
-- > $ flaxTag "MethodNameResult" $ do
-- > info <- flaxTag "Info" $ do
-- > q <- readTag "quantity"
-- > b <- re... | null | https://raw.githubusercontent.com/scrive/haskell-soap/b237ca8c7d5411e9b5fcf239db02c53df9ba41d4/soap/src/Network/SOAP/Parsing/Stream.hs | haskell | | Collection of helpers to use with Text.XML.Stream.Parse parsers.
> let sink = flaxTag "MethodNameResponse"
> $ flaxTag "MethodNameResult" $ do
> info <- flaxTag "Info" $ do
> q <- readTag "quantity"
> b <- readTag "balance"
> ... | # LANGUAGE CPP #
module Network.SOAP.Parsing.Stream
laxTag, flaxTag
, laxContent, flaxContent
, readContent, readTag
, Sink, Event
) where
#if MIN_VERSION_conduit(1,1,0)
import Control.Monad.Catch (MonadThrow)
#endif
import Data.Conduit
import Data.XML.Types (Event)
import Text.XML (N... |
64576880c918baa7ac72947e336d214e1a566c025836596cc7cbe37ad0185c4d | reenberg/xmonad | ManageHook.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-----------------------------------------------------------------------------
-- |
Module : XMonad . ManageHook
Copyright : ( c ) 2007
-- License : BSD3-style (see LICENSE)
--
-- Maintainer :
-- Stability : unstable
-- Portability : not portable, u... | null | https://raw.githubusercontent.com/reenberg/xmonad/c4f471bfb6ffe70741fe76c3b154f6bae920da7f/XMonad/ManageHook.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Maintainer :
Stability : unstable
Portability : not portable, uses cunning newtype deriving
---------------------------------------------------------------------------
XXX examples requi... | # LANGUAGE GeneralizedNewtypeDeriving #
Module : XMonad . ManageHook
Copyright : ( c ) 2007
An EDSL for ManageHooks
module XMonad.ManageHook where
import Prelude hiding (catch)
import XMonad.Core
import Graphics.X11.Xlib.Extras
import Graphics.X11.Xlib (Display, Window, internAtom, wM_NAME)
imp... |
5fc916b96a3a18bfc7114dae06a3d47171875b034a7ac57078d7757b6840b4ef | basho/casbench | thrift_processor.erl | %%
Licensed to the Apache Software Foundation ( ASF ) under one
%% or more contributor license agreements. See the NOTICE file
%% distributed with this work for additional information
%% regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
%% "License"); you ... | null | https://raw.githubusercontent.com/basho/casbench/90ad7bbb2aebef68e1dcb29ecacd353c11e4ccdd/src/thrift_processor.erl | erlang |
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 require... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(thrift_processor).
-export([init/1]).
-include("thrift_constants.hrl")... |
dc15ef3f557b7e38ce8aae11793183dec74e52dd1e693cf7f8ac36b3beb0598f | tochicool/bitcoin-dca | Types.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUA... | null | https://raw.githubusercontent.com/tochicool/bitcoin-dca/20558f7beb0fff5f622733dad83aa4807ee2a2cc/src/BitcoinDCA/Types.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| A non-negative amount of money
| Will return the previous time from the given starting point where
this schedule would have matched. Returns Nothing if the schedule will
never match. Note that this function is inclusive of the given
time. | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUA... |
b090a80e24d558e543d3657fc212601fdcb0b6c9ef65c245cbed770b7cb29513 | PacktWorkshops/The-Clojure-Workshop | exercise_6_05.clj | (ns packt-clj.chapter-6-tests.exercise-6-05)
(def routes
[[:paris :london 236]
[:paris :frankfurt 121]
[:paris :milan 129]
[:milan :rome 95]
[:milan :barcelona 258]
[:barcelona :madrid 141]
[:madrid :lisbon 127]
[:sevilla :lisbon 138]
[:madrid :sevilla 76]
[:barcelona :sevilla 203]
[:m... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter06/tests/packt-clj.chapter-6-tests/src/packt_clj/chapter_6_tests/exercise_6_05.clj | clojure | (ns packt-clj.chapter-6-tests.exercise-6-05)
(def routes
[[:paris :london 236]
[:paris :frankfurt 121]
[:paris :milan 129]
[:milan :rome 95]
[:milan :barcelona 258]
[:barcelona :madrid 141]
[:madrid :lisbon 127]
[:sevilla :lisbon 138]
[:madrid :sevilla 76]
[:barcelona :sevilla 203]
[:m... | |
f5f7b2a95d1564701953ea827da067c3c7d17410310b7819f74552868628d245 | kakao/hbase-packet-inspector | pcap_test.clj | (ns hbase-packet-inspector.pcap-test
(:require [clojure.test :refer :all]
[hbase-packet-inspector.pcap :as pcap :refer :all])
(:import (java.net InetAddress)
(org.pcap4j.packet AbstractPacket IpV4Packet$Builder IpV4Rfc1349Tos
TcpPacket$Builder UnknownPacket$Build... | null | https://raw.githubusercontent.com/kakao/hbase-packet-inspector/a62ca478c5f59123155377f2a983b7a69dcdd522/test/hbase_packet_inspector/pcap_test.clj | clojure | (ns hbase-packet-inspector.pcap-test
(:require [clojure.test :refer :all]
[hbase-packet-inspector.pcap :as pcap :refer :all])
(:import (java.net InetAddress)
(org.pcap4j.packet AbstractPacket IpV4Packet$Builder IpV4Rfc1349Tos
TcpPacket$Builder UnknownPacket$Build... | |
5356626d5abfe6ca51cf7d548857e8ad00fd51b6cce5366f234e2f9cb79bb2bf | footprintanalytics/footprint-web | prometheus_test.clj | (ns metabase.analytics.prometheus-test
(:require [clj-http.client :as http]
[clojure.set :as set]
[clojure.string :as str]
[clojure.test :refer :all]
[iapetos.registry :as registry]
[metabase.analytics.prometheus :as prometheus]
[metabase.test.fi... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/analytics/prometheus_test.clj | clojure | start another system on the same port | (ns metabase.analytics.prometheus-test
(:require [clj-http.client :as http]
[clojure.set :as set]
[clojure.string :as str]
[clojure.test :refer :all]
[iapetos.registry :as registry]
[metabase.analytics.prometheus :as prometheus]
[metabase.test.fi... |
0309ef30acfedee14622f52c5e006a57cc63f4ba299e71193d7161621a3494db | ggreif/omega | CommentDef.hs | module CommentDef (cLine,cStart,cEnd,nestedC) where
-----------------------------------------------------------
-- In order to do layout, we need to "skip white space"
-- We need combinators that compute white space. Thus we
-- need to know how comments are formed. These constants
-- let us compute a whitespace parser... | null | https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/src/CommentDef.hs | haskell | ---------------------------------------------------------
In order to do layout, we need to "skip white space"
We need combinators that compute white space. Thus we
need to know how comments are formed. These constants
let us compute a whitespace parser. They fields in
Haskell Style
(commentStart tokenDef)
(comm... | module CommentDef (cLine,cStart,cEnd,nestedC) where
TokenDef are derived from these definitions
( )
|
62a3e1f142e617cf280044e4454ab20aac3b52029597b2830ce38b52640444a8 | nathell/lithium | closure.clj | (ns lithium.compiler.closure
(:require [lithium.compiler.ast :as ast]))
(defn free-variable-analysis [ast]
(ast/walk
(assoc ast :bound-vars [])
(fn [ast]
(ast/match ast
ast/let-like [bound-vars bindings body]
(let [bindings (loop [acc []
... | null | https://raw.githubusercontent.com/nathell/lithium/644604ae50eb5495e227ed6f1e32744020e86e2d/src/lithium/compiler/closure.clj | clojure | otherwise | (ns lithium.compiler.closure
(:require [lithium.compiler.ast :as ast]))
(defn free-variable-analysis [ast]
(ast/walk
(assoc ast :bound-vars [])
(fn [ast]
(ast/match ast
ast/let-like [bound-vars bindings body]
(let [bindings (loop [acc []
... |
34ed44ede86b147b3353a63a25690cca72e3c9d2a9dfe059022764431b092fb2 | exercism/common-lisp | example.lisp | (defpackage :proverb
(:use :cl)
(:export :recite))
(in-package :proverb)
(defun recite (strings)
(if strings
(let* ((interleaved (apply #'append (mapcar #'list strings strings)))
(without-ends (cdr (butlast interleaved)))
(proverb-bulk (format nil "~{For want of a ~A the ~A was lost.~%... | null | https://raw.githubusercontent.com/exercism/common-lisp/61882db3d96ccfd73bf14281c4f47be199de03fb/exercises/practice/proverb/.meta/example.lisp | lisp | (defpackage :proverb
(:use :cl)
(:export :recite))
(in-package :proverb)
(defun recite (strings)
(if strings
(let* ((interleaved (apply #'append (mapcar #'list strings strings)))
(without-ends (cdr (butlast interleaved)))
(proverb-bulk (format nil "~{For want of a ~A the ~A was lost.~%... | |
6f3ddb226f22f23d1babe0e91cb7d9eccad36505538a251c7be328edf4e8a11f | sbcl/sbcl | heapwalk.impure.lisp |
(defun mul (x y) (declare (sb-vm:signed-word x y)) (* x y))
(compile 'mul)
(defun manymul (n &aux res)
(dotimes (i n res)
(setq res (mul (floor (- (expt 2 (- sb-vm:n-word-bits 2))) 1000)
(+ i 1000)))))
(compile 'manymul)
(defun walk ()
(let ((v (make-array 1000))
(ct 0))
(sb-vm... | null | https://raw.githubusercontent.com/sbcl/sbcl/9f926c257fe39ef0613be77f4aff30f071655873/tests/heapwalk.impure.lisp | lisp | As a precondition to asserting that heap walking did not
visit an alleged cons that is a filler object,
assert that there is the telltale pattern (if applicable).
Granted it's not a great idea to assume that anything in the heap
can be printed, but this test was a fairly easy way to get
"Unhandled memory fault a... |
(defun mul (x y) (declare (sb-vm:signed-word x y)) (* x y))
(compile 'mul)
(defun manymul (n &aux res)
(dotimes (i n res)
(setq res (mul (floor (- (expt 2 (- sb-vm:n-word-bits 2))) 1000)
(+ i 1000)))))
(compile 'manymul)
(defun walk ()
(let ((v (make-array 1000))
(ct 0))
(sb-vm... |
bdf8c7ba1c4a45cf8eb87ab66a11808cde0e0da41482d6aa7345dc2c8525ebed | lorepub/moot | Foundation.hs | # OPTIONS_GHC -fno - warn - orphans #
module Foundation where
import Import.NoFoundation
import Control.Monad.Logger (LogSource)
import Database.Persist.Sql (runSqlPool)
import Text.Blaze.Html.Renderer.Text (renderHtml)
import Text.Jasmine (minifym)
import Yesod.Core.Types (Logger)
import Yesod.Default.U... | null | https://raw.githubusercontent.com/lorepub/moot/793c72d046762ec01a250416667e041b35eec7f8/src/Foundation.hs | haskell | ^ The route the user is visiting.
^ Whether or not this is a "write" request.
^ The file extension
^ The MIME content type
^ The contents of the file
How to run database actions. | # OPTIONS_GHC -fno - warn - orphans #
module Foundation where
import Import.NoFoundation
import Control.Monad.Logger (LogSource)
import Database.Persist.Sql (runSqlPool)
import Text.Blaze.Html.Renderer.Text (renderHtml)
import Text.Jasmine (minifym)
import Yesod.Core.Types (Logger)
import Yesod.Default.U... |
4d9eeb4949487abe702e0a6660d4e916df267294ad5b02e2d030cfb41cbe406b | kadena-io/chainweaver | InMemoryStorage.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeApplications #
module Frontend.Storage.InMemoryStorage where
import Control.Monad.Free (iterM)
import Control.Monad.Reader
import Data.Aeson (FromJSON, ToJSON, eitherDecode)
imp... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/3ea0bb317c07ddf954d4ebf24b33d1be7d5f9c45/frontend/tests/Frontend/Storage/InMemoryStorage.hs | haskell | This function *should* be cool because it ought to allow us to drop in a desktop storage directory
into the folder for a given version and then source those files into the inmem store for the tests
though it doesn't need to for its own needs). | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeApplications #
module Frontend.Storage.InMemoryStorage where
import Control.Monad.Free (iterM)
import Control.Monad.Reader
import Data.Aeson (FromJSON, ToJSON, eitherDecode)
imp... |
db4b5c34384a9813af876b74adb77f356cb57dc880194f2c7a53e2a3fe314e31 | racket/expeditor | terminal.rkt | #lang racket/base
(require ffi/unsafe/vm
'#%terminal)
;; See "../main.rkt"
(provide
(protect-out init-term
$ee-read-char/blocking
$ee-write-char
char-width
set-color
ee-flush
get-screen-size
raw-mode
... | null | https://raw.githubusercontent.com/racket/expeditor/9b2d54a97a4f17a75d3198630a978b3eb2b4d1af/expeditor-lib/private/terminal.rkt | racket | See "../main.rkt"
`terminal-char-width` can't report the right answer, but
`terminal-write-char` can report information about how
the cursor advanced.
-128 mean "unknown"
we're only set up to handle characters
that are non-negative sized, so we don't
handle control characters | #lang racket/base
(require ffi/unsafe/vm
'#%terminal)
(provide
(protect-out init-term
$ee-read-char/blocking
$ee-write-char
char-width
set-color
ee-flush
get-screen-size
raw-mode
no-raw-mode
... |
8560a845b2ab08938b0b2b1fd0ed74f9aa79ec10cbd2290b02adef328cdd8f03 | florabtw/soundoftext-haskell | Languages.hs | module Languages
( lookupLanguage
, languagePairs
) where
import Data.Maybe (fromJust, isJust)
import qualified Data.Map as Map
languagePairs :: [(String,String)]
languagePairs = Map.assocs languageMap
lookupLanguage :: String -> String
lookupLanguage l
| isJust mLang = fromJust mLang
| otherwise = "Unkno... | null | https://raw.githubusercontent.com/florabtw/soundoftext-haskell/46c1a5ab378809ac2e1c5e005057d495a08d2887/src/Languages.hs | haskell | module Languages
( lookupLanguage
, languagePairs
) where
import Data.Maybe (fromJust, isJust)
import qualified Data.Map as Map
languagePairs :: [(String,String)]
languagePairs = Map.assocs languageMap
lookupLanguage :: String -> String
lookupLanguage l
| isJust mLang = fromJust mLang
| otherwise = "Unkno... | |
ca542e1a2ccfe1b3cc4c871aa09002906e8174a02018490aebe97a33ea3a9b29 | wireapp/wire-server | AccessToken_user.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessToken_user.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Test.Wire.API.Golden.Gene... |
ca9a4a460b76b52a5a49e0a8d2761149bd22c3c93ded4f957aca2bdf42e8b49b | xapi-project/xenopsd | interface.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xenopsd/f4da21a4ead7c6a7082af5ec32f778faf368cf1c/lib/interface.ml | ocaml | The network manipulation scripts need to find the VM metadata given only an
interface name (e.g. "tapX.Y" or "fooUUID"?) |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
9f98c0a78dc8e4ef08fa0cd9aa48605fff49b7d329077eeb6797d859ccfb37ee | dbuenzli/serialk | serialk_sexp.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2019 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/serialk/2650979af5ed3a8b55e259088acd618a61061856/src/serialk_sexp.mli | ocaml | * S-expression definitions and codec.
* The type for formatting functions.
* The type for source text locations.
* [loc_nil] is a source text location for non-parsed s-expressions.
* [pp_loc] is {!Tloc.pp}.
* The type for meta information about atoms.
* The type for meta information about lists.
* [a_meta_nil] i... | ---------------------------------------------------------------------------
Copyright ( c ) 2019 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
99550644df50e98c1f69c5cb98af2574f5778a6b042bcbb3c7f2148232aed0b8 | eryx67/vk-api-example | Store.hs | {-# LANGUAGE OverloadedStrings, RecordWildCards, TypeFamilies #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
-- |
module VK.App.Widgets.AudioPlayer.Store where
import Control.Concurrent
import Control.Error.Util
import Control.Monad (void, liftM, unless)
import ... | null | https://raw.githubusercontent.com/eryx67/vk-api-example/4ce634e2f72cf0ab6ef3b80387ad489de9d8c0ee/src/VK/App/Widgets/AudioPlayer/Store.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards, TypeFamilies #
# LANGUAGE DeriveAnyClass #
|
import Debug.Trace | # LANGUAGE DeriveGeneric #
module VK.App.Widgets.AudioPlayer.Store where
import Control.Concurrent
import Control.Error.Util
import Control.Monad (void, liftM, unless)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Maybe
import Data.Fr... |
83a3e847f5cd3397ea64730fa8953bab6140361dff25ac1dbfe3030f895ae9d4 | sdiehl/elliptic-curve | Curve41417.hs | module Data.Curve.Edwards.Curve41417
( module Data.Curve.Edwards
, Point(..)
* curve
, module Data.Curve.Edwards.Curve41417
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Edwards
----------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Edwards/Curve41417.hs | haskell | -----------------------------------------------------------------------------
Types
-----------------------------------------------------------------------------
| Curve41417 curve.
# INLINABLE a_ #
# INLINABLE d_ #
# INLINABLE h_ #
| Affine Curve41417 curve point.
| Projective Curve41417 point.
-------------------... | module Data.Curve.Edwards.Curve41417
( module Data.Curve.Edwards
, Point(..)
* curve
, module Data.Curve.Edwards.Curve41417
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Edwards
data Curve41417
| Field of points of curve .
type Fq = Prime Q
type Q =... |
0a4352c0beb3a08e2f322363eb85ab3e1e5a2b2d233e1dd69de1e9bf9effb2fe | acorrenson/modulus | modulus.ml | open Modulus_lib.Loop
let () =
if Array.length Sys.argv > 1 then
if Sys.argv.(1) = "-i" then
ignore (repl ())
else
ignore (batch Sys.argv.(1))
else begin
Printf.eprintf "usage: %s ( -i | <file> )\n" Sys.argv.(0);
flush stderr;
exit 1
end | null | https://raw.githubusercontent.com/acorrenson/modulus/5a5de3b5a68d320adfe1848c05668a2da7024532/bin/modulus.ml | ocaml | open Modulus_lib.Loop
let () =
if Array.length Sys.argv > 1 then
if Sys.argv.(1) = "-i" then
ignore (repl ())
else
ignore (batch Sys.argv.(1))
else begin
Printf.eprintf "usage: %s ( -i | <file> )\n" Sys.argv.(0);
flush stderr;
exit 1
end | |
02cf4731cebad27df2a37c125622ef82c867e5e3ffab194dc86fcb82681b004f | open-company/open-company-auth | email_auth.clj | (ns oc.auth.representations.email-auth
"Resource representation functions for email authentication."
(:require [oc.lib.hateoas :as hateoas]
[oc.lib.jwt :as jwt]
[oc.auth.representations.media-types :as mt]))
(def auth-link (hateoas/link-map "authenticate"
... | null | https://raw.githubusercontent.com/open-company/open-company-auth/79275bd3b877e70048a80960d7fa2d14be0abfe9/src/oc/auth/representations/email_auth.clj | clojure | (ns oc.auth.representations.email-auth
"Resource representation functions for email authentication."
(:require [oc.lib.hateoas :as hateoas]
[oc.lib.jwt :as jwt]
[oc.auth.representations.media-types :as mt]))
(def auth-link (hateoas/link-map "authenticate"
... | |
77f09d4302355c7692f379d453c04a801479017145c31906992b1537d35253e7 | runeanielsen/typesense-clj | api.clj | (ns typesense.api
(:require [typesense.util :as util]
[clojure.data.json :as json]))
(def ^:private api-key-header-name "X-TYPESENSE-API-KEY")
(defn- collection-uri
"Returns the full collection uri resource path."
([uri]
(str uri "/collections"))
([uri collection-name]
(str (collection-uri u... | null | https://raw.githubusercontent.com/runeanielsen/typesense-clj/94e82f5951a0693bdbad4c20dde6fb07b6911d1a/src/typesense/api.clj | clojure | (ns typesense.api
(:require [typesense.util :as util]
[clojure.data.json :as json]))
(def ^:private api-key-header-name "X-TYPESENSE-API-KEY")
(defn- collection-uri
"Returns the full collection uri resource path."
([uri]
(str uri "/collections"))
([uri collection-name]
(str (collection-uri u... | |
0cc4fd645ea62edae818f034aae50f784fa83ab932dc52894d30baf61b60abb8 | cl-stream/cl-stream | sequence-input-stream.lisp | ;;
;; cl-stream - Stream classes for Common Lisp
;;
;; Copyright 2017,2018 Thomas de Grivel <>
;;
;; 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.... | null | https://raw.githubusercontent.com/cl-stream/cl-stream/8c4888591cd4ef9062c6c066326acef1415460f1/sequence-input-stream.lisp | lisp |
cl-stream - Stream classes for Common Lisp
Copyright 2017,2018 Thomas de Grivel <>
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.
WITH REGARD ... | 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
(in-package :cl-stream)
(defclass sequence-input-stream (buffered-input-stream)
((open... |
5a5c3f660f667438c98f1e2263fbcb84f96f9312c02bc3d72451559c270190ee | binsec/binsec | htx_main.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/examples/htmlexport/htx_main.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
7697a8b2125f94001337430de27f513db2408ffabfd58680ee4b9f7df8127a7f | sulami/spielwiese | 19.hs | module Main where
import Control.Arrow ((&&&))
import Data.List (groupBy, isPrefixOf, nub)
import Data.Function (on)
conc :: [(String, String)] -> (String, [String])
conc l = (fst (head l), map snd l)
walk :: ([a] -> [a] -> b) -> [a] -> [b]
walk f = walk' f []
where
walk' :: ([a] -> [a] -> b) -> [a] -> [a] -> ... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/advent15/19.hs | haskell | module Main where
import Control.Arrow ((&&&))
import Data.List (groupBy, isPrefixOf, nub)
import Data.Function (on)
conc :: [(String, String)] -> (String, [String])
conc l = (fst (head l), map snd l)
walk :: ([a] -> [a] -> b) -> [a] -> [b]
walk f = walk' f []
where
walk' :: ([a] -> [a] -> b) -> [a] -> [a] -> ... | |
fb2e1354c647c52c95e2ec3a1876a797eb18d2671d5193b7d5cb9edde457f172 | cosmicoptima/dictator | NPCs.hs | # LANGUAGE DeriveGeneric #
module Game.NPCs
( npcSpeak
, randomNPCSpeakGroup
, randomNPCConversation
, createNPC
) where
import Relude hiding ( many )
import Game
import Game.Data
import Utils
import Utils.DictM
import Util... | null | https://raw.githubusercontent.com/cosmicoptima/dictator/f3c575db4658820400f11297346f51ffaee75300/src/Game/NPCs.hs | haskell | prompt =
T.concat (map renderMessage messages) <> thought <> npc <> " says:" | # LANGUAGE DeriveGeneric #
module Game.NPCs
( npcSpeak
, randomNPCSpeakGroup
, randomNPCConversation
, createNPC
) where
import Relude hiding ( many )
import Game
import Game.Data
import Utils
import Utils.DictM
import Util... |
29fba83dc118272d9c9779d656835fa0f5360f7d182c0cd4b2cd5a0fce3bcf0c | roman01la/shapy | toolbar.cljs | (ns shapy.components.toolbar
(:require [rum.core :as rum]
[shapy.components.icons :refer [LineIcon RectIcon OvalIcon]]))
(def editor-styles
{:background "#fff"
:borderBottom "1px solid #bfbfbf"
:padding "8px 16px"
:display "flex"
:justifyContent "flex-start"
:zIndex 1})
(def section-sty... | null | https://raw.githubusercontent.com/roman01la/shapy/af94ed921f9cc9349f11fb931bde563bdb900531/src/shapy/components/toolbar.cljs | clojure | (ns shapy.components.toolbar
(:require [rum.core :as rum]
[shapy.components.icons :refer [LineIcon RectIcon OvalIcon]]))
(def editor-styles
{:background "#fff"
:borderBottom "1px solid #bfbfbf"
:padding "8px 16px"
:display "flex"
:justifyContent "flex-start"
:zIndex 1})
(def section-sty... | |
30f88e5b27bae7aef8162d5ff1d253905d37b114fa812ef12f04cf3222cbe863 | hammerlab/genspio | vm_tester.ml | open! Base
module Filename = Caml.Filename
let ( // ) = Filename.concat
module Shell_script = struct
type t = {name: string; content: unit Genspio.EDSL.t; dependencies: t list}
open Genspio.EDSL
let make ?(dependencies = []) name content = {name; content; dependencies}
let sanitize_name n =
let m =
... | null | https://raw.githubusercontent.com/hammerlab/genspio/edb371177521a003c0367c15a96779edc71f3e02/src/examples/vm_tester.ml | ocaml | See
qemu-system-x86_64 -m 2048 \
-hda FreeBSD-11.0-RELEASE-amd64.qcow2 -enable-kvm \
-netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7722-:22 \
-device e1000,netdev=mynet0
; "-M"
* ; machine
; "-enable-kvm" → requires `sudo`?
~name:(Fmt.str "Killing... | open! Base
module Filename = Caml.Filename
let ( // ) = Filename.concat
module Shell_script = struct
type t = {name: string; content: unit Genspio.EDSL.t; dependencies: t list}
open Genspio.EDSL
let make ?(dependencies = []) name content = {name; content; dependencies}
let sanitize_name n =
let m =
... |
595ffa152d18417eae0e52d7acffd1e015cbe27b1f7951bdb3697b26a401a204 | kostyushkin/erlworld | color.erl |
%%%
Color
%%%
@author
%%% @doc
%%% Defines how to create colours and how to retrieve the values from colours.
%%% Colours are stored as a tuple in the form {red, green, blue, alpha}. All
%%% components are floats.
%%%
%%% By using this file it allows the user to abstract away how they car... | null | https://raw.githubusercontent.com/kostyushkin/erlworld/1c55c9eb0d12db9824144b4ff7535960c53e35c8/src/color.erl | erlang |
@doc
Defines how to create colours and how to retrieve the values from colours.
Colours are stored as a tuple in the form {red, green, blue, alpha}. All
components are floats.
By using this file it allows the user to abstract away how they care about
colours.
It also contains common colours for you... |
Color
@author
-module(color).
-export([ new/3, new/4 ]).
-export([ get_red/1, get_green/1, get_blue/1, get_alpha/1 ]).
-export([
white/0, grey/0, black/0,
red/0, green/0, blue/0,
yellow/0, orange/0,
pink/0, purple/0
]).
@doc Creates and returns ... |
0c46edbc89992ed3503e62e791caa1833ee885747f0934d89a4b878eb5fe8472 | realworldocaml/book | nativeint.ml | * [ count_leading_zeros n ] returns the number of most - significant
zero bits before the most significant set bit in [ n ] .
If [ n ] is 0 , the result is the number of bits in [ n ] ,
that is 32 or 64 , depending on the target .
zero bits before the most significant set bit in [n].
If [n] is... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ocaml_intrinsics/src/nativeint.ml | ocaml | * [ count_leading_zeros n ] returns the number of most - significant
zero bits before the most significant set bit in [ n ] .
If [ n ] is 0 , the result is the number of bits in [ n ] ,
that is 32 or 64 , depending on the target .
zero bits before the most significant set bit in [n].
If [n] is... | |
ffd0ec72b67ec7bd3dd73ebb83612adcde32b2275e7559525cdaea2d8d93f6a2 | dbuenzli/stdlib-utf | utf_x_dfa.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/dbuenzli/stdlib-utf/9e931944697ff6b48a54a10b425a9acdbd4ccb40/utf_x_dfa.ml | ocaml | ************************************************************************
OCaml
The... | Copyright 2021 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Uchar = Utf_uchar
module Bytes = struct
include Bytes
external unsafe_set_uint8 : t -> int -> int -> unit = "%bytes_unsafe_set"
external unsafe_get_uint8 :... |
068ffbd36e8d3e6afa55816c2ae528f59a541e15de9dc30540cd381f0c3d908f | tek/ribosome | NewOptions.hs | module Ribosome.App.NewOptions where
import Path (Dir, Path, Rel, parseRelDir)
import Rainbow (chunk, fore, magenta)
import qualified Ribosome.App.Data as Data
import Ribosome.App.Data (FlakeUrl, NewProject (NewProject))
import Ribosome.App.Error (RainbowError, appError)
import Ribosome.App.Options (NewOptions)
impor... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/app/lib/Ribosome/App/NewOptions.hs | haskell | module Ribosome.App.NewOptions where
import Path (Dir, Path, Rel, parseRelDir)
import Rainbow (chunk, fore, magenta)
import qualified Ribosome.App.Data as Data
import Ribosome.App.Data (FlakeUrl, NewProject (NewProject))
import Ribosome.App.Error (RainbowError, appError)
import Ribosome.App.Options (NewOptions)
impor... | |
dad9beac486ea458e578914e7a989f46713a4f019a901339ec33b112670c04ba | OCADml/OCADml | pathMatch.ml | module type CUTPOINT_DEPS = sig
type vec
type line
val centroid : ?eps:float -> vec list -> vec
val closest_tangent : ?closed:bool -> ?offset:vec -> line:line -> vec list -> int * line
end
module type S = sig
type vec
(** [distance_match a b]
If the closed polygonal paths [a] and [b] have incomme... | null | https://raw.githubusercontent.com/OCADml/OCADml/ceed2bfce640667580f7286b46864a69cdc1d4d7/lib/pathMatch.ml | ocaml | * [distance_match a b]
If the closed polygonal paths [a] and [b] have incommensurate lengths,
points on the smaller path are duplicated and the larger path is shifted
(list rotated) in such a way that the total length of the edges between the
associated vertices (same index/position) is min... | module type CUTPOINT_DEPS = sig
type vec
type line
val centroid : ?eps:float -> vec list -> vec
val closest_tangent : ?closed:bool -> ?offset:vec -> line:line -> vec list -> int * line
end
module type S = sig
type vec
val distance_match : vec list -> vec list -> vec list * vec list
* [ aligned_distance_... |
d557c7ebd917cd85efb8cddbfbd912620d69421567c12eeeb0a99ced05f735ad | cedlemo/OCaml-GLib2 | test_functions.ml |
* Copyright 2017 - 2018 ,
* This file is part of .
*
* OCaml - GLib2 is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* any later version .
... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GLib2/084a148faa4f18d0ddf78315d57c1d623aa9522c/tests/test_functions.ml | ocaml |
* Copyright 2017 - 2018 ,
* This file is part of .
*
* OCaml - GLib2 is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* any later version .
... | |
9eef3c7421c3a078653e045d00c87dd596ed15f0f255fb98836d316da537e8bd | mikeizbicki/subhask | BloomFilter.hs | # OPTIONS_GHC -fno - warn - missing - methods #
module SubHask.Compatibility.BloomFilter
( BloomFilter
)
where
import SubHask.Algebra
import SubHask.Category
import SubHask.Internal.Prelude
import qualified Data.BloomFilter as BF
newtype BloomFilter (n::Nat) a = BloomFilter (BF.Bloom a)
mkMutable [t| f... | null | https://raw.githubusercontent.com/mikeizbicki/subhask/f53fd8f465747681c88276c7dabe3646fbdf7d50/src/SubHask/Compatibility/BloomFilter.hs | haskell | formula for number of elements in a bloom filter
-bloom-filters
c = log(z / N) / ((h * log(1 - 1 / N)) | # OPTIONS_GHC -fno - warn - missing - methods #
module SubHask.Compatibility.BloomFilter
( BloomFilter
)
where
import SubHask.Algebra
import SubHask.Category
import SubHask.Internal.Prelude
import qualified Data.BloomFilter as BF
newtype BloomFilter (n::Nat) a = BloomFilter (BF.Bloom a)
mkMutable [t| f... |
6b0b2f5ae60bb41ec625af8daa0fb48c885bb3ada1e79bb12caffea2114f5b7f | facebookarchive/pfff | interaction_codemap.ml |
*
* Copyright ( C ) 2013 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/web/code_map/interaction_codemap.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Entry point
********************************************************************... |
*
* Copyright ( C ) 2013 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... |
68b5f744396d94bc94f26a05fbe70026ea464689192e931103bd953344be2924 | johnlawrenceaspden/hobby-code | numericalintegrationVI.clj | ;; Numerical Integration: Better Refinements?
;; Here are some very simple functions which we might want to test integration
;; methods on:
(defn square [x] (* x x))
(defn sine [x] (Math/sin x))
(defn step [x] (if (< x 1/2) 0.0 1.0))
(defn inverse [x] (/ x))
;; Here are some Newton-Cotes formulae for approxima... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/numericalintegrationVI.clj | clojure | Numerical Integration: Better Refinements?
Here are some very simple functions which we might want to test integration
methods on:
Here are some Newton-Cotes formulae for approximate integration:
We can use any of these rules to get estimate of the integral of a function over an interval:
If we halve the interval... |
(defn square [x] (* x x))
(defn sine [x] (Math/sin x))
(defn step [x] (if (< x 1/2) 0.0 1.0))
(defn inverse [x] (/ x))
(defn trapezium-rule [f a b]
(* 1/2 (- b a) (+ (f a) (f b))))
(defn simpson-rule [f a b]
(let [midpoint (+ a (/ (- b a) 2))]
(* 1/6 (- b a) (+ (f a) (* 4 (f midpoint)) (f b)))))
(de... |
33ebfb78bac0b0368b46af19b60de0fa3a9be91d6c1a3e93e185676a7537168e | damn/cdq | ingame_loop.clj | (ns game.components.ingame-loop
(:use
[utils.core :only (find-first)]
game.components.core))
(def ^:private ids (atom #{}))
(defentity ingame-loop-comp [& args]
(create-comp :ingame-loop-entity
{:init #(swap! ids conj (get-id %))
:destruct #(swap! ids disj (get-id %))})
... | null | https://raw.githubusercontent.com/damn/cdq/5093dbdba91c445e403f53ce96ead05d5ed8262b/src/game/components/ingame_loop.clj | clojure | (ns game.components.ingame-loop
(:use
[utils.core :only (find-first)]
game.components.core))
(def ^:private ids (atom #{}))
(defentity ingame-loop-comp [& args]
(create-comp :ingame-loop-entity
{:init #(swap! ids conj (get-id %))
:destruct #(swap! ids disj (get-id %))})
... | |
a3b3939ac1b9942b5202e49ce4a52116a5298d054fc2d014241b361d8ba71bd8 | camlp5/camlp5 | pretty.ml | (* camlp5r *)
(* pretty.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "pa_macro.cmo";
open Versdep;
exception GiveUp;
value line_length = ref 78;
value horiz_ctx = ref False;
value utf8_string_length s =
loop 0 0 where rec loop i len =
if i = String.length s then len
else
let c = Char.code s.[i... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/lib/pretty.ml | ocaml | camlp5r
pretty.ml,v | Copyright ( c ) INRIA 2007 - 2017
#load "pa_macro.cmo";
open Versdep;
exception GiveUp;
value line_length = ref 78;
value horiz_ctx = ref False;
value utf8_string_length s =
loop 0 0 where rec loop i len =
if i = String.length s then len
else
let c = Char.code s.[i] in
if c < 0b1000_0000 ||... |
843743c53ead680fe0a29feab4286c24b0361dd02288d83d166f5a5c3ced2721 | marigold-dev/deku | wasm_vm_tests.ml | let () =
let open Alcotest in
run "Wasm-vm" ~and_exit:false ~verbose:true
[
( "Basic Vm tests",
[
test_case "Originate/invoke increment" `Quick Increment_test.test;
test_case "Originate/invoke tickets" `Quick Ticket_test.test;
Decookie.decookie_test ;
] );
]
| null | https://raw.githubusercontent.com/marigold-dev/deku/152d5bbe3c30912aa28b5ab810e03216e8c22710/deku-c/wasm-vm-ocaml/tests/wasm_vm_tests.ml | ocaml | let () =
let open Alcotest in
run "Wasm-vm" ~and_exit:false ~verbose:true
[
( "Basic Vm tests",
[
test_case "Originate/invoke increment" `Quick Increment_test.test;
test_case "Originate/invoke tickets" `Quick Ticket_test.test;
Decookie.decookie_test ;
] );
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.