_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 |
|---|---|---|---|---|---|---|---|---|
419227207fbdca20eba5ed09e689f73d1dae34d8c7efb6bc9cf2980b61e43150 | danr/hipspec | Bool.hs | module Main where
import Hip.Prelude
import Hip.HipSpec
import Prelude (Bool(..))
True && a = a
False && _ = False
False || a = a
True || _ = True
not True = False
not False = True
prop_and_comm :: Bool -> Bool -> Prop Bool
prop_and_comm x y = y && x =:= x && y
prop_or_comm :: Bool -> Bool -> Prop Bool
prop_or... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/hip/Bool.hs | haskell | module Main where
import Hip.Prelude
import Hip.HipSpec
import Prelude (Bool(..))
True && a = a
False && _ = False
False || a = a
True || _ = True
not True = False
not False = True
prop_and_comm :: Bool -> Bool -> Prop Bool
prop_and_comm x y = y && x =:= x && y
prop_or_comm :: Bool -> Bool -> Prop Bool
prop_or... | |
c3fa8c58243567b43aa43616fa05939a7eda775756bff3e1725a05407adfe930 | NaOHman/XMonadPlus | Pass.hs | -----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.Pass
Copyright : ( c ) 2014 ,
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : unstable
-- Portability : unportable
--
This module provides 3 < XMon... | null | https://raw.githubusercontent.com/NaOHman/XMonadPlus/1495e102ae3304817d1897a393e1f31fef71d41f/xmonad-contrib-darcs/XMonad/Prompt/Pass.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Prompt.Pass
License : BSD3-style (see LICENSE)
Stability : unstable
Portability : unportable
- one to lookup passwords in the password-storage.
- one to generate a password for a given password label ... | Copyright : ( c ) 2014 ,
Maintainer : < >
This module provides 3 < XMonad . Prompt > to ease passwords manipulation ( generate , read , remove ):
Otherwise , the password store is located on user 's home @$HOME\/.password - store@.
module XMonad.Prompt.Pass (
pas... |
c857fbcf766449293a0266d0248646c37e50f3f273b9053d80dc655fc54cc911 | jackfirth/resyntax | legacy-syntax-migrations-test.rkt | #lang resyntax/testing/refactoring-test
require: resyntax/default-recommendations legacy-syntax-migrations
header:
- #lang racket/base
test: "the fifth argument to datum->syntax can be removed"
------------------------------
(define stx #'foo)
(datum->syntax stx 'bar stx stx #'blah)
------------------------------... | null | https://raw.githubusercontent.com/jackfirth/resyntax/c0046047c0306f0917c38bfdc5342990d55c7b82/default-recommendations/legacy-syntax-migrations-test.rkt | racket | #lang resyntax/testing/refactoring-test
require: resyntax/default-recommendations legacy-syntax-migrations
header:
- #lang racket/base
test: "the fifth argument to datum->syntax can be removed"
------------------------------
(define stx #'foo)
(datum->syntax stx 'bar stx stx #'blah)
------------------------------... | |
7702d55260bd7b8ebf831bf02ca9f6a85f0272bf614b2c805639e3a2a1c15807 | kowainik/piece-of-cake-slayer | Error.hs | {- | Application error type.
-}
module Piece.App.Error
( WithError
, AppError (..)
, toHttpError
) where
import Data.CaseInsensitive (foldedCase)
import Network.HTTP.Types.Header (HeaderName)
import PgNamed (PgNamedError)
import Servant.Server (err401, err404, err417, err500, errBody)
import qualifie... | null | https://raw.githubusercontent.com/kowainik/piece-of-cake-slayer/98c44dae5cf8ffce896292beb042c315800ed0ae/src/Piece/App/Error.hs | haskell | | Application error type.
| App errors type.
| General not found.
| Some exceptional circumstance has happened to stop execution and return.
Optional text to provide some context in server logs.
| A required permission level was not met. Optional text to provide some context.
| Some header expected, b... |
module Piece.App.Error
( WithError
, AppError (..)
, toHttpError
) where
import Data.CaseInsensitive (foldedCase)
import Network.HTTP.Types.Header (HeaderName)
import PgNamed (PgNamedError)
import Servant.Server (err401, err404, err417, err500, errBody)
import qualified CakeSlayer.Error as CakeSlayer... |
007a8d4e8181f1bec38ad39628186bfca0bb30b31b9ec3d3c65c8c771dd16429 | patrikja/AFPcourse | Spec.hs |
--------------------------------------------------------------
-- Problem 1a
Formulate QuickCheck properties and generators to test the correctness
of a sorting function |mysort : : [ Weekday ] - > [ Weekday]| .
--------------------------------------------------------------
-- Problem 1a
Formulate QuickCheck ... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2011-08/Spec.hs | haskell | ------------------------------------------------------------
Problem 1a
------------------------------------------------------------
Problem 1a
shorter lists are always ordered
Part of the problem formulation + some testing code:
--------------------------------------------------------------
Problem 1b
---... |
Formulate QuickCheck properties and generators to test the correctness
of a sorting function |mysort : : [ Weekday ] - > [ Weekday]| .
Formulate QuickCheck properties and generators to test the correctness
of a sorting function |mysort :: [Weekday] -> [Weekday]|.
-}
import Test.QuickCheck
import Data.List((\\), ... |
18dc7313960db084e35b30f27098a0608664fd418de7fec29d30055b3567ae76 | cxxxr/valtan | backquote.lisp | (in-package :compiler)
(defvar *comma* '*:unquote)
(defvar *comma-atsign* '*:unquote-splicing)
TODO
(defvar *bq-list* (make-symbol "BQ-LIST"))
(defvar *bq-append* (make-symbol "BQ-APPEND"))
(defvar *bq-list** (make-symbol "BQ-LIST*"))
(defvar *bq-nconc* (make-symbol "BQ-NCONC"))
(defvar *bq-clobberable* (make-symbol "... | null | https://raw.githubusercontent.com/cxxxr/valtan/ec3164d42b86869357dc185b747c5dfba25c0a3c/library/valtan-core/compiler/backquote.lisp | lisp | (in-package :compiler)
(defvar *comma* '*:unquote)
(defvar *comma-atsign* '*:unquote-splicing)
TODO
(defvar *bq-list* (make-symbol "BQ-LIST"))
(defvar *bq-append* (make-symbol "BQ-APPEND"))
(defvar *bq-list** (make-symbol "BQ-LIST*"))
(defvar *bq-nconc* (make-symbol "BQ-NCONC"))
(defvar *bq-clobberable* (make-symbol "... | |
377b43f388fc68bf50aae269a6283ffbcd74366fcd15ac2f55fa909cdba8994f | svenpanne/EOPL3 | exercise-3-16.rkt | #lang eopl
; ------------------------------------------------------------------------------
Exercise 3.16
See : exercise 3.15
; ------------------------------------------------------------------------------
Scanner and parser specification
(define scanner-spec
'((whitespace (whitespace) skip)
(comment ("... | null | https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter3/exercise-3-16.rkt | racket | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Debugging helpers for scanner and parser
-------------------------------------... | #lang eopl
Exercise 3.16
See : exercise 3.15
Scanner and parser specification
(define scanner-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(number (digit (arbno digit)) number)
(number ("-" digit (arbno digit)) number)
(nullary-op ("emptylist") string)
... |
b4cf86380eaf03a7a3d0b1d86ddc8e8efb9daa53cb4d5e909e66174bd4bc5b03 | Lysxia/twentyseven | Internal.hs | # LANGUAGE FlexibleInstances , GeneralizedNewtypeDeriving ,
MultiParamTypeClasses , DeriveFunctor , DeriveGeneric , ViewPatterns #
MultiParamTypeClasses, DeriveFunctor, DeriveGeneric, ViewPatterns #-}
module Rubik.Cube.Moves.Internal where
import Rubik.Cube.Coord
import Rubik.Cube.Cubie.Internal
import Rubik... | null | https://raw.githubusercontent.com/Lysxia/twentyseven/bfcd3ddcf938bc6db933a364d331877b0fd1257e/src/Rubik/Cube/Moves/Internal.hs | haskell | | Associate every elementary move with an 'ElemMove'.
Elementary moves
| Up
| Left
| Front
| Right
| Back
| Down
| Generating set of @G1@
| Rotation of the whole cube
| Half-turn of the whole cube
around the FB axis
| Index of a symmetry
x <- [0..47]
| Translate an integer to a symmetry.
| Octahedral ... | # LANGUAGE FlexibleInstances , GeneralizedNewtypeDeriving ,
MultiParamTypeClasses , DeriveFunctor , DeriveGeneric , ViewPatterns #
MultiParamTypeClasses, DeriveFunctor, DeriveGeneric, ViewPatterns #-}
module Rubik.Cube.Moves.Internal where
import Rubik.Cube.Coord
import Rubik.Cube.Cubie.Internal
import Rubik... |
753075f2de5b96edd86d2d452dff456ebab14a556b18f25b3948b55329161993 | erlang/corba | ic_forms.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 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 applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/src/ic_forms.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1998 - 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(ic_forms).
-include_lib("ic/src/ic.hrl").
-include_lib("ic/src/icforms.hrl").
-export([get_id/1, get_id2/1... |
1ca4e504c662402c5e184893f6f954985479611a8067cfe2de3da1c7f5cbecaa | uw-unsat/jitsynth | jit.rkt | #lang rosette
(require "../common/instructions.rkt")
(require (rename-in "../common/interp-utils.rkt" (assemble-and-run aar)))
(provide assemble)
TODO remove this , move to tester side
(provide assemble-and-run)
NOTE : May want debug option
(define (assemble bpf-instrs)
(let ([bpf-prog (map bpf-instr->raw bpf-... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/linux/jit.rkt | racket | Run jit and obtain input/output ports
Requires running from base directory
Read RISC-V program from stdout
(pretty-print output) | #lang rosette
(require "../common/instructions.rkt")
(require (rename-in "../common/interp-utils.rkt" (assemble-and-run aar)))
(provide assemble)
TODO remove this , move to tester side
(provide assemble-and-run)
NOTE : May want debug option
(define (assemble bpf-instrs)
(let ([bpf-prog (map bpf-instr->raw bpf-... |
cca373c8a6560477304ffb6e2584bf83ba495521eda87c8467a0788f9ecf8497 | derui/okeyfum | okeyfum_handler.ml | module Log = Okeyfum_log
module Keyboard_device = Okeyfum_keyboard_device
module Conv = Okeyfum_converter
module Eval = Okeyfum_evaluator
module E = Okeyfum_environment
module C = Okeyfum_config.Config
module L = Okeyfum_log
let clear_lock_status env =
let locked_keys = E.locked_keys env in
List.fold_left (fun e v... | null | https://raw.githubusercontent.com/derui/okeyfum/bc47c0bea35c00d720dcde0200256a3f2e1312bd/src/okeyfum_handler.ml | ocaml | checking converter status in updated environment here, because okeyfum should always convert and evaluate key
sequence within enable/disable status. | module Log = Okeyfum_log
module Keyboard_device = Okeyfum_keyboard_device
module Conv = Okeyfum_converter
module Eval = Okeyfum_evaluator
module E = Okeyfum_environment
module C = Okeyfum_config.Config
module L = Okeyfum_log
let clear_lock_status env =
let locked_keys = E.locked_keys env in
List.fold_left (fun e v... |
cd4371fa2a106e16c700ab098a9211e355935518c5a8d5ea271a7e8e8e4a7bfc | acl2/acl2 | tutorial.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/48f6f076b9d1558c37cf6e1392b39bcbb020aa84/books/kestrel/c/atc/tutorial.lisp | lisp | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "kestrel/std/util/deftutorial" :dir :system)
(deftutorial atc-tutorial "A... | |
107360863d1171613b72b98466383d022b226f47ad2cd0778143bb1c2bb30cda | nd/sicp | 3.5.scm | (define (random-in-range low high)
(let ((range (- high low)))
(+ low (random range))))
(define (monte-carlo trials experiment)
(define (iter trials-remaining trials-passed)
(cond ((= trials-remaining 0) (/ trials-passed trials))
((experiment) (iter (- trials-remaining 1) (+ trials-passed 1)))
... | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch03/3.5.scm | scheme | (estimate-integral (circle-predicat 0 0 1) -1.0 1.0 -1.0 1.0 100000)
gives | (define (random-in-range low high)
(let ((range (- high low)))
(+ low (random range))))
(define (monte-carlo trials experiment)
(define (iter trials-remaining trials-passed)
(cond ((= trials-remaining 0) (/ trials-passed trials))
((experiment) (iter (- trials-remaining 1) (+ trials-passed 1)))
... |
9f90757dfd89363871ab7414e6c241b67a24eb7c397bfcc26e36efc905c1fbb9 | delph-in/jacy | mrsglobals.lsp | ;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: MRS -*-
Copyright ( c ) 1998 - 2003
, , , ;
;;; see `licence.txt' for conditions.
(in-package "MRS")
;;; Globals for MRS
This version is aligned with the 2004 version of the MRS paper
;;; and therefore quite extensively changed from previous versions... | null | https://raw.githubusercontent.com/delph-in/jacy/87e7c05619c0df5fc2e71de478132d5698175137/lkb/mrsglobals.lsp | lisp | -*- Mode: LISP; Syntax: Common-Lisp; Package: MRS -*-
see `licence.txt' for conditions.
Globals for MRS
and therefore quite extensively changed from previous versions.
This may necessitate some changes to mrsglobals for grammars
which use earlier style MRS and were relying on the defaults here.
Changing the a... | Copyright ( c ) 1998 - 2003
(in-package "MRS")
This version is aligned with the 2004 version of the MRS paper
Note the use of vsym below - this allows for the code to be
run independently of the LKB and without worrying about
(defparameter *initial-semantics-path*
`(,(vsym "SYNSEM") ,(vsym "LOCAL") ,(vs... |
cdd4cdb676fe04712237941bd198d7accca38e5037fa4d5492ea70d58398c542 | xapi-project/xen-api | rrd_client.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/1e1165f330c30ee6cb8e8f325af9fdd07474ca24/ocaml/xapi-idl/rrd/rrd_client.ml | ocaml | TODO: the message switch doesn't handle raw HTTP very well |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... |
5c48d267ba8635c530275fef633671da932baf1790084b8280f20781a2f38569 | hyper-systems/ocaml-mqtt | client_test.ml | let port = ref 9000
let port () =
port := !port + 1;
!port
let timeout ?(t = 10.) () =
let%lwt () = Lwt_unix.sleep t in
Alcotest.fail "ERROR client timeout"
let establish_server ~port ?(no_close = true) callback =
let cond = Lwt_condition.create () in
let callback sock ch =
let%lwt () = callback sock... | null | https://raw.githubusercontent.com/hyper-systems/ocaml-mqtt/92328f0ca4ef4cd004dfd44f44b4ee2d79b39b7e/tests/client_test.ml | ocaml | * Module that gathers most io read and writes for the fake server
parse client id
empty client id
parse client id
empty client id
parse client id
empty client id
parse client id
empty client id
Test: Verify that the client succesfully sends a CONNECT packet and
understands the answered CONNACK
Te... | let port = ref 9000
let port () =
port := !port + 1;
!port
let timeout ?(t = 10.) () =
let%lwt () = Lwt_unix.sleep t in
Alcotest.fail "ERROR client timeout"
let establish_server ~port ?(no_close = true) callback =
let cond = Lwt_condition.create () in
let callback sock ch =
let%lwt () = callback sock... |
a51c3e223cafa14378a4b8a8751f52c6f78b290d183ef4cc5189dedc76df898a | RyanMcG/incise | index.clj | {:path "index.html"
:title nil}
(require '[incise.parsers.impl.markdown])
(require '[hiccup.core :refer [html]])
(require '[hiccup.element :refer [link-to image]])
(require '[clojure.string :refer [replace-first]])
(def md-source (slurp "README.md"))
(def svg-logo "/assets/images/logo.svg")
(def svg-logo-link
(htm... | null | https://raw.githubusercontent.com/RyanMcG/incise/fc34f5715cb7555ea575f665a2f4ec76bc9e012e/website/content/index.clj | clojure | {:path "index.html"
:title nil}
(require '[incise.parsers.impl.markdown])
(require '[hiccup.core :refer [html]])
(require '[hiccup.element :refer [link-to image]])
(require '[clojure.string :refer [replace-first]])
(def md-source (slurp "README.md"))
(def svg-logo "/assets/images/logo.svg")
(def svg-logo-link
(htm... | |
7be68b21f005b41cac477270f50bd88ddf4f38ec90846ccc60db41624c73e16a | charlieg/Sparser | loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1992,1993,1994,1995 -- all rights reserved
;;;
;;; File: "loader"
Module : " : "
version : 0.3 October 1995
initiated 2/10/92 v2.2
0.1 ( 2/24/93 v2.3 ) commented out items that did n't load in 2.0
0.2 (... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/grammar/loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "loader"
windows : menus : module menu ]
and flushed the now-irrelevant files
sgml | copyright ( c ) 1992,1993,1994,1995 -- all rights reserved
Module : " : "
version : 0.3 October 1995
initiated 2/10/92 v2.2
0.1 ( 2/24/93 v2.3 ) commented out items that did n't load in 2.0
0.2 ( 8/16 ) gated postprocessing since it now calls menu stuff
( 11/17 ) added [ defining ver... |
a778430f4371faf59a2f3582918c358ec334ffb7616528a85b143f0f9019efa3 | zk/nsfw | mongo.clj | (ns nsfw.mongo
(:require [nsfw.util :as util]
[somnium.congomongo :as mon]
[clojure.string :as str])
(:import [java.net URI]))
(defn bson-id
([]
(org.bson.types.ObjectId.))
([id-or-str]
(org.bson.types.ObjectId/massageToObjectId id-or-str)))
(defn parse-username
"ex. uri : ... | null | https://raw.githubusercontent.com/zk/nsfw/ea07ba20cc5453b34a56b34c9d8738bf9bf8e92f/src/clj/nsfw/mongo.clj | clojure | (ns nsfw.mongo
(:require [nsfw.util :as util]
[somnium.congomongo :as mon]
[clojure.string :as str])
(:import [java.net URI]))
(defn bson-id
([]
(org.bson.types.ObjectId.))
([id-or-str]
(org.bson.types.ObjectId/massageToObjectId id-or-str)))
(defn parse-username
"ex. uri : ... | |
e46bbe9fafae3ee54314cf20e0b0b69b5d1feabf2fc4d3a4835338d800564d37 | whamtet/dogfort | project.clj | (defproject dogfort "0.2.3"
:description "A web server framework for Clojurescript on Node"
:url ""
:license {:name "Apache License, version 2.0"
:url "-2.0.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[redlobster "0.2.3"]
[org.clojure/clojurescript "1.7.48"]... | null | https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/project.clj | clojure | using dogfort.build instead
"this.literal_js_was_evaluated=true"
"test/cemerick/cljs/test/extra_test_command_file.js" | (defproject dogfort "0.2.3"
:description "A web server framework for Clojurescript on Node"
:url ""
:license {:name "Apache License, version 2.0"
:url "-2.0.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[redlobster "0.2.3"]
[org.clojure/clojurescript "1.7.48"]... |
85649f48f7838f4e8f8be56d7addfd2462f9ca5dac20e96ade232f63af156ba6 | smaccoun/polysemy-servant | Effects.hs | module Effects
( runAllIO
, runEffects
, module Polysemy.Operators
, Db
, runSql
, AllAppEffects
, runServerIO
) where
import AppBase hiding ( Reader, runReader )
import Config ( Config(..) )
import Effects.DB ( Db, runDb... | null | https://raw.githubusercontent.com/smaccoun/polysemy-servant/93f7977d6c03995d03674e9e5e0c24f02458b182/src/Effects.hs | haskell | module Effects
( runAllIO
, runEffects
, module Polysemy.Operators
, Db
, runSql
, AllAppEffects
, runServerIO
) where
import AppBase hiding ( Reader, runReader )
import Config ( Config(..) )
import Effects.DB ( Db, runDb... | |
80b227f02c382fac2962f90bf9cac99525e8f768e6da93b0fd84b00faaae7880 | dfinity-side-projects/dhc | example.hs | To get this working in GHC , uncomment the following 2 lines :
import Prelude hiding ( foldr , uncurry , sum , map , )
-- putInt = print
-- Gratuitous mutual recursion.
factorial n = case n == 0 of True -> 1
False -> n * factorial2 (n - 1)
factorial2 n = case n == 0 of True -> 1... | null | https://raw.githubusercontent.com/dfinity-side-projects/dhc/60ac6c85ca02b53c0fdd1f5852c1eaf35f97d579/test/example.hs | haskell | putInt = print
Gratuitous mutual recursion. | To get this working in GHC , uncomment the following 2 lines :
import Prelude hiding ( foldr , uncurry , sum , map , )
factorial n = case n == 0 of True -> 1
False -> n * factorial2 (n - 1)
factorial2 n = case n == 0 of True -> 1
False -> n * factoria... |
64b3573739b9ffa7560d71edf5c2855f8a427ec8616ca70a0549ef44c397ac60 | NorfairKing/bevel | Import.hs | module Bevel.API.Server.Handler.Import (module X) where
import Bevel.API.Data as X
import Bevel.API.Server.Data as X
import Bevel.API.Server.Env as X
import Bevel.Data as X
import Control.Monad.Reader as X
import Data.Text as X (Text)
import Database.Persist as X
import Servant as X hiding (Unique)
| null | https://raw.githubusercontent.com/NorfairKing/bevel/8cc74d83d058f916acf4cf247341852600d9456e/bevel-api-server/src/Bevel/API/Server/Handler/Import.hs | haskell | module Bevel.API.Server.Handler.Import (module X) where
import Bevel.API.Data as X
import Bevel.API.Server.Data as X
import Bevel.API.Server.Env as X
import Bevel.Data as X
import Control.Monad.Reader as X
import Data.Text as X (Text)
import Database.Persist as X
import Servant as X hiding (Unique)
| |
0d9afeed1c7107abb7321aff95bada1481c839ad8a82f97d92326eaa73c56d1a | sylane/erod | erodws_proto_get_children_result.erl | %%% ==========================================================================
Copyright ( c ) 2014 < >
%%%
This file is part of erodws .
%%%
Erodws 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 , e... | null | https://raw.githubusercontent.com/sylane/erod/b0c435f8546ea38b1501d3e22614fe7951c61c9a/apps/erodws/src/erodws_proto_get_children_result.erl | erlang | ==========================================================================
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General... | Copyright ( c ) 2014 < >
This file is part of erodws .
Erodws 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
You should have received a copy of the GNU Genera... |
96bf0ab548a457f878b47ea4de66b5833b1e42636e2147c6e1cb37a0beaf0767 | clojure/core.typed | emit_form.clj | Copyright ( c ) , Rich Hickey & contributors .
;; 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 b... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/analyzer.common/src/clojure/core/typed/analyzer/common/passes/emit_form.clj | 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 ) , Rich Hickey & contributors .
(ns clojure.core.typed.analyzer.common.passes.emit-form
(:require [clojure.core.typed.analyzer.common.passes.uniquify :refer [uniquify-locals]]))
(defmulti -emit-form (fn [{:keys [op]} _] op))
(defn ^:dynamic -emit-form*
"Extension point for custom emit-form i... |
b397ef53d63989e3b14384bdf11f6181abacd1e015372b3f455dd81dace75a2b | jumarko/clojure-experiments | 09_complex_generators.clj | (ns clojure-experiments.purely-functional.property-based-testing.09-complex-generators
(:require
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.string :as str]
[clojure.test.check.properties :as prop]))
;;;; Building an email address generator.
;;;; Very often we use strings... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/purely_functional/property_based_testing/09_complex_generators.clj | clojure | Building an email address generator.
Very often we use strings which are expected to follow particular format.
There are many regex validators online
this is my attempt to copy the one from the lecture but it doesn't work
:\s@\"]+)*)|(\".+\"))@(([^<>()\[\]\.,;:\s@\"]+\.)+[^<>()\[\]\.,;:\s@\"]{2,})")
start with su... | (ns clojure-experiments.purely-functional.property-based-testing.09-complex-generators
(:require
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.string :as str]
[clojure.test.check.properties :as prop]))
(re-matches email-re "")
= > [ " " " jumarko " " jumarko " nil nil... |
5da1d46e9b5e6fb6b78fc00b854c173a0947bf28945062071914a732d49c28e3 | DomainDrivenArchitecture/data-test | data_test.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/data-test/78116ced9a4e07de742be4fa78cf608e2f2240a7/main/src/data_test.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns data-test
^{:author "Michael Jerger, with contributions and suggestions by razum2um",
:doc "data-test separates test data ... |
a62b9c5644fbead3b5438fec9bc171fa3f49e16b5aeb2669f8cba7411660589f | cljfx/cljfx | progress_bar.clj | (ns cljfx.fx.progress-bar
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.fx.progress-indicator :as fx.progress-indicator]
[cljfx.coerce :as coerce]
[cljfx.lifecycle :as lifecycle])
(:import (javafx.scene.control ProgressBar)))
(set! *warn-on-reflection... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/progress_bar.clj | clojure | overrides | (ns cljfx.fx.progress-bar
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.fx.progress-indicator :as fx.progress-indicator]
[cljfx.coerce :as coerce]
[cljfx.lifecycle :as lifecycle])
(:import (javafx.scene.control ProgressBar)))
(set! *warn-on-reflection... |
564dc1fd2a548d13bada67184858825abf04ca7916b683435a553e13a837b5b7 | nikivazou/verified_string_matching | shiftNewIndicesRight.hs | #define IncludedshiftNewIndicesRight
#ifdef IncludedshiftIndicesRight
#else
#include "../AutoProofs/shiftIndicesRight.hs"
#endif
{-@ automatic-instances shiftNewIndicesRight @-}
@ shiftNewIndicesRight
: : xi : RString
- > yi : RString
- > zi : RString
- > tg:{RString | stringLen tg < = stringLen... | null | https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/AutoProofs/shiftNewIndicesRight.hs | haskell | @ automatic-instances shiftNewIndicesRight @ | #define IncludedshiftNewIndicesRight
#ifdef IncludedshiftIndicesRight
#else
#include "../AutoProofs/shiftIndicesRight.hs"
#endif
@ shiftNewIndicesRight
: : xi : RString
- > yi : RString
- > zi : RString
- > tg:{RString | stringLen tg < = stringLen yi }
- > { map ( shiftStringRight tg xi ( yi... |
669c8729315385df1ee45a2fcbe2eb5ca7feeb529f73fe8d3ae459ff55b58c6d | azimut/shiny | drumerino.lisp | (in-package :shiny)
(make-instrument 'drum "/home/sendai/Downloads/sample/OH/")
(push-note 'drum *gm-kick* "kick_OH_F_9.wav")
(push-note 'drum *gm-side-stick* "snareStick_OH_F_9.wav")
(push-note 'drum *gm-snare* "snare_OH_FF_9.wav")
(push-note 'drum *gm-closed-hi-hat* "hihatClosed_OH_F_20.wav")
(push-note 'drum *gm-pe... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/instruments/drumerino.lisp | lisp | (in-package :shiny)
(make-instrument 'drum "/home/sendai/Downloads/sample/OH/")
(push-note 'drum *gm-kick* "kick_OH_F_9.wav")
(push-note 'drum *gm-side-stick* "snareStick_OH_F_9.wav")
(push-note 'drum *gm-snare* "snare_OH_FF_9.wav")
(push-note 'drum *gm-closed-hi-hat* "hihatClosed_OH_F_20.wav")
(push-note 'drum *gm-pe... | |
603392bcafa81515b85df3dd68587c80d3b0d37e58e44da766fff3a2d2f0a0b8 | OCamlPro/ocp-build | buildOCamlOCP2.mli | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/ocaml/buildOCamlOCP2.mli | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
Specific function to create an OCaml package . Used to create packages
from META descriptions somewhere else .
from META descriptions somewhere else. *)
val ad... |
f747f76d851b68d5bf2a7cb08df56072053df1c9bae8e4feee8667092d66844e | mbenke/zpf2013 | Declare1.hs | # LANGUAGE TemplateHaskell #
module Main where
import Language.Haskell.TH
import Build1
$(build_p1)
main = print $ p1(1,2)
| null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/TH/Projections/Declare1.hs | haskell | # LANGUAGE TemplateHaskell #
module Main where
import Language.Haskell.TH
import Build1
$(build_p1)
main = print $ p1(1,2)
| |
fd5115841c61b6644fac2185b27c92011efdf9f4f2cfa25196f1e4b23b60d2f9 | richhickey/clojure-contrib | props.clj | props.clj -- part of the pretty printer for Clojure
by
April 3 , 2009
Copyright ( c ) , Dec 2008 . 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 d... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/examples/clojure/clojure/contrib/pprint/examples/props.clj | 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 ... | props.clj -- part of the pretty printer for Clojure
by
April 3 , 2009
Copyright ( c ) , Dec 2008 . All rights reserved .
(ns clojure.contrib.pprint.examples.props
(:use clojure.contrib.pprint))
(defn show-props [stream]
(let [p (mapcat
#(vector (key %) (val %))
(sort-by ke... |
ad4650cd12957815b8c9939ff12d789b013fd6d51cbe4494d3d6f794927a40b8 | wlitwin/graphv | perfGraph.ml | module Gv = Graphv_gles3
type style = FPS
| Ms
| Percent
type t = {
style : style;
name : string;
values : float array;
mutable head : int;
mutable last : float;
}
let init style name = {
name;
style;
values = Array.make 100 0.;
head = 0;
last = 0.;
... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/examples/native_gles3/perfGraph.ml | ocaml | module Gv = Graphv_gles3
type style = FPS
| Ms
| Percent
type t = {
style : style;
name : string;
values : float array;
mutable head : int;
mutable last : float;
}
let init style name = {
name;
style;
values = Array.make 100 0.;
head = 0;
last = 0.;
... | |
42cb72224b4bbe6ebb9f093d8926a59857c70f02c31a480677f85045dade9c20 | issuu/broen | broen_sup.erl | %%% ---------------------------------------------------------------------------------
@private
%%% @doc
The main supervisor for .
%%% @end
%%% ---------------------------------------------------------------------------------
-module(broen_sup).
-behaviour(supervisor).
-include_lib("amqp_client/include/amqp_client... | null | https://raw.githubusercontent.com/issuu/broen/7d0e1ad9017b9e9907d924b54c3c63dd1d741c9c/src/broen_sup.erl | erlang | ---------------------------------------------------------------------------------
@doc
@end
---------------------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
==============================... | @private
The main supervisor for .
-module(broen_sup).
-behaviour(supervisor).
-include_lib("amqp_client/include/amqp_client.hrl").
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
ConnInfo = conn_info(),
RPCConfig =
[{repl... |
d1317b3461d383b8bef169fc619de27b1933eb09a63d6d0856f8a7f25f50645a | futurice/haskell-mega-repo | Ctx.hs | module Futurice.App.Smileys.Ctx (
Ctx(..),
) where
import FUM.Types.Login (Login)
import Futurice.Cache (Cache)
import Futurice.Postgres
import Futurice.Prelude
import Prelude ()
-------------------------------------------------------------------------------
-- Context
-----------------------------------... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/smileys-app/src/Futurice/App/Smileys/Ctx.hs | haskell | -----------------------------------------------------------------------------
Context
----------------------------------------------------------------------------- | module Futurice.App.Smileys.Ctx (
Ctx(..),
) where
import FUM.Types.Login (Login)
import Futurice.Cache (Cache)
import Futurice.Postgres
import Futurice.Prelude
import Prelude ()
data Ctx = Ctx
{ ctxPostgresPool :: !(Pool Connection)
, ctxCache :: !Cache
, ctxLogger :: !Logger
... |
8662131834081d9483bebbd2a50e92e6ac3e43dafb3ee57aa2e2f4f2526567ed | processone/esip | esip_transaction.erl | %%%----------------------------------------------------------------------
%%% File : esip_transaction.erl
Author : < >
%%% Purpose : Route client/server transactions
Created : 15 Jul 2009 by < >
%%%
%%%
Copyright ( C ) 2002 - 2022 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apach... | null | https://raw.githubusercontent.com/processone/esip/a2ee6c2506b86e937fc7bbf5e4a8fa1bffacc741/src/esip_transaction.erl | erlang | ----------------------------------------------------------------------
File : esip_transaction.erl
Purpose : Route client/server transactions
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 ... | Author : < >
Created : 15 Jul 2009 by < >
Copyright ( C ) 2002 - 2022 ProcessOne , SARL . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(esip_transaction).
-behaviour(gen_server)... |
1369bdee62912000cc634fb297583362996b7d43decf04c7c6422917249c8602 | mseri/ocaml-gr | lowlevel.mli | *
{ 1 Lowlevel bindings to the GR - framewokr C interface . }
For the documentation refer to the { { : } GR Reference } .
The lookup of the " libGR.so " library can be overriden providing the full path to the library so file by setting the [ ] env variable .
{1 Lowlevel bindings to the GR-framewokr C interf... | null | https://raw.githubusercontent.com/mseri/ocaml-gr/6532a72512fef51e35df9a3c0b860aea0231c534/src/lowlevel.mli | ocaml | *
{ 1 Lowlevel bindings to the GR - framewokr C interface . }
For the documentation refer to the { { : } GR Reference } .
The lookup of the " libGR.so " library can be overriden providing the full path to the library so file by setting the [ ] env variable .
{1 Lowlevel bindings to the GR-framewokr C interf... | |
dc056a23b1c8d1e40d79278f4b3f7ff3ff4f7459b16f112faaf9e5d58c91defb | JHU-PL-Lab/jaylang | directory_utils.ml | open! Core
(* treat the path as the group name and filename as the test name *)
let group_all_files dir =
let rec loop dir =
let acc_f, acc_p =
Sys_unix.fold_dir ~init:([], [])
~f:(fun (acc_f, acc_p) path ->
match String.get path 0 with
| '.' (* including "." ".." *) | '_' -> (a... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/914b4e13e8c8e411a1d55916101875311894b826/src/dj-common/utils/directory_utils.ml | ocaml | treat the path as the group name and filename as the test name
including "." ".." | open! Core
let group_all_files dir =
let rec loop dir =
let acc_f, acc_p =
Sys_unix.fold_dir ~init:([], [])
~f:(fun (acc_f, acc_p) path ->
match String.get path 0 with
| _ -> (
let fullpath = Filename.concat dir path in
let path_info = (fullpath, path... |
6129af4d88290602f500c58086023083faa9d00fdbfd4c1354cc99fb8f22af93 | eugeneia/athens | arrays.lisp | (in-package #:metabang-bind-test)
(deftestsuite test-arrays (metabang-bind-test)
())
(addtest (test-arrays)
basic-access
(ensure-same
(bind ((#(a b c) #(1 2 3)))
(list a b c))
'(1 2 3) :test 'equal))
(addtest (test-arrays)
two-dimensional
(ensure-same
(bind ((#2a((a b c) (d e f)) #2a((1 2 3) ... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/metabang-bind-20171130-git/unit-tests/arrays.lisp | lisp | (in-package #:metabang-bind-test)
(deftestsuite test-arrays (metabang-bind-test)
())
(addtest (test-arrays)
basic-access
(ensure-same
(bind ((#(a b c) #(1 2 3)))
(list a b c))
'(1 2 3) :test 'equal))
(addtest (test-arrays)
two-dimensional
(ensure-same
(bind ((#2a((a b c) (d e f)) #2a((1 2 3) ... | |
f8e7eaad12d1c2b699450ec5d815d8a6276e23e0514fbfb9aec5dd967818c933 | AdRoll/rebar3_format | sort_arity_qualifiers_utf_names.erl | -module(sort_arity_qualifiers_utf_names).
-format #{sort_arity_qualifiers => true}.
-export(['😎'/0, '👁👄👁'/0, abc/0]).
'👁👄👁'() ->
ok.
'😎'() ->
ok.
abc() ->
ok.
| null | https://raw.githubusercontent.com/AdRoll/rebar3_format/7292c4e309491a19294ec5b2ff0b86a98b01d72c/test_app/src/sort_arity_qualifiers/sort_arity_qualifiers_utf_names.erl | erlang | -module(sort_arity_qualifiers_utf_names).
-format #{sort_arity_qualifiers => true}.
-export(['😎'/0, '👁👄👁'/0, abc/0]).
'👁👄👁'() ->
ok.
'😎'() ->
ok.
abc() ->
ok.
| |
c55edb4dfd6bf1f31157f8240a719f04a710b2ee6bc308716e4824eed8a1ff88 | gedge-platform/gedge-platform | rabbit_credential_validator_min_password_length.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_credential_validator_min_password_... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_credential_validator_min_password_length.erl | erlang |
accommodates default (localhost-only) user credentials,
guest/guest
API
for tests
passwordless users | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_credential_validator_min_password_length... |
d088ddfafe6d84f35d6e04b50726052ae5061d978725566f4823ba1b9215899e | TheClimateCorporation/mandoline | compressed_store.clj | (ns io.mandoline.impl.compressed-store
(:require
[clojure.tools.logging :as log]
[io.mandoline.filters.chain :as chain]
[io.mandoline.impl.protocol :as proto]))
(def ^:private chain-apply (chain/get-chain-apply {:filters ["lz4"]} :na))
(def ^:private chain-reverse (chain/get-chain-reverse))
(deftype Chain... | null | https://raw.githubusercontent.com/TheClimateCorporation/mandoline/fa26162ef0349ecb71be9d27a46652206f5c1b99/src/io/mandoline/impl/compressed_store.clj | clojure | (ns io.mandoline.impl.compressed-store
(:require
[clojure.tools.logging :as log]
[io.mandoline.filters.chain :as chain]
[io.mandoline.impl.protocol :as proto]))
(def ^:private chain-apply (chain/get-chain-apply {:filters ["lz4"]} :na))
(def ^:private chain-reverse (chain/get-chain-reverse))
(deftype Chain... | |
52f73e2bc03e92896aaf86289fc0a70d33671545a5ca09f06ce393ef813f446c | NorfairKing/smos | Reload.hs | module Smos.Web.Server.Handler.Reload where
import Smos.Web.Server.Handler.Import
import Yesod.AutoReload
getReloadR :: Handler ()
getReloadR = getAutoReloadR
| null | https://raw.githubusercontent.com/NorfairKing/smos/a3ed8fdbcb8f298bc49866bf6d0ee59a964ba0da/smos-web-server/src/Smos/Web/Server/Handler/Reload.hs | haskell | module Smos.Web.Server.Handler.Reload where
import Smos.Web.Server.Handler.Import
import Yesod.AutoReload
getReloadR :: Handler ()
getReloadR = getAutoReloadR
| |
35bb5ccfde276fd51e6131395daf3d331a75d59a3f3f4bb5cb7a7ef0ca9f50ef | haskell-repa/repa | Convolve.hs | {-# LANGUAGE BangPatterns, PackageImports #-}
{-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns #-}
-- | Generic stencil based convolutions.
--
-- If your stencil fits within a 7x7 tile and is known at compile-time then using
the built - in stencil support provided by the main Repa p... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-algorithms/Data/Array/Repa/Algorithms/Convolve.hs | haskell | # LANGUAGE BangPatterns, PackageImports #
# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns #
| Generic stencil based convolutions.
If your stencil fits within a 7x7 tile and is known at compile-time then using
5-10x faster.
If you have a larger stencil, the coefficients are not... |
the built - in stencil support provided by the main Repa package will be
module Data.Array.Repa.Algorithms.Convolve
convolveP
, GetOut
, outAs
, outClamp
, convolveOutP )
where
import Data.Array.Repa as R
import Data.Array.Repa.Unsafe ... |
3388266c944d2a9caa71605432715f714f83b228781685cad230817af4cfce9e | Tim-ats-d/Postem-markup | ctx.ml | module type S = sig
type t
type key
type value
val empty : t
val add : key -> value -> t -> t
val find : t -> key -> value
val find_opt : t -> key -> value option
val merge : t -> t -> t
end
module type VALUE = sig
type t
end
module Make (Ord : Map.OrderedType) (Value : VALUE) :
S with type key :... | null | https://raw.githubusercontent.com/Tim-ats-d/Postem-markup/0af4b265474d970662bbd14d2ee9c0bd4ecef1cd/src/common/ctx.ml | ocaml | module type S = sig
type t
type key
type value
val empty : t
val add : key -> value -> t -> t
val find : t -> key -> value
val find_opt : t -> key -> value option
val merge : t -> t -> t
end
module type VALUE = sig
type t
end
module Make (Ord : Map.OrderedType) (Value : VALUE) :
S with type key :... | |
bb0129ec33516ac4e417aa820654505fd92445ed905f52cccc3b608de8de1013 | chef/chef-server | bksw_wm_sql_object.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
@author < >
Copyright 2012 - 2015 Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this... | null | https://raw.githubusercontent.com/chef/chef-server/775e6b24229e46884dcd8801e0534a07627327b2/src/bookshelf/src/bksw_wm_sql_object.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Override
R... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
@author < >
Copyright 2012 - 2015 Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distr... |
e08a7f5240f1858ab0d5f70eb072930b6c10372a948b657e826ce0b1e8c2ec37 | picnic/RelationExtraction | fixpointgen.ml | (****************************************************************************)
RelationExtraction - Extraction of inductive relations for Coq
(* *)
(* This program is free software: you can redistribute it and/or modify *)
it u... | null | https://raw.githubusercontent.com/picnic/RelationExtraction/a4cee37d0a8e5f0eff2e010e6305e037aa0d2564/fixpointgen.ml | ocaml | **************************************************************************
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
... | RelationExtraction - Extraction of inductive relations for Coq
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
Copyright 2... |
e1a7f9c419350685c8b6e6b11b36e8554582bf6d597f838cb680f6038293bd22 | scarvalhojr/haskellbook | Main.hs |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Scotty (scotty, get, param, html)
import Web.Scotty.Internal.Types (ActionT(..))
import Control.Monad.Trans.Class (MonadTrans, lift)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Except (Exce... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter26/myscotty/app/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import Web.Scotty (scotty, get, param, html)
import Web.Scotty.Internal.Types (ActionT(..))
import Control.Monad.Trans.Class (MonadTrans, lift)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Except (ExceptT(..))
import Control.Monad.Trans... |
191c75e0f4ecf9083e760b8c75f76011443358565566961a27221d94a80f1884 | awslabs/s2n-bignum | bignum_double_p256.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_double_p256.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/p256/bignum_double_p256.o";;
***
XOR (% rax) (% rax)
ADD (% rdx) (% rdx)
ADC (% rcx) (% rcx)
ADC (% r8) (% r8)
ADC (% r9) (% r... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Doubling modulo p_256 , the field characteristic for the NIST P-25... |
de254e8f0870a7a16acb8730cbeb980b15db8c2445dc5bf5e836153d59f62f14 | Helium4Haskell/helium | DerivingOne.hs | data A = A Int
| B Float
deriving Show | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/DerivingOne.hs | haskell | data A = A Int
| B Float
deriving Show | |
b696c538e1583541d1cf627ae454ccf9f4d7526729b7154444a0325059b3fab4 | well-typed/plutonomy | Var.hs | # LANGUAGE CPP #
-- | Variables for well-scoped terms.
module Subst.Var (
-- * Variables
Var (VZ,VS),
absurdVar,
unvar,
pattern V0,
pattern V1,
pattern V2,
-- ** Common patterns
unusedVar,
unusedVar2,
unusedVar3,
*
Ren,
mkRen,
renameVar,
idRen,
liftRen,... | null | https://raw.githubusercontent.com/well-typed/plutonomy/9ce00c24cca9a950066cc5ae853d3974b7f4820a/src-subst/Subst/Var.hs | haskell | | Variables for well-scoped terms.
* Variables
** Common patterns
* Rename things
| Variables index the context size.
| Derive anything from variable in empty scope.
Note: don't use @EmptyCase@ as it doesn't work for unsafe representation.
| Derive anything from variable in empty scope.
Note: don't use @Empt... | # LANGUAGE CPP #
module Subst.Var (
Var (VZ,VS),
absurdVar,
unvar,
pattern V0,
pattern V1,
pattern V2,
unusedVar,
unusedVar2,
unusedVar3,
*
Ren,
mkRen,
renameVar,
idRen,
liftRen,
skipRen,
compRen,
bumpRen,
swapRen,
weakenRen,
absurdRen,
... |
7ab36f8d75fc5847b0c0c365b9345731092e8632c161a4458694738107180c9b | goolord/atrophy | LongDivision.hs | # LANGUAGE
TypeApplications
, ScopedTypeVariables
, LambdaCase
, NumericUnderscores
#
TypeApplications
, ScopedTypeVariables
, LambdaCase
, NumericUnderscores
#-}
module Atrophy.LongDivision
( module X
, module Atrophy.LongDivision
)
where
import Data.Word
import Atrophy.Internal... | null | https://raw.githubusercontent.com/goolord/atrophy/3b115dc5b0369d78f39e8c42b976706106a51096/src/Atrophy/LongDivision.hs | haskell | # LANGUAGE
TypeApplications
, ScopedTypeVariables
, LambdaCase
, NumericUnderscores
#
TypeApplications
, ScopedTypeVariables
, LambdaCase
, NumericUnderscores
#-}
module Atrophy.LongDivision
( module X
, module Atrophy.LongDivision
)
where
import Data.Word
import Atrophy.Internal... | |
f2ed40b086c7f73964baaa8307532f9e84ffbe3d2478281250547467f06358af | asolove/carto-crayon | utils.cljs | (ns carto-crayon.utils
(:require [cljs.reader :as reader])
(:import [goog.ui IdGenerator]))
(defn guid []
(.getNextUniqueId (.getInstance IdGenerator)))
| null | https://raw.githubusercontent.com/asolove/carto-crayon/24fbffaa51d8d9dce17dd940ab86ab62500d8752/src/carto-crayon/utils.cljs | clojure | (ns carto-crayon.utils
(:require [cljs.reader :as reader])
(:import [goog.ui IdGenerator]))
(defn guid []
(.getNextUniqueId (.getInstance IdGenerator)))
| |
4421da93b8508d65e71c4ba126eaeeca8baf7c34f27ad1cd5340dc7cda7eaa2a | txyyss/Project-Euler | Euler035.hs | The number , 197 , is called a circular prime because all rotations
of the digits : 197 , 971 , and 719 , are themselves prime .
There are thirteen such primes below 100 : 2 , 3 , 5 , 7 , 11 , 13 , 17 ,
31 , 37 , 71 , 73 , 79 , and 97 .
How many circular primes are there below one million ?
module Euler035... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler035.hs | haskell | The number , 197 , is called a circular prime because all rotations
of the digits : 197 , 971 , and 719 , are themselves prime .
There are thirteen such primes below 100 : 2 , 3 , 5 , 7 , 11 , 13 , 17 ,
31 , 37 , 71 , 73 , 79 , and 97 .
How many circular primes are there below one million ?
module Euler035... | |
9e25400eb6992f514496dacc47172e60386405a1cba58e92fe7bdda03ac4cd1e | ocaml/dune | rpc.ml | open Import
open Fiber.O
type server =
{ run : unit Fiber.t
; stop : unit Fiber.t
; ready : unit Fiber.t
}
type t =
{ server : server
; pool : Fiber.Pool.t
; mutable state : [ `Awaiting_start | `Running | `Stopped ]
}
let t = Fiber.Var.create ()
let stop ({ state; server; pool } as t) =
let* () = ... | null | https://raw.githubusercontent.com/ocaml/dune/4e83d1b80bd9a37de7e0d39d6f22873850314557/src/dune_engine/rpc.ml | ocaml | open Import
open Fiber.O
type server =
{ run : unit Fiber.t
; stop : unit Fiber.t
; ready : unit Fiber.t
}
type t =
{ server : server
; pool : Fiber.Pool.t
; mutable state : [ `Awaiting_start | `Running | `Stopped ]
}
let t = Fiber.Var.create ()
let stop ({ state; server; pool } as t) =
let* () = ... | |
133fbe871770bce8efe5f73bda7df7f984a2ac045090e45b1d53a8b313536bc1 | rmloveland/scheme48-0.53 | locations.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Locations
(define location-rtd
(make-record-type 'location '(id defined? contents)))
(define-record-discloser location-rtd
(lambda (l) `(location ,(location-id l))))
(define make-undefined-location
(let ((make (record-constructor location-rtd
... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/alt/locations.scm | scheme | Locations | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define location-rtd
(make-record-type 'location '(id defined? contents)))
(define-record-discloser location-rtd
(lambda (l) `(location ,(location-id l))))
(define make-undefined-location
(let ((make (record-constructor location-rtd
'(id def... |
29478c6a0600479bc04043bc71619fbf73bdf8d072b2e3a287328ed7d46e6a22 | fluree/db | dbproto.cljc | (ns fluree.db.dbproto)
(defprotocol IFlureeDb
(-latest-db [db] "Updates a db to the most current version of the db known to this server. Maintains existing policy.")
(-rootdb [db] "Returns root db version of this db.")
(-forward-time-travel [db flakes] [db tt-id flakes])
;; schema-related
(-c-prop [db proper... | null | https://raw.githubusercontent.com/fluree/db/dd238e8b2c5f9bd3199e5761a7f3dbade9661709/src/fluree/db/dbproto.cljc | clojure | schema-related | (ns fluree.db.dbproto)
(defprotocol IFlureeDb
(-latest-db [db] "Updates a db to the most current version of the db known to this server. Maintains existing policy.")
(-rootdb [db] "Returns root db version of this db.")
(-forward-time-travel [db flakes] [db tt-id flakes])
(-c-prop [db property collection] "Retu... |
620685b9b28583694e94c0ee3974bff89617f0eaaf8d863c2c723cc6a6d69106 | acarrico/wayland-protocol | info.rkt | #lang info
(define collection 'multi)
| null | https://raw.githubusercontent.com/acarrico/wayland-protocol/7270ae8f420c8062466c230e7cf3fe5331fe9fbd/info.rkt | racket | #lang info
(define collection 'multi)
| |
402ba5838382e49a6949a9b74575979662c3868c8eb7119077ee7a8fa1f7dd97 | alesaccoia/festival_flinger | cmu_us_rms_durdata.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;;; ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_rms_cg/festvox/cmu_us_rms_durdata.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission to use, copy, modify, distribute this software and its ;;
documentatio... |
(set! cmu_us_rms::phone_durs
'(
(uh 0.067 0.025)
(hh 0.061 0.028)
(ao 0.138 0.046)
(hv 0.053 0.020)
(v 0.051 0.019)
(ih 0.058 0.023)
(el 0.111 0.043)
(ey 0.132 0.042)
(em 0.080 0.033)
(jh 0.094 0.024)
(w 0.054 0.023)
(uw 0.107 0.044)
(ae 0.120 0.036)
(en 0.117 0.056)
(k 0.089 0.034)
(y ... |
48642f2ff268fcc1cae3857d7449e78fb609556c7601966ad0b925c79b62f9c9 | sionescu/iolib | file-path.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; --- New pathnames.
;;;
(in-package :iolib/pathnames)
;;;-------------------------------------------------------------------------
;;; Classes and Types
;;;-------------------------------------------------------------------------
(eval-when (:compile-toplevel :lo... | null | https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/pathnames/file-path.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
--- New pathnames.
-------------------------------------------------------------------------
Classes and Types
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Constants
---... |
(in-package :iolib/pathnames)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant +file-path-host-type+
#+unix 'unix-path
#+windows 'unc-path))
(defclass file-path ()
((host :initarg :host)
(device :initarg :device)
(components :initarg :components
:initform nil))... |
a1acefe217a38a1a39f6d81eb4014646611774171118a233d768b27b0ddc7872 | MinaProtocol/mina | mina_block_header.mli | open Utils
module Types : sig
module type S = sig
module V2 : S0
end
end
module type Concrete = sig
module V2 : sig
type t =
{ protocol_state : Mina_state_protocol_state.Value.V2.t
; protocol_state_proof : Mina_base.Proof.V2.t
; delta_block_chain_proof :
Data_hash_lib.State_h... | null | https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/mina_wire_types/mina_block/mina_block_header.mli | ocaml | open Utils
module Types : sig
module type S = sig
module V2 : S0
end
end
module type Concrete = sig
module V2 : sig
type t =
{ protocol_state : Mina_state_protocol_state.Value.V2.t
; protocol_state_proof : Mina_base.Proof.V2.t
; delta_block_chain_proof :
Data_hash_lib.State_h... | |
1bf64850b3e4eba5bd8ab998105301cebe73fe6b26f1e81679383a8f133d17d9 | polyfy/polylith | interface.clj | (ns polylith.clj.core.test-runner-orchestrator.interface
(:require [polylith.clj.core.test-runner-orchestrator.core :as core]))
(defn run [workspace is-verbose color-mode]
(core/run workspace is-verbose color-mode))
| null | https://raw.githubusercontent.com/polyfy/polylith/349875fa6898d5f8c785c0d7279e6d35c7a39086/components/test-runner-orchestrator/src/polylith/clj/core/test_runner_orchestrator/interface.clj | clojure | (ns polylith.clj.core.test-runner-orchestrator.interface
(:require [polylith.clj.core.test-runner-orchestrator.core :as core]))
(defn run [workspace is-verbose color-mode]
(core/run workspace is-verbose color-mode))
| |
4677facf1e19b9a08786a0012583a006bc88852e71a9ccfae8f84beb4cf90fd3 | jaredly/reason-language-server | config.ml | #2 "utils/config.mlp"
(**************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/config.ml | ocaml | ************************************************************************
OCaml
... | #2 "utils/config.mlp"
, projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let version = Sys.ocaml_version
let standard_library_default = "/usr/local/lib/oca... |
67f87b507a165bdcaa351b96f75e8258e44fc63e839b32be09ea17a0f2742ecc | yuriy-chumak/ol | iteration.scm | ; r5rs
4.2.4 . Iteration
(define-library (scheme r5rs iteration)
(export
do)
(import
(scheme core))
(begin
library syntax : do ( ( < variable1 > < > < step1 > ) ... ) ( < test > < expression > ... ) < command > ...
(define-syntax do ; ?
(syntax-rules ()
((do ((var init step) ...) (test ... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/scheme/r5rs/iteration.scm | scheme | r5rs
?
end. | 4.2.4 . Iteration
(define-library (scheme r5rs iteration)
(export
do)
(import
(scheme core))
(begin
library syntax : do ( ( < variable1 > < > < step1 > ) ... ) ( < test > < expression > ... ) < command > ...
(syntax-rules ()
((do ((var init step) ...) (test expr ...) command ...)
... |
f5b666f15c07d2753a2c66e398c73bc2ae3db80a3bd4379ac5f6188d503c8977 | haskell-CI/hackage-matrix-builder | PkgId.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StrictData #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wall #
... | null | https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-lib/PkgId.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
|
--------------------------------------------------------------------------
TODO: validation
TODO: validatation!
--------------------------------------------------------------------------
di... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StrictData #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -ddump - splices # - }
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
module PkgId... |
3771d46847ec341975df8ab7d596ba0e9f227a340e0d84e47b030c7e07a87f70 | racket/rhombus-prototype | setmap.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
"setmap-parse.rkt"
"map.rkt"
(submod "map.rkt" for-build)
(submod "map.rkt" for-info)
(submod "map.rkt" for-binding)
"set.rkt"
(submod "set.rkt" for-build)
(s... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/dcf7fb9b002c0957fc0adbf9bd3475c26a8b2c01/rhombus/private/setmap.rkt | racket | we use `parse-setmap-content` just to pick between maps and sets;
limited set of splices | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
"setmap-parse.rkt"
"map.rkt"
(submod "map.rkt" for-build)
(submod "map.rkt" for-info)
(submod "map.rkt" for-binding)
"set.rkt"
(submod "set.rkt" for-build)
(s... |
33f9a6e325b69c19bda845751e00a9ff87a4170485c0a5d30255b378e1e9edd8 | returntocorp/semgrep | scala_to_generic.ml |
*
* Copyright ( C ) 2021 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... | null | https://raw.githubusercontent.com/returntocorp/semgrep/dcea978347df81cbc8f2c2b49b80c1980f6194cf/languages/scala/generic/scala_to_generic.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Helpers
************************************************************************... |
*
* Copyright ( C ) 2021 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... |
23815f82a165a71d5f2e4b3788b48cf143732e7664ca0786525fc5fede72c476 | melange-re/melange | lam_pass_remove_alias.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* 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 , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/core/lam_pass_remove_alias.mli | ocaml | * Keep track of the global module Aliases | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* 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 , either version 3 of the License , or
* ( at your option ) any later... |
68f5c99bf012df5ba4a03e59ea7b2189998a45da1e8f650dcaec9270905ac777 | clojure-interop/aws-api | AbstractAWSSecurityHub.clj | (ns com.amazonaws.services.securityhub.AbstractAWSSecurityHub
"Abstract implementation of AWSSecurityHub. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.securityhub/src/com/amazonaws/services/securityhub/AbstractAWSSecurityHub.clj | clojure | (ns com.amazonaws.services.securityhub.AbstractAWSSecurityHub
"Abstract implementation of AWSSecurityHub. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com... | |
e21558eac1cf27a6851df79e8463de715aa4b66656a75e545f26dfa9098e219f | Xetera/placewaifu | Stack.hs | module Waifu.Server.Stack
( WaifuM
, runWaifuM
, askRandomImage
, askSimilarImage
, randomList
, SetupM
, SetupException(..)
, runSetupM
, loadImages
) where
import Control.Exception hiding (Handler)
import Control.Monad.Except
import Control.Monad.Logger
import Control.Monad.Re... | null | https://raw.githubusercontent.com/Xetera/placewaifu/8691f356bdc5ecc804e443479f118055e5f009d7/src/Waifu/Server/Stack.hs | haskell | module Waifu.Server.Stack
( WaifuM
, runWaifuM
, askRandomImage
, askSimilarImage
, randomList
, SetupM
, SetupException(..)
, runSetupM
, loadImages
) where
import Control.Exception hiding (Handler)
import Control.Monad.Except
import Control.Monad.Logger
import Control.Monad.Re... | |
dbaf051f29e923f5938da3f34b329c02a127fba28a2ede3ed5367fd6a7b36ddf | zellige/hastile | Token.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TypeOperators #-}
module Hastile.Lib.Token where
import qualified Control.Monad.IO.Class as IOClass
import qualified Data.IORef as IORef... | null | https://raw.githubusercontent.com/zellige/hastile/4dabe66bd997e91128ab4136b6f40da51c204a2b/src/Hastile/Lib/Token.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Hastile.Lib.Token where
import qualified Control.Monad.IO.Class as IOClass
import qualified Data.IORef as IORef (atomicModifyIORef')
import qualified Data.LruCache as LRU
import qualified Data.LruCache.IO as LRUIO... |
3973afc820f0ab2758c31543643aec7c08e9a17a30f27645ce7ca8ce6d9436dc | Liutos/Project-Euler | pro42.lisp | Required the 3rd party library CL - PPCRE
;; Loaded by quicklisp: (ql:quickload "cl-ppcre")
(defun triangle-word-p (word)
(let ((sum 0))
(dotimes (i (length word))
(let ((c (char word i)))
(incf sum (1+ (- (char-code c) (char-code #\A))))))
(let ((n (truncate (1- (truncate (sqrt (1+ (* 8 sum))... | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/lisp/pro42.lisp | lisp | Loaded by quicklisp: (ql:quickload "cl-ppcre") | Required the 3rd party library CL - PPCRE
(defun triangle-word-p (word)
(let ((sum 0))
(dotimes (i (length word))
(let ((c (char word i)))
(incf sum (1+ (- (char-code c) (char-code #\A))))))
(let ((n (truncate (1- (truncate (sqrt (1+ (* 8 sum))))) 2)))
(= (truncate (* n (1+ n)) 2) sum)))... |
03c5f1e86950bbf3ca34b39f40417147e68ffa504d8eb9f59b7f51f40634b47c | anuyts/menkar | Syntax.hs | # LANGUAGE StandaloneDeriving #
module Menkar.Raw.Syntax.Syntax where
import Menkar.System.Basic
import Menkar.System.Raw
import Menkar.Basic.Syntax
import Control.DeepSeq.Redone
import Data.String.Utils (replace)
import Data.Hashable
import Data.Kind
import GHC.Generics
{- For some reason, this document corrupts ... | null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Menkar/Raw/Syntax/Syntax.hs | haskell | For some reason, this document corrupts the state of the compiler. Sometimes you have to add a comment here
to get the compiler to reconsider this document. E.g. you can add a dot below:
......................
case; induction
deriving Show
deriving Show
deriving Show
deriving Show
deriving Show
deriving Show
-... | # LANGUAGE StandaloneDeriving #
module Menkar.Raw.Syntax.Syntax where
import Menkar.System.Basic
import Menkar.System.Raw
import Menkar.Basic.Syntax
import Control.DeepSeq.Redone
import Data.String.Utils (replace)
import Data.Hashable
import Data.Kind
import GHC.Generics
data Eliminator (sys :: KSys) =
ElimDots... |
dcaacdf3b65f7c769ba3d75fc1caa9b6e9b5cda319254dcf184e4814a747124e | UnkindPartition/lexer-applicative | test.hs | # LANGUAGE ScopedTypeVariables #
import Test.Tasty
import Test.Tasty.HUnit
import Language.Lexer.Applicative
import Text.Regex.Applicative
import Text.Regex.Applicative.Common
import Data.Char
import Data.Monoid
import Data.Loc
import Control.Exception
import Control.DeepSeq
ws = whitespace $ longest $ some (psym is... | null | https://raw.githubusercontent.com/UnkindPartition/lexer-applicative/7905a6373d7f6bd7b85a52f5aa7a12ab2cec2510/tests/test.hs | haskell | this is bad, because it accepts an empty string
This recognizes C-style block comments like /* ... */,
but also matching delimiters like /*** ... ***/ (to make it more fun)
orphan | # LANGUAGE ScopedTypeVariables #
import Test.Tasty
import Test.Tasty.HUnit
import Language.Lexer.Applicative
import Text.Regex.Applicative
import Text.Regex.Applicative.Common
import Data.Char
import Data.Monoid
import Data.Loc
import Control.Exception
import Control.DeepSeq
ws = whitespace $ longest $ some (psym is... |
5653c7126f1bb375d9dd12d238defd3ff4302bd9a976cd9b55dd1c27bfae0770 | vilmibm/murepl | routes.clj | (ns murepl.routes
(:require [cheshire.core :as json]
[compojure.core :refer [defroutes GET POST]]
[compojure.route :refer [resources]]
[taoensso.timbre :as log]
[murepl.commands] ; required for binding form
[murepl.core :as core]))
(defn build-respon... | null | https://raw.githubusercontent.com/vilmibm/murepl/74ee5979ef2f09301103d0281b35a7e226bc1997/src/murepl/routes.clj | clojure | required for binding form | (ns murepl.routes
(:require [cheshire.core :as json]
[compojure.core :refer [defroutes GET POST]]
[compojure.route :refer [resources]]
[taoensso.timbre :as log]
[murepl.core :as core]))
(defn build-response [body-map]
(let [body-map (if (contains? body-map :pl... |
ca6f433acaba9f91e0803bc2010072da403700ce28a89e14b1ecf7f7d8e165a9 | vyos/vyconf | util_test.ml | open OUnit2
open Util
let test_find_xml_child_existent test_ctxt =
let elem = Xml.Element ("foo", [],
[Xml.Element ("bar", [], []);
Xml.PCData "baz"])
in
match (find_xml_child "bar" elem) with
| None -> assert_failure "find_xml_child returned Non... | null | https://raw.githubusercontent.com/vyos/vyconf/dd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5/test/util_test.ml | ocaml | open OUnit2
open Util
let test_find_xml_child_existent test_ctxt =
let elem = Xml.Element ("foo", [],
[Xml.Element ("bar", [], []);
Xml.PCData "baz"])
in
match (find_xml_child "bar" elem) with
| None -> assert_failure "find_xml_child returned Non... | |
763109b6ae93c62d3254cbf41b90465aeed2679f05cdb0369c473c3c272446e5 | finnishtransportagency/harja | paallyste_ja_alusta_yhteiset.cljs | (ns harja.views.urakka.pot2.paallyste-ja-alusta-yhteiset
(:require [reagent.core :refer [atom] :as r]
[harja.ui.napit :as napit]
[harja.ui.ikonit :as ikonit]
[harja.ui.varmista-kayttajalta :as varmista-kayttajalta]
[harja.tiedot.urakka.pot2.pot2-tiedot :as pot2-tiedot]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/c74c02b85ff6303e4bc210c853fd94588e01945a/src/cljs/harja/views/urakka/pot2/paallyste_ja_alusta_yhteiset.cljs | clojure | (ns harja.views.urakka.pot2.paallyste-ja-alusta-yhteiset
(:require [reagent.core :refer [atom] :as r]
[harja.ui.napit :as napit]
[harja.ui.ikonit :as ikonit]
[harja.ui.varmista-kayttajalta :as varmista-kayttajalta]
[harja.tiedot.urakka.pot2.pot2-tiedot :as pot2-tiedot]
... | |
8afbe6f299d2b0954747f43b27feb28b4774ebf16f3ef2fd78d9d986656457e4 | mumuki/mulang | Combiner.hs | module Language.Mulang.Inspector.Combiner (
detect,
locate,
scoped,
scopedList,
transitive,
transitiveList,
Location (..)) where
import Language.Mulang.Ast
import Language.Mulang.Generator (transitiveReferencedIdentifiers, declarationsOf, declaredIdentifiers)
import Language.Mulang.Inspector.Primitive
d... | null | https://raw.githubusercontent.com/mumuki/mulang/92684f687566b2adafb331eae5b5916e2d90709e/src/Language/Mulang/Inspector/Combiner.hs | haskell | ^ No subexpression match, nor the whole expression
^ No subexpression match, but the whole expression
| Answers those identifiers that are bound to expressions that match the given inspection
| Answers the Locations of those expressions that match the given inspection | module Language.Mulang.Inspector.Combiner (
detect,
locate,
scoped,
scopedList,
transitive,
transitiveList,
Location (..)) where
import Language.Mulang.Ast
import Language.Mulang.Generator (transitiveReferencedIdentifiers, declarationsOf, declaredIdentifiers)
import Language.Mulang.Inspector.Primitive
d... |
5dd60624ec0a7780e9ef0df82cd099f58d50f8a47303aaedb4880225c46d6297 | K2InformaticsGmbH/egambo | egambo_tictac_win_8_6_5_p.erl | -module(egambo_tictac_win_8_6_5_p).
-export([win/2]).
% generated in egambo_tictac_wip
win(<<P:8, P:8, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, P:8, P:8, _:24, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, P:8, _:24, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, _:24, P:8, P:8, P:8, _/binary>>, P) -... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_tictac_win_8_6_5_p.erl | erlang | generated in egambo_tictac_wip | -module(egambo_tictac_win_8_6_5_p).
-export([win/2]).
win(<<P:8, P:8, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, P:8, P:8, _:24, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, P:8, _:24, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, _:24, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, _:24, P:8, P:8... |
3baa79faeb7c977ca37b0f68814b212da0f32cbcaaefe2e4fc332898d7e43d60 | 2600hz-archive/whistle | media_importer_sup.erl |
-module(media_importer_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ===================================================... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/utils/media_importer/src/media_importer_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... |
-module(media_importer_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
{ok, { {one_for_one, 5, 10}, []} }.
|
8c6a4aca34c66c0f5e17d8eb5ef336c8fdbc6141bf96351e1ebc54e70e744f26 | RichiH/git-annex | RepoProblem.hs | git - annex assistant remote problem handling
-
- Copyright 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.RepoProblem where
import Assistant.Common
import Assistant.Types.Re... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/RepoProblem.hs | haskell | Gets all repositories that have problems. Blocks until there is at
- least one.
Indicates that there was a problem with a repository, and the problem
- appears to not be a transient (eg network connection) problem.
-
- If the problem is able to be repaired, the passed action will be run.
- (However, if multiple... | git - annex assistant remote problem handling
-
- Copyright 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.RepoProblem where
import Assistant.Common
import Assistant.Types.Re... |
96d9f3104f685b57ed26ce9f9dc210c3d923b560bf59bb819103b20e0c5a36ac | proger/mod_pushoff | mod_pushoff_cow_hpack.erl | Copyright ( c ) 2015 - 2018 , < >
%%
%% Permission to use, copy, modify, and/or 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 IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/proger/mod_pushoff/e3b78c62d026aba339143071a207083b1351164b/src/mod_pushoff_cow_hpack.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2015 - 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(mod_pushoff_cow_hpack).
-dialyzer(no_imprope... |
906cff44ac77eea5bc457a5fb8c660e387da993635d9c46f7d6d4c1b2862b859 | dmitryvk/sbcl-win32-threads | primordial-extensions.lisp | ;;;; various user-level definitions which need to be done particularly
;;;; early
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public doma... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/primordial-extensions.lisp | lisp | various user-level definitions which need to be done particularly
early
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
target constants which need to appear as early as possible
an intern... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
as early as possible because it appears in macroexpansions for
CMU CL 18b used : EMPTY for this... |
0d6a39e6dbb2d13c91869b5b791c4009b5bdffccf86d2f54a2d1535e3d89ae08 | helvm/helma | DumpType.hs | module HelVM.HelMA.Automaton.Types.DumpType where
import HelVM.HelMA.Automaton.IO.BusinessIO
import HelVM.HelIO.Control.Logger
import HelVM.HelIO.Extra
import HelVM.HelIO.SwitchEnum
logDump :: (BIO m , Show d) => DumpType -> d -> m ()
logDump dt d = logDump' $ dump dt d where... | null | https://raw.githubusercontent.com/helvm/helma/a843fb86f4f51c84fd8c65970d0fb0221d551218/hs/src/HelVM/HelMA/Automaton/Types/DumpType.hs | haskell | | Constructors
| Types | module HelVM.HelMA.Automaton.Types.DumpType where
import HelVM.HelMA.Automaton.IO.BusinessIO
import HelVM.HelIO.Control.Logger
import HelVM.HelIO.Extra
import HelVM.HelIO.SwitchEnum
logDump :: (BIO m , Show d) => DumpType -> d -> m ()
logDump dt d = logDump' $ dump dt d where... |
af9eb2f8be6991f8c4323b8ad4c14260aa54b07ad78d5eee82fd34664be22156 | mtolly/onyxite-customs | BNK.hs | {-
Done with the help of
(*.bnk)
-}
{-# LANGUAGE ImplicitParams #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Onyx.Rocksmith.BNK where
import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import ... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Rocksmith/BNK.hs | haskell |
Done with the help of
(*.bnk)
# LANGUAGE ImplicitParams #
# LANGUAGE OverloadedStrings #
more stuff we don't care about
more stuff we don't care about | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module Onyx.Rocksmith.BNK where
import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import Data.Binary.Get
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
impor... |
62d982c9aa516ee3d60c3126349b795cedb9c044fff8e86e769534d023d3ce15 | input-output-hk/cardano-wallet | UtilSpec.hs | # LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Numeric.UtilSpec
( spec
) where
import Prelude
import Cardano.Numeric.Util
( equipartitionNatural, padCoalesce, partitionNatural, power )
import Data.List.NonEmpty
( NonEmpty (..) )
import Data.Maybe
( mapMaybe )
i... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/7b541e0b11fdd69b30d94104dbd5fa633ff1d5c3/lib/numeric/test/unit/Cardano/Numeric/UtilSpec.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Equipartitioning natural numbers
-------------------------------------------------... | # LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Numeric.UtilSpec
( spec
) where
import Prelude
import Cardano.Numeric.Util
( equipartitionNatural, padCoalesce, partitionNatural, power )
import Data.List.NonEmpty
( NonEmpty (..) )
import Data.Maybe
( mapMaybe )
i... |
b34974888d04b1978c5a28b4b5ee17791373b8f5c777ddb3147ead90888f850f | octaspace/orc | orc_sup.erl | -module(orc_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Childs = [
#{id => orc_vrf, start => {orc_vrf, start_link, []}}
#{id => orc_sysmon, start => {orc_sysmon, start_link, []}}
... | null | https://raw.githubusercontent.com/octaspace/orc/d3476f8a65f2d4f6185aa086bf7673570bf73a41/src/orc_sup.erl | erlang | -module(orc_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Childs = [
#{id => orc_vrf, start => {orc_vrf, start_link, []}}
#{id => orc_sysmon, start => {orc_sysmon, start_link, []}}
... | |
53b34374967ad321297330e987773303569d2c4eff8c58d05df73df7ef7d1f2f | atlas-engineer/nyxt | macro-edit.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
(define-test toggle-macro-edit-mode ()
(let ((buffer (make-instance 'modable-buffer)))
(with-current-buffer buffer
(assert-true (enable-modes* 'nyxt/macro-edit-mode:macro-edit-mode buffe... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/macro-edit.lisp | lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
(define-test toggle-macro-edit-mode ()
(let ((buffer (make-instance 'modable-buffer)))
(with-current-buffer buffer
(assert-true (enable-modes* 'nyxt/macro-edit-mode:macro-edit-mode buffe... | |
f350122e233d3e828fa0f8394634055d16224d484642ad9cd993f0905509db9f | shirok/Gauche | 115.scm | became scheme.regex
(define-module srfi.115 (extend scheme.regex))
| null | https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/srfi/115.scm | scheme | became scheme.regex
(define-module srfi.115 (extend scheme.regex))
| |
ad563cdcc3f7cb3947d2813a3786369c10291848c0740bb2b2cbc92f3580598e | tank-bohr/bookish_spork | bookish_spork_blocking_queue.erl | -module(bookish_spork_blocking_queue).
-include("bookish_spork_blocking_queue.hrl").
-export([
start_link/0,
in/2,
out/1,
out/2
]).
-behaviour(gen_server).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2
]).
-type element() :: any().
-record(state, {
waiting = queue... | null | https://raw.githubusercontent.com/tank-bohr/bookish_spork/f23fb13b997996a43ea26a4353c8cb810c821782/src/bookish_spork_blocking_queue.erl | erlang | no elements therefore we wait
return the next element
no waiters we just save the item
feed next waiter
Already replied | -module(bookish_spork_blocking_queue).
-include("bookish_spork_blocking_queue.hrl").
-export([
start_link/0,
in/2,
out/1,
out/2
]).
-behaviour(gen_server).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2
]).
-type element() :: any().
-record(state, {
waiting = queue... |
f2d696f5385af746b44766f51f3923a62c3670b997928c7bf53d32ba0cef146d | lispnik/iup | buttons.lisp | (defpackage #:iup-examples.buttons
(:use #:common-lisp)
(:export #:buttons))
(in-package #:iup-examples.buttons)
(defun buttons ()
(iup:with-iup ()
(let* ((button1
(iup:button :title "Button 1"
:action #'(lambda (handle)
(declare (ignore handle))
(iup:message "LOL" "We forgot to ... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/incomplete/buttons.lisp | lisp | (defpackage #:iup-examples.buttons
(:use #:common-lisp)
(:export #:buttons))
(in-package #:iup-examples.buttons)
(defun buttons ()
(iup:with-iup ()
(let* ((button1
(iup:button :title "Button 1"
:action #'(lambda (handle)
(declare (ignore handle))
(iup:message "LOL" "We forgot to ... | |
4bbb215e0b5dab718c4d30bc9d3e111cd7bde232e4ef2ee7dd05cddd18825aff | slipstream/SlipStreamServer | configuration_lifecycle_test_utils.clj | (ns com.sixsq.slipstream.ssclj.resources.configuration-lifecycle-test-utils
(:require
[clojure.data.json :as json]
[clojure.test :refer :all]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]]
[com.sixsq.slipstream.ssc... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/configuration_lifecycle_test_utils.clj | clojure | anonymous create should fail
user create should also fail
admin create with invalid template fails
full configuration lifecycle as administrator should work
admin get succeeds
check the contents
anonymous query fails
admin query succeeds
verify that all entries are accessible
try editing the configuration
ad... | (ns com.sixsq.slipstream.ssclj.resources.configuration-lifecycle-test-utils
(:require
[clojure.data.json :as json]
[clojure.test :refer :all]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]]
[com.sixsq.slipstream.ssc... |
81d16ef2a143188b2eeba095d018cff513ce7a7099b4deb2c153f060aaf579c4 | chapmanb/r-var | model.clj | (comment "
Data store models representing objects of interest with key/val pairs.
")
(ns rvar.model
(:require [clojure.contrib.json :as json]
[clojure.contrib.str-utils2 :as str2]
[appengine-magic.services.datastore :as ds]
[appengine-magic.services.memcache :as mc]))
Entity de... | null | https://raw.githubusercontent.com/chapmanb/r-var/6fce17dd0460c78c3a210a95f16aacbdd70ccf0a/src/rvar/model.clj | clojure | Allow retrieval by memcached to reduce datastore access
High level access functions instead of direct datastore access | (comment "
Data store models representing objects of interest with key/val pairs.
")
(ns rvar.model
(:require [clojure.contrib.json :as json]
[clojure.contrib.str-utils2 :as str2]
[appengine-magic.services.datastore :as ds]
[appengine-magic.services.memcache :as mc]))
Entity de... |
bde274ebb4847af52e12fc52a1d27d31fa10f02282efb9f92e5220c61a30c254 | ayazhafiz/plts | ast_parse.ml | open Ast
let string_of_position ({ pos_lnum; pos_cnum; pos_bol; _ } : Lexing.position) =
Printf.sprintf "%d:%d" pos_lnum (pos_cnum - pos_bol + 1)
let fresh_var_generator () =
let n = ref 0 in
fun () ->
incr n;
ref (Unbd !n)
let fresh_resume_name_generator () =
let n = ref 0 in
fun () ->
incr n;... | null | https://raw.githubusercontent.com/ayazhafiz/plts/6dfa9340457ec897ddf40a87feee44dd6200921a/fx_cap/ast_parse.ml | ocaml | open Ast
let string_of_position ({ pos_lnum; pos_cnum; pos_bol; _ } : Lexing.position) =
Printf.sprintf "%d:%d" pos_lnum (pos_cnum - pos_bol + 1)
let fresh_var_generator () =
let n = ref 0 in
fun () ->
incr n;
ref (Unbd !n)
let fresh_resume_name_generator () =
let n = ref 0 in
fun () ->
incr n;... | |
c66f979c2fcf70229a594545dc71f031cf635a95383fcb70082475079049a73d | bburdette/chordster | ForkeyOpen.hs | module ForkeyOpen
where
import qualified Database.Persist.Sqlite as PSqlite
import qualified Database.Sqlite as Sqlite
import qualified Database.Persist.Sql as Psql
import Data.Text
import Data.Int
import System.IO
import Control.Monad.IO.Class
import Control.Monad.Trans.Control
import Control.Monad.Logger
import... | null | https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/ForkeyOpen.hs | haskell | module ForkeyOpen
where
import qualified Database.Persist.Sqlite as PSqlite
import qualified Database.Sqlite as Sqlite
import qualified Database.Persist.Sql as Psql
import Data.Text
import Data.Int
import System.IO
import Control.Monad.IO.Class
import Control.Monad.Trans.Control
import Control.Monad.Logger
import... | |
da35ee1aa4ce31bd6d32a93eb684204ba7ce2fc574fd992324ce8d2ee3d38675 | CloudI/CloudI | trie_proper.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
-module(trie_proper).
-ifdef(TEST).
-behaviour(proper_statem).
-include_lib("proper/include/proper.hrl").
%% external interface
-export([qc_run/1, correct/1]).
%% proper_stat... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/lib/trie/test/trie_proper.erl | erlang | external interface
proper_statem callbacks
------------------------------------------------------------------------
External interface functions
------------------------------------------------------------------------
------------------------------------------------------------------------
Callback functions from p... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
-module(trie_proper).
-ifdef(TEST).
-behaviour(proper_statem).
-include_lib("proper/include/proper.hrl").
-export([qc_run/1, correct/1]).
-export([command/1, initial_state/0,... |
cad0b2b7daeefb518a97cf94e4b2c41dd42695b8fc19b1301db65a74368e17a1 | areina/elfeed-cljsrn | main.cljs | (ns ^:figwheel-no-load env.ios.main
(:require [reagent.core :as r]
[elfeed-cljsrn.ios.core :as core]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(def cnt (r/atom 0))
(defn reloader [] @cnt [core/app-root])
(def root-el (r/as-element [reloader]))
(figwheel... | null | https://raw.githubusercontent.com/areina/elfeed-cljsrn/4dea27f785d24a16da05c0ab2ac0c6a6f23360f1/env/dev/env/ios/main.cljs | clojure | (ns ^:figwheel-no-load env.ios.main
(:require [reagent.core :as r]
[elfeed-cljsrn.ios.core :as core]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(def cnt (r/atom 0))
(defn reloader [] @cnt [core/app-root])
(def root-el (r/as-element [reloader]))
(figwheel... | |
5e68ff08799eeab4898835b3f53fa0c5bb7e572fe3370cbaea709172f359bbf0 | danhper/evm-analyzer | trace.ml | open Core
type t = {
gas: Int.t;
gas_cost: Int.t;
op: Op.t;
depth: Int.t;
pc: Int.t;
index: Int.t;
result: BigInt.t option;
children: t list;
} [@@deriving show, eq]
| null | https://raw.githubusercontent.com/danhper/evm-analyzer/9fb1cf6dc743c2f779973b2f0892047ebbd4e5fd/src/trace.ml | ocaml | open Core
type t = {
gas: Int.t;
gas_cost: Int.t;
op: Op.t;
depth: Int.t;
pc: Int.t;
index: Int.t;
result: BigInt.t option;
children: t list;
} [@@deriving show, eq]
| |
455f8af841480c857676090ebb0b4a4c95378de94a26525efb0c18f949aa3c6a | haskell-repa/repa | Main.hs | # LANGUAGE BangPatterns , RankNTypes , FlexibleContexts #
| Solver for the Laplace equation
You supply a BMP files specifying the boundary conditions .
The output is written back to another BMP file .
--
import Data.Array.Repa.Algorithms.Pixel
import Data.Array.Repa.Algorithms.ColorRamp
import Data.Arra... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/Laplace/src-repa/Main.hs | haskell |
^ Number of iterations to use.
^ Boundary value mask.
^ Boundary values.
^ Initial state.
| Command line usage information.
| Solve it.
^ Number of iterations to use.
^ Input file.
^ Output file
Load up the file containing boundary conditions.
Write out the result to a file.
| Extract the boundary value fr... | # LANGUAGE BangPatterns , RankNTypes , FlexibleContexts #
| Solver for the Laplace equation
You supply a BMP files specifying the boundary conditions .
The output is written back to another BMP file .
import Data.Array.Repa.Algorithms.Pixel
import Data.Array.Repa.Algorithms.ColorRamp
import Data.Array.R... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.