_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 |
|---|---|---|---|---|---|---|---|---|
65ec54a482a1548fe9eb882421b2bfeb70bdfd14edc6323d16bc98037a01283c | owlbarn/owl_symbolic | example_10.ml |
* OWL - OCaml Scientific and Engineering Computing
* Copyright ( c ) 2016 - 2020 < >
* OWL - OCaml Scientific and Engineering Computing
* Copyright (c) 2016-2020 Liang Wang <>
*)
open Owl_symbolic_neural_graph
MNIST
let nn =
input [| 100; 3; 32; 32 |]
|> normalisation
|> conv2d [| 32; 3; 3; 3 ... | null | https://raw.githubusercontent.com/owlbarn/owl_symbolic/dc853a016757d3f143c5e07e50075e7ae605d969/example/example_10.ml | ocaml |
* OWL - OCaml Scientific and Engineering Computing
* Copyright ( c ) 2016 - 2020 < >
* OWL - OCaml Scientific and Engineering Computing
* Copyright (c) 2016-2020 Liang Wang <>
*)
open Owl_symbolic_neural_graph
MNIST
let nn =
input [| 100; 3; 32; 32 |]
|> normalisation
|> conv2d [| 32; 3; 3; 3 ... | |
cb90af2084ec7dd24f71039dc138a4cf437ca545a431af61cb92e00f020e479b | hasktorch/hasktorch | Dataset.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
module Dataset where
import Control.Mona... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/8c6feb0e6987380fe92b487866f28edcfd665e82/experimental/gradually-typed/examples/neural-interpreter/Dataset.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
module Dataset where
import Control.Monad (guard)
import Control.Monad.S... |
c200a81499d4298d0f723c480109c2753d39b6e73eb0a37ddad53a1d933e1c63 | ghcjs/ghcjs | t12478_2.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE UnboxedSums #
-- Essentially the same as TH_repUnboxedTuples, but for unboxed sums
module Main where
import Language.Haskell.TH
main :: IO ()
main = case bar () of
(# a | #) -> print a
(# | b #) -> print b
bar :: () -> (# String | Int #)
bar () = $( do e <- [... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/th/t12478_2.hs | haskell | Essentially the same as TH_repUnboxedTuples, but for unboxed sums | # LANGUAGE TemplateHaskell #
# LANGUAGE UnboxedSums #
module Main where
import Language.Haskell.TH
main :: IO ()
main = case bar () of
(# a | #) -> print a
(# | b #) -> print b
bar :: () -> (# String | Int #)
bar () = $( do e <- [| case (# 'b' | #) of
(# 'a' | #) -> (# "On... |
dee42ea28c789414a609ea85b6d259d8ab07c3cdda7066c2ced87af26908fe6f | theam/aws-lambda-haskell-runtime | Configuration.hs | module Aws.Lambda.Runtime.Configuration
( DispatcherOptions (..),
defaultDispatcherOptions,
)
where
import Aws.Lambda.Runtime.APIGateway.Types (ApiGatewayDispatcherOptions (..))
-- | Options that the dispatcher generator expects
newtype DispatcherOptions = DispatcherOptions
{ apiGatewayDispatcherOptions :: ... | null | https://raw.githubusercontent.com/theam/aws-lambda-haskell-runtime/0031c3eea919d0b1505dde5aa24fd31436a49503/src/Aws/Lambda/Runtime/Configuration.hs | haskell | | Options that the dispatcher generator expects | module Aws.Lambda.Runtime.Configuration
( DispatcherOptions (..),
defaultDispatcherOptions,
)
where
import Aws.Lambda.Runtime.APIGateway.Types (ApiGatewayDispatcherOptions (..))
newtype DispatcherOptions = DispatcherOptions
{ apiGatewayDispatcherOptions :: ApiGatewayDispatcherOptions
}
defaultDispatcherO... |
98a446066e3063e67724d25d1c76dfe246b78043109286df9b2fd1e3916de928 | startalkIM/ejabberd | pokemon_pb.erl | Copyright ( c ) 2009
< >
< >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, mer... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/protobuffs/src/pokemon_pb.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condit... | Copyright ( c ) 2009
< >
< >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(pokemon_pb... |
0a2deeee570aec330c5daf730a71fcb945da525c24532af1accc5c1dba2c7bdb | simmone/racket-simple-xlsx | fill-style.rkt | #lang racket
(require "lib.rkt")
(provide (contract-out
[struct FILL-STYLE
(
(hash_code string?)
(color rgb?)
(pattern fill-pattern?)
)]
[fill-pattern? (-> string? boolean?)]
[fill-style-from-ha... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/style/fill-style.rkt | racket | #lang racket
(require "lib.rkt")
(provide (contract-out
[struct FILL-STYLE
(
(hash_code string?)
(color rgb?)
(pattern fill-pattern?)
)]
[fill-pattern? (-> string? boolean?)]
[fill-style-from-ha... | |
28ffb1d8e15798a01f5d43fb8a6cf6266a97aad94360108cfe6e59d0ba26083c | iburzynski/EMURGO_73 | Applicatives3.hs | # LANGUAGE InstanceSigs #
import Control.Applicative hiding (ZipList)
-- *** Exercise: Implement the Applicative Instance for List ***
-- Now we will create our own version of the built-in List type from scratch and make it an Applicative:
data List a = Empty | Cons a (List a)
instance Show a => Show (List a) where
... | null | https://raw.githubusercontent.com/iburzynski/EMURGO_73/8042aab6ab29e7b9bbbb53750a8b339c15b43af0/Applicatives/Applicatives3.hs | haskell | *** Exercise: Implement the Applicative Instance for List ***
Now we will create our own version of the built-in List type from scratch and make it an Applicative:
Built-in List equivalents:
Empty == []
We will need some version of `++` (append) for our List type in our Applicative instance.
Recall that we implem... | # LANGUAGE InstanceSigs #
import Control.Applicative hiding (ZipList)
data List a = Empty | Cons a (List a)
instance Show a => Show (List a) where
show :: Show a => List a -> String
show xs = showList True xs
where
showList :: Show a => Bool -> List a -> String
showList True Empty = "[]... |
149cf5cf4090a9229edbbff04b54b02ef624be0427363f324d7c3aaaf5a1debd | pNre/Hera | types.ml | module Subscription = struct
type t =
{ id : int [@default 0]
; subscriber_id : string
; type_id : string [@default ""]
; feed_url : string
}
[@@deriving make]
let key subscription = subscription.subscriber_id ^ "," ^ subscription.feed_url
end
module Preference = struct
type t =
{ owne... | null | https://raw.githubusercontent.com/pNre/Hera/4b37551b6fe535d63baf20f9b01d29e6d4e8d53e/hera/db/types.ml | ocaml | module Subscription = struct
type t =
{ id : int [@default 0]
; subscriber_id : string
; type_id : string [@default ""]
; feed_url : string
}
[@@deriving make]
let key subscription = subscription.subscriber_id ^ "," ^ subscription.feed_url
end
module Preference = struct
type t =
{ owne... | |
a6f55f6906a8d470fbbe5856491fb91e10f6ab8bf22863d20d239a298c864244 | it-is-wednesday/pitzulit | main.mli | type error = [ `Eyed3Error of int | `FfmpegError of int | `YoutubeDlError of int ]
* Prepare filesystem for extracting tracks from a new album :
- Download the album as audio via youtube - dl ( saved as " album.mp3 " in current dir )
- Figure out the [ Album.t ]
- Create target directory
- Fetc... | null | https://raw.githubusercontent.com/it-is-wednesday/pitzulit/53b19505dda882e272c5671b26e4228146df97e1/lib/main.mli | ocaml | Assumes an "album.mp3" file exists in current dir (created by [Pitzulit.Main.setup]).
extracts the given track into its own file via ffmpeg, then tags it via eyeD3. | type error = [ `Eyed3Error of int | `FfmpegError of int | `YoutubeDlError of int ]
* Prepare filesystem for extracting tracks from a new album :
- Download the album as audio via youtube - dl ( saved as " album.mp3 " in current dir )
- Figure out the [ Album.t ]
- Create target directory
- Fetc... |
e58b5a936b2e9142335e3aac914b6b9990c8fc93ada67ce99b6e1a470a399a79 | ktakashi/sagittarius-scheme | bytevector.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; bytevector.scm - bytevector utility
;;;
Copyright ( c ) 2010 - 2013 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Re... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/1557403f8a585eae527f35ba10cc64a6cdc35ac8/sitelib/util/bytevector.scm | scheme | coding : utf-8 -*-
bytevector.scm - bytevector utility
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of con... | Copyright ( c ) 2010 - 2013 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (util bytevector)
(export bytev... |
27b307394f98f087f4e047448e06a9cb637e23c6896a30221927f86bbd6fc82f | zouppen/hackbus | Exceptions.hs | |Exceptions used in Hackbus .
module Control.Hackbus.Exceptions where
import Control.Exception (Exception)
-- |We throw errors using this simple exception type
newtype HackbusFatalException = HackbusFatalException String deriving (Show)
instance Exception HackbusFatalException
-- |We throw less fatal using this s... | null | https://raw.githubusercontent.com/zouppen/hackbus/cccd9373d77c3b99dcf6e6d0d10c76037e2534fe/src/Control/Hackbus/Exceptions.hs | haskell | |We throw errors using this simple exception type
|We throw less fatal using this simple exception type | |Exceptions used in Hackbus .
module Control.Hackbus.Exceptions where
import Control.Exception (Exception)
newtype HackbusFatalException = HackbusFatalException String deriving (Show)
instance Exception HackbusFatalException
newtype HackbusNonfatalException = HackbusNonfatalException String deriving (Show)
insta... |
3f2491c7444240e1d4138cd6e04b165d477cb279c8752b274564e118cd91ada2 | master/ejabberd | pubsub_index.erl | %%% ====================================================================
` ` 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 ... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/mod_pubsub/pubsub_index.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 via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
th... | ` ` 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 "
The Initial Developer of the Original Code is ProcessOne .
Portions created by ProcessOne are C... |
322302cbead3e44a1e227f9a976f76d30549dc6af7398d1c0d7de7c756731a75 | dbuenzli/uucp | uucp_name.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 The uucp programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/uucp/09d2186c0828465dbe37ed976c8d8ab7a5e7eeed/src/uucp_name.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 The uucp programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | |
701a05bf4147394ece0ccaf6bf33101ab85961918cea4d5fc24b66cc9e4043c1 | vivid-inc/ash-ra-template | art.clj | ; Copyright 2019 Vivid Inc.
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
distributed under the L... | null | https://raw.githubusercontent.com/vivid-inc/ash-ra-template/f64be7efd6f52ccd451cddb851f02511d1665b11/art/src/vivid/art.clj | clojure | Copyright 2019 Vivid Inc.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | distributed under the License is distributed on an " AS IS " BASIS ,
(ns vivid.art
"Ash Ra Template public API."
(:require
[clojure.spec.alpha :as s]
[farolero.core :as farolero]
[vivid.art.delimiters :refer [erb]]
[vivid.art.enscript :refer [enscript]]
[vivid.art.evaluate :refer [evaluate]]
... |
51f2108912c6b18c64648c51f643a8280dbe64f21228d411bfbecf1e45d089d6 | koji-kojiro/lem-pygments-colorthemes | tango.lisp | (in-package :lem-user)
(define-color-theme "tango" ()
(foreground "#000000")
(background "#ffffff")
(cursor :foreground "#ffffff" :background "#000000")
(syntax-warning-attribute :foreground "#af0000" :background "#ffffff")
(syntax-string-attribute :foreground "#5f8700" :background "#ffffff")
(syntax-comme... | null | https://raw.githubusercontent.com/koji-kojiro/lem-pygments-colorthemes/f7de93ca7a68be7fb99ec48cc571e132292a6712/themes/tango.lisp | lisp | (in-package :lem-user)
(define-color-theme "tango" ()
(foreground "#000000")
(background "#ffffff")
(cursor :foreground "#ffffff" :background "#000000")
(syntax-warning-attribute :foreground "#af0000" :background "#ffffff")
(syntax-string-attribute :foreground "#5f8700" :background "#ffffff")
(syntax-comme... | |
3e5abe8c84a3cc320183e8bfbfd9e435a791680d313f4ec9ad37bb5075c35995 | ghc/ghc | Panic.hs | # LANGUAGE GHCForeignImportPrim #
{-# LANGUAGE UnliftedFFITypes #-}
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE EmptyCase #
# LANGUAGE RankNTypes , KindSignatures #
-- | Primitive panics.
--
Users should not import this module . It is GHC internal only .
module GHC.P... | null | https://raw.githubusercontent.com/ghc/ghc/14b2e3d3dda104c62c5abafd3353dd0315de71ad/libraries/ghc-prim/GHC/Prim/Panic.hs | haskell | # LANGUAGE UnliftedFFITypes #
| Primitive panics.
`stg_panic#` never returns but it can't just return `State# RealWorld` so we
indicate that it returns `(# #)` too to make the compiler happy.
See Note [Compiler error functions]
See Note [Compiler error functions]
| Display the CString whose address is given as a... | # LANGUAGE GHCForeignImportPrim #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE EmptyCase #
# LANGUAGE RankNTypes , KindSignatures #
Users should not import this module . It is GHC internal only .
module GHC.Prim.Panic
( absentSumFieldError
, panicError
, abse... |
6f0eb3b3b2c35f1706268e48b1447852faa2cabd47656eb3609a706322894c63 | rescript-association/genType | oprint.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/oprint.mli | ocaml | ************************************************************************
OCaml
... | Projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Outcometree
val out_ident : (formatter -> string -> unit) ref
val map_primiti... |
c78b81e9607120bc617f26248e2761cb678fe771b3e3697a1772c6d244025873 | patzy/glaw | graphics.lisp | (in-package :glaw)
(declaim (optimize (safety 0) (debug 0) (speed 3)))
;;; General rendering
(defvar *display-width* 800)
(defvar *display-height* 600)
(defun begin-draw ()
(gl:clear :color-buffer :depth-buffer))
(defun end-draw ()
(gl:flush))
(defun set-background-color (color)
(gl:clear-color (color-r colo... | null | https://raw.githubusercontent.com/patzy/glaw/e678fc0c107ce4b1e3ff9921a6de7e32fd39bc37/src/graphics.lisp | lisp | General rendering
some default head light
set viewport to full screen
Colors helpers
Image
2D Texture
min-lod max-lod
base-level max-level
:data data
(gl:tex-parameter :texture-2d :texture-min-lod (texture-min-lod tex))
(gl:tex-parameter :texture-2d :texture-max-lod (texture-max-lod tex))
(gl:tex-parameter :... | (in-package :glaw)
(declaim (optimize (safety 0) (debug 0) (speed 3)))
(defvar *display-width* 800)
(defvar *display-height* 600)
(defun begin-draw ()
(gl:clear :color-buffer :depth-buffer))
(defun end-draw ()
(gl:flush))
(defun set-background-color (color)
(gl:clear-color (color-r color)
(... |
9c2fff3b98e6d2896a2513324058566544b3c13d8a6f180da4616d89d20c72bd | myshov/programming_in_haskell | subtract_parser.hs | import Parsing
expr :: Parser Int
expr = do n <- natural
ns <- many (do symbol "-"
natural)
return (foldl (-) n ns)
eval :: String -> Int
eval xs = case parse expr xs of
[(n, [])] -> n
[(_, out)] -> error("unused input " ++ out)
... | null | https://raw.githubusercontent.com/myshov/programming_in_haskell/3118695cc09a5ea0954917c318bf007b6ae5fcef/lesson8/subtract_parser.hs | haskell | import Parsing
expr :: Parser Int
expr = do n <- natural
ns <- many (do symbol "-"
natural)
return (foldl (-) n ns)
eval :: String -> Int
eval xs = case parse expr xs of
[(n, [])] -> n
[(_, out)] -> error("unused input " ++ out)
... | |
ff4a464e6778d992fa7ea06cdf0dc1e78fe726c7e1494639a37cffc389bdfaa4 | craigl64/clim-ccl | compile.lisp | ;; See the file LICENSE for the full license governing this code.
;;
(in-package :user)
;;; This is obsolete, don't let it be loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(error "This file is obsolete, you should be using misc/compile-1"))
(proclaim '(optimize (speed 3) (safety 1) (debug 1)))
#+(... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/sys/compile.lisp | lisp | See the file LICENSE for the full license governing this code.
This is obsolete, don't let it be loaded
until then... (aclpc gets this feature in defsystem)
postscript backend
with-compilation-unit
|
(in-package :user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(error "This file is obsolete, you should be using misc/compile-1"))
(proclaim '(optimize (speed 3) (safety 1) (debug 1)))
#+(and allegro microsoft)
(eval-when (compile load eval)
(pushnew :acl86win32 *features*))
#+microsoft
(let ((exc... |
0d3a67f6ec36331738ad4a00063e704821939b01ad4f4b5c5665406c892781fb | hedgehogqa/haskell-hedgehog-classes | Ix.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
module Hedgehog.Classes.Ix (ixLaws) where
import Hedgehog
import Hedgehog.Classes.Common
import Data.Ix (Ix(..))
ixLaws :: forall a. (Ix a, Eq a, Show a) => Gen a -> Laws
ixLaws gen = Laws "Ix"
[ ("InRange", ixInRange gen)
, ("RangeIndex", ixRangeInde... | null | https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog-classes/4d97b000e915de8ba590818f551bce7bd862e7d4/src/Hedgehog/Classes/Ix.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE ScopedTypeVariables #
module Hedgehog.Classes.Ix (ixLaws) where
import Hedgehog
import Hedgehog.Classes.Common
import Data.Ix (Ix(..))
ixLaws :: forall a. (Ix a, Eq a, Show a) => Gen a -> Laws
ixLaws gen = Laws "Ix"
[ ("InRange", ixInRange gen)
, ("RangeIndex", ixRangeIndex gen)
, ("MapIndexRange",... |
270689b9ddc1101e91100fbd705643f588d802a41577275408d28619dc85d26b | okuoku/nausicaa | nfa2dfa.scm | SILex - Scheme Implementation of Lex
Copyright ( C ) 2001
;
; 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 2
of the License , or ( at your option ) any later version... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/foreign/silex-1.0/nfa2dfa.scm | scheme |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more detail... | SILex - Scheme Implementation of Lex
Copyright ( C ) 2001
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , M... |
9b283c64b71eae35159b0c7182a840f04e29284e0f198a0948ae80edb1ff2c0a | freckle/yesod-auth-oauth2 | Upcase.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
--
-- OAuth2 plugin for
--
-- * Authenticates against upcase
-- * Uses upcase user id as credentials identifier
--
module Yesod.Auth.OAuth2.Upcase
( oauth2Upcase
) where
import Yesod.Auth.OAuth2.Prelude
import qualified Data.Text as T
newtype User = User Int
instance Fro... | null | https://raw.githubusercontent.com/freckle/yesod-auth-oauth2/8976e193e94ab4f0c38bea446a77d30b694780f4/src/Yesod/Auth/OAuth2/Upcase.hs | haskell | # LANGUAGE OverloadedStrings #
|
OAuth2 plugin for
* Authenticates against upcase
* Uses upcase user id as credentials identifier
| module Yesod.Auth.OAuth2.Upcase
( oauth2Upcase
) where
import Yesod.Auth.OAuth2.Prelude
import qualified Data.Text as T
newtype User = User Int
instance FromJSON User where
parseJSON = withObject "User" $ \root -> do
o <- root .: "user"
User <$> o .: "id"
pluginName :: Text
pluginName = "upcase"
oau... |
4175926fa8b9e20ccb011ee2796bffaa1b086175c2f8e95044fbeef21f7a59a0 | nuvla/api-server | configuration_session_github.clj | (ns sixsq.nuvla.server.resources.configuration-session-github
(:require
[sixsq.nuvla.server.resources.common.std-crud :as std-crud]
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.configuration :as p]
[sixsq.nuvla.server.resources.spec.configuration-template-session-git... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/configuration_session_github.clj | clojure |
multimethods for validation
initialization
| (ns sixsq.nuvla.server.resources.configuration-session-github
(:require
[sixsq.nuvla.server.resources.common.std-crud :as std-crud]
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.configuration :as p]
[sixsq.nuvla.server.resources.spec.configuration-template-session-git... |
27ef1fb2b90893b351d92b571d726a613e6afe6f5ce4512ce13a7a418e037b14 | joeyadams/haskell-iocp | PSQ.hs | # LANGUAGE Trustworthy #
# LANGUAGE BangPatterns , NoImplicitPrelude #
Copyright ( c ) 2008 ,
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- * Redistributions of source code... | null | https://raw.githubusercontent.com/joeyadams/haskell-iocp/67b65759b3d1473770533f782ca7a42131ae2ca7/IOCP/PSQ.hs | haskell | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
... | # LANGUAGE Trustworthy #
# LANGUAGE BangPatterns , NoImplicitPrelude #
Copyright ( c ) 2008 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT OWNER OR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , P... |
4a5c99818a6de7cacf3ddb860748c3a1fad1f83a00ea804d2f482a23e4c7e2ca | semilin/layoup | analysis.lisp | (in-package :layoup)
(defstruct metric
(name "" :type string)
(fn nil :type function)
ngram)
(defstruct metric-result
(positions nil :type list)
(result 0.0 :type single-float))
(defstruct metric-result-list
table)
(defstruct metric-list
bigraphs
trigraphs)
(defun* (new-metric -> metric)
((name... | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/src/analysis.lisp | lisp | create basic positions list
create combinations
calculate metrics | (in-package :layoup)
(defstruct metric
(name "" :type string)
(fn nil :type function)
ngram)
(defstruct metric-result
(positions nil :type list)
(result 0.0 :type single-float))
(defstruct metric-result-list
table)
(defstruct metric-list
bigraphs
trigraphs)
(defun* (new-metric -> metric)
((name... |
2fb6348b75ae74feddf4e06ebe92ff7f3b7ecde19c0612038e3a68e47c73d047 | lojic/LearningRacket | ex12a.rkt | #lang racket
(require "../lojic.rkt")
(define principal (string->number (gets "Enter the principal: ")))
(define int-rate (/ (string->number (gets "Enter the rate of interest: ")) 100.0))
(define num-years (string->number (gets "Enter the number of years: ")))
(define amount (* principal
(+ 1
... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercises-for-programmers/12-computing-simple-interest/ex12a.rkt | racket | #lang racket
(require "../lojic.rkt")
(define principal (string->number (gets "Enter the principal: ")))
(define int-rate (/ (string->number (gets "Enter the rate of interest: ")) 100.0))
(define num-years (string->number (gets "Enter the number of years: ")))
(define amount (* principal
(+ 1
... | |
aa25d06b848eaad20542ea74406b9356c37e0e1e3b0694edb308b62220c5cc5b | static-analysis-engineering/codehawk | jCHVarInfoCollectors.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchsys/jCHVarInfoCollectors.mli | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
d152e8aa9125f7caa6d75d1235dc75e550e9332046df51bfc56cc49a1213f271 | waddlaw/TAPL | UntypedLambda.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module UntypedLambda where
import Data.Either
import Language.Core.Pretty
import Language.Core.Types
import Language.UntypedLambda
import qualified Language.UntypedLambda.Examples as UL
import Language.UntypedLambda.Lib.Base
import Language.UntypedLambd... | null | https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/lambda-untyped/test/UntypedLambda.hs | haskell | # LANGUAGE OverloadedStrings #
Bool
pair
church
list
Ex6.1.1
Ex6.2.5 | # LANGUAGE TypeApplications #
module UntypedLambda where
import Data.Either
import Language.Core.Pretty
import Language.Core.Types
import Language.UntypedLambda
import qualified Language.UntypedLambda.Examples as UL
import Language.UntypedLambda.Lib.Base
import Language.UntypedLambda.Lib.Bool
import Language.UntypedL... |
32ef5718e170b51c8ff655c969f2a4ce94da1c726e9ad32027dda6756b97239d | lillo/compiler-course-unipi | fun_analysis.ml |
Compiles with
$ ocamlbuild -use - ocamlfind -package ppx_deriving.std -use - menhir fun_analysis.byte
Compiles with
$ ocamlbuild -use-ocamlfind -package ppx_deriving.std -use-menhir fun_analysis.byte
*)
let () =
let channel =
if Array.length Sys.argv > 1 then
Sys.argv.(1) |> open_in
else
std... | null | https://raw.githubusercontent.com/lillo/compiler-course-unipi/1a5e909da6a2cc79e6f80645cd24fb5ff285be54/semantic-analysis-material/code/fun-cfa/fun_analysis.ml | ocaml |
Compiles with
$ ocamlbuild -use - ocamlfind -package ppx_deriving.std -use - menhir fun_analysis.byte
Compiles with
$ ocamlbuild -use-ocamlfind -package ppx_deriving.std -use-menhir fun_analysis.byte
*)
let () =
let channel =
if Array.length Sys.argv > 1 then
Sys.argv.(1) |> open_in
else
std... | |
93b7e24c161ab4d2c40b562ed3ece9751202a5b05d54c4b55126ac449db6c049 | lambdaisland/embedkit | find_db.clj | (ns find-db
(:require [lambdaisland.embedkit :as e]))
(def conn
(e/connect (read-string (slurp "dev/config.edn"))))
(e/find-database conn "example_tenant")
(:id (e/find-database conn "example_tenant"))
(e/mb-get conn [:database])
| null | https://raw.githubusercontent.com/lambdaisland/embedkit/f6273b8c7fb288482bd1125ad1615267bd1f6cbd/repl_sessions/find_db.clj | clojure | (ns find-db
(:require [lambdaisland.embedkit :as e]))
(def conn
(e/connect (read-string (slurp "dev/config.edn"))))
(e/find-database conn "example_tenant")
(:id (e/find-database conn "example_tenant"))
(e/mb-get conn [:database])
| |
2e1e8d0fab652ca063f0bb8417b94ec42fdd17c3fef73b163faccd155f12ab86 | gfngfn/otfed | encodeOperationCore.ml |
open Basic
open EncodeBasic
module Open = struct
type 'a encoder = Buffer.t -> ('a, Error.t) result
end
open Open
let run : 'a. ?initial_capacity:int -> 'a encoder -> (string * 'a, Error.t) result =
fun ?initial_capacity:(initial_capacity = 65535) enc ->
let open ResultMonad in
let buf = Buffer.create init... | null | https://raw.githubusercontent.com/gfngfn/otfed/aa2624d29f2fea934c65308816fb6788f3bd818a/src/encodeOperationCore.ml | ocaml | temporary |
open Basic
open EncodeBasic
module Open = struct
type 'a encoder = Buffer.t -> ('a, Error.t) result
end
open Open
let run : 'a. ?initial_capacity:int -> 'a encoder -> (string * 'a, Error.t) result =
fun ?initial_capacity:(initial_capacity = 65535) enc ->
let open ResultMonad in
let buf = Buffer.create init... |
ceadc1bcf4c1404cbc7d84052e7f780d41ca88433e1fbdd913ad794f304e9346 | sgbj/MaximaSharp | displm.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/displm.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
evaluate for ... |
(in-package :maxima)
(macsyma-module displm macro)
(declare-top
(special
width height depth maxht maxdp level size lop rop break right
bkpt bkptwd bkptht bkptdp bkptlevel bkptout lines
oldrow oldcol display-file in-p
mratp $aliases))
macros for the package .
( PUSH - STRING " foo " RESULT ) -- > ( ... |
28f216c6c722263b1208c812c27adc5ecc081f835333e009cd311b5aa2637825 | uw-unsat/leanette-popl22-artifact | model-completion.rkt | #lang racket
(require
racket/hash
(only-in rosette term-cache constant? model sat)
(only-in rosette/base/core/type solvable-default get-type))
(provide complete)
; Returns a completion of the given solution that
; binds the provided constants to default concrete values.
; If no constants are provided, it uses ... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/neutrons/therapyControl-symbolic/model-completion.rkt | racket | Returns a completion of the given solution that
binds the provided constants to default concrete values.
If no constants are provided, it uses the set of all constants
that are present in the current term-cache. | #lang racket
(require
racket/hash
(only-in rosette term-cache constant? model sat)
(only-in rosette/base/core/type solvable-default get-type))
(provide complete)
(define complete
(case-lambda
[(sol)
(complete sol (filter constant? (hash-values (term-cache))))]
[(sol consts)
(match sol
... |
12ed6f01b3c914c5597042008a5912d57f06dab4e888f73d4e132bf23a2cd058 | RokLenarcic/datalevin-pathom | fulcro_middleware_test.clj | (ns org.clojars.roklenarcic.datalevin-pathom.fulcro-middleware-test
(:require [clojure.test :refer :all]
[com.fulcrologic.rad.attributes :as attr]
[com.fulcrologic.rad.form :as form]
[org.clojars.roklenarcic.datalevin-pathom.fulcro-middleware :as fm]
[org.clojars.roklen... | null | https://raw.githubusercontent.com/RokLenarcic/datalevin-pathom/2a4d02042790e2cf2bdd8b2954a52997b133bdc6/test/org/clojars/roklenarcic/datalevin_pathom/fulcro_middleware_test.clj | clojure | (ns org.clojars.roklenarcic.datalevin-pathom.fulcro-middleware-test
(:require [clojure.test :refer :all]
[com.fulcrologic.rad.attributes :as attr]
[com.fulcrologic.rad.form :as form]
[org.clojars.roklenarcic.datalevin-pathom.fulcro-middleware :as fm]
[org.clojars.roklen... | |
480f348640342761f7127e49402faee6ddbc8e93d4401bbebf3f11ad09a9ef0d | leandrosilva/cameron | syslog_transform.erl | Copyright ( c ) 2010 < >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, merge, publis... | null | https://raw.githubusercontent.com/leandrosilva/cameron/34051395b620d2c3cb2cb63c854e65234786a176/deps/erlang_syslog/src/syslog_transform.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | Copyright ( c ) 2010 < >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(syslog_transform).
-e... |
4868334970bc6c9798aa2e77be1eaee5f329d06da8f83a919ac6c99969933991 | mfp/obigstore | test_bson.ml |
* Copyright ( C ) 2011 - 2012 < >
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version , ... | null | https://raw.githubusercontent.com/mfp/obigstore/1b078eeb21e11c8de986717150c7108a94778095/test/test_bson.ml | ocaml |
* Copyright ( C ) 2011 - 2012 < >
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version , ... | |
1a03be3cce1ba2739bfc30b87d63f8342fec8a6b3783221c6f186e3acf8617ca | Elzair/nazghul | jewelry.scm | (kern-mk-sprite-set 'ss_jewelry 32 32 2 2 0 0 "jewelry.png")
(kern-mk-sprite 's_skull_ring ss_jewelry 1 0 #f 0)
(mk-quest-obj-type 't_skull_ring "skull ring" s_skull_ring layer-item obj-ifc)
(define (skullring-basic-receive kchar questtag)
(quest-data-update-with 'questentry-ghertie questtag 1 (quest-notify (grant... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/jewelry.scm | scheme | (kern-mk-sprite-set 'ss_jewelry 32 32 2 2 0 0 "jewelry.png")
(kern-mk-sprite 's_skull_ring ss_jewelry 1 0 #f 0)
(mk-quest-obj-type 't_skull_ring "skull ring" s_skull_ring layer-item obj-ifc)
(define (skullring-basic-receive kchar questtag)
(quest-data-update-with 'questentry-ghertie questtag 1 (quest-notify (grant... | |
fcaa1791e54e6e1d28f48773c1a9ea372800d4320cc111b078c1ae9b1abfa119 | haskell-opengl/OpenGLRaw | BaseInstance.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.BaseInstance
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
------------------------------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/BaseInstance.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.BaseInstance
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Functions | Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.BaseInstance (
glGetARBBaseInstance,
gl_ARB_base_instance,
glDrawArraysInstancedBaseInstance,
glDrawElementsInstancedBaseInstance,
glDrawElementsInstancedBaseVertexBaseInstance
) where
import Graphics.GL.ExtensionPredicates
imp... |
5558eb5cae260f465afea0f76d10a07e6f391ff8fcb8274291b90ac1585ed620 | smashingboxes/fraqture | weather_drawing.clj | (ns fraqture.weather-drawing
(:require [fraqture.drawing]
[fraqture.helpers :refer [interpolate]]
[fraqture.weather :refer [weather]]
[quil.core :as q])
(:import [fraqture.drawing Drawing]))
(defn k-to-h [kelvin]
(- (* kelvin (/ 9 5)) 459.67))
(defn temp-to-color [temperatur... | null | https://raw.githubusercontent.com/smashingboxes/fraqture/8971564a075b8f38729f382906cc8f39a18d87eb/src/fraqture/weather_drawing.clj | clojure | (ns fraqture.weather-drawing
(:require [fraqture.drawing]
[fraqture.helpers :refer [interpolate]]
[fraqture.weather :refer [weather]]
[quil.core :as q])
(:import [fraqture.drawing Drawing]))
(defn k-to-h [kelvin]
(- (* kelvin (/ 9 5)) 459.67))
(defn temp-to-color [temperatur... | |
81f3954031fc1e7df4aa11fc902e5424563f6cbd717fd15d7425cbcd15c2fa48 | dongcarl/guix | flashing-tools.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2016 < >
Copyright © 2016 , 2018 < >
Copyright © 2016 , 2019 < >
Copyright © 2017 < >
Copyright © 2017 < >
Copyright © 2018 , 2019 , 2020 < >
Copyright © 2021 < >... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/flashing-tools.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2016 < >
Copyright © 2016 , 2018 < >
Copyright © 2016 , 2019 < >
Copyright © 2017 < >
Copyright © 2017 < >
Copyright © 2018 , 2019 , 2020 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as... |
7f6064a611ab83e6cc495d6d6adb0bdff18d0b2aed9bd75545246b37d9491b50 | reanimate/reanimate | Rotational.hs | |
Copyright : Written by
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : Written by David Himmelstrup
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Reanimate.Morph.Rotational
( Origin
, rotation... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/Morph/Rotational.hs | haskell | | Rotational origin relative to polygon center.
| Interpolation by rotating around an origin point.
Example:
@
'Reanimate.playThenReverseA' $ 'Reanimate.pauseAround' 0.5 0.5 $ 'Reanimate.mkAnimation' 3 $ \\t ->
@
<<docs/gifs/doc_rotationalTrajectory.gif>>
| Compute the absolute position of rotational ori... | |
Copyright : Written by
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : Written by David Himmelstrup
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Reanimate.Morph.Rotational
( Origin
, rotation... |
996cd3b0e63cc72347db89aa495e80b996d6d6cabfc2e7a7159da17786c67d30 | zkincaid/duet | searchTree.mli | module type Element = sig
type t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
val pp : Format.formatter -> t -> unit
end
module type S = sig
type t
type baseSet
type elt
val empty : baseSet -> (elt -> baseSet) -> t
val make : baseSet -> (elt -> baseSet) -> elt BatSet... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/pa/searchTree.mli | ocaml | module type Element = sig
type t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
val pp : Format.formatter -> t -> unit
end
module type S = sig
type t
type baseSet
type elt
val empty : baseSet -> (elt -> baseSet) -> t
val make : baseSet -> (elt -> baseSet) -> elt BatSet... | |
3ec0927491a70fa7df22bfcb42247f0d0792a7c46ce4cd4553ae492c0b05b06d | typelead/eta | TrampolineBreak.hs | import Data.List
import Data.Function
main :: IO ()
main = do
let input = replicate 1000000 'c' ++ "defghi"
print $ trampoline $ snd $ break (== 'd') input
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/trampoline/run/TrampolineBreak.hs | haskell | import Data.List
import Data.Function
main :: IO ()
main = do
let input = replicate 1000000 'c' ++ "defghi"
print $ trampoline $ snd $ break (== 'd') input
| |
53061499a9da4b584acd24e2733cda3ba02c94393c06d39cb366e2461ace5156 | flipstone/haskell-for-beginners | 3_walk_the_line.hs | -- A Bomb is defined by the order in
-- which its wires must be cut to disable
-- it. If a wire is cut out of order, the
-- bomb explodes.
--
type Bomb = [Wire]
data Wire = Red | Blue | Green deriving (Show, Eq)
-- Define a function that cuts a Wire of a
-- Bomb, returning Just the Wires remaining
-- to be cut. If the... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_12/3_walk_the_line.hs | haskell | A Bomb is defined by the order in
which its wires must be cut to disable
it. If a wire is cut out of order, the
bomb explodes.
Define a function that cuts a Wire of a
Bomb, returning Just the Wires remaining
to be cut. If the incorrect Wire is cut,
the Bomb expodes, leaving Nothing to return.
If any attempt i... | type Bomb = [Wire]
data Wire = Red | Blue | Green deriving (Show, Eq)
cutWire = undefined
wait = undefined
Monad functions )
bomb = [Red, Green, Blue]
disarmed = undefined
wire second .
boomed = undefined
takeOutBombMaker = undefined
takeEmOut = undefined
Pick one of the 3 disarming examples above and re -... |
74c36c415058e016fc7c55606090fe1a6fa6a45cac56084dccb4802f01d0e74f | mmontone/cl-forms | peppol.lisp | (defpackage :cl-forms.peppol
(:nicknames :forms.peppol)
(:use :cl :forms)
(:export
:amount-form-field
:country-form-field
:currency-form-field))
(in-package :forms.peppol)
(defun round-amount (amount &optional (divisor 1))
"Amount is in ører"
(multiple-value-bind (quotient remainder) (truncate (/ a... | null | https://raw.githubusercontent.com/mmontone/cl-forms/af252b8646b7545ac778c9aa881903efcc311f2d/src/peppol.lisp | lisp | )
** Amount form field
(defmethod forms::validate-form-field ((field amount-form-field))
(let ((valid-p (validate-amount (forms::field-value field) :error-p nil)))
(multiple-value-bind (valid-constraints-p errors)
(call-next-method)
(values (and valid-p valid-constraints-p)
(if ... | (defpackage :cl-forms.peppol
(:nicknames :forms.peppol)
(:use :cl :forms)
(:export
:amount-form-field
:country-form-field
:currency-form-field))
(in-package :forms.peppol)
(defun round-amount (amount &optional (divisor 1))
"Amount is in ører"
(multiple-value-bind (quotient remainder) (truncate (/ a... |
d01f8ab276cb424a7d2412361c588d37eac5df029cc90bdb6c4a30503f90cbbf | nasa/Common-Metadata-Repository | ring_validations.clj | (ns cmr.spatial.ring-validations
(:require [cmr.spatial.point :as p]
[cmr.spatial.math :refer :all]
[cmr.common.util :as util]
[primitive-math]
[cmr.spatial.mbr :as mbr]
[cmr.spatial.conversion :as c]
[cmr.spatial.arc :as a]
[cmr.spat... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/f6c7d4252e5b47916d0078744f13f8df59c67805/spatial-lib/src/cmr/spatial/ring_validations.clj | clojure | here so that subsequent validations won't run if earlier validations fail.
basic ring validation
here so that subsequent validations won't run if earlier validations fail.
basic ring validation | (ns cmr.spatial.ring-validations
(:require [cmr.spatial.point :as p]
[cmr.spatial.math :refer :all]
[cmr.common.util :as util]
[primitive-math]
[cmr.spatial.mbr :as mbr]
[cmr.spatial.conversion :as c]
[cmr.spatial.arc :as a]
[cmr.spat... |
e6b9923150be94f7fe39ef8e7ee7b6f1d5f3efb5af92caa5767d292633abf6a0 | tlaplus/tlapm | progress.mli | Copyright 2005 INRIA
type progress = No | Bar | Msg;;
val level : progress ref;;
val do_progress : (unit -> unit) -> char -> unit;;
val end_progress : string -> unit;;
| null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/progress.mli | ocaml | Copyright 2005 INRIA
type progress = No | Bar | Msg;;
val level : progress ref;;
val do_progress : (unit -> unit) -> char -> unit;;
val end_progress : string -> unit;;
| |
92eac106547963fbe7541c9fb5e093e3d622a5e1c94ab9f5fbe73d8603fc879c | wdebeaum/step | localise.lisp | ;;;;
;;;; w::localise
;;;;
; note: similar file for "localize"
(define-words :pos W::v
:words (
(w::localise
(wordfeats (W::morph (:forms (-vb) :nom w::localisation )))
(senses
(
(LF-PARENT ONT::sit) ;be-at-loc)
(TEMPL NEUTRAL-LOCATION-XP-TEMPL (xp (% W::pp (W::ptype (? xxx W::to w::on w::in... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/localise.lisp | lisp |
w::localise
note: similar file for "localize"
be-at-loc)
be-at-loc)
be-at-loc) |
(define-words :pos W::v
:words (
(w::localise
(wordfeats (W::morph (:forms (-vb) :nom w::localisation )))
(senses
(
(TEMPL NEUTRAL-LOCATION-XP-TEMPL (xp (% W::pp (W::ptype (? xxx W::to w::on w::in w::into w::at)))))
(example "the protein localises in/to the nucleus")
)
(
(TEM... |
f236d6cf584a6acc0e5bb0940aa6cde82f78e698f4c056667158b91f73875cd4 | bitblaze-fuzzball/fuzzball | symbolic_domain.mli |
Copyright ( C ) BitBlaze , 2009 - 2010 . All rights reserved .
Copyright (C) BitBlaze, 2009-2010. All rights reserved.
*)
module SymbolicDomain : Exec_domain.DOMAIN
| null | https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/symbolic_domain.mli | ocaml |
Copyright ( C ) BitBlaze , 2009 - 2010 . All rights reserved .
Copyright (C) BitBlaze, 2009-2010. All rights reserved.
*)
module SymbolicDomain : Exec_domain.DOMAIN
| |
f62c943556bd370242f963d43d544aaef2bbc37270ef27c4a59f01eefd37773d | jwiegley/notes | Combining.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ImplicitParams #
# LANGUAGE ScopedTypeVariables #
module Combining where
import Control.Applicative
import Control.Arrow
import Control.Lens
import Control.Lens.Internal
import Control.Lens.Internal.Context
import Control.Monad
import Data.Bitraversable
import Data.Functor
n... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/misc/Combining.hs | haskell | # LANGUAGE RankNTypes #
pairing :: ALens' s a -> ALens' s a'-> Lens' s (a, a')
pairing x x' =
lens (\s -> (s ^# x, s ^# x'))
(\s (a, a') -> s & x #~ a & x' #~ a')
in runPretextT (merge h) f
where
p a ( f b ) - > f ( p a ' ( f b ) - > f t )
-- -into-
-- p (a, a') (f b) -> f t | # LANGUAGE ImplicitParams #
# LANGUAGE ScopedTypeVariables #
module Combining where
import Control.Applicative
import Control.Arrow
import Control.Lens
import Control.Lens.Internal
import Control.Lens.Internal.Context
import Control.Monad
import Data.Bitraversable
import Data.Functor
newtype Pretext p a b t = Pre... |
251dd022bdcee8f91dabc16e4382f61057016de31976e443e23ac8310b840b6b | daveho/catparty | core.cljc | ; -*- mode: clojure -*-
Cat Party - C parser in Clojure / ClojureScript
Copyright ( c ) 2016 - 2017 , < >
;;
This is free software distributed under the GNU Public License , version 3 ,
or any later version . See COPYING.txt for details .
(ns catparty.core
(:require [clojure.browser.repl :as repl]))
... | null | https://raw.githubusercontent.com/daveho/catparty/015fffd1c30ea1685d633184b0f157ec3aed5c7c/src/catparty/core.cljc | clojure | -*- mode: clojure -*-
|
Cat Party - C parser in Clojure / ClojureScript
Copyright ( c ) 2016 - 2017 , < >
This is free software distributed under the GNU Public License , version 3 ,
or any later version . See COPYING.txt for details .
(ns catparty.core
(:require [clojure.browser.repl :as repl]))
(defonce conn
(repl/conne... |
edd4ca267e7b7030658f1738abd99c194e943b7560e80b0c26490efbae3d17ac | ANSSI-FR/mabo | mabo.ml | MaBo - MRT & BGP command line parser
* < >
*
* This file implements differents commands that use different MaBo modules .
* Guillaume Valadon <>
*
* This file implements differents commands that use different MaBo modules.
*)
open CommandDump
open CommandPrefixes
open CommandFollow
;;
* command... | null | https://raw.githubusercontent.com/ANSSI-FR/mabo/19000c66f7ecf58eb9cfa66a4cc75a4c76f3ab20/src/mabo.ml | ocaml | MaBo - MRT & BGP command line parser
* < >
*
* This file implements differents commands that use different MaBo modules .
* Guillaume Valadon <>
*
* This file implements differents commands that use different MaBo modules.
*)
open CommandDump
open CommandPrefixes
open CommandFollow
;;
* command... | |
9816b7babb911068b8070cc77dc09f9c53919a3738d71609fff276e160dfbcdf | cj1128/sicp-review | compose.scm | (define (compose f g)
(lambda (x)
(f (g x))))
| null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-1/1.3/compose.scm | scheme | (define (compose f g)
(lambda (x)
(f (g x))))
| |
e1ee7048d354624543b709838df8739d3a8bdd8a5ce59c0d8429eee5a9d1b86c | REPROSEC/dolev-yao-star | Vale_Curve25519_X64_FastWide.ml | open Prims
let (va_code_Fmul :
unit ->
(Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode)
=
fun uu___ ->
Vale_X64_Machine_s.Block
[Vale_X64_InsMem.va_code_CreateHeaplets ();
Vale_X64_InsBasic.va_code_LargeComment
"Compute the raw multiplication: tmp <- src1 * src2";
... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Curve25519_X64_FastWide.ml | ocaml | open Prims
let (va_code_Fmul :
unit ->
(Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode)
=
fun uu___ ->
Vale_X64_Machine_s.Block
[Vale_X64_InsMem.va_code_CreateHeaplets ();
Vale_X64_InsBasic.va_code_LargeComment
"Compute the raw multiplication: tmp <- src1 * src2";
... | |
c5954bb780cbb9a1bc13d1be4f18209b373a4c7c8fd5b5e99d3f2418d98a57b8 | RefactoringTools/HaRe | RecPred.hs | module RecPred where
property Univ = Gfp X . X
property P = [] \/ (Univ : P)
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/property/tests/RecPred.hs | haskell | module RecPred where
property Univ = Gfp X . X
property P = [] \/ (Univ : P)
| |
b872f73a4685e9d1acccbbd589cebf2ebc2911daf7ca095987486f8ff944f49e | nd/sicp | 5.20.scm |
free
|
V
Index 0 1 2 3 4 5
+----+----+----+----+----+----+--
the-cars | | n1 | p1 | p1 | | |
+----+----+----+----+----+----+--
the-cdrs | | n2 | p3 | e0 | | |
... | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch05/5.20.scm | scheme |
free
|
V
Index 0 1 2 3 4 5
+----+----+----+----+----+----+--
the-cars | | n1 | p1 | p1 | | |
+----+----+----+----+----+----+--
the-cdrs | | n2 | p3 | e0 | | |
... | |
01ee31647d52c9c36afb08a70a20310fcdd8118185dab78aa3fa94c9fbc6a400 | heraldry/heraldicon | geometry_test.cljs | (ns spec.heraldry.ordinary.geometry-test
(:require
[cljs.test :refer-macros [are deftest]]
[spec.heraldicon.test-util :as tu]
[spec.heraldry.specs]))
(deftest valid-geometry
(are [form] (tu/valid? :heraldry.ordinary/geometry form)
{}
{:size-mode (tu/example :heraldry.ordinary.geometry/size-mode)}... | null | https://raw.githubusercontent.com/heraldry/heraldicon/19c9d10485bbc48e98ddee30092a246cccc986d2/test/spec/heraldry/ordinary/geometry_test.cljs | clojure | (ns spec.heraldry.ordinary.geometry-test
(:require
[cljs.test :refer-macros [are deftest]]
[spec.heraldicon.test-util :as tu]
[spec.heraldry.specs]))
(deftest valid-geometry
(are [form] (tu/valid? :heraldry.ordinary/geometry form)
{}
{:size-mode (tu/example :heraldry.ordinary.geometry/size-mode)}... | |
846088b7077a75e59087abfe61bd6eda86f2ddc34b8dbec3d69ebe16dd1d1341 | nextjournal/viewers | devdocs.cljs | (ns nextjournal.devdocs
"Views for devdocs:
* a collection view
* a document view
The registry -- holding document and navigation structure -- is a nested collection (a map) of
* `:devdocs` a sequence of clerk docs
* `:collections` a sequence of sub-collections."
(:require [clojure.string :as str]
... | null | https://raw.githubusercontent.com/nextjournal/viewers/35e4c1465b257032c54f629a7fc775cff64f8b8b/modules/devdocs/src/nextjournal/devdocs.cljs | clojure | TODO: maybe compile into reitit router
doc
collection | (ns nextjournal.devdocs
"Views for devdocs:
* a collection view
* a document view
The registry -- holding document and navigation structure -- is a nested collection (a map) of
* `:devdocs` a sequence of clerk docs
* `:collections` a sequence of sub-collections."
(:require [clojure.string :as str]
... |
c139c8e3f65b077537d246faba5f27ceaf633af2ddd6946a1e6e530a7afc7b17 | MagnusS/okra | cat.ml |
* Copyright ( c ) 2021 - 22 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOF... | null | https://raw.githubusercontent.com/MagnusS/okra/13f473baae1e8490887bde156f7bb238ef7c645e/bin/cat.ml | ocaml |
* Copyright ( c ) 2021 - 22 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOF... | |
e5850d683eeb217057feab8b989618e6c87126a60f8d8171eda9ba0b3d8f0db1 | DeepSec-prover/deepsec | statistic.ml | (**************************************************************************)
(* *)
DeepSec
(* *)
... | null | https://raw.githubusercontent.com/DeepSec-prover/deepsec/8ddc45ec79de5ec49810302ea7da32d3dc9f46e4/Source/core_library/statistic.ml | ocaml | ************************************************************************
... | DeepSec
, project PESTO ,
, project PESTO ,
, project PESTO ,
Copyright ( C ) INRIA 2017 - 2020
the GNU General Publ... |
5e87af0af336ef9842279cd53d20970158c46442f650063d55e6c40b8d56b53b | dnaeon/cl-migratum | 20220327224455-lisp_code_migration.down.lisp | i d : 20220327224455
;; direction: DOWN
;; description: lisp_code_migration
(:system :cl-migratum.test :package :cl-migratum.test.20220327224455 :handler :down)
| null | https://raw.githubusercontent.com/dnaeon/cl-migratum/b28031405ca5a43bee85af5da6ef761ceb951d0d/t/migrations/20220327224455-lisp_code_migration.down.lisp | lisp | direction: DOWN
description: lisp_code_migration | i d : 20220327224455
(:system :cl-migratum.test :package :cl-migratum.test.20220327224455 :handler :down)
|
30108d093b145021cca0270ad878f261ed8c501c5dea8e23b580405bed8de727 | jyh/metaprl | shell_tex.ml |
* Imperative interface to the TeX output file .
*
* ----------------------------------------------------------------
*
* Copyright ( C ) 2000 , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publi... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/support/shell/shell_tex.ml | ocaml |
* TeX prologue.
* The output file is an out_channel option.
* Open an output file.
* Return the output if already defined.
* Close the output file.
* Set the output file.
* -*-
* Local Variables:
* Caml-master: "compile"
* End:
* -*-
|
* Imperative interface to the TeX output file .
*
* ----------------------------------------------------------------
*
* Copyright ( C ) 2000 , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publi... |
9ca9ef8f6e27606dde0f10da63b0c46244e3adb0b2a83984323ce789e1ebcd27 | skanev/playground | 04.scm | EOPL exercise B.04
;
; Extend the language and interpreter of the preceding exercise to include
; variables. This new interpreter will require an environment parameter.
(define scanner-spec
'((white-sp (whitespace) skip)
(identifier (letter (arbno (or letter digit))) symbol)
(additive-op ((or "+" "-")) sym... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/B/04.scm | scheme |
Extend the language and interpreter of the preceding exercise to include
variables. This new interpreter will require an environment parameter. | EOPL exercise B.04
(define scanner-spec
'((white-sp (whitespace) skip)
(identifier (letter (arbno (or letter digit))) symbol)
(additive-op ((or "+" "-")) symbol)
(multiplicative-op ((or "*" "/")) symbol)
(number (digit (arbno digit)) number)))
(define grammar
'((expression
(term (arbno add... |
59f938d641ee63bca1a310c45e46588725a0073bbb07804d19b38c70a5bb1a7c | clojure/algo.generic | test_functor.clj | ;; Test routines for clojure.algo.generic.collection
Copyright ( c ) , 2011 . 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 sof... | null | https://raw.githubusercontent.com/clojure/algo.generic/48f3894155abbc14835213281d01355af683b47a/src/test/clojure/clojure/algo/generic/test_functor.clj | clojure | Test routines for clojure.algo.generic.collection
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 this notice, or any other, from this... |
Copyright ( c ) , 2011 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns clojure.algo.generic.test-functor
(:use [clojure.test :only (deftest is are run-tests)])
(:require [clojure.algo.generic.functor :as gf])
(:require [clojure.algo.generic.collect... |
6309a66c963f8b4db66309981e47a367bbd8107e17f7eef6c9478c10b6cb9607 | sadiqj/ocaml-esp32 | genprintval.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/toplevel/genprintval.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Format
open Longident
open Path
open Types
open Outcometree
module type OBJ =
sig
type t
val... |
7beeea134875735a973367b51ccd41e4c9f6e3c4bbf4e04aaf1efacb7201cd96 | bobatkey/CS316-18 | Lec07.hs | module Lec07 where
import Test.QuickCheck
import Data.Foldable
LECTURE 07 : QUICKCHECK
1 . Individual testing
list_append_test1 :: Bool
list_append_test1 = [1,2,3] ++ [] == [1,2,3]
list_append_test2 :: Bool
list_append_test2 = [1,2,3,4] ++ [] == [1,2,3,4]
list_append_tests :: [Bool]
list_append_tests = [ l... | null | https://raw.githubusercontent.com/bobatkey/CS316-18/282dc3c876527c14acfed7bd38f24c9ff048627a/lectures/Lec07.hs | haskell | Monoids
LECTURE 08: QUICKCHECK
PART I : WRITING INDIVIDUAL TEST CASES
artisanal testing, one at a time
PART II : PROPERTY BASED TESTING WITH QUICKCHECK
/~nr/cs257/archive/john-hughes/quick.pdf
Why not test with lots of examples, not just one?
(x + y) + z = x + (y + z)
----------------------------------... | module Lec07 where
import Test.QuickCheck
import Data.Foldable
LECTURE 07 : QUICKCHECK
1 . Individual testing
list_append_test1 :: Bool
list_append_test1 = [1,2,3] ++ [] == [1,2,3]
list_append_test2 :: Bool
list_append_test2 = [1,2,3,4] ++ [] == [1,2,3,4]
list_append_tests :: [Bool]
list_append_tests = [ l... |
a6dc148897da0a5bc9172864e6fef578bcd922f3293a7fa5e5dc4858a6196873 | soarlab/FPTaylor | more_num.mli | (* ========================================================================== *)
: A Tool for Rigorous Estimation of Round - off Errors
(* *)
Author : , University of Utah
(* ... | null | https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/more_num.mli | ocaml | ==========================================================================
==========================================================================
-----------... | : A Tool for Rigorous Estimation of Round - off Errors
Author : , University of Utah
This file is distributed under the terms of the MIT license
val numerator : Num.num -> Big_int.big_int
val denominator : Num.num -> Big_int.big_int
val num_of_f... |
f6fa958479bfa3f55b212f719e5f4cdded806791e1abd30dbdbf5b8628db2f07 | mfikes/fifth-postulate | ns476.cljs | (ns fifth-postulate.ns476)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns476.cljs | clojure | (ns fifth-postulate.ns476)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
786040b8ebe2f55d934ebf3bfb78a9ff11b91ef535fcc6f7717539b7a5aeb2f1 | mbenke/zpf2013 | CsvParse.hs | module MyParsec2a.CsvParse where
import MyParsec2a.Prim
import MyParsec2a.Combinators
A CSV file contains 0 or more lines , each of which is terminated
by the end - of - line character ( eol ) .
by the end-of-line character (eol). -}
csvFile :: Parser [[String]]
csvFile = manyTill line eof
Each line cont... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Parse1/MyParsec2a/CsvParse.hs | haskell | Each cell contains 0 or more characters, which must not be a comma or
The end of line character is \n | module MyParsec2a.CsvParse where
import MyParsec2a.Prim
import MyParsec2a.Combinators
A CSV file contains 0 or more lines , each of which is terminated
by the end - of - line character ( eol ) .
by the end-of-line character (eol). -}
csvFile :: Parser [[String]]
csvFile = manyTill line eof
Each line cont... |
cd9583a0b2eaf68ee3f29e31d2c2dfb3f30c022ca7276767030b61658e9d42c7 | maximedenes/native-coq | decl_interp.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/decl_mode/decl_interp.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Tacinterp
open Decl_expr... |
a6fdf692ae02d3a5524b908deea3728775822360bff0208adb3329a596987b51 | Drup/LILiS | bench_vonkoch.ml | open Benchmark
open Lilis
open Bench_common
let lsystems = [
4, "Von_koch" ;
5, "Von_koch" ;
6, "Von_koch" ;
7, "Von_koch" ;
8, "Von_koch" ;
9, "Von_koch" ;
]
let _ =
execute "bank_lsystem" lsystems all_optims [sequence]
| null | https://raw.githubusercontent.com/Drup/LILiS/df63fbc3ee77b3378ae1ef27715828c3ad892475/test/bench_vonkoch.ml | ocaml | open Benchmark
open Lilis
open Bench_common
let lsystems = [
4, "Von_koch" ;
5, "Von_koch" ;
6, "Von_koch" ;
7, "Von_koch" ;
8, "Von_koch" ;
9, "Von_koch" ;
]
let _ =
execute "bank_lsystem" lsystems all_optims [sequence]
| |
9ae699542c0337aff5a370daa7442b2f0465b011be0c5b55abdcf3483ed56139 | nuprl/gradual-typing-performance | region-typed.rkt | #lang typed/racket
(require "typed-base.rkt"
(prefix-in mred: typed/racket/gui))
(provide region-x region-y region-w region-h set-region-hilite?!
region-paint-callback region-label region-button? region-hilite?
region-callback region-decided-start? region-can-select?
set-region-dec... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/benchmarks/gofish/both/region-typed.rkt | racket | No idea if this is correct or not? | #lang typed/racket
(require "typed-base.rkt"
(prefix-in mred: typed/racket/gui))
(provide region-x region-y region-w region-h set-region-hilite?!
region-paint-callback region-label region-button? region-hilite?
region-callback region-decided-start? region-can-select?
set-region-dec... |
fe036a7c68212880a85afa34f187e2df6dffe3156445808cdf9542aad59c4775 | expipiplus1/vulkan | VK_KHR_depth_stencil_resolve.hs | {-# language CPP #-}
-- | = Name
--
-- VK_KHR_depth_stencil_resolve - device extension
--
-- == VK_KHR_depth_stencil_resolve
--
-- [__Name String__]
-- @VK_KHR_depth_stencil_resolve@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
200
--
-- [__Revision__]
1
--
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_depth_stencil_resolve.hs | haskell | # language CPP #
| = Name
VK_KHR_depth_stencil_resolve - device extension
== VK_KHR_depth_stencil_resolve
[__Name String__]
@VK_KHR_depth_stencil_resolve@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- R... | 200
1
- Requires support for Vulkan 1.0
- Jan -
< -Docs/issues/new?body=[VK_KHR_depth_stencil_resolve ] @janharald%0A*Here describe the issue or question you have about the extension * >
2018 - 04 - 09
- Promoted to Vulkan 1.2 Core
- Jan - , Arm
... |
0d675f0befe1c9798c5fcda1f0064e454e317e7ca7493da42e4095c9a1ea8b8c | jochu/swank-clojure | sockets.clj | Requires clojure 1.1 ( currently in alpha )
(ns swank.test-swank.util.net.sockets
(:import (java.net ServerSocket Socket InetSocketAddress))
(:use clojure.test
swank.util.net.sockets))
(deftest making-server
(are [x] (with-open [socket x]
(instance? ServerSocket x))
(make-server-soc... | null | https://raw.githubusercontent.com/jochu/swank-clojure/b08daf866488b449a44ba8df6e5ae17a3515ef57/test/swank/test_swank/util/net/sockets.clj | clojure | Testing of connection (ought to do object mocks) | Requires clojure 1.1 ( currently in alpha )
(ns swank.test-swank.util.net.sockets
(:import (java.net ServerSocket Socket InetSocketAddress))
(:use clojure.test
swank.util.net.sockets))
(deftest making-server
(are [x] (with-open [socket x]
(instance? ServerSocket x))
(make-server-soc... |
165cec2e4229a3945cc978ef6a38000c8fbcab98c33448b60de55ad97e847de4 | nvim-treesitter/nvim-treesitter | locals.scm | ; HEEx tags, components, and slots are references
[
(component_name)
(slot_name)
(tag_name)
] @reference
; Create a new scope within each HEEx tag, component, and slot
[
(component)
(slot)
(tag)
] @scope
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/083aee08735fd5dcd02ef72d831b054244db73a4/queries/heex/locals.scm | scheme | HEEx tags, components, and slots are references
Create a new scope within each HEEx tag, component, and slot | [
(component_name)
(slot_name)
(tag_name)
] @reference
[
(component)
(slot)
(tag)
] @scope
|
e0dd0e3d2f04f5c8f42875d2f70d84c35791863b3e83e7eeb671c16eaa96aadf | janestreet/lwt-async | lwt_term.mli | Lightweight thread library for
* Module Lwt_term
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* eithe... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/text/lwt_term.mli | ocaml | * Terminal control
* This modules allow you to write interactive programs using the
terminal.
* [with_raw_mode f] executes [f] while the terminal is in ``raw
mode''. Raw mode means that character are returned as the user
type them (otherwise only complete line are returned to the
program).
... | Lightweight thread library for
* Module Lwt_term
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* eithe... |
8e602e97579bf14fd5f9f150d36007e8f7e454c2b55d31cf1893890b8eece796 | roman/lc-2018-rock-solid-haskell-services | SNS.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module App.Component.AWS.SNS (buildTopics) where
import RIO
import qualified RIO.HashMap as HashMap
import Data.Aeson ((.:), (.:?))
import qualified Data.Aeson as JSON
import qualified... | null | https://raw.githubusercontent.com/roman/lc-2018-rock-solid-haskell-services/c964beba5ddc50bb586e02b14d8d89128f17a53f/5-web-crawl/app/App/Component/AWS/SNS.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module App.Component.AWS.SNS (buildTopics) where
import RIO
import qualified RIO.HashMap as HashMap
import Data.Aeson ((.:), (.:?))
import qualified Data.Aeson as JSON
import qualified Network.AWS as AWS
import qualified Network.AWS.SNS as AWS
import qu... |
72e497f77c4616d91da31b9c6906c9254a1ec95531877cf8924ca9cdbb348988 | lesguillemets/sicp-haskell | 1.33.hs | module OneThirtythree where
-- takeWhile seems to be a better explanation.
twAccumulate' :: (Ord a)
=> (t -> t -> t) -> t -> (a -> t) -> (a -> Bool) -> (a -> a) -> a -> t
Phew ! I think can come very handy here .
twAccumulate' combiner nullValue term cond next a
= let iter acc x =
if not (cond x... | null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect3/1.33.hs | haskell | takeWhile seems to be a better explanation.
the sum of the squares of the prime numbers in the interval a to
b (assuming that you have a prime? predicate already written)
Or this? Is this what it's asking for?
This does not seem to be a "generalization"...
| the sum of the squares of the prime numbers in the in... | module OneThirtythree where
twAccumulate' :: (Ord a)
=> (t -> t -> t) -> t -> (a -> t) -> (a -> Bool) -> (a -> a) -> a -> t
Phew ! I think can come very handy here .
twAccumulate' combiner nullValue term cond next a
= let iter acc x =
if not (cond x) then acc
else ite... |
bbafbeff6b705cc993052cf2460bb8bf1996cfae3e843d99459d74043eb33b26 | gigasquid/clj-drone | multi_drone_nav_goals.clj | (ns clj-drone.example.nav-goals
(:require [clj-drone.core :refer :all]
[clj-drone.navdata :refer :all]
[clj-drone.goals :refer :all]))
;Logging goes to logs/drone.log
(set-log-data [:seq-num :battery-percent :control-state :detect-camera-type
:targets-num :targets])
(def dron... | null | https://raw.githubusercontent.com/gigasquid/clj-drone/b85320a0ab5e4d8589aaf77a0bd57e8a46e2905b/examples/multi_drone_nav_goals.clj | clojure | Logging goes to logs/drone.log
Taking off
Look for other drone and wave
Land
Taking off
Look for other drone and wave
Land
;;; initialization to run
;;If running in the repl end the nav-stream when done | (ns clj-drone.example.nav-goals
(:require [clj-drone.core :refer :all]
[clj-drone.navdata :refer :all]
[clj-drone.goals :refer :all]))
(set-log-data [:seq-num :battery-percent :control-state :detect-camera-type
:targets-num :targets])
(def drone1-shakes (atom 0))
(def drone2-... |
857e74544c4d0cd885a40713dfe85160d385cecb369fefbd830ead472b87da06 | gcross/LogicGrowsOnTrees | RequestQueue.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE RecursiveDo #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE UndecidableInstances #
# LANGUAGE Un... | null | https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Parallel/Common/RequestQueue.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# LANGUAGE TypeSynonymInstances #
* Type-classes
* Types
* Functions
** Synchronized requests
** Request queue management
** Request processing
** Controller threads
** CPU time tracking
** Miscellaneous
------------------------------------------------------... | # LANGUAGE RecursiveDo #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE UnicodeSyntax #
| To understand the purpose of this module , it helps to know that there are
... |
aad17178862850ebbac2293cde9c9744c1eb9deaad9bc2ffabe48494aca04428 | TristeFigure/shuriken | jenny.clj | (ns shuriken.jenny
"Jenny said
When she was just about five years old
You know why parents gonna be the death of us all
Two TV sets and two Cadillac cars
Well you know, it ain't gonna help me at all, not just a tiny bit
Then one fine mornin' she turns on a New York station
She doesn't believe what s... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/jenny.clj | clojure | :context (lexical-context)
:debug true
:debug-context true | (ns shuriken.jenny
"Jenny said
When she was just about five years old
You know why parents gonna be the death of us all
Two TV sets and two Cadillac cars
Well you know, it ain't gonna help me at all, not just a tiny bit
Then one fine mornin' she turns on a New York station
She doesn't believe what s... |
78bd9b351510e2a70200ff8c867bd68e1d6fd62750a51ebacc0e279f6bf9e27f | planetfederal/signal | rest_test.clj | (ns signal.rest-test
(:require [signal.test-utils :as utils]
[clojure.test :refer :all]
[clojure.spec.gen.alpha :as spec-gen]
[clojure.spec.alpha :as spec]
[signal.specs.input :refer :all]
[clojure.data.json :as json]))
(use-fixtures :once utils/setup-fixtu... | null | https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/test/signal/rest_test.clj | clojure | (ns signal.rest-test
(:require [signal.test-utils :as utils]
[clojure.test :refer :all]
[clojure.spec.gen.alpha :as spec-gen]
[clojure.spec.alpha :as spec]
[signal.specs.input :refer :all]
[clojure.data.json :as json]))
(use-fixtures :once utils/setup-fixtu... | |
ada55823b4eae53fd4b8631d405bb8497a2915524a317ea883a9b3ab24ab7e7e | footprintanalytics/footprint-web | mysql_test.clj | (ns metabase.driver.mysql-test
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[clojure.test :refer :all]
[honeysql.core :as hsql]
[java-time :as t]
[metabase.config :as config]
[metabase.db.metadata-queries :as metadata-queries]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/driver/mysql_test.clj | clojure | Create the DB
allow inserting dates where value is '0000-00-00' -- this is disallowed by default on newer
versions of MySQL, but we still want to test that we can handle it correctly for older ones
create & sync MB DB
run the query
Test how TINYINT(1) columns are interpreted. By default, they should be interprete... | (ns metabase.driver.mysql-test
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[clojure.test :refer :all]
[honeysql.core :as hsql]
[java-time :as t]
[metabase.config :as config]
[metabase.db.metadata-queries :as metadata-queries]
... |
deb8b87007062c16f6f2df19bf3d403780a760a04e313775d21887b2fa2db385 | informatimago/lisp | c-sexp-loader.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(in-package "COM.INFORMATIMAGO.LANGUAGES.LINC")
(defun linc-eval (form)
0)
(defun load-linc-file (input-file &key output-file
(verbose *compile-verbose*)
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/languages/linc/c-sexp-loader.lisp | lisp | THE END ;;;; | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(in-package "COM.INFORMATIMAGO.LANGUAGES.LINC")
(defun linc-eval (form)
0)
(defun load-linc-file (input-file &key output-file
(verbose *compile-verbose*)
... |
319fc1edad0cb73c68f340d13f3841bc260a681d4f7458253f303410c0df0a3c | returntocorp/semgrep | parsing_hacks_js.mli | val fix_tokens : Parser_js.token list -> Parser_js.token list
val fix_tokens_ASI : Parser_js.token list -> Parser_js.token list
| null | https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/javascript/menhir/parsing_hacks_js.mli | ocaml | val fix_tokens : Parser_js.token list -> Parser_js.token list
val fix_tokens_ASI : Parser_js.token list -> Parser_js.token list
| |
a2549098daf804bd84b345f6e612e41072edb480ffb67efb30dd0434b5325be3 | re-xyr/cleff | Any.hs | -- |
Copyright : ( c ) 2021
-- License: BSD3
-- Maintainer:
-- Stability: unstable
Portability : non - portable ( GHC only )
module Data.Any (Any, pattern Any, fromAny) where
import GHC.Exts (Any)
import Unsafe.Coerce (unsafeCoerce)
-- | A pattern synonym for coercing values to and fro... | null | https://raw.githubusercontent.com/re-xyr/cleff/28c74f3c6dd473e6b773ba26b785980ee5607234/src/Data/Any.hs | haskell | |
License: BSD3
Maintainer:
Stability: unstable
| A pattern synonym for coercing values to and from t'Any'. This is not any less unsafe but prevents possible
misuses.
# COMPLETE Any # | Copyright : ( c ) 2021
Portability : non - portable ( GHC only )
module Data.Any (Any, pattern Any, fromAny) where
import GHC.Exts (Any)
import Unsafe.Coerce (unsafeCoerce)
pattern Any :: forall a. a -> Any
pattern Any {fromAny} <- (unsafeCoerce -> fromAny)
where Any = unsafeCoerce
|
ea984c8932c6429702ffeaba06e45f1d60867f4bf816bff78d89d58484637e6f | lpgauth/marina | marina_request.erl | -module(marina_request).
-include("marina_internal.hrl").
-compile(inline).
-compile({inline_size, 512}).
-export([
auth_response/3,
execute/4,
prepare/3,
query/4,
startup/1
]).
%% public
-spec auth_response(frame_flag(), binary(), binary()) -> iolist().
auth_response(FrameFlags, Username, Passw... | null | https://raw.githubusercontent.com/lpgauth/marina/2d775c003f58d125bb38e7c953c30c36aebc72c6/src/marina_request.erl | erlang | public
private | -module(marina_request).
-include("marina_internal.hrl").
-compile(inline).
-compile({inline_size, 512}).
-export([
auth_response/3,
execute/4,
prepare/3,
query/4,
startup/1
]).
-spec auth_response(frame_flag(), binary(), binary()) -> iolist().
auth_response(FrameFlags, Username, Password) ->
... |
cfe37d206e7723746ca52fa9cb39ef88a0e4b46529b154dd19f4cf08408b9e5e | GaloisInc/HaNS | Fragments.hs | # LANGUAGE RecordWildCards #
# LANGUAGE PatternGuards #
module Hans.IP4.Fragments (
FragTable(),
newFragTable, cleanupFragTable,
processFragment,
) where
import Hans.Config
import qualified Hans.HashTable as HT
import Hans.IP4.Packet
import Hans.Lens (view)
import ... | null | https://raw.githubusercontent.com/GaloisInc/HaNS/2af19397dbb4f828192f896b223ed2b77dd9a055/src/Hans/IP4/Fragments.hs | haskell | XXX: there isn't any way to limit the size of the fragment table right now.
| Handle an incoming fragment. If the fragment is buffered, but doesn't
complete the packet, the escape continuation is invoked.
no fragments
fragment
abort packet processing here, as there's nothing left to do
return the reassembled pac... | # LANGUAGE RecordWildCards #
# LANGUAGE PatternGuards #
module Hans.IP4.Fragments (
FragTable(),
newFragTable, cleanupFragTable,
processFragment,
) where
import Hans.Config
import qualified Hans.HashTable as HT
import Hans.IP4.Packet
import Hans.Lens (view)
import ... |
c46d57aad16cd9db56c817df44453bbdae5918b2a7b89630de30a26b9ba78c09 | exoscale/clostack | config.clj | (ns clostack.config
"This namespace provides a few functions which try very hard
to find configuration for the library. See the `init` function
for a description of the logic."
(:require [clojure.string :as s]
[clojure.edn :as edn]
[exoscale.cloak :as cloak]))
(defn getenv
"Fetch... | null | https://raw.githubusercontent.com/exoscale/clostack/551865988fdb540cb3c6fb901ab84283a63dfdd6/src/clostack/config.clj | clojure | (ns clostack.config
"This namespace provides a few functions which try very hard
to find configuration for the library. See the `init` function
for a description of the logic."
(:require [clojure.string :as s]
[clojure.edn :as edn]
[exoscale.cloak :as cloak]))
(defn getenv
"Fetch... | |
b00156c48f0828350243d2a146bb38dc2e4dd806852e3589790b0b1d98c4b63c | jlongster/genetic-canvas | ffi#.scm |
(c-define-type u8 unsigned-char)
(c-define-type u8* (pointer u8))
| null | https://raw.githubusercontent.com/jlongster/genetic-canvas/2592e48ddbd168a819ca6ca330a6f8af6ffc37aa/lib/ffi/ffi%23.scm | scheme |
(c-define-type u8 unsigned-char)
(c-define-type u8* (pointer u8))
| |
249fe83c32ec66fae92e3a936ec2ba4d2be8417a35356eb89323dad5807e557e | alanz/ghc-exactprint | T9968.hs | # LANGUAGE DeriveAnyClass , MultiParamTypeClasses #
module T9968 where
class C a b
data X = X deriving (C Int)
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T9968.hs | haskell | # LANGUAGE DeriveAnyClass , MultiParamTypeClasses #
module T9968 where
class C a b
data X = X deriving (C Int)
| |
11da0394b38806b41e576e80703c6508416bfabd72ab720287e4d0557a9a4088 | sbelak/tide | dtw.clj | (ns tide.dtw
(:import com.fastdtw.dtw.FastDTW
(com.fastdtw.timeseries TimeSeriesBase TimeSeriesPoint TimeSeriesItem)
(com.fastdtw.util Distances DistanceFunction)))
(defn- ensure-seq
[x]
(if (sequential? x)
x
[x]))
(defn- build-timeseries
[ts]
(if (sequential? (first ts))
(... | null | https://raw.githubusercontent.com/sbelak/tide/bedda6844a33e176836f11d2330a9d7d4a0f14df/src/tide/dtw.clj | clojure | (ns tide.dtw
(:import com.fastdtw.dtw.FastDTW
(com.fastdtw.timeseries TimeSeriesBase TimeSeriesPoint TimeSeriesItem)
(com.fastdtw.util Distances DistanceFunction)))
(defn- ensure-seq
[x]
(if (sequential? x)
x
[x]))
(defn- build-timeseries
[ts]
(if (sequential? (first ts))
(... | |
b1ddb4fe92de7f5f4bc0e30b132f19f61e7bc14aa33d638f52bb3eb4cfcaed3d | maybevoid/casimir | Resource.hs | module Casimir.Test.Higher.Resource
( resourceTests
)
where
import qualified Casimir.Base as Base
import Test.Tasty hiding (withResource)
import Test.Tasty.HUnit
import Data.IORef
import Control.Exception
import Control.Monad.Trans.State.Strict (StateT, execStateT)
import Casimir.Base
import Casimir.Higher
impo... | null | https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/test/Casimir/Test/Higher/Resource.hs | haskell | module Casimir.Test.Higher.Resource
( resourceTests
)
where
import qualified Casimir.Base as Base
import Test.Tasty hiding (withResource)
import Test.Tasty.HUnit
import Data.IORef
import Control.Exception
import Control.Monad.Trans.State.Strict (StateT, execStateT)
import Casimir.Base
import Casimir.Higher
impo... | |
669c0f52f66e875a90dbed24675cfa1530012b1888426486cc2b5b2edaa7f0eb | scrintal/heroicons-reagent | phone_arrow_up_right.cljs | (ns com.scrintal.heroicons.outline.phone-arrow-up-right)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "r... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/phone_arrow_up_right.cljs | clojure | (ns com.scrintal.heroicons.outline.phone-arrow-up-right)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "r... | |
c07550f47597ee8fa046faca21bdb6c62d7ed6907ea062f4e1677ae93dcace5d | hpdeifel/hledger-iadd | WrappedText.hs | | TODO Use the built - in wrapping feature in brick-0.20
module Brick.Widgets.WrappedText (wrappedText) where
import Brick
import Data.Text (Text)
import qualified Data.Text as T
import Lens.Micro
-- | Widget like 'txt', but wrap all lines to fit on the screen.
--
-- Doesn't do word wr... | null | https://raw.githubusercontent.com/hpdeifel/hledger-iadd/782239929d411bce4714e65dd5c7bb97b2ba4e75/src/Brick/Widgets/WrappedText.hs | haskell | | Widget like 'txt', but wrap all lines to fit on the screen.
Doesn't do word wrap, just breaks the line whenever the maximum width is
exceeded.
| Wrap all lines in input to fit into maximum width.
Doesn't do word wrap, just breaks the line whenever the maximum width is
exceeded. | | TODO Use the built - in wrapping feature in brick-0.20
module Brick.Widgets.WrappedText (wrappedText) where
import Brick
import Data.Text (Text)
import qualified Data.Text as T
import Lens.Micro
wrappedText :: Text -> Widget n
wrappedText theText = Widget Fixed Fixed $ do
ctx <- ge... |
094b2040978a160cb87867d79d9fd9f7aa446870d913f8fa37749b5389d27da5 | GrammaticalFramework/gf-core | Structure.hs | module Structure where
data SentenceType = Q | Dir | Top
deriving (Show,Eq)
data NPType = Generic | Impers | Normal | Exist
deriving (Show,Eq)
data VPForm = Cop | Sup | VV | VA
| V | V2 | V2A | V2Pass
| Fut | FutKommer
| VS
... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/treebanks/talbanken/Structure.hs | haskell | module Structure where
data SentenceType = Q | Dir | Top
deriving (Show,Eq)
data NPType = Generic | Impers | Normal | Exist
deriving (Show,Eq)
data VPForm = Cop | Sup | VV | VA
| V | V2 | V2A | V2Pass
| Fut | FutKommer
| VS
... | |
f0dee2a41432a852e437438693dbe6153034271a89532b373d9ffcdb56a49f11 | kmi/ocml | rete-working-memory.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Base : 10 ; Package : ; -*-
(in-package "OCML")
;;;The functions in this file handle adding and removing new alpha patterns to the rete network.
;;;The top level entry points in the code for doing this are the following:
;;;MATCH-ALPHA-NODE-AGAINST-INSTANCE ---This i... | null | https://raw.githubusercontent.com/kmi/ocml/90b0b173f588c580c26393c94f9970282c640f4d/src/rete-working-memory.lisp | lisp | Syntax : Common - lisp ; Base : 10 ; Package : ; -*-
The functions in this file handle adding and removing new alpha patterns to the rete network.
The top level entry points in the code for doing this are the following:
MATCH-ALPHA-NODE-AGAINST-INSTANCE ---This is called in order to match
to an instance of class <... |
(in-package "OCML")
a generic instance spec pattern such as ( < class > < x > < attr1 > < y1> ............. > < yn > )
been asserted , say .... valuen of slot1 of inst1 , to try and match a rule antecedent ,
with the form ( < class > < instance - id > .... < value > .... ) to a
It first checks whether the w... |
670994e9be209db862186a072abec8b418c27d4276e9814accf11fd2df6c6e37 | rtoy/cmucl | boot-2011-04-01-cross.lisp | Add -unidata command line option to allow user to tell where
the unidata.bin file is .
;;
To build 2011 - 06 , you need to do a cross - compile . Use this as the
;; cross-compile bootstrap file.
#+x86
(load "target:tools/cross-scripts/cross-x86-x86.lisp")
#+sparc
(load "target:tools/cross-scripts/cross-sparc... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/20b/boot-2011-04-01-cross.lisp | lisp |
cross-compile bootstrap file. | Add -unidata command line option to allow user to tell where
the unidata.bin file is .
To build 2011 - 06 , you need to do a cross - compile . Use this as the
#+x86
(load "target:tools/cross-scripts/cross-x86-x86.lisp")
#+sparc
(load "target:tools/cross-scripts/cross-sparc-sparc.lisp")
|
c89152027e31b868899eda5baf0cf858bda714c94638bbdc5f9d99b8c5c5550e | jacobobryant/biff | rum.clj | (ns com.biffweb.impl.rum
(:require [clojure.java.io :as io]
[clojure.string :as str]
[com.biffweb.impl.util :as util]
[ring.middleware.anti-forgery :as anti-forgery]
[rum.core :as rum]))
(defn render [body]
{:status 200
:headers {"content-type" "text/html; charset... | null | https://raw.githubusercontent.com/jacobobryant/biff/b339095197679dd4c546971f5a053d312c42b231/src/com/biffweb/impl/rum.clj | clojure | you could say that rum is one of our main exports | (ns com.biffweb.impl.rum
(:require [clojure.java.io :as io]
[clojure.string :as str]
[com.biffweb.impl.util :as util]
[ring.middleware.anti-forgery :as anti-forgery]
[rum.core :as rum]))
(defn render [body]
{:status 200
:headers {"content-type" "text/html; charset... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.