_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
688de0a126531d062ae9791c251a0d8d95fd67ff8e54caa33e36fa2137936483
zotonic/zotonic
m_identity.erl
@author < > 2009 - 2022 %% @doc Manage identities of users. An identity can be an username/password, openid, oauth credentials etc. %% @end Copyright 2009 - 2022 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. ...
null
https://raw.githubusercontent.com/zotonic/zotonic/86d9c7b3456040babc87b60263de1b0f4ea63cf1/apps/zotonic_core/src/models/m_identity.erl
erlang
@doc Manage identities of users. An identity can be an username/password, openid, oauth credentials etc. @end 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...
@author < > 2009 - 2022 Copyright 2009 - 2022 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(m_identity). -author("Marc Worrell <"). -behaviour(zotonic_model). -export([ m_get/3, is_user/2,...
e60b115dcd442b52960807d56d0d6e5e02b524c88153ab6bd2c4198ad9e8c54b
hopv/MoCHi
map_.mli
(** Maps *) type ('a, 'b) _elem = 'a * 'b type ('a, 'b) _t = ('a, 'b) _elem list * { 6 Printers } val pr_elem : (Format.formatter -> 'a -> unit) -> (Format.formatter -> 'b -> unit) -> Format.formatter -> ('a, 'b) _elem -> unit val pr : (Format.formatter -> 'a -> unit) -> (Format.formatter -> 'b -> unit) ->...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/map_.mli
ocaml
* Maps * @raise Not_found if [x] is not in [dom f]
type ('a, 'b) _elem = 'a * 'b type ('a, 'b) _t = ('a, 'b) _elem list * { 6 Printers } val pr_elem : (Format.formatter -> 'a -> unit) -> (Format.formatter -> 'b -> unit) -> Format.formatter -> ('a, 'b) _elem -> unit val pr : (Format.formatter -> 'a -> unit) -> (Format.formatter -> 'b -> unit) -> Format.fo...
658cc9e32ef64445c6d6e12ac5d26f22be13002a09190048672159f45bbc327d
mflatt/shrubbery-rhombus-0
parsed.rkt
#lang racket/base (require (for-syntax racket/base) "parse.rkt") (provide (for-syntax parsed unparsed)) (begin-for-syntax (define (parsed v) #`(parsed #,v)) (define (unparsed d) #`(rhombus-expression (group #,d))))
null
https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/afdcfb9655f48a36d9ff26a75f38035a950f273c/rhombus/private/parsed.rkt
racket
#lang racket/base (require (for-syntax racket/base) "parse.rkt") (provide (for-syntax parsed unparsed)) (begin-for-syntax (define (parsed v) #`(parsed #,v)) (define (unparsed d) #`(rhombus-expression (group #,d))))
5a1e856ea743e80b1e23a3e298339e2017984933bba336bf90ff2d151e7bf7da
btmura/b1
Header.hs
module B1.Program.Chart.Header ( HeaderInput(..) , HeaderOutput(..) , HeaderOptions(..) , HeaderState , HeaderButton(..) , HeaderStatusStyle(..) , drawHeader , newHeaderState ) where import Control.Monad import Data.Maybe import Data.Time import Graphics.Rendering.FTGL import Graphics.Rendering.OpenG...
null
https://raw.githubusercontent.com/btmura/b1/9cf0514ba1e03e9f4da05be9231acde07b199864/src/B1/Program/Chart/Header.hs
haskell
| Draws header starting from the upper left corner to the bottom right corner. TODO: Improve texture choosing to not hardcode numbers Doesn't render anything
module B1.Program.Chart.Header ( HeaderInput(..) , HeaderOutput(..) , HeaderOptions(..) , HeaderState , HeaderButton(..) , HeaderStatusStyle(..) , drawHeader , newHeaderState ) where import Control.Monad import Data.Maybe import Data.Time import Graphics.Rendering.FTGL import Graphics.Rendering.OpenG...
7fa452e9aa596986185bdbc3c6706eed8b33f92a671e6d753c9def667bf485c2
noughtmare/hypercube
Util.hs
| Module : Hypercube . Util Description : Utility functions Copyright : ( c ) Jaro Reinders , 2017 License : GPL-3 Maintainer : This module contains miscellaneous utility functions . Module : Hypercube.Util Description : Utility functions Copyright : (c) Jaro Reinders, 2017 Licens...
null
https://raw.githubusercontent.com/noughtmare/hypercube/d3d343a2b9dd651568cb0ff859cbf583ae340712/src/Hypercube/Util.hs
haskell
4x antialiasing OpenGL 3.3 Core Profile (or better)
| Module : Hypercube . Util Description : Utility functions Copyright : ( c ) Jaro Reinders , 2017 License : GPL-3 Maintainer : This module contains miscellaneous utility functions . Module : Hypercube.Util Description : Utility functions Copyright : (c) Jaro Reinders, 2017 Licens...
630ebe04aa9f9dadb8ec9400ce1969a1bec00e4925c984f55f75732ffc42a1be
ucsd-progsys/liquidhaskell
AbsPosTest.hs
module AbsPosTest where {-@ f :: Int -> {n:Int | n >= 0} @-} f :: Int -> Int f x = abs x {-@ g :: {n:Int | n >= 0} -> {m:Int | m = n} @-} g :: Int -> Int g x = abs x {-@ h :: {n:Int | n < 0} -> {m:Int | m = -n} @-} h :: Int -> Int h x = abs x {-@ f2 :: Int -> {n:Int | n >= 0} @-} f2 :: Int -> Int f2 x = abs x
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/e63a8f45036ad77fd151508469ba813aec83994a/tests/pos/AbsPosTest.hs
haskell
@ f :: Int -> {n:Int | n >= 0} @ @ g :: {n:Int | n >= 0} -> {m:Int | m = n} @ @ h :: {n:Int | n < 0} -> {m:Int | m = -n} @ @ f2 :: Int -> {n:Int | n >= 0} @
module AbsPosTest where f :: Int -> Int f x = abs x g :: Int -> Int g x = abs x h :: Int -> Int h x = abs x f2 :: Int -> Int f2 x = abs x
ebdd55ccb327a8bd8e0fc0423121cd4bb7f0f1875dfa9045c37b4175bb51a61d
Clozure/ccl-tests
proclaim.lsp
;-*- Mode: Lisp -*- Author : Created : Sat May 21 07:33:53 2005 ;;;; Contains: Tests of PROCLAIM (in-package :cl-test) (deftest proclaim.1 (let ((sym (gensym))) (proclaim `(special ,sym)) (eval `(flet ((%f () ,sym)) (let ((,sym :good)) (%f))))) :good) (deftest proclaim.2 (let ((sym...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/proclaim.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of PROCLAIM Error cases
Author : Created : Sat May 21 07:33:53 2005 (in-package :cl-test) (deftest proclaim.1 (let ((sym (gensym))) (proclaim `(special ,sym)) (eval `(flet ((%f () ,sym)) (let ((,sym :good)) (%f))))) :good) (deftest proclaim.2 (let ((sym (gensym))) (proclaim `(declaration ,sym)) (procl...
53cddcabd412772d84a316d587390a53b27514dd39dd1d35b7d3dbba3516776f
RDTK/generator
package.lisp
;;;; package.lisp --- Package definition for the version module. ;;;; Copyright ( C ) 2014 , 2019 Jan Moringen ;;;; Author : < > (cl:defpackage #:build-generator.version (:use #:cl #:alexandria #:split-sequence #:iterate #:let-plus) ;; Versions (:export #:parse-version #:print-versio...
null
https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/version/package.lisp
lisp
package.lisp --- Package definition for the version module. Versions
Copyright ( C ) 2014 , 2019 Jan Moringen Author : < > (cl:defpackage #:build-generator.version (:use #:cl #:alexandria #:split-sequence #:iterate #:let-plus) (:export #:parse-version #:print-version #:version= #:version< #:version>= #:version-matches) (:documentation ...
b54075af86785d61193ac62be9148339bac817dc1a47d6a995332123ae34c06a
Tim-ats-d/Tim-lang
type.ml
open Value type t = Unit | Bool | Int | String | Cmd | List let of_value = function | VUnit -> Unit | VBool _ -> Bool | VInt _ -> Int | VString _ -> String | VCmd _ -> Cmd | VList _ -> List let to_string = function | Unit -> "Unit" | Bool -> "Bool" | Int -> "Int" | String -> "String" | Cmd -> "...
null
https://raw.githubusercontent.com/Tim-ats-d/Tim-lang/0a5a4451fbec2bd29f57b6db38b430b7d1269ec7/src/ast/type.ml
ocaml
open Value type t = Unit | Bool | Int | String | Cmd | List let of_value = function | VUnit -> Unit | VBool _ -> Bool | VInt _ -> Int | VString _ -> String | VCmd _ -> Cmd | VList _ -> List let to_string = function | Unit -> "Unit" | Bool -> "Bool" | Int -> "Int" | String -> "String" | Cmd -> "...
10e93bb127b634dca4b4a8fc03b505126e29ed2f753f0da2d0744a8feb8c8f75
portkey-cloud/aws-clj-sdk
_2013-02-18.clj
(ns portkey.aws.opsworks.-2013-02-18 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "opsworks", :region "ap-northeast-1"}, :ssl-common-name "opsworks.ap-northeast-1.amazonaws.com", :endpoint "-northeast-1.amazonaws.com", :signature-version :v4}, "eu-west-1"...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/opsworks/_2013-02-18.clj
clojure
(ns portkey.aws.opsworks.-2013-02-18 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "opsworks", :region "ap-northeast-1"}, :ssl-common-name "opsworks.ap-northeast-1.amazonaws.com", :endpoint "-northeast-1.amazonaws.com", :signature-version :v4}, "eu-west-1"...
110d4609d28d073a510e2cc9ab7a26f5fa160a3b7f277770795796722871e326
hasufell/hpath
IO.hs
-- | Module : HPath . IO Copyright : © 2016 -- License : BSD3 -- Maintainer : < > -- Stability : experimental -- Portability : portable -- This module provides high - level IO related file operations like -- copy, delete, move and so on. It only operates on /Path x/ which -- guara...
null
https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-io/src/HPath/IO.hs
haskell
| License : BSD3 Stability : experimental Portability : portable copy, delete, move and so on. It only operates on /Path x/ which guarantees us well-typed paths. This is a thin wrapper over encouraged to use this module. Some of these operations are due to their nature __not atomic__, which of them...
Module : HPath . IO Copyright : © 2016 Maintainer : < > This module provides high - level IO related file operations like System . . RawFilePath . Directory in ' hpath - directory ' . It 's means they may do multiple syscalls which form one context . Some Note : ` BlockDevice ` , ` ...
9013830856b09cbb0062093b15697db41e321b795735b7491d9a5643215c28c2
anchpop/wise_mans_haskell
writefoldl1.hs
foldl1' :: (a -> a -> a) -> [a] -> a foldl1' f [x] = x foldl1' f (x:y:xs) = let firstfold = f x y in foldl1' f (firstfold:xs)
null
https://raw.githubusercontent.com/anchpop/wise_mans_haskell/021ca3f3d96ebc0ecf2daf1a802fc33d067e24cc/haskelltests/should_compile/writefoldl1.hs
haskell
foldl1' :: (a -> a -> a) -> [a] -> a foldl1' f [x] = x foldl1' f (x:y:xs) = let firstfold = f x y in foldl1' f (firstfold:xs)
deca33680b1beebfcfa17c9d2281fb0897bb0a1decad748848070499178c1e00
xapi-project/xenopsd
xenops_sandbox.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xenopsd/837d1ce49f2bb68092298a3d0a3dbaeb82c10058/lib/xenops_sandbox.ml
ocaml
can access fields, but can only be created through of_domid and create * [absolute_path_outside chroot path] returns the absolute path outside the chroot * [chroot_path_inside path] returns the path when inside the chroot * [destroy chroot] Deletes the chroot the chrooted daemon will have r-x permissions
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
228fee2942c22bbc58450beb8b1dbc0a8c3c5cf604ce0a73ce97d757fd52c053
lspitzner/brittany
Test227.hs
type instance MyFam (Maybe a) = a -> Bool
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test227.hs
haskell
type instance MyFam (Maybe a) = a -> Bool
9390dd424de1aa7cb0fd173ac9a24d45886b1ea0a39d4cec64fffc0eea708821
robert-strandh/SICL
enable-object-creation.lisp
(cl:in-package #:sicl-boot-phase-5) (defun enable-object-initialization (e3 e4) (setf (env:constant-variable (env:client e3) e3 'sicl-clos::+unbound-slot-value+) 10000000) (load-source-file "CLOS/slot-bound-using-index.lisp" e3) (load-source-file "CLOS/standard-instance-access.lisp" e3) (load-source-fi...
null
https://raw.githubusercontent.com/robert-strandh/SICL/8fd2219546a15f610873fb1b90e9eb8a157d72ba/Code/Boot/Phase-5/enable-object-creation.lisp
lisp
(cl:in-package #:sicl-boot-phase-5) (defun enable-object-initialization (e3 e4) (setf (env:constant-variable (env:client e3) e3 'sicl-clos::+unbound-slot-value+) 10000000) (load-source-file "CLOS/slot-bound-using-index.lisp" e3) (load-source-file "CLOS/standard-instance-access.lisp" e3) (load-source-fi...
7f9ad34c1908b736714f2600126166f198322e2dd62561e6144b5cc40bc5486b
ocaml/opam
opamBuiltinZ3.dummy.ml
(**************************************************************************) (* *) (* Copyright 2019 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/ocaml/opam/2f146b3a26721490f444b51b144a8bda2d3eb047/src/solver/opamBuiltinZ3.dummy.ml
ocaml
************************************************************************ Copyright 2019 OCamlPro All rights reserved. This ...
GNU Lesser General Public License version 2.1 , with the special open OpamCudfSolverSig let name = "builtin-dummy-z3-solver" let is_present () = false let ext = ref None let command_name = None let preemptive_check = false let default_criteria = { crit_default = ""; crit_upgrade = ""; crit_fixup ...
6e9122ac92e7674ddc266b056e0c99357fc8bb20f5036d6a4a3afcea706f1053
javazquez/arnoldclj_interpreter
interpret_branch_statement_test.clj
(ns arnoldclj_s.interpret-branch-statement-test (:use midje.sweet) (:use arnoldclj_s.interpreter)) (fact "function using a simple if statement" (with-out-str (roll-credits "IT'S SHOWTIME HEY CHRISTMAS TREE vartrue YOU SET US UP @NO PROBLEMO BECAUSE I'M GOING TO SAY PLEASE vartr...
null
https://raw.githubusercontent.com/javazquez/arnoldclj_interpreter/d6860d7063a121103293b10dca65b113ad843d26/test/arnoldclj_s/interpret_branch_statement_test.clj
clojure
revisit this revisit this!
(ns arnoldclj_s.interpret-branch-statement-test (:use midje.sweet) (:use arnoldclj_s.interpreter)) (fact "function using a simple if statement" (with-out-str (roll-credits "IT'S SHOWTIME HEY CHRISTMAS TREE vartrue YOU SET US UP @NO PROBLEMO BECAUSE I'M GOING TO SAY PLEASE vartr...
fc3977ab621cc095231c9de0b9e39fdd1729c395ef987b3534e1e4bc97dd9384
clojure-interop/google-cloud-clients
InstanceAdminClient.clj
(ns com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient "Service Description: Cloud Spanner Instance Admin API The Cloud Spanner Instance Admin API can be used to create, delete, modify and list instances. Instances are dedicated Cloud Spanner serving and storage resources to be used by Cloud Spanner ...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.clj
clojure
" this prevents any future fields in [][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know about them. - `com.google.protobuf.FieldMask`
(ns com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient "Service Description: Cloud Spanner Instance Admin API The Cloud Spanner Instance Admin API can be used to create, delete, modify and list instances. Instances are dedicated Cloud Spanner serving and storage resources to be used by Cloud Spanner ...
69830dc801f374e25055fd83bea7a9c3d227f0ffe18826c5ff808ff5575d474b
elastic/eui-cljs
get_selected_option_for_search_value.cljs
(ns eui.get-selected-option-for-search-value (:require ["@elastic/eui/lib/components/combo_box/matching_options.js" :as eui])) (def getSelectedOptionForSearchValue eui/getSelectedOptionForSearchValue) (def getMatchingOptions eui/getMatchingOptions) (def flattenOptionGroups eui/flattenOptionGroups)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/get_selected_option_for_search_value.cljs
clojure
(ns eui.get-selected-option-for-search-value (:require ["@elastic/eui/lib/components/combo_box/matching_options.js" :as eui])) (def getSelectedOptionForSearchValue eui/getSelectedOptionForSearchValue) (def getMatchingOptions eui/getMatchingOptions) (def flattenOptionGroups eui/flattenOptionGroups)
44e82f45bda1148253e3ad02cc0aa0ed676a32fdc4bce795671313c4cda805e7
mindreframer/clojure-stuff
mysql.clj
(ns korma.test.mysql (:require [clojure.java.jdbc :as jdbc] [korma.mysql :as mysql]) (:use clojure.test korma.config korma.core korma.db)) (defdb test-db-mysql (mysql {:db "korma" :user "korma" :password "kormapass"})) (defdb test-db-non-mysql (oracle {:db "korma" :user "korma"...
null
https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/korma/Korma/test/korma/test/mysql.clj
clojure
(ns korma.test.mysql (:require [clojure.java.jdbc :as jdbc] [korma.mysql :as mysql]) (:use clojure.test korma.config korma.core korma.db)) (defdb test-db-mysql (mysql {:db "korma" :user "korma" :password "kormapass"})) (defdb test-db-non-mysql (oracle {:db "korma" :user "korma"...
be385eb1fad310bda7816d01d2fde4d3032323bcd02f7ff3d48128ae291d30e3
unnohideyuki/bunny
sample148.hs
main = do print $ 10 `compare` 100 print $ 'z' `compare` 'b' print $ max 8 100 print $ min 8 100 print $ max 'a' 'b' print $ min 'a' 'b'
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample148.hs
haskell
main = do print $ 10 `compare` 100 print $ 'z' `compare` 'b' print $ max 8 100 print $ min 8 100 print $ max 'a' 'b' print $ min 'a' 'b'
23a7703006aff82d16e61929164ab7ecc8f03b8500a4e57b2c8b02305ef39ed3
gja/pwa-clojure
app_state.cljs
(ns pwa-clojure.app-state) (defonce app-state (atom {}))
null
https://raw.githubusercontent.com/gja/pwa-clojure/a06450747c6ead439d1a74653a34afe415d8ef02/src-cljs/pwa_clojure/app_state.cljs
clojure
(ns pwa-clojure.app-state) (defonce app-state (atom {}))
6b8fad38b8bea888a4fbd758de3b41b89bb44f0f5d8b46b9f6d08c963a4729fa
jordanthayer/ocaml-search
rdb_get_path.ml
(** A simple stand-alone program that will build a path for the given set of keys. *) let usage () = (* Print the usage string. *) Verb.pe Verb.always "Usage:\nrdb_get_path <root> <key=value> [<key=value>...]\n"; exit 1 let rec get_attrs ?(accum=[]) ary i = (* Get the key=value attributes from th...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/rdb/rdb_get_path.ml
ocaml
* A simple stand-alone program that will build a path for the given set of keys. Print the usage string. Get the key=value attributes from the given argument array.
let usage () = Verb.pe Verb.always "Usage:\nrdb_get_path <root> <key=value> [<key=value>...]\n"; exit 1 let rec get_attrs ?(accum=[]) ary i = if Array.length ary > i then match Str.split (Str.regexp "=") ary.(i) with | key::vl::[] -> get_attrs ~accum:((key, vl)::accum) ary (i + 1) | _ -> ...
bf620ca998fee829137dd62e0ecd5ff52d46a7b4c32d581073b6af99a56d2bc9
robstewart57/rdf4h
AlgebraicGraph.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # [ TODO ] Remove when the missing NFData instance is added to Alga . module Data.RDF.Graph.AlgebraicGraph ( AlgebraicGraph, ) where import q...
null
https://raw.githubusercontent.com/robstewart57/rdf4h/22538a916ec35ad1c46f9946ca66efed24d95c75/src/Data/RDF/Graph/AlgebraicGraph.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE EmptyDataDecls #
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # [ TODO ] Remove when the missing NFData instance is added to Alga . module Data.RDF.Graph.AlgebraicGraph ( AlgebraicGraph, ) where import qualified Algebra.Graph.Labelled as G import Control.DeepSeq (NFD...
e2b1a84afc8c0f4ba84fb3bef4c677dc226e8b84d553bc7a6b66008409011359
anmonteiro/lumo
core.cljs
(ns test-check.core (:require [cljs.spec.alpha :as s])) (s/fdef ranged-rand :args (s/and (s/cat :start int? :end int?) #(< (:start %) (:end %))) :ret int? :fn (s/and #(>= (:ret %) (-> % :args :start)) #(< (:ret %) (-> % :args :end)))) (defn ranged-rand ;; BROKEN! "Returns random...
null
https://raw.githubusercontent.com/anmonteiro/lumo/6709c9f1b7b342c8108e6ed6e034e19dc786f00b/src/test/cljs_build/test_check/core.cljs
clojure
BROKEN!
(ns test-check.core (:require [cljs.spec.alpha :as s])) (s/fdef ranged-rand :args (s/and (s/cat :start int? :end int?) #(< (:start %) (:end %))) :ret int? :fn (s/and #(>= (:ret %) (-> % :args :start)) #(< (:ret %) (-> % :args :end)))) "Returns random int in range start <= rand < ...
5dbbe22f7f03805a2b039a3c67b22cb3632221b7b458985d27d8d2d4484edb59
jixiuf/helloerlang
server_socket_monitor.erl
-module(server_socket_monitor). -export([status/0,start_link/0,start_link/2]). -export([code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2]). -include("../include/base_header.hrl"). -include("../include/debug.hrl"). -define(DEFUALT_LISTEN_PORT,8888). -define(RECBUF_SIZE, 8192). %% The backl...
null
https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/game_demo/src/net/server_socket_monitor.erl
erlang
The backlog value defines the maximum length that the queue of pending connections may grow to. gen_tcp默认值为5 所以客户端依然可以连服务器,直到backlog队列已满, 因为此时已经不再进行accept了,所以放到队列里的连接不会被处理 除非有旧连接断开,等到下次accept时,才会从中取连接处理 已连接客户端数 参照 假如,我定义 的消息格式为 而这4个字节用来表时消息类型 {ok, Listen} = gen_tcp:listen(Port, [binary, {active, false},{packet ...
-module(server_socket_monitor). -export([status/0,start_link/0,start_link/2]). -export([code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2]). -include("../include/base_header.hrl"). -include("../include/debug.hrl"). -define(DEFUALT_LISTEN_PORT,8888). -define(RECBUF_SIZE, 8192). -define(NODEL...
2a63e625f7339757de7b90adb997f6a762234725fae4b666e9986931e61387eb
dgllghr/interval-map
interval_map.mli
type order = | Asc | Desc module type Comparable = sig type t val compare : t -> t -> int * [ compare a b ] Returns an integer less than zero if the first argument is strictly less than the second , zero if the arguments are equal , and an integer greater than zero if the first argument is str...
null
https://raw.githubusercontent.com/dgllghr/interval-map/2936dd48e39ed8f929ba80623e9a26cbee56f55d/lib/interval_map.mli
ocaml
* [min_lower bound_a bound_b] chooses the minimum lower bound between [bound_a] and [bound_b] * [max_upper bound_a bound_b] chooses the maximum upper bound between [bound_a] and [bound_b] * [create low high] creates an interval from the [low] bound and the [high] bound. Raises [Invalid_interva...
type order = | Asc | Desc module type Comparable = sig type t val compare : t -> t -> int * [ compare a b ] Returns an integer less than zero if the first argument is strictly less than the second , zero if the arguments are equal , and an integer greater than zero if the first argument is str...
7984163911826d79009926e49e21cde48e9517053397a06c12d2addc5217ba83
masatoi/cl-random-forest
mnist-multi-grained-scanning.lisp
(in-package :clrf) (defparameter dir (asdf:system-relative-pathname :cl-random-forest "dataset/")) (defparameter mnist-dim 784) (defparameter mnist-n-class 10) (defvar mnist-datamatrix) (defvar mnist-target) (defvar mnist-datamatrix-test) (defvar mnist-target-test) (defun read-mnist-dataset () (format t "Reading tr...
null
https://raw.githubusercontent.com/masatoi/cl-random-forest/6d004b23af496fdb76dca06b808c19715a387437/example/classification/mnist-multi-grained-scanning.lisp
lisp
Cleaning intractable
(in-package :clrf) (defparameter dir (asdf:system-relative-pathname :cl-random-forest "dataset/")) (defparameter mnist-dim 784) (defparameter mnist-n-class 10) (defvar mnist-datamatrix) (defvar mnist-target) (defvar mnist-datamatrix-test) (defvar mnist-target-test) (defun read-mnist-dataset () (format t "Reading tr...
00941c6132601959866acb8ada8bd8fb855695718d6b8423575dfc4c61fcff9a
arttuka/reagent-material-ui
home_work_sharp.cljs
(ns reagent-mui.icons.home-work-sharp "Imports @mui/icons-material/HomeWorkSharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def home-work-sharp (create-svg...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/home_work_sharp.cljs
clojure
(ns reagent-mui.icons.home-work-sharp "Imports @mui/icons-material/HomeWorkSharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def home-work-sharp (create-svg...
ec5fab48e3bb45f0fbbb6b82f5df3035f40b7703fc57b4aa5e0629adc05ccc59
aryx/xix
printf.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/strings/printf.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . $ I d : printf.ml , v 1.5 1996/04/30 14:50:28 xleroy Exp $ external format_int: string -> int -> string = "fo...
0818b00c7b84af82142efada9e1a2445ed666ec4f1b992c131fe19c47dd9f651
tek/chiasma
SelectWindowParams.hs
module Chiasma.Data.SelectWindowParams where import Prelude hiding (last) import Chiasma.Class.CmdArgs (CmdArgs (cmdArgs), flag1) import Chiasma.Data.Target (Target) data SelectWindowParams = SelectWindowParams { last :: Bool, next :: Bool, previous :: Bool, toggle :: Bool, target :: Target }...
null
https://raw.githubusercontent.com/tek/chiasma/51751e19a416a9afe12f7797df8a67990b266240/packages/chiasma/lib/Chiasma/Data/SelectWindowParams.hs
haskell
module Chiasma.Data.SelectWindowParams where import Prelude hiding (last) import Chiasma.Class.CmdArgs (CmdArgs (cmdArgs), flag1) import Chiasma.Data.Target (Target) data SelectWindowParams = SelectWindowParams { last :: Bool, next :: Bool, previous :: Bool, toggle :: Bool, target :: Target }...
42e34092917f87ca58aa00a60638219c8db37ccdaa521e8b24b5e2af9a699b6d
axelarge/advent-of-code
day17.clj
(ns advent-of-code.y2015.day17 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def input (get-input 2015 17)) (defn parse [input] (->> (find-ints input) (sort (comp - compare)))) (defn combos [volume containers] (if (zero? volume) [[]] (->> (iterate rest co...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2015/day17.clj
clojure
(ns advent-of-code.y2015.day17 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def input (get-input 2015 17)) (defn parse [input] (->> (find-ints input) (sort (comp - compare)))) (defn combos [volume containers] (if (zero? volume) [[]] (->> (iterate rest co...
39482aa8b4ddfcfcdd247e2f6a26c37cc38d1a864c93dcf29a72c257760af410
trskop/dot.config
Main.hs
-- | -- Module: Main -- Description: TODO: Description Copyright : ( c ) 2018 - 2020 License : BSD3 -- -- Maintainer: -- Stability: experimental Portability : GHC specific language extensions . -- -- TODO: Description module Main (main) where import Control.Applicative ((<|>), many) import D...
null
https://raw.githubusercontent.com/trskop/dot.config/9dbd2e5eb07ddd74e817a762e3b6ba823d3e2965/yx/toolset/app-yx-this/Main.hs
haskell
| Module: Main Description: TODO: Description Maintainer: Stability: experimental TODO: Description TODO: Features provided by the original `this` script that would be nice to preserve: - `--edit` [--fzf] [CONFIG_SELECTOR] -- Fast way to open a configuration file in editor. For some of them i...
Copyright : ( c ) 2018 - 2020 License : BSD3 Portability : GHC specific language extensions . module Main (main) where import Control.Applicative ((<|>), many) import Data.Foldable (asum) import Data.Monoid (Endo(..), mempty) import CommandWrapper.Subcommand.Prelude ( HaveCompletionInfo(completi...
f5682e9bdea5b843b4f5b5f44b516e389dca52e959fb240ee8b2f1b659cfcc1d
inhabitedtype/ocaml-aws
test_async.ml
open Aws_sqs_test module T = TestSuite (struct type 'a m = 'a Async.Deferred.t let run_request = Aws_async.Runtime.run_request let un_m v = Async.Thread_safe.block_on_async_exn (fun () -> v) end)
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/sqs/lib_test/test_async.ml
ocaml
open Aws_sqs_test module T = TestSuite (struct type 'a m = 'a Async.Deferred.t let run_request = Aws_async.Runtime.run_request let un_m v = Async.Thread_safe.block_on_async_exn (fun () -> v) end)
05312e73518835ed8aee5f8fa0110b91ca8a31bdca11fa4b1038518b1b178ca6
bluelisp/hemlock
buffer.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; ;;; ;;; ******************************************...
null
https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/buffer.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- ********************************************************************** ********************************************************************** This file contains functions for changing modes and buffers. because it is defined too late --amb defined in main.lisp --amb...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . Written by (in-package :hemlock-internals) )) (defun buffer-writable (buffer) "Returns whether buffer may be modified." (buffer-%writable buffer)...
0354b58f0e7303284965547b48b6af2eecfc87b80698f9faaa5ffc671d5a5b82
karlhof26/gimp-scheme
elsamuko-deep-color.scm
; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; ; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ; (at your option) any later v...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/83000c57a82148103601036bdc4e3fafd5edf8f1/elsamuko-deep-color.scm
scheme
The GIMP -- an image manipulation program This program is free software; you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 675 Mass Ave , Cambridge , , USA . Copyright ( C ) 2010 elsamuko < > (define (elsamuko-deep-color aimg adraw ...
88651c3a4eab3fc14e08af9845845c9be140f1fca55f55096c6c6f58400908f9
supki/ldap-client
login.hs
# LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} -- | An example of how to do LDAP logins with ldap-client. -- First , the assumptions this example makes . It defaults to LDAP over TLS , so if you only have a plaintext server , please replace ` Secure ` with ` Plain ` . -- It also assumes the account...
null
https://raw.githubusercontent.com/supki/ldap-client/e69fc50d73b29adcb2dc18cdb149fcc34df37c96/example/login.hs
haskell
# LANGUAGE OverloadedStrings # | An example of how to do LDAP logins with ldap-client. It also assumes the accounts you may want to log in as all have `objectClass` "Person". To run the example you have to provide a bunch of environment variables: - `HOST` is the LDAP host to connect to (without "ldap://", "l...
# LANGUAGE OverloadedLists # First , the assumptions this example makes . It defaults to LDAP over TLS , so if you only have a plaintext server , please replace ` Secure ` with ` Plain ` . - ` MANAGER_DN ` is the DN of the account the first bind is made with . - ` MANAGER_PASSWORD ` is its password . module...
b0d2cebe63ca14f41c38544e8ebf95a1bdab08fdb4d1efeebe77d9dfffb64ad4
silky/quipper
Sampling.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE ...
null
https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/Libraries/Sampling.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== # LANGUAGE TypeSynonymInstances # -------------------------------------------------------------------- | This module provides function...
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the # LANGUAGE FlexibleInstances # module Libraries.Sampling ( Interval(..), * Zero class Zero(..), Random, sample_all, sample_step, sample_random, sample_all0, sample_step0, sample_random0 ) where import L...
a68d72aef5e8112470ebb8c5abe243ccefef855a43403b09b4556825af52cf94
Eonblast/Scalaxis
jsonrpc.erl
Copyright ( C ) 2006 < > < > %% All rights reserved. %% %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: %% 1 . Redistributions of source code must retain the above copyright %% no...
null
https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/contrib/yaws/src/jsonrpc.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in t...
Copyright ( C ) 2006 < > < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR ...
0470caaf21017071181e2075142acb5abd6ae7ee97d2cbed3c0bea434328823e
byteverse/bytesmith
BigEndian.hs
# language BangPatterns # # language BinaryLiterals # # language DataKinds # {-# language DeriveFunctor #-} # language DerivingStrategies # # language GADTSyntax # # language KindSignatures # # language LambdaCase # # language MagicHash # {-# language MultiWayIf #-} # language PolyKinds # # language RankNTypes # {-# la...
null
https://raw.githubusercontent.com/byteverse/bytesmith/6c08f916d2c6de1f55f1ec5d78160fadc96f1caa/src/Data/Bytes/Parser/BigEndian.hs
haskell
# language DeriveFunctor # # language MultiWayIf # # language ScopedTypeVariables # | Big-endian fixed-width numbers. * Unsigned * Signed * Many ** Unsigned big-endian, the implementation is optimized to simply @memcpy@ bytes into the result array. The result array always has elements in ^ Error message if not ...
# language BangPatterns # # language BinaryLiterals # # language DataKinds # # language DerivingStrategies # # language GADTSyntax # # language KindSignatures # # language LambdaCase # # language MagicHash # # language PolyKinds # # language RankNTypes # # language StandaloneDeriving # # language TypeApplications # # l...
7cea10312da16f02bbaa770464b1f99057200272a1dbe392289a159215eab2dc
s-expressionists/ctype
create.lisp
(in-package #:ctype) ;;; Make conjunctions and disjunctions. (defun conjunction (&rest ctypes) (cond ((null ctypes) (top)) ((null (rest ctypes)) (first ctypes)) (t (make-instance 'conjunction :ctypes ctypes)))) (defun disjunction (&rest ctypes) (cond ((null ctypes) (bot)) ((null (rest ctype...
null
https://raw.githubusercontent.com/s-expressionists/ctype/81ded4835b0f8f58e1c576822d45c0d3e85b346a/create.lisp
lisp
Make conjunctions and disjunctions. top and bottom types are special cases, so we give them particular normalized bottom ctypes must be identical to (bot). Others Note that this is NOT (values &rest nil), the type of (values). This type indicates no values are possible, as from an error. In the future, there may...
(in-package #:ctype) (defun conjunction (&rest ctypes) (cond ((null ctypes) (top)) ((null (rest ctypes)) (first ctypes)) (t (make-instance 'conjunction :ctypes ctypes)))) (defun disjunction (&rest ctypes) (cond ((null ctypes) (bot)) ((null (rest ctypes)) (first ctypes)) (t (make-ins...
d85b348e733e9aed76a0fc242817dfc855602a97d6e4df4322a3afa1296316b3
haskell-servant/servant
RequestSpec.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE OverloadedStrings #-} module Servant.Client.Core.RequestSpec (spec) where import Prelude () import Prelude.Compat import Control.Monad import Data.List (isInfixOf) import Servant.Client.Core.Request import T...
null
https://raw.githubusercontent.com/haskell-servant/servant/cb294aa2b35ae4db668f31bc63a794e2cf08605a/servant-client-core/test/Servant/Client/Core/RequestSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans # module Servant.Client.Core.RequestSpec (spec) where import Prelude () import Prelude.Compat import Control.Monad import Data.List (isInfixOf) import Servant.Client.Core.Request import Test.Hspec newtype DataWithRequest ...
24d8ee3a6c7411e26bc1f6daebfb6a1c8bb86ee9b94b2a9f1897a590d2eac183
yuriy-chumak/ol
container.scm
(define-library (lib gtk-3 container) (description "Base class for widgets which contain other widgets") (export GtkContainer* GTK_TYPE_CONTAINER gtk_container_get_type gtk_container_add gtk_container_remove gtk_container_foreach ) (import (scheme core) (otu...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/bfcefc78817f72ea688e7fac2fd0c1737ba0177a/libraries/lib/gtk-3/container.scm
scheme
...
(define-library (lib gtk-3 container) (description "Base class for widgets which contain other widgets") (export GtkContainer* GTK_TYPE_CONTAINER gtk_container_get_type gtk_container_add gtk_container_remove gtk_container_foreach ) (import (scheme core) (otu...
cf128bfd277b5a2268426821b096e13ec2cd4ec7e0f054d9a6e3574f0b984e1f
SquidDev/urn
term.lisp
(import lua/os os) (import lua/package package) (defun coloured-ansi (col msg) "Colour a string MSG coloured with COL, using ANSI escape codes" :hidden (.. "\27[" col "m" msg "\27[0m")) (define coloured? "Constant defining whether the current terminal has colour support" (with (term-ty (string/lower (or (an...
null
https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/io/term.lisp
lisp
If the terminal is dumb, then emit plain text. If '/' is the path separator then we're probably on a UNIX system.
(import lua/os os) (import lua/package package) (defun coloured-ansi (col msg) "Colour a string MSG coloured with COL, using ANSI escape codes" :hidden (.. "\27[" col "m" msg "\27[0m")) (define coloured? "Constant defining whether the current terminal has colour support" (with (term-ty (string/lower (or (an...
8d57969fa38bfcf11d83b6ad3ff1082b296f67c0d3c16e76ed8b48bcc4acaa5e
rowangithub/DOrder
135_pldi082_unbounded.ml
let rec loop x y n = let y = if (x <= n) then y + 1 else if (x >= n+1) then y - 1 else assert false in if (y < 0) then if n >= 0 then if y = (-1) then assert (x < 2*n + 3) else () else () else loop (x+1) y n let main n = let x = 0 in let y = 0 in if(n < 0) then () else ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/135_pldi082_unbounded.ml
ocaml
let rec loop x y n = let y = if (x <= n) then y + 1 else if (x >= n+1) then y - 1 else assert false in if (y < 0) then if n >= 0 then if y = (-1) then assert (x < 2*n + 3) else () else () else loop (x+1) y n let main n = let x = 0 in let y = 0 in if(n < 0) then () else ...
0ee0eec1d35cefbed17c953dddb77f731482aca917b30eaf3ed122629955ff4f
bondy-io/bondy
bondy_rbac_source_wamp_api.erl
%% ============================================================================= %% bondy_rbac_source_wamp_api.erl - %% Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with th...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_rbac_source_wamp_api.erl
erlang
============================================================================= bondy_rbac_source_wamp_api.erl - 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 WAR...
Copyright ( c ) 2016 - 2022 Leapsight . 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(bondy_rbac_source_wamp_api). -behaviour(bondy_wamp_api). -include_lib("wamp/include/wamp.hrl"). -inc...
d8433aed9991b96a04cf5253eb650349b19470d4c7efcb08e28e1fe4c6129dd8
facebook/infer
ClangWrapper.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/79cc22ffd41586a0cb82282f615d047aff0027cd/infer/src/clang/ClangWrapper.ml
ocaml
* commands output by [clang -###] * commands prior to [clang -###] treatment infer-capture-all flavour of buck produces path to generated file that doesn't exist. Create empty file empty file and pass that to clang. This is to enable compilation to continue massage line to remove edge-cases for sp...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
db5878e7f06e09c008c839dbd0caf20b9d11383cc10afc681f7c82f0071a7a8f
hanshuebner/bknr-web
stats.lisp
(in-package :bknr.stats) ;; The stats module is no longer supported because it uses a ;; standard-class definition and tries to make that persistent, which ;; does not work well with recent store changes. (eval-when (:compile-toplevel :load-toplevel :execute) (defclass log-stats () ((sessions :reader log-stats-...
null
https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/stats/stats.lisp
lisp
The stats module is no longer supported because it uses a standard-class definition and tries to make that persistent, which does not work well with recent store changes. '(time int) '(url int) '(user-agent int) '(url int) '(url int) '(user int) '(host int) '(int int)
(in-package :bknr.stats) (eval-when (:compile-toplevel :load-toplevel :execute) (defclass log-stats () ((sessions :reader log-stats-sessions :initarg :sessions :initform 0) (hits :reader log-stats-hits :initarg :hits :initform 0) (hits-per-hour :reader log-stats-hits-per-hour ...
c4c0deac080f3f15f72b0e0e139e3fdbe298790f5b31b3cc36edd25776b233d0
opentelemetry-beam/opentelemetry_zipkin
opentelemetry_zipkin.erl
-module(opentelemetry_zipkin). -export([init/1, export/3, shutdown/1]). -include_lib("kernel/include/logger.hrl"). -include_lib("opentelemetry_api/include/opentelemetry.hrl"). -include_lib("opentelemetry/include/otel_span.hrl"). -include("opentelemetry_zipkin_pb.hrl"). -define(DEFAULT_ZIPKIN_ADDRES...
null
https://raw.githubusercontent.com/opentelemetry-beam/opentelemetry_zipkin/ee785d294e7f4b324b333a94fcbde5ef285004ad/src/opentelemetry_zipkin.erl
erlang
failed to encode nothing to send debug=false, %% TODO: get from attributes? shared=false, %% TODO: get from attributes? remote_endpoint %% TODO: get from attributes?
-module(opentelemetry_zipkin). -export([init/1, export/3, shutdown/1]). -include_lib("kernel/include/logger.hrl"). -include_lib("opentelemetry_api/include/opentelemetry.hrl"). -include_lib("opentelemetry/include/otel_span.hrl"). -include("opentelemetry_zipkin_pb.hrl"). -define(DEFAULT_ZIPKIN_ADDRES...
2acea2f324db89127ccdc71fabe9430814f5fdf79f82e65821466162341d1cd6
racket/gui
init.rkt
#lang racket/base (require "pool.rkt" "queue.rkt") (define pump-thread (cocoa-start-event-pump)) (cocoa-install-event-wakeup)
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/cocoa/init.rkt
racket
#lang racket/base (require "pool.rkt" "queue.rkt") (define pump-thread (cocoa-start-event-pump)) (cocoa-install-event-wakeup)
ca80c8ae4a75a44f38502d350256e4c27ea38a3a22451ad0c4994776c5998240
williamleferrand/accretio
ecd_at_home_preschool.ml
(* * ecd_homeschool * * this playbook implements an experimental curriculum for preschoolers * * * *) open Lwt open Printf open CalendarLib open Calendar.Precise open Api open Eliom_content.Html5 open Eliom_content.Html5.D open Message_parsers open Toolbox let author = "" let name = "At home preschool" le...
null
https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/playbooks/ecd_at_home_preschool.ml
ocaml
* ecd_homeschool * * this playbook implements an experimental curriculum for preschoolers * * * principle of operation let's start with something simple. the supervisor can make suggestions & tag people based on the responses. the supervisor needs to come up with an entry stage for each suggesti...
open Lwt open Printf open CalendarLib open Calendar.Precise open Api open Eliom_content.Html5 open Eliom_content.Html5.D open Message_parsers open Toolbox let author = "" let name = "At home preschool" let description = "This playbook implements an at home preschool" let version = 0 let tags = "" let tag_man...
5f28fd0931e8e1c06304816666d5bc5e6d562091d65a94c568cf693da0e0c384
viercc/kitchen-sink-hs
A.hs
{-# LANGUAGE RankNTypes #-} module QualPolyKind.A where newtype A a = MkA (forall m. m a -> m a)
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/cef9de308d77c23f9e3b36510b30fb4bf7f770eb/snippets/src/QualPolyKind/A.hs
haskell
# LANGUAGE RankNTypes #
module QualPolyKind.A where newtype A a = MkA (forall m. m a -> m a)
c93107e634c2b6e42c2f0cd6f7ed3505df4bf0e2c2a50482de44f2f89d01d082
hsyl20/haskus-system
ControlGroup.hs
-- | Control-groups module Haskus.System.Linux.Process.ControlGroup ( ControlGroupEntry (..) , readControlGroup , parseControlGroup ) where import Prelude hiding (takeWhile) import Text.Megaparsec import Text.Megaparsec.Char import Text.Megaparsec.Char.Lexer hiding (space) import Data.Void import Haskus....
null
https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/System/Linux/Process/ControlGroup.hs
haskell
| Control-groups | Control group entry | Read /proc/[pid]/cgroup | Read /proc/[pid]/maps files
module Haskus.System.Linux.Process.ControlGroup ( ControlGroupEntry (..) , readControlGroup , parseControlGroup ) where import Prelude hiding (takeWhile) import Text.Megaparsec import Text.Megaparsec.Char import Text.Megaparsec.Char.Lexer hiding (space) import Data.Void import Haskus.Format.Binary.Buffer...
2187e6ab7251b3f884b473022479e0713b559868ea6d5fd8e91ae6bdcee5c3e7
riemann/riemann
prometheus_test.clj
(ns riemann.prometheus-test (:require [riemann.logging :as logging] [riemann.prometheus :as prometheus] [riemann.test-utils :refer [with-mock]] [clj-http.client :as client] [clojure.test :refer :all])) (logging/init) (deftest ^:prometheus prometheus-test-without-tags ...
null
https://raw.githubusercontent.com/riemann/riemann/1801ece30f37fa960bfb2af514842e50630b1247/test/riemann/prometheus_test.clj
clojure
(ns riemann.prometheus-test (:require [riemann.logging :as logging] [riemann.prometheus :as prometheus] [riemann.test-utils :refer [with-mock]] [clj-http.client :as client] [clojure.test :refer :all])) (logging/init) (deftest ^:prometheus prometheus-test-without-tags ...
4657258f87e0d9bbcf1c96ec5fd40a1dc06c2d4931b39e49676e43e2b2ddfea6
nunchaku-inria/nunchaku
TPTP_model_ast.ml
(* This file is free software, part of nunchaku. See file "license" for more details. *) (** {1 Simple Model AST} *) open Nunchaku_core module Fmt = CCFormat module T = FO_tptp type name = string type id = string type var = string type term = | App of id * term list | Var of var | Forall of var * term | A...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/parsers/TPTP_model_ast.ml
ocaml
This file is free software, part of nunchaku. See file "license" for more details. * {1 Simple Model AST} unfailing name -> ID some names were not in the input, such as constants convert a term back create fresh variables map members of [input_vars] to [vars] should be complete trivial domain
open Nunchaku_core module Fmt = CCFormat module T = FO_tptp type name = string type id = string type var = string type term = | App of id * term list | Var of var | Forall of var * term | And of term * term | Or of term * term | Not of term | Atom of term | Eq of term * term | Equiv of term * te...
94b8d1d4b7a02c8bc4c1d3f64d21df077689947bc0df278cae1b1c635d8eca19
input-output-hk/plutus-apps
State.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE MonoLocalBinds # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} module Spec.State where import Contr...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-contract/test/Spec/State.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators #
# LANGUAGE MonoLocalBinds # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Spec.State where import Control.Monad.Freer (Eff, run) import Control.Monad.Freer.Extras (raiseEnd) import Control.Monad.Freer.State import Data.Foldable (foldl') import Data.Ma...
801d574f6349058cd7a02e1fc682c2c00575cf9c4574868f269205778d987283
clash-lang/clash-compiler
Bundle.hs
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2017 - 2019 , Myrtle Software Ltd , Google Inc. 2019,2022 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > The Product / Signal isomorphism Copyright : (C) 2...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8c98dfd55094b0dd0faaeb1667a681965d077946/clash-prelude/src/Clash/Signal/Bundle.hs
haskell
# OPTIONS_HADDOCK show-extensions # ** Tools to emulate pre Clash 1.0 @Bundle ()@ instance ** Internal | Isomorphism between a 'Clash.Signal.Signal' of a product type (e.g. a tuple) and a Instances of 'Bundle' must satisfy the following laws: @ 'bundle' . 'unbundle' = 'id' 'unbundle' . 'bundle' = 'id' @ By ...
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2017 - 2019 , Myrtle Software Ltd , Google Inc. 2019,2022 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > The Product / Signal isomorphism Copyright : (C) 2...
31244e1c8dee2edcc6ee4a039c8581f783ed01a19d83c7060ba799b35cf93d68
mbenke/zpf2012
Wrapper.hs
-- Za -monad.html module Wrapper where newtype W a = W a deriving Show instance Functor W where -- fmap :: (a -> b) -> W a -> W b fmap f (W a) = W (f a) class Pointed f where pure :: a -> f a instance Pointed W where pure = W a, b :: W Int a = pure 1 b = fmap (+1) a zapakowaną wartość możemy : s = ...
null
https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Slides/06/Wrapper.hs
haskell
Za -monad.html fmap :: (a -> b) -> W a -> W b
module Wrapper where newtype W a = W a deriving Show instance Functor W where fmap f (W a) = W (f a) class Pointed f where pure :: a -> f a instance Pointed W where pure = W a, b :: W Int a = pure 1 b = fmap (+1) a zapakowaną wartość możemy : s = fmap (+1) t = s(s(a)) f :: Int -> W Int f x = W (x+1)...
9c73f4c9299e04ac0411f6d8541f730718ea0e678eb2c32dd61e0cb0fba7a40d
con-kitty/categorifier
Data.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Categorifier.Test.Data ( One (..), Oneof (..), Pair (..), ) where import qualified Categorifier.Client as Client import Data.Distributive (Distributive (..)) import Data.Functor.Rep (Representable) import GHC.Gen...
null
https://raw.githubusercontent.com/con-kitty/categorifier/54e8d6ad59d06ed6ed2c30256892f5225b363e67/plugin-test/Categorifier/Test/Data.hs
haskell
# LANGUAGE DeriveAnyClass # For DeriveAnyClass # ANN module "HLint: ignore Avoid restricted integration" # # ANN module "HLint: ignore Use newtype instead of data" #
# LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Categorifier.Test.Data ( One (..), Oneof (..), Pair (..), ) where import qualified Categorifier.Client as Client import Data.Distributive (Distributive (..)) import Data.Functor.Rep (Representable) import GHC.Generics (Generic, Generic1) |...
778af002f9321d52750cb25e9f68a4efb358e69934fd57206b2db7a81ee6211e
ocaml-flambda/ocaml-jst
pr9244.ml
(* TEST flags = " -w +A " * expect *) module type U = sig end [%%expect {| module type U = sig end |}] module M : sig module F2 (_ : U) : U end = struct module X = struct let x = 13 end module F1 (_ : U) = X module F2 (M : U) = F1 (M) end [%%expect {| Line 5, characters 8-9: 5 | let x = 13 ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/typing-warnings/pr9244.ml
ocaml
TEST flags = " -w +A " * expect
module type U = sig end [%%expect {| module type U = sig end |}] module M : sig module F2 (_ : U) : U end = struct module X = struct let x = 13 end module F1 (_ : U) = X module F2 (M : U) = F1 (M) end [%%expect {| Line 5, characters 8-9: 5 | let x = 13 ^ Warning 32 [unused-value-declara...
e0288786fe0b0c7906ce0bedc2aa79519b3a9aac16cbf7e57c47bb7ae3f71edc
metachord/netlink-hs
Internal.hs
module System.Linux.Netlink.Internal ( query , queryOne , module System.Linux.Netlink.Attributes , module System.Linux.Netlink.C , module System.Linux.Netlink.Constants , module System.Linux.Netlink.Protocol ) where import Control.Applicative ((<$>)) import Control.Monad (when)...
null
https://raw.githubusercontent.com/metachord/netlink-hs/d6b276fe5559aafb911b3e39e5a30a7217b907c3/System/Linux/Netlink/Internal.hs
haskell
module System.Linux.Netlink.Internal ( query , queryOne , module System.Linux.Netlink.Attributes , module System.Linux.Netlink.C , module System.Linux.Netlink.Constants , module System.Linux.Netlink.Protocol ) where import Control.Applicative ((<$>)) import Control.Monad (when)...
2cf6178a75fbd821a31a82a82e3adae4c45923f099a4250d48a0b76126772b9f
kblake/erlang-chat-demo
action_api.erl
Nitrogen Web Framework for Erlang Copyright ( c ) 2008 - 2010 See MIT - LICENSE for licensing information . -module (action_api). -include_lib ("wf.hrl"). -compile(export_all). render_action(Record) -> Anchor = Record#api.anchor, Name = Record#api.name, Tag = {api_event, Record}, [ wf:...
null
https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/apps/nitrogen/src/actions/action_api.erl
erlang
Nitrogen Web Framework for Erlang Copyright ( c ) 2008 - 2010 See MIT - LICENSE for licensing information . -module (action_api). -include_lib ("wf.hrl"). -compile(export_all). render_action(Record) -> Anchor = Record#api.anchor, Name = Record#api.name, Tag = {api_event, Record}, [ wf:...
8d91992fbc47fe5118b1c762c588a17966602412ae71c6a8ed9e909d157ac9b4
autolwe/autolwe
RewriteRules.ml
(* * Derived tactics for rewriting. *) (* ** Imports and abbreviations *) open Abbrevs open Util open Type open Syms open Expr open ExprUtils open Norm open NormUtils open NormField open Game open CoreTypes open Tactic open TheoryTypes module Ht = Hashtbl let mk_log level = mk_logger "Derive.RewriteRules" level "Rew...
null
https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Derived/RewriteRules.ml
ocaml
* Derived tactics for rewriting. ** Imports and abbreviations ** Derived rewriting tactics * ----------------------------------------------------------------------- * Unfold all lets and norm. * Unfold all lets and norm, also remove tuple projection. * Norm without unfolding. * Unfold without norm. * split e...
open Abbrevs open Util open Type open Syms open Expr open ExprUtils open Norm open NormUtils open NormField open Game open CoreTypes open Tactic open TheoryTypes module Ht = Hashtbl let mk_log level = mk_logger "Derive.RewriteRules" level "RewriteRules.ml" let log_t = mk_log Bolt.Level.TRACE let log_i = mk_log Bolt....
471beecd9ff4cab8de6c6551f2166256de0d0a63e64262ed3b3b7cc78af4874a
darrenldl/ProVerif-ATP
js_utils.ml
let alert (msg : string) : unit = Js_of_ocaml.Js.Unsafe.global##alert (Js_of_ocaml.Js.string msg) let set_display ~(id : string) ~(on : bool) : unit = let obj = Js_of_ocaml.Js.Unsafe.global##.document##getElementById (Js_of_ocaml.Js.string id) in obj##.style##.display := Js_of_ocaml.Js.string (if on ...
null
https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/narrator/src/js_utils.ml
ocaml
let alert (msg : string) : unit = Js_of_ocaml.Js.Unsafe.global##alert (Js_of_ocaml.Js.string msg) let set_display ~(id : string) ~(on : bool) : unit = let obj = Js_of_ocaml.Js.Unsafe.global##.document##getElementById (Js_of_ocaml.Js.string id) in obj##.style##.display := Js_of_ocaml.Js.string (if on ...
25dc7004527d7208f959ac841a278b8b64d0e47a181e64572f2788d987730637
DaMSL/K3
CArgs.hs
# LANGUAGE ViewPatterns # # LANGUAGE LambdaCase # # LANGUAGE TypeFamilies # module Language.K3.Analysis.CArgs (runAnalysis, eCArgs, isECArgs, isErrorFn) where import Control.Monad.Identity import Control.Arrow ((&&&)) import Data.Maybe (isJust) import Data.Tree import Language.K3.Core.Annotation import Language.K3.C...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Analysis/CArgs.hs
haskell
Assuming that all property annotations have already been attached to uses of annotation members, global functions or local bindings. (See Properties.hs) TODO Aliases
# LANGUAGE ViewPatterns # # LANGUAGE LambdaCase # # LANGUAGE TypeFamilies # module Language.K3.Analysis.CArgs (runAnalysis, eCArgs, isECArgs, isErrorFn) where import Control.Monad.Identity import Control.Arrow ((&&&)) import Data.Maybe (isJust) import Data.Tree import Language.K3.Core.Annotation import Language.K3.C...
01c0f523db468269568e0e41238b403774836b87520e20b6c1c4e02c5e3d86c1
janestreet/ecaml
defun_intf.ml
* [ Defun ] is an applicative binding of Elisp [ defun ] . It does for Elisp what [ Command ] does for the command line . It does for Elisp what [Command] does for the command line. *) open! Core open! Async_kernel open! Import module type S = sig type 'a t val return : 'a -> 'a t val map : 'a t ->...
null
https://raw.githubusercontent.com/janestreet/ecaml/6828e48c252e7bd756e2e37a5bacefe6c4af4ba9/src/defun_intf.ml
ocaml
* An optional argument whose [Value.Type.t] handles [nil] directly. * When a command defined with [~interactive:(Args f)] is called interactively, [f ()] is called to compute the argument values to supply to the command. Of course, the argument values should match the command's [Defun.t] ...
* [ Defun ] is an applicative binding of Elisp [ defun ] . It does for Elisp what [ Command ] does for the command line . It does for Elisp what [Command] does for the command line. *) open! Core open! Async_kernel open! Import module type S = sig type 'a t val return : 'a -> 'a t val map : 'a t ->...
5b3348f7d9e97f92cd80046af263997f33a1f4972ba96cff9060d38619621597
epiccastle/spire
curl.clj
(ns spire.module.curl (:require [spire.ssh :as ssh] [spire.facts :as facts] [spire.utils :as utils] [spire.remote :as remote] [spire.module.get-file :as get-file] [spire.module.rm :as rm] [clojure.string :as string] [clojure.java.io :...
null
https://raw.githubusercontent.com/epiccastle/spire/f1161ae5ff74124d603c1679507fc0a1b31c26eb/src/clj/spire/module/curl.clj
clojure
:upload "@foo.dat"}
(ns spire.module.curl (:require [spire.ssh :as ssh] [spire.facts :as facts] [spire.utils :as utils] [spire.remote :as remote] [spire.module.get-file :as get-file] [spire.module.rm :as rm] [clojure.string :as string] [clojure.java.io :...
ae5a7bfeaf1e6dd1cce77000d421dc31f224d54c7319b57dbb6bf08776b0ce16
mneedham/ranking-algorithms
core_test.clj
(ns ranking-algorithms.core-test (:use clojure.test ranking-algorithms.core)) (deftest pairs-of-values (let [args ["--server" "localhost" "--port" "8080" "--environment" "production"]] (is (= {:server "localhost" :port "8080" :environment "pr...
null
https://raw.githubusercontent.com/mneedham/ranking-algorithms/30d300170f60f24663c3d377ce68565427a42cb4/test/ranking_algorithms/core_test.clj
clojure
(ns ranking-algorithms.core-test (:use clojure.test ranking-algorithms.core)) (deftest pairs-of-values (let [args ["--server" "localhost" "--port" "8080" "--environment" "production"]] (is (= {:server "localhost" :port "8080" :environment "pr...
65bf8c0b61a50927297b1a6c6effef979676787188a8cde44f2789be0422db11
rowangithub/DOrder
45.ml
let rec loopa x y i j flag = if (Random.bool ()) then let x = x + 1 in let y = y + 1 in let i = i + x in let j = j + y in let j = if (flag > 0) then j+1 else j in loopa x y i j flag else x, y, i, j let rec loopc x y z w = if (Random.bool ()) then let x = if (w mod 2 = 1) then x+1 else x in let y ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/45.ml
ocaml
let rec loopa x y i j flag = if (Random.bool ()) then let x = x + 1 in let y = y + 1 in let i = i + x in let j = j + y in let j = if (flag > 0) then j+1 else j in loopa x y i j flag else x, y, i, j let rec loopc x y z w = if (Random.bool ()) then let x = if (w mod 2 = 1) then x+1 else x in let y ...
b2a105d7c6d83478516124910823ef2ce6def78c6121770204026c4f550e5f27
karlhof26/gimp-scheme
lalas_line-art.scm
; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; Advanced Line Art ( ) script for GIMP 2.3.4 Copyright ( C ) 2001 - 2005 Lasm < > ; ; ; ; ; Latest scripts available at / ; -fu/ ; ; Welcome to the Line Art Coffee House ; This Line Art Reference Model sc...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/09054a93e0607189cbc1a154f59e882577f4b923/lalas_line-art.scm
scheme
The GIMP -- an image manipulation program Latest scripts available at -fu/ Welcome to the Line Art Coffee House This Line Art Reference Model script is for coffee-connisseurs only who passed away during the design of version 3.0 This will be the last release. ----------------------...
Copyright ( C ) 1995 and Advanced Line Art ( ) script for GIMP 2.3.4 Copyright ( C ) 2001 - 2005 Lasm < > / If it does n't work for your images , perhaps you prefer the Bubble Tea House next door ? line-art.scm - lasm 's famous Line Art script a.k.a . Grand Mother 's Coffee Line - Art scr...
25cf798773968f6f6e013e5619b2ae0046acf2cacff2fdde9a32a2d9841d5c08
GaloisInc/curl
Curl.hs
{-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - unused - do - bind # -------------------------------------------------------------------- -- | -- Module : Network.Curl Copyright : ( c ) 2007 - 2009 , Galois Inc -- License : BSD3 -- -- Maintainer: Sigbjorn ...
null
https://raw.githubusercontent.com/GaloisInc/curl/185c5370fc5ee7bd6b5e75d9a90033932b4afe71/Network/Curl.hs
haskell
# LANGUAGE TypeSynonymInstances # ------------------------------------------------------------------ | Module : Network.Curl License : BSD3 Maintainer: Sigbjorn Finne <> Stability : provisional Portability: portable proven and feature-rich library for interacting with HTTP(S)\/FTP servers. appear to ...
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - unused - do - bind # Copyright : ( c ) 2007 - 2009 , Galois Inc A binding the libcurl library < / > , a The binding was initially made against version 7.16.2 ; libcurl does module Network.Curl ( module Network.Curl.Opts , module Netw...
d68767b2b5bb73408c95360473f101e897f90a1440ddc97272c2f6199a7cb4a9
NorfairKing/tickler
DeleteAccountSpec.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} module Tickler.Server.Handler.DeleteAccountSpec ( spec, ) where import qualified Network.HTTP.Types as Http import TestImport import Tickler.API.Gen () import Tickler.Client import Tickler.Server.TestUtils spec :: Spec spec =...
null
https://raw.githubusercontent.com/NorfairKing/tickler/1b0c05dc1d32847596bd3ffe4f93d094e1f6382a/tickler-server-gen/test/Tickler/Server/Handler/DeleteAccountSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Tickler.Server.Handler.DeleteAccountSpec ( spec, ) where import qualified Network.HTTP.Types as Http import TestImport import Tickler.API.Gen () import Tickler.Client import Tickler.Server.TestUtils spec :: Spec spec = withTicklerServer $ describe...
8f776ea63f9c48b6102805219a68ab5e13aa71b368cef1947d9c217301df608c
jekor/templatepg
Protocol.hs
|The Protocol module allows for direct , low - level communication with a -- PostgreSQL server over TCP/IP. You probably don't want to use this module -- directly. module Database.TemplatePG.Protocol ( PGException(..) , pgConnect , pgDisconnec...
null
https://raw.githubusercontent.com/jekor/templatepg/24a131aa533f823e125341fd95174ea14b200d66/Database/TemplatePG/Protocol.hs
haskell
PostgreSQL server over TCP/IP. You probably don't want to use this module directly. |PGMessage represents a PostgreSQL protocol message that we'll either send or receive. See <-message-formats.html>. |CommandComplete is bare for now, although it could be made to contain the number of rows affected by statem...
|The Protocol module allows for direct , low - level communication with a module Database.TemplatePG.Protocol ( PGException(..) , pgConnect , pgDisconnect , describeStatement ...
5f3617c3414ba2332402aefb1c75db1ed12324d858c7565291a228da98aba11c
norm2782/NanoProlog
Parser.hs
{-# LANGUAGE Rank2Types #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # module Language.Prolog.NanoProlog.Parser ( pFun , pRule , pTerm , pCons , pTerms , startParse ) where import Data.ListLike.Base (ListLike) import L...
null
https://raw.githubusercontent.com/norm2782/NanoProlog/30b3165fe462252ba6d8aafce9a4ce783aa3e066/src/Language/Prolog/NanoProlog/Parser.hs
haskell
# LANGUAGE Rank2Types # # LANGUAGE TypeSynonymInstances # ** Parsing Rules and Terms
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # module Language.Prolog.NanoProlog.Parser ( pFun , pRule , pTerm , pCons , pTerms , startParse ) where import Data.ListLike.Base (ListLike) import Language.Prolog.NanoProlog.NanoProlog import Text.Parser...
2189fff666643e8c81c33c2f6ac4bbcaf3a42ca765036626ee25af71571816fe
martintrojer/frinj
core_test.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/martintrojer/frinj/e588c8e022f13a59e529c19bc78657a4284d4e72/test/frinj/test/core_test.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns frinj.test.core-test (:use [clojure.test] [frinj.core]) (:import frinj.core.fjv)) (defn- core-test-fixture [f] (reset-state!) (f)) (use-fixtures :each core-test-fixture) (deftest add-u (do (add-unit! "o...
4ad7f74b5ff9ef4dfd204f5d1126d69e2b0a197a78a12a6212a68560aca09e73
glguy/utf8-string
Tests.hs
import Codec.Binary.UTF8.String import Test.HUnit (Test (TestCase, TestList, TestLabel), assertEqual, errors, failures, runTestTT) import System.Exit (exitFailure) import Control.Monad (when) main :: IO () main = do counts <- runTestTT tests when (errors counts > 0 || failures counts > 0) exitFailure tests ...
null
https://raw.githubusercontent.com/glguy/utf8-string/8604937e4273ef858585cd61f6437929498ea4d2/tests/Tests.hs
haskell
test decode . encode == id for the class of chars we know that to be true of
import Codec.Binary.UTF8.String import Test.HUnit (Test (TestCase, TestList, TestLabel), assertEqual, errors, failures, runTestTT) import System.Exit (exitFailure) import Control.Monad (when) main :: IO () main = do counts <- runTestTT tests when (errors counts > 0 || failures counts > 0) exitFailure tests ...
d10ad08524283e7412305db5ea5f2244861e014901af1b862b862ee8653951de
waddlaw/TAPL
Base.hs
{-# LANGUAGE OverloadedStrings #-} module Language.UntypedLambda.Lib.Base ( id, fix, -- * helper mkFix, ) where import Language.UntypedLambda.Lib.Bool import Language.UntypedLambda.Lib.Util import Language.UntypedLambda.Types import Prelude hiding ((.)) -- | λx. x id :: UntypedLambda id = λ "x" . "x...
null
https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/lambda-untyped/src/Language/UntypedLambda/Lib/Base.hs
haskell
# LANGUAGE OverloadedStrings # * helper | λx. x | λf. (λx. f (λy. x x y)) (λx. f (λy. x x y))
module Language.UntypedLambda.Lib.Base ( id, fix, mkFix, ) where import Language.UntypedLambda.Lib.Bool import Language.UntypedLambda.Lib.Util import Language.UntypedLambda.Types import Prelude hiding ((.)) id :: UntypedLambda id = λ "x" . "x" fix :: UntypedLambda fix = λ "f" . t @@ t where t = λ...
087f439b7d02a6dfaab6db66b9a8dcbb58e866000e6e128bae05cb8680d1c597
alex-hhh/ActivityLog2
bavg-util.rkt
#lang racket/base mmax-util.rkt -- utilities for Best Avg calculations ;; ;; This file is part of ActivityLog2, an fitness activity tracker Copyright ( C ) 2017 , 2018 < > ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publishe...
null
https://raw.githubusercontent.com/alex-hhh/ActivityLog2/36a4bb8af45db19cea02e982e22379acb18d0c49/rkt/bavg-util.rkt
racket
This file is part of ActivityLog2, an fitness activity tracker This program is free software: you can redistribute it and/or modify it any later version. This program is distributed in the hope that it will be useful, but WITHOUT without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ...
#lang racket/base mmax-util.rkt -- utilities for Best Avg calculations Copyright ( C ) 2017 , 2018 < > under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) (require data-frame racket/class ra...
965fa2cd477e8965b7a9e64e8863b0bb9099c2a02f235370f22d64c17b201fa0
TrustInSoft/tis-interpreter
evaluation.ml
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/engine/evaluation.ml
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
7180301a9d6fc82b836a2485e0002ee31177a6dc59c3285e942fa85165e2c631
eudoxia0/terminal-keypress
terminal-keypress.lisp
(in-package :cl-user) (defpackage terminal-keypress-test (:use :cl :fiveam) (:export :run-tests)) (in-package :terminal-keypress-test) (def-suite tests :description "terminal-keypress tests.") (in-suite tests) (defun run-tests () (run! 'tests))
null
https://raw.githubusercontent.com/eudoxia0/terminal-keypress/2ef48c045aa627229764b2aa393a83d392d93d08/t/terminal-keypress.lisp
lisp
(in-package :cl-user) (defpackage terminal-keypress-test (:use :cl :fiveam) (:export :run-tests)) (in-package :terminal-keypress-test) (def-suite tests :description "terminal-keypress tests.") (in-suite tests) (defun run-tests () (run! 'tests))
992057a204738a2409d9d13d5833d745cbb321389b682b4445d5686fda225a2b
cronokirby/haskell-in-haskell
0019.hs
apply f x = f x add x y = x + y -- OUT(20) main = apply (add 10) 10
null
https://raw.githubusercontent.com/cronokirby/haskell-in-haskell/83cb8114c7a71f2fc530d1865dd22776a3779417/integration_tests/0019.hs
haskell
OUT(20)
apply f x = f x add x y = x + y main = apply (add 10) 10
6e58c4e5b84c0883b6c050b88eddf3d1b30437ea7bc0967948da17eb675358e3
hhucn/decide3
schema.cljc
(ns decide.schema (:require [com.fulcrologic.guardrails.core :refer [>def]])) (>def :db/id pos-int?) (def schema [{:db/ident ::author :db/valueType :db.type/ref :db/cardinality :db.cardinality/one}]) (def rules '[ ;; ancestor rules [(child ?child ?parent) [?child :decide.models.proposa...
null
https://raw.githubusercontent.com/hhucn/decide3/a767033204151745273a5b7efeb9609d3c944297/src/main/decide/schema.cljc
clojure
ancestor rules approve rules
(ns decide.schema (:require [com.fulcrologic.guardrails.core :refer [>def]])) (>def :db/id pos-int?) (def schema [{:db/ident ::author :db/valueType :db.type/ref :db/cardinality :db.cardinality/one}]) (def rules '[ [(child ?child ?parent) [?child :decide.models.proposal/parents ?parent]] ...
269aad9502f78ed420495eeacdbe1c29522cf013c01155f396f095af36729e8e
timbod7/haskell-chart
example5.hs
import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Cairo import Data.Default.Class import Control.Lens import System.Environment(getArgs) chart = toRenderable layout where values = [ ("Mexico City",19.2,e), ("Mumbai",12.9,e), ("Sydney",4.3,e), ("London",8.3,e), ("New York",8.2,e1) ] e ...
null
https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/wiki-examples/example5.hs
haskell
import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Cairo import Data.Default.Class import Control.Lens import System.Environment(getArgs) chart = toRenderable layout where values = [ ("Mexico City",19.2,e), ("Mumbai",12.9,e), ("Sydney",4.3,e), ("London",8.3,e), ("New York",8.2,e1) ] e ...
7d01c0dddfcd310726cb0877558391b0884426a7230d97d36aa1a7aa31657a33
mrkkrp/parser-combinators
Permutations.hs
# LANGUAGE ExistentialQuantification # -- | -- Module : Control.Applicative.Permutations Copyright : © 2017 – present License : BSD 3 clause -- Maintainer : < > -- Stability : experimental -- Portability : portable -- This module is a generalization of the package @parsec - permu...
null
https://raw.githubusercontent.com/mrkkrp/parser-combinators/290852927db8e252baee8ac7521e153d377e01d3/Control/Applicative/Permutations.hs
haskell
| Module : Control.Applicative.Permutations Stability : experimental Portability : portable -permutation This module also takes inspiration from the algorithm is described in: -paper.pdf permutations over an 'Applicative' structure. Quite useful in conjunction Other permutation parsing librari...
# LANGUAGE ExistentialQuantification # Copyright : © 2017 – present License : BSD 3 clause Maintainer : < > This module is a generalization of the package @parsec - permutation@ authored by : /Parsing Permutation Phrases/ , by , and Doaitse Swierstra . Published as a functional...
bb5bc94e265730509ef9d31b09fc67acd8fd711fdc2f4acebd437a2adc8ad9fe
yurug/ocaml4.04.0-copatterns
spacetime.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/stdlib/spacetime.ml
ocaml
************************************************************************ OCaml ...
and , Copyright 2015 - -2016 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the external spacetime_enabled : unit -> bool = "caml_spacetime_enabled" [@@noalloc] let if_spacetime_enabled f = if spacetime_e...
eaf278bb359a45f051076bc2387d6f2c10556e2f49f1e5b8c150845499871197
g000001/arc-compat
conditionals.lisp
(in-package :arc) (in-readtable :common-lisp)
null
https://raw.githubusercontent.com/g000001/arc-compat/2506c0717ba5564695af5bd216d6d88236b3b6cd/conditionals.lisp
lisp
(in-package :arc) (in-readtable :common-lisp)
5c12e6ff6328bb21e7e56a3dd29d42549869873ce623f760245a39c185a47f45
huangjs/cl
tests.lisp
;;; all the performance benchmarks ;;; Time - stamp : < 2004 - 06 - 28 emarsden > (in-package :cl-bench) (defbench compiler :group :misc :function 'cl-bench.misc:run-compiler :long "Compilation of the Gabriel benchmarks" :runs 3 :disabled-for '(gcl armedbear)) (defbench load-fasl :group :...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cl-bench/tests.lisp
lisp
all the performance benchmarks this one takes ages to run this is really a test of the speed of loading a source file full of data
Time - stamp : < 2004 - 06 - 28 emarsden > (in-package :cl-bench) (defbench compiler :group :misc :function 'cl-bench.misc:run-compiler :long "Compilation of the Gabriel benchmarks" :runs 3 :disabled-for '(gcl armedbear)) (defbench load-fasl :group :misc :function 'cl-bench.misc:run-f...
d92c92d8394b8648c33022905be66aed4cab847f20ee095c3b7ea3360f178834
offby1/anagrams
anagrams.scm
(declare (uses dict)) (declare (uses bag)) (define (all-anagrams-internal bag dict) (define rv '()) (let loop ((dict dict)) (if (null? dict) rv (let ((key (caar dict)) (words (cdar dict))) (let ((smaller-bag (subtract-bags bag key))) (if smaller-bag ...
null
https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/chicken/anagrams.scm
scheme
(declare (uses dict)) (declare (uses bag)) (define (all-anagrams-internal bag dict) (define rv '()) (let loop ((dict dict)) (if (null? dict) rv (let ((key (caar dict)) (words (cdar dict))) (let ((smaller-bag (subtract-bags bag key))) (if smaller-bag ...
02554f9d261c077ea61fd4135d759b3e3889d5ce95c591262e66bc81bddf0c2d
2600hz/kazoo
props.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz @doc Mostly a drop - in replacement and extension of the proplists module , %%% but using the lists module to implement %%% @author @author This Source Code Form is subject to the terms of the Mozi...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_stdlib/src/props.erl
erlang
----------------------------------------------------------------------------- but using the lists module to implement @end ----------------------------------------------------------------------------- otherwise return the default ------------------------------------------------------------------------------ @doc ...
( C ) 2010 - 2020 , 2600Hz @doc Mostly a drop - in replacement and extension of the proplists module , @author @author 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 /. -module(prop...
86b75887eabe88f10087c4fa082d3fad07d3c01af4a7b733bca1fa70abc3343c
aspiwack/porcupine
Tests.hs
import qualified Test.Porcupine.PTask as PTask import Test.Tasty main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "tests" [ PTask.tests ]
null
https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-core/test/Tests.hs
haskell
import qualified Test.Porcupine.PTask as PTask import Test.Tasty main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "tests" [ PTask.tests ]
64c812f89706f444e284a67172464e045610050368d6f74c1ac02b247bae4a66
pokepay/aws-sdk-lisp
gamelift.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/gamelift (:use) (:use-reexport #:aws-sdk/services/gamelift/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/gamelift.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/gamelift (:use) (:use-reexport #:aws-sdk/services/gamelift/api))
95a427e023091d42e5d64990fb383850a9cd969c010ac31c1e2d8a6de7124c92
gphilipp/bdd-guide-clojure
core.clj
(ns calculator.core) (def add "Adds numbers" +)
null
https://raw.githubusercontent.com/gphilipp/bdd-guide-clojure/230b32a70fadc5fe3e051e0aa0510acecade3c13/src/calculator/core.clj
clojure
(ns calculator.core) (def add "Adds numbers" +)
db8a628c8fd44c2700a009d1c8fd14a48091adf4639ff5867ccd5c46fe36e1e0
mflatt/profj
java-signatures.scm
(module java-signatures mzscheme (require mzlib/unit) (require parser-tools/lex (lib "combinator-unit.ss" "combinator-parser") mzlib/string) (provide (all-defined)) ;Terminal signatures (define-signature java-operators^ ((terminals Operators (PIPE OR ...
null
https://raw.githubusercontent.com/mflatt/profj/cf2a5bd0c3243b4dd3a72093ae5eee8e8291a41d/profj/comb-parsers/java-signatures.scm
scheme
Terminal signatures General purpose signatures variable-declaration #;name)) Types, modifiers, operator signatures Expression signatures Statement signatures Member signatures Definition signatures
(module java-signatures mzscheme (require mzlib/unit) (require parser-tools/lex (lib "combinator-unit.ss" "combinator-parser") mzlib/string) (provide (all-defined)) (define-signature java-operators^ ((terminals Operators (PIPE OR OREQUAL GT LT ! ~ ? : =...
f7fc365aac2be07a2efcbdad1036c2dda41dab66a11b4aadf54f54553c72900e
restyled-io/restyled.io
PrivacyPolicy.hs
module Restyled.Handlers.PrivacyPolicy ( getPrivacyPolicyR ) where import Restyled.Prelude import Restyled.Foundation import Restyled.Yesod getPrivacyPolicyR :: Handler Html getPrivacyPolicyR = redirect @_ @Text "-io/restyled.io/wiki/Privacy-Policy"
null
https://raw.githubusercontent.com/restyled-io/restyled.io/2486edb6c9b352118d36f8f7cb06432be7fd7c4c/src/Restyled/Handlers/PrivacyPolicy.hs
haskell
module Restyled.Handlers.PrivacyPolicy ( getPrivacyPolicyR ) where import Restyled.Prelude import Restyled.Foundation import Restyled.Yesod getPrivacyPolicyR :: Handler Html getPrivacyPolicyR = redirect @_ @Text "-io/restyled.io/wiki/Privacy-Policy"
fe5bf716509db4929c9089794e7637f742c2d530fdae342d3e64885954229c28
ujamjar/hardcaml-zinc
memory.ml
type t = (Int64.t, Bigarray.int64_elt, Bigarray.c_layout) Bigarray.Array1.t
null
https://raw.githubusercontent.com/ujamjar/hardcaml-zinc/ad9360a66ddd239550623e3a92fe5328934706fa/src/memory.ml
ocaml
type t = (Int64.t, Bigarray.int64_elt, Bigarray.c_layout) Bigarray.Array1.t
ad744cba894ddce201ad4f76eee2921f4a708be86850b45ad4d4b30d9cf841e8
naga-framework/naga
naga_fcgi.erl
Copyright ( c ) 2011 , < > Copyright ( c ) 2015 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS...
null
https://raw.githubusercontent.com/naga-framework/naga/d859a7880228d3509cc12dc53e6f33c0edfeaf67/src/handlers/naga_fcgi.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 , < > Copyright ( c ) 2015 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(naga_fcgi). -author(...
332ef0d401456b9a9fef844e3ddf7e38f6b4828fbfdac1bc1b2bde0b5207246d
funcool/cats
builtin_spec.cljc
(ns cats.builtin-spec #?@(:cljs [(:require [cljs.test :as t] [clojure.test.check] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop :include-macros true] [cats.labs.test :as lt] [cats.builtin :as b...
null
https://raw.githubusercontent.com/funcool/cats/120c8f99afff9d9d92f4f690392a1ce1dc68e0b6/test/cats/builtin_spec.cljc
clojure
Map Vector Sequence Range Set Function Any All Sum Prod String
(ns cats.builtin-spec #?@(:cljs [(:require [cljs.test :as t] [clojure.test.check] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop :include-macros true] [cats.labs.test :as lt] [cats.builtin :as b...
e9ab22e8543c6ca75aa10b2ecb725f3d38a02da4ecebb993359a90639b73aa1c
janestreet/base
test_lazy.ml
open! Import open! Lazy let%test_unit _ = let r = ref 0 in let t = return () >>= fun () -> Int.incr r; return () in assert (!r = 0); force t; assert (!r = 1); force t; assert (!r = 1) ;; let%test_unit _ = let r = ref 0 in let t = return () >>= fun () -> lazy (Int.incr r) in asser...
null
https://raw.githubusercontent.com/janestreet/base/4d2f3f7ed9b8f20cef9d3ad582d986b7c78e0358/test/test_lazy.ml
ocaml
no needed, but the purpose of this test is not to test this compiler optimization [phys_equal] short-circuiting without [force] [force], resulting in [true] [force], resulting in [false]
open! Import open! Lazy let%test_unit _ = let r = ref 0 in let t = return () >>= fun () -> Int.incr r; return () in assert (!r = 0); force t; assert (!r = 1); force t; assert (!r = 1) ;; let%test_unit _ = let r = ref 0 in let t = return () >>= fun () -> lazy (Int.incr r) in asser...
490993ae6126abccb00c9e1beceab2982046967862af2f85d5b116397c69466d
realworldocaml/examples
broken_poly_with_annot.ml
type t = [ | `Add of t * t | `Sub of t * t | `Mul of t * t | `Num of int ] let rec algebra (x:t) = match x with | `Add (x,y) -> (algebra x) + (algebra y) | `Sub (x,y) -> (algebra x) - (algebra y) | `Mul (x,y) -> (algebra x) * (algebra y) | `Num x -> x let _ = algebra ( `Add ( (`Num 0...
null
https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/front-end/broken_poly_with_annot.ml
ocaml
type t = [ | `Add of t * t | `Sub of t * t | `Mul of t * t | `Num of int ] let rec algebra (x:t) = match x with | `Add (x,y) -> (algebra x) + (algebra y) | `Sub (x,y) -> (algebra x) - (algebra y) | `Mul (x,y) -> (algebra x) * (algebra y) | `Num x -> x let _ = algebra ( `Add ( (`Num 0...
28b831b37172459303005d80a46162c781b2686cd77e1637bf76c709ae630e0f
meta-ex/ignite
client.clj
(ns meta-ex.server.client (:use compojure.core compojure.route aleph.tcp gloss.core lamina.core clojure.data.json clojure.pprint meta-ex.server.client-fn)) (def client (tcp-client {:host "sam.aaron.name", :port 9901, :frame (string :utf-8 :delimiters ["\n"])}))...
null
https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/server/client.clj
clojure
(ns meta-ex.server.client (:use compojure.core compojure.route aleph.tcp gloss.core lamina.core clojure.data.json clojure.pprint meta-ex.server.client-fn)) (def client (tcp-client {:host "sam.aaron.name", :port 9901, :frame (string :utf-8 :delimiters ["\n"])}))...