_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 |
|---|---|---|---|---|---|---|---|---|
30eb1297e02a17750a124407594aec3646ff1d79dbdf1b1be54576ac0f124989 | kloimhardt/werkbank | map.clj | ;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;
; This 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 ; ei... | null | https://raw.githubusercontent.com/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/src/sicmutils/calculus/map.clj | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.calculus.map
(:req... |
a640c865ce09411b75611a22b4fe476797ebad21f7777cf43dad0e51df669aed | frankiesardo/minikusari | core.cljc | (ns minikusari.core
(:require [datascript.core :as d]
[clojure.walk :as walk]))
(defn r
"Tries to match rule against db
Returns tx-data or empty list if rule does not match"
[{:keys [when then args]} db]
(let [syms (for [row then el row :when (symbol? el)] el)
results (apply d/q {:find sy... | null | https://raw.githubusercontent.com/frankiesardo/minikusari/a0e8033fbe2f33a7d25bd20ff5295f2f286998a1/src/minikusari/core.cljc | clojure | (ns minikusari.core
(:require [datascript.core :as d]
[clojure.walk :as walk]))
(defn r
"Tries to match rule against db
Returns tx-data or empty list if rule does not match"
[{:keys [when then args]} db]
(let [syms (for [row then el row :when (symbol? el)] el)
results (apply d/q {:find sy... | |
df0c5f24b24692da5b1538809f4fd3777bd871baa79190a86130e5268de36acc | klarna/graphite-erlang | graphiter.erl | -module(graphiter).
-export([ start/2
, cast/2
, cast/3
, cast/4
, incr_cast/3
, path/1
, get_writers/0
]).
-export_type([ name/0
, path/0
, value/0
, epoch/0
]).
-type name() :: atom().
-type path_seg() :: at... | null | https://raw.githubusercontent.com/klarna/graphite-erlang/f70a15666420aa81452836f19976af6244d75d01/src/graphiter.erl | erlang | _* APIs =====================================================================
@doc Get configured writers.
Supported options:
host (default = "localhost")
graphite (carbon) server
graphite (carbon) plaintext protocol listener
prefix (default = Name)
no prefix is prepended to the metrics names
... | -module(graphiter).
-export([ start/2
, cast/2
, cast/3
, cast/4
, incr_cast/3
, path/1
, get_writers/0
]).
-export_type([ name/0
, path/0
, value/0
, epoch/0
]).
-type name() :: atom().
-type path_seg() :: at... |
d7b77c45b611a1cf8d5564b0134f837866b441147e588a64b88a2a86da7218dc | sinelaw/infernu | TypeClasses.hs | module Infernu.Builtins.TypeClasses
(typeClasses)
where
import Infernu.Prelude
import Infernu.Types
typeClasses :: [(ClassName, Class (Fix FType))]
typeClasses =
[
(ClassName "Pattern", Class { classInstances =
[ schemeEmpty $ Fix $ TBody... | null | https://raw.githubusercontent.com/sinelaw/infernu/e8b7aff6ea628c9099fb82aa011eb5c12aca36ba/src/Infernu/Builtins/TypeClasses.hs | haskell | module Infernu.Builtins.TypeClasses
(typeClasses)
where
import Infernu.Prelude
import Infernu.Types
typeClasses :: [(ClassName, Class (Fix FType))]
typeClasses =
[
(ClassName "Pattern", Class { classInstances =
[ schemeEmpty $ Fix $ TBody... | |
1c2bb7bb87d50cd3a3ee6b2cd8d946f6a75a2e4967d7764a825ab1cae00d9f47 | joergen7/effi | effi.erl | %% -*- erlang -*-
%%
%% Effi: Erlang foreign function interface
%%
Copyright 2015 - 2019 < >
%%
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 ... | null | https://raw.githubusercontent.com/joergen7/effi/aac0d5716c322200dd1145cf6bb651f79834bfd5/src/effi.erl | erlang | -*- erlang -*-
Effi: Erlang foreign function interface
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.... | Copyright 2015 - 2019 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2015 - 2019
There are two foreign language interfaces , both implementing this callback ,
{ @link effi_script } ( e.g. , ... |
1abf5cc5fce33700c3d7a53d977ae67794af7fa5d10de886159885c9bc360441 | imrehg/ypsilon | screen.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk screen)
(export gdk_screen_broadcast_client_message
gdk_screen_get_active_window
gdk_screen_get_default
... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/screen.scm | scheme | gint gdk_screen_get_height_mm (GdkScreen* screen)
GdkColormap* gdk_screen_get_system_colormap (GdkScreen* screen)
gint gdk_screen_height (void)
gint gdk_screen_height_mm (void)
gint gdk_screen_width_mm (void)
[end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk screen)
(export gdk_screen_broadcast_client_message
gdk_screen_get_active_window
gdk_screen_get_default
... |
086c4b5df4043b50199f0903a77254e71774372dcba5d9f0df0b4de1ebe06908 | sordina/churros | Types.hs | # LANGUAGE TypeFamilies #
# LANGUAGE InstanceSigs #
# LANGUAGE FlexibleInstances #
# LANGUAGE BlockArguments #
# LANGUAGE NoMonomorphismRestriction #
| Datatypes and definitions used by Churro library .
--
-- Expand instances for additional documentation!
module Control.Churro.Types where
import Prelude hiding (i... | null | https://raw.githubusercontent.com/sordina/churros/90678e2a59c1596fbc8887b4ac50f79ceb145ec7/src/Control/Churro/Types.hs | haskell |
Expand instances for additional documentation!
$setup
We import the library for testing, although this would be a circular import in the module itself.
** Data, Classes and Instances
| The core datatype for the library.
Parameters `t`, `i` and `o` represent the transport, input, and output types respectiv... | # LANGUAGE TypeFamilies #
# LANGUAGE InstanceSigs #
# LANGUAGE FlexibleInstances #
# LANGUAGE BlockArguments #
# LANGUAGE NoMonomorphismRestriction #
| Datatypes and definitions used by Churro library .
module Control.Churro.Types where
import Prelude hiding (id, (.))
import Control.Arrow
import Control.Category
i... |
2b116b05c0a19824dc2c0657e3af064ff1033cdd2569c77087e4b13706aaff1a | elastic/eui-cljs | calculate_popover_position.cljs | (ns eui.services.calculate-popover-position
(:require ["@elastic/eui/lib/services/popover/calculate_popover_position.js" :as eui]))
(def calculatePopoverPosition eui/calculatePopoverPosition)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/services/calculate_popover_position.cljs | clojure | (ns eui.services.calculate-popover-position
(:require ["@elastic/eui/lib/services/popover/calculate_popover_position.js" :as eui]))
(def calculatePopoverPosition eui/calculatePopoverPosition)
| |
50f394b60112c33ea1aa73869456e3610c5e558e29ed4eaddd30a77baccc97bf | hamler-lang/hamler | Pid.erl | %%---------------------------------------------------------------------------
%% |
Module : Pid
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability : ... | null | https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Data/Pid.erl | erlang | ---------------------------------------------------------------------------
|
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
--------------------------------------------------------------------------- | Module : Pid
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
The Pid FFI Module .
-module('Pid').
-export([eqPidImpl/2, cmpPidImpl/3, showPidImpl/1]).
-spec(eqPidImpl(pid(), pid()) -> boolean()).
eqPidImpl(Pid1, Pid2) -> Pid1 == Pid2.
cmpPidI... |
6521bdec26559d5671b39dee086f4305122b6f4efbaff2e90f747f7e576175ff | chunsj/TH | ch5.lisp | (defpackage :dlfs2-ch5
(:use #:common-lisp
#:mu
#:th
#:th.ex.data
#:th.layers
#:th.text))
(in-package :dlfs2-ch5)
(defparameter *simple-data* '("you" "say" "goodbye" "I" "say" "hello" "."))
(defparameter *encoder* (word-encoder *simple-data*))
(prn (encoder-encode *encoder* ... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/books/dlfs2/ch5.lisp | lisp | reset network
train network
more complex data
simple encoding tests
encoding tests from encoded vocabularies
reset network
train network | (defpackage :dlfs2-ch5
(:use #:common-lisp
#:mu
#:th
#:th.ex.data
#:th.layers
#:th.text))
(in-package :dlfs2-ch5)
(defparameter *simple-data* '("you" "say" "goodbye" "I" "say" "hello" "."))
(defparameter *encoder* (word-encoder *simple-data*))
(prn (encoder-encode *encoder* ... |
03aa669475f766f4cd8b5f9a92751364334ea53064448f81904fd6cc015c8dfe | janestreet/universe | protocol_version_header.ml | open! Core_kernel
module Bounded_list_in_case_someone_sends_garbage_on_the_wire =
List_with_max_len.Make (struct
let max_len = 100
let context = Info.of_string "Protocol_version_header"
end)
type t = int Bounded_list_in_case_someone_sends_garbage_on_the_wire.t
[@@deriving bin_io, sexp]
let create_exn ~pr... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/protocol_version_header/src/protocol_version_header.ml | ocaml | we assume peer is speaking our protocol if [allow_legacy_peer] | open! Core_kernel
module Bounded_list_in_case_someone_sends_garbage_on_the_wire =
List_with_max_len.Make (struct
let max_len = 100
let context = Info.of_string "Protocol_version_header"
end)
type t = int Bounded_list_in_case_someone_sends_garbage_on_the_wire.t
[@@deriving bin_io, sexp]
let create_exn ~pr... |
502290e6532f4ff47d4296003a3cdc447c480a8bc88704b5e57f2f12d165df57 | clash-lang/clash-compiler | Testbench.hs | |
Copyright : ( C ) 2013 - 2016 , University of Twente ,
2017 - 2022 , Google Inc.
2019 , Myrtle Software Ltd ,
2021 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2013-... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/d09e154ef674cea92c8f345d763606cf85e96403/clash-prelude/src/Clash/Explicit/Testbench.hs | haskell | # OPTIONS_HADDOCK show-extensions #
# OPTIONS_GHC -fplugin=GHC.TypeLits.Normalise #
Note that outputVerifier' is used in $setup, while the examples mention
outputVerifier. This is fine, as the examples have explicit type
signatures, turning 'outputVerifier' into 'outputVerifier''.
function is used by 'outputVerifie... | |
Copyright : ( C ) 2013 - 2016 , University of Twente ,
2017 - 2022 , Google Inc.
2019 , Myrtle Software Ltd ,
2021 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2013-... |
8afe73274e555c7cc7e113258d96f2f38ad6cbf68f0f111415d230e549da7e5f | clojure-interop/aws-api | AbstractAmazonSimpleEmailService.clj | (ns com.amazonaws.services.simpleemail.AbstractAmazonSimpleEmailService
"Abstract implementation of AmazonSimpleEmailService. Convenient method forms pass through to the
corresponding overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simpleemail/src/com/amazonaws/services/simpleemail/AbstractAmazonSimpleEmailService.clj | clojure | (ns com.amazonaws.services.simpleemail.AbstractAmazonSimpleEmailService
"Abstract implementation of AmazonSimpleEmailService. Convenient method forms pass through to the
corresponding overload that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ... | |
9834eebdc5a26dc1823180d7987fe1227a76abb46bb6dbcd89d239e27d31fe23 | rudymatela/fitspec | pretty.hs | # LANGUAGE CPP #
import Test.FitSpec
import Text.PrettyPrint as P
#if __GLASGOW_HASKELL__ < 710
pretty < = 1.1.1.1 ( bundled with GHC < = 7.8 ) does not provide this instance
pretty > = 1.1.2.0 ( bundled with GHC > = 7.10 ) does provide this instance
instance Eq Doc where
d == d' = show d == show d'
#endif
in... | null | https://raw.githubusercontent.com/rudymatela/fitspec/f67b0dfc4d7413d62e6c6f4df36df3703f2a4302/bench/pretty.hs | haskell | TODO: Improve this | # LANGUAGE CPP #
import Test.FitSpec
import Text.PrettyPrint as P
#if __GLASGOW_HASKELL__ < 710
pretty < = 1.1.1.1 ( bundled with GHC < = 7.8 ) does not provide this instance
pretty > = 1.1.2.0 ( bundled with GHC > = 7.10 ) does provide this instance
instance Eq Doc where
d == d' = show d == show d'
#endif
in... |
822b60c621fb2f523b7989625ef863dd2625af4fc9e67899843b67ea7fb5efc8 | cbaggers/varjo | early-types.lisp | (in-package :varjo.internals)
(in-readtable :fn.reader)
;;------------------------------------------------------------
Varjo 's root type
(define-v-type-class v-type ()
((core :initform nil :reader core-typep)
(superclass :initform nil)
(glsl-string :initform "£-vtype-£" :reader v-glsl-string)
(glsl-size... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/varjo.internals/types/early-types.lisp | lisp | ------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
Compilation Error
Attached to failed compilation objects when delaying errors
see functions.lisp for use
----------------------------... | (in-package :varjo.internals)
(in-readtable :fn.reader)
Varjo 's root type
(define-v-type-class v-type ()
((core :initform nil :reader core-typep)
(superclass :initform nil)
(glsl-string :initform "£-vtype-£" :reader v-glsl-string)
(glsl-size :initform 1 :reader v-glsl-size)
(casts-to :initform nil)
... |
2ec974f5be593578b75e569bc71e86814807bf2fe67799c6eee961d265ac7b77 | namin/reflection-schemes | data.scm | (define (mk-process fun)
(dict (list (cons 'fun fun))))
(define (mk-env alist)
(dict alist))
| null | https://raw.githubusercontent.com/namin/reflection-schemes/d3fd61aa7edc8af5f7f2c9783b4e3c5356cd2bd5/dev/data.scm | scheme | (define (mk-process fun)
(dict (list (cons 'fun fun))))
(define (mk-env alist)
(dict alist))
| |
17fb29514c94589ec2e93e285daea2e412a3db0fc81a0dfa0dcec0ccf4da78bd | c4-project/c4f | import.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz_actions/test/import.ml | ocaml | * Common imports | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
2499025b60ccf73c0d186645a63f71e698155ac108639bfdf85c7711dfca342c | pjagielski/disclojure-ui | handlers.cljs | (ns disclojure-ui.handlers
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [re-frame.core :as re-frame]
[plumbing.core :refer [map-vals map-keys]]
[cljs.core.async :refer [<!]]
[ajax.core :refer [GET POST PUT]]
[disclojure-ui.db :as db]
[d... | null | https://raw.githubusercontent.com/pjagielski/disclojure-ui/327d2af8f5a904e4ad66f79dc1682d5d79bea0d2/src/cljs/disclojure_ui/handlers.cljs | clojure | (ns disclojure-ui.handlers
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [re-frame.core :as re-frame]
[plumbing.core :refer [map-vals map-keys]]
[cljs.core.async :refer [<!]]
[ajax.core :refer [GET POST PUT]]
[disclojure-ui.db :as db]
[d... | |
a94bd2134867ac469d8cb0fb41e0bfe751f8262c16a9230a57f27c0674f6c7e9 | ekmett/ad | Newton.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
Copyright : ( c ) 2010 - 2021
-- License : BSD3
-- Maintainer :
-- Stability : experimental
Port... | null | https://raw.githubusercontent.com/ekmett/ad/6454d35d1aa6e2af04db9e549146c9cfe8d8bd3b/src/Numeric/AD/Rank1/Newton.hs | haskell | # LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
$setup
>>> import Data.Complex
results. (Modulo the usual caveats.)... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2010 - 2021
Portability : GHC only
module Numeric.AD.Rank1.Newton
(
* 's Method ( Forward )
findZero
, findZeroNoEq
, inverse
, inverseNoEq
, fixedPoint
, fixedPointNoEq
, extrem... |
83f47c82ba4740d81ba402b71982e72de8d4ab952a7220f42db0ef48040e6700 | macourtney/Conjure | conjure_utils.clj | (ns conjure.util.conjure-utils
(:import [java.io File])
(:require [clojure.set :as clj-set]
[clojure.tools.html-utils :as html-utils]
[clojure.tools.loading-utils :as loading-utils]
[clojure.tools.logging :as logging]
[clojure.tools.namespace.file :as clojure-namesp... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_util/src/conjure/util/conjure_utils.clj | clojure | (ns conjure.util.conjure-utils
(:import [java.io File])
(:require [clojure.set :as clj-set]
[clojure.tools.html-utils :as html-utils]
[clojure.tools.loading-utils :as loading-utils]
[clojure.tools.logging :as logging]
[clojure.tools.namespace.file :as clojure-namesp... | |
86d411e6c0902206acb3f053ba00c503f66a300fa88ac97371e34e6535f5dd4a | debug-ito/net-spider | Snapshot.hs | -- |
-- Module: NetSpider.CLI.Snapshot
-- Description: CLI option parser for Query for snapshot graphs
Maintainer : < >
--
-- This module defines CLI option parser for 'Q.Query' for snapshot
-- graphs.
module NetSpider.CLI.Snapshot
( parserSnapshotQuery,
makeSnapshotQuery,
SnapshotConfig(..),
CLISnap... | null | https://raw.githubusercontent.com/debug-ito/net-spider/82dfbdca1add1edfd54ef36cb1ca5129d528b814/net-spider-cli/src/NetSpider/CLI/Snapshot.hs | haskell | |
Module: NetSpider.CLI.Snapshot
Description: CLI option parser for Query for snapshot graphs
This module defines CLI option parser for 'Q.Query' for snapshot
graphs.
^ If 'True', the 'Q.startsFrom' field is read from CLI
arguments. If 'False', arguments are not parsed. In either
'Q.startsFrom'.
| Settings f... | Maintainer : < >
module NetSpider.CLI.Snapshot
( parserSnapshotQuery,
makeSnapshotQuery,
SnapshotConfig(..),
CLISnapshotQuery
) where
import Control.Applicative ((<$>), (<*>), (<|>), many, optional, empty)
import Data.Int (Int64)
import NetSpider.Interval
( interval, parseTimeIntervalEnd, secSin... |
ca31c5ab802c91fe44c710a4f99bb4e99da6f4efa65dd3587d4e3ed63a73f77b | hercules-ci/hercules-ci-agent | Attribute.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE StandaloneDeriving #
module Hercules.API.Attribute
( AttributeType (..),
Attribute (..),
AttributePath (..),
attributePathFromString,
attributePathToString,
)
where
import Control.Applicative (Alternative ((<|>)))
import Control.Lens (at, (%~))
import qua... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/9a04295f6c63d2389fb5eb1bf472b9f385e9f706/hercules-ci-api/src/Hercules/API/Attribute.hs | haskell | # LANGUAGE DeriveAnyClass #
| An arbitrary ordering
--------------------------------------
-------------------------------------- | # LANGUAGE StandaloneDeriving #
module Hercules.API.Attribute
( AttributeType (..),
Attribute (..),
AttributePath (..),
attributePathFromString,
attributePathToString,
)
where
import Control.Applicative (Alternative ((<|>)))
import Control.Lens (at, (%~))
import qualified Data.Aeson as A
import Da... |
9657e72044f6f1f854b5c925225e37024cc47d68b4d2c0cc471522d2f584f35c | lotz84/bitcoin-spv-wallet | NetAddr.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Bitcoin.Protocol.NetAddr where
import Data.Word (Word16)
import Data.Binary (Binary(..))
import GHC.Generics (Generic)
import Bitcoin.Types (Chars, Word64le)
data NetAddr = NetAddr
{ services :: Word64le
, ip :: Chars 16
, port :: Word16
} ... | null | https://raw.githubusercontent.com/lotz84/bitcoin-spv-wallet/3e52d76b201a3f46d825be0a612d51f70dfda131/src/Bitcoin/Protocol/NetAddr.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Bitcoin.Protocol.NetAddr where
import Data.Word (Word16)
import Data.Binary (Binary(..))
import GHC.Generics (Generic)
import Bitcoin.Types (Chars, Word64le)
data NetAddr = NetAddr
{ services :: Word64le
, ip :: Chars 16
, port :: Word16
} ... | |
d61a06fac9ebce6e3126c83010217c788c0dbc3e3ae076e0f5cbaeb8dfb92e54 | racket/errortrace | simple.rkt | #lang racket/base
(require syntax/datum
racket/pretty
compiler/zo-parse
compiler/decompile)
;; Check some transformations directly. We check by compiling, which
;; means that we can check that cerain optimizations still apply, but
;; beware of the extra layer.
(define et-ns (make-base-names... | null | https://raw.githubusercontent.com/racket/errortrace/914f26aa07f97b4aaecea41f5881ac442df93a42/errortrace-test/tests/errortrace/simple.rkt | racket | Check some transformations directly. We check by compiling, which
means that we can check that cerain optimizations still apply, but
beware of the extra layer.
generated expressions should not be instrumented:
Load errortrace:
A plain (datum->syntax #f d orig orig) is not
good enough to put a property on all con... | #lang racket/base
(require syntax/datum
racket/pretty
compiler/zo-parse
compiler/decompile)
(define et-ns (make-base-namespace))
(parameterize ([current-namespace et-ns])
Modules compiled before errortrace , so
(eval '(module m racket/base
(define-syntax-rule (div x)
... |
44dc7dd77f780e086fda7ee757eccb621d7a8dd9c34bf545deae22f356c017c4 | planetfederal/signal | identity.clj | (ns signal.filter.identity
(:require [signal.filter.protocol :as proto]))
(def identifier "identity")
(defrecord IdentityFilter []
proto/IFilter
(exec [this v] true))
(defmethod proto/make-filter identifier
[cfg]
(map->IdentityFilter {}))
| null | https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/src/signal/filter/identity.clj | clojure | (ns signal.filter.identity
(:require [signal.filter.protocol :as proto]))
(def identifier "identity")
(defrecord IdentityFilter []
proto/IFilter
(exec [this v] true))
(defmethod proto/make-filter identifier
[cfg]
(map->IdentityFilter {}))
| |
57629c2183163949fa34794cff2bf45a8b469bc89465aef4e709d01418d71434 | janestreet/krb | mode.ml | module Stable = struct
open! Core.Core_stable
module Conn_type_preference = Conn_type_preference.Stable
module Server_key_source = Server_key_source.Stable
module Principal = Principal.Stable
module V4 = struct
type 'a mode =
| Kerberized of 'a
| Test_with_principal of Principal.Name.V1.t
... | null | https://raw.githubusercontent.com/janestreet/krb/50993f4d8a5d42974a72e160b7b54613568184c1/src/mode.ml | ocaml | module Stable = struct
open! Core.Core_stable
module Conn_type_preference = Conn_type_preference.Stable
module Server_key_source = Server_key_source.Stable
module Principal = Principal.Stable
module V4 = struct
type 'a mode =
| Kerberized of 'a
| Test_with_principal of Principal.Name.V1.t
... | |
1a180f926d92e6442eec0469358925e4bf2df5b2c5bcb07738dc6b6bc6385374 | tfausak/advent-of-code | 1.hs | -- stack --resolver lts-12.0 script
import qualified Data.Char as Char
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Text.ParserCombinators.ReadP as Parse
import qualified Text.Read as Read
main
= print
. Map.size
. Map.filter (> 1)
. foldr (\ ( x, y ) -> Map.insertWith... | null | https://raw.githubusercontent.com/tfausak/advent-of-code/26f0d9726b019ff7b97fa7e0f2f995269b399578/2018/3/1.hs | haskell | stack --resolver lts-12.0 script | import qualified Data.Char as Char
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Text.ParserCombinators.ReadP as Parse
import qualified Text.Read as Read
main
= print
. Map.size
. Map.filter (> 1)
. foldr (\ ( x, y ) -> Map.insertWith (+) ( x, y ) 1) Map.empty
. conca... |
2c1402652c410fcdb45a10df7c989d3a6e655a41da07d80aecd2e7073bc9deb4 | stedolan/mlsub | typector.mli | open Variance
type 'a printer = Format.formatter -> 'a -> unit
module SMap = Symbol.Map
type conflict =
Location.set * Location.set * Error.conflict_reason
module Components : sig
type +'a t
val cmp_component : 'a t -> 'b t -> bool
join Pos is least - upper - bound , join is greatest - lower - bound .
... | null | https://raw.githubusercontent.com/stedolan/mlsub/b425c8da91f45ea59780756950871b80a18ddfc2/typector.mli | ocaml | lte Pos f a b is a <= b, lte Neg f a b is a >= b. f works the same way
same as lte, but returns only a boolean success rather than a list of errors
Syntax for types
Typing contexts
Types are defined only in terms of types
with lower stamps
Stamp of builtin/fully-expanded types.
Less than any other stam... | open Variance
type 'a printer = Format.formatter -> 'a -> unit
module SMap = Symbol.Map
type conflict =
Location.set * Location.set * Error.conflict_reason
module Components : sig
type +'a t
val cmp_component : 'a t -> 'b t -> bool
join Pos is least - upper - bound , join is greatest - lower - bound .
... |
c16d4c3d4dd8bac12e47c41b2d25116ee812ac0ad5a22a50459d80607ef4d299 | jwiegley/notes | Teletype.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Teletype where
import Control.Exceptio... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Teletype.hs | haskell | # LANGUAGE GADTs #
By parameterizing over 't', we keep the choice of input effects out of the
grammar; we are not even required to relate 't' to 'r'.
This "await grammar" is based on the 'streaming' library, but we could swap
giving output as the same).
for the effects).
This term now works for both the pure and ... | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Teletype where
import Control.Exception
import Cont... |
6f8c53a64423fd21a65877d9c8949830bfaea2862ff54a41a96945f7c41f2e60 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.admin.pages.class-profile.students-add.views
(:require
[re-frame.core :as re-frame]
[webchange.admin.pages.class-profile.students-add.state :as state]
[webchange.admin.widgets.add-class-students.views :refer [add-class-students]]
[webchange.admin.widgets.page.views :as page]))
(defn cla... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/f7e9c20b5455c00e6058431cfca9bd486b358af4/src/cljs/webchange/admin/pages/class_profile/students_add/views.cljs | clojure | (ns webchange.admin.pages.class-profile.students-add.views
(:require
[re-frame.core :as re-frame]
[webchange.admin.pages.class-profile.students-add.state :as state]
[webchange.admin.widgets.add-class-students.views :refer [add-class-students]]
[webchange.admin.widgets.page.views :as page]))
(defn cla... | |
93ad71f2e47e4d5f7fec57e6ade99b600491e822989effa049a52a314ce0c30f | input-output-hk/plutus | Pretty.hs | module PlutusCore.Core.Instance.Pretty () where
import PlutusCore.Core.Instance.Pretty.Classic ()
import PlutusCore.Core.Instance.Pretty.Default ()
import PlutusCore.Core.Instance.Pretty.Plc ()
import PlutusCore.Core.Instance.Pretty.Readable ()
| null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-core/plutus-core/src/PlutusCore/Core/Instance/Pretty.hs | haskell | module PlutusCore.Core.Instance.Pretty () where
import PlutusCore.Core.Instance.Pretty.Classic ()
import PlutusCore.Core.Instance.Pretty.Default ()
import PlutusCore.Core.Instance.Pretty.Plc ()
import PlutusCore.Core.Instance.Pretty.Readable ()
| |
c72c20eb90809076bf596591ef8b893bf5f137bb0db02b9aee37e426874fbb21 | dyzsr/ocaml-selectml | wrong_kind.ml | (* TEST
* expect
*)
module Constr = struct
type t = A | B | C
let get _ _ = A
let put f = ignore (f () : t)
end
module Record = struct
type t = { a : int; b : int; c : int }
let get _ _ = { a = 0; b = 0; c = 0 }
let put f = ignore (f () : t)
end
module Bool = struct
type t = true | false
let ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-misc/wrong_kind.ml | ocaml | TEST
* expect
|
module Constr = struct
type t = A | B | C
let get _ _ = A
let put f = ignore (f () : t)
end
module Record = struct
type t = { a : int; b : int; c : int }
let get _ _ = { a = 0; b = 0; c = 0 }
let put f = ignore (f () : t)
end
module Bool = struct
type t = true | false
let get _ _ = true
let p... |
8bf1d3fff7c9190d12c8e2752c7841f9bf38ae9f5f6e8c9227ebc5537bfca14d | jackfirth/racket-expect | main.rkt | #lang reprovide
"private/main.rkt"
| null | https://raw.githubusercontent.com/jackfirth/racket-expect/9530df30537ae05400b6a3add9619e5f697dca52/main.rkt | racket | #lang reprovide
"private/main.rkt"
| |
657517fd814ff153bd682753acf6cd8832f13955f8c99ca2af59a0f10e2ccfdc | mpickering/apply-refact | Extensions29.hs | # LANGUAGE UnboxedTuples #
f :: x -> (x, x); f x = (x, x) | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Extensions29.hs | haskell | # LANGUAGE UnboxedTuples #
f :: x -> (x, x); f x = (x, x) | |
48bab931791560b85fcbd45ea5e08cc35f09e857c4d7b37665680a9c51f3ab3a | stuartsierra/altlaw-backend | DocFilter.clj | org.altlaw.www .
;; This Filter subclass
(ns org.altlaw.www.DocFilter
(:gen-class :extends org.restlet.Filter)
(:require [org.altlaw.util.files :as files])
(:import (org.restlet Filter Context)
(java.util.logging Logger)))
(defn -beforeHandle
[this request response]
(let [attrs (.getAttribu... | null | https://raw.githubusercontent.com/stuartsierra/altlaw-backend/c2ceeb0be2d622ca921339be06de5485733451bc/src/org/altlaw/www/DocFilter.clj | clojure | This Filter subclass
everything up to and including the docid. The Directory
handler is rooted at /public, so we can just add
/docs/123/123456 onto the Reference. | org.altlaw.www .
(ns org.altlaw.www.DocFilter
(:gen-class :extends org.restlet.Filter)
(:require [org.altlaw.util.files :as files])
(:import (org.restlet Filter Context)
(java.util.logging Logger)))
(defn -beforeHandle
[this request response]
(let [attrs (.getAttributes request)
doci... |
3b897d9f8863c42bb4c32abf2db6a2cedf2c685add3dc8540d305f2e6e117e27 | erlang/otp | beam_ssa_pre_codegen.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2018 - 2023 . 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 applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/compiler/src/beam_ssa_pre_codegen.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 Ericsson AB 2018 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
The output of this compiler pass is still in the SSA format , but
the BEAM instructions . For example , the binar... |
abc56d35617365a5d7556c1a0a61b4ea808c100e2dfe81b8fb8ced16334393f5 | spawnfest/eep49ers | db1.erl | -module(db2).
-vsn("1.1").
| null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/sasl/test/systools_SUITE_data/d_replace_app/lib/db-1.1/src/db1.erl | erlang | -module(db2).
-vsn("1.1").
| |
1c3b86849a54b750dbea3a7df0a587b1e939a5314f0594831609fd2708b01f48 | skeet70/pascal-compiler | Dispatcher.hs | Authored by : ,
Date :
--
-- This file contains all the top level methods required for the scanner to
-- function.
module Scanner.Dispatcher where
import Scanner.DigitFSA
import Scanner.LetterFSA
import Scanner.TokenTable
import Data.Maybe
import Data.Char (isDigit, isLetter, isControl,... | null | https://raw.githubusercontent.com/skeet70/pascal-compiler/fc8af1a669ac74f495b0ea46adc4686cd41169a9/Scanner/Dispatcher.hs | haskell |
This file contains all the top level methods required for the scanner to
function.
| Returns all the same things, expecting the reciever to extract the final
token
get the next character
| skipWhitespace expects to recieve parameters that have already consumed
modified source and column/line numbers.
g... | Authored by : ,
Date :
module Scanner.Dispatcher where
import Scanner.DigitFSA
import Scanner.LetterFSA
import Scanner.TokenTable
import Data.Maybe
import Data.Char (isDigit, isLetter, isControl, isSpace)
| Starts with the input string ( assuming at first character of next lexeme ) , ... |
80477af92881c58fb849124a40315cbfa0f2cecea0a5ec89e5d31affd4ba1c80 | haskell-compat/base-compat | Batteries.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
-- | Reexports "Numeric.Compat"
-- from a globally unique namespace.
module Numeric.Compat.Repl.Batteries (
module Numeric.Compat
) where
import "this" Numeric.Compat
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Numeric/Compat/Repl/Batteries.hs | haskell | # LANGUAGE PackageImports #
| Reexports "Numeric.Compat"
from a globally unique namespace. | # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
module Numeric.Compat.Repl.Batteries (
module Numeric.Compat
) where
import "this" Numeric.Compat
|
8007e38bd06f5dcef6f07c30c4067358332c4225a3a0b3f7c4103fb226a41bba | Verites/verigraph | GraphMorphismSpec.hs | module Data.Graphs.GraphMorphismSpec where
import Test.Hspec
import Data.Graphs
import Data.Graphs.Morphism
spec :: Spec
spec = do
describe "removeNodeFromDomain" $ do
it "Should not remove node with incident edges" $ do
removeNodeFromDomain 1 g1 `shouldBe` g1
remove... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/tests/Data/Graphs/GraphMorphismSpec.hs | haskell | module Data.Graphs.GraphMorphismSpec where
import Test.Hspec
import Data.Graphs
import Data.Graphs.Morphism
spec :: Spec
spec = do
describe "removeNodeFromDomain" $ do
it "Should not remove node with incident edges" $ do
removeNodeFromDomain 1 g1 `shouldBe` g1
remove... | |
bd8722a165b1109268c1d22b95fbd76ecca715c1e20e576f7596b90197cdb36a | Helium4Haskell/helium | LexerMessage.hs | | Module : LexerMessage
License : GPL
Maintainer :
Stability : experimental
Portability : portable
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.Parser.LexerMessage
( LexerError(..)
... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/src/Helium/Parser/LexerMessage.hs | haskell | 'reverse' because positions will be sorted and brackets are
reported in reversed order | | Module : LexerMessage
License : GPL
Maintainer :
Stability : experimental
Portability : portable
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.Parser.LexerMessage
( LexerError(..)
... |
df8f3f7fc6cc310d62d89cb753f919d44a104504c34c4de76b02f0cb5580d78a | exercism/haskell | ProteinTranslation.hs | module ProteinTranslation(proteins) where
proteins :: String -> Maybe [String]
proteins = error "You need to implement this function!"
| null | https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/protein-translation/src/ProteinTranslation.hs | haskell | module ProteinTranslation(proteins) where
proteins :: String -> Maybe [String]
proteins = error "You need to implement this function!"
| |
db53836ff173f5f9001727b9a565cd5b7a58060b8b088906e969adb55a555fc2 | blindglobe/clocc | elisp.lisp | Load Emacs - Lisp files into Common Lisp
;;;
Copyright ( C ) 1999 - 2004 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
;;; See
;;;
$ I d : elisp.lisp , v 2.15 2008/06/16 16:02:32 sds Exp $
;;; $Source: /cvsroot/clocc/clocc/src/cllib/elisp.lisp,v $
(eval-when (:compile-toplevel :lo... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/elisp.lisp | lisp |
See
$Source: /cvsroot/clocc/clocc/src/cllib/elisp.lisp,v $
`make-clos-readtable'
`from-list'
Read Emacs-Lisp objects
tmp hacks
(el::mapconcat #'identity '("a" "b" "c") " ") ==> "a b c"
incomplete
Load Emacs-Lisp files
search the local files
search the subdirectories
(in-package :cl-user)
(in-pac... | Load Emacs - Lisp files into Common Lisp
Copyright ( C ) 1999 - 2004 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
$ I d : elisp.lisp , v 2.15 2008/06/16 16:02:32 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :cllib-base (translate-logical-pathname "cl... |
dec2c48ad7191de017e5f089def0f06b8c38b7236e789a638a4e91c3e82e6fef | bintracker/bintracker | mz700.scm | (id: "mz700"
cpu: z80
clock-speed: 3546894
default-start-address: #x1200
exports: ())
| null | https://raw.githubusercontent.com/bintracker/bintracker/d09e0a9315b988b2aa2f8e4d1754182b17e10a54/libmdal/mdal-targets/mz700.scm | scheme | (id: "mz700"
cpu: z80
clock-speed: 3546894
default-start-address: #x1200
exports: ())
| |
cae05bb487886a550ae36ec4e494a7c444339579014e7c221aaf47213328797e | TyOverby/mono | bonsai_web_rpgdice_example.ml | module Roll_result = Roll_result
module Roll_spec = Roll_spec
| null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/rpgdice/src/bonsai_web_rpgdice_example.ml | ocaml | module Roll_result = Roll_result
module Roll_spec = Roll_spec
| |
9e951a146993eebabe6d6b2576f3258897832cd89fd2abbe868c57a56c503a3a | chrisdone/freenect | SetLed.hs | -- | Freenect examples
Sets LED from Kinect device
module Main (main) where
import Freenect
import Text.Printf
import Data.Char
import System.IO
main :: IO ()
main =
withContext $ \context -> do
deviceCount <- countDevices context
printf "Devices: %d\n" deviceCount
selectSubdevices context d... | null | https://raw.githubusercontent.com/chrisdone/freenect/2f17e5a2351b766a7343dca983f240e21f9ba365/examples/src/SetLed.hs | haskell | | Freenect examples | Sets LED from Kinect device
module Main (main) where
import Freenect
import Text.Printf
import Data.Char
import System.IO
main :: IO ()
main =
withContext $ \context -> do
deviceCount <- countDevices context
printf "Devices: %d\n" deviceCount
selectSubdevices context devices
printf "Se... |
9fe8799228522fe2f44a6a44d724f3f677765c24e023b5485af5414c3af2a772 | jeffshrager/biobike | arithmetic-type-doc.lisp |
-*- Package : bbi ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :bbi)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;; |... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Doc/bbldf/reduced/arithmetic-type-doc.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :bbi)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to ... |
52cd57ce4b268dcedfe47fa1cf684a0047fb27732e4e426848607cda5454bec7 | pixlsus/registry.gimp.org_static | 00-Isometric-Tile-and-Template_v1.0.scm | ; GIMP script-fu-00-isometric-tile-and-template
version 1.0 2011.01.31
Copyright ( c ) 2011
;
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License ... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/00-Isometric-Tile-and-Template_v1.0.scm | scheme | GIMP script-fu-00-isometric-tile-and-template
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNE... | version 1.0 2011.01.31
Copyright ( c ) 2011
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
(define (script-fu-00-isometric-tile-and-template
width
... |
f164e3283512ba5aceea3736c56823dc1baa3ac718e2b92ea51f4a0a2c9476f2 | metabase/metabase | nest_query_test.clj | (ns metabase.query-processor.util.nest-query-test
(:require
[clojure.test :refer :all]
[clojure.walk :as walk]
[metabase.driver :as driver]
[metabase.models :refer [Card Field]]
[metabase.query-processor :as qp]
[metabase.query-processor.util.add-alias-info :as add]
[metabase.query-processor.util... | null | https://raw.githubusercontent.com/metabase/metabase/e587a20cbee9b4046b97938e5bd4a04a6ccb1881/test/metabase/query_processor/util/nest_query_test.clj | clojure | nested query has filter values with join-alias that should not
be selected
nested query has an implicit join with conditions that should
not be selected
filter on an implicit join
the result returned is not important, just important that the query is valid and completes | (ns metabase.query-processor.util.nest-query-test
(:require
[clojure.test :refer :all]
[clojure.walk :as walk]
[metabase.driver :as driver]
[metabase.models :refer [Card Field]]
[metabase.query-processor :as qp]
[metabase.query-processor.util.add-alias-info :as add]
[metabase.query-processor.util... |
94e6f52f7594c9db7a2a373a813e70fb792fb34754f25dcad535171ecd0aaa02 | OCamlPro/ocaml-benchs | cohttp_lwt_bench.ml | open Lwt
open Cohttp_lwt_unix
let main n p =
let server () =
let open Server in
let callback conn req body =
respond_string ~status:`OK ~body:"Ok!" () in
create ~mode:(`TCP (`Port p)) (make ~callback ())
in
let get_n n =
let rec inner = function
| n when n <= 0 -> Lwt.return_unit
... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/cohttp/cohttp_lwt_bench.ml | ocaml | open Lwt
open Cohttp_lwt_unix
let main n p =
let server () =
let open Server in
let callback conn req body =
respond_string ~status:`OK ~body:"Ok!" () in
create ~mode:(`TCP (`Port p)) (make ~callback ())
in
let get_n n =
let rec inner = function
| n when n <= 0 -> Lwt.return_unit
... | |
63b5a377f5c66a224584f42b0b8054a6c284fd5ba72f1be10b89920bcddadb46 | garrigue/labltk | calc.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/examples_labltk/calc.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
75a74d44ab9d357c90c4245ea6f5fb09c0ffa6ff38b557fd70b637865d09d710 | hoelzl/Clicc | delete.lisp | ;;;-----------------------------------------------------------------------------
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
;;;-----------------------------------------------------------------------------
Projekt : APPLY - A Practicable And Portable Lisp Implementation
;;; ... | null | https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/delete.lisp | lisp | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------------------
$Log: delete.lisp,v $
?used-Methode fuer importierte Funktionen definiert.
defined- und impo... | Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
Projekt : APPLY - A Practicable And Portable Lisp Implementation
Inhalt : Funktionen zum Aufspueren und Beseitigen von unbenutzten
Funktionen , Symbolen und benannten Konstanten .
$ Revision : 1.33 $
Revision 1.33 ... |
fdb7fec43f1690ed1eb3187cbabc5cad58620e072953bddff1a7c595b9e77629 | lambdacube3d/lambdacube-gl | Backend.hs | # LANGUAGE TupleSections , MonadComprehensions , RecordWildCards , LambdaCase , FlexibleContexts #
module LambdaCube.GL.Backend where
import Control.Applicative
import Control.Monad
import Control.Monad.State.Strict
import Data.Maybe
import Data.Bits
import Data.IORef
import Data.IntMap (IntMap)
import Data.Maybe (isN... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-gl/980ac1fcfd8a25ad62ed360f6021fc9e60c266f7/src/LambdaCube/GL/Backend.hs | haskell | cull mode
polygon mode
polygon offset
provoking vertex
workaround
workaround
there must be some clever way to extract the generality here, I'm sure..
putStr " + compile shader source: " >> printGLStatus
putStr " + setup shader output mapping: " >> printGLStatus
check link status
check program input
print... | # LANGUAGE TupleSections , MonadComprehensions , RecordWildCards , LambdaCase , FlexibleContexts #
module LambdaCube.GL.Backend where
import Control.Applicative
import Control.Monad
import Control.Monad.State.Strict
import Data.Maybe
import Data.Bits
import Data.IORef
import Data.IntMap (IntMap)
import Data.Maybe (isN... |
9fa595a4d16331037b46c7d4d462b2ea4c9af0968a32259886b4b6c02088b007 | samrushing/irken-compiler | t_rope.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/rope.scm")
;; `nstring` is an experiment: create `s*n` using a single copy
;; of `s` and building a tree structure with repeated sharing.
[ i.e. , create SS , ( ( SS*2)*2)*2 ... ]
AAAA
;; x = (A A)
;; y = (x x) == AAAA
;; ... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_rope.scm | scheme | -*- Mode: Irken -*-
`nstring` is an experiment: create `s*n` using a single copy
of `s` and building a tree structure with repeated sharing.
x = (A A)
y = (x x) == AAAA
z = (y y) == AAAAAAAA
we get the most efficient encoding when
the size of the node is smaller than the plain string.
n bytes: string
so ... |
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/rope.scm")
[ i.e. , create SS , ( ( SS*2)*2)*2 ... ]
AAAA
on 64 - bit , a plain string is :
8 bytes : tag+len
4 bytes : slen
2 bytes : 8 + 4 + 8 = 20 bytes
8 bytes : 8 + 4 + 8 = 20 bytes
16 bytes : 8 + 4 + 16 = 28 bytes
node ov... |
9e97c8950cb72f7cc8f473b6785aa859d1af45e7d67b083f6085b13bb05a4cd5 | haskell-haskey/haskey | Catch.hs | module Database.Haskey.Utils.Monad.Catch where
import Control.Monad.Catch
justErrM :: (MonadThrow m, Exception e) => e -> Maybe a -> m a
justErrM _ (Just v) = return v
justErrM e Nothing = throwM e
| null | https://raw.githubusercontent.com/haskell-haskey/haskey/299f070fcb0d287404d78399f903cecf7ad48cdd/src/Database/Haskey/Utils/Monad/Catch.hs | haskell | module Database.Haskey.Utils.Monad.Catch where
import Control.Monad.Catch
justErrM :: (MonadThrow m, Exception e) => e -> Maybe a -> m a
justErrM _ (Just v) = return v
justErrM e Nothing = throwM e
| |
bd7fef51d71a9d292d84243fb98e4923325ceb4a7abf604a94fb97d3c028c7c9 | Ramarren/cffi-clutter | gobject-subclass.lisp | (in-package :cffi-clutter)
;; factor out some subclassing architecture
(defvar *g-type-cache* (make-hash-table))
(defun get-g-type (symbol namestring)
(if-let ((cache (gethash symbol *g-type-cache*)))
cache
(let ((g-type (g-type-from-name namestring)))
(when (not (zerop g-type))
(setf (gethas... | null | https://raw.githubusercontent.com/Ramarren/cffi-clutter/498314cf5aa593e57a724252ae65dcf4ac9a835d/gobject-subclass.lisp | lisp | factor out some subclassing architecture
add an actor with a lisp resource
the class hold a number
class
instance, with resource number
accessors
instance finalization
base class initialization
base class finalization
static class initialization
instance initialization | (in-package :cffi-clutter)
(defvar *g-type-cache* (make-hash-table))
(defun get-g-type (symbol namestring)
(if-let ((cache (gethash symbol *g-type-cache*)))
cache
(let ((g-type (g-type-from-name namestring)))
(when (not (zerop g-type))
(setf (gethash symbol *g-type-cache*)
g-typ... |
7b1651788d04807ee5a1dd37b61bcbe7d37f19119ea892f8991c885578bb2b6c | ghc/ghc | Static.hs | module GHC.Linker.Static
( linkBinary
, linkStaticLib
)
where
import GHC.Prelude
import GHC.Platform
import GHC.Platform.Ways
import GHC.Settings
import GHC.SysTools
import GHC.SysTools.Ar
import GHC.Unit.Env
import GHC.Unit.Types
import GHC.Unit.Info
import GHC.Unit.State
import GHC.Utils.Logger
import GH... | null | https://raw.githubusercontent.com/ghc/ghc/9ea719f2f1929bf2b789e4001f6c542a04185d61/compiler/GHC/Linker/Static.hs | haskell | ---------------------------------------------------------------------------
Static linking, of .o files
The list of packages passed to link is the list of packages on
which this program depends, as discovered by the compilation
manager. It is combined with the list of packages that the user
specifies on the comma... | module GHC.Linker.Static
( linkBinary
, linkStaticLib
)
where
import GHC.Prelude
import GHC.Platform
import GHC.Platform.Ways
import GHC.Settings
import GHC.SysTools
import GHC.SysTools.Ar
import GHC.Unit.Env
import GHC.Unit.Types
import GHC.Unit.Info
import GHC.Unit.State
import GHC.Utils.Logger
import GH... |
e99a74e41db362cf56a540e87e4e5f6127ab7e818390f731ec84d667c26045c1 | KestrelInstitute/Specware | test.lisp | (swl "Bref" "B")
(load "B")
result = 21
result = 18
| null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/UserDoc/examples/simple1/test.lisp | lisp | (swl "Bref" "B")
(load "B")
result = 21
result = 18
| |
cf9f09192fb4c66c870ece8e3ca32fd8c1ff295ff356ccde23a5a69f70a2d4e0 | manavpatnaik/haskell | 29_print_primes.hs | factors1 n = [x | x <- [1..n`div`2], n `mod` x == 0] ++ [n]
isPrime :: Int -> Bool
isPrime n = length (factors1 n) == 2
printPrimesTill :: Int -> [Int]
printPrimesTill n = [x | x <- [2..n], isPrime x]
main = do
print(printPrimesTill 10)
print(printPrimesTill 20) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/235b99b2e087b4e020b8cf7fbe4c21216e15e68f/basic-programs/29_print_primes.hs | haskell | factors1 n = [x | x <- [1..n`div`2], n `mod` x == 0] ++ [n]
isPrime :: Int -> Bool
isPrime n = length (factors1 n) == 2
printPrimesTill :: Int -> [Int]
printPrimesTill n = [x | x <- [2..n], isPrime x]
main = do
print(printPrimesTill 10)
print(printPrimesTill 20) | |
339e1fe7e2999f3f357ff99e4c24a59a62cfcee007a0cfe488b135d1fcc02979 | ElvishJerricco/fraxl | Fraxl.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TupleSecti... | null | https://raw.githubusercontent.com/ElvishJerricco/fraxl/12b3be244686f9bf7c41c605cdd54c0f8559d03e/src/Control/Monad/Trans/Fraxl.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
* The Fraxl Monad
* Caching
* Union
which is used to parallelize effects.
| Fraxl is just the 'FreerT' monad transformer, applied with 'Unio... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TupleSections #
# LANGUAGE UndecidableInstances #
module Control.Monad.Trans.Fraxl
(
FreerT
, Fraxl
, Fetch
, runFraxl
, simpleAsyncFetch
... |
7e2538bf1afa43e844ebc9061d39301aa3530bdca8b65cbd67fd7e5c38294e73 | kupl/LearnML | patch.ml | type nat = ZERO | SUCC of nat
let rec natadd (n1 : nat) (n2 : nat) : nat =
match (n1, n2) with
| ZERO, ZERO -> ZERO
| SUCC n1', ZERO -> SUCC (natadd n1' n2)
| ZERO, SUCC n2' -> SUCC (natadd n1 n2')
| SUCC n1', SUCC n2' -> SUCC (natadd n1' n2)
let rec __s4 (__s5 : nat) (__s6 : nat) (__s7 : nat) : nat =
ma... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub5/patch.ml | ocaml | type nat = ZERO | SUCC of nat
let rec natadd (n1 : nat) (n2 : nat) : nat =
match (n1, n2) with
| ZERO, ZERO -> ZERO
| SUCC n1', ZERO -> SUCC (natadd n1' n2)
| ZERO, SUCC n2' -> SUCC (natadd n1 n2')
| SUCC n1', SUCC n2' -> SUCC (natadd n1' n2)
let rec __s4 (__s5 : nat) (__s6 : nat) (__s7 : nat) : nat =
ma... | |
077806ecb96c04a12fbcbb4a72f065b7a4985e2f9c788d09dab1e7da7ddf2f12 | greghendershott/pdb | single.rkt | #lang racket/base
(require (for-syntax racket/base))
(module m racket/base
(require (for-syntax racket/base))
(define x 0)
(provide x)
(begin-for-syntax
(define x 1)
(provide x)))
(require 'm)
(printf "0 = ~a\n" x)
(begin-for-syntax
(printf "1 = ~a\n" x))
| null | https://raw.githubusercontent.com/greghendershott/pdb/1be87626d9adb73a1f91fb7f252cd34a7d3b7e7e/example/phase/single.rkt | racket | #lang racket/base
(require (for-syntax racket/base))
(module m racket/base
(require (for-syntax racket/base))
(define x 0)
(provide x)
(begin-for-syntax
(define x 1)
(provide x)))
(require 'm)
(printf "0 = ~a\n" x)
(begin-for-syntax
(printf "1 = ~a\n" x))
| |
7e388caff1fffd242a79c9ea14997109b7641866a8e4562a18dc5c9d90615c07 | tonyg/racket-abnf | ast.rkt | #lang racket/base
(provide (all-defined-out))
(struct message (headers body) #:prefab)
(struct address (display-name spec) #:prefab)
(struct routed-addr (route address) #:prefab)
(struct group (display-name mailboxes) #:prefab)
(struct date-time (day-of-week date time) #:prefab)
(struct date (year month day) #:prefa... | null | https://raw.githubusercontent.com/tonyg/racket-abnf/1079bc5b30a227f52ac00a84dc3fcd539da5f8db/abnf/rfc5322/ast.rkt | racket | #lang racket/base
(provide (all-defined-out))
(struct message (headers body) #:prefab)
(struct address (display-name spec) #:prefab)
(struct routed-addr (route address) #:prefab)
(struct group (display-name mailboxes) #:prefab)
(struct date-time (day-of-week date time) #:prefab)
(struct date (year month day) #:prefa... | |
b0818ef49f02629c56e30f32a0da6f707f0589e0ed6f8a97c834487030133257 | bos/rwh | ApplicativeParsec.hs | - snippet ApplicativeParsec -
module ApplicativeParsec
(
module Control.Applicative
, module Text.ParserCombinators.Parsec
) where
import Control.Applicative
import Control.Monad (MonadPlus(..), ap)
-- Hide a few names that are provided by Applicative.
import Text.ParserCombinators.Parsec hiding (man... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch16/ApplicativeParsec.hs | haskell | Hide a few names that are provided by Applicative. | - snippet ApplicativeParsec -
module ApplicativeParsec
(
module Control.Applicative
, module Text.ParserCombinators.Parsec
) where
import Control.Applicative
import Control.Monad (MonadPlus(..), ap)
import Text.ParserCombinators.Parsec hiding (many, optional, (<|>))
The Applicative instance for ev... |
e10449dd9e0bb8f51db0b4b7d06135bd07bb2aaccafc8faf69fdd5221c3fa5cd | ekmett/linear-logic | affine.hs | {- cabal:
build-depends: base, constraints
-}
# language TypeFamilies , TypeFamilyDependencies , ConstraintKinds , ScopedTypeVariables , NoStarIsType , TypeOperators , TypeApplications , GADTs , AllowAmbiguousTypes , FunctionalDependencies , UndecidableSuperClasses , UndecidableInstances , FlexibleInstances , Quantifie... | null | https://raw.githubusercontent.com/ekmett/linear-logic/c6c0e00dd86ecadb016109bbdc202f9ffb8f3be5/wip/affine.hs | haskell | cabal:
build-depends: base, constraints
(Eq a + Ord [a]) :- Eq [a]
now we need to get into more serious dictionary manipulation
withL :: Dict (p & q ⊸ p)
withL = Dict
bot : : ( forall = > r ) - >
bot :: (forall r. Top => r) -> | # language TypeFamilies , TypeFamilyDependencies , ConstraintKinds , ScopedTypeVariables , NoStarIsType , TypeOperators , TypeApplications , GADTs , AllowAmbiguousTypes , FunctionalDependencies , UndecidableSuperClasses , UndecidableInstances , FlexibleInstances , QuantifiedConstraints , BlockArguments , RankNTypes , F... |
780622b7cd953d955bc9ebf9da180f30db405207d456e81ca225b4cc05f172d4 | babashka/sci | multimethods.cljc | (ns sci.impl.multimethods
{:no-doc true}
(:refer-clojure :exclude [defmulti defmethod])
(:require
#?(:clj [clojure.string :as str])
[sci.impl.hierarchies :refer [global-hierarchy]]))
#?(:clj (set! *warn-on-reflection* true))
(defn ^:private check-valid-options
"Throws an exception if the given option ma... | null | https://raw.githubusercontent.com/babashka/sci/8884529f67c6af50a7d001211027f47ccc684775/src/sci/impl/multimethods.cljc | clojure | Should we inject the ctx here to resolve the type? no, because type can really be dynamic?
thus we need a way to detect if a value is an instance of a record or type
no, because print-method looks at core type | (ns sci.impl.multimethods
{:no-doc true}
(:refer-clojure :exclude [defmulti defmethod])
(:require
#?(:clj [clojure.string :as str])
[sci.impl.hierarchies :refer [global-hierarchy]]))
#?(:clj (set! *warn-on-reflection* true))
(defn ^:private check-valid-options
"Throws an exception if the given option ma... |
87689c53e059c1f1dbd2762e45183bf3e003f2f477616d7b5b3f0cda79fde3ad | mejgun/haskell-tdlib | ChatNearby.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.ChatNearby where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
data ChatNearby = -- | Describes a chat located nearby @chat_id Chat identifier @distance Distance to the chat location, in meters
ChatNea... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/ChatNearby.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Describes a chat located nearby @chat_id Chat identifier @distance Distance to the chat location, in meters
|
| |
module TD.Data.ChatNearby where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
ChatNearby
distance :: Maybe Int,
chat_id :: Maybe Int
}
deriving (Eq)
instance Show ChatNearby where
show
ChatNearby
{ distance = distance_,
chat_id ... |
7f952e09b213315d2f51df4890eb83d802daa40d995daf678f345ad5de4f6bd2 | xach/zpb-ttf | loca.lisp | Copyright ( c ) 2006 , All Rights Reserved
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions... | null | https://raw.githubusercontent.com/xach/zpb-ttf/d1cb862af9fe27559ef18a3f0e91511e837a72f3/loca.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form ... | Copyright ( c ) 2006 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
$ I d : loca.lisp , v 1.3 2006/02/18 23:13:43 xach Exp $
(in-package #:zpb-ttf)
(defmethod load-loca-info ((font-loader font-loade... |
e2c8efe2ea1938e88ddacd380c18c2d8b8dc1957f2e49adb94f6e9d091b17953 | AppsFlyer/pronto | protos.clj | (ns pronto.protos)
(def global-ns "pronto.protos")
| null | https://raw.githubusercontent.com/AppsFlyer/pronto/42080ecb11977d60bea9cb6038b4446ba3cdbd5a/src/clj/pronto/protos.clj | clojure | (ns pronto.protos)
(def global-ns "pronto.protos")
| |
d34a3e30759dc9c3ee89682121c8a68f7bdf49751702c11ef41788a2c21d850e | binsec/haunted | directive.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/utils/directive.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
e54ca0e6e5ea03d286e0b71b327bc45b34f296a9cf39224a3371d89663149577 | damn/cdq | module.clj | (ns mapgen.module
(:use data.grid2d
game.maps.tiledmaps
[game.tools.tiledmap-grid-convert :only (get-spriteidx)]
[mapgen.utils :only (border-position?)]))
(defn- print-cell [celltype]
(print (case celltype
nil " "
:ground "_"
:wall "#"
:airwalkabl... | null | https://raw.githubusercontent.com/damn/cdq/5093dbdba91c445e403f53ce96ead05d5ed8262b/src/mapgen/module.clj | clojure |
connect to one of all module connection points:
grid (update-in grid [:connections] concat (map #(mapv + topleft %) connections))
connect to only the last module:
TODO for performance remove already connected cps (grid-cp) from (:connections grid)
grid (update-in grid [:connections] #(remove #{grid-cp} %))
but ta... | (ns mapgen.module
(:use data.grid2d
game.maps.tiledmaps
[game.tools.tiledmap-grid-convert :only (get-spriteidx)]
[mapgen.utils :only (border-position?)]))
(defn- print-cell [celltype]
(print (case celltype
nil " "
:ground "_"
:wall "#"
:airwalkabl... |
591e6016ebcafbf925ea0383c482a5d7ef58a7d4e5786e201a5216a161c02b4d | elastic/es2unix | http.clj | (ns es.http
(:refer-clojure :exclude [get])
(:require [clj-http.client :as http]
[cheshire.core :as json]
[es.local :as local]
[slingshot.slingshot :refer [throw+]])
(:import (java.net URI URL)))
(defn local? [url]
(and (string? url) (.startsWith url "local:")))
(defn get* ... | null | https://raw.githubusercontent.com/elastic/es2unix/87cd8d17faa07f964ac85505b744b6a4dfe813d4/src/es/http.clj | clojure | (ns es.http
(:refer-clojure :exclude [get])
(:require [clj-http.client :as http]
[cheshire.core :as json]
[es.local :as local]
[slingshot.slingshot :refer [throw+]])
(:import (java.net URI URL)))
(defn local? [url]
(and (string? url) (.startsWith url "local:")))
(defn get* ... | |
4c18eae1c022d488f76b9b813233186b4f93c53e9327f7f23b46f159526d733b | TheClimateCorporation/mandoline | slab_test.clj | (ns io.mandoline.slab-test
(:use
[midje sweet]
[clojure test])
(:require
[io.mandoline.slab :as slab]
[io.mandoline.slice :as slice]
[io.mandoline.test.utils :as test-utils])
(:import
[ucar.ma2 Array DataType]))
(deftest empty-test
(facts "empty returns arrays of the right shape and fill."
... | null | https://raw.githubusercontent.com/TheClimateCorporation/mandoline/fa26162ef0349ecb71be9d27a46652206f5c1b99/test/io/mandoline/slab_test.clj | clojure | proper subsetting
throws assertion error when requested slice does not overlap
throws assertion error when step sizes are different
proper intersections | (ns io.mandoline.slab-test
(:use
[midje sweet]
[clojure test])
(:require
[io.mandoline.slab :as slab]
[io.mandoline.slice :as slice]
[io.mandoline.test.utils :as test-utils])
(:import
[ucar.ma2 Array DataType]))
(deftest empty-test
(facts "empty returns arrays of the right shape and fill."
... |
7c4f4aefec3283e77434850e5417ccbf982a0f95ea53f580e7024b7a936fb95d | walck/learn-physics | CoordinateFields.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE Safe #-}
|
Module : Physics . Learn . CoordinateFields
Copyright : ( c ) 2012 - 2018
License : BSD3 ( see LICENSE )
Maintainer : < >
Stability : experimental
Coordinate fields for Cartesian , cylindrical , and spherical coordinates .... | null | https://raw.githubusercontent.com/walck/learn-physics/99611ca49940b78a0e13402f35082805cc7db294/src/Physics/Learn/CoordinateFields.hs | haskell | # LANGUAGE Safe #
| The z Cartesian (or cylindrical) coordinate of a position.
| The s cylindrical coordinate of a position.
This is the distance of the position from the z axis.
This is the angle from the positive x axis
to the projection of the position onto the xy plane.
| The r spherical coordinate of ... | # OPTIONS_GHC -Wall #
|
Module : Physics . Learn . CoordinateFields
Copyright : ( c ) 2012 - 2018
License : BSD3 ( see LICENSE )
Maintainer : < >
Stability : experimental
Coordinate fields for Cartesian , cylindrical , and spherical coordinates .
Module : Phys... |
cfed9de5ed0bf505fbf9f9b89bece62109414f74c1fd18453ff4d60f4dc08138 | mpickering/ghcide-reflex | Service.hs | # LANGUAGE PartialTypeSignatures #
{-# LANGUAGE GADTs #-}
# LANGUAGE RecursiveDo #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE NoMonoLocalBinds #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE Ran... | null | https://raw.githubusercontent.com/mpickering/ghcide-reflex/67ddebf0c1d4728e850057b9bd7c6852c0d96350/src/Development/IDE/Core/Reflex/Service.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NoMonoLocalBinds #
# LANGUAGE RankNTypes #
# LANGUAGE ConstraintKinds #
Start the network, the main entry point
Doesn't typecheck if you have the signature (haha)
Less important to incrementally build the diagnostics map I think
Start reporting diagnostics
Start running the user suppl... | # LANGUAGE PartialTypeSignatures #
# LANGUAGE RecursiveDo #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TemplateHaskell #
# LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
# LANGUAGE Flexibl... |
4a011a8488d34eb58999ad221654eb051da2677f14d815a0750234b9e83ed10a | ddmcdonald/sparser | document-parts.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 2021 -- all rights reserved
;;;
;;; File: "loader"
Module : " : mid - level : "
version : November 2021
;; Broken out of sl/biology/terms.lisp 1/13/21.
(in-package :sparser)
(define-mixin-category visual-representatio... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/5a16c18417f725575e8c8c4a58fde433519e86cb/Sparser/code/s/grammar/model/core/mid-level/document-parts.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "loader"
Broken out of sl/biology/terms.lisp 1/13/21.
figures, arrows, stars, etc.
to allow "et al." to be easily ignored
??? | copyright ( c ) 2021 -- all rights reserved
Module : " : mid - level : "
version : November 2021
(in-package :sparser)
:specializes abstract)
(define-category document-part :specializes abstract
:binds ((topic (:or medical-condition bio-chemical-entity)))
:realization (:m topic
... |
095797d96f35a15cb07eab1fbeb621bb4c0558375adf7845732ca9b0c6537110 | btmura/b1 | UtilsTest.hs | module B1.Data.String.UtilsTest
( getTestGroup
) where
import Test.Framework
import qualified Test.Framework.Providers.API
import Test.Framework.Providers.HUnit
import Test.HUnit
import B1.Data.String.Utils
getTestGroup :: Test.Framework.Providers.API.Test
getTestGroup = testGroup "B1.Data.String.UtilsTest"
[... | null | https://raw.githubusercontent.com/btmura/b1/9cf0514ba1e03e9f4da05be9231acde07b199864/tests/B1/Data/String/UtilsTest.hs | haskell | module B1.Data.String.UtilsTest
( getTestGroup
) where
import Test.Framework
import qualified Test.Framework.Providers.API
import Test.Framework.Providers.HUnit
import Test.HUnit
import B1.Data.String.Utils
getTestGroup :: Test.Framework.Providers.API.Test
getTestGroup = testGroup "B1.Data.String.UtilsTest"
[... | |
8dc4b620e8ddaeeb72f57fa327c4193c2434adc4fe8e3f06327e51b631eb8ec5 | phlummox/hup | Types.hs |
module Types
(
Server(..)
, GlobalOpts(..)
, PartialServer
)
where
import Distribution.Hup.Upload
data Server = Server { serverURL :: String
,serverAuth :: Maybe Auth }
deriving (Show, Eq)
data GlobalOpts = GlobalOpts { optVerbose ... | null | https://raw.githubusercontent.com/phlummox/hup/059c3cb4e15f846fbffb35f937293f367bcc966d/app/Types.hs | haskell | | A server url, and possibly username and/or password.
We may need to obtain more. |
module Types
(
Server(..)
, GlobalOpts(..)
, PartialServer
)
where
import Distribution.Hup.Upload
data Server = Server { serverURL :: String
,serverAuth :: Maybe Auth }
deriving (Show, Eq)
data GlobalOpts = GlobalOpts { optVerbose ... |
a7404f1c4344f9548bd7e84268b228db8d1be2b911f860f1de35d7a807de4752 | techascent/tvm-clj | _make.clj | (ns tvm-clj.impl.fns.relay.op.memory._make
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "relay.op.memory._make") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/relay/op/memory/_make.clj | clojure | (ns tvm-clj.impl.fns.relay.op.memory._make
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "relay.op.memory._make") | |
68d2ac7b057484d7d9e5b622683cc080b54b5b6c45a6345a37bafeed4980d638 | yesodweb/yesod | Russian.hs | {-# LANGUAGE OverloadedStrings #-}
module Yesod.Form.I18n.Russian where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
russianFormMessage :: FormMessage -> Text
russianFormMessage (MsgInvalidInteger t) = "Неверно записано целое число: " `Data.Monoid.mappend` t
russianF... | null | https://raw.githubusercontent.com/yesodweb/yesod/48d05fd6ab12ad440e1f2aa32684ed08b23f0613/yesod-form/Yesod/Form/I18n/Russian.hs | haskell | # LANGUAGE OverloadedStrings # | module Yesod.Form.I18n.Russian where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
russianFormMessage :: FormMessage -> Text
russianFormMessage (MsgInvalidInteger t) = "Неверно записано целое число: " `Data.Monoid.mappend` t
russianFormMessage (MsgInvalidNumber t) = "... |
bcb3b54ad79cdf8d4302a61b755cffddb15dba7e070441488e766c84775a3fd9 | ChrisTitusTech/gimphelp | 210_effects-selection_highlight-from-selection.scm | 210_effects-selection_highlight-from-selection.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_effects-selection_highlight-from-selection.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
==================================================
... | 210_effects-selection_highlight-from-selection.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
it under the terms of the GNU General Public License as published by
the Fr... |
4e98c7834e6874c95ba621a15a93f8813ca381921895e1ca9a5827f7d1b9a46f | clojure-interop/aws-api | AWSLambdaAsync.clj | (ns com.amazonaws.services.lambda.AWSLambdaAsync
"Interface for accessing AWS Lambda asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Note: Do not directly implement thi... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.lambda/src/com/amazonaws/services/lambda/AWSLambdaAsync.clj | clojure | (ns com.amazonaws.services.lambda.AWSLambdaAsync
"Interface for accessing AWS Lambda asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Note: Do not directly implement thi... | |
357710fa0caeac7d676b62d14eeae6b8ee13580d6583ce3f02bcf546244a1e29 | janestreet/bonsai | constants.ml | open! Core
open! Import
module Fg_bg = struct
type t =
{ foreground : Color.t
; background : Color.t
}
end
module Intent = struct
type t =
| Info
| Success
| Warning
| Error
[@@deriving sexp, equal, compare, enumerate]
type colors =
{ info : Fg_bg.t
; success : Fg_bg.t
... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/view/src/constants.ml | ocaml | open! Core
open! Import
module Fg_bg = struct
type t =
{ foreground : Color.t
; background : Color.t
}
end
module Intent = struct
type t =
| Info
| Success
| Warning
| Error
[@@deriving sexp, equal, compare, enumerate]
type colors =
{ info : Fg_bg.t
; success : Fg_bg.t
... | |
784ffe769a1759fb13a75fc6d6b2cd166554057aef71d2c63627aac681eadcfb | zotonic/cowmachine | controller.erl | -module(controller).
-export([
execute/2,
resource_exists/1,
content_types_provided/1
]).
execute(Req, Env) ->
{ok, Req, Env#{ cowmachine_controller => ?MODULE }}.
% Controller export
resource_exists(Context) ->
Path = cowmachine_req:path(Context),
io:format("Path=~p~n",[Path]),
ResultC... | null | https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/file_server/src/controller.erl | erlang | Controller export
io:format("File=~p~n",[File]),
internal functions
Note:
Sanitize the path before concatenation the file name to the directory.
| -module(controller).
-export([
execute/2,
resource_exists/1,
content_types_provided/1
]).
execute(Req, Env) ->
{ok, Req, Env#{ cowmachine_controller => ?MODULE }}.
resource_exists(Context) ->
Path = cowmachine_req:path(Context),
io:format("Path=~p~n",[Path]),
ResultContext = case Path of... |
33619550fd870550126f20051d91de784b03b0981df71b09d95376ddaab4d279 | tommaisey/aeon | f-sin-osc.help.scm | ;; SC2: Note extra iphase argument.
(import (rsc3))
(audition (out 0 (mul (f-sin-osc ar (mce2 440 550) 0) 0.05)))
(let ((f (x-line kr 200 4000 1 remove-synth)))
(audition (out 0 (mul (f-sin-osc ar f 0) 0.25))))
;; Loses amplitude towards the end
(let ((f (mul-add (f-sin-osc ar (x-line kr 4 401 8 remove-synth) 0)
... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/f-sin-osc.help.scm | scheme | SC2: Note extra iphase argument.
Loses amplitude towards the end |
(import (rsc3))
(audition (out 0 (mul (f-sin-osc ar (mce2 440 550) 0) 0.05)))
(let ((f (x-line kr 200 4000 1 remove-synth)))
(audition (out 0 (mul (f-sin-osc ar f 0) 0.25))))
(let ((f (mul-add (f-sin-osc ar (x-line kr 4 401 8 remove-synth) 0)
200
800)))
(audition (out 0 (mul ... |
6fa00dbc27a41992059b1a3f6bf5dd75e317aa8c484f4fcfa035b66958056bc6 | stuarthalloway/programming-clojure | error_kit.clj | ; example inspired by -exception-handling-conditions-and-restarts.html
(ns examples.error-kit
(:use [clojure.contrib.error-kit]))
(deferror malformed-log-entry [] [msg]
{:msg msg
:unhandled (throw-msg IllegalArgumentException)})
; imaginary log message format:
2008 - 10 - 05 12:14:00 WARN Some warning message... | null | https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/src/examples/error_kit.clj | clojure | example inspired by -exception-handling-conditions-and-restarts.html
imaginary log message format:
Example 1. Continue calculation with replacement value | (ns examples.error-kit
(:use [clojure.contrib.error-kit]))
(deferror malformed-log-entry [] [msg]
{:msg msg
:unhandled (throw-msg IllegalArgumentException)})
2008 - 10 - 05 12:14:00 WARN Some warning message here ...
(defn parse-log-entry [entry]
(or
(next (re-matches #"(\d+-\d+-\d+) (\d+:\d+:\d+) (\w+)... |
1f981c3a96e49ec9f7a63fe7a48d99f78b4df60bb8d98cde406e61828c73c0f3 | anishathalye/knox | concretize.rkt | #lang racket/base
(require
"addressable-struct.rkt"
(only-in "lens.rkt" join join? join-contents)
yosys
racket/list racket/contract
(prefix-in @ rosette/safe)
(for-syntax racket/base syntax/parse racket/syntax))
(provide
(contract-out
[concrete (-> any/c @solution?)]
[concretize (->* (any/c)
... | null | https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/rosutil/concretize.rkt | racket | Note: these functions are not general-purpose -- it is in general,
they might _increase_ the size of terms; at worst, they may produce
incorrect results.
We use these only in conjunction with yosys, where we have a situation
where (vc) is empty, and there is no mutation everywhere
(it's all pure functional code)... | #lang racket/base
(require
"addressable-struct.rkt"
(only-in "lens.rkt" join join? join-contents)
yosys
racket/list racket/contract
(prefix-in @ rosette/safe)
(for-syntax racket/base syntax/parse racket/syntax))
(provide
(contract-out
[concrete (-> any/c @solution?)]
[concretize (->* (any/c)
... |
1941b10be844ddc71763196c2b1b9ccdc65b1f27e6e22ddea6b14e0b330e4d7c | dannypsnl/write-a-programming-language | t2.rkt | #lang racket
;;; Environment
(define (lookup/type-of env v)
(hash-ref env v))
(define (extend/env env v t)
(hash-set env v t))
(define (occurs v t)
(match t
[`(,t* ...)
(ormap (λ (t) (occurs v t)) t*)]
(t (equal? v t))))
(define (unify t1 t2)
(match* (t1 t2)
[(_ t2) #:when (and (parameter? t... | null | https://raw.githubusercontent.com/dannypsnl/write-a-programming-language/a518466b33f9a04405fa29b48d5e6db7b2afb5a6/ch2/t2.rkt | racket | Environment
ensure t2 is still free
id | #lang racket
(define (lookup/type-of env v)
(hash-ref env v))
(define (extend/env env v t)
(hash-set env v t))
(define (occurs v t)
(match t
[`(,t* ...)
(ormap (λ (t) (occurs v t)) t*)]
(t (equal? v t))))
(define (unify t1 t2)
(match* (t1 t2)
[(_ t2) #:when (and (parameter? t2)
... |
034a58ebda1319ce402852eb4744b4a26aa77da4b4a43abb963960891a39e9b9 | lambdacube3d/lambdacube-compiler | UnitTests.hs | # LANGUAGE StandaloneDeriving #
module Main where
import Data.Monoid
import Text . . Pos ( Pos , unsafePos , SourcePos ( .. ) , sourceName , sourceLine , sourceColumn )
import qualified Data.Map as Map
import qualified Data.Set as Set
import Test.QuickCheck
import Test.QuickCheck.Property
import Test.Tasty
import Te... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-compiler/ca8d65a210a8801c8358fc29a9ead427afc9fce4/test/UnitTests.hs | haskell | --------------------------------------------------------------- Main
list is always a monoid
--------------------------------------------------------------- Arbitraries
TODO: generate only valid positions
TODO: review
Range
SI
todo
instance Arbitrary MaxDB where
arbitrary = MaxDB <$> {-fmap (fmap abs)
---------... | # LANGUAGE StandaloneDeriving #
module Main where
import Data.Monoid
import Text . . Pos ( Pos , unsafePos , SourcePos ( .. ) , sourceName , sourceLine , sourceColumn )
import qualified Data.Map as Map
import qualified Data.Set as Set
import Test.QuickCheck
import Test.QuickCheck.Property
import Test.Tasty
import Te... |
3524896ab9c9d9e84e4e6e7d5488f1b46bde7629caa3abb6a5fdf89c414f0175 | proger/mod_pushoff | mod_pushoff_apns.erl | %%%
Copyright ( C ) 2015
Copyright ( C ) 2016
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%... | null | https://raw.githubusercontent.com/proger/mod_pushoff/e3b78c62d026aba339143071a207083b1351164b/src/mod_pushoff_apns.erl | erlang |
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General ... | Copyright ( C ) 2015
Copyright ( C ) 2016
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
with this program ; if not , write to the Free Software... |
57d34b855e927a8e386653dee781f0cb6460b7283bdbc17a462b05e89ad6b755 | nomnom-insights/nomnom.lockjaw | core_test.clj | (ns lockjaw.core-test
(:require
[clojure.test :refer [deftest is testing use-fixtures]]
[com.stuartsierra.component :as component]
[lockjaw.core]
[lockjaw.protocol :as lock]
[lockjaw.test-system :as ts]))
(def sys (atom nil))
(use-fixtures :each (fn [test-fn]
(ts/start! s... | null | https://raw.githubusercontent.com/nomnom-insights/nomnom.lockjaw/8d568d1ec36054ca25e798613ccd3e1d229c94cf/test/lockjaw/core_test.clj | clojure | (ns lockjaw.core-test
(:require
[clojure.test :refer [deftest is testing use-fixtures]]
[com.stuartsierra.component :as component]
[lockjaw.core]
[lockjaw.protocol :as lock]
[lockjaw.test-system :as ts]))
(def sys (atom nil))
(use-fixtures :each (fn [test-fn]
(ts/start! s... | |
03903ab498b9eeb271fce6ddcb931014b6d30d7a38dca8def50563ddc460237b | JamesLavin/ElixirZone | joe.erl | -module(joe).
-export([start/0, call/1]).
-vsn(3.0).
call(Arg1) ->
io:fwrite("~p~n",[Arg1]),
robert ! {joe, "Hello, Robert, from Joe!"}.
receive_loop() ->
receive
{robert, Msg} ->
io:fwrite("Joe received a message from Robert: ~p~n",[Msg]),
mike ! {joe, "Hello from Joe!"},
receive_loop(... | null | https://raw.githubusercontent.com/JamesLavin/ElixirZone/8572a8225745390fae329a304985885dec2934f7/Erlang_Fundamentals/Erlang102/erlang_program_3/joe.erl | erlang | -module(joe).
-export([start/0, call/1]).
-vsn(3.0).
call(Arg1) ->
io:fwrite("~p~n",[Arg1]),
robert ! {joe, "Hello, Robert, from Joe!"}.
receive_loop() ->
receive
{robert, Msg} ->
io:fwrite("Joe received a message from Robert: ~p~n",[Msg]),
mike ! {joe, "Hello from Joe!"},
receive_loop(... | |
3577661afadaa9b1da77afb363022922ae90782ca0d8736238a2265d252ba0a9 | let-def/menhir | lookahead.mli | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/lookahead.mli | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
4a85e4e44cb689c34238dee0e827ccb81d836b21f6102f0f2e5be1b06e3c24c8 | andorp/bead | ResetPassword.hs | {-# LANGUAGE OverloadedStrings #-}
module Bead.View.ResetPassword (
resetPasswordPage
, setUserPassword
, updateCurrentAuthPassword
, checkCurrentAuthPassword
, encryptPwd
, loadAuthUser
) where
import Control.Monad
import Control.Monad.Trans.Class
import Control.Monad.Tra... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/ResetPassword.hs | haskell | # LANGUAGE OverloadedStrings #
Generates a new random password for the given user. If the user does
not exist it thows an error
Saves the users password it to the persistence layer and the authentication
and sends the email to the given user.
The handler returns a status message that should be displayed to the use... | module Bead.View.ResetPassword (
resetPasswordPage
, setUserPassword
, updateCurrentAuthPassword
, checkCurrentAuthPassword
, encryptPwd
, loadAuthUser
) where
import Control.Monad
import Control.Monad.Trans.Class
import Control.Monad.Trans.Error
import Control.M... |
9f8d29464bac740224c19671fd31499445626dbddea8fc6c4c53e71a833e0c9b | madvagabond/ocaml-balancers | balancers_test.ml | open Balancer
open Lwt.Infix
open Serverset
open Util
module CH = Chash
let rec range i j = if i > j then [] else i :: (range (i+1) j)
let string_m =
let open Alcotest in list string
let make_node port =
let host = "localhost" in
... | null | https://raw.githubusercontent.com/madvagabond/ocaml-balancers/9d41bc2cc1929aaeb09ca73fb958a9200c32a779/test/balancers_test.ml | ocaml | open Balancer
open Lwt.Infix
open Serverset
open Util
module CH = Chash
let rec range i j = if i > j then [] else i :: (range (i+1) j)
let string_m =
let open Alcotest in list string
let make_node port =
let host = "localhost" in
... | |
10db8c1c5c5032989034cb03a03edb20e1718ec230440f09c6f568506d7cb7ce | matthiasn/systemd-watchdog | core.clj | (ns matthiasn.systemd-watchdog.core
(:require [matthiasn.systems-toolbox.switchboard :as sb]
[matthiasn.systems-toolbox.scheduler :as sched])
(:import [info.faljse.SDNotify SDNotify]))
(defn start-watchdog!
"Call systemd's watchdog every so many milliseconds.
Requires the NOTIFY_SOCKET environment... | null | https://raw.githubusercontent.com/matthiasn/systemd-watchdog/65266f579fa32b87811c77629969cb3d71c30c49/src/clj/matthiasn/systemd_watchdog/core.clj | clojure | (ns matthiasn.systemd-watchdog.core
(:require [matthiasn.systems-toolbox.switchboard :as sb]
[matthiasn.systems-toolbox.scheduler :as sched])
(:import [info.faljse.SDNotify SDNotify]))
(defn start-watchdog!
"Call systemd's watchdog every so many milliseconds.
Requires the NOTIFY_SOCKET environment... | |
0465bb3825a1babe6218f4db1417e108ca9cae42d847e519a0a6702d76a13dfa | CSCfi/rems | administration.cljs | (ns rems.administration.administration
(:require [re-frame.core :as rf]
[rems.atoms :as atoms]
[rems.guide-util :refer [component-info example]]
[rems.navbar :as navbar]
[rems.text :refer [text]]))
(rf/reg-event-db
::remember-current-page
(fn [db _]
(assoc db ::pr... | null | https://raw.githubusercontent.com/CSCfi/rems/4d172447f68b16e47eca714b400dc04c21dd3d95/src/cljs/rems/administration/administration.cljs | clojure | (ns rems.administration.administration
(:require [re-frame.core :as rf]
[rems.atoms :as atoms]
[rems.guide-util :refer [component-info example]]
[rems.navbar :as navbar]
[rems.text :refer [text]]))
(rf/reg-event-db
::remember-current-page
(fn [db _]
(assoc db ::pr... | |
af7a4246621d6868fb204c380fff84c96e49c9586a9542180497b78a085e72af | dmwit/encoding | KOI8R.hs | {-# LANGUAGE DeriveDataTypeable #-}
| This module implements KOI8 - R encoding which covers the russian and bulgarian alphabet .
See < -R > for more information .
See <-R> for more information.
-}
module Data.Encoding.KOI8R
(KOI8R(..)) where
import Control.Throws
import Data.Array.Unboxed
import Dat... | null | https://raw.githubusercontent.com/dmwit/encoding/e2878609af229368808f540809cb3e2dc8d00b6c/Data/Encoding/KOI8R.hs | haskell | # LANGUAGE DeriveDataTypeable # | | This module implements KOI8 - R encoding which covers the russian and bulgarian alphabet .
See < -R > for more information .
See <-R> for more information.
-}
module Data.Encoding.KOI8R
(KOI8R(..)) where
import Control.Throws
import Data.Array.Unboxed
import Data.Char (ord,chr)
import Data.Map hid... |
b4f1f32617a2d77a21fafa4482f8083c0586a39b424ca9ac267a8d12fb909082 | twosigma/waiter | metrics_output_test.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
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... | null | https://raw.githubusercontent.com/twosigma/waiter/8d3cdaed90078c188095ae1e65714edc72f9122c/waiter/integration/waiter/metrics_output_test.clj | clojure |
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 permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.metrics-output-test
(:require [clojure.test :refer :all]
[clojure.tools.logging :as log]
[schema.core :as s]
[waiter.schema :as schema]
[waite... |
fe88e19579f21a028c822e060a7fe327518cdce01a03789ac0e9c704e0fcbd0f | VERIMAG-Polyhedra/VPL | Datatypes.mli |
val negb : bool -> bool
type nat =
| O
| S of nat
val fst : ('a1*'a2) -> 'a1
val snd : ('a1*'a2) -> 'a2
val length : 'a1 list -> nat
val app : 'a1 list -> 'a1 list -> 'a1 list
type comparison =
| Eq
| Lt
| Gt
val coq_CompOpp : comparison -> comparison
| null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/Datatypes.mli | ocaml |
val negb : bool -> bool
type nat =
| O
| S of nat
val fst : ('a1*'a2) -> 'a1
val snd : ('a1*'a2) -> 'a2
val length : 'a1 list -> nat
val app : 'a1 list -> 'a1 list -> 'a1 list
type comparison =
| Eq
| Lt
| Gt
val coq_CompOpp : comparison -> comparison
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.