_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 |
|---|---|---|---|---|---|---|---|---|
14d309f968e06fb1ceb96893af2be206b44d185b269dd99b4106e3f2ceb95264 | nikita-volkov/rerebase | Lazy.hs | module Control.Monad.Trans.Writer.Lazy
(
module Rebase.Control.Monad.Trans.Writer.Lazy
)
where
import Rebase.Control.Monad.Trans.Writer.Lazy
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/Trans/Writer/Lazy.hs | haskell | module Control.Monad.Trans.Writer.Lazy
(
module Rebase.Control.Monad.Trans.Writer.Lazy
)
where
import Rebase.Control.Monad.Trans.Writer.Lazy
| |
32c5a50502fe849868932db01626099e43f9f85d4b8c0623f9f725c177029c34 | albertoruiz/easyVision | autostereo.hs |
import EasyVision
import EasyVision.GUI.OldGUI
import Graphics.UI.GLUT hiding (RGB,Size,Point)
import qualified Graphics.UI.GLUT as GL
import Data.IORef
import System.Exit
import System.Environment(getArgs)
import GHC.Float(isDoubleNaN)
import ImagProc.Ipp.Core
import Data.List(minimumBy)
import Numeric.LinearAlgebra
... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/stereo/autostereo.hs | haskell | ----------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------
-------------------------------------------------------------------------- |
import EasyVision
import EasyVision.GUI.OldGUI
import Graphics.UI.GLUT hiding (RGB,Size,Point)
import qualified Graphics.UI.GLUT as GL
import Data.IORef
import System.Exit
import System.Environment(getArgs)
import GHC.Float(isDoubleNaN)
import ImagProc.Ipp.Core
import Data.List(minimumBy)
import Numeric.LinearAlgebra
... |
196e4431c8d3ead36df04708dcd57b233d366adef1d8a8d29c8964cb78104ca3 | processone/fast_yaml | fast_yaml.erl | %%%----------------------------------------------------------------------
%%% File : fast_yaml.erl
Author : < >
%%% Purpose : YAML parser
Created : 7 Aug 2013 by < >
%%%
%%%
Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the... | null | https://raw.githubusercontent.com/processone/fast_yaml/8d7084aa40ae4bcec8980d4707b70eb1af6f33fc/src/fast_yaml.erl | erlang | ----------------------------------------------------------------------
File : fast_yaml.erl
Purpose : YAML parser
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 W... | Author : < >
Created : 7 Aug 2013 by < >
Copyright ( C ) 2002 - 2023 ProcessOne , SARL . 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(fast_yaml).
-compile(no_native).
-on_load... |
7f06efe2c2f71bec485ff15c56cbccb82d80568e711083e942e3fa91ee8d374f | bellissimogiorno/nominal | Graph.hs | |
Module : Algebraic graphs with binding
Description : Extending algebraic graphs with nominal - style binding
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
A development file to build on < -graphs algebraic - graphs > libra... | null | https://raw.githubusercontent.com/bellissimogiorno/nominal/ab3306ee349dc481d2e2e6d103d90ffdd14ccaa9/src/Language/Nominal/Examples/Graph.hs | haskell | to derive ' Swappable '
to derive ' Data '
to use : . in instances
to derive 'Swappable'
to derive 'Data'
to use :. in instances
for : .
import Data.Function ((&))
| A datatype of graphs with binding.
| Restriction action just passes the restriction on to the deep embedding
| Fold on graphs with bi... | |
Module : Algebraic graphs with binding
Description : Extending algebraic graphs with nominal - style binding
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
A development file to build on < -graphs algebraic - graphs > libra... |
3fa8eb3e1db47ff71cdda90f5e8a1c045f320bde07f2b736987bd481e73bbe12 | bobatkey/CS316-2022 | Week02Solutions.hs | # OPTIONS_GHC -fwarn - incomplete - patterns #
module Week02Solutions where
import Week02
{------------------------------------------------------------------------------}
{- TUTORIAL QUESTIONS -}
{-----------------------------------------------------------------... | null | https://raw.githubusercontent.com/bobatkey/CS316-2022/a126b3cd266561fed22aa7862b7b1b3007451492/lecture-notes/Week02Solutions.hs | haskell | ----------------------------------------------------------------------------
TUTORIAL QUESTIONS
----------------------------------------------------------------------------
In the questions below, replace 'undefined' with your answers. Use
GHCi to test them.... | # OPTIONS_GHC -fwarn - incomplete - patterns #
module Week02Solutions where
import Week02
1 . Write a function that counts the number of occurrences of an
element in list :
element in list: -}
Three alternate solutions :
popCount1 :: Eq a => a -> [a] -> Int
popCount1 y [] = 0
popCount1 y (x:... |
4e0299deee55fa7f1ead36e71b2a898053dc325464995097a2850d634c425034 | Gabriella439/Haskell-Server-Generic-Library | Generic.hs | {-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperator... | null | https://raw.githubusercontent.com/Gabriella439/Haskell-Server-Generic-Library/9774f519b4271bd22f145b84a3f98233b81ef105/src/Server/Generic.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
built-in support for generic programming. The best way to understand how
this library works is to walk through a few examples.
For example, suppose that yo... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
| This library auto - generates API services for data types using 's
> instance ToJSON Example
> main = serveJSON 8080 handler
> $ stack rung... |
d2649b4a2871f340d2964185d60ec44464c7af07d6150b92eb506a357ccdaf01 | erikd/haskell-big-integer-experiment | Prim.hs | # LANGUAGE BangPatterns , CPP , ForeignFunctionInterface , MagicHash ,
NoImplicitPrelude , Strict , UnboxedTuples , UnliftedFFITypes #
NoImplicitPrelude, Strict, UnboxedTuples, UnliftedFFITypes #-}
#include "MachDeps.h"
module Common.GHC.Integer.Prim
( boxInt#, boxWord#, unboxInt, unboxWord
... | null | https://raw.githubusercontent.com/erikd/haskell-big-integer-experiment/7841ec3fcc5be219fa16963849bd12137112f8a9/Common/GHC/Integer/Prim.hs | haskell | Many of these primitives are defined in compiler/prelude/primops.txt.pp
# INLINE plusWord4 #
TODO : Really need a minusWord2# PrimOp.
Assumes shift amount is >= 0 && < WORD_SIZE_IN_BITS.
# INLINE wordSizeInBits #
# INLINE wordSizeInBytes # | # LANGUAGE BangPatterns , CPP , ForeignFunctionInterface , MagicHash ,
NoImplicitPrelude , Strict , UnboxedTuples , UnliftedFFITypes #
NoImplicitPrelude, Strict, UnboxedTuples, UnliftedFFITypes #-}
#include "MachDeps.h"
module Common.GHC.Integer.Prim
( boxInt#, boxWord#, unboxInt, unboxWord
... |
12ca34e095b97f4dc9ca136a9d53657c5771dc2650ee244e349a356ed120b36a | revelytix/carbonite | test_buffer.clj | (ns carbonite.test-buffer
(:use [clojure.test]
[carbonite.api]
[carbonite.buffer])
(:import [com.esotericsoftware.kryo Kryo SerializationException]
[java.nio ByteBuffer]))
(deftest test-context
(put-to-context :foo)
(is (= :foo (get-from-context))))
(deftest test-ensure-buffer
(cl... | null | https://raw.githubusercontent.com/revelytix/carbonite/c0199e4f82c16d1681638336c226ffe26b50852a/test/carbonite/test_buffer.clj | clojure | Copyright 2011 Revelytix, 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 t... | (ns carbonite.test-buffer
(:use [clojure.test]
[carbonite.api]
[carbonite.buffer])
(:import [com.esotericsoftware.kryo Kryo SerializationException]
[java.nio ByteBuffer]))
(deftest test-context
(put-to-context :foo)
(is (= :foo (get-from-context))))
(deftest test-ensure-buffer
(cl... |
245e39c3cf8f61b4a73d1ab5fab22166a0baf07e440c95cbbcd423716c31871b | scrintal/heroicons-reagent | chat_bubble_oval_left_ellipsis.cljs | (ns com.scrintal.heroicons.solid.chat-bubble-oval-left-ellipsis)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M4.804 21.644A6.707 6.707 0 006 21.75a6.721 6.721 0 003.583... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/chat_bubble_oval_left_ellipsis.cljs | clojure | (ns com.scrintal.heroicons.solid.chat-bubble-oval-left-ellipsis)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M4.804 21.644A6.707 6.707 0 006 21.75a6.721 6.721 0 003.583... | |
6490430270417cba6b651aca7b565916b54b510a3593833aab92a6c74b92b424 | dams/graphite-riakts | graphite_riakts_config.erl |
-module(graphite_riakts_config).
-export([ init_context/0 ]).
-include_lib("graphite_riakts_config.hrl").
-define(get_from_config(X), X = proplists:get_value(X, Config, Default#context.X)).
-spec init_context() -> #context{}.
init_context() ->
{ok, Config} = file:consult("/etc/riak/graphite_riakts.conf"),
De... | null | https://raw.githubusercontent.com/dams/graphite-riakts/9f1e77984556cec99fe21d9d7ca2dbcde9c80bc3/src/graphite_riakts_config.erl | erlang |
-module(graphite_riakts_config).
-export([ init_context/0 ]).
-include_lib("graphite_riakts_config.hrl").
-define(get_from_config(X), X = proplists:get_value(X, Config, Default#context.X)).
-spec init_context() -> #context{}.
init_context() ->
{ok, Config} = file:consult("/etc/riak/graphite_riakts.conf"),
De... | |
1c990d87a7ee42c2bac962e59a9ebd177359dba39895d5db3e5cf49f85d3a419 | plops/cl-v4l2 | constants.lisp | ("linux/videodev2.h")
#.(labels ((minus->underscore (seq)
(substitute #\_ #\- seq))
(make-slot (type c-type slots)
(loop for e in slots collect
(etypecase e
(cons
(destructuring-bind (array-symb name) e
(unless (eq array-symb 'array)
(error "I don't understand ~a. Its not o... | null | https://raw.githubusercontent.com/plops/cl-v4l2/a1cd5456c76fc2adf7b43b7af8cb04d4ad72d13d/sbcl/constants.lisp | lisp | ("linux/videodev2.h")
#.(labels ((minus->underscore (seq)
(substitute #\_ #\- seq))
(make-slot (type c-type slots)
(loop for e in slots collect
(etypecase e
(cons
(destructuring-bind (array-symb name) e
(unless (eq array-symb 'array)
(error "I don't understand ~a. Its not o... | |
31f1a860f6682173add0ff8efbc2283cd892026bb345752ad3b0be763b8293ed | deeglaze/scribble-latex-utils | unmap.rkt | #lang racket/base
(require racket/port scribble/core racket/match racket/contract)
(provide overload-op* math-mode in-math unmath
translate-char default-ops
operators/c operator/c conv-file)
(define operator/c
(->* (char? string? exact-nonnegative-integer?)
(values string? exact-nonnegativ... | null | https://raw.githubusercontent.com/deeglaze/scribble-latex-utils/d7f48c0e58769fb273dc1f89747d5f22c4d54a21/unmap.rkt | racket | avoid double superscript errors
Don't escape latex commands
[(#\^) "{\\char'136}"]
[(#\<) (if (rendering-tt) "{\\texttt <}" "$<$")]
[(#\|) (if (rendering-tt) "{\\texttt |}" "$|$")]
[(#\-) "{-}"] ;; avoid en- or em-dash
[(#\`) "{`}"] ;; avoid double-quotes
[(#\') "{'}"] ;; avoid double-quotes
[(#\? #\! #\. #\:)
[(#\~)... | #lang racket/base
(require racket/port scribble/core racket/match racket/contract)
(provide overload-op* math-mode in-math unmath
translate-char default-ops
operators/c operator/c conv-file)
(define operator/c
(->* (char? string? exact-nonnegative-integer?)
(values string? exact-nonnegativ... |
309e2cd5e4fc58dd918c1d3afa3f9f5bc9e0948791aa3fd261778f599678c5f7 | ghcjs/jsaddle-dom | SVGUnitTypes.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGUnitTypes
(pattern SVG_UNIT_TYPE_UNKNOWN,
pattern SVG_UNIT_TYPE_USERSPACEONUSE,
pattern SVG_UNIT... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGUnitTypes.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGUnitTypes
(pattern SVG_UNIT_TYPE_UNKNOWN,
pattern SVG_UNIT_TYPE_USERSPACEONUSE,
pattern SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, SVGUnitTypes(..),
gTypeSVGUnitTypes)
where
import Prelude (... |
ee34b902277be8d825c2dc6188244c6ac50909d4b306277c5076b01983f9e826 | gusenov/stepik-functional-programming-hs | Demo.hs | module Demo where
Функция on3 , имеет семантику , схожую с on , но принимает в качестве первого аргумента трехместную функцию
on3 :: (b -> b -> b -> c) -> (a -> b) -> a -> a -> a -> c
on3 op f x y z = op (f x) (f y) (f z)
квадратов трех чисел может быть записана с использованием on3 так
sum3squares = (\x y z -> ... | null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/On3/Demo.hs | haskell | module Demo where
Функция on3 , имеет семантику , схожую с on , но принимает в качестве первого аргумента трехместную функцию
on3 :: (b -> b -> b -> c) -> (a -> b) -> a -> a -> a -> c
on3 op f x y z = op (f x) (f y) (f z)
квадратов трех чисел может быть записана с использованием on3 так
sum3squares = (\x y z -> ... | |
dd1c5148f38c623d01544435745d106ef875ae2695a9694f8087f54edb7fe2a2 | mirkov/gnuplot-interface | gnuplot-windows.lisp |
Time - stamp : < 2011 - 09 - 28 09:49:49EDT gnuplot-windows.lisp >
;;
Copyright 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... | null | https://raw.githubusercontent.com/mirkov/gnuplot-interface/090dcbf73965f90547d89c32dc703e51a632d2c5/gnuplot-windows.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Ge... |
Time - stamp : < 2011 - 09 - 28 09:49:49EDT gnuplot-windows.lisp >
Copyright 2011
Distributed under the terms of the GNU General Public License
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 shoul... |
749018b6c1d1762f49b7bb2f5db81e78b6cf3e5202525c566dc14b10cbfa5157 | expipiplus1/vulkan | HasVulkan.hs | module HasVulkan
( HasVulkan(..)
, noAllocationCallbacks
, noPipelineCache
) where
import Control.Monad.Trans.Class ( MonadTrans(lift) )
import Control.Monad.Trans.Reader ( ReaderT )
import Vulkan.Core10
import VulkanMemoryAllocator
| A class for Monads which... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/examples/lib/HasVulkan.hs | haskell | module HasVulkan
( HasVulkan(..)
, noAllocationCallbacks
, noPipelineCache
) where
import Control.Monad.Trans.Class ( MonadTrans(lift) )
import Control.Monad.Trans.Reader ( ReaderT )
import Vulkan.Core10
import VulkanMemoryAllocator
| A class for Monads which... | |
080a7fb3417aa9c2728b25e7f6c0df2a861eecf4f2c43b32ce7e79e9e8f4c0c7 | binsec/haunted | smtlib_to_formula.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/formula/smtlib_to_formula.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
1397999b8f3bc3d582d77bee0352298286c6e49f9ed3a594c1bbf096d3bce909 | ice1000/Kt2Dart | Annotations.hs | # LANGUAGE ApplicativeDo #
module Annotations where
import Control.Applicative
import Control.Monad
import Data.Char
import Parsers
import LexicalStructure
import {-# SOURCE #-} Types
import {-# SOURCE #-} Rules
annotationsP :: Parser String
annotationsP = do
s <- some . tokenLP $ annotationP <|> annotationListP... | null | https://raw.githubusercontent.com/ice1000/Kt2Dart/be47a9ce7ad8edd242c06e9c53a1e253ac5d5a4a/src/Annotations.hs | haskell | # SOURCE #
# SOURCE #
"Deprecated" into "deprecated"
| # LANGUAGE ApplicativeDo #
module Annotations where
import Control.Applicative
import Control.Monad
import Data.Char
import Parsers
import LexicalStructure
annotationsP :: Parser String
annotationsP = do
s <- some . tokenLP $ annotationP <|> annotationListP
return $ join s
| convert " Override " into " over... |
46d653146284cf4e8bb2e37d91328da1a9bc9a5b95568480902301f9ae426c27 | mejgun/haskell-tdlib | GetPollVoters.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.GetPollVoters where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
Returns users voted for the specified option in a non - anonymous polls . For optimal performance , the number of returned users is ch... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/GetPollVoters.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Number of users to skip in the result; must be non-negative
| 0-based identifier of the answer option
| Identifier of the message containing the poll
| Identifier of the chat to which the poll belongs |
module TD.Query.GetPollVoters where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
Returns users voted for the specified option in a non - anonymous polls . For optimal performance , the number of returned users is chosen by TDLib
data GetPollVoters = GetPollVot... |
a7bd4e9ff5928dec238b177a7ac39d7b3a4e9daf465eb6d54ebe2b887b14224a | returntocorp/semgrep | Unit_memory_limit.ml |
Unit tests for out - of - memory errors and stack overflows .
System 's maximum stack size is assumed to be 8 MiB or greater .
See mli .
Unit tests for out-of-memory errors and stack overflows.
System's maximum stack size is assumed to be 8 MiB or greater.
See mli.
*)
open Printf
let get_s... | null | https://raw.githubusercontent.com/returntocorp/semgrep/e0d996ed1e4d76d0dafd34aec96bde3b718ac05e/libs/process_limits/Unit_memory_limit.ml | ocaml |
Grow the stack until some limit expressed in bytes.
Prevent tail-call optimization
Ensure the heap grows to over the limit.
success
success |
Unit tests for out - of - memory errors and stack overflows .
System 's maximum stack size is assumed to be 8 MiB or greater .
See mli .
Unit tests for out-of-memory errors and stack overflows.
System's maximum stack size is assumed to be 8 MiB or greater.
See mli.
*)
open Printf
let get_s... |
ef7e4151f554981597ecb1c43ba0d1fb9fae2976adaca85e15c30d4db70c684f | ludwigpacifici/saumon | scanner_tests.ml | open Saumon
module A = Alcotest_testable
let check =
Alcotest.(check (result (list A.token) (list A.scanner_error)))
"check Scanner.scan_tokens"
let scan_empty () =
check (Scanner.scan_tokens "")
(Ok
[ Token.make ~kind:Token_kind.Eof
~location:(Location.make ~line:1 ~column:0) ])
let sc... | null | https://raw.githubusercontent.com/ludwigpacifici/saumon/e8a05216ffae5a58ce3ceed5ae3e989b81930ed5/test/unit-tests/scanner_tests.ml | ocaml | open Saumon
module A = Alcotest_testable
let check =
Alcotest.(check (result (list A.token) (list A.scanner_error)))
"check Scanner.scan_tokens"
let scan_empty () =
check (Scanner.scan_tokens "")
(Ok
[ Token.make ~kind:Token_kind.Eof
~location:(Location.make ~line:1 ~column:0) ])
let sc... | |
7d42555d407d4b885cb2f5a2170517412c1009f09324d91b093fcd1649899adc | prolic/futr | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Debug.Trace
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.MVar
import Control.Concurrent.STM.TChan
import Control.Lens
import Control.Monad (forever, mzero, void)
import Control.Monad.STM (atomically)
import Crypto.Schnorr (XO... | null | https://raw.githubusercontent.com/prolic/futr/3e41268dff6c235c65e0edf6e52f6c82ed286d02/src/Main.hs | haskell | # LANGUAGE OverloadedStrings #
case trace (show evt) evt of
subscriptions
actions
@todo @todo update subscription
go to
relays
edit profile
subscriptions |
module Main where
import Debug.Trace
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.MVar
import Control.Concurrent.STM.TChan
import Control.Lens
import Control.Monad (forever, mzero, void)
import Control.Monad.STM (atomically)
import Crypto.Schnorr (XOnlyPubKey, decodeHex, xOnlyPubKey)
imp... |
f1a4e6e1a8dcb6a2fa56f12480224f17442a6315e221475d44aafee01e9e1784 | HealthSamurai/ci3 | telegram.clj | (ns ci3.telegram
(:require
[environ.core :refer [env]]
[ci3.k8s :as k8s]
[morse.handlers :as h]
[morse.polling :as p]
[morse.api :as t]
[clojure.string :as str]))
(def token (or (env :telegram-token)
(env :ci3-secret-telegram-token)
(k8s/secret :ci3 :TELEGRAM_... | null | https://raw.githubusercontent.com/HealthSamurai/ci3/d14a459e677a1f2d89c5df5f09276059f6debccd/src/ci3/telegram.clj | clojure | (ns ci3.telegram
(:require
[environ.core :refer [env]]
[ci3.k8s :as k8s]
[morse.handlers :as h]
[morse.polling :as p]
[morse.api :as t]
[clojure.string :as str]))
(def token (or (env :telegram-token)
(env :ci3-secret-telegram-token)
(k8s/secret :ci3 :TELEGRAM_... | |
feaf6faedb3ae74fd97be9150add29d35cebbde373fae32fc9fae99ce6b52ac4 | nikodemus/SBCL | test-utils.lisp |
;;;;
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absol... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/contrib/sb-concurrency/tests/test-utils.lisp | lisp |
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information. |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package :sb-concurrency-test)
#+sb-thread
(progn
(defparameter +timeout+ 30.0)
(defun make-threads (n name fn)
... |
b7a30d12ab8e767583bf47b55f2cfaf9351eb8c9432e42502a1275520fbe11d4 | goldfirere/singletons | Decide.hs | Data / Singletons / TH / Single / Decide.hs
( c ) 2014
Defines functions to generate SDecide instances , as well as TestEquality and
TestCoercion instances that leverage SDecide .
(c) Richard Eisenberg 2014
Defines functions to generate SDecide instances, as well as TestEquality and
TestCoercion ins... | null | https://raw.githubusercontent.com/goldfirere/singletons/6acdbf4baf2517df13515c6fb11b1a9d40cae3c3/singletons-th/src/Data/Singletons/TH/Single/Decide.hs | haskell | ^ The /original/ constructors (for inferring the instance context)
^ The /singletons/ constructors
^ The name of the data type
^ The /original/ constructors (for inferring the instance context) | Data / Singletons / TH / Single / Decide.hs
( c ) 2014
Defines functions to generate SDecide instances , as well as TestEquality and
TestCoercion instances that leverage SDecide .
(c) Richard Eisenberg 2014
Defines functions to generate SDecide instances, as well as TestEquality and
TestCoercion ins... |
7a7b7efcdfc9ebee5103b2b1b587f7f4c24479fb977699d505a98818fe0f1c6c | dbuenzli/qoic | B0.ml | open B0_kit.V000
open Result.Syntax
(* OCaml library names *)
let qoic = B0_ocaml.libname "qoic"
let unix = B0_ocaml.libname "unix"
FIXME this is needed for now because of
*)
let bigarray = B0_ocaml.libname "bigarray"
let b0_std = B0_ocaml.libname "b0.std"
(* Libraries *)
let qoic_lib =
let srcs = F... | null | https://raw.githubusercontent.com/dbuenzli/qoic/663891b28ae6843ba4c3d00aecb3d098fc76e261/B0.ml | ocaml | OCaml library names
Libraries
Tests
Packs | open B0_kit.V000
open Result.Syntax
let qoic = B0_ocaml.libname "qoic"
let unix = B0_ocaml.libname "unix"
FIXME this is needed for now because of
*)
let bigarray = B0_ocaml.libname "bigarray"
let b0_std = B0_ocaml.libname "b0.std"
let qoic_lib =
let srcs = Fpath.[ `Dir (v "src") ] in
let requires ... |
d80cbe780b22a435967b613b1793351f8d9e5d8403b14a921106357ae044b57e | Ericson2314/lighthouse | Format.hs | {-# OPTIONS -Wall -Werror #-}
module Data.Time.Format
(
-- * UNIX-style formatting
module Data.Time.Format,
module Data.Time.Format.Parse
) where
import Data.Time.Format.Parse
import Data.Time.LocalTime
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar
import Data... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/time/Data/Time/Format.hs | haskell | # OPTIONS -Wall -Werror #
* UNIX-style formatting
<>
| Substitute various time-related information for each %-code in the string, as per 'formatCharacter'.
[@%%@] @%@
[@%t@] tab
[@%n@] newline
[@%z@] timezone offset on the format @-HHMM@.
[@%Z@] timezone name
[@%c@] as 'dateTimeFmt' @locale@ (e.g. @%a... |
module Data.Time.Format
(
module Data.Time.Format,
module Data.Time.Format.Parse
) where
import Data.Time.Format.Parse
import Data.Time.LocalTime
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar
import Data.Time.Calendar.Private
import Data.Time.Clock
import Data.... |
0357331db85bec2fa89972fca86d1e06d1de6919cf0d42afa430cefcd663feb1 | seckcoder/course-compiler | r4_13.rkt | (define (add1 [x : Integer]) : Integer
(+ x 1))
(define (give-me-add1) : (Integer -> Integer)
add1)
((give-me-add1) 41)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r4_13.rkt | racket | (define (add1 [x : Integer]) : Integer
(+ x 1))
(define (give-me-add1) : (Integer -> Integer)
add1)
((give-me-add1) 41)
| |
10d59c5c534a8aa070d703ae1c7bc7bb7fabe964578a0b50aceeb9d934ce8a16 | zmthy/snaplet-rest | Failure.hs | ------------------------------------------------------------------------------
module Snap.Snaplet.Rest.Failure
( headerFailure
, pathFailure
, queryFailure
, lookupFailure
, methodFailure
, acceptFailure
, contentTypeFailure
, contentParseFailure
) where
---------------------------... | null | https://raw.githubusercontent.com/zmthy/snaplet-rest/e9ced9bb1c2f28c995252cc75b23dfd2a17494a9/src/Snap/Snaplet/Rest/Failure.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------... | module Snap.Snaplet.Rest.Failure
( headerFailure
, pathFailure
, queryFailure
, lookupFailure
, methodFailure
, acceptFailure
, contentTypeFailure
, contentParseFailure
) where
import Snap.Core
import Snap.Snaplet.Rest.Config
import Snap.Snaplet.Rest.Options
import Snap.Snaplet.Res... |
dd7902d74410abeb4ba3d728e079f135dc3081e40d42d6d06a76b600b22f17e5 | camlp4/camlp4 | myocamlbuild.ml | (****************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/camlp4/camlp4/862936ff67fe01f8e2e35e667e4a7f2990ebc300/myocamlbuild.ml | ocaml | **************************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2007 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 the special
open Ocamlbuild_plug... |
9b018c0a6be2239e3a1b5c3c8890ee66120a1ae46227271c3c9c5b3a9b59e83d | janestreet/core | fn_for_testing.mli | open! Core
module type S = sig
type t [@@deriving sexp_of, compare]
end
module type Examples = sig
type t
val examples : t list
end
* Provides [ sexp_of , compare ] for function types . Both work by first converting
functions to a [ ( Input.t , Output.t ) List . Assoc.t ] using [ Examples.examples ] a... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/fn_for_testing.mli | ocaml | open! Core
module type S = sig
type t [@@deriving sexp_of, compare]
end
module type Examples = sig
type t
val examples : t list
end
* Provides [ sexp_of , compare ] for function types . Both work by first converting
functions to a [ ( Input.t , Output.t ) List . Assoc.t ] using [ Examples.examples ] a... | |
eec69dabb8e993bc68c10d7a89d68bbf71f205af89887a8aaff421cadee42f47 | astrada/ocaml-extjs | ext_layout_container_Container.ml | class type t =
object('self)
inherit Ext_layout_Layout.t
inherit Ext_util_ElementContainer.t
method overflowPadderEl : Ext_dom_Element.t Js.t Js.prop
method beginLayout_obj : _ Js.t -> unit Js.meth
method beginLayoutCycle : Ext_layout_ContextItem.t Js.t -> unit Js.meth
method configureItem_obj : _ Js.t -... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_layout_container_Container.ml | ocaml | class type t =
object('self)
inherit Ext_layout_Layout.t
inherit Ext_util_ElementContainer.t
method overflowPadderEl : Ext_dom_Element.t Js.t Js.prop
method beginLayout_obj : _ Js.t -> unit Js.meth
method beginLayoutCycle : Ext_layout_ContextItem.t Js.t -> unit Js.meth
method configureItem_obj : _ Js.t -... | |
c2f53f47dfb2d3f56b06ac5fd319a58bbd16f92e8c7361addbb8dfbd15750352 | SNePS/SNePS2 | path.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : path.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file are... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps/fns/path.lisp | lisp | Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : path.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " basi... |
477cb7026f691313f9d48d8cfdfab7f97ea2880c4f12312eeaed45b3d0a94c5e | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | TaxId.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 TaxId
module StripeAPI.Types.TaxId where
import qualified Control.Monad.Fa... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/TaxId.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema TaxId
# SOURCE #
# SOURCE #
| Defines the object schema located at @components.schemas.tax_id@ in the specification.
A customer\'s tax IDs are displayed on invoices and credit notes issued for the customer.
Relat... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.TaxId where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson ... |
ec50161a8eadf4816c659cc3f641394ad395e7244f163be9ee6c88d83024cbc2 | fetburner/Coq2SML | vernacentries.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/toplevel/vernacentries.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* The main interpretation function o... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Ver... |
934fc7dd44d381664bdddb5d7ee817c97852390fdcadd720cfbd795ee723c6e8 | thosmos/riverdb | project.cljc | (ns riverdb.rad.model.project
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.rad.attributes :as attr :refer [defattr]]
[com.fulcrologic.rad.attributes-options :as ao]
[com.fulcrologic.rad.authorization :as auth]
[com.fulcrologic.rad.form :as form]
#?(:cl... | null | https://raw.githubusercontent.com/thosmos/riverdb/db4567b7eb957d9ee668525c8f48133421dd53e2/src/rad/riverdb/rad/model/project.cljc | clojure | (ns riverdb.rad.model.project
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.rad.attributes :as attr :refer [defattr]]
[com.fulcrologic.rad.attributes-options :as ao]
[com.fulcrologic.rad.authorization :as auth]
[com.fulcrologic.rad.form :as form]
#?(:cl... | |
2a3f10e8c94ae98a657a83efcf9f36ce1c06845c22abb89e1401a1592d8860b6 | ice1000/learn | calculate-average.hs | module Average where
avg :: [Float] -> Float
avg l = (sum l) / (fromIntegral $ length l :: Float)
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/calculate-average.hs | haskell | module Average where
avg :: [Float] -> Float
avg l = (sum l) / (fromIntegral $ length l :: Float)
| |
fcc7a5cd59b23e808cf1f4aa080869b55a89659de792a7344506f63e4d5ca1f1 | realworldocaml/book | write.mli | * { 2 JSON writers }
val to_string :
?buf:Buffer.t ->
?len:int ->
?suf:string ->
?std:bool ->
t -> string
* Write a compact JSON value to a string .
@param buf allows to reuse an existing buffer created with
[ Buffer.create ] . The buffer is cleared of all contents
before starting and... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/yojson/lib/write.mli | ocaml | * Write a compact JSON value to a channel.
Note: the [out_channel] is not flushed by this function.
See [to_string] for the role of the optional arguments and raised exceptions.
* Write a compact JSON value to an existing buffer.
See [to_string] for the role of the optional argument and raised excep... | * { 2 JSON writers }
val to_string :
?buf:Buffer.t ->
?len:int ->
?suf:string ->
?std:bool ->
t -> string
* Write a compact JSON value to a string .
@param buf allows to reuse an existing buffer created with
[ Buffer.create ] . The buffer is cleared of all contents
before starting and... |
f292eddcdd1e53bbfb49a2870c7b9d3394939baf982ec721805453364a7fb80e | gabebw/croniker | UrlParser.hs | module Croniker.UrlParser
( containsUrl
) where
import Prelude
import Data.Monoid ((<>))
import qualified Data.Text as T
import Data.Maybe (isJust)
import Network.URI.TLD (parseTLDText)
containsUrl :: T.Text -> Bool
containsUrl = any isUrl . T.words
isUrl :: T.Text -> Bool
isUrl url = hasDot && parsesAsURI
... | null | https://raw.githubusercontent.com/gabebw/croniker/89f081738c229a3302af3b0123fea208bccbda11/src/Croniker/UrlParser.hs | haskell | module Croniker.UrlParser
( containsUrl
) where
import Prelude
import Data.Monoid ((<>))
import qualified Data.Text as T
import Data.Maybe (isJust)
import Network.URI.TLD (parseTLDText)
containsUrl :: T.Text -> Bool
containsUrl = any isUrl . T.words
isUrl :: T.Text -> Bool
isUrl url = hasDot && parsesAsURI
... | |
2a8ac8327dcacc1ee2ca879d837fe78008c8739be7a1fc91b743c589af91a9ab | privet-kitty/cl-competitive | circumcenter.lisp | (defpackage :cp/circumcenter
(:use :cl)
(:export #:calc-circumcenter))
(in-package :cp/circumcenter)
;;
(declaim (inline calc-circumcenter))
(defun calc-circumcenter (p1 p2 p3 &optional (eps 1d-8))
"Returns the center of circumcirlce if it exists, otherwise returns NIL. May
throw a floating point exception if E... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/circumcenter.lisp | lisp | (defpackage :cp/circumcenter
(:use :cl)
(:export #:calc-circumcenter))
(in-package :cp/circumcenter)
(declaim (inline calc-circumcenter))
(defun calc-circumcenter (p1 p2 p3 &optional (eps 1d-8))
"Returns the center of circumcirlce if it exists, otherwise returns NIL. May
throw a floating point exception if EPS i... | |
244c2cfcd41a7f2d4da9d0f568dae4c30ec156bb054a01d91141e05fa253ebfb | haskell-mafia/boris | Build.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Boris.Service.Build (
BuilderError (..)
, builder
, renderBuilderError
) where
import Boris.Build
import Boris.Core.Data
import Boris.Service.Git
import Boris.Service.Log
import Boris.Se... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-service/src/Boris/Service/Build.hs | haskell | # LANGUAGE OverloadedStrings #
|
Basic executor flow:
* pick a build off the queue.
* we try to acknowledge it, dropping it if someone else has already
picked up the build.
* we create a new workspace based on the build-id.
* we initialise the workspace:
* get the repository
* read the confi... | # LANGUAGE NoImplicitPrelude #
module Boris.Service.Build (
BuilderError (..)
, builder
, renderBuilderError
) where
import Boris.Build
import Boris.Core.Data
import Boris.Service.Git
import Boris.Service.Log
import Boris.Service.Workspace
import Bo... |
249b12a4693b88f62812504b58a810bc4c3dc2e2bc4a6f28135364bf6134044e | wrengr/unification-fd | STVar.hs |
# LANGUAGE Rank2Types
, MultiParamTypeClasses
, UndecidableInstances
, FlexibleInstances
#
, MultiParamTypeClasses
, UndecidableInstances
, FlexibleInstances
#-}
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
----------------------... | null | https://raw.githubusercontent.com/wrengr/unification-fd/16301b1630a3a75168da0dd7d744c91dfaf007cc/test/bench/Control/Unification/STVar.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
~ 2021.10.17
|
Maintainer :
Stability : experimental
This module defines an implementation of mutable unification
variables using the 'ST' monad.
---------------... |
# LANGUAGE Rank2Types
, MultiParamTypeClasses
, UndecidableInstances
, FlexibleInstances
#
, MultiParamTypeClasses
, UndecidableInstances
, FlexibleInstances
#-}
Module : Control . Unification . STVar
Copyright... |
3b7b4cbbd81cf8b8ec0ae601c718e348bddc10797c20a021b13482cfda85aa2a | KennethAdamMiller/superset_disassembler | superset_impl.ml | open Bap.Std
open Regular.Std
open Core_kernel
open Or_error
open Graphlib.Std
module Dis = Disasm_expert.Basic
type elem = mem * (Dis.full_insn option)
module G = Graphlib.Make(Addr)(Unit)
module I = Graph.Imperative.Digraph.ConcreteBidirectional(Addr)
type t = {
arch : arch;
filename : string opt... | null | https://raw.githubusercontent.com/KennethAdamMiller/superset_disassembler/54447ba9aa10ab667c744a876a698abbc365bc30/src/superset_impl.ml | ocaml | marked data
visited
union_find
`Height 1.0*.Memory.(length mem);
`Color color;
`Weight weight;
invariant: [h] contains exactly the vertices which have been pushed | open Bap.Std
open Regular.Std
open Core_kernel
open Or_error
open Graphlib.Std
module Dis = Disasm_expert.Basic
type elem = mem * (Dis.full_insn option)
module G = Graphlib.Make(Addr)(Unit)
module I = Graph.Imperative.Digraph.ConcreteBidirectional(Addr)
type t = {
arch : arch;
filename : string opt... |
29d1bb20a8442f262f9489e660de077b8849152b896691428c4441df9fe48388 | abdulapopoola/SICPBook | Ex2.74.scm | #lang racket
;; SOLUTION IS heavily influenced by solution here:
;; -sicp/blob/master/2.4/2.74.scm
;; Also is racket
;;HELPERS
(define (attach-tag type-tag contents)
(cons type-tag contents))
(define (type-tag datum)
(if (pair? datum)
(car datum)
(error "Bad tagged datum:
TYPE-TAG" dat... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.4/Ex2.74.scm | scheme | SOLUTION IS heavily influenced by solution here:
-sicp/blob/master/2.4/2.74.scm
Also is racket
HELPERS
SAMPLE DATA
A hash table to hold file reading operations:
Getter and setter to access the hash table:
The new company should just add set and get operations to the existing
hash table. | #lang racket
(define (attach-tag type-tag contents)
(cons type-tag contents))
(define (type-tag datum)
(if (pair? datum)
(car datum)
(error "Bad tagged datum:
TYPE-TAG" datum)))
(define (contents datum)
(if (pair? datum)
(cdr datum)
(error "Bad tagged datum:
... |
0246034bd0b7cbbd925942683e31db52bd73eee155d275e3e188899d19858d4e | onixie/w32api | kernel32.lisp | (defpackage #:w32api.kernel32
(:use #:common-lisp #:cffi #:w32api.type)
(:export GetModuleHandleW
GetLastError
FormatMessageW
OpenThread
TerminateThread
ResumeThread
SuspendThread
ExitThread
GetExitCodeThread
OpenProcess
TerminateProcess
ExitProcess
GetE... | null | https://raw.githubusercontent.com/onixie/w32api/bc2c17a3ff493b4dc22c8c0479ca1bf0bdcce5cc/api/kernel32.lisp | lisp | Win 8 or later
Win 8 or later
Thread
Process
Processor
Synchronization
| (defpackage #:w32api.kernel32
(:use #:common-lisp #:cffi #:w32api.type)
(:export GetModuleHandleW
GetLastError
FormatMessageW
OpenThread
TerminateThread
ResumeThread
SuspendThread
ExitThread
GetExitCodeThread
OpenProcess
TerminateProcess
ExitProcess
GetE... |
ea5fcf78778bd929bffa84bc964aeeaca1a5d90658cc42993c288459629e8ac8 | KULeuven-CS/CPL | 1.16.rkt | #lang eopl
(require rackunit)
Exercise 1.16
(define invert
(lambda (lst)
(if(null? lst)
lst
(cons (list (car (cdr (car lst))) (car (car lst)))(invert (cdr lst))))))
| null | https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter1/1.16.rkt | racket | #lang eopl
(require rackunit)
Exercise 1.16
(define invert
(lambda (lst)
(if(null? lst)
lst
(cons (list (car (cdr (car lst))) (car (car lst)))(invert (cdr lst))))))
| |
a3fac3a5443ab61fd89b3fa921694eba6b75d24df59b6cabe8cabc8f2bd7be60 | brandonchinn178/advent-of-code | Day9.hs | {- stack script
--resolver lts-12.12
-}
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
import Data.List (groupBy)
import qualified Data.Map.Strict as Map
data Circle = Circle
{ prev :: [Int]
, next :: [Int]
} deriving (Show)
main :: IO ()
main = do
let numPlayers = 471
lastMarble = 72026
... | null | https://raw.githubusercontent.com/brandonchinn178/advent-of-code/a4b0616f8764620e28759276c333fe37d6685d57/2018/Day9.hs | haskell | stack script
--resolver lts-12.12
| # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
import Data.List (groupBy)
import qualified Data.Map.Strict as Map
data Circle = Circle
{ prev :: [Int]
, next :: [Int]
} deriving (Show)
main :: IO ()
main = do
let numPlayers = 471
lastMarble = 72026
print $ part1 numPlayers lastMarble
print ... |
937316d5160e005477025f47ced1bf804f94338966932b012e72072d4e4212ca | TheLortex/mirage-monorepo | path.ml | type 'a t = (#Fs.dir as 'a) * Fs.path
let ( / ) (dir, p1) p2 =
match p1, p2 with
| p1, "" -> (dir, Filename.concat p1 p2)
| _, p2 when not (Filename.is_relative p2) -> (dir, p2)
| ".", p2 -> (dir, p2)
| p1, p2 -> (dir, Filename.concat p1 p2)
let pp f ((t:#Fs.dir), p) =
Fmt.pf f "<%t:%s>" t#pp (String.esca... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/path.ml | ocaml | type 'a t = (#Fs.dir as 'a) * Fs.path
let ( / ) (dir, p1) p2 =
match p1, p2 with
| p1, "" -> (dir, Filename.concat p1 p2)
| _, p2 when not (Filename.is_relative p2) -> (dir, p2)
| ".", p2 -> (dir, p2)
| p1, p2 -> (dir, Filename.concat p1 p2)
let pp f ((t:#Fs.dir), p) =
Fmt.pf f "<%t:%s>" t#pp (String.esca... | |
95edc201498aa8a3c2a48234caf9f8ce65b5d23194b5df1bf5e3c1c2b6199a71 | SRI-CSL/f3d | gui-pkg.lisp | (in-package :cl-user)
;;; Not sure the best way to handle these
;;; Alternatives: export them from gl
;;; import them to gui.
(defpackage :gui
(:use :common-lisp :qffi :lcl :lx :gl
:math :common-symbols
:tk ; Can the tk package definition live here with GUI?
:transforms :img :obj)
... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-tk/basic-gui/gui-pkg.lisp | lisp | Not sure the best way to handle these
Alternatives: export them from gl
import them to gui.
Can the tk package definition live here with GUI?
(:import-from :tk "FRAME-PANES-TK-SCRIPT")
"*BREAK-ON-DISPLAY-ERROR*" | (in-package :cl-user)
(defpackage :gui
(:use :common-lisp :qffi :lcl :lx :gl
:math :common-symbols
:transforms :img :obj)
(:import-from :tk
"INSTALL-TK-EVENT-HANDLER"
"SET-DOC-LINE"
"ADD-TO-MODIFIER-MASK"
"REMOVE-FROM-MODIFIER-MASK"
... |
fddce5012ce6d3a4eb915e96ec10a815322841cc5d2362fe3de4384436eb1b51 | galdor/tungsten | client.lisp | (in-package :http)
(deftype connection-key ()
'list)
(defclass client ()
((connections
:type hash-table
:initform (make-hash-table :test #'equal))
(mutex
:type system:mutex
:initform (system:make-mutex :name "http-client"))))
(defclass client-connection ()
((host
:type system:host
:i... | null | https://raw.githubusercontent.com/galdor/tungsten/2d218255f027a8caa6fd9a27d4a1ad57b0bc9ea3/tungsten-http/src/client.lisp | lisp | do this before extracting the key since applying the netrc entry can
We cannot detect if a connection in the pool has timed out or failed
due to a random IO error. When that happens, we will be notified
to automatically retry at least once in this case. | (in-package :http)
(deftype connection-key ()
'list)
(defclass client ()
((connections
:type hash-table
:initform (make-hash-table :test #'equal))
(mutex
:type system:mutex
:initform (system:make-mutex :name "http-client"))))
(defclass client-connection ()
((host
:type system:host
:i... |
cf3c12add48dbd68f179aa10b3533c96d5539929934bafe829bd2172a993b958 | khibino/haskell-relational-record | TypeCheck.hs | module Main where
import Database.HDBC
import Database.HDBC.ODBC
import System.Environment
import System.IO
main :: IO ()
main = do
args <- getArgs
if length args > 1 then do
conn <- connectODBC $ args !! 0
rows <- quickQuery conn $ args !! 1
mapM_ putStrLn $ map show rows
else
... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/test/HDBC/SQLServer/TypeCheck.hs | haskell | module Main where
import Database.HDBC
import Database.HDBC.ODBC
import System.Environment
import System.IO
main :: IO ()
main = do
args <- getArgs
if length args > 1 then do
conn <- connectODBC $ args !! 0
rows <- quickQuery conn $ args !! 1
mapM_ putStrLn $ map show rows
else
... | |
944d01f026324d6c3eaeb1f50e599c3925cde29f3b4c9ca8d98f60545ffc947a | hasufell/hpath | ToAbsSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Posix.RawFilePath.Directory.ToAbsSpec where
import Test.Hspec
import "hpath-directory" System.Posix.RawFilePath.Directory
spec :: Spec
spec = describe "System.Posix.RawFilePath.Directory.toAbs" $ do
-- successes --
it "toAbs returns absolute paths unchang... | null | https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/ToAbsSpec.hs | haskell | # LANGUAGE OverloadedStrings #
successes -- |
module System.Posix.RawFilePath.Directory.ToAbsSpec where
import Test.Hspec
import "hpath-directory" System.Posix.RawFilePath.Directory
spec :: Spec
spec = describe "System.Posix.RawFilePath.Directory.toAbs" $ do
it "toAbs returns absolute paths unchanged" $ do
let p1 = "/a/b/c/d"
to <- toAbs p1... |
e2cef77fc65d7b01a415ee13f2b044ebe1d33e6c4370cb53c1c807dea5f31dc4 | macourtney/Conjure | environment.clj | (ns config.environment)
(def properties
(atom
{ :default-environment "test"
:source-dir "test"
:call-controller-fn #(identity true) }))
| null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_plugin/test/config/environment.clj | clojure | (ns config.environment)
(def properties
(atom
{ :default-environment "test"
:source-dir "test"
:call-controller-fn #(identity true) }))
| |
54c743adb9a0498e1e82f6ede25855e4ff8db4a7d22d67f71371e5251a24dee9 | realworldocaml/book | scope.mli | (** Scopes *)
(** A scope is a project + a library database *)
open Import
type t
val root : t -> Path.Build.t
val project : t -> Dune_project.t
(** Return the library database associated to this scope *)
val libs : t -> Lib.DB.t
val coq_libs : t -> Coq_lib.DB.t
(** Scope databases *)
module DB : sig
val find... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/scope.mli | ocaml | * Scopes
* A scope is a project + a library database
* Return the library database associated to this scope
* Scope databases |
open Import
type t
val root : t -> Path.Build.t
val project : t -> Dune_project.t
val libs : t -> Lib.DB.t
val coq_libs : t -> Coq_lib.DB.t
module DB : sig
val find_by_dir : Path.Build.t -> t Memo.t
val find_by_project : Context.t -> Dune_project.t -> t Memo.t
val public_libs : Context.t -> Lib.DB.t Mem... |
9e52f1d379923e748e628ce4144d4b7d173e18d01243e96bec73c140fd35ae6a | manuel-serrano/hop | xdomain.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/3.0.x / runtime / xdomain.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/runtime/xdomain.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Hop xdomain requests */
*===========================... | * serrano / prgm / project / hop/3.0.x / runtime / xdomain.scm * /
* Author : * /
* Creation : Fri May 6 11:54:10 2011 * /
* Last change : Sun Jan 11 20:41:30 2015 ( serrano ) * /
* Copyr... |
071355e89166911a44af4ed59eafb9f59bd7db51b1197f4973ab1269c0dde5e1 | serokell/ariadne | Util.hs | module Ariadne.Util
( atomicRunStateIORef'
, postfixLFields
) where
import Control.Lens (LensRules, lensField, lensRules, mappingNamer)
atomicRunStateIORef' :: IORef s -> State s a -> IO a
atomicRunStateIORef' ref st = atomicModifyIORef' ref (swap . runState st)
postfixLFields :: LensRules
postf... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/core/src/Ariadne/Util.hs | haskell | module Ariadne.Util
( atomicRunStateIORef'
, postfixLFields
) where
import Control.Lens (LensRules, lensField, lensRules, mappingNamer)
atomicRunStateIORef' :: IORef s -> State s a -> IO a
atomicRunStateIORef' ref st = atomicModifyIORef' ref (swap . runState st)
postfixLFields :: LensRules
postf... | |
2492804551c0228c8a5d97eac0d6978130a5c75783a4ebd9c68f60ef0c33a0cc | fulcrologic/statecharts | action_send_spec.cljc | (ns com.fulcrologic.statecharts.algorithms.v20150901.action-send-spec
(:require
[com.fulcrologic.statecharts.elements
:refer [state
initial
parallel
final
transition
raise
on-entry
on-exit]]
[com.fulcrologic.statec... | null | https://raw.githubusercontent.com/fulcrologic/statecharts/dbb4a882e8b292711d543dd699568dd125fc9b14/src/test/com/fulcrologic/statecharts/algorithms/v20150901/action_send_spec.cljc | clojure | (ns com.fulcrologic.statecharts.algorithms.v20150901.action-send-spec
(:require
[com.fulcrologic.statecharts.elements
:refer [state
initial
parallel
final
transition
raise
on-entry
on-exit]]
[com.fulcrologic.statec... | |
4ea4a588dc316e83ead2b4d8c22753e82918c496dec5a1580a7be0650734c1f5 | liebke/avout | project.clj | (defproject avout-sdb "0.5.4-SNAPSHOT"
:description "An example of an Avout Orolo-based, SimpleDB-backed Distributed Atom"
:dependencies [[org.clojure/clojure "1.3.0"]
[orolo "0.5.4-SNAPSHOT"]
; [com.amazonaws/aws-java-sdk "1.2.12"]]
[com.amazonaws/aws-java-sdk "1.3... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/experimental/orolo/plugins/avout-sdb/project.clj | clojure | [com.amazonaws/aws-java-sdk "1.2.12"]] | (defproject avout-sdb "0.5.4-SNAPSHOT"
:description "An example of an Avout Orolo-based, SimpleDB-backed Distributed Atom"
:dependencies [[org.clojure/clojure "1.3.0"]
[orolo "0.5.4-SNAPSHOT"]
[com.amazonaws/aws-java-sdk "1.3.0"]]
:dev-dependencies [[lein-clojars "0.7.0"]])
|
f16876f82b832fac81a8b7c0296aa491778f25e813fc6fed85e4d2e09e3cb56d | futurice/haskell-mega-repo | Markup.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Futurice.App.PlanMillSync.Markup (
module Futurice.Lucid.Foundation,
page_,
Nav (..),
) where
import Futurice.Lucid.Foundation hiding (page_)
import Futurice.Lucid.Navigation hiding (page_)
import Futurice.Prelude
import Prelude ... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/planmill-sync/src/Futurice/App/PlanMillSync/Markup.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Futurice.App.PlanMillSync.Markup (
module Futurice.Lucid.Foundation,
page_,
Nav (..),
) where
import Futurice.Lucid.Foundation hiding (page_)
import Futurice.Lucid.Navigation hiding (page_)
import Futurice.Prelude
import Prelude ()
import qualified Data.Text ... |
1ee8b3e665c375fe2f32c766b693ab7af29dda4512fac7ccc79c4df5cba1b035 | metabase/metabase | pulse_test.clj | (ns metabase.pulse-test
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer :all]
[medley.core :as m]
[metabase.email :as email]
[metabase.integrations.slack :as slack]
[metabase.models
:refer [Card Collection Pulse PulseCard PulseChannel PulseChannelRecipient]]
... | null | https://raw.githubusercontent.com/metabase/metabase/56b28e5b07e73002d5c507f583e3d64439ba8b8c/test/metabase/pulse_test.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| Util Fns & Macros |
+--------------------------------------------------------------------------------------... | (ns metabase.pulse-test
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer :all]
[medley.core :as m]
[metabase.email :as email]
[metabase.integrations.slack :as slack]
[metabase.models
:refer [Card Collection Pulse PulseCard PulseChannel PulseChannelRecipient]]
... |
05167aa481663fffd5688a124328c1a24949edfeaea3b1f353a3cae65513b44c | MLstate/opalang | intMap.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/intMap.ml | ocaml | Big-endian means that branches are shared for paths whose higher bits are
equal
prefix
branching bit (mask)
*The highest bit, assuming there is one at least at bit m, else 0
lowest bit of i
i without its lowest bit
bits at position strictly lower than m are zeroed
* Highest bit where p1 and p2 differ at bit m or ... |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
97975e0dbfa38fbffc65ab00b6ab925f7a61f2a4f86e179bfead8631372e178e | nominolo/lambdachine | Jit0002.hs | # LANGUAGE NoImplicitPrelude , BangPatterns , MagicHash #
-- RUN: %bc_vm_chk
CHECK : @Result@ IND - > GHC.Bool . True`con_info
module Bc.Jit0002 where
import GHC.Base
import GHC.Integer
import GHC.Num
allocList :: Int -> [Int]
allocList (I# n) = go1 n [] []
where
go1 0# acc1 _acc2 = acc1
go1 n# acc1 acc2 =
... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Bc/Jit0002.hs | haskell | RUN: %bc_vm_chk
go2 n# acc1 acc2 =
go1 n# (I# n# : acc2) acc1 -- swapped arguments
Goal:
- PHI x, y
- PHI y, x
| # LANGUAGE NoImplicitPrelude , BangPatterns , MagicHash #
CHECK : @Result@ IND - > GHC.Bool . True`con_info
module Bc.Jit0002 where
import GHC.Base
import GHC.Integer
import GHC.Num
allocList :: Int -> [Int]
allocList (I# n) = go1 n [] []
where
go1 0# acc1 _acc2 = acc1
go1 n# acc1 acc2 =
go1 (n# -# 1#) ... |
ee88167aca34a4747665520ace16d213480362b03a7d6fa93eabd1f78d14cbb6 | casperschipper/ocaml-cisp | cisp3.ml | open Cisp
open Midi
open Seq
let sr = ref 44100.0
(* this maps midi input msg to an output msg (raw midi) *)
let midiInputTestFun input =
(* this translates input into boolean trigger *)
(* a metre boolean mask that triggers notes or rests in the pattern *)
(* dummy event *)
(* apply metre to default event, u... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/oscOut/cisp3.ml | ocaml | this maps midi input msg to an output msg (raw midi)
this translates input into boolean trigger
a metre boolean mask that triggers notes or rests in the pattern
dummy event
apply metre to default event, use Silence as filler | open Cisp
open Midi
open Seq
let sr = ref 44100.0
let midiInputTestFun input =
let pitchPattern =
Cisp.ofList
[ ch [|60;72|]
; ch [|60;67|]
; ch [|74;76;78|]
; ch [|60;60;80;70|]
] |>
transpose
|> concat |> loop (st 3) (st 4) |> concat
in
input
|> ... |
6d61687f4e1603c211df85823b9d0401c479fd9ea9255dd86aed0ab4a74a0de5 | clj-commons/claypoole | lazy_test.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/clj-commons/claypoole/a4bd33f3dd50d04a72d4eb81807ed2d050e7e002/test/com/climate/claypoole/lazy_test.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(ns com.cl... |
6b1c09e01e31752c6ccff7e730ee83848277ecd0717626b1f88bdd2398a4a0a9 | may-liu/qtalk | ejabberd_SUITE.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2013 ,
%%% @doc
%%%
%%% @end
Created : 2 Jun 2013 by < >
%%%-------------------------------------------------------------------
-module(ejabberd_SUITE).
-compile(export_all).
-import(suite, [init_config/1, connec... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/test/ejabberd_SUITE.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
No support for mod_pubsub
No support for carboncopy
Get initial "ver"
Should receive empty IQ-result
Receive a single roster push with the new "ver"
Now requesting r... | @author < >
( C ) 2013 ,
Created : 2 Jun 2013 by < >
-module(ejabberd_SUITE).
-compile(export_all).
-import(suite, [init_config/1, connect/1, disconnect/1,
recv/0, send/2, send_recv/2, my_jid/1, server_jid/1,
pubsub_jid/1, proxy_jid/1, muc_jid/1,
muc_ro... |
1b9b3fa58103f3d3859493c3cef3cb4236b82794ffb68db20696c2bbef53939a | ThoughtWorksInc/infra-problem | middleware.clj | (ns common-utils.middleware)
(defn- get-or-generate-correlation-id
[request]
(get-in request
[:headers "x-correlation-id"]
(str (java.util.UUID/randomUUID))))
(defn correlation-id-middleware [app]
(fn [request]
(let [correlation-id (get-or-generate-correlation-id request)]
(let [r... | null | https://raw.githubusercontent.com/ThoughtWorksInc/infra-problem/cd4e94377e11d5545de06732e36213ccbd05c2ba/common-utils/src/common_utils/middleware.clj | clojure | (ns common-utils.middleware)
(defn- get-or-generate-correlation-id
[request]
(get-in request
[:headers "x-correlation-id"]
(str (java.util.UUID/randomUUID))))
(defn correlation-id-middleware [app]
(fn [request]
(let [correlation-id (get-or-generate-correlation-id request)]
(let [r... | |
632c94ad290638b4be483809e3e67bd1c8fc85f385092aa7e70d0928bef0d56b | benknoble/frosthaven-manager | monsters.rkt | #lang racket
(provide
(contract-out
[single-monster-event/c contract?]
[add-monster-event/c contract?]
[remove-monster-event/c contract?]
[single-monster-picker (->* (info-db/c (obs/c level/c))
(#:on-change (-> single-monster-event/c any)
... | null | https://raw.githubusercontent.com/benknoble/frosthaven-manager/5e034a8fc92ff738af5cc9c85688ca6e4420c554/gui/monsters.rkt | racket | not setting current renderer, nor using an eventspace: dialog
On η-expansion of close!: close! can be #f until it is set, so
expand the call to close! (by the time it is called it should
have the correct value, a procedure).
TODO: choice "hide"/"collapse" ?
no close: cannot close
no reorder: cannot reorder
use ... | #lang racket
(provide
(contract-out
[single-monster-event/c contract?]
[add-monster-event/c contract?]
[remove-monster-event/c contract?]
[single-monster-picker (->* (info-db/c (obs/c level/c))
(#:on-change (-> single-monster-event/c any)
... |
b267c8dea5916d49ff958499e001af774ce822d01435972f24a26ab817e8e582 | c-cube/iter | IterLabels.mli | (* This file is free software, part of iterator. See file "license" for more details. *)
* { 1 Simple and Efficient Iterators }
Version of { ! Iterator } with labels
@since 0.5.5
Version of {!Iterator} with labels
@since 0.5.5 *)
type +'a t = ('a -> unit) -> unit
(** An iterator of values of t... | null | https://raw.githubusercontent.com/c-cube/iter/29ece562e2a1d4e62ca286ffd5af356851ab5bf5/src/IterLabels.mli | ocaml | This file is free software, part of iterator. See file "license" for more details.
* An iterator of values of type ['a]. If you give it a function ['a -> unit]
it will be applied to every element of the iterator successively.
* {2 Creation}
* Build an iterator from a iter function
* Call the function repeatedl... |
* { 1 Simple and Efficient Iterators }
Version of { ! Iterator } with labels
@since 0.5.5
Version of {!Iterator} with labels
@since 0.5.5 *)
type +'a t = ('a -> unit) -> unit
type +'a iter = 'a t
* { b NOTE } Type [ ( ' a , ' b ) t2 = ( ' a - > ' b - > unit ) - > unit ]
has been remove... |
b9b633d9436f9f33e9408e55faf887861495fbb86acbb6d971ec8d16e14f8b2b | Leberwurscht/Diaspora-User-Directory | number.mli | type z
module Infix :
sig
val two : z
val one : z
val zero : z
val neg_one : z
val ( *! ) : z -> z -> z
val ( +! ) : z -> z -> z
val ( -! ) : z -> z -> z
val ( %! ) : z -> z -> z
val ( /! ) : z -> z -> z
val ( **! ) : z -> int -> z
val ( <>! ) : z -> z -> bool
val ( =! ) : z -> z -> bool
val (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/number.mli | ocaml | * conversion functions | type z
module Infix :
sig
val two : z
val one : z
val zero : z
val neg_one : z
val ( *! ) : z -> z -> z
val ( +! ) : z -> z -> z
val ( -! ) : z -> z -> z
val ( %! ) : z -> z -> z
val ( /! ) : z -> z -> z
val ( **! ) : z -> int -> z
val ( <>! ) : z -> z -> bool
val ( =! ) : z -> z -> bool
val (... |
0265e8e16e095700e31068e0079bc1437b4d0e1d0127d1ad612e6b32de7f53f4 | samirose/sicp-compiler-project | override-special-form-as-variable.scm | (import (compiler-test)
(override-special-form-as-variable))
(compiler-test-begin "override-special-form-as-variable")
(compiler-test-eq
"let binding can override quote"
42 (override-quote-let))
(compiler-test-eq
"procedure parameter can override quote"
43 (override-quote-arg 42))
(compiler-test-eq
"let bindi... | null | https://raw.githubusercontent.com/samirose/sicp-compiler-project/2bc8a481044b5a653408f8595b2a2396600b8ad6/test-compiler/test/override-special-form-as-variable.scm | scheme | (import (compiler-test)
(override-special-form-as-variable))
(compiler-test-begin "override-special-form-as-variable")
(compiler-test-eq
"let binding can override quote"
42 (override-quote-let))
(compiler-test-eq
"procedure parameter can override quote"
43 (override-quote-arg 42))
(compiler-test-eq
"let bindi... | |
b50a9f482cf1f4c46254c022f009f9c431291a03d170fd506717df3127a0d8da | csabahruska/jhc-components | Fixer.hs | {-# LANGUAGE BangPatterns #-}
-- find fixpoint of constraint problem
2009.01.05 : Lemmih
This may be obvious to a lot of people but it certainly was n't obvious to me .
The following module help you solve problems that involve iterating over
a piece of data until some steady - state ( aka . a fixpoint ) is f... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Fixer/Fixer.hs | haskell | # LANGUAGE BangPatterns #
find fixpoint of constraint problem
isBottom bottom == True
x `lub` x == x
x `minus` bottom == x
bottom `minus` x == bottom
> y ` lub ` z = = x
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
| mainly for internal use
| add a rule to the current set
| turn an IO action into a ... |
2009.01.05 : Lemmih
This may be obvious to a lot of people but it certainly was n't obvious to me .
The following module help you solve problems that involve iterating over
a piece of data until some steady - state ( aka . a fixpoint ) is found .
One example problem would be dead - code elimination . To r... |
15cb9c2f633453e2188a15a9afa26f183980d82305a9bc4ad4bdc2c04a6c100c | ploeh/advent-of-code-2017 | Solution.hs | module Day08 where
import Data.Maybe (fromMaybe)
import Text.ParserCombinators.ReadP
import qualified Data.Map.Strict as Map
data Inst = INC | DEC deriving (Show, Eq)
data Op = EQL | NEQ | LTh | LTE | GTh | GTE deriving (Show, Eq)
-- Parsing
parseRegister :: ReadP String
parseRegister = munch (`elem` ['a'..'z']) <*... | null | https://raw.githubusercontent.com/ploeh/advent-of-code-2017/e0f66bf2735cf1e37fbcf001296fdda8df3ece8c/Day08/Solution.hs | haskell | Parsing
Tests | module Day08 where
import Data.Maybe (fromMaybe)
import Text.ParserCombinators.ReadP
import qualified Data.Map.Strict as Map
data Inst = INC | DEC deriving (Show, Eq)
data Op = EQL | NEQ | LTh | LTE | GTh | GTE deriving (Show, Eq)
parseRegister :: ReadP String
parseRegister = munch (`elem` ['a'..'z']) <* skipSpaces... |
31b9398de3effbe3a2202242dea7c75afd575175d9424528c9993a58589201c9 | ghcjs/ghcjs-dom | SVGUseElement.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.SVGUseElement
(js_getX, getX, js_getY, getY, js_getWidth, getWidth, js_getHeight,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGUseElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGUseElement.y Mozilla SVGUseElement.y documentation> | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.SVGUseElement
(js_getX, getX, js_getY, getY, js_getWidth, getWidth, js_getHeight,
getHeight, SVGUseElement(..), gTypeSVGUseElement)
where
import Prelude ((.), (==), (>>=),... |
cce13bec29d335ae452f250bd8914e12d00b1ebe79ad01e42c3d89c85335b0b5 | pedestal/pedestal | project.clj | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing ... | null | https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/samples/war-example/project.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
:w... | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
Eclipse Public License 1.0 ( )
(defproject war-example "0.5.1"
:description "Demonstrate packaging a Pedestal app in a war file"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.cloj... |
f6fe9300a88ef1817ea94e63481418b37abceb0fb5a860497e6f78df974df760 | CryptoKami/cryptokami-core | CborSpec.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
| Test . Pos . . CborSpec specification
module Test.Pos.Cbor.CborSpec
( spec
, U
, extension... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/test/Test/Pos/Cbor/CborSpec.hs | haskell | # LANGUAGE GADTs #
--------------------------------------
--------------------------------------
^ Version
^ Serialized script
Type to be used to simulate a breaking change in the serialisation
for extensibility.
Check the `extensionProperty` for more details.
----------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE TemplateHaskell #
| Test . Pos . . CborSpec specification
module Test.Pos.Cbor.CborSpec
( spec
, U
, extensionProperty
) where
import U... |
42d5bfe72d03cd76df1505bd2a6c8f7dea4f55186ec2744ea8a8663c7fc84972 | trevordilley/phaser-cljs-template | config.cljs | (ns game.config)
(def debug?
^boolean goog.DEBUG)
| null | https://raw.githubusercontent.com/trevordilley/phaser-cljs-template/1cffac3d84ce9d21a8b3d0da8e5041e5b4790347/src/cljs/game/config.cljs | clojure | (ns game.config)
(def debug?
^boolean goog.DEBUG)
| |
2cca3aacfe562b5c5cb34e67aceb68526f91c187db4d85286bd5283c1d23351d | 8c6794b6/guile-tjit | t-match.scm | Pattern matching with ` ( ice-9 match ) ' .
;;;
(use-modules (ice-9 match)
record type ( FIXME : See ` t-records.scm ' )
(define-record-type <stuff>
(%make-stuff chbouib)
stuff?
(chbouib stuff:chbouib stuff:set-chbouib!))
(define (matches? obj)
( format # t " matches ? ~a~% " obj )
(match obj
(($ <s... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/vm/t-match.scm | scheme |
(blurps #t)
(format #t "go!~%") | Pattern matching with ` ( ice-9 match ) ' .
(use-modules (ice-9 match)
record type ( FIXME : See ` t-records.scm ' )
(define-record-type <stuff>
(%make-stuff chbouib)
stuff?
(chbouib stuff:chbouib stuff:set-chbouib!))
(define (matches? obj)
( format # t " matches ? ~a~% " obj )
(match obj
(($ <stuff... |
f605de2c085ded0fd2f15bd44bde99462691b79e3a89ad8a42c5dfb7651deac5 | well-typed-lightbulbs/rpi | mtime.mli | (** Interruptions *)
type interrupt_line = L0 | L1 | L2 | L3
val interrupt_line_to_signal_number : interrupt_line -> int
val schedule_next_interrupt : interrupt_line -> Rpi.Mtime.span_us -> unit
val acknowledge_interrupt : interrupt_line -> unit
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/rpi/9bedf5735277c66009dffb0c70489ca0f88d84fc/src/drivers/mtime.irq/mtime.mli | ocaml | * Interruptions |
type interrupt_line = L0 | L1 | L2 | L3
val interrupt_line_to_signal_number : interrupt_line -> int
val schedule_next_interrupt : interrupt_line -> Rpi.Mtime.span_us -> unit
val acknowledge_interrupt : interrupt_line -> unit
|
221ecb2879e18a706bd6ffaba49d8505c506957c0b0fe75c97c543218fb234bf | dparis/gen-phzr | gear_constraint.cljs | (ns phzr.impl.accessors.physics.p2.gear-constraint)
(def gear-constraint-get-properties
{:game "game"
:world "world"})
(def gear-constraint-set-properties
{:game "game"
:world "world"}) | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/physics/p2/gear_constraint.cljs | clojure | (ns phzr.impl.accessors.physics.p2.gear-constraint)
(def gear-constraint-get-properties
{:game "game"
:world "world"})
(def gear-constraint-set-properties
{:game "game"
:world "world"}) | |
579b5309b1124cac3f25f5c1e543115f10319c26dd1a364d38fd0697f8cd5136 | ocaml/opam | opamVariable.mli | (**************************************************************************)
(* *)
Copyright 2012 - 2017 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/074df6b6d87d4114116ea41311892b342cfad3de/src/format/opamVariable.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2017 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
* { 2 Variable names }
include OpamStd.ABSTRACT
type variable = t
type variable_contents =... |
d7188bf939fc716a75204662a40fab75ca8038a8f179dd3630340a917c7061ab | scravy/bed-and-breakfast | Vector.hs | # LANGUAGE Haskell2010
, TypeFamilies
, FlexibleContexts
, Trustworthy
, StandaloneDeriving
, DeriveDataTypeable
, CPP
#
, TypeFamilies
, FlexibleContexts
, Trustworthy
, StandaloneDeriving
, DeriveDataTypeable
, CPP
#-}
{-# OPTIONS -Wall -fno-warn-name-sh... | null | https://raw.githubusercontent.com/scravy/bed-and-breakfast/e900464394bb13edeb7a439ec758f059dc4712db/src/Numeric/Vector.hs | haskell | # OPTIONS -Wall -fno-warn-name-shadowing #
<.>
>< | # LANGUAGE Haskell2010
, TypeFamilies
, FlexibleContexts
, Trustworthy
, StandaloneDeriving
, DeriveDataTypeable
, CPP
#
, TypeFamilies
, FlexibleContexts
, Trustworthy
, StandaloneDeriving
, DeriveDataTypeable
, CPP
#-}
module Numeric.Vector (
V... |
361ab274575233f9e4c9e174e6c33bfd21152ac2e2ae75e75d9a5cbd71fec5fd | nuvla/ui | effects.cljs | (ns sixsq.nuvla.ui.cimi-api.effects
"Provides effects that use the CIMI client to interact asynchronously with
the server."
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :refer [<!]]
[clojure.string :as str]
[re-frame.core :refer [dispatch reg-fx]]
... | null | https://raw.githubusercontent.com/nuvla/ui/52718be9e639345b031673e69bc231b38974f3a9/code/src/cljs/sixsq/nuvla/ui/cimi_api/effects.cljs | clojure | This is done to get a fully updated resource. If the return
value of edit is used, then, for example, the operations are
not updated. | (ns sixsq.nuvla.ui.cimi-api.effects
"Provides effects that use the CIMI client to interact asynchronously with
the server."
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :refer [<!]]
[clojure.string :as str]
[re-frame.core :refer [dispatch reg-fx]]
... |
f758c510fd41ebb2890f457dc7b07fbb7c458f9d293587fbd353dacbccdf0a5b | mbutterick/beautiful-racket | Toffoli.hdl.rkt | #lang hdl-demo
CHIP And {
IN a, b;
OUT out;
PARTS:
Nand(a=a, b=b, out=nandout);
Not(in=nandout, out=out);
}
| null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/hdl-demo/Toffoli.hdl.rkt | racket | #lang hdl-demo
CHIP And {
PARTS:
}
| |
566c4c8c4551e44c4c2629965fb6ae2f0458f5379510b226de8d90580c154aa9 | cosmicoptima/dictator | Utils.hs | -- | Miscellaneous utilities.
# OPTIONS_GHC -Wno - orphans #
module Utils
( getWordListURL
, getWordList
, randomWord
, randomChoice
, getAdjList
, getNounList
, getVerbList
, randomChoiceMay
, shuffle
, odds
, oddsIO
, acronym
, convertColor
, singleton
, fragmentText
, messageSplit
... | null | https://raw.githubusercontent.com/cosmicoptima/dictator/f3c575db4658820400f11297346f51ffaee75300/src/Utils.hs | haskell | | Miscellaneous utilities.
multiset instances
------------------
random words
-------------
| Generate the meaning of an acronym from random words.
all else
---------
| Convert a colour from the palettes library into something discord can use.
| Split a message into segments of code blocks and non-code-blocks.
... | # OPTIONS_GHC -Wno - orphans #
module Utils
( getWordListURL
, getWordList
, randomWord
, randomChoice
, getAdjList
, getNounList
, getVerbList
, randomChoiceMay
, shuffle
, odds
, oddsIO
, acronym
, convertColor
, singleton
, fragmentText
, messageSplit
, voiceFilter
, tokenizeMess... |
cc674584c51696c2de70380b06bce9c9b7af2ce43c9dff8fd69a5ed330a965c0 | trivial-features/trivial-features | tf-corman.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
tf-corman.lisp --- implementation of trivial - features .
;;;
Copyright ( C ) 2007 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to dea... | null | https://raw.githubusercontent.com/trivial-features/trivial-features/f6e8dd7268ae0137dbde4be469101a7f735f6416/src/tf-corman.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... | tf-corman.lisp --- implementation of trivial - features .
Copyright ( C ) 2007 ,
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... |
d006db6c4c77bf131be72e7ccb332cfdb7655bea6eeac418d45ed23888692e01 | links-lang/links | graph.ml | (** A few graph algorithms. Pure interfaces, but impure
implementations. A graph is represented as node lists + adjacency
list.
*)
open Utility
(* Utility function for hashtables *)
let hashfind_dflt table elem def =
try Hashtbl.find table elem
with NotFound _ -> def
(** Crazy notation for hashtable upda... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/graph.ml | ocaml | * A few graph algorithms. Pure interfaces, but impure
implementations. A graph is represented as node lists + adjacency
list.
Utility function for hashtables
* Crazy notation for hashtable updates. Suggestions are welcomed.
[table *->! k v] updates k to v in table
[table *-> k |-> d] returns the value... |
open Utility
let hashfind_dflt table elem def =
try Hashtbl.find table elem
with NotFound _ -> def
let ( *->!) table k v = Hashtbl.replace table k v
let ( *-> ) = hashfind_dflt
let (|->) op arg = op arg
let ( *+> ) table k v =
(table *->! k) (v :: (table *-> k |-> []))
let ( ++= ) op arg = op arg
let hash... |
955460cada767debefee46ac916ac2738898f782fa390f234be721c4af880372 | TrustInSoft/tis-interpreter | LogicSemantics.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/LogicSemantics.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
deb499b87d10e3a7dd837c4171ea8e3c20a4e753b69f62484cdac2df69725468 | gogins/csound-extended-nudruz | withclocc.lisp | (in-package :cm)
;; WITHCLOCC.LISP -- some stuff that requires clocc libraries.
;; NOTE WELL: NOT ANY MORE! Replaced clocc modules with vendor.lisp.
;; PROPER-SUBSETS
;; power set of a list, minus trivial (empty & complete) sets
(defun proper-subsets (a-list)
(butlast
(set-difference (subsets a-list) (list... | null | https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/sources/withclocc.lisp | lisp | WITHCLOCC.LISP -- some stuff that requires clocc libraries.
NOTE WELL: NOT ANY MORE! Replaced clocc modules with vendor.lisp.
PROPER-SUBSETS
power set of a list, minus trivial (empty & complete) sets
SUBSETS-LEN
all subsets of specified size
PERMUTATIONS -- returns all permutations of a list
REORDER-BY-MELINT ... | (in-package :cm)
(defun proper-subsets (a-list)
(butlast
(set-difference (subsets a-list) (list a-list 'nil))))
( subsets - len ' ( 1 2 3 4 ) 2 ) = ( ( 3 4 ) ( 2 4 ) ( 2 3 ) ( 1 4 ) ( 1 3 ) ( 1 2 ) )
(defun subsets-len (a-list len)
(set-difference
(mapcar (lambda (x) (if (= (length x) len) x))
... |
cadfe5e421e29f2bea021ce6aba1a0a8d0bf0ca2530eb038c17ece938a36187d | alavrik/piqi-erlang | piqi_app.erl | Copyright 2009 , 2010 , 2011 , 2012 , 2013
%%
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, softwar... | null | https://raw.githubusercontent.com/alavrik/piqi-erlang/063ecc4f8fd54543acf01953b0a63b2b7ebf17a9/src/piqi_app.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2009 , 2010 , 2011 , 2012 , 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc OTP application behavior for Piqi
-module(piqi_app).
-behaviour(application).
-export([start/2, stop/1]).
callbacks... |
f75e7e4fa5fcc83c93f91e483e8d6bb63d1b695632afcdc2b2cae5c414184079 | erlio/vmq_server | vmq_server_app.erl | Copyright 2014 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/erlio/vmq_server/d008c6dcc62fe985d08456caa4024750e1febf38/src/vmq_server_app.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_server_app).
-behaviour(application).
-export([start/2, stop/1]).
-spec start(_, _) -> {'error', _} | {'ok', ... |
947f5f1e0645d5bd9125ed61233c794d57fdbc87885fee14508ea164d35bb584 | kowainik/shellmet | Shellmet.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeFamilies #-}
|
Module :
Copyright : ( c ) 2019 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability... | null | https://raw.githubusercontent.com/kowainik/shellmet/103553faea9346c51eb48e6bebca75a6378a487c/src/Shellmet.hs | haskell | # LANGUAGE TypeFamilies #
# INLINE fromString # | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances #
|
Module :
Copyright : ( c ) 2019 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
This mo... |
60f02f9a98fb6e8a888958a7b47a0441a6a4d1980a6bf1a4b141d6de5dc672d8 | flavioc/cl-hurd | macros.lisp |
(in-package :hurd)
(defmacro define-hurd-interface (what name params &body body)
"Defines a new interface callback and then sets it on the routines table."
(let ((callback-fun-name (intern
(concatenate 'string "%lisp-"
(symbol-name name))))
... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/hurd/macros.lisp | lisp |
(in-package :hurd)
(defmacro define-hurd-interface (what name params &body body)
"Defines a new interface callback and then sets it on the routines table."
(let ((callback-fun-name (intern
(concatenate 'string "%lisp-"
(symbol-name name))))
... | |
d07c11f0d031541f016a05b538b387b9f4bbdcf938529d9e46f69601504aaab8 | anik545/OwlPPL | misc.ml | open Ppl
open Core
let moving_average n arr =
let l = Array.to_list arr in
let n = float_of_int n in
let open Float in
if float_of_int (List.length l) < n then failwith "List is too small"
else
let rec aux2 acc i = function
| hd :: tl when i < n -> aux2 (acc + hd) (i + 1.) tl
| _ -> acc / n
... | null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/bin/misc.ml | ocaml | take a function generating arrays all of the same length, and produce single array of mean | open Ppl
open Core
let moving_average n arr =
let l = Array.to_list arr in
let n = float_of_int n in
let open Float in
if float_of_int (List.length l) < n then failwith "List is too small"
else
let rec aux2 acc i = function
| hd :: tl when i < n -> aux2 (acc + hd) (i + 1.) tl
| _ -> acc / n
... |
e216aeda3f246c59553f78b30c4e629598b2655f24737b03bcbb204aab0d14c3 | magnars/prone | main.cljs | (ns prone.ui.main
(:require [cljs.core.async :refer [<! chan]]
[clojure.string :as str]
[prone.ui.components.app :refer [ProneUI]]
[prone.ui.utils :refer [update-in*]]
[quiescent.core :as q :include-macros true])
(:require-macros [cljs.core.async.macros :refer [go]]))... | null | https://raw.githubusercontent.com/magnars/prone/50ed099bb95ad3dfa6d70d506f62faf0fdccebf8/src/prone/ui/main.cljs | clojure | (ns prone.ui.main
(:require [cljs.core.async :refer [<! chan]]
[clojure.string :as str]
[prone.ui.components.app :refer [ProneUI]]
[prone.ui.utils :refer [update-in*]]
[quiescent.core :as q :include-macros true])
(:require-macros [cljs.core.async.macros :refer [go]]))... | |
4cb5a01ef7fd0616874b340fb227d1b3e9cbeb239f2790b43c821b55a55c823c | ajhc/ajhc | Unicode.hs | # OPTIONS_JHC -fffi #
module Data.Unicode(
CType(),
ctype,
isCType,
t_alnum,
t_alpha,
t_blank,
t_cntrl,
t_digit,
t_graph,
t_lower,
t_print,
t_punct,
t_space,
t_upper,
t_xdigit,
t_none
)where
import Foreign.C.String
import Foreign.C.Types
import System... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/lib/haskell-extras/Data/Unicode.hs | haskell | | Get a ctype other than one of the defaults. | # OPTIONS_JHC -fffi #
module Data.Unicode(
CType(),
ctype,
isCType,
t_alnum,
t_alpha,
t_blank,
t_cntrl,
t_digit,
t_graph,
t_lower,
t_print,
t_punct,
t_space,
t_upper,
t_xdigit,
t_none
)where
import Foreign.C.String
import Foreign.C.Types
import System... |
d3207b9e8bde80a006c7358ebfffb7cffe254be23c30ed4b6a1e63d99630159a | JonyEpsilon/algebolic | project.clj | ;
; This file is part of algebolic.
;
Copyright ( C ) 2014- , Imperial College , London , All rights reserved .
;
Contributors :
;
Released under the MIT license ..
;
(defproject algebolic "1.0.1"
:url ""
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.6.0"]
... | null | https://raw.githubusercontent.com/JonyEpsilon/algebolic/2872b2df9dc199f0c95deeb2cd85e50a2323e08a/project.clj | clojure |
This file is part of algebolic.
| Copyright ( C ) 2014- , Imperial College , London , All rights reserved .
Contributors :
Released under the MIT license ..
(defproject algebolic "1.0.1"
:url ""
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.6.0"]
[darwin "1.0.1"]
... |
bd8e94cbd8288f6296c397175d6326be92b09d578701e8bdef22f213be8cf0ac | michalkonecny/aern2 | PolySpec.hs | |
Module : AERN2.RealSpec
Description : hspec tests for CauchyReal
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Module : AERN2.RealSpec
Description : hspec tests for CauchyReal
Copyright : (c) Michal ... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-univariate/test/AERN2/PolySpec.hs | haskell | |
Module : AERN2.RealSpec
Description : hspec tests for CauchyReal
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Module : AERN2.RealSpec
Description : hspec tests for CauchyReal
Copyright : (c) Michal ... | |
e53129a92a7fb338e6b42345330b681e4a8e6ed6bf6f375dc813a224273128c2 | tonyvanriet/clj-slack-client | api.clj | (ns clj-slack-client.api
(:require [clj-slack-client.web :as web])
(:refer-clojure :exclude [test]))
(defn test
"Checks API calling code. Callable by workspace and user tokens."
([]
(web/call-and-get-response "api.test"))
([options]
(web/call-and-get-response "apt.test" options)))
| null | https://raw.githubusercontent.com/tonyvanriet/clj-slack-client/6783f003ab93adae057890421622eb5e61ab033d/src/clj_slack_client/api.clj | clojure | (ns clj-slack-client.api
(:require [clj-slack-client.web :as web])
(:refer-clojure :exclude [test]))
(defn test
"Checks API calling code. Callable by workspace and user tokens."
([]
(web/call-and-get-response "api.test"))
([options]
(web/call-and-get-response "apt.test" options)))
| |
4190d40258972377a2fc869323391bfd0cf63f5d064371dd8d514d8aca745631 | clojure-emacs/enrich-classpath | maybe_deploy.clj | (ns maybe-deploy
(:require
[clojure.java.shell :refer [sh]]
[clojure.string :as str]))
(def release-marker "v")
(defn make-version [tag]
(str/replace-first tag release-marker ""))
(defn log-result [m]
(println m)
m)
(defn -main [& _]
(let [tag (System/getenv "CIRCLE_TAG")]
(if-not tag
(Sys... | null | https://raw.githubusercontent.com/clojure-emacs/enrich-classpath/755dbc4de533fc67860537c705de11b63c063a8c/.circleci/maybe_deploy.clj | clojure | (ns maybe-deploy
(:require
[clojure.java.shell :refer [sh]]
[clojure.string :as str]))
(def release-marker "v")
(defn make-version [tag]
(str/replace-first tag release-marker ""))
(defn log-result [m]
(println m)
m)
(defn -main [& _]
(let [tag (System/getenv "CIRCLE_TAG")]
(if-not tag
(Sys... | |
9a03e144f3b44422c91602eefebf821d09f8512ba97c77fe58a65fdbb1c07cbf | michaelzenz/jecci | monotonic.clj | (ns jecci.common.monotonic
"Establishes a collection of integers identified by keys. Monotonically
increments individual keys via read-write transactions, and reads keys in
small groups. We verify that the order of transactions implied by each key
are mutually consistent; e.g. no transaction can observe key x i... | null | https://raw.githubusercontent.com/michaelzenz/jecci/81ee068601c31a14fe642f93d30223c2a8ced04d/src/jecci/common/monotonic.clj | clojure | e.g. no transaction can observe key x increase, but
util/random-nonempty-subset | (ns jecci.common.monotonic
"Establishes a collection of integers identified by keys. Monotonically
increments individual keys via read-write transactions, and reads keys in
small groups. We verify that the order of transactions implied by each key
key y decrease."
(:require [clojure.string :as str]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.