_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
e230d3a57df472a16e5184157a2806a262a17a652ce8df18d2d7bd2b7d4bb7f8
kupl/VeriSmart-public
semantics.ml
open Lang open MakeCfg open Vlang open Vocab open Global open ItvDom open Query open Options (**************************) (**************************) (**** Helper functions ****) (**************************) (**************************) let rid = ref 0 (* rename id *) let fresh_rid () = rid:=!rid+1; !rid let rename...
null
https://raw.githubusercontent.com/kupl/VeriSmart-public/143619db340f9af3540dea155f7d790223d0e441/src/vlang/semantics.ml
ocaml
************************ ************************ *** Helper functions *** ************************ ************************ rename id ********************* ********************* *** SP Generation *** ********************* ********************* typ: bytes4 handled in assignment level {q with vc2 = rewrite_vf q.v...
open Lang open MakeCfg open Vlang open Vocab open Global open ItvDom open Query open Options let fresh_rid () = rid:=!rid+1; !rid let rename : vexp -> vexp = fun vexp -> match vexp with | VVar (vid,typ) -> let vid' = vid ^ "(" ^ "#" ^ string_of_int (fresh_rid ()) ^ ")" in VVar (vid',typ) | _ -> rais...
c1565ede6420c632df4b6375f2e900a74241d613d009a7d748bc181711e79712
tweag/asterius
HexFloatLiterals.hs
{-# Language HexFloatLiterals #-} import Numeric(showHFloat) main :: IO () main = do print [ 0xF.0 , 0xF.1, 0xF.01 , 0xF1p-4, 0xF01p-8 , 0x0.F1p4, 0x0.00F01p12 ] mapM_ putStrLn [ showHFloat (212.21 :: Double) "" , showHFloat (-12.76 :: Float) "" ...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/parser/HexFloatLiterals.hs
haskell
# Language HexFloatLiterals #
import Numeric(showHFloat) main :: IO () main = do print [ 0xF.0 , 0xF.1, 0xF.01 , 0xF1p-4, 0xF01p-8 , 0x0.F1p4, 0x0.00F01p12 ] mapM_ putStrLn [ showHFloat (212.21 :: Double) "" , showHFloat (-12.76 :: Float) "" , showHFloat (...
671f299c95aa444e1a3cae1042de13d9931024d60e362816bdee59386e4b8238
basho/riak_kv
riak_kv_reformat.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 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 . You may ob...
null
https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_reformat.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 permissio...
Copyright ( c ) 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 -module(...
a9e63284641a4a1701d5fe151dbb42235e4f8d2d3c317f491ecaad3956ab52b3
nuvla/api-server
password_test.clj
(ns sixsq.nuvla.auth.password-test (:require [buddy.hashers :as hashers] [clojure.test :refer [are deftest is use-fixtures]] [sixsq.nuvla.auth.password :as t] [sixsq.nuvla.server.app.params :as p] [sixsq.nuvla.server.resources.group :as group] [sixsq.nuvla.server.resources.lifecycle-test-utils...
null
https://raw.githubusercontent.com/nuvla/api-server/e4f0535e2e39e5042094fc20bfb811d2a9c75ad5/code/test/sixsq/nuvla/auth/password_test.clj
clojure
(ns sixsq.nuvla.auth.password-test (:require [buddy.hashers :as hashers] [clojure.test :refer [are deftest is use-fixtures]] [sixsq.nuvla.auth.password :as t] [sixsq.nuvla.server.app.params :as p] [sixsq.nuvla.server.resources.group :as group] [sixsq.nuvla.server.resources.lifecycle-test-utils...
aad7cdddb4e74d6ad80431316dc7eaf320431a9bbef75bc4e9bc6d7a00a5c62b
karamellpelle/grid
SoundObject.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/MEnv/Env/SoundObject.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module MEnv.Env.SoundObject ( module MEnv.E...
34c44ded472cab2536510074960903ccb532de44de7ef4a86f1ea501ccbef07a
BillHallahan/G2
Poly17.hs
module Poly17 where data List a = Emp | C a @ measure test : : List a - > Bool test Emp = True test ( C _ ) = False @ test Emp = True test (C _) = False @-} {-@ empty2 :: { xs:List a | test xs } @-} empty2 :: List a empty2 = empty empty :: List a empty = Emp
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/Polymorphism/Poly17.hs
haskell
@ empty2 :: { xs:List a | test xs } @
module Poly17 where data List a = Emp | C a @ measure test : : List a - > Bool test Emp = True test ( C _ ) = False @ test Emp = True test (C _) = False @-} empty2 :: List a empty2 = empty empty :: List a empty = Emp
77633aee149c99ef2bfc7b58b5e5ba565896cd97fb9d3d8a30637a0dcefa0b28
TempusMUD/cl-tempus
spec-assign.lisp
(in-package :tempus) (defparameter +special-cmd+ 0) ; special command response (defparameter +special-tick+ 1) ; special periodic action (defparameter +special-death+ 2) ; special death notification (defparameter +special-fight+ 3) ; special fight starting (defparameter +special-combat+ ...
null
https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/src/specials/spec-assign.lisp
lisp
special command response special periodic action special death notification special fight starting special in-combat ability special upon entrance special upon exit zone reset
(in-package :tempus) (defvar *special-funcs* (make-hash-table :test 'equal)) (defvar *special-flags* (make-hash-table :test 'equal)) (defun find-special-by-func (search-func) (maphash (lambda (name func) (when (eql search-func func) (return-from find-special-by-func name))) *...
70c64eb1a1bda27c309caa7ecd47a266905ce27f86dad34356a6fcb80a63f0d3
TouK/re-cms
subs.cljs
(ns re-cms.subs (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :as re-frame] [plumbing.core :refer [map-vals]])) (defn- page->section-mapping [page] (->> page (group-by :section) (map-vals first))) (re-frame/register-sub :content (fn [db] (re...
null
https://raw.githubusercontent.com/TouK/re-cms/98b54e79c349b5db7f8b3a6d30348c23bbe65a2e/src/cljs/re_cms/subs.cljs
clojure
(ns re-cms.subs (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :as re-frame] [plumbing.core :refer [map-vals]])) (defn- page->section-mapping [page] (->> page (group-by :section) (map-vals first))) (re-frame/register-sub :content (fn [db] (re...
82a5ab6635d463b2969cdcaf81feaa7b9acd428c59d0157d8974bc7b7da3b31b
RJ/erlang-cassandra-cql
ecql_sup.erl
-module(ecql_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). %% Helper macro for declaring children of supervisor -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). %% =============================================================...
null
https://raw.githubusercontent.com/RJ/erlang-cassandra-cql/24907e4052d378b0192dc57469236cee5ebc760e/src/ecql_sup.erl
erlang
API Supervisor callbacks Helper macro for declaring children of supervisor =================================================================== API functions =================================================================== =================================================================== Supervisor callback...
-module(ecql_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> {ok, { {one_for_one, 5, 10}, []} }.
6c36d9916840c0986fd90cf070669f51a3e3694410c335aed454ddcbc6484aa7
lrascao/simple_web_server
simple_web_server_config_api_v1.erl
-module(simple_web_server_config_api_v1). -behaviour(cowboy_handler). % behaviour callbacks -export([init/2, terminate/3]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Behaviour callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% init(Req0, State) -> lager:debug("got api request: ...
null
https://raw.githubusercontent.com/lrascao/simple_web_server/d5418f3dca4c436c29223fbb518713e30fb228d0/src/simple_web_server_config_api_v1.erl
erlang
behaviour callbacks Behaviour callbacks Public api Private
-module(simple_web_server_config_api_v1). -behaviour(cowboy_handler). -export([init/2, terminate/3]). init(Req0, State) -> lager:debug("got api request: ~p", [Req0]), {ok, RespBody, RespCode, Req1} = handle_request(cowboy_req:method(Req0), c...
b404ad444b507cf470e4c9d1ff9d2879f63737bd5e70990cf4a60cc026aab133
mlabs-haskell/hydra-demo
Command.hs
{-# LANGUAGE DeriveAnyClass #-} # OPTIONS_GHC -Wno - incomplete - record - updates # module HydraRPS.Node.Command ( Command ( Init, Abort, Commit, GetUTxO, Close, Contest, Fanout ), newTx, ) where import Cardano.Api (AlonzoEra, Tx, UTxO, serialiseToCBOR) import Data.Aeson (ToJSON, to...
null
https://raw.githubusercontent.com/mlabs-haskell/hydra-demo/7e00a4d971a2b7ec2894ec77a873233d7655c14e/src/HydraRPS/Node/Command.hs
haskell
# LANGUAGE DeriveAnyClass #
# OPTIONS_GHC -Wno - incomplete - record - updates # module HydraRPS.Node.Command ( Command ( Init, Abort, Commit, GetUTxO, Close, Contest, Fanout ), newTx, ) where import Cardano.Api (AlonzoEra, Tx, UTxO, serialiseToCBOR) import Data.Aeson (ToJSON, toJSON) import Data.Int (Int) impo...
ffa43e1138608b4e57604461ae86eb6fa02ef993cf0743df505dc9fd0a587d8b
WhatsApp/erlt
erlt_modifiers.erl
Copyright Ericsson AB 1996 - 2020 . All Rights Reserved . Copyright ( c ) 2020 Facebook , Inc. and its affiliates . %% 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...
null
https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/erltc/src/erlt_modifiers.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 Ericsson AB 1996 - 2020 . All Rights Reserved . Copyright ( c ) 2020 Facebook , Inc. and its affiliates . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erlt_modifiers). -export([parse_transform/2]). ...
5a8dbdd9aad2c2c9bd683a4d24eaac2aa561fe4945daf9b124a6888ee9d93325
rmehri01/thock
Common.hs
# LANGUAGE TemplateHaskell # -- | This module has common functionality that is used in both the offline and online UIs. module UI.Common where import Brick ( EventM, Size (Fixed), Widget (Widget, render), availWidthL, emptyWidget, fill, getContext, hBox, hLimit, hLimitPercent, ...
null
https://raw.githubusercontent.com/rmehri01/thock/6a84d6f27ff9065b37976501f769e3df24b6af1b/src/UI/Common.hs
haskell
| This module has common functionality that is used in both the offline and online UIs. | Produces a styled title widget based on the logo file | Draws an element of a list based on if it is selected | Draws a widget with the player's stats and further instructions if the game is done, otherwise is empty | Draws ...
# LANGUAGE TemplateHaskell # module UI.Common where import Brick ( EventM, Size (Fixed), Widget (Widget, render), availWidthL, emptyWidget, fill, getContext, hBox, hLimit, hLimitPercent, handleEventLensed, str, txt, txtWrap, vBox, vLimit, withAttr, ...
a7d7f6066dc201db0fa017d0474c18a0793536efdb4614cb640d064423d1c92e
bufferswap/ViralityEngine
mat4.lisp
(in-package #:cl-user) (defpackage #:vorigin.mat4 (:local-nicknames (#:com #:vorigin.common) (#:m2 #:vorigin.mat2) (#:m3 #:vorigin.mat3) (#:u #:vutils) (#:v3 #:vorigin.vec3) (#:v4 #:vorigin.vec4)) (:use #:cl) (:shadow #:= #:+ #:- #:* #:random #:trace) (:export #:mat #:...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/types/mat4.lisp
lisp
Constants
(in-package #:cl-user) (defpackage #:vorigin.mat4 (:local-nicknames (#:com #:vorigin.common) (#:m2 #:vorigin.mat2) (#:m3 #:vorigin.mat3) (#:u #:vutils) (#:v3 #:vorigin.vec3) (#:v4 #:vorigin.vec4)) (:use #:cl) (:shadow #:= #:+ #:- #:* #:random #:trace) (:export #:mat #:...
465cb74712c8dfee0c7fe2327e1e0e414d41b55f6819c535a58f284c395fd59c
dakk/caravand-fullnode
log.mli
val fatal : string -> ('a, out_channel, unit) format -> 'a val error : string -> ('a, out_channel, unit) format -> 'a val warn : string -> ('a, out_channel, unit) format -> 'a val info : string -> ('a, out_channel, unit) format -> 'a val debug : string -> ('a, out_channel, unit) format -> 'a val debug2 : string -> ('...
null
https://raw.githubusercontent.com/dakk/caravand-fullnode/72735bf380812aea32ba0d3d4aa671f741cdaecb/src/utils/log.mli
ocaml
val fatal : string -> ('a, out_channel, unit) format -> 'a val error : string -> ('a, out_channel, unit) format -> 'a val warn : string -> ('a, out_channel, unit) format -> 'a val info : string -> ('a, out_channel, unit) format -> 'a val debug : string -> ('a, out_channel, unit) format -> 'a val debug2 : string -> ('...
1e68575bfe75588524180331ac875a16d35fecb7d76e9d139d69f894ec39aa2f
ocurrent/ocaml-multicore-ci
gen_project.mli
(** Helper functions for generating stub projects under test **) type contents = Format.formatter -> unit type file = Folder of string * file list | File of string * contents val file : string -> contents -> file val folder : string -> file list -> file val opam_monorepo_spec_file : contents (** Contents of an examp...
null
https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/test/gen_project.mli
ocaml
* Helper functions for generating stub projects under test * * Contents of an example [.opam] file for opam-monorepo * Contents of an example [.opam.locked] file for opam-monorepo. [monorepo_version] will populate a [x-opam-monorepo-version] field. * Contents of an example [.opam] file * Contents of a [.ocamlfor...
type contents = Format.formatter -> unit type file = Folder of string * file list | File of string * contents val file : string -> contents -> file val folder : string -> file list -> file val opam_monorepo_spec_file : contents val opam_monorepo_lock_file : monorepo_version:string option -> contents val opam : con...
acfc60a61bf7c811a679637e62f3bcb808221255f649b2f02eb0b2c29a6b5e40
EligiusSantori/L2Apf
play_fail.scm
(module system racket/base (provide login-server-packet/play-fail) (require "../../packet.scm") (define (login-server-packet/play-fail buffer) (let ((s (open-input-bytes buffer))) (list (cons 'id (read-byte s)) (cons 'reason (case (read-byte s) ((#x01) 'system-error) ((#x0f) 'too-m...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/login/server/play_fail.scm
scheme
(module system racket/base (provide login-server-packet/play-fail) (require "../../packet.scm") (define (login-server-packet/play-fail buffer) (let ((s (open-input-bytes buffer))) (list (cons 'id (read-byte s)) (cons 'reason (case (read-byte s) ((#x01) 'system-error) ((#x0f) 'too-m...
4dabe0f59ccb54b9f45042359834da6bfb6fe974d1406c1d27991177b4f1a05a
moss/haskell-roguelike-challenge
iatmwotk.hs
module IAmThatMerryWandererOfTheNight where main :: IO () main = do putChar '@'
null
https://raw.githubusercontent.com/moss/haskell-roguelike-challenge/2163c3aa6f14051bc2360de0d7a1694b54ef73a3/1-instapermadeathhack/iatmwotk.hs
haskell
module IAmThatMerryWandererOfTheNight where main :: IO () main = do putChar '@'
4b30e9f64044d40cb7b42581e15b5fd9fa549f9f2edaad883f784bb81a678366
qfpl/reflex-tutorial
Common.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Ex14.Common ( Money , moneyDisplay , Product (..) , Stock (..) , carrot , celery , cucumber , Error(..) , errorText ) where import Data.Monoid ((<>)) import Data.Text import qualified Data.Text as Text type Money = Int money...
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex14/Common.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
module Ex14.Common ( Money , moneyDisplay , Product (..) , Stock (..) , carrot , celery , cucumber , Error(..) , errorText ) where import Data.Monoid ((<>)) import Data.Text import qualified Data.Text as Text type Money = Int moneyDisplay :: Money -> Text moneyDisplay = ("$" <>) . Text.p...
611e079033e0209934cf5505b48c5acc9f69c8a855d6b23667c0bf90b3d49412
racket/picturing-programs
info.rkt
#lang info (define categories '(media)) (define can-be-loaded-with 'all) (define required-core-version "5.0.0.1") (define primary-file "main.rkt") (define scribblings '(("picturing-programs.scrbl" () (teaching -21)))) (define repositories '("4.x")) (define compile-omit-paths '("tests")) (define blurb ...
null
https://raw.githubusercontent.com/racket/picturing-programs/9061b6c6f93a2aeba58a785a75c324225e12a47c/picturing-programs/info.rkt
racket
#lang info (define categories '(media)) (define can-be-loaded-with 'all) (define required-core-version "5.0.0.1") (define primary-file "main.rkt") (define scribblings '(("picturing-programs.scrbl" () (teaching -21)))) (define repositories '("4.x")) (define compile-omit-paths '("tests")) (define blurb ...
364ae84f72639aabfb8fc44263e9bbf7777854d3ae9849b5191ac6fae4035e4d
haskell-hvr/missingh
Utils.hs
{-# LANGUAGE Safe #-} arch - tag : Time utilities main file Copyright ( c ) 2004 - 2011 < > All rights reserved . For license and copyright information , see the file LICENSE Copyright (c) 2004-2011 John Goerzen <> All rights reserved. For license and copyright information, see the file LICENSE -} |...
null
https://raw.githubusercontent.com/haskell-hvr/missingh/e1a73bd9547db967b4e8d76a443000d06ce95ac4/src/System/Time/Utils.hs
haskell
# LANGUAGE Safe #
arch - tag : Time utilities main file Copyright ( c ) 2004 - 2011 < > All rights reserved . For license and copyright information , see the file LICENSE Copyright (c) 2004-2011 John Goerzen <> All rights reserved. For license and copyright information, see the file LICENSE -} | Module : Sy...
a972a396f775d1057088a6e67880db816bed2618f0a3a39735c6c0048d963069
RileyEv/CircuitFlow
BasicNetwork.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE InstanceSigs # # LANGUAGE ScopedTypeVariables # module Pipeline.Internal.Backend.BasicNetwork where import Control.Concurrent (ThreadId, forkIO, killThread) import Control.Concurre...
null
https://raw.githubusercontent.com/RileyEv/CircuitFlow/8590c495c990811119e82760e901ba71d45aaf74/src/Pipeline/Internal/Backend/BasicNetwork.hs
haskell
| Main type for storing information about the process network. Translation | Creates the initial network used in the accumulating fold Check for failure
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE InstanceSigs # # LANGUAGE ScopedTypeVariables # module Pipeline.Internal.Backend.BasicNetwork where import Control.Concurrent (ThreadId, forkIO, killThread) import Control.Concurre...
b42d7a3922ea5af0f6e635828de84ff7ac74a23221759fa40f1c161a4b50c6cd
QuentinDuval/HaskellTrainReservationKata
ReservationExpr.hs
# LANGUAGE TemplateHaskell # module ReservationExpr where import Control.Lens import qualified Data.Map as Map import qualified Data.Set as Set ------------------------------------------------------------------------------- -- Domain types (concepts) -----------------------------------------------------------...
null
https://raw.githubusercontent.com/QuentinDuval/HaskellTrainReservationKata/7b265c918eb13cd4b48214d51c6274156fe1ce4e/src/ReservationExpr.hs
haskell
----------------------------------------------------------------------------- Domain types (concepts) ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Helper constructors ---------------------------------...
# LANGUAGE TemplateHaskell # module ReservationExpr where import Control.Lens import qualified Data.Map as Map import qualified Data.Set as Set type TrainId = String type CoachId = String type SeatId = Int type DateTime = Int data ReservationRequest = ReservationRequest { _seatCount :: Int, _dateT...
5b96842d3ed0740edad945c9bf6286b350fefddbb2ecdd0e12ac142fdb8c19b6
pyrmont/pondent
specs.cljs
(ns pondent.specs (:require [clojure.spec.alpha :as s] [pondent.specs.file] [pondent.specs.github] [pondent.specs.markdown] [pondent.specs.posting] [pondent.specs.time]))
null
https://raw.githubusercontent.com/pyrmont/pondent/446adb8aaa62916b20fa34fb0cf5c419bb06f07c/test/pondent/specs.cljs
clojure
(ns pondent.specs (:require [clojure.spec.alpha :as s] [pondent.specs.file] [pondent.specs.github] [pondent.specs.markdown] [pondent.specs.posting] [pondent.specs.time]))
97f07cd7e349bbe51f321dbe6a8f4fea9515689dcca147696241b46d245d14e4
RunOrg/RunOrg
commands.ml
(* © 2014 RunOrg *) open Std (* Scheduling e-mail to be sent. ============================= *) (* Who is allowed to send e-mail ? *) let send_audience = Audience.admin let batch_size = 100 let send pid mid gid = let! allowed = Audience.is_member pid send_audience in if not allowed then let! c...
null
https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/sentMailLib/commands.ml
ocaml
© 2014 RunOrg Scheduling e-mail to be sent. ============================= Who is allowed to send e-mail ? Following links ===============
open Std let send_audience = Audience.admin let batch_size = 100 let send pid mid gid = let! allowed = Audience.is_member pid send_audience in if not allowed then let! ctx = Run.context in return (`NeedAccess (ctx # db)) else let! info = Mail.get mid in match info with None -> r...
ba68eeba99465c6458e90aad74b51206fbf83a624e6fc1baa28a5a92fdf06389
hakaru-dev/hakaru
Prelude.hs
# LANGUAGE CPP , GADTs , , TypeFamilies , FlexibleContexts , UndecidableInstances , LambdaCase , OverloadedStrings , Rank2Types # , GADTs , DataKinds , TypeFamilies , Fle...
null
https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Runtime/Prelude.hs
haskell
# OPTIONS_GHC -Wall -fwarn-tabs -fsimpl-tick-factor=1000 # # INLINE let_ # # INLINE r_index # # INLINE uncase_ # # INLINE case_ # # INLINE branch # # INLINE thRootOf # # INLINE (!) #
# LANGUAGE CPP , GADTs , , TypeFamilies , FlexibleContexts , UndecidableInstances , LambdaCase , OverloadedStrings , Rank2Types # , GADTs , DataKinds , TypeFamilies , Fle...
c7b051c60ba7f259f1e9b8acc6610ee9aeb1984f3f214332206ad4a2d6fba2ea
brendanhay/amazonka
UpdateIdentityProvider.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/UpdateIdentityProvider.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.WorkSpacesWeb.UpdateIdentityProvider Stability : auto-generated Updates the identity provider. * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newUpdateIdentityProvider' smart const...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
240187103caa221e5c44e58eacbbce26fc725f776edba22ac29b250cc34d4e1b
mirage/cactus
utils.ml
* Copyright ( c ) 2021 Tarides < > * Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SO...
null
https://raw.githubusercontent.com/mirage/cactus/3eb2a4abee79bf8f20de5b4b12a57c3421c3e2fe/src/utils.ml
ocaml
Finds [k] such that [compare k >= 0] and [compare (k+1) < 0]. If no such [k] it returns Not_found. If [safe] is false then it finds [k] such that [compare k = 0] and raises Not_found otherwise. The loop invariant is that [compare i >= 0] and [compare j < 0]. If [safe] and if [i] is the last element th...
* Copyright ( c ) 2021 Tarides < > * Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SO...
f70f7d10a11c96afe97eec657933f0e85ae3afa2e0d4e544df6a688962718c6b
LPCIC/matita
mlutil.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2011 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_extraction/mlutil.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** s ML type environment. get the n-t...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2011 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : mlutil.mli 14786 20...
669672155aecee98bd4d5588dd74d05235babf9113700e94766442f3450104f1
emqx/emqx
emqx_lwm2m_channel.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/lwm2m/emqx_lwm2m_channel.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_lwm2m_channel). -include_lib("emqx/include/logger.hrl"). -include("src/coap/includ...
8fc052a2099912e30d65aa8d25e3f3eae46521b297fea37db995530d6117744d
epiccastle/bbssh
host_key.clj
(ns pod.epiccastle.bbssh.pod.host-key (:require [bbssh.impl.references :as references] [bbssh.impl.utils :as utils]) (:import [com.jcraft.jsch HostKey JSch])) (def types {:unknown HostKey/UNKNOWN :guess HostKey/GUESS :sshdss HostKey/SSHDSS :sshrsa HostKey/SSHRSA :ecdsa256 HostKey/ECDSA256...
null
https://raw.githubusercontent.com/epiccastle/bbssh/d44b2f6ed09a7e2ca2e2e694f9a40a727a173677/src/clj/pod/epiccastle/bbssh/pod/host_key.clj
clojure
(ns pod.epiccastle.bbssh.pod.host-key (:require [bbssh.impl.references :as references] [bbssh.impl.utils :as utils]) (:import [com.jcraft.jsch HostKey JSch])) (def types {:unknown HostKey/UNKNOWN :guess HostKey/GUESS :sshdss HostKey/SSHDSS :sshrsa HostKey/SSHRSA :ecdsa256 HostKey/ECDSA256...
d658f2958c8f9f584f7ac8e775c10cc279d810c5fe27ecf475fcee5d0fbea167
ocaml-obuild/obuild
expr.ml
open Ext.Fugue exception UnknownSymbol of (string * string) exception UnknownExpression of string exception ExpressionEmpty exception UnbalancedParenthesis exception MalformedExpression exception InvalidDependencyName of string exception CannotParseConstraints of (string * string) type version = string module Token ...
null
https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/obuild/expr.ml
ocaml
version ident should be parsed as a string != valid char per types Per type lexer main lexing loop
open Ext.Fugue exception UnknownSymbol of (string * string) exception UnknownExpression of string exception ExpressionEmpty exception UnbalancedParenthesis exception MalformedExpression exception InvalidDependencyName of string exception CannotParseConstraints of (string * string) type version = string module Token ...
7445fdb8ba5c288d8d83331fe51f5e30a48f8d363768164e48750d381759aa9d
Gabriella439/HasCal
Trade.hs
{-# LANGUAGE BlockArguments #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # | This example is from the " Introduction " section of the " Learn TLA+ " guide > P...
null
https://raw.githubusercontent.com/Gabriella439/HasCal/cbc58a99eaca8a1b30440fc0cd68ca1f98af4c2f/tasty/HasCal/Test/Trade.hs
haskell
# LANGUAGE BlockArguments # # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # algorithm trade algorithm trade > universe @People
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # | This example is from the " Introduction " section of the " Learn TLA+ " guide > People = = { " alice " , " bob " } > Items = = { " ore " , " sheep " , " brick " } > variable owner_of...
bc7a31512ad5ccde9eafcd9b911db3025c3f80e73d0a56501c97852502af88c4
avras/nsime
nsime_udp_protocol.erl
%% Copyright ( C ) 2012 < > %% %% This file is part of nsime. %% nsime 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....
null
https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/src/nsime_udp_protocol.erl
erlang
This file is part of nsime. (at your option) any later version. nsime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with...
Copyright ( C ) 2012 < > nsime 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 You should have received a copy of the GNU General Public License Author :...
3238aaba52836a69244dacc8ba1c2c4010360ce83fc6846e59d90cd86fb9cd7c
shimmering-void/sketches
test_runner.cljs
;; This test runner is intended to be run from the command line (ns sketches.test-runner (:require ;; require all the namespaces that you want to test [sketches.core-test] [figwheel.main.testing :refer [run-tests-async]])) (defn -main [& args] (run-tests-async 5000))
null
https://raw.githubusercontent.com/shimmering-void/sketches/84d29636a798720e8db3379c21814fe9f92686fd/test/sketches/test_runner.cljs
clojure
This test runner is intended to be run from the command line require all the namespaces that you want to test
(ns sketches.test-runner (:require [sketches.core-test] [figwheel.main.testing :refer [run-tests-async]])) (defn -main [& args] (run-tests-async 5000))
f560d2e9b5f00416184e2aa336b7be756842f8f26041d653e7080792701ae044
bravit/hid-examples
Test.hs
import Test.Tasty import Test.Tasty.Hspec import ParseIPSpec import LookupIPSpec import Props import GoldenTests main :: IO () main = do specs <- concat <$> mapM testSpecs [ parseIPSpecs , lookupIPSpecs ] goldens <- goldenTests defaultMain (testGroup "All Tests" [ ...
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/tests/iplookup/Test.hs
haskell
import Test.Tasty import Test.Tasty.Hspec import ParseIPSpec import LookupIPSpec import Props import GoldenTests main :: IO () main = do specs <- concat <$> mapM testSpecs [ parseIPSpecs , lookupIPSpecs ] goldens <- goldenTests defaultMain (testGroup "All Tests" [ ...
4dbf913951238a973a9d0b8b113f1d9a480d714e19d9c9c57d123fe4b19fcbdf
otakar-smrz/elixir-fm
I.hs
module Elixir.Data.Moony.Regular.I (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> "_h z ` l" <| [ < _ > cluster_2 = cluster |> ['_','h','u','z','a','`','b','a','l'] <| [ _____ `noun` {- <_huza`bal> -} [ ['p','r','a','t','t','l'...
null
https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Moony/Regular/I.hs
haskell
<_huza`bal> <_hazafIy> <_hazzAf> <_hazaq> <_hazzaq> <ta_hazzaq> <in_hazaq> <_hazq> <i_htizAl> <mu_htazil> <_hazam> <_hizAm> <_huzAmaT> <_hazan> <i_htazan> <_haznaT> <_hizAnaT> <_hazInaT> <_hazandAr> <_hazandAr> <_hazandArIy> <_hazandArIy> <_hazzAn> <ma_hzan> <ma_hzanIy> ...
module Elixir.Data.Moony.Regular.I (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> "_h z ` l" <| [ < _ > cluster_2 = cluster |> ['_','h','u','z','a','`','b','a','l'] <| [ cluster_3 = cluster |> "_h z f" <| [ < _ > `plu...
fba4723c8b12505bedee0a087ebbe416877ddf9c5445972cc430717ed119b89d
metosin/reagent-dev-tools
state_tree.cljs
(ns reagent-dev-tools.state-tree (:require ["react" :as react] [reagent.core :as r] [reagent-dev-tools.state :as state] [reagent-dev-tools.context :as ctx])) (defn- toggle [v ks open?] (if (or (not (get-in v ks)) open?) (assoc-in v ks {}) (assoc-in v ks nil))) ...
null
https://raw.githubusercontent.com/metosin/reagent-dev-tools/9fd5b7d0788c0df6def883bbc8bb9eb578119701/src/reagent_dev_tools/state_tree.cljs
clojure
type-name tooltip other info. if one is closed, open all else close all Disable text select after double click
(ns reagent-dev-tools.state-tree (:require ["react" :as react] [reagent.core :as r] [reagent-dev-tools.state :as state] [reagent-dev-tools.context :as ctx])) (defn- toggle [v ks open?] (if (or (not (get-in v ks)) open?) (assoc-in v ks {}) (assoc-in v ks nil))) ...
63fdbf2ae800df7340553dbe72fcbe763da9733579f9ee17fdc26a848fd7a2af
borodust/bodge-nanovg
claw.lisp
(claw:defwrapper (:bodge-nanovg-gl3 (:system :bodge-nanovg/wrapper) (:headers "src/bodge_nanovg.h") (:defines "BODGE_GL3" 1) (:includes :nanovg-includes :glad-includes) (:include-sources "nanovg.h" "nanovg_gl.h") ...
null
https://raw.githubusercontent.com/borodust/bodge-nanovg/6b32d9b5f66c23d87d7aea02417a820110656a13/src/gl3/claw.lisp
lisp
(claw:defwrapper (:bodge-nanovg-gl3 (:system :bodge-nanovg/wrapper) (:headers "src/bodge_nanovg.h") (:defines "BODGE_GL3" 1) (:includes :nanovg-includes :glad-includes) (:include-sources "nanovg.h" "nanovg_gl.h") ...
e12934dba2a975cac6320b759531779cfaa74e501024e3d869fe69e9162937d8
elastic/eui-cljs
helpers.cljs
(ns eui.global.helpers (:require ["@elastic/eui/lib/global_styling/mixins/_helpers.js" :as eui])) (def useEuiYScrollWithShadows eui/useEuiYScrollWithShadows) (def useEuiYScroll eui/useEuiYScroll) (def euiScrollBarStyles eui/euiScrollBarStyles) (def euiYScroll eui/euiYScroll) (def euiOverflowScroll eui/euiOverflo...
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/global/helpers.cljs
clojure
(ns eui.global.helpers (:require ["@elastic/eui/lib/global_styling/mixins/_helpers.js" :as eui])) (def useEuiYScrollWithShadows eui/useEuiYScrollWithShadows) (def useEuiYScroll eui/useEuiYScroll) (def euiScrollBarStyles eui/euiScrollBarStyles) (def euiYScroll eui/euiYScroll) (def euiOverflowScroll eui/euiOverflo...
1fe65519bbb845c79e320d0d74fba7fe12abac93ffbdc69a49823262d0b472e3
facebook/duckling
Rules.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 GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.TimeGrain.VI.Rules ( rules ) whe...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/TimeGrain/VI/Rules.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 GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.TimeGrain.VI.Rules ( rules ) where import Data.String import Data.Text (Text) import Prelude import Duckling.Dimensions.Types import Duckling.Types import qualified Duckling.TimeGrain.Types as TG grains :: [(Text, String, TG.Grain)] grains = [ ("...
763eae3ac2b1e6a10490cd0aad2180b09d751d3b2b8e0cc74bb9d4cd5c0ea256
art-w/sherlocode
ui.ml
open Tyxml.Html let link_to url pattern = a ~a:[ a_class [ "example" ]; a_href url ] [ code [ txt pattern ] ] let link_example pattern = link_to (Uri.to_string @@ Uri.of_string ("/?q=" ^ pattern)) pattern let link_file file = h3 [ a ~a:[ a_href (Link.url file 0) ] [ txt file ] ] let explain_regex_syntax = div...
null
https://raw.githubusercontent.com/art-w/sherlocode/25df920f1bb62af44124ce287ce09b1a47cdd842/www/ui.ml
ocaml
open Tyxml.Html let link_to url pattern = a ~a:[ a_class [ "example" ]; a_href url ] [ code [ txt pattern ] ] let link_example pattern = link_to (Uri.to_string @@ Uri.of_string ("/?q=" ^ pattern)) pattern let link_file file = h3 [ a ~a:[ a_href (Link.url file 0) ] [ txt file ] ] let explain_regex_syntax = div...
27e4581b49af97baa8ff2fa5778075fda2c08b3d8639fddc82cc2499c5df783b
well-typed-lightbulbs/ocaml-esp32
pp_print_custom_break.ml
(* TEST *) A test file for Format.pp_print_custom_break . A test file for Format.pp_print_custom_break. *) let fprintf, printf, list = Format.(fprintf, printf, pp_print_list) let string, custom_break = Format.(pp_print_string, pp_print_custom_break) let () = Format.set_margin 30 let example = [ "Foo"; "Baz...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-format/pp_print_custom_break.ml
ocaml
TEST
A test file for Format.pp_print_custom_break . A test file for Format.pp_print_custom_break. *) let fprintf, printf, list = Format.(fprintf, printf, pp_print_list) let string, custom_break = Format.(pp_print_string, pp_print_custom_break) let () = Format.set_margin 30 let example = [ "Foo"; "Baz"; "Bar"; "...
6298dd22d535ac39a9fa02fd3166df2e3442aa6b0d333e704e27b83c9997c964
VisionsGlobalEmpowerment/webchange
state.cljs
(ns webchange.admin.widgets.add-class-students.state (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.admin.widgets.state :as widgets] [webchange.state.warehouse :as warehouse] [webchange.utils.list :refer [in-list?]])) (def path-to-db :widget/add-class-students...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/712a5895bfa088043617e5bd165e2763664334d3/src/cljs/webchange/admin/widgets/add_class_students/state.cljs
clojure
callbacks Selected Students Available Students Students List Indicators
(ns webchange.admin.widgets.add-class-students.state (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.admin.widgets.state :as widgets] [webchange.state.warehouse :as warehouse] [webchange.utils.list :refer [in-list?]])) (def path-to-db :widget/add-class-students...
91ca7866fa2ae70aa427e458f7adc066e2461549e3bd5e7cfe41ea006196037c
nitrogen/NitrogenProject.com
tests_basic.erl
-module(tests_basic). -compile(export_all). -include_lib("nitrogen_core/include/wf.hrl"). main() -> wf_test:start(fun tests/0), #template{file="templates/grid.html"}. layout() -> #panel{id=wrapper}. event(Tag) -> ?wf_test_event(Tag). tests() -> ?wf_test_manual(default_postback, fun default_postback/0, fun ver...
null
https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/tests/tests_basic.erl
erlang
-module(tests_basic). -compile(export_all). -include_lib("nitrogen_core/include/wf.hrl"). main() -> wf_test:start(fun tests/0), #template{file="templates/grid.html"}. layout() -> #panel{id=wrapper}. event(Tag) -> ?wf_test_event(Tag). tests() -> ?wf_test_manual(default_postback, fun default_postback/0, fun ver...
c78d6319d010440c270e156290b472186be5f12af3ee372ec5c6bf55510bcbec
lehins/Color
AdobeRGBSpec.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeApplications # module Graphics.Color.Space.RGB.AdobeRGBSpec (spec, arbitraryElevator) where import Graphics.Color.Space.Common instance (Elevator e, Random e) => Arbitrary (Color (AdobeRGB l) e) where arbitrary = ColorRGB <$> arbitraryElevator <*>...
null
https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/tests/Graphics/Color/Space/RGB/AdobeRGBSpec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeApplications # module Graphics.Color.Space.RGB.AdobeRGBSpec (spec, arbitraryElevator) where import Graphics.Color.Space.Common instance (Elevator e, Random e) => Arbitrary (Color (AdobeRGB l) e) where arbitrary = ColorRGB <$> arbitraryElevator <*>...
dbbcaf8b28a10ec7cebc95956d5a2a2613a665d4214e958e5198c71b0fca02bb
gedge-platform/gedge-platform
jose_jwk_kty_okp_ed25519ph.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2016 , %%% @doc %%% %%% @end Created : 15 Jan 2016 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/jose/src/jwk/jose_jwk_kty_okp_ed25519ph.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- jose_jwk callbacks jose_jwk_kty callbacks jose_jwk_use_sig callbacks API Types ========================================================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2016 , Created : 15 Jan 2016 by < > -module(jose_jwk_kty_okp_ed25519ph). -behaviour(jose_jwk). -behaviour(jose_jwk_kty). -behaviour(jose_jwk_use_sig). -export([from_map/1]). -export([to_key/1...
e3a9b3159f7a2b65c2b924ad8e52f894e405b2f1ed761fcfacee8c3c4eff53cf
anurudhp/CPHaskell
functions.hs
-- order - take some heights of people, and return their ordering indexed from 1 order :: [Int] -> [Int] order = sort . map swap . zip [1 ..] --- For variable lines per test case process :: [String] -> [String] process [] = [] process (n:xs) = solve ys : process xs' where n' = read n -- n (ys, xs') = split...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/teaching/stream-1/functions.hs
haskell
order - take some heights of people, and return their ordering - For variable lines per test case n
indexed from 1 order :: [Int] -> [Int] order = sort . map swap . zip [1 ..] process :: [String] -> [String] process [] = [] process (n:xs) = solve ys : process xs' where (ys, xs') = splitAt n xs
5682fca9e86051523b9963b4b678d1ac86c3a6f3ac5daa29e0897414d2f41f98
Lysxia/twentyseven
Allocated.hs
-- | An alternative to 'Data.Vector.Storable' where the underlying byte arrays -- are pinned. # LANGUAGE FlexibleInstances , GeneralizedNewtypeDeriving , MagicHash , MultiParamTypeClasses , RankNTypes , ScopedTypeVariables , TypeFamilies # MultiParamTypeClasses, RankNTypes, ScopedTypeVariables, TypeFamilies ...
null
https://raw.githubusercontent.com/Lysxia/twentyseven/bfcd3ddcf938bc6db933a364d331877b0fd1257e/src/Data/Vector/Storable/Allocated.hs
haskell
| An alternative to 'Data.Vector.Storable' where the underlying byte arrays are pinned. * Mutable interface * Immutable interface # INLINE (!) # * IO
# LANGUAGE FlexibleInstances , GeneralizedNewtypeDeriving , MagicHash , MultiParamTypeClasses , RankNTypes , ScopedTypeVariables , TypeFamilies # MultiParamTypeClasses, RankNTypes, ScopedTypeVariables, TypeFamilies #-} module Data.Vector.Storable.Allocated where import Control.DeepSeq import Control.Monad i...
0b0745c4f52e01c3f1d078a894ad8caff75560ae1db4cd14152a58391895f534
AndrasKovacs/ELTE-func-lang
Ora3.hs
{-# OPTIONS_GHC -Wincomplete-patterns -Wmissing-methods #-} {-# LANGUAGE DeriveFoldable, DeriveFunctor #-} module Ora3 where import Prelude hiding (NonEmpty(..)) típust : data NonEmpty a = Last a | Cons a (NonEmpty a) infixr 5 `Cons` Írjunk a típusra Foldable instance - ot ! Deriving semmilyen formában ....
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/a7ef44786572653ec17b28b121b30a066d0152b8/2022-23-1/gyak2/Ora3.hs
haskell
# OPTIONS_GHC -Wincomplete-patterns -Wmissing-methods # # LANGUAGE DeriveFoldable, DeriveFunctor # Mire jó a foldable? pl.: foldMap :: Monoid m => (a -> m) -> t a -> m pl lista: szabály: (a <> b) <> c == a <> (b <> c) Ezek segítségével írjunk Foldable-t map :: Foldable f => (a -> b) -> f a -> f b <-- ilyen nincs...
module Ora3 where import Prelude hiding (NonEmpty(..)) típust : data NonEmpty a = Last a | Cons a (NonEmpty a) infixr 5 `Cons` Írjunk a típusra Foldable instance - ot ! Deriving semmilyen formában . Maximum pontért egy totális foldr implementáció ! ( 2 pont ) instance Foldable NonEmpty where foldr f...
b9f0a7d16b74094f01b9ffe5619b579c0541770388a97136c70678063792b998
tanakh/ICFP2011
Simulator.hs
{-# Language BangPatterns #-} module Simulator ( Simulator(..), newSimulator, execStep, myState, oppState, printState, Hand, ) where import qualified Control.Exception as E import Control.Monad import Data.IORef import qualified Data.Vector.Mutable as MV import System.IO.Unsafe data Simulator ...
null
https://raw.githubusercontent.com/tanakh/ICFP2011/db0d670cdbe12e9cef4242d6ab202a98c254412e/simulator/Simulator.hs
haskell
# Language BangPatterns # print "*** ZOMBIE ***"
module Simulator ( Simulator(..), newSimulator, execStep, myState, oppState, printState, Hand, ) where import qualified Control.Exception as E import Control.Monad import Data.IORef import qualified Data.Vector.Mutable as MV import System.IO.Unsafe data Simulator = Simulator { turnCnt :: ...
fbd81ddb1a023aa8c86117e2bfd3f4e6437832a62756a7a21ac67d867f9251f0
calvis/cKanren
mk.rkt
#lang racket (require "../miniKanren.rkt" "../absento.rkt" "../attributes.rkt" "../neq.rkt" "../tester.rkt") (provide test-mk test-mk-long) (define number-primo (lambda (exp env val) (fresh (n) (== `(intexp ,n) exp) (== `(intval ,n) val) (not-in-envo 'numo env)))) (define ...
null
https://raw.githubusercontent.com/calvis/cKanren/8714bdd442ca03dbf5b1d6250904cbc5fd275e68/cKanren/tests/mk.rkt
racket
#lang racket (require "../miniKanren.rkt" "../absento.rkt" "../attributes.rkt" "../neq.rkt" "../tester.rkt") (provide test-mk test-mk-long) (define number-primo (lambda (exp env val) (fresh (n) (== `(intexp ,n) exp) (== `(intval ,n) val) (not-in-envo 'numo env)))) (define ...
ba06dd675ce53f9279a17a0927231e7f0fde9b30398fadca0dd98f99d4b3e8b9
mfikes/fifth-postulate
ns156.cljs
(ns fifth-postulate.ns156) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns156.cljs
clojure
(ns fifth-postulate.ns156) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
9b781b510862142d6e6c45eb4364b6157d8e71c3fdc5956d41de97628bca9f41
argp/bap
test_string.ml
open OUnit open BatString let string = "Jon \"Maddog\" Orwant" open BatEnum let test_take_and_skip ( ) = let foo s : string list = let e = enum s in [ ? List : of_enum ( f e ) | f < - List : [ take 5 ; skip 3 % > take 5 ; take 5 ; identity ] ? ] in assert_equal ~printer:(Print...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/testsuite/test_string.ml
ocaml
"Taking and skipping" >:: test_take_and_skip;
open OUnit open BatString let string = "Jon \"Maddog\" Orwant" open BatEnum let test_take_and_skip ( ) = let foo s : string list = let e = enum s in [ ? List : of_enum ( f e ) | f < - List : [ take 5 ; skip 3 % > take 5 ; take 5 ; identity ] ? ] in assert_equal ~printer:(Print...
b1b449eccfc0bff5a88e7768c2fa286b92b42680384bb0ac1a09b47414b7343e
tgutu/clunit
generic-functions.lisp
(in-package :clunit) ;; This function is called inside the EXECUTE-TEST method at runtime. (defgeneric expand-fixture (suite body) (:documentation "Expands out a fixture body for the given test suite.")) ;; By specializing methods of this generic function on different FORMAT values, the reporting formats ;; of the...
null
https://raw.githubusercontent.com/tgutu/clunit/6f6d72873f0e1207f037470105969384f8380628/src/functions/generic-functions.lisp
lisp
This function is called inside the EXECUTE-TEST method at runtime. By specializing methods of this generic function on different FORMAT values, the reporting formats of the unit test results can be extended. Define the default method definitions which either just return nil or their default values. We will special...
(in-package :clunit) (defgeneric expand-fixture (suite body) (:documentation "Expands out a fixture body for the given test suite.")) (defgeneric print-format (object format stream) (:documentation "Outputs the OBJECT report to STREAM in the given FORMAT. FORMAT can be :default, :tap or NIL.")) (defmethod expan...
25f8d70c3861ab9a4a465074b5662676e62cba021f23bd3eac150cee19db191a
bufferswap/ViralityEngine
spec.lisp
(in-package #:virality) Implementation of datatype GEOMETRY - SPEC (defun make-geometry-spec (layout-name &key (primitive :triangles) (vertex-count 0) buffer-data) (lambda () (let ((spec (make-instance 'geometry-spec :id (g...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/geometry/spec.lisp
lisp
(in-package #:virality) Implementation of datatype GEOMETRY - SPEC (defun make-geometry-spec (layout-name &key (primitive :triangles) (vertex-count 0) buffer-data) (lambda () (let ((spec (make-instance 'geometry-spec :id (g...
24c70bb0031889a859d8464ed5c801bc66d4da3121f6b8c1d32086a0d5b249b5
IndiscriminateCoding/clarity
monoid.ml
open Fn module type S = sig include Semigroup.S val zero : t end module Int = struct module Min = struct type t = int let append = min let zero = max_int end module Max = struct type t = int let append = max let zero = min_int end module Sum = struct type t = int let appe...
null
https://raw.githubusercontent.com/IndiscriminateCoding/clarity/163c16249cb3f01c4244b80be39e9aad0b1ca325/lib/classes/monoid.ml
ocaml
open Fn module type S = sig include Semigroup.S val zero : t end module Int = struct module Min = struct type t = int let append = min let zero = max_int end module Max = struct type t = int let append = max let zero = min_int end module Sum = struct type t = int let appe...
724a2c866c438cfb21c92babe24b411c1f5e37177044079c36210c79356c10da
OCamlPro/ez_api
ppx_deriving_err_case.ml
(**************************************************************************) (* *) (* Copyright 2018-2023 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/OCamlPro/ez_api/5253f7dd8936e923290aa969ee43ebd3dc6fce2d/src/ppx/ppx_deriving_err_case.ml
ocaml
************************************************************************ Copyright 2018-2023 OCamlPro All rights reserved. This ...
GNU Lesser General Public License version 2.1 , with the special open Ppxlib open Ast_builder.Default open Ppx_deriving_encoding_lib let mk ~loc ?enc ?(kind_label="kind") ~title name code = let kind_enc = Utils.(enc_apply ~loc "obj1" [ enc_apply ~loc "req" [ estring ~loc kind_label; ...
456aaae9826b99786025df0b085ec39dec5cb9c36157ff2abeb3322cd50e996d
simmsb/calamity
Dsl.hs
| A DSL for generating commands and groups This is effectively just a re - export of " CalamityCommands . Dsl " but with documentation more tuned for usage with Calamity . This is effectively just a re-export of "CalamityCommands.Dsl" but with documentation more tuned for usage with Calamity. -} module Ca...
null
https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Commands/Dsl.hs
haskell
* Commands DSL $dslTutorial | The name of the command | The command's parameters | The parser for this command | The callback for this command | The name of the command | The aliases for the command | The command's parameters | The parser for this command | The callback for this command | The name of the co...
| A DSL for generating commands and groups This is effectively just a re - export of " CalamityCommands . Dsl " but with documentation more tuned for usage with Calamity . This is effectively just a re-export of "CalamityCommands.Dsl" but with documentation more tuned for usage with Calamity. -} module Ca...
ef0d55f06e42dd59dc545723045e5114f2d191fa3de26228ece77abb5fa86fc8
EligiusSantori/L2Apf
cubics.scm
(module system racket/base (require racket/contract "../packet.scm" ) (provide (contract-out (read-cubics (input-port? . -> . list?)) )) (define (read-cubics s) (define (r c l) (if (> c 0) (r (- c 1) (cons (read-int16 #f s) l)) l ) ) (r (read-int16 #f s) (list)) ) )
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/cubics.scm
scheme
(module system racket/base (require racket/contract "../packet.scm" ) (provide (contract-out (read-cubics (input-port? . -> . list?)) )) (define (read-cubics s) (define (r c l) (if (> c 0) (r (- c 1) (cons (read-int16 #f s) l)) l ) ) (r (read-int16 #f s) (list)) ) )
4b446985901e8257301faef3eeee42f8409972e3609409be0ef9afd1deebf463
ocaml-flambda/ocaml-jst
lambda.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/lambda/lambda.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Asttypes type mutable_flag = Immutable | Immutable_unique | Mutable type compile_time_co...
ddc9f2bf4813f2f37dee2987d04fe12538d7f0ef3c81745cab53b03f9974289b
dizengrong/erlang_game
online_srv.erl
@author dzR < > %% @doc 全局的账号服务进程,管理账号的注册和查询 -module (online_srv). -include("log.hrl"). -include("spec_type.hrl"). -export([start_link/0, role_online/1, role_offline/1]). -export([is_online/1]). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -d...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/center_srv/online_srv.erl
erlang
@doc 全局的账号服务进程,管理账号的注册和查询 @doc 玩家上线登记 @doc 玩家下线登记 @doc 查询玩家是否在线
@author dzR < > -module (online_srv). -include("log.hrl"). -include("spec_type.hrl"). -export([start_link/0, role_online/1, role_offline/1]). -export([is_online/1]). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, {global, ?MODUL...
09d8c5f3bca62faa63887ee42ddf52cb6065a3a55fa261c71b105a5cc2693485
WhatsApp/eqwalizer
eqwalizer_specs.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(eqwalizer_specs). -typing([eqwalizer]). -compile([export_all, nowarn_export_all]). %% --------...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/mini-elp/test_projects/eqwalizer/src/eqwalizer_specs.erl
erlang
the LICENSE file in the root directory of this source tree. -------- erlang -------- -------- ets -------- -------- file -------- -------- gb_sets -------- -------- lists -------- -------- maps -------- -------- proplists -------- -------- timer -------- -------- snapshot tests --------
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(eqwalizer_specs). -typing([eqwalizer]). -compile([export_all, nowarn_export_all]). -spec 'erlang:abs'(number()) -> number(). 'erlang:abs'(_) -> error(eqwalizer_s...
19507ee50e40955cd14db195048eac1610524667c79cc833c8ae4e692cb2e0d7
DataHaskell/dh-core
ChronosBench.hs
module Main where import qualified Statistics.Matrix as M import qualified Statistics.Matrix.Fast as F import qualified Statistics.Matrix.Fast.Algorithms as FA import Statistics.Matrix (Matrix (..)) import qualified Statistics.Matrix.Algorithms as A import qualified Data.Vector.Unboxed as U import ...
null
https://raw.githubusercontent.com/DataHaskell/dh-core/2beb8740f27fa9683db70eb8d8424ee6c75d3e91/dense-linear-algebra/bench/ChronosBench.hs
haskell
we split heavy and light, we lose some precision in the bar plots from chronos
module Main where import qualified Statistics.Matrix as M import qualified Statistics.Matrix.Fast as F import qualified Statistics.Matrix.Fast.Algorithms as FA import Statistics.Matrix (Matrix (..)) import qualified Statistics.Matrix.Algorithms as A import qualified Data.Vector.Unboxed as U import ...
8d50c7a62f4dc44f15e237f1aea8edef4185d0d876a34f5e03c1e2f77d58d319
graninas/The-Amoeba-World
ParsingTest.hs
# LANGUAGE TemplateHaskell # module Main where import Test.QuickCheck import Test.QuickCheck.Property import Test.QuickCheck.Monadic (assert, monadicIO, run) import Test.QuickCheck.All import Control.Monad (liftM) import GameLogic.Language.Parsing.ItemParser import GameLogic.Language.Parsing.WorldParser import GameLo...
null
https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/Test/ParsingTest.hs
haskell
writeAdt "./Data/Raws/World3.arf" "./Data/Raws/World3.tok"
# LANGUAGE TemplateHaskell # module Main where import Test.QuickCheck import Test.QuickCheck.Property import Test.QuickCheck.Monadic (assert, monadicIO, run) import Test.QuickCheck.All import Control.Monad (liftM) import GameLogic.Language.Parsing.ItemParser import GameLogic.Language.Parsing.WorldParser import GameLo...
089eb0894e88d8322b829aa002418610549d423186fc5da0c97cfe9052324583
shayan-najd/NativeMetaprogramming
T10109.hs
# LANGUAGE PolyKinds , MultiParamTypeClasses , FunctionalDependencies , UndecidableInstances , FlexibleInstances # UndecidableInstances, FlexibleInstances #-} # OPTIONS_GHC -fno - warn - redundant - constraints # module T10109 where data Succ a class Add (a :: k1) (b :: k2) (ab :: k3) | a...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_compile/T10109.hs
haskell
# LANGUAGE PolyKinds , MultiParamTypeClasses , FunctionalDependencies , UndecidableInstances , FlexibleInstances # UndecidableInstances, FlexibleInstances #-} # OPTIONS_GHC -fno - warn - redundant - constraints # module T10109 where data Succ a class Add (a :: k1) (b :: k2) (ab :: k3) | a...
83226a15d6a7a2f4283a9848eb07b03a8cb37dacd8519a4333f75b2fa22dd41c
rd--/hsc3
n_set.help.hs
---- ; help Sound.Sc3.sc3_scdoc_help_server_command_open False "/n_set"
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Server/n_set.help.hs
haskell
-- ; help
Sound.Sc3.sc3_scdoc_help_server_command_open False "/n_set"
2f65f2856a990b9b19bf1b6d578f0c1e17f03fb1e463a8f6332fb122f887e061
TrustInSoft/tis-interpreter
from_parameters.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/from/from_parameters.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
40dcbc4d903b3135aa87e128f7f71352a4a0b27c9c8cfc979d2576620c807186
lispbuilder/lispbuilder
font.lisp
(in-package :lispbuilder-sdl-gfx) (defmethod initialise-font ((self sdl::gfx-font-definition)) (make-instance 'sdl:gfx-bitmap-font :font-definition self)) (defun initialise-default-font (&optional (font-definition sdl:*gfx-font-8x8*)) (sdl:set-default-font (initialise-font font-definition))) ;; (with-open-file ...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl-gfx/sdl-gfx/font.lisp
lisp
(with-open-file (in "../fonts/10x20.fnt" :element-type '(unsigned-byte 8)) for byte = (read-byte in nil) while byte collect byte)))
(in-package :lispbuilder-sdl-gfx) (defmethod initialise-font ((self sdl::gfx-font-definition)) (make-instance 'sdl:gfx-bitmap-font :font-definition self)) (defun initialise-default-font (&optional (font-definition sdl:*gfx-font-8x8*)) (sdl:set-default-font (initialise-font font-definition))) ( format t " ~A...
62a661baf717b5876388015ba7ed2b706f014313c76a82491d4424bf882e886d
Lovesan/virgil
structures.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- Copyright ( C ) 2010 - 2012 , < > ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;; restriction, including without lim...
null
https://raw.githubusercontent.com/Lovesan/virgil/ab650955b939fba0c7f5c3fd945d3580fbf756c1/src/structures.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do...
Copyright ( C ) 2010 - 2012 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-packag...
58e1367fbbeb76adaf99d3758f0e9690cee4b820f8f45c61f10a4655df8bfc8d
brendanhay/amazonka
Lens.hs
# LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - duplicate - exports # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service descriptions , licensed under Apache 2.0 . -- | -- Module : Amazonka.WorkLink.Lens Copyright : ( c ) 2013 - 2023 License : Mozilla Public Licens...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-worklink/gen/Amazonka/WorkLink/Lens.hs
haskell
| Module : Amazonka.WorkLink.Lens Stability : auto-generated * Operations * Types
# LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - duplicate - exports # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service descriptions , licensed under Apache 2.0 . Copyright : ( c ) 2013 - 2023 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.h...
aa622d625edd90cee234c22ccd44e062b5cd1dc55030d10c3a9b1ffffb71f41f
spurious/sagittarius-scheme-mirror
hmac.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; hmac.scm - Keyed-Hashing for Message Authentication code library. ;;; Copyright ( c ) 2010 - 2013 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/hmac.scm
scheme
coding : utf-8 ; -*- hmac.scm - Keyed-Hashing for Message Authentication code library. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyrigh...
Copyright ( c ) 2010 - 2013 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (rfc hmac) (export HMAC <hmac> ...
60eeac3d34f2448a4302ee486e83a63717eebf81f5f02f857bf1a389c27d4be1
k00mi/mqtt-hs
Types.hs
# Language GeneralizedNewtypeDeriving , DeriveDataTypeable , OverloadedStrings , DataKinds , KindSignatures , GADTs , TypeFamilies , ScopedTypeVariables , RankNTypes , TemplateHaskell ,...
null
https://raw.githubusercontent.com/k00mi/mqtt-hs/8bade1e192fb4b15db751de70185eac83c2a878d/Network/MQTT/Types.hs
haskell
-fno-warn-unused-binds is used because the Singletons TH magic generates a # OPTIONS_GHC -O0 -fno-warn-unused-binds # * Messages * Message body * Miscellaneous * Message types ** Singletons | Singletons are used to build a bridge between the type and value level. See the @singletons@ package for more informa...
# Language GeneralizedNewtypeDeriving , DeriveDataTypeable , OverloadedStrings , DataKinds , KindSignatures , GADTs , TypeFamilies , ScopedTypeVariables , RankNTypes , TemplateHaskell ,...
dbde454d331af868893cc6bfd9a6d3311434849451e96b55fd02d25cb830ad98
adoptingerlang/service_discovery
service_discovery_postgres_sup.erl
%%%------------------------------------------------------------------- %% @doc service_discovery top level supervisor. %% @end %%%------------------------------------------------------------------- -module(service_discovery_postgres_sup). -behaviour(supervisor). %% API -export([start_link/1]). %% Supervisor callbac...
null
https://raw.githubusercontent.com/adoptingerlang/service_discovery/03bed070048e70ce267fa4a585fa157bbc883425/apps/service_discovery_postgres/src/service_discovery_postgres_sup.erl
erlang
------------------------------------------------------------------- @doc service_discovery top level supervisor. @end ------------------------------------------------------------------- API Supervisor callbacks ==================================================================== API functions =====================...
-module(service_discovery_postgres_sup). -behaviour(supervisor). -export([start_link/1]). -export([init/1]). -define(SERVER, ?MODULE). start_link(DBConfig) -> supervisor:start_link({local, ?SERVER}, ?MODULE, [DBConfig]). Before OTP 18 tuples must be used to specify a child . e.g. Child : : { Id , Start...
53036d530b68068c23880b13d58e22789ecec72ca08e0e3afe1f22bcbef597a6
ludat/conferer
Yaml.hs
-- | Copyright : ( c ) 2019 -- License: MPL-2.0 Maintainer : < > -- Stability: stable -- Portability: portable -- Source for json config files using module Conferer.Source.Yaml where import Data.Yaml import System.Directory import qualified Conferer.Source.Aeson as JSON import Conferer.Source.Files impo...
null
https://raw.githubusercontent.com/ludat/conferer/13af5727c3b34779e87a1bdb4b0f247581ce4bc4/packages/yaml/src/Conferer/Source/Yaml.hs
haskell
| License: MPL-2.0 Stability: stable Portability: portable | Create a 'SourceCreator' from a yaml file that we get from the env with the same logic as 'JSON.JSONSource' | Create a 'Source' by reading the provided path as json
Copyright : ( c ) 2019 Maintainer : < > Source for json config files using module Conferer.Source.Yaml where import Data.Yaml import System.Directory import qualified Conferer.Source.Aeson as JSON import Conferer.Source.Files import Conferer.Source import Conferer.Source.Null fromConfig :: Key -> Sourc...
c6eb70afd06b204cdfa27883fe6bf599314ac64f6698915a2274a441c8fe3cef
Gabriella439/turtle
Line.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} module Turtle.Line ( Line , lineToText , textToLines , linesToText , textToLine , unsafeTextToLine , NewlineForbidden(..) ) where imp...
null
https://raw.githubusercontent.com/Gabriella439/turtle/dda6389068bf4a32ec62658d6effc7fd1645e422/src/Turtle/Line.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # | The `NewlineForbidden` exception is thrown when you construct a `Line` using an overloaded string literal or by calling `fromString` explicitly and the supplied string contains newlines. This is a programming error to do so: if you ar...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # module Turtle.Line ( Line , lineToText , textToLines , linesToText , textToLine , unsafeTextToLine , NewlineForbidden(..) ) where import Data.Text (Text) import qualified Data.Text as Text #if __GLASGOW_HASKELL__ >= 708 i...
b50e5d794dba597e13bbc3e2d10c0bb02044efc6f42bc56782305e847e0aac25
clash-lang/clash-prelude
BitVector.hs
| Copyright : ( C ) 2013 - 2016 , University of Twente License : BSD2 ( see the file LICENSE ) Maintainer : < > Copyright : (C) 2013-2016, University of Twente License : BSD2 (see the file LICENSE) Maintainer : Christiaan Baaij <> -} # LANGUAGE MagicHash # # LANGUAGE Trustworthy # {-# O...
null
https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Sized/BitVector.hs
haskell
# OPTIONS_HADDOCK show-extensions # * Bit ** Construction *** Initialisation * BitVector ** Accessors *** Length information ** Construction ** Concatenation
| Copyright : ( C ) 2013 - 2016 , University of Twente License : BSD2 ( see the file LICENSE ) Maintainer : < > Copyright : (C) 2013-2016, University of Twente License : BSD2 (see the file LICENSE) Maintainer : Christiaan Baaij <> -} # LANGUAGE MagicHash # # LANGUAGE Trustworthy # modu...
14ccad7785d8d88b801a77700f5b78a137b2e1a82a44fa26f4ea9ad37a8d2910
tolysz/prepare-ghcjs
Thread.hs
# LANGUAGE Trustworthy # # LANGUAGE BangPatterns , NoImplicitPrelude # # LANGUAGE CPP # module GHC.Event.Thread #ifdef ghcjs_HOST_OS ( ) where #else ( getSystemEventManager , getSystemTimerManager , ensureIOManagerIsRunning , ioManagerCapabilitiesChanged , threadWaitRead , threadWaitWrite ...
null
https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base/GHC/Event/Thread.hs
haskell
used by RTS | Suspends the current thread for a given number of microseconds There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run /earlier/ than specified. microseconds. The caveats associated with threadDelay also apply. | Blo...
# LANGUAGE Trustworthy # # LANGUAGE BangPatterns , NoImplicitPrelude # # LANGUAGE CPP # module GHC.Event.Thread #ifdef ghcjs_HOST_OS ( ) where #else ( getSystemEventManager , getSystemTimerManager , ensureIOManagerIsRunning , ioManagerCapabilitiesChanged , threadWaitRead , threadWaitWrite ...
2983cb3eac7b232dad2fbebffcc8f5883e94f7795c8f9b8527edb1b46f471d72
uncomplicate/bayadera
distribution_library.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/uncomplicate/bayadera/4105fd0e02bbe1cb19b9413f454075d61def6945/src/clojure/uncomplicate/bayadera/internal/distribution_library.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) . All rights reserved . (ns ^{:author "Dragan Djuric"} uncomplicate.bayadera.internal.distribution-library (:require [uncomplicate.commons [core :refer [Releaseable release with-release let-release]] [utils :refer [dragan-says-ex generate-seed]]] [uncom...
8fcdcad2aca9909fb69c20db490ba736c6b3da30911d5c722080292bdb750702
CSVdB/pinky
Load.hs
module MNIST.Load ( load ) where import Import import MNIST.DataSet import MNIST.Parser import Utils.Files import Utils.Parser import Utils.Zip import qualified Data.List.NonEmpty as NEL dataDir :: MonadIO m => m (Path Abs Dir) dataDir = resolveDir' "data/" notEnoughData :: MonadIO m => String -> m a notEn...
null
https://raw.githubusercontent.com/CSVdB/pinky/e77a4c0812ceb4b8548c41a7652fb247c2ab39e0/pinky-integration-test/src/MNIST/Load.hs
haskell
module MNIST.Load ( load ) where import Import import MNIST.DataSet import MNIST.Parser import Utils.Files import Utils.Parser import Utils.Zip import qualified Data.List.NonEmpty as NEL dataDir :: MonadIO m => m (Path Abs Dir) dataDir = resolveDir' "data/" notEnoughData :: MonadIO m => String -> m a notEn...
b40b9f26ceb7ba486d948776b785b89b03b37b7c090e662f5a2520f7c8b5abb1
ocsigen/eliom
eliom_registration.client.ml
Ocsigen * * Copyright ( C ) 2016 * * 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 , with linking exception ; * either version 2.1 of the License , or ( at your ...
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_registration.client.ml
ocaml
not really polymorphic; just adding a type variable to maintain type-level compatibility with server (for injections)
Ocsigen * * Copyright ( C ) 2016 * * 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 , with linking exception ; * either version 2.1 of the License , or ( at your ...
c2977ac9e92e4262a6ddacbf7285d5915de9c67a84c14777034e89601a72a06f
janestreet/async
deferred_or_error_expect_test_config.ml
open! Core open! Async_kernel open! Async_unix module IO = Async_kernel.Deferred.Or_error let run f = Thread_safe.block_on_async_exn f |> Or_error.ok_exn let sanitize s = s let upon_unreleasable_issue = Expect_test_config.upon_unreleasable_issue
null
https://raw.githubusercontent.com/janestreet/async/118c0b4a39abd904e4a09bd3289c903058923e0a/src/deferred_or_error_expect_test_config.ml
ocaml
open! Core open! Async_kernel open! Async_unix module IO = Async_kernel.Deferred.Or_error let run f = Thread_safe.block_on_async_exn f |> Or_error.ok_exn let sanitize s = s let upon_unreleasable_issue = Expect_test_config.upon_unreleasable_issue
57683282dca0ab0dfd6984a96b5488e47abac33e659c86104120924e8eeee2a7
angavrilov/ecl-compute
expand-aref.lisp
;;; -*- mode:lisp; indent-tabs-mode: nil; -*- (in-package fast-compute) (defun join* (lv rv) (cond ((null lv) rv) ((null rv) lv) (t `(* ,lv ,rv)))) (defun aref-stride-list (name idx-cnt &optional (total-cnt idx-cnt)) (loop with stride = nil for i from (1- idx-cnt) downto 1 collect (set...
null
https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/gen/expand-aref.lisp
lisp
-*- mode:lisp; indent-tabs-mode: nil; -*-
(in-package fast-compute) (defun join* (lv rv) (cond ((null lv) rv) ((null rv) lv) (t `(* ,lv ,rv)))) (defun aref-stride-list (name idx-cnt &optional (total-cnt idx-cnt)) (loop with stride = nil for i from (1- idx-cnt) downto 1 collect (setf stride (join* stride `(ar...
59f276d936f806e7e48b6137ae42075d405f357bf5cefb9c4cc2375c9bf44f27
facebook/duckling
Tests.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. module Duckling.Email.EN.Tests ( tests ) where import Data.String import Test.Tasty import Duckling.Di...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Email/EN/Tests.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.
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Email.EN.Tests ( tests ) where import Data.String import Test.Tasty import Duckling.Dimensions.Types import Duckling.Email.EN.Corpus import Duckling.Testing.Asserts tests :: TestTree tests = testGroup "EN Tests" [ makeCorpusTest [Seal Email] ...
793d64ca5f6a0e00cc54b917aa48813e76ca27251af1cc99be89787d774c2213
CrossRef/cayenne
funder.clj
(ns cayenne.tasks.funder (:require [somnium.congomongo :as m] [clojure.core.memoize :as memoize] [clojure.data.csv :as csv] [clojure.java.io :as io] [clojure.string :as string] [cayenne.item-tree :as itree] [cayenne.rdf :as rdf] [caye...
null
https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/src/cayenne/tasks/funder.clj
clojure
hack here since funders can appear as their own parent in the registry. bug in the registry. todo what about affiliated?
(ns cayenne.tasks.funder (:require [somnium.congomongo :as m] [clojure.core.memoize :as memoize] [clojure.data.csv :as csv] [clojure.java.io :as io] [clojure.string :as string] [cayenne.item-tree :as itree] [cayenne.rdf :as rdf] [caye...
44f47f413ba8e75ecd7a24e772932c22ddbf1b46ac028bf7b4f5b50f6c0fe82f
tisnik/clojure-examples
details.clj
{:aliases {"downgrade" "upgrade"}, :checkout-deps-shares [:source-paths :test-paths :resource-paths :compile-path "#'leiningen.core.classpath/checkout-deps-paths"], :clean-targets [:target-path], :compile-path "/home/ptisnovs/src/clojure/clojure-examples/async8/target/default/classes", :dependencies ([or...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/async8/doc/details.clj
clojure
{:aliases {"downgrade" "upgrade"}, :checkout-deps-shares [:source-paths :test-paths :resource-paths :compile-path "#'leiningen.core.classpath/checkout-deps-paths"], :clean-targets [:target-path], :compile-path "/home/ptisnovs/src/clojure/clojure-examples/async8/target/default/classes", :dependencies ([or...
a18762362a03321968462d680064f3552651e7059e3d3be670321cda386a23b7
willghatch/racket-rash
info.rkt
#lang info (define scribblings '(("linea.scrbl" () (library))))
null
https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/linea/scribblings/info.rkt
racket
#lang info (define scribblings '(("linea.scrbl" () (library))))
087e0766186f473508e8a4b1d5e99e5d4d7c15a26bf00e40c411042f9d541c40
GlideAngle/flare-timing
HLint.hs
module Main (main) where import Language.Haskell.HLint (hlint) import System.Exit (exitFailure, exitSuccess) arguments :: [String] arguments = [ "library" , "test-suite-hlint" , "-XQuasiQuotes" ] main :: IO () main = do hints <- hlint arguments if null hints then exitSuccess else exitFailure
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/time/test-suite-hlint/HLint.hs
haskell
module Main (main) where import Language.Haskell.HLint (hlint) import System.Exit (exitFailure, exitSuccess) arguments :: [String] arguments = [ "library" , "test-suite-hlint" , "-XQuasiQuotes" ] main :: IO () main = do hints <- hlint arguments if null hints then exitSuccess else exitFailure
48de421489ec3a570e4b8bf770fc634e65a125f80399399e7f47af0d78a477be
CloudI/CloudI
ranch_listener_sup.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/CloudI/CloudI/75b93bb0e7dc4734f5cd1ef913788e44b577a3d5/src/external/cloudi_x_ranch/src/ranch_listener_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 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_listener_sup). -behaviour(supervisor). ...
704d100741a3ef537cf24abfdd6af8ec5be6048d7863cf2936edf20f0a02daea
michiari/ppl
2020-11-12.hs
module ES20201112 where -- fmap can be seen as "apply f to all elements of a container/context" fmap ( +1 ) $ Just 42 -- fmap (+1) Nothing fmap ( +1 ) [ 1 .. 10 ] -- but also as a way to lift a unary function, so that it works between functors -- :t fmap -- :t fmap (+1) inc :: (Functor f, Num a) => f a -> f a inc...
null
https://raw.githubusercontent.com/michiari/ppl/af5c60c10fc5cac59ab5d3bf2a00e871737b37c1/2020/2020-11-12.hs
haskell
fmap can be seen as "apply f to all elements of a container/context" fmap (+1) Nothing but also as a way to lift a unary function, so that it works between functors :t fmap :t fmap (+1) inc $ Just 1 inc [1..9] class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b pur...
module ES20201112 where fmap ( +1 ) $ Just 42 fmap ( +1 ) [ 1 .. 10 ] inc :: (Functor f, Num a) => f a -> f a inc = fmap (+1) pure 42 : : Maybe Integer pure 42 : : [ Integer ] pure ( * 2 ) < * > Just 42 pure ( * 2 ) < * > [ 1 .. 10 ] pure ( * ) < * > Just 6 < * > Just 7 pure ( \x y z - > x*y*z ) < ...
0ee0c3aa0175e74cd4e5936be83c03c02de94205ba71f888c15e46cf83723114
CodyReichert/qi
compat.lisp
;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * A Trivial Compatibility Layer Here we only have the QUIT function , see mopp.lisp for a MOP ;;;; compatibility layer. (defun quit (&optional (exit-code 0)) #+openmcl (ccl:quit exit-code) #+sbcl (sb-ext:quit :unix-status exit-code) #+clisp (ext:quit exit-co...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/arnesi-master/src/compat.lisp
lisp
-*- lisp -*- * A Trivial Compatibility Layer compatibility layer. 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,...
(in-package :it.bese.arnesi) Here we only have the QUIT function , see mopp.lisp for a MOP (defun quit (&optional (exit-code 0)) #+openmcl (ccl:quit exit-code) #+sbcl (sb-ext:quit :unix-status exit-code) #+clisp (ext:quit exit-code) #+(or cmu allegro) (declare (ignore exit-code)) #+cmu (ext:quit) #+li...
66939c55217f0eb6f27184aa44ac90ebaf27d5399515d5edddabb5ed87f82403
protz/mezzo
PersistentRef.ml
(*****************************************************************************) (* Mezzo, a programming language based on permissions *) Copyright ( C ) 2011 , 2012 and (* *) (* This program is free softwar...
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/lib/PersistentRef.ml
ocaml
*************************************************************************** Mezzo, a programming language based on permissions This program is free software: you can redistribute it and/or modify (at your optio...
Copyright ( C ) 2011 , 2012 and it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Maps over integers are implemented...
5ed736b21478666ddacdd738c47fc47fd7203b8573bebf02324d41b76ccdf632
cil-project/cil
llvm.ml
Copyright ( c ) 2008 Intel Corporation * 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 , th...
null
https://raw.githubusercontent.com/cil-project/cil/936b04103eb573f320c6badf280e8bb17f6e7b26/src/ext/llvm/llvm.ml
ocaml
Generate LLVM code (as a doc string) for file 'f'. Currently x86+gcc specific, and missing bitfield support (plus a few minor gcc-specific features, see above) LLVM linkage for global 'vi' LLVM linkage for function 'vi' ignore(Pretty.eprintf "%a\n" (printExp plainCilPrinter) e); the docs imply that we should ...
Copyright ( c ) 2008 Intel Corporation * 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 , th...
e5554a1443530e3540f830de72e95fe6238d856319c23e719636ae888264d9d9
spurious/sagittarius-scheme-mirror
hashtables.sps
#!r6rs (import (tests r6rs hashtables) (tests r6rs test) (rnrs io simple)) (display "Running tests for (rnrs hashtables)\n") (run-hashtables-tests) (report-test-results)
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/r6rs-test-suite/tests/r6rs/run/hashtables.sps
scheme
#!r6rs (import (tests r6rs hashtables) (tests r6rs test) (rnrs io simple)) (display "Running tests for (rnrs hashtables)\n") (run-hashtables-tests) (report-test-results)
07e488da3a754fbc8dde887f9b511bf2d51e5e92450094f7661e30be2f3dda49
scalar-labs/scalar-jepsen
set_test.clj
(ns cassandra.set-test (:require [clojure.test :refer :all] [jepsen.client :as client] [qbits.alia :as alia] [cassandra.core :as cassandra] [cassandra.collections.set :refer [->CQLSetClient] :as set] [spy.core :as spy]) (:import (com.datastax.driver.core.e...
null
https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/66b08cccad256241e09ac4140a58e2d1574df517/cassandra/test/cassandra/set_test.clj
clojure
for table creation tables have been already created
(ns cassandra.set-test (:require [clojure.test :refer :all] [jepsen.client :as client] [qbits.alia :as alia] [cassandra.core :as cassandra] [cassandra.collections.set :refer [->CQLSetClient] :as set] [spy.core :as spy]) (:import (com.datastax.driver.core.e...
977466965b4df386476c8ab157b17742a723ba95eeb85d78b45f6cd7467cd124
tweag/ormolu
prelude2-out.hs
# RULES " fold / build " forall k z ( g : : forall b. ( a - > b - > b ) - > b - > b ) . foldr k z ( build g ) = g k z " foldr / augment " forall k z xs ( g : : forall b. ( a - > b - > b ) - > b - > b ) . foldr k z ( augment g xs ) = g k ( foldr k z xs ) " foldr / id " foldr ( :) [ ] = \x - > x...
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/rewrite-rule/prelude2-out.hs
haskell
Only activate this from phase 1 , because that 's when we disable the rule that expands ( + + ) into foldr The foldr / cons rule looks nice , but it can give disastrously bloated code when commpiling array ( a , b ) [ ( 1,2 ) , ( 2,2 ) , ( 3,2 ) , ... very long list ... ] i.e. when there are very very ...
# RULES " fold / build " forall k z ( g : : forall b. ( a - > b - > b ) - > b - > b ) . foldr k z ( build g ) = g k z " foldr / augment " forall k z xs ( g : : forall b. ( a - > b - > b ) - > b - > b ) . foldr k z ( augment g xs ) = g k ( foldr k z xs ) " foldr / id " foldr ( :) [ ] = \x - > x...
cd0f3467fb6a9f8ced5199a7fcbcc52a48affca639a27535597a3d0453e3ac2a
quoll/asami
bufferblock.clj
(ns ^{:doc "Abstraction for blocks of raw data, keyed by ID. IDs represent the offset of the block." :author "Paula Gearon"} asami.durable.block.bufferblock (:require [asami.durable.block.block-api :refer [Block put-block!]]) (:import [java.nio ByteBuffer IntBuffer LongBuffer])) ;; (set! *warn-on-reflectio...
null
https://raw.githubusercontent.com/quoll/asami/15b1aa3112751c008ecc07cdce94874cd78f82d3/src/asami/durable/block/bufferblock.clj
clojure
(set! *warn-on-reflection* true) An implementation of Block that can have multiple readers, but only a single writing thread a single writer allows for position/put and are not available on the general Block API
(ns ^{:doc "Abstraction for blocks of raw data, keyed by ID. IDs represent the offset of the block." :author "Paula Gearon"} asami.durable.block.bufferblock (:require [asami.durable.block.block-api :refer [Block put-block!]]) (:import [java.nio ByteBuffer IntBuffer LongBuffer])) (defrecord BufferBlock ...
1632be8c1c1616f3751d10e9fd501d900663f55b07afc428d9b61a779c66d0ca
tek/ribosome
FileBuffer.hs
-- |Data type representing a buffer associated with a file system path. module Ribosome.Data.FileBuffer where import Path (Abs, File, Path) import Ribosome.Host.Api.Data (Buffer) -- |Data type representing a buffer associated with a file system path. data FileBuffer = FileBuffer { buffer :: Buffer, path ::...
null
https://raw.githubusercontent.com/tek/ribosome/ec3dd63ad47322e7fec66043dd7e6ade2f547ac1/packages/ribosome/lib/Ribosome/Data/FileBuffer.hs
haskell
|Data type representing a buffer associated with a file system path. |Data type representing a buffer associated with a file system path.
module Ribosome.Data.FileBuffer where import Path (Abs, File, Path) import Ribosome.Host.Api.Data (Buffer) data FileBuffer = FileBuffer { buffer :: Buffer, path :: Path Abs File } deriving stock (Eq, Show, Generic)
21de5e762d9b7b70ed8c754e41cfc92301fa422846c16e6b81d1306e741a2854
noprompt/meander
epsilon.cljc
(ns meander.strategy.epsilon "Rewrite strategy combinators. A strategy is a unary function of a term (any object) and returns the term rewritten. Notation: t ∈ Term p, q, r, s ∈ Strategy" (:refer-clojure :exclude [find while repeat some spread]) #?(:cljs (:require-macros [meander.strategy.epsilon])) ...
null
https://raw.githubusercontent.com/noprompt/meander/8c0e9457befea5eee71a94a6d8726ed5916875dc/src/meander/strategy/epsilon.cljc
clojure
=> => => --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- => #meander.epsilon/fail[]" => #meander.epsilon/fail[]" ------------------------------------...
(ns meander.strategy.epsilon "Rewrite strategy combinators. A strategy is a unary function of a term (any object) and returns the term rewritten. Notation: t ∈ Term p, q, r, s ∈ Strategy" (:refer-clojure :exclude [find while repeat some spread]) #?(:cljs (:require-macros [meander.strategy.epsilon])) ...
aee85dd77d660917339dd1f9a2be730ed3c3b1854d9aebfd55d8d9729139c1b8
fission-codes/fission
Class.hs
module Web.UCAN.Resolver.Class (Resolver (..)) where import Network.IPFS.CID.Types import RIO import Web.UCAN.Resolver.Error as Resolver class Monad m => Resolver m where resolve :: CID -> m (Either Resolver.Error ByteString)
null
https://raw.githubusercontent.com/fission-codes/fission/3435bd70c35db0350a1b13050b19c19651c165e4/hs-ucan/library/Web/UCAN/Resolver/Class.hs
haskell
module Web.UCAN.Resolver.Class (Resolver (..)) where import Network.IPFS.CID.Types import RIO import Web.UCAN.Resolver.Error as Resolver class Monad m => Resolver m where resolve :: CID -> m (Either Resolver.Error ByteString)