_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
f9b66ca2c24966f6f34997d2e49e5fc9ebf9818440d8086b9702ab93bc065391
weblocks-framework/weblocks
datalist.lisp
(in-package :weblocks-test) ;;; Make sure we can't turn on selection (deftest datalist-initialize-instance-1 (with-request :get nil (not (null (cdr (multiple-value-list (ignore-errors (make-instance 'datalist :data-class 'employee ...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/test/widgets/datalist.lisp
lisp
Make sure we can't turn on selection Ensure scaffold item view is created Test datalist-render-sort-dropdown , & quot;weblocks - session=1%3ATEST&quot ;) ; return ) ; Test dataseq-render-mining-bar for datalist Test dataseq-wrap-body-in-form-p for datalist Test rendering datalist Test dataseq-render-operati...
(in-package :weblocks-test) (deftest datalist-initialize-instance-1 (with-request :get nil (not (null (cdr (multiple-value-list (ignore-errors (make-instance 'datalist :data-class 'employee :allow-select-p t)))))))...
246343fd7b65143f18a446e546fcbef96be8fa422efb53d37be2a5f11667e0c3
ollef/rope-utf16-splay
Position.hs
module Data.Rope.UTF16.Internal.Position where import Data.Semigroup data RowColumn = RowColumn { row :: !Int -- ^ Number of newlines before this position , column :: !Int -- ^ Number of UTF-16 code units since last newline or start of string } deriving (Eq, Ord, Show) instance Semigroup RowColumn where RowC...
null
https://raw.githubusercontent.com/ollef/rope-utf16-splay/d9b25272339593f8b3ceb7245d8bd26d5d8dfa65/src/Data/Rope/UTF16/Internal/Position.hs
haskell
^ Number of newlines before this position ^ Number of UTF-16 code units since last newline or start of string ^ UTF-16 code units
module Data.Rope.UTF16.Internal.Position where import Data.Semigroup data RowColumn = RowColumn } deriving (Eq, Ord, Show) instance Semigroup RowColumn where RowColumn 0 c1 <> RowColumn 0 c2 = RowColumn 0 $ c1 + c2 RowColumn 0 _ <> v2 = v2 RowColumn r1 c1 <> RowColumn 0 c2 = RowColumn r1 $ c1 + c2 RowColum...
14110db26663da38c9f6907d4085a445eba1b88b4e6065a07fc7ba25cf810697
clj-dasha/dasha
core_test.clj
(ns dasha.core-test (:require [clojure.test :refer :all] [dasha.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/clj-dasha/dasha/13508b5d75cabce5a6dff9545054f7ef40731717/test/dasha/core_test.clj
clojure
(ns dasha.core-test (:require [clojure.test :refer :all] [dasha.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
fef96c8922b73b6419e842cfb5ebf136264586452cdd43232d1a511c43613156
fumieval/yojijukugo
Main.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # module Main where import RIO hiding ((^.), (%~), (.~), lens) import Control.Lens import Data.Aeson qualified as J import Data.Yaml qualified as Yaml import Gameplay import Network.Wai.Handler.Warp qualified as Warp import N...
null
https://raw.githubusercontent.com/fumieval/yojijukugo/c1125ca95f3892f7fe72b6a20c9ba0f66869d0fd/src/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # module Main where import RIO hiding ((^.), (%~), (.~), lens) import Control.Lens import Data.Aeson qualified as J import Data.Yaml qualified as Yaml import Gameplay import Network.Wai.Handler.Warp qualified as Warp import Network.Wai.Handler.WebSockets quali...
9e7c14e703624212ba3347ea1e1cdb0a626d64a49560bc9e261d7aa01e8bbf4d
kivra/fluentd-erlang
fluentd_sup.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( c ) 2012 - 2014 Kivra %%% %%% 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 ...
null
https://raw.githubusercontent.com/kivra/fluentd-erlang/594583f8cafdb2ec8384178d26a66a3d013e1ac7/src/fluentd_sup.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 EV...
Copyright ( c ) 2012 - 2014 Kivra 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 @doc Erlang client -module(fluentd_sup). -behaviour(s...
f6f06fececd1c04465c394bc9f18bc4fb26c328d2a7f6a60b47dade1f5e5c049
seancorfield/honeysql
sql.cljc
copyright ( c ) 2020 - 2022 , all rights reserved (ns honey.sql "Primary API for HoneySQL 2.x. This includes the `format` function -- the primary entry point -- as well as several public formatters that are intended to help users extend the supported syntax. In addition, functions to extend HoneySQL ar...
null
https://raw.githubusercontent.com/seancorfield/honeysql/f7cf5718cce025dfee8b7021936723c6a2912195/src/honey/sql.cljc
clojure
returns a vector returns a string returns a vector default formatting for known clauses dynamic dialect handling for formatting then SQL clauses in priority order: nil would be a better default but that makes testing individual functions harder than necessary: there is no way, currently, to enable suspicious...
copyright ( c ) 2020 - 2022 , all rights reserved (ns honey.sql "Primary API for HoneySQL 2.x. This includes the `format` function -- the primary entry point -- as well as several public formatters that are intended to help users extend the supported syntax. In addition, functions to extend HoneySQL ar...
c9e0af7da970759494d9eb5ec9ff5478748ab28ff5e09bbc84af2787852cb853
grzm/awyeah-api
signers_test.clj
Copyright ( c ) Cognitect , Inc. ;; All rights reserved. (ns com.grzm.awyeah.signers-test "See -v4-test-suite.html" (:require [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as stest] [clojure.string :as str] [clojure.test :as t :refer [deftest is testing]] [com.gr...
null
https://raw.githubusercontent.com/grzm/awyeah-api/1810bf624da2be58c77813106a1d51e32db11690/test/src/com/grzm/awyeah/signers_test.clj
clojure
All rights reserved. BOMInputStream strips UTF8 BOM if present
Copyright ( c ) Cognitect , Inc. (ns com.grzm.awyeah.signers-test "See -v4-test-suite.html" (:require [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as stest] [clojure.string :as str] [clojure.test :as t :refer [deftest is testing]] [com.grzm.awyeah.signers :as si...
f6ca9015d87861033a8cc87f17b0e76de6be317065b345c895bee73bdef145e0
awakesecurity/language-ninja
Target.hs
-*- coding : utf-8 ; mode : ; -*- -- File: library/Language/Ninja/IR/Target.hs -- -- License: -- Copyright 2017 Awake Security -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of th...
null
https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/library/Language/Ninja/IR/Target.hs
haskell
File: library/Language/Ninja/IR/Target.hs License: Copyright 2017 Awake Security you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR C...
-*- coding : utf-8 ; mode : ; -*- Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUA...
ac7a8292ef85486d2446085d96c6a1a9cf72e0fe081a0f8ce868d066dd657f0b
mirage/irmin-server
cli.ml
open Cmdliner let default_uri = Uri.of_string "tcp:9181" let uri : Uri.t option Cmdliner.Term.t = let doc = Arg.info ~docv:"URL" ~doc:"URI to connect to or listen on" [ "uri"; "u" ] in Term.( const (Option.map Uri.of_string) $ Arg.(value & opt (some string) None & doc)) let config_path : string opt...
null
https://raw.githubusercontent.com/mirage/irmin-server/6a743893db8e27f7175208e95969e746a84deb1d/src/irmin-server-internal/cli.ml
ocaml
open Cmdliner let default_uri = Uri.of_string "tcp:9181" let uri : Uri.t option Cmdliner.Term.t = let doc = Arg.info ~docv:"URL" ~doc:"URI to connect to or listen on" [ "uri"; "u" ] in Term.( const (Option.map Uri.of_string) $ Arg.(value & opt (some string) None & doc)) let config_path : string opt...
5c51d9ab0278d056de35b56e02fde1f2656f9e175fd9c37589eaa599b286c937
pedestal/pedestal
service.clj
(ns {{namespace}}.service (:require [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [ring.util.response :as ring-resp])) (defn about-page [request] (ring-resp/response (format "Clojure %s - served from %s" ...
null
https://raw.githubusercontent.com/pedestal/pedestal/27aab7996acee6caac50e07409e978200bda86ab/service-template/src/leiningen/new/pedestal_service/service.clj
clojure
Defines "/" and "/about" routes with their associated :get handlers. The interceptors defined after the verb map (e.g., {:get home-page} apply to / and its children (/about). Map-based routes (def routes `{"/" {:interceptors [(body-params/body-params) http/html-body] :get home-page ...
(ns {{namespace}}.service (:require [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [ring.util.response :as ring-resp])) (defn about-page [request] (ring-resp/response (format "Clojure %s - served from %s" ...
1f274d94d22f8b0c5b8f9d114b89384a419e0064fb2e037146bb23057de6dc63
CodyReichert/qi
cl-yaml.lisp
(in-package :cl-user) (defpackage cl-yaml-test (:use :cl :fiveam) (:documentation "Run all test suites.")) (in-package :cl-yaml-test) (run! 'cl-yaml-test.float:float) (run! 'cl-yaml-test.scalar:scalar) (run! 'cl-yaml-test.parser:parser) (run! 'cl-yaml-test.emitter:emitter) (run! 'cl-yaml-test.spec:spec) (run! 'cl-...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-yaml-latest/t/cl-yaml.lisp
lisp
(in-package :cl-user) (defpackage cl-yaml-test (:use :cl :fiveam) (:documentation "Run all test suites.")) (in-package :cl-yaml-test) (run! 'cl-yaml-test.float:float) (run! 'cl-yaml-test.scalar:scalar) (run! 'cl-yaml-test.parser:parser) (run! 'cl-yaml-test.emitter:emitter) (run! 'cl-yaml-test.spec:spec) (run! 'cl-...
1ef1bc2b2a2609a46cd07e5e28b8e6e373075b8a01627ae4de1a776c2d3c1f13
appleby/99-lisp-problems
p19.lisp
;;;; (**) Rotate a list N places to the left. ;;;; Examples: * ( rotate ' ( a b c d e f g h ) 3 ) ;;;; (D E F G H A B C) ;;;; * (rotate '(a b c d e f g h) -2) ;;;; (G H A B C D E F) ;;;; Hint: Use the predefined functions length and append, as well as ;;;; the result of problem P17. (in-package :99-problems) (def...
null
https://raw.githubusercontent.com/appleby/99-lisp-problems/a12b2a585ac5af06f456f844d308bbada78e647c/p19.lisp
lisp
(**) Rotate a list N places to the left. Examples: (D E F G H A B C) * (rotate '(a b c d e f g h) -2) (G H A B C D E F) Hint: Use the predefined functions length and append, as well as the result of problem P17.
* ( rotate ' ( a b c d e f g h ) 3 ) (in-package :99-problems) (defun rotate (lst n) (if (null lst) nil (let ((split-point (mod n (length lst)))) (if (zerop split-point) (copy-list lst) (destructuring-bind (head tail) (split lst split-point) (append tail head)))))) (define-test rot...
b99cb19c820ea87adcd8e2fa980e8762e680bf5be47f0fe103db61309c4ce060
TakaiKinoko/Cornell_CS3110_OCaml
mutable_stack.ml
module type MutableStack = sig (* ['a t] is the type of mutable stacks whose elements have type ['a]. * The stack is mutable not in the sense that its elements can * be changed, but in the sense that it is not persistent: * the operations [push] and [pop] destructively modify the stack. *) type 'a t exception...
null
https://raw.githubusercontent.com/TakaiKinoko/Cornell_CS3110_OCaml/0a830bc50a5e39f010074dc289161426294cad1d/Chap8_Advanced_data_structures/09mutable_fields/mutable_stack.ml
ocaml
['a t] is the type of mutable stacks whose elements have type ['a]. * The stack is mutable not in the sense that its elements can * be changed, but in the sense that it is not persistent: * the operations [push] and [pop] destructively modify the stack. [empty ()] is the empty stack [push x s] modifies [s] to make...
module type MutableStack = sig type 'a t exception Empty val empty : unit -> 'a t val push : 'a -> 'a t -> unit val peek : 'a t -> 'a val pop : 'a t -> unit end module MutableStack = struct type 'a node = {value: 'a; mutable next: 'a node option} AF : An [ ' a t ] is a stack repres...
6ea89eaa9438c8380ad3d8e17022ca8b4b8429d74839949e66d366549d9dce34
leksah/leksah
State.hs
# LANGUAGE RecordWildCards # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE PatternSynonyms # # LANGUAGE UndecidableInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # -...
null
https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src/IDE/Core/State.hs
haskell
# LANGUAGE TypeSynonymInstances # # LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # --------------------------------------------------------------------------- Module : IDE.Core.State License : GNU-GPL Maintainer : <maintainer at leksah.org> Stability : provisional Portability : por...
# LANGUAGE RecordWildCards # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE PatternSynonyms # # LANGUAGE UndecidableInstances # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # Copyright : ( c ) , | The core state of ide . This module is imported from every other module ,...
265607bc139dfc6ee285815e8538410292fa3e2d77590a6b8600a97653ec6437
patrikja/autosar
ABS.hs
Copyright ( c ) 2014 - 2016 , , , , and 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 copyr...
null
https://raw.githubusercontent.com/patrikja/autosar/2b8d3a22eb99812dca645a1c3c18ce18fbf6d539/ARSim/arsim-examples/AUTOSAR/ABS/ABS.hs
haskell
# LANGUAGE TypeFamilies # * ABS system * Valve ports * Wheel ports * Types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Bang-bang controller ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Bang-bang controller using pulse width modulation con...
Copyright ( c ) 2014 - 2016 , , , , and 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 copyr...
f9f2f41de9957e48ee463a1a8a927d93d321839395bbe6a36a6b15d88e0c47da
MercuryTechnologies/moat
Class.hs
# LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Moat.Class ( ToMoatType (..), ToMoatData (..), ) where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import Data.CaseInsensitive (CI) import Data.List.NonEmpty (NonEmpty) i...
null
https://raw.githubusercontent.com/MercuryTechnologies/moat/e9491d3cd15ab6b467c6bfba1dae910a247750ec/src/Moat/Class.hs
haskell
| The class for things which can be converted to Typically the instance will be generated by 'mobileGen', 'mobileGenWith'. | The class for things which can be converted to a 'MoatType'. Typically the instance will be generated by 'mobileGen', 'mobileGenWith'. | Convert a Proxy of type to a 'MoatType...
# LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Moat.Class ( ToMoatType (..), ToMoatData (..), ) where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import Data.CaseInsensitive (CI) import Data.List.NonEmpty (NonEmpty) i...
67174922b7d97127fb4c1ac24e64db90c08adc32b96d192c061bdbed9d2d1ce2
fhunleth/relsync
test_hooks.erl
-module(test_hooks). -export([presync/0, postsync/0]). presync() -> io:format("Got a presync~n"). postsync() -> io:format("Got a postsync~n").
null
https://raw.githubusercontent.com/fhunleth/relsync/4f49df183fa4b5cff5f7afb4818d907b65d9ab37/test_hooks.erl
erlang
-module(test_hooks). -export([presync/0, postsync/0]). presync() -> io:format("Got a presync~n"). postsync() -> io:format("Got a postsync~n").
fb19d4797b44e9d81a5fead87283e64e58e4e70416ab81364a652037cf333417
sile/evel
evel_commission.erl
Copyright ( c ) 2016 < > %% This software is released under the MIT License . %% See the LICENSE file in the project root for full license information. %% %% @doc This process manages elections and records leaders in which local clients are interested %% @private %% @end -module(evel_commission). -hebaviour(g...
null
https://raw.githubusercontent.com/sile/evel/9c3fc77b91ab55c7e3dde3b2325452891e8c43aa/src/evel_commission.erl
erlang
See the LICENSE file in the project root for full license information. @doc This process manages elections and records leaders in which local clients are interested @end ---------------------------------------------------------------------------------------------------------------------- Exported API -----------...
Copyright ( c ) 2016 < > This software is released under the MIT License . @private -module(evel_commission). -hebaviour(gen_server). -export([start_link/0]). -export([elect/3]). -export([dismiss/2]). -export([find_leader/2]). -export([known_leaders/0]). -export([init/1, handle_call/3, handle_cast/2, handle...
38281683a76c2d4b872841d1bb1d7405c0b1ff22d00823364fa368b97976b55c
may-liu/qtalk
http_get_muc_users.erl
%% Feel free to use, reuse and abuse the code in this file. -module(http_get_muc_users). -export([init/3]). -export([handle/2]). -export([terminate/3]). -include("logger.hrl"). -include("ejb_http_server.hrl"). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, _ } = cowboy_req:meth...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_get_muc_users.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(http_get_muc_users). -export([init/3]). -export([handle/2]). -export([terminate/3]). -include("logger.hrl"). -include("ejb_http_server.hrl"). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, _ } = cowboy_req:method(Req), catch ejb_monitor:monitor_count(<<"http_get_muc...
59fcb042a21601b2b568f5d6496ffc821b19e3663780ca68084b0e40436f7ef0
project-oak/hafnium-verification
QuandaryConfig.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/quandary/QuandaryConfig.mli
ocaml
* utilities for importing JSON specifications of sources/sinks into Quandary
* 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 ...
41baaf3158d706ac36b32d0cab2b1781f2d3e504794cd560bf714e1b91a15bfd
JKTKops/ProtoHaskell
test.hs
module Test where --- test of comment {- TEST: Block comment. -} {- TEST: Nested block comment. {- this portion is nested. -} this is still commented. -} test :: a test = undefined f x = case x of True -> 0 False -> 1
null
https://raw.githubusercontent.com/JKTKops/ProtoHaskell/437c37d7bd6d862008f86d7e8045c7a60b12b532/src/Compiler/Parser/test.hs
haskell
- test of comment TEST: Block comment. TEST: Nested block comment. {- this portion is nested.
module Test where this is still commented. -} test :: a test = undefined f x = case x of True -> 0 False -> 1
0e2eab374fcfa51cf344093be93b0ba2243efbb16bf668a56c14efd44bf9f0cb
MaartenFaddegon/Hoed
Main.hs
import Properties import Debug.Hoed.NoTrace import System.Environment import Text.Printf import Control.Monad import System.Random import Test.QuickCheck import Data.Maybe import XMonad.StackSet import qualified Data.Map as M myStackSet :: T myStackSet = StackSet {current = Screen {workspace = Workspace {tag = NonNega...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/XMonad_changing_focus_duplicates_windows__test_only/Main.hs
haskell
testing for failure: tall layout full layout resize hints
import Properties import Debug.Hoed.NoTrace import System.Environment import Text.Printf import Control.Monad import System.Random import Test.QuickCheck import Data.Maybe import XMonad.StackSet import qualified Data.Map as M myStackSet :: T myStackSet = StackSet {current = Screen {workspace = Workspace {tag = NonNega...
6b967bbc1929e0677dc5e0415ba7a30bd1eb7f8e3d5fb1d796d8a52fa9a9719e
number571/Haskell
xor.hs
module Main where import Data.Bits (Bits, shiftL, (.|.)) pack :: (Num b, Foldable t, Bits b) => t b -> b pack a = foldl go 0 a where go acc i = (acc `shiftL` 1) .|. i addFalse :: [Bool] -> [Bool] addFalse xN = False : xN toBool :: Int -> Bool toBool 1 = True toBool 0 = False toNum :: Bool -> Int toNum True = 1 ...
null
https://raw.githubusercontent.com/number571/Haskell/7da2676c2604706d43791dc89c0ca8c9842aea48/Templates/xor.hs
haskell
module Main where import Data.Bits (Bits, shiftL, (.|.)) pack :: (Num b, Foldable t, Bits b) => t b -> b pack a = foldl go 0 a where go acc i = (acc `shiftL` 1) .|. i addFalse :: [Bool] -> [Bool] addFalse xN = False : xN toBool :: Int -> Bool toBool 1 = True toBool 0 = False toNum :: Bool -> Int toNum True = 1 ...
8539bd1e6406ee804a4f4df2501cc5f4392a4281b8f608e3d59e0880c793f80d
pyr/warp
parser.clj
(ns warp.parser (:require [clojure.string :as str] [clojure.spec.alpha :as s] [clojure.edn :as edn] [warp.dsl :as dsl])) (defn get-extension [path] (when-let [[_ extension] (re-matches #"^.*\.([a-zA-Z]+)*$" path)] (let [kw (keyword (str/lower-case extension)) ...
null
https://raw.githubusercontent.com/pyr/warp/c3ee96d90b233a47c1104b4339fed071ec8afe68/src/warp/parser.clj
clojure
(ns warp.parser (:require [clojure.string :as str] [clojure.spec.alpha :as s] [clojure.edn :as edn] [warp.dsl :as dsl])) (defn get-extension [path] (when-let [[_ extension] (re-matches #"^.*\.([a-zA-Z]+)*$" path)] (let [kw (keyword (str/lower-case extension)) ...
768423616e90251bf6bd9afd7832806bb3d988bda44cd0b1c598185db0179767
carlosganzerla/cl-gen
utils.lisp
(in-package #:cl-gen) (defmacro with-gensyms (syms &body body) `(let (,@(mapcar (lambda (s) `(,s (gensym))) syms)) ,@body)) (defun concat (&rest args) (apply #'concatenate 'string (mapcar (lambda (arg) (if (symbolp arg) (sy...
null
https://raw.githubusercontent.com/carlosganzerla/cl-gen/a74368d1a72d6d8b065a35aca0841e27e8b81502/src/utils.lisp
lisp
(in-package #:cl-gen) (defmacro with-gensyms (syms &body body) `(let (,@(mapcar (lambda (s) `(,s (gensym))) syms)) ,@body)) (defun concat (&rest args) (apply #'concatenate 'string (mapcar (lambda (arg) (if (symbolp arg) (sy...
9cd8516995fcb47ad30bdaead9dda7691d0be0d62511eb350756d919906aab93
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
GetIssuingTransactionsTransaction.hs
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the different functions to run the operation getIssuingTransactionsTransaction ...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetIssuingTransactionsTransaction.hs
haskell
# LANGUAGE ExplicitForAll # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the different functions to run the operation getIssuingTransactionsTransaction | > GET /v1/issuing/transactions/{transaction} | Contains all available parameters of this operation (query and path parameters) | Monadic com...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Operations.GetIssuingTransactionsTransaction where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader import qualified Data.Aeson import qual...
6631fab174b1b4d95c8f60208bc08e6bc52b2bd54646f09dc085f6abbc7ab37d
reactiveml/rml
def_static.ml
(**********************************************************************) (* *) (* ReactiveML *) (* *) (* ...
null
https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/compiler/static/def_static.ml
ocaml
******************************************************************** ReactiveML ...
Copyright 2002 , 2007 . All rights reserved . version 1.0 . - theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 ) - Verimag , CNRS Grenoble ( 2005 - 2006 ) - projet , ( 2006 - 2007 ) ...
dabe6b63e96c1df71dc47f0bcba6ef440535bd0272b21c6768838076ebd35737
kblake/erlang-chat-demo
element_nav.erl
Nitrogen Web Framework for Erlang See MIT - LICENSE for licensing information . -module (element_nav). -include_lib ("wf.hrl"). -compile(export_all). reflect() -> record_info(fields, nav). render_element(Record) -> wf_tags:emit_tag(nav, Record#nav.body, [ {class, ["nav", Record#nav.class]}, {...
null
https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/apps/nitrogen/src/elements/html5/element_nav.erl
erlang
Nitrogen Web Framework for Erlang See MIT - LICENSE for licensing information . -module (element_nav). -include_lib ("wf.hrl"). -compile(export_all). reflect() -> record_info(fields, nav). render_element(Record) -> wf_tags:emit_tag(nav, Record#nav.body, [ {class, ["nav", Record#nav.class]}, {...
860ba58e7e2c3e946a091ea1db1b36bec5cadf5cbd64d792f6e09e7d121a9674
ndmitchell/uniplate
ComposOverlap.hs
{-# OPTIONS_GHC -fglasgow-exts -fallow-incoherent-instances #-} module Examples.ComposOverlap(module Examples.ComposOverlap, module Data.Generics.PlayMPTC) where import Data.Generics.PlayMPTC data Exp2 = EAbs2 String Exp2 | EApp2 Exp2 Exp2 | EVar2 String deriving Show instance Play Ex...
null
https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Uniplate/Examples/ComposOverlap.hs
haskell
# OPTIONS_GHC -fglasgow-exts -fallow-incoherent-instances # COMBINATOR BASED PLAY INSTANCES
module Examples.ComposOverlap(module Examples.ComposOverlap, module Data.Generics.PlayMPTC) where import Data.Generics.PlayMPTC data Exp2 = EAbs2 String Exp2 | EApp2 Exp2 Exp2 | EVar2 String deriving Show instance Play Exp2 where replaceChildren x = case x of E...
4d7a17871f3cab13518fe6db9e2311b8538e85feb0f54747cc8379689fec02ad
rpav/spell-and-dagger
textbox.lisp
(in-package :game) (defclass textbox (ui) ((text :initform nil :initarg :text :accessor textbox-text) (margin :initform 50.0 :initarg :margin) (path-cmd :initform nil) (fontstyle-cmd :initform nil) (text-cmd :initform nil))) (defmethod initialize-instance :after ((box textbox) &key &allow-other-keys) ...
null
https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/ui/textbox.lisp
lisp
(in-package :game) (defclass textbox (ui) ((text :initform nil :initarg :text :accessor textbox-text) (margin :initform 50.0 :initarg :margin) (path-cmd :initform nil) (fontstyle-cmd :initform nil) (text-cmd :initform nil))) (defmethod initialize-instance :after ((box textbox) &key &allow-other-keys) ...
adca2e28da0ed4629c279610a1f4c1b36d6d55ec036c896ff7474b9d9534becd
clojure-quant/infra-guix
file-sync.scm
(define-module (awb99 config file-sync) #:use-module (gnu) #:use-module (gnu services syncthing) #:export (service-syncthing)) ;The (gnu services syncthing) module provides the following services: You might want a syncthing daemon if you have files between two or ; more computers and want to sync them in real ...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/98a6a8889dc4d90944a6e576cca91df478b08117/modules/awb99/config/file-sync.scm
scheme
The (gnu services syncthing) module provides the following services: more computers and want to sync them in real time, safely protected from prying eyes. :8384/ other’s device ID. A device ID is a unique, cryptographically-secure identifier that is generated as part of It is printed in the log above, and you ca...
(define-module (awb99 config file-sync) #:use-module (gnu) #:use-module (gnu services syncthing) #:export (service-syncthing)) You might want a syncthing daemon if you have files between two or Two devices will only connect and talk to each other if they are both configured with each the key generation th...
5c2362d81c68342d137d1829664bef21931b41e43158d4a96246f86caa1802f2
tmcgilchrist/tiger
env.ml
module T = Types type access type entry = | VarEntry of T.t | FunEntry of T.t list * T.t let base_venv = Symbol.Table.empty let base_tenv = Symbol.Table.empty |> Symbol.Table.add_exn ~key:(Symbol.symbol "int") ~data:T.Int |> Symbol.Table.add_exn ~key:(Symbol.symbol "string") ~data:T.String
null
https://raw.githubusercontent.com/tmcgilchrist/tiger/db4bc99e85ae80c5f15749d66a9e4d8ebe3b2faa/lib/env.ml
ocaml
module T = Types type access type entry = | VarEntry of T.t | FunEntry of T.t list * T.t let base_venv = Symbol.Table.empty let base_tenv = Symbol.Table.empty |> Symbol.Table.add_exn ~key:(Symbol.symbol "int") ~data:T.Int |> Symbol.Table.add_exn ~key:(Symbol.symbol "string") ~data:T.String
1bf92b9e8e19fab994252479c37c45edd5e36066f36e3794b8cc5a03bea50d0c
bravit/tt-ghc-exercises
UntypedTests.hs
Because untyped is supported by more than one implementation ( e.g. , both untyped and fulluntyped , we extract eval tests into a common module both untyped and fulluntyped, we extract eval tests into a common module -} module UntypedTests where -- Each element in list contains: (label, expected, input...
null
https://raw.githubusercontent.com/bravit/tt-ghc-exercises/c4805ac48134df42112b2823eb9391d17b2780b3/untyped/UntypedTests.hs
haskell
Each element in list contains: (label, expected, input) test the full sample file from the original untyped impl
Because untyped is supported by more than one implementation ( e.g. , both untyped and fulluntyped , we extract eval tests into a common module both untyped and fulluntyped, we extract eval tests into a common module -} module UntypedTests where untypedEvalTests = [("binder", "x ", "x/;"), ...
d913a055d7ed422d1337a0f1aeb99abee19f23cfd31b333b5179445f7cd38445
ocaml/odoc
a.mli
(** Module A. *) module B = A__b (** @canonical B *)
null
https://raw.githubusercontent.com/ocaml/odoc/2f639d7d661bc5397afce83dfaa71af53d2a8677/test/xref2/module_preamble.t/a.mli
ocaml
* Module A. * @canonical B
module B = A__b
a024844588244d3f489d2b291f721ce66f433322ba6bbe2e1dea953122c9886f
digitallyinduced/ihp
Polygon.hs
| Module : Test . Postgres . Polygon Copyright : ( c ) digitally induced GmbH , 2022 Module: Test.Postgres.Polygon Copyright: (c) digitally induced GmbH, 2022 -} module Test.Postgres.Polygon where import Test.Hspec import Test.Postgres.Support import IHP.Prelude import IHP.Postgres.Point import IHP.Postgres.Poly...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/3cd00517ff3f6e97e1ca0d68a4ce61d61c66d4aa/Test/Postgres/Polygon.hs
haskell
| Module : Test . Postgres . Polygon Copyright : ( c ) digitally induced GmbH , 2022 Module: Test.Postgres.Polygon Copyright: (c) digitally induced GmbH, 2022 -} module Test.Postgres.Polygon where import Test.Hspec import Test.Postgres.Support import IHP.Prelude import IHP.Postgres.Point import IHP.Postgres.Poly...
5f5e4db5ba542f2c976002b892565635f7b34323158a82c61972af7a260bd69b
kronkltd/jiksnu
actions.clj
(ns jiksnu.modules.core.actions (:require [ciste.commands :refer [add-command!]] [ciste.core :refer [with-format with-serialization]] [ciste.event :as event] [ciste.filters :refer [filter-action]] [ciste.routes :refer [resolve-routes]] [jiksnu.predicates :as...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/actions.clj
clojure
(timbre/debugf "Getting page: %s" page-name) FIXME: Handle error
(ns jiksnu.modules.core.actions (:require [ciste.commands :refer [add-command!]] [ciste.core :refer [with-format with-serialization]] [ciste.event :as event] [ciste.filters :refer [filter-action]] [ciste.routes :refer [resolve-routes]] [jiksnu.predicates :as...
e6192bcd54eff02345cecc46657eb807d882194b43f8c4ae1f142df8cfb33aef
onyx-platform/onyx
gc_test.clj
(ns onyx.log.gc-test (:require [onyx.extensions :as extensions] [onyx.log.entry :refer [create-log-entry]] [onyx.system] [schema.core :as s] [schema.test] [onyx.log.replica :as replica] [onyx.peer.log-version] [clojure.test :refer [de...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/log/gc_test.clj
clojure
(ns onyx.log.gc-test (:require [onyx.extensions :as extensions] [onyx.log.entry :refer [create-log-entry]] [onyx.system] [schema.core :as s] [schema.test] [onyx.log.replica :as replica] [onyx.peer.log-version] [clojure.test :refer [de...
680213b5a7a271825d8dcebe33873bf27557bef5d5d7fad295550866773b742b
MaartenFaddegon/Hoed
Value.hs
module Value(Value(..), Op1(..), Op2(..), uno, duo) where data Value = Num Int | Log Bool | Wrong deriving (Eq, Show) data Op1 = Not | Minus deriving (Eq, Show) data Op2 = And | Or | Mul | Add | Sub | Div | Mod | Less | LessEq | Eq deriving (Eq, Show) uno :: Op1 -> Value -> Valu...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/afp02Exercises/Compiler/vanilla/Value.hs
haskell
module Value(Value(..), Op1(..), Op2(..), uno, duo) where data Value = Num Int | Log Bool | Wrong deriving (Eq, Show) data Op1 = Not | Minus deriving (Eq, Show) data Op2 = And | Or | Mul | Add | Sub | Div | Mod | Less | LessEq | Eq deriving (Eq, Show) uno :: Op1 -> Value -> Valu...
9099b2702952a71be2e0d9326072d11b88988ef4865d82d0ea3290cff66caa3d
camllight/camllight
frx_after.ml
#open "protocol";; let idle f = let id = new_function_id () in let wrapped _ = do it first in case f raises exception f() in hashtblc__add callback_naming_table id wrapped; tkDo [| TkToken "after"; TkToken "idle"; TkToken ("camlcb "^ string_of_cbid id) |] ;;
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/frx/frx_after.ml
ocaml
#open "protocol";; let idle f = let id = new_function_id () in let wrapped _ = do it first in case f raises exception f() in hashtblc__add callback_naming_table id wrapped; tkDo [| TkToken "after"; TkToken "idle"; TkToken ("camlcb "^ string_of_cbid id) |] ;;
2308ad1b26bd1e9602832c5b8db4e41a9e278597d3376b1400b4bd89c4dced46
evolutics/haskell-formatter
ExactCode.hs
| Description : Exact syntax tree as parsed and printed by HSE Description : Exact syntax tree as parsed and printed by HSE -} module Language.Haskell.Formatter.ExactCode (ExactCode, actualCode, comments, create) where import qualified Language.Haskell.Formatter.Location as Location import qualified Language...
null
https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/src/library/Language/Haskell/Formatter/ExactCode.hs
haskell
| Description : Exact syntax tree as parsed and printed by HSE Description : Exact syntax tree as parsed and printed by HSE -} module Language.Haskell.Formatter.ExactCode (ExactCode, actualCode, comments, create) where import qualified Language.Haskell.Formatter.Location as Location import qualified Language...
951ecbc0f6069b3c54df65b8b9f7beaee988d28498b2b9fa8f21a7284d9e8ed2
nextjournal/freerange
cofx.cljc
(ns re-frame.cofx (:require [re-frame.interceptor :refer [->interceptor]] [re-frame.registry :as reg] [lambdaisland.glogi :as log])) ;; -- Registration ------------------------------------------------------------ (def kind :cofx) (assert (re-frame.registry/kinds kind)) ;; -- Interceptor --...
null
https://raw.githubusercontent.com/nextjournal/freerange/8cf68c30722a4c6f8f948a134c900d7a656ecad4/src/re_frame/cofx.cljc
clojure
-- Registration ------------------------------------------------------------ -- Interceptor ------------------------------------------------------------- usage (inject-cofx :datetime) we are registering an event handler <-- create an injecting interceptor Because this interceptor is used so much, we reify it (d...
(ns re-frame.cofx (:require [re-frame.interceptor :refer [->interceptor]] [re-frame.registry :as reg] [lambdaisland.glogi :as log])) (def kind :cofx) (assert (re-frame.registry/kinds kind)) (defn inject-cofx "Given an `id`, and an optional, arbitrary `value`, returns an interceptor w...
f7da6b7b97fa8d6135f5176bc7e27f236ba027923d17759a05617d4a4ce16ca3
kriyative/ecl-iphone-builder
build.lisp
(require 'cmp) (setq *print-case* :downcase) (defvar *ecl-root* #p"/opt/iphone/ecl/") (defvar *default-sdk-ver* "3.0") (defun compile-if-old (destdir sources &rest options) (unless (probe-file destdir) (si::mkdir destdir #o0777)) (mapcar #'(lambda (source) (let ((object (merge-pathnames ...
null
https://raw.githubusercontent.com/kriyative/ecl-iphone-builder/e42aec0dad175df976fbd23455b7317a81e612f1/eclshell/build.lisp
lisp
(require 'cmp) (setq *print-case* :downcase) (defvar *ecl-root* #p"/opt/iphone/ecl/") (defvar *default-sdk-ver* "3.0") (defun compile-if-old (destdir sources &rest options) (unless (probe-file destdir) (si::mkdir destdir #o0777)) (mapcar #'(lambda (source) (let ((object (merge-pathnames ...
33b9e4159d47272d577ac03a2e212a0e5e591647d93f7f83c2b03d6849a0639f
cirfi/sicp-my-solutions
1.39.scm
(define (cont-frac n d k) (define (cont-frac-recur i) (cond ((>= i k) (/ (n k) (d k))) (else (/ (n i) (+ (d i) (cont-frac-recur (+ i 1))))))) (cont-frac-recur 1)) (define (tan-cf x k) (cont-frac (lambda (i) (cond ((= i 1) x) (else (- (* x x))))) (lambda (i) ...
null
https://raw.githubusercontent.com/cirfi/sicp-my-solutions/4b6cc17391aa2c8c033b42b076a663b23aa022de/ch1/1.39.scm
scheme
(define (cont-frac n d k) (define (cont-frac-recur i) (cond ((>= i k) (/ (n k) (d k))) (else (/ (n i) (+ (d i) (cont-frac-recur (+ i 1))))))) (cont-frac-recur 1)) (define (tan-cf x k) (cont-frac (lambda (i) (cond ((= i 1) x) (else (- (* x x))))) (lambda (i) ...
b0ec8a4a7f282502ceed41affbdeb5087d5335e4c7ebab4ce51aa18ef2280a72
sibylfs/sibylfs_src
fs_test_system.ml
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/lib/fs_test_system.ml
ocaml
************************************************************************** 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 no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
cdcd6792db8a7ed7e243361156d4271eb3c8d52101910c19c0cf4487d5d0981f
nikodemus/fsdb
fsdb.lisp
; -*- mode: lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; File System Database ;;; (in-package :fsdb) ;; All put/get database implementations should extend db (defclass db () ()) (defun unimplemented-db-method (gf) (error "Unimplemented db method: ~s" gf)) (defgeneric ...
null
https://raw.githubusercontent.com/nikodemus/fsdb/a364eb90fbff8f1e8cd2194c4996955b0b01680f/src/fsdb.lisp
lisp
-*- mode: lisp -*- File System Database All put/get database implementations should extend db Implement the db protocol using the file system (ignore-errors (create-directory dir)) Don't use file-namestring here. It quotes names starting with "." Best if the writer doesn't run very often, as the readers bu...
(in-package :fsdb) (defclass db () ()) (defun unimplemented-db-method (gf) (error "Unimplemented db method: ~s" gf)) (defgeneric db-get (db key &rest more-keys) (:method ((db db) key &rest more-keys) (declare (ignore key more-keys)) (unimplemented-db-method 'db-get))) (defgeneric (setf db-get) (valu...
425bd9fd7b7766e923af4ab5eff7cd203d7c43cf99c8eabc32d24eb278d1057b
duncanatt/detecter
ranch_acceptor.erl
Copyright ( c ) 2011 - 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/ranch/ranch_acceptor.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 - 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(ranch_acceptor). -include("log.hrl"). -expor...
23fdc8a0a87803367c1b8d5bda1e9e87d2784d0d6e0f29e1c92cd017f252c987
yetibot/core
history.clj
(ns yetibot.core.models.history (:require [yetibot.core.db.util :refer [merge-queries]] [yetibot.core.db.history :refer [create query]] [yetibot.core.util.time :as t] [yetibot.core.config :refer [get-config]] [clj-time [coerce :refer [from-date]]] [clojure.spec.alpha :as s])) ;;;; read (...
null
https://raw.githubusercontent.com/yetibot/core/6c55a341a0b7f90b54c52d68db417e24646cc256/src/yetibot/core/models/history.clj
clojure
read possibly slow on large tables: aggregations Note: these aren't currently used. If the eventually are, we should figure out a relationally algebraic way to compose in order to avoid querying all cmd or non-cmd items for a given chat-source. formatting write
(ns yetibot.core.models.history (:require [yetibot.core.db.util :refer [merge-queries]] [yetibot.core.db.history :refer [create query]] [yetibot.core.util.time :as t] [yetibot.core.config :refer [get-config]] [clj-time [coerce :refer [from-date]]] [clojure.spec.alpha :as s])) (s/def ::ye...
d74eab181f38126894e303ddde15c0257699e4c899078dbf7ccdf469849c3ca0
mirage/ocaml-vhd
patterns.ml
* Copyright ( C ) 2011 - 2013 Citrix 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...
null
https://raw.githubusercontent.com/mirage/ocaml-vhd/1de881594fea69be0662bf70893c4a9288ab4d53/vhd_format/patterns.ml
ocaml
Interesting virtual sizes of disks edge case: minimum size edge case: maximum size edge case: last entry Individual step Create a vhd of a given size; open file for I/O Write copies of a given string over a specific sector Check writing and then reading back works Check writing and then reading back wo...
* Copyright ( C ) 2011 - 2013 Citrix 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...
699003a8bc9f234702ae8fc733d57336e078b135c945f77768636fb3d90d0c3a
jonascarpay/apecs
Physics.hs
-- | apecs-physics prelude module Apecs.Physics ( -- * General Physics, -- * Space Gravity (..), Iterations (..), stepPhysics, earthGravity, -- * Body -- $BODY Body (..), Position (..), Velocity (..), Angle (..), AngularVelocity (..), Force (..), BodyMass (..), Moment (..), CenterOfGravity (..),...
null
https://raw.githubusercontent.com/jonascarpay/apecs/19c9dc15b31bfd4173230a327dec98e2aa959936/apecs-physics/src/Apecs/Physics.hs
haskell
| apecs-physics prelude * General * Space * Body $BODY * Shape * Constraint * Collision * Query * Geometry $BODY also give this entity a number of __sub-components__. which makes the library both more expressive (as you can only write about the parts of a physics body you actually want to view or change) ...
module Apecs.Physics ( Physics, Gravity (..), Iterations (..), stepPhysics, earthGravity, Body (..), Position (..), Velocity (..), Angle (..), AngularVelocity (..), Force (..), BodyMass (..), Moment (..), CenterOfGravity (..), Torque (..), ShapeList (..), ConstraintList (..), Convex (..), Shape (..),...
6ffbd939c45c240bcabc86c99f910af366e48bd81c0d5de6d72b5c1f10ef04ad
Deducteam/zenon_modulo
log.ml
Copyright ( c ) 2013 , 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...
null
https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/log.ml
ocaml
* Time elapsed since initialization of the program, and time of start * print a list of items using the printing function * print an array of items using the printing function * print an array of items using the printing function
Copyright ( c ) 2013 , 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...
e79510f927a8c2e96db656585cd03b263233e01f800d57f40dea80366046da9e
may-liu/qtalk
acl.erl
%%%---------------------------------------------------------------------- %%% File : acl.erl Author : < > %%% Purpose : ACL support Created : 18 Jan 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/acl.erl
erlang
---------------------------------------------------------------------- File : acl.erl Purpose : ACL support This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;...
Author : < > Created : 18 Jan 2003 by < > ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along ...
eefadd0dd7b486021d28affa0411cb9b0676272a4f3984119d99c0d60c4882df
JacquesCarette/Drasil
Requirements.hs
# LANGUAGE PostfixOperators # module Drasil.GamePhysics.Requirements (funcReqs, nonfuncReqs) where import Language.Drasil hiding (organization) import Language.Drasil.Chunk.Concept.NamedCombinators import qualified Language.Drasil.Sentence.Combinators as S import qualified Drasil.DocLang.SRS as SRS (solCharSpec) impo...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/gamephysics/lib/Drasil/GamePhysics/Requirements.hs
haskell
---------------------------- SECTION 5 : REQUIREMENTS -- ---------------------------- --------------------------------- --------------------------------- Currently need separate chunks for plurals like rigid bodies, velocities, etc. | template for requirements | with added constraint | without added constraint ...
# LANGUAGE PostfixOperators # module Drasil.GamePhysics.Requirements (funcReqs, nonfuncReqs) where import Language.Drasil hiding (organization) import Language.Drasil.Chunk.Concept.NamedCombinators import qualified Language.Drasil.Sentence.Combinators as S import qualified Drasil.DocLang.SRS as SRS (solCharSpec) impo...
0b5dfe4aff7fb4941bea832eca0d4144fdbbc58eda66692c76223ed75e134326
sneeuwballen/zipperposition
parsing_utils.ml
This file is free software , part of Zipperposition . See file " license " for more details . open Logtk open CCResult.Infix type 'a or_error = ('a, string) CCResult.t let parse_tptp file : _ or_error = Util_tptp.parse_file ~recursive:true file >|= Iter.map Util_tptp.to_ast let parse_tip file = Util_tip.pa...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/parsers/parsing_utils.ml
ocaml
This file is free software , part of Zipperposition . See file " license " for more details . open Logtk open CCResult.Infix type 'a or_error = ('a, string) CCResult.t let parse_tptp file : _ or_error = Util_tptp.parse_file ~recursive:true file >|= Iter.map Util_tptp.to_ast let parse_tip file = Util_tip.pa...
e12434bcbb2427dfbf55df3121079c97b5a2debe2035cae3e7ee8de8a682def2
graninas/Functional-Design-and-Architecture
Common.hs
module Andromeda.Assets.Vendors.BBB.Common where import Andromeda.Hardware.Common bbbInc :: Vendor bbbInc = "BBB Inc."
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/b6a78f80a2a2e0b913bcab1d2279fc137a90db4c/Second-Edition-Manning-Publications/BookSamples/CH08/Section8p1/src/Andromeda/Assets/Vendors/BBB/Common.hs
haskell
module Andromeda.Assets.Vendors.BBB.Common where import Andromeda.Hardware.Common bbbInc :: Vendor bbbInc = "BBB Inc."
d13094b0ac229e036e280f9873ee926b9c78e206346e71e064ac295a8d82b3a5
samoht/depyt
depyt.mli
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/samoht/depyt/58dc17c37159a266dc677dfff3176c9ab7218504/src/depyt.mli
ocaml
* {1 Depyt} * The type for runtime representation of values of type ['a]. * [unit] is a representation of the unit type. * [bool] is a representation of the boolean type. * [char] is a representation of the character type. * [int] is a representation of the integer type. * [float] is a representation of the float...
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
084762f64c39a8afe3b8bbfc70e6481cc82f9cc7c2b763e2a36d41428a9ad0ee
AccelerateHS/accelerate
ZipWith.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE MonoLocalBinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} -- | -- Module : Data.Array.A...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Test/NoFib/Prelude/ZipWith.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ConstraintKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # | Module : Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith License : BSD3 Stability : experimental relational and equality operators re...
# LANGUAGE MonoLocalBinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # Copyright : [ 2009 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith ( test_zipWith ) where impor...
7852ce83cb2b85ac6ee4e70e83ca811b5dc911e2ae08a2cce77f73c4abff6abe
anoma/juvix
Error.hs
module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error ( module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Types, module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error, -- , module . Compiler . Concrete . Translation . FromParsed . Ana...
null
https://raw.githubusercontent.com/anoma/juvix/098c256da83556f8b32a831468a8d38783a967e8/src/Juvix/Compiler/Concrete/Translation/FromParsed/Analysis/Scoping/Error.hs
haskell
,
module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error ( module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Types, module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error, module . Compiler . Concrete . Translation . FromParsed . Analysis . S...
d440babd00d01761178fbe1b7eebae9d4b54651836cf32d0b4d771f669b5d3d1
arohner/spectrum
set_pred.clj
(ns spectrum.examples.good.set-pred (:require [clojure.spec.alpha :as s])) TODO (s/fdef foo :args (s/cat :x #{:bar :bbq})) (defn foo [x] x) (foo :bar)
null
https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/examples/good/set_pred.clj
clojure
(ns spectrum.examples.good.set-pred (:require [clojure.spec.alpha :as s])) TODO (s/fdef foo :args (s/cat :x #{:bar :bbq})) (defn foo [x] x) (foo :bar)
fc6141f9757620888af26ea835e1ef893585e1f488616fd3e33b6812afcc781c
nyu-acsys/drift
repeat4.ml
let succ sx = sx + 1 let rec repeat (rf: int -> int) rn = if rn = 0 then 0 else rf (repeat rf (rn - 1)) let main (n:int(*-:{v:Int | true}*)) = assert (repeat succ n = n)
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/high/repeat4.ml
ocaml
-:{v:Int | true}
let succ sx = sx + 1 let rec repeat (rf: int -> int) rn = if rn = 0 then 0 else rf (repeat rf (rn - 1)) assert (repeat succ n = n)
0c2c0ef4f36aa7737b9651dfa1628f72f96bde3b2e4428a4da0c63e1193da5da
Beluga-lang/Beluga
either.ml
type ('e, 'a) t = | Left of 'e | Right of 'a let eliminate left right = function | Left e -> left e | Right x -> right x let is_right e = eliminate (Fun.const false) (Fun.const true) e let is_left e = not @@ is_right e let right x = Right x let left x = Left x let map_right f e = eliminate left (fun x -> ...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/4d1c1bd917daac43c304c527b155c12dba76391a/src/support/either.ml
ocaml
type ('e, 'a) t = | Left of 'e | Right of 'a let eliminate left right = function | Left e -> left e | Right x -> right x let is_right e = eliminate (Fun.const false) (Fun.const true) e let is_left e = not @@ is_right e let right x = Right x let left x = Left x let map_right f e = eliminate left (fun x -> ...
6ff1d2d62b1741970335ae6d05f3c73b82146afb6d633486b5ae976547d22479
ocsigen/ocsimore
forum.mli
Ocsimore * Copyright ( C ) 2005 * Laboratoire PPS - Université Paris Diderot - CNRS * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or ...
null
https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/forum/forum.mli
ocaml
* {2 Forum related groups} * Creates a new forum or returns its id without modification if it already exists. parent parent * Eliom parameter type for forums * Eliom parameter type for messages * Eliom input field for forums * Eliom input field for messages * Eliom button for messages
Ocsimore * Copyright ( C ) 2005 * Laboratoire PPS - Université Paris Diderot - CNRS * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or ...
df413ea690373a7d52ea17cec926749b101561e62e27c25c796fa0ac1b0769a9
amir343/avlang
type_api.erl
Copyright ( c ) 2016 - 2017 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed...
null
https://raw.githubusercontent.com/amir343/avlang/36b14f476327c38d7fb75a787e1e8fd89f25919e/src/type_api.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2016 - 2017 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(type_api). -export([ built_in_types/0 , built_in_types_info/0 , stdlib_types/0 ]). built_in_types() -> [M:n...
b244ac7420cf341039311a3a92e64795e7587521a33fc178ff8e881784ac14f3
adityaathalye/sicp
ex1-10-ackermann.scm
; Ackermann's funciton (define (A x y) (cond ((= y 0) 0) ((= x 0) (* 2 x y)) ((= y 1) 2) (else (A (- x 1) (A x (- y 1))))))
null
https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ex1-10-ackermann.scm
scheme
Ackermann's funciton
(define (A x y) (cond ((= y 0) 0) ((= x 0) (* 2 x y)) ((= y 1) 2) (else (A (- x 1) (A x (- y 1))))))
bd790fcad2a3fe5d1d059375dd8408e8ced9ef6567be6a9e0fd758320d727bab
huiqing/percept2
pingpong.erl
-module(pingpong). loop_a() -> receive stop -> ok; {msg,_Msg,0} -> loop_a(); {msg,Msg,N} -> io:format("ping!~n"), timer:sleep(500), b!{msg,Msg,N+1}, loop_a() end. loop_b() -> receive stop -> ok; {msg,_Msg,0} -> loop_b(); {msg,Msg,N} ->...
null
https://raw.githubusercontent.com/huiqing/percept2/fa796a730d6727210a71f185e6a39a960c2dcb90/case_studies/par_sim_code/test/pingpong.erl
erlang
-module(pingpong). loop_a() -> receive stop -> ok; {msg,_Msg,0} -> loop_a(); {msg,Msg,N} -> io:format("ping!~n"), timer:sleep(500), b!{msg,Msg,N+1}, loop_a() end. loop_b() -> receive stop -> ok; {msg,_Msg,0} -> loop_b(); {msg,Msg,N} ->...
675bd1baa13f43df99a6eb87eaae7be8ed4a9f34c4d430775047b6d5067258d5
basho/riak_cs_core
riak_cs_s3_response.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . Y...
null
https://raw.githubusercontent.com/basho/riak_cs_core/d4059c90393df2ad1377396fdbb40c8f16d531bb/src/riak_cs_s3_response.erl
erlang
--------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permiss...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
2f61ddcb56b95789330ee6177cc79ecd1a922392227b725e5b4d845c8f25a843
TheClimateCorporation/boomhauer
middleware.clj
(ns com.climate.boomhauer.middleware (:require [clojure.string :as string] [clojure.tools.logging :as log]) (:import [clojure.lang ExceptionInfo] [com.amazon.speech.speechlet SpeechletResponse] [com.amazon.speech.ui PlainTextOutputSpeech SimpleCard])) (defmacro error-decoder-wrapp...
null
https://raw.githubusercontent.com/TheClimateCorporation/boomhauer/b42a8ee43d51d5deded0145ec19634e222a11d78/src/main/clojure/com/climate/boomhauer/middleware.clj
clojure
(ns com.climate.boomhauer.middleware (:require [clojure.string :as string] [clojure.tools.logging :as log]) (:import [clojure.lang ExceptionInfo] [com.amazon.speech.speechlet SpeechletResponse] [com.amazon.speech.ui PlainTextOutputSpeech SimpleCard])) (defmacro error-decoder-wrapp...
41cccd37042fe2f382ee99ff74218d0aaa2610fd119ac7b197712b715ffcab87
ghc/testsuite
T6069.hs
{-# LANGUAGE Rank2Types #-} module T6069 where import Control.Monad.ST import Data.STRef fourty_two :: forall s. ST s Int fourty_two = do x <- newSTRef (42::Int) readSTRef x ( 1 ) ( 2 ) ( 3 )
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/T6069.hs
haskell
# LANGUAGE Rank2Types #
module T6069 where import Control.Monad.ST import Data.STRef fourty_two :: forall s. ST s Int fourty_two = do x <- newSTRef (42::Int) readSTRef x ( 1 ) ( 2 ) ( 3 )
4c13bfaf23ddc14a23968c4f7a5cef9d0044184f8f080d20362b2084bbf76dda
facebook/duckling
Types.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE NoRebindab...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/Types.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # ambiguous e.g. bucks unambiguous ----------------------------------------------------------------- Value ...
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE NoRebindableSyntax # # LANGUAGE TypeFamilies # module Duckling.AmountOfMoney.Types where import Control.DeepSeq import Data.Aeson import Data.Hashable import Data.Text (Text) import GHC.Generics impo...
9feebb70ac7f05206eafe85a7d496ed3190d87dae2e5bb350a7eea1b5ceba1a0
brownplt/TeJaS
strobe_typechecking.mli
open Prelude open Sig module Make : functor (Typ : Strobe_sigs.STROBE_MODULE) -> functor (Exp : Typedjs_syntax.EXP with module Typs = Typ) -> functor (Env : TYP_ENV with type typ = Typ.extTyp with type kind = Typ.extKind with type binding = Typ.extBinding with type env = Typ.env) -> ...
null
https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/strobe_typechecking.mli
ocaml
open Prelude open Sig module Make : functor (Typ : Strobe_sigs.STROBE_MODULE) -> functor (Exp : Typedjs_syntax.EXP with module Typs = Typ) -> functor (Env : TYP_ENV with type typ = Typ.extTyp with type kind = Typ.extKind with type binding = Typ.extBinding with type env = Typ.env) -> ...
d0574cbafd66c1ef32d0767e574f7fcf6f4d0a38747b581355e09deedbe11f11
danieljharvey/mimsa
Parser.hs
{-# LANGUAGE OverloadedStrings #-} module Calc.Parser ( parseExpr, parseExprAndFormatError, parseType, parseTypeAndFormatError, replFilename, ) where import Calc.Parser.Expr import Calc.Parser.Type import Calc.Parser.Types import Data.Bifunctor (first) import Data.Text (Text) import qualified Data...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/c5bcab3e9f961216cea540edb95a8a66db773980/llvm-calc2/src/Calc/Parser.hs
haskell
# LANGUAGE OverloadedStrings # | which file are we parsing? we use this to show the right text in errors parse expr, using it all up | `parseExpr`, but format error to text parse expr, using it all up | `parseType`, but format error to text
module Calc.Parser ( parseExpr, parseExprAndFormatError, parseType, parseTypeAndFormatError, replFilename, ) where import Calc.Parser.Expr import Calc.Parser.Type import Calc.Parser.Types import Data.Bifunctor (first) import Data.Text (Text) import qualified Data.Text as T import Text.Megaparsec i...
757b5a171eccf1a0a01218545aa4515776144c6c13e132d411ce35c1b3bd1113
elaforge/karya
Grace.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt -- | Calls that generate grace notes. These are short sequences of quick notes -- whose duration is generally independent of the tempo. module Derive.C.Prelude.Grace (library) where impo...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/C/Prelude/Grace.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt | Calls that generate grace notes. These are short sequences of quick notes whose duration is generally independent of the tempo. Note Pitch * note calls ** roll ** mordent * pitch calls
Copyright 2013 module Derive.C.Prelude.Grace (library) where import qualified Util.Seq as Seq import qualified Derive.Args as Args import qualified Derive.Call as Call import qualified Derive.Call.GraceUtil as GraceUtil import qualified Derive.Call.Ly as Ly import qualified Derive.Call.Module as Module import qual...
78bc28ce09057ac9a5153d20dc6b6fbda732dabfe2ae28c106377fcd4d9b3df4
kowainik/life-sync
Pull.hs
| Copyright : ( c ) 2017 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Command to update the local state from the remote state . Copyright: (c) 2017-2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> Command to update the local state from the remote state....
null
https://raw.githubusercontent.com/kowainik/life-sync/ea80581a6735d2f3e2df0fda1d1bc0b0b41ad6d0/src/Life/Main/Pull.hs
haskell
| Copyright : ( c ) 2017 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Command to update the local state from the remote state . Copyright: (c) 2017-2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> Command to update the local state from the remote state....
1c290b5ec27b6b35631382db7309e1100fd571cde456a3a2d26772efbc232a64
pirapira/coq2rust
goptions.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/library/goptions.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This module manages customization p...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Errors open Uti...
198b95968f8a667e7ebb636d413a6a3748a746aa83f1e1ae2d53de191435275b
shirok/Gauche
test.scm
;; test for charconv ;; (use gauche.test) (test-start "charconv") (use gauche.charconv) (test-module 'gauche.charconv) (define (file->string file) (string-complete->incomplete (call-with-input-file file port->byte-string))) (define (file->string-conv/in file from . args) (string-complete->incomplete (ca...
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/ext/charconv/test.scm
scheme
-------------------------------------------------------------------- -------------------------------------------------------------------- illegal-output replace UTF BOM illegal-output -------------------------------------------------------------------- ---------------------------------------------------------------...
test for charconv (use gauche.test) (test-start "charconv") (use gauche.charconv) (test-module 'gauche.charconv) (define (file->string file) (string-complete->incomplete (call-with-input-file file port->byte-string))) (define (file->string-conv/in file from . args) (string-complete->incomplete (call-wit...
5cfd34c863ae44df9da9f68ea0c434b67f7ad2f585b6994cafcaf920fb6fffc8
geneweb/geneweb
robot.mli
(** A module handling robots requests *) (* S: This module seems obsolete *) val magic_robot : string module W : Map.S with type key = string type norfriwiz = Normal | Friend of string | Wizard of string type who = private { acc_times : float list; (** The timings of the connexion attempts *) oldest_time : flo...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/bin/gwd/robot.mli
ocaml
* A module handling robots requests S: This module seems obsolete * The timings of the connexion attempts * The number of connection in the specified window. * The kind of robot * A collection of robots: the list contains forbidden robots and the map contains accepted (under conditions) robots. * Prints an e...
val magic_robot : string module W : Map.S with type key = string type norfriwiz = Normal | Friend of string | Wizard of string type who = private { oldest_time : float; * The first connection in the specified window ( check option -robot - xcl ) of time in which successive ...
314bba09a2a6526417ca3aab3a556894e054e73361c854cda95e5a176f6781e5
janestreet/memtrace_viewer
keyboard_scope.ml
open! Core open Bonsai_web type t = { view : Vdom.Node.t ; key_help : Vdom_keyboard.Help_text.t } let wrap ~view ~key_handler = let open Vdom in let on_keydown event = match Vdom_keyboard.Keyboard_event_handler.handle_event key_handler event with | Some action -> Effect.Many [ action; Effect.Stop_pr...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/keyboard_scope.ml
ocaml
Make focusable
open! Core open Bonsai_web type t = { view : Vdom.Node.t ; key_help : Vdom_keyboard.Help_text.t } let wrap ~view ~key_handler = let open Vdom in let on_keydown event = match Vdom_keyboard.Keyboard_event_handler.handle_event key_handler event with | Some action -> Effect.Many [ action; Effect.Stop_pr...
e58cf7d61385df8ec291b364871cf0316c6416962ab21b924fb321142fa8e020
petrkozorezov/erl_snowflake
erl_snowflake.erl
-module(erl_snowflake). -export([generate/0, generate_unsafe/0, generate/1, generate_unsafe/1]). -export([to/2, from/2]). -export([get_machine_id/0, set_machine_id/1, term_to_machine_id/1, hostname/0]). -type id() :: {timestamp(), machine_id(), counter()}. -type format() :: bin | int | str | b62. -type counte...
null
https://raw.githubusercontent.com/petrkozorezov/erl_snowflake/85a6a034b49b3ae0875eb1296f5795753be082fb/src/erl_snowflake.erl
erlang
new millisecond formatting integer with specific base tests
-module(erl_snowflake). -export([generate/0, generate_unsafe/0, generate/1, generate_unsafe/1]). -export([to/2, from/2]). -export([get_machine_id/0, set_machine_id/1, term_to_machine_id/1, hostname/0]). -type id() :: {timestamp(), machine_id(), counter()}. -type format() :: bin | int | str | b62. -type counte...
1637f41916386281d4adda5acd8fb7ffce6fe62346523cc8f55342a10f453ede
yonatane/bytegeist
dev.clj
(ns bytegeist.dev)
null
https://raw.githubusercontent.com/yonatane/bytegeist/ba3355965b88a4b4882503e9c3919eba4623d862/dev/bytegeist/dev.clj
clojure
(ns bytegeist.dev)
b356fad2f3f08a5e5062725011c00285fbca338d9dde73f52261868c48fa5a91
ocaml-ppx/ocamlformat
ocamlformat_result.mli
open Result module Let_syntax : sig val ( let+ ) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t end module Global_scope : sig type 'a or_error = ('a, [`Msg of string]) t include module type of Let_syntax end
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/b436f8d9e53661c1f5b51d40f701b9bd74cd4f84/vendor/ocamlformat-result/ocamlformat_result.mli
ocaml
open Result module Let_syntax : sig val ( let+ ) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t end module Global_scope : sig type 'a or_error = ('a, [`Msg of string]) t include module type of Let_syntax end
0d995cdebbe3e8a9632b8a45bd1cbcb70d49b40717c82660546955f3d0b85695
pkpkpk/fress
bigint.cljs
(ns fress.impl.bigint (:refer-clojure :exclude [bit-not abs])) (defn bigint? [n] (identical? js/BigInt (type n))) (defn bigint [n] (js/BigInt n)) (defn abs [bn] (if (< bn 0) (- bn) bn)) (defn pow [base exponent] (js* "~{} ** BigInt(~{})" base exponent)) (defn >> [a b] (js* "~{} >> Big...
null
https://raw.githubusercontent.com/pkpkpk/fress/841d177f84e0f0921de30ce24dc74e0996076ada/src/main/cljs/fress/impl/bigint.cljs
clojure
==============================================================================
(ns fress.impl.bigint (:refer-clojure :exclude [bit-not abs])) (defn bigint? [n] (identical? js/BigInt (type n))) (defn bigint [n] (js/BigInt n)) (defn abs [bn] (if (< bn 0) (- bn) bn)) (defn pow [base exponent] (js* "~{} ** BigInt(~{})" base exponent)) (defn >> [a b] (js* "~{} >> Big...
9ed4142c3a2543b0fff416c3bc1a3f70125bd06eb139703ddc2afcf77729b895
heroku/logplex
logplex_tls.erl
%%%------------------------------------------------------------------- %% @doc TLS Client Helper Module %% @end %%%------------------------------------------------------------------- -module(logplex_tls). -include("logplex_logging.hrl"). -include_lib("ex_uri/include/ex_uri.hrl"). -include_lib("public_key/include/...
null
https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/src/logplex_tls.erl
erlang
------------------------------------------------------------------- @doc TLS Client Helper Module @end ------------------------------------------------------------------- Public API Exports Public API @doc Returns TLS connection options. @doc Returns the maximum number of non Root CA certificates. @doc Sets the ...
-module(logplex_tls). -include("logplex_logging.hrl"). -include_lib("ex_uri/include/ex_uri.hrl"). -include_lib("public_key/include/public_key.hrl"). -export([connect_opts/3, max_depth/0, max_depth/1, cacertfile/0, cacertfile/1, pinned_certs/0, pinned_certs/1,...
2b47783ae4b8bf9057bb8ddb08e3e0be397a2bd338484fd7009c3a4b86b6603c
pfdietz/ansi-test
sinh.lsp
;-*- Mode: Lisp -*- Author : Created : We d Feb 11 06:29:51 2004 Contains : Tests for SINH (deftest sinh.1 (let ((result (sinh 0))) (or (eqlt result 0) (eqlt result 0.0))) t) (deftest sinh.2 (loop for type in '(short-float single-float double-float long-float) for zero = (...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/sinh.lsp
lisp
-*- Mode: Lisp -*- Add accuracy tests here Error tests
Author : Created : We d Feb 11 06:29:51 2004 Contains : Tests for SINH (deftest sinh.1 (let ((result (sinh 0))) (or (eqlt result 0) (eqlt result 0.0))) t) (deftest sinh.2 (loop for type in '(short-float single-float double-float long-float) for zero = (coerce 0 type) u...
c19a95867f03456db5ecfbbed6c05e98464ae18a73e0019024be972504ced670
janegca/htdp2e
Exercise-143-FiringShotsRevised.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-beginner-abbr-reader.ss" "lang")((modname Exercise-143-FiringShotsRevised) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpa...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/Exercise-143-FiringShotsRevised.rkt
racket
about the language level of this file in a form that our tools can easily process. Experiment whether the arbitrary decisions concerning constants are truly easy to change. For example, determine whether changing a single constant definition achieves the desired outcome: change the x location of the line of...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-143-FiringShotsRevised) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructo...
d43cb4b462f4dbfbf34df396c07dec0f9d9273508ae6d1592ad5b43b85f0d903
Clojure2D/clojure2d-examples
ex49_archimedean_spiral.clj
(ns ex49-archimedean_spiral "Generates an archimedean spiral with an oscillating radius" (:require [clojure2d.core :refer :all] [fastmath.core :as m] [fastmath.vector :as v])) ;; be sure everything is fast as possible (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/ex49_archimedean_spiral.clj
clojure
be sure everything is fast as possible
(ns ex49-archimedean_spiral "Generates an archimedean spiral with an oscillating radius" (:require [clojure2d.core :refer :all] [fastmath.core :as m] [fastmath.vector :as v])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (def ^:const ^...
f8187b7c3d11c344c19892d225ea9fb8f4defc0c4790bea702a8b73eba149b66
CDSoft/pp
Environment.hs
PP Copyright ( C ) 2015 - 2023 This file is part of PP . PP 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 . P...
null
https://raw.githubusercontent.com/CDSoft/pp/625e6a2ce449ffb905fb91a5f37090c417a0e82a/src/Environment.hs
haskell
exported for test purpose defaultMacroChars is the list of characters used to execute a macro defaultOpenCloseChars is the list of characters that can delimit macro parameters. literate programming macros symbol type of a definition in the environment user macro definition environment variable values stored in ...
PP Copyright ( C ) 2015 - 2023 This file is part of PP . PP 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 . P...
4f2230f5497de9fb668572a911ad4d0b2116533a24240fc1f201760ebbbd4a45
mirage/ptt-deployer
mirage.ml
open Lwt.Infix open Current.Syntax module Raw = Current_docker.Raw let with_tmp ~prefix ~suffix fn = let tmp_path = Filename.temp_file prefix suffix in Lwt.finalize (fun () -> fn tmp_path) (fun () -> Unix.unlink tmp_path; Lwt.return_unit) let ( >>!= ) = Lwt_result.bind module Op = struct ty...
null
https://raw.githubusercontent.com/mirage/ptt-deployer/9a2bd4464c6dbc189ba1331adeaedc73defe01d2/src/mirage.ml
ocaml
Kill remote service (it's okay if it fails because the service might not exist.)
open Lwt.Infix open Current.Syntax module Raw = Current_docker.Raw let with_tmp ~prefix ~suffix fn = let tmp_path = Filename.temp_file prefix suffix in Lwt.finalize (fun () -> fn tmp_path) (fun () -> Unix.unlink tmp_path; Lwt.return_unit) let ( >>!= ) = Lwt_result.bind module Op = struct ty...
7111080a42208fe036333b74758af776d6342b3331e644e4dcfa2fe3fa63b062
flavioc/cl-hurd
mod1.lisp
(:dir "root" (:file "z" "ZZZzz") (:dir "a") (:dir "thing" (:file "abc" "")) (:file "f" "this file has no data") (:file "b" "this is the b file!") (:dir "i-am-bored"))
null
https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/examples/data/mod1.lisp
lisp
(:dir "root" (:file "z" "ZZZzz") (:dir "a") (:dir "thing" (:file "abc" "")) (:file "f" "this file has no data") (:file "b" "this is the b file!") (:dir "i-am-bored"))
bc50fce2204fc125b4e8e14388d306a6837275451ddf329dc996638158f8708a
grin-compiler/ghc-wpc-sample-programs
Math.hs
{-# LANGUAGE OverloadedStrings #-} module Text.Pandoc.Writers.Math ( texMathToInlines , convertMath , defaultMathJaxURL , defaultKaTeXURL ) where import qualified Data.Text as T import Text.Pandoc.Class.PandocMonad import Text.Pandoc.Definition import Text.Pandoc.Logging import Text.TeXMath (DisplayType (..)...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Writers/Math.hs
haskell
# LANGUAGE OverloadedStrings # can't be converted. ^ String to parse (assumes @'\n'@ line endings) issuing a warning and producing a fallback (a raw string) on failure.
module Text.Pandoc.Writers.Math ( texMathToInlines , convertMath , defaultMathJaxURL , defaultKaTeXURL ) where import qualified Data.Text as T import Text.Pandoc.Class.PandocMonad import Text.Pandoc.Definition import Text.Pandoc.Logging import Text.TeXMath (DisplayType (..), Exp, readTeX, writePandoc) import...
8062d97e6e42ba4b100adf8b1f93e66ca37e7e4a4e6c45e2956af27c2d81ab1d
myme/nixon
JSON.hs
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # module Nixon.Config.JSON ( Config (..), empty, ) where import Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?)) import GHC.Generics (Generic) import Nixon.Prelude import Nixon.Project (ProjectMarker (..), ProjectType (..)) import Turtle (fromText...
null
https://raw.githubusercontent.com/myme/nixon/30a1ff6c1e902c2fb06ddfb003ab4124c447cc81/src/Nixon/Config/JSON.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # module Nixon.Config.JSON ( Config (..), empty, ) where import Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?)) import GHC.Generics (Generic) import Nixon.Prelude import Nixon.Project (ProjectMarker (..), ProjectType (..)) import Turtle (fromText...
386bd246cb48272aba2e9a01eb49722995bc415aab48c9a6d98fe4a839e22205
tweag/asterius
Binaryen.hs
# LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE StrictData #-} # LANGUAGE TupleSections # {-# OPTIONS_GHC -Wno-overflowed-literals #-} -- | -- Module : Asterius.Backends.Binaryen Copyright : (...
null
https://raw.githubusercontent.com/tweag/asterius/a5db10a23ceb3276ec1de0a1d9f25ecd8c0a53fd/asterius/src/Asterius/Backends/Binaryen.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # # LANGUAGE StrictData # # OPTIONS_GHC -Wno-overflowed-literals # | Module : Asterius.Backends.Binaryen License : All rights reserved (see LICENCE file in the distribution). [binaryen package]()). | The symbol map for the current module. | Symbols ...
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # Copyright : ( c ) 2018 EURL Tweag Elaboration of Asterius types into the Binaryen AST ( as defined in the module Asterius.Backends.Binaryen ( MarshalError (..), marshalModule, serializeMo...
ab687c1bb45a322b9cc679839777c93dc14927376089ac5c8bfe1f390e5105f9
Haskell-Things/ImplicitCAD
example11.hs
{- ORMOLU_DISABLE -} -- Example 11 - the union of a square and a circle. import Graphics.Implicit out = union [ square True (V2 80 80) , translate (V2 40 40) $ circle 30 ] main = writeSVG 2 "example11.svg" out
null
https://raw.githubusercontent.com/Haskell-Things/ImplicitCAD/87f2aee4b3c958d11e988022f512d065b812f6b0/Examples/example11.hs
haskell
ORMOLU_DISABLE Example 11 - the union of a square and a circle.
import Graphics.Implicit out = union [ square True (V2 80 80) , translate (V2 40 40) $ circle 30 ] main = writeSVG 2 "example11.svg" out
510571c8b3ff066cdd2a3fb3692c5510d12938466469d6195219859f27e0636d
prakhar1989/coding-challenges
snake.clj
Coding challenge 3 - -fj-BAM (ns quil-site.examples.nanoscopic (:require [quil.core :as q :include-macros true] [quil.middleware :as m])) (def width 400) (def height 400) (def scale 20) (def rows (/ width scale)) (def cols (/ height scale)) (defn rand-between [start end] (+ start (rand-int (- end st...
null
https://raw.githubusercontent.com/prakhar1989/coding-challenges/119874fc7e6d3c21fe30c49e762a3c4e17f2daa6/src/coding-challenges/snake.clj
clojure
Coding challenge 3 - -fj-BAM (ns quil-site.examples.nanoscopic (:require [quil.core :as q :include-macros true] [quil.middleware :as m])) (def width 400) (def height 400) (def scale 20) (def rows (/ width scale)) (def cols (/ height scale)) (defn rand-between [start end] (+ start (rand-int (- end st...
02853f9cd27fb1686831d19b315d7163dc3489e0d31d06b88cb52ad6630e9b20
danx0r/festival
oald_extensions.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; Centre for Speech Technology Research ; ; University of Edinburgh , UK ; ; ...
null
https://raw.githubusercontent.com/danx0r/festival/6701715566aee6519a8b7949b567f2fdad1e2772/lib/dicts/oald/oald_extensions.scm
scheme
;; ; ; ; ; ;; Permission is hereby granted, free of charge, to use and distribute ;; this software and its documentation without restriction, including ;;...
the OALD lexicon ( "Jones" n (jh ou1 n z) ) ( "Merrill" n (m e1 r i l) ) ( "Guber" n (g u1 b @@) ) ( "Drexel" n (d r e1 k s @ l) ) ( "de" in (d @) ) ( "Noriega" n (n oo r i ei1 g @) ) ( "Lehman" n (l ei1 m @ n) ) ( "Salomon" n (s a1 l @ m @ n) ) ( "pretax" n (p r ii1 t a1 k s) ) ( "Reagan" n (r ei1 g @ ...
6ca6a43bb26df1299e12bf850a77e483618ebd1dd304b089b953dbd6045dc295
bendoerr/real-world-haskell
Glob.hs
Find all files matching Glob . Putting our IO and Regex skills to use . -- -- |Clone of the glob function on UNIX type systems. module Glob ( namesMatching ) where import System.Directory ( doesDirectoryExist, doesFileExist, getCurrentDirectory, getDirectoryContents) im...
null
https://raw.githubusercontent.com/bendoerr/real-world-haskell/fa43aa59e42a162f5d2d5655b274b964ebeb8f0a/ch08/Glob.hs
haskell
|Clone of the glob function on UNIX type systems. |Finds directories and files that match the given glob. |Helper Does it look like a glob? |Helper Combines both doesFileExist and doesDirectoryExist. |Internal Finds a list of all files matching the given glob pattern in a directory. |Helper Starts with ...
Find all files matching Glob . Putting our IO and Regex skills to use . module Glob ( namesMatching ) where import System.Directory ( doesDirectoryExist, doesFileExist, getCurrentDirectory, getDirectoryContents) import System.FilePath ( dropTrailingPathSeparator...
0fba9e79de42e8bd59e24a199f0f5f5024a8d3345580cb8fe4a569a1cd4f947d
sneeuwballen/zipperposition
Type.mli
This file is free software , part of Zipperposition . See file " license " for more details . (** {1 Types} *) * { 2 Main Type representation } Types are represented using InnerTerm , with kind Type . Therefore , they are hashconsed and scoped . Common representation of types , including higher ...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/333c4a5b0f8a726f414db901a77ca30921178da5/src/core/Type.mli
ocaml
* {1 Types} * Type is a subtype of the term structure (itself a subtype of InnerTerm.t), with explicit conversion * parametrized type * Function type (left to right, no left-nesting) * Type-centric view of the head of this type. @raise Assert_failure if the argument is not a type * Hash invariant w.r.t...
This file is free software , part of Zipperposition . See file " license " for more details . * { 2 Main Type representation } Types are represented using InnerTerm , with kind Type . Therefore , they are hashconsed and scoped . Common representation of types , including higher - order and...
526ff90e554e63ea200de0788c647aae332e2526b65c4d68f962906ed7356282
sfertman/easy-rpc
client_test.clj
(ns easy-rpc.client-test (:require [clojure.test :refer [deftest testing is]] [easy-rpc.client :as sut] [easy-rpc.mylib])) (deftest intern-multi-test (testing "Should intern multiple mappings" (sut/intern-multi *ns* {'x 42 'y 43 'z (constantly "spam!")}) ;; ^ works with array of tuples or map ...
null
https://raw.githubusercontent.com/sfertman/easy-rpc/6c05d2b18fb16671608fdd91a4693a55f473d1b2/test/easy_rpc/client_test.clj
clojure
^ works with array of tuples or map
(ns easy-rpc.client-test (:require [clojure.test :refer [deftest testing is]] [easy-rpc.client :as sut] [easy-rpc.mylib])) (deftest intern-multi-test (testing "Should intern multiple mappings" (sut/intern-multi *ns* {'x 42 'y 43 'z (constantly "spam!")}) (is (= 42 @(resolve 'x))) (is (= 43 ...
545d04270641eb01546f2a0c97717c4b043defd4585731f41e17ece202bb9d85
CryptoKami/cryptokami-core
Mode.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE TypeFamilies # -- | Execution mode used by blockchain generator. module Pos.Generator.Block.Mode ( MonadBlockGenBase , MonadBlockGen , MonadBlockGenInit , BlockGenContext (..) , BlockGenMode , BlockGenRandMode , mkBlockGenContex...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/generator/src/Pos/Generator/Block/Mode.hs
haskell
# LANGUAGE DataKinds # | Execution mode used by blockchain generator. useless -------------------------------------------------------------------------- -------------------------------------------------------------------------- | A set of constraints imposed on the base monad used for arbitrary blockchain genera...
# LANGUAGE TypeFamilies # module Pos.Generator.Block.Mode ( MonadBlockGenBase , MonadBlockGen , MonadBlockGenInit , BlockGenContext (..) , BlockGenMode , BlockGenRandMode , mkBlockGenContext , usingPrimaryKey , withCurrentSlot ) where import ...
eef420cd39cea1886153f1a38b8e8dee0a43b11b3b39d2cb88f0926393510da4
arrdem/shelving
log_shelf.clj
(ns shelving.log-shelf "A really fantastically stupid back-end based on an EDN serialized append only log with no compation. Hysterically inefficient but easy to get right. Grossly inappropriate for most applications." {:authors ["Reid \"arrdem\" McKenzie <>"], :license "Eclipse Public License 1.0", :ad...
null
https://raw.githubusercontent.com/arrdem/shelving/27439bfcb2f3438d5b23fcd468360bda491002f1/src/main/clj/shelving/log_shelf.clj
clojure
Configs open into shelves Doesn't even bother with schema validation SERIOUSLY DON'T USE THIS
(ns shelving.log-shelf "A really fantastically stupid back-end based on an EDN serialized append only log with no compation. Hysterically inefficient but easy to get right. Grossly inappropriate for most applications." {:authors ["Reid \"arrdem\" McKenzie <>"], :license "Eclipse Public License 1.0", :ad...
300464334b0fbbeebd96eacc6c1c0257c17523723b9c4006577c1ae055de9b70
mstksg/advent-of-code-2018
Day01.hs
-- | -- Module : AOC.Challenge.Day01 -- Copyright : (c) Justin Le 2018 -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : non-portable -- Day 1 ! See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day01 (day01a, day01b) where import ...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2018/fc76f763ece2db87dc5e30b8540559a539665f17/src/AOC/Challenge/Day01.hs
haskell
| Module : AOC.Challenge.Day01 Copyright : (c) Justin Le 2018 License : BSD3 Stability : experimental Portability : non-portable | We need this because 'read' can't handle positive signs in front of numbers. | Here we have a basic sum of numbers. | Here we compute a running sum on an infinitely...
Maintainer : Day 1 ! See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day01 (day01a, day01b) where import AOC.Common (firstRepeated) import AOC.Solver ((:~>)(..)) import Text.Read (readMaybe) parseItem :: String -> Maybe Int parseItem = readMaybe . f...
002b9627998a31f910fd47d9060ee483bfe3fa36202280abf407515e35e60274
racket/racket7
bytes-input.rkt
#lang racket/base (require "../common/check.rkt" "../host/thread.rkt" "parameter.rkt" "read-and-peek.rkt" "input-port.rkt" "count.rkt" "progress-evt.rkt" "flush-output.rkt") (provide read-byte read-bytes read-bytes! read-bytes-av...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/port/bytes-input.rkt
racket
---------------------------------------- ---------------------------------------- ----------------------------------------
#lang racket/base (require "../common/check.rkt" "../host/thread.rkt" "parameter.rkt" "read-and-peek.rkt" "input-port.rkt" "count.rkt" "progress-evt.rkt" "flush-output.rkt") (provide read-byte read-bytes read-bytes! read-bytes-av...