_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
7f4ce79312e9964798644efe5829fead5bdc9f2680d17d055a5e475f418cb6c1
iu-parfunc/HSBencher
benchmark.hs
import HSBencher import HSBencher . Backend . Fusion ( defaultFusionPlugin ) import HSBencher.Backend.Dribble (defaultDribblePlugin) import System.Environment (getEnvironment) import System.Directory (setCurrentDirectory, getDirectoryContents, getCurrentDirectory) import System.IO.Unsafe (unsafePerformIO) im...
null
https://raw.githubusercontent.com/iu-parfunc/HSBencher/76782b75b3a4b276c45a2c159e0b4cb6bd8a2360/hsbencher/example/make_and_ghc/benchmark.hs
haskell
Hack to deal with running from cabal: SomePlugin defaultFusionPlugin : No benchmark configuration space. Does nothing.
import HSBencher import HSBencher . Backend . Fusion ( defaultFusionPlugin ) import HSBencher.Backend.Dribble (defaultDribblePlugin) import System.Environment (getEnvironment) import System.Directory (setCurrentDirectory, getDirectoryContents, getCurrentDirectory) import System.IO.Unsafe (unsafePerformIO) im...
20c027fbe53da3193c608a331593638702dc5ea787e340518291e0259d04e46d
soulomoon/SICP
Exercise3.65.scm
Exercise 3.65 : Use the series ; ln2=1−12+13−14+… ; ln⁡2=1−12+13−14+… to compute three sequences of approximations to the natural logarithm of 2 , in the same way we did above for ππ . How rapidly do these sequences converge ? (load "/home/soulomoon/git/SICP/Chapter3/stream.scm") (define (ln2-summands n) (cons-s...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter3/Exercise3.65.scm
scheme
ln2=1−12+13−14+… ln⁡2=1−12+13−14+… Sₙ₋₁ Sₙ Sₙ₊₁ memory limit : 128 MB . 0.7456349206349207 0.6931471805599454'done >
Exercise 3.65 : Use the series to compute three sequences of approximations to the natural logarithm of 2 , in the same way we did above for ππ . How rapidly do these sequences converge ? (load "/home/soulomoon/git/SICP/Chapter3/stream.scm") (define (ln2-summands n) (cons-stream (/ 1.0 n) (stream-map - (l...
ada2a1ecab25e3e8b9cedf4818c35bfc91a4695e8a8c8091a667cf26c53606f7
archaelus/tsung
ts_proxy_recorder.erl
%%% IDEALX S.A.S. 2003 - 2005 %%% @author < > %%% @doc Record request by calling the plugin involved @since 1.0.beta1 , 22 Dec 2003 by %%% @version {@version} %%% @end %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
null
https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/tsung_recorder/ts_proxy_recorder.erl
erlang
@doc Record request by calling the plugin involved @version {@version} @end This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied war...
IDEALX S.A.S. 2003 - 2005 @author < > @since 1.0.beta1 , 22 Dec 2003 by it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License Foundation , Inc...
2a9bd537458dc4e7ab53fbe255841fc48b12771726d56fa5b4b0c18badc5c16f
ananthakumaran/eopl
25.clj
( exists ? pred lst ) returns # t if any element of lst satisfies pred , ;; and returns #f otherwise (ns eopl.chap-1.25 (:use clojure.test)) (defn exists? [pred lst] (loop [left lst] (if (empty? left) false (if (pred (first left)) true (recur (rest left)))))) (deftest exists?-te...
null
https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_1/25.clj
clojure
and returns #f otherwise
( exists ? pred lst ) returns # t if any element of lst satisfies pred , (ns eopl.chap-1.25 (:use clojure.test)) (defn exists? [pred lst] (loop [left lst] (if (empty? left) false (if (pred (first left)) true (recur (rest left)))))) (deftest exists?-test (is (= (exists? number?...
62c167d10eb24e629c54f25a1bb67ae8a4037cbbdd6fd87c011c444867abe06d
erlang/otp
httpc_proxy_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2012 - 2023 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/inets/test/httpc_proxy_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 2012 - 2023 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , ts : run(inets , httpc_proxy_SUITE , [ batch ] ) . -module(httpc_proxy_SUITE). -include_lib("common_test/include...
27d9e8893da95dfb8ebd52799457dc8ca11394d6fcb03fb6c72a882ecca4ce7f
den1k/vimsical
snapshot_store.clj
(ns vimsical.backend.components.snapshot-store (:require [clojure.spec.alpha :as s] [com.stuartsierra.component :as cp] [vimsical.backend.adapters.cassandra :as cassandra] [vimsical.backend.adapters.cassandra.protocol :as cassandra.protocol] [vimsical.backend.adapters.cassandra.util :as cassandra.util]...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/backend/vimsical/backend/components/snapshot_store.clj
clojure
* Queries * Commands * Results * Component Idempotent operation, useful to do this on startup so we don't have to worry about installing the schema in ops or testing
(ns vimsical.backend.components.snapshot-store (:require [clojure.spec.alpha :as s] [com.stuartsierra.component :as cp] [vimsical.backend.adapters.cassandra :as cassandra] [vimsical.backend.adapters.cassandra.protocol :as cassandra.protocol] [vimsical.backend.adapters.cassandra.util :as cassandra.util]...
d296ede6072264a9f2ebeadb9bdecb333399feba78acc03ff7fc8fc6dfb84243
naoto-ogawa/h-xproto-mysql
ExprParser.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE TypeOperators #-} # LANGUAGE DataKinds # {-# LANGUAGE OverloadedLabels #-} # LANGUAGE RecordWildCards # module DataBase.MySQLX.ExprParser where -- general, standard library import Prelude as P import Control....
null
https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/DataBase/MySQLX/ExprParser.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # # LANGUAGE OverloadedLabels # general, standard library protocol buffer library my library ------------------------------------------------------------------------------------------ ---------------------------------------------------------------------...
# LANGUAGE FlexibleContexts # # LANGUAGE DataKinds # # LANGUAGE RecordWildCards # module DataBase.MySQLX.ExprParser where import Prelude as P import Control.Applicative import Control.Monad.Trans import Control.Monad.Trans.State as SM import Data.Attopa...
85a75d2989a51d6e26aa95449f064c2802c1bb7144db3aa7fc6a12ed9af107c3
cronokirby/haskell-in-haskell
Parser.hs
# LANGUAGE LambdaCase # module Parser ( AST (..), ValName, ConstructorName, Name, Definition (..), ConstructorDefinition (..), ValueDefinition (..), Expr (..), Literal (..), BinOp (..), Pattern (..), parser, ) where import Control.Applicative (Alternative (..), liftA2) ...
null
https://raw.githubusercontent.com/cronokirby/haskell-in-haskell/83cb8114c7a71f2fc530d1865dd22776a3779417/src/Parser.hs
haskell
# LANGUAGE LambdaCase # module Parser ( AST (..), ValName, ConstructorName, Name, Definition (..), ConstructorDefinition (..), ValueDefinition (..), Expr (..), Literal (..), BinOp (..), Pattern (..), parser, ) where import Control.Applicative (Alternative (..), liftA2) ...
a49a51c8c38ee55933bf4542bbb1f53a0335657542bbcd0f68fc3beb32286a4b
raml-org/api-modeling-framework
syntax.cljc
(ns api-modeling-framework.model.syntax) (defn fragment? [unit] (some? (get unit (keyword "@location")))) (defn <-data [document] (get document (keyword "@data"))) (defn <-location [document] (get document (keyword "@location"))) (defn <-fragment [document] (get document (keyword "@fragment"))) (def at-d...
null
https://raw.githubusercontent.com/raml-org/api-modeling-framework/34bb3b6c3e3f91b775e27f8e389e04eb2c36beb7/src/api_modeling_framework/model/syntax.cljc
clojure
(ns api-modeling-framework.model.syntax) (defn fragment? [unit] (some? (get unit (keyword "@location")))) (defn <-data [document] (get document (keyword "@data"))) (defn <-location [document] (get document (keyword "@location"))) (defn <-fragment [document] (get document (keyword "@fragment"))) (def at-d...
aebedc9acf683041acd087c4f2594bbb718055299b84e9dc0397bece4bb39e9a
NixOS/jailbreak-cabal
Main.hs
# LANGUAGE CPP # module Main ( main ) where import Distribution.Package #if MIN_VERSION_Cabal_syntax(3,7,0) import Distribution.Simple.PackageDescription #endif import Distribution.PackageDescription import Distribution.PackageDescription.Parsec import Distribution.PackageDescription.PrettyPrint import Distribution.Ty...
null
https://raw.githubusercontent.com/NixOS/jailbreak-cabal/660db2c0b152d7ee902c41c759fff88311e3676f/Main.hs
haskell
We don't relax version restrictions inside conditional statements.
# LANGUAGE CPP # module Main ( main ) where import Distribution.Package #if MIN_VERSION_Cabal_syntax(3,7,0) import Distribution.Simple.PackageDescription #endif import Distribution.PackageDescription import Distribution.PackageDescription.Parsec import Distribution.PackageDescription.PrettyPrint import Distribution.Ty...
13496ee0e279d124103a1897d3551c6a930c9e647ffa139a63fcae9254c4e612
mstepniowski/project-euler
euler_033.clj
Solution to Project Euler problem 33 ;; The fraction 49/98 is a curious fraction , as an inexperienced ;; mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8 , which is correct , is obtained by cancelling the 9s . ;; We shall consider fractions like , 30/50 = 3/5 , to be trivi...
null
https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/src/com/stepniowski/euler_033.clj
clojure
mathematician in attempting to simplify it may incorrectly believe numerator and denominator. common terms, find the value of the denominator.
Solution to Project Euler problem 33 The fraction 49/98 is a curious fraction , as an inexperienced that 49/98 = 4/8 , which is correct , is obtained by cancelling the 9s . We shall consider fractions like , 30/50 = 3/5 , to be trivial examples . There are exactly four non - trivial examples of this type o...
146feb8802c962519a78f3896dbb95dff7ced7bac3c18c94747529708166677a
lukeg101/lplzoo
SOL.hs
| Module : SOL Description : Deep - embedding of SOL in Haskell . Copyright : ( c ) , 2019 License : GPL-3 Maintainer : Stability : stable Portability : POSIX The " SOL " module denotes the AST of SOL . This languages is implemented as a deep embedding into , with all the canonic...
null
https://raw.githubusercontent.com/lukeg101/lplzoo/48de580b44c2c185609bea4e66a45589d3aa8213/SOL/SOL.hs
haskell
Tool imports. | SOL Types, both term and type variables are Strings The forall type take types a type variable and type T. existentials take a type and type var products and (disjoint) unions are what you'd expect | Type Synonym for variable names in a term. | Does syntactic type equality on types | Checks for ...
| Module : SOL Description : Deep - embedding of SOL in Haskell . Copyright : ( c ) , 2019 License : GPL-3 Maintainer : Stability : stable Portability : POSIX The " SOL " module denotes the AST of SOL . This languages is implemented as a deep embedding into , with all the canonic...
95ab3bb7db06b22a22dc03236153a47584d78c53fdd08a8c705b27c4e8b60fb7
emqx/emqx
emqx_zone_schema.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/src/emqx_zone_schema.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_zone_schema). -export([namespace/0, roots/0, fields/1, desc/1]). namespace() -> z...
71c52e537c6afbdcb458a9a484c593bd9118acf5269cf3855459e4c407672aa7
eareese/htdp-exercises
022-string-delete.rkt
#lang htdp/bsl ; assume 0 <= i < string length (define (string-delete str i) (string-append (substring str 0 i) (substring str (+ i 1)))) ; can string-delete deal with empty strings? ; well, it seems impossible to meet the assumption for both: ; A) 0 <= i ; B) i < string length ; ; if B) is tru...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/022-string-delete.rkt
racket
assume 0 <= i < string length can string-delete deal with empty strings? well, it seems impossible to meet the assumption for both: A) 0 <= i B) i < string length if B) is true and the string length is 0, then i must be less than 0, which violates A).
#lang htdp/bsl (define (string-delete str i) (string-append (substring str 0 i) (substring str (+ i 1)))) (check-expect (string-delete "hello" 0) "ello") (check-expect (string-delete "hello" 2) "helo") (check-expect (string-delete "hello" 4) "hell")
fd6fbaca0da66ae979a206f931cb6a754505f397c3064b30440e951b2cff6f69
UU-ComputerScience/js-asteroids
UnionExt.hs
# LANGUAGE CPP , MultiParamTypeClasses , StandaloneDeriving , FlexibleInstances , TypeOperators , OverlappingInstances , ScopedTypeVariables # {-# OPTIONS -pgmP cpp #-} module UnionExt where import Unsafe.Coerce import Prelude hiding (log) import Data.Maybe data JSUndefined data JSNull data JSObject a deriving inst...
null
https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/thesis-snippets/JS/UnionExt.hs
haskell
# OPTIONS -pgmP cpp # injection projection
# LANGUAGE CPP , MultiParamTypeClasses , StandaloneDeriving , FlexibleInstances , TypeOperators , OverlappingInstances , ScopedTypeVariables # module UnionExt where import Unsafe.Coerce import Prelude hiding (log) import Data.Maybe data JSUndefined data JSNull data JSObject a deriving instance Show (JSObject a) da...
abcda05cf2ce947e14ca189445871cc8209bbb4efbb92367f77a4d0ca4e2d26f
MyDataFlow/ttalk-server
exometer_igor.erl
-module(exometer_igor). -export([parse_transform/2]). parse_transform(Forms, Opts) -> IgorOpts = lists:append([Os || {attribute,_,compile,{igor,Os}} <- Forms]), io:fwrite("IgorOpts = ~p~nOpts = ~p", [IgorOpts, Opts]), Includes = [I || {i,I} <- Opts], NewForms = igor:parse_transform( ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/src/exometer_igor.erl
erlang
erl_syntax:revert/1 is horribly broken in R16B03. This transform corrects
-module(exometer_igor). -export([parse_transform/2]). parse_transform(Forms, Opts) -> IgorOpts = lists:append([Os || {attribute,_,compile,{igor,Os}} <- Forms]), io:fwrite("IgorOpts = ~p~nOpts = ~p", [IgorOpts, Opts]), Includes = [I || {i,I} <- Opts], NewForms = igor:parse_transform( ...
c0fd57f3e490a2e227f9fbf30ac2cd0c8d58b24a49b307736aa8c1e3eb6b8a88
cljfx/cljfx
e16_cell_factories.clj
(ns e16-cell-factories (:require [cljfx.api :as fx])) (def list-view {:fx/type :list-view :cell-factory {:fx/cell-type :list-cell :describe (fn [i] (let [color (format "#%03x" i)] {:style {:-fx-background-color color} ...
null
https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e16_cell_factories.clj
clojure
(ns e16-cell-factories (:require [cljfx.api :as fx])) (def list-view {:fx/type :list-view :cell-factory {:fx/cell-type :list-cell :describe (fn [i] (let [color (format "#%03x" i)] {:style {:-fx-background-color color} ...
a5d340cf26097ff8f45b758b69d8d3959b5d8adb1717d47bd5229737177343a0
ds-wizard/engine-backend
Migration.hs
module Wizard.Database.Migration.Development.Migration ( runMigration, ) where import Shared.Constant.Component import qualified Wizard.Database.Migration.Development.Acl.AclMigration as ACL import qualified Wizard.Database.Migration.Development.Acl.AclSchemaMigration as ACL_Schema import qualified Wizard.Database.M...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/b87f6d481205dd7f0f00fd770145f8ee5c4be193/engine-wizard/src/Wizard/Database/Migration/Development/Migration.hs
haskell
module Wizard.Database.Migration.Development.Migration ( runMigration, ) where import Shared.Constant.Component import qualified Wizard.Database.Migration.Development.Acl.AclMigration as ACL import qualified Wizard.Database.Migration.Development.Acl.AclSchemaMigration as ACL_Schema import qualified Wizard.Database.M...
dbdc4efeef63c20892a03f0ab397f4d35a1bec5ebd63411b9ba3205f351f8424
imartayan/KerLang
kl_codegen.ml
* { 1 Codegen } Code generation module for KerLang Code generation module for KerLang *) open Kl_parsing open Kl_constraints open Kl_IR let emit_kl_ir (prog : spec list) : (string * ast) list = List.fold_left (fun ftable (Spec (_, fname, _) as s) -> Printf.printf "\n[Processing function \x1b[1;3...
null
https://raw.githubusercontent.com/imartayan/KerLang/2e7d1a13eb9335ace5c9f70c33cb95b09cf10362/src/kl_codegen.ml
ocaml
* Realize an anonymous term * Realize a named declaration * Realize a header containing a comment and maybe some helper functions * Realize an automatic call to the "main" function (provided it exists) * Type of kl_IR realizers
* { 1 Codegen } Code generation module for KerLang Code generation module for KerLang *) open Kl_parsing open Kl_constraints open Kl_IR let emit_kl_ir (prog : spec list) : (string * ast) list = List.fold_left (fun ftable (Spec (_, fname, _) as s) -> Printf.printf "\n[Processing function \x1b[1;3...
640ce9663231eef91c86a60ffe696085116f0f770448b28cf1873326aa5b0f42
TyOverby/mono
reversed_list.ml
type 'a t = 'a list = | [] | ( :: ) of 'a * 'a t [@@deriving sexp_of] let of_list_rev = List.rev let rev = List.rev let rev_append = List.rev_append let rev_map = Base.List.rev_map let rev_filter_map = Base.List.rev_filter_map let is_empty = Base.List.is_empty let length = List.length let mem = Base.List.mem
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-core_kernel/reversed_list/src/reversed_list.ml
ocaml
type 'a t = 'a list = | [] | ( :: ) of 'a * 'a t [@@deriving sexp_of] let of_list_rev = List.rev let rev = List.rev let rev_append = List.rev_append let rev_map = Base.List.rev_map let rev_filter_map = Base.List.rev_filter_map let is_empty = Base.List.is_empty let length = List.length let mem = Base.List.mem
c57121f60b626ee2510e359e345989511bcc965887ea0c0c1923eb8cc4d95afb
revery-ui/revery-playground
refmtJsApi.ml
open Js_of_ocaml (* This file was taken from: -sh/engine/blob/27d3869aa8b4eb5fb0561570011e9a8857547797/src/engine/refmtJsApi.ml#L1 which was taken and modified from: *) module RE = Reason_toolchain.RE module ML = Reason_toolchain.ML let locationToJsObj (loc: Location.t) = let (_file, start_line, start_cha...
null
https://raw.githubusercontent.com/revery-ui/revery-playground/41e5856723214c3433f41914cf245c2955281d88/src/worker/refmtJsApi.ml
ocaml
This file was taken from: -sh/engine/blob/27d3869aa8b4eb5fb0561570011e9a8857547797/src/engine/refmtJsApi.ml#L1 which was taken and modified from: The right way of handling ocaml syntax error locations. Do do this at home copied over from #L73 happens sometimes. Syntax error for example in som...
open Js_of_ocaml module RE = Reason_toolchain.RE module ML = Reason_toolchain.ML let locationToJsObj (loc: Location.t) = let (_file, start_line, start_char) = Location.get_pos_info loc.loc_start in let (_, end_line, end_char) = Location.get_pos_info loc.loc_end in let normalizedRange = if start_char == -1 |...
64645f625db47fff79dd582dd4325fb50fce7215b07513acc8df52db76bf12c0
purescript/purescript
PureScript.hs
-- | -- This module contains internal extensions to Data.Text. -- module Data.Text.PureScript (spanUpTo) where import Prelude import Data.Text.Internal (Text(..), text) import Data.Text.Unsafe (Iter(..), iter) | /O(n)/ ' spanUpTo ' , applied to a number @n@ , predicate , and text @t@ , returns a pair whose firs...
null
https://raw.githubusercontent.com/purescript/purescript/211e67d4e7d186682ea70e8740055ad4e6624671/src/Data/Text/PureScript.hs
haskell
| This module contains internal extensions to Data.Text.
module Data.Text.PureScript (spanUpTo) where import Prelude import Data.Text.Internal (Text(..), text) import Data.Text.Unsafe (Iter(..), iter) | /O(n)/ ' spanUpTo ' , applied to a number @n@ , predicate , and text @t@ , returns a pair whose first element is the longest prefix ( possibly empty ) of @t@ of len...
89fdb14dc2228441ceeaf9860a3099cd759d09da8f0cda3e0b376ce6a58163f5
tonymorris/geo-gpx
YearL.hs
module Data.Geo.GPX.Lens.YearL where import Data.Lens.Common class YearL a where yearL :: Lens a (Maybe String)
null
https://raw.githubusercontent.com/tonymorris/geo-gpx/526b59ec403293c810c2ba08d2c006dc526e8bf9/src/Data/Geo/GPX/Lens/YearL.hs
haskell
module Data.Geo.GPX.Lens.YearL where import Data.Lens.Common class YearL a where yearL :: Lens a (Maybe String)
2fc452b8acdfc81f49f3cc4f8cc6c26e542cb8922facbd6399b12469cec7e310
smuenzel/opile
var_within_closure.ml
open! Core include Compiler_without_sexp.Var_within_closure let sexp_of_t t = unique_name t |> [%sexp_of: string] module Set = struct include Compiler_without_sexp.Var_within_closure.Set let sexp_of_t t = fold (fun key acc -> key :: acc) t [] |> [%sexp_of: t list] end module Map = struct include Compiler...
null
https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/compiler-with-sexp/var_within_closure.ml
ocaml
open! Core include Compiler_without_sexp.Var_within_closure let sexp_of_t t = unique_name t |> [%sexp_of: string] module Set = struct include Compiler_without_sexp.Var_within_closure.Set let sexp_of_t t = fold (fun key acc -> key :: acc) t [] |> [%sexp_of: t list] end module Map = struct include Compiler...
41e9f6766b60c084c9cc166e08975f362f379808157241075362a3b03c1b5e3e
backtracking/mlpost
animations.ml
open Mlpost module P = Path module N = Num open Point let ( |> ) x f = f x let red dir distmax distmin = let l = dir |> length |> N.minn (N.bp distmax) |> N.maxn (N.bp distmin) in scale l (normalize dir) let little_man ~phead ~plhand ~prhand ~plfoot ~prfoot = let downbody = origin in let upbody = bpp (0., 1....
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/examples/animations.ml
ocaml
no need to queue a redraw here, an expose event should follow the configure, right ?
open Mlpost module P = Path module N = Num open Point let ( |> ) x f = f x let red dir distmax distmin = let l = dir |> length |> N.minn (N.bp distmax) |> N.maxn (N.bp distmin) in scale l (normalize dir) let little_man ~phead ~plhand ~prhand ~plfoot ~prfoot = let downbody = origin in let upbody = bpp (0., 1....
40e7e18076a6f085566f926cc267e4fca44d1545a3b9b6685d6ec29d96c05362
np/mbox-tools
TraceS.hs
-------------------------------------------------------------------- -- | -- Module : Debug.TraceS Copyright : ( c ) 2008 , 2009 -- License : BSD3 -- Maintainer : < > -- Stability : provisional -- Portability: -- -------------------------------------------------------------------- module Debug.TraceS (tr...
null
https://raw.githubusercontent.com/np/mbox-tools/494848aa730e445d3227b6c57d3351aa8401cf4c/Debug/TraceS.hs
haskell
------------------------------------------------------------------ | Module : Debug.TraceS License : BSD3 Stability : provisional Portability: ------------------------------------------------------------------
Copyright : ( c ) 2008 , 2009 Maintainer : < > module Debug.TraceS (trace,traceS) where import Debug.Trace (trace) traceS :: Show a => a -> a traceS x = trace (show x) x
c85162e2b80bef81f5eaebf3844c9292133296bc640092fbf5e1317aad5db3a2
prg-titech/Kani-CUDA
diffusion3d-sleeve-profile.rkt
#lang rosette (require "../../lang.rkt" "diffusion3d-baseline.rkt") 7 - points stencil computation example . Parallel diffusion program (define (diffusion-kernel in out nx ny nz ce cw cn cs ct cb cc file1 file...
null
https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/Diffusion3d/diffusion3d-sleeve-profile.rkt
racket
in[(j == ny - 1) ? c : c + nx] => smem[c2 + blockDim.x + 2] Add a constraint that it is equal to each of the elements of (define-symbolic e w n s t b c real?) Execute a diffusion program on CPU CPU-in CPU-out SIZEX SIZEY SIZEZ e w n s t b c) Execute ...
#lang rosette (require "../../lang.rkt" "diffusion3d-baseline.rkt") 7 - points stencil computation example . Parallel diffusion program (define (diffusion-kernel in out nx ny nz ce cw cn cs ct cb cc file1 file...
a189346ea6578f6677b7087f5b2b9a901b57eb8b3bbe7c0cb48e3cf25b5005a4
alsonkemp/turbinado
Database.hs
module Turbinado.Environment.Database ( addDatabaseToEnvironment ) where import Data.Typeable import Data.Dynamic import qualified Data.Map as M import Control.Monad import Control.Monad.State import Control.Monad.Trans import Data.Maybe import Database.HDBC import Config.Master import Turbinado.Contr...
null
https://raw.githubusercontent.com/alsonkemp/turbinado/da2ba7c3443ddf6a51d1ec5b05cb45a85efc0809/Turbinado/Environment/Database.hs
haskell
module Turbinado.Environment.Database ( addDatabaseToEnvironment ) where import Data.Typeable import Data.Dynamic import qualified Data.Map as M import Control.Monad import Control.Monad.State import Control.Monad.Trans import Data.Maybe import Database.HDBC import Config.Master import Turbinado.Contr...
b6689ef48e797f5e904f79743d44c05e8d76eefaad0cc25d9d86c647e9f1a79c
libguestfs/supermin
mode_build.ml
supermin 5 * Copyright ( C ) 2009 - 2014 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later ...
null
https://raw.githubusercontent.com/libguestfs/supermin/3efe663421d94376694f292ca1fcf2732a82149f/src/mode_build.ml
ocaml
list of wildcards list of wildcards list of package names Note that base images don't appear here because they are unpacked * into a build directory as we discover them. a tarball When base images are seen, they are unpacked into this temporary * directory. But to speed things up, when we are build...
supermin 5 * Copyright ( C ) 2009 - 2014 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later ...
fa4288c25984b729ef4ee3085af654a8063d82dc9b67b396fd2c5be805b98cf8
janestreet/core
test_deque.ml
open! Core open! Import open! Deque let%test_unit _ = ignore (create ~initial_length:0 () : _ t) let%test _ = length (create ()) = 0 let%test_module _ = (module struct let binary_search = binary_search ~compare:Int.compare let t = of_array [| 1; 2; 3; 4 |] let%test _ = [%equal: int option] (binary_sear...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_deque.ml
ocaml
open! Core open! Import open! Deque let%test_unit _ = ignore (create ~initial_length:0 () : _ t) let%test _ = length (create ()) = 0 let%test_module _ = (module struct let binary_search = binary_search ~compare:Int.compare let t = of_array [| 1; 2; 3; 4 |] let%test _ = [%equal: int option] (binary_sear...
00ce5a14925a357564c2d5f34dfa3c39cb4b8ca59635dda7248a0382b90d19b8
seanomlor/programming-in-haskell
foldr.hs
import Prelude hiding (and, foldr, length, or, product, reverse, sum) -- Many functions that take lists as their arguments can be defined using -- the following simple pattern of recursion: -- -- f [] = v f ( x : xs ) = x # f xs -- -- Where the function maps the empty list to value `v`, and any non-empty -- ...
null
https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/07-higher-order-functions/foldr.hs
haskell
Many functions that take lists as their arguments can be defined using the following simple pattern of recursion: f [] = v Where the function maps the empty list to value `v`, and any non-empty list to an operator `#` applied to the head of the list and the result of recursively processing the tail. su...
import Prelude hiding (and, foldr, length, or, product, reverse, sum) f ( x : xs ) = x # f xs sum [ ] = 0 product [ ] = 1 and ( x : xs ) = x & & and xs foldr :: (a -> b -> b) -> b -> [a] -> b foldr _ v [] = v foldr f v (x:xs) = f x (foldr f v xs) sum :: Num a => [a] -> a sum = foldr ( \a b - > ...
63ff290a35c6e0cd9234ffde1b817c8342a5147b0db44fe99d3a5b74f4ee714e
tjammer/schmu
arr_intf.ml
module type S = sig open Cleaned_types open Llvm_types val gen_array_lit : Llvm_types.param -> Monomorph_tree.monod_tree list -> typ -> Monomorph_tree.alloca -> llvar val array_get : in_set:bool -> llvar list -> typ -> llvar val array_set : llvar list -> llvar val array_length : llvar ...
null
https://raw.githubusercontent.com/tjammer/schmu/58ba8a8a84a2196a7ff923742e992f90868dc95f/lib/codegen/arr_intf.ml
ocaml
module type S = sig open Cleaned_types open Llvm_types val gen_array_lit : Llvm_types.param -> Monomorph_tree.monod_tree list -> typ -> Monomorph_tree.alloca -> llvar val array_get : in_set:bool -> llvar list -> typ -> llvar val array_set : llvar list -> llvar val array_length : llvar ...
9072ca683d002abdd14c48d337cd95f128c8bcc7cec0a3ba990972112e2c79ef
ku-fpg/haskino
Expr.hs
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.Expr -- Based on System.Hardware.Arduino.Expr Copyright : ( c ) University of Kansas System . Hardware . Arduino ( c ) -- License : BSD3 -- Stabili...
null
https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/System/Hardware/Haskino/Expr.hs
haskell
----------------------------------------------------------------------------- | Module : System.Hardware.Haskino.Expr Based on System.Hardware.Arduino.Expr License : BSD3 Stability : experimental Underlying data structures -------------------------------------------------------------...
Copyright : ( c ) University of Kansas System . Hardware . Arduino ( c ) # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE ConstrainedClassMethods # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # module System.Hardware.Haskino...
5c34ff283633de75fe4f8d2e1ea1fd25326fb9a52debdccd66f5c65093f42535
gsakkas/rite
2173.ml
let rec sepConcat sep sl = match sl with | [] -> "" | h::t -> let f a x = a ^ (sep ^ x) in let base = h in let l = t in List.fold_left f base l;; let stringOfList f l = sepConcat "; " (List.append ("[" :: (List.map f l)) "]");; fix let rec sepConcat sep sl = match sl with | [ ] - > ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2173.ml
ocaml
let rec sepConcat sep sl = match sl with | [] -> "" | h::t -> let f a x = a ^ (sep ^ x) in let base = h in let l = t in List.fold_left f base l;; let stringOfList f l = sepConcat "; " (List.append ("[" :: (List.map f l)) "]");; fix let rec sepConcat sep sl = match sl with | [ ] - > ...
44ee7bd0a786927f1dc056c72705409d42e4c32c4a9908f0d7226fa11653c841
otakar-smrz/elixir-fm
Version.hs
-- | -- -- Module : Elixir.Version Copyright : 2005 - 2017 -- License : GPL -- -- Maintainer : otakar-smrz users.sf.net -- Stability : provisional -- Portability : portable -- -- Exports the 'version' of the "ElixirFM" library and provides support for working with the SVN\/CVS revision keywo...
null
https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Version.hs
haskell
| Module : Elixir.Version License : GPL Maintainer : otakar-smrz users.sf.net Stability : provisional Portability : portable Exports the 'version' of the "ElixirFM" library and provides support parses the '$Revision ... $' string supplied to it. Results have the type 'Version' of the "Data....
Copyright : 2005 - 2017 for working with the SVN\/CVS revision keyword . The ' revised ' method module Elixir.Version ( module Data.Version, revised, version ) where import Elixir.Pretty import Data.Version import Text.ParserCombinators.ReadP instance Pretty Version where ...
b531239cbef73ebf79cf473c4713dc121cfd5326aae033fcdb70a89bc2b57d1d
bandithedoge/shine
Render.hs
module Shine.Render ( renderInline, renderBlock, renderDoc, ) where import Shine.ANSI import Shine.Types import Shine.Util import Control.Exception import Data.Char (isUpper, toUpper) import qualified Data.HashMap.Lazy as HM import qualified Data.List as L import Data.Maybe import qualified Data.Text as T impo...
null
https://raw.githubusercontent.com/bandithedoge/shine/0eaee741a056fa7f00e01e6365c54b0fecea5694/src/Shine/Render.hs
haskell
-types-1.22.2/docs/Text-Pandoc-Definition.html#t:Block
module Shine.Render ( renderInline, renderBlock, renderDoc, ) where import Shine.ANSI import Shine.Types import Shine.Util import Control.Exception import Data.Char (isUpper, toUpper) import qualified Data.HashMap.Lazy as HM import qualified Data.List as L import Data.Maybe import qualified Data.Text as T impo...
98a510ec46252986324a567a854e20822cc591d11d2499d7cbf04d547359fa0c
NorfairKing/smos
Gen.hs
# OPTIONS_GHC -fno - warn - orphans # module Smos.Cursor.Tag.Gen where import Cursor.List.NonEmpty.Gen () import Cursor.Text.Gen import Data.GenValidity import Smos.Cursor.Tag import Smos.Data.Gen instance GenValid TagCursor where genValid = TagCursor <$> textCursorWithGen genTagChar shrinkValid = shrinkValidStr...
null
https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-cursor-gen/src/Smos/Cursor/Tag/Gen.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Smos.Cursor.Tag.Gen where import Cursor.List.NonEmpty.Gen () import Cursor.Text.Gen import Data.GenValidity import Smos.Cursor.Tag import Smos.Data.Gen instance GenValid TagCursor where genValid = TagCursor <$> textCursorWithGen genTagChar shrinkValid = shrinkValidStr...
93b30c7dd6bbd4656262368ff08f473c856a147e134349167c1305e53e8224be
cac-t-u-s/om-sharp
user-interface.lisp
;========================================================================= ; OM API Multiplatform API for OpenMusic LispWorks Implementation ;========================================================================= ; ; This program is free software: you can redistribute it and/or modify it under the terms ...
null
https://raw.githubusercontent.com/cac-t-u-s/om-sharp/80f9537368471d0e6e4accdc9fff01ed277b879e/src/api/om-api-LW/user-interface.lisp
lisp
========================================================================= OM API ========================================================================= This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed; in the hope that...
Multiplatform API for OpenMusic LispWorks Implementation it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Authors : , PREDEFINED DIALOGS A...
66106ad069c40118e50998e7c3692e2df41eb99d6bc2e1d986f658aa1c324eb6
flavioc/cl-hurd
fs-type.lisp
(in-package :hurd-common) ;; File system types for the stat 's st - fsid field . ;; Can be found at hurd/hurd_types.h. ;; (defcenum fs-type (:ufs #x00000000) (:nfs #x00000001) (:gfs #x00000002) (:lfs #x00000003) (:sysv #x00000004) (:ftp #x00000005) (:tar #x00000006) (:ar #x00000007) (:cpio #x0000...
null
https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/common/fs-type.lisp
lisp
Can be found at hurd/hurd_types.h.
(in-package :hurd-common) File system types for the stat 's st - fsid field . (defcenum fs-type (:ufs #x00000000) (:nfs #x00000001) (:gfs #x00000002) (:lfs #x00000003) (:sysv #x00000004) (:ftp #x00000005) (:tar #x00000006) (:ar #x00000007) (:cpio #x00000008) (:msloss #x00000009) (:cpm #x00000...
38582428983ca31eb22e481dc5841192172238bd7dd59bf2bbbeb960a4ff5243
awakesecurity/language-ninja
Rule.hs
-*- coding : utf-8 ; mode : ; -*- -- File: library/Language/Ninja/IR/Rule.hs -- -- License: -- Copyright 2017 Awake Security -- 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 ...
null
https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/library/Language/Ninja/IR/Rule.hs
haskell
File: library/Language/Ninja/IR/Rule.hs License: Copyright 2017 Awake Security 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 CON...
-*- coding : utf-8 ; mode : ; -*- Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCa...
f7414057c15b7650a9d870b91b66d3f1202e0baf2ecd398b774100621c92d98d
orionsbelt-battlegrounds/obb-rules
direction_test.cljc
(ns obb-rules.actions.direction-test (:require [obb-rules.actions.direction :as direction] #?(:clj [clojure.test :refer [deftest testing is run-tests]] :cljs [cljs.test :refer-macros [deftest testing is run-tests]]))) (deftest perpendicular-horiz (is (some #{[3 4]} (direction/perpendicular [4 4] :no...
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/test/obb_rules/actions/direction_test.cljc
clojure
(ns obb-rules.actions.direction-test (:require [obb-rules.actions.direction :as direction] #?(:clj [clojure.test :refer [deftest testing is run-tests]] :cljs [cljs.test :refer-macros [deftest testing is run-tests]]))) (deftest perpendicular-horiz (is (some #{[3 4]} (direction/perpendicular [4 4] :no...
8da473456ffe653329c0a0f4213967e3d2a7323a4bd050ac5795aec603a83834
clj-commons/seesaw
swingx.clj
; compile ; export DISPLAY=:99.0 ; rm -Rf test/ ./lazytest.sh " Copyright ( c ) , 2011 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ;...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/test/seesaw/test/examples/swingx.clj
clojure
compile ; export DISPLAY=:99.0 ; rm -Rf test/ ./lazytest.sh " Copyright ( c ) , 2011 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By usi...
(ns seesaw.test.examples.swingx (:use [seesaw.core] [seesaw.swingx] seesaw.test.examples.example) (:require [seesaw.bind :as b])) A demo program that shows some of the components in 's SwingX support . (defn demo [title desc content] (border-panel :id :demo :hgap 5 :vgap 5 :border 5 ...
85249bf434cb21c554d6d62a213e862fafefa052b8cdf62ac9e545227f181ddb
audreyt/openafp
ERLI.hs
module OpenAFP.Records.T.ERLI where import OpenAFP.Types import OpenAFP.Internals data T_ERLI = T_ERLI { t_erli_Type :: !N1 ,t_erli :: !NStr } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/T/ERLI.hs
haskell
module OpenAFP.Records.T.ERLI where import OpenAFP.Types import OpenAFP.Internals data T_ERLI = T_ERLI { t_erli_Type :: !N1 ,t_erli :: !NStr } deriving (Show, Typeable)
b88183b5cccbc1dd01d512e765f1f338cfcd2b9d78d12f0c882c30d41acf9baa
joinr/spork
eager.clj
;;A set of operations that address some incredibly ;;slow ops we find when using clojure's lazy ;;infrastructure. Update Feb 2017 - Marked DEPRECATED . Most of the ;;performance issues addressed here are no longer relevant. (ns spork.util.eager) (defn keys! "Optimized replacement for clojure.core/key...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/util/eager.clj
clojure
A set of operations that address some incredibly slow ops we find when using clojure's lazy infrastructure. performance issues addressed here are no longer relevant.
Update Feb 2017 - Marked DEPRECATED . Most of the (ns spork.util.eager) (defn keys! "Optimized replacement for clojure.core/keys" [m] (reduce-kv (fn [^java.util.ArrayList acc k v] (doto acc (.add k))) (java.util.ArrayList.) m)) (defn vals! [^clojure.lang.IPersistentMap ...
28cee1564aa13739d4dc053541128c2cf92dfd783c5c3ef2661d3da346578f07
ncaq/dic-nico-intersection-pixiv
Main.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Main (main) where import Control.Applicative import C...
null
https://raw.githubusercontent.com/ncaq/dic-nico-intersection-pixiv/4d47da6a06fbcc6e28000b4f169d148c475c43c2/src/Main.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE MultiWayIf # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # 名前が短すぎますが、これはライブラリじゃなくてアプリケーションなので、一般名刺的な名前を付けても構わないと判断しました。 ^ 単語、オリジナルのものがそのまま入ります。 ^ リダイレクト記事か? | 辞書を得て、標準出力にプリントアウトします。 キャッシュディレクトリがなければ作成します 参考情報をプリント 辞書本...
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # module Main (main) where import Control.Applicative import Control.Concurrent import Control.Concurrent.Async import Control.Monad import Control.Parallel.Strategies import Data.Attoparsec.Text ...
71d8b0934e2f01b5e6b890564fcf499f5310aee4a1cdcc2f662139883cebca42
ghc/packages-base
Storable.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables # {-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Storable Copyright : ( c ) The FFI task force 2001 -- License : see libraries/base/L...
null
https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/Foreign/Storable.hs
haskell
# LANGUAGE BangPatterns # --------------------------------------------------------------------------- | Module : Foreign.Storable License : see libraries/base/LICENSE Stability : provisional Portability : portable The module "Foreign.Storable" provides most elementary support for marshalling an...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables # Copyright : ( c ) The FFI task force 2001 Maintainer : Foreign Function Interface ( FFI ) , and will normally be imported via module Foreign.Storable ( Storable( sizeOf, alignment, ...
bd748f0a57c9779cf907348b722481891dd1a41fead8e752013552a1a06de5b1
kazu-yamamoto/witty
Types.hs
module Types where import Data.Word (Word8) import Foreign.ForeignPtr (ForeignPtr) data Options = Options { acceptInUnbound :: Bool , yieldAfterSend :: Bool , useRawSend :: Bool , useRawRecv :: Bool , prepareRecvBuf :: Bool , useMalloc :: Bool , processes :: Int } defaultOpt...
null
https://raw.githubusercontent.com/kazu-yamamoto/witty/7914449e3c7db8a999e26a3d2ae71eb6549ac382/src/Types.hs
haskell
module Types where import Data.Word (Word8) import Foreign.ForeignPtr (ForeignPtr) data Options = Options { acceptInUnbound :: Bool , yieldAfterSend :: Bool , useRawSend :: Bool , useRawRecv :: Bool , prepareRecvBuf :: Bool , useMalloc :: Bool , processes :: Int } defaultOpt...
6519dd3fa10ba3ba2f513bd3bb638b1e4d279b85511f531e84941845df1710ed
ktakashi/sagittarius-scheme
logging.scm
(import (rnrs) (util file) (sagittarius io) (srfi :13) (srfi :18) (srfi :64) (util logging)) ;; tests (define (print-log logger) (trace-log logger "trace") (debug-log logger "debug") (info-log logger "info") (warn-log logger "warn") (error-log logger "error") (fatal-log logger "fatal") (terminate-lo...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/5d397cb40380c76907dc322c6c0105d317537863/test/tests/util/logging.scm
scheme
tests
(import (rnrs) (util file) (sagittarius io) (srfi :13) (srfi :18) (srfi :64) (util logging)) (define (print-log logger) (trace-log logger "trace") (debug-log logger "debug") (info-log logger "info") (warn-log logger "warn") (error-log logger "error") (fatal-log logger "fatal") (terminate-logger! log...
3279d61fc9b93cfff1e2503feb2b0e61297b7c30574ce9709b5b025a54f716e3
melange-re/melange
ppx_this_obj_field.ml
let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc (x, y) = incr test_id ; suites := (loc ^" id " ^ (string_of_int !test_id), (fun _ -> Mt.Eq(x,y))) :: !suites let v5 = object(self) val x = 3 val mutable y = 3 method private setY v = self##y #= 2 ; self...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/ppx_this_obj_field.ml
ocaml
let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc (x, y) = incr test_id ; suites := (loc ^" id " ^ (string_of_int !test_id), (fun _ -> Mt.Eq(x,y))) :: !suites let v5 = object(self) val x = 3 val mutable y = 3 method private setY v = self##y #= 2 ; self...
32955d4456a95d5019fd170c568379a3379f8b6ee870aff4faca8f9ddc751ea1
ocaml-community/lambda-term
checkbuttons.ml
* checkbuttons.ml * ---------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * checkbuttons.ml * ---------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) open Lwt open LTerm_widget ...
null
https://raw.githubusercontent.com/ocaml-community/lambda-term/bcb949e420d97c1aac67f93a95d25aca5ac2cb8d/examples/checkbuttons.ml
ocaml
* checkbuttons.ml * ---------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * checkbuttons.ml * ---------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) open Lwt open LTerm_widget ...
51a7cd194fadb4f705412fab7a5c97ab3119a0b560c14591f77f3dd9ae935509
imandra-ai/imandra-ros
turtle_actionlib.ml
open Basic_types;; type shapeFeedback = () type shapeResult = { interior_angle : float32 ; apothem : float32 ; } type shapeGoal = { edges : int32 ; radius : float32 ; } type shapeActionFeedback = { shapeActionFeedback_header : Std_msgs.header ; shapeActionFeedback_status : Actionlib_msgs.goalStatu...
null
https://raw.githubusercontent.com/imandra-ai/imandra-ros/e1380c267ee319dd4f86c4b54e0b270bc0738796/imandra_model/src-messages/turtle_actionlib.ml
ocaml
open Basic_types;; type shapeFeedback = () type shapeResult = { interior_angle : float32 ; apothem : float32 ; } type shapeGoal = { edges : int32 ; radius : float32 ; } type shapeActionFeedback = { shapeActionFeedback_header : Std_msgs.header ; shapeActionFeedback_status : Actionlib_msgs.goalStatu...
4bbdfcbc5120accddb39f87da1ae1dfc30decbe1579f222d20d6dc541c08b6da
dyoo/ragg
test-wordy.rkt
#lang racket/base (require ragg/examples/wordy ragg/support rackunit) (check-equal? (syntax->datum (parse (list "hello" "world"))) '(sentence (verb (greeting "hello")) (optional-adjective) (object "world"))) (check-equal? (syntax->datum (parse (list "hola" "frumpy" (token 'WORLD "세계")))) ...
null
https://raw.githubusercontent.com/dyoo/ragg/9cc648e045f7195702599b88e6b8db9364f88302/ragg/test/test-wordy.rkt
racket
#lang racket/base (require ragg/examples/wordy ragg/support rackunit) (check-equal? (syntax->datum (parse (list "hello" "world"))) '(sentence (verb (greeting "hello")) (optional-adjective) (object "world"))) (check-equal? (syntax->datum (parse (list "hola" "frumpy" (token 'WORLD "세계")))) ...
9f1597e2b162c93889cf33e3faf0727867cc00ab0669ad4f4fe37bec27141e59
ymherklotz/verismith
OptParser.hs
module Verismith.OptParser ( OptTool (..), Opts (..), opts, ) where import Control.Applicative ((<|>)) import Data.Text (Text) import qualified Data.Text as T import Options.Applicative ( (<**>), Mod (..), OptionFields (..), Parser (..), ParserInfo (..), ReadM (..), ) import qualifi...
null
https://raw.githubusercontent.com/ymherklotz/verismith/5e2a3ca343da105c589f41da6208349d6788edb6/src/Verismith/OptParser.hs
haskell
# UNPACK # # UNPACK #
module Verismith.OptParser ( OptTool (..), Opts (..), opts, ) where import Control.Applicative ((<|>)) import Data.Text (Text) import qualified Data.Text as T import Options.Applicative ( (<**>), Mod (..), OptionFields (..), Parser (..), ParserInfo (..), ReadM (..), ) import qualifi...
d4fdbc30e76edfce1dac2e65b65f890f6ef5694e8ae77bd1a2171f269ecd13a3
maranget/hevea
cutOut.mli
(***********************************************************************) (* *) (* HEVEA *) (* *) , projet MOSCOVA , ...
null
https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/cutOut.mli
ocaml
********************************************************************* HEVEA ...
, projet MOSCOVA , INRIA Rocquencourt Copyright 2006 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . module type Config = sig val small_length : int end module Make(C:Config) : sig type t val get_name : t ->...
e102503bacd392ba9c48fe8d37864ffadaed870c600475945025501aff4e0eba
racket/htdp
scheme-tests.rkt
; For backwards compatibility. #lang racket/base (require "racket-tests.rkt") (provide (all-from-out "racket-tests.rkt"))
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/test-engine/scheme-tests.rkt
racket
For backwards compatibility.
#lang racket/base (require "racket-tests.rkt") (provide (all-from-out "racket-tests.rkt"))
02f3d2c1b5d84110826d8f772e83295d5123840b96fb9b3f9eaaa9fd6e89dcdd
TrustInSoft/tis-kernel
postdominators_parameters.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/postdominators/postdominators_parameters.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
17f185d5b4c43d22385457d1be19153f866f393416b1f796b55f677f958ec08b
jimpil/cryptohash-clj
pbkdf2.clj
(ns cryptohash-clj.specs.pbkdf2 (:require [clojure.spec.alpha :as s])) (s/def ::algo #{:hmac+sha1 :hmac+sha256 :hmac+sha512}) (s/def ::key-length ;; in bits (s/and pos-int? #(zero? (rem % 8)))) (s/def ::salt-length pos-int?) (s/def ::iterations pos-int?) (s/def ::separator char?) (s/def ::options (...
null
https://raw.githubusercontent.com/jimpil/cryptohash-clj/5ea9e4abb83065d044ea7471ed7e86b85450e300/src/cryptohash_clj/specs/pbkdf2.clj
clojure
in bits
(ns cryptohash-clj.specs.pbkdf2 (:require [clojure.spec.alpha :as s])) (s/def ::algo #{:hmac+sha1 :hmac+sha256 :hmac+sha512}) (s/and pos-int? #(zero? (rem % 8)))) (s/def ::salt-length pos-int?) (s/def ::iterations pos-int?) (s/def ::separator char?) (s/def ::options (s/keys :opt-un [::algo ::key-le...
1a866f945412493cfb71e07970bf9187c3625e3d9e013f7d0c4b04d39582df06
BillHallahan/G2
PropConcat.hs
module PropConcat (size, sumsize, prop_concat) where import Prelude hiding (length, concat) {-@ measure size @-} size :: [a] -> Int size [] = 0 size (x:xs) = 1 + size xs {-@ invariant {v:[a] | 0 <= size v} @-} {-@ invariant {v:[a] | len v == size v} @-} {-@ measure sumsize @-} sumsize :: [[a]] -> Int sumsize [] = ...
null
https://raw.githubusercontent.com/BillHallahan/G2/ac1169429b3fabe12db919e266514cc8123fa173/tests/LiquidInf/Paper/Eval/Prop_LIA_Invented/PropConcat.hs
haskell
@ measure size @ @ invariant {v:[a] | 0 <= size v} @ @ invariant {v:[a] | len v == size v} @ @ measure sumsize @ @ LIQUID "--short-names" @ @ LIQUID "--no-termination" @ @ LIQUID "--prune-unsorted" @
module PropConcat (size, sumsize, prop_concat) where import Prelude hiding (length, concat) size :: [a] -> Int size [] = 0 size (x:xs) = 1 + size xs sumsize :: [[a]] -> Int sumsize [] = 0 sumsize (xs:xss) = size xs + sumsize xss concat :: [[a]] -> [a] concat [] = [] concat [xs] = xs concat (xs:ys:xss) = con...
715a41c58e0cb68e596cdef33d669526f53151a53656f32c365a201312b01fc0
rtoy/cmucl
iso8859-14.lisp
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ;;; ;;; ********************************************************************** This code was written by and has been placed in the public ;;; domain. ;;; (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/iso8859-14.lisp $") (in-pac...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/iso8859-14.lisp
lisp
-*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ********************************************************************** domain.
This code was written by and has been placed in the public (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/iso8859-14.lisp $") (in-package "STREAM") (intl:textdomain "cmucl") (defconstant +iso-8859-14+ (make-array 96 :element-type '(unsigned-byte 16) :initial-contents #(160 7682 7683 16...
014aedf9d2bf76ef7b4b4b4afa7895895324af7e69d9798e92a9fab2c9111c54
c-cube/frog-utils
Res.ml
(* This file is free software, part of frog-utils. See file "license" for more details. *) [@@@warning "-39"] type t = | Sat | Unsat | Unknown | Timeout | Error [@@deriving yojson,eq] [@@@warning "+39"] let to_string = function | Sat -> "sat" | Unsat -> "unsat" | Unknown -> "unknown" | Timeout ->...
null
https://raw.githubusercontent.com/c-cube/frog-utils/3f68c606a7abe702f9e22a0606080191a2952b18/src/lib/Res.ml
ocaml
This file is free software, part of frog-utils. See file "license" for more details. | Unknown, Timeout -> `LeftBetter | Timeout, Unknown -> `RightBetter
[@@@warning "-39"] type t = | Sat | Unsat | Unknown | Timeout | Error [@@deriving yojson,eq] [@@@warning "+39"] let to_string = function | Sat -> "sat" | Unsat -> "unsat" | Unknown -> "unknown" | Timeout -> "timeout" | Error -> "error" let of_string = function | "sat" -> Sat | "unsat" -> U...
1de621289cb1416a52432ec347468d750ec5123b8044c104dd7c45f9e70981d1
dparis/cooler
project.clj
(defproject cooler "0.1.2-SNAPSHOT" :description "A distributed rate-limiting library based on the GCRA algorithm." :url "" :license {:name "The MIT Licence" :url ""} :min-lein-version "2.6.1" :pedantic? :abort :dependencies [[org.clojure/clojure "1.8.0"] ;; Explicit includ...
null
https://raw.githubusercontent.com/dparis/cooler/38b2efb3c4efb32d1b3d03c70176f690555f94d1/project.clj
clojure
Explicit includes to prevent confusing dependencies
(defproject cooler "0.1.2-SNAPSHOT" :description "A distributed rate-limiting library based on the GCRA algorithm." :url "" :license {:name "The MIT Licence" :url ""} :min-lein-version "2.6.1" :pedantic? :abort :dependencies [[org.clojure/clojure "1.8.0"] [com.taoensso/enco...
5ebcdc813c87be4ec23e7002ed3c2bacb415dc2aad53a1ed2bb23afc81346957
countvajhula/cli
flag-w-multiple-args.rkt
#lang cli (provide reconnect) (flag (delay #:param [delay '(1 3)] time-sec factor) ("-d" "--delay" "Base time in seconds and backoff factor") (delay (map string->number (list time-sec factor)))) (program (reconnect) (delay))
null
https://raw.githubusercontent.com/countvajhula/cli/26c930e8f8bc4cb9396561f2678d74179473085d/tests/scripts/flag-w-multiple-args.rkt
racket
#lang cli (provide reconnect) (flag (delay #:param [delay '(1 3)] time-sec factor) ("-d" "--delay" "Base time in seconds and backoff factor") (delay (map string->number (list time-sec factor)))) (program (reconnect) (delay))
2c73a743e62139084108711fa82a16e5ffd6377a248105002d19fb35dc0e82bc
metric-space/tiny-scheduler
Time.hs
| Time Interval Data Type to use to schedule jobs , ( Secs , Minutes , Hours , Days ) , coupled along with convenience function to convert datatype to a rational number . Please note this data type guards against negative time which will result in 0 Addition / multiplication / division 's resultant...
null
https://raw.githubusercontent.com/metric-space/tiny-scheduler/16980a7a283e2436b9944279c1016b24ba49ef79/TinyScheduler/Time.hs
haskell
to ensure no negative time arrives as a result negation of time makes no sense, this ain't quantum mechanics
| Time Interval Data Type to use to schedule jobs , ( Secs , Minutes , Hours , Days ) , coupled along with convenience function to convert datatype to a rational number . Please note this data type guards against negative time which will result in 0 Addition / multiplication / division 's resultant...
8ab63c4329afa402cf0a2ba7400835324f526c2b06d06a293aa0036060b899c6
cbaggers/cepl
gl-context.lisp
(in-package :cepl.context) ;;------------------------------------------------------------ (defclass gl-context () ((handle :initarg :handle :reader handle) (version-major :initarg :version-major :reader major-version) (version-minor :initarg :version-minor :reader minor-version) (version-float :initarg :ve...
null
https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/context/gl-context.lisp
lisp
------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ Homeless stuff GL_DRAW_BUFFERi (symbolic constant, see glDrawBuffers)
(in-package :cepl.context) (defclass gl-context () ((handle :initarg :handle :reader handle) (version-major :initarg :version-major :reader major-version) (version-minor :initarg :version-minor :reader minor-version) (version-float :initarg :version-float :reader version-float))) (let ((available-extensi...
dd1ba8010c5d28ada65a0ea58fbdb5f668bf40681530dd0b6716deb32e345887
ejgallego/coq-lsp
workspace.mli
(************************************************************************) (* Coq Language Server Protocol *) Copyright 2019 MINES ParisTech -- Dual License LGPL 2.1 / GPL3 + Written by : (*******************************************...
null
https://raw.githubusercontent.com/ejgallego/coq-lsp/36a8d60f23cf151c904b2fb149894ef596ba0e28/lsp/workspace.mli
ocaml
********************************************************************** Coq Language Server Protocol **********************************************************************
Copyright 2019 MINES ParisTech -- Dual License LGPL 2.1 / GPL3 + Written by : module WorkspaceFolder : sig type t = { uri : Lang.LUri.File.t ; name : string } [@@deriving yojson] end module WorkspaceFoldersChangeEvent : sig type t = { added : Works...
07a830cb9152e4b0febff04a683550cd75280d1e42bf59356fc0405fe31ad249
phadej/staged
Combinators.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # {-# LANGUAGE EmptyCase #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # {-# LANGUAGE RankNTypes #-} # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # L...
null
https://raw.githubusercontent.com/phadej/staged/b51c8c508af71ddb2aca4a75030da9b2c4f9e3dd/staged-streams/src/Staged/Stream/Combinators.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE EmptyCase # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # # LANGUAGE TemplateHaskellQuotes # * Construction * Transformations * Append * Zipping * Aligning * Recursion * Pipes * Elimination * Conversion -...
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # # LANGUAGE GADTs # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Staged.Stream.Combinators ( singleton, fromList, fromListM, unfold, iterate, iterateM,...
67fae471ca86ddd057c9d62be489da00313313e23016044bea716a49649057b5
synduce/Synduce
first_odd.ml
* @synduce -NB -n 20 type 'a list = | Elt of 'a | Cons of 'a * 'a list let rec even_positive_list = function | Elt x -> x > 0 && x mod 2 = 0 | Cons (hd, tl) -> hd > 0 && hd mod 2 = 0 && even_positive_list tl ;; let rec spec = function | Elt x -> if x mod 2 = 1 then x else 0 | Cons (a, l) -> if a mod 2 = ...
null
https://raw.githubusercontent.com/synduce/Synduce/11e9eb1d420113ae85ec63399dd493034c51a354/benchmarks/constraints/evenlist/first_odd.ml
ocaml
* @synduce -NB -n 20 type 'a list = | Elt of 'a | Cons of 'a * 'a list let rec even_positive_list = function | Elt x -> x > 0 && x mod 2 = 0 | Cons (hd, tl) -> hd > 0 && hd mod 2 = 0 && even_positive_list tl ;; let rec spec = function | Elt x -> if x mod 2 = 1 then x else 0 | Cons (a, l) -> if a mod 2 = ...
7abc49af90b2f033d11a3f18fccd5966f3a4b2d5247478a824822684627505b7
jfacorro/clojure-lab
paredit.clj
(ns lab.plugin.editor.paredit (:require [clojure.zip :as zip] [clojure.core.match :refer [match]] [clojure.string :as str] [lab.ui.core :as ui] [lab.util :refer [timeout-channel find-limits find-char]] [lab.model.document :as doc] [lab.model.prot...
null
https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/plugin/editor/paredit.clj
clojure
Util Predicates Basic Insertion Commands Hello,| world! Hello,)| world!" When there's a parent with delimiters and the char inserted is the closing delim. (Foo.| Compute the corresponding indentation using the most immediate delimiter paren, if any. check if the location is the closing delimiter baz |baz...
(ns lab.plugin.editor.paredit (:require [clojure.zip :as zip] [clojure.core.match :refer [match]] [clojure.string :as str] [lab.ui.core :as ui] [lab.util :refer [timeout-channel find-limits find-char]] [lab.model.document :as doc] [lab.model.prot...
dcdc0b0c366f21ffab77e277879fd51fc93eda34eb351086c56f21e9820eb804
cerner/clara-examples
validation.clj
(ns clara.examples.validation (:require [clara.rules.accumulators :as acc] [clara.rules :refer :all] [clj-time.core :as t])) ;;;; Facts used in the examples below. (defrecord WorkOrder [clientid scale type requestdate duedate]) (defrecord ValidationError [reason description]) (defrecord Ap...
null
https://raw.githubusercontent.com/cerner/clara-examples/343c54e8c2e7522a168b756bbe1e722937a85c09/src/main/clojure/clara/examples/validation.clj
clojure
Facts used in the examples below. Some example rules. ;;;; Join to the above client ID. Run the above example. ;;;; "Validation error: Insufficient time prior to due date of the large order." Load the rules. Insert some facts. Load the rules.
(ns clara.examples.validation (:require [clara.rules.accumulators :as acc] [clara.rules :refer :all] [clj-time.core :as t])) (defrecord WorkOrder [clientid scale type requestdate duedate]) (defrecord ValidationError [reason description]) (defrecord ApprovalForm [formname]) (defrecord Clie...
90bf1d1a5f88455db142d2560ef2bf3b8449494e0512dc56465bd5b9fc3b3d99
shirok/Gauche
bench-pushcc.scm
;;; ;;; Small repl to benchmark C continuation overhead. ;;; Use 'make bench-pushcc' to build. ;;; (define-cfn pushcc-cc (r d::void**) (let* ([n (cast ScmObj (aref d 0))] [m (Scm_Sub n (SCM_MAKE_INT 1))]) (if (Scm_NumEq n (SCM_MAKE_INT 0)) (return r) (begin (Scm_VMPushCC pushcc-cc (c...
null
https://raw.githubusercontent.com/shirok/Gauche/0da4548fb23e97095916b67c44be5e3ddfb49c16/src/bench-pushcc.scm
scheme
Small repl to benchmark C continuation overhead. Use 'make bench-pushcc' to build.
(define-cfn pushcc-cc (r d::void**) (let* ([n (cast ScmObj (aref d 0))] [m (Scm_Sub n (SCM_MAKE_INT 1))]) (if (Scm_NumEq n (SCM_MAKE_INT 0)) (return r) (begin (Scm_VMPushCC pushcc-cc (cast void** (& m)) 1) (return (Scm_Add r n)))))) (define-cproc pushcc-bench (n) (if (Scm_...
13aa92609b7d61dead46b9e531c6b09bf2a8bd8978f9dfe6583c46b9d6a770aa
fortytools/holumbus
Logger.hs
# OPTIONS # -- ------------------------------------------------------------ module Holumbus.Crawler.Logger ( hxtLoggerName , hxtSetTraceAndErrorLogger , hxtSetLogLevel , hxtSetErrorLog , module System.Log.Logger , logC , noticeC , infoC , debugC , warnC , errC , setL...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Holumbus-Searchengine/src/Holumbus/Crawler/Logger.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ | Set trace level in config ------------------------------------------------------------ ------------------------------------------------------------ trace level 0 is issued as NOTICE, not as ...
# OPTIONS # module Holumbus.Crawler.Logger ( hxtLoggerName , hxtSetTraceAndErrorLogger , hxtSetLogLevel , hxtSetErrorLog , module System.Log.Logger , logC , noticeC , infoC , debugC , warnC , errC , setLogLevel ) where import Control.Monad.Trans impor...
eff655fd93030931eba168f94708d5b79d70f213255ecd15062c02d639935571
k0ral/rss-conduit
Rules.hs
# LANGUAGE FlexibleContexts # module Text.RSS.Lens.Rules where -- {{{ Imports import Language.Haskell.TH.Syntax import Lens.Micro import Lens.Micro.TH -- }}} rules :: LensRules rules = set lensField f lensRules where f _ _ name = [TopName $ mkName (nameBase name <> "L")]
null
https://raw.githubusercontent.com/k0ral/rss-conduit/8dd34690251a98a16b9b607e3eace988bfc2cdf3/src/Text/RSS/Lens/Rules.hs
haskell
{{{ Imports }}}
# LANGUAGE FlexibleContexts # module Text.RSS.Lens.Rules where import Language.Haskell.TH.Syntax import Lens.Micro import Lens.Micro.TH rules :: LensRules rules = set lensField f lensRules where f _ _ name = [TopName $ mkName (nameBase name <> "L")]
4d8f347142ec81c672acf4e0d789e466e26dfec0cfc24fa5492300c09417fe39
Opetushallitus/ataru
application_access_control.clj
(ns ataru.applications.application-access-control (:require [ataru.log.audit-log :as audit-log] [taoensso.timbre :as log] [ataru.organization-service.session-organizations :as session-orgs] [ataru.user-rights :as user-rights] [ataru.applications.application-store :as application-store] [ataru....
null
https://raw.githubusercontent.com/Opetushallitus/ataru/3f8dc2c053063c357533234a538dda3ae6c6902e/src/clj/ataru/applications/application_access_control.clj
clojure
(ns ataru.applications.application-access-control (:require [ataru.log.audit-log :as audit-log] [taoensso.timbre :as log] [ataru.organization-service.session-organizations :as session-orgs] [ataru.user-rights :as user-rights] [ataru.applications.application-store :as application-store] [ataru....
ecbedf7914734eb1cc135b484ceabebfe948214d0602c92854b51f89f8417e62
zcaudate/hara
string_like.clj
(ns hara.object.framework.string-like (:require [hara.object.framework.print :as print] [hara.protocol.object :as protocol.object] [hara.protocol.string :as protocol.string] [hara.object.framework.read :as read] [hara.object.framework.write :as write] [hara....
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/object/framework/string_like.clj
clojure
(ns hara.object.framework.string-like (:require [hara.object.framework.print :as print] [hara.protocol.object :as protocol.object] [hara.protocol.string :as protocol.string] [hara.object.framework.read :as read] [hara.object.framework.write :as write] [hara....
48e4d3726a81a46d6a5c8b56576028e2839f3de1d7d79d056494138b7137f094
melange-re/melange
optional_regression_test.ml
let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y type test = { s : string [@bs.optional]; b : bool [@bs.optional]; i : int [@bs.optional]; } [@@bs.deriving abstract] let make ?s ?b ?i = test ?s ?b ?i let hh = (make ~s:"" ~b:false ~i:0...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/optional_regression_test.ml
ocaml
let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y type test = { s : string [@bs.optional]; b : bool [@bs.optional]; i : int [@bs.optional]; } [@@bs.deriving abstract] let make ?s ?b ?i = test ?s ?b ?i let hh = (make ~s:"" ~b:false ~i:0...
3c0b2e228501f346dfe052438733c30159bec475fec46ddf8bf833fa99e45bff
jspahrsummers/RxHaskell
Disposable.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE Safe #-} module Disposable ( Disposable(EmptyDisposable) , newDisposable , dispose , DisposableSet , newDisposableSet , addDisposable , removeDisposable , to...
null
https://raw.githubusercontent.com/jspahrsummers/RxHaskell/19550bb692a6a6e56314fe3aebb1303a22e577ed/Disposable.hs
haskell
# LANGUAGE GADTs # # LANGUAGE Safe # | Allows disposal of a resource by running an 'IO' action. | Disposes a disposable. | Creates a disposable which runs the given action upon disposal. | @Just s@ when not yet disposed. @Nothing@ after disposal. | A synchronized set of disposables. | Creates a set of disposables...
module Disposable ( Disposable(EmptyDisposable) , newDisposable , dispose , DisposableSet , newDisposableSet , addDisposable , removeDisposable , toDisposable ) where import ...
ce196fa71712c8d5806805a3b5c6ab356a328f5b664be7be6f5a1859a7a93e05
juspay/euler-hs
Main.hs
module Main where import EulerHS.Prelude import Test.Hspec import qualified SQLDB.Tests.SQLiteDBSpec as SQLiteDB import qualified SQLDB.Tests.QueryExamplesSpec as Ex main = hspec $ do SQLiteDB.spec Ex.spec
null
https://raw.githubusercontent.com/juspay/euler-hs/0fdda6ef43c1a6c9c7221d7c194c278e375b9936/testDB/Main.hs
haskell
module Main where import EulerHS.Prelude import Test.Hspec import qualified SQLDB.Tests.SQLiteDBSpec as SQLiteDB import qualified SQLDB.Tests.QueryExamplesSpec as Ex main = hspec $ do SQLiteDB.spec Ex.spec
e5cb77b1c055c95ebd29df747b79d413b39ab605e4a6527b9c07643a5bf4e7bf
maxlapshin/nfs3
nfs_sup.erl
-module(nfs_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). %% Helper macro for declaring children of supervisor -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). %% ==============================================================...
null
https://raw.githubusercontent.com/maxlapshin/nfs3/a10fee483ec2203b1eb1d87b87d5b04c838f6ffa/src/nfs_sup.erl
erlang
API Supervisor callbacks Helper macro for declaring children of supervisor =================================================================== API functions =================================================================== =================================================================== Supervisor callback...
-module(nfs_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> {ok, { {one_for_one, 5, 10}, []} }.
6eb2695fa730f29faa03b7e1778cd63a7f4a0b78063469bc992d90ed60f5944a
Leberwurscht/Diaspora-User-Directory
reconserver.ml
(************************************************************************) This file is part of SKS . SKS 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 2 of the License , or (...
null
https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/reconserver.ml
ocaml
********************************************************************** ********************************************************************* * Executable: server process that handles reconciliation. **************************************************************** *******************************************************...
This file is part of SKS . SKS 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 2 of the License , or ( at your option ) any later version . This program is distributed in ...
f19b9a8b9b596bb35fcb427851133121a0312c6557a5a40b4ee6b03614c17f74
ds-wizard/engine-backend
List_GET.hs
module Wizard.Specs.API.Document.List_GET ( list_GET, ) where import Data.Aeson (encode) import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai.Matcher import Shared.Api.Resource.Error.ErrorJM () import Shared.Database.Migr...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/bd98d1ee8aed0b2afcae8c7570dc7c2f3b03cae8/engine-wizard/test/Wizard/Specs/API/Document/List_GET.hs
haskell
------------------------------------------------------------------------ GET /documents ------------------------------------------------------------------------ ---------------------------------------------------- ---------------------------------------------------- -----------------------------------------------...
module Wizard.Specs.API.Document.List_GET ( list_GET, ) where import Data.Aeson (encode) import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai.Matcher import Shared.Api.Resource.Error.ErrorJM () import Shared.Database.Migr...
a57d30e47fdc15f43b063ca20892c71fa83a13ba5b934ff3327f0dfbd1b7122c
irr/erl-tutorials
sql_app.erl
-module(sql_app). -vsn(1.0). -author(''). -behaviour(application). -export([start/0, start/2, stop/1]). start() -> application:start(sql). start(_StartType, _StartArgs) -> case 'sql_sup':start_link() of {ok, Pid} -> {ok, Pid}; Error -> Error end. stop(_State) -> ok.
null
https://raw.githubusercontent.com/irr/erl-tutorials/da68b1c08baf6bdf46e7e8d3381d796e93c0357c/mysql/src/sql_app.erl
erlang
-module(sql_app). -vsn(1.0). -author(''). -behaviour(application). -export([start/0, start/2, stop/1]). start() -> application:start(sql). start(_StartType, _StartArgs) -> case 'sql_sup':start_link() of {ok, Pid} -> {ok, Pid}; Error -> Error end. stop(_State) -> ok.
90e914084b5cb4ee363527505e713a38f3cdb5feab2d4f1c501fe303bb3b2519
input-output-hk/project-icarus-importer
Rendering.hs
module Rendering ( -- * General rendering functions render , renderBlock , renderBlocks , renderHeader ) where import qualified Data.Text as T import Formatting hiding (bytes) import Options (CLIOptions (..), PrintMode (..), UOM (..)) import Pos.Bina...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/tools/src/blockchain-analyser/Rendering.hs
haskell
* General rendering functions Not using `Serokell.Data.Memory.Units` here, as it will automatically "promote" each unit to the next multiplier. Example: > sformat memory (fromBytes @Byte 1000) > sformat memory (fromBytes @Byte 1025) What we want, instead, is to always convert from bytes to the requested unit of...
module Rendering render , renderBlock , renderBlocks , renderHeader ) where import qualified Data.Text as T import Formatting hiding (bytes) import Options (CLIOptions (..), PrintMode (..), UOM (..)) import Pos.Binary.Class (biSize) import Pos.Bl...
223604f29f04f38d53efac7a4e6fca4ce46b110afb5d347fdf1edd30a71ab89c
Decentralized-Pictures/T4L3NT
update.ml
open Tezt open Base let usage () = prerr_endline {|Usage: PIPELINE=<PIPELINE_ID> dune exec tezt/records/update.exe Example: to fetch test result records from /-/pipelines/426773806, run (from the root of the repository): PIPELINE=426773806 dune exec tezt/records/update.exe You can use the PROJECT environment ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/records/update.ml
ocaml
open Tezt open Base let usage () = prerr_endline {|Usage: PIPELINE=<PIPELINE_ID> dune exec tezt/records/update.exe Example: to fetch test result records from /-/pipelines/426773806, run (from the root of the repository): PIPELINE=426773806 dune exec tezt/records/update.exe You can use the PROJECT environment ...
2ba16ac9da0c50e116a58f6672ed24d6b0bfe1f39459ece7733b399cf366a2fe
music-suite/music-score
Context.hs
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DeriveFunctor # module Data.Functor.Context ( Ctxt(..), toCtxt, mapCtxt, extractCtxt, addCtxt, ) where import Control.Comonad import Control.Applicative import Control.Lens.Wrapped import Control.Lens.Is...
null
https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Data/Functor/Context.hs
haskell
| A value with a possible predecessor and successor. Can be used to traverse values with their immediate context. pure x = Ctxt (Nothing, x, Nothing) extract (Ctxt (b,x,a)) = x
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DeriveFunctor # module Data.Functor.Context ( Ctxt(..), toCtxt, mapCtxt, extractCtxt, addCtxt, ) where import Control.Comonad import Control.Applicative import Control.Lens.Wrapped import Control.Lens.Is...
830df1f50cf87b65bb407c3194a77c60633da5965afee8152744264ea20db2d3
mfikes/coal-mine
problem_24.cljc
(ns coal-mine.problem-24 (:require [coal-mine.checks :refer [defcheck-24] :rename {defcheck-24 defcheck}] [clojure.test])) (defcheck solution-169a25da reduce (partial + 0)) (defcheck solution-177490e2 (fn[s] (reduce + 0 s))) (defcheck solution-17c54075 (fn [s] (reduce + s))) (defcheck soluti...
null
https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_24.cljc
clojure
(fn add-seq [coll] (loop [coll coll sum 0] (if (= () coll) sum
(ns coal-mine.problem-24 (:require [coal-mine.checks :refer [defcheck-24] :rename {defcheck-24 defcheck}] [clojure.test])) (defcheck solution-169a25da reduce (partial + 0)) (defcheck solution-177490e2 (fn[s] (reduce + 0 s))) (defcheck solution-17c54075 (fn [s] (reduce + s))) (defcheck soluti...
9870d07225575a6c31429b0fa8f9597529c9d3eb9c08fa8cdea3294e3d9015cc
gregr/ina
bytevector.scm
(define (u8*->bytevector x*) (apply bytevector x*)) (define (bytevector->u8* x) (let ((len (bytevector-length x))) (let loop ((i 0)) (cond ((= i len) '()) (else (cons (bytevector-u8-ref x i) (loop (+ i 1)))))))) (define (bytevector-append . x*) (u8*->bytevector (apply append (map bytevect...
null
https://raw.githubusercontent.com/gregr/ina/8f73d50c516da3d6d54218be53b2436a7d59ad7d/nscheme/include/base/bytevector.scm
scheme
(define (u8*->bytevector x*) (apply bytevector x*)) (define (bytevector->u8* x) (let ((len (bytevector-length x))) (let loop ((i 0)) (cond ((= i len) '()) (else (cons (bytevector-u8-ref x i) (loop (+ i 1)))))))) (define (bytevector-append . x*) (u8*->bytevector (apply append (map bytevect...
5530226b5a4897926dcf5c1f86f1b3c24477d17a21aed3ab344cf5ea93815fce
vyorkin/tiger
temp.mli
(** Abstract name for a local variable (or a formal parameter) that is temporarily held in a register *) type t [@@deriving show] (** Abstract name for a static memory address that is yet to be determined *) type label [@@deriving show] (** Returns a new temporary from an infinite set of temporaries *) va...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter6/lib/temp.mli
ocaml
* Abstract name for a local variable (or a formal parameter) that is temporarily held in a register * Abstract name for a static memory address that is yet to be determined * Returns a new temporary from an infinite set of temporaries * Returns a new [label], whose assembly-language name is the given...
type t [@@deriving show] type label [@@deriving show] val mk : unit -> t val mk_label : string option -> label val print_label : label -> string
a8c49a2b0818badcdf5f0e1929a3321056a304568316098fed95e1a9b5f1679f
Feuerlabs/exo
exo_ssh.erl
%%%---- BEGIN COPYRIGHT ------------------------------------------------------- %%% Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one ...
null
https://raw.githubusercontent.com/Feuerlabs/exo/fe515e08178c122599eb1b7cbd21446cd63d550b/src/exo_ssh.erl
erlang
---- BEGIN COPYRIGHT ------------------------------------------------------- ---- END COPYRIGHT --------------------------------------------------------- @doc @end ssh_channel callbacks external api -include_lib("ssh/src/ssh_connect.hrl"). fixme: ? On mac osx the {ip_v6_disabled, true} is buggy and causes p...
Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. @author < > exo client direct tcpip socket Created : 24 May 2012 by ...
cdd7ed45e47260458400571b6b2f910bd51affca4919e1bc2c3cedd41891a5ac
CoNarrative/precept
core.cljs
(ns ^:figwheel-always todomvc.core (:require-macros [secretary.core :refer [defroute]]) (:require [goog.events :as events] [reagent.core :as reagent] [secretary.core :as secretary] [precept.core :refer [start! then]] [todomvc.facts :refer [todo visibility-filter]] ...
null
https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/examples/todomvc/src/todomvc/core.cljs
clojure
(ns ^:figwheel-always todomvc.core (:require-macros [secretary.core :refer [defroute]]) (:require [goog.events :as events] [reagent.core :as reagent] [secretary.core :as secretary] [precept.core :refer [start! then]] [todomvc.facts :refer [todo visibility-filter]] ...
d76b0ab06f6e6d43ec7371b293831a5c347a7626e2e0a9f961cbef59caa943a3
elm-tooling/elm-language-server-haskell
Main.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE PackageImports #-} module Main ( main ) where import Control.Concurrent import Control.Concurrent.STM.TChan import qualified Control.Exception as Exception import Control.Lens...
null
https://raw.githubusercontent.com/elm-tooling/elm-language-server-haskell/de9be5b8bd08891bcfd5cb6769dfd3bcb6d9e132/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PackageImports # would conflict with elm-format's Reporting.Region The reactor is a process that serialises and buffers all requests from the reply sent. ^ injected into the reactor input by each of the individual callback handlers | The monad used in the reactor | The si...
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Main ( main ) where import Control.Concurrent import Control.Concurrent.STM.TChan import qualified Control.Exception as Exception import Control.Lens import Control.Monad import Control.Monad.IO.Class import Control....
624282be99671a8073ab3484760851c815f29a71ccceab2be475206e69592aef
ashinn/chibi-scheme
sort.scm
;; sort.scm -- SRFI-95 sorting utilities Copyright ( c ) 2009 . All rights reserved . ;; BSD-style license: (define (copy seq) (if (vector? seq) (let* ((len (vector-length seq)) (res (make-vector len))) (do ((i (- len 1) (- i 1))) ((< i 0) res) (vector-set! res...
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/95/sort.scm
scheme
sort.scm -- SRFI-95 sorting utilities BSD-style license:
Copyright ( c ) 2009 . All rights reserved . (define (copy seq) (if (vector? seq) (let* ((len (vector-length seq)) (res (make-vector len))) (do ((i (- len 1) (- i 1))) ((< i 0) res) (vector-set! res i (vector-ref seq i)))) (map (lambda (x) x) seq))) (defi...
51365663b4b3090f2d59fe25ba74a568a727b704bffc6520f5b305b8e618eb68
ocamllabs/ocaml-modular-implicits
blah.ml
type blah = | Foo | Bar of string
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-debugger/find-artifacts/in/blah.ml
ocaml
type blah = | Foo | Bar of string
4b39384bb2579cbf2d71409040f02523687634958f853fe8cfbc34a5ea78b1e5
facebook/flow
dependency_info.mli
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/server/env/dependency_info.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
4eebf8702cdb47fccd8dbbdefb1bbc190f0d1a9b7a8b0fb4919bd66158e4515f
schemedoc/implementation-metadata
vx.scm
(title "Vx-Scheme") (tagline "small, fast R4RS Scheme integrating with the VxWorks RTOS") (rnrs 4) (person "Colin Smith") (written-in "C++") (web (archive-url "20120723013430" "-smith.net/vx-scheme/")) (google-code "vx-scheme")
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/vx.scm
scheme
(title "Vx-Scheme") (tagline "small, fast R4RS Scheme integrating with the VxWorks RTOS") (rnrs 4) (person "Colin Smith") (written-in "C++") (web (archive-url "20120723013430" "-smith.net/vx-scheme/")) (google-code "vx-scheme")
0bff36e7557f9c75bfbf080c7d8afa305d867b3e96344dfab6da775ba72b44ef
8c6794b6/guile-tjit
t-subr-call-04.scm
Loop with subr - call , returned value from subr - call has Scheme double ;;; type. Number of iterations is kept low so that garbage collector ;;; won't run. (define (f n) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (+ acc (exact->inexact n)))))) (f 100)
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-subr-call-04.scm
scheme
type. Number of iterations is kept low so that garbage collector won't run.
Loop with subr - call , returned value from subr - call has Scheme double (define (f n) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (+ acc (exact->inexact n)))))) (f 100)
98fe140863261f2310e1539efc7ca6bad1776d351937d95e96af3b0600791a8e
bitblaze-fuzzball/fuzzball
exec_no_influence.ml
Copyright ( C ) 2010 Ensighta Security Inc. All rights reserved . Copyright (C) 2010 Ensighta Security Inc. All rights reserved. *) module V = Vine class virtual influence_manager = object method virtual take_measure_eip : Vine.exp -> unit method virtual take_measure_expr : Vine.exp -> Vine.exp -> u...
null
https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/exec_no_influence.ml
ocaml
Copyright ( C ) 2010 Ensighta Security Inc. All rights reserved . Copyright (C) 2010 Ensighta Security Inc. All rights reserved. *) module V = Vine class virtual influence_manager = object method virtual take_measure_eip : Vine.exp -> unit method virtual take_measure_expr : Vine.exp -> Vine.exp -> u...
a9592acc489b29f2662caeb05c45a5f9301ebd243435a8f6b253bf5f6023ea9f
discoproject/disco
disco.erl
-module(disco). -export([get_setting/1, has_setting/1, settings/0]). -export([host/1, name/1]). -export([slave_name/1, slave_node/1, slave_safe/1, slave_for_url/1]). -export([jobhome/1, jobhome/2, joburl/2, joburl_to_localpath/1]). -export([data_root/1, data_path/2, ddfs_root/2]). -export([local_cluster/0, preferred_h...
null
https://raw.githubusercontent.com/discoproject/disco/be65272d3eecca184a3c8f2fa911b86ac87a4e8a/master/src/disco.erl
erlang
based on ensure_dir() in /usr/lib/erlang/lib/stdlib-1.17/src/filelib.erl
-module(disco). -export([get_setting/1, has_setting/1, settings/0]). -export([host/1, name/1]). -export([slave_name/1, slave_node/1, slave_safe/1, slave_for_url/1]). -export([jobhome/1, jobhome/2, joburl/2, joburl_to_localpath/1]). -export([data_root/1, data_path/2, ddfs_root/2]). -export([local_cluster/0, preferred_h...
31caf6b41bfed8f29e22c0feaff7fbaf505c6f397e7513abdad6ada5817c6f00
2nishantg/hScraper
HScraper.hs
| A library to parse , crawl and scrape webpages . An example : @ import HScraper main : : IO ( ) main = do html < - parseSite " " let q1 = getParsedQuery " a[movieCover ] " print $ html | > > q1 let q2 = getParsedQuery " a " let ans = html | > > q2 mapM _ ( print . getAttribut...
null
https://raw.githubusercontent.com/2nishantg/hScraper/d2cb0d8ee4a9729fecc06701b76c03d763e49d44/HScraper.hs
haskell
get all hyperlinks . get all hyperlinks.
| A library to parse , crawl and scrape webpages . An example : @ import HScraper main : : IO ( ) main = do html < - parseSite " " let q1 = getParsedQuery " a[movieCover ] " print $ html | > > q1 let q2 = getParsedQuery " a " let ans = html | > > q2 @ A library to parse, crawl ...
4006b4fe78e8dcc32ab8938de90c61e14e1dc770e9b4dc4c6b25ff7fa96e823d
Ramarren/cl-parser-combinators
test-arithmetic.lisp
(in-package :parser-combinators-tests) (defsuite* (arithmetic-test :in parser-combinators-tests)) ;;; define parser for basic +-*/ arithmetic on natural numbers (no negatives) ;;; is having to define parser for every level of precedence cheating? easy enough to generate ;;; automatically though (def-cached-parser f...
null
https://raw.githubusercontent.com/Ramarren/cl-parser-combinators/9c7569a4f6af5e60c0d3a51d9c15c16d1714c845/test-arithmetic.lisp
lisp
define parser for basic +-*/ arithmetic on natural numbers (no negatives) is having to define parser for every level of precedence cheating? easy enough to generate automatically though
(in-package :parser-combinators-tests) (defsuite* (arithmetic-test :in parser-combinators-tests)) (def-cached-parser factor-op? (choice1 (mdo (char? #\/) (result (curry #'list '/))) (mdo (char? #\*) (result (curry #'list '*))))) (def-cached-parser factor* (chainl1* (nat*) (factor-op?))) (def-cached...
5eb1722bb60753e34dddf792b0425aa1805f9f73ae2c007dbba34831089d8074
conreality/conreality
messaging.mli
(* This is free and unencumbered software released into the public domain. *) (** Messaging protocols. *) module Topic : sig #include "messaging/topic.mli" end (** Consensus Command and Control Protocol (CCCP). *) (* See: *) module CCCP : sig #include "messaging/cccp.mli" end #ifdef ENABLE_IRC (* See: *) modu...
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/messaging.mli
ocaml
This is free and unencumbered software released into the public domain. * Messaging protocols. * Consensus Command and Control Protocol (CCCP). See: See: See: See: See: See: -specification-1.2.html
module Topic : sig #include "messaging/topic.mli" end module CCCP : sig #include "messaging/cccp.mli" end #ifdef ENABLE_IRC module IRC : sig #include "messaging/irc.mli" end #endif module MQTT : sig #include "messaging/mqtt.mli" end module ROS : sig #include "messaging/ros.mli" end module STOMP : sig ...