_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
8b872694874a44468de425b8232277d972c92d2023222bb8a5e77da5ac4f2578
khotyn/4clojure-answer
28-flatten-a-sequence.clj
(fn [coll] (letfn [(my-flatten [coll] (if coll (let [s (seq coll) f (first s)] (concat (if (sequential? f) (my-flatten f) (cons f '())) ...
null
https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/28-flatten-a-sequence.clj
clojure
(fn [coll] (letfn [(my-flatten [coll] (if coll (let [s (seq coll) f (first s)] (concat (if (sequential? f) (my-flatten f) (cons f '())) ...
d8144dd1a4bb7588d337b9661dbfd1a4d7f2ce6e03b84d9382546e095ceedf62
NetworkVerification/nv
MapUnrollingUtils.mli
open Nv_lang.Collections (** Each entry in this list is: * A map type * The set of constant keys that are used for the map * The set of symbolic variable keys that are used for the map Note the nested tuple type. *) type maplist = (Nv_lang.Syntax.ty * (ExpSet.t * VarSet.t)) list val maplist_to_string ...
null
https://raw.githubusercontent.com/NetworkVerification/nv/e76824c537dcd535f2224b31f35cd37601a60957/src/lib/transformations/mapUnrolling/MapUnrollingUtils.mli
ocaml
* Each entry in this list is: * A map type * The set of constant keys that are used for the map * The set of symbolic variable keys that are used for the map Note the nested tuple type. * Given a program on which type inference has been run, goes through it and returns a list of each map type which ...
open Nv_lang.Collections type maplist = (Nv_lang.Syntax.ty * (ExpSet.t * VarSet.t)) list val maplist_to_string : maplist -> string val collect_map_types_and_keys : Nv_lang.Syntax.declarations -> maplist
89a0b3d919ad269d7800e6954bdff342ce686b268e59a0284495881b6e6ef474
racket/plai
names.rkt
#lang plai/gc2/mutator (allocator-setup "../good-collectors/good-collector.rkt" 10) (let ([f (λ (x) x)]) f)
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/good-mutators/names.rkt
racket
#lang plai/gc2/mutator (allocator-setup "../good-collectors/good-collector.rkt" 10) (let ([f (λ (x) x)]) f)
2aae5007d1b79648a8ece7222e1a804e89e71fda1edc8fac4f365528105ea71a
ondrap/dynamodb-simple
THLens.hs
{-# LANGUAGE CPP #-} # LANGUAGE TemplateHaskell # -- | Create polymorphic lens to access table & indexes module Database.DynamoDB.THLens where import Control.Lens (over, _1) import Control.Monad (forM_) import Control.Monad.Trans.Class ...
null
https://raw.githubusercontent.com/ondrap/dynamodb-simple/fb7e3fe37d7e534161274cfd812cd11a82cc384b/src/Database/DynamoDB/THLens.hs
haskell
# LANGUAGE CPP # | Create polymorphic lens to access table & indexes | Create lenses if the field in the primary table starts with _. class Test_lens_field00 a b | a -> b where _field :: Functor f => (b -> f b) -> a -> f a instance Test_lens_field00 Test (Maybe T.Text) where field f t = (\txt -> ...
# LANGUAGE TemplateHaskell # module Database.DynamoDB.THLens where import Control.Lens (over, _1) import Control.Monad (forM_) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Writer.Lazy (WriterT, tell) import ...
5cde716cd1eb192714135e16300637c982c92d7aeeba11d9872170f99e1f7cf5
Risto-Stevcev/bastet
Test_JsFunctions.ml
open BsMocha.Mocha open BsChai.Expect.Expect open BsChai.Expect.Combos.End open! Functors ;; describe "Functions" (fun () -> describe "Traversable" (fun () -> describe "Array" (fun () -> describe "Scan" (fun () -> let scan_left, scan_right = let open ArrayF.Int...
null
https://raw.githubusercontent.com/Risto-Stevcev/bastet/030db286f57d2e316897f0600d40b34777eabba6/bastet_js/test/Test_JsFunctions.ml
ocaml
open BsMocha.Mocha open BsChai.Expect.Expect open BsChai.Expect.Combos.End open! Functors ;; describe "Functions" (fun () -> describe "Traversable" (fun () -> describe "Array" (fun () -> describe "Scan" (fun () -> let scan_left, scan_right = let open ArrayF.Int...
1e108996c30108c00561ca67113dc31e423f5d13e1497d285ce2f50f752ad19c
mfikes/coal-mine
problem_8.cljc
(ns coal-mine.problem-8 (:require [coal-mine.checks :refer [defcheck-8] :rename {defcheck-8 defcheck}] [clojure.test] [clojure.set])) (defcheck solution-1550092 #{:a :b :d :c }) (defcheck solution-27e70ccc #{:d :c :b :a}) (defcheck solution-2aa50037 #{:a :c :b :d}) (defcheck solution...
null
https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_8.cljc
clojure
(ns coal-mine.problem-8 (:require [coal-mine.checks :refer [defcheck-8] :rename {defcheck-8 defcheck}] [clojure.test] [clojure.set])) (defcheck solution-1550092 #{:a :b :d :c }) (defcheck solution-27e70ccc #{:d :c :b :a}) (defcheck solution-2aa50037 #{:a :c :b :d}) (defcheck solution...
2ec9839fee9b647de2acc22c916371a0c05f15ef2e92d863e24bd724a57e7c56
mbj/stratosphere
NetworkConfigProperty.hs
module Stratosphere.SageMaker.MonitoringSchedule.NetworkConfigProperty ( module Exports, NetworkConfigProperty(..), mkNetworkConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.SageMaker.M...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/MonitoringSchedule/NetworkConfigProperty.hs
haskell
# SOURCE #
module Stratosphere.SageMaker.MonitoringSchedule.NetworkConfigProperty ( module Exports, NetworkConfigProperty(..), mkNetworkConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import ...
ce930bdabdf624317a815008228d1b8728881bc7f483d277b635b0cb070712cc
input-output-hk/cardano-ledger
Body.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # module Cardano.Ledger.Api.Tx.Body ( -- | Building and inspecting transaction outputs module Cardano.Ledger.Api.Tx.Out, | Working with Timelock scripts and scripts module Cardano.Ledger.Api.Scripts...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-api/src/Cardano/Ledger/Api/Tx/Body.hs
haskell
# LANGUAGE RankNTypes # | Building and inspecting transaction outputs * Allegra Era * Alonzo Era * Babbage Era
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Cardano.Ledger.Api.Tx.Body ( module Cardano.Ledger.Api.Tx.Out, | Working with Timelock scripts and scripts module Cardano.Ledger.Api.Scripts, EraTxBody (..), * Era ShelleyTxBody, ShelleyEraTxBody (..), Alle...
3e1703d30b7011f6dcdecd2c2abd5138b9be97ca8ebabcc5022658ca29fbf381
xively/clj-mqtt
puback_test.clj
(ns mqtt.packets.puback-test (:use clojure.test mqtt.test-helpers mqtt.decoder mqtt.encoder mqtt.packets.common mqtt.packets.puback) (:import [io.netty.buffer Unpooled] [io.netty.handler.codec EncoderException])) (deftest puback-validate-message-test (testing "n...
null
https://raw.githubusercontent.com/xively/clj-mqtt/74964112505da717ea88279b62f239146450528c/test/mqtt/packets/puback_test.clj
clojure
fixed header remaining length message id fixed header remaining length message id
(ns mqtt.packets.puback-test (:use clojure.test mqtt.test-helpers mqtt.decoder mqtt.encoder mqtt.packets.common mqtt.packets.puback) (:import [io.netty.buffer Unpooled] [io.netty.handler.codec EncoderException])) (deftest puback-validate-message-test (testing "n...
854c5f71f4ab1e1f5e556408b5a35d20d78ac20c4af1b5b25b9410647ee53c7f
thierry-martinez/stdcompat
arg.mli
type spec = | Unit of (unit -> unit) | Bool of (bool -> unit) | Set of bool ref | Clear of bool ref | String of (string -> unit) | Set_string of string ref | Int of (int -> unit) | Set_int of int ref | Float of (float -> unit) | Set_float of float ref | Tuple of spec list | Symbol of ...
null
https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/3.12/arg.mli
ocaml
type spec = | Unit of (unit -> unit) | Bool of (bool -> unit) | Set of bool ref | Clear of bool ref | String of (string -> unit) | Set_string of string ref | Int of (int -> unit) | Set_int of int ref | Float of (float -> unit) | Set_float of float ref | Tuple of spec list | Symbol of ...
2d52d0f6e816fd278c06cc5804eeae5428f9a3653964dac93ba6377f0a8ea62e
snowleopard/hadrian
TestSettings.hs
-- | We create a file <root>/test/ghcconfig containing configuration of test -- | compiler. We need to search this file for required keys and setting | required for testsuite e.g. WORDSIZE , HOSTOS etc . module Oracles.TestSettings (TestSetting (..), testSetting, testRTSSettings) where import Base import Hadrian.Or...
null
https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Oracles/TestSettings.hs
haskell
| We create a file <root>/test/ghcconfig containing configuration of test | compiler. We need to search this file for required keys and setting | Lookup a test setting in @ghcconfig@ file. | To obtain RTS ways supported in @ghcconfig@ file, use 'testRTSSettings'. | Get the RTS ways of the test compiler
| required for testsuite e.g. WORDSIZE , HOSTOS etc . module Oracles.TestSettings (TestSetting (..), testSetting, testRTSSettings) where import Base import Hadrian.Oracles.TextFile testConfigFile :: Action FilePath testConfigFile = buildRoot <&> (-/- "test/ghcconfig") | Test settings that are obtained from ghcc...
13a0c168a76019a6c726c6f3f09a16bb43bff2da40d037a0b5e18f285d2048c6
tsurucapital/franz
Contents.hs
# LANGUAGE NamedFieldPuns # {-# LANGUAGE BangPatterns #-} # LANGUAGE RecordWildCards # module Database.Franz.Contents ( Contents , Database.Franz.Internal.Contents.indexNames , Item(..) , toList , toVector , last , length , index , lookupIndex ) where import qualified Data.ByteString.Char8 as B imp...
null
https://raw.githubusercontent.com/tsurucapital/franz/6894defd76d9be45af5abf59e2325baae109bef6/src/Database/Franz/Contents.hs
haskell
# LANGUAGE BangPatterns #
# LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # module Database.Franz.Contents ( Contents , Database.Franz.Internal.Contents.indexNames , Item(..) , toList , toVector , last , length , index , lookupIndex ) where import qualified Data.ByteString.Char8 as B import qualified Data.Vector as V...
c90ada6ace558b5544785a8ce8599b4e492e76ee2e1d53fddfd3920136d19447
gafiatulin/codewars
Palindromic.hs
-- Palindromic Numbers -- / module Palindromic where palindromize :: Integer -> (Int, Integer) palindromize x | (== show x) . reverse . show $ x = (0, x) | otherwise = (\(k, p) -> (k+1, p)) . palindromize . (+x) . read . reverse . show $ x
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Palindromic.hs
haskell
Palindromic Numbers /
module Palindromic where palindromize :: Integer -> (Int, Integer) palindromize x | (== show x) . reverse . show $ x = (0, x) | otherwise = (\(k, p) -> (k+1, p)) . palindromize . (+x) . read . reverse . show $ x
41b75cb3de9aa56ca7675f764404d418e606cc2a37afc7dd44a21ee02c265754
frodwith/cl-urbit
cell-meta.lisp
(defpackage #:urbit/nock/cell-meta (:use #:cl #:urbit/nock/data #:urbit/nock/mug #:urbit/nock/ideal) (:import-from #:alexandria #:when-let) (:export #:cell-meta #:define-cell-methods)) (in-package #:urbit/nock/cell-meta) ; for defining "dumb" cells - you need a place to store a head, tail, ; and a meta object. ...
null
https://raw.githubusercontent.com/frodwith/cl-urbit/65af924ee58c4c974056f369158bbc1401308fea/nock/cell-meta.lisp
lisp
for defining "dumb" cells - you need a place to store a head, tail, and a meta object. DEFINE-CELL-METHODS will do the rest.
(defpackage #:urbit/nock/cell-meta (:use #:cl #:urbit/nock/data #:urbit/nock/mug #:urbit/nock/ideal) (:import-from #:alexandria #:when-let) (:export #:cell-meta #:define-cell-methods)) (in-package #:urbit/nock/cell-meta) (deftype cell-meta () '(or null mug core-speed (cons mug core-speed) icell)) (defmacro ...
8e6ab1b58c7fdf5f45448be4053076effe239e4050202ddefbcbeeba2c1d2d81
whamtet/cljs-pdfkit
util.cljc
(ns cljs-pdfkit.util) (defn capitalize [s] (str (.toUpperCase (.substring s 0 1)) (.substring s 1))) (defn camelize [kw] (let [ [a & b] (.split (name kw) "-") b (map capitalize b) ] (symbol (apply str a b)))) (defn key-map [f m] (zipmap (map f (keys m)) (vals m))) #?(:cljs (defn...
null
https://raw.githubusercontent.com/whamtet/cljs-pdfkit/b0e0b9c18df2442ffb0be049107ce3aef9f92037/src/cljs_pdfkit/util.cljc
clojure
(ns cljs-pdfkit.util) (defn capitalize [s] (str (.toUpperCase (.substring s 0 1)) (.substring s 1))) (defn camelize [kw] (let [ [a & b] (.split (name kw) "-") b (map capitalize b) ] (symbol (apply str a b)))) (defn key-map [f m] (zipmap (map f (keys m)) (vals m))) #?(:cljs (defn...
b0cc600fa6ff5b65e06a7981fe38f759103e76788588b43de0ca6429af47bd03
finkel-lang/finkel
p08.hs
main = putStrLn "plugin/p08.hs"
null
https://raw.githubusercontent.com/finkel-lang/finkel/74ce4bb779805ad2b141098e29c633523318fa3e/finkel-kernel/test/data/plugin/p08.hs
haskell
main = putStrLn "plugin/p08.hs"
118c0c45ece12d5c520a1190648e048a78cedab6b757191f971d54e4fc23c8a1
lamdu/momentu
dropdownlist.hs
# LANGUAGE NoImplicitPrelude , DisambiguateRecordFields # module Main (main) where import Control.Lens.Operators import qualified Data.IORef as IORef import Data.IORef (IORef) import qualified Data.Property as Property import Data.Text (Text) import GUI.Momentu ((/-/)) import q...
null
https://raw.githubusercontent.com/lamdu/momentu/b287a15f0467176628b0eedf8c70907723a51e69/examples/dropdownlist.hs
haskell
# LANGUAGE NoImplicitPrelude , DisambiguateRecordFields # module Main (main) where import Control.Lens.Operators import qualified Data.IORef as IORef import Data.IORef (IORef) import qualified Data.Property as Property import Data.Text (Text) import GUI.Momentu ((/-/)) import q...
e44b254e9a3ac1a1e82dd16de5d53cf3f19a65fa417f026d8a1b4acae31b0647
mvdcamme/meta-tracing-JIT
Rec interpreter direct.scm
;;;; Basic recursive Slip interpreter. ;;;; This is a stand-alone interpreter and should not be executed by another interpreter. ;;;; It contains no annotations for tracing. ;;;; It can be used to verify that the semantics of the other recursive Slip interpreter ;;;; (which are based on this interpreter) are correct. ...
null
https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/benchmarks/Slip%20interpreters/Rec%20interpreter%20direct.scm
scheme
Basic recursive Slip interpreter. This is a stand-alone interpreter and should not be executed by another interpreter. It contains no annotations for tracing. It can be used to verify that the semantics of the other recursive Slip interpreter (which are based on this interpreter) are correct. Binds the symbol 'ra...
(begin (define (assocv el lst) (cond ((null? lst) #f) ((eq? (vector-ref (car lst) 0) el) (car lst)) (else (assocv el (cdr lst))))) (define debug '()) (define (map f lst) (define (loop list acc) (if (null? list) (reverse acc) (loop (cdr list) (cons (...
40171649864f9e532c72817fe9454c63c9f344d4432d33852d0a142ce301f26c
tallaproject/onion
onion_base64.erl
%%% Copyright ( c ) 2016 The Talla Authors . All rights reserved . %%% Use of this source code is governed by a BSD-style %%% license that can be found in the LICENSE file. %%% %%% ----------------------------------------------------------- @author < > %%% @doc Base64 wrapper API %%% %%% This module contains a b...
null
https://raw.githubusercontent.com/tallaproject/onion/d0c3f86c726c302744d3cfffa2de21f85c190cf0/src/onion_base64.erl
erlang
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ----------------------------------------------------------- @doc Base64 wrapper API This module contains a base64 API that allows us to encode and decode binaries without the ordinary Base64 padding. @end -----...
Copyright ( c ) 2016 The Talla Authors . All rights reserved . @author < > -module(onion_base64). -export([encode/1, decode/1, valid/1 ]). -export_type([base64_encoded/0]). -type base64_encoded() :: binary(). -include("onion_test.hrl"). -define(BASE64_ALPHABET, lists:seq($0, $9) ++...
a87f7b355c8446197c02b9a74ad612337121cfefc1f7c82bd4be48d611092d0c
dannypsnl/k
info.rkt
#lang info (define collection 'multi) (define deps '()) (define build-deps '("base" "rackunit-lib" "k-core" "k-lib")) (define update-implies '("k-core" "k-lib")) (define pkg-desc "test of k") (define pkg-authors '(dannypsnl cybai))
null
https://raw.githubusercontent.com/dannypsnl/k/2b5f5066806a5bbd0733b781a2ed5fce6956a4f5/k-test/info.rkt
racket
#lang info (define collection 'multi) (define deps '()) (define build-deps '("base" "rackunit-lib" "k-core" "k-lib")) (define update-implies '("k-core" "k-lib")) (define pkg-desc "test of k") (define pkg-authors '(dannypsnl cybai))
d663de491f515429cb7b191f4bb0ab769a1422578f29c7bc826e8cf4a705796b
learningclojurescript/code-examples
outer.cljs
(ns cljs-modules.outer (:require [om.core :as om] [om.dom :as dom :include-macros true] [cljs-modules.render :as render] [cljs-modules.modules :as modules])) (defn outer-component [app owner opts] (reify om/IRender (render [_] (dom/div #js {} nil (dom/h1...
null
https://raw.githubusercontent.com/learningclojurescript/code-examples/fdbd0e35ae5a16d53f1f784a52c25bcd4e5a8097/chapter-6/cljs-modules/src/cljs_modules/outer.cljs
clojure
(ns cljs-modules.outer (:require [om.core :as om] [om.dom :as dom :include-macros true] [cljs-modules.render :as render] [cljs-modules.modules :as modules])) (defn outer-component [app owner opts] (reify om/IRender (render [_] (dom/div #js {} nil (dom/h1...
ba272f812458801edde33785ab17ed9fdac0d353f6add48dda073f6e02cdab6c
gedge-platform/gedge-platform
amqp10_client_sessions_sup.erl
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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(amqp10_client_sessions_sup). -behaviour(s...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp10_client/src/amqp10_client_sessions_sup.erl
erlang
Private API. Supervisor callbacks. ------------------------------------------------------------------- Private API. ------------------------------------------------------------------- ------------------------------------------------------------------- Supervisor callbacks. ------------------------------------...
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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(amqp10_client_sessions_sup). -behaviour(supervi...
244bf4d6df5f1993bd9b1fd6cc85e5b1eaca6c2f7b93b4535be13eece2fe8181
bia-technologies/statsbit
health_test.clj
Copyright 2020 BIA - Technologies Limited Liability Company ;; 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 t...
null
https://raw.githubusercontent.com/bia-technologies/statsbit/4102ca5e5d39b1c06541b49615c6de83e7f4ef36/backend/test/ru/bia_tech/statsbit/http/health_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governi...
Copyright 2020 BIA - Technologies Limited Liability Company distributed under the License is distributed on an " AS IS " BASIS , (ns ru.bia-tech.statsbit.http.health-test (:require [ru.bia-tech.statsbit.http.handler :as handler] [ru.bia-tech.statsbit.test.fixtures :as fixtures] [ring.mock.request :as ...
33343f1d4719647d8623a1598fe6f1b755b466972b253077257517cb73ab2ad0
sol/doctest
Foo.hs
module Foo where -- $setup -- >>> import Test.QuickCheck > > > let arbitraryEven = ( * 2 ) ` fmap ` arbitrary -- | -- prop> forAll arbitraryEven even foo = undefined
null
https://raw.githubusercontent.com/sol/doctest/ec6498542986b659f50e961b02144923f6f41eba/test/integration/property-setup/Foo.hs
haskell
$setup >>> import Test.QuickCheck | prop> forAll arbitraryEven even
module Foo where > > > let arbitraryEven = ( * 2 ) ` fmap ` arbitrary foo = undefined
6df70e54494bc5ddf3595f515b93702acda6e62e4d24dad4654a84537d7b8acb
serokell/log-warper
LogHandler.hs
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # | Module : System . Log . LogHandler Copyright : Copyright ( C ) 2004 - 2011 License : BSD3 Maintainer : < > Stability : provisional Portability : portable Definition of log handler support For some handle...
null
https://raw.githubusercontent.com/serokell/log-warper/a6dd74a1085e8c6d94a4aefc2a036efe30f6cde5/src/System/Wlog/LogHandler.hs
haskell
* Basic Types | Logs an event if it meets the requirements given by the most recent call to 'setLevel'. | Tag identifying handlers. | This is the base class for the various log handlers. They should all adhere to this class. | Tag of handler. Is arbitrary. Made for identification. | Sets the log level. 'handle...
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # | Module : System . Log . LogHandler Copyright : Copyright ( C ) 2004 - 2011 License : BSD3 Maintainer : < > Stability : provisional Portability : portable Definition of log handler support For some handle...
73e129bbb71f2f5ee2fa0ad72f868bbe9963431d7ba5f395c67228e17789e909
NorfairKing/easyspec
Nine.hs
# LANGUAGE NoImplicitPrelude # module Nine where import Prelude ((+), (-), concat, drop, map, take) {-# ANN module "HLint: ignore Use foldr" #-} myId :: a -> a myId a = a myPlusPlus :: [a] -> [a] -> [a] myPlusPlus (a:as) bs = a : myPlusPlus as bs myPlusPlus [] bs = bs myReverse :: [a] -> [a] myReverse [] = [] myR...
null
https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/runtime/Nine.hs
haskell
# ANN module "HLint: ignore Use foldr" #
# LANGUAGE NoImplicitPrelude # module Nine where import Prelude ((+), (-), concat, drop, map, take) myId :: a -> a myId a = a myPlusPlus :: [a] -> [a] -> [a] myPlusPlus (a:as) bs = a : myPlusPlus as bs myPlusPlus [] bs = bs myReverse :: [a] -> [a] myReverse [] = [] myReverse (a:as) = as `myPlusPlus` [a]
36579107871124b34e4d301c115f7ee7d3cf30fb7578a3f3a3b8abbec3845557
fragnix/fragnix
Control.Concurrent.STM.TChan.hs
{-# LANGUAGE Haskell2010 #-} # LINE 1 " Control / Concurrent / STM / TChan.hs " # # OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE CPP , DeriveDataTypeable # # LANGUAGE Trustworthy # -----------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Control.Concurrent.STM.TChan.hs
haskell
# LANGUAGE Haskell2010 # --------------------------------------------------------------------------- | Module : Control.Concurrent.STM.TChan License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental ----------------------------------------------------------...
# LINE 1 " Control / Concurrent / STM / TChan.hs " # # OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE CPP , DeriveDataTypeable # # LANGUAGE Trustworthy # Copyright : ( c ) The University of Glasgow 2004 Portability : non - portable ( requires STM ) ...
1b7bcf06aada85fc649931713fb0879a8b554740f46802672bdab240f9e3d382
ejgallego/coq-serapi
ser_stm.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_stm.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2016 MINES ParisT...
c2747d849a33c577ba2f104f68e845e35d324e11f8c9c3532d92d742038b13ee
penpot/penpot
libraries.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.data.workspace.libraries (:require [app.common.data :as d] [app.common.files.features :as...
null
https://raw.githubusercontent.com/penpot/penpot/62aa6569f258829d36bbdf7d43819fe876f6b8b2/frontend/src/app/main/data/workspace/libraries.cljs
clojure
Copyright (c) KALEIDOS INC Change this to :info :debug or :trace to debug this module, or :warn to reset to default NOTE: we need to ensure the component exists, because there are small possibilities of race conditions with component deletion. Give the same name to the root shape Make a new main instance, with ...
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.data.workspace.libraries (:require [app.common.data :as d] [app.common.files.features :as ffeat] [app.common.geom.point...
677edb06b2c2c8cae841b2b390f1d7b5143818327109de43396474ea31f8bbee
ml4tp/tcoq
kindops.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/library/kindops.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Operations about types defined in ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Decl_kinds val logical...
63dcc56ca9de8d7212d7b51eb37ef48bac48fe16f22c08d086f9b1b0270e6ba3
WormBase/wormbase_rest
expression.clj
(ns rest-api.classes.pseudogene.widgets.expression (:require [rest-api.classes.generic-fields :as generic] [rest-api.formatters.object :as obj :refer [pack-obj]])) (defn microarray-results [p] {:data (some->> (:microarray-results.pseudogene/_pseudogene p) (map :microarray-results/_pseudo...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/pseudogene/widgets/expression.clj
clojure
(ns rest-api.classes.pseudogene.widgets.expression (:require [rest-api.classes.generic-fields :as generic] [rest-api.formatters.object :as obj :refer [pack-obj]])) (defn microarray-results [p] {:data (some->> (:microarray-results.pseudogene/_pseudogene p) (map :microarray-results/_pseudo...
f64c11c9c48e6c2cfc02c1c1f22f2bdcc709226863aa1185fd67f18df32ab7b8
bsansouci/reasonglexampleproject
mylazy.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/reasonglexampleproject/4ecef2cdad3a1a157318d1d64dba7def92d8a924/vendor/camlimages/examples/liv/mylazy.mli
ocaml
********************************************************************* Objective Caml ...
, projet Para , INRIA Rocquencourt Copyright 1997 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 $ I d : mylazy.mli , v 1.1 2002/04/09 1...
eb9045f6cf0206923206ecc70570941be65d3725d9df55b2e95d27728c964e57
odis-labs/onix
Onix_lock_nix.ml
open Prelude let gen_pkg ~lock_dir ~ocaml_version ~gitignore ~with_test ~with_doc ~with_dev_setup (lock_pkg : Lock_pkg.t) = let pkg_name = OpamPackage.name_to_string lock_pkg.opam_details.package in let pkg_lock_dir = lock_dir </> "packages" </> pkg_name in let pkg_default_nix = OpamFilename.mkdir pkg_lo...
null
https://raw.githubusercontent.com/odis-labs/onix/81cc82953ef062425656ac9bf80474f2ce642f5b/src/onix_lock_nix/Onix_lock_nix.ml
ocaml
let nix_pkg = Nix_pkg.resolve_files ~lock_dir nix_pkg in
open Prelude let gen_pkg ~lock_dir ~ocaml_version ~gitignore ~with_test ~with_doc ~with_dev_setup (lock_pkg : Lock_pkg.t) = let pkg_name = OpamPackage.name_to_string lock_pkg.opam_details.package in let pkg_lock_dir = lock_dir </> "packages" </> pkg_name in let pkg_default_nix = OpamFilename.mkdir pkg_lo...
52378667f69af76fcd1687230f6cad8a980c127b8f735c21163b1cc68bc3b757
ocaml/ocaml
pr7553.ml
(* TEST flags = " -w +A -strict-sequence " * expect *) module A = struct type foo end;; [%%expect {| module A : sig type foo end |}] module rec B : sig open A type bar = Bar of foo end = B;; [%%expect {| module rec B : sig type bar = Bar of A.foo end |}] module rec C : sig open A end = C;; [%%expect {| L...
null
https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-warnings/pr7553.ml
ocaml
TEST flags = " -w +A -strict-sequence " * expect
module A = struct type foo end;; [%%expect {| module A : sig type foo end |}] module rec B : sig open A type bar = Bar of foo end = B;; [%%expect {| module rec B : sig type bar = Bar of A.foo end |}] module rec C : sig open A end = C;; [%%expect {| Line 2, characters 2-8: 2 | open A ^^^^^^ Warning 33 [...
30be0ed16fb17657b543096413567dfac1abd148dd59b7c9555dc24d37bfc3fe
zanderso/cil-template
tut2.ml
open Cil module E = Errormsg open Tututil class assignRmVisitor (vname : string) = object(self) inherit nopCilVisitor method vinst (i : instr) = match i with | Set((Var vi, NoOffset), _, loc) when vi.vname = vname && vi.vglob -> E.log "%a: Assignment deleted: %a\n" d_loc loc d_instr i; ...
null
https://raw.githubusercontent.com/zanderso/cil-template/fc2a0548b2644c53c4840df2a09c1c90b2af2aee/src/tut2.ml
ocaml
open Cil module E = Errormsg open Tututil class assignRmVisitor (vname : string) = object(self) inherit nopCilVisitor method vinst (i : instr) = match i with | Set((Var vi, NoOffset), _, loc) when vi.vname = vname && vi.vglob -> E.log "%a: Assignment deleted: %a\n" d_loc loc d_instr i; ...
040a279da6d7164fd5291362001322a6c46648da459d43580653603a496ae4fe
bract/bract.core
project.clj
(defproject bract/bract.core "0.6.2" :description "Multi-purpose, modular Clojure application initialization framework" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :global-vars {*warn-on-reflection* true *assert* true *unchecked-math* :warn-on-b...
null
https://raw.githubusercontent.com/bract/bract.core/625b8738554b1e1b61bd8522397fb698fb12d3d3/project.clj
clojure
(defproject bract/bract.core "0.6.2" :description "Multi-purpose, modular Clojure application initialization framework" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :global-vars {*warn-on-reflection* true *assert* true *unchecked-math* :warn-on-b...
3c0e287f6d602eb55fe3594b936d8f2053583bcc330bffcd98a648d932f17e95
mwand/eopl3
pairval1.scm
(module pairval1 (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "store.scm") (provide (all-defined-out)) ;;;;;;;;;;;;;;;; mutable pairs ;;;;;;;;;;;;;;;; represent a mutable pair as two references . Page : 124 (define-datatype mutpair mutpair? (a-pair (left-loc refere...
null
https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter4/call-by-reference/pairval1.scm
scheme
mutable pairs ;;;;;;;;;;;;;;;; setleft : MutPair * ExpVal -> Unspecified setright : MutPair * ExpVal -> Unspecified
(module pairval1 (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "store.scm") (provide (all-defined-out)) represent a mutable pair as two references . Page : 124 (define-datatype mutpair mutpair? (a-pair (left-loc reference?) (right-loc reference?))) make - p...
49371b42c15d27a4a59f1e382dfca1feb69851202268bf4405706ae146e626db
saep/nvim-hs-ghcid
Main.hs
module Main where import Neovim import qualified Neovim.Ghcid as Ghcid main :: IO () main = neovim defaultConfig{plugins = [Ghcid.plugin]}
null
https://raw.githubusercontent.com/saep/nvim-hs-ghcid/bb31f389542328d2e024858815a4bf179d5fafef/executable/Main.hs
haskell
module Main where import Neovim import qualified Neovim.Ghcid as Ghcid main :: IO () main = neovim defaultConfig{plugins = [Ghcid.plugin]}
721f238f3f69ca273eec8333a095af1aa3d16b925fc57a4c82a901fd7bc33a88
runexec/chp
chp.clj
(ns chp.routes.chp (:use chp.core [cheshire.core :only [generate-string]] [chp.api :only [api->where]] [chp.builder :only [binding-exist?]])) (defchp chp-builder-paths (chp-route "/chp/api" (root-parse "chp/api.chtml")) (chp-route ["/chp/api/:table" :table #"[...
null
https://raw.githubusercontent.com/runexec/chp/9059399c46fb4106a73631c741f1e557af541a8b/src/chp/routes/chp.clj
clojure
turn the :table->:keyword to resources/bindings/keyword.clj. Removing the regex restraints can be potentially dangerous.
(ns chp.routes.chp (:use chp.core [cheshire.core :only [generate-string]] [chp.api :only [api->where]] [chp.builder :only [binding-exist?]])) (defchp chp-builder-paths (chp-route "/chp/api" (root-parse "chp/api.chtml")) (chp-route ["/chp/api/:table" :table #"[...
76d46b42979ab1b21c795466d734be60fe5a3f7de6d932a546adc803052b1f64
ucsd-progsys/liquid-fixpoint
Theories.hs
{-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE CPP # {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE DeriveDataTypeable #-} # OPTIONS_GHC -Wno - orphans # {-# OPTIONS_GHC -Wno-name-shadowing #-} | This module cont...
null
https://raw.githubusercontent.com/ucsd-progsys/liquid-fixpoint/0e1a4725793740f495c26957044c56488d6e1efc/src/Language/Fixpoint/Types/Theories.hs
haskell
# LANGUAGE TypeSynonymInstances # # LANGUAGE DeriveGeneric # # LANGUAGE PatternGuards # # LANGUAGE DeriveDataTypeable # # OPTIONS_GHC -Wno-name-shadowing # * Serialized Representation * Theory Symbol * Theory Sorts * Symbol Environments -----------------------------------------...
# LANGUAGE CPP # # OPTIONS_GHC -Wno - orphans # | This module contains the types defining an SMTLIB2 interface . module Language.Fixpoint.Types.Theories ( Raw , TheorySymbol (..) , Sem (..) , SmtSort (..) , sortSmtSort , isIntSmtSort , SymEnv (....
2fe03daf7ff0e4a9f5886bc283c6c802e6fbfdde0d076d6d6ae9726ad588681d
47degrees/org
state.cljc
(ns org.state) (def default-state {:filter-language nil :order :stars :query ""})
null
https://raw.githubusercontent.com/47degrees/org/3c5038f5f5f1bf97c5930bd94a51e171b33cd027/src/org/state.cljc
clojure
(ns org.state) (def default-state {:filter-language nil :order :stars :query ""})
07a2c26360be79c661deeda9683670500166b99ae9d685df86282c67f765557b
PLTools/GT
test804polyvar.ml
open GT module L : sig type 'a list = [`Nil | `Cons of 'a * 'a list ] [@@deriving gt ~options:{gmap }] end = struct type 'a list = [`Nil | `Cons of 'a * 'a list ] [@@deriving gt ~options:{gmap }] end type 'a maybe = Just of 'a | Nothing [@@deriving gt ~options:{show; fmt }] type 'a ...
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test804polyvar.ml
ocaml
: sig type 'a wtf = [ `C of 'a | 'a pv ] maybe [@@deriving gt ~options:{show; fmt}] end
open GT module L : sig type 'a list = [`Nil | `Cons of 'a * 'a list ] [@@deriving gt ~options:{gmap }] end = struct type 'a list = [`Nil | `Cons of 'a * 'a list ] [@@deriving gt ~options:{gmap }] end type 'a maybe = Just of 'a | Nothing [@@deriving gt ~options:{show; fmt }] type 'a ...
e03db34de4634cdc2d8fcda08bee447ed981f57d62abd713d079581ef2b1be91
talex5/wayland-proxy-virtwl
main.ml
open Lwt.Syntax open Lwt.Infix let ( let*! ) x f = x >>= function | `Ok x -> f x | `Error _ as e -> Lwt.return e let rec listen ~config ~virtio_gpu socket = let* (client, _addr) = Lwt_unix.accept socket in Lwt_unix.set_close_on_exec client; Log.info (fun f -> f "New connection"); Lwt.async (fun () -> ...
null
https://raw.githubusercontent.com/talex5/wayland-proxy-virtwl/6b786639747a0720cc774334a18a81a857641d55/main.ml
ocaml
Start listening for connections to [wayland_display]. Start listening for connections to [x_display] and set $DISPLAY. Listen for incoming X11 client connections, if configured: Run the application (if any), or just wait (if not):
open Lwt.Syntax open Lwt.Infix let ( let*! ) x f = x >>= function | `Ok x -> f x | `Error _ as e -> Lwt.return e let rec listen ~config ~virtio_gpu socket = let* (client, _addr) = Lwt_unix.accept socket in Lwt_unix.set_close_on_exec client; Log.info (fun f -> f "New connection"); Lwt.async (fun () -> ...
13a3cc00f197915cd7889864bb3988da0407f51a887d43a5cc66760e39460238
r0man/sqlingvo.node
async_test.cljs
(ns sqlingvo.node.async-test (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cljs.core.async :as async] [clojure.pprint :refer [pprint]] [clojure.string :as str] [clojure.test :refer [async deftest is testing]] [sqlingvo.core :as sql] [sq...
null
https://raw.githubusercontent.com/r0man/sqlingvo.node/ccb9784f895c7c6fc781c3174b1826cad29ab572/test/sqlingvo/node/async_test.cljs
clojure
(ns sqlingvo.node.async-test (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cljs.core.async :as async] [clojure.pprint :refer [pprint]] [clojure.string :as str] [clojure.test :refer [async deftest is testing]] [sqlingvo.core :as sql] [sq...
185081447ca2da81c0c14b09fef47ff3ad2b4e933fe1e29678c390fed0d07554
inria-parkas/sundialsml
cvode.ml
(***********************************************************************) (* *) (* OCaml interface to Sundials *) (* *) ( ) , ( ) , and...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/src/cvode/cvode.ml
ocaml
********************************************************************* OCaml interface to Sundials ...
( ) , ( ) , and ( LIENS ) Copyright 2014 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed open Sundials include Cvode_impl * NB : The order of variant constructors and record fields is important ! * If these types a...
abe3ef368bfdeb316ca3d6a339f2dea6a8569e7ea2b95df4314f86a4ec24b270
jrm-code-project/LISP-Machine
disk-cadr.lisp
-*- Mode : LISP ; Package : SYSTEM - INTERNALS ; Base:8 ; : T -*- A hardware bug causes this to lose if > 1 page ( Fixed by DC ECO#1 ) ;Returns T if they match and NIL if they don't (DEFUN DISK-READ-COMPARE (RQB UNIT ADDRESS &OPTIONAL (MICROCODE-ERROR-RECOVERY LET-MICROCODE-HANDLE-DISK-ERRORS)...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/io/disk-cadr.lisp
lisp
Package : SYSTEM - INTERNALS ; Base:8 ; : T -*- Returns T if they match and NIL if they don't Get STATUS of a unit by doing OFFSET-CLEAR (nebbish command) to it Leaves the status in the rqb Power up a drive, return T if successful, NIL if timed out A debugging function CCW list Returns T if read-compare differen...
A hardware bug causes this to lose if > 1 page ( Fixed by DC ECO#1 ) (DEFUN DISK-READ-COMPARE (RQB UNIT ADDRESS &OPTIONAL (MICROCODE-ERROR-RECOVERY LET-MICROCODE-HANDLE-DISK-ERRORS) do-not-offset) "Compare data from disk UNIT at block ADDRESS with the data in RQB. The length o...
380c16d4e24321cb2a4092f4fd99d73df1c9d7ba106dcb3f6ff8ee66db7fb842
racket/gui
gl-context.rkt
#lang racket/base (require racket/class racket/promise racket/string ffi/unsafe ffi/unsafe/define ffi/unsafe/alloc ffi/cvector (prefix-in draw: racket/draw/private/gl-context) racket/draw/private/gl-config "../../lock.rkt" "types....
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/gtk/gl-context.rkt
racket
=================================================================================================== X11/GLX FFI X #defines/typedefs/enums GLX #defines/typedefs/enums GLX_CONTEXT_FLAGS_ARB bits =================================================================================================== -> positive-exact-ra...
#lang racket/base (require racket/class racket/promise racket/string ffi/unsafe ffi/unsafe/define ffi/unsafe/alloc ffi/cvector (prefix-in draw: racket/draw/private/gl-context) racket/draw/private/gl-config "../../lock.rkt" "types....
cd19395de28c3fd6025067e67ee72603c196b8848270e1b971ecf5bb9959a283
yonatane/bytegeist
project.clj
(defproject bytegeist "0.1.0-SNAPSHOT" :description "Binary protocol specs for clojure" :url "" :license {:name "MIT License"} :deploy-repositories [["releases" {:url "" :sign-releases false :username :env/clojars_user ...
null
https://raw.githubusercontent.com/yonatane/bytegeist/ba3355965b88a4b4882503e9c3919eba4623d862/project.clj
clojure
(defproject bytegeist "0.1.0-SNAPSHOT" :description "Binary protocol specs for clojure" :url "" :license {:name "MIT License"} :deploy-repositories [["releases" {:url "" :sign-releases false :username :env/clojars_user ...
d240d2d6e577569080c5a190b23e910db85bb6407c138f0bf8ff083f8f0bb226
Opetushallitus/ataru
valintatulosservice_service.clj
(ns ataru.valinta-tulos-service.valintatulosservice_service (:require [ataru.valinta-tulos-service.valintatulosservice-client :as client] [ataru.valinta-tulos-service.valintatulosservice-protocol :refer [ValintaTulosService]] [clojure.set :refer [union]])) (defn- get-hakukohteen-ehdolliset ...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/27f650e0665e2735aab0c4059f766a3fb2826246/src/clj/ataru/valinta_tulos_service/valintatulosservice_service.clj
clojure
(ns ataru.valinta-tulos-service.valintatulosservice_service (:require [ataru.valinta-tulos-service.valintatulosservice-client :as client] [ataru.valinta-tulos-service.valintatulosservice-protocol :refer [ValintaTulosService]] [clojure.set :refer [union]])) (defn- get-hakukohteen-ehdolliset ...
2a1a799bdbb346991b94ec260f926f2e0d2fb0905e69662edb86bcb6ece5fffd
dparis/gen-phzr
array_utils.cljs
(ns phzr.array-utils (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser]) (:refer-clojure :exclude [shuffle])) (defn find-closest- "Snaps a value to the nearest value in an array. The result will always be in the range `[first_valu...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/array_utils.cljs
clojure
this matrix _may_ be altered.
(ns phzr.array-utils (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser]) (:refer-clojure :exclude [shuffle])) (defn find-closest- "Snaps a value to the nearest value in an array. The result will always be in the range `[first_valu...
136283bbc485c48706e466585827af647b8eb8b180eab4134f278a511a110263
softwarelanguageslab/maf
trapr.scm
(define NumWorkers (int-top)) (define Precision (int-top)) (define L (int-top)) (define R (int-top)) (define (exp x) (expt 2.718281828459045 x)) (define (fx x) (let* ((a (sin (- (expt x 3) 1))) (b (+ x 1)) (c (/ a b)) (d (sqrt (+ 1 (exp (sqrt (* 2 x)))))) (r (* c d))) r)) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/contracts/savina/trapr.scm
scheme
(start (workers) (become master-actor workers terms-received result-area)) (define master (create master-actor #f 0 0)) (send master start )
(define NumWorkers (int-top)) (define Precision (int-top)) (define L (int-top)) (define R (int-top)) (define (exp x) (expt 2.718281828459045 x)) (define (fx x) (let* ((a (sin (- (expt x 3) 1))) (b (+ x 1)) (c (/ a b)) (d (sqrt (+ 1 (exp (sqrt (* 2 x)))))) (r (* c d))) r)) ...
a865766321b9838c6f0a8b3c8a11b17807bb73103cf3f8834d66189d49a36bf0
g-andrade/aequitas
aequitas_sup.erl
Copyright ( c ) 2018 - 2022 %% %% 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 limitation %% the rights to use, copy, modify, merge, publish, di...
null
https://raw.githubusercontent.com/g-andrade/aequitas/35c446847e2827a478844231c671e0a52bbed2c5/src/aequitas_sup.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright not...
Copyright ( c ) 2018 - 2022 to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR ...
58c81353fdc648fa49434a4ac56b0bfadfb796cf18bbe32b7ef9a3c5d9b73349
quil-lang/qvm
utilities.lisp
;;;; utilities.lisp ;;;; Author : (in-package #:qvm-app) (defun slurp-lines (&optional (stream *standard-input*)) (flet ((line () (read-line stream nil nil nil))) (with-output-to-string (s) (loop :for line := (line) :then (line) :while line :do (write-line line s))))) (defmacr...
null
https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/app/src/utilities.lisp
lisp
utilities.lisp Functions depending on the server state Sanity check that it's a valid log level at macroexpansion time.
Author : (in-package #:qvm-app) (defun slurp-lines (&optional (stream *standard-input*)) (flet ((line () (read-line stream nil nil nil))) (with-output-to-string (s) (loop :for line := (line) :then (line) :while line :do (write-line line s))))) (defmacro with-timeout (&body bod...
e7d1cffce6ac1783d4d719dde3a26509191c411adbbf6d6ac5b1995899494d00
gtk2hs/gtk2hs
Graph.hs
-- Author : < > -- -- This code is in the public domain. -- Based off Drawing2.hs -- updated to GTK 3 by -- import qualified Graphics.UI.Gtk as G import qualified Graphics.Rendering.Cairo as C import qualified Graphics.Rendering.Cairo.Matrix as M f x = sin (x*5) / (x*5) main = graph f windowSize :: Int...
null
https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/cairo/demo/gtk3/Graph.hs
haskell
This code is in the public domain. area to fill, thus we must explicitly tell it how to draw the window size. press any key to quit Adaptive attempt (falloff func is what really needs work) Set up stuff style and color Set up user coordinates center origin positive y-axis upwards Grid and axes axes grid
Author : < > Based off Drawing2.hs updated to GTK 3 by import qualified Graphics.UI.Gtk as G import qualified Graphics.Rendering.Cairo as C import qualified Graphics.Rendering.Cairo.Matrix as M f x = sin (x*5) / (x*5) main = graph f windowSize :: Int windowSize = 400 graph :: (Double -> Double) -> IO ...
c09e3f91fd8221c374bc0500f058843473c1d02907202a3c11880f63f363e886
FundingCircle/jackdaw
simple_ledger.clj
(ns simple-ledger "This tutorial contains a simple stream processing application using Jackdaw and Kafka Streams. It begins with Pipe which is then extended using an interactive workflow. The result is a simple ledger." (:gen-class) (:require [clojure.spec.alpha :as s] [clojure.tools.logging :r...
null
https://raw.githubusercontent.com/FundingCircle/jackdaw/b4f67106cc12a78d9dcc64b6cba668ab6a804d04/examples/simple-ledger/src/simple_ledger.clj
clojure
Topic Configuration App Template Start Needed to invoke the forms from this namespace. When typing This requires the Confluent Platform CLI which may be obtained are already running, skip this step. Create the topics, and start the app. Write to the input stream. Read from the output stream. Add input vali...
(ns simple-ledger "This tutorial contains a simple stream processing application using Jackdaw and Kafka Streams. It begins with Pipe which is then extended using an interactive workflow. The result is a simple ledger." (:gen-class) (:require [clojure.spec.alpha :as s] [clojure.tools.logging :r...
9d95da3285d8421e712218cf2e69acbbac6106401408d0e3d9541a505f8f2470
gregr/ina
mvector.scm
(define (mvector . args) (let ((x (make-mvector (length args) 0))) (let loop ((i 0) (args args)) (cond ((null? args) x) (else (mvector-set! x i (car args)) (loop (+ i 1) (cdr args))))))) (define (mvector-transform-range! mv start end f) ;; TODO: always requir...
null
https://raw.githubusercontent.com/gregr/ina/236e478c9e2ed6e4ee92bc06b742c97d7b92580c/nscheme/include/base/mvector.scm
scheme
TODO: always requiring (= 0 start) ? That's not very useful.
(define (mvector . args) (let ((x (make-mvector (length args) 0))) (let loop ((i 0) (args args)) (cond ((null? args) x) (else (mvector-set! x i (car args)) (loop (+ i 1) (cdr args))))))) (define (mvector-transform-range! mv start end f) (unless (and (= 0 star...
2a894983edfcb9aae49fd37124ce781033827e52cc0e7f849bd255b2b31da03b
ygrek/mldonkey
gui_downloads.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk/gui/gui_downloads.ml
ocaml
* GUI for the lists of files. try let (row, f) = self#find_file file_num in self#update_file f { f with file_chunks = chunks ; file_availability = avail } row with Not_found -> () method remove_client c = List.iter (fun file -> match file.file_so...
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
1fad9ebc92621652d2003bf1bb067d54484dd53c9d04e52d2995b12a31135f75
protz/mezzo
Mark.ml
(*****************************************************************************) (* Mezzo, a programming language based on permissions *) Copyright ( C ) 2011 , 2012 and (* *) (* This program is free softwar...
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/Mark.ml
ocaml
*************************************************************************** Mezzo, a programming language based on permissions This program is free software: you can redistribute it and/or modify (at your optio...
Copyright ( C ) 2011 , 2012 and it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License type t = unit ref let create () = r...
7ac1aff0f88c28df75ddbc274db8f8cab8df40fbf1fee210f306b4618b92baeb
mbillingr/lisp-in-small-pieces
common.scm
(define-library (06-fast-interpreter common) (export activation-frame-argument activation-frame-argument-length allocate-activation-frame compute-kind definitial description-extend! environment-next g.current g.current-extend! ...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/06-fast-interpreter/common.scm
scheme
The following implementations are not defined in the book, so I'm making them up...
(define-library (06-fast-interpreter common) (export activation-frame-argument activation-frame-argument-length allocate-activation-frame compute-kind definitial description-extend! environment-next g.current g.current-extend! ...
5c15290bfcf0b54fad89c08ff448769da57e4c8822ef60c5bd37e1a56591771e
reflectionalist/S9fES
draw-tree.scm
Scheme 9 from Empty Space , Function Library By , 2009 - 2012 ; Placed in the Public Domain ; ; (draw-tree object) ==> unspecific ; ; Print a tree structure resembling a Scheme datum. Each cons cell is represented by [ ] with lines leading to their car and cdr parts . Conses with a cdr value of ( ) are re...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/contrib/draw-tree.scm
scheme
Placed in the Public Domain (draw-tree object) ==> unspecific Print a tree structure resembling a Scheme datum. Each cons (Example): (draw-tree '((a) (b . c) (d e))) ==> unspecific Output: [o|o]---[o|o]---[o|/] | | | | | | ...
Scheme 9 from Empty Space , Function Library By , 2009 - 2012 cell is represented by [ ] with lines leading to their car and cdr parts . Conses with a cdr value of ( ) are represented by [ ] . [ ] | [ o|o]---[o|/ ] (define (draw-tree n) (define *nothing* (cons 'N '())...
4b43d1c24db238e740f20ffca4425dfabf4acabd0cc25bc3b24c4c24b47fb930
haskell-gi/haskell-gi
GIHelper.hs
module GIHelper(dialogRun, dialogAddButton) where import qualified GI.Cairo import qualified GI.Gtk as GTK import qualified Data.Text as Text dialogRun :: GTK.IsDialog a => a -> IO GTK.ResponseType dialogRun dialog = toEnum . fromIntegral <$> GTK.dialogRun dialog dialogAddButton :: GTK.IsDialog a => a -> Stri...
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/253a34ba08b968b62f9ed3d199d943551b5fe6aa/cairo/examples/hlabyrinth/src/GIHelper.hs
haskell
module GIHelper(dialogRun, dialogAddButton) where import qualified GI.Cairo import qualified GI.Gtk as GTK import qualified Data.Text as Text dialogRun :: GTK.IsDialog a => a -> IO GTK.ResponseType dialogRun dialog = toEnum . fromIntegral <$> GTK.dialogRun dialog dialogAddButton :: GTK.IsDialog a => a -> Stri...
2a55421dfc5f6cbff33570a4c994cb2ee07f70aea7f82d419487878f4b33ce2d
databrary/databrary
Tag.hs
# LANGUAGE TemplateHaskell , QuasiQuotes , RecordWildCards , OverloadedStrings , module Model.Tag ( module Model.Tag.Types , lookupTag , lookupTags , findTags , addTag , lookupVolumeTagUseRows , addTagUse , removeTagUse , lookupTopTagWeight , lookupTagCoverage , lookupSlotTagCoverage , lookupS...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Tag.hs
haskell
TagName restrictions obviate pattern escaping [pgSQL|!SELECT get_tag(${n})|] (insertTagUse True 't) (insertTagUse False 't)) (deleteTagUse True 't) (deleteTagUse False 't))
# LANGUAGE TemplateHaskell , QuasiQuotes , RecordWildCards , OverloadedStrings , module Model.Tag ( module Model.Tag.Types , lookupTag , lookupTags , findTags , addTag , lookupVolumeTagUseRows , addTagUse , removeTagUse , lookupTopTagWeight , lookupTagCoverage , lookupSlotTagCoverage , lookupS...
fc40e7680d966b2de24e1d0c68ac5484e55b55b2ce065fd1332ff1befbfa92d3
elaforge/karya
Html_test.hs
Copyright 2018 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt # LANGUAGE RecordWildCards # module Solkattu.Format.Html_test where import qualified Data.Text.IO as Text.IO import qualified Util.Html import qualified Solkattu.Dsl.Solkattu as G import...
null
https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Solkattu/Format/Html_test.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2018 # LANGUAGE RecordWildCards # module Solkattu.Format.Html_test where import qualified Data.Text.IO as Text.IO import qualified Util.Html import qualified Solkattu.Dsl.Solkattu as G import qualified Solkattu.Format.Format as Format import qualified Solkattu.Format.Html as Html import qualified Solkat...
42fcd86162ef3f6a7a8131e707025697e97b49d76ae90931520834279320cb05
circuithub/rel8
Identity.hs
# language DataKinds # {-# language FlexibleContexts #-} # language StandaloneKindSignatures # {-# language TypeFamilies #-} {-# language UndecidableInstances #-} module Rel8.Schema.HTable.Identity ( HIdentity( HIdentity, unHIdentity ) ) where -- base import Data.Kind ( Type ) import Data.Type.Equality ( (:~:)( R...
null
https://raw.githubusercontent.com/circuithub/rel8/f47423ec17c36f441bab4c0cbb2036dc8aecacbd/src/Rel8/Schema/HTable/Identity.hs
haskell
# language FlexibleContexts # # language TypeFamilies # # language UndecidableInstances # base rel8
# language DataKinds # # language StandaloneKindSignatures # module Rel8.Schema.HTable.Identity ( HIdentity( HIdentity, unHIdentity ) ) where import Data.Kind ( Type ) import Data.Type.Equality ( (:~:)( Refl ) ) import Prelude import Rel8.Schema.Dict ( Dict( Dict ) ) import Rel8.Schema.HTable ( HTable, HConstr...
59b844c088efc9e4bed99a671f8803e92c8c2cb58c69dea623016354c1d17c92
moby/vpnkit
utils.mli
val somaxconn: int ref (* can be overriden by the command-line *) val rtlGenRandom: int -> bytes option * [ rtlGenRandom len ] returns [ len ] bytes of secure random data on Windows . Returns None if called on non - Windows platforms Returns None if called on non-Windows platforms *) val setSocketTTL: Unix...
null
https://raw.githubusercontent.com/moby/vpnkit/7bfcba6e59c1e5450b667a392bf56371faae58b2/src/hostnet/utils.mli
ocaml
can be overriden by the command-line
val rtlGenRandom: int -> bytes option * [ rtlGenRandom len ] returns [ len ] bytes of secure random data on Windows . Returns None if called on non - Windows platforms Returns None if called on non-Windows platforms *) val setSocketTTL: Unix.file_descr -> int -> unit * [ setSocketTTL s ] sets the TTL on t...
0f5cf391825c33569df2d0193668c13ad61041a72cd683361bd4f0adbfe04b16
takikawa/tr-pfds
redblacktrees-tests.rkt
#lang typed/scheme (require pfds/red-black-tree) (require typed/test-engine/scheme-tests) ;; NOTE: Rebalancing used in Okasaki version of Red Black Trees is slightly ;; different from that of popular version. ;; As a consequence of this difference, ;; - Okasaki version is easy to implement. ;; - There is a differe...
null
https://raw.githubusercontent.com/takikawa/tr-pfds/a08810bdfc760bb9ed68d08ea222a59135d9a203/pfds/tests/redblacktrees-tests.rkt
racket
NOTE: different from that of popular version. As a consequence of this difference, - Okasaki version is easy to implement. - There is a difference in ordering of elements. For example, in the redblacktree->list takes the root element in the red-black tree and populates it in a list and then deletes the r...
#lang typed/scheme (require pfds/red-black-tree) (require typed/test-engine/scheme-tests) Rebalancing used in Okasaki version of Red Black Trees is slightly test below , popular version would give ( list 2 3 4 1 5 ) . Because in version , 4 becomes the root of the tree instead of 3 which (check-expect (re...
2607e7e5274fe1378bbaa18237fb030234adcd889f8cdbfff4407a1801240dd3
input-output-hk/project-icarus-importer
Wallets.hs
# LANGUAGE ApplicativeDo # -- | Functions for working with Wallets configuration file. module Bench.Cardano.Wallet.Config.Wallets ( getWalletsConfig ) where import Universum import qualified Data.Yaml as Yaml import Data.Yaml ((.:)) import Data...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/bench/Bench/Cardano/Wallet/Config/Wallets.hs
haskell
| Functions for working with Wallets configuration file. | Reads Wallets configuration from the local .yaml-file.
# LANGUAGE ApplicativeDo # module Bench.Cardano.Wallet.Config.Wallets ( getWalletsConfig ) where import Universum import qualified Data.Yaml as Yaml import Data.Yaml ((.:)) import Data.Aeson.Types (typeMismatch) import Benc...
ac545b8704f8ad2a48490aadff9412ca1105929af2cf779ca1876119e1e27a7b
ring-clojure/ring-headers
x_headers.clj
(ns ring.middleware.x-headers "Middleware for adding various 'X-' response headers." (:require [clojure.string :as str] [ring.util.response :as resp])) (defn- allow-from? [frame-options] (and (map? frame-options) (= (keys frame-options) [:allow-from]) (string? (:allow-from frame-options...
null
https://raw.githubusercontent.com/ring-clojure/ring-headers/3c803eb0864d7fbe93ba1595d5d0d6ae09d51eb0/src/ring/middleware/x_headers.clj
clojure
(ns ring.middleware.x-headers "Middleware for adding various 'X-' response headers." (:require [clojure.string :as str] [ring.util.response :as resp])) (defn- allow-from? [frame-options] (and (map? frame-options) (= (keys frame-options) [:allow-from]) (string? (:allow-from frame-options...
f8871d57d57922a341d13ef7b65174259bd300d6c4a1ea6005d0f83ffa237684
dparis/lein-essthree
repository.clj
(ns lein-essthree.repository "Middleware to update project repositories to include any configured S3 buckets." (:require [cuerdas.core :as c] [lein-essthree.schemas :refer [RepoConfig]] [schema.core :as s])) (s/defn ^:private get-config :- (s/maybe RepoConfig) [project] ...
null
https://raw.githubusercontent.com/dparis/lein-essthree/a351693b850ba4bd478c9e922969d057b61b7b45/src/lein_essthree/repository.clj
clojure
(ns lein-essthree.repository "Middleware to update project repositories to include any configured S3 buckets." (:require [cuerdas.core :as c] [lein-essthree.schemas :refer [RepoConfig]] [schema.core :as s])) (s/defn ^:private get-config :- (s/maybe RepoConfig) [project] ...
3b5a6cb87cce3c4b023c31e238ad0ca81ed73eee828974d7bb49b8e9a15a711b
Gopiandcode/guile-ocaml
turtle_program.ml
type direction = Up | Down | Left | Right let turn_right = function Up -> Left | Left -> Down | Down -> Right | Right -> Up let turn_left = function Left -> Up | Down -> Left | Right -> Down | Up -> Right let move n (x,y) = function | Up -> (x, y + n) | Down -> (x, y - n) | Left -> (x - n, y) | Right -> (x + ...
null
https://raw.githubusercontent.com/Gopiandcode/guile-ocaml/247adf5a6adbbfd85696498b390167a9faa77779/examples/turtle-program/turtle_program.ml
ocaml
type direction = Up | Down | Left | Right let turn_right = function Up -> Left | Left -> Down | Down -> Right | Right -> Up let turn_left = function Left -> Up | Down -> Left | Right -> Down | Up -> Right let move n (x,y) = function | Up -> (x, y + n) | Down -> (x, y - n) | Left -> (x - n, y) | Right -> (x + ...
87a7962c5292953833652c62babc1a4b7d657fde2bb74593fc621555e6e8637a
bmeurer/ocaml-experimental
typecheck.mli
(*************************************************************************) (* *) (* Objective Caml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/browser/typecheck.mli
ocaml
*********************************************************************** Objective Caml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ Id$ open Widget open Mytypes val...
e7ba92531a20c63d021f8d1205bac9a90b30421c43ccf91ae3623f19978440d0
nunchaku-inria/nunchaku
Polarize.mli
(* This file is free software, part of nunchaku. See file "license" for more details. *) (** {1 Polarize} This duplicates some predicate definitions (either recursive equations, or (co)inductive specifications) depending on the call-site polarity. *) open Nunchaku_core type term = Term.t type decode_state ...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/transformations/Polarize.mli
ocaml
This file is free software, part of nunchaku. See file "license" for more details. * {1 Polarize} This duplicates some predicate definitions (either recursive equations, or (co)inductive specifications) depending on the call-site polarity. * Pipeline component * Generic Pipe Component @param decode the...
open Nunchaku_core type term = Term.t type decode_state val name : string * inductive predicates and possibly some other predicates in the problem . @param polarize_rec if true , some propositions defined with ` rec ` might be polarized in the problem. @param polarize_rec if true, som...
e24ba5a191496ad25373082337a85561c85b0c0d9100e1010c92c0937210d95d
babashka/babashka
curl_test.clj
(ns babashka.curl-test (:require [babashka.curl :as curl] [cheshire.core :as json] [clojure.test :as t :refer [deftest]])) (deftest curl-test (require '[babashka.curl :as curl] :reload-all) (prn (:status (curl/get ""))) (prn (:status (curl/get "-echo.com/get?foo1=bar1&foo2=bar2"))) ...
null
https://raw.githubusercontent.com/babashka/babashka/3dfc15f5a40efaec07cba991892c1207a352fab4/test-resources/lib_tests/babashka/curl_test.clj
clojure
(ns babashka.curl-test (:require [babashka.curl :as curl] [cheshire.core :as json] [clojure.test :as t :refer [deftest]])) (deftest curl-test (require '[babashka.curl :as curl] :reload-all) (prn (:status (curl/get ""))) (prn (:status (curl/get "-echo.com/get?foo1=bar1&foo2=bar2"))) ...
896a07ef74d5dd8d01b7d4f106507b0c8818f167c22392a6063d7f3a7f49ab00
leviroth/ocaml-reddit-api
subreddit_traffic.mli
open! Core type t [@@deriving sexp] include Json_object.S_with_fields with type t := t module By_date : sig type t = { date : Date.t ; uniques : int ; pageviews : int ; subscriptions : int } [@@deriving sexp] end module By_month : sig type t = { year : int ; month : Month.t ; u...
null
https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/0ce219356a5b3b38445868eb5dce10951f3eb4e0/reddit_api_kernel/subreddit_traffic.mli
ocaml
open! Core type t [@@deriving sexp] include Json_object.S_with_fields with type t := t module By_date : sig type t = { date : Date.t ; uniques : int ; pageviews : int ; subscriptions : int } [@@deriving sexp] end module By_month : sig type t = { year : int ; month : Month.t ; u...
601bf705b1a52ff8bf5e8693953a4f30e5fb1b9b318c9c919db52f49d37da95d
helium/miner
miner_ct_utils.erl
-module(miner_ct_utils). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -include_lib("blockchain/include/blockchain_vars.hrl"). -include_lib("blockchain/include/blockchain.hrl"). -include_lib("blockchain/include/blockchain_txn_fees.hrl"). -include("miner_ct_macros.hrl"). -define(...
null
https://raw.githubusercontent.com/helium/miner/f6ce13a0ee90794086fb932b80d28e2bb2bd1b32/test/miner_ct_utils.erl
erlang
TODO - do we need to assert here on results from genesis load ? badrpc back compat have the slave nodes monitor the runner node, so they can't outlive it kill any nodes we started and throw error config nodes split key sets into validators and miners set the app env var appropiately on each node get a sep list...
-module(miner_ct_utils). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -include_lib("blockchain/include/blockchain_vars.hrl"). -include_lib("blockchain/include/blockchain.hrl"). -include_lib("blockchain/include/blockchain_txn_fees.hrl"). -include("miner_ct_macros.hrl"). -define(...
9d4c3bb3e14366457b48a59172826664986cd9a4605c3b99d042ea9c8a673a70
haskus/packages
Colored.hs
# LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveFunctor # # LANGUAGE RecordWildCards # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # module Haskus.UI.Object.Colored ( ColoredF (..) , pattern Colored ) where import Haskus.Utils.Flow import Haskus.Utils...
null
https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-ui/src/lib/Haskus/UI/Object/Colored.hs
haskell
| Add default color to inner object
# LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveFunctor # # LANGUAGE RecordWildCards # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # module Haskus.UI.Object.Colored ( ColoredF (..) , pattern Colored ) where import Haskus.Utils.Flow import Haskus.Utils...
513973a191913ff2975c3636b000e13ea598db3d40e76d303089a84f5b4a4244
open-company/open-company-storage
dev.clj
(ns dev (:require [com.stuartsierra.component :as component] [clojure.tools.namespace.repl :as ctnrepl] [oc.lib.db.pool :as pool] [oc.storage.config :as c] [oc.storage.util.search :as search] [oc.storage.app :as app] [oc.storage.components :as co...
null
https://raw.githubusercontent.com/open-company/open-company-storage/ae4bbe6245f8736f3c1813c3048448035aff5815/src/dev.clj
clojure
(ns dev (:require [com.stuartsierra.component :as component] [clojure.tools.namespace.repl :as ctnrepl] [oc.lib.db.pool :as pool] [oc.storage.config :as c] [oc.storage.util.search :as search] [oc.storage.app :as app] [oc.storage.components :as co...
f7a041254cf1240a44db0c1c9475233b70993c83f79e1a154aff7ce6a5fea060
manuel-serrano/bigloo
port.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / / runtime / Ieee / port.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/c1f0f7bf50595ba03bcdb7c48f14494b54a369d3/runtime/Ieee/port.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Source documentation: ...
* serrano / prgm / project / bigloo / / runtime / Ieee / port.scm * / * Author : * / * Creation : Mon Feb 20 16:53:27 1995 * / * Last change : Fri Feb 18 08:54:26 2022 ( serrano ) * / * 6.10.1 P...
cd684e181b056921ec8dbc8959f2c79801790264931eb3aff72296c8cdc146e0
hatashiro/line
Types.hs
{-| This module provides types to be used with "Line.Messaging.API". -} # LANGUAGE DuplicateRecordFields # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # module Line.Messaging.API.Types ( -- * Common types -- | Re-exported for convenience. module Line.Messa...
null
https://raw.githubusercontent.com/hatashiro/line/3b5ddb0b98e5937d86157308512c1c96cd49c86a/src/Line/Messaging/API/Types.hs
haskell
| This module provides types to be used with "Line.Messaging.API". * Common types | Re-exported for convenience. * Message types ** Text ** Image ** Video ** Audio ** Location ** Sticker ** Image map ** Template * Profile * Error types | A type class representing types to be converted into 'Message'. I...
# LANGUAGE DuplicateRecordFields # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # module Line.Messaging.API.Types ( module Line.Messaging.Common.Types, Messageable, Message (..), Text (..), Image (..), Video (..), Audio (..), Location (..), Stic...
b82c75a2bb2be160b5fb42ba7d5a75f67fa45bc81461128b6531ccfbb6546d39
joearms/ezwebframe
chat2.erl
-module(chat2). -export([start/1]). start(Browser) -> case whereis(irc) of undefined -> irc:start(); _ -> true end, idle(Browser). idle(Browser) -> receive {Browser, {struct, [{join,Who}]}} -> irc ! {join, self(), Who}, idle(Browser); {irc, welcome, Who} -> Browser ! [{cmd,hide_div}...
null
https://raw.githubusercontent.com/joearms/ezwebframe/9eb320ff61d4dc7b0885f700414e56b7554788bf/demos/chat/chat2.erl
erlang
-module(chat2). -export([start/1]). start(Browser) -> case whereis(irc) of undefined -> irc:start(); _ -> true end, idle(Browser). idle(Browser) -> receive {Browser, {struct, [{join,Who}]}} -> irc ! {join, self(), Who}, idle(Browser); {irc, welcome, Who} -> Browser ! [{cmd,hide_div}...
3fac874a0e9a57674347716eb4ab35ba2c21fe002e5ef8cc9ec72ffd65774f9b
bamarco/onyx-sim
flui.cljc
(ns onyx.sim.flui (:require [taoensso.timbre :as log] #?(:cljs [re-com.core :as rc]) [onyx.sim.utils :refer [mapply ppr-str]])) ;;; ;;; !!!: This is an experimental volatile file. Do not expect it to stay the same. ;;; (defn call "Because you can't use reagent on the serverside. :(" [f &...
null
https://raw.githubusercontent.com/bamarco/onyx-sim/5c911eec3540db7ba5e6681fe405070e03ecb4de/src/cljc/onyx/sim/flui.cljc
clojure
!!!: This is an experimental volatile file. Do not expect it to stay the same. TODO: word-wrap and line numbers TODO: syntax highlighting
(ns onyx.sim.flui (:require [taoensso.timbre :as log] #?(:cljs [re-com.core :as rc]) [onyx.sim.utils :refer [mapply ppr-str]])) (defn call "Because you can't use reagent on the serverside. :(" [f & args] #?(:cljs (into [f] args) :clj (apply f args))) (defn stub "Provides a stub...
1b4798f348e1dffb082f83cb017a0114bddcb9c0ca0ce8d47406cc1a85ca785e
andyfriesen/buffer-builder-aeson
Bench.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # {-# LANGUAGE BangPatterns #-} module Main where import Control.DeepSeq (force) import Criterion import Criterion.Main import qualified Data.Aeson as Aeson import qualified D...
null
https://raw.githubusercontent.com/andyfriesen/buffer-builder-aeson/5b85148ef8908554cf0b858dd1473131d231a594/bench/Bench.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards # # LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # module Main where import Control.DeepSeq (force) import Criterion import Criterion.Main import qualified Data.Aeson as Aeson import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import qualified...
813584f0c493136ad90c6e4c6183ba4af3e4febb85a12e9e76714c6cfe587441
strega-nil/stregaml
Type.ml
include Types.Type let mutability_equal lhs rhs = match (lhs, rhs) with | Immutable, Immutable -> true | Mutable, Mutable -> true | _ -> false let mutability_to_string mut ~lang = match mut with | Immutable -> Lang.keyword_to_string Token.Keyword.Ref ~lang | Mutable -> Lang.keyword_to_string Token.Keywo...
null
https://raw.githubusercontent.com/strega-nil/stregaml/83b51826d5776926fb3f4b7ad03c7ffe837ecbf8/lib/parse/Type.ml
ocaml
include Types.Type let mutability_equal lhs rhs = match (lhs, rhs) with | Immutable, Immutable -> true | Mutable, Mutable -> true | _ -> false let mutability_to_string mut ~lang = match mut with | Immutable -> Lang.keyword_to_string Token.Keyword.Ref ~lang | Mutable -> Lang.keyword_to_string Token.Keywo...
9e0883643a7e7693f7a37a61e0a3e5353f043ec0a73fce4cfee15376932868a9
fabianbergmark/ECMA-262
Parser.hs
module Language.JavaScript.Parser ( parseJavaScript ) where import Control.Applicative ((<*), (*>)) import Text.Parsec import Language.JavaScript.AST import Language.JavaScript.Lexer (lexJavaScript) import Language.JavaScript.Prim import Language.JavaScript.Util chainl1' :: (Stream s m t) => Pars...
null
https://raw.githubusercontent.com/fabianbergmark/ECMA-262/ff1d8c347514625595f34b48e95a594c35b052ea/src/Language/JavaScript/Parser.hs
haskell
module Language.JavaScript.Parser ( parseJavaScript ) where import Control.Applicative ((<*), (*>)) import Text.Parsec import Language.JavaScript.AST import Language.JavaScript.Lexer (lexJavaScript) import Language.JavaScript.Prim import Language.JavaScript.Util chainl1' :: (Stream s m t) => Pars...
19efe67c9f0b31588b0dc1ae1376a8e19e66ad4a8a5967da907b234940f91f29
pmonks/spinner
ansi.clj
; Copyright © 2022 ; 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 Licen...
null
https://raw.githubusercontent.com/pmonks/spinner/bc29faefad8caf4bfa3ab2ef1785de04ed514fed/src/progress/ansi.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing pe...
Copyright © 2022 distributed under the License is distributed on an " AS IS " BASIS , SPDX - License - Identifier : Apache-2.0 (ns progress.ansi "Handy ANSI related functionality. Note: requiring this namespace has the side effect of enabling JANSI." (:require [clojure.string :as s] [jansi-clj....
446eb2432e381200e6409485db164f5fe9d3002eb2af48ae915732f9989de352
Clojure2D/clojure2d
protocols.clj
(ns clojure2d.protocols) (defprotocol ImageProto "Image Protocol" (get-image [i] "Return BufferedImage") (width [i] "Width of the image.") (height [i] "Height of the image.") (save [i n] "Save image `i` to a file `n`.") (convolve [i t] "Convolve with Java ConvolveOp. See [[convolution-matrices]] for kernel...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d/5cb4dbfe6ed492c8c003f28aea4f1611470484c2/src/clojure2d/protocols.clj
clojure
(ns clojure2d.protocols) (defprotocol ImageProto "Image Protocol" (get-image [i] "Return BufferedImage") (width [i] "Width of the image.") (height [i] "Height of the image.") (save [i n] "Save image `i` to a file `n`.") (convolve [i t] "Convolve with Java ConvolveOp. See [[convolution-matrices]] for kernel...
91a51939ffe6c2af35192d89736524140b26983ad5a178dffc8f3b294cfef85b
russmatney/org-crud
core.clj
(ns organum.core "From: " (:require [clojure.java.io :as io] [clojure.string :as string] [babashka.fs :as fs])) (defn classify-line "Classify a line for dispatch to handle-line multimethod." [ln] (let [headline-re #"^(\*+)\s*(.*)$" pdrawer-re #"^\s*:(PROPERTIES|EN...
null
https://raw.githubusercontent.com/russmatney/org-crud/11069d59925461601718c4bb4c29f74126093891/src/organum/core.clj
clojure
node constructors handle line parse file
(ns organum.core "From: " (:require [clojure.java.io :as io] [clojure.string :as string] [babashka.fs :as fs])) (defn classify-line "Classify a line for dispatch to handle-line multimethod." [ln] (let [headline-re #"^(\*+)\s*(.*)$" pdrawer-re #"^\s*:(PROPERTIES|EN...
5ccc4b1384e084fb949d93113062001ae3db4f79560513b7f5f73bdc2895a67e
anoma/juvix
Base.hs
module BackendC.Base where import Base import Data.FileEmbed import Data.Text.IO qualified as TIO import Juvix.Compiler.Backend.C.Translation.FromInternal as MiniC import Juvix.Compiler.Builtins (iniState) import Juvix.Compiler.Pipeline import System.Process qualified as P clangCompile :: (Path Abs File -> Path Abs...
null
https://raw.githubusercontent.com/anoma/juvix/764c6faa8097066687cdb0431b17bf43a94adab1/test/BackendC/Base.hs
haskell
module BackendC.Base where import Base import Data.FileEmbed import Data.Text.IO qualified as TIO import Juvix.Compiler.Backend.C.Translation.FromInternal as MiniC import Juvix.Compiler.Builtins (iniState) import Juvix.Compiler.Pipeline import System.Process qualified as P clangCompile :: (Path Abs File -> Path Abs...
2dd189ccba851b6f7370477677e2c69a352c4594a989d1c86f74deea3e3328ac
input-output-hk/cardano-ledger
Deleg.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Deleg.hs
haskell
# LANGUAGE OverloadedStrings # The protocol parameters are only used for the HardFork mechanism | Indicates that the stake key is somehow already in the rewards map. This error is now redundant with StakeKeyAlreadyRegisteredDELEG. We should remove it and replace its one use with StakeKeyAlreadyRegisteredDELEG. ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Cardano.Ledger.Shelley.R...
bb4df1968c49389a2d0e7e0c80449f375141bbd6bf314f100d0ab88bf9648459
codereport/plr
data.cljs
(ns plr.data) (def sites [:so :octo :rm :languish :pypl :ieee :tiobe]) (def names {:so "StackOverflow" :octo "Octoverse" :rm "RedMonk" :languish "Languish" :pypl "PYPL" :ieee "IEEE Spectrum" :tiobe "TIOBE"}) (def links {:octo "-programming-languages" :ieee "-programming-languages-2022...
null
https://raw.githubusercontent.com/codereport/plr/4496371fd5dab64686fd9fa2c0f0697e75b47e50/src/plr/data.cljs
clojure
Octoverse
(ns plr.data) (def sites [:so :octo :rm :languish :pypl :ieee :tiobe]) (def names {:so "StackOverflow" :octo "Octoverse" :rm "RedMonk" :languish "Languish" :pypl "PYPL" :ieee "IEEE Spectrum" :tiobe "TIOBE"}) (def links {:octo "-programming-languages" :ieee "-programming-languages-2022...
c85be936f98014d0825a7604a55892557aeeadac87a5a8cb3e01b5f2d688c9f7
haskell/haskell-language-server
GoldenNote.expected.hs
note :: e -> Maybe a -> Either e a note e Nothing = Left e note _ (Just a) = Right a
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/GoldenNote.expected.hs
haskell
note :: e -> Maybe a -> Either e a note e Nothing = Left e note _ (Just a) = Right a
52db4ff78059f14e937fda355dcc06f21e10eed774ddd6d2829fab6c3225903f
vikram/lisplibraries
parser.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; parser.lisp : Code for writing parsers based on Copyright ( C ) 2004 < > ;;;; ;;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Fr...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/xmls-tools/parser.lisp
lisp
This library is free software; you can redistribute it and/or either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU License along with this library; if not, write t...
parser.lisp : Code for writing parsers based on Copyright ( C ) 2004 < > modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library G...
10e57d7fefd37b1e32c1800514ebc0f5e29e0245ff46e8d22858a3fd43565e19
transient-haskell/transient-stack
TLS.hs
----------------------------------------------------------------------------- -- -- Module : Transient.MoveTLS -- Copyright : -- License : GPL-3 -- -- Maintainer : -- Stability : -- Portability : -- -- | see <-haskell-processes-between-nodes-transient-effects-iv> --------------------------------------...
null
https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient-universe-tls/src/Transient/TLS.hs
haskell
--------------------------------------------------------------------------- Module : Transient.MoveTLS Copyright : License : GPL-3 Maintainer : Stability : Portability : | see <-haskell-processes-between-nodes-transient-effects-iv> ------------------------------------------------------------...
# LANGUAGE CPP , OverloadedStrings , BangPatterns , ScopedTypeVariables # module Transient.TLS(initTLS, initTLS') where #ifndef ghcjs_HOST_OS import Transient.Internals import Transient.Move.Internals import Transient.Backtrack import Transient.Parse import Networ...
a471031f391f12796bc15f8526f7b959d92828eba0ff65a83087b2bc31e1eca3
guardian/content-api-haskell-client
Section.hs
module Network.Guardian.ContentApi.Section where import Data.Text (Text) data Section = Section { sectionId :: Text , name :: Text } deriving (Show)
null
https://raw.githubusercontent.com/guardian/content-api-haskell-client/f80195c4117570bc3013cbe93ceb9c5d3f5e17bd/guardian-content-api-client/Network/Guardian/ContentApi/Section.hs
haskell
module Network.Guardian.ContentApi.Section where import Data.Text (Text) data Section = Section { sectionId :: Text , name :: Text } deriving (Show)
342b6663fc6835edbd7a829de3cd7102f3407025c88a57fc56e8846d3bb0ad4a
abdulapopoola/SICPBook
Ex2.86.scm
#lang planet neil/sicp ;; INSTALLATION External interface for Integer package (put 'square 'integer (lambda (x) (tag (* x x)))) (put 'arctan '(integer integer) (lambda (x y) (make-real (atan x y)))) (put 'sine 'integer (lambda (x) (make-real (sin x)))) (put 'cosine 'integer (lambda (x) (make-real...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.5/Ex2.86.scm
scheme
INSTALLATION Rational number package External interface for Rational package Real number package External interface for Real package
#lang planet neil/sicp External interface for Integer package (put 'square 'integer (lambda (x) (tag (* x x)))) (put 'arctan '(integer integer) (lambda (x y) (make-real (atan x y)))) (put 'sine 'integer (lambda (x) (make-real (sin x)))) (put 'cosine 'integer (lambda (x) (make-real (cos x)))) (pu...
592eb9db8f31f8766e0b0ae439ff2cca05cf4bb776dd496c7da47e27cdc657f6
modular-macros/ocaml-macros
t250-closurerec-2.ml
open Lib;; let rec f _ = 23 in if f 0 <> 23 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 15 11 CONSTINT 23 13 RETURN 1 15 CLOSUREREC 0 , 11 19 CONSTINT 23 21 PUSHCONST0 22 PUS...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t250-closurerec-2.ml
ocaml
open Lib;; let rec f _ = 23 in if f 0 <> 23 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 15 11 CONSTINT 23 13 RETURN 1 15 CLOSUREREC 0 , 11 19 CONSTINT 23 21 PUSHCONST0 22 PUS...
6a79aacb3c15ea57950c96825d8d0879bdca2965f36a5bc6806c88d34f8bc451
Liqwid-Labs/plutus-extra
Extra.hs
# OPTIONS_GHC -fno - omit - interface - pragmas # module PlutusTx.Maybe.Extra (maybeMap) where -------------------------------------------------------------------------------- import Data.Kind (Type) -------------------------------------------------------------------------------- import PlutusTx.Maybe (Maybe, mapM...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/347dd304e9b580d1747439a888bfaa79f1c5a25e/plutus-extra/src/PlutusTx/Maybe/Extra.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Flipped version of `mapMaybe`, to correspond with `>>=`
# OPTIONS_GHC -fno - omit - interface - pragmas # module PlutusTx.Maybe.Extra (maybeMap) where import Data.Kind (Type) import PlutusTx.Maybe (Maybe, mapMaybe) import PlutusTx.Prelude (flip) # INLINEABLE maybeMap # maybeMap :: forall (a :: Type) (b :: Type). [a] -> (a -> Maybe b) -> [b] maybeMap = flip mapMaybe
34d60b9c354834c585a3599dad907db18015a46f8ac94a462ee3d1f26bf9c312
massung/queue
queue.lisp
;;;; Simple FIFO for Common Lisp ;;;; Copyright ( c ) ;;;; This file is provided to you under the Apache License , ;;;; Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain ;;;; a copy of the License at ;;;; ;;;; -2.0 ;;;; ;;;; Unless required by app...
null
https://raw.githubusercontent.com/massung/queue/84a88b3adbe2ff4f6cbc8d487d430fa1611c30e5/queue.lisp
lisp
Simple FIFO for Common Lisp 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 permissions and limitations under the License. ...
Copyright ( c ) 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 (defpackage :queue (:use :cl) (:export #:make-queue ...
5b124d792def78ec74b039a54aa7cfe96fa1eebdc14f63a3a92e41abc0928a46
achirkin/vulkan
Foreign.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE Strict #-} # LANGUAGE TypeApplications # # LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # -- | Collection of functions adapted from @Foreign@ module hierarchy modul...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-triangles/src/Lib/Program/Foreign.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE Strict # | Collection of functions adapted from @Foreign@ module hierarchy | Despite its name, this command does not copy data from a created pointer. It uses `newVkData` function inside. | Get size of action output and then...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # module Lib.Program.Foreign ( Ptr, plusPtr, Storable.sizeOf , withVkArrayLen , alloca, allocaArray , peek, peekArray, poke , ptrAtIndex , asListVk , allocaPee...
b7e4e7f03971ac1f9ea25749f73616ccb398782fcd17ee967550e96116474181
richcarl/eunit
eunit_server.erl
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 License is distributed on an " A...
null
https://raw.githubusercontent.com/richcarl/eunit/cb7eb2bc2cec01e405c717b6f6b551be7d256f06/src/eunit_server.erl
erlang
not use this file except in compliance with the License. You may obtain a copy of the License at <-2.0> Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and ...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may distributed under the License is distributed on an " AS IS " BASIS , General Public License ( the " LGPL " ) as published by the Free Software Foundation ; either version 2.1 , or ( at your option ) any later version . either the Ap...