_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
2e44133d7e44091290c0d38439aa796c3739f0f10e95af925d686ce98496c3f0
ninenines/cowboy
ws_timeout_cancel.erl
%% Feel free to use, reuse and abuse the code in this file. -module(ws_timeout_cancel). -export([init/2]). -export([websocket_handle/2]). -export([websocket_info/2]). init(Req, _) -> erlang:start_timer(500, self(), should_not_cancel_timer), {cowboy_websocket, Req, undefined, #{ idle_timeout => 1000 }}. websock...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/ws_SUITE_data/ws_timeout_cancel.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(ws_timeout_cancel). -export([init/2]). -export([websocket_handle/2]). -export([websocket_info/2]). init(Req, _) -> erlang:start_timer(500, self(), should_not_cancel_timer), {cowboy_websocket, Req, undefined, #{ idle_timeout => 1000 }}. websocket_handle({text, Data}, State) -> {[{text, Data}], State}; ...
761c422877695e0eec349d9799622e13df48353c55c75f9d851f5e2914d24a6f
onedata/op-worker
monitoring_utils.erl
%%%-------------------------------------------------------------------- @author ( C ) 2016 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%-------------------------------------------------------------------- %%% @doc This module contains utils functions...
null
https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/src/modules/monitoring/monitoring_utils.erl
erlang
-------------------------------------------------------------------- @end -------------------------------------------------------------------- @doc This module contains utils functions used to start and update monitoring. @end -------------------------------------------------------------------- API ---------------...
@author ( C ) 2016 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(monitoring_utils). -author("Michal Wrona"). -include("global_definitions.hrl"). -include("modules/fslogic/fslogic_common.hrl"). -include_lib("ctool/include/logging.hrl"). -include_lib("modu...
5db61484a55e059133199e83467bd53f629703ee01473f06c75635f03ed93ca8
dom96/SimpleIRC
disconnecttest.hs
{-# LANGUAGE OverloadedStrings #-} import Network.SimpleIRC import Data.Maybe import Control.Concurrent.Chan import Control.Concurrent (threadDelay) import qualified Data.ByteString.Char8 as B onDisconnect :: MIrc -> IO () onDisconnect mIrc = do addr <- getAddress mIrc putStrLn $ "Disconnected from " ++ (B.unpack ...
null
https://raw.githubusercontent.com/dom96/SimpleIRC/ee5ab54fcff9ae974458a9394a2484709724e9dc/tests/disconnecttest.hs
haskell
# LANGUAGE OverloadedStrings #
import Network.SimpleIRC import Data.Maybe import Control.Concurrent.Chan import Control.Concurrent (threadDelay) import qualified Data.ByteString.Char8 as B onDisconnect :: MIrc -> IO () onDisconnect mIrc = do addr <- getAddress mIrc putStrLn $ "Disconnected from " ++ (B.unpack addr) m <- reconnect mIrc eithe...
1a76fdafa0313e807e2ca6f748e814eaaf0cdd252f76764bcbbd370b0079986c
aggieben/weblocks
suggest.lisp
(in-package :weblocks-test) ;;; test render-suggest (deftest-html render-suggest-1 (with-request :get nil (render-suggest 'some-name '("a" "b" "c") :input-id 'i1 :choices-id 'c1)) (htm (:select :id "I1" :name "some-name" (:option "a") (:option "b") (:option "c")) (:script :type "text/...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/snippets/suggest.lisp
lisp
test render-suggest test format-suggest-list
(in-package :weblocks-test) (deftest-html render-suggest-1 (with-request :get nil (render-suggest 'some-name '("a" "b" "c") :input-id 'i1 :choices-id 'c1)) (htm (:select :id "I1" :name "some-name" (:option "a") (:option "b") (:option "c")) (:script :type "text/javascript" (fmt ...
495759fbe93c41eefd2695262d43ead424bc968c78089bf60215a117011c64d5
S8A/htdp-exercises
ex146.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex146) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex146.rkt
racket
about the language level of this file in a form that our tools can easily process. interpretation non-empty lists of Celsius temperatures computes the average of a non-empty list of temperatures List-of-temperatures -> Number adds up the temperatures on the given list List-of-temperatures -> Number counts the...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex146) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
e72fc0630abc3546752d4fb2fa0e4cde98db969293c36eaefa0dd337ee6ddea5
pyr/cyanite
index.clj
(ns io.cyanite.index (:require [com.stuartsierra.component :as component] [clojure.string :refer [join split]] [clojure.set :refer [union intersection]] [globber.glob :refer [glob]])) (defprotocol MetricIndex (register! [this path]) ...
null
https://raw.githubusercontent.com/pyr/cyanite/2b9a1f26df808abdad3465dd1946036749b93000/src/io/cyanite/index.clj
clojure
Path explansion / artificial aggreate paths Implementation ============== We build an inverted index of segment to path To service query we resolve and expand multiple options (delimited in curly brackets) or multiple characters (in a [] character class) then we dispatch resolve our inverted index and filter ...
(ns io.cyanite.index (:require [com.stuartsierra.component :as component] [clojure.string :refer [join split]] [clojure.set :refer [union intersection]] [globber.glob :refer [glob]])) (defprotocol MetricIndex (register! [this path]) ...
757a8dffb192e1ba4776d835051eb79563aeb48fd54ba92ef73b2b56704c4b85
evilmartians/foundry
fy_ratio.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ocaml-num/fy_ratio.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with open Fy_int_misc open Fy_nat open Fy_big_int open...
837d249a0408f9126d8a2db7212348b6fe3b303edce60a64e2df3fd9ef5df35f
ocaml/ood
append.ml
[@@@part "0"] let usage_msg = "append [-verbose] <file1> [<file2>] ... -o <output>" [@@@part "1"] let verbose = ref false let input_files = ref [] let output_file = ref "" [@@@part "2"] let anon_fun filename = input_files := filename :: !input_files [@@@part "3"] let speclist = [ ("-verbose", Arg.Set ver...
null
https://raw.githubusercontent.com/ocaml/ood/19e9548bbe22717cf465167ba08e8a539665dc3f/data/tutorials/en/examples/append.ml
ocaml
Main functionality here
[@@@part "0"] let usage_msg = "append [-verbose] <file1> [<file2>] ... -o <output>" [@@@part "1"] let verbose = ref false let input_files = ref [] let output_file = ref "" [@@@part "2"] let anon_fun filename = input_files := filename :: !input_files [@@@part "3"] let speclist = [ ("-verbose", Arg.Set ver...
9077a93679c411624af67ef002ca61bc2f9588fce4ffbe3adc72c748d58df0fa
ekmett/ekmett.github.com
Cont.hs
{-# OPTIONS_GHC -fglasgow-exts #-} ------------------------------------------------------------------------------------------- -- | -- Module : Control.Monad.Indexed.Cont Copyright : 2008 , -- License : BSD -- Maintainer : < > -- Stability : experimental -- Portability : rank-2 Types required for correct...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras-backup/_darcs/pristine/src/Control/Monad/Indexed/Cont.hs
haskell
# OPTIONS_GHC -fglasgow-exts # ----------------------------------------------------------------------------------------- | Module : Control.Monad.Indexed.Cont License : BSD Stability : experimental Portability : rank-2 Types required for correctness of shift, but they can be removed ------------------------------...
Copyright : 2008 , Maintainer : < > module Control.Monad.Indexed.Cont ( IxMonadCont(reset, shift) , IxContT(IxContT, runIxContT) , runIxContT_ , IxCont(IxCont) , runIxCont , runIxCont_ ) where import Control.Applicative import Control.Functor.Pointed import Control.Monad.Trans import Control.Mo...
15d4e33430c52ed23ae79448bfe0ffa05f51698426f8e971f7c0ffcea8d5b06b
heshrobe/joshua-dist
clique-struct.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : Ideal ; Base : 10 -*- (in-package :ideal) ;;;;******************************************************** Copyright ( c ) 1989 , 1992 Rockwell International -- All rights reserved . Rockwell International Science Center Palo Alto Lab ;;;;********************...
null
https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/ideal/code/clique-struct.lisp
lisp
Syntax : Common - Lisp ; Package : Ideal ; Base : 10 -*- ******************************************************** ******************************************************** ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; -------------------------------------------------------- ******************************* CLIQUE NODES: ****...
(in-package :ideal) Copyright ( c ) 1989 , 1992 Rockwell International -- All rights reserved . Rockwell International Science Center Palo Alto Lab (eval-when (:compile-toplevel :load-toplevel :execute) (export '(CLIQUE-NODE CLIQUE-NODE-NAME CLIQUE-NODE-PRINT-NAME CLIQU...
d3145a0f6edf131ec1b1ac043dbc4dc4ec9972d3042ea1558c7e65d3e70cdbb3
paurkedal/ocaml-cothrift
ppx_thrift_processor.ml
Copyright ( C ) 2016 < > * * This library 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 , either version 3 of the License , or ( at your * option ) any later version , with the ...
null
https://raw.githubusercontent.com/paurkedal/ocaml-cothrift/4410e5123ec6b3769c0d046f1abf4a73e9b56a0f/ppx/ppx_thrift_processor.ml
ocaml
TODO: Use it to complain.
Copyright ( C ) 2016 < > * * This library 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 , either version 3 of the License , or ( at your * option ) any later version , with the ...
05943f378c4b7df7e8958f86217ced3c738ffbf5fe60b2afbfb4e3ce14b023bd
camlunity/ocaml-react
test.ml
---------------------------------------------------------------------------- Copyright ( c ) % % COPYRIGHTYEAR%% , . All rights reserved . Distributed under a BSD license , see license at the end of the file . ---------------------------------------------------------------------------- Copyright (c)...
null
https://raw.githubusercontent.com/camlunity/ocaml-react/e492c3a508ec25c2c07622f155c3a2d5bb364dd1/test/test.ml
ocaml
Tests the event e has occurences occs. Tests the signal s goes through vals. Tests that we went through all vals or occs To initialize asserts of dynamic creations. To keep references for the g.c. (warning also stops the given nodes) To artificially raise the rank of events and signals Event tests always...
---------------------------------------------------------------------------- Copyright ( c ) % % COPYRIGHTYEAR%% , . All rights reserved . Distributed under a BSD license , see license at the end of the file . ---------------------------------------------------------------------------- Copyright (c)...
9355e8f263ffb99e3ff3e4289e446dc941f10f49727362d7ccbd9c195080f02c
rmloveland/scheme48-0.53
c-primop.scm
Copyright ( c ) 1994 by . See file COPYING . Code generation for primops . (define-record-type c-primop :c-primop (make-c-primop simple? generate) c-primop? (simple? c-primop-simple?) (generate c-primop-generate)) (define (simple-c-primop? primop) (c-primop-simple? (primop-code-data primop))) (de...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/primop/c-primop.scm
scheme
Copyright ( c ) 1994 by . See file COPYING . Code generation for primops . (define-record-type c-primop :c-primop (make-c-primop simple? generate) c-primop? (simple? c-primop-simple?) (generate c-primop-generate)) (define (simple-c-primop? primop) (c-primop-simple? (primop-code-data primop))) (de...
69554fc96a6e9066e1defc3a22d70452667c20c46ef6baaf6d1b3c23b91b1636
c-cube/jsonrpc2
jsonrpc2_core.ml
module J = Yojson.Safe type 'a printer = Format.formatter -> 'a -> unit type code = int let code_parse_error : code = (-32700) let code_invalid_request : code = (-32600) let code_method_not_found : code = (-32601) let code_invalid_param : code = (-32602) let code_internal_error : code = (-32603) let opt_map_ f = fu...
null
https://raw.githubusercontent.com/c-cube/jsonrpc2/c230d056c8084435b0d681f1be5cc15a0fba834b/src/jsonrpc2_core.ml
ocaml
* A jsonrpc2 connection. * Create a state machine for Jsonrpc2 * Clear all internal state. * Message sent to the other side * Create a request message, for which an answer is expected. * Create a notification message, ie. no response is expected. * Actions to be done next. This includes sending messages out ...
module J = Yojson.Safe type 'a printer = Format.formatter -> 'a -> unit type code = int let code_parse_error : code = (-32700) let code_invalid_request : code = (-32600) let code_method_not_found : code = (-32601) let code_invalid_param : code = (-32602) let code_internal_error : code = (-32603) let opt_map_ f = fu...
c119a2f939c6a1e4aa2b7eeb01278e688a7cdbdb6fbc76062d7c04273309018f
glutamate/bugpan
CompiledSrcsSinks.hs
module CompiledSrcsSinks where import EvalM import BuiltIn import PrettyPrint import TNUtils import HaskSyntaxUntyped data Src = Src { srcName :: String, srcArgT :: T, srcOutT :: T, srcImpModule :: [String], srcCode :: SrcCode } deriving S...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/CompiledSrcsSinks.hs
haskell
type tmax -> dt -> IO (a) type t -> dt -> IO (a) where sourcetype = signal a
module CompiledSrcsSinks where import EvalM import BuiltIn import PrettyPrint import TNUtils import HaskSyntaxUntyped data Src = Src { srcName :: String, srcArgT :: T, srcOutT :: T, srcImpModule :: [String], srcCode :: SrcCode } deriving S...
702ca6018ca1f5330294c3eb97da0eda5a565ac5ad7ab2cc5cb5d30d461bf433
Lovesan/virgil
references.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/references.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...
3dd9cb952dbc4f60557c5c1ce452c26e793f2e3aa21d6b00ce889ffcb2a19a01
ocsigen/eliom
eliom_monitor.mli
Ocsigen * * Copyright ( C ) 2014 Hugo Heuzard * * 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...
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/server/monitor/eliom_monitor.mli
ocaml
Ocsigen * * Copyright ( C ) 2014 Hugo Heuzard * * 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...
04d699b8562bfc2be454545e4926286ec44790f50c96d8c996358bd0f324c5d7
j-mie6/ParsleyHaskell
Parsers.hs
module Parsley.Applicative.Parsers where
null
https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley/test/Parsley/Applicative/Parsers.hs
haskell
module Parsley.Applicative.Parsers where
617919edda9f8ab26b6734e80b4ae797341f34a4231fec82ba3332428264190c
ocaml-ppx/ppx_tools_versioned
ppx_metaquot_409.ml
open Migrate_parsetree.Ast_409 (* This file is part of the ppx_tools package. It is released *) under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi A -ppx rewriter to be used to write Parsetree - generating code ( including other -ppx re...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ppx_metaquot_409.ml
ocaml
This file is part of the ppx_tools package. It is released Support for antiquotations Support for antiquotations
open Migrate_parsetree.Ast_409 under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi A -ppx rewriter to be used to write Parsetree - generating code ( including other -ppx rewriters ) using concrete syntax . We support the following ext...
487289597a4e71cfdec15df7bea193ad4a1b32bc94fb1301b00e3bc76c9c421a
cmahon/interactive-brokers
IB.hs
-- | -- This module provides an interface for communicating with the Interactive -- Brokers API. module API.IB ( module IB , module Currency ) where import API.IB.Builder as IB import API.IB.Connection as IB import API.IB.Data as IB import API.IB.Enum as IB import API.IB.Monadic as IB import Currency
null
https://raw.githubusercontent.com/cmahon/interactive-brokers/cf6c1128b3f44559b868bc346e76354f8ca4add6/library/API/IB.hs
haskell
| This module provides an interface for communicating with the Interactive Brokers API.
module API.IB ( module IB , module Currency ) where import API.IB.Builder as IB import API.IB.Connection as IB import API.IB.Data as IB import API.IB.Enum as IB import API.IB.Monadic as IB import Currency
708e448982678b5425d4e4026ab3ee7b2b933ac6948a84a1f59f0303dc828917
penpot/penpot
fonts.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.dashboard.fonts (:require [app.common.media :as cm] [app.main.data.fonts :as df] [a...
null
https://raw.githubusercontent.com/penpot/penpot/50ee0ad3fd4627b000841fa2eb4ee13ae9d93a9a/frontend/src/app/main/ui/dashboard/fonts.cljs
clojure
Copyright (c) KALEIDOS INC (let [go-fonts (mf/use-callback #(st/emit! (rt/nav :dashboard-fonts {:team-id (:id team)}))) go-providers (mf/use-callback #(st/emit! (rt/nav :dashboard-font-providers {:team-id (:id team)})))]
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.dashboard.fonts (:require [app.common.media :as cm] [app.main.data.fonts :as df] [app.main.data.modal :as modal] ...
371610db226a374b5b8140151fc2cf43ecba0bb9c7c5faa95ccaa417157ad9e4
metabase/metabase
params.clj
(ns metabase.driver.bigquery-cloud-sdk.params (:require [java-time :as t] [metabase.util.date-2 :as u.date] [metabase.util.log :as log]) (:import (com.google.cloud.bigquery QueryJobConfiguration$Builder QueryParameterValue StandardSQLTypeName))) (set! *warn-on-reflection* true) (defn- param ^QueryPara...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk/params.clj
clojure
See -types for type mappings `nil` still has to be given a type (this determines the type it comes back as in cases like `["SELECT ?" nil]`) -- queries. Unfortunately we don't know the actual type we should set here so `STRING` is going to have to do for now. This shouldn't really matter anyways since `WHERE field ...
(ns metabase.driver.bigquery-cloud-sdk.params (:require [java-time :as t] [metabase.util.date-2 :as u.date] [metabase.util.log :as log]) (:import (com.google.cloud.bigquery QueryJobConfiguration$Builder QueryParameterValue StandardSQLTypeName))) (set! *warn-on-reflection* true) (defn- param ^QueryPara...
25717021b92423baeb9809e1b9f4f26534f0ea70719978e89c53aaabeae698a9
cronburg/antlr-haskell
ATN.hs
# LANGUAGE ScopedTypeVariables , , DeriveGeneric , FlexibleContexts , UndecidableInstances , StandaloneDeriving , OverloadedStrings # , FlexibleContexts, UndecidableInstances, StandaloneDeriving , OverloadedStrings #-} | Module : Text . ANTLR.Allstar . ATN ...
null
https://raw.githubusercontent.com/cronburg/antlr-haskell/7a9367038eaa58f9764f2ff694269245fbebc155/src/Text/ANTLR/Allstar/ATN.hs
haskell
Augmented recursive Transition Network ^ The transition function ^ Terminal edge ^ Predicated edge with no state ^ Mutator edge with no state (Prod _α)) = let production: The epsilon (or mu) transition for the accepting / final state:
# LANGUAGE ScopedTypeVariables , , DeriveGeneric , FlexibleContexts , UndecidableInstances , StandaloneDeriving , OverloadedStrings # , FlexibleContexts, UndecidableInstances, StandaloneDeriving , OverloadedStrings #-} | Module : Text . ANTLR.Allstar . ATN ...
2915a7780b0ed3e10552f20f8fa0bdd757bf6c59366d7f83342a49b533806851
ayazhafiz/plts
example.ml
let n = read_int () (* Original translated source *) let choice flip fail = let rec loop n k1 k2 = if n < 1 then fail () k1 k2 else flip () (fun x k3 -> if x then k1 n k3 else loop (n - 1) k1 k3) k2 in loop let handled_choice n = let flip () k = k true @ k false in let fail () k1 k2 = k2 [] in le...
null
https://raw.githubusercontent.com/ayazhafiz/plts/6dfa9340457ec897ddf40a87feee44dd6200921a/fx_cap/paper-test/example.ml
ocaml
Original translated source
let n = read_int () let choice flip fail = let rec loop n k1 k2 = if n < 1 then fail () k1 k2 else flip () (fun x k3 -> if x then k1 n k3 else loop (n - 1) k1 k3) k2 in loop let handled_choice n = let flip () k = k true @ k false in let fail () k1 k2 = k2 [] in let lifted_flip () k1 k2 = flip () ...
9aefcd9d02f32f3c3f37429e9767082d31fb2869bb30e056bce5408c5799fb1b
vivid-inc/ash-ra-template
output_path_test.clj
; Copyright 2020 Vivid Inc. ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; -2.0 ; ; Unless required by applicable law or agreed to in writing, software distributed under the L...
null
https://raw.githubusercontent.com/vivid-inc/ash-ra-template/f64be7efd6f52ccd451cddb851f02511d1665b11/art-cli/test/vivid/art/cli/output_path_test.clj
clojure
Copyright 2020 Vivid Inc. 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 speci...
distributed under the License is distributed on an " AS IS " BASIS , (ns vivid.art.cli.output-path-test (:require [clojure.string] [clojure.test :refer :all] [farolero.core :as farolero] [vivid.art.cli.exec] [vivid.art.cli.usage]) (:import (java.io File))) (deftest output-dir-cli-args ...
16af30d220380fc602a6281d1c0e98f1905a953b1dcc991d835aff5ff3ba964e
ivan-m/graphviz
Instances.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE OverloadedStrings #-} | Module : Data . GraphViz . Testing . Instances Description : ' Arbitrary ' instances for graphviz . Copyright : ( c ) License : 3 - Clause BSD - style Maintainer : This module exports the ' A...
null
https://raw.githubusercontent.com/ivan-m/graphviz/42dbb6312d7edf789d7055079de7b4fa099a4acc/tests/Data/GraphViz/Testing/Instances.hs
haskell
# LANGUAGE OverloadedStrings # -----------------------------------------------------------------------------
# OPTIONS_GHC -fno - warn - orphans # | Module : Data . GraphViz . Testing . Instances Description : ' Arbitrary ' instances for graphviz . Copyright : ( c ) License : 3 - Clause BSD - style Maintainer : This module exports the ' Arbitrary ' instances for the variou...
8a822637c783fc57c63d3446e55968ed12774cef703ea2c8ec082f5ab4c2ef62
puppetlabs/jruby-utils
jruby_pool_manager_core.clj
(ns puppetlabs.services.jruby-pool-manager.impl.jruby-pool-manager-core (:require [schema.core :as schema] [puppetlabs.services.jruby-pool-manager.jruby-schemas :as jruby-schemas] [puppetlabs.services.jruby-pool-manager.impl.jruby-agents :as jruby-agents] [puppetlabs.services.proto...
null
https://raw.githubusercontent.com/puppetlabs/jruby-utils/7b53c3c6a0c61635362402313bcec809abf5a856/src/clj/puppetlabs/services/jruby_pool_manager/impl/jruby_pool_manager_core.clj
clojure
(ns puppetlabs.services.jruby-pool-manager.impl.jruby-pool-manager-core (:require [schema.core :as schema] [puppetlabs.services.jruby-pool-manager.jruby-schemas :as jruby-schemas] [puppetlabs.services.jruby-pool-manager.impl.jruby-agents :as jruby-agents] [puppetlabs.services.proto...
d51834466218a81a652415f9016ec0de631e973300af6d25061a3abdbd1b7cc9
input-output-hk/project-icarus-importer
RequestSpec.hs
module RequestSpec (spec) where import Universum import Data.Either (isLeft) import Formatting (build, sformat) import Test.Hspec import Cardano.Wallet.API.Request.Filter import Cardano.Wallet.API.Request.Sort import Cardano.Wallet.API.V1.Types im...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/RequestSpec.hs
haskell
module RequestSpec (spec) where import Universum import Data.Either (isLeft) import Formatting (build, sformat) import Test.Hspec import Cardano.Wallet.API.Request.Filter import Cardano.Wallet.API.Request.Sort import Cardano.Wallet.API.V1.Types im...
5c53be2faa6bd95578f18c7f3297484617b853573c96f912b8c7e0955037e23d
immutant/feature-demo
caching.clj
(ns demo.caching (:require [immutant.caching :as c] [immutant.caching.core-memoize :as cmemo] [immutant.scheduling :as sch])) ;; Caches implement org.infinispan.Cache and java.util.concurrent . (comment writing "Various ways of putting entries in a cache" (def ...
null
https://raw.githubusercontent.com/immutant/feature-demo/151fb330601421a23a1bdfd71f724afcdba0900c/src/demo/caching.clj
clojure
Caches implement org.infinispan.Cache and The swap-in! function atomically updates cache entries by applying a function to the current value or nil, if the key is missing. The function should be side-effect free. => "foo" Internally, swap-in! uses the ConcurrentMap methods, replace, i.e. "compare and set", and pu...
(ns demo.caching (:require [immutant.caching :as c] [immutant.caching.core-memoize :as cmemo] [immutant.scheduling :as sch])) java.util.concurrent . (comment writing "Various ways of putting entries in a cache" (def foo (c/cache "foo")) = > 1 = > 2 invoke ...
74defac8e8cd30b3d00719cd7707bcd69587c0cf2385f3b2c23daa58c211ff13
kaizhang/SciFlow
Types.hs
# LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # {-# LANGUAGE DeriveLift #-} {-# LANGUAGE GADTs #-} module Control.Workflow.Types ( SciFlow(..) , NodeLabel(..) , FunctionTable(..) , ResourceConfig(..) , Resource(..) , Job(..) , Action(..) , Flow(..) ...
null
https://raw.githubusercontent.com/kaizhang/SciFlow/c9d85008e9db598d2addc8fe999e1abad9147e1c/SciFlow/src/Control/Workflow/Types.hs
haskell
# LANGUAGE DeriveLift # # LANGUAGE GADTs # | The core type, containing the workflow represented as a free arrow and a function table for remote execution. | The function table that can be sent to remote. | Global job specific resource configuration. This will overwrite any existing configuration. TODO: This shou...
# LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Control.Workflow.Types ( SciFlow(..) , NodeLabel(..) , FunctionTable(..) , ResourceConfig(..) , Resource(..) , Job(..) , Action(..) , Flow(..) , Env , step , ustep ) where impor...
2a1531e285050fefc205c547d0a3f3af24fbd2ace278189bf1a4596e9cf6a021
openmusic-project/openmusic
rythme.lisp
;========================================================================= OpenMusic : Visual Programming Language for Music Composition ; Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free software : you ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/0bd8613a844a382e5db7185be1b5a5d026d66b20/OPENMUSIC/code/projects/musicproject/container/rythme/rythme.lisp
lisp
========================================================================= (at your option) any later version. 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. ======...
OpenMusic : Visual Programming Language for Music Composition Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU General Public ...
c314179df9a670f7c50ecd7a8ed0b6ae4305842f3111a803d247f80e2cd303f8
sunshineclt/Racket-Helper
homework2-04.rkt
#lang racket (define (average x y) (/ (+ x y) 2)) (define (iterative-improve good-enough improve) (define (iterater now) (if (good-enough now) now (iterater (improve now)))) iterater) (define (sqrt a) (define (gd x) (< (abs (- x (average x (/ a x)))) 0.0001)) (define (im x) (averag...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week2/homework2-04.rkt
racket
#lang racket (define (average x y) (/ (+ x y) 2)) (define (iterative-improve good-enough improve) (define (iterater now) (if (good-enough now) now (iterater (improve now)))) iterater) (define (sqrt a) (define (gd x) (< (abs (- x (average x (/ a x)))) 0.0001)) (define (im x) (averag...
c74177a3bc8bb527f2068df2b97856450cbf5f47ba38519a824a79782f348d23
inaka/erlang-github
egithub_SUITE.erl
-module(egithub_SUITE). -export([ all/0, init_per_suite/1, end_per_suite/1 ]). -export([ pull_reqs/1, issue_comments/1, pr_review/1, issues/1, files/1, users/1, orgs/1, repos/1, teams/1, hooks/...
null
https://raw.githubusercontent.com/inaka/erlang-github/90592ab381e9a5c8486305a08090ad71673735d0/test/egithub_SUITE.erl
erlang
Common test Test cases Helper
-module(egithub_SUITE). -export([ all/0, init_per_suite/1, end_per_suite/1 ]). -export([ pull_reqs/1, issue_comments/1, pr_review/1, issues/1, files/1, users/1, orgs/1, repos/1, teams/1, hooks/...
f12d9dfeb12c07ff196af9d9a7fbc817a4efa1decbd856603f1625eeac81c470
fragnix/fragnix
SameTypeDifferentInstance1.hs
module SameTypeDifferentInstance1 where data SameTypeDifferentInstance = SameTypeDifferentInstance instance Eq SameTypeDifferentInstance where (==) SameTypeDifferentInstance SameTypeDifferentInstance = True instance Show SameTypeDifferentInstance where show SameTypeDifferentInstance = "SameTypeDifferentInsta...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/quick/SameTypeDifferentInstance/SameTypeDifferentInstance1.hs
haskell
module SameTypeDifferentInstance1 where data SameTypeDifferentInstance = SameTypeDifferentInstance instance Eq SameTypeDifferentInstance where (==) SameTypeDifferentInstance SameTypeDifferentInstance = True instance Show SameTypeDifferentInstance where show SameTypeDifferentInstance = "SameTypeDifferentInsta...
10cf3ddeb4f54235d5a50203f3555bb462bfc5a9f5625952a43dc164acdbe7e3
vlaaad/reveal
view.clj
(ns vlaaad.reveal.view (:require [vlaaad.reveal.output-panel :as output-panel] [vlaaad.reveal.action-popup :as action-popup] [vlaaad.reveal.event :as event] [vlaaad.reveal.stream :as stream] [vlaaad.reveal.action :as action] vlaaad.reveal.doc [vl...
null
https://raw.githubusercontent.com/vlaaad/reveal/87282c6f617cde47a5524c3a17c8bb8f2f62c853/src/vlaaad/reveal/view.clj
clojure
sorted maps with non-keyword keys throw class cast exceptions
(ns vlaaad.reveal.view (:require [vlaaad.reveal.output-panel :as output-panel] [vlaaad.reveal.action-popup :as action-popup] [vlaaad.reveal.event :as event] [vlaaad.reveal.stream :as stream] [vlaaad.reveal.action :as action] vlaaad.reveal.doc [vl...
eecfaa9965bd02850e2a06a6b723a631c14d7d19535129a4313cf0c009da65c4
tjammer/raylib-ocaml
raylib.ml
include Ctypes_reexports include Raylib_types include Functions module Rlgl = Rlgl
null
https://raw.githubusercontent.com/tjammer/raylib-ocaml/c705cab2c85605d3c62e3937b8b17df9a4486501/src/raylib/raylib.ml
ocaml
include Ctypes_reexports include Raylib_types include Functions module Rlgl = Rlgl
7518e3a5ae29263813fa9cb0b03094a5bb344964d481e12bf23906a6800977ab
schemeway/idyl
env.scm
;; ---------------------------------------------------------------------- ;; FICHIER : env.scm ; ; DATE DE CREATION : Mon May 29 09:36:42 1995 ; ; DERNIERE MODIFICATION : Fri Jun 2 11:29:04 1995 ; ; ;; ---...
null
https://raw.githubusercontent.com/schemeway/idyl/2f68a191b3e49636a30ae1f486e85e4733bcf9a0/env.scm
scheme
---------------------------------------------------------------------- ;; ; ; ; ---------------------------------------------------------------------- ;; ; ---------------------------------------------------------------------- ;; This file contains all the stuff for environment creation, lookup, ;; etc. ...
. env : set - global ! : Initialise l'environnement global . . env : add - global - env ! : Fonction ajoutant une liaison à l'environnement . env : set ! : Fonction qui change la valeur d'une variable (define *global-environment* '()) (define (env:make-binding name type value constan...
869e2b73c35c80016422fecdd6d76d3ca0960dbcf422f98a439e769e1c376c3f
stephenpascoe/hs-arrow
Writeable.hs
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) /No description available in the introspection data./ Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () /No description available in the introspection...
null
https://raw.githubusercontent.com/stephenpascoe/hs-arrow/86c7c452a8626b1d69a3cffd277078d455823271/gi-arrow/GI/Arrow/Interfaces/Writeable.hs
haskell
* Exported types * Methods ** write #method:write# | Memory-managed wrapper type. | A convenience alias for `Nothing` :: `Maybe` `Writeable`. | Type class for types which can be safely cast to `Writeable`, for instance with `toWriteable`. # OVERLAPPABLE # method type : OrdinaryMethod Lengths : [] throws : True...
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) /No description available in the introspection data./ Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () /No description available in the introspection...
cf71f882fefadcf29578e23aed29cfedddadc1c8e1899475ae2e5771643e4358
bryal/carth
Infer.hs
# LANGUAGE TemplateHaskell , DataKinds , RankNTypes # module Front.Infer (inferTopDefs, checkType, checkTConst) where import Prelude hiding (span) import Lens.Micro.Platform (makeLenses, over, view, mapped, to, Lens') import Control.Applicative hiding (Const(..)) import Control.Monad.Except import Control.Monad.Reade...
null
https://raw.githubusercontent.com/bryal/carth/0c6026c82ce8ceb1a621c15a0e7505c4e6bc8782/src/Front/Infer.hs
haskell
| Maps a constructor to its variant index in the type definition it constructs, the signature/left-hand-side of the type definition, the types of its parameters, and the span (number of constructors) of the datatype For unification to work properly with mutually recursive functions, we need to create a depende...
# LANGUAGE TemplateHaskell , DataKinds , RankNTypes # module Front.Infer (inferTopDefs, checkType, checkTConst) where import Prelude hiding (span) import Lens.Micro.Platform (makeLenses, over, view, mapped, to, Lens') import Control.Applicative hiding (Const(..)) import Control.Monad.Except import Control.Monad.Reade...
52800d8fdd4285bdff3a8a90e419fa04d22f5a0ade1098fa2878492e9f0eac90
flavioc/cl-hurd
io-get-openmodes.lisp
(in-package :hurd-translator) (def-io-interface :io-get-openmodes ((port port) (bits :pointer)) (with-lookup protid port (setf (mem-ref bits 'open-flags) (only-flags (flags (open-node protid)) +honored-get-modes+)) t))
null
https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/translator/interfaces/io-get-openmodes.lisp
lisp
(in-package :hurd-translator) (def-io-interface :io-get-openmodes ((port port) (bits :pointer)) (with-lookup protid port (setf (mem-ref bits 'open-flags) (only-flags (flags (open-node protid)) +honored-get-modes+)) t))
7e2af83cb2b8f18a388246bc9cc556c54a9023046b6b9b2f41e0b028818f032f
dgiot/dgiot
modbus_tcp_server.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT 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...
null
https://raw.githubusercontent.com/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/apps/dgiot_modbus/src/modbus/modbus_tcp_server.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 ) 2020 - 2021 DGIOT 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(modbus_tcp_server). start(Port , State ) - > dgiot_tcp_server : child_spec(?MODUL...
edcf68c011e65cf36958fb05c20b939b5311e80aeaef8170795ba275d624bcde
jrh13/hol-light
sigmacomplete.ml
(* ========================================================================= *) Sigma_1 completeness of 's axioms Q. (* ========================================================================= *) let robinson = new_definition `robinson = (!!0 (!!1 (Suc(V 0) === Suc(V 1) --> V...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Arithmetic/sigmacomplete.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- Individual "axioms" and their instances. ---------------...
Sigma_1 completeness of 's axioms Q. let robinson = new_definition `robinson = (!!0 (!!1 (Suc(V 0) === Suc(V 1) --> V 0 === V 1))) && (!!1 (Not(V 1 === Z) <-> ??0 (V 1 === Suc(V 0)))) && (!!1 (Z ++ V 1 === V 1)) && (!!0 (!!1 (Suc(V 0) ++ V 1 === Suc(V 0...
81b6ea9e3f47f69d848ab680cf9e5cd5798d7ab2b88928d7119f46dcaf8d0cea
haskell-opengl/GLUT
OnYourOwn1.hs
OnYourOwn1.hs ( adapted from OnYourOwn1 which is ( c ) 2004 Astle / Hawkins ) Copyright ( c ) 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE OnYourOwn1.hs (adapted from OnYourOwn1 which is (c) 2004 Astle/Hawkins) C...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/BOGLGP/Chapter03/OnYourOwn1.hs
haskell
------------------------------------------------------------------------------ Setup GLUT and OpenGL, drop into the event loop. ------------------------------------------------------------------------------ Register the event callback functions No need for an idle callback here, this would just hog the CPU without ...
OnYourOwn1.hs ( adapted from OnYourOwn1 which is ( c ) 2004 Astle / Hawkins ) Copyright ( c ) 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE OnYourOwn1.hs (adapted from OnYourOwn1 which is (c) 2004 Astle/Hawkins) C...
eb07230dcef7c6e40f1f68d79f441c8d0fdcdb440461546824cb47ba653eb6c3
rm-hull/project-euler
euler072.clj
EULER # 072 ;; ========== ;; Consider the fraction, n/d, where n and d are positive integers. If n < d and HCF(n , d)=1 , it is called a reduced proper fraction . ;; If we list the set of reduced proper fractions for d < = 8 in ascending ;; order of size, we get: ;; 1/8 , 1/7 , 1/6 , 1/5 , 1/4 , 2/7 , 1/3 ,...
null
https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/euler072.clj
clojure
========== Consider the fraction, n/d, where n and d are positive integers. If n < d order of size, we get: How many elements would be contained in the set of reduced proper fractions
EULER # 072 and HCF(n , d)=1 , it is called a reduced proper fraction . If we list the set of reduced proper fractions for d < = 8 in ascending 1/8 , 1/7 , 1/6 , 1/5 , 1/4 , 2/7 , 1/3 , 3/8 , 2/5 , 3/7 , 1/2 , 4/7 , 3/5 , 5/8 , 2/3 , 5/7 , 3/4 , 4/5 , 5/6 , 6/7 , 7/8 It can be seen that th...
5bc41f74ca924ada06e4c19bf9211da709c896fc82c3e1b731db781ed18db10a
hanshuebner/vlm
traps.lisp
-*- Mode : LISP ; Package : POWERPC - INTERNALS ; Base : 10 ; Syntax : Common - Lisp ; -*- ;;; WARNING ! ! DO NOT MODIFY THIS FILE ! It was automatically generated from vlm : . Any changes made to it will be lost . #+Alpha-AXP-Emulator (in-package "ALPHA-AXP-INTERNALS") #+PowerPC-Emulator (in-package "PO...
null
https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/emulator/traps.lisp
lisp
Package : POWERPC - INTERNALS ; Base : 10 ; Syntax : Common - Lisp ; -*-
WARNING ! ! DO NOT MODIFY THIS FILE ! It was automatically generated from vlm : . Any changes made to it will be lost . #+Alpha-AXP-Emulator (in-package "ALPHA-AXP-INTERNALS") #+PowerPC-Emulator (in-package "POWERPC-INTERNALS") (defconstant |trapvector|$k-|stackoverflow| 2627) (defconstant |TrapVectorStac...
fd377becd661ab5999caa3b700426b04420b36052217d6a8aef2d78b99c5fa00
devaspot/games
tavla_scoring.erl
%% Author: serge Created : Jan 24 , 2013 %% Description: -module(tavla_scoring). -include_lib("eunit/include/eunit.hrl"). %% %% Exported Functions %% -export([ init/3, last_round_result/1, round_finished/2 ]). -define(MODE_STANDARD, standard). -define(MODE_PAIRED, paired). -def...
null
https://raw.githubusercontent.com/devaspot/games/a1f7c3169c53d31e56049e90e0094a3f309603ae/apps/server/src/tavla/tavla_scoring.erl
erlang
Author: serge Description: Exported Functions API Functions @doc Initialises scoring state. @end Types: Mode = standard | paired SeatNum = integer() Points = integer() no_rounds_played @end Types: FinishInfo = timeout | set_timeout | ...
Created : Jan 24 , 2013 -module(tavla_scoring). -include_lib("eunit/include/eunit.hrl"). -export([ init/3, last_round_result/1, round_finished/2 ]). -define(MODE_STANDARD, standard). -define(MODE_PAIRED, paired). -define(ACH_WIN_NORMAL, 1). -define(ACH_WIN_MARS, 2). -define(ACH...
0ba63738fc48bab4b1ef4936777aeae34d5152cd0716f7c60a2b340ffa68c4c5
input-output-hk/qeditas
script.ml
Copyright ( c ) 2015 The Qeditas developers Distributed under the MIT software license , see the accompanying file COPYING or -license.php . file COPYING or -license.php. *) open Big_int open Ser open Sha256 open Ripemd160 open Hash open Secp256k1 open Cryptocurr open Signat exception Invalid exception OP...
null
https://raw.githubusercontent.com/input-output-hk/qeditas/f4871bd20833cd08a215f9d5fc9df2d362cba410/src/script.ml
ocaml
** inum_le and blnum_le are little endian; inum_be and blnum_be are big endian ** * treat OP_CODESEPARATOR as a no op * * no ops * ** alpha signs that beta can sign ** ** alpha signs that beta can sign ** ** This version catches all exceptions and returns false. It should be called by all outside functions ** ** Genera...
Copyright ( c ) 2015 The Qeditas developers Distributed under the MIT software license , see the accompanying file COPYING or -license.php . file COPYING or -license.php. *) open Big_int open Ser open Sha256 open Ripemd160 open Hash open Secp256k1 open Cryptocurr open Signat exception Invalid exception OP...
5b8ffb2ab56aceef6adb10d60d9b0aea165c958b74194cc2eb1498925afc11f3
zotonic/cowmachine
mainpage.erl
-module(mainpage). -export([init/2]). init(Req0, Opts) -> BigBody = <<"A cowboy is an animal herder who tends cattle on ranches in North America, traditionally on horseback, and often performs a multitude of other ranch- related tasks. The historic American cowboy of the late 19th century arose from the vaq...
null
https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/compress_response/apps/main/src/mainpage.erl
erlang
-module(mainpage). -export([init/2]). init(Req0, Opts) -> BigBody = <<"A cowboy is an animal herder who tends cattle on ranches in North America, traditionally on horseback, and often performs a multitude of other ranch- related tasks. The historic American cowboy of the late 19th century arose from the vaq...
77904f3db35d2897693de874784ab0b75d65deb1c14bb6842ada28e6b2d74d82
gpwwjr/LISA
language.lisp
This file is part of LISA , the Lisp - based Intelligent Software ;;; Agents platform. Copyright ( C ) 2000 ;;; This library 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 ; either version 2....
null
https://raw.githubusercontent.com/gpwwjr/LISA/bc7f54b3a9b901d5648d7e9de358e29d3b794c78/src/core/language.lisp
lisp
Agents platform. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License either version 2.1 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FI...
This file is part of LISA , the Lisp - based Intelligent Software Copyright ( C ) 2000 of the License , or ( at your option ) any later version . GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License Foundation , Inc. , 59 Temple...
d8e0615415311d44f57b5fe00a4988754a13eb00e8aa11c47f2c93d971b1b706
bitemyapp/teef
FreeMonad.hs
# LANGUAGE ScopedTypeVariables # module FreeMonad where -- doubleBubble :: forall f1 f2 a b -- . ( Applicative f1 -- , Applicative f2 ) -- => f1 (f2 (a -> b)) -- -> f1 (f2 a) -- -> f1 (f2 b) -- doubleBubble f ffa = -- let x :: z -- x = fmap ...
null
https://raw.githubusercontent.com/bitemyapp/teef/9144263b65e20e4013442bfc038053a08bfbccf0/code/FreeMonad.hs
haskell
doubleBubble :: forall f1 f2 a b . ( Applicative f1 , Applicative f2 ) => f1 (f2 (a -> b)) -> f1 (f2 a) -> f1 (f2 b) doubleBubble f ffa = let x :: z x = fmap (<*>) f in undefined <--- ---- hmm <-------- let liftApply :: f (g (a ...
# LANGUAGE ScopedTypeVariables # module FreeMonad where doubleBubble :: forall f1 f2 a b . ( Applicative f1 , Applicative f2 ) => f1 (f2 (a -> b)) -> f1 (f2 a) x = (fmap (<*>) f) <*> ffa in x liftApply func = ( < * > ) < $ > func data Free f a...
3978bc4c77d9777fefb29bf27d164799005724c0ce380bc7d69d9b819a8a005c
baconpaul/composition-kit
meddley.clj
(ns composition-kit.compositions.nerdbait.meddley (:require [composition-kit.music-lib.midi-util :as midi]) (:require [composition-kit.music-lib.tempo :as tempo]) (:require [composition-kit.music-lib.logical-sequence :as ls]) (:require [composition-kit.music-lib.logical-item :as i]) (:use composition-kit.cor...
null
https://raw.githubusercontent.com/baconpaul/composition-kit/fce0addb74a9c30ba06e051d3bca51c5a2b0ce6f/src/composition_kit/compositions/nerdbait/meddley.clj
clojure
F D- F D- Bes C F C Harmony more open also . ; TODO next make this more expressive by using the mod wheel ( cc 1 ) So the function I need is then that takes up 0 -> len and you can chain them with >>> then delegate everything to 'curve' library For ths instruments I'm using in legato section in additio...
(ns composition-kit.compositions.nerdbait.meddley (:require [composition-kit.music-lib.midi-util :as midi]) (:require [composition-kit.music-lib.tempo :as tempo]) (:require [composition-kit.music-lib.logical-sequence :as ls]) (:require [composition-kit.music-lib.logical-item :as i]) (:use composition-kit.cor...
75491675f2d041d03bedca2a87974e5fc53e0bb29f79b0eae29bfcbbbe37e424
zenspider/schemers
exercise.4.25.scm
#!/usr/bin/env csi -s (require rackunit) Exercise 4.25 ;; Suppose that (in ordinary applicative-order ;; Scheme) we define `unless' as shown above and then define ;; `factorial' in terms of `unless' as ;; ;; (define (factorial n) ;; (unless (= n 1) ;; (* n (factorial (- n 1))) ...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.25.scm
scheme
Suppose that (in ordinary applicative-order Scheme) we define `unless' as shown above and then define `factorial' in terms of `unless' as (define (factorial n) (unless (= n 1) (* n (factorial (- n 1))) definitions work in a normal-order language? (define (unless. t a b) (if (not ...
#!/usr/bin/env csi -s (require rackunit) Exercise 4.25 1 ) ) What happens if we attempt to evaluate ` ( factorial 5 ) ' ? Will our ( factorial 5 ) ... infinite loop ... but we knew that from chapter 1 . what 's the point ?
c093b3b92fcf1f76a42c6b74423d8d8db4b4668128f361a06904a387f3bb2c3e
alesaccoia/festival_flinger
ogi_span_mx_syl.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--CSLU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Center for Spoken Language Understanding ; ; Oregon Graduate Institute of Science & Technology ; ; ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/ogi/ogi_spanish/ogi_span_mx_syl.scm
scheme
<--CSLU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ; ; ; ; ;; ; release of the Festival TTS system. ;; ...
Syllabification and accent prediction module for Mexican Spanish (set! A_Z '(a a1 e e1 i i1 o o1 u u1 b tS dZ d f g h j k l L m n N ny p q r rr s t w x ) ) (set! CONS '( b tS dZ d f g h j k l L m n N ny p q r rr s t w x ) ) (set! SET1 '( i u o b tS dZ d f g h j k l L m n N ny p q r rr s t w x ) ) (set! SET2 '( ...
38e424e821270099fd715270ab1de29bcbb5cdafa4419cd75f25ecec8aa066a3
votinginfoproject/data-processor
ordered_contest_test.clj
(ns vip.data-processor.validation.v5.ordered-contest-test (:require [vip.data-processor.validation.v5.ordered-contest :as v5.ordered-contest] [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as psql] [vip.data-pro...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/ordered_contest_test.clj
clojure
(ns vip.data-processor.validation.v5.ordered-contest-test (:require [vip.data-processor.validation.v5.ordered-contest :as v5.ordered-contest] [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as psql] [vip.data-pro...
4f060e810ffc6c7a290c4c83210cc7b8b6a32679f6ee371eb45d712bcbf40e9f
erlang/otp
diameter_config_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2013 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/66dd3c397b5dd68cb087a1a830f25c62c5d1d2ad/lib/diameter/test/diameter_config_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2013 - 2022 . 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(diameter_config_SUITE). -export([run/0, run/1]). -export([suite/0, all/0, star...
ce11c1ca7dac87d6ed8258c2a2cf931f266af86508b7670e59c4c8d8e9a3c7db
mtt-lang/mtt-lang
Util.ml
open Base open Result.Let_syntax open ParserInterface (* Parsing with error handling utilities *) let parse_from_e : type a. a ast_kind -> input_kind -> (a, error) Result.t = fun ast_kind source -> parse_from ast_kind source |> Result.map_error ~f:(fun parse_error -> [%string "Parse error: $parse_error"]...
null
https://raw.githubusercontent.com/mtt-lang/mtt-lang/2d330efccd154e1c158dc673ca3ec4f64b9dd09e/core/Util.ml
ocaml
Parsing with error handling utilities Parsing and typechecking with error handling utilities Parsing and type inference with error handling utilities Parsing and evaluation with error handling utilities
open Base open Result.Let_syntax open ParserInterface let parse_from_e : type a. a ast_kind -> input_kind -> (a, error) Result.t = fun ast_kind source -> parse_from ast_kind source |> Result.map_error ~f:(fun parse_error -> [%string "Parse error: $parse_error"]) let parse_and_typecheck source typ_str = ...
144403ea16d986f8cbdede287d6cb566751aa8f4267cc6bf8b294686375b7a89
penpot/penpot
hsva.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.workspace.colorpicker.hsva (:require [app.main.ui.workspace.colorpicker.slider-selector :...
null
https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/colorpicker/hsva.cljs
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.workspace.colorpicker.hsva (:require [app.main.ui.workspace.colorpicker.slider-selector :refer [slider-selector]] [app....
96c4bfa2362018aacfa72ce16c639f0242c2626b64405522f973001f9f1177d7
nick8325/equinox
Form.hs
module Form where -- HOF data Expr = Expr :@ Expr | Lambda Symbol Expr | Symbol Symbol | Expr := Expr | Expr :& Expr | Neg Expr | Truth deriving ( Eq, Ord ) data Symbol = Name ::: Type deriving ( Eq, Ord ) forAll :: Symbol -> Expr -> Expr forAll x p = Lambda x p := Lambda x Truth (/\) :: Expr -> ...
null
https://raw.githubusercontent.com/nick8325/equinox/67351fbc4358fdea931b4c1dfb659f5527b40917/Haskell/NewStuff/Form.hs
haskell
HOF more info here
module Form where data Expr = Expr :@ Expr | Lambda Symbol Expr | Symbol Symbol | Expr := Expr | Expr :& Expr | Neg Expr | Truth deriving ( Eq, Ord ) data Symbol = Name ::: Type deriving ( Eq, Ord ) forAll :: Symbol -> Expr -> Expr forAll x p = Lambda x p := Lambda x Truth (/\) :: Expr -> Expr ->...
569018acccba33de77e4fbb4e23b0cae3faa21ba8fa345b4923704fde16ec7f6
juxt/vext
flowable.clj
Copyright © 2020 , JUXT LTD . Clojure shim upon io.reactivex . Flowable (ns juxt.vext.flowable (:refer-clojure :exclude [map count merge-with repeat reduce]) (:import (io.reactivex.functions Function))) (defn do-on-complete [f flowable] (.doOnComplete flowable (reify io.reactivex.functions.Action ...
null
https://raw.githubusercontent.com/juxt/vext/9e109bb43b0cb2c31ec439e7438c7bfb298ff16d/src/juxt/vext/flowable.clj
clojure
Copyright © 2020 , JUXT LTD . Clojure shim upon io.reactivex . Flowable (ns juxt.vext.flowable (:refer-clojure :exclude [map count merge-with repeat reduce]) (:import (io.reactivex.functions Function))) (defn do-on-complete [f flowable] (.doOnComplete flowable (reify io.reactivex.functions.Action ...
85f869740e0c7fdc65cb0034750591f8c3a66ec4c3b35043382d3c8c815a52f8
parenthesin/microservice-boilerplate-malli
utils.clj
(ns parenthesin.utils (:require [malli.dev.pretty :as pretty] [malli.instrument :as mi])) (defn with-malli-intrumentation "Wraps f ensuring there has malli collect and instrument started before running it" [f] (mi/collect! {:ns (all-ns)}) (mi/instrument! {:report (pretty/reporter)}) (f) (mi/u...
null
https://raw.githubusercontent.com/parenthesin/microservice-boilerplate-malli/efd1e64b5755afdae608554daa22564fd078e0a1/src/parenthesin/utils.clj
clojure
(ns parenthesin.utils (:require [malli.dev.pretty :as pretty] [malli.instrument :as mi])) (defn with-malli-intrumentation "Wraps f ensuring there has malli collect and instrument started before running it" [f] (mi/collect! {:ns (all-ns)}) (mi/instrument! {:report (pretty/reporter)}) (f) (mi/u...
ac64206bc6310d8d5720d09cfee7767f5c0dec529e76da34e8073f90196301e3
luminus-framework/examples
handler.clj
(ns guestbook-datomic.handler (:require [guestbook-datomic.layout :refer [error-page]] [guestbook-datomic.routes.home :refer [home-routes]] [compojure.core :refer [routes wrap-routes]] [compojure.route :as route] [guestbook-datomic.env :refer [defaults]] ...
null
https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/guestbook-datomic/src/clj/guestbook_datomic/handler.clj
clojure
(ns guestbook-datomic.handler (:require [guestbook-datomic.layout :refer [error-page]] [guestbook-datomic.routes.home :refer [home-routes]] [compojure.core :refer [routes wrap-routes]] [compojure.route :as route] [guestbook-datomic.env :refer [defaults]] ...
fb7b50e122b405d446d7bf33625404eef56e5a858d4baf2fb23e98f2396d7824
mvaldesdeleon/haskell-book
difflist.hs
module Main where import Criterion.Main newtype DList a = DL { unDL :: [a] -> [a] } {-# INLINE empty #-} empty :: DList a empty = DL $ const [] # INLINE singleton # singleton :: a -> DList a singleton x = DL $ const [x] # INLINE toList # toList :: DList a -> [a] toList xs = unDL xs [] infixr `cons` ...
null
https://raw.githubusercontent.com/mvaldesdeleon/haskell-book/ee4a70708041686abe2f1d951185786119470eb4/ch28/difflist.hs
haskell
# INLINE empty #
module Main where import Criterion.Main newtype DList a = DL { unDL :: [a] -> [a] } empty :: DList a empty = DL $ const [] # INLINE singleton # singleton :: a -> DList a singleton x = DL $ const [x] # INLINE toList # toList :: DList a -> [a] toList xs = unDL xs [] infixr `cons` # INLINE cons # cons...
af833c9ce08f482fc036684b9c4d5a70c17749b990bae8caf0bf4ce370bcf377
basho/riak_cs
upgrade_downgrade_test.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . Y...
null
https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/riak_test/tests/upgrade_downgrade_test.erl
erlang
--------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permiss...
Copyright ( c ) 2007 - 2014 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 ...
1037e9481a49969850b8a8ef3565028d2d38d2a7e59ee09df9f1cb7cc5680df5
Bogdanp/racksnaps
http.rkt
#lang racket/base (require net/http-client racket/format racket/match racket/port racket/string) (provide get) (define conn (http-conn-open "pkgs.racket-lang.org" #:ssl? #t #:port 443 #:auto-reconnect? #t)) (define (get . path) (define-values (status _headers in) ...
null
https://raw.githubusercontent.com/Bogdanp/racksnaps/86116e12b5e6f1537d313323fd7a33e81413452b/http.rkt
racket
#lang racket/base (require net/http-client racket/format racket/match racket/port racket/string) (provide get) (define conn (http-conn-open "pkgs.racket-lang.org" #:ssl? #t #:port 443 #:auto-reconnect? #t)) (define (get . path) (define-values (status _headers in) ...
3406beb25f8184c5cb0afae5f7c915df0ee161116248a22f4a035daa9b07aa1b
naoiwata/sicp
q-1.09.scm
; ; -> @author naoiwata - > SICP Chapter1 ; -> q-1.9 ; (define (inc n) (+ n 1)) (define (dec n) (- n 1)) ;(A) (define (pulsA a b) (if (= a 0) b (inc (+ (dec a) b)))) (pulsA 4 5) - > ( inc ( + ( dec 4 ) 5 ) ) - > ( inc ( inc ( + ( dec 3 ) 5 ) ) ) - > ( inc ( inc ( inc ( + ( dec 2 ) 5 ) ) ) ) - > ( i...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter1/q-1.09.scm
scheme
-> @author naoiwata -> q-1.9 (A) -> (inc (inc (inc (inc 5)))) -> (inc (inc (inc 6))) -> (inc (inc 7)) -> (inc 8) -> recursive process (B) -> iterative process
- > SICP Chapter1 (define (inc n) (+ n 1)) (define (dec n) (- n 1)) (define (pulsA a b) (if (= a 0) b (inc (+ (dec a) b)))) (pulsA 4 5) - > ( inc ( + ( dec 4 ) 5 ) ) - > ( inc ( inc ( + ( dec 3 ) 5 ) ) ) - > ( inc ( inc ( inc ( + ( dec 2 ) 5 ) ) ) ) - > ( inc ( inc ( inc ( inc ( + ( dec 1 ) 5 ) ) )...
48db596edd82ce1ebeb632de48d5e273f1196a020e9b83f80f3953c21fba46e9
NorfairKing/cursor
Base.hs
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Cursor.Tree.Base ( singletonTreeCursor, makeTreeCursor, makeNodeTreeCursor, makeTreeCursorWithSelection, rebuildTreeCursor, mapTreeCursor, currentTree, makeTreeCursorWithAbove, traverseTreeC...
null
https://raw.githubusercontent.com/NorfairKing/cursor/ff27e78281430c298a25a7805c9c61ca1e69f4c5/cursor/src/Cursor/Tree/Base.hs
haskell
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Cursor.Tree.Base ( singletonTreeCursor, makeTreeCursor, makeNodeTreeCursor, makeTreeCursorWithSelection, rebuildTreeCursor, mapTreeCursor, currentTree, makeTreeCursorWithAbove, traverseTreeC...
67040fafcd33e876ef5b905e2b170a042b52433985990732fd599fd7f9774620
S8A/htdp-exercises
ex189.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex189) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex189.rkt
racket
about the language level of this file in a form that our tools can easily process. Number List-of-numbers -> Boolean determines whether n occurs in a list of numbers Number List-of-numbers -> Boolean determines whether n occurs in a sorted list of numbers
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex189) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings ...
514f5e3453739f37e298fabc856f511a4817f7634c479d94fdbefc502bba9147
PuercoPop/Movitz
arrays.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2001 - 2005 , Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: arrays.lisp ;;;; Description: Aut...
null
https://raw.githubusercontent.com/PuercoPop/Movitz/7ffc41896c1e054aa43f44d64bbe9eaf3fcfa777/losp/muerte/arrays.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: arrays.lisp Description: ------------------------------------------------------------------ element-type 0? element-type 0? t?...
Copyright ( C ) 2001 - 2005 , Department of Computer Science , University of Tromso , Norway . Author : < > Created at : Sun Feb 11 23:14:04 2001 $ I d : arrays.lisp , v 1.68 2008 - 04 - 21 19:30:40 Exp $ (require :muerte/basic-macros) (require :muerte/typep) (require :muerte/memref) (...
71ddaf942b7d50dc62aded13c247649f381bd186bf1a2bc52382666be5197ee6
clojure-lsp/clojure-lsp
settings.clj
(ns clojure-lsp.settings (:refer-clojure :exclude [get]) (:require [clojure-lsp.config :as config] [clojure.core.memoize :as memoize] [clojure.string :as string] [clojure.walk :as walk] [medley.core :as medley])) (set! *warn-on-reflection* true) (defn- typify-json [root] (walk/postwalk (fn [n] ...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/01500c34e00efa2b4affc627bdc80e89af18f55d/lib/src/clojure_lsp/settings.clj
clojure
(medley/map-keys keyword)
(ns clojure-lsp.settings (:refer-clojure :exclude [get]) (:require [clojure-lsp.config :as config] [clojure.core.memoize :as memoize] [clojure.string :as string] [clojure.walk :as walk] [medley.core :as medley])) (set! *warn-on-reflection* true) (defn- typify-json [root] (walk/postwalk (fn [n] ...
6556d074ba0f714f34881ce5ceeb78b1f17b48ebb014c8fe1347139e0554b881
danehuang/augurv2
TcLow.hs
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
null
https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/Low/TcLow.hs
haskell
-------------------------------------------------------------------- = TcLow Description | [Note] Contains type inference for Low programs. --------------------------------- == Types and operations --------------------------------- == Unification --------------------------------- TODO: HACK?? t = ArrTy ts (getR...
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
814ffd67ae5af2f71756a2f3e1c1c7a9ef1973f98de46d9ae41dffe2f5ed4efa
CIFASIS/QuickFuzz
HTTP.hs
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE IncoherentInstances # # LANGUAGE DeriveGeneric # module Test.QuickFuzz.Gen.Network.HTTP where import Data.Default import Data.Text.Encoding (encodeUtf8) import Network.HTTP.Headers import Network.HTTP.Base import Control.DeepSeq import Test.Quick...
null
https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/src/Test/QuickFuzz/Gen/Network/HTTP.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE IncoherentInstances # # LANGUAGE DeriveGeneric # module Test.QuickFuzz.Gen.Network.HTTP where import Data.Default import Data.Text.Encoding (encodeUtf8) import Network.HTTP.Headers import Network.HTTP.Base import Control.DeepSeq import Test.Quick...
a9e72d63a531f49bce355d1919c7a0d7a55a64fc5e31b89c31ea1a2164eb2d47
aelve/guide
Server.hs
# LANGUAGE FlexibleContexts # module Guide.Api.Server ( runApiServer, ) where import Imports import Network.Wai (Middleware, Request) import Network.Wai.Middleware.Cors (CorsResourcePolicy (..), corsOrigins, simpleCorsResourcePolicy) import Servant import Servant.API.Generic i...
null
https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Api/Server.hs
haskell
| The type that 'runApiServer' serves. TODO: Add Guide's frontend address (and maybe others resources) | An override for the default Warp exception handler. Logs exceptions to the given 'Logger'. -------------------------------------------------------------------------- Servant servers ---------------------------...
# LANGUAGE FlexibleContexts # module Guide.Api.Server ( runApiServer, ) where import Imports import Network.Wai (Middleware, Request) import Network.Wai.Middleware.Cors (CorsResourcePolicy (..), corsOrigins, simpleCorsResourcePolicy) import Servant import Servant.API.Generic i...
e494a2b1dd93eeb6b66452d51722db0685a918654698e10520c410d2814d0650
JPMoresmau/scion-class-browser
Json.hs
# LANGUAGE OverloadedStrings , TypeSynonymInstances # module Scion.PersistentHoogle.Instances.Json where import Control.Applicative import Data.Aeson hiding (Result) import qualified Data.Text as T import Scion.PersistentBrowser () import Scion.PersistentHoogle.Types instance ( ToJSON a , ToJSON b , ToJSON c , ToJ...
null
https://raw.githubusercontent.com/JPMoresmau/scion-class-browser/572cc2c1177bdaa9558653cc1d941508cd4c7e5b/src/Scion/PersistentHoogle/Instances/Json.hs
haskell
{-# INLINE toJSON #-}
# LANGUAGE OverloadedStrings , TypeSynonymInstances # module Scion.PersistentHoogle.Instances.Json where import Control.Applicative import Data.Aeson hiding (Result) import qualified Data.Text as T import Scion.PersistentBrowser () import Scion.PersistentHoogle.Types instance ( ToJSON a , ToJSON b , ToJSON c , ToJ...
2c753ef05cdd8f7e30b18d127ce5409a72377d9d6e4ffbb5549ec72b85ebd069
hasktorch/hasktorch
Linear.hs
# LANGUAGE DataKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Torch.GraduallyTyped.NN.Functional.Linear where import GHC.TypeLits (Nat, Symbol, TypeError) import System.IO.Unsafe (unsafePerformIO) import Torch.GraduallyTyped.DType (DTy...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/cf0ed1aba9c41123ba46f7c0788a4df10fbfe1ef/experimental/gradually-typed/src/Torch/GraduallyTyped/NN/Functional/Linear.hs
haskell
# LANGUAGE RankNTypes # $setup | Compute the output shape of a linear transformation. >>> type BiasShape = 'Shape '[OutputDim] >>> :kind! LinearWithBiasF WeightShape BiasShape InputShape [Dim (Name Symbol) (Size Natural)] = 'Shape | Applies a linear transfor...
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Torch.GraduallyTyped.NN.Functional.Linear where import GHC.TypeLits (Nat, Symbol, TypeError) import System.IO.Unsafe (unsafePerformIO) import Torch.GraduallyTyped.DType (DType (..), DataType (..)) impo...
a8d0e71342b4deeef26c13097c20638162d85f50d5a9b35d49291f6f0c1a642e
ftovagliari/ocamleditor
gutter.ml
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor 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 y...
null
https://raw.githubusercontent.com/ftovagliari/ocamleditor/bee65cd57b712979f67c759e519ab1a0192a1c28/src/gutter.ml
ocaml
S | chars (varying) | S | B | B | Folding | B | B | * create * create_marker * destroy_markers
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor 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 y...
3f7af9ce0497d6bdc226d0499c18ed993a81f7240e65a7b1d8b317eea59fa942
twittner/cql-io
Jobs.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module Database.CQL.IO.Jobs ( Jobs , new , add , destroy , showJobs ) where import Control.Applicative import Control....
null
https://raw.githubusercontent.com/twittner/cql-io/090b436a413d961a424376c0b1dcc0c223472188/src/Database/CQL/IO/Jobs.hs
haskell
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module Database.CQL.IO.Jobs ( Jobs , new , add , destroy , showJobs ) where import Control.Applicative import Control....
ccb171675a6a0107f6f13b8271fba82405aba48d4ca7aea85fe823f2efa18208
juspay/atlas
SavedReqLocation.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/app-backend/src/Domain/Types/SavedReqLocation.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
0a5cc5df4051b58da066ca27b71f7102615653225e712ae809292080534d581d
larcenists/larceny
srfi-86-test.sps
Test suite for SRFI-86 ; $ Id$ ; Very basic tests , taken directly from SRFI 86 . (import (rnrs base) (rnrs io simple) (srfi :6 basic-string-ports) (srfi :86 mu-and-nu)) (define (writeln . xs) (for-each display xs) (newline)) (define (fail token . more) (writeln "Error: test faile...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/test/srfi-86-test.sps
scheme
true true true true true true
Test suite for SRFI-86 $ Id$ Very basic tests , taken directly from SRFI 86 . (import (rnrs base) (rnrs io simple) (srfi :6 basic-string-ports) (srfi :86 mu-and-nu)) (define (writeln . xs) (for-each display xs) (newline)) (define (fail token . more) (writeln "Error: test failed: "...
1cb901b00357e343a3155e1ca158b63fe76f8304a46ace6de0d158099049526c
esl/escalus
escalus.erl
%%============================================================================== Copyright 2010 Erlang Solutions Ltd. %% 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/esl/escalus/ac5e813ac96c0cdb5d5ac738d63d992f5f948585/src/escalus.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 ex...
Copyright 2010 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(escalus). -export([suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_...
7acf64ad2557c8c29b0a48549fae6342497eacbd36bd7eb9dd11a4150ccf5d57
agentultra/postgresql-replicant
Lsn.hs
{-# LANGUAGE Strict #-} | Module : Database . PostgreSQL.Replicant . Types . Lsn Description : Types and parsers for : ( c ) , 2020 , 2021 License : : Stability : experimental Portability : POSIX /Log Sequence Number/ or LSN is a pointer to a place inside of a WAL log file . ...
null
https://raw.githubusercontent.com/agentultra/postgresql-replicant/aa31b5a49085ac1d91ace2358bcb494e48bbd9d0/src/Database/PostgreSQL/Replicant/Types/Lsn.hs
haskell
# LANGUAGE Strict # ^ Filepart ^ Offset | Note that as of bytestring ~0.10.12.0 we don't have upper-case hex encoders but the patch to add them has been merged and when available we should switch to them them.
| Module : Database . PostgreSQL.Replicant . Types . Lsn Description : Types and parsers for : ( c ) , 2020 , 2021 License : : Stability : experimental Portability : POSIX /Log Sequence Number/ or LSN is a pointer to a place inside of a WAL log file . It contains the file n...
2e4ed66f736f32aadfdd35c9d37a69d84fe3c379b7bc7f64316518e6d8065f08
ocaml-sf/learn-ocaml-corpus
pigeonhole_id.ml
let pigeonhole_sort (bound : int) (kvs : (int * 'v) list) : 'v list = List.map snd kvs (* trying to cheat *)
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/generic_sorting/wrong/pigeonhole_id.ml
ocaml
trying to cheat
let pigeonhole_sort (bound : int) (kvs : (int * 'v) list) : 'v list =
bce69b6499f0c5c00381fe65d07524644d6e2a493533ea0c63092b43bfc9da6e
kazu-yamamoto/llrbtree
RBTree.hs
| Purely functional red - black trees . * , \"Red - Black Trees in a Functional Setting\ " , Journal of Functional Programming , 9(4 ) , pp 471 - 477 , July 1999 < #jfp99 > * , \"Red - black trees with " , Journal of functional programming , 11(04 ) , pp 425 - 432 , July 2001...
null
https://raw.githubusercontent.com/kazu-yamamoto/llrbtree/36f259e36c2b320aa37bbbae9577e01fd8a27118/Data/Set/RBTree.hs
haskell
* Data structures * Creating red-black trees * Converting to a list * Membership * Deleting * Checking * Set operations * Helper functions -------------------------------------------------------------- Part to be shared -------------------------------------------------------------- color is Black ^ Black ^ ...
| Purely functional red - black trees . * , \"Red - Black Trees in a Functional Setting\ " , Journal of Functional Programming , 9(4 ) , pp 471 - 477 , July 1999 < #jfp99 > * , \"Red - black trees with " , Journal of functional programming , 11(04 ) , pp 425 - 432 , July 2001...
a8d48ceafc815fd86bca6c9f5b41e43dabef43a397115ea08549743342f5bc2b
andrewray/DefinitelyMaybeTyped
otypescript.ml
(********************************************************************************) (* file utilities *) let rec readall path = let open Unix in let h = opendir path in let rec read () = match try Some(readdir h) with _ -> None with | None -> [] | Some(x) when x<>"." && x<>".." -> (Filename.concat ...
null
https://raw.githubusercontent.com/andrewray/DefinitelyMaybeTyped/088fbb99b1eea704d37e4897de7fe18531b66fc2/app/otypescript.ml
ocaml
****************************************************************************** file utilities ****************************************************************************** command line (if verbose then output_string stdout (Parser.to_string ast) else Summary.ast ast); Summary.Print.ast ast; marshalled ast out...
let rec readall path = let open Unix in let h = opendir path in let rec read () = match try Some(readdir h) with _ -> None with | None -> [] | Some(x) when x<>"." && x<>".." -> (Filename.concat path x)::read() | _ -> read() in let all = read() in closedir h; all let rec findall path =...
6114f98e7a621143f0654d4248ff34222bdb4d5a064e8dbbacbd29d557177cd9
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
QuotesResourceTotalDetails.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema QuotesResourceTotalDetails module StripeAPI.Types.QuotesResourceTotalDetail...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/QuotesResourceTotalDetails.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema QuotesResourceTotalDetails # SOURCE # | Defines the object schema located at @components.schemas.quotes_resource_total_details@ in the specification. | amount_discount: This is the sum of all the discounts. | amoun...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.QuotesResourceTotalDetails where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import ...
55d52deb49854fb636a5f754687ca18297cc4be808193ca5ff57d3803e8be5b1
cram2/cram
prolog-interface.lisp
;;; Copyright ( c ) 2009 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this li...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_json_prolog/src/prolog-interface.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Re...
Copyright ( c ) 2009 , < > * Neither the name of Willow Garage , Inc. nor the names of its THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
6b1b85a3d5c47ed0ef3fdca9d17a09ccfc6456ba536c3611a686b9fce2b465d0
ruricolist/serapeum
tree-case.lisp
(in-package :serapeum.tests) (def-suite tree-case :in serapeum) (in-suite tree-case) (test tree-case (is (null (tree-case 0))) (is (= 0 (tree-case 0 (0 0)))) (is (= 0 (tree-case 0 (0 0) (1 1)))) (is (= 0 (tree-case 0 (0 0) (-1 -...
null
https://raw.githubusercontent.com/ruricolist/serapeum/d98b4863d7cdcb8a1ed8478cc44ab41bdad5635b/tests/tree-case.lisp
lisp
(in-package :serapeum.tests) (def-suite tree-case :in serapeum) (in-suite tree-case) (test tree-case (is (null (tree-case 0))) (is (= 0 (tree-case 0 (0 0)))) (is (= 0 (tree-case 0 (0 0) (1 1)))) (is (= 0 (tree-case 0 (0 0) (-1 -...
76245407d17aac32b22710622f60d9c5de1edc72d863b335d5a2eacbda062af9
drapanjanas/pneumatic-tubes
core.cljs
(ns group-chat.core (:require [reagent.core :as reagent] [re-frame.core :as re-frame] [group-chat.events] [group-chat.subs] [group-chat.views :as views] [group-chat.config :as config])) (when config/debug? (println "dev mode")) (defn mount-root [] (rea...
null
https://raw.githubusercontent.com/drapanjanas/pneumatic-tubes/ea3834ea04e06cd2d4a03da333461a474c0475f5/examples/group-chat/src/cljs/group_chat/core.cljs
clojure
(ns group-chat.core (:require [reagent.core :as reagent] [re-frame.core :as re-frame] [group-chat.events] [group-chat.subs] [group-chat.views :as views] [group-chat.config :as config])) (when config/debug? (println "dev mode")) (defn mount-root [] (rea...
e051a1a73f001e7c872d3dd9672bfe11f4523e960b79392dbfe862f7a79feb6f
dizengrong/erlang_game
util_random.erl
@author dzR < > %% @doc 与随机相关的一些方法 -module (util_random). -export([random_between/2]). -spec random_between(Min::integer(), Max::integer()) -> integer(). @doc从区间[Min , Max]随机一个整形 random_between(Min, Max) -> check_and_set_seed(), Min2 = Min - 1, random:uniform(Max - Min2) + Min2. check_and_set_seed() -> case...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/util/util_random.erl
erlang
@doc 与随机相关的一些方法
@author dzR < > -module (util_random). -export([random_between/2]). -spec random_between(Min::integer(), Max::integer()) -> integer(). @doc从区间[Min , Max]随机一个整形 random_between(Min, Max) -> check_and_set_seed(), Min2 = Min - 1, random:uniform(Max - Min2) + Min2. check_and_set_seed() -> case erlang:get(my_rand...
7597dcd23a0803a74d07e0f64ccce6c03d0635f5cd9e92532459ed12a7759944
REPROSEC/dolev-yao-star
Spec_Frodo_Gen.ml
open Prims let (frodo_gen_matrix_shake_get_r : Prims.nat -> (FStar_UInt8.t, unit) Lib_Sequence.lseq -> Prims.nat -> (FStar_UInt8.t, unit) Lib_Sequence.lseq) = fun n -> fun seed -> fun i -> let tmp = Obj.magic (Lib_ByteSequence.nat_to_intseq_le_ Lib_IntTypes.U8 ...
null
https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Spec_Frodo_Gen.ml
ocaml
open Prims let (frodo_gen_matrix_shake_get_r : Prims.nat -> (FStar_UInt8.t, unit) Lib_Sequence.lseq -> Prims.nat -> (FStar_UInt8.t, unit) Lib_Sequence.lseq) = fun n -> fun seed -> fun i -> let tmp = Obj.magic (Lib_ByteSequence.nat_to_intseq_le_ Lib_IntTypes.U8 ...
93689f9c8fac38d7ded1aa3b95d8dda8a0e80b730b997919ce94c756483d1f1d
sgimenez/laby
state.ml
* Copyright ( C ) 2007 - 2014 The laby team * You have permission to copy , modify , and redistribute under the * terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt . * Copyright (C) 2007-2014 The laby team * You have permission to copy, modify, and redistribute under the * terms of the GPL...
null
https://raw.githubusercontent.com/sgimenez/laby/47f9560eb827790d26900bb553719afb4b0554ea/src/state.ml
ocaml
* Copyright ( C ) 2007 - 2014 The laby team * You have permission to copy , modify , and redistribute under the * terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt . * Copyright (C) 2007-2014 The laby team * You have permission to copy, modify, and redistribute under the * terms of the GPL...
3992dce1dc54c3b56f3fafc4ed163889dad78a093de4f75ac7163e059f8a8ef0
MaskRay/99-problems-ocaml
67.ml
type 'a tree = Leaf | Branch of 'a * 'a tree * 'a tree let rec tree_string = function | Leaf -> "" | Branch (x,l,r) -> String.concat "" [tree_string l; String.make 1 x; tree_string r]
null
https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/61-70/67.ml
ocaml
type 'a tree = Leaf | Branch of 'a * 'a tree * 'a tree let rec tree_string = function | Leaf -> "" | Branch (x,l,r) -> String.concat "" [tree_string l; String.make 1 x; tree_string r]
177293da1050b9c34b9fe8b6e12b38681ee32399d8d1af32d6d5dd5bd5477c12
boxer-project/boxer-sunrise
ufns.lisp
-*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / ufns.lisp , v 1.10.1.1 2017/01/19 11:51:03 martin Exp $ " -*- Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved . (in-package "OPENGL") #| DATE : 9Oct95 | USER : ke...
null
https://raw.githubusercontent.com/boxer-project/boxer-sunrise/1ef5d5a65d00298b0d7a01890b3cd15d78adc1af/src/opengl/ufns.lisp
lisp
rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / ufns.lisp , v 1.10.1.1 2017/01/19 11:51:03 martin Exp $ " -*- DATE : 9Oct95 | USER : ken | PROCESSED FILE : /u/ken/OpenGL/opengl/glu.h glu-error-string - Win32 implmentation includes gluErrorUnicod...
Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved . (in-package "OPENGL") (fli:define-foreign-function (glu-error-string "gluErrorString" :source) ((error-code glenum)) :result-type #+mswindows (w:LPSTR :pass-by :reference) #-mswindows (:reference :lisp-string-array) :langua...
ee705e8a5541455557c6ad4ec92cc1695076adb96b0e5972eb78d652bd2b24e4
plumatic/plumbing
map_test.cljc
(ns plumbing.map-test (:refer-clojure :exclude [flatten]) (:require [plumbing.core :as plumbing] [plumbing.map :as map] [clojure.string :as str] #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [is deftest testing use-fixtures]])) #?(:cljs (:require-macros [plumbing.map :as...
null
https://raw.githubusercontent.com/plumatic/plumbing/e75142a40fdf83613d48c390383a7c5813c5149c/test/plumbing/map_test.cljc
clojure
Ops on graphs represented as maps.
(ns plumbing.map-test (:refer-clojure :exclude [flatten]) (:require [plumbing.core :as plumbing] [plumbing.map :as map] [clojure.string :as str] #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [is deftest testing use-fixtures]])) #?(:cljs (:require-macros [plumbing.map :as...
ae03d13020408b31b04598e586f35907e2820b48056bacc22abe82e09d81bcd0
helium/erlang-libp2p
libp2p_swarm_sup.erl
-module(libp2p_swarm_sup). -behaviour(supervisor). %% API -export([ start_link/1, sup/1, opts/1, name/1, pubkey_bin/1, register_server/1, server/1, register_gossip_group/1, gossip_group/1, register_peerbook/1, peerbook/1 ]). %% Supervisor callbacks -export([init/1]). -define(SUP, swarm_sup). -de...
null
https://raw.githubusercontent.com/helium/erlang-libp2p/91872365acada482c2b9636a3d503ce5facab238/src/libp2p_swarm_sup.erl
erlang
API Supervisor callbacks ==================================================================== API functions ==================================================================== ==================================================================== Supervisor callbacks =================================================...
-module(libp2p_swarm_sup). -behaviour(supervisor). -export([ start_link/1, sup/1, opts/1, name/1, pubkey_bin/1, register_server/1, server/1, register_gossip_group/1, gossip_group/1, register_peerbook/1, peerbook/1 ]). -export([init/1]). -define(SUP, swarm_sup). -define(SERVER, swarm_server). -de...
e7e862abe031e013222511e060ab4e5d7c63aa6f8793869f508ad1c72e29568d
fp-works/2019-winter-Haskell-school
AParserSpec.hs
module ScrabbleSpec where import AParser import Control.Applicative import Test.Hspec main :: IO () main = hspec $ do describe "instance Functor Parser" $ do it "should map posInt parser" $ runParser ((+ 2) <$> posInt) "10x" `shouldBe` Just (12, "x") describe "abParser" $ do ...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week10/daniel-mc/AParserSpec.hs
haskell
module ScrabbleSpec where import AParser import Control.Applicative import Test.Hspec main :: IO () main = hspec $ do describe "instance Functor Parser" $ do it "should map posInt parser" $ runParser ((+ 2) <$> posInt) "10x" `shouldBe` Just (12, "x") describe "abParser" $ do ...
b71d0daed9a6e4a12270cd5d7a68416d7a478686db1766e1888764905753a35e
donatello/minio-hs-archived
ByteString.hs
# LANGUAGE FlexibleInstances # module Network.Minio.Data.ByteString ( stripBS , UriEncodable(..) ) where import qualified Data.ByteString as B import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Char8 as BC8 import qualified Data.ByteString.Lazy as LB import Data.Char (i...
null
https://raw.githubusercontent.com/donatello/minio-hs-archived/c808dc1be2a5b15c2c714c0052f1d6a7bc98a809/src/Network/Minio/Data/ByteString.hs
haskell
| URI encode a char according to AWS S3 signing rules - see -v4-header-based-auth.html
# LANGUAGE FlexibleInstances # module Network.Minio.Data.ByteString ( stripBS , UriEncodable(..) ) where import qualified Data.ByteString as B import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Char8 as BC8 import qualified Data.ByteString.Lazy as LB import Data.Char (i...
f2548d20d126c3c46f87231132638035492e3c39929efc3e29a83f5f2a98febc
gstew5/cs4100-public
exp.mli
type id = string type unop = UNot type binop = | BPlus | BMinus | BTimes | BDiv (* arithmetic operators *) | BAnd (* boolean operators *) | BLt | BIntEq (* comparisons *) type exp = | EInt of int | EFloat of float | EBool of bool | EUnop of ...
null
https://raw.githubusercontent.com/gstew5/cs4100-public/53c99e3e87331aa5dfa9161ca350a8e23acee739/tyckeck-example/exp.mli
ocaml
arithmetic operators boolean operators comparisons
type id = string type unop = UNot type binop = type exp = | EInt of int | EFloat of float | EBool of bool | EUnop of unop * exp | EBinop of binop * exp * exp | EVar of id | ELet of id * exp * exp
6a791c67738977ce7a1490bc2ff94152f2b901c6aa877fa17fbc13e2382faa09
EgorDm/fp-pacman
Base.hs
module Game.Rules.Base ( module Game.Rules.Rules, module Game.Rules.BaseRules ) where import Game.Rules.Rules import Game.Rules.BaseRules
null
https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Game/Rules/Base.hs
haskell
module Game.Rules.Base ( module Game.Rules.Rules, module Game.Rules.BaseRules ) where import Game.Rules.Rules import Game.Rules.BaseRules
79708d07ed8127770861f05bae70883e118302d6ac30c002a10337f2db24507b
Armael/conch
common.ml
let die ~where fmt = Format.kasprintf (fun s -> Format.fprintf Format.err_formatter "ERR (%s): %s\n" where s; exit 1 ) fmt type ident = string module IdentMap : Map.S with type key := ident = Map.Make(String) module IdentSet : Set.S with type elt := ident = Set.Make(String) type const = | C8 of int | ...
null
https://raw.githubusercontent.com/Armael/conch/8a72f98a8d29cb8f678a69db95d5b68964304053/lib/common.ml
ocaml
let die ~where fmt = Format.kasprintf (fun s -> Format.fprintf Format.err_formatter "ERR (%s): %s\n" where s; exit 1 ) fmt type ident = string module IdentMap : Map.S with type key := ident = Map.Make(String) module IdentSet : Set.S with type elt := ident = Set.Make(String) type const = | C8 of int | ...
02d16303d1ef4cc676fa248ea34d86b1a5730a9bf9fae2647125630ff94aa12b
softwarelanguageslab/maf
R5RS_various_grid-1.scm
; Changes: * removed : 1 * added : 0 * swaps : 0 * negated predicates : 1 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((make-grid (lambda (start dims) (let ((v (make-vector (car dims) start))) (if (not (null? (cdr dims))) (let...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_grid-1.scm
scheme
Changes: * swapped branches: 0 * calls to id fun: 0
* removed : 1 * added : 0 * swaps : 0 * negated predicates : 1 (letrec ((make-grid (lambda (start dims) (let ((v (make-vector (car dims) start))) (if (not (null? (cdr dims))) (letrec ((loop (lambda (i) ...