_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 |
|---|---|---|---|---|---|---|---|---|
b1338b88533230ad639ddb70ec88f2c8a410d67e61ccc73aebfc6c2e180e508c | emina/rosette | kernel.rkt | #lang s-exp "../../lang/main.rkt"
Scalar kernel for the filter . See the loop body of the sobelFilter reference
; implementation in host.rkt.
(kernel void (sobelFilterScalarKernel [int* inputImage] [int* outputImage] [int w])
(: int x y i i00 i01 i02 i10 i11 i12 i20 i21 i22 gx gy)
(= x (get_global_id 0))
(=... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/synthcl/examples/sobelFilter/kernel.rkt | racket | implementation in host.rkt.
that the vectorized kernel will look pretty much the same as the scalar one, except for the offset from i. | #lang s-exp "../../lang/main.rkt"
Scalar kernel for the filter . See the loop body of the sobelFilter reference
(kernel void (sobelFilterScalarKernel [int* inputImage] [int* outputImage] [int w])
(: int x y i i00 i01 i02 i10 i11 i12 i20 i21 i22 gx gy)
(= x (get_global_id 0))
(= y (get_global_id 1))
(= i (... |
1e25c5806a5a6d0906b57fdb22c2115d90946232bb7f77fa821aecbd51b5b995 | haskell/haskell-platform | Posix.hs | {-# LANGUAGE Rank2Types, RecordWildCards #-}
module OS.Posix
( posixOS
)
where
import Control.Monad (forM_)
import Data.Maybe (fromMaybe)
import Data.Version (showVersion)
import Development.Shake
import Development.Shake.FilePath
import Dirs
import Config
import OS.Internal
import Paths
import Templates
i... | null | https://raw.githubusercontent.com/haskell/haskell-platform/6357fb6645782278f43fc8340bf46771f1c2768d/hptool/src/OS/Posix.hs | haskell | # LANGUAGE Rank2Types, RecordWildCards #
bin items from the packages, hence it is a virtual target dir.
, stock "sysconfdir" "$prefix/etc"
our override
host cabal is used to build the packages, and it might be pre-1.18, we
need to specify every dir parameter explicitly.
See also the file notes/cabal-layouts |
module OS.Posix
( posixOS
)
where
import Control.Monad (forM_)
import Data.Maybe (fromMaybe)
import Data.Version (showVersion)
import Development.Shake
import Development.Shake.FilePath
import Dirs
import Config
import OS.Internal
import Paths
import Templates
import Types
import Utils
posixOS :: BuildCon... |
52e4a33cb8f08cbecd6c4ca8d60e7c6416270ec58a7b0773d68d3351556c8a19 | domenkozar/paddle | SubscriptionCancelled.hs | -- -reference/subscription-alerts/subscription-cancelled
module Paddle.WebHook.SubscriptionCancelled where
import Protolude
import Prelude ()
data SubscriptionCancelled passthrough = SubscriptionCancelled
{ subscriptionId :: Text
, subscriptionPlanId :: Text
, cancellationEffectiveDate :: Text
, passthrough :... | null | https://raw.githubusercontent.com/domenkozar/paddle/2def5a4e84499d529c3b205b7a83d923e039e13a/src/Paddle/WebHook/SubscriptionCancelled.hs | haskell | -reference/subscription-alerts/subscription-cancelled | module Paddle.WebHook.SubscriptionCancelled where
import Protolude
import Prelude ()
data SubscriptionCancelled passthrough = SubscriptionCancelled
{ subscriptionId :: Text
, subscriptionPlanId :: Text
, cancellationEffectiveDate :: Text
, passthrough :: passthrough
} deriving (Generic, Show)
|
e4a397a805388d091a5231396e39459041255dd5f9b9342ac96628299ae9d555 | ocamllabs/ocaml-modular-implicits | t22ok.ml | (* Tests for recursive modules *)
let test number result expected =
if result = expected
then Printf.printf "Test %d passed.\n" number
else Printf.printf "Test %d FAILED.\n" number;
flush stdout
(* Tree of sets *)
module rec A
: sig
type t = Leaf of int | Node of ASet.t
val compare: t -> t -> int
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/typing-recmod/t22ok.ml | ocaml | Tests for recursive modules
Tree of sets
Simple value recursion
Update function by infix
Early application
Early strict evaluation
module rec Cyclic
: sig val x : int end
= struct let x = Cyclic.x + 1 end
;;
Reordering of evaluation based on dependencies
Polymorphic recursion
Expressions and bind... |
let test number result expected =
if result = expected
then Printf.printf "Test %d passed.\n" number
else Printf.printf "Test %d FAILED.\n" number;
flush stdout
module rec A
: sig
type t = Leaf of int | Node of ASet.t
val compare: t -> t -> int
end
= struct
type t = Leaf of int | Node of ... |
36f483319e54fd05f49e6c4b55e9962c881b3c8754f876f864138a3e2c6ddc6a | wololock/programming-in-haskell-2nd-edition | ch05_00_sandbox.hs | module Chapter_05 where
import Data.Char
[ 1,4,9,16,25 ]
list1 = [x^2 | x <- [1..5]]
[ ( 1,4),(1,5),(2,4),(2,5),(3,4),(3,5 ) ]
list2 = [(x,y) | x <- [1,2,3], y <- [4,5]]
firsts :: [(a,b)] -> [a]
firsts ps = [x | (x,_) <- ps]
length' :: [a] -> Int
length' xs = sum [1 | _ <- xs]
list3 = [x | x <- [1..10], even... | null | https://raw.githubusercontent.com/wololock/programming-in-haskell-2nd-edition/19d4b173ac3a41a0579bcd9f55753dbeda293494/ch05_00_sandbox.hs | haskell | > find ’b’ [(’a’,1),(’b’,2),(’c’,3),(’b’,4)]
[2,4]
positions False [True, False, True, False]
[1,3]
--------------------------------
Caesar cipher
-------------------------------- | module Chapter_05 where
import Data.Char
[ 1,4,9,16,25 ]
list1 = [x^2 | x <- [1..5]]
[ ( 1,4),(1,5),(2,4),(2,5),(3,4),(3,5 ) ]
list2 = [(x,y) | x <- [1,2,3], y <- [4,5]]
firsts :: [(a,b)] -> [a]
firsts ps = [x | (x,_) <- ps]
length' :: [a] -> Int
length' xs = sum [1 | _ <- xs]
list3 = [x | x <- [1..10], even... |
40f5a2a13ff801c9a5c81098ac8d1b7e128bfa9cc72f76abba3ce0d4ee26bb1b | footprintanalytics/footprint-web | email.clj | (ns metabase.email
(:require [clojure.tools.logging :as log]
[metabase.models.setting :as setting :refer [defsetting]]
[metabase.util :as u]
[metabase.util.i18n :refer [deferred-tru trs tru]]
[metabase.util.schema :as su]
[postal.core :as postal]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/email.clj | clojure | ## PUBLIC INTERFACE
TODO - what should this be a sequence of?
Now send the email
`:message-type` must be
make sure this is not lazy, or chunking can cause some servers to block requests
Try not to get banned from outlook.com | (ns metabase.email
(:require [clojure.tools.logging :as log]
[metabase.models.setting :as setting :refer [defsetting]]
[metabase.util :as u]
[metabase.util.i18n :refer [deferred-tru trs tru]]
[metabase.util.schema :as su]
[postal.core :as postal]
... |
1a769dd24953a6a7bc3c06d5732bf020de35f767058dfe986707a3005824643c | manuel-serrano/bigloo | vararity.scm | ;*---------------------------------------------------------------------*/
* serrano / prgm / project / bigloo / recette / vararity.scm * /
;* */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/vararity.scm | scheme | *---------------------------------------------------------------------*/
* */
* */
* Les tests sur les aritees variables */
*---------------------------... | * serrano / prgm / project / bigloo / recette / vararity.scm * /
* Author : * /
* Creation : We d Mar 18 15:32:05 1992 * /
* Last change : Sun Dec 18 07:28:10 2005 ( serrano ) * /
(module va... |
bcafb60cb4e0831b1fbcb182bdb2a0f2adacacc86acff062714026799241441f | ronxin/stolzen | scheme-numbers.scm | #lang scheme
(require "container.scm")
(require "tags.scm")
(define (install-scheme-number-package)
(put 'add '(scheme-number scheme-number)
(lambda (x y) (+ x y))
)
(put 'sub '(scheme-number scheme-number)
(lambda (x y) (- x y))
)
(put 'negate '(scheme-number)
... | null | https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.5/generic-ops/scheme-numbers.scm | scheme | #lang scheme
(require "container.scm")
(require "tags.scm")
(define (install-scheme-number-package)
(put 'add '(scheme-number scheme-number)
(lambda (x y) (+ x y))
)
(put 'sub '(scheme-number scheme-number)
(lambda (x y) (- x y))
)
(put 'negate '(scheme-number)
... | |
bc175809d37f11d7049ae158a38a74f78566d208a00744fd552daeecfcd2c1f0 | GNOME/aisleriot | triple-peaks.scm | ; AisleRiot - triple_peaks.scm
Copyright ( C ) 2005 < >
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
; (at your option) any later version.
;
; Thi... | null | https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/triple-peaks.scm | scheme | AisleRiot - triple_peaks.scm
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... | Copyright ( C ) 2005 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(use-modules (aisleriot interface) (aisleriot api))
(define progressive-rounds ... |
603da4b30b89c942775789f222f2bdbe8be3c7c2debdfc6757c16f860c8ab469 | avsm/melange | ssh_config.ml |
* Copyright ( c ) 2004 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/avsm/melange/e92240e6dc8a440cafa91488a1fc367e2ba57de1/lib/ssh/ssh_config.ml | ocaml | Whether an auth succeeded, and any _other_ methods that
must also succeed before it is considered a success. These
other methods might be on the basis of username. The contents
of this list MUST also be in the globally supported auth list
returned by auth_methods_supported.
Servers RSA ... |
* Copyright ( c ) 2004 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... |
d1165e29f59dae81a4a9a05a5233eefabb050c3f69618930edd65c0a144b9676 | diagrams/diagrams-haddock | Haddock.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TemplateHaskell #-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.... | null | https://raw.githubusercontent.com/diagrams/diagrams-haddock/29067d968a6097aa9d648b566c234d924a97bd86/src/Diagrams/Haddock.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
---------------------------------------------------------------------------
|
Module : Diagrams.Haddock
License : BSD-style (see LICENSE)
Maintainer :
example, here is a green circle:
<<diagrams/src_Diagrams_Haddock_gr... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
Copyright : ( c ) 2013 diagrams - haddock team ( see LICENSE )
Include inline diagrams code in documentation ! For
> greenCircle = circle 1
> # fc green # pad 1.1
< >... |
b8c060cfd3e86b9de3189b4b2b4aa4fad961c1b6ed82ee236e1b566b72977426 | weblocks-framework/weblocks | helpers.lisp |
(in-package :weblocks-test)
;;; Test make-slot-writer
(deftest make-slot-writer-1
(let ((obj (copy-template *joe*)))
(funcall
(make-slot-writer 'name (lambda (value)
(declare (ignore value))
"foo"))
"bak" obj)
(first-name... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/test/views/formview/helpers.lisp | lisp | Test make-slot-writer |
(in-package :weblocks-test)
(deftest make-slot-writer-1
(let ((obj (copy-template *joe*)))
(funcall
(make-slot-writer 'name (lambda (value)
(declare (ignore value))
"foo"))
"bak" obj)
(first-name obj))
"foo")
|
356cce0114567622840972711c007498a1bd3567a320860e7b2d7ebd172316e0 | ermine/kombain | kmb_util.ml | open Kmb_grammar
let find_rule name (rules:((string*string list)*token) list) =
let (_, token) = List.find (fun ((n, _), _) -> n = name) rules in
token
let get_rule name rules =
try Some(List.find (fun ((n, _), _) -> n = name) rules)
with Not_found -> None
let mem_rule name rules =
List.exists (fun ((n... | null | https://raw.githubusercontent.com/ermine/kombain/07f643c892b0b9c2ef08d67428bb9125d5251f82/kmb/kmb_util.ml | ocaml | aux_inline (n :: names) t | open Kmb_grammar
let find_rule name (rules:((string*string list)*token) list) =
let (_, token) = List.find (fun ((n, _), _) -> n = name) rules in
token
let get_rule name rules =
try Some(List.find (fun ((n, _), _) -> n = name) rules)
with Not_found -> None
let mem_rule name rules =
List.exists (fun ((n... |
7d41ec1fe0eedea98ec4a2ce584e6b6ece74f963fb258b74169f9f20480434da | TyOverby/mono | synchronous_time_source.mli | * A synchronous version of [ Async_kernel . Time_source ] . [ advance_by_alarms ] runs
alarms immediately , rather than enqueueing Async jobs .
[ Synchronous_time_source ] is a wrapper around [ Timing_wheel ] . One difference is
that [ Synchronous_time_source ] alarms fire in non - decreasing tim... | null | https://raw.githubusercontent.com/TyOverby/mono/5ce4569fc6edf6564d29d37b66d455549df1e497/vendor/janestreet-async_kernel/src/synchronous_time_source.mli | ocaml | * With read permission you can get the current time and schedule alarms.
With write permission you can advance time and inspect the event queue.
* [id t] returns a unique, consistent identifier which can be used e.g. as a map or hash
table key.
* [is_wall_clock] reports whether this time source represents '... | * A synchronous version of [ Async_kernel . Time_source ] . [ advance_by_alarms ] runs
alarms immediately , rather than enqueueing Async jobs .
[ Synchronous_time_source ] is a wrapper around [ Timing_wheel ] . One difference is
that [ Synchronous_time_source ] alarms fire in non - decreasing tim... |
904a4534cbbe9cf84d546d33924ca60cbf138e78f441427b1b0f4b437b18d88a | UU-ComputerScience/js-asteroids | Window.hs | module Language.UHC.JS.HTML5.Window where
import Language.UHC.JS.HTML5.Types
import Language.UHC.JS.Types
import Language.UHC.JS.Marshal
import Language.UHC.JS.Prelude
foreign import js "window"
window :: IO Window
foreign import js "%1.setInterval(%*)"
_setInterval :: Window -> JSFunction_ (IO ()) -> Int -> IO ... | null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/uhc-js/uhc-js/src/Language/UHC/JS/HTML5/Window.hs | haskell | module Language.UHC.JS.HTML5.Window where
import Language.UHC.JS.HTML5.Types
import Language.UHC.JS.Types
import Language.UHC.JS.Marshal
import Language.UHC.JS.Prelude
foreign import js "window"
window :: IO Window
foreign import js "%1.setInterval(%*)"
_setInterval :: Window -> JSFunction_ (IO ()) -> Int -> IO ... | |
54e671511d2026890359d3575e6b9702de14718e2d74aa60bc53311d2271f3e4 | thma/PolysemyCleanArchitecture | UseCaseIOSpec.hs | module UseCaseIOSpec where
import Test.Hspec
import Data.Function ((&))
import Data.List (isSuffixOf)
import qualified Data.Map.Strict as M
import Data.Time.Calendar
import Domain.ReservationDomain
import ... | null | https://raw.githubusercontent.com/thma/PolysemyCleanArchitecture/beaf8b5a029707856cef7ff54ea03f2927f1021c/test/UseCaseIOSpec.hs | haskell | | Takes a program with effects and handles each effect till it gets reduced to IO a.
Helper functions for interpreting all effects in IO
| helper function to clean the test data files | module UseCaseIOSpec where
import Test.Hspec
import Data.Function ((&))
import Data.List (isSuffixOf)
import qualified Data.Map.Strict as M
import Data.Time.Calendar
import Domain.ReservationDomain
import ... |
535528b229be2144292a832d4070b1f228f48691c3c0a90bf6af495724c3e31d | autolwe/autolwe | CoreTypes.ml | (* * Types for core rules *)
(* ** Imports *)
open Abbrevs
open Util
open Game
open Assumption
open Expr
open Syms
open ExprUtils
(* ** Judgments
* ----------------------------------------------------------------------- *)
* A probability tag associates a real number in [ 0,1 ] to a
security experiment . The ... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Core/CoreTypes.ml | ocaml | * Types for core rules
** Imports
** Judgments
* -----------------------------------------------------------------------
* The judgment [(G:Ev, pt)] is valid if the corresponding
probability (see above) is negligible. A proof additionally
establishes a concrete relation between judgments.
*** Equivalen... |
open Abbrevs
open Util
open Game
open Assumption
open Expr
open Syms
open ExprUtils
* A probability tag associates a real number in [ 0,1 ] to a
security experiment . The three tags are interpreted as follows
for some $ G : E$ :
- [ Pr_Succ ] stands for $ Pr [ G : E ] $
- [ Pr_Adv ] stands fo... |
b18d55151d1f4d01683af5ce0aa692aea53b2265c880c46d0c5859469128cfff | RolfRolles/PandemicML | X86CFGAssembler-calls.ml | exception Found of int
module C = X86CFG.X86CFGBuilder.C
let int32_of_jcc j = let open X86 in match j with
| Jo -> (0x70l,0x80l)
| Jno -> (0x71l,0x81l)
| Jb -> (0x72l,0x82l)
| Jae -> (0x73l,0x83l)
| Jz -> (0x74l,0x84l)
| Jnz -> (0x75l,0x85l)
| Jbe -> (0x76l,0x86l)
| Ja -> (0x77l,0x87l)
| Js -> (0x78l,0x88l)
| Jn... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/X86/X86CFGAssembler-calls.ml | ocaml | Mnemonic * destination vertex address * size of jump
Have to split at call boundaries
The final result: a list of all bricks and grout
If there's a call, split around the boundary
Had no children, couldn't end with a jmp
Multiple jump targets, fail for now
Create hash table once
Generate a position map,... | exception Found of int
module C = X86CFG.X86CFGBuilder.C
let int32_of_jcc j = let open X86 in match j with
| Jo -> (0x70l,0x80l)
| Jno -> (0x71l,0x81l)
| Jb -> (0x72l,0x82l)
| Jae -> (0x73l,0x83l)
| Jz -> (0x74l,0x84l)
| Jnz -> (0x75l,0x85l)
| Jbe -> (0x76l,0x86l)
| Ja -> (0x77l,0x87l)
| Js -> (0x78l,0x88l)
| Jn... |
7831c935c0e02e5a2c14844fed69f292eee756cafdc324a7622d1ca290c13daa | cl-plus-ssl/cl-plus-ssl | client-certificates-example-static.lisp | ;;;; The code contained in this file implements a trivial server and a
;;;; client that connects to the former and provide a self signed
;;;; certificate. The server is able to implement a procedure to
;;;; reject or accept the client connection, based on the client's
;;;; certificate, and using some fo... | null | https://raw.githubusercontent.com/cl-plus-ssl/cl-plus-ssl/5f124bd97b41df846c23142ac88163921ffe9d54/examples/client-certificates-example-static.lisp | lisp | The code contained in this file implements a trivial server and a
client that connects to the former and provide a self signed
certificate. The server is able to implement a procedure to
reject or accept the client connection, based on the client's
certificate, and using some form of authentication... |
one below could be used :
openssl req -new -nodes -x509 -days 365 -subj / -keyout private - key -outform PEM -out certificate
the client with one of those saved on the filesystem , idf this
(ql:quickload "cl+ssl")
(ql:quickload "bordeaux-threads")
(ql:quickload "trivial-sockets")
(defun ha... |
ad1a103ca6c105597b26ac64dd1cbd05d4e38b2e39e8c7ce2cf6b6ff8b905c4d | serokell/haskell-crypto | Salt.hs | SPDX - FileCopyrightText : 2021
--
SPDX - License - Identifier : MPL-2.0
# LANGUAGE QuasiQuotes #
module Test.Crypto.Sodium.Salt where
import Data.ByteArray.Sized (SizedByteArray, unSizedByteArray)
import Data.ByteString (ByteString)
import Hedgehog (Property, (===), evalMaybe, failure, forAll, property)
impor... | null | https://raw.githubusercontent.com/serokell/haskell-crypto/fdc625ec8bcdb9ce5189a77d420c0e8ba0456850/crypto-sodium/test/Test/Crypto/Sodium/Salt.hs | haskell |
show and drop the quotation marks around the result
show and drop the quotation marks around the result | SPDX - FileCopyrightText : 2021
SPDX - License - Identifier : MPL-2.0
# LANGUAGE QuasiQuotes #
module Test.Crypto.Sodium.Salt where
import Data.ByteArray.Sized (SizedByteArray, unSizedByteArray)
import Data.ByteString (ByteString)
import Hedgehog (Property, (===), evalMaybe, failure, forAll, property)
import q... |
e48aff26438681c723c5d99169b230a607343de7edc3cb5b421076845eebadca | rmculpepper/binaryio | reader.rkt | Copyright 2019 - 2021
SPDX - License - Identifier : Apache-2.0 OR MIT
#lang racket/base
(require "integer.rkt")
(provide (all-defined-out))
(struct binary-reader
InputPort
# f or
( list ... )
err)) ;; (U BinaryReaderErrorHandler #f)
(struct errhandler
(error ;; ... | null | https://raw.githubusercontent.com/rmculpepper/binaryio/2802c5b95cb51063f97cabb55a349d472dda5050/binaryio-lib/unchecked/reader.rkt | racket | (U BinaryReaderErrorHandler #f)
#f or (BinaryReader Symbol FormatString Any ... -> escapes)
#f or (BinaryReader Symbol -> Boolean)
#f or (BinaryReader Symbol Nat -> escapes)
----------------------------------------
Errors
----------------------------------------
Limits
Externally, a limit is get/set as a numbe... | Copyright 2019 - 2021
SPDX - License - Identifier : Apache-2.0 OR MIT
#lang racket/base
(require "integer.rkt")
(provide (all-defined-out))
(struct binary-reader
InputPort
# f or
( list ... )
(struct errhandler
# f or ( BinaryReader Symbol Bytes/#f - > escapes )
) #:reflection-name 'binary-r... |
b63f051a87cc5ab5711e739c2e021ffb041ae48520c2a43314c348656ddee52e | hyperfiddle/electric | snake_theronic.cljc | (ns dustin.y2022.snake-theronic
(:require [reagent.core :as r :refer [atom cursor]]
[cljs.pprint :as pprint]))
(enable-console-print!)
(def initial-state
{:paused? false
:position [6 6]
:history ()
:width 12
:height 12
:pill-density 0.02
[ 4 4 ] [ 5 8 ] ; ; genera... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/content/snake_theronic.cljc | clojure | ; generate ?
random?
ideally this should emit an event, not mutate state directly
spacebar
enter | (ns dustin.y2022.snake-theronic
(:require [reagent.core :as r :refer [atom cursor]]
[cljs.pprint :as pprint]))
(enable-console-print!)
(def initial-state
{:paused? false
:position [6 6]
:history ()
:width 12
:height 12
:pill-density 0.02
:size 3
:dea... |
cb0f66b7a6ade260750b2971ff28480bca8ae2e0548f067b5b2e82a0412061f4 | RickMoynihan/lein-tools-deps | plugin_test.clj | (ns lein-tools-deps.plugin-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[lein-tools-deps.plugin :as sut]
[clojure.tools.deps.alpha.reader :as reader]
[lein-tools-deps.env :as env])
(:import (clojure.lang ExceptionInfo)))
The mere presence of t... | null | https://raw.githubusercontent.com/RickMoynihan/lein-tools-deps/ee3acdfb9b03b1891618acb8eaee5956886f1743/test/lein_tools_deps/plugin_test.clj | clojure | of lein-tools-deps.plugin and at least we can know if it builds successfully. | (ns lein-tools-deps.plugin-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[lein-tools-deps.plugin :as sut]
[clojure.tools.deps.alpha.reader :as reader]
[lein-tools-deps.env :as env])
(:import (clojure.lang ExceptionInfo)))
The mere presence of t... |
b0889fa88fa67aa81d36b6944cf9f041b937fba6a0697547dbf6c2efb45beb20 | v-kolesnikov/sicp | 2_40_test.clj | (ns sicp.chapter02.2-40-test
(:require [clojure.test :refer [deftest]]
[sicp.chapter02.2-40 :as sicp-2-40]
[sicp.test-helper :refer [assert-equal]]))
(deftest test-unique-pairs
(assert-equal '((2 1)
(3 1) (3 2)
(4 1) (4 2) (4 3)
(5 1) (5... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter02/2_40_test.clj | clojure | (ns sicp.chapter02.2-40-test
(:require [clojure.test :refer [deftest]]
[sicp.chapter02.2-40 :as sicp-2-40]
[sicp.test-helper :refer [assert-equal]]))
(deftest test-unique-pairs
(assert-equal '((2 1)
(3 1) (3 2)
(4 1) (4 2) (4 3)
(5 1) (5... | |
94bd71687909721a3c310522d1c96f2bb902050f4e04f02711c2b8f8795868ee | Eduap-com/WordMat | compat.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/compat.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
contained in this f... |
(in-package :maxima)
Maclisp compatibility definitions .
This file is for Lisp differences only . No knowledge of should be
(defun symbolconc (&rest args)
"make a symbol out of the printed representations of all args"
(intern (apply #'concatenate 'string
(mapcar #'(lambda (s)
... |
2559843b1bcae577ddae74ded5d57d261f53f95d850f308a36d5446f4060d3bc | fogfish/hash | hash_SUITE.erl | %%
Copyright 2016 , All Rights Reserved
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing... | null | https://raw.githubusercontent.com/fogfish/hash/a1b9101189e115b4eabbe941639f3c626614e986/test/hash_SUITE.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 g... | Copyright 2016 , 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(hash_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([
all/0
,groups/0
,init_per_suite/1
,end_per_su... |
332f0aac3c8afe96037a0351055ce845b220bee65c8c9c7d0d892b669111a704 | dalaing/little-languages | Gen.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
# LANGUAGE FlexibleContexts #
module Component.Type.Bool.Gen (
genTy... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/b-lang/src/Component/Type/Bool/Gen.hs | haskell | |
|
^
^
|
|
^
^ | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
# LANGUAGE FlexibleContexts #
module Component.Type.Bool.Gen (
genTy... |
7a5fcd6b1a1ab6d357e44f36ecce61a65cd1186856e997e6f7ad07a624f51538 | TyOverby/mono | string_io.ml | { { { Copyright ( c ) 2014
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* ... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-cohttp/cohttp/src/string_io.ml | ocaml | input channel type - a string with a (file) position and length
output channels are just buffers
the following read/write logic has only been lightly tested... | { { { Copyright ( c ) 2014
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* ... |
4a2d4b0a47e360c0072625b890e5dc03e53e6139a63912d667997021c50b0f45 | verystable/warframe-autobuilder | StatusMods.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Builder.Mods.MeleeMods.StatusMods
-- Maintainer :
-- Stability : experimental
--
-- Contains function that modify status, applicable on melee weapons.
module Builder.Mods.MeleeMods.StatusMods where
import ClassyPre... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/Builder/Mods/MeleeMods/StatusMods.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Builder.Mods.MeleeMods.StatusMods
Maintainer :
Stability : experimental
Contains function that modify status, applicable on melee weapons.
| Drifting Contact [+10 secs Combo Duration, +40% Status Chance]
| Weeping Wounds [+45% Critical Chance, stack with combo... | # LANGUAGE NoImplicitPrelude #
module Builder.Mods.MeleeMods.StatusMods where
import ClassyPrelude
import Control.Lens ( (^.) )
import GenericFunctions.GenericFunctions
import Types.GenericWeapon
driftingContact
:: GenericWeapon -> (GenericWeapon, [Text]) ... |
825df69ac5a3c771e1061abe638cd71482cd5e60872249209d8b85099eb150e8 | jimburton/scrabble | Scrabble.hs | |
Module : Scrabble
Description : The scrabble library .
Maintainer : : experimental
Portability : POSIX
The scrabble library .
Module : Scrabble
Description : The scrabble library.
Maintainer :
Stability : experimental
Portability : POSIX
The scrabble library.
-}
module Scrabble (
... | null | https://raw.githubusercontent.com/jimburton/scrabble/89742251e3f67230081c69e037b52149ba45e703/src/Scrabble.hs | haskell | |
Module : Scrabble
Description : The scrabble library .
Maintainer : : experimental
Portability : POSIX
The scrabble library .
Module : Scrabble
Description : The scrabble library.
Maintainer :
Stability : experimental
Portability : POSIX
The scrabble library.
-}
module Scrabble (
... | |
3852b6df9710ab1ca0bb57cdd1c7dd9c3289c21946e691ee5ef821955caddee7 | hasufell/hpath | CreateDirSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Posix.RawFilePath.Directory.CreateDirSpec where
import Test.Hspec
import System.IO.Error
(
ioeGetErrorType
)
import GHC.IO.Exception
(
IOErrorType(..)
)
import Utils
upTmpDir :: IO ()
upTmpDir = do
setTmpDir "CreateDirSpec"
createTmpDir
setupFi... | null | https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/CreateDirSpec.hs | haskell | # LANGUAGE OverloadedStrings #
successes --
posix failures -- |
module System.Posix.RawFilePath.Directory.CreateDirSpec where
import Test.Hspec
import System.IO.Error
(
ioeGetErrorType
)
import GHC.IO.Exception
(
IOErrorType(..)
)
import Utils
upTmpDir :: IO ()
upTmpDir = do
setTmpDir "CreateDirSpec"
createTmpDir
setupFiles :: IO ()
setupFiles = do
crea... |
1a6c20d149f61e4ff925142617e58564c7c01938a36c43174c0bb4a71bec11dc | binaryage/chromex | passwords_private.cljs | (ns chromex.ext.passwords-private (:require-macros [chromex.ext.passwords-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn record-passwords-page-access-in-settings* [config]
... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/passwords_private.cljs | clojure | -- events ----------------------------------------------------------------------------------------------------------------- | (ns chromex.ext.passwords-private (:require-macros [chromex.ext.passwords-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn record-passwords-page-access-in-settings* [config]
... |
1a80642e37cf4ad46936cf619b247f9cb4749ce5b0007355f107524a5c7fc939 | nuprl/gradual-typing-performance | signature-syntax.rkt | #lang scheme/base
(provide :
signature signature/arbitrary
define/signature define-values/signature
-> mixed one-of predicate combined property list-of vector-of)
(require deinprogramm/signature/signature
deinprogramm/signature/signature-english
scheme/promise
(for-syntax scheme/base)
(for-syntax syntax... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/lang/private/signature-syntax.rkt | racket | attach the occurrence position to the syntax object
for local variables (parameters, most probably),
we want the value to determine the blame location
regrettable
apply-signature/blame takes care of itself
remember there's an implicit #%app
works with stepper
probably never used, we're only interested in the bi... | #lang scheme/base
(provide :
signature signature/arbitrary
define/signature define-values/signature
-> mixed one-of predicate combined property list-of vector-of)
(require deinprogramm/signature/signature
deinprogramm/signature/signature-english
scheme/promise
(for-syntax scheme/base)
(for-syntax syntax... |
0c7ba2d8186d614cadc9d35d3520455923c1165e73a128dd3e9d2a5c19eb61b9 | jubnzv/iec-checker | plcopen_cp8.mli | (** PLCOPEN-CP8: Floating point comparison shall not be equality or inequality *)
open IECCheckerCore
module S = Syntax
val do_check : S.iec_library_element list -> Warn.t list
| null | https://raw.githubusercontent.com/jubnzv/iec-checker/2620a17407ffc202310a2e0037bc4fea52143d33/src/lib/plcopen_cp8.mli | ocaml | * PLCOPEN-CP8: Floating point comparison shall not be equality or inequality | open IECCheckerCore
module S = Syntax
val do_check : S.iec_library_element list -> Warn.t list
|
759380c0e5e0fd77888cae43442edbd9abf90671fa25a5000674b64891f604de | tezos/tezos-mirror | sc_rollup_helpers.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 - 2023 Nomadic Labs < >
Copyright ( c ) 202... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/adb9ff09cb5f0a9cae8c8d8924efee6c4764399a/tezt/lib_tezos/sc_rollup_helpers.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 - 2023 Nomadic Labs < >
Copyright ( c ) 2022 - 2023 TriliTech < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WI... |
d8a0251a71ab3593acde4be8718674f2aa193e8e1e304d66dc504dd21b1b8309 | aloiscochard/sarsi | Sarsi.hs | module Codec.Sarsi where
import Data.Binary (Get, Put)
import qualified Data.MessagePack.Get as Get
import qualified Data.MessagePack.Put as Put
import Data.Text (Text, unpack)
import qualified Data.Text as Text
import qualified Data.Vector as Vector
data Event
= Start {label :: Text}
| Finish {errors :: Int, war... | null | https://raw.githubusercontent.com/aloiscochard/sarsi/668363d46c78ce5b2a24e7d1251777cffe457fad/src/Codec/Sarsi.hs | haskell | TODO Remove me | module Codec.Sarsi where
import Data.Binary (Get, Put)
import qualified Data.MessagePack.Get as Get
import qualified Data.MessagePack.Put as Put
import Data.Text (Text, unpack)
import qualified Data.Text as Text
import qualified Data.Vector as Vector
data Event
= Start {label :: Text}
| Finish {errors :: Int, war... |
04f447808322113d81bdefeb2bb0df8ef34da3e543a0d95d075e39548681ad24 | vdloo/kodictl | input-action.rkt | #!/usr/bin/env racket
#lang racket/base
(require json-rpc-client)
(require "../attempt.rkt")
(provide kodictl-input-action)
(define kodictl-input-action
(λ (action)
(json-rpc-client
(getenv "KODI_HOST")
(forge-payload
"Input.ExecuteAction"
#:params (hasheq
'action action)))))
... | null | https://raw.githubusercontent.com/vdloo/kodictl/31c775a0889c06fcf65a0d91d15937144eb6a30a/kodictl/commands/input-action.rkt | racket | #!/usr/bin/env racket
#lang racket/base
(require json-rpc-client)
(require "../attempt.rkt")
(provide kodictl-input-action)
(define kodictl-input-action
(λ (action)
(json-rpc-client
(getenv "KODI_HOST")
(forge-payload
"Input.ExecuteAction"
#:params (hasheq
'action action)))))
... | |
d4cf11499bddaba6f4ef86a2de1fe1de54dc80babc7c6967dcff85a491021b58 | ocaml-ppx/ppx | viewer_v4_07.mli | open Viewlib
$ Ppx_ast_cinaps.print_viewer_mli ( Astlib . Version.of_string " v4_07 " )
open Versions
include module type of Viewer_common
val lident'const : (string, 'i, 'o) View.t -> (longident, 'i, 'o) View.t
val ldot'const : ((longident * string), 'i, 'o) View.t -> (longident, 'i, 'o) View.t
val lapply'const : ... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/viewer_v4_07.mli | ocaml | $ | open Viewlib
$ Ppx_ast_cinaps.print_viewer_mli ( Astlib . Version.of_string " v4_07 " )
open Versions
include module type of Viewer_common
val lident'const : (string, 'i, 'o) View.t -> (longident, 'i, 'o) View.t
val ldot'const : ((longident * string), 'i, 'o) View.t -> (longident, 'i, 'o) View.t
val lapply'const : ... |
c2804bfbdb6a0a30c2ad660609a9b4f0501b4dbb16f5acdcdaef290f47a632f9 | ocaml/dune | libs.ml | let executables = [ "main" ]
let external_libraries = [ "unix"; "threads" ]
let local_libraries =
[ ("otherlibs/ordering", Some "Ordering", false, None)
; ("vendor/pp/src", Some "Pp", false, None)
; ("otherlibs/dyn", Some "Dyn", false, None)
; ("otherlibs/stdune/dune_filesystem_stubs", Some "Dune_filesystem_s... | null | https://raw.githubusercontent.com/ocaml/dune/8d88ee8068abb053fe8ed7c9c21b3a1883dbaf47/boot/libs.ml | ocaml | let executables = [ "main" ]
let external_libraries = [ "unix"; "threads" ]
let local_libraries =
[ ("otherlibs/ordering", Some "Ordering", false, None)
; ("vendor/pp/src", Some "Pp", false, None)
; ("otherlibs/dyn", Some "Dyn", false, None)
; ("otherlibs/stdune/dune_filesystem_stubs", Some "Dune_filesystem_s... | |
7b1961c1844c9e189a408957288ac84fbbd4af46fc3e0260621cf98c5739c403 | np/ling | Reduce.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE TemplateHaskell #
module Ling.Reduce where
import Data.Char
imp... | null | https://raw.githubusercontent.com/np/ling/5a49fb5fdaef04b56e26c3ff1cd613e2800b4c23/Ling/Reduce.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE Rank2Types #
can be kept as the lazy/weak version.
^ no need for mkCase here since:
* the scrutinee is not a constructor
* the branches have not changed
* mkCase would not do anything useful
TODO: No CD rules
The resulting Term should be in n... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
module Ling.Reduce where
import Data.Char
import Ling.Fwd
import Ling.Norm
import Ling.Prelude hiding (subs... |
79b44e3ffa5c84aa69fd1502510b54dc9b79980561989c2c958942b0f6465572 | aws-beam/aws-erlang | aws_s3_util.erl | -module(aws_s3_util).
-export([bucket_exists/3, create_bucket/3, delete_bucket/3, list_objects/4, delete/4,
delete_objects/4, exists/4, exists_min_size/5, read/4, write/5]).
-type client() :: map().
-type bucket() :: binary().
-type key() :: binary().
-type prefix() :: binary().
-type options() :: proplists:... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/c1c435a099e6f8db3c2d1e11f9b70baeb658d410/test/aws_s3_util.erl | erlang | --------------------------------------------------------------------
API
Everything went well
Result may contain a single error-map or multiple.
-------------------------------------------------------------------- | -module(aws_s3_util).
-export([bucket_exists/3, create_bucket/3, delete_bucket/3, list_objects/4, delete/4,
delete_objects/4, exists/4, exists_min_size/5, read/4, write/5]).
-type client() :: map().
-type bucket() :: binary().
-type key() :: binary().
-type prefix() :: binary().
-type options() :: proplists:... |
edca0a13c4778216ea77add29e9efeaadf9e88b57fae872a292077b29c76fe48 | kadena-io/pact | Graph.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ViewPatterns #
-- | Converts a concrete model and its execution graph to a linearized
-- execution trace. This is converted to textual output in
-- 'Pact.Analyze.Model.Text'.
module Pact.Analyze.Model.Graph
( reachablePaths
, reachableEdges
,... | null | https://raw.githubusercontent.com/kadena-io/pact/e2f3dd1fd1952bb4f736042083769b52dbb2a819/src-tool/Pact/Analyze/Model/Graph.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE Rank2Types #
| Converts a concrete model and its execution graph to a linearized
execution trace. This is converted to textual output in
'Pact.Analyze.Model.Text'.
NOTE: 'Map' is ordered, so our @(Vertex, Vertex)@ 'Edge' representation
are ordered, so we now have a linear tra... | # LANGUAGE ViewPatterns #
module Pact.Analyze.Model.Graph
( reachablePaths
, reachableEdges
, linearize
) where
import Control.Lens (Traversal', at, to, (^.), (^?), _2, _Just)
import Data.Bool (bool)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict ... |
62d461404342beef6535e31a17dce16d535008a39fb0ea5727bcb13834eaec12 | gwkkwg/lift | generics.lisp | (in-package #:lift)
(defgeneric do-test (testsuite test-case-name result))
(defgeneric testsuite-setup (testsuite result)
(:documentation "Setup at the testsuite-level"))
(defgeneric testsuite-expects-error (testsuite)
(:documentation
"Returns whether or not the testsuite as a whole expects an error."))
(def... | null | https://raw.githubusercontent.com/gwkkwg/lift/2594160d6ca3a77d8750110dfa63214256aab852/dev/generics.lisp | lisp | no-op
?? probably just defuns (since they are hard to specialize on in any case)
?? or change signature to take testsuite instead of suite-name | (in-package #:lift)
(defgeneric do-test (testsuite test-case-name result))
(defgeneric testsuite-setup (testsuite result)
(:documentation "Setup at the testsuite-level"))
(defgeneric testsuite-expects-error (testsuite)
(:documentation
"Returns whether or not the testsuite as a whole expects an error."))
(def... |
9da0dafa9e248c852298f02d42616aed60475c5532cde685836827e8fb9877aa | jelly-beam/verl | prop_verl.erl | -module(prop_verl).
-include_lib("proper/include/proper.hrl").
-include_lib("stdlib/include/assert.hrl").
%%%%%%%%%%%%%%%%%%
%%% Properties %%%
%%%%%%%%%%%%%%%%%%
% test for equality with opaque term
-dialyzer({no_opaque, prop_basic_valid_semver0/0}).
prop_basic_valid_semver0() ->
?FORALL(
{Maj, Min, P, ... | null | https://raw.githubusercontent.com/jelly-beam/verl/6311c5b01a9f5e00001cec67f3883d8dee124d74/test/prop_verl.erl | erlang |
Properties %%%
test for equality with opaque term
test for equality with opaque term
Helpers %%%
Generators %%%
| -module(prop_verl).
-include_lib("proper/include/proper.hrl").
-include_lib("stdlib/include/assert.hrl").
-dialyzer({no_opaque, prop_basic_valid_semver0/0}).
prop_basic_valid_semver0() ->
?FORALL(
{Maj, Min, P, Pre},
{non_neg_integer(), non_neg_integer(), non_neg_integer(), non_empty(binary())},
... |
77507df7c76cb8796c6b4d1556b3e7ea02c4c3065add2cdcf8c714c5cc0b83f6 | stchang/parsack | url-query-parser.rkt | #lang racket
(require parsack)
(provide (all-defined-out))
(define ASCII-ZERO (char->integer #\0))
[ 0 - 9A - Fa - f ] - > Number from 0 to 15
(define (hex-char->number c)
(if (char-numeric? c)
(- (char->integer c) ASCII-ZERO)
(match c
[(or #\a #\A) 10]
[(or #\b #\B) 11]
[(or #... | null | https://raw.githubusercontent.com/stchang/parsack/57b21873e8e3eb7ffbdfa253251c3c27a66723b1/parsack-test/parsack/examples/url-query-parser.rkt | racket | #lang racket
(require parsack)
(provide (all-defined-out))
(define ASCII-ZERO (char->integer #\0))
[ 0 - 9A - Fa - f ] - > Number from 0 to 15
(define (hex-char->number c)
(if (char-numeric? c)
(- (char->integer c) ASCII-ZERO)
(match c
[(or #\a #\A) 10]
[(or #\b #\B) 11]
[(or #... | |
cd5638244f64764789d073cc56616e8553ea43f8d2c4bc0de6141f248923b8ad | dbenoit17/dynamic-ffi | unsafe.rkt | #lang racket/base
(require
"ffi.rkt"
"cached.rkt"
"inline.rkt"
"export.rkt")
(provide
define-dynamic-ffi
define-dynamic-ffi/cached
define-inline-ffi
dynamic-ffi-lib
generate-mapped-static-ffi
generate-static-ffi)
| null | https://raw.githubusercontent.com/dbenoit17/dynamic-ffi/c82f5cb25932e9cab31844569b1364e23a02f205/unsafe.rkt | racket | #lang racket/base
(require
"ffi.rkt"
"cached.rkt"
"inline.rkt"
"export.rkt")
(provide
define-dynamic-ffi
define-dynamic-ffi/cached
define-inline-ffi
dynamic-ffi-lib
generate-mapped-static-ffi
generate-static-ffi)
| |
49a1f07b593b03af553a3e53fb7f1d0bc5d0742aa029f99a647618df9e3ea973 | headwinds/reagent-reframe-material-ui | timers.cljs | Copyright ( c ) and contributors . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; 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 agreei... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/cljs/core/async/impl/timers.cljs | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
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 ... | Copyright ( c ) and contributors . All rights reserved .
(ns cljs.core.async.impl.timers
(:require [cljs.core.async.impl.protocols :as impl]
[cljs.core.async.impl.channels :as channels]
[cljs.core.async.impl.dispatch :as dispatch]))
16 levels
(def P (/ 1 2))
(defn random-level
([]... |
6068d94d56f9eb748d73a7449e76b792898edf3a1fab9da2cef97a7fcf40cd73 | hypernumbers/hypernumbers | hello_monkey.erl | -module(hello_monkey).
-export([build/3, build/0]).
build() ->
code:add_patha("../deps/erlsha2/ebin"),
code:add_patha("../deps/mochiweb/ebin"),
build("/media/sf_virtualbox/twilio/erlang_html/index.html",
"AC7a076e30da6d49119b335d3a6de43844",
"9248c9a2a25f6914fad9c9fb5... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/twilio/examples/hello_monkey.erl | erlang | -module(hello_monkey).
-export([build/3, build/0]).
build() ->
code:add_patha("../deps/erlsha2/ebin"),
code:add_patha("../deps/mochiweb/ebin"),
build("/media/sf_virtualbox/twilio/erlang_html/index.html",
"AC7a076e30da6d49119b335d3a6de43844",
"9248c9a2a25f6914fad9c9fb5... | |
c0bcba8d3d969b0166fcae42a37dc21ed7e6c6126166be1af67ccbf88b2901f4 | ocramz/heidi | List.hs | {-# language OverloadedStrings #-}
# language FlexibleInstances #
# language DeriveFunctor , DeriveFoldable , , GeneralizedNewtypeDeriving #
{-# language ConstraintKinds #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
# OPTIONS_GHC -Wno - type - defaults #
----------------------------------------------------------------... | null | https://raw.githubusercontent.com/ocramz/heidi/634f1f6a2cec951e27f7d5a461159cf191a031f9/src/Core/Data/Frame/List.hs | haskell | # language OverloadedStrings #
# language ConstraintKinds #
# OPTIONS_GHC -Wno-unused-top-binds #
---------------------------------------------------------------------------
|
Module : Core.Data.Frame.List
Description : List-based dataframe
License : BSD-style
Stability : experimental
A general-pu... | # language FlexibleInstances #
# language DeriveFunctor , DeriveFoldable , , GeneralizedNewtypeDeriving #
# OPTIONS_GHC -Wno - type - defaults #
Copyright : ( c ) ( 2018 - 2019 )
Maintainer : ocramz fripost org
Portability : GHC
module Core.Data.Frame.List (
Frame(..),
frame,
Core.Data.Frame.L... |
14d2591128dd78c5cd5fecd7747ec4c70e1fe2379ecbc1ab04587ad02f01e4b6 | nedap/speced.def | parsing.cljc | (ns nedap.speced.def.impl.parsing
(:require
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
[clojure.string :as string]
[nedap.speced.def.impl.type-hinting :refer [cljs-checkable-class-mapping cljs-hint-class-mapping cljs-type-map primitive? primitives type-hint?]]
[nedap.speced.de... | null | https://raw.githubusercontent.com/nedap/speced.def/55053e53e749f77753294f3ee8d4639470840f8c/src/nedap/speced/def/impl/parsing.cljc | clojure | Don't use `cljs.core/instance?`! -98
| (ns nedap.speced.def.impl.parsing
(:require
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
[clojure.string :as string]
[nedap.speced.def.impl.type-hinting :refer [cljs-checkable-class-mapping cljs-hint-class-mapping cljs-type-map primitive? primitives type-hint?]]
[nedap.speced.de... |
d030c1fb27e3ed2d3c242089bd5b39800494c691fa2ccb6397c2e8f58529e5d1 | robert-strandh/SICL | allocator.lisp | (cl:in-package #:sicl-allocator)
(defparameter *number-of-bins* 512)
;;; The address in memory where the vector of start sentinels starts.
(defparameter *start-sentinels-start* *dyads-end*)
;;; The address in memory where the vector of end sentinels starts.
(defparameter *end-sentinels-start*
(+ *start-sentinels-s... | null | https://raw.githubusercontent.com/robert-strandh/SICL/7624f002048778ab6981c3f4e9b869e70c7976e0/Code/Garbage-collector/Allocator/allocator.lisp | lisp | The address in memory where the vector of start sentinels starts.
The address in memory where the vector of end sentinels starts.
The address in memory where the vector of bin sizes starts.
The address in memory where the heap starts. For now, we have it
start right after the bin-size vector.
the formula:
or
... | (cl:in-package #:sicl-allocator)
(defparameter *number-of-bins* 512)
(defparameter *start-sentinels-start* *dyads-end*)
(defparameter *end-sentinels-start*
(+ *start-sentinels-start* (* *number-of-bins* 8)))
(defparameter *bin-sizes-start*
(+ *end-sentinels-start* (* *number-of-bins* 8)))
(defparameter *heap-s... |
694435033e3970a6352f9f1b1ba88e8befbee24f59cbd3b4907206058ce9deaa | acieroid/scala-am | 2.scm | 2.1
(define (sign number)
(cond ((zero? number) 0)
((> number 0) 1)
(else -1)))
(define (divides? deler deeltal)
(= 0 (modulo deeltal deler)))
(define (leap-year? year)
(if (divides? 4 year)
(if (divides? 100 year)
(divides? 400 year)
#t)
#f))
(define (leap-year2? year)
(cond (... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1-compressed/2.scm | scheme | 2.1
(define (sign number)
(cond ((zero? number) 0)
((> number 0) 1)
(else -1)))
(define (divides? deler deeltal)
(= 0 (modulo deeltal deler)))
(define (leap-year? year)
(if (divides? 4 year)
(if (divides? 100 year)
(divides? 400 year)
#t)
#f))
(define (leap-year2? year)
(cond (... | |
deaf32900b9aae4fb068e3ddede5b8008203c4d01269d956f608f5bbf1c7edf4 | patrikja/AFPcourse | Types.hs | First some code provided in the exam question ( from RWH ch18 )
module Types (listDirectory, countEntries) where
import System.Directory (doesDirectoryExist, getDirectoryContents)
import System.FilePath ((</>))
import Control.Monad (forM_, when, liftM)
import Control.Monad.Trans (liftIO)
import Control.Monad.Writer (... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2013-08/Types.hs | haskell | a)
Output: [("T",2),("T/D",1),("T/A",2)]
b)
I assume that a "recursion depth" of < 0 means "do nothing", depth
0 means work through this directory but no subdirectories, etc.
change
change
change | First some code provided in the exam question ( from RWH ch18 )
module Types (listDirectory, countEntries) where
import System.Directory (doesDirectoryExist, getDirectoryContents)
import System.FilePath ((</>))
import Control.Monad (forM_, when, liftM)
import Control.Monad.Trans (liftIO)
import Control.Monad.Writer (... |
cfb9ff3fbbaafaf827f8084b54cf0173961bb821ef7d69279e60401632bae09b | OCamlPro/drom | ctypes_stubgen.mli | val make_types_stubs : string list -> (module Cstubs.Types.BINDINGS) -> unit
val make_functions_stubs : string list -> (module Cstubs.BINDINGS) -> unit
| null | https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/share/drom/skeletons/packages/ctypes_lib_stubs/bindings/ctypes_stubgen/ctypes_stubgen.mli | ocaml | val make_types_stubs : string list -> (module Cstubs.Types.BINDINGS) -> unit
val make_functions_stubs : string list -> (module Cstubs.BINDINGS) -> unit
| |
c7c6cf7e0aa285cdfd2a8b9f814f4495657ee11d036720fe87b727696d6b410f | nervous-systems/sputter | memory.clj | (ns sputter.util.memory
"Support functionality for [[mem/VMMemory]]."
(:require [sputter.tx.memory :as mem]
[sputter.word :as word]))
(defn insert-byte [mem pos w]
(let [b (-> w word/as-uint .byteValue)]
(mem/insert mem pos (vector-of :byte b) 1)))
(defn insert-word [mem pos w]
(mem/inser... | null | https://raw.githubusercontent.com/nervous-systems/sputter/e96357cff7ea13384ed94c7b0d6028d125b92e00/src/sputter/util/memory.clj | clojure | (ns sputter.util.memory
"Support functionality for [[mem/VMMemory]]."
(:require [sputter.tx.memory :as mem]
[sputter.word :as word]))
(defn insert-byte [mem pos w]
(let [b (-> w word/as-uint .byteValue)]
(mem/insert mem pos (vector-of :byte b) 1)))
(defn insert-word [mem pos w]
(mem/inser... | |
ccafbf62f53c9dbee8cf0ee9008d428a3c35f970f3e5a62cc31c613cd2e2f96f | RefactoringTools/HaRe | FunIn6.hs | module AddOneParameter.FunIn6 where
--Default parameters can be added to definition of functions and simple constants.
--In this example: add parameter 'y' to 'foo'
main :: IO Integer
main = do
let foo = return [1..4]
x <- foo
return (sum x)
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/AddOneParameter/FunIn6.hs | haskell | Default parameters can be added to definition of functions and simple constants.
In this example: add parameter 'y' to 'foo' | module AddOneParameter.FunIn6 where
main :: IO Integer
main = do
let foo = return [1..4]
x <- foo
return (sum x)
|
90cfe69dc498b72c91eaa6cf6bcdc52110e45d73669a3ab5da9a5ba1eeeecfa2 | timoffex/skyrim-alchemy | AlchemyInteractionIO.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
| Implements ' AlchemyInteraction ' using IO .
module AlchemyI... | null | https://raw.githubusercontent.com/timoffex/skyrim-alchemy/bcde5f3fd82fd6d6c40195c00eb396dbb0ea9242/src/AlchemyInteractionIO.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances # | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
| Implements ' AlchemyInteraction ' using IO .
module AlchemyInteractionIO
( runAlchemyInteractionIO
, AlchemyInteractionIO
) where
import AlchemyInteraction
( AlchemyInter... |
16795f33ff4de057533be3685b13beb1ddd99f92c998698a78add708290db313 | ashinn/chibi-scheme | binary-record.scm |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; binary records
(define-syntax defrec
(syntax-rules (make: pred: read: write: block:)
((defrec () n m p r w
((field-tmp field-read field-read-expr field-write field-write-expr field-get) ...)
((field getter . s) ...)
... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/binary-record.scm | scheme |
binary records
for some reason, works in chicken but not across libraries
(begin
(define-values (n m p getter ... setter ...)
(let ()
(define-record-type n (m field ...) p
(field getter . s) ...)
(values (record-rtd n) m p getter ... setter ...)))
(define r
(let ((field-read ... |
(define-syntax defrec
(syntax-rules (make: pred: read: write: block:)
((defrec () n m p r w
((field-tmp field-read field-read-expr field-write field-write-expr field-get) ...)
((field getter . s) ...)
(def-setter ...))
(begin
(define-record-type n (m field ...) p
(field... |
7b3cbd0e9f508c31e37363b0ee2a019b7dc84dedc78d4ce1310817ae3e954d99 | diagrams/geometry | Segment.hs | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleCo... | null | https://raw.githubusercontent.com/diagrams/geometry/945c8c36b22e71d0c0e4427f23de6614f4e7594a/src/Geometry/Segment.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE EmptyDataDecls #
# LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
... | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses ... |
bf473269f9eff0f78286605264b57fdececa5733a2ac31b9ae7ad4d579433ebe | GaloisInc/HaNS | Threads.hs | module Hans.Threads where
import Control.Concurrent (forkFinally,ThreadId)
import Control.Exception (fromException,AsyncException(..))
forkNamed :: String -> IO () -> IO ThreadId
forkNamed str body = forkFinally body showExn
where
showExn Right{} =
return ()
showExn (Left e) =
case fromException e of... | null | https://raw.githubusercontent.com/GaloisInc/HaNS/2af19397dbb4f828192f896b223ed2b77dd9a055/src/Hans/Threads.hs | haskell | module Hans.Threads where
import Control.Concurrent (forkFinally,ThreadId)
import Control.Exception (fromException,AsyncException(..))
forkNamed :: String -> IO () -> IO ThreadId
forkNamed str body = forkFinally body showExn
where
showExn Right{} =
return ()
showExn (Left e) =
case fromException e of... | |
51f6a8c34d2d3c3118ed49022b524ff87f6b86e10272f5cd5c7949801db2bb83 | zwizwa/staapl | sync.rkt | #lang scheme/base
;; Synchronous multitasking.
;; -------------------------
;;
Starting from Actors / Erlang , use the following simplifications :
;;
;; - messages -> synchronous byte streams
;;
;; - static task instances with reset
;;
;; - static i/o connection
;;
is trivial : each write causes another tasks 's ... | null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/sm/sync.rkt | racket | Synchronous multitasking.
-------------------------
- messages -> synchronous byte streams
- static task instances with reset
- static i/o connection
blocks again in a write.
- data joins are rare, so can we avoid them completely?
- introduce buffers (and find a smart way to do this automatically)
If... | #lang scheme/base
Starting from Actors / Erlang , use the following simplifications :
is trivial : each write causes another tasks 's read until it
needs some thought :
Primtives :
be represented by a read and resp write XT .
|
c5b03f3b98ca8bc4a2fb03ac5edb34ae8e28f6dbe18047a85d41819a56c6c5e7 | l-x/deeperl | deeperl_glossary_list.erl | @private
-module(deeperl_glossary_list).
-behaviour(gen_deeperl_method).
%% API
-export([request/1, response/1]).
request({}) ->
{
get,
{
"/v2/glossaries",
[]
}
}.
response(Body) ->
Result = jiffy:decode(Body, [return_maps]),
{ok, [
deeperl_g... | null | https://raw.githubusercontent.com/l-x/deeperl/834fd8101e7057e090d5ab17b2a68c75f8e1656f/src/deeperl_glossary_list.erl | erlang | API | @private
-module(deeperl_glossary_list).
-behaviour(gen_deeperl_method).
-export([request/1, response/1]).
request({}) ->
{
get,
{
"/v2/glossaries",
[]
}
}.
response(Body) ->
Result = jiffy:decode(Body, [return_maps]),
{ok, [
deeperl_glossary... |
d9de84850d6450916f5c32e2bc1fb9f19278986b43feca9b1e20af3e46fe0dfd | nmattia/makefile | Test.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import "Glob" System.FilePath.Glob (glob)
import Control.Monad
import Data.Makefile
import Data.Makefile.Parse
import Data.Makefile.Parse.Internal
import Data.Makefile.Render
import Data.... | null | https://raw.githubusercontent.com/nmattia/makefile/dbc21465c5195e32922aa5d0786fd1ffadb75a0d/src/Test.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
| We ensure that all encoded entries finish with a new line character
(lines/unlines)
... feeling lazy
Courtesy of quickcheck |
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import "Glob" System.FilePath.Glob (glob)
import Control.Monad
import Data.Makefile
import Data.Makefile.Parse
import Data.Makefile.Parse.Internal
import Data.Makefile.Render
import Data.Makefile.Render.Internal
import Data.Monoid
import Test.DocTest (do... |
dd2d2677efa040c8513a9bf7496f68117bf33e38550a372d37360c344e76c667 | kompendium-ano/factom-haskell-client | Debug.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TemplateH... | null | https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Debug.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------
... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Factom.RPC.Debug where
import Control.Concurrent
import Control.Exception (bracket)
import Control.Mona... |
c74760ff607eb87e1ddf7c15c9a84268ff7246f27156b56c16cb020f97d77c20 | jj1bdx/sshrpc | client_test.erl | Copyright ( c ) 2009 - 2010 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this soft... | null | https://raw.githubusercontent.com/jj1bdx/sshrpc/23973d440503bf3a66ee9368bdf5ce7f5e808b28/src/client_test.erl | erlang |
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the Licens... | Copyright ( c ) 2009 - 2010 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
@author < >
2009 - 2010
TODO : th... |
474533d75895c812e99548d4f98824688f2bcdea14308e456d60423acb283deb | echeran/clj-thamil | project.clj | (defproject clj-spanish "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-thamil "0.1.2"]])
| null | https://raw.githubusercontent.com/echeran/clj-thamil/692a6d94329bb14cb58fb39b875792e5d774d2c4/examples/clj/clj-spanish/project.clj | clojure | (defproject clj-spanish "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-thamil "0.1.2"]])
| |
c2a21a6dea66fcffb8bf5624e8e8edca6809e5a8903296ffcf24b553e565870a | lambdaisland/gaiwan_co | blog.clj | (ns co.gaiwan.site.blog
(:require [clj-rss.core :as rss]
[co.gaiwan.site.layout :as layout]
[co.gaiwan.site.md-files :as md-files]
[co.gaiwan.site.open-graph :as og]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Components
(... | null | https://raw.githubusercontent.com/lambdaisland/gaiwan_co/c554cabad2ba319158c9c0bc475c6b82f45b5924/src/co/gaiwan/site/blog.clj | clojure |
Components
Routes | (ns co.gaiwan.site.blog
(:require [clj-rss.core :as rss]
[co.gaiwan.site.layout :as layout]
[co.gaiwan.site.md-files :as md-files]
[co.gaiwan.site.open-graph :as og]))
(defn list-item [{:keys [html]
{:keys [title slug author date] :or {slug ""}} :meta
... |
62ffedc4f5e534a54c267ec66f3622bbbb4ac5023186db923e16458eec3287e0 | manuel-serrano/bigloo | gstelementfactory.scm | ;*=====================================================================*/
;* .../bigloo/api/gstreamer/src/Llib/gstelementfactory.scm */
;* ------------------------------------------------------------- */
* Author : * /
* Creation : We d Jan ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/gstreamer/src/Llib/gstelementfactory.scm | scheme | *=====================================================================*/
* .../bigloo/api/gstreamer/src/Llib/gstelementfactory.scm */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* GstElementFactory ... | * Author : * /
* Creation : We d Jan 2 06:53:19 2008 * /
* Last change : Tue Nov 15 17:00:11 2011 ( serrano ) * /
* Copyright : 2008 - 11 * /
(module __gstreamer_gsteleme... |
2b5926eb0515ad8bbbe1ba0a756b245c253a81d32a24de4189cb9bdd297473a3 | craigl64/clim-ccl | accept-values.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 19... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/accept-values.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
under it's parent UPDATING-OUTPUT record. Therefore we make it match.
(There's a separate issue, having nothing to do with incremental-redisplay
any will suff... |
(in-package :clim-internals)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1992 Franz , Inc. All rights reserved .
Portions copyright ( c ) 1989 , 1990 International Lisp Associates . "
For historical reasons " AVV " means " accepting - values " ...
(... |
da652cda4f660240ae192b54a15915c4611adbf841c2400807ddabbeaed4595a | instedd/planwise | project.clj | (defproject planwise "0.13.0-SNAPSHOT"
:description "Facility Planner"
:url ""
:min-lein-version "2.0.0"
:dependencies [; Base infrastructure
[org.clojure/clojure "1.10.1"]
[org.clojure/core.async "0.4.474"]
[prismatic/schema "1.1.7"]
[duct/co... | null | https://raw.githubusercontent.com/instedd/planwise/824b3c630ae6ac15150105fefa99515f5c5c39f0/project.clj | clojure | Base infrastructure
Web server and routing
needed by oauthentic
Logging
Rendering and data handling
Client assets and components
Database access
Misc
Framework
REPL tools
Testing libraries | (defproject planwise "0.13.0-SNAPSHOT"
:description "Facility Planner"
:url ""
:min-lein-version "2.0.0"
[org.clojure/clojure "1.10.1"]
[org.clojure/core.async "0.4.474"]
[prismatic/schema "1.1.7"]
[duct/core "0.6.2"]
[duct/modu... |
953604b36c19112b369cdc3a7f8707a60c113c21134cbba1fc262bd1be8903c2 | facebookarchive/duckling_old | finance.clj | (
"intersect (X cents)" ;
[(dim :amount-of-money) (dim :amount-of-money #(= (:unit %) "öre"))]
(compose-money %1 %2)
"intersect (and X cents)" ;
[(dim :amount-of-money) #"(?i)och" (dim :amount-of-money #(= (:unit %) "öre"))]
(compose-money %1 %3)
"intersect" ;
[(dim :amount-of-money) (dim :number)]
(compose-money %1... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/sv/rules/finance.clj | clojure |
#(not (:number-prefixed %)
ambiguous
not ambiguous
Australian Dollar Currency
to do:localize the corpus and rules per language
to do:localize the corpus and rules per language
Emirates Currency | (
[(dim :amount-of-money) (dim :amount-of-money #(= (:unit %) "öre"))]
(compose-money %1 %2)
[(dim :amount-of-money) #"(?i)och" (dim :amount-of-money #(= (:unit %) "öre"))]
(compose-money %1 %3)
[(dim :amount-of-money) (dim :number)]
(compose-money %1 %2)
[(dim :amount-of-money) #"(?i)och" (dim :number)]
(compose-m... |
7428183c8063991cc7617ef6d6a47ba4594cf7da64c21a2cf0d59316d677f09f | babashka/babashka.core | core.clj | (ns babashka.core
(:require [clojure.string :as str]))
(defn windows? []
(str/starts-with? (System/getProperty "os.name") "Windows"))
| null | https://raw.githubusercontent.com/babashka/babashka.core/1f83323081e314c4630f8b06bb14f2ef7786ef9c/src/babashka/core.clj | clojure | (ns babashka.core
(:require [clojure.string :as str]))
(defn windows? []
(str/starts-with? (System/getProperty "os.name") "Windows"))
| |
4666cc0863f971059232316295bcde2069a7aca4403c40adfb813c8e7db2014f | gilith/hol-light | ind_defs.ml | (* ========================================================================= *)
(* Mutually inductively defined relations. *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/ind_defs.ml | ocaml | =========================================================================
Mutually inductively defined relations.
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
needs "theorems.ml";;
Strip off exactly n arguments from combination .
l... |
28040d357a9eaf3d892e96df03539cbf55034adfb676086e618d9dbd59e454e5 | wz1000/hie-lsp | Collection.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
#ifdef USE_REFLEX_OPTIMIZER
{-# OPTIONS_GHC -fplugin=Reflex.Optimiz... | null | https://raw.githubusercontent.com/wz1000/hie-lsp/dbb3caa97c0acbff0e4fd86fc46eeea748f65e89/reflex-0.6.1/src/Reflex/Collection.hs | haskell | # LANGUAGE RankNTypes #
# OPTIONS_GHC -fplugin=Reflex.Optimizer #
|
Module:
* Widgets on Collections
* List Utils
| Create a set of widgets based on the provided 'Map'. When the
input 'Event' fires, remove widgets for keys with the value 'Nothing'
and add/replace widgets for keys with 'Just' values.
TODO: Move t... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
#ifdef USE_REFLEX_OPTIMIZER
#endif
Reflex . Collection
module Reflex.Collection
(
lis... |
f225418a9b601413589f707c2b8987ebd0647a1f059b8dedccea5bd3676c2473 | metabase/metabase | sso_utils.clj | (ns metabase-enterprise.sso.integrations.sso-utils
"Functions shared by the various SSO implementations"
(:require
[metabase-enterprise.sso.integrations.sso-settings :as sso-settings]
[metabase.api.common :as api]
[metabase.email.messages :as messages]
[metabase.models.user :refer [User]]
[metabase.p... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/enterprise/backend/src/metabase_enterprise/sso/integrations/sso_utils.clj | clojure | TODO - we should avoid hardcoding this to make it easier to add new integrations. Maybe look at something like
the keys of `(methods sso/sso-get)`
send an email to everyone including the site admin if that's set
remove keys with `nil` values
In this case, this just means that we don't have a specified host in redi... | (ns metabase-enterprise.sso.integrations.sso-utils
"Functions shared by the various SSO implementations"
(:require
[metabase-enterprise.sso.integrations.sso-settings :as sso-settings]
[metabase.api.common :as api]
[metabase.email.messages :as messages]
[metabase.models.user :refer [User]]
[metabase.p... |
fb3c0befd91e70853e569de039296cffb1d4a53cb43161ce4f7652f38818e6a2 | sacerdot/CovidMonitoring | launch.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 15 . mag 2020 11:44
%%%-------------------------------------------------------------------
-module(launch).
-export([launch/0]).
launch () ->
compile:file(server),
compi... | null | https://raw.githubusercontent.com/sacerdot/CovidMonitoring/fe969cd51869bbe6479da509c9a6ab21d43e6d11/BertaniSignatiStacchio/launch.erl | erlang | -------------------------------------------------------------------
@doc
@end
------------------------------------------------------------------- | @author
( C ) 2020 , < COMPANY >
Created : 15 . mag 2020 11:44
-module(launch).
-export([launch/0]).
launch () ->
compile:file(server),
compile:file(ospedale),
compile:file(luoghi),
compile:file(utenti),
spawn(fun()->os:cmd('werl -name server -s server start') end),
spawn(fun()->os:cmd('werl -nam... |
95e8603d5df8c43f1f290c443423c33ecaa0ee803d1f69e8386b55523a953968 | Elzair/nazghul | gholet.scm | ;;----------------------------------------------------------------------------
;; Constants
;;----------------------------------------------------------------------------
(define gholet-lvl 4)
(define gholet-species sp_human)
(define gholet-occ nil)
;;-------------------------------------------------------------------... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/gholet.scm | scheme | ----------------------------------------------------------------------------
Constants
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Schedule
------------------------------------------------------------------... | (define gholet-lvl 4)
(define gholet-species sp_human)
(define gholet-occ nil)
In the Prison level under
(define (gholet-mk) nil)
Gholet is a former pirate , now imprisoned in the Prison below Glasdrin .
He is one of the surviving crew of the Merciful Death ,
and is sought for vengeance by the ghost Ghertie... |
95bdc99e685c3bdc3891b17409328457edd30b153dbd3bf4e7df310fb3c6b93f | facebookincubator/hsthrift | String.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
( c ) The University of Glasgow 2006
module Util.String
( capitalize
, decapitalize
, toArgs
, strip
) where
import Data.Char (isSpace, toUpper, toLower)
import Control.Applicative
-- | For processing a string representing a list of arguments into a... | null | https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/Util/String.hs | haskell | | For processing a string representing a list of arguments into a list of
Error
Remove outer quotes:
Right ["foo", "bar baz"]
Keep inner quotes:
Right ["-DFOO=\"bar baz\""]
readAsString removes outer quotes
show argPart2 to keep inner quotes
rest must either be [] or start with a space
same as (||) | Copyright ( c ) Facebook , Inc. and its affiliates .
( c ) The University of Glasgow 2006
module Util.String
( capitalize
, decapitalize
, toArgs
, strip
) where
import Data.Char (isSpace, toUpper, toLower)
import Control.Applicative
strings , handling surrounding quotes , brackets and spaces . From... |
3d8772bcd7846596fd446cb31a0384addf8616155f495b20f89d0846b8de98b3 | walck/learn-physics | CoordinateSystem.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE Safe #-}
|
Module : Physics . Learn . CoordinateSystem
Copyright : ( c ) 2012 - 2018
License : BSD3 ( see LICENSE )
Maintainer : < >
Stability : experimental
A module for working with coordinate systems .
Module : Physics.Lea... | null | https://raw.githubusercontent.com/walck/learn-physics/99611ca49940b78a0e13402f35082805cc7db294/src/Physics/Learn/CoordinateSystem.hs | haskell | # LANGUAGE Safe #
| Specification of a coordinate system requires
a map from coordinates into space, and
a map from space into coordinates.
^ a map from coordinates into space
^ a map from space into coordinates
| The standard cylindrical coordinate system
| The standard spherical coordinate system
| Define... | # OPTIONS_GHC -Wall #
|
Module : Physics . Learn . CoordinateSystem
Copyright : ( c ) 2012 - 2018
License : BSD3 ( see LICENSE )
Maintainer : < >
Stability : experimental
A module for working with coordinate systems .
Module : Physics.Learn.CoordinateSystem
Co... |
569d276a5dda514ae24a995438afaedc7933c4504ca090fb9fa6eccee6979eeb | mthbernardes/shaggy-rogers | jwt_tokens.clj | (ns shaggy-rogers.detectors.jwt-tokens
(:require [clj-jwt.core :refer :all]))
(def ^:private jwt-regex #"eyJh[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.[A-Za-z0-9-_.+\/=]*")
(defn- valid-jwt? [jwt-token]
(try
(-> jwt-token str->jwt boolean)
(catch Exception _
false)))
(defn handler [{:keys [text-document] ... | null | https://raw.githubusercontent.com/mthbernardes/shaggy-rogers/aa100bf81ec142503f69882aa811ef15fae4f027/src/shaggy_rogers/detectors/jwt_tokens.clj | clojure | (ns shaggy-rogers.detectors.jwt-tokens
(:require [clj-jwt.core :refer :all]))
(def ^:private jwt-regex #"eyJh[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.[A-Za-z0-9-_.+\/=]*")
(defn- valid-jwt? [jwt-token]
(try
(-> jwt-token str->jwt boolean)
(catch Exception _
false)))
(defn handler [{:keys [text-document] ... | |
84c0549b634a22d1cdd042f97893de50e880b1285e569377da6bb6cb0345a0f2 | ghc/packages-directory | FindFile001.hs | # LANGUAGE CPP #
module FindFile001 where
#include "util.inl"
import qualified Data.List as List
import System.FilePath ((</>))
main :: TestEnv -> IO ()
main _t = do
createDirectory "bar"
createDirectory "qux"
writeFile "foo" ""
writeFile ("bar" </> "foo") ""
writeFile ("qux" </> "foo") ":3"
-- make sure... | null | https://raw.githubusercontent.com/ghc/packages-directory/75165a9d69bebba96e0e3a1e519ab481d1362dd2/tests/FindFile001.hs | haskell | make sure findFile is lazy enough
make sure relative paths work
make sure absolute paths are handled properly irrespective of 'dirs'
| # LANGUAGE CPP #
module FindFile001 where
#include "util.inl"
import qualified Data.List as List
import System.FilePath ((</>))
main :: TestEnv -> IO ()
main _t = do
createDirectory "bar"
createDirectory "qux"
writeFile "foo" ""
writeFile ("bar" </> "foo") ""
writeFile ("qux" </> "foo") ":3"
T(expectEq) ... |
03041bd53bccf8f64ea8f31521e1b9d8c7aeba3e7a81826d33ae44ec39281cb6 | ayamada/copy-of-svn.tir.jp | tcpcgi-kickstart.scm | #!/usr/bin/env gosh
;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme sw=2 ts=2 et:
$ Id$
;;; tcpcgiの実行サンプル。
;;; usage :
;;; cd /path/to/here
;;; env - PATH="$PATH" \
;;; tcpserver -v -c 16 -h -R -u xxxx -g yyyy -x ./tcpcgi.cdb 0 80 \
;;; gosh ./tcpcgi-kickstart.scm
# この時のtcpserverへのパラメータはお好みで 。
... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/tcpcgi/tags/0.3/src/tcpcgi-kickstart.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme sw=2 ts=2 et:
tcpcgiの実行サンプル。
usage :
cd /path/to/here
env - PATH="$PATH" \
tcpserver -v -c 16 -h -R -u xxxx -g yyyy -x ./tcpcgi.cdb 0 80 \
gosh ./tcpcgi-kickstart.scm
----------------------------------------------------------------
ここから下は、サンプルcgi定義
ここから上は、サンプル... | #!/usr/bin/env gosh
$ Id$
# この時のtcpserverへのパラメータはお好みで 。
env - PATH="$PATH " tcpserver -v -c 8 -h -R 0 8888 tcpcgi-kickstart.scm
(add-load-path "lib")
(use tcpcgi)
(use gauche.process)
(use srfi-1)
(use text.tree)
(use text.html-lite)
(use www.cgi)
(use wiliki)
(define (debug-cgi)
(cgi-main
(l... |
3b2736e0276228c495ab9dc1cd369c86defa1004277710bea45e0756447ad991 | vincenthz/hs-crypto-cipher | Benchmarks.hs | import Crypto.Cipher.Benchmarks
import Crypto.Cipher.Camellia
main = defaultMain
[GBlockCipher (undefined :: Camellia128)
]
| null | https://raw.githubusercontent.com/vincenthz/hs-crypto-cipher/d12559572eb7df9e4497db40a729680481ad3124/cipher-camellia/Benchmarks/Benchmarks.hs | haskell | import Crypto.Cipher.Benchmarks
import Crypto.Cipher.Camellia
main = defaultMain
[GBlockCipher (undefined :: Camellia128)
]
| |
31361c344150673578ad8d5865904f2e8799588032a630ef3791403d2a4e72a6 | BranchTaken/Hemlock | test_convert_zint.ml | open! Basis.Rudiments
open! Basis
let test () =
File.Fmt.stdout
|> (fun formatter ->
List.fold Nat.([of_u64 0L; of_u64 1L;
of_string "0x7fff_ffff_ffff_ffff_ffff_ffff_ffff_ffffn";
of_string "0x8000_0000_0000_0000_0000_0000_0000_0000n"]) ~init:formatter
~f:(fun formatter u ->
formatter
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/nat/test_convert_zint.ml | ocaml | open! Basis.Rudiments
open! Basis
let test () =
File.Fmt.stdout
|> (fun formatter ->
List.fold Nat.([of_u64 0L; of_u64 1L;
of_string "0x7fff_ffff_ffff_ffff_ffff_ffff_ffff_ffffn";
of_string "0x8000_0000_0000_0000_0000_0000_0000_0000n"]) ~init:formatter
~f:(fun formatter u ->
formatter
... | |
8fcdfe4de044ec4796dc47eb3fbfcf3cd1eef69686d20dd650064822405cbbb9 | 8c6794b6/guile-tjit | test-lr-associativity-02.scm | ;;; test-lr-associativity-02.scm --
;;
;;Show how to use left and right associativity. Notice that the
terminal M is declared as left associative ; this influences the
;;binding of values to the $n symbols in the semantic clauses. The
;;semantic clause in the rule:
;;
( E M E M E ) ... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/lalr/test-lr-associativity-02.scm | scheme | test-lr-associativity-02.scm --
Show how to use left and right associativity. Notice that the
this influences the
binding of values to the $n symbols in the semantic clauses. The
semantic clause in the rule:
looks like it is right-associated, but the result is left-associated
because we have d... | ( E M E M E ) : ( list $ 1 $ 2 ( list $ 3 $ 4 $ 5 ) )
(load "common-test.scm")
(define (doit . tokens)
(let ((parser (lalr-parser
(expect: 0)
(N (left: A)
(left: M)
(nonassoc: U))
(E (N) : $1
(E A E) : (list $1 $2 $3)
(E M E) : (list $1 $2 $3)
(E M E M E) :... |
95180a3eb71742c86e6c32c29c4e4e518289a40cc98b27f1726f7c9fd3848f47 | hjcapple/reading-sicp | exercise_5_41.scm | #lang sicp
P424 - [ 练习 5.41 ]
(#%provide find-variable)
(define (find-variable var env)
(define (position-in-frame var frame position)
(if (null? frame)
'not-found
(if (eq? var (car frame))
position
(position-in-frame var (cdr frame) (+ position 1)))))
(define (lo... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_5/exercise_5_41.scm | scheme |
(2 0)
not-found | #lang sicp
P424 - [ 练习 5.41 ]
(#%provide find-variable)
(define (find-variable var env)
(define (position-in-frame var frame position)
(if (null? frame)
'not-found
(if (eq? var (car frame))
position
(position-in-frame var (cdr frame) (+ position 1)))))
(define (lo... |
1124d9863395dd3fe820061296c9afc7d3213f6e597ba1f55972b3346f018383 | inhabitedtype/ocaml-aws | deregisterPatchBaselineForPatchGroup.mli | open Types
type input = DeregisterPatchBaselineForPatchGroupRequest.t
type output = DeregisterPatchBaselineForPatchGroupResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/deregisterPatchBaselineForPatchGroup.mli | ocaml | open Types
type input = DeregisterPatchBaselineForPatchGroupRequest.t
type output = DeregisterPatchBaselineForPatchGroupResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
63813943dd98a0af7f7714c4474d78cd3c140c3915c1038d5d24dd6169b07112 | erlang/corba | generated_SUITE.erl | %%-----------------------------------------------------------------
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a c... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/orber/test/generated_SUITE.erl | erlang | -----------------------------------------------------------------
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KI... | Copyright Ericsson AB 2004 - 2016 . 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(generated_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
-de... |
89cca285a0afa3234bb5ecc750c1d710658ee2ebf4da608e662ad7a88424778b | Apress/practical-webdev-haskell | TypesSpec.hs | module Domain.Auth.TypesSpec where
import ClassyPrelude
import Test.Hspec
import Domain.Auth.Types
spec :: Spec
spec = do
describe "mkEmail" $ do
describe "should pass" $
mkEmailSpec "" True
describe "should fail" $ do
mkEmailSpec "invalid " False
mkEmailSpec "email@test." False
mkE... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/11/test/Domain/Auth/TypesSpec.hs | haskell | module Domain.Auth.TypesSpec where
import ClassyPrelude
import Test.Hspec
import Domain.Auth.Types
spec :: Spec
spec = do
describe "mkEmail" $ do
describe "should pass" $
mkEmailSpec "" True
describe "should fail" $ do
mkEmailSpec "invalid " False
mkEmailSpec "email@test." False
mkE... | |
8376212f8c2505a2a8d2a30e1789963e4f8b1a670864c8083ae7f3d4d61e8e4d | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GetPaymentIntentsSearch.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the different functions to run the operation getPaymentIntentsSearch
module Str... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetPaymentIntentsSearch.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the different functions to run the operation getPaymentIntentsSearch
| > GET /v1/payment_intents/search
Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating
| Contains a... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Operations.GetPaymentIntentsSearch where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data... |
c8c55951ac318023910daf93ef2661cffef40442b330e474e66f6401da556d93 | yuanqing/code-problems | csv_parse.ml | let csv_parse (str:string) : string list =
let r = Str.regexp (
"'[^']*'" ^ "\\|" ^ (* single-quoted *)
"\"[^\"]*\"" ^ "\\|" ^ (* double-quoted *)
"[^,]+" (* unquoted *)
) in
let rec aux str =
let len = String.length str in
if len = 0 then
[]
else
try
` i ` ... | null | https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/csv_parse/csv_parse.ml | ocaml | single-quoted
double-quoted
unquoted
Remove initial and trailing whitespace.
Trim off the quotes.
Drop `matched` from `str`.
Discard `matched` if it is empty.
Otherwise, append `matched` to our result. | let csv_parse (str:string) : string list =
let r = Str.regexp (
) in
let rec aux str =
let len = String.length str in
if len = 0 then
[]
else
try
` i ` and ` j ` are the start and end indices of the first token
found in ` str ` .
found in `str`. *)
let i =... |
1a25f92e048acb23a9141a00af116dc152f8af1fe342412542a9cebeb5699c41 | chaoxu/fancy-walks | C.hs | {-# OPTIONS_GHC -O2 #-}
# LANGUAGE FlexibleInstances #
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (B... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%202009/Round%201B/C.hs | haskell | # OPTIONS_GHC -O2 # | # LANGUAGE FlexibleInstances #
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualif... |
900d7dd35510178a4657e16ee0835986de033897e2a1bc0de745407d84bc9e9c | imteekay/functional-programming-learning-path | returning-functions.clj | ;; The returned functions are closures,
;; which means that they can access all the variables that were in scope when the function was created
(defn inc-maker
"Create a custom incrementor"
[inc-by]
#(+ % inc-by))
(def inc3 (inc-maker 3))
10
| null | https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/clojure/functions/returning-functions.clj | clojure | The returned functions are closures,
which means that they can access all the variables that were in scope when the function was created |
(defn inc-maker
"Create a custom incrementor"
[inc-by]
#(+ % inc-by))
(def inc3 (inc-maker 3))
10
|
52a8bea6c72fa9200ca2edfb768a7d1a4ed287ab8086f6247d1b410c090c8700 | pingles/bandit | project.clj | (defproject bandit/bandit-ring "0.2.1-SNAPSHOT"
:description "Ring middleware for multi-armed bandit testing"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[ring/ring-core "1.2.2"]
[ring/ring-jetty-ad... | null | https://raw.githubusercontent.com/pingles/bandit/795666f3938e28f389691094bb1e07e4202290f6/bandit-ring/project.clj | clojure | (defproject bandit/bandit-ring "0.2.1-SNAPSHOT"
:description "Ring middleware for multi-armed bandit testing"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[ring/ring-core "1.2.2"]
[ring/ring-jetty-ad... | |
0f43ef721d76273b6f5ac6cb037511cf4a565e9db30b155d82899fc7c1d10d0e | input-output-hk/plutus-apps | Future.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MonoLocalBinds #
# LANGUAGE ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8949ce26588166d9961205aa61edd66e4f83d4f5/plutus-use-cases/src/Plutus/Contracts/Future.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
$fut... | # LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - matches #
# OPTIONS_GHC -fno - w... |
5ac101141f13e96f7e4a45fb223e57b1368e51bfdc2873aade691c6e21e1d0bc | Gabriella439/slides | Main.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent.STM (STM)
import Control.Monad (forever)
import Control.Monad.Managed (Managed, liftIO)
import Data.Binary.Builder (Builder)
import Data.ByteString.Lazy (ByteString)
import Data.Monoid ((<>))
import qualified Control.Concurrent as Concurrent
imp... | null | https://raw.githubusercontent.com/Gabriella439/slides/b3f4c33e3714e186c309aa791ca1bcce68b3cc74/lambdaconf/category/examples/01/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
import Control.Concurrent.STM (STM)
import Control.Monad (forever)
import Control.Monad.Managed (Managed, liftIO)
import Data.Binary.Builder (Builder)
import Data.ByteString.Lazy (ByteString)
import Data.Monoid ((<>))
import qualified Control.Concurrent as Concurrent
import qualified Control.Concurrent.As... |
77540b984adaeaccc00d43fb761712c6e3639a549a5dc8adc718fb5e0154b730 | arrdem/shelving | grimoire_test.clj | (ns grimoire-test
(:require [clojure.test :as t]
[shelving.core :as sh]
[shelving.log-shelf :refer [->LogShelf]]
[grimoire :refer :all :as g]))
(def *conn
(-> schema
(->LogShelf "target/grim.edn"
:load false)
(sh/open)))
(def clj-160
(->mvn-pkg "... | null | https://raw.githubusercontent.com/arrdem/shelving/27439bfcb2f3438d5b23fcd468360bda491002f1/src/test/clj/grimoire_test.clj | clojure | Write some core versions | (ns grimoire-test
(:require [clojure.test :as t]
[shelving.core :as sh]
[shelving.log-shelf :refer [->LogShelf]]
[grimoire :refer :all :as g]))
(def *conn
(-> schema
(->LogShelf "target/grim.edn"
:load false)
(sh/open)))
(def clj-160
(->mvn-pkg "... |
c3a5c0209bfadc946409eb7c7d74b5464d9987e826f7d2843b29b39a2a799564 | bjorng/wings | wings_file.erl | %%
%% wings_file.erl --
%%
%% This module contains the commands in the File menu.
%%
Copyright ( c ) 2001 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wings_file).
-export([init/0,ini... | null | https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/src/wings_file.erl | erlang |
wings_file.erl --
This module contains the commands in the File menu.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
export_filename([Prop], St, Continuation).
The St will only be used to setup the default fil... | Copyright ( c ) 2001 - 2011
-module(wings_file).
-export([init/0,init_autosave/0,menu/0,command/2]).
-export([import_filename/2,export_filename/2,export_filename/3]).
-export([unsaved_filename/0,del_unsaved_file/0,autosave_filename/1]).
-export([file_filters/1]).
-include("wings.hrl").
-include_lib("wings/e3d/e3... |
b2c0a0024216fd6fd9079a653f8a9a366cb64b970f5685f0e85829552b47343b | kevinmershon/copy-trader | websocket_keepalive_job.clj | (ns copy-trader.scheduling.websocket-keepalive-job
(:require
[clojure.tools.logging :as log]
[clojurewerkz.quartzite.jobs :as jobs :refer [defjob]]
[copy-trader.websocket.client :as ws-client]))
(defn- do-websocket-keepalive-job*
[_job-context]
(ws-client/keepalive-clients!))
(defjob websocket-keepaliv... | null | https://raw.githubusercontent.com/kevinmershon/copy-trader/49f6f199047e8f0aeee48ca0f3990f11f15e9e7b/src/clj/copy_trader/scheduling/websocket_keepalive_job.clj | clojure | (ns copy-trader.scheduling.websocket-keepalive-job
(:require
[clojure.tools.logging :as log]
[clojurewerkz.quartzite.jobs :as jobs :refer [defjob]]
[copy-trader.websocket.client :as ws-client]))
(defn- do-websocket-keepalive-job*
[_job-context]
(ws-client/keepalive-clients!))
(defjob websocket-keepaliv... | |
3e9bcc276fd72b1320751cfb07cb0b2af2886685edb11ce7c3861bd10cf5a0a3 | Eduap-com/WordMat | fft.lisp | ;; -*- Lisp -*-
(in-package :maxima)
(mk:defsystem maxima-fft
:source-pathname (maxima::maxima-load-pathname-directory)
:binary-pathname (maxima::maxima-objdir "share" "numeric")
:source-extension "lisp"
:components
((:file "fft-package")
(:file "fft-core" :depends-on ("fft-package"))
(:file "fft-inte... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/numeric/fft.lisp | lisp | -*- Lisp -*- |
(in-package :maxima)
(mk:defsystem maxima-fft
:source-pathname (maxima::maxima-load-pathname-directory)
:binary-pathname (maxima::maxima-objdir "share" "numeric")
:source-extension "lisp"
:components
((:file "fft-package")
(:file "fft-core" :depends-on ("fft-package"))
(:file "fft-interface" :depends-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.