_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 |
|---|---|---|---|---|---|---|---|---|
74928d0429b0890728731178edd8a3dc671ccbb94560e683a233b369a22c0081 | mukul-rathi/bolt | name_mangle_generics.mli | * This module is responsible for name - mangling generics , so < int > - > _ Fooint
open Ast.Ast_types
open Typing
val name_mangle_generic_class : Class_name.t -> type_expr -> Class_name.t
val name_mangle_if_generic_class : Class_name.t -> type_expr option -> Class_name.t
val name_mangle_generics_usage_program : Typ... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/desugaring/name_mangle_generics.mli | ocaml | * This module is responsible for name - mangling generics , so < int > - > _ Fooint
open Ast.Ast_types
open Typing
val name_mangle_generic_class : Class_name.t -> type_expr -> Class_name.t
val name_mangle_if_generic_class : Class_name.t -> type_expr option -> Class_name.t
val name_mangle_generics_usage_program : Typ... | |
97778f5d6c6c3d235879b8a30877c699055039760139e7f11c7e8cbf6db6ea11 | bjornbm/astro | SV.hs | module Astro.Orbit.SV where
import Numeric.Units.Dimensional.LinearAlgebra.PosVel (CPos, CVel)
import Astro.Coords
import Astro.Coords.PosVel
| This is essentially identical to ' Astro . . PosVel . PosVel ' .
-- TODO: Why have both?
type SV = PosVel ECI
sv :: CPos a -> CVel a -> SV a
sv = C'
pos :: Floating a => ... | null | https://raw.githubusercontent.com/bjornbm/astro/f4fb2c4b739a0a8f68f51aa154285120d2230c30/src/Astro/Orbit/SV.hs | haskell | TODO: Why have both? | module Astro.Orbit.SV where
import Numeric.Units.Dimensional.LinearAlgebra.PosVel (CPos, CVel)
import Astro.Coords
import Astro.Coords.PosVel
| This is essentially identical to ' Astro . . PosVel . PosVel ' .
type SV = PosVel ECI
sv :: CPos a -> CVel a -> SV a
sv = C'
pos :: Floating a => SV a -> CPos a
pos = cpo... |
6feaf4c41a4356d1ff352dbc89c81965ff8dbdda15ee82737d41818a21d7bb44 | Decentralized-Pictures/T4L3NT | ticket_costs.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/ticket_costs.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN A... |
1d777ea9c4774323fcebba5c891290813c2342d8b447bc9fc80c5b07730d4d8d | michaelklishin/welle | core_test.clj | (ns clojurewerkz.welle.test.core-test
(:import com.basho.riak.client.raw.RawClient
[com.basho.riak.client.raw.http HTTPClientConfig$Builder HTTPClusterConfig])
(:require [clojurewerkz.welle.core :as wc]
[clojure.test :refer :all]))
(deftest connect-using-http-client-and-default-host-and-port... | null | https://raw.githubusercontent.com/michaelklishin/welle/3f3cd24af7c0d95489298e4096b362b6943f85ef/test/clojurewerkz/welle/test/core_test.clj | clojure | (ns clojurewerkz.welle.test.core-test
(:import com.basho.riak.client.raw.RawClient
[com.basho.riak.client.raw.http HTTPClientConfig$Builder HTTPClusterConfig])
(:require [clojurewerkz.welle.core :as wc]
[clojure.test :refer :all]))
(deftest connect-using-http-client-and-default-host-and-port... | |
4d00597429e3d076064b206ca5ecf8f6ca1a93f637469cee67b476013bd6d692 | wargrey/w3s | media.rkt | #lang typed/racket
(require "../main.rkt")
(require "../sugar.rkt")
(require "../background.rkt")
(require "configure.rkt")
(require "media.css")
(current-css-element-color 'Silver)
(default-stroke (desc-border #:width 1 #:color (current-css-element-color) #:style 'transparent))
(css-configure-@media)
(default-css-f... | null | https://raw.githubusercontent.com/wargrey/w3s/a3075072c6dc11eaa24c50aab99dc1bc01bae5bf/css/tamer/media.rkt | racket | NOTE
This is simple box, it only sets vertical/horizontal margins and paddings.
but to keep the css file portable, no new properties are introduced. | #lang typed/racket
(require "../main.rkt")
(require "../sugar.rkt")
(require "../background.rkt")
(require "configure.rkt")
(require "media.css")
(current-css-element-color 'Silver)
(default-stroke (desc-border #:width 1 #:color (current-css-element-color) #:style 'transparent))
(css-configure-@media)
(default-css-f... |
b0e03e44c052295a5f8d21b4fb0feccbb6a84a3d5bfd8aa422d6336fe5db7518 | ulrikstrid/ocaml-oidc | test.ml | let () =
let path = Sys.getenv_opt "REPORT_PATH" in
let report =
Junit.make
[
OidcParameters.suite;
Jwt.suite;
Jwks.suite;
Token.suite;
Scopes.suite;
Pkce.suite;
]
in
match path with Some path -> Junit.to_file report path | None -> ()
| null | https://raw.githubusercontent.com/ulrikstrid/ocaml-oidc/b9ea6486482cd55dea8020d0dd87614c2a95f8e0/test/test.ml | ocaml | let () =
let path = Sys.getenv_opt "REPORT_PATH" in
let report =
Junit.make
[
OidcParameters.suite;
Jwt.suite;
Jwks.suite;
Token.suite;
Scopes.suite;
Pkce.suite;
]
in
match path with Some path -> Junit.to_file report path | None -> ()
| |
778021a0d838cdec35c28d8caf79df77cea273f05aabc3af20aba6fa7d9234c3 | luc-tielen/llvm-codegen | Pretty.hs | module LLVM.Pretty
( renderDoc
, commas
, module Prettyprinter
) where
import Prettyprinter
import Prettyprinter.Render.Text
import Data.Text (Text)
import qualified Data.List as L
renderDoc :: Pretty a => a -> Text
renderDoc =
renderStrict . layoutPretty defaultLayoutOptions { layoutPageWidth = Unbounded }... | null | https://raw.githubusercontent.com/luc-tielen/llvm-codegen/75762cc9fd26082b1ee62f397e1a9c372f9e0aeb/lib/LLVM/Pretty.hs | haskell | module LLVM.Pretty
( renderDoc
, commas
, module Prettyprinter
) where
import Prettyprinter
import Prettyprinter.Render.Text
import Data.Text (Text)
import qualified Data.List as L
renderDoc :: Pretty a => a -> Text
renderDoc =
renderStrict . layoutPretty defaultLayoutOptions { layoutPageWidth = Unbounded }... | |
8bb22d0ca1385daa7d1426fa79de444c7a0374573b0dc065a5dfffbe9ab92a37 | jarvinet/scheme | callcc1.scm | (define (callcc1)
(call-with-current-continuation
callcc2))
| null | https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/src/callcc1.scm | scheme | (define (callcc1)
(call-with-current-continuation
callcc2))
| |
17afc49a0820fce9a1b705598b702f9fc65f9db41d77b624237d1cdccbdced6c | hidaris/thinking-dumps | a9-5.rkt | #lang racket
(require "parenthec.rkt")
(define-union expr
(const expr)
(var n)
(if test conseq alt)
(mult exp1 exp2)
(sub1 exp)
(zero exp)
(letcc body)
(throw k-exp v-exp)
(let exp body)
(lambda body)
(app rator rand))
(define value-of-cps
(lambda (exp env k)
(union-case exp expr
[(... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/05b6093c3d1239f06f3657cd3bd15bf5cd622160/c311/a9-5.rkt | racket | we don't need let/cc to grap cont, because we are cps!
discard outer k
(let ((f (lambda (f)
(lambda (n)
(* n ((f f) (sub1 n)))))))) | #lang racket
(require "parenthec.rkt")
(define-union expr
(const expr)
(var n)
(if test conseq alt)
(mult exp1 exp2)
(sub1 exp)
(zero exp)
(letcc body)
(throw k-exp v-exp)
(let exp body)
(lambda body)
(app rator rand))
(define value-of-cps
(lambda (exp env k)
(union-case exp expr
[(... |
09ae91170f62889a525770e7478f1ddae16b92f7e52ab3d6e8235f6fc83fc99a | rvirding/chat_demo | chat_server.erl | Copyright ( c ) 2011 - 2014 . All rights reserved .
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
%%
1 . Redistributions of source code must retain the above copyright
%% notice, this list of conditions... | null | https://raw.githubusercontent.com/rvirding/chat_demo/2979bdac2f7064244cbf86aaaf84b79ae891aeaa/src/chat_server.erl | erlang |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other mat... | Copyright ( c ) 2011 - 2014 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDERS OR FOR ANY DIRECT , INDIRECT... |
f7e6cde019c434af749fbe915725d92327f90fef1654edb3f90d3130e65d4fa5 | matthiasn/inspect | sled.cljs | (ns inspect.main.sled
(:require [taoensso.timbre :refer-macros [info error debug]]
[clojure.pprint :as pp]
;[neon-sled]
[cognitect.transit :as t]
[fs :refer [existsSync unlinkSync]]))
(def DB_PATH "/tmp/inspect.db")
(def r (t/reader :json))
(def w (t/writer :json))
#_(defn s... | null | https://raw.githubusercontent.com/matthiasn/inspect/963ae5e29fc1c836c620cfed67787f1b99c3fe0c/src/cljs/inspect/main/sled.cljs | clojure | [neon-sled]
(.syncAndClose sled) | (ns inspect.main.sled
(:require [taoensso.timbre :refer-macros [info error debug]]
[clojure.pprint :as pp]
[cognitect.transit :as t]
[fs :refer [existsSync unlinkSync]]))
(def DB_PATH "/tmp/inspect.db")
(def r (t/reader :json))
(def w (t/writer :json))
#_(defn state-fn [put-fn]
... |
449772e5e47f1b9e1ab707d02f131c1d548822b7ec988e8e03bc110b159bf9ea | PLTools/GT | test791showT.ml | open Printf
type 'a logic = Value of 'a | Var of int
(* [@@deriving gt { showT } ] *)
let rec logic_meta_gcata fa tpo trans initial_inh subj =
let self = logic_meta_gcata fa tpo trans in
match subj with
| Value p0 -> trans#c_Value initial_inh (GT.make self subj tpo) (fa p0)
| Var p0 -> trans#c_Var initial_in... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test791showT.ml | ocaml | [@@deriving gt { showT } ]
******************************************************************************** | open Printf
type 'a logic = Value of 'a | Var of int
let rec logic_meta_gcata fa tpo trans initial_inh subj =
let self = logic_meta_gcata fa tpo trans in
match subj with
| Value p0 -> trans#c_Value initial_inh (GT.make self subj tpo) (fa p0)
| Var p0 -> trans#c_Var initial_inh (GT.make self subj tpo) p0
let ... |
5dc9042c0bc676475ab81149016f09ee8ec67f77555e1f277f2d0d37a320ac0f | bobzhang/fan | test_meta.ml | #directory "_build/test_meta";
#require "dyp";
#load "test_parse_tree.cma";
open Test_parse_tree;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/test_meta.ml | ocaml | #directory "_build/test_meta";
#require "dyp";
#load "test_parse_tree.cma";
open Test_parse_tree;
| |
181ba76fa2f6367a73e3ab8ce389d64a2792e83b6a91a34129885979e992ed49 | cirfi/sicp-my-solutions | 2.01.scm | (define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
(define (make-rat n d)
(let ((g (gcd (abs n) (abs d))))
(cond ((< d 0)
(cons (/ (- n) g) (/ (- d) g)))
(else
(cons (/ n g) (/ d g))))))
| null | https://raw.githubusercontent.com/cirfi/sicp-my-solutions/4b6cc17391aa2c8c033b42b076a663b23aa022de/ch2/2.01.scm | scheme | (define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
(define (make-rat n d)
(let ((g (gcd (abs n) (abs d))))
(cond ((< d 0)
(cons (/ (- n) g) (/ (- d) g)))
(else
(cons (/ n g) (/ d g))))))
| |
9a9a5af1ed8f6e14420ca5f78d68247aa59112fd3a1ce2c1f91f7fe2a5a063c5 | sjoerdvisscher/free-functors | Free.hs | # OPTIONS_GHC -fno - warn - orphans -fno - warn - unused - matches #
# LANGUAGE
RankNTypes
, TypeFamilies
, TypeOperators
, DeriveFunctor
, , , TemplateHaskell
, , FlexibleInstances
, UndecidableInstances
, QuantifiedConstraints
, MultiParamTypeClasses
#
RankNTypes
... | null | https://raw.githubusercontent.com/sjoerdvisscher/free-functors/78bff2949e2f54afb4a0b59cd105a30645742b3a/src/Data/Functor/Free.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Functor.Free
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable
A free functor is left adjoint to a forgetful functor.
In this package the forg... | # OPTIONS_GHC -fno - warn - orphans -fno - warn - unused - matches #
# LANGUAGE
RankNTypes
, TypeFamilies
, TypeOperators
, DeriveFunctor
, , , TemplateHaskell
, , FlexibleInstances
, UndecidableInstances
, QuantifiedConstraints
, MultiParamTypeClasses
#
RankNTypes
... |
7d6b29ebfa80fd58fedf4f0281d484edbd3175cabdbdddd84ab78fad44cbfd28 | wdebeaum/step | young.lisp | ;;;;
W::YOUNG
;;;;
(define-words :pos W::n
:words (
((W::YOUNG W::TOM)
(senses
((LF-PARENT ONT::TURKEY)
(TEMPL MASS-PRED-TEMPL)
)
)
)
))
(define-words :pos W::adj :templ LESS-ADJ-TEMPL
:tags (:base500)
:words (
(W::YOUNG
(wordfeats (W::MORPH (:FORMS (-ER))))
(SENSES
(
(lf-p... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/young.lisp | lisp | W::YOUNG
(define-words :pos W::n
:words (
((W::YOUNG W::TOM)
(senses
((LF-PARENT ONT::TURKEY)
(TEMPL MASS-PRED-TEMPL)
)
)
)
))
(define-words :pos W::adj :templ LESS-ADJ-TEMPL
:tags (:base500)
:words (
(W::YOUNG
(wordfeats (W::MORPH (:FORMS (-ER))))
(SENSES
(
(lf-parent ont:... | |
65c3d2b98ffb0e5e422655f06387edf96c9e18f26415218783ad697e3d314dcf | hyperfiddle/electric | viz.clj | (ns geoffrey.hfdl.viz
(:require [dorothy.core :as dot]
[dorothy.jvm :as djvm]
[minitest :refer [tests]]
[leo.dataflow :as dataflow]
[clojure.string :as str]))
(def analyse dataflow/analyze-clj)
(def normalize dataflow/normalize-ast)
(def gen-name (comp str hash))
(de... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2021/hfdl/viz.clj | clojure | TODO use meander
link to parent, if it exists
make current node
recur on each child branch
link to parent, if it exists
Simple let
Conditionals | (ns geoffrey.hfdl.viz
(:require [dorothy.core :as dot]
[dorothy.jvm :as djvm]
[minitest :refer [tests]]
[leo.dataflow :as dataflow]
[clojure.string :as str]))
(def analyse dataflow/analyze-clj)
(def normalize dataflow/normalize-ast)
(def gen-name (comp str hash))
(de... |
0781208fbd99c0f734e581bfcb8acea8982cd8d36a9d0a50150814d09b41d1a1 | CompSciCabal/SMRTYPRTY | jace.rkt | #lang racket
;; Helper functions
(define (inc n) (+ n 1))
(define (cube x) (* x x x))
;; sum-recursive
(define (sum-recurse term a next b)
(if (> a b)
0
(+ (term a)
(sum-recurse term (next a) next b))))
;; Ex 1.30
(define (sum term a next b)
(define (iter a result)
(if (> a b)
... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v3/1.3/jace.rkt | racket | Helper functions
sum-recursive
Ex 1.30
Ex 1.31
defining product
defining PI
recursive definition
Suppose we have procedure f as:
(define (f g) (g 2))
and we were to evaluate
> (f f)
Well, let's evaluate it in applicative order...
> (f f)
Skipping 1.35 - 1.39. Too math for me at this point.
Ex 1.42
Ex 1... | #lang racket
(define (inc n) (+ n 1))
(define (cube x) (* x x x))
(define (sum-recurse term a next b)
(if (> a b)
0
(+ (term a)
(sum-recurse term (next a) next b))))
(define (sum term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) (+ (term a) resul... |
39491c8296613611562b6e84d61d03ad74eda513a3de07630e16a7b1e0fb405d | cl-axon/shop2 | apply-operator-bug.lisp | (in-package :shop2-user)
(defdomain display-buggy-operator-variable-bindings
(
(:method (should-fail ?x)
()
(:ordered
(!bind-variable ?x)
(!check-variable ?x)))
(:method (should-succeed ?x)
()
(:ordered
(!bind-variable ?x)
(!check-bound ?x)))
... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/examples/apply-operator-bug.lisp | lisp | preconditions
preconditions
preconditions | (in-package :shop2-user)
(defdomain display-buggy-operator-variable-bindings
(
(:method (should-fail ?x)
()
(:ordered
(!bind-variable ?x)
(!check-variable ?x)))
(:method (should-succeed ?x)
()
(:ordered
(!bind-variable ?x)
(!check-bound ?x)))
... |
5a5644d1a920cd1075cfdff0e6bea46a502a39b7342d9caa31d9d184918c0696 | typeable/octopod | Sort.hs | module Frontend.UIKit.Button.Sort
( sortButton,
SortButtonConfig (..),
SortButtonState (..),
)
where
import Control.Lens
import Data.Default
import Data.Generics.Labels ()
import Data.Text (Text)
import Frontend.Classes
import Frontend.UIKit.Button.Common
import GHC.Generics (Generic)
import Reflex.Dom
da... | null | https://raw.githubusercontent.com/typeable/octopod/b21e1bd8c8bcc023a5d1333192f25e83833d76a9/octopod-frontend/src/Frontend/UIKit/Button/Sort.hs | haskell | module Frontend.UIKit.Button.Sort
( sortButton,
SortButtonConfig (..),
SortButtonState (..),
)
where
import Control.Lens
import Data.Default
import Data.Generics.Labels ()
import Data.Text (Text)
import Frontend.Classes
import Frontend.UIKit.Button.Common
import GHC.Generics (Generic)
import Reflex.Dom
da... | |
8ee50c8ed89c5c62021e483db79b6717a64b8110a368089bc5aa7906173954cb | sile/jsone | jsone_encode_tests.erl | Copyright ( c ) 2013 - 2014 , < >
%% coding: latin-1
-module(jsone_encode_tests).
-include_lib("eunit/include/eunit.hrl").
-ifdef('NO_MAP_TYPE').
-define(OBJ0, {[]}).
-define(OBJ1(K, V), {[{K, V}]}).
-define(OBJ2(K1, V1, K2, V2), {[{K1, V1}, {K2, V2}]}).
-define(OBJECT_FROM_LIST(List), List).
-else.
-define(OBJ0... | null | https://raw.githubusercontent.com/sile/jsone/af04fd469ae6cffe86a45d9ca62042321ee88103/test/jsone_encode_tests.erl | erlang | coding: latin-1
Symbols
Numbers: Inline json term
Numbers: Integer
Numbers: Float",
Strings
other multi-byte characters
Strings variant: Datetimes
Arrays
Objects
key: atom
OK
OK
OK
key: number
OK
OK
key: datetime
OK
OK
key: array
OK
key: object
OK
OK
OK
Pretty Print
`map_unknown_value` optio... | Copyright ( c ) 2013 - 2014 , < >
-module(jsone_encode_tests).
-include_lib("eunit/include/eunit.hrl").
-ifdef('NO_MAP_TYPE').
-define(OBJ0, {[]}).
-define(OBJ1(K, V), {[{K, V}]}).
-define(OBJ2(K1, V1, K2, V2), {[{K1, V1}, {K2, V2}]}).
-define(OBJECT_FROM_LIST(List), List).
-else.
-define(OBJ0, #{}).
-define(OBJ... |
719572665051951919e68905227af428002af9b7115497831490661ec38bd365 | RefactoringTools/wrangler | refac_map_intro.erl | @private
-module(refac_map_intro).
-behaviour(gen_refac).
-compile(export_all).
-include("wrangler.hrl").
-export([input_par_prompts/0, select_focus/1, check_pre_cond/1, selective/0, transform/1]).
%%% Will need to input the number of Workers (NW)
input_par_prompts() -> ["Name of Partitioner: ", "Name of Combine... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/gen_refacs/refac_map_intro.erl | erlang | Will need to input the number of Workers (NW)
{Start, End}.
?MATCH(?T("{seq, f@}"), Expr@),
?MATCH(?T("{seq, f@}"), Expr@),
?MATCH(?T("{seq, f@}"), Expr@),
?TO_AST("blah")
==================== | @private
-module(refac_map_intro).
-behaviour(gen_refac).
-compile(export_all).
-include("wrangler.hrl").
-export([input_par_prompts/0, select_focus/1, check_pre_cond/1, selective/0, transform/1]).
input_par_prompts() -> ["Name of Partitioner: ", "Name of Combiner: ", "Name of new Worker: "].
select_focus(_... |
0e2cedb68587361eebfc6bf483019073963a41295a38d86b02b0457df9916f74 | ajhc/ajhc | read022.hs | module ShouldCompile where
f (x :: Int) = x + 1
| null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/0_parse/2_pass/ghc/read022.hs | haskell | module ShouldCompile where
f (x :: Int) = x + 1
| |
8239342e584f92bd74d79c9c1d1647524261657f78e7f8cb5010a569e05f1b17 | ftovagliari/ocamleditor | find_text_dialog.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/find_text_dialog.ml | ocaml | * create
* check_use_regexp
* check_case_sensitive
* check_search_backward
* check_selected_text_only
* Search path
* radio_specified_path
* radio_project_src
* radio_only_open_files
* Filename Pattern
*
Button box
Default values in entries
text <> ""
|
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at y... |
9b09d1ac3e769070bafffc4db40ffefa9bffb79cef5fcef1d96cef3e26705160 | lambdamikel/DLMAPS | execute_tests.lsp | ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % tests from Hustadt & Schmidt technical report %
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;;; test parameters = N tests/time-point L-start L-end L-step
; PS12
(mpi-test 4 100 4 120 4 :fname "R... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/prover/dl-benchmark-suite/FaCT-1-11/RandGen/Hustadt/execute_tests.lsp | lisp | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test parameters = N tests/time-point L-start L-end L-step
PS12
PS13: | % % % tests from Hustadt & Schmidt technical report %
(mpi-test 4 100 4 120 4 :fname "Results/ps12.text" :skip-tests T)
(mpi-test 6 100 6 180 6 :fname "Results/ps13.text" :skip-tests T)
|
36c94fda7f05048d4f9947c86c62615a3b1f801ede5ccf41b53037eb991d9884 | nikodemus/SBCL | ctor.lisp | ;;;; This file contains the optimization machinery for make-instance.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;; This software is derived from software originally released by
. Copyright and release statements follow . Later
;;;; modifications to the softw... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/pcl/ctor.lisp | lisp | This file contains the optimization machinery for make-instance.
more information.
This software is derived from software originally released by
modifications to the software are in the public domain and are
provided with absolutely no warranty. See the COPYING and
CREDITS files for more information.
All rights... |
This software is part of the SBCL system . See the README file for
. Copyright and release statements follow . Later
Copyright ( C ) 2002 < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of t... |
2bfc0be83f73f855b7face73e0776b80915eff16371177b7086d802cb38aea59 | tarides/opam-monorepo | pull.ml | open Import
Check that [ output_dir ] is strictly a descendant of [ duniverse_dir ]
let is_in_universe_dir ~duniverse_dir ~output_dir =
Fpath.(is_prefix (normalize duniverse_dir) (normalize output_dir))
&& not (String.equal (Fpath.filename output_dir) "")
(* Delete version control metadata and vendor subdirecto... | null | https://raw.githubusercontent.com/tarides/opam-monorepo/5ee35996fa796c36bf1754917232ce9040e91fe0/lib/pull.ml | ocaml | Delete version control metadata and vendor subdirectory | open Import
Check that [ output_dir ] is strictly a descendant of [ duniverse_dir ]
let is_in_universe_dir ~duniverse_dir ~output_dir =
Fpath.(is_prefix (normalize duniverse_dir) (normalize output_dir))
&& not (String.equal (Fpath.filename output_dir) "")
let do_trim_clone output_dir =
let open Result.O in
... |
72e359603dba2c6b55a8e083c591de25dc4a0bcdc79664ff7f9d9ce78f419d4f | bldl/magnolisp | info.rkt | #lang info
(define name "Magnolisp")
(define blurb
'("A toy programming language."))
(define scribblings '(("manual-src/magnolisp.scrbl" () (experimental))))
(define racket-launcher-libraries '("compiler-cli.rkt"))
(define racket-launcher-names '("mglc"))
(define deps '(("base" #:version "6.3") "data-lib" "scribble-l... | null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/info.rkt | racket | #lang info
(define name "Magnolisp")
(define blurb
'("A toy programming language."))
(define scribblings '(("manual-src/magnolisp.scrbl" () (experimental))))
(define racket-launcher-libraries '("compiler-cli.rkt"))
(define racket-launcher-names '("mglc"))
(define deps '(("base" #:version "6.3") "data-lib" "scribble-l... | |
1138d019485306d9e2ecb766080996b24972ffcb239b5942b053d9e2289ff841 | gsakkas/rite | 0099.ml | SeqG (AppG [EmptyG]) (ListG [EmptyG])
listReverse t; [h]
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0099.ml | ocaml | SeqG (AppG [EmptyG]) (ListG [EmptyG])
listReverse t; [h]
| |
980afc338fb439a62f48182d0494f3121b327d1341bb13520282f5883e3d090b | d-cent/objective8 | template_functions.clj | (ns objective8.front-end.templates.template-functions
(:require [net.cgrand.enlive-html :as html]))
(defn translator
"Returns a translation function which replaces the
content of nodes with translations for k"
[{:keys [translations] :as context}]
(fn [k]
#(assoc % :content (translations k))))
(defn text... | null | https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/src/objective8/front_end/templates/template_functions.clj | clojure | (ns objective8.front-end.templates.template-functions
(:require [net.cgrand.enlive-html :as html]))
(defn translator
"Returns a translation function which replaces the
content of nodes with translations for k"
[{:keys [translations] :as context}]
(fn [k]
#(assoc % :content (translations k))))
(defn text... | |
7f4d0b4fe2170d55d5ec21ae85a15f75351ce2be57a6bb2851ccbc1e6b5f1a38 | xh4/web-toolkit | cmac.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
cmac.lisp -- The CMAC algorithm from NIST 800 - 38B.
(in-package :crypto)
(defclass cmac (mac)
((cipher :reader cmac-cipher :initarg :cipher)
(subkey1 :reader cmac-subkey1 :initarg :subkey1
:type (simple-array (unsigned-byte 8) (*)))
(subkey2 :reade... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/macs/cmac.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*- | cmac.lisp -- The CMAC algorithm from NIST 800 - 38B.
(in-package :crypto)
(defclass cmac (mac)
((cipher :reader cmac-cipher :initarg :cipher)
(subkey1 :reader cmac-subkey1 :initarg :subkey1
:type (simple-array (unsigned-byte 8) (*)))
(subkey2 :reader cmac-subkey2 :initarg :subkey2
:t... |
faf4def1f7788383dc1f4185936a261d3c4fd52ca5e2b9a3a8745c71a3de0054 | simmsb/calamity | RunIntoIO.hs | | Something for converting polysemy actions into IO actions
module Calamity.Internal.RunIntoIO (
runSemToIO,
bindSemToIO,
) where
import Data.Functor
import Polysemy qualified as P
import Polysemy.Final qualified as P
runSemToIO :: forall r a. P.Member (P.Final IO) r => P.Sem r a -> P.Sem r (IO (Maybe a))
runS... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Internal/RunIntoIO.hs | haskell | | Something for converting polysemy actions into IO actions
module Calamity.Internal.RunIntoIO (
runSemToIO,
bindSemToIO,
) where
import Data.Functor
import Polysemy qualified as P
import Polysemy.Final qualified as P
runSemToIO :: forall r a. P.Member (P.Final IO) r => P.Sem r a -> P.Sem r (IO (Maybe a))
runS... | |
1a4ed0a6b1c96dba94c6ad16122af44bc3baf02ce1bc600835d5d3e33977c8cb | ndmitchell/catch | Apply.hs |
module Apply where
main = apply id True
apply f x = f x
| null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/Apply.hs | haskell |
module Apply where
main = apply id True
apply f x = f x
| |
96e0f58dd7919155a8639893324be4cbfa30551b5936e4e637f289350b941d92 | IronScheme/IronScheme | fp-test.sps | #!r6rs
(import
(rnrs)
(ironscheme clr))
(define (test i o)
(let* ((bp (get-bits i))
(n (string->number i))
(r (Double::ToString n))
(r2 (number->string n)))
(unless (and (string=? o bp) (fl=? n (string->number r2)))
(display "Input: ")
(display i)
(newline)
... | null | https://raw.githubusercontent.com/IronScheme/IronScheme/687cde5d4e463a119e4ba28296f2af42a5c4a9df/IronScheme/IronScheme.Console/tests/fp-test.sps | scheme | (display (fl=? n (string->number r)))
(newline) | #!r6rs
(import
(rnrs)
(ironscheme clr))
(define (test i o)
(let* ((bp (get-bits i))
(n (string->number i))
(r (Double::ToString n))
(r2 (number->string n)))
(unless (and (string=? o bp) (fl=? n (string->number r2)))
(display "Input: ")
(display i)
(newline)
... |
903efcab7a15f325c25098ae83f744f5917c7ba69caa408d3cda9e58fbabb058 | owlbarn/actor | actor_peer_lda.ml |
* Actor - Parallel & Distributed Engine of Owl System
* Copyright ( c ) 2016 - 2018 < >
* Actor - Parallel & Distributed Engine of Owl System
* Copyright (c) 2016-2018 Liang Wang <>
*)
Peer LDA : Latent Dirichlet Allocation
open Owl
open Actor_types
module MS = Sparse.Dok_matrix
module MD = Mat
mod... | null | https://raw.githubusercontent.com/owlbarn/actor/878f4588f4ee235994bbc4e77648858bb562bdd2/lib/actor_peer_lda.ml | ocaml | local model hyper-parameters
local and global model variables
data set variables
track if local model has been merged
set model parameters
set model hyper-parameters
randomise the topic assignment for each token
init local model / kv store
make cdf function
draw a sample
update t__k
a workaround ... |
* Actor - Parallel & Distributed Engine of Owl System
* Copyright ( c ) 2016 - 2018 < >
* Actor - Parallel & Distributed Engine of Owl System
* Copyright (c) 2016-2018 Liang Wang <>
*)
Peer LDA : Latent Dirichlet Allocation
open Owl
open Actor_types
module MS = Sparse.Dok_matrix
module MD = Mat
mod... |
e6e7fadec1f7430e6626ee5dec704bc32ad1a964411fb6da650155ea5d54d891 | lispgames/cl-sdl2 | pixels.lisp | (in-package #:sdl2)
(autowrap:define-enum-from-constants (sdl-pixel-format)
sdl2-ffi:+sdl-pixelformat-unknown+
sdl2-ffi:+sdl-pixelformat-index1lsb+
sdl2-ffi:+sdl-pixelformat-index1msb+
sdl2-ffi:+sdl-pixelformat-index4lsb+
sdl2-ffi:+sdl-pixelformat-index4msb+
sdl2-ffi:+sdl-pixelformat-index8+
sdl2-ffi:+sd... | null | https://raw.githubusercontent.com/lispgames/cl-sdl2/80410b514570ca06894675d4a2a5fc93287ea7b6/src/pixels.lisp | lisp | (in-package #:sdl2)
(autowrap:define-enum-from-constants (sdl-pixel-format)
sdl2-ffi:+sdl-pixelformat-unknown+
sdl2-ffi:+sdl-pixelformat-index1lsb+
sdl2-ffi:+sdl-pixelformat-index1msb+
sdl2-ffi:+sdl-pixelformat-index4lsb+
sdl2-ffi:+sdl-pixelformat-index4msb+
sdl2-ffi:+sdl-pixelformat-index8+
sdl2-ffi:+sd... | |
c8b21c6021c998c1e46df9c6c0a10c670cdcc34b0b905b97cc84e0eb0ff388d3 | bendyworks/lean-map | util.cljs | (ns cljs.lean-map.util
(:require [cljs.lean-map.core :as c]
[goog.object :as gobj])
(:refer-clojure :exclude [empty hash-map]))
(def use-lean-map (atom false))
(def cljs-persistent-assoc (.-cljs$core$IAssociative$_assoc$arity$3 (gobj/clone (.-prototype PersistentArrayMap))))
(def cljs-transient-assoc ... | null | https://raw.githubusercontent.com/bendyworks/lean-map/d452cbc2cfe2a49d12446709f235a9cd0a1e4b66/src/main/cljs/lean_map/util.cljs | clojure | (ns cljs.lean-map.util
(:require [cljs.lean-map.core :as c]
[goog.object :as gobj])
(:refer-clojure :exclude [empty hash-map]))
(def use-lean-map (atom false))
(def cljs-persistent-assoc (.-cljs$core$IAssociative$_assoc$arity$3 (gobj/clone (.-prototype PersistentArrayMap))))
(def cljs-transient-assoc ... | |
1d3561224c660202e0d198a216f6a8b47264998176430a355e2edc9ff4cff68a | chaoxu/fancy-walks | C.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Dat... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%20Africa%202010/Qualification%20Round/C.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS... |
d7530e3c44efbfbdb930946ca13b5aca52f87004ab0850262d7421e6341f8c79 | khibino/haskell-relational-record | Query.hs | -- |
-- Module : Database.Relational.SqlSyntax.Query
Copyright : 2013 - 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- This module provides building and expanding operations of SQL query tree.
module Database.Relational.SqlSyntax.Query (
flatSu... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/SqlSyntax/Query.hs | haskell | |
Module : Database.Relational.SqlSyntax.Query
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module provides building and expanding operations of SQL query tree. | Copyright : 2013 - 2019
module Database.Relational.SqlSyntax.Query (
flatSubQuery, aggregatedSubQuery,
union, except, intersect,
) where
import Database.Relational.Internal.Config (Config)
import Database.Relational.SqlSyntax.Types
(Duplication (..), SetOp (..), BinOp (..),
OrderingTerm, AggregateEle... |
b5f46cd3f6031e267069a17a664ba83b4fe8cffc126a09ef4552c9067a16ea39 | lamdu/lamdu | NominalPane.hs | module Lamdu.GUI.NominalPane
( make
) where
import GUI.Momentu (Responsive)
import qualified GUI.Momentu as M
import qualified GUI.Momentu.Responsive as Responsive
import qualified GUI.Momentu.Responsive.Options as ResponsiveOptions
import qualified GUI.Momentu.State as GuiState
import qualified GUI.... | null | https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/src/Lamdu/GUI/NominalPane.hs | haskell | module Lamdu.GUI.NominalPane
( make
) where
import GUI.Momentu (Responsive)
import qualified GUI.Momentu as M
import qualified GUI.Momentu.Responsive as Responsive
import qualified GUI.Momentu.Responsive.Options as ResponsiveOptions
import qualified GUI.Momentu.State as GuiState
import qualified GUI.... | |
28882454007fe874408ab5d16e52dae7e5ffdf61ae3b4913eb975fcced61c2a4 | robert-strandh/SICL | enable-defmethod.lisp | (cl:in-package #:sicl-boot-phase-3)
(defun define-generic-function-class-names (e3)
(setf (env:fdefinition
(env:client e3) e3 'sicl-clos::generic-function-class-names)
(lambda (name environment)
(declare (ignore environment))
(let ((function (env:fdefinition (env:client e3) e3 na... | null | https://raw.githubusercontent.com/robert-strandh/SICL/6c380fd86cbbef034ea1c484344d36664490c8af/Code/Boot/Phase-3/enable-defmethod.lisp | lisp | (cl:in-package #:sicl-boot-phase-3)
(defun define-generic-function-class-names (e3)
(setf (env:fdefinition
(env:client e3) e3 'sicl-clos::generic-function-class-names)
(lambda (name environment)
(declare (ignore environment))
(let ((function (env:fdefinition (env:client e3) e3 na... | |
379b1e5ce76974f0433b29a950c15a66ff79a5aadf0a023a2d5f69d5e737ecde | issuu/ocaml-zmq | threaded_loopback.ml | open Zmq
let rec subscription socket =
(* Block thread until there is data *)
let msg = Socket.recv socket in
let thread = Thread.self () |> Thread.id |> string_of_int in
print_endline @@ "thread " ^ thread ^ " received: " ^ msg;
subscription socket
let rec publish count socket =
let thread = Thread.self ... | null | https://raw.githubusercontent.com/issuu/ocaml-zmq/f1aad60f136529f45543a08a2f42c63d716e4e8f/zmq/examples/threaded_loopback.ml | ocaml | Block thread until there is data | open Zmq
let rec subscription socket =
let msg = Socket.recv socket in
let thread = Thread.self () |> Thread.id |> string_of_int in
print_endline @@ "thread " ^ thread ^ " received: " ^ msg;
subscription socket
let rec publish count socket =
let thread = Thread.self () |> Thread.id |> string_of_int in
let... |
a5be2758186d828f7f0cef8f4c5dec74e6aa85edc75e93607e8ea28e28d4f4a4 | realworldocaml/book | ast_414.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppxlib/astlib/ast_414.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... | , Facebook
and , Europe
, projet Cristal , INRIA Rocquencourt
, LexiFi
, projet Cristal , INRIA Rocquencourt
Copyright 2018 Institu... |
a06638540ab483e4cc6ea3e19af538d37a2222b57c54e811b748e1626db6074f | shayne-fletcher/zen | dllist_with_empty.ml | (**Doubly linked, circular list. This implementation admits the empty
list. *)
module type Doubly_linked_list_sig =
sig
(**Will be abstract*)
type 'a cell = {
mutable value : 'a ;
mutable next : 'a cell ;
mutable prev : 'a cell ;
}
(**The type of a doubly-linked list*)
typ... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/dllist/dllist_with_empty.ml | ocaml | *Doubly linked, circular list. This implementation admits the empty
list.
*Will be abstract
*The type of a doubly-linked list
*Create a new (initially) empty list. This is an O(1)
operation
*Create a queue consisting of the singleton value [x]. This is
an O(1) operation
*Converts from a normal list t... | module type Doubly_linked_list_sig =
sig
type 'a cell = {
mutable value : 'a ;
mutable next : 'a cell ;
mutable prev : 'a cell ;
}
type 'a t = 'a cell option ref
val create : unit -> 'a t
val singleton : 'a -> 'a t
val of_list : 'a list -> 'a t
* Create a new node and ... |
85163a4897bc5625224ee34b8f76e4648abf1ff1098881744a4c9f88ac910113 | collaborativetrust/WikiTrust | splitwiki.ml |
Copyright ( c ) 2007 - 2008 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/splitwiki.ml | ocaml |
* This file is used to split a wiki into a series of smaller files, each consisting
* of a given number of pages. This enables us to break up the analysis of a large
* wiki into manageable chunks (in case of failures, etc).
Tags
The offset is useful to resume interrupted work
Skips to beginning of wiki, ... |
Copyright ( c ) 2007 - 2008 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... |
0d4b44f888863d2e07578a684b711ca689886db588861696156ab49e65470ee7 | stevensurgnier/dropwizard-clojure | todo.clj | (ns com.example.todo.resources.todo
(:require [clojure.tools.logging :as log])
(:import [com.example.todo.representations Todo]
[com.codahale.metrics.annotation Timed]
[javax.validation Valid]
[javax.ws.rs GET POST DELETE Path Consumes Produces PathParam]))
(definterface ITodo
(g... | null | https://raw.githubusercontent.com/stevensurgnier/dropwizard-clojure/a0c19df5a6e362516b5751f4e095bb33062fe149/dropwizard-clojure-example/src/main/clojure/com/example/todo/resources/todo.clj | clojure | (ns com.example.todo.resources.todo
(:require [clojure.tools.logging :as log])
(:import [com.example.todo.representations Todo]
[com.codahale.metrics.annotation Timed]
[javax.validation Valid]
[javax.ws.rs GET POST DELETE Path Consumes Produces PathParam]))
(definterface ITodo
(g... | |
abf9e69996f92b3103cc4c0b2112ac064af97d8f5fb5e0ee40ab916d51ee0745 | xapi-project/message-switch | varstore_privileged_interface.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/message-switch/1d0d1aa45c01eba144ac2826d0d88bb663e33101/xapi-idl/varstore/privileged/varstore_privileged_interface.ml | ocaml | * Validate UUIDs by converting them to Uuidm.t in the API
* An uninterpreted string associated with the operation. |
* 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... |
3728651bc9a6092aff71f6d550fda3203c20c94fb4c3c75777b72043438ea60c | cabol/oauth2_mnesia_backend | oauth2_example_authorizer.erl | -module(oauth2_example_authorizer).
%% API
-export([is_authorized/2]).
-define(AUTH_HEADER, <<"Bearer">>).
%%%===================================================================
%%% API
%%%===================================================================
is_authorized(Req, State) ->
try
case get_access_toke... | null | https://raw.githubusercontent.com/cabol/oauth2_mnesia_backend/9127536f43a6f076ef5cd5458eb052c685ef0e89/examples/oauth2_example/src/oauth2_example_authorizer.erl | erlang | API
===================================================================
API
=================================================================== | -module(oauth2_example_authorizer).
-export([is_authorized/2]).
-define(AUTH_HEADER, <<"Bearer">>).
is_authorized(Req, State) ->
try
case get_access_token(Req) of
{ok, Token} ->
case oauth2:verify_access_token(Token, []) of
{ok, _Identity} ->
{true, Req, State};
{... |
fc496e1137f6d369ae519371c07430bb6c76e60461ed3607c41afbcff5748c7d | ocaml-sf/learn-ocaml-corpus | sat_forget_to_revert.ml | (* ------------------------------------------------------------------------------ *)
(* Building formulae. *)
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
(* [FConst sense] would work too, but would allocate memory *)
let neg ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/sat_forget_to_revert.ml | ocaml | ------------------------------------------------------------------------------
Building formulae.
[FConst sense] would work too, but would allocate memory
------------------------------------------------------------------------------
Evaluating formulae.
We assume [n < Sys.word_size - 1].
-----------------... |
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
let neg f =
match f with
| FConst sense ->
const (not sense)
| FNeg f ->
f
| _ ->
FNeg f
let conn sense f1 f2 =
match f1, f2 with
| FConst sense', f
| f... |
3be23909c8974e55ed6d82c44dbd8b28088990471998b300dd54754e738cf616 | PeterDWhite/Osker | BraidOutput.hs | Copyright ( c ) , 2001 , 2002 , 2003
module BraidOutput
( indent -- Create an indentation
, showIndent -- Show with indentation
, showNoIndent -- Show without indentation
, pad -- Pad a string to n characters
, outTid -- For outputing a thread Id
) where
tabstop... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Braid/BraidOutput.hs | haskell | Create an indentation
Show with indentation
Show without indentation
Pad a string to n characters
For outputing a thread Id | Copyright ( c ) , 2001 , 2002 , 2003
module BraidOutput
) where
tabstop :: Int
tabstop = 3
indent :: Int -> String
indent n = replicate (n * tabstop) ' '
showIndent :: (Show a) => Int -> a -> String
showIndent n a = indent n ++ show a
showNoIndent :: (Show a) => Int -> a -> String
showNoIndent _n a = show ... |
5679d04a16f7d57caa059b1d74558e706a749a1e0a9a2e8c8d4e45e6097a25d8 | bobzhang/fan | a_nonrec1.ml | type nonrec t = t = int
Parse error: "private" or "{" or "|" or [constructor_declarations] expected after "=" (in [type_kind])
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/migration/a_nonrec1.ml | ocaml | type nonrec t = t = int
Parse error: "private" or "{" or "|" or [constructor_declarations] expected after "=" (in [type_kind])
| |
95e16dd836931c8af2a85f3e2d3882cf722222564876278d4ef0b80ba3cab948 | thoughtstem/morugamu | card-designs.rkt | #lang racket
(provide render-symbol
symbol-page
lparen
rparen
get-lparen
get-rparen
get-all-symbols
define-tile
define-meta-tile
set-symbol-map!
make-icon)
(require 2htdp/image)
(require "../util/config.rkt")
(define (scale-to ... | null | https://raw.githubusercontent.com/thoughtstem/morugamu/a9095ddebe364adffb036c3faed95c873a4d9f3c/rule-systems/card-designs.rkt | racket | Abstract symbols...
start of accessor functions
end of accessor functions | #lang racket
(provide render-symbol
symbol-page
lparen
rparen
get-lparen
get-rparen
get-all-symbols
define-tile
define-meta-tile
set-symbol-map!
make-icon)
(require 2htdp/image)
(require "../util/config.rkt")
(define (scale-to ... |
3267bd4e1a5806588d629f3631d6dbfede0c30e1493eb5694cf6f6e2861bc57d | ucsd-progsys/liquidhaskell | Wrap1.hs | {-@ LIQUID "--expect-any-error" @-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module Wrap1 () where
import Language.Haskell.Liquid.Prelude (liquidError, liquidAssertB)
import Data.Function (on)
import Data.Ord (comparing)
data WrapType b a = WrapType {getVect :: b, getVal :: a}
instance Eq (WrapType... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Wrap1.hs | haskell | @ LIQUID "--expect-any-error" @
# LANGUAGE TypeSynonymInstances, FlexibleInstances #
@ assert flibXs :: a -> Bool @
@ assert nflibXs :: Int -> a -> Bool @ |
module Wrap1 () where
import Language.Haskell.Liquid.Prelude (liquidError, liquidAssertB)
import Data.Function (on)
import Data.Ord (comparing)
data WrapType b a = WrapType {getVect :: b, getVal :: a}
instance Eq (WrapType [Double] a) where
(==) = (==) `on` getVect
instance Ord (WrapType [Double] a) where
... |
56ed2b5c3333aff35a578f31908524cc2f090b5ab68eb84f47b5cee0aa3b514a | ddmcdonald/sparser | navigating the no-space code.lisp | (in-package :sparser)
6/2/15 Navigating the no-space pattern code
Updated and extended 12/25/16
-------- Rationale and Overview
Biomedical articles are replete with composite terms that are not
easily handled by normal parsing techniques because of how they
incorporate punctuation as a central part of their meaning,... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/documentation/notes/navigating%20the%20no-space%20code.lisp | lisp | (in-package :sparser)
6/2/15 Navigating the no-space pattern code
Updated and extended 12/25/16
-------- Rationale and Overview
Biomedical articles are replete with composite terms that are not
easily handled by normal parsing techniques because of how they
incorporate punctuation as a central part of their meaning,... | |
8ed157dd12ece4d1fdb398a84fe6083188912f5780cb1c2f153de5be7ecd9862 | jwiegley/notes | statelist.hs | module Main where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Logic
import Control.Monad.Trans.Class
import Control.Monad.Trans.State
main :: IO ()
main = do
print $ flip runStateT 0 $ do
x <- lift [1,2,3]
liftIO $ putStrLn x
id += (1 :: Int)
| null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/statelist.hs | haskell | module Main where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Logic
import Control.Monad.Trans.Class
import Control.Monad.Trans.State
main :: IO ()
main = do
print $ flip runStateT 0 $ do
x <- lift [1,2,3]
liftIO $ putStrLn x
id += (1 :: Int)
| |
ce8f6aceb743de0eb014c5bf05c203c6ca03c89ce93edd243852e4514703ff26 | futurice/haskell-futurice-prelude | Unit1.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
-- | 'Unit1' has trivial instance! Like 'Data.Proxy.Proxy', but in kind
' Data . Constraint . Constraint ' .
module Futurice.Constraint.Unit1 where
import Futurice.Constraint.ForallSymbol
-- | Class with insta... | null | https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/56192d63bea76d06cb456c5ce4c776cf41a5cd7e/src/Futurice/Constraint/Unit1.hs | haskell | | 'Unit1' has trivial instance! Like 'Data.Proxy.Proxy', but in kind
| Class with instances for all types. | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
' Data . Constraint . Constraint ' .
module Futurice.Constraint.Unit1 where
import Futurice.Constraint.ForallSymbol
class Unit1 a
instance Unit1 a
instance ForallFSymbol Unit1 b where
instFSymbol = Dict
|
82fc5933aa637f55478ce8c7f673556de3d8e9f0e3038773cb422787c60cc60d | bet365/soap | sendService_test_server.erl | %%
%% %CopyrightBegin%
%%
Copyright Hillside Technology Ltd. 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 ap... | null | https://raw.githubusercontent.com/bet365/soap/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/test/sendService_test_server.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 lan... | Copyright Hillside Technology Ltd. 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 ,
for service " SendService " and port " SendServiceSoap "
-module(sendService_test_server).
-include("Send... |
7cea7505140996de617532236f4869131e6d1633bfd7270b9c4a171f982c4202 | ndmitchell/catch | Risers.hs | -- #CATCH _
module Risers where
main :: [Int] -> [[Int]]
main x = risers x
risers :: Ord a => [a] -> [[a]]
risers [] = []
risers [x] = [[x]]
risers (x:y:etc) = if x <= y then (x:s):ss else [x]:(s:ss)
where (s:ss) = risers (y:etc)
| null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Regress/Risers.hs | haskell | #CATCH _ |
module Risers where
main :: [Int] -> [[Int]]
main x = risers x
risers :: Ord a => [a] -> [[a]]
risers [] = []
risers [x] = [[x]]
risers (x:y:etc) = if x <= y then (x:s):ss else [x]:(s:ss)
where (s:ss) = risers (y:etc)
|
a65e011070df5ca27fd6123501257b4073ac56e95af09b1595e1834e6966b5da | manuel-serrano/hop | mkjsast.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/3.5.x / node_modules / mkjsast.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/cbb98da5c9ea8e6e3836f0a5908e5bf782419683/node_modules/mkjsast.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop/3.5.x / node_modules / mkjsast.scm * /
* Author : * /
* Creation : Tue Jul 1 16:05:56 2014 * /
* Last change : Sun Jan 23 13:10:38 2022 ( serrano ) * /
* Copyr... |
d8ef46b3fc2e694a0f171c83ebac5b9ea49c483c33923916a79c47cb9b0d54a5 | ocaml-multicore/tezos | script_map.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/script_map.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
Copyright ( c ) 2021 - 2022 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit pers... |
fa004ce3b78a0b398aec099f76b1d389f4b0aaa920367b2d83ea3880d2cef5fb | rain-1/single_cream | cons-equal.scm | (equal? 1 1)
(equal? 1 2)
(equal? (cons 1 2) '(1 . 2))
(equal? '(1 . 2) (cons 1 2))
(equal? (cons 1 2) '(1 . 3))
(equal? (cons 2 1) '(1 . 2))
(equal? (cons 1 (cons 2 (cons 3 '())))
'(1 2 3))
(equal? (cons 1 (cons 2 (cons 3 (cons 4 '()))))
'(1 2 3 4))
(equal? (cons 1 (cons 2 (cons 3 4)))
'(1 2... | null | https://raw.githubusercontent.com/rain-1/single_cream/f8989fde4bfcffe0af7f6ed5916885446bf40124/t/simple/cons-equal.scm | scheme | (equal? 1 1)
(equal? 1 2)
(equal? (cons 1 2) '(1 . 2))
(equal? '(1 . 2) (cons 1 2))
(equal? (cons 1 2) '(1 . 3))
(equal? (cons 2 1) '(1 . 2))
(equal? (cons 1 (cons 2 (cons 3 '())))
'(1 2 3))
(equal? (cons 1 (cons 2 (cons 3 (cons 4 '()))))
'(1 2 3 4))
(equal? (cons 1 (cons 2 (cons 3 4)))
'(1 2... | |
027a819560b4db8a00038742ea23117f60e0c898dbe7e20d3ca13cf946bc3601 | GaloisInc/what4 | ProblemFeatures.hs | ------------------------------------------------------------------------
-- |
-- Module : What4.ProblemFeatures
-- Description : Descriptions of the "features" that can occur in queries
Copyright : ( c ) Galois , Inc 2016 - 2020
-- License : BSD3
Maintainer : < >
-- Stability : provisional
--
-- ... | null | https://raw.githubusercontent.com/GaloisInc/what4/6f5e0fe9bef58234603ccf6914c32ea1ba2f9766/what4/src/What4/ProblemFeatures.hs | haskell | ----------------------------------------------------------------------
|
Module : What4.ProblemFeatures
Description : Descriptions of the "features" that can occur in queries
License : BSD3
Stability : provisional
ProblemFeatures uses bit mask to represent the features. The bits are:
0 : Uses line... | Copyright : ( c ) Galois , Inc 2016 - 2020
Maintainer : < >
1 : Uses non - linear arithmetic , i.e. multiplication ( should also set bit 0 )
2 : Uses computational reals ( should also set bits 0 & 1 )
3 : Uses integer variables ( should also set bit 0 )
4 : Uses
5 : Uses exists - forall .
... |
faa4ef1d0e3ff780a74ead8b7b676024b6e7f4b8b6641d9454e36c401293f259 | triffon/fp-2019-20 | 09--subnum.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
# # # Задача 9
Напишете функция ` subnum ? ` , дали число се съдържа в записа на друго .
(define (subnum? k n) void)
(run-tests (test-suite "count-digits tests"
(check-true (subnum? 0 0))
(check-true (... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/02--recursive-and-iterative-processes/09--subnum.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
# # # Задача 9
Напишете функция ` subnum ? ` , дали число се съдържа в записа на друго .
(define (subnum? k n) void)
(run-tests (test-suite "count-digits tests"
(check-true (subnum? 0 0))
(check-true (... | |
635bd26198a51abe2c3701a907a3c0ec582c12e7ddddeb07345ef2c1b1e8cc2a | haskell/hackage-server | Types.hs | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Server.Features.Check.Types
Copyright : ( c ) 2010
-- License : BSD-like
--
-- Data types for the candidate feature
--------------------------... | null | https://raw.githubusercontent.com/haskell/hackage-server/6c8689a779b688b3e6b927614c90318936d5bb3f/src/Distribution/Server/Features/PackageCandidates/Types.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Server.Features.Check.Types
License : BSD-like
Data types for the candidate feature
---------------------------------------------------------------------------
--------------------------------------------... | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
Copyright : ( c ) 2010
module Distribution.Server.Features.PackageCandidates.Types where
import Distribution.Server.Packages.Types (PkgInfo(..))
import Distribution.Server.Framework.Instances ()
import Distribution.Server.Framework.MemSize
import Distribution... |
9b4d03aefd37c36a3abd2d4f78f353b7905e4de65d9d3af5ad8213b4ec6e17bd | jimmythompson/halboy | utils.clj | (ns halboy.http.utils
(:require [clojure.walk :refer [keywordize-keys]]
[cheshire.core :as json])
(:import [com.fasterxml.jackson.core JsonParseException]))
(defn update-if-present [m ks fn]
(if (get-in m ks)
(update-in m ks #(fn %))
m))
(defn with-json-body [m]
(update-if-present m [:body... | null | https://raw.githubusercontent.com/jimmythompson/halboy/eedd3a07857449c0b97b2776dcc77bd87fcec354/src/halboy/http/utils.clj | clojure | (ns halboy.http.utils
(:require [clojure.walk :refer [keywordize-keys]]
[cheshire.core :as json])
(:import [com.fasterxml.jackson.core JsonParseException]))
(defn update-if-present [m ks fn]
(if (get-in m ks)
(update-in m ks #(fn %))
m))
(defn with-json-body [m]
(update-if-present m [:body... | |
bc6305763fd90ef615139b15a41c1dd072d00b0a9b36f979d93c83bf37476069 | nixeagle/nisp | nisp-handle-command-method.lisp | Sticking this in its own file to make happy
(in-package :nisp-core)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass nisp-command-network-tree-generic-function
(network-tree-generic-function) ()
(:metaclass closer-mop:funcallable-standard-class)
(:default-initargs :method-class (find... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/irc-bot/nisp-handle-command-method.lisp | lisp | Just for now... these should be ',source (and so on). The
keywords here should not be evaulated as input no matter how
this is looked at.
END | Sticking this in its own file to make happy
(in-package :nisp-core)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass nisp-command-network-tree-generic-function
(network-tree-generic-function) ()
(:metaclass closer-mop:funcallable-standard-class)
(:default-initargs :method-class (find... |
6a12a4547d9d098a2b12d51f1658ce136fe147eb0df089d17329ea1452d5fde6 | smallhadroncollider/taskell-2.0 | Editor.hs | # LANGUAGE TemplateHaskell #
module Taskell.UI.Text.Editor
( Editor
, EditorE
, Cursor(..)
, cursor
, rows
, dump
, create
, insert
, backspace
, top
, bottom
, up
, down
, right
, left
, end
, begin
, endOfLine
, startOfLine
, getRelative... | null | https://raw.githubusercontent.com/smallhadroncollider/taskell-2.0/c32b2f48d9c44544f43be49c2b100b414a8d3376/src/Taskell/UI/Text/Editor.hs | haskell | cursor movement
editing
dump | # LANGUAGE TemplateHaskell #
module Taskell.UI.Text.Editor
( Editor
, EditorE
, Cursor(..)
, cursor
, rows
, dump
, create
, insert
, backspace
, top
, bottom
, up
, down
, right
, left
, end
, begin
, endOfLine
, startOfLine
, getRelative... |
900ba8840ab6570826df361bb67fba8f43496a558fd8391327624a398bb5aed8 | willemdj/erlsom | erlsom_sax_lib.erl | Copyright ( C ) 2006 - 2011
%%%
This file is part of Erlsom .
%%%
Erlsom 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/willemdj/erlsom/19883e01a36c8927a770f0f46c3b96bbe9ad90ce/src/erlsom_sax_lib.erl | erlang |
it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
</>.
Author contact:
====================================================================
A couple of functions used by... | Copyright ( C ) 2006 - 2011
This file is part of Erlsom .
Erlsom is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Erlsom is distributed in the hope that it will be useful ,
GN... |
cc90a7b7b8300d024efcd0f40437a40cff8d851a50173f6a1945646391470260 | verystable/warframe-autobuilder | WeaponDetailsIdentifier.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
Module : ArgInterface . PistolWeapons
-- Maintainer :
-- Stability : experimental
--
-- This module contains all the functions used
-- to determine if the weapon name given by the user
-- belongs to a rifle, or a shotgun
-- or a pistol ... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/ArgInterface/WeaponDetailsIdentifier.hs | haskell | # LANGUAGE OverloadedStrings #
|
Maintainer :
Stability : experimental
This module contains all the functions used
to determine if the weapon name given by the user
belongs to a rifle, or a shotgun
or a pistol or a melee weapon
| Given a weapon name, returns its name and type.
| Corrects the name of a wea... | # LANGUAGE NoImplicitPrelude #
Module : ArgInterface . PistolWeapons
module ArgInterface.WeaponDetailsIdentifier where
import ClassyPrelude
import Data.FuzzySet as F
import ArgInterface.MeleeWeapons
import ArgInterface.PistolWeapons
import Ar... |
3108daff0f02899e8f7487839ccc184f82b07c01cac2cd43ec9de9789c12cf4b | deadcode/Learning-CL--David-Touretzky | 11.9.lisp | (defun check-all-odd (x)
(do ((rest-x x (rest rest-x)))
((null rest-x) t)
(format t "~&Checking ~s..." (first rest-x))
(when (not (oddp (first rest-x)))
(return nil))))
(let ((test1 '(check-all-odd '(1 3 5 7)))
(test2 '(check-all-odd '(1 3 5 6 7)))
(test3 '(check-all-odd '(2 4 ... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%2011/11.9.lisp | lisp | (defun check-all-odd (x)
(do ((rest-x x (rest rest-x)))
((null rest-x) t)
(format t "~&Checking ~s..." (first rest-x))
(when (not (oddp (first rest-x)))
(return nil))))
(let ((test1 '(check-all-odd '(1 3 5 7)))
(test2 '(check-all-odd '(1 3 5 6 7)))
(test3 '(check-all-odd '(2 4 ... | |
48334421f5e928dc854d1229824abed1d93020f02d671b819656991c3908a530 | RichiH/git-annex | Benchmark.hs | git - annex benchmark
-
- Copyright 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# OPTIONS_GHC -fno - warn - orphans #
module Command.Benchmark where
import Command
import Database.Types
i... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/Benchmark.hs | haskell | benchmark different sizes of databases
0 is never stored
0 is never stored
command-line parameters | git - annex benchmark
-
- Copyright 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# OPTIONS_GHC -fno - warn - orphans #
module Command.Benchmark where
import Command
import Database.Types
i... |
9a5c7958c99305ec9b8db703564e0f68d080b5a4bba20a7bad68335deb351a9d | smuenzel/opile | misc.ml | open! Core
module Stdlib = struct
module String = struct
module Map = struct
include (Compiler_without_sexp.Misc.Stdlib.String.Map
: module type of struct include Compiler_without_sexp.Misc.Stdlib.String.Map end
)
let sexp_of_t sexp_of_a t =
fold (fun key data ac... | null | https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/compiler-with-sexp/misc.ml | ocaml | open! Core
module Stdlib = struct
module String = struct
module Map = struct
include (Compiler_without_sexp.Misc.Stdlib.String.Map
: module type of struct include Compiler_without_sexp.Misc.Stdlib.String.Map end
)
let sexp_of_t sexp_of_a t =
fold (fun key data ac... | |
6b5c0b65265e58975d567fe9618690d95aa9aa4b5664cfd779f4cfbc41fecb7e | 314eter/ocaml-hpack | benchmark.ml | open Hpack
module Json = Yojson.Basic.Util
module Hex = struct
let of_string s = Hex.show (Hex.of_string s)
let to_string x = Hex.to_string (`Hex x)
end
let parse_file file =
Yojson.Basic.from_file file
|> Json.member "cases"
|> Json.convert_each begin fun case ->
Json.member "headers" case
|> Json... | null | https://raw.githubusercontent.com/314eter/ocaml-hpack/d94ef6b9a9bacf7282fc4e9c89acb4df5b02924d/test/benchmark.ml | ocaml | open Hpack
module Json = Yojson.Basic.Util
module Hex = struct
let of_string s = Hex.show (Hex.of_string s)
let to_string x = Hex.to_string (`Hex x)
end
let parse_file file =
Yojson.Basic.from_file file
|> Json.member "cases"
|> Json.convert_each begin fun case ->
Json.member "headers" case
|> Json... | |
9d2101bf1e27c676233fed4bd91a216ec9c261efcf4059e9f854830bceb478bf | fulcro-legacy/semantic-ui-wrapper | ui_list_list.cljs | (ns fulcrologic.semantic-ui.elements.list.ui-list-list
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/elements/List/ListList" :default ListList]))
(def ui-list-list
"A list can contain a sub list.
Props:
- as (custom): An element type to render as (stri... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/elements/list/ui_list_list.cljs | clojure | (ns fulcrologic.semantic-ui.elements.list.ui-list-list
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/elements/List/ListList" :default ListList]))
(def ui-list-list
"A list can contain a sub list.
Props:
- as (custom): An element type to render as (stri... | |
bce7cebe0187be6b0d58314083e1a13c319809b10e352bb3a9403ea681f1cacf | lachenmayer/arrowsmith | Utils.hs | # OPTIONS_GHC -Wall #
# LANGUAGE FlexibleContexts #
module Elm.Utils ((|>), (<|), getAsset, run, unwrappedRun, CommandError(..)) where
import Control.Monad.Error (MonadError, MonadIO, liftIO, throwError)
import System.Directory (doesFileExist)
import System.Environment (getEnv)
import System.Exit (ExitCode(ExitSuccess... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-compiler/src/Elm/Utils.hs | haskell | | Forward function application `x |> f == f x`. This function is useful
for avoiding parenthesis and writing code in a more natural way.
| Backward function application `f <| x == f x`. This function is useful for
avoiding parenthesis.
RUN EXECUTABLES
| Run a command, throw an error if the command is not found or if... | # OPTIONS_GHC -Wall #
# LANGUAGE FlexibleContexts #
module Elm.Utils ((|>), (<|), getAsset, run, unwrappedRun, CommandError(..)) where
import Control.Monad.Error (MonadError, MonadIO, liftIO, throwError)
import System.Directory (doesFileExist)
import System.Environment (getEnv)
import System.Exit (ExitCode(ExitSuccess... |
b95233769dd9167990e2d00c13a0f4938a9aab056892a13f2082a9e563a25f18 | ml4tp/tcoq | term.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/term.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Prop and Set
* Type
* Simply typ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
* { 5 Redeclarati... |
78aa3c41087674a48aa3d44751b809c2c6d3126df3485500338f1ca7db8ed321 | BenjaminVanRyseghem/great-things-done | menu.cljs | Copyright ( c ) 2015 , . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; t... | null | https://raw.githubusercontent.com/BenjaminVanRyseghem/great-things-done/1db9adc871556a347426df842a4f5ea6b3a1b7e0/src/front/ui/menu.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) 2015 , . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns ui.menu
(:use [jayq.core :only [$]])
(:require [gtd.state :as state]
[reagent.core :as reagent :refer [atom]]
[secretary.core :as secretary]
[utils.core :as utils]
[util... |
23eeb1091cfb1e07bcf48342142161858c7970e2d22bbd6a2e0d525cba78755b | yesodweb/yesod | auth2.hs | # LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
import Yesod
import Yesod.Mail
import Yesod.Helpers.Auth2
import Yesod.Helpers.Auth2.OpenId
import Yesod.Helpers.Auth2.Rpxnow
import Yesod.Helpers.Auth2.Facebook
import Yesod.Helpers.Auth2.Email
import Control.Monad (joi... | null | https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-auth/auth2.hs | haskell | # LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
import Yesod
import Yesod.Mail
import Yesod.Helpers.Auth2
import Yesod.Helpers.Auth2.OpenId
import Yesod.Helpers.Auth2.Rpxnow
import Yesod.Helpers.Auth2.Facebook
import Yesod.Helpers.Auth2.Email
import Control.Monad (joi... | |
9e9a5977897f8aa89689bf2308984c7e83436d4aff93c73a5ea0480089a6b5f8 | CryptoKami/cryptokami-core | NodeOptions.hs | # LANGUAGE ApplicativeDo #
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes #-}
| Command line options of Cryptokami node .
module Pos.Client.CLI.NodeOptions
( CommonNodeArgs (..)
, SimpleNodeArgs (..)
, NodeArgs (..)
, commonNodeArgsParser
, getSimpleNodeOptions
,... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Client/CLI/NodeOptions.hs | haskell | # LANGUAGE CPP #
# LANGUAGE QuasiQuotes #
^ Network configuration
cryptokami-node \
db-path node-db0 \
rebuild-db \
keyfile secrets/secret-1.key ... | # LANGUAGE ApplicativeDo #
| Command line options of Cryptokami node .
module Pos.Client.CLI.NodeOptions
( CommonNodeArgs (..)
, SimpleNodeArgs (..)
, NodeArgs (..)
, commonNodeArgsParser
, getSimpleNodeOptions
, usageExample
) where
import Universum
impo... |
f3ee9595911d1cb1a5a381acbb9eedf9fc9a7e6faf56b64e3da27ac454c1bfe8 | CyberCat-Institute/open-game-engine | NStageMarkov.hs | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
module Examples.Markov.NStageMarkov where
import Data.Tuple.Extra (uncurry3)
import OpenGames
import OpenGames.Preprocessor
import Examples.Simulta... | null | https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/Examples/Markov/NStageMarkov.hs | haskell | Here we consider an even simpler version how to implement an N stage markov game where solely the payoffs depend on a stage; actions are identical
------
Types
--------
Payoffs
| Payoff for a specific game state
--------------------
Auxiliary functions
The transition happens deterministically if one of the player... | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
module Examples.Markov.NStageMarkov where
import Data.Tuple.Extra (uncurry3)
import OpenGames
import OpenGames.Preprocessor
import Examples.Simulta... |
b3c049965a4f687e26ba3f1f5b03c145264f00835dd8990608d2f89170ba9052 | titola/incudine | vuglet.lisp | (in-package :incudine-tests)
(enable-sharp-square-bracket-syntax)
(enable-sharp-t-syntax)
(dsp! vuglet-1 (freq amp)
(vuglet ((osc (freq amp)
(* amp (sin (* (phasor freq 0) +twopi+))))
(fm (fcar fmod amp (k fixnum))
(osc (+ fcar (osc fmod (* fcar (/ k)))) amp))
(lp (in... | null | https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/tests/vug/vuglet.lisp | lisp | (in-package :incudine-tests)
(enable-sharp-square-bracket-syntax)
(enable-sharp-t-syntax)
(dsp! vuglet-1 (freq amp)
(vuglet ((osc (freq amp)
(* amp (sin (* (phasor freq 0) +twopi+))))
(fm (fcar fmod amp (k fixnum))
(osc (+ fcar (osc fmod (* fcar (/ k)))) amp))
(lp (in... | |
0487b56ce7348ee4f2da7dd0264a19681561826b1cb65067f50434b32fbcbd4a | davidar/stochaskell | Church.hs | |
Description : Church integration
Copyright : ( c ) , 2015 - 2021
License : GPL-3
Maintainer :
Stability : experimental
Description : Church integration
Copyright : (c) David A Roberts, 2015-2021
License : GPL-3
Maintainer :
Stability : experimental
-}
module Language.Church
( ... | null | https://raw.githubusercontent.com/davidar/stochaskell/d28f9245f5e07c004fb8fd3c828ac2e1cc561673/stochaskell/src/Language/Church.hs | haskell | |
Description : Church integration
Copyright : ( c ) , 2015 - 2021
License : GPL-3
Maintainer :
Stability : experimental
Description : Church integration
Copyright : (c) David A Roberts, 2015-2021
License : GPL-3
Maintainer :
Stability : experimental
-}
module Language.Church
( ... | |
47ccf3b4862bf99ed2d4e9c9a9bdfd11a84b54111e790ae6b659c04ca386b58a | lucasdicioccio/deptrack-project | IO.hs | -- | Utilities related to IO subsystem
module Devops.Utils.IO (copy) where
import qualified Data.ByteString as BS
import System.IO (Handle)
| Copy data from one source handle to target handle
--
Probably better implemented using Pipes / Conduits/ ...
copy :: Handle -> Handle -> IO ()
copy hIn hOut... | null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Utils/IO.hs | haskell | | Utilities related to IO subsystem
| module Devops.Utils.IO (copy) where
import qualified Data.ByteString as BS
import System.IO (Handle)
| Copy data from one source handle to target handle
Probably better implemented using Pipes / Conduits/ ...
copy :: Handle -> Handle -> IO ()
copy hIn hOut = do
bs <- BS.hGet hIn 4096
if not (B... |
a1c84af6df4c517ceefc2e0fed65b3c5a312668997e3a4ae97d1b586af0657e6 | ghcjs/jsaddle-dom | SVGPathSegCurvetoQuadraticRel.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGPathSegCurvetoQuadraticRel
(setX, getX, setY, getY, setX1, getX1, setY1, getY1,
SVGPathSegCurvetoQuadrat... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGPathSegCurvetoQuadraticRel.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGPathSegCurvetoQuadraticRel.x Mozilla SVGPathSegCurvetoQuadraticRel.x documentation>
| <-US/docs/Web/API/SVGPathSegCurvetoQuadraticRel.x Mozilla SVGPathSegCurvetoQuadraticRel.x documentation> | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGPathSegCurvetoQuadraticRel
(setX, getX, setY, getY, setX1, getX1, setY1, getY1,
SVGPathSegCurvetoQuadraticRel(..),
gTypeSVGPathSegCurvetoQuadraticRel)
where
import Prelude ((.), (==), (>>=... |
a228f5aa9ef5065252dd594c1468c89cb4355ceb5c53ade6aee843c95fc6194f | tweag/lagoon | Util.hs | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- -2.0
-- Unless required by applicable law or agreed to in writing, software
distributed under th... | null | https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/backend/src/Lagoon/Util.hs | haskell | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Lagoon.Util (
intercalateM
, Dict(..)
, orElse
, adjustUnion
, groupOn
) where
import Data.Map.Strict (Map)
import Data.Mon... |
cdd78b6c3dfdf905db18320b854f56abc6f301d15d6568d695d97ddb65fc3c25 | bcc32/advent-of-code | main.ml | open! Core
open! Async
open! Import
open Intcode
module Amp = struct
type t = Program.Async.Run.t
let create ~snapshot ~setting =
let run = Program.Async.run (Program.Snapshot.instantiate snapshot) in
Pipe.write_without_pushback run.input setting;
run
;;
module Infix = struct
let ( --> ) (t1 ... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2019/07/main.ml | ocaml | open! Core
open! Async
open! Import
open Intcode
module Amp = struct
type t = Program.Async.Run.t
let create ~snapshot ~setting =
let run = Program.Async.run (Program.Snapshot.instantiate snapshot) in
Pipe.write_without_pushback run.input setting;
run
;;
module Infix = struct
let ( --> ) (t1 ... | |
f0a58416b71997149858aa819be88cabd1f6f0e6db44b14bfc3044359f459a54 | ddmcdonald/sparser | switches.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992 - 1997,2011 - 20212 David D. McDonald -- all rights reserved
extensions copyright ( c ) 2007 - 2010 BBNT Solutions LLC . All Rights Reserved
;;;
;;; File: "switches"
;;; Module: "drivers;inits:"
Version : January 2022
... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/9968e7af632d4c66a5037317942df28642a8df09/Sparser/code/s/drivers/inits/switches.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "switches"
Module: "drivers;inits:"
is spelled out
*edge-protocol*
newline fsa.
(10/19) extended that
for introducing brackets from unknown words.
(2/14) changed default to *current-analysis-mode* so Preferenc... | copyright ( c ) 1992 - 1997,2011 - 20212 David D. McDonald -- all rights reserved
extensions copyright ( c ) 2007 - 2010 BBNT Solutions LLC . All Rights Reserved
Version : January 2022
1.1 ( 2/6/92 v2.2 ) changed the allowed values for unknown - words
( 2/7 ) Added * switch - setting * and * track -... |
2e2bffd0a35ab7fb8d8ae2514105cf02097de3d0232048e8b9dc23a6fbed68e0 | arcusfelis/binary2 | binary2_tests.erl | -module(binary2_tests).
-import(binary2, [trim/1, ltrim/1, rtrim/1, trim/2, ltrim/2, rtrim/2,
reverse/1, inverse/1, join/2, suffix/2, prefix/2,
duplicate/2,
union/2, intersection/2, subtract/2,
optimize_patterns/1]).
-include_lib("eunit/include/e... | null | https://raw.githubusercontent.com/arcusfelis/binary2/22f42c7bd8be0334e90b12af61740e5a4448ec9f/test/binary2_tests.erl | erlang | -module(binary2_tests).
-import(binary2, [trim/1, ltrim/1, rtrim/1, trim/2, ltrim/2, rtrim/2,
reverse/1, inverse/1, join/2, suffix/2, prefix/2,
duplicate/2,
union/2, intersection/2, subtract/2,
optimize_patterns/1]).
-include_lib("eunit/include/e... | |
5d1042760244dffddc1637ac734171fbaf062b9ecf8aa6a25c14e8d464fa61c3 | vikram/lisplibraries | dropdown.lisp |
(in-package :weblocks)
(export '(dropdown dropdown-presentation
dropdown-presentation-welcome-name))
;;; Dropdown
(defclass dropdown-presentation (form-presentation choices-presentation-mixin)
((welcome-name :initarg :welcome-name
:accessor dropdown-presentation-welcome-name
:documentation "If bound, uses... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/views/types/presentations/dropdown.lisp | lisp | Dropdown |
(in-package :weblocks)
(export '(dropdown dropdown-presentation
dropdown-presentation-welcome-name))
(defclass dropdown-presentation (form-presentation choices-presentation-mixin)
((welcome-name :initarg :welcome-name
:accessor dropdown-presentation-welcome-name
:documentation "If bound, uses this value t... |
7e92e52d2e2c60a806ad7b5f33e57ea1ef6cf9e504e3712c2503fcaad5f07428 | serokell/haskell-crypto | Random.hs | SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : MPL-2.0
-- | Generate simple insecure random data.
module Crypto.Sodium.Internal.Random
( generateInsecure
) where
import Data.ByteArray.Sized (SizedByteArray)
import Data.ByteString (ByteString)
import GHC.TypeLits (KnownNat)
import Crypto.So... | null | https://raw.githubusercontent.com/serokell/haskell-crypto/e57b04d103b428b03c83565060a36da442663a5a/crypto-sodium/lib/Crypto/Sodium/Internal/Random.hs | haskell |
| Generate simple insecure random data.
| Generate a sequence of random bytes.
The output of this function is NOT suitable for secret keys.
= unsafeSizedByteArray . BS.pack . take len . randoms <$> newStdGen
where
len = fromIntegral $ natVal (Proxy :: Proxy n)
as for keys, because, after benchmarking, i... | SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : MPL-2.0
module Crypto.Sodium.Internal.Random
( generateInsecure
) where
import Data.ByteArray.Sized (SizedByteArray)
import Data.ByteString (ByteString)
import GHC.TypeLits (KnownNat)
import Crypto.Sodium.Random (generate)
generateInsecure
::... |
2fa60e35f89e2008f9ad61970c4a985a141643ca5d379bd7eefd715262bdbdb3 | andrewMacmurray/haskell-book-solutions | week.hs | data DayOfTheWeek =
Mon | Tue | Weds | Thu | Fri | Sat | Sun
deriving Show
data Date =
Date DayOfTheWeek Int
deriving Show
instance Eq DayOfTheWeek where
(==) Mon Mon = True
(==) Tue Tue = True
(==) Weds Weds = True
(==) Thu Thu = True
(==) Fri Fri = True
(==) Sat Sat = True
(==) Sun S... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch6/week.hs | haskell | data DayOfTheWeek =
Mon | Tue | Weds | Thu | Fri | Sat | Sun
deriving Show
data Date =
Date DayOfTheWeek Int
deriving Show
instance Eq DayOfTheWeek where
(==) Mon Mon = True
(==) Tue Tue = True
(==) Weds Weds = True
(==) Thu Thu = True
(==) Fri Fri = True
(==) Sat Sat = True
(==) Sun S... | |
1ddba166e2803a51462ea93d2a0d6165c1f4817c1df60c13994ddece51c74861 | inventi/Pocheshiro | core.clj | (ns pocheshiro.core
"Pocheshiro is a Clojure wrapper for the Apache Shiro security library
tailored for use with Ring and Compojure.
Pocheshiro must be run in a servlet container (sorry, no `http-kit`) because
Apache Shiro depends on the servlet specification."
(:import [org.apache.shiro SecurityUtils]
... | null | https://raw.githubusercontent.com/inventi/Pocheshiro/1363b8bbe4f8b51d0660b50f30be2886c6960502/src/pocheshiro/core.clj | clojure | Return something to make ring happy
Prevent session fixation | (ns pocheshiro.core
"Pocheshiro is a Clojure wrapper for the Apache Shiro security library
tailored for use with Ring and Compojure.
Pocheshiro must be run in a servlet container (sorry, no `http-kit`) because
Apache Shiro depends on the servlet specification."
(:import [org.apache.shiro SecurityUtils]
... |
7841f30bf821cdf09b046227addd5f5672f00fca037980070a790b08465fe47e | dainiusjocas/lucene-grep | features.clj | (ns lmgrep.features)
;; excluded by default
(def raudikko? (= "true" (System/getenv "LMGREP_FEATURE_RAUDIKKO")))
(def snowball? (= "true" (System/getenv "LMGREP_FEATURE_SNOWBALL")))
(def stempel? (= "true" (System/getenv "LMGREP_FEATURE_STEMPEL")))
(def bundled? (= "true" (System/getenv "LMGREP_FEATURE_BUNDLED_ANALYZE... | null | https://raw.githubusercontent.com/dainiusjocas/lucene-grep/80bdf623de329a69dfa0869498dd1d17db543b97/src/lmgrep/features.clj | clojure | excluded by default | (ns lmgrep.features)
(def raudikko? (= "true" (System/getenv "LMGREP_FEATURE_RAUDIKKO")))
(def snowball? (= "true" (System/getenv "LMGREP_FEATURE_SNOWBALL")))
(def stempel? (= "true" (System/getenv "LMGREP_FEATURE_STEMPEL")))
(def bundled? (= "true" (System/getenv "LMGREP_FEATURE_BUNDLED_ANALYZERS")))
|
32d8f61a95381d299bc44ba22483da9adf29605a8a6d56af93bc6286effe10ec | antimer/liblmdb | package.lisp | (in-package :cl-user)
(defpackage liblmdb
(:use)
(:export :+append+
:+appenddup+
:+bad-dbi+
:+bad-rslot+
:+bad-txn+
:+bad-valsize+
:+corrupted+
:+cp-compact+
:+create+
:+current+
:+cursor-full+
:... | null | https://raw.githubusercontent.com/antimer/liblmdb/c1d1df6dc59e94d36c4a471e72de12025662d266/src/package.lisp | lisp | (in-package :cl-user)
(defpackage liblmdb
(:use)
(:export :+append+
:+appenddup+
:+bad-dbi+
:+bad-rslot+
:+bad-txn+
:+bad-valsize+
:+corrupted+
:+cp-compact+
:+create+
:+current+
:+cursor-full+
:... | |
76d90bc353272cc4d0a2590071cdbe86f850a6252e4ec639141c60b56453b109 | LonoCloud/synthread | suspenders.cljc | (ns lonocloud.suspenders
(:refer-clojure :exclude [defn defmacro])
(:require [lonocloud.synthread :as ->])
(#?(:clj :require :cljs :require-macros)
[lonocloud.synthread.cloaking :refer [defn defmacro decloak]]))
;; Syntax support for suspendable threaded forms. This provides the
;; ability for a call stack ... | null | https://raw.githubusercontent.com/LonoCloud/synthread/9d116f63163a3f6efad826e7c854da61b422257c/src/lonocloud/suspenders.cljc | clojure | Syntax support for suspendable threaded forms. This provides the
ability for a call stack to suspend work by defining a mirrored
callback stack containing the remaining work.
suspend-stack
current suspension map
callback keyed by id
callback keyed by id
stashed block map
define a 'tail'
expand the 'tail'
sus... | (ns lonocloud.suspenders
(:refer-clojure :exclude [defn defmacro])
(:require [lonocloud.synthread :as ->])
(#?(:clj :require :cljs :require-macros)
[lonocloud.synthread.cloaking :refer [defn defmacro decloak]]))
(comment
"This is a sample data structure for capturing suspensions."
},
id1 (fn ...... |
f64f903df1cb30364744f6bac0b3d87d79b718fe081120603d0eb077cfee62c8 | TypedLambda/eresye | sieve.erl | %
% sieve.erl
%
% -------------------------------------------------------------------------
%
%%
ERESYE , an ERlang Expert SYstem Engine
%%
Copyright ( c ) 2005 - 2010 , ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided th... | null | https://raw.githubusercontent.com/TypedLambda/eresye/58c159e7fbe8ebaed52018b1a7761d534b4d6119/examples/sieve.erl | erlang |
sieve.erl
-------------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above c... | ERESYE , an ERlang Expert SYstem Engine
Copyright ( c ) 2005 - 2010 , ,
* Neither the name of , may be used
THIS SOFTWARE IS PROVIDED BY AND ` ` AS
ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUT... |
576b8fe4ac98a1ecd22a94241bd1cf4c2f451270f6a2fbbdf4fbb35230db52b7 | NorfairKing/validity | Symmetry.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Test.Syd.Validity.Relations.Symmetry
( symmetricOnElems,
symmetryOnGens,
symmetry,
symmetryOnArbitrary,
)
where
import Data.GenValidity
import Test.QuickCheck
import Test.Syd.Validity.Property.Utils
-- |
--
-- \[
-- Symmetri... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-sydtest/src/Test/Syd/Validity/Relations/Symmetry.hs | haskell | |
\[
Symmetric(\prec)
\quad\equiv\quad
\]
| A relation
|
prop> symmetry ((==) :: Int -> Int -> Bool)
prop> symmetry ((/=) :: Int -> Int -> Bool)
|
prop> symmetryOnArbitrary ((==) :: Int -> Int -> Bool)
prop> symmetryOnArbitrary ((/=) :: Int -> Int -> Bool) | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Test.Syd.Validity.Relations.Symmetry
( symmetricOnElems,
symmetryOnGens,
symmetry,
symmetryOnArbitrary,
)
where
import Data.GenValidity
import Test.QuickCheck
import Test.Syd.Validity.Property.Utils
\forall a , b : ( a \pr... |
78723e1ef32fb5732abad56c21896c93fdb92bb6ce742082a717e1cfbad2c4e5 | xmonad/xmonad-contrib | Master.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , FlexibleContexts , PatternGuards #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Master
-- Description : Layout modfier that adds a master window to another layout.
Copyright : ( c ) , ... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Layout/Master.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Layout.Master
Description : Layout modfier that adds a master window to another layout.
License : BSD-style (see LICENSE)
Stability : unstable
Portability : unportable
----------------------------------... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , FlexibleContexts , PatternGuards #
Copyright : ( c ) ,
Maintainer : < >
Layout modfier that adds a master window to another layout .
module XMonad.Layout.Master (
mastered,
fixMastered,
multimastered,
AddMaster,
) where
imp... |
be69853ab591b2de79bb38efd42ee2bafd500e53c6c7625285a9b20952e77114 | cirodrig/triolet | ReprDict.hs | | Code generation of dictionaries .
-}
# LANGUAGE FlexibleInstances , FlexibleContexts , TypeSynonymInstances ,
Rank2Types #
Rank2Types #-}
module SystemF.ReprDict where
import Prelude hiding(mapM )
import Control . )
import Control . Monad . Trans
import Control . Monad . Trans . Maybe
import... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/SystemF/ReprDict.hs | haskell | | A @MkDict@ constructs a value in a singleton type , such as a
type class dictionary or an indexed int .
| A dictionary environment for several different data types
| A lookup table of ' Repr ' dictionaries
| A lookup table of ' Shape ' dictionaries
| A lookup table of ' FIInt ' values
| A ' DictEnv ' ... | | Code generation of dictionaries .
-}
# LANGUAGE FlexibleInstances , FlexibleContexts , TypeSynonymInstances ,
Rank2Types #
Rank2Types #-}
module SystemF.ReprDict where
import Prelude hiding(mapM )
import Control . )
import Control . Monad . Trans
import Control . Monad . Trans . Maybe
import... |
409d9816582a9208f7c5092ea2310dd4524a15aa2c2da49cfbe5d381f0910701 | jlouis/graphql-erlang | dungeon_mutation.erl | -module(dungeon_mutation).
-include("dungeon.hrl").
-export([execute/4]).
execute(_Ctx, _, <<"introduceRoom">>, #{ <<"input">> := Input }) ->
#{ <<"clientMutationId">> := MID,
<<"description">> := D } = Input,
{atomic, Room} = dungeon:insert(#room { description = D }),
{ok, #{
<<"clientMuta... | null | https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/test/dungeon_mutation.erl | erlang | -- INTERNAL FUNCTIONS ---------------------------- | -module(dungeon_mutation).
-include("dungeon.hrl").
-export([execute/4]).
execute(_Ctx, _, <<"introduceRoom">>, #{ <<"input">> := Input }) ->
#{ <<"clientMutationId">> := MID,
<<"description">> := D } = Input,
{atomic, Room} = dungeon:insert(#room { description = D }),
{ok, #{
<<"clientMuta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.