_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 |
|---|---|---|---|---|---|---|---|---|
35ee4478b771657d1c7442eeb217c028a0130a34fce32e9a39dcbf4a24c390e9 | codingteam/Hyperspace | game.cljs | (ns hyperspace.game
(:require [hyperspace.geometry :as geometry]
[hyperspace.gravity :as gravity]
[hyperspace.world :as world]))
(defn update-particle
[{position :position
velocity :velocity
:as particle}
planets
delta-time]
(let [acceleration (apply geometry/vector-sum
... | null | https://raw.githubusercontent.com/codingteam/Hyperspace/b04ec588968f3a9c94b2992010a3a737afbe7eb5/web/frontend/src/main/clojurescript/hyperspace/game.cljs | clojure | FIXME: Duplicate code
FIXME: Duplicate code | (ns hyperspace.game
(:require [hyperspace.geometry :as geometry]
[hyperspace.gravity :as gravity]
[hyperspace.world :as world]))
(defn update-particle
[{position :position
velocity :velocity
:as particle}
planets
delta-time]
(let [acceleration (apply geometry/vector-sum
... |
c7797ec7fb666d0dce74f70d82219c4a83e48f10e2ffe05bc0450b08794ed318 | riemann/riemann | instrumentation_test.clj | (ns riemann.instrumentation-test
(:require [riemann.instrumentation :refer :all]
[riemann.logging :as logging]
[riemann.time :refer [unix-time]]
[riemann.time.controlled :refer :all]
[clojure.test :refer :all]))
(logging/init)
(use-fixtures :each reset-time!)
(use-fixt... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/instrumentation_test.clj | clojure | Should have merged from the original event
Should emit a rate and quantiles
Uses unix-time
Has float metrics
Quantiles are sorted
Quantiles are roughly in ms | (ns riemann.instrumentation-test
(:require [riemann.instrumentation :refer :all]
[riemann.logging :as logging]
[riemann.time :refer [unix-time]]
[riemann.time.controlled :refer :all]
[clojure.test :refer :all]))
(logging/init)
(use-fixtures :each reset-time!)
(use-fixt... |
598cda2181b39a6c38eb869423a0ddcd73e52114f5cc05ca290fae6c59af3ab8 | charlesetc/Orb | orb_file.ml | open Orb_internal
open Hidden
type t =
< print : String.t -> unit
; puts : String.t -> unit
; read : String.t
; remove : unit >
wrapped
let create name : t =
`Some
(object
val name : string = (unwrap name)#to_string |> unwrap_value
(* At some point in time it would be nice to remove the... | null | https://raw.githubusercontent.com/charlesetc/Orb/d59a6b0513a629146a45d09a9a0c4be5d3615651/lib/orb_file.ml | ocaml | At some point in time it would be nice to remove the duplication in
* these methods | open Orb_internal
open Hidden
type t =
< print : String.t -> unit
; puts : String.t -> unit
; read : String.t
; remove : unit >
wrapped
let create name : t =
`Some
(object
val name : string = (unwrap name)#to_string |> unwrap_value
method print s =
let oc = open_out_gen [ Open_... |
d22696c1b166680921d3105e5db45a1545e388bbe5e4257ee14ed21d0ffe2437 | tsloughter/kuberl | kuberl_v1beta1_local_subject_access_review.erl | -module(kuberl_v1beta1_local_subject_access_review).
-export([encode/1]).
-export_type([kuberl_v1beta1_local_subject_access_review/0]).
-type kuberl_v1beta1_local_subject_access_review() ::
#{ 'apiVersion' => binary(),
'kind' => binary(),
'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(),... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_local_subject_access_review.erl | erlang | -module(kuberl_v1beta1_local_subject_access_review).
-export([encode/1]).
-export_type([kuberl_v1beta1_local_subject_access_review/0]).
-type kuberl_v1beta1_local_subject_access_review() ::
#{ 'apiVersion' => binary(),
'kind' => binary(),
'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(),... | |
f5db6109c5366c1a68d1d846897a122e7fd72e5ef663049f080b37b5ca3e83d8 | higherkindness/mu-haskell | Avro.hs | # language DataKinds #
{-# language DerivingVia #-}
# language OverloadedStrings #
# language StandaloneDeriving #
# language TypeApplications #
# options_ghc -fno - warn - orphans #
module Main where
import Data.Avro
import qualified Data.ByteString.Lazy as BS
import qualified Data.Map... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/adapter/avro/test/Avro.hs | haskell | # language DerivingVia #
Obtain the filenames
Read the file produced by Python
Encode a couple of values | # language DataKinds #
# language OverloadedStrings #
# language StandaloneDeriving #
# language TypeApplications #
# options_ghc -fno - warn - orphans #
module Main where
import Data.Avro
import qualified Data.ByteString.Lazy as BS
import qualified Data.Map as M
import S... |
654d19cea971aac96be54c72ac2013cb5169ffedf1929d67dc30d26caaa4c0c1 | mentat-collective/emmy | analyze.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.expression.analyze
"This namespace defines an API for working with 'expression analyzers' and
the [[ICanonicalize]] protocol.
Expression analyzers find canonical forms of inputs over limited vocabularies
of operations. For example, a polynomial analyzer will expos... | null | https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/src/emmy/expression/analyze.cljc | clojure | a rational function backend would
The heading, and the following block of comments, is based on the narrative
in `simplify/simplify.scm` of the scmutils repository.
Given a set of operations, the protocols and functions in this namespace
these operations, treating other combinations as atomic.
To break an expr... | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.expression.analyze
"This namespace defines an API for working with 'expression analyzers' and
the [[ICanonicalize]] protocol.
Expression analyzers find canonical forms of inputs over limited vocabularies
of operations. For example, a polynomial analyzer will expos... |
77c13ab692df8d999bade6b2712448ee9fb3d9f223e1442d6bb2ec7a8aa768b0 | racket/racket7 | symbol-or-number.rkt | #lang racket/base
(require "config.rkt"
"special.rkt"
"wrap.rkt"
"readtable.rkt"
"delimiter.rkt"
"consume.rkt"
"accum-string.rkt"
"error.rkt"
"parameter.rkt"
"number.rkt")
(provide read-symbol-or-number)
(define (read-symbol-or-number in... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/read/symbol-or-number.rkt | racket | `mode` can be 'symbol-or-number,
'symbol, 'symbol/indirect, 'keyword,
or a number prefix string like "#e";
only the 'symbol-or-number and
'symbol modes use a readtable's
symbol handler
currently quoting?
keep track of range to foldcase for case-insens
Interrupted while in quoting mode
note: `pipe-quote-c` det... | #lang racket/base
(require "config.rkt"
"special.rkt"
"wrap.rkt"
"readtable.rkt"
"delimiter.rkt"
"consume.rkt"
"accum-string.rkt"
"error.rkt"
"parameter.rkt"
"number.rkt")
(provide read-symbol-or-number)
(define (read-symbol-or-number in... |
32b635e21f35d905966dff6b1513ad744abf528f672aef3723e8b0f001060951 | tweag/servant-template | Schema.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Infrastructure.Persistence.Schema where
import Data.Text (Text)
import GHC.Generics (Generic)
import Rel8 (Column, Expr, Name, Rel8able, Result, TableSchema (..), lit)
import qualified Tagger.Content as Domain (Content)
... | null | https://raw.githubusercontent.com/tweag/servant-template/9cd1114c22315511ff76f32b895811724b292a9a/src/Infrastructure/Persistence/Schema.hs | haskell | # LANGUAGE DeriveAnyClass #
|
The database representation of a 'Tag'
|
A description of the schema of the 'Tag' table
|
CONTENT
|
The database representation of a 'Content'
|
A description of the schema of the 'Content' table
|
CONTENTS_TAGS
|
The database representation of a connection between a 'Content... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Infrastructure.Persistence.Schema where
import Data.Text (Text)
import GHC.Generics (Generic)
import Rel8 (Column, Expr, Name, Rel8able, Result, TableSchema (..), lit)
import qualified Tagger.Content as Domain (Content)
import Tagger.EncryptedPassword ... |
fefa3287490d8d445cee1bc8629416983446cc2700104677cb650819030e0852 | RJ/estatsd | estatsd_app.erl | -module(estatsd_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
estatsd_sup:... | null | https://raw.githubusercontent.com/RJ/estatsd/2643d305154af098650865bec28c9131964fea1f/src/estatsd_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(estatsd_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
estatsd_sup:start_link().
stop(_State) ->
ok.
|
c69e6f3cee2203f5c790f57091bd4edac22e86503c92f46a9ada851793714a8d | diku-dk/futhark | GPU.hs | | Variation of " . CodeGen . ImpCode " that contains the notion
-- of a kernel invocation.
module Futhark.CodeGen.ImpCode.GPU
( Program,
HostCode,
KernelCode,
KernelConst (..),
KernelConstExp,
HostOp (..),
KernelOp (..),
Fence (..),
AtomicOp (..),
GroupDim,
Kernel (..),
... | null | https://raw.githubusercontent.com/diku-dk/futhark/7d42a2259c4cfeffec10349ce435e1bda57f8741/src/Futhark/CodeGen/ImpCode/GPU.hs | haskell | of a kernel invocation.
| A program that calls kernels.
| Host-level code that can call kernels.
| Code inside a kernel.
| A run-time constant related to kernels.
| An expression whose variables are kernel constants.
| An operation that runs on the host (CPU).
| A generic kernel containing arbitrary kernel code... | | Variation of " . CodeGen . ImpCode " that contains the notion
module Futhark.CodeGen.ImpCode.GPU
( Program,
HostCode,
KernelCode,
KernelConst (..),
KernelConstExp,
HostOp (..),
KernelOp (..),
Fence (..),
AtomicOp (..),
GroupDim,
Kernel (..),
KernelUse (..),
module ... |
a3bccaff2733e1b22f05730d320ec44ab744dfdd475bb8d6375c81512ee9ea8e | talex5/mirage-trace-viewer | modal.ml | Copyright ( C ) 2015 , the README file for details .
* See the README file for details. *)
open Js_of_ocaml
let ignore_listener : Dom_html.event_listener_id -> unit = ignore
let inside elem child =
let elem = (elem :> Dom.node Js.t) in
let rec aux child =
if elem == child then true
else (
J... | null | https://raw.githubusercontent.com/talex5/mirage-trace-viewer/f3b5abcf013e7601638e1c4f036f35f9c15caeec/js/modal.ml | ocaml | Listen to global clicks and keypresses so we can close modals on click/escape
Click inside modal - pass it on
Click outside modal; close the modal | Copyright ( C ) 2015 , the README file for details .
* See the README file for details. *)
open Js_of_ocaml
let ignore_listener : Dom_html.event_listener_id -> unit = ignore
let inside elem child =
let elem = (elem :> Dom.node Js.t) in
let rec aux child =
if elem == child then true
else (
J... |
31d26a934fbadba6b3ad05e2cf3d7dcc0575fafecd7b05edb7497ebad2eef424 | kqr/gists | GrammarChecker.hs |
module GrammarChecker (Option(..), GrammaticalUnits(..), checkGrammar) where
import Data.Map (Map, (!))
import Data.List (stripPrefix)
En Token är det som i BNF skulle >
En Literal är det som i BNF skulle " "
--
testliteral en Literal ( av )
i början av
en ( av en )
i början a... | null | https://raw.githubusercontent.com/kqr/gists/b0b5ab2a6af0f939a9e24165959bb362281ce897/marshalling/parsing/grammarchecker/GrammarChecker.hs | haskell |
module GrammarChecker (Option(..), GrammaticalUnits(..), checkGrammar) where
import Data.Map (Map, (!))
import Data.List (stripPrefix)
En Token är det som i BNF skulle >
En Literal är det som i BNF skulle " "
testliteral en Literal ( av )
i början av
en ( av en )
i början av
... | |
3c89705f6ba17678455430388e224acc181b638d6da6f79657bbab4eade56ad3 | discus-lang/ddc | Alt.hs |
module DDC.Core.Discus.Convert.Exp.Alt
(convertAlt)
where
import DDC.Core.Discus.Convert.Exp.Base
import DDC.Core.Discus.Convert.Data
import DDC.Core.Discus.Convert.Type
import DDC.Core.Discus.Convert.Error
import DDC.Core.Exp.Annot
import DDC.Core.Module.Name
import DDC.Type.DataDef
import DDC.Core.Check ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-discus/DDC/Core/Discus/Convert/Exp/Alt.hs | haskell | ^ Annotation from case expression.
^ Bound of scrutinee.
^ Type of scrutinee
^ Context of enclosing case-expression.
^ Type context of the conversion.
^ Alternative to convert.
Match against the unit constructor.
This is baked into the langauge and doesn't have a real name,
so we need to handle it separatel... |
module DDC.Core.Discus.Convert.Exp.Alt
(convertAlt)
where
import DDC.Core.Discus.Convert.Exp.Base
import DDC.Core.Discus.Convert.Data
import DDC.Core.Discus.Convert.Type
import DDC.Core.Discus.Convert.Error
import DDC.Core.Exp.Annot
import DDC.Core.Module.Name
import DDC.Type.DataDef
import DDC.Core.Check ... |
ee886fea7f8f083c7b69d015709f5794835ca83b472098a50668e8344d809c73 | mirage/alcotest | core_intf.ml |
* Copyright ( c ) 2013 - 2016 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE S... | null | https://raw.githubusercontent.com/mirage/alcotest/faa683b8074dc86ea75a455201d0461eb1d0dc46/src/alcotest-engine/core_intf.ml | ocaml | * Speed level of a test. Tests marked as [`Quick] are always run. Tests
marked as [`Slow] are skipped when the `-q` flag is passed.
* The exception return by {!run} in case of errors.
* [test_case n s f] is the test case [n] running at speed [s] using the
function [f].
* Print all of the test cases i... |
* Copyright ( c ) 2013 - 2016 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE S... |
338fba12608e6616fd17f2873b1fc6b5cd3a39d5e7aedc43edc1354396d44410 | rurban/clisp | dutch.lisp | Dutch translations of DEFINTERNATIONALed values .
,
(in-package "I18N")
(common-lisp:export 'NEDERLANDS)
(common-lisp:import 'NEDERLANDS "EXT")
(common-lisp:export 'NEDERLANDS "EXT")
(common-lisp:in-package "SYSTEM")
(deflanguage NEDERLANDS)
(deflocalized date-format NEDERLANDS
(formatter "~1{~3@*~D-~4@*... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/dutch.lisp | lisp | Dutch translations of DEFINTERNATIONALed values .
,
(in-package "I18N")
(common-lisp:export 'NEDERLANDS)
(common-lisp:import 'NEDERLANDS "EXT")
(common-lisp:export 'NEDERLANDS "EXT")
(common-lisp:in-package "SYSTEM")
(deflanguage NEDERLANDS)
(deflocalized date-format NEDERLANDS
(formatter "~1{~3@*~D-~4@*... | |
47125ccb276fa2b0b11a94eb3dc44def4690de481a60719a92964684f8945996 | nd/bird | 5.4.5.hs | width p = width q
width r = widht s
height p + height q = height r + height s
height p = height r
height q = height s
width p + width r = widht q + widht s | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch05/5.4.5.hs | haskell | width p = width q
width r = widht s
height p + height q = height r + height s
height p = height r
height q = height s
width p + width r = widht q + widht s | |
1d7bfba939c759b1b2d1f1c7542e224abf01ec8fe65e86eb45a332d47026fd6f | DaMSL/K3 | Utils.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Language.K3.Interpreter.Utils where
import Control.Applicative
import Control.Concurrent.MVar
import Control.Monad.State
import Data.Function
import Data.List
import qualifi... | null | https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Interpreter/Utils.hs | haskell | Pretty printing
If we have an empty string, drop this value
Additional show methods
If we have a result, show that. Otherwise show state
Debugging helpers | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Language.K3.Interpreter.Utils where
import Control.Applicative
import Control.Concurrent.MVar
import Control.Monad.State
import Data.Function
import Data.List
import qualifi... |
f135822cbd04a08ebb6e26fc169ac9722a2f1632c86f5b7029421a66d0fc9f9c | amalloy/aoc-2021 | Main.hs | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
module Main where
import Control.Arrow ((&&&))
import Data.List (foldl')
import qualified Data.Map.Strict as M
import Data.Maybe (fromMaybe)
import Text.Regex.Applicative
import Text.Regex.Applicative.Common (decimal)
data Line = Line { _from, _to :: Coord Int }... | null | https://raw.githubusercontent.com/amalloy/aoc-2021/01d953594333eb91fa192ab5bbc4fb310d2a0b5b/day05/src/Main.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
module Main where
import Control.Arrow ((&&&))
import Data.List (foldl')
import qualified Data.Map.Strict as M
import Data.Maybe (fromMaybe)
import Text.Regex.Applicative
import Text.Regex.Applicative.Common (decimal)
data Line = Line { _from, _to :: Coord Int }... | |
af734016aba1d9838ed93a508457fc32201ea02882cfe0003c5ff3cc60268310 | bobbae/gosling-emacs | mh-refile.ml | ; This autoloaded file defines the "^" command in mhe. It marks a message
; to be moved into another folder. This mark is represented in two ways:
; a "^" character is placed in column 4 of the header line, and the number
; of the message is placed in the text of an appropriate "file" command
; in the command buffer. ... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/purdue/mh-refile.ml | ocaml | ; This autoloaded file defines the "^" command in mhe. It marks a message
; to be moved into another folder. This mark is represented in two ways:
; a "^" character is placed in column 4 of the header line, and the number
; of the message is placed in the text of an appropriate "file" command
; in the command buffer. ... | |
3f4e9f45cf22b981d70e1f916949108e9d2b058d9870fd731e4258be22cc1e44 | incoherentsoftware/defect-process | Manager.hs | module InfoMsg.Manager
( thinkInfoMsgManager
) where
import Data.Maybe (isJust, fromMaybe)
import qualified Data.List as L
import Collision
import Configs
import Configs.All.Enemy
import Enemy as E
import Enemy.Manager
import InfoMsg.Util
import Level.Room.ArenaWalls
import Level.Room.Bounds
import Level.Room... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/c39ce1f742d32a0ffcde82c03bf872adeb7d9162/src/InfoMsg/Manager.hs | haskell | module InfoMsg.Manager
( thinkInfoMsgManager
) where
import Data.Maybe (isJust, fromMaybe)
import qualified Data.List as L
import Collision
import Configs
import Configs.All.Enemy
import Enemy as E
import Enemy.Manager
import InfoMsg.Util
import Level.Room.ArenaWalls
import Level.Room.Bounds
import Level.Room... | |
544f4b1ba70de577446dcf0d0f9c6fcc8b2f42f30b72a09cb8a09615df822e24 | kelsey-sorrels/robinson | render.clj | ;; Functions for rendering state to screen
(ns robinson.render
(:require
[robinson.random :as rr]
[robinson.error :as re]
[robinson.ui.updater :as ruu]
[robinson.ui.components.robinson :as ruic]
[taoensso.timbre :as log]
[zaffre.terminal :as zt]... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/render.clj | clojure | Functions for rendering state to screen
update component instance states | (ns robinson.render
(:require
[robinson.random :as rr]
[robinson.error :as re]
[robinson.ui.updater :as ruu]
[robinson.ui.components.robinson :as ruic]
[taoensso.timbre :as log]
[zaffre.terminal :as zt]
[zaffre.components :as zc]
... |
67b691df650e1d4c96b9f60a9e8d090487fc71579ab5db2bea9a5342f3b718e8 | AndrasKovacs/ELTE-func-lang | Notes08.hs | # LANGUAGE InstanceSigs #
import Data.Foldable
import Data.Traversable
import Control.Monad
import Control.Applicative -- many, some
isDigit : : Bool
digitToInt : : Int
import Debug.Trace -- trace :: String -> a -> a
-- traceShow :: Show b => b -> a -> a
Parser a : Stri... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/1c5a8cc8eafb952cd16d4a76db203bc200473359/2021-22-1/ea/Notes08.hs | haskell | many, some
trace :: String -> a -> a
traceShow :: Show b => b -> a -> a
output String 1-el rövidebb!
konkrét String-et próbál olvasni
0 - szor vagy többször olvasás
1 - szer vagy többször olvasás
----------------------------------------------------------
----------------------------------------------------------... | # LANGUAGE InstanceSigs #
import Data.Foldable
import Data.Traversable
import Control.Monad
isDigit : : Bool
digitToInt : : Int
Parser a : String - ből " a " típusú értéket próbál olvasni
newtype Parser a =
Parser {runParser :: String -> Maybe (a, String)}
instance Functor Parser where
fmap :: (a ->... |
f013a31d6e79d32561025ba3efb78c2652b85731a73d3fa320186ba2120424c9 | juxt/bolt | util.clj | For internal Bolt use only . Not part of a published API . Do not use .
(ns bolt.util
(:require
[schema.core :as s]
[clojure.string :as str]
#_[camel-snake-kebab :as csk])
(:import (java.net URLEncoder)))
(defprotocol KorksSet
(as-set [_]))
(extend-protocol KorksSet
clojure.lang.Keyword
(as-set [... | null | https://raw.githubusercontent.com/juxt/bolt/f77be416f82c1ca19d5dc20a15942375edc9b740/src/bolt/util.clj | clojure | Schema
Schema validation
MD5 for gravatars
Misc | For internal Bolt use only . Not part of a published API . Do not use .
(ns bolt.util
(:require
[schema.core :as s]
[clojure.string :as str]
#_[camel-snake-kebab :as csk])
(:import (java.net URLEncoder)))
(defprotocol KorksSet
(as-set [_]))
(extend-protocol KorksSet
clojure.lang.Keyword
(as-set [... |
da3795589d158e449fe70cdd125e6e32f7493e490f50865117f822a3e22fe582 | binsec/binsec | loader_ti83.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/loader/loader_ti83.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
d115f64681011528c318a750a1b86c2fc372aff38bab6880b0184ff265c9c7b9 | backtracking/mlpost | gentex.ml | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/gentex.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
open Point_lib
let jobname = "gentex"
let filename = File.from_string jobname
FIXME different from... |
f0b584c60fb6c5b3e061c7794bbcd6815e532d5e2c1fcdd8c578eab4a468efe5 | dpiponi/Moodler | butterhp.hs | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) (Inside plane)
lab <- label' "butterhp" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "butterhp"
inp <- plugin' (name ++ ".freq") (x-21, y+25) (Inside plane)
setCo... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/butterhp.hs | haskell | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) (Inside plane)
lab <- label' "butterhp" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "butterhp"
inp <- plugin' (name ++ ".freq") (x-21, y+25) (Inside plane)
setCo... | |
4874101acf3469b22a23c7cb0b9f2e78ef9122da57a4b602b651e2de27d5b709 | hemmi/coq2scala | glob_term_to_relation.ml | open Printer
open Pp
open Names
open Term
open Glob_term
open Libnames
open Indfun_common
open Util
open Glob_termops
let observe strm =
if do_observe ()
then Pp.msgnl strm
else ()
let observennl strm =
if do_observe ()
then Pp.msg strm
else ()
type binder_type =
| Lambda of name
| Prod of name
| L... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/plugins/funind/glob_term_to_relation.ml | ocaml |
The main part deals with building a list of globalized constructor expressions
from the rhs of a fixpoint equation.
the binding context of the result
The value
for each result in arg_res
we add it in each args_res
and then we flatten the map
The combination function for an argument with a list of ... | open Printer
open Pp
open Names
open Term
open Glob_term
open Libnames
open Indfun_common
open Util
open Glob_termops
let observe strm =
if do_observe ()
then Pp.msgnl strm
else ()
let observennl strm =
if do_observe ()
then Pp.msg strm
else ()
type binder_type =
| Lambda of name
| Prod of name
| L... |
18f05ff762694883d16b6ccec4c0fcfc8bb8669005ffcc0abde2f0135a48d2f3 | avsm/mirage-duniverse | test_iperf.ml |
* Copyright ( c ) 2011 < >
* Copyright ( c ) 2012 < >
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in al... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/test/test_iperf.ml | ocaml | debug is too much for us here
timeout
exit cleanly |
* Copyright ( c ) 2011 < >
* Copyright ( c ) 2012 < >
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in al... |
0d3f3dc69bf817087c814a140fda236ec35b9a95cbfa60247f048266039136dc | racketscript/racketscript | values.rkt | #lang racket
(displayln "Hello World")
(displayln "Hello\n World")
(displayln "\"Hello World\"")
(displayln "'Hello World'")
(displayln #"Hello World")
TODO
( displayln # rx"Hello World " )
( displayln # px"Hello World " )
( displayln # rx#"Hello World " )
( displayln # px#"Hello World " )
(displayln 10)
(displayln... | null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/basic/values.rkt | racket | currently prints ( [ object Uint8Array ] ) | #lang racket
(displayln "Hello World")
(displayln "Hello\n World")
(displayln "\"Hello World\"")
(displayln "'Hello World'")
(displayln #"Hello World")
TODO
( displayln # rx"Hello World " )
( displayln # px"Hello World " )
( displayln # rx#"Hello World " )
( displayln # px#"Hello World " )
(displayln 10)
(displayln... |
a329c2acd6f755da556ca37e220facdd5883386c8579c92c30f8776878ba6b3c | billstclair/trubanc-lisp | arcfour.lisp | ;;;; arcfour.lisp -- implementation of the alleged RC4 stream cipher
(in-package :crypto)
This is a rewrite of a C program by . Thanks ,
Mr. . This version is Copyright ( C ) 2005
;;;
Code modified for Ironclad by .
(deftype arcfour-sbox () '(simple-array (unsigned-byte 8) (256)))
(defclass arcfou... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/ironclad_0.26/arcfour.lisp | lisp | arcfour.lisp -- implementation of the alleged RC4 stream cipher
|
(in-package :crypto)
This is a rewrite of a C program by . Thanks ,
Mr. . This version is Copyright ( C ) 2005
Code modified for Ironclad by .
(deftype arcfour-sbox () '(simple-array (unsigned-byte 8) (256)))
(defclass arcfour (stream-cipher)
((x :accessor arcfour-x :initform 0 :type fixnum)
... |
dd1461b19c9b9144ac0c996b5c5151590fd615f5741201e0fdce073cae8dd54c | gbour/letsencrypt-erlang | letsencrypt_api.erl | Copyright 2015 - 2020
%%
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 ... | null | https://raw.githubusercontent.com/gbour/letsencrypt-erlang/566f16d289f8c968e76fafe26ded22b73d38a3cb/src/letsencrypt_api.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright 2015 - 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(letsencrypt_api).
-author("Guillaume Bour <>").
-export([directory/2, nonce/2, account/4, order/5, order/4, authorization/4, challenge/4,
... |
9f5ca930f93878ce5696ac689115d8fcc182d071732f28f0445a06d7f85c9dc9 | 1Jajen1/Brokkr | Class.hs | module Control.Monad.STM.Class (
MonadSTM(..)
) where
import Control.Concurrent.STM
import Control.Monad.Trans.Reader
import Control.Monad.Trans.State.Strict
import Control.Monad.Trans.Writer.CPS
class MonadSTM m where
liftSTM :: STM a -> m a
instance MonadSTM STM where
liftSTM = id
instance MonadSTM m => Mo... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/fe56efaf450f29a5571cc34fa01f7301678f3eaf/src/Control/Monad/STM/Class.hs | haskell | module Control.Monad.STM.Class (
MonadSTM(..)
) where
import Control.Concurrent.STM
import Control.Monad.Trans.Reader
import Control.Monad.Trans.State.Strict
import Control.Monad.Trans.Writer.CPS
class MonadSTM m where
liftSTM :: STM a -> m a
instance MonadSTM STM where
liftSTM = id
instance MonadSTM m => Mo... | |
f8f02a7046e54905510dddc6fd3b934af7d947338bf9f8a269a7d060c618d0cd | quchen/stgi | Env.hs | -- | Defines operations on local and global variable environments.
module Stg.Machine.Env (
-- * Locals
addLocals,
makeLocals,
val,
vals,
localVal,
NotInScope(..),
-- * Globals
globalVal,
) where
import Control.Applicative
import qualified Data.Map as M
imp... | null | https://raw.githubusercontent.com/quchen/stgi/dacd45cb0247f73889713dc92a911aaa835afd19/src/Stg/Machine/Env.hs | haskell | | Defines operations on local and global variable environments.
* Locals
* Globals
| Add a list of bindings to the local environment.
Already existing variables will be shadowed (i.e. overwritten).
| Create a local environment from a list of bindings.
environment.
| Look up the values of many 'Atom's, and retu... | module Stg.Machine.Env (
addLocals,
makeLocals,
val,
vals,
localVal,
NotInScope(..),
globalVal,
) where
import Control.Applicative
import qualified Data.Map as M
import Stg.Language
import Stg.Machine.Types
import Stg.Util
addLocals :: [Mapping Var Value] -> Loc... |
f3b38c0eba19431213af3e3f9ba5730b828248f78c2a5f2ac48b7f3bb653df65 | facebookincubator/retrie | Setup.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
--
This source code is licensed under the MIT license found in the
-- LICENSE file in the root directory of this source tree.
--
import Distribution.Simple
main = defaultMain
| null | https://raw.githubusercontent.com/facebookincubator/retrie/00cf9d5d8f76ba9d628f572257d5491ebfb9d791/Setup.hs | haskell |
LICENSE file in the root directory of this source tree.
| Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in the
import Distribution.Simple
main = defaultMain
|
afddbc7f3f74e9d69828550bf1c36791f14de24305778980de2a687cb52731d5 | markandrus/twilio-haskell | Participant.hs | {-#LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------------
-- |
-- Module : Twilio.Conference.Participant
Copyright : ( C ) 2017-... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/Conference/Participant.hs | haskell | #LANGUAGE DeriveDataTypeable #
#LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
Module : Twilio.Conference.Participant
License : BSD-style (see the file LICENSE)
Stability : provisional
-------------------------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.Conference.Participant
Participant(..)
) where
import Control.Monad
import Data.Aeson
import Data.Data
import Data.Monoid
import Data.Time.Clock
impor... |
9fb527e00c91b54cfa4f9b3d65a4869be5b675b4748cbe4ca87ed8c0bc9712bf | dsorokin/aivika | Resource.hs |
-- |
-- Module : Simulation.Aivika.Resource
Copyright : Copyright ( c ) 2009 - 2017 , < >
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Tested with : GHC 8.0.1
--
-- This module defines the resource which can be acquired and
-- then released by the discontinuous process 'Process... | null | https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/Simulation/Aivika/Resource.hs | haskell | |
Module : Simulation.Aivika.Resource
License : BSD3
Stability : experimental
This module defines the resource which can be acquired and
then released by the discontinuous process 'Process'.
The resource can be either limited by the upper bound
(run-time check), or it can have no upper bound. The latt... |
Copyright : Copyright ( c ) 2009 - 2017 , < >
Maintainer : < >
Tested with : GHC 8.0.1
module Simulation.Aivika.Resource
FCFSResource,
LCFSResource,
SIROResource,
PriorityResource,
Resource,
newFCFSResource,
newFCFSResourceWithMaxCount,
newL... |
1886fab5f7040c47a4c5004c1edf04c9cf90e4026995bf70df8b9b6fe7bc4da7 | exercism/haskell | Atbash.hs | module Atbash (decode, encode) where
decode :: String -> String
decode cipherText = error "You need to implement this function."
encode :: String -> String
encode plainText = error "You need to implement this function."
| null | https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/atbash-cipher/src/Atbash.hs | haskell | module Atbash (decode, encode) where
decode :: String -> String
decode cipherText = error "You need to implement this function."
encode :: String -> String
encode plainText = error "You need to implement this function."
| |
51d4087c6135294c9fa68beaf348c672bd08bb0ebcdca183f5f6110e5c085bb8 | merijn/Belewitte | V1.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies... | null | https://raw.githubusercontent.com/merijn/Belewitte/cab6010a2bc54acfc4f4b169c95799fe455799ef/benchmark-analysis/src/Schema/ModelMetadata/V1.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE Undecidab... |
050f85cedf939adb42a9711490a80dd898446cf6e0b126f1d7a7fd670d43365b | ajtulloch/dnngraph | Visualize.hs | {-# LANGUAGE OverloadedStrings #-}
module NN.Visualize(visualize, visualizeWith, render, png, pdf, scaled, defaultNNParams) where
import Gen.Caffe.AccuracyParameter as AP
import Gen.Caffe.ConvolutionParameter as CP
import Gen.Caffe.InnerProductParameter as IP
imp... | null | https://raw.githubusercontent.com/ajtulloch/dnngraph/152f45780f3c4e9204cf4e129017df4394df662c/NN/Visualize.hs | haskell | # LANGUAGE OverloadedStrings #
Let's visualize neural networks from the bottom up
Conv 128x3x3 s2 | module NN.Visualize(visualize, visualizeWith, render, png, pdf, scaled, defaultNNParams) where
import Gen.Caffe.AccuracyParameter as AP
import Gen.Caffe.ConvolutionParameter as CP
import Gen.Caffe.InnerProductParameter as IP
import Gen.Caffe.LayerParame... |
112edfc6ccafe61dacf90118e6aefe35fb93193daa157cf4767ad17d7821f78d | mirage/awa-ssh | awa_test_server.ml |
* Copyright ( c ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE A... | null | https://raw.githubusercontent.com/mirage/awa-ssh/7c65292939ae4dff25170b1dbad6e3bc48d177a4/test/awa_test_server.ml | ocaml | Driver callbacks
same as exec |
* Copyright ( c ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE A... |
fbef52f55aa483d31ae135874dc36e58f894ce89367ec9f5fab8c1e36919ae7a | discus-lang/ddc | Collect.hs |
-- | Collecting sets of variables and constructors.
module DDC.Core.Collect
( -- * Free Variables
freeT, freeVarsT
, freeX
* Bounds and
, collectBound
, collectBinds
-- * Abstract Binding Structures
, BindTree (..)
, BindWay (..... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Collect.hs | haskell | | Collecting sets of variables and constructors.
* Free Variables
* Abstract Binding Structures
* Support |
module DDC.Core.Collect
freeT, freeVarsT
, freeX
* Bounds and
, collectBound
, collectBinds
, BindTree (..)
, BindWay (..)
, BoundLevel (..)
, BindStruct (..)
, Support (..)
, SupportX (..))
where... |
eb5f56b7cc6fee59a11211bea0603da0b0af8a8101c90917666e8062e4deea8f | ralsei/sawzall | generic-join.rkt | #lang racket/base
(require data-frame
fancy-app
racket/list
"helpers.rkt"
"grouped-df.rkt"
"grouping.rkt"
"split.rkt")
(provide generic-join)
defines a generic join on two data - frames .
(define ((generic-join #:on-end on-end
#:on-= on-eq
... | null | https://raw.githubusercontent.com/ralsei/sawzall/bff8a299f23a89c3c0dab134827baba432182ba4/sawzall-lib/generic-join.rkt | racket | the return of merge from the hit series merge sort
we've run out of vector to use, so return the final df
the rows share the same key, so merge them with combining
update the accumulator (varies)
df1 > df2, so keep incrementing the df2 index until they match, and
update the accumulator (again, varies)
gets what ... | #lang racket/base
(require data-frame
fancy-app
racket/list
"helpers.rkt"
"grouped-df.rkt"
"grouping.rkt"
"split.rkt")
(provide generic-join)
defines a generic join on two data - frames .
(define ((generic-join #:on-end on-end
#:on-= on-eq
... |
87586c4d3e91c99e905e66e1dfdf175fe2820bdf09a7382bfb510f15280165f8 | slyrus/mcclim-old | basic-commands.lisp | ;;; -*- Mode: Lisp; Package: DREI-COMMANDS -*-
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2006 by
( )
( c ) copyright 2006 by
... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Drei/basic-commands.lisp | lisp | -*- Mode: Lisp; Package: DREI-COMMANDS -*-
This library is free software; you can redistribute it and/or
either
This library 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
Licens... |
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2006 by
( )
( c ) copyright 2006 by
( )
modify it under the terms... |
7193e677ddc8fc2b526d57806ab11345fc4860336b470f5380d55de7fd766021 | nikita-volkov/strelka | ResponseBuilding.hs | module Strelka.ResponseBuilding where
import Strelka.Prelude
import Strelka.Core.Model
import qualified Strelka.ResponseBodyBuilding.Builder as A
import qualified Strelka.Core.ResponseBuilder as B
{- |
A composable abstraction for building an HTTP response.
-}
type Builder =
B.ResponseBuilder
-- * Headers
------... | null | https://raw.githubusercontent.com/nikita-volkov/strelka/8dd3abbbb7ebe84b5319941b236163ebdee6d199/library/Strelka/ResponseBuilding.hs | haskell | |
A composable abstraction for building an HTTP response.
* Headers
-----------------------
|
Add a header by name and value.
|
Add a @Content-type@ header.
|
Add a @Location@ header.
* Statuses
-----------------------
|
Set the status code.
-----------------------
|
Set the status code to @200@. Following... | module Strelka.ResponseBuilding where
import Strelka.Prelude
import Strelka.Core.Model
import qualified Strelka.ResponseBodyBuilding.Builder as A
import qualified Strelka.Core.ResponseBuilder as B
type Builder =
B.ResponseBuilder
header :: ByteString -> ByteString -> Builder
header name value =
B.ResponseBuil... |
3d72ef51dd2fe105ec273a94483d056481bed4bcc113f6e98444022f2ce28766 | jwarlander/everex | thrift_https_transport.erl | %%
Licensed to the Apache Software Foundation ( ASF ) under one
%% or more contributor license agreements. See the NOTICE file
%% distributed with this work for additional information
%% regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
%% "License"); you ... | null | https://raw.githubusercontent.com/jwarlander/everex/559a18e45054abd7d2adfeb3ef060f79b58308e9/src/thrift_https_transport.erl | erlang |
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
-2.0
Unless require... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(thrift_https_transport).
-behaviour(thrift_transport).
-export([new/2,... |
042d910f1d21a8ccf999377ff687beb0ec8f3477604549b325a58c695f099934 | essiene/erlami | amisym_session.erl | -module(amisym_session).
-export([
new/1,
close/1,
send_response/3,
send_event/2
]).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3
]).
-include("ami.hrl").
-behaviour(gen_server).
new(C... | null | https://raw.githubusercontent.com/essiene/erlami/c566f229c8bb1debe3c468c7124551b912bd6b1f/src/amisym/amisym_session.erl | erlang | gen_server callbacks | -module(amisym_session).
-export([
new/1,
close/1,
send_response/3,
send_event/2
]).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3
]).
-include("ami.hrl").
-behaviour(gen_server).
new(C... |
442e899753fe55743f87d1169001f06df367a7355a81e84e4feb6ab76a3113d8 | Mesabloo/nihil | Substitution.hs | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module Nihil.TypeChecking.Substitution where
import Nihil.Utils.Source
import Nihil.Utils.Annotation
import Nihil.TypeChecking.Core
import qualified Data.Set as Set
import Control.Arrow ((>>^))... | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/typechecker/Nihil/TypeChecking/Substitution.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Use only for debugging
| A type class for substitutable values.
| Applies a substitution to a substitutable value.
| Gathers all the free variables from a substitutable value.
----------------------------------------------------------------------- | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Nihil.TypeChecking.Substitution where
import Nihil.Utils.Source
import Nihil.Utils.Annotation
import Nihil.TypeChecking.Core
import qualified Data.Set as Set
import Control.Arrow ((>>^))
import Data.Bifunctor (first)
import ... |
12819e84103323f33cfcfed147418344fc4acd81a238f0d068c8a304b470bcf2 | patricoferris/ocaml-multicore-monorepo | multipart_form_lwt.ml | open Multipart_form
open Lwt.Infix
let stream ?(bounds = 10) ~identify stream content_type =
let output, push = Lwt_stream.create () in
let q = Queue.create () in
let fresh_id =
let r = ref 0 in
fun () ->
incr r ;
!r in
let tbl = Hashtbl.create 0x10 in
let emitters header =
let id = f... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/multipart_form/lib_lwt/multipart_form_lwt.ml | ocaml | otherwise, continue parsing (thus adding elements to the queue)
only used internally to implement of_stream_to_{tree,list} | open Multipart_form
open Lwt.Infix
let stream ?(bounds = 10) ~identify stream content_type =
let output, push = Lwt_stream.create () in
let q = Queue.create () in
let fresh_id =
let r = ref 0 in
fun () ->
incr r ;
!r in
let tbl = Hashtbl.create 0x10 in
let emitters header =
let id = f... |
7571e2340fee0c00370d56fdcaffd79f64370204bff9244957979e473efd2c29 | AndrewRademacher/gdax | Parsers.hs | {-# LANGUAGE OverloadedStrings #-}
module Network.GDAX.Parsers where
import Data.Aeson.Types
import Data.Monoid
import Data.Scientific
import Data.Text (Text)
import qualified Data.Text as T
import Data.Vector (Vector)
import qualified Data... | null | https://raw.githubusercontent.com/AndrewRademacher/gdax/3473aef6eb0282779b061875b7ea7e959e18b24f/lib/Network/GDAX/Parsers.hs | haskell | # LANGUAGE OverloadedStrings # |
module Network.GDAX.Parsers where
import Data.Aeson.Types
import Data.Monoid
import Data.Scientific
import Data.Text (Text)
import qualified Data.Text as T
import Data.Vector (Vector)
import qualified Data.Vector.Generic as V
import ... |
3204385188f411a7f184b22725edc58b9f5c3c07d1a35113b8832b2194f992ec | faylang/fay | ExportEThingAll_Export.hs | module ExportEThingAll_Export (Bar(..)) where
data Bar = Barbles
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/ExportEThingAll_Export.hs | haskell | module ExportEThingAll_Export (Bar(..)) where
data Bar = Barbles
| |
d66f8080a1f4f4d09bdb2d7db57b3fd213bf923797929489feb8d9b989339476 | ocaml-dune/fiber | pool.ml | open Stdune
open Core
type status =
| Open (* new tasks are allowed *)
| Closed (* new tasks are forbidden *)
type runner =
| Running (* Firing fibers inside the queue. *)
| Awaiting_resume of unit k
(* Ran out of work. Waiting to be resumed once work is added or
pool is closed. *)
| Awaiting_run... | null | https://raw.githubusercontent.com/ocaml-dune/fiber/a7b5456b95a67099c5f8078d7098e565e4d5b9ea/fiber/src/pool.ml | ocaml | new tasks are allowed
new tasks are forbidden
Firing fibers inside the queue.
Ran out of work. Waiting to be resumed once work is added or
pool is closed.
Just created. [run] hasn't been called yet.
A pool consumes tasks from a queue in the context where [run] was executed.
It's implemented by a s... | open Stdune
open Core
type status =
type runner =
| Awaiting_resume of unit k
type nonrec t =
; mutable runner : runner
; mutable status : status
}
let running t k =
match t.status with
| Open -> k true
| Closed -> k false
let create () =
{ tasks = Queue.create (); runner = Awaiting_run; status = ... |
599e3d7446d989648aa07d28cd2e619f3a628c591a9f8f0a02b573f141b19289 | crategus/cl-cffi-gtk | page-setup-dialog.lisp | Create Page Setup Dialog ( 2021 - 3 - 17 )
(in-package :gtk-example)
(defun create-page-setup-dialog ()
(let ((page-setup (gtk-page-setup-new))
(dialog (make-instance 'gtk-page-setup-unix-dialog
:title "Page Setup Dialog"
:default-height 250
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/demo/gtk-example/page-setup-dialog.lisp | lisp | Load and set Page setup from file
Run the dialog
Destroy the dialog | Create Page Setup Dialog ( 2021 - 3 - 17 )
(in-package :gtk-example)
(defun create-page-setup-dialog ()
(let ((page-setup (gtk-page-setup-new))
(dialog (make-instance 'gtk-page-setup-unix-dialog
:title "Page Setup Dialog"
:default-height 250
... |
273b7a7512a1ca6c65ecf81468c80573e9b077e2f63fd697a6e029d3de59913e | xapi-project/xenvm | monad.mli |
* Copyright ( C ) 2013 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 fi... | null | https://raw.githubusercontent.com/xapi-project/xenvm/401754dfb05376b5fc78c9290453b006f6f38aa1/idl/monad.mli | ocaml |
* Copyright ( C ) 2013 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 fi... | |
5dc7169f63acadc145b0be0d7d1586fb8184c8801f3787926d8d7642b4b41663 | exercism/babashka | interest_is_interesting.clj | (ns interest-is-interesting)
(defn interest-rate
"TODO: add docstring"
[balance]
)
(defn annual-balance-update
"TODO: add docstring"
[balance]
)
(defn amount-to-donate
"TODO: add docstring"
[balance tax-free-percentage]
) | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/interest-is-interesting/src/interest_is_interesting.clj | clojure | (ns interest-is-interesting)
(defn interest-rate
"TODO: add docstring"
[balance]
)
(defn annual-balance-update
"TODO: add docstring"
[balance]
)
(defn amount-to-donate
"TODO: add docstring"
[balance tax-free-percentage]
) | |
c7962f71a551aff1aaa901a64787fc21c429040a44820fde6ac3996e6540fbcd | willghatch/racket-rash | define-simple-alias.rkt | #lang racket/base
(provide define-simple-pipeline-alias)
(require
"good-unix-operator.rkt"
(for-syntax
racket/base
syntax/parse
"pipeline-alias.rkt"
))
(define-syntax (define-simple-pipeline-alias stx)
(syntax-parse stx
[(_ name template-arg ...)
#'(define-syntax name
(pipeline-alias
... | null | https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/shell-pipeline/private/define-simple-alias.rkt | racket | #lang racket/base
(provide define-simple-pipeline-alias)
(require
"good-unix-operator.rkt"
(for-syntax
racket/base
syntax/parse
"pipeline-alias.rkt"
))
(define-syntax (define-simple-pipeline-alias stx)
(syntax-parse stx
[(_ name template-arg ...)
#'(define-syntax name
(pipeline-alias
... | |
85ecf877a3255f5829911a31439219601f526526aec95908e314cc6787f193bc | music-suite/music-preludes | instances.hs |
# LANGUAGE CPP #
# LANGUAGE TupleSections #
# LANGUAGE TemplateHaskell #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
import Prelude hiding ((**))
import Data.Monoid.Average
import Data.Ord (co... | null | https://raw.githubusercontent.com/music-suite/music-preludes/2512b7dba62b4adadd04c01772046a3c09be72d7/tests/instances.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
prop_applicative typ
prop_app typ = appLId . & & . appRId . & & . appAssoc
where
appLId v = property $ unit * * v = = fmap ( ( ) , ) ( sameType v )
appRId u = property $ u * * unit = = fmap ( , ( ) ) ( sameType typ u )
... |
# LANGUAGE CPP #
# LANGUAGE TupleSections #
# LANGUAGE TemplateHaskell #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
import Prelude hiding ((**))
import Data.Monoid.Average
import Data.Ord (comparing)
import Music.Prelude hiding (elements, unit, (**), Note)
i... |
e3fb61fe8b086ee73fd157ef7041b9635f536db0d5497a3d8e047bc3cf4c0227 | forked-from-1kasper/bravo | prelude.ml | let (<<) f g x = f (g x)
let (>>) g f x = f (g x)
| null | https://raw.githubusercontent.com/forked-from-1kasper/bravo/261c6426e526dca58f84c11555efafe246aa0bd2/prelude.ml | ocaml | let (<<) f g x = f (g x)
let (>>) g f x = f (g x)
| |
43a6d592c952db423bf3b156b94be3e0bce140d94b4ca39c94c0a0339b84a308 | clojure-interop/aws-api | AbstractAWSRAM.clj | (ns com.amazonaws.services.ram.AbstractAWSRAM
"Abstract implementation of AWSRAM. Convenient method forms pass through to the corresponding overload that
takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.ram ... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.ram/src/com/amazonaws/services/ram/AbstractAWSRAM.clj | clojure | (ns com.amazonaws.services.ram.AbstractAWSRAM
"Abstract implementation of AWSRAM. Convenient method forms pass through to the corresponding overload that
takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.ram ... | |
f5be4c586fa62d9360a4db71b798919f4d881793836d72f666bda48fb0fd28bf | mirage/mirage-www-deployment | config.ml | open Mirage
(** [split c s] splits string [s] at every occurrence of character [c] *)
let split c s =
let rec aux c s ri acc =
half - closed intervals . [ ri ] is the open end , the right - fencepost .
[ li ] is the closed end , the left - fencepost . either [ li ] is
+ negative ( outside [ s ] )... | null | https://raw.githubusercontent.com/mirage/mirage-www-deployment/ef439e79be8fb8b475021c72af3c781a8bd42cfa/xen/ea76a6c72f11f7a15d6cabe6f879462fe99c5bbe/config.ml | ocaml | * [split c s] splits string [s] at every occurrence of character [c]
let tracing = mprof_trace ~size:10000 () in | open Mirage
let split c s =
let rec aux c s ri acc =
half - closed intervals . [ ri ] is the open end , the right - fencepost .
[ li ] is the closed end , the left - fencepost . either [ li ] is
+ negative ( outside [ s ] ) , or
+ equal to [ ri ] ( [ c ] not found in remainder of [ s ] )... |
589eb4506ad52602fa811c696a0d4e7f079d248e3ebf77a5c986f27026c67ae9 | clojure/core.typed | mm_warn_on_unannotated.clj | (ns clojure.core.typed.test.mm-warn-on-unannotated
(:require [clojure.core.typed :as t :refer [check-ns]]))
(t/warn-on-unannotated-vars)
(defmulti foo class)
(defmethod foo Object [a] 1)
| null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/mm_warn_on_unannotated.clj | clojure | (ns clojure.core.typed.test.mm-warn-on-unannotated
(:require [clojure.core.typed :as t :refer [check-ns]]))
(t/warn-on-unannotated-vars)
(defmulti foo class)
(defmethod foo Object [a] 1)
| |
2b9fe6ba6cc55b9e964b6746bbb97eb2a0bde012ceb36216a458e7ac7cb4ffde | UU-ComputerScience/uhc | Typeable.hs | # LANGUAGE NoImplicitPrelude , CPP #
{-# OPTIONS_GHC -XNoImplicitPrelude -XOverlappingInstances -funbox-strict-fields #-}
# LANGUAGE GenericDeriving #
-- The -XOverlappingInstances flag allows the user to over-ride
the instances for given here . In particular , we provide an instance
instance ... = > ( s ... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/uhcbase/Data/Typeable.hs | haskell | # OPTIONS_GHC -XNoImplicitPrelude -XOverlappingInstances -funbox-strict-fields #
The -XOverlappingInstances flag allows the user to over-ride
But a user might want to say
---------------------------------------------------------------------------
|
Module : Data.Typeable
License : BSD-style (see the fil... | # LANGUAGE NoImplicitPrelude , CPP #
# LANGUAGE GenericDeriving #
the instances for given here . In particular , we provide an instance
instance ... = > ( s a )
instance ... = > ( MyType a b )
Copyright : ( c ) The University of Glasgow , CWI 2001 - -2004
The ' ' class reifies types to ... |
a085daccc311bcfa2215605d23ef454276f9abc1535afaa64d188ee9f841b164 | namin/propagators | sudoku-test.scm | ;;; ----------------------------------------------------------------------
Copyright 2010 .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/or modif... | null | https://raw.githubusercontent.com/namin/propagators/ae694dfe680125e53a3d49e5e91c378f2d333937/examples/test/sudoku-test.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2010 .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the GNU Gene... |
6fc733dbff59f093001214ea85ba53e3883226b7573e2871d5aa09b2719918c9 | tamarin-prover/tamarin-prover | Process.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
Copyright : ( c ) 2010 - 2012
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
--
AC - unification of DH terms using as a backend .
module Term.Maude.Process (
-- * Handle to a maude proces... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/c78c7afd3b93b52dd4d2884952ec0fc273832a0d/lib/term/src/Term/Maude/Process.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
|
License : GPL v3 (see LICENSE)
* Handle to a maude process
import Debug.Trace
---------------------------------------------------------------------
it would even be serializable on its own.
return the maude handle
| Start a Maude process.
^ Path t... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2010 - 2012
Maintainer : < >
AC - unification of DH terms using as a backend .
module Term.Maude.Process (
MaudeHandle(..)
, startMaude
, getMaudeStats
* Unification using
, unifyViaMaude
* Matching using
, matchViaMaude
* Varian... |
6e68e179216d1c6b87d909d95a65badc3ee85b3fab1cf6f417fc12b0f2a26f41 | ghc/nofib | Main.hs | ! ! ! Brute force soln to a puzzle . Sent to us by
module Main(main) where
import Control.Monad (replicateM_)
import System.Environment (getArgs)
data ItemType = Bono
| Edge
| Larry
| Adam
deriving (Eq, Ord, Enum)
data BankType = LeftBank
| Ri... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/puzzle/Main.hs | haskell | We are trying to get from a legal state, source, to another legal
starting from dest where the torch is at location.
we can find all the solutions recursively. | ! ! ! Brute force soln to a puzzle . Sent to us by
module Main(main) where
import Control.Monad (replicateM_)
import System.Environment (getArgs)
data ItemType = Bono
| Edge
| Larry
| Adam
deriving (Eq, Ord, Enum)
data BankType = LeftBank
| Ri... |
74f7305379eb75f33812ac398dcf4b822069c61ef38abfe1258676cfc8926c38 | okuoku/nausicaa | output2.scm | SILex - Scheme Implementation of Lex
Copyright ( C ) 2001
;
; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/foreign/silex-1.0/output2.scm | scheme |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more detail... | SILex - Scheme Implementation of Lex
Copyright ( C ) 2001
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , M... |
f6cd69028a41453889d4040d7049013f225eb9c91a0725fe570461c37a019b91 | reanimate/reanimate | Transcript.hs | module Transcript
( V.Transcript(..)
, V.TWord(..)
, transcript
, findWord
, findWords
, V.annotateWithTranscript
) where
import qualified Reanimate.Voice as V
transcript :: V.Transcript
transcript = V.loadTranscript "SCRIPT.txt"
findWord = V.findWord transcript
findWords = V.findWords transcript | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/videos/color-theory/Transcript.hs | haskell | module Transcript
( V.Transcript(..)
, V.TWord(..)
, transcript
, findWord
, findWords
, V.annotateWithTranscript
) where
import qualified Reanimate.Voice as V
transcript :: V.Transcript
transcript = V.loadTranscript "SCRIPT.txt"
findWord = V.findWord transcript
findWords = V.findWords transcript | |
7f259a4d2c2642b7f28d9326a9b9d13a206b61318470ed30ffb52ee0b414d38b | smallhadroncollider/taskell | Due.hs | # LANGUAGE OverloadedLists #
module Taskell.Events.Actions.Modal.Due
( event
, events
) where
import ClassyPrelude
import Graphics.Vty.Input.Events (Event (EvKey))
import Taskell.Events.Actions.Types as A (ActionType (..))
import Taskell.Events.State (normalMode, store, write)
i... | null | https://raw.githubusercontent.com/smallhadroncollider/taskell/3c731476e9a58ede300cfa83aba412509b132a3e/src/Taskell/Events/Actions/Modal/Due.hs | haskell | # LANGUAGE OverloadedLists #
module Taskell.Events.Actions.Modal.Due
( event
, events
) where
import ClassyPrelude
import Graphics.Vty.Input.Events (Event (EvKey))
import Taskell.Events.Actions.Types as A (ActionType (..))
import Taskell.Events.State (normalMode, store, write)
i... | |
61a06bd9c21993937ff14acd391da1f95a5b4896c369b86876dac607d15e3db4 | Javran/advent-of-code | Day9.hs | module Javran.AdventOfCode.Y2016.Day9 (
) where
import Control.Applicative
import Control.Monad
import Javran.AdventOfCode.Prelude
import Text.ParserCombinators.ReadP hiding (count, get, many)
data Day9 deriving (Generic)
data ChunkF r
= Plain String
| Repeated Int r
deriving (Show, Functor)
type SimpleChun... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2016/Day9.hs | haskell | module Javran.AdventOfCode.Y2016.Day9 (
) where
import Control.Applicative
import Control.Monad
import Javran.AdventOfCode.Prelude
import Text.ParserCombinators.ReadP hiding (count, get, many)
data Day9 deriving (Generic)
data ChunkF r
= Plain String
| Repeated Int r
deriving (Show, Functor)
type SimpleChun... | |
aecb4f4c3375c1f7c058d0fa77cd9f3f86729aa40c340c18f92bfdd22135f254 | zadean/xqerl | fn_timezone_from_time_SUITE.erl | -module('fn_timezone_from_time_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['fn-timezone-from-time-1'/1]).
-export(['fn-timezone-from-time-2'/1]).
-e... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_timezone_from_time_SUITE.erl | erlang | -module('fn_timezone_from_time_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['fn-timezone-from-time-1'/1]).
-export(['fn-timezone-from-time-2'/1]).
-e... | |
5bc19e5752072866d4af6c8ad7d70d978adbc2ae1d4b77b72a9ebf5ef4fdfbc5 | Sintrastes/xen-fret | XenFret.hs | {-# OPTIONS_GHC -Wno-name-shadowing #-}
module XenFret (
repeatingNotes,
board,
getNotes,
Fretboard(..),
FretboardStyle(..)
) where
import Diagrams.Attributes hiding (Color)
import Control.Monad
import Diagrams.Prelude hiding (Color)
import Diagrams.Backend.SVG
import XenFret.Util
import Data.List... | null | https://raw.githubusercontent.com/Sintrastes/xen-fret/19a3a0797cd33d95ffa3b19f14bbba28ba16ceb0/xen-fret/src/XenFret.hs | haskell | # OPTIONS_GHC -Wno-name-shadowing #
| Generate an infinite list of the notes of the scale, from 0.
Start one period down to account for
transpositions.
| Information associated with a note for use
in displaying this data differently on a fretboard.
| Given a scale, a fretboard, and a skip fretting value,
return ... |
module XenFret (
repeatingNotes,
board,
getNotes,
Fretboard(..),
FretboardStyle(..)
) where
import Diagrams.Attributes hiding (Color)
import Control.Monad
import Diagrams.Prelude hiding (Color)
import Diagrams.Backend.SVG
import XenFret.Util
import Data.List.NonEmpty (toList)
import XenFret.Data (... |
f32c43a09af09172018747aa41f3caed09b1ddec09771b585edc2200d5aa5a5f | fourmolu/fourmolu | multi-parameters1-four-out.hs | # LANGUAGE MultiParamTypeClasses #
class Foo a b where foo :: a -> b
-- | Something.
class Bar a b c d where
bar ::
a ->
b ->
c ->
d
class -- Before name
Baz where
baz :: Int
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/class/multi-parameters1-four-out.hs | haskell | | Something.
Before name | # LANGUAGE MultiParamTypeClasses #
class Foo a b where foo :: a -> b
class Bar a b c d where
bar ::
a ->
b ->
c ->
d
Baz where
baz :: Int
|
ff35cdf854dc16916b4b662c7b5cfdb77e358e7cbb5558eba5a44556be0c27ef | haskell-repa/repa | Test.hs | # LANGUAGE TypeOperators , FlexibleContexts , FlexibleInstances , TypeSynonymInstances #
# LANGUAGE ParallelListComp , MagicHash , BangPatterns , ScopedTypeVariables #
-- import Test.Framework
import Test . Framework . Providers . QuickCheck2
import Test.QuickCheck
import Data.Array.Repa
import Dat... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/QuickSelect/Test.hs | haskell | import Test.Framework
Framework ------------------------------------------------------------------
non-empty | # LANGUAGE TypeOperators , FlexibleContexts , FlexibleInstances , TypeSynonymInstances #
# LANGUAGE ParallelListComp , MagicHash , BangPatterns , ScopedTypeVariables #
import Test . Framework . Providers . QuickCheck2
import Test.QuickCheck
import Data.Array.Repa
import Data.Array.Repa.Vector
impor... |
f5f82468ef1afd72b4ca7ab4c89ae6cf16973a8b583b16896c80926bd4bf65b0 | alanz/ghc-exactprint | DollarTest.hs | {-# LANGUAGE LinearTypes #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE UnicodeSyntax #
module Dollar where
Check $ interacting with multiplicity polymorphism .
This caused error previously .
Check $ interacting with multiplicity polymorphism.
This caused Core Lint error previously.
-}
import GHC.Base
data Q a... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc90/DollarTest.hs | haskell | # LANGUAGE LinearTypes # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE UnicodeSyntax #
module Dollar where
Check $ interacting with multiplicity polymorphism .
This caused error previously .
Check $ interacting with multiplicity polymorphism.
This caused Core Lint error previously.
-}
import GHC.Base
data Q a = Q a
data QU = QU ()
test... |
ea07e46d4ac960c6b9e9d4d940d95f5e39cf2c2b16e3cdeaf8c24bf2a2b36178 | deadpendency/deadpendency | FetchDependencyRegistryException.hs | {-# LANGUAGE DeriveAnyClass #-}
module DF.Effect.FetchDependencies.Model.FetchDependencyRegistryException
( FetchDependencyRegistryException (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Error.ConsideredAppFailure
import Data.Aeson
newtype FetchDependencyRegistryException
= FDRERegistryFetchExcep... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Effect/FetchDependencies/Model/FetchDependencyRegistryException.hs | haskell | # LANGUAGE DeriveAnyClass # |
module DF.Effect.FetchDependencies.Model.FetchDependencyRegistryException
( FetchDependencyRegistryException (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Error.ConsideredAppFailure
import Data.Aeson
newtype FetchDependencyRegistryException
= FDRERegistryFetchExceptional Text
deriving stock (Eq... |
bd6b2184dfe76a5c6ce849442658cca9100e63b971fea29b8f231f6f0172f8d6 | juspay/atlas | Confirm.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/public-transport-bap/src/Core/ACL/Confirm.hs | haskell | ? | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... |
d01d94b099b35be1b316b859b183317c372ab1aaf0d258febab0925a690af741 | basvandijk/usb | Event.hs | # LANGUAGE NoImplicitPrelude , CPP #
module Event ( Event, evtRead, evtWrite ) where
#if MIN_VERSION_base(4,4,0)
import GHC.Event ( Event, evtRead, evtWrite )
#else
import System.Event ( Event, evtRead, evtWrite )
#endif
| null | https://raw.githubusercontent.com/basvandijk/usb/2ef919fe85b1381547ea2f500eb4291d71ee6f67/src/Event.hs | haskell | # LANGUAGE NoImplicitPrelude , CPP #
module Event ( Event, evtRead, evtWrite ) where
#if MIN_VERSION_base(4,4,0)
import GHC.Event ( Event, evtRead, evtWrite )
#else
import System.Event ( Event, evtRead, evtWrite )
#endif
| |
d23678b77399f88f2cb9e796ea91c4ca904fc0b027fb3c1ef1879b06930a3910 | GaloisInc/saw-script | Yosys.hs | |
Module : . Yosys
Description : Loading and manipulating HDL programs
License : : sbreese
Stability : experimental
Module : SAWScript.Yosys
Description : Loading and manipulating HDL programs
License : BSD3
Maintainer : sbreese
Stability : experimental
-}
{-# Language Templ... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/2c5cffd498464f1dd2a9c92013a652c464163a2b/src/SAWScript/Yosys.hs | haskell | # Language TemplateHaskell #
# Language OverloadedStrings #
# Language ViewPatterns #
# Language LambdaCase #
# Language MultiWayIf #
# Language TupleSections #
# Language ScopedTypeVariables #
------------------------------------------------------------------------------
, _modgraphVertexFromKey :: Text -> Maybe Grap... | |
Module : . Yosys
Description : Loading and manipulating HDL programs
License : : sbreese
Stability : experimental
Module : SAWScript.Yosys
Description : Loading and manipulating HDL programs
License : BSD3
Maintainer : sbreese
Stability : experimental
-}
# Language RecordW... |
f4069aff6ba4a1599ca386bddcd705952403f46f71cd9ec6952513ede2b1cccf | janestreet/memtrace_viewer | hot_call_sites.mli | open! Core
open Memtrace_viewer_common
val hot_locations : Data.Fragment_trie.t -> Data.Fragment.t list
| null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/server/src/hot_call_sites.mli | ocaml | open! Core
open Memtrace_viewer_common
val hot_locations : Data.Fragment_trie.t -> Data.Fragment.t list
| |
cee0835ebf32cef29b30d972ccc03f4253d9210c0e313eecc5397f5184f2ab1c | spectrum-finance/cardano-dex-contracts | PDeposit.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
module ErgoDex.PContracts.PDeposit (
DepositConfig (..),
depositValidatorT,
) where
import qualified GHC.Generics as GHC
import Generics.SOP (Generic, I (I))
import Plutarch
import Plutarch.Api.V2.Contexts
import Plutarch.DataRepr
import Plut... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-contracts/87bdbc26dbe9ae5f6c59e608d728330f8166f19c/cardano-dex-contracts-onchain/ErgoDex/PContracts/PDeposit.hs | haskell | > OrderRedeemer :--> PScriptContext :--> PBool)
Checks whether an asset overflow is returned back to user
> PAssetClass :--> PInteger :--> PInteger :--> PInteger :--> PInteger :--> PBool)
> PAssetClass :--> PInteger :--> PInteger :--> PInteger :--> PInteger :--> PInteger) | # LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
module ErgoDex.PContracts.PDeposit (
DepositConfig (..),
depositValidatorT,
) where
import qualified GHC.Generics as GHC
import Generics.SOP (Generic, I (I))
import Plutarch
import Plutarch.Api.V2.Contexts
import Plutarch.DataRepr
import Plut... |
c641045b2c300b34ef0702bbcc96bfcf14e5f9132bd8299878d438013dea4d78 | roman01la/figcup | specs.clj | (ns figma.specs
(:require [clojure.spec.alpha :as s]))
(def color-chan
(s/and number? #(<= 0 % 1)))
(def alpha-chan
(s/and number? #(<= 0 % 1)))
;;=============================================
;; File Format Types
;;=============================================
Color
(s/def :figma.types.color/r color-chan)
... | null | https://raw.githubusercontent.com/roman01la/figcup/a392880919036ab4f0676ae4b70972365795ce81/src/figma/specs.clj | clojure | =============================================
File Format Types
=============================================
Rectangle
Vector
ColorStop
Effect
Paint
Component
=============================================
JSON File Format Types / Node Properties
=============================================
Document
Frame
V... | (ns figma.specs
(:require [clojure.spec.alpha :as s]))
(def color-chan
(s/and number? #(<= 0 % 1)))
(def alpha-chan
(s/and number? #(<= 0 % 1)))
Color
(s/def :figma.types.color/r color-chan)
(s/def :figma.types.color/g color-chan)
(s/def :figma.types.color/b color-chan)
(s/def :figma.types.color/a alpha-cha... |
cf8a059988906f34d5e6fc0a523c70828ecd4a62af29352cdeaa0da624c5e5cb | borodust/claw | library.lisp | (cl:in-package :claw.cffi.c)
(defclass cffi-generator (generator) ())
(defmethod list-required-systems ((this cffi-generator))
'(:cffi))
(defmethod claw.wrapper:generate-bindings ((generator (eql :claw/cffi))
(language (eql :c))
... | null | https://raw.githubusercontent.com/borodust/claw/a92d4cc868820713cf221c4160cf76aa4ff7e385/src/gen/cffi/c/library.lisp | lisp | (cl:in-package :claw.cffi.c)
(defclass cffi-generator (generator) ())
(defmethod list-required-systems ((this cffi-generator))
'(:cffi))
(defmethod claw.wrapper:generate-bindings ((generator (eql :claw/cffi))
(language (eql :c))
... | |
4e12483f19eb3422e02f34e6ef87fc7f0dd992a7e8f670d8c48a55b953443db7 | arrdem/blather | rfc5234.clj | (ns languages.rfc5234
"A Blather dialect for ABNF as specified in RFC5234.
RFC7405 updates RFC5234 adding explicit support for case-sensitivity."
(:refer-clojure :exclude [str])
(:require [clojure.java.io :refer [resource]]
[clojure.core.match :refer [match]]
[blather.grammars :as g]
... | null | https://raw.githubusercontent.com/arrdem/blather/76fc860f26ae2fb7f0d2240da42cf85b0cb1169d/src/main/clj/languages/rfc5234.clj | clojure | Things that can be thrown out
Parsing terminals
Parsing combinators
Parse the rule & additions list into a grammar structure. | (ns languages.rfc5234
"A Blather dialect for ABNF as specified in RFC5234.
RFC7405 updates RFC5234 adding explicit support for case-sensitivity."
(:refer-clojure :exclude [str])
(:require [clojure.java.io :refer [resource]]
[clojure.core.match :refer [match]]
[blather.grammars :as g]
... |
ffa36aa271884f43c63d9545afa480bd2d4fa8229c38702a7dd14c6d367f9c94 | MassD/pearls | boustrophedon_box.ml | (*
boustrophedon - box
box [x;y] [a;b;c] = [[a;b;c;][x;][c;b;a;];[y];[a;b;c;]] = [a;b;c;x;c;b;a;y;a;b;c]
*)
(* this is the raw way of boxing, it is not efficient as l2 is always reversed *)
let rec box l1 l2 =
match l1 with
| [] -> l2
| hd::tl -> l2 @ [hd] @ box tl (List.rev l2)
(* this is more efficie... | null | https://raw.githubusercontent.com/MassD/pearls/da73f49ffe61125c1def4f2b3ed339963318dbec/28_loopless/boustrophedon_box.ml | ocaml |
boustrophedon - box
box [x;y] [a;b;c] = [[a;b;c;][x;][c;b;a;];[y];[a;b;c;]] = [a;b;c;x;c;b;a;y;a;b;c]
this is the raw way of boxing, it is not efficient as l2 is always reversed
this is more efficient as ys will be reversed only once
But still, because of `ys @` part, it will anyway read through ys/sy all ... |
let rec box l1 l2 =
match l1 with
| [] -> l2
| hd::tl -> l2 @ [hd] @ box tl (List.rev l2)
let box_better xs ys =
let rec mix xs (ys, sy) =
match xs with
| [] -> ys
| x::tl -> ys @ [x] @ mix tl (sy, ys)
in
mix xs (ys, List.rev ys)
let box_tail l1 l2 =
let rec collect acc l2' = funct... |
6f124edaa32dbeecb161a283332583d483220ad4ef8ecfcdf49e4b851202acea | unisonweb/unison | PinBoard.hs | {-# LANGUAGE OverloadedStrings #-}
| A utility type for saving memory in the presence of many duplicate ByteStrings , etc . If you have data that may be
-- a redundant duplicate, try pinning it to a pin board, and use the result of that operation instead.
--
-- Without a pin board:
--
x ─ ─ ─ ─ ─ " 38dce848c... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/Util/PinBoard.hs | haskell | # LANGUAGE OverloadedStrings #
a redundant duplicate, try pinning it to a pin board, and use the result of that operation instead.
Without a pin board:
z ───── "d2518f260535b927b"
With a pin board:
y ────────┘ board
z ───── "d2518f260535b927b" ┄┄┄┄┄┘
... and after x is ... |
| A utility type for saving memory in the presence of many duplicate ByteStrings , etc . If you have data that may be
x ─ ─ ─ ─ ─ " 38dce848c8c829c62 "
y ─ ─ ─ ─ ─ " 38dce848c8c829c62 "
x ─ ─ ─ ─ ─ " 38dce848c8c829c62 " ┄ ┄ ┄ ┄ ┄ ┐
" 38dce848c8c829c62 " ┄ ┄ ┄ ┄ ┄ ┐
module Unison.Util.... |
05c36c5edf7eb6db23736285bf2f004716cb79fd75bb1c6ac3e575a25856e116 | hannesm/logs-syslog | unikernel.ml | open Lwt.Infix
module Main (C : Mirage_console.S) (CLOCK : Mirage_clock.PCLOCK) (T : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct
module LU = Logs_syslog_mirage.Udp(C)(CLOCK)(S)
let start c _clock _time s =
let ip = Ipaddr.V4.of_string_exn "10.0.0.1" in
let r = LU.create c s ~hostname:"MirageOS.example"... | null | https://raw.githubusercontent.com/hannesm/logs-syslog/aadb766b7b1e239d92b88765720fae6cdd75577f/example/unikernel.ml | ocaml | open Lwt.Infix
module Main (C : Mirage_console.S) (CLOCK : Mirage_clock.PCLOCK) (T : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct
module LU = Logs_syslog_mirage.Udp(C)(CLOCK)(S)
let start c _clock _time s =
let ip = Ipaddr.V4.of_string_exn "10.0.0.1" in
let r = LU.create c s ~hostname:"MirageOS.example"... | |
d7086ab9f2fed603f71c89920fa53fcaaa3b76cb23deed73dac4b2e4c0fbcaa1 | 1Jajen1/Brokkr | PlayerMovement.hs | # LANGUAGE UndecidableInstances #
module System.PlayerMovement (
playerMovement
, Translate(..)
, Rotate(..)
, Land, Fly
) where
import Chunk.Position
import Client
import Control.Monad
import Control.Monad.IO.Class
import Control.Concurrent.MVar
import qualified Control.Concurrent.Async as Async
im... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/5c128a47c7123e576b4e415048d58c2ab3f4a0aa/src/System/PlayerMovement.hs | haskell | TODO Check if Rotate is enabled
Update the view position and maybe load chunks
Yes, I too have no idea why we need to send SetCenterChunk or why the y level change wants requires it
send SetCenterChunk packet
This is sort of static, so lookup at the start?
| # LANGUAGE UndecidableInstances #
module System.PlayerMovement (
playerMovement
, Translate(..)
, Rotate(..)
, Land, Fly
) where
import Chunk.Position
import Client
import Control.Monad
import Control.Monad.IO.Class
import Control.Concurrent.MVar
import qualified Control.Concurrent.Async as Async
im... |
d6a067b26fd93a89627df3c863fefd6c476b837e2a70e13290a9943317ec4cb8 | exercism/babashka | project.clj | (defproject binary-search "0.1.0-SNAPSHOT"
:description "binary-search exercise."
:url "-search"
:dependencies [[org.clojure/clojure "1.10.0"]])
| null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/binary-search/project.clj | clojure | (defproject binary-search "0.1.0-SNAPSHOT"
:description "binary-search exercise."
:url "-search"
:dependencies [[org.clojure/clojure "1.10.0"]])
| |
66d5e79678cc5667a7c79c343ab85021f256d6da66aa566c9b73c202c883c218 | patrikja/autosar | Seal.hs | # LANGUAGE TypeOperators , DeriveGeneric , DefaultSignatures , , FlexibleContexts #
module Seal (module Seal, module GHC.Generics, module Generics.Deriving.Functor) where
import GHC.Generics
import Generics.Deriving.Functor
class GFunctor m => Interface m where
seal :: m c -> m ()
seal = gmap (const ())
-- TODO... | null | https://raw.githubusercontent.com/patrikja/autosar/2b8d3a22eb99812dca645a1c3c18ce18fbf6d539/generics/Seal.hs | haskell | TODO: Perhaps add rewriting pragmas to actually avoid doing anything. | # LANGUAGE TypeOperators , DeriveGeneric , DefaultSignatures , , FlexibleContexts #
module Seal (module Seal, module GHC.Generics, module Generics.Deriving.Functor) where
import GHC.Generics
import Generics.Deriving.Functor
class GFunctor m => Interface m where
seal :: m c -> m ()
seal = gmap (const ())
|
7fb4e273e72494459afcc3e3bea6c64234ab86533fbf69c2740e992e523fb1b2 | ghcjs/ghcjs-base | IO.hs | -- | Program which exposes some haskell functions as an exutable. The results
-- and coverage of this module is meant to be checked using a shell script.
--
module Main
(
main
) where
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
import qualifie... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/test/Tests/IO.hs | haskell | | Program which exposes some haskell functions as an exutable. The results
and coverage of this module is meant to be checked using a shell script.
| module Main
(
main
) where
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.IO as TL
main :: IO ()
main = do
... |
aadd49734f5e21ccffecb5ec9992cd55cfc3f204d061a539d7c8ed22343ba571 | mstksg/advent-of-code-2019 | Intcode.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Strict ... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2019/df2b1c76ad26ad20306f705e923a09b14d538374/src/AOC/Common/Intcode.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes #
# LANGUAGE Strict #
| Defered version of 'withInput', to allow for maximum 'laziness'.
^ mode int
| Run a @t Int -> m r@ function by fetching ... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module AOC.Common.Intcode (
Memory(..)
, mRegLens
, VM
, AsciiVM
, stepForever
, stepForeverAndDie
, stepForeverMut
, untilHalt
, parseMem
... |
ef78a35b4a6b72fa4e96eca1e2919ae1838b36aa7d3bccce5c6d444a400ab70c | dstarcev/stepic-haskell | Task4.hs | module Module2.Task4 where
doItYourself = f . g . h
f = logBase 2
g = (^ 3)
h = max 42
| null | https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module2/Task4.hs | haskell | module Module2.Task4 where
doItYourself = f . g . h
f = logBase 2
g = (^ 3)
h = max 42
| |
c716660bd3d316236f935122e160da71f95886d086368445d17df9e7d9a584b8 | marick/Midje | fim_collection_diffs.clj | (ns implementation.checking.checkers.fim-collection-diffs (:require [midje.checking.checkers.collection-diffs :as subject])
(:require [midje.sweet :refer :all]
[midje.test-util :refer :all]
[midje.checking.core :as core])
(:import [flare.map MapKeysDiff]
[flare.atom AtomDiff]))
(... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/implementation/checking/checkers/fim_collection_diffs.clj | clojure | Eventually, the `differ` will be the actual checker, making this format a bit more
readable.
does not try to compare a missing key | (ns implementation.checking.checkers.fim-collection-diffs (:require [midje.checking.checkers.collection-diffs :as subject])
(:require [midje.sweet :refer :all]
[midje.test-util :refer :all]
[midje.checking.core :as core])
(:import [flare.map MapKeysDiff]
[flare.atom AtomDiff]))
(... |
8de24221932d4446ee0271c004bed17dfd4de10f5f34b7069df6999f9c798b8e | benoitc/opencouch | couch_db_updater.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/benoitc/opencouch/fef7be42f37515a6f73e2dfbab74fea75188e415/src/couch_db_updater.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_db_updater).
-behaviour(gen_server).
-export([btree_by_id_split/1, btree_by_id_join/2, btree_by_id_reduce/2]).
-export([btree_by_seq_split/1,... |
f398796b67eb8277c1184bafa50aac9ad8146f83a1f4b0b6a84863185cf714ee | techascent/tvm-clj | _transform.clj | (ns tvm-clj.impl.fns.relay._transform
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "relay._transform") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/relay/_transform.clj | clojure | (ns tvm-clj.impl.fns.relay._transform
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "relay._transform") | |
bb014b5af8bce1356398323325fc4b394530d1e749951a7a507a591618685cad | onedata/op-worker | user_ctx.erl | %%%--------------------------------------------------------------------
@author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% This module provides access to u... | null | https://raw.githubusercontent.com/onedata/op-worker/9e94ef0b27a79e32c1baf4c4650b04c1dcc89c21/src/modules/fslogic/context/user_ctx.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
This module provides access to user context information, such as user's
credentials, along with context management functions.
@end
------------------------------------... | @author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(user_ctx).
-author("Rafal Slota").
-include("global_definitions.hrl").
-include("modules/datastore/datastore_models.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include_lib("ctoo... |
7dd76e57aed358fb72d487d1323e89ea12be7894fb62056b0b7e69dc65368494 | mbj/stratosphere | ValidationProfileProperty.hs | module Stratosphere.SageMaker.ModelPackage.ValidationProfileProperty (
module Exports, ValidationProfileProperty(..),
mkValidationProfileProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphe... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelPackage/ValidationProfileProperty.hs | haskell | # SOURCE # | module Stratosphere.SageMaker.ModelPackage.ValidationProfileProperty (
module Exports, ValidationProfileProperty(..),
mkValidationProfileProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProp... |
fce9d3867a6034a097e67e0e94635a131998bec848c4c3d92969cc9e981382fe | gtod/postgres-json | interface.lisp | (in-package :postgres-json-test)
(test update-history
(with-temp-model (with-history (pgj-history-model))
(insert with-history (obj "a" "b") 7)
(supersede with-history 7 (obj "a" "c"))
(supersede with-history 7 (obj "a" "d"))
(is (= 2 (length (history with-history 7))))
(with-model-transaction ()... | null | https://raw.githubusercontent.com/gtod/postgres-json/a545b6c61ca6ee4c6a579c77dbe6856013c7c34f/t/model/interface.lisp | lisp | (in-package :postgres-json-test)
(test update-history
(with-temp-model (with-history (pgj-history-model))
(insert with-history (obj "a" "b") 7)
(supersede with-history 7 (obj "a" "c"))
(supersede with-history 7 (obj "a" "d"))
(is (= 2 (length (history with-history 7))))
(with-model-transaction ()... | |
34386b5c52e9a5402d36c0c9ad944f826962a6bd1dc30418683dfb0c571e31c5 | tmattio/js-bindings | node_domain.ml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es2020
open Node_globals
module Domain =
struct
module Global =
struct
type t = Ojs.t
let rec t_of_js : Ojs.t -> t = fun (x2 : Ojs.t) -> x2
and t_to... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/node/node_domain.ml | ocaml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es2020
open Node_globals
module Domain =
struct
module Global =
struct
type t = Ojs.t
let rec t_of_js : Ojs.t -> t = fun (x2 : Ojs.t) -> x2
and t_to... | |
32203d53680b8756959c80cf082f02c587886fbd2dcd59702c9552961f3c0430 | danchoi/herbalizer | Main.hs | {-# LANGUAGE DoAndIfThenElse #-}
module Main where
import Control.Applicative ((<$>), (<*>), (<*), (<$))
import Control.Monad (liftM)
import Control.Monad.State (State, runState)
import Control.Applicative ((<*))
import Text.Parsec hiding (State)
import Text.Parsec.Indent
import Text.Parsec.Pos
import Data.List (isPref... | null | https://raw.githubusercontent.com/danchoi/herbalizer/081e7a386510e0f9464a7186aa4c591cbc0c579d/src/Main.hs | haskell | # LANGUAGE DoAndIfThenElse #
e.g. "- localvar = Time.now"
really, we need to parse full-blown Ruby expressions
TODO HTML Comments are not rendered like HAML renders them
also HAML -# style comments could be rendered
Not sure what HAML's escaping rules are here; again HAML makes things unclear & make you
to look a... | module Main where
import Control.Applicative ((<$>), (<*>), (<*), (<$))
import Control.Monad (liftM)
import Control.Monad.State (State, runState)
import Control.Applicative ((<*))
import Text.Parsec hiding (State)
import Text.Parsec.Indent
import Text.Parsec.Pos
import Data.List (isPrefixOf, isInfixOf, intercalate, int... |
9ea7eb73d4e71fa1c6070d3de0e3a5359564450de8fd61676bd59e980d63ac2f | kowainik/stan | Partial.hs | |
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Contains all ' Inspection 's for partial functions .
The _ _ partial _ _ inspections are in ranges :
* @STAN-0001 .. STAN-0100@
Copyright: (c) 2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik... | null | https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/src/Stan/Inspection/Partial.hs | haskell | * Partial 'Inspection's
*** Partial 'GHC.List.head'
*** Partial 'GHC.List.last'
*** Partial 'GHC.List.!!'
*** Partial 'GHC.List.cycle'
*** Partial 'Data.OldList.genericIndex'
*** Partial 'Text.Read.read'
*** Partial 'GHC.Enum.pred'
*** Partial 'Data.Foldable.maximum'
*** Partial 'Data.Foldable.minimum'
*** P... | |
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Contains all ' Inspection 's for partial functions .
The _ _ partial _ _ inspections are in ranges :
* @STAN-0001 .. STAN-0100@
Copyright: (c) 2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.