_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
17bea8ac663449a67bac7ad3ef02a2742e305baffddd9e6da610f93a42acc4e8
jtkristensen/Jeopardy
Main.hs
module Main where -- In the future, the driver program goes here, but for now it is just used -- for experimentation {^o^}. import Core.Parser (Source, parseString, program_) import Transformations.Labeling import Analysis.ImplicitArguments fromRight :: Either a b -> b fromRight (Right b) = b fromRight _ ...
null
https://raw.githubusercontent.com/jtkristensen/Jeopardy/23be4d30592b1e9e9db640d1618ec76c54362d8b/app/Main.hs
haskell
In the future, the driver program goes here, but for now it is just used for experimentation {^o^}. Implicit arguments. main = print "Driver not yet implemented."
module Main where import Core.Parser (Source, parseString, program_) import Transformations.Labeling import Analysis.ImplicitArguments fromRight :: Either a b -> b fromRight (Right b) = b fromRight _ = undefined fibProgram :: Source fibProgram = "data nat = [zero] [suc nat]." ++ "...
ec362b544cc9a603bb922b382084e9b1c21a8e1c88d704cf3891195e80ba1cc0
MinaProtocol/mina
mina_base_call_stack_digest.mli
open Utils module Types : sig module type S = sig module V1 : sig type t = private Mina_base_zkapp_basic.F.V1.t end end end module type Concrete = sig module V1 : sig type t = Pasta_bindings.Fp.t end end module M : sig module V1 : sig type t = private Mina_base_zkapp_basic.F.V1.t en...
null
https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/mina_wire_types/mina_base/mina_base_call_stack_digest.mli
ocaml
open Utils module Types : sig module type S = sig module V1 : sig type t = private Mina_base_zkapp_basic.F.V1.t end end end module type Concrete = sig module V1 : sig type t = Pasta_bindings.Fp.t end end module M : sig module V1 : sig type t = private Mina_base_zkapp_basic.F.V1.t en...
097086b37b951601cce27b58ebaf043cf3de7263508d572f0fc7f610134b2600
bmeurer/ocaml-arm
vivi2.ml
let rec p i = [< '1; '2; p (i + 1) >] let vivi = [|3|]
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/ocamlbuild/test/test2/vivi2.ml
ocaml
let rec p i = [< '1; '2; p (i + 1) >] let vivi = [|3|]
aeae24a30eee78a8249a7531165498da7c7627b07f51154dc3e4595217eca42c
daypack-dev/daypack-lib
duration.mli
type t = { days : int; hours : int; minutes : int; seconds : int; } val zero : t val of_seconds : int64 -> (t, unit) result val to_seconds : t -> int64 val normalize : t -> t val duration_expr_parser : (t, unit) MParser.t val of_string : string -> (t, string) result module To_string : sig val human_rea...
null
https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/duration.mli
ocaml
type t = { days : int; hours : int; minutes : int; seconds : int; } val zero : t val of_seconds : int64 -> (t, unit) result val to_seconds : t -> int64 val normalize : t -> t val duration_expr_parser : (t, unit) MParser.t val of_string : string -> (t, string) result module To_string : sig val human_rea...
4f12cc278f45293996433e97e192c7a701db006b6ab823ee35fce266dbd5af7d
abyala/advent-2021-clojure
day05.clj
(ns advent-2021-clojure.day05 (:require [advent-2021-clojure.point :as p] [advent-2021-clojure.utils :refer [parse-int]] [clojure.string :as str])) (defn parse-line [line] (let [[x1 y1 x2 y2] (->> (re-matches #"(\d+),(\d+) -> (\d+),(\d+)" line) rest ...
null
https://raw.githubusercontent.com/abyala/advent-2021-clojure/b4e68291e42c2813f7b512c141e8a1b53716efee/src/advent_2021_clojure/day05.clj
clojure
(ns advent-2021-clojure.day05 (:require [advent-2021-clojure.point :as p] [advent-2021-clojure.utils :refer [parse-int]] [clojure.string :as str])) (defn parse-line [line] (let [[x1 y1 x2 y2] (->> (re-matches #"(\d+),(\d+) -> (\d+),(\d+)" line) rest ...
f78fb1e681d0903cad804bbff24d0578f66b2d7657fae1c3d0f103878af270d5
SFML-haskell/SFML
SFCopyable.hs
module SFML.SFCopyable where class SFCopyable a where | Copy the given SFML resource . copy :: a -> IO a
null
https://raw.githubusercontent.com/SFML-haskell/SFML/1d1ceee6bc782f4f194853fbd0cc4acb33b86d41/src/SFML/SFCopyable.hs
haskell
module SFML.SFCopyable where class SFCopyable a where | Copy the given SFML resource . copy :: a -> IO a
f986dce9f711209533c64e50b4f2497360c63fa231c1c00e2e475abbee199c05
janestreet/core_kernel
weak_pointer.ml
(* We implement a weak pointer using a [Weak_array.t]. *) open! Base type 'a t = 'a Weak_array.t let create () = Weak_array.create ~len:1 We use a weak array of length 1 , so the weak pointer is at index 0 . let index = 0 let get t = Weak_array.get t index let sexp_of_t sexp_of_a t = [%sexp (get t : a Heap_bloc...
null
https://raw.githubusercontent.com/janestreet/core_kernel/597299d11c2ee99f219592d89a5890f8f0b6dfe7/weak_pointer/src/weak_pointer.ml
ocaml
We implement a weak pointer using a [Weak_array.t].
open! Base type 'a t = 'a Weak_array.t let create () = Weak_array.create ~len:1 We use a weak array of length 1 , so the weak pointer is at index 0 . let index = 0 let get t = Weak_array.get t index let sexp_of_t sexp_of_a t = [%sexp (get t : a Heap_block.t option)] let is_none t = Weak_array.is_none t index l...
ac15ecda13cef595cd3f8b2828faec9c7e569c0738e555581a0c9c84549ac8f0
scrintal/heroicons-reagent
cloud_arrow_down.cljs
(ns com.scrintal.heroicons.solid.cloud-arrow-down) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M10.5 3.75a6 6 0 00-5.98 6.496A5.25 5.25 0 006.75 20.25H18a4.5 4.5 0 002....
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/cloud_arrow_down.cljs
clojure
(ns com.scrintal.heroicons.solid.cloud-arrow-down) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M10.5 3.75a6 6 0 00-5.98 6.496A5.25 5.25 0 006.75 20.25H18a4.5 4.5 0 002....
005e282457323db571c1d5201684ffb24fd4ba486586c42714aec30f5ae395cb
joaomilho/apalachin
auth_lib.erl
-module(auth_lib). -compile(export_all). redirect_to_signin() -> {redirect, "/signin"}. signin(Email, Password) -> boss_db:find(person, [{email, Email}, {password, Password}]). auth(UserId) -> case find_user_by_id(UserId) of undefined -> redirect_to_signin(); User -> {ok, User} end. find_user_by_ses...
null
https://raw.githubusercontent.com/joaomilho/apalachin/fdbcf43cf03d828d62463c219e0348c3b35a6a4c/src/lib/auth_lib.erl
erlang
-module(auth_lib). -compile(export_all). redirect_to_signin() -> {redirect, "/signin"}. signin(Email, Password) -> boss_db:find(person, [{email, Email}, {password, Password}]). auth(UserId) -> case find_user_by_id(UserId) of undefined -> redirect_to_signin(); User -> {ok, User} end. find_user_by_ses...
9df30768dd373e642ddb128f3e19bdc566cbf1a4b5cbbf18c0f971c518f90a07
marigold-dev/deku
michelson_primitives.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/marigold-dev/deku/5d578d6a6124ade1deff4ed88eac71de17a065fd/deku-c/tunac/lib/michelson_primitives.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2020 Metastate AG < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " ,...
43f5ce7e991efe371124bb381ccfd22792fc9dddf4c49e29d1d54f4b5ea4cc59
GNOME/aisleriot
sir-tommy.scm
AisleRiot - sir_tommy.scm Copyright ( C ) 2001 < > ; ; 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 version. ; ; This p...
null
https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/sir-tommy.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
AisleRiot - sir_tommy.scm Copyright ( C ) 2001 < > 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 (use-modules (aisleriot interface) (aisleriot api)) ...
6303794b06e63414dc72a7d92406ff5cd67b5f0825c961362c1a894d1f71f74a
tov/dssl2
parser.rkt
#lang racket/base (provide parse-dssl2) (require "lexer.rkt" "names.rkt" (only-in parser-tools/lex position-line position-col position-offset) parser-tools/yacc syntax/readerr) (require (for-syntax racket/base ...
null
https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/private/parser.rkt
racket
These statements are large if they contain large expressions… …but small if they contain small expressions.
#lang racket/base (provide parse-dssl2) (require "lexer.rkt" "names.rkt" (only-in parser-tools/lex position-line position-col position-offset) parser-tools/yacc syntax/readerr) (require (for-syntax racket/base ...
8c627ab48b282bc3aa72b0ec8b48b87e484509198d6fc0f49f187fd811278a8e
racket/racket7
test-runtime.rkt
#lang racket/load (require "test-harness.rkt" racket/private/unit-runtime) ;; check-unit (test-runtime-error exn:fail:contract? "result of unit expression was not a unit" (check-unit 1 'check-unit)) (test (void) (check-unit (make-unit 1 2 3 4 5) 'check-unit)) ;; check-helper (define...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/pkgs/racket-test/tests/units/test-runtime.rkt
racket
check-unit check-helper check-deps
#lang racket/load (require "test-harness.rkt" racket/private/unit-runtime) (test-runtime-error exn:fail:contract? "result of unit expression was not a unit" (check-unit 1 'check-unit)) (test (void) (check-unit (make-unit 1 2 3 4 5) 'check-unit)) (define sub-vector #((a . #((t . r1...
77e1ab788922a84462da16cfb1645f0c08a2c3d900d3d9c852b897b145de0e0b
oliyh/slacky
nav.cljs
(ns slacky.nav (:require [goog.events :as events] [secretary.core :as secretary]) (:import [goog.history Html5History EventType] [goog History])) taken from -client-side-routing-with-secretary-and-goog-history (aset js/goog.history.Html5History.prototype "getUrl_" (fn [token] ...
null
https://raw.githubusercontent.com/oliyh/slacky/909110e0555b7e443c3cf014c7c34b00b31c1a18/src/cljs/slacky/nav.cljs
clojure
set programmatically ; optional , make it look like a new page load
(ns slacky.nav (:require [goog.events :as events] [secretary.core :as secretary]) (:import [goog.history Html5History EventType] [goog History])) taken from -client-side-routing-with-secretary-and-goog-history (aset js/goog.history.Html5History.prototype "getUrl_" (fn [token] ...
b7658eabd0be4e1b19ae912fe9b0cb1959f9ba5086bc8f21c33f7db1a534301f
janestreet/camlp4-to-ppx
camlp4_to_ppx.ml
open Printf open StdLabels open Camlp4.PreCast open Syntax let module M = Camlp4OCamlParser.Make(Camlp4OCamlRevisedParser.Make(Camlp4.PreCast.Syntax)) in () let program_name = Filename.basename Sys.executable_name let input_file = match Sys.argv with | [| _; fname |] -> fname | _ -> Printf.eprintf "Usage...
null
https://raw.githubusercontent.com/janestreet/camlp4-to-ppx/5dc1cf5a3dc9e1d206d07c91a2468fd31df01e05/lib/camlp4_to_ppx.ml
ocaml
This happens with 0-length substitutions Update quotations Fix the Camlp4 lexer. Start locations are often wrong but end locations are always correct.
open Printf open StdLabels open Camlp4.PreCast open Syntax let module M = Camlp4OCamlParser.Make(Camlp4OCamlRevisedParser.Make(Camlp4.PreCast.Syntax)) in () let program_name = Filename.basename Sys.executable_name let input_file = match Sys.argv with | [| _; fname |] -> fname | _ -> Printf.eprintf "Usage...
da6616e48828d3c3af8e2580ad489ff731cc22799d2f863d5bb5268bb204a176
music-suite/music-suite
Generic.hs
# OPTIONS_GHC -fno - warn - orphans # -- | Provides ` GHC.Generic ` instances for ` Midi ` . module Codec.Midi.Generic where import GHC.Generics (Generic) import Codec.Midi (Midi(..), Message(..), TimeDiv(..), FileType(..)) deriving instance Generic Midi deriving instance Generic Message deriving instance Generi...
null
https://raw.githubusercontent.com/music-suite/music-suite/1856fece1152bd650449ff46bc2a4498d7a12dde/vendor/Codec/Midi/Generic.hs
haskell
|
# OPTIONS_GHC -fno - warn - orphans # Provides ` GHC.Generic ` instances for ` Midi ` . module Codec.Midi.Generic where import GHC.Generics (Generic) import Codec.Midi (Midi(..), Message(..), TimeDiv(..), FileType(..)) deriving instance Generic Midi deriving instance Generic Message deriving instance Generic Tim...
aa9a7cc17a1e159816a9b4b366a07c92e6ca461121b276e4e7768970788fb3d2
tonsky/grumpy
macros.cljs
(ns grumpy.core.macros (:require-macros grumpy.core.macros))
null
https://raw.githubusercontent.com/tonsky/grumpy/5d4876535cd1fd6ab2b5a2c6e21f522a9c3e4e21/src/grumpy/core/macros.cljs
clojure
(ns grumpy.core.macros (:require-macros grumpy.core.macros))
ffecbecdb43bc8cd9cc61831dda5f390fa1f5322ec7bafce504459397764bc07
naoiwata/sicp
q2.65.scm
;; @author naoiwata SICP Chapter2 question 2.65 (add-load-path "." :relative) (load "pages/2.3.3.scm") ; intersection-set (load "q2.62.scm") ; union-set tree->list (load "q2.64.scm") ; list->tree (define (make-tree f tree-a tree-b) (let ((list-a (tree->list-2 tree-a)) (list-b (tree->list-2 tree-b))) ...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/q2.65.scm
scheme
@author naoiwata intersection-set union-set list->tree END
SICP Chapter2 question 2.65 (add-load-path "." :relative) tree->list (define (make-tree f tree-a tree-b) (let ((list-a (tree->list-2 tree-a)) (list-b (tree->list-2 tree-b))) (list->tree (f list-a list-b)))) (define (union-set-tree tree-a tree-b) (make-tree union-set tree-a tree-b)) (define (i...
9d34c20db4ec0258deca53640c11f465ff12afa82b74449685f5d3b294c92d01
f-o-a-m/kepler
Server.hs
module Network.ABCI.Server where import Data.Conduit (runConduit, (.|)) import qualified Data.Conduit.List as CL import Data.Conduit.Network (AppData, ServerSettings, appSink, appSource, runTCPServer, ...
null
https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-server/src/Network/ABCI/Server.hs
haskell
| Default ABCI app network settings for serving on localhost at the standard port. | Serve an ABCI application with custom 'ServerSettings' and a custom action to perform on acquiring the socket resource. | Serve an ABCI application with default local 'ServerSettings' and a no-op on acquiring the socket resource.
module Network.ABCI.Server where import Data.Conduit (runConduit, (.|)) import qualified Data.Conduit.List as CL import Data.Conduit.Network (AppData, ServerSettings, appSink, appSource, runTCPServer, ...
7df8f802dbab7dd3215d2424b9b9aae74a26da483e9415e7bd36a16efac489ba
aaronc/fx-clj
core.clj
(ns fx-clj.core (:refer-clojure :exclude [run!]) (:require [potemkin :refer [import-vars]] [fx-clj.core.run] [fx-clj.core.pset] [fx-clj.hiccup] [fx-clj.enlive] [fx-clj.elements] [fx-clj.css] [fx-clj.core.i18n] [fx-clj.util] [fx-clj.sandbox] [fx-clj.core.transforms] [f...
null
https://raw.githubusercontent.com/aaronc/fx-clj/29639356d8d1253438ecf61e123caacefa9269ec/src/fx_clj/core.clj
clojure
(ns fx-clj.core (:refer-clojure :exclude [run!]) (:require [potemkin :refer [import-vars]] [fx-clj.core.run] [fx-clj.core.pset] [fx-clj.hiccup] [fx-clj.enlive] [fx-clj.elements] [fx-clj.css] [fx-clj.core.i18n] [fx-clj.util] [fx-clj.sandbox] [fx-clj.core.transforms] [f...
c0da2437aa9462909a102cec7330805ba232b53bba0e7193f6045b74d2f95d84
lisp/de.setf.xml
schema.lisp
20100512T202630Z00 ;;; from #<doc-node -guide/food.rdf #x181415E6> (common-lisp:in-package "-owl-guide-20030818/food#") (de.setf.resource.schema:defclass |-owl-guide-20031209/food#|::|BlandFish| (|-owl-guide-20031209/food#|:|Fish|) nil) (de.setf.re...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-w3-org/TR/2003/CR-owl-guide-20030818/food/schema.lisp
lisp
from #<doc-node -guide/food.rdf #x181415E6>
20100512T202630Z00 (common-lisp:in-package "-owl-guide-20030818/food#") (de.setf.resource.schema:defclass |-owl-guide-20031209/food#|::|BlandFish| (|-owl-guide-20031209/food#|:|Fish|) nil) (de.setf.resource.schema:defclass |-owl-guide-20031209/food...
34a0d60fbc91cc56cfde64387aeb1a7d79a2945dfbbb534593ffb3bf72952141
ekmett/linear-haskell
Array.hs
{-# LANGUAGE LinearTypes #-} # LANGUAGE ImportQualifiedPost # # LANGUAGE NoImplicitPrelude # -- | Same API as @Data . Array . Mutable . Linear@ , but freeze exports a Prim . Array -- rather than a Vector, and the constructor is exposed to match the -- @primitive@ API's style module Data.Primitive.Linear.Array ( -...
null
https://raw.githubusercontent.com/ekmett/linear-haskell/6f9e5c0e96d0c99d064ae027086db48c4fcfc63c/linear-primitive/src/Data/Primitive/Linear/Array.hs
haskell
# LANGUAGE LinearTypes # | rather than a Vector, and the constructor is exposed to match the @primitive@ API's style * Mutable Linear Arrays * Performing Computations with Arrays * Modifications * Accessors * Mutable-style interface
# LANGUAGE ImportQualifiedPost # # LANGUAGE NoImplicitPrelude # Same API as @Data . Array . Mutable . Linear@ , but freeze exports a Prim . Array module Data.Primitive.Linear.Array Array(Array), alloc, allocBeside, fromList, set, unsafeSet, resize, map, get, unsafeGet, siz...
391bb6b535506374543f9278a280d9a4229736818b6766874f8530edfcaefdd2
Clozure/ccl-tests
pathname-version.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Dec 6 14:45:16 2003 ;;;; Contains: Tests for PATHNAME-VERSION (in-package :cl-test) (compile-and-load "pathnames-aux.lsp") (deftest pathname-version.1 (loop for p in *pathnames* for version = (pathname-version p) unless (or (integerp version) (symbolp v...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/pathname-version.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for PATHNAME-VERSION section 19.3.2.1
Author : Created : Sat Dec 6 14:45:16 2003 (in-package :cl-test) (compile-and-load "pathnames-aux.lsp") (deftest pathname-version.1 (loop for p in *pathnames* for version = (pathname-version p) unless (or (integerp version) (symbolp version)) collect (list p version)) nil) (deftest pathname-vers...
22334353619042f1ad7f96ffa97366a68caa91f67af63fcf35c714b879f79883
Decentralized-Pictures/T4L3NT
tenderbake.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/tests/tenderbake.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
7bf4e2d0efd5fcda23435066e5a0f1fdf3c6c1e97d8861523770adabcea79b15
sheyll/mediabus
StreamSpec.hs
module Data.MediaBus.Conduit.StreamSpec (spec) where import Conduit import Control.Lens import Control.Monad.Logger import Data.Conduit.List import Data.MediaBus import Test.Hspec import Test.QuickCheck spec :: Spec spec = do describe "Stream functions" $ do describe "isStartFrame" $ it "returns T...
null
https://raw.githubusercontent.com/sheyll/mediabus/2bc01544956b2c30dedbb0bb61dc115eef6aa689/specs/Data/MediaBus/Conduit/StreamSpec.hs
haskell
module Data.MediaBus.Conduit.StreamSpec (spec) where import Conduit import Control.Lens import Control.Monad.Logger import Data.Conduit.List import Data.MediaBus import Test.Hspec import Test.QuickCheck spec :: Spec spec = do describe "Stream functions" $ do describe "isStartFrame" $ it "returns T...
bb5ac345131124a5ce7f20d03c13f50ec7bd92a31d6ad88a221ec6667e484192
rurban/clisp
x-sequence.lisp
Copyright ( C ) 2002 - 2004 , < > ;; ALL RIGHTS RESERVED. ;; $ I d : x - sequence.lisp , v 1.11 2004/02/20 07:23:42 yuji Exp $ ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; ;; * Redistributions of sou...
null
https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/sacla-tests/x-sequence.lisp
lisp
ALL RIGHTS RESERVED. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributi...
Copyright ( C ) 2002 - 2004 , < > $ I d : x - sequence.lisp , v 1.11 2004/02/20 07:23:42 yuji Exp $ " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABIL...
baaf69caea10f23ce46a52596ad6d1feb0048538daaa02c91fd783ee841cb671
BillHallahan/G2
Test5.hs
module Combined ( List , test_nearest) where import Prelude hiding (length, replicate, foldr, foldr1, map, concat, zipWith, repeat) import qualified Data.List as L infixr 9 :+: {-@ die :: {v:String | false} -> a @-} die str = error ("Oops, I died!" ++ str) data List a = Emp | (:+:) a (L...
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Neg/Test5.hs
haskell
@ die :: {v:String | false} -> a @ @ invariant {v:List a | 0 <= size v} @ @ nearest :: Map Int {_ : (List Double) | false} -> (List Double) -> (Int, List Double) @
module Combined ( List , test_nearest) where import Prelude hiding (length, replicate, foldr, foldr1, map, concat, zipWith, repeat) import qualified Data.List as L infixr 9 :+: die str = error ("Oops, I died!" ++ str) data List a = Emp | (:+:) a (List a) deriving (Eq, Ord,...
8ff4ff0ba1cf00b95fe71686152b88992828965f9d3856cdd0b39f611ecf945b
FranklinChen/hugs98-plus-Sep2006
Types.hs
# OPTIONS_GHC -fno - implicit - prelude # ----------------------------------------------------------------------------- -- | Module : System . . Types Copyright : ( c ) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability ...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/System/Posix/Types.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : non-portable (requires POSIX) @\<sys\/types.h>@ C header on a POSIX system. -----------------------------------...
# OPTIONS_GHC -fno - implicit - prelude # Module : System . . Types Copyright : ( c ) The University of Glasgow 2002 POSIX data types : equivalents of the types defined by the #include "HsBaseConfig.h" module System.Posix.Types ( #if defined(HTYPE_DEV_T) CDev, #endif #if defined(HTYPE_INO_T) ...
5d1286dbce6b9f2bfb673433eb3b34f15798b8b49a6cb405b23caa0aa12b5487
simplegeo/erlang
array.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/src/array.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2007 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " @author < > @author < > Arrays...
b221d8acc3461c8c3365da1269fc88192f3970365a636d8e1c8050dee4f37a64
dktr0/estuary
ClientTests.hs
{-# LANGUAGE OverloadedStrings #-} import Test.Microspec import Data.Text (Text) import Data.Either import Data.Time import Data.IntMap as IntMap import Estuary.Types.Tempo import Estuary.Languages.CineCer0.Signal import Estuary.Languages.CineCer0.VideoSpec import Estuary.Languages.CineCer0.Parser import Estuary.Lang...
null
https://raw.githubusercontent.com/dktr0/estuary/0b29526e1183fe81bb7885f9e9bfd728e926b3d1/client/tests/ClientTests.hs
haskell
# LANGUAGE OverloadedStrings # no access to moderator password though EStuary's interface! f :: Either String (Maybe Colour) -> Either String (Maybe (Signal String)) -- Either String (Maybe (Signal String)) f (Right (Just (Colour x))) = Right $ Just x f _ = Right $ Nothing time in which the tempo mark starts count...
import Test.Microspec import Data.Text (Text) import Data.Either import Data.Time import Data.IntMap as IntMap import Estuary.Types.Tempo import Estuary.Languages.CineCer0.Signal import Estuary.Languages.CineCer0.VideoSpec import Estuary.Languages.CineCer0.Parser import Estuary.Languages.CineCer0.Spec import Estuary...
948018c9e456b74616b9110f39aae06fc8d9911b770d6f498cece7d8b162c040
justinmeiners/exercises
2_09.scm
; Addition and subtraction ; [a, b] + [c, d] = [a + c, b + d] ; w1 = b - a ; w2 = d - c ; w3 = (b + d) - (a + c) ; = (b - a) + (d - c) = w1 + w2 ; [a, b] + -[c, d] = [a, b] + [-d, -c] = [a - d, b - c] ; w3 = (b - c) - (a - d) ; = (b - a) - c + d ; = (b - a) + (d - c) = w1 + w2 ; Multiplication [ 0 , ...
null
https://raw.githubusercontent.com/justinmeiners/exercises/ad4a752d429e0c5a37846b029d7022ee6a42e853/sicp/2/2_09.scm
scheme
Addition and subtraction [a, b] + [c, d] = [a + c, b + d] w1 = b - a w2 = d - c w3 = (b + d) - (a + c) = (b - a) + (d - c) = w1 + w2 [a, b] + -[c, d] = [a, b] + [-d, -c] = [a - d, b - c] w3 = (b - c) - (a - d) = (b - a) - c + d = (b - a) + (d - c) = w1 + w2 Multiplication however: so w3 is not a ...
[ 0 , 1 ] * [ 2 , 3 ] = [ 0 , 3 ] w1 = 1 , w2 = 1 , w3 = 3 [ 0 , 1 ] * [ 0 , 1 = [ 0 , 1 ] ] w1 = 1 , w2 = 1 , w3 = 1
0683c79292fded24910e27fce54dbd731bfd28164ff09a206e50d600b8243370
mfoemmel/erlang-otp
filename.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/stdlib/src/filename.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1997 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(filename). for the current opera...
c4a6cec102d05a1a50bcde16afc59a08d536a54a96ceff381f3dfe106663e479
erleans/pgo
pgo_app.erl
%%%------------------------------------------------------------------- %% @doc pgo application %% @end %%%------------------------------------------------------------------- -module(pgo_app). -behaviour(application). -export([start/2, stop/1]). %%==================================================================== %...
null
https://raw.githubusercontent.com/erleans/pgo/1c9a0992bc41f2ecd0328fbee1151b75843ac979/src/pgo_app.erl
erlang
------------------------------------------------------------------- @doc pgo application @end ------------------------------------------------------------------- ==================================================================== API ==================================================================== -------------...
-module(pgo_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> pgo_query_cache:start_link(), Pools = application:get_env(pgo, pools, []), {ok, Pid} = pgo_sup:start_link(), [{ok, _} = pgo_sup:start_child(Name, PoolConfig) || {Name, PoolConfig} <- Pools], {...
721304a17d433e0795d5ec295da2304991223c60759aa3c131b4246171459c3b
typelead/intellij-eta
ModuleChunk.hs
module FFI.Org.JetBrains.JPS.ModuleChunk where import P import Java.Collections import FFI.Org.JetBrains.JPS.Model.Module.JpsModule Start org.jetbrains.jps . ModuleChunk data ModuleChunk = ModuleChunk @org.jetbrains.jps.ModuleChunk deriving Class foreign import java unsafe getModule :: Java ModuleChunk (Set Jps...
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Org/JetBrains/JPS/ModuleChunk.hs
haskell
module FFI.Org.JetBrains.JPS.ModuleChunk where import P import Java.Collections import FFI.Org.JetBrains.JPS.Model.Module.JpsModule Start org.jetbrains.jps . ModuleChunk data ModuleChunk = ModuleChunk @org.jetbrains.jps.ModuleChunk deriving Class foreign import java unsafe getModule :: Java ModuleChunk (Set Jps...
077f4d3cadeca4f63d4b671d3266153ec66c5d7b7287d773d28893b18d877791
bos/llvm
CodeGen.hs
# LANGUAGE ScopedTypeVariables , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , TypeSynonymInstances , UndecidableInstances , FlexibleContexts , ScopedTypeVariables , DeriveDataTypeable , Rank2Types # module LLVM.Core.CodeGen( -- * Module creation newModule, newNamedModule, defineModule, c...
null
https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/LLVM/Core/CodeGen.hs
haskell
* Module creation * Globals * Function creation * Global variable creation * Values * Basic blocks * Misc ------------------------------------ | Create a new module. XXX should generate a name | Create a new explicitely named module. ^ module name | Give the body for a module. ^ module that is defined ^ m...
# LANGUAGE ScopedTypeVariables , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , TypeSynonymInstances , UndecidableInstances , FlexibleContexts , ScopedTypeVariables , DeriveDataTypeable , Rank2Types # module LLVM.Core.CodeGen( newModule, newNamedModule, defineModule, createModule, getModul...
ca287622b5fa43a1928b45e78b6447cc84cfb67c60ba30c93bce4456ce22b431
skynet-gh/skylobby
flag_icon_test.clj
(ns skylobby.fx.flag-icon-test (:require [clojure.test :refer [deftest is]] [skylobby.fx.flag-icon :as fx.flag-icon])) (set! *warn-on-reflection* true) (deftest flag-icon (is (map? (fx.flag-icon/flag-icon {:country-code "US"}))))
null
https://raw.githubusercontent.com/skynet-gh/skylobby/7895ad30d992b790ffbffcd2d7be2cf17f8df794/test/clj/skylobby/fx/flag_icon_test.clj
clojure
(ns skylobby.fx.flag-icon-test (:require [clojure.test :refer [deftest is]] [skylobby.fx.flag-icon :as fx.flag-icon])) (set! *warn-on-reflection* true) (deftest flag-icon (is (map? (fx.flag-icon/flag-icon {:country-code "US"}))))
92b5bcf653d9275ee826ff5efc85501298d917a9bf7eeaba7ec74dc9b473cca5
metaocaml/ber-metaocaml
inner.ml
type a = int
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocamldoc-open/inner.ml
ocaml
type a = int
0e7b3bdb8878a57b7cfa4d4285cf21f2e9a70c57ef7622f1c7f8385233e9edce
datacraft-dsc/starfish-clj
demo.clj
(ns starfish.samples.demo (:use [starfish.core :refer :all]) (:require [clojure.repl :refer :all] [clojure.pprint :refer [pprint]] [clojure.data.json :as json ]) (:import [sg.dex.starfish.util DDOUtil JSON])) (fn [] ;; Quick hack to compile this file without executing on load ;; ================...
null
https://raw.githubusercontent.com/datacraft-dsc/starfish-clj/d199c0f7c96f5dd6941507556bc3070396eb3a04/src/test/clojure/starfish/samples/demo.clj
clojure
Quick hack to compile this file without executing on load ====================================================================================== BASIC ASSETS Let's talk about assets create a new asset type of asset to construct content (as a String)) display the metadata validate the content hash Print the co...
(ns starfish.samples.demo (:use [starfish.core :refer :all]) (:require [clojure.repl :refer :all] [clojure.pprint :refer [pprint]] [clojure.data.json :as json ]) (:import [sg.dex.starfish.util DDOUtil JSON])) ) (pprint (metadata as1)) (digest "This is a test") (println (to-stri...
20b7e95d01317dea29779d8fe6b12ccd55bd0da5b91f44db174adf94630e077b
CompSciCabal/SMRTYPRTY
exercises_1.3.1.rkt
#lang racket Provided from SICP (define (gcd m n) (cond ((< m n) (gcd n m)) ((= n 0) m) (else (gcd n (remainder m n))))) (define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (even? x) (= (remainder x 2) 0)) (define (square x)...
null
https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v2/1.3/csaunders/exercises_1.3.1.rkt
racket
fast-expt p45
#lang racket Provided from SICP (define (gcd m n) (cond ((< m n) (gcd n m)) ((= n 0) m) (else (gcd n (remainder m n))))) (define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (even? x) (= (remainder x 2) 0)) (define (square x)...
a1a374bb4f8d39b272a81d9a2be966dc636fc7be01ab47b656de989923c3bad8
cljfx/cljfx
lighting.clj
(ns cljfx.fx.lighting "Part of a public API" (:require [cljfx.composite :as composite] [cljfx.lifecycle :as lifecycle]) (:import [javafx.scene.effect Lighting])) (set! *warn-on-reflection* true) (def props (composite/props Lighting :light [:setter lifecycle/dynamic] :bump-input [:setter li...
null
https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/lighting.clj
clojure
(ns cljfx.fx.lighting "Part of a public API" (:require [cljfx.composite :as composite] [cljfx.lifecycle :as lifecycle]) (:import [javafx.scene.effect Lighting])) (set! *warn-on-reflection* true) (def props (composite/props Lighting :light [:setter lifecycle/dynamic] :bump-input [:setter li...
28b05c1166fd73e4b1420c49d751832f377796bcf3642797d3e338f9c487e559
samsergey/formica
monad-sequential-tests.rkt
#lang racket/base (require "../monad.rkt" "../formal.rkt" "../rewrite.rkt" "../tools.rkt" "../types.rkt" rackunit racket/sequence) (test-case "zip tests" (check-equal? (zip '(a b c) '(1 2 3)) '((a 1) (b 2) (c 3))) (check-equal? (zip '(a b c) '(1 2)) '((a 1) (b 2...
null
https://raw.githubusercontent.com/samsergey/formica/b4410b4b6da63ecb15b4c25080951a7ba4d90d2c/tests/monad-sequential-tests.rkt
racket
the basic monadic functions the monad laws the additive monad laws guarding monadic composition monadic lifting monadic folding monadic filtering monadic mapping monadic sequencing monadic sum failure zipping (check-equal? (collect (cons x y) [(list x y) <- type checking (require "../examples/nondeterminis...
#lang racket/base (require "../monad.rkt" "../formal.rkt" "../rewrite.rkt" "../tools.rkt" "../types.rkt" rackunit racket/sequence) (test-case "zip tests" (check-equal? (zip '(a b c) '(1 2 3)) '((a 1) (b 2) (c 3))) (check-equal? (zip '(a b c) '(1 2)) '((a 1) (b 2...
a525434155620486dc257f9a87605820026b08b263f46925ae9b23e5cffd3128
factisresearch/mq-demo
List.hs
# OPTIONS_GHC -F -pgmF htfpp # {-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # module Mgw.Util.List ( groupOn , groupOn' , groupUnsortedOn , groupUnsortedOn' , extractLast , lastElems , find , ungroupMay , makeMapping , monotone , sconcatBy , stripSuffix , htf_thisModu...
null
https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/server/src/lib/Mgw/Util/List.hs
haskell
# LANGUAGE BangPatterns # -------------------------------------- LOCAL -------------------------------------- -------------------------------------- SITE-PACKAGES -------------------------------------- -------------------------------------- STDLIB -------------------------------------- O(n) requires a list sorted b...
# OPTIONS_GHC -F -pgmF htfpp # # LANGUAGE CPP # module Mgw.Util.List ( groupOn , groupOn' , groupUnsortedOn , groupUnsortedOn' , extractLast , lastElems , find , ungroupMay , makeMapping , monotone , sconcatBy , stripSuffix , htf_thisModulesTests ) where #include...
991b533b8d2e714f83d0eebd9f834e2cb122af7833a5a057e3df6d032beeb43e
oliyh/martian
schema.cljc
(ns martian.schema (:require #?(:clj [schema.core :as s] :cljs [schema.core :as s :refer [AnythingSchema Maybe EnumSchema EqSchema]]) #?(:cljs [goog.Uri]) [schema.coerce :as sc] [schema-tools.core :as st] [schema-tools.coerce :as stc] [martian...
null
https://raw.githubusercontent.com/oliyh/martian/9bd47c7df64be544bcb549ce5dfc3c33e85f3193/core/src/martian/schema.cljc
clojure
primitives, arrays, arrays of maps It's possible for an 'object' to omit properties and additionalProperties. If this is the case - anything is allowed. avoid potential recursive loops
(ns martian.schema (:require #?(:clj [schema.core :as s] :cljs [schema.core :as s :refer [AnythingSchema Maybe EnumSchema EqSchema]]) #?(:cljs [goog.Uri]) [schema.coerce :as sc] [schema-tools.core :as st] [schema-tools.coerce :as stc] [martian...
3d92bd797e8fc34c31c38e2e82ee14d7e915a9bc2531a403e66b7f97890a4f3a
skrah/minicaml
test40.ml
Example from 's " Modern Compiler Implementation in ML " , translated to . to Caml. *) (* Type mismatch *) let _ = let g (a : unit) = a in g 2
null
https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/test/test40.ml
ocaml
Type mismatch
Example from 's " Modern Compiler Implementation in ML " , translated to . to Caml. *) let _ = let g (a : unit) = a in g 2
4945b4bf0e15f6d625d0704822f7bcb25b434d5f65170dd5a5a9fa9b0455daf2
realworldocaml/book
ctypes_stubs.ml
open Import let cflags_sexp ~external_library_name = sprintf "%s__c_flags.sexp" (External_lib_name.to_string external_library_name) let c_generated_functions_cout_no_ext ~external_library_name ~functor_ ~instance = sprintf "%s__c_cout_generated_functions__%s__%s" (External_lib_name.to_string external_libr...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/ctypes_stubs.ml
ocaml
open Import let cflags_sexp ~external_library_name = sprintf "%s__c_flags.sexp" (External_lib_name.to_string external_library_name) let c_generated_functions_cout_no_ext ~external_library_name ~functor_ ~instance = sprintf "%s__c_cout_generated_functions__%s__%s" (External_lib_name.to_string external_libr...
d93a0d54be9773e0950b1dc520a3b0f53175cad7f9dafd18d2ffdd6810eca725
DSiSc/why3
ocaml_printer.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/mlw/ocaml_printer.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Compile open Format open Ident open Pp open Ity open Term open Expr open Ty open Theory open Pmodule...
b31036c6b0d065b48d54b9576d8575cf34f3fd5d3037731d946d0c948179ff02
bluemont/kria
put.clj
(ns kria.pb.object.put (:require [kria.conversions :refer [byte-string<-utf8-string]] [kria.pb.content :refer [pb->Content Content->pb]]) (:import [com.basho.riak.protobuf RiakKvPB$RpbPutReq RiakKvPB$RpbPutResp])) (defrecord PutReq [bucket ; required bytes key ...
null
https://raw.githubusercontent.com/bluemont/kria/8ed7fb1ebda8bfa1a2a6d7a3acf05e2255fcf0f0/src/clojure/kria/pb/object/put.clj
clojure
required bytes optional bytes optional bytes optional bool optional bool optional bool optional bool optional bool optional bool optional bytes optional bytes optional bytes
(ns kria.pb.object.put (:require [kria.conversions :refer [byte-string<-utf8-string]] [kria.pb.content :refer [pb->Content Content->pb]]) (:import [com.basho.riak.protobuf RiakKvPB$RpbPutReq RiakKvPB$RpbPutResp])) (defrecord PutReq required RpbContent optional uint32 optional uint32 option...
089c223f6f68e3b5ba213df31b6fd2f52b0ffb8f5137ba92d061143ad7baa458
dergraf/epmdpxy
epmdpxy_listener.erl
-module(epmdpxy_listener). -behaviour(gen_server). %% API -export([start_link/0]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, {listener_socket}). %%%=================================...
null
https://raw.githubusercontent.com/dergraf/epmdpxy/646506ba2117cb5ac81b9d37c2fe5cb7f042b043/src/epmdpxy_listener.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== -------------------------------------------------------------------- @doc Starts the server @end ---------------------------------------------------...
-module(epmdpxy_listener). -behaviour(gen_server). -export([start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, {listener_socket}). ( ) - > { ok , Pid } | ignore | { error , Error } start_link()...
80f45a2d69d305f0b7d7501bf8e796ecaa0201f9a0678fb37f4ed25eb91b0c62
twosigma/waiter
reporters_integration_test.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/twosigma/waiter/97a4389cd9d34709999527afcf24db802e741b7a/waiter/integration/waiter/reporters_integration_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns waiter.reporters-integration-test (:require [clojure.test :refer :all] [waiter.status-codes :refer :all] [waiter.util.client-tools :refer :all] [waiter.util.date...
f26c156fa6f4f928b79a1699e8a60cb0daedfb22df076e4f84bc8aaa650a4d3e
orx/ocaml-orx
tutorial_02_clock.ml
Adaptation of the clock tutorial from This example is a direct adaptation of the 02_Clock.c tutorial from module State = struct module Clock_map = Map.Make (Orx.Clock) type t = Orx.Object.t Clock_map.t ref let state : t = ref Clock_map.empty let get () = !state let add (clock : Orx.Clock.t) (o : Or...
null
https://raw.githubusercontent.com/orx/ocaml-orx/b1cf7d0efb958c72fbb9568905c81242593ff19d/examples/tutorial/tutorial_02_clock.ml
ocaml
Adaptation of the clock tutorial from This example is a direct adaptation of the 02_Clock.c tutorial from module State = struct module Clock_map = Map.Make (Orx.Clock) type t = Orx.Object.t Clock_map.t ref let state : t = ref Clock_map.empty let get () = !state let add (clock : Orx.Clock.t) (o : Or...
567d069548a4ec4ceb1368d6ccc2568a24bdcd6715ab537c5e0105dbb46ab59f
tolitius/mount
on_reload.cljc
(ns mount.test.on-reload (:require #?@(:cljs [[cljs.test :as t :refer-macros [is are deftest testing use-fixtures]] [mount.core :as mount :refer-macros [defstate]] [tapp.websockets :refer [system-a]] [tapp.conf :refer [config]] [tapp.audit-log :refer [lo...
null
https://raw.githubusercontent.com/tolitius/mount/c85da6149ceab96c903c1574106ec56f78338b5f/test/core/mount/test/on_reload.cljc
clojure
"a" is marked as :noop on reload previous behavior left a stale reference =>>> ;; (is (instance? mount.core.NotStartedState (dval a))) ;; (!) stale reference of old a is still there somewhere make sure a still has the same instance as before reload and the start was not called: the counter did not change "b" is ma...
(ns mount.test.on-reload (:require #?@(:cljs [[cljs.test :as t :refer-macros [is are deftest testing use-fixtures]] [mount.core :as mount :refer-macros [defstate]] [tapp.websockets :refer [system-a]] [tapp.conf :refer [config]] [tapp.audit-log :refer [lo...
a7877ddde0c5b625913caec65bcd31108950eb1c4cce7dfb1c3e4f86ce1fac6d
manuel-serrano/bigloo
hello.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / api / libuv / examples / hello.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/d315487d6a97ef7b4483e919d1823a408337bd07/api/libbacktrace/examples/hello.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / api / libuv / examples / hello.scm * / * Author : * / * Creation : Tue May 6 12:10:13 2014 * / * Last change : Tue May 6 12:11:02 2014 ( serrano ) * / * ...
3dfbd27af5eebcf841b698ea0a8c1eb27b0bb8ac5f0388686fd74b3c1b3de669
janestreet/rpc_parallel
rpc_direct_pipe.ml
open Core open Async module Sum_worker = struct module T = struct type 'worker functions = { sum : ('worker, int, string) Rpc_parallel.Function.Direct_pipe.t } module Worker_state = struct type init_arg = unit [@@deriving bin_io] type t = unit end module Connection_state = struct ...
null
https://raw.githubusercontent.com/janestreet/rpc_parallel/b37ce51ddfd9d9b6f96d285c81db7fc36d66a1d5/example/rpc_direct_pipe.ml
ocaml
open Core open Async module Sum_worker = struct module T = struct type 'worker functions = { sum : ('worker, int, string) Rpc_parallel.Function.Direct_pipe.t } module Worker_state = struct type init_arg = unit [@@deriving bin_io] type t = unit end module Connection_state = struct ...
a0776fe68c4974fdccec7344dbb037d89744411cc8fdf7661abbba2ad6848d90
NorfairKing/mergeful
Item.hs
# OPTIONS_GHC -fno - warn - orphans # module Data.GenValidity.Mergeful.Item where import Data.GenValidity import Data.GenValidity.Mergeful.Timed () import Data.Mergeful.Item instance GenValid a => GenValid (ItemMergeResult a) where genValid = genValidStructurallyWithoutExtraChecking shrinkValid = shrinkValidStru...
null
https://raw.githubusercontent.com/NorfairKing/mergeful/7dc80c96de7937dea539cd8ec2d7c03fb74f8b9c/genvalidity-mergeful/src/Data/GenValidity/Mergeful/Item.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Data.GenValidity.Mergeful.Item where import Data.GenValidity import Data.GenValidity.Mergeful.Timed () import Data.Mergeful.Item instance GenValid a => GenValid (ItemMergeResult a) where genValid = genValidStructurallyWithoutExtraChecking shrinkValid = shrinkValidStru...
dd8d8f106df3639923f43ee18164fcd56866b32ebae8121ed6941d777b1b2edc
jeapostrophe/mode-lambda
gl.rkt
#lang racket/base (require ffi/cvector ffi/unsafe/cvector (only-in ffi/vector u32vector list->s32vector s32vector-ref) mode-lambda/backend/gl/util mode-lambda/backend/lib mode-lambda/core mode-lambda/sprite-index...
null
https://raw.githubusercontent.com/jeapostrophe/mode-lambda/64b5ae81f457ded7664458cd9935ce7d3ebfc449/mode-lambda/backend/gl.rkt
racket
xxx allow these to be updated CRT and thus get non-square pixels. The problem with this is that I get non-uniform pixel sizes as we go across the screen, have the dormant code here to come back to it. What I'd really like is a screen so big that I can draw each which is too small. A UHD screen would give 480x308...
#lang racket/base (require ffi/cvector ffi/unsafe/cvector (only-in ffi/vector u32vector list->s32vector s32vector-ref) mode-lambda/backend/gl/util mode-lambda/backend/lib mode-lambda/core mode-lambda/sprite-index...
e00dfb7df3310026362dc6b869632cf0d4717207dd6fda76c02e2aa90dc50664
YoshikuniJujo/test_haskell
try-logo.hs
# , OverloadedStrings # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import Foreign.C.Types import Control.Monad import Data.Maybe import Data.Bool import Data.Color import Data.CairoContext import Graphics.Cairo.Drawing.CairoT import Graphics.Cairo.Drawing.CairoT.Setting...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/1df355420c431c4597f82c5b3362f5db3718ef70/themes/gui/cairo/try-simple-cairo-new/app/try-logo.hs
haskell
cairoSetSourceRgb cr . fromJust $ rgbDouble 0.3 0.3 0.3 cairoPaint cr
# , OverloadedStrings # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import Foreign.C.Types import Control.Monad import Data.Maybe import Data.Bool import Data.Color import Data.CairoContext import Graphics.Cairo.Drawing.CairoT import Graphics.Cairo.Drawing.CairoT.Setting...
e0e14a8e2cb9afc9dd15f3f94326c76ae4ba3362642ba4303a7112e657333550
jasonkuhrt-archive/hpfp-answers
Intermission.hs
-- 1 Kind of `a`? -- a -> a -- Answer: -- a = * 2 Kinds of ` b ` and ` T ` ? -- a -> b a -> T (b a) -- Answers: -- a = * -- b = * -> * -- T = * -> * -- 3 Kind of `c`? -- c a b -> c b a -- Answer: -- c = * -> * -> *
null
https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-16-functor/Intermission.hs
haskell
1 Kind of `a`? a -> a Answer: a = * a -> b a -> T (b a) Answers: a = * b = * -> * T = * -> * 3 Kind of `c`? c a b -> c b a Answer: c = * -> * -> *
2 Kinds of ` b ` and ` T ` ?
40b8f299397cda3984b13f3a5a7c3eb569064d0b3be2570774f82c33f3e25e38
mgrabmueller/harpy
X86Disassembler.hs
-------------------------------------------------------------------------- -- | Module : Harpy . X86Disassembler Copyright : ( c ) and -- License : BSD3 -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Disassembler for x86 machine code. -- This is a modul...
null
https://raw.githubusercontent.com/mgrabmueller/harpy/6df8f480e568a02c98e20d95effc5f35f204bff6/Harpy/X86Disassembler.hs
haskell
------------------------------------------------------------------------ | License : BSD3 Maintainer : Stability : provisional Portability : portable Disassembler for x86 machine code. re-exports the disassembler from the disassembler package. -----------------------------------------------------...
Module : Harpy . X86Disassembler Copyright : ( c ) and This is a module for compatibility with earlier Harpy releases . It module Harpy.X86Disassembler( Opcode, Operand(..), InstrOperandSize(..), Instruction(..), ShowStyle(..), disassembleBlock, disassembleList, disassembleArra...
7a2871a3a6105c41ffce934e48ef7e4f6efdcdd0a44716f232ba41c68225c042
mmottl/gsl-ocaml
histo_ex.ml
open Gsl let pprint_histo { Histo.n = n ; Histo.range = r ; Histo.bin = b } = for i=0 to pred n do Printf.printf "%g %g %g\n" r.(i) r.(succ i) b.(i) done let main xmin xmax n = let h = Histo.make n in Histo.set_ranges_uniform h ~xmin ~xmax ; begin try while true do Scanf.scanf ...
null
https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/examples/histo_ex.ml
ocaml
open Gsl let pprint_histo { Histo.n = n ; Histo.range = r ; Histo.bin = b } = for i=0 to pred n do Printf.printf "%g %g %g\n" r.(i) r.(succ i) b.(i) done let main xmin xmax n = let h = Histo.make n in Histo.set_ranges_uniform h ~xmin ~xmax ; begin try while true do Scanf.scanf ...
a9075ce65ce8f597f54b3ecf68dc8a54e264d8bdfc7299fce101620873a04d4a
xmppjingle/snatch
claws_lp.erl
-module(claws_lp). -behaviour(gen_server). -behaviour(claws). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([send/2, send/3]). -export([read_chunk/3]). -include_lib("fast_xml/include/fxml.hrl"). -record(state, { url :: stri...
null
https://raw.githubusercontent.com/xmppjingle/snatch/da32ed1f17a05685461ec092800c4cb111a05f0b/src/claws_lp.erl
erlang
-module(claws_lp). -behaviour(gen_server). -behaviour(claws). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([send/2, send/3]). -export([read_chunk/3]). -include_lib("fast_xml/include/fxml.hrl"). -record(state, { url :: stri...
99dcf1037a8388664af869730eeee87a164d7731d5683a5ff0dd8b2f20bb708a
aerolang/aero
aero_scan.erl
-module(aero_scan). -export([scan/1]). %% ----------------------------------------------------------------------------- %% Public API %% ----------------------------------------------------------------------------- -spec scan(binary()) -> {ok, [aero_token:t()]} | {error, term()}. scan(Input) -> scan(string:to_grap...
null
https://raw.githubusercontent.com/aerolang/aero/c6bf662cbfc4f2af2910ddef47aec7484e3aa522/src/aero_scan.erl
erlang
----------------------------------------------------------------------------- Public API ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------...
-module(aero_scan). -export([scan/1]). -spec scan(binary()) -> {ok, [aero_token:t()]} | {error, term()}. scan(Input) -> scan(string:to_graphemes(Input), {0, 1, 1}, []). Tokenizing -define(is_digit(S1), (S1 >= $0 andalso S1 =< $9)). -define(is_hex(S1), (?is_digit(S1) orelse (S1 >= $a andalso S1 =< $f) orelse ...
95cb61c096adb6bedc192e6e791605bbeda05bdecec54e58a636fb9aa7aacf4a
mattjbray/ocaml-decoders
util.ml
module My_result = struct type ('good, 'bad) t = ('good, 'bad) Belt.Result.t = | Ok of 'good | Error of 'bad let return x = Ok x let map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t = fun f x -> Belt.Result.map x f let map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t = fun f -> fun...
null
https://raw.githubusercontent.com/mattjbray/ocaml-decoders/00d930a516805f1bb8965fed36971920766dce60/src-bs/util.ml
ocaml
module My_result = struct type ('good, 'bad) t = ('good, 'bad) Belt.Result.t = | Ok of 'good | Error of 'bad let return x = Ok x let map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t = fun f x -> Belt.Result.map x f let map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t = fun f -> fun...
a33e46fe9340bd01547841277539283b6c47ea15a838381377160127a334e7e1
oriansj/mes-m2
mescc.scm
GNU --- Maxwell Equations of Software Copyright © 2016,2017,2018,2019,2020 Jan ( janneke ) Nieuwenhuizen < > ;;; This file is part of GNU . ;;; GNU 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 ;...
null
https://raw.githubusercontent.com/oriansj/mes-m2/75a50911d89a84b7aa5ebabab52eb09795c0d61b/module/mescc/mescc.scm
scheme
you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ugh ugh
GNU --- Maxwell Equations of Software Copyright © 2016,2017,2018,2019,2020 Jan ( janneke ) Nieuwenhuizen < > This file is part of GNU . under the terms of the GNU General Public License as published by GNU is distributed in the hope that it will be useful , but You should have received a copy of the GNU...
b92f2c51ec60245246e594e914acc9915c47452beeb25de589c848eacf930f2e
janestreet/merlin-jst
mtyper.mli
* { 1 Result of typechecker } [ Mtyper ] essentially produces a typedtree , but to make sense of it the OCaml typechecker need to be in a specific state . The [ result ] type wraps a snapshot of this state with the typedtree to ensure correct accesses . [Mtyper] essentially produces a t...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/kernel/mtyper.mli
ocaml
* { 1 Result of typechecker } [ Mtyper ] essentially produces a typedtree , but to make sense of it the OCaml typechecker need to be in a specific state . The [ result ] type wraps a snapshot of this state with the typedtree to ensure correct accesses . [Mtyper] essentially produces a t...
b0fd8ccb9c769d527a6690843228224e70d7ecf62a20802b6329d10b20c0a911
ThoughtWorksInc/stonecutter
common.clj
(ns stonecutter.controller.common (:require [ring.util.response :as response] [stonecutter.routes :as r] [stonecutter.db.token :as token] [stonecutter.session :as session])) (defn sign-in-user ([response token-store user] (sign-in-user response token-store user {})) ([respo...
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/controller/common.clj
clojure
(ns stonecutter.controller.common (:require [ring.util.response :as response] [stonecutter.routes :as r] [stonecutter.db.token :as token] [stonecutter.session :as session])) (defn sign-in-user ([response token-store user] (sign-in-user response token-store user {})) ([respo...
262deaca62ca3cb156c9a966a167c66eacbb2ad1a0006be8981ea7bb491c9085
b1412/clojure-web-admin
project.clj
(defproject clojure-web "0.1.0-SNAPSHOT" :description "A metadata-driven clojure web admin app" :url "-web-admin" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/tools.trace "0.7.9"] [org.clojure/core.cache "0.6.4"] [clj-time "0.11.0"] ...
null
https://raw.githubusercontent.com/b1412/clojure-web-admin/018161dcdb364cc168d6f5a56ceb798005a0701f/project.clj
clojure
partern match orm exception log I18n&L10n schedual jobs
(defproject clojure-web "0.1.0-SNAPSHOT" :description "A metadata-driven clojure web admin app" :url "-web-admin" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/tools.trace "0.7.9"] [org.clojure/core.cache "0.6.4"] [clj-time "0.11.0"] ...
002d67696d5b28d148d663cf923c0cc412a75e9519c197a9a876627114707d5b
int28h/HaskellTasks
0031.hs
Используя функцию foldr , напишите реализацию функции lengthList , вычисляющей количество элементов в списке . GHCi > lengthList [ 7,6,5 ] 3 Используя функцию foldr, напишите реализацию функции lengthList, вычисляющей количество элементов в списке. GHCi> lengthList [7,6,5] 3 -} lengthList :: [a] -> Int length...
null
https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0031.hs
haskell
Используя функцию foldr , напишите реализацию функции lengthList , вычисляющей количество элементов в списке . GHCi > lengthList [ 7,6,5 ] 3 Используя функцию foldr, напишите реализацию функции lengthList, вычисляющей количество элементов в списке. GHCi> lengthList [7,6,5] 3 -} lengthList :: [a] -> Int length...
24a8eb1cf337e9ea629b0b9d6d119d67062484dc0243fc9956e2f08bd1595856
avsm/platform
zed_utf8.ml
* zed_utf8.ml * ----------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of , an editor engine . * zed_utf8.ml * ----------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Zed, an editor engine. *) open CamomileLibra...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/zed.2.0.3/src/zed_utf8.ml
ocaml
+-----------------------------------------------------------------+ | Validation | +-----------------------------------------------------------------+ +-----------------------------------------------------------------+ | Unsafe UTF-8 manipulation ...
* zed_utf8.ml * ----------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of , an editor engine . * zed_utf8.ml * ----------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Zed, an editor engine. *) open CamomileLibra...
519f3c1f0a95ae4bd63d9eb6a2eff7551be7dd9a551bd61a73b8dd45f579f583
bobzhang/fan
operators.ml
let _ : int = 42 let (+) = M.(+) let (+) = M.(+) in 42 let (+) : int -> int -> int = (+) let (+) : int -> int -> int = (+) in 42 let None = None let None : int option = None
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/operators.ml
ocaml
let _ : int = 42 let (+) = M.(+) let (+) = M.(+) in 42 let (+) : int -> int -> int = (+) let (+) : int -> int -> int = (+) in 42 let None = None let None : int option = None
d1607c98c4296da97635ba738c720d9fa368ee2beaa9ddb3978b932e9221be3d
wh5a/thih
HaskellPrims.hs
----------------------------------------------------------------------------- HaskellPrims : Typing assumptions for primitives in the Hugs prelude -- Part of ` Typing Haskell in ' , version of November 23 , 2000 Copyright ( c ) and the Oregon Graduate Institute of Science and Technology , 1999 -...
null
https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/src/HaskellPrims.hs
haskell
--------------------------------------------------------------------------- in the file "License" that is included in the distribution of this software, copies of which may be obtained from: /~mpj/thih/ --------------------------------------------------------------------------- ------------...
HaskellPrims : Typing assumptions for primitives in the Hugs prelude Part of ` Typing Haskell in ' , version of November 23 , 2000 Copyright ( c ) and the Oregon Graduate Institute of Science and Technology , 1999 - 2000 This program is distributed as Free Software under the terms module Ha...
589dbd91b6c5c24dea19af40f7e49a14b7dbc172d0e5ecc4ebdacbf8212c73cd
gafiatulin/codewars
Pangram.hs
Detect / module Pangram where import Data.Char (toLower) isPangram :: String -> Bool isPangram str = all (`elem` map toLower str) ['a'..'z']
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Pangram.hs
haskell
Detect / module Pangram where import Data.Char (toLower) isPangram :: String -> Bool isPangram str = all (`elem` map toLower str) ['a'..'z']
615a957cd3b9504fa3ad68f2eb1403da742bf3768c269d83d648c62ceb571a68
janegca/htdp2e
Exercise-298-find.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-292-find) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructo...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intertwined%20Data/Exercise-298-find.rkt
racket
about the language level of this file in a form that our tools can easily process. Design find?. The function consumes a Dir and a file name and determines whether or not a file with this name occurs in the directory tree. Dir File -> Boolean true if the file is found in the directory structure true if file i...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-292-find) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) Exercise 298 . (require htdp/dir) (check-e...
e750e82fad886f56ba6fa903d35bdb17f20878857914ee6093cc66899dda8239
MastodonC/kixi.datastore
metadatastore_test.clj
(ns kixi.unit.metadatastore-test (:require [clojure.test :refer :all] [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.data :as data] [kixi.datastore.schemastore.utils :as sh] [com.gfredericks.test.chuck.clojure-test :refer [checking]] ...
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/test/kixi/unit/metadatastore_test.clj
clojure
(ns kixi.unit.metadatastore-test (:require [clojure.test :refer :all] [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.data :as data] [kixi.datastore.schemastore.utils :as sh] [com.gfredericks.test.chuck.clojure-test :refer [checking]] ...
e9f214914f009dcfa69709907c00a8865f2cadd0667cc81cdcbd3b374a9c0659
jyh/metaprl
lf_kind.mli
* Valid kinds . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman / default.html ...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/lf/lf_kind.mli
ocaml
* Const family. * Kind equality. * -*- * Local Variables: * Caml-master: "editor.run" * End: * -*-
* Valid kinds . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman / default.html ...
8ac0fae62b9134d40179c4cfcbd186349a2a20d22bd01c639ff7e6082ca824f7
ixy-languages/ixy.hs
Queue.hs
-- | -- Module : Lib.Ixgbe.Queue Copyright : 2018 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- Description -- module Lib.Ixgbe.Queue ( RxQueue(..) , TxQueue(..) , ReceiveDescriptor(..) , TransmitDescriptor(..) , mkRxQueue , mkTxQ...
null
https://raw.githubusercontent.com/ixy-languages/ixy.hs/4a24031adf9ba0737cebe1bb4f86bdf11fbf61c3/src/Lib/Ixgbe/Queue.hs
haskell
| Module : Lib.Ixgbe.Queue License : BSD3 Maintainer : Stability : experimental Portability : unknown Description $ Queues Setup the descriptors and buffers. $ Descriptors # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # # UNPACK # $ Memory
Copyright : 2018 module Lib.Ixgbe.Queue ( RxQueue(..) , TxQueue(..) , ReceiveDescriptor(..) , TransmitDescriptor(..) , mkRxQueue , mkTxQueue , numRxQueueEntries , numTxQueueEntries , nullReceiveDescriptor , isDone , isEndOfPacket , nullTransmitDescriptor , bufferSize , rxMap , rx...
d4b7cc6790c79a4dfc107049e90c03637264335bf03da3eeb78fdfcae68fae2d
alanz/ghc-exactprint
ModuleOnly.hs
module ModuleOnly where
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/ModuleOnly.hs
haskell
module ModuleOnly where
53a368f2b699fdef24771551a8a058fee38faaf128a29d73fda24d99c4a27700
nvim-treesitter/nvim-treesitter
injections.scm
[ (block_comment) (line_comment) ] @comment
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/f8595b13bff62d5c64d54840e16678b9ad843620/queries/java/injections.scm
scheme
[ (block_comment) (line_comment) ] @comment
8c9c316a985dd1e9091ea810d3bfd51c2afd19ef39d7049b30ae5d43cad34930
conreality/conreality
networking.ml
(* This is free and unencumbered software released into the public domain. *) open Prelude module UDP = struct #include "networking/udp.ml" end
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/networking.ml
ocaml
This is free and unencumbered software released into the public domain.
open Prelude module UDP = struct #include "networking/udp.ml" end
396de98d2035cd5e1a5f2840a9bf1fb765fa27361b0d4ec1498cd0cdea2c3e42
bollu/koans
stm.hs
import Control.Monad.STM
null
https://raw.githubusercontent.com/bollu/koans/0204e9bb5ef9c541fe161523acac3cacae5d07fe/stm.hs
haskell
import Control.Monad.STM
02c970ae1ae2ee3f32442cc34e0aab2b05ff62e104bbdc3c9246eb6811814024
haskell-suite/base
Dynamic.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude # #ifdef __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Dynamic Copyright : ( c ) The University of Glasgow 20...
null
https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/Data/Dynamic.hs
haskell
# LANGUAGE DeriveDataTypeable, StandaloneDeriving # --------------------------------------------------------------------------- | Module : Data.Dynamic License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable with operations for...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude # #ifdef __GLASGOW_HASKELL__ #endif Copyright : ( c ) The University of Glasgow 2001 The Dynamic interface provides basic support for dynamic types . Operations for injecting values of arbitrary type into a dynamically typed value , Dynamic , are...
2dddd6b0b1a6cc5fa784cdd2a6b50c9b112d2e6a76240ca69fdaac535b64143b
prepor/condo
condo_docker.mli
open! Core.Std open! Async.Std type t type id [@@deriving sexp, yojson] val create : endpoint:Async_http.addr -> config_path:string option -> t Deferred.t val reload_config : t -> unit Deferred.t val start : t -> name:string -> spec:Yojson.Safe.json -> (id, string) Result.t Deferred.t val stop : t -> id -> timeout...
null
https://raw.githubusercontent.com/prepor/condo/b9a16829e6ffef10df2fefdadf143b56d33f0b97/src/condo_docker.mli
ocaml
open! Core.Std open! Async.Std type t type id [@@deriving sexp, yojson] val create : endpoint:Async_http.addr -> config_path:string option -> t Deferred.t val reload_config : t -> unit Deferred.t val start : t -> name:string -> spec:Yojson.Safe.json -> (id, string) Result.t Deferred.t val stop : t -> id -> timeout...
1b8a2d561ffc6a28fb259d162080c0f6782b06157a3509b281c6631176883164
gregwebs/Shelly.hs
FailureSpec.hs
module FailureSpec ( failureSpec ) where import TestInit failureSpec :: Spec failureSpec = do let discardException action = shellyFailDir $ catchany_sh action (\_ -> return ()) describe "failure set to stderr" $ it "writes a failure message to stderr" $ do shellyFailDir $ discardException $ lif...
null
https://raw.githubusercontent.com/gregwebs/Shelly.hs/f11409cf565b782f05576a489b137fd98d3877ca/test/src/FailureSpec.hs
haskell
module FailureSpec ( failureSpec ) where import TestInit failureSpec :: Spec failureSpec = do let discardException action = shellyFailDir $ catchany_sh action (\_ -> return ()) describe "failure set to stderr" $ it "writes a failure message to stderr" $ do shellyFailDir $ discardException $ lif...
75d8f8612d05e2ca8a69dda1e9ee80e6693ca5677991019b5435ccc9be9fcf1c
adomokos/haskell-katas
Ex11_FlowRecursionsSpec.hs
module Solutions.Ex11_FlowRecursionsSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec maximum' :: (Ord a) => [a] -> a maximum' [x] = x maximum' (x:xs) = x `max` maximum' xs replicate' :: Int -> a -> [a] replicate' 1 x = [x] replicate' n x = x : replicate' (n - 1) x take' :: Int -> [a] -> [a...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Solutions/Ex11_FlowRecursionsSpec.hs
haskell
module Solutions.Ex11_FlowRecursionsSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec maximum' :: (Ord a) => [a] -> a maximum' [x] = x maximum' (x:xs) = x `max` maximum' xs replicate' :: Int -> a -> [a] replicate' 1 x = [x] replicate' n x = x : replicate' (n - 1) x take' :: Int -> [a] -> [a...
d919add3dd01d82e48ad146d3080c22e8cdc15d7790266ef333e6ee7f43b5bbd
jordanthayer/ocaml-search
mean_sol_time.ml
* @author jtd7 @since 2012 - 01 - 24 @author jtd7 @since 2012-01-24 *) let get_mean_time dset = let times = Dataset.get_values float_of_string "raw cpu time" dset in let values = ref [] in for i = ((Array.length times) - 1) downto 1 do values := (times.(i) -. times.(i-1))::!v...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/spt_plot/scripts/jtd7/mean_sol_time.ml
ocaml
* @author jtd7 @since 2012 - 01 - 24 @author jtd7 @since 2012-01-24 *) let get_mean_time dset = let times = Dataset.get_values float_of_string "raw cpu time" dset in let values = ref [] in for i = ((Array.length times) - 1) downto 1 do values := (times.(i) -. times.(i-1))::!v...
1c92478e2d87004d7a6419bcf13d527ea403b49817f73eaaab2e27791085dc1d
blambo/accelerate-repa
Evaluations.hs
# LANGUAGE CPP , GADTs , BangPatterns , TypeOperators , PatternGuards # # LANGUAGE TypeFamilies , ScopedTypeVariables , FlexibleContexts # # LANGUAGE TypeSynonymInstances , FlexibleInstances , RankNTypes # -- | Module : Data . Array . Accelerate . . Evaluations -- Maintainer : < blambo+ > -- Defines the...
null
https://raw.githubusercontent.com/blambo/accelerate-repa/5ea4d40ebcca50d5b952e8783a56749cea4431a4/Data/Array/Accelerate/Repa/Evaluations.hs
haskell
| ------------- ------------- | Traverses over AST Not sure why sliceIndex is not required? Not sure why sliceIndex is not required? test more extensively with differing typed arrays to insure no errors TODO: Tidy generated code TODO: Tidy up code ------------------ FUNCTION NODES -- ------------------ -----...
# LANGUAGE CPP , GADTs , BangPatterns , TypeOperators , PatternGuards # # LANGUAGE TypeFamilies , ScopedTypeVariables , FlexibleContexts # # LANGUAGE TypeSynonymInstances , FlexibleInstances , RankNTypes # Module : Data . Array . Accelerate . . Evaluations Maintainer : < blambo+ > Defines the code gener...
33c42eeea801595ac89e0b9767a4659725f6a7654bd58843b5266f5c8621a70b
pyr/warp
router.cljs
(ns warp.client.router (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [goog.events :as events] [goog.history.EventType :as EventType] [cljs.core.async :as a] [warp.client.state :refer [app]] [bidi.bidi :ref...
null
https://raw.githubusercontent.com/pyr/warp/c3ee96d90b233a47c1104b4339fed071ec8afe68/src/warp/client/router.cljs
clojure
(ns warp.client.router (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [goog.events :as events] [goog.history.EventType :as EventType] [cljs.core.async :as a] [warp.client.state :refer [app]] [bidi.bidi :ref...
4e386c8d032daba6c555d9744faf9f7dfb4306c7b14efb20eb7c48cd85fd0c90
wireapp/wire-server
SQS.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/galley/test/integration/API/SQS.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along | TODO : most of this module i...
9b9f071a04398e3393426b0c79e117a3ac29b690f97831a50d72cdc0dfd82468
haskell/time
MonthOfYear.hs
module Test.Calendar.MonthOfYear ( testMonthOfYear, ) where import Data.Foldable import Data.Time.Calendar import Test.Tasty import Test.Tasty.HUnit matchMonthOfYear :: MonthOfYear -> Int matchMonthOfYear m = case m of January -> 1 February -> 2 March -> 3 April -> 4 May -> 5 June -> 6 ...
null
https://raw.githubusercontent.com/haskell/time/c310f2f9de662e2db0509f6acb53c1d46b2cfe3e/test/main/Test/Calendar/MonthOfYear.hs
haskell
module Test.Calendar.MonthOfYear ( testMonthOfYear, ) where import Data.Foldable import Data.Time.Calendar import Test.Tasty import Test.Tasty.HUnit matchMonthOfYear :: MonthOfYear -> Int matchMonthOfYear m = case m of January -> 1 February -> 2 March -> 3 April -> 4 May -> 5 June -> 6 ...
56168691d5835045501207d24cb6a52b4740aca06c60c01cf4568478a096f910
MinaProtocol/mina
common.ml
open Core_kernel open Mina_base type invalid = [ `Invalid_keys of Signature_lib.Public_key.Compressed.Stable.Latest.t list | `Invalid_signature of Signature_lib.Public_key.Compressed.Stable.Latest.t list | `Invalid_proof of (Error.t[@to_yojson Error_json.error_to_yojson]) | `Missing_verification_key of ...
null
https://raw.githubusercontent.com/MinaProtocol/mina/3cece748c078b9d63020e7eed5114f87dd167f68/src/lib/verifier/common.ml
ocaml
check that vk expected for proof is the one being used Don't verify the proof if it has failed. Verification keys should be present if it reaches here
open Core_kernel open Mina_base type invalid = [ `Invalid_keys of Signature_lib.Public_key.Compressed.Stable.Latest.t list | `Invalid_signature of Signature_lib.Public_key.Compressed.Stable.Latest.t list | `Invalid_proof of (Error.t[@to_yojson Error_json.error_to_yojson]) | `Missing_verification_key of ...
1059984db7150983e84876008e7200e9e72c3feb42ebb76e72e57f890c83610a
Ericson2314/lighthouse
Chance.hs
module LwConc.Scheduler.Chance ( getNextThread , schedule , timeUp , dumpQueueLengths ) where -- This is a multi-level queue scheduler, taking priority into account. -- To select a priority level , it starts with maxBound , and rolls a die . If < 10 , it moves to a lower level , and starts over . import System.I...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/base/LwConc/Scheduler/Chance.hs
haskell
This is a multi-level queue scheduler, taking priority into account. just some seed |An array of ready queues, indexed by priority. |Returns which priority to pull the next thread from, and updates the countdown for next time. % chance of trying a lower priority. |Returns the next ready thread, or Nothing. no...
module LwConc.Scheduler.Chance ( getNextThread , schedule , timeUp , dumpQueueLengths ) where To select a priority level , it starts with maxBound , and rolls a die . If < 10 , it moves to a lower level , and starts over . import System.IO.Unsafe (unsafePerformIO) import Data.Sequence as Seq import GHC.Arr as Ar...
66b3951f5f721b36bbf35cf848cbeaf7e0f0930d20e057af8cdb86ed8e3d5206
conal/Fran
ShowFunctions.hs
From QuickCheck distribution . module ShowFunctions where instance Show (a->b) where show f = "<function>"
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/ShowFunctions.hs
haskell
From QuickCheck distribution . module ShowFunctions where instance Show (a->b) where show f = "<function>"
648cac60821b5f7ef747307f2978a2002d7b54c41e75c273ea0fbd0158cb01d4
sfx/schema-contrib
gen.clj
(ns schema-contrib.gen (:import (java.util Locale)) (:require [clojure.string :as string] [clojure.test.check.generators :as gen])) (def country (gen/elements (Locale/getISOCountries))) (def country-keyword (->> (Locale/getISOCountries) (map keyword) gen/elements)) (def language (...
null
https://raw.githubusercontent.com/sfx/schema-contrib/02cac012a982b40de570f9d5e432b58de54fa24c/src/schema_contrib/gen.clj
clojure
(ns schema-contrib.gen (:import (java.util Locale)) (:require [clojure.string :as string] [clojure.test.check.generators :as gen])) (def country (gen/elements (Locale/getISOCountries))) (def country-keyword (->> (Locale/getISOCountries) (map keyword) gen/elements)) (def language (...
e9e7376ad87e15fd25613beac5215c273fbe92bd91714af635c7a3487335cfcd
fukamachi/clozure-cl
l1-boot-3.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 1994 - 2001 Digitool , Inc This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/level-1/l1-boot-3.lisp
lisp
Package : CCL -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at l1-boot-3.lisp This could go on forever; try to recognize at least some com...
Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 1994 - 2001 Digitool , Inc This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as ...
d2c5a1e55fc50e9ffc9b4b05483d2347225c467e9feaabd1b18ed496689702c2
gowthamk/ocaml-irmin
test_counter.ml
open Icounter open Counter (* Utility functions *) U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n") end (* Set - AVL Tree *) let _ = U.print_header "Counter"; le...
null
https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/counter/test_counter.ml
ocaml
Utility functions Set - AVL Tree Thread2 syncs with master. Observes no changes. Thread1 forks thread2 Thread1 blocks on some operation
open Icounter open Counter U is a module with two functions module U = struct let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]" let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n") end let _ = U.print_header "Counter"; let module MkConfig (Vars: sig val root: string...
a5d9b0e1093765d5eba1ded1395ffb44669eba226b5599d3cf1131d0544b77c9
arttuka/reagent-material-ui
swipeable_drawer.cljs
(ns reagent-mui.material.swipeable-drawer "Imports @mui/material/SwipeableDrawer as a Reagent component. Original documentation is at -ui/api/swipeable-drawer/ ." (:require [reagent.core :as r] ["@mui/material/SwipeableDrawer" :as MuiSwipeableDrawer])) (def swipeable-drawer (r/adapt-react-class (.-d...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/swipeable_drawer.cljs
clojure
(ns reagent-mui.material.swipeable-drawer "Imports @mui/material/SwipeableDrawer as a Reagent component. Original documentation is at -ui/api/swipeable-drawer/ ." (:require [reagent.core :as r] ["@mui/material/SwipeableDrawer" :as MuiSwipeableDrawer])) (def swipeable-drawer (r/adapt-react-class (.-d...
843b4c13b69792e8abbc585fff7644cc7db0fe9270db59bb105e403db25f9a26
mainland/dph
DistST.hs
{-# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #-} # LANGUAGE ScopedTypeVariables # -- | Distributed ST computations. -- -- Computations of type 'DistST' are data-parallel computations which -- are run on each thread of a gang. At the moment, they can only access the -- element of a (possibly muta...
null
https://raw.githubusercontent.com/mainland/dph/742078c9e18b7dcf6526348e08d2dd16e2334739/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Primitive/DistST.hs
haskell
# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures # | Distributed ST computations. Computations of type 'DistST' are data-parallel computations which are run on each thread of a gang. At the moment, they can only access the element of a (possibly mutable) distributed value owned by the current th...
# LANGUAGE ScopedTypeVariables # module Data.Array.Parallel.Unlifted.Distributed.Primitive.DistST ( DistST , stToDistST , distST_, distST , runDistST, runDistST_seq , myIndex , myD , readMyMD, writeMyMD * Monadic combinators , mapDST_, mapDST, zipWit...
e8ce7c29307a5b8b0cae5771c5b318e4fabad0d680621100a8cd83255f4ddc9a
binaryage/cljs-devtools
runner.clj
(ns devtools.runner) (defmacro emit-clojure-version [] (clojure-version))
null
https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/tests/devtools/runner.clj
clojure
(ns devtools.runner) (defmacro emit-clojure-version [] (clojure-version))
3358fdda76d965830f732e02e5ec8d22fd2a857bb1a3070614e32e58d600def5
CoNarrative/precept
figwheel.clj
(ns precept.figwheel (:require [figwheel-sidecar.repl-api :as ra])) (defn start-fw [] (ra/start-figwheel!)) (defn stop-fw [] (ra/stop-figwheel!)) (defn cljs [] (ra/cljs-repl))
null
https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/dev/clj/precept/figwheel.clj
clojure
(ns precept.figwheel (:require [figwheel-sidecar.repl-api :as ra])) (defn start-fw [] (ra/start-figwheel!)) (defn stop-fw [] (ra/stop-figwheel!)) (defn cljs [] (ra/cljs-repl))
7924a738dcca7e52b11fab9a41077190f6d05a68d66073f2ce1e334090cb33a0
conjure-cp/conjure
gen.hs
import Data.List nbCons :: [Int] nbCons = [0,10..100] main :: IO () main = do mapM_ (gen "set" ) nbCons mapM_ (gen "mset") nbCons gen :: String -> Int -> IO () gen setOrMSet n = writeFile (setOrMSet ++ "-" ++ pad 3 (show n) ++ ".essence") $ unlines $ [ "language Essence 1.3" , "given n, a, b " ++ co...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/experiments/scaling/numberOfCons/gen.hs
haskell
import Data.List nbCons :: [Int] nbCons = [0,10..100] main :: IO () main = do mapM_ (gen "set" ) nbCons mapM_ (gen "mset") nbCons gen :: String -> Int -> IO () gen setOrMSet n = writeFile (setOrMSet ++ "-" ++ pad 3 (show n) ++ ".essence") $ unlines $ [ "language Essence 1.3" , "given n, a, b " ++ co...
d967cca81437dc6d1f13abda381d022701f22be5df58873a2ebc2529ad5114bb
may-liu/qtalk
ejabberd_xml2pb_message.erl
-module(ejabberd_xml2pb_message). -include("message_pb.hrl"). -include("jlib.hrl"). -include("logger.hrl"). -export([xml2pb_msg/3]). encode_pb_xmpp_msg(Msg_Type,Client_Type,Read_Type,Client_version,Msg_ID,Channel_ID,Ex_INFO,Backup_info,Carbon,Message,ID,Time) -> Msg_Body = #messagebody{headers = ejabberd_...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/ejabberd_xml2pb_message.erl
erlang
-module(ejabberd_xml2pb_message). -include("message_pb.hrl"). -include("jlib.hrl"). -include("logger.hrl"). -export([xml2pb_msg/3]). encode_pb_xmpp_msg(Msg_Type,Client_Type,Read_Type,Client_version,Msg_ID,Channel_ID,Ex_INFO,Backup_info,Carbon,Message,ID,Time) -> Msg_Body = #messagebody{headers = ejabberd_...