_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 |
|---|---|---|---|---|---|---|---|---|
5c628a5408208cefad30bac9485d8780ae70c3257260d93d2f6c151560381260 | lopec/LoPEC | configparser.erl | Made by
-module(configparser).
-export([read_config/2, parse/2]).
%%--------------------------------------------------------------------
%% @doc
%% Go throu the List and looks if there exist a Key. If so it returns
%% the value of that key.
%%
@spec parse(Key , List ) - >
%% {ok, ... | null | https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/common/src/configparser.erl | erlang | --------------------------------------------------------------------
@doc
Go throu the List and looks if there exist a Key. If so it returns
the value of that key.
{ok, Value} |
{error, not_found}
@end
---------------------------------------------... | Made by
-module(configparser).
-export([read_config/2, parse/2]).
@spec parse(Key , List ) - >
parse(Key, []) ->
chronicler:warning("~w : Could not find the key '~w'~n", [?MODULE, Key]),
{error, not_found};
parse(Key, [{Key, Value} | _Config]) ->
{ok, Value};
parse(Key, [_Other | Config]) ->
parse... |
25b63ee0ce5914223c920e15087e788200b7c9200058f87842479f68c681af29 | racket/web-server | servlet.rkt | #lang racket/base
(require net/url
web-server/servlet/web-cells
web-server/http/bindings
web-server/http
web-server/dispatch
web-server/servlet/servlet-structs
web-server/servlet/web)
(provide (all-from-out net/url
web-server/servlet/... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/servlet.rkt | racket | #lang racket/base
(require net/url
web-server/servlet/web-cells
web-server/http/bindings
web-server/http
web-server/dispatch
web-server/servlet/servlet-structs
web-server/servlet/web)
(provide (all-from-out net/url
web-server/servlet/... | |
04688f14d8f84d177e06caa9b535ae260fbe0ead1f9f3905d3b4e39426c548e3 | AccelerateHS/accelerate-llvm | Internal.hs | # LANGUAGE CPP #
-- |
-- Module : Data.Array.Accelerate.LLVM.Native.Distribution.Simple.GHC.Internal
Copyright : [ 2017 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
Copied from :
--
module... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/accelerate-llvm-native/icebox/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/GHC/Internal.hs | haskell | |
Module : Data.Array.Accelerate.LLVM.Native.Distribution.Simple.GHC.Internal
License : BSD3
Stability : experimental
| Strip out flags that are not supported in ghci
when using -split-objs, we need to search for object files in the
Module_split directory for each module. | # LANGUAGE CPP #
Copyright : [ 2017 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
Copied from :
module Data.Array.Accelerate.LLVM.Native.Distribution.Simple.GHC.Internal (
mkGHCiLibName,
ghcLookupProperty,
filterGhciFlags,
getHaskellObjects,
... |
5cd954168a7ae4a13b753ff78826a44f234b2f73c1d4d907ab0b9fb57a9aacc8 | poscat0x04/telegram-types | ExportChatInviteLink.hs | module Web.Telegram.Types.Internal.API.ExportChatInviteLink where
import Common
import Web.Telegram.Types.Internal.API.ChatId
newtype ExportChatInviteLink = ExportChatInviteLink
{chatId :: ChatId}
deriving stock (Show, Eq)
mkLabel ''ExportChatInviteLink
deriveToJSON snake ''ExportChatInviteLink
makeMethod ''Expo... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/ExportChatInviteLink.hs | haskell | module Web.Telegram.Types.Internal.API.ExportChatInviteLink where
import Common
import Web.Telegram.Types.Internal.API.ChatId
newtype ExportChatInviteLink = ExportChatInviteLink
{chatId :: ChatId}
deriving stock (Show, Eq)
mkLabel ''ExportChatInviteLink
deriveToJSON snake ''ExportChatInviteLink
makeMethod ''Expo... | |
eb333507ada80f180b1f428f1855ff2bb092c87f08d404b9884546d522fa8903 | nilenso/goose | scheduled_jobs.clj | (ns goose.api.scheduled-jobs
"API to manage scheduled jobs.
- [API wiki]()"
(:require
[goose.broker :as b]))
(defn size
"Returns count of Scheduled Jobs."
[broker]
(b/scheduled-jobs-size broker))
(defn find-by-id
"Finds a Scheduled Job by `:id`."
[broker id]
(b/scheduled-jobs-find-by-id broker i... | null | https://raw.githubusercontent.com/nilenso/goose/cf42be9a79f4d0a8c65a93d8cb850bdc666bccb2/src/goose/api/scheduled_jobs.clj | clojure | (ns goose.api.scheduled-jobs
"API to manage scheduled jobs.
- [API wiki]()"
(:require
[goose.broker :as b]))
(defn size
"Returns count of Scheduled Jobs."
[broker]
(b/scheduled-jobs-size broker))
(defn find-by-id
"Finds a Scheduled Job by `:id`."
[broker id]
(b/scheduled-jobs-find-by-id broker i... | |
7795364db22bb77db7f86463fa7359fc9c49e83f6f844baf48b4d24bd9e232a4 | gwathlobal/CotD | level-city.lisp |
(in-package :cotd)
(defun create-template-city (template-level max-x max-y max-z set-max-buildings-func set-reserved-buildings-func
&optional (terrains (list +level-city-park+ +building-city-park-tiny+
+level-city-terrain-border+... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/level-city.lisp | lisp | make a template level
grid will be used to make reservations for buildings
once all places on grid are reserved, put actual buildings to the template level in places that were reserved
(reserv-max-z max-z)
set up maximum building types for this kind of map
set up reserved building types for this kind of map
... |
(in-package :cotd)
(defun create-template-city (template-level max-x max-y max-z set-max-buildings-func set-reserved-buildings-func
&optional (terrains (list +level-city-park+ +building-city-park-tiny+
+level-city-terrain-border+... |
c70c9a0d85683299167aace29a40e8d88702c3ab571c3f6e252bb1729c54597c | shamazmazum/similar-images | collect-hashes.lisp | (in-package :similar-images)
(defun handle-condition (c)
(declare (ignore c))
(invoke-restart
(if *remove-errored*
'remove-file
'skip-image)))
(defun report-warning (c)
(log:warn
"~a"
(with-output-to-string (out)
(princ c out)))
(muffle-warning c))
(defun imagep (pathname)
"T if... | null | https://raw.githubusercontent.com/shamazmazum/similar-images/e11efb8e046ae3bcff85a11bd507be6a7dc5d438/src/collect-hashes.lisp | lisp | (in-package :similar-images)
(defun handle-condition (c)
(declare (ignore c))
(invoke-restart
(if *remove-errored*
'remove-file
'skip-image)))
(defun report-warning (c)
(log:warn
"~a"
(with-output-to-string (out)
(princ c out)))
(muffle-warning c))
(defun imagep (pathname)
"T if... | |
407126219f55dacb8d1f582a55b1650f296f3a5da4293a89916483111883e39f | fortytools/holumbus | Crawl.hs | -- ----------------------------------------------------------------------------
|
Module : . Build . Crawl
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
This module provides ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Build/Crawl.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
# OPTIONS -fglasgow-exts -fno-warn-orphans #
-----------------------------------------------------------------------------
* CrawlerState type
* Crawling
* Init... |
|
Module : . Build . Crawl
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
This module provides some functions to crawl Web Pages recursively
Module : Holumbus.Build.C... |
83bb523ec35ab09663cc7308839c086883155fe4cb0625caeb01e90206633707 | Ptival/chick | Test.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Diff.Guess.Inductive.Test where
import Diff.Guess.Inductive
import qualified Diff.Inductive as ΔI
import Inductive.Inductive
import Language
import Parsing.Inductive
import Polysemy
import Polysemy.Error
import Polysemy.Trac... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/test/Diff/Guess/Inductive/Test.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Diff.Guess.Inductive.Test where
import Diff.Guess.Inductive
import qualified Diff.Inductive as ΔI
import Inductive.Inductive
import Language
import Parsing.Inductive
import Polysemy
import Polysemy.Error
import Polysemy.Trac... | |
0814b071df8442e723a54c0f47ee272f8230b6197a414bcf728286e12b712f9c | biocaml/phylogenetics | simulator.ml | (**
Useful documents:
- /~larget/phylogeny.pdf
- -017-0979-y
- /
*)
open Core
module type Branch_info = sig
type t
val length : t -> float
end
module Make
(A : Alphabet.S_int)
(BI : Branch_info) =
struct
let symbol_sample rng v =
Gsl.Randist.discrete_preproc v
|> Gsl.Randist.discrete... | null | https://raw.githubusercontent.com/biocaml/phylogenetics/e225616a700b03c429c16f760dbe8c363fb4c79d/lib/simulator.ml | ocaml | *
Useful documents:
- /~larget/phylogeny.pdf
- -017-0979-y
- /
assert (state <> next_state) ; | open Core
module type Branch_info = sig
type t
val length : t -> float
end
module Make
(A : Alphabet.S_int)
(BI : Branch_info) =
struct
let symbol_sample rng v =
Gsl.Randist.discrete_preproc v
|> Gsl.Randist.discrete rng
|> A.of_int_exn
let transition_matrix rate_matrix b =
A.Matrix.(... |
9b264ebb8cb059a435567517d47e0b9f334940e05088ef33e2c8ae847a0f481a | haskell/time | LongWeekYearsRef.hs | module Test.Calendar.LongWeekYearsRef where
longWeekYearsRef :: String
longWeekYearsRef =
unlines
[ "1901: "
, "1902: "
, "1903: *"
, "1904: L "
, "1905: "
, "1906: "
, "1907: "
, "1908: L*"
, "1909: "
, "1910: "
... | null | https://raw.githubusercontent.com/haskell/time/ab2c0c28b8b7a12bce12eedd357a73e39b00afc2/test/main/Test/Calendar/LongWeekYearsRef.hs | haskell | module Test.Calendar.LongWeekYearsRef where
longWeekYearsRef :: String
longWeekYearsRef =
unlines
[ "1901: "
, "1902: "
, "1903: *"
, "1904: L "
, "1905: "
, "1906: "
, "1907: "
, "1908: L*"
, "1909: "
, "1910: "
... | |
e9643ed833a882df726360484c99a05a6cf8a02fba5b0f58fd40b99830520e7f | lasp-lang/partisan | partisan_orchestration_backend.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2018 . All Rights Reserved .
%%
This file is provided to you 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... | null | https://raw.githubusercontent.com/lasp-lang/partisan/9456ceab7642e10b32f1f0613be60553c0ddd5ba/src/partisan_orchestration_backend.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2018 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(partisan_orchestrati... |
38b79d8d19e400da9cc587db741d3ad3d874cb502080c8207d73f0c4e6137544 | nuvla/api-server | user_template_username_password_test.cljc | (ns sixsq.nuvla.server.resources.spec.user-template-username-password-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]
[sixsq.nuvla.server.resources.spec.user-template-username-password :as spec-username-password]
[sixsq.nuvla.server.resources.... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/user_template_username_password_test.cljc | clojure | check the registration schema (without href)
mandatory attributes
check the create template schema (with href)
mandatory attributes
mandatory template attributes
optional attributes | (ns sixsq.nuvla.server.resources.spec.user-template-username-password-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]
[sixsq.nuvla.server.resources.spec.user-template-username-password :as spec-username-password]
[sixsq.nuvla.server.resources.... |
bc99d50cd6df8e95b21621dcb93d4a8bc6d92bd62f4bdeb5ab357de030e66921 | rowangithub/DOrder | invmine.mli | For learning algorithm 1
val learn : int -> (string * int) list list -> (string * int) list list -> (string, Path.t) Hashtbl.t ->
string list -> Env.t -> Frame.t -> ((*Predicate.t list *) Predicate.t) list
| null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/invmine.mli | ocaml | Predicate.t list | For learning algorithm 1
val learn : int -> (string * int) list list -> (string * int) list list -> (string, Path.t) Hashtbl.t ->
|
ea25365deff535556b199ee9a1de18537aa1ebe21212026facbedfa730420a35 | arbor/antiope | Syntax.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Antiope.S3.Syntax
( (</>)
) where
import Antiope.S3.Types
import Control.Lens
import Data.Generics.Product.Any
import Data.Semigroup ((<>))
import Data.Text (Text)
| Append text to an S3Uri
(</>) :: S3Uri -> Text -> ... | null | https://raw.githubusercontent.com/arbor/antiope/86ad3df07b8d3fd5d2c8bef4111a73b85850e1ba/antiope-s3/src/Antiope/S3/Syntax.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Antiope.S3.Syntax
( (</>)
) where
import Antiope.S3.Types
import Control.Lens
import Data.Generics.Product.Any
import Data.Semigroup ((<>))
import Data.Text (Text)
| Append text to an S3Uri
(</>) :: S3Uri -> Text -> ... | |
62a1a0e190a5dca9c1873eb2dd4d914dc59a3adeb787ef2ca5567049aed07325 | ocaml-sf/learn-ocaml-corpus | unfinished2.ml | let length (type a) (s : a seq) : int =
match s with
| Empty ->
0
| Singleton _ ->
1
| Sum (length, _, _) ->
length
| Product (length, _, _) ->
length
| Map (length, _, _) ->
length
let is_empty s =
length s = 0
let empty =
Empty
let singleton x =
Singleton x
let sum ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/symbolic_sequences_data/wrong/unfinished2.ml | ocaml | let length (type a) (s : a seq) : int =
match s with
| Empty ->
0
| Singleton _ ->
1
| Sum (length, _, _) ->
length
| Product (length, _, _) ->
length
| Map (length, _, _) ->
length
let is_empty s =
length s = 0
let empty =
Empty
let singleton x =
Singleton x
let sum ... | |
f13aa81d755061829b447ef058bfaf902e7ce30bd9c444bd012e1cbb5a8152c7 | adobe/Chronikis | TransformsImpl.hs |
Copyright 2019 Adobe . All rights reserved . This file is licensed to you 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 , sof... | null | https://raw.githubusercontent.com/adobe/Chronikis/b83b9e38341cdc1539fc7625c6355c6fd176d8a3/compiler/src/TransformsImpl.hs | haskell | import Debug.Trace (trace)
bottomUpXform consolidateTSDSums >=> -- Not sure if this is necessary
No "/", because some results cannot be represented exactly as
Scientific values
No negative exponents, because of possibility that result cannot
be represented exactly as a Scientific value.
DEFINITION: An Expr value ... |
Copyright 2019 Adobe . All rights reserved . This file is licensed to you 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 , sof... |
eb3064c927e39fd5a2a795ca84d4b0aab45ec7dd111dbbffcd59ee887320b98c | votinginfoproject/data-processor | pipeline_test.clj | (ns vip.data-processor.pipeline-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :refer :all]))
(defn incrementor [ctx]
(update ctx :input inc))
(defn thrower [ctx]
(throw (Throwable. "Boom!")))
(deftest try-processing-fn-test
(let [ctx {:input 0}]
(testing "Without an ex... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/pipeline_test.clj | clojure | (ns vip.data-processor.pipeline-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :refer :all]))
(defn incrementor [ctx]
(update ctx :input inc))
(defn thrower [ctx]
(throw (Throwable. "Boom!")))
(deftest try-processing-fn-test
(let [ctx {:input 0}]
(testing "Without an ex... | |
5837879466cdcd9064067e23f7b99341f916f1241e1a859367054574b225dc4e | monostable/footwork | cli.rkt | #lang racket
(require "kicad_mod.rkt")
(define m (file->string "example.footwork_mod"))
; turns struct into list but also keeps the initial keyword unlike the one in
; racket/struct
(define (struct->list x)
(let* ([de-struct
(λ (sym)
(let ([str (symbol->string sym)])
(string->symb... | null | https://raw.githubusercontent.com/monostable/footwork/f3023f7f762e72bd7c0186dae4c78a34d54aaa61/cli.rkt | racket | turns struct into list but also keeps the initial keyword unlike the one in
racket/struct
recursively turn a arbitrarily deep list of structs into list of lists | #lang racket
(require "kicad_mod.rkt")
(define m (file->string "example.footwork_mod"))
(define (struct->list x)
(let* ([de-struct
(λ (sym)
(let ([str (symbol->string sym)])
(string->symbol
(string-replace str "struct:" ""))))]
[v (struct->vector x)]
... |
ca9600b5ebcce65914c4037073b2f3bd3483bc99c61f7e1c57f035b58c5f3d42 | ndmitchell/bake | BigString.hs |
module General.BigString(
BigString,
bigStringFromFile, bigStringFromText, bigStringFromString, bigStringFromByteString,
bigStringToFile, bigStringToText, bigStringToString, bigStringWithString, bigStringToByteString,
bigStringBackEnd, withBigStringPart
) where
import System.IO.Extra
import Contro... | null | https://raw.githubusercontent.com/ndmitchell/bake/967de648990e06fa1eb9a8fd629fcf155be5891f/src/General/BigString.hs | haskell | above this level, save to disk
-------------------------------------------------------------------
DEFINITION
-------------------------------------------------------------------
PRIMITIVES
1) must not use file after returning
-------------------------------------------------------------------
DERIVED
-------------... |
module General.BigString(
BigString,
bigStringFromFile, bigStringFromText, bigStringFromString, bigStringFromByteString,
bigStringToFile, bigStringToText, bigStringToString, bigStringWithString, bigStringToByteString,
bigStringBackEnd, withBigStringPart
) where
import System.IO.Extra
import Contro... |
838fbf94ad3624db5a2e14c12c9b840387bfa32dbcdf57e91cbdc31c62b74241 | lpw25/ocaml-typed-effects | opttoploop.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/toplevel/opttoploop.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Path
open Format
open Config
open... |
2fbca54177526376a1e19cde3060a0f5646a8704fee3e67019572b89adcb4873 | heechul/crest-z3 | check.mli |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... | null | https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/check.mli | ocaml | Checks the well-formedness of the file. Prints warnings and
* returns false if errors are found
Do not check that the global ids have the proper
* hash value
* Ignore the specified instructions |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... |
e49f985ec4ff9bac1b83bf5cc384f4c90db9ae23f75743239374daf0605bf4f9 | typeclasses/assoc-list | test-with-hedgehog.hs | # LANGUAGE TemplateHaskell #
import Data.AssocList.ListLike.Concept
import qualified Data.AssocList.ListLike.Comparison
import qualified Data.AssocList.ListLike.Eq
import qualified Data.AssocList.ListLike.Equivalence
import qualified Data.AssocList.ListLike.Ord
import qualified Data.AssocList.ListLike.Predic... | null | https://raw.githubusercontent.com/typeclasses/assoc-list/c22ff8ba2057545015bccf24d71a14358b01627e/assoc-listlike/test/test-with-hedgehog.hs | haskell | base
contravariant
hedgehog
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | # LANGUAGE TemplateHaskell #
import Data.AssocList.ListLike.Concept
import qualified Data.AssocList.ListLike.Comparison
import qualified Data.AssocList.ListLike.Eq
import qualified Data.AssocList.ListLike.Equivalence
import qualified Data.AssocList.ListLike.Ord
import qualified Data.AssocList.ListLike.Predic... |
8909a98f047f8f649094f6533228fbe3fc12d6735aa432706bd574ae110a1288 | clojusc/friend-oauth2 | project.clj | (defproject clojusc/friend-oauth2 "0.2.1"
:description "OAuth2 workflow for Friend"
:url "-oauth2"
:license {
:name "MIT License"
:url "-license.org"}
:dependencies [
[org.clojure/data.json "0.2.6"]
[com.cemerick/friend "0.2.3"
:exclusions [org.apache.httpcomponents/httpclient]]
[ring ... | null | https://raw.githubusercontent.com/clojusc/friend-oauth2/ff92f80d7da529e9d77f74d613f38bef554f6134/project.clj | clojure | (defproject clojusc/friend-oauth2 "0.2.1"
:description "OAuth2 workflow for Friend"
:url "-oauth2"
:license {
:name "MIT License"
:url "-license.org"}
:dependencies [
[org.clojure/data.json "0.2.6"]
[com.cemerick/friend "0.2.3"
:exclusions [org.apache.httpcomponents/httpclient]]
[ring ... | |
fee6d3a1b6bc949b4b90c4f5fa8273f7694e9d0f07fc2aada3aa3c71911c1b60 | yomimono/stitchcraft | dMC.ml | let name = "DMC"
module Thread : sig
include Thread.S
val compare : t -> t -> int
end = struct
prose name ( e.g. " Lavender - VY DK " )
floss number ( except white & ecru )
rgb : RGB.t;
} [@@deriving yojson, eq]
let to_rgb t = t.rgb
let pp fmt t = Format.fprintf fmt "DMC %s: %s" t.... | null | https://raw.githubusercontent.com/yomimono/stitchcraft/6b57efa8a145541e976c9cb1f04ffde984b318bd/stitchy/lib/dMC.ml | ocaml | mappings from schemes/dmc.xml in kxstitch
black
ocaml orange
a light green
light gray
electric blue
dark gray-green
baby blue
darkish purple
whiter than white
pink
lighter, but still vibrant, red
dark green
lighter purple
yellow
navy
the ol' blueberry. it looks dark af in the screenshot... | let name = "DMC"
module Thread : sig
include Thread.S
val compare : t -> t -> int
end = struct
prose name ( e.g. " Lavender - VY DK " )
floss number ( except white & ecru )
rgb : RGB.t;
} [@@deriving yojson, eq]
let to_rgb t = t.rgb
let pp fmt t = Format.fprintf fmt "DMC %s: %s" t.... |
2e396cac93f9cb8ac6853403bd9f891687512d4242d2de64f6ce3fa6a5d82fb3 | brawnski/git-annex | Special.hs | common functions for special remotes
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Special where
import qualified Data.Map as M
import Data.Maybe
import Data.Stri... | null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Remote/Special.hs | haskell | Sets up configuration for a special remote in .git/config. | common functions for special remotes
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Special where
import qualified Data.Map as M
import Data.Maybe
import Data.Stri... |
db50f4ef98b0b066f5def004fb402451f8f5e941c37e7d2f9f506720292cf029 | luminus-framework/luminus-template | middleware.clj | (ns <<project-ns>>.middleware
(:require
[<<project-ns>>.env :refer [defaults]]<% if not service %>
[clojure.tools.logging :as log]
[<<project-ns>>.layout :refer [error-page]]
[ring.middleware.anti-forgery :refer [wrap-anti-forgery]]
[<<project-ns>>.middleware.formats :as formats]
[muuntaja.mid... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/7473c9b25b18d76a1d9c602b38f7257d75e4b11c/resources/leiningen/new/luminus/core/src/middleware.clj | clojure | If we're not inside a servlet environment
(for example when using mock requests), then
.getContextPath might not exist
if the context is not specified in the request
we check if one has been specified in the environment
instead
since they're not compatible with this middleware
support your local garbage collect... | (ns <<project-ns>>.middleware
(:require
[<<project-ns>>.env :refer [defaults]]<% if not service %>
[clojure.tools.logging :as log]
[<<project-ns>>.layout :refer [error-page]]
[ring.middleware.anti-forgery :refer [wrap-anti-forgery]]
[<<project-ns>>.middleware.formats :as formats]
[muuntaja.mid... |
f12edd8e4313cb4637104806e9148238d66f0031a65a97b5b34a8c95f48ca01d | alexandergunnarson/quantum | string.cljc | (ns
^{:doc "Useful string utils. Aliases clojure.string.
Includes squote (single-quote), sp (spaced),
val (reading a number of a string), keyword+
(for joining strings and keywords into one
keyword), etc."
:attribution "alexandergunnarson"}
quantum.core.string
(:refer-... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/string.cljc | clojure | ===== CHARS =====
===== WHOLE PREDICATES =====
Converts string to all upper-case respecting
the current system locale.
Converts string to all lower-case respecting
the current system locale.
===== PARTIAL PREDICATES =====
===== SPLIT/JOIN =====
TODO deprotocolize
TODO deprotocolize
a form of |concat| - "conc... | (ns
^{:doc "Useful string utils. Aliases clojure.string.
Includes squote (single-quote), sp (spaced),
val (reading a number of a string), keyword+
(for joining strings and keywords into one
keyword), etc."
:attribution "alexandergunnarson"}
quantum.core.string
(:refer-... |
7fb31e37cea2dcdb68d86f6ad79c3d93a83ecc947f79224b2c91352f6ef328a5 | mks-m/wower | content.erl | -module(content).
-export([char_create_info/2]).
-include("more_records.hrl").
%% @type race() = human | orc | dwarf | night_elf |
%% undead | tauren | gnome | troll |
%% blood_elf | draenei.
%% @type class() = warrior | paladin | hunter | rogue |
priest | | shaman |
%... | null | https://raw.githubusercontent.com/mks-m/wower/ce9724876cf57b67ce72f2a9a6f74bb1ebffd53a/realm/src/content.erl | erlang | @type race() = human | orc | dwarf | night_elf |
undead | tauren | gnome | troll |
blood_elf | draenei.
@type class() = warrior | paladin | hunter | rogue |
mage | warlock | druid.
TODO: find death knight start values | -module(content).
-export([char_create_info/2]).
-include("more_records.hrl").
priest | | shaman |
( ) , class ( ) ) - > tuple ( ) .
char_create_info(Race, Class) ->
CI1 = race_create_info(Race, #char_create_info{}),
CI2 = class_create_info(Class, CI1),
race_class_create_info(Race... |
be8f473ffde941bad6861c86f7e72c34f945fa1460defba789afe1611c1f5e7e | biocaml/biocaml | gff.mli | * GFF files .
Versions 2 and 3 are supported . The only difference is the
delimiter used for tag - value pairs in the attribute list : [ 3 ] uses
an equal sign , and [ 2 ] uses a space . Version [ 3 ] also has
additional requirements , e.g. the [ feature ] must be a sequence
ontology term... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/base/gff.mli | ocaml | * The items being output by the parser. | * GFF files .
Versions 2 and 3 are supported . The only difference is the
delimiter used for tag - value pairs in the attribute list : [ 3 ] uses
an equal sign , and [ 2 ] uses a space . Version [ 3 ] also has
additional requirements , e.g. the [ feature ] must be a sequence
ontology term... |
3a4a0bda05c8197d72f9bc4aeb06fb5fc222b8e19d3b953f8bea9e6f5ca6fea7 | ftzm/Hnefatafl | MovesAdapter.hs | ------------------------------------------------------------------------------
-- Functions for converting the board to representations that include labels
-- for selecting pieces and moves, and converting these labels into coordinates
-- to feed into board update functions.
--------------------------------------------... | null | https://raw.githubusercontent.com/ftzm/Hnefatafl/8e6240861c6afb5ee0e6b70160fd2daba520b4d9/src/Console/MovesAdapter.hs | haskell | ----------------------------------------------------------------------------
Functions for converting the board to representations that include labels
for selecting pieces and moves, and converting these labels into coordinates
to feed into board update functions.
----------------------------------------------------... |
module Console.MovesAdapter
( Tile(..)
, charToPieceMoves
, charToPieceMove
, labelBoardPieces
, labelBoardMoves
, viewBoard
) where
import Prelude hiding (lookup)
import Board (exportBoard, xyToInt, Coord, Board)
import Moves (SimpleMoves)
import Data.Map.Strict... |
dfcc5604554da0070d4aa83a7c786546b1ba722b2a9c5a299dccaa5f310805d8 | sbcl/sbcl | mips-vm.lisp | This file contains the MIPS specific runtime stuff .
;;;
(in-package "SB-VM")
(defun machine-type ()
"Returns a string describing the type of the local machine."
"MIPS")
(defun return-machine-address (scp)
(context-register scp lip-offset))
(define-alien-routine ("os_context_bd_cause" context-bd-cause-int)
... | null | https://raw.githubusercontent.com/sbcl/sbcl/f935a2c968a045ec79c75f19c68420e73db1cf53/src/code/mips-vm.lisp | lisp |
register. FORMAT is the type of float to return.
long is another question. This stuff still needs testing.
Given a signal context, return the floating point modes word in
the same format as returned by FLOATING-POINT-MODES.
Pick off invalid-arg-count here. Otherwise call the generic routine
FIXME: recognize the ... | This file contains the MIPS specific runtime stuff .
(in-package "SB-VM")
(defun machine-type ()
"Returns a string describing the type of the local machine."
"MIPS")
(defun return-machine-address (scp)
(context-register scp lip-offset))
(define-alien-routine ("os_context_bd_cause" context-bd-cause-int)
u... |
6f09babde1a22ea5329659814f144d61041b74adcc6573a750e70b0f4467c5ee | ytomino/headmaster | c_syntax_traversing.ml | open C_literals;;
open C_syntax;;
module type TraversingType = sig
module Literals: LiteralsType
module Syntax: SyntaxType
with module Literals := Literals
type 'a p = 'a Syntax.p
type 'a e = 'a Syntax.e
type 'a opt = 'a Syntax.opt
(* make opt version of fold_xxx *)
val opt: (('a -> 'b p -> 'a) -> 'a -> '... | null | https://raw.githubusercontent.com/ytomino/headmaster/6c52709c7355b6418d5094f2b96da168fe276bae/source/c_syntax_traversing.ml | ocaml | make opt version of fold_xxx
attribute_list
attribute_item_list
ia_argument_list
argument_expression_list
init_declarator_list
struct_declaration_list
specifier_qualifier_list
pointer
enumerator_list
type_qualifier_list
parameter_list
identifier_list
initializer_list
designator_list
block... | open C_literals;;
open C_syntax;;
module type TraversingType = sig
module Literals: LiteralsType
module Syntax: SyntaxType
with module Literals := Literals
type 'a p = 'a Syntax.p
type 'a e = 'a Syntax.e
type 'a opt = 'a Syntax.opt
val opt: (('a -> 'b p -> 'a) -> 'a -> 'c p -> 'a) ->
('a -> 'b p -> 'a) -... |
bac3e2114f3a13f8ec3595a13f527f5afc77059619ec9afa9900f16cd6846017 | jfeser/L2 | sstream.ml | open Core
include Stream
type 'a matrix = 'a list t
Concatenate two streams together . The second stream will not be
inspected until the first stream is exhausted .
inspected until the first stream is exhausted. *)
let concat s1 s2 =
from (fun _ ->
match peek s1 with
| Some _ -> Some (next s1)
... | null | https://raw.githubusercontent.com/jfeser/L2/a66659c7d75f75788c48a17b531045fb3d5f8351/lib/sstream.ml | ocaml | Map a function over a stream.
Map a function over a matrix.
Create an infinite stream of 'value'.
Create a finite stream of 'value' of length 'n'.
Get access to a stream of results for 'typ'. | open Core
include Stream
type 'a matrix = 'a list t
Concatenate two streams together . The second stream will not be
inspected until the first stream is exhausted .
inspected until the first stream is exhausted. *)
let concat s1 s2 =
from (fun _ ->
match peek s1 with
| Some _ -> Some (next s1)
... |
8db2426a1b1b16fdce64aebc9f703ec2cf7e0b0c85a100cf4ceafd4127e49125 | alexandergunnarson/quantum | convert.cljc | (ns quantum.untyped.core.convert
(:require
[clojure.string :as str]
[quantum.untyped.core.core :as ucore]
[quantum.untyped.core.error :as uerr]
[quantum.untyped.core.fn :as ufn]
[quantum.untyped.core.qualify
:refer [#?(:cljs DelimitedIdent) delim-ident? named?]]
[... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/core/convert.cljc | clojure | (ns quantum.untyped.core.convert
(:require
[clojure.string :as str]
[quantum.untyped.core.core :as ucore]
[quantum.untyped.core.error :as uerr]
[quantum.untyped.core.fn :as ufn]
[quantum.untyped.core.qualify
:refer [#?(:cljs DelimitedIdent) delim-ident? named?]]
[... | |
c2cc0130b748bf5d93a55f6fec7543e12b13b84d9745fe962ccb07b56a60e378 | zxymike93/SICP | 143.rkt | #lang sicp
;; 实现 repeated
(define (compose f g)
(lambda (x) (f (g x))))
(define (repeated f n)
(define (loop g count)
(if (= count 0)
(lambda (x) (g x))
(loop (compose f g) (- count 1))))
(loop (lambda (x) x) n))
;; tests
(define (inc x)
(+ x 1))
(define (square x)
(* x x))
(de... | null | https://raw.githubusercontent.com/zxymike93/SICP/74631ad72a202b440e55460d0ce9a2416952b0a8/chapter1/143.rkt | racket | 实现 repeated
tests | #lang sicp
(define (compose f g)
(lambda (x) (f (g x))))
(define (repeated f n)
(define (loop g count)
(if (= count 0)
(lambda (x) (g x))
(loop (compose f g) (- count 1))))
(loop (lambda (x) x) n))
(define (inc x)
(+ x 1))
(define (square x)
(* x x))
(define (cube x)
(* x x x... |
a86c85d986085b3b0991c9be2698c1f2b62fc780894cf6513fb80493527bfdf0 | exercism/babashka | project.clj | (defproject matching-brackets "0.1.0-SNAPSHOT"
:description "matching-brackets exercise."
:url "-brackets"
:dependencies [[org.clojure/clojure "1.10.0"]])
| null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/matching-brackets/project.clj | clojure | (defproject matching-brackets "0.1.0-SNAPSHOT"
:description "matching-brackets exercise."
:url "-brackets"
:dependencies [[org.clojure/clojure "1.10.0"]])
| |
71948abcf50ed63e8b87b18b51c657085a0ff783887a87402e4ba594575f7721 | zenhack/mule | constMap.ml | include MapSet.MkMap(Common_ast.Const)
| null | https://raw.githubusercontent.com/zenhack/mule/f3e23342906d834abb9659c72a67c1405c936a00/src/mule/lib/util/constMap.ml | ocaml | include MapSet.MkMap(Common_ast.Const)
| |
3cd11253eda1c6d51591888ce890f623dfb08b3f8c5e672d1b9a4401c915c6e3 | fizruk/tubes | Tubes.hs | module Tubes (
module Tubes.Bot,
module Tubes.Config,
module Tubes.Control,
module Tubes.Model,
module Tubes.Render,
run,
runWithBots,
) where
import Tubes.Bot
import Tubes.Config
import Tubes.Control
import Tubes.Model
import Tubes.Render
import Control.Concurrent.STM
import Graphics.Gloss.Interface.P... | null | https://raw.githubusercontent.com/fizruk/tubes/d56b619eef2573d7cdca28d5929a1a7a4119fbcf/src/Tubes.hs | haskell | module Tubes (
module Tubes.Bot,
module Tubes.Config,
module Tubes.Control,
module Tubes.Model,
module Tubes.Render,
run,
runWithBots,
) where
import Tubes.Bot
import Tubes.Config
import Tubes.Control
import Tubes.Model
import Tubes.Render
import Control.Concurrent.STM
import Graphics.Gloss.Interface.P... | |
1964ff45b0df3353ff5ce5675952e1b28d51eefa142b7140c0bc575f46b7fccb | b0-system/b0 | b00_vcs.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2019 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b00/kit/b00_vcs.ml | ocaml | Commits
Working directory
Tags
Git support
that seems to be returned on bare repos
for bare repos
Commits
Working directory
Tags
Hg support
Commits
hg order is reverse from git
Working directory
Tags
sic
Finding reposistories
Commits
Working directory
Tags
Git specific
Branches ... | ---------------------------------------------------------------------------
Copyright ( c ) 2019 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
04c660f60048f5d9d2babe7a508e353d3c033c4ce2b8058ef68e5b8c0683c531 | jarohen/advent-of-code | day10.clj | (ns advent-of-code.day10
(:require [clojure.string :as s]))
(def input
"225,171,131,2,35,5,0,13,1,246,54,97,255,98,254,110")
(defn rotate [knot {:keys [knot-size pos length]}]
(let [after-length (- knot-size length)
[before after] (->> (cycle knot)
(drop pos)
... | null | https://raw.githubusercontent.com/jarohen/advent-of-code/3fa1d87a539fb9163b05b732973bbd415dd21312/2017/src/advent_of_code/day10.clj | clojure | (ns advent-of-code.day10
(:require [clojure.string :as s]))
(def input
"225,171,131,2,35,5,0,13,1,246,54,97,255,98,254,110")
(defn rotate [knot {:keys [knot-size pos length]}]
(let [after-length (- knot-size length)
[before after] (->> (cycle knot)
(drop pos)
... | |
76aa95099dc3d46000dfde90a5c42cb8b979bdfcc93f6825765a1df01bf4a9b9 | rpav/cl-cairo2 | run-demo.lisp | (in-package :cairo-demo)
(defun run (demo-name &key (output-file "cairo-demo.png") (w 300) (h 300))
"Run DEMO-NAME on an image surface of WxH. Output is a PNG file, written
to OUTPUT-FILE.
DEMO-NAME should refer to a function which takes (WIDTH HEIGHT SURFACE)."
(let ((surface (cairo:create-image-surface :argb32... | null | https://raw.githubusercontent.com/rpav/cl-cairo2/41ae45aac86553c46f4bb460f80e1fb620930f5b/demos/run-demo.lisp | lisp | (in-package :cairo-demo)
(defun run (demo-name &key (output-file "cairo-demo.png") (w 300) (h 300))
"Run DEMO-NAME on an image surface of WxH. Output is a PNG file, written
to OUTPUT-FILE.
DEMO-NAME should refer to a function which takes (WIDTH HEIGHT SURFACE)."
(let ((surface (cairo:create-image-surface :argb32... | |
b8682f534b9c23953dc6cdddc40c99ab131973c1c0bb5de8ca5d2a16016bf7e4 | quoll/asami | encoder.cljs | (ns ^{:doc "Encodes and decodes data for storage. ClojureScript implementation"
:author "Paula Gearon and Joel Holdbrooks"}
asami.durable.encoder
(:require [clojure.string :as s])
(:import [goog.math Long Integer]
[goog Uri]))
;; (set! *warn-on-reflection* true)
(def ^{:private true} LONG_BYT... | null | https://raw.githubusercontent.com/quoll/asami/1194563a030dc1adb596bcb788e4ee798bb39e82/src/asami/durable/encoder.cljs | clojure | (set! *warn-on-reflection* true)
4 & 5 are reserved for http and https URLs | (ns ^{:doc "Encodes and decodes data for storage. ClojureScript implementation"
:author "Paula Gearon and Joel Holdbrooks"}
asami.durable.encoder
(:require [clojure.string :as s])
(:import [goog.math Long Integer]
[goog Uri]))
(def ^{:private true} LONG_BYTES 8)
(defn byte-array [size-or-seq... |
1fa0fbd779e917e4443681ceef95d9cbeed02908b3abe4f51fdc2bf61c4ee117 | roelvandijk/numerals | CLM.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2B@ ] -
[ @ISO639 - 3@ ] clm
[ @Native name@ ]
[ @English name@ ]
[@ISO639-1@] -
[@ISO639-2B@] -
[@ISO639-3@] clm
[@Native name@] nəxʷsƛ̕ay̕əmúcən
[@English name@] Klallam
-}
module Text.Numeral.Language.C... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src/Text/Numeral/Language/CLM.hs | haskell | * Language entry
* Conversions
* Structure
* Bounds
------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2B@ ] -
[ @ISO639 - 3@ ] clm
[ @Native name@ ]
[ @English name@ ]
[@ISO639-1@] -
[@ISO639-2B@] -
[@ISO639-3@] clm
[@Native name@] nəxʷsƛ̕ay̕əmúcən
[@English name@] Klallam
-}
module Text.Numeral.Language.C... |
a9673c5dc316d504174d2120140d4a0c54f9e85f3a2e3d9d1ec60d751ade8173 | racket/htdp | check-satisfied7.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname check-satisfied7) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/tests/test-engine/check-satisfied7.rkt | racket | about the language level of this file in a form that our tools can easily process.
ASSUME: THIS FILE is IN ISL+
all these tests just work out fine
----------------------------------
runs fine, even if the predicate is defined below the check-satisfied test | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname check-satisfied7) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define (id x) x)
(check-satisfied 4 (id eve... |
79c9b0f76b715d024a83bc19b237e3f45cbeadf09d3e5e04c0e880b50e097ad6 | boxp/sorcerer | conf.clj | (ns sorcerer.infra.repository.conf
(:require [clojure.spec.alpha :as s]
[com.stuartsierra.component :as component]
[sorcerer.infra.client.github :as github]
[sorcerer.domain.entity.conf :as conf-entity]
[sorcerer.domain.entity.build :as build-entity]))
(s/def ::content... | null | https://raw.githubusercontent.com/boxp/sorcerer/38fa7706439c35613cba7e04d715f5340e8a404c/src/sorcerer/infra/repository/conf.clj | clojure | (ns sorcerer.infra.repository.conf
(:require [clojure.spec.alpha :as s]
[com.stuartsierra.component :as component]
[sorcerer.infra.client.github :as github]
[sorcerer.domain.entity.conf :as conf-entity]
[sorcerer.domain.entity.build :as build-entity]))
(s/def ::content... | |
27eb3bdbc3c10e79e23df3a2dabeaf56d581806b21f05cc296adf877c86987a2 | fetburner/Coq2SML | usage.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/toplevel/usage.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
print the usage on standard error
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let version ret =
Printf.pr... |
8c4695c1bf4c622b665827e950e303aa01fd622808c11f7200a692549683768e | ice1000/learn | flatten-a-tree.hs | module Flatten where
data Node a = Child a | Parent (Node a) a (Node a) deriving (Show, Eq)
data Tree a = Empty | Root (Node a) deriving (Show, Eq)
invert :: Tree a -> Tree a
invert Empty = Empty
invert (Root n) = Root (aux n)
where
aux (Child a) = Child a
aux (Parent l n r) = Parent (aux r) n (aux l)
--
s... | null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/flatten-a-tree.hs | haskell | module Flatten where
data Node a = Child a | Parent (Node a) a (Node a) deriving (Show, Eq)
data Tree a = Empty | Root (Node a) deriving (Show, Eq)
invert :: Tree a -> Tree a
invert Empty = Empty
invert (Root n) = Root (aux n)
where
aux (Child a) = Child a
aux (Parent l n r) = Parent (aux r) n (aux l)
size... | |
6b3e378fd7748999f13a50cf7f1f25b7153d0b6539f0da8b04cd5d206f17d0c5 | cxphoe/SICP-solutions | 2.21.rkt | (define (square x) (* x x))
(define (square-list-1 items)
(if (null? items)
nil
(cons (square (car items))
(square-list-1 (cdr items)))))
(define (square-list-2 items)
(map square items)) | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%202-Building%20Abstractions%20with%20Data/2.Hierarchical%20Data%20and%20the%20Closure%20Property/2.21.rkt | racket | (define (square x) (* x x))
(define (square-list-1 items)
(if (null? items)
nil
(cons (square (car items))
(square-list-1 (cdr items)))))
(define (square-list-2 items)
(map square items)) | |
4688e191624d50f903ca0f8edd30f0c5b6f84dcdf561b82d9e10d1b770b29f08 | mstksg/inCode | migrate-entries.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
import Cases
import Control.Exception
import Control.Monad
import Control.Monad.Trans.State
import Data.Default
import Data.Foldable
import Data.List
import Data.Maybe
import ... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/app/migrate-entries.hs | haskell | | SQL for getting the right format:
select
from entry
join slug
on slug.entry_id = entry.id
order by
entry.identifier, slug.id;
select
identifier, id
from entry
order by identifier; | # LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
import Cases
import Control.Exception
import Control.Monad
import Control.Monad.Trans.State
import Data.Default
import Data.Foldable
import Data.List
import Data.Maybe
import ... |
1c1bc6cef2dfa39ec6339ee2482584d601a2c7b4d99ad4a5b1521dd67c8dc331 | blak3mill3r/keenest-rube | request.clj | (ns rube.request
(:require
[clojure.data.json :as json]
[clojure.string :as str]
[byte-streams :as bs]
[manifold.stream :as s]
[manifold.deferred :as d]
[aleph.http :as http]
[clojure.core.async :as a :refer [<! >! <!! alts!! go go-loop timeout chan close!]]))
pretty much copied from clj - ku... | null | https://raw.githubusercontent.com/blak3mill3r/keenest-rube/bfd1ac9ca36cef4055bb49f108613871ce4c0b18/src/rube/request.clj | clojure | if the raw channel closes, close the return channel as well (the whole thing needs to be retried)
basic-auth (token username password)
continuously put parsed objects on the return channel as they arrive
put the parsed body on the return channel | (ns rube.request
(:require
[clojure.data.json :as json]
[clojure.string :as str]
[byte-streams :as bs]
[manifold.stream :as s]
[manifold.deferred :as d]
[aleph.http :as http]
[clojure.core.async :as a :refer [<! >! <!! alts!! go go-loop timeout chan close!]]))
pretty much copied from clj - ku... |
d882b2944863c757b7fba929ee4340efc975f988070c8c888f71029b4c26c3b5 | clojure-interop/java-jdk | DocumentBuilder.clj | (ns javax.xml.parsers.DocumentBuilder
"Defines the API to obtain DOM Document instances from an XML
document. Using this class, an application programmer can obtain a
Document from XML.
An instance of this class can be obtained from the
DocumentBuilderFactory.newDocumentBuilder() method. Once
an instance o... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/parsers/DocumentBuilder.clj | clojure | false otherwise. - `boolean`"
false otherwise. - `boolean`" | (ns javax.xml.parsers.DocumentBuilder
"Defines the API to obtain DOM Document instances from an XML
document. Using this class, an application programmer can obtain a
Document from XML.
An instance of this class can be obtained from the
DocumentBuilderFactory.newDocumentBuilder() method. Once
an instance o... |
8cc6b1c3ba59403c21092b74b81e09713daa8a43291c4f59542cacb2c1977b62 | Glue42/gateway-modules | ops.cljc | (ns gateway.common.context.ops
(:require [gateway.common.context.messages :as msg]
[gateway.constants :as c]
[gateway.common.messages :as m]
[gateway.common.context.state :as state]
[gateway.common.utilities :refer [state->]]
#?(:cljs [gateway.common.utiliti... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/878176077e134c715eb11d6071813dde243f1e93/common/src/gateway/common/context/ops.cljc | clojure | context permissioning
only members can write to an activity
normal context - permissions apply
operations
the context already exists, we should either reset its image or ignore the request
new context
swallow the exception since we cant send it back to the remote peer
the context already exists
new context
de... | (ns gateway.common.context.ops
(:require [gateway.common.context.messages :as msg]
[gateway.constants :as c]
[gateway.common.messages :as m]
[gateway.common.context.state :as state]
[gateway.common.utilities :refer [state->]]
#?(:cljs [gateway.common.utiliti... |
8f786190fbf2dda319e049de4f1ff68105827c77935469691b8c92f1a3ec847d | learnuidev/patu | flappy.cljs | (ns patu.examples.flappy
(:require
[clojure.repl :refer [doc]]
Main Libs ( 5 ) = = =
[patu.core :as p]
[patu.components :as c] ;; Component Helpers
[patu.events :refer [reg-event dispatch dispatch-n]])) ;; Event System))
;; 0 Constants
(def pipe-open 80);
(def pipe-min-height ... | null | https://raw.githubusercontent.com/learnuidev/patu/38d9ccff4c96b3c1475c3baf08507a4673af7f22/src/patu/examples/flappy.cljs | clojure | Component Helpers
Event System))
0 Constants
2 Load Game Assets
Events ===
"give it tags to easier define behaviors see below"
"raw table just assigns every field to the game obj"
4.2 Scene Event Handler | (ns patu.examples.flappy
(:require
[clojure.repl :refer [doc]]
Main Libs ( 5 ) = = =
[patu.core :as p]
(def pipe-min-height 16)
(def jump-force 320)
(def speed 120)
(def ceiling -60)
1 Initialize the game
(dispatch [:init {:canvas (js/document.getElementById "app")
:global true
... |
ae85f497ea387490a7913f01b9dde9fb67551e0170eab6bf67becdf551cbb48f | launchdarkly/erlang-server-sdk | ldclient_storage_map_sup.erl | %%-------------------------------------------------------------------
%% @doc `ldclient_storage_map_sup' module
@private
%% This is a supervisor for map storage worker.
%% @end
%%-------------------------------------------------------------------
-module(ldclient_storage_map_sup).
-behaviour(supervisor).
%% Superv... | null | https://raw.githubusercontent.com/launchdarkly/erlang-server-sdk/fabbcae4953020a0c93bce99e80c1729ebd447d5/src/ldclient_storage_map_sup.erl | erlang | -------------------------------------------------------------------
@doc `ldclient_storage_map_sup' module
This is a supervisor for map storage worker.
@end
-------------------------------------------------------------------
Supervision
Helper macro for declaring children of supervisor
============================... | @private
-module(ldclient_storage_map_sup).
-behaviour(supervisor).
-export([start_link/3, init/1]).
-define(CHILD(Id, Module, Args, Type), {Id, {Module, start_link, Args}, permanent, 5000, Type, [Module]}).
-spec start_link(SupRegName :: atom(), WorkerRegName :: atom(), Tag :: atom()) ->
{ok, Pid :: pid()}... |
d22799a87acc094af9087567537d102674b3c88e29af7aa9a924de42b703d02e | josefs/Gradualizer | gradualizer_prelude_parse_trans.erl | @private
-module(gradualizer_prelude_parse_trans).
This file is compiled first and used for compiling other files ,
%% so no dependencies to other modules within the application.
-export([parse_transform/2, get_module_forms_tuples/1]).
-type form() :: erl_parse:abstract_form() | {error, _} | {eof, _}.
-type form... | null | https://raw.githubusercontent.com/josefs/Gradualizer/05e274ab924a75fe68ab3aff88a4d4765ef121d1/src/gradualizer_prelude_parse_trans.erl | erlang | so no dependencies to other modules within the application.
Replaces the function body of get_modules_and_forms/0
Parses and returns the forms of a file along with the module given in the -module attribute | @private
-module(gradualizer_prelude_parse_trans).
This file is compiled first and used for compiling other files ,
-export([parse_transform/2, get_module_forms_tuples/1]).
-type form() :: erl_parse:abstract_form() | {error, _} | {eof, _}.
-type forms() :: [form()].
-include("gradualizer.hrl").
parse_transform... |
e62ac30a4b6af31dacc5de10c96b379521c2fdfcd3a72ff4ffaec7e7c31eb50e | qiao/sicp-solutions | 2.24.scm | = > ( 1 ( 2 ( 3 4 ) ) )
;; [*][*]--->[*][/]
| |
;; v v
[ 1 ] [ * ] [ * ] --->[*][/ ]
;; | |
;; v v
[ 2 ] [ * ] [ * ] --->[*][/ ]
;; | |
;; v v
... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.24.scm | scheme | [*][*]--->[*][/]
v v
| |
v v
| |
v v
/ \
/ \
/ \ | = > ( 1 ( 2 ( 3 4 ) ) )
| |
[ 1 ] [ * ] [ * ] --->[*][/ ]
[ 2 ] [ * ] [ * ] --->[*][/ ]
[ 3 ] [ 4 ]
( list 1 ( list 2 ( list 3 4 ) ) )
1 ( list 2 ( list 3 4 ) )
2 ( list 3 4 )... |
f7581621dab8270b0ec2088967b76e84ace0e3a47ad28e6326b3cfdaea172d84 | commercialhaskell/stack | Main.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- | Main Stack tool entry point.
module Main (main) where
import BuildInfo
import Conduit ( runConduitRes, sourceLazy, sinkFileCautious )
import ... | null | https://raw.githubusercontent.com/commercialhaskell/stack/dc417b83f39d1661ec39e827f218e8f9cb3f4308/src/main/Main.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
| Main Stack tool entry point.
| Type representing exceptions thrown by functions in the "Main" module.
module.
library-profiling' and \
executable-profiling' flags. See:" <+>
Line buffer the output by default, particularly for non-terminal runs.
Se... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE GADTs #
module Main (main) where
import BuildInfo
import Conduit ( runConduitRes, sourceLazy, sinkFileCautious )
import Data.Attoparsec.Args ( EscapingMode (Escaping), parseArgs )
import Data.Attoparsec.Interpreter ( ... |
8db99aee5240c4d1727f5b4609a699ddc9953e4483709c81b63353e22caf38ee | narkisr-deprecated/core | jobs.clj | (ns re-core.integration.es.jobs
"Done jobs persistency"
(:require
[es.jobs :as jobs]
[es.common :as es]
[clojurewerkz.elastisch.query :as q]
[re-core.security :refer (set-user)]
[re-core.fixtures.data :refer (redis-ec2-spec)]
[re-core.fixtures.core :refer (with-conf)]
[re-core.fixtures.populate ... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/test/re_core/integration/es/jobs.clj | clojure | (ns re-core.integration.es.jobs
"Done jobs persistency"
(:require
[es.jobs :as jobs]
[es.common :as es]
[clojurewerkz.elastisch.query :as q]
[re-core.security :refer (set-user)]
[re-core.fixtures.data :refer (redis-ec2-spec)]
[re-core.fixtures.core :refer (with-conf)]
[re-core.fixtures.populate ... | |
bf3ae5e3990ebebe2ab3447ed418674d163d43f8a1a8e481027ef1a1660f2081 | simplegeo/erlang | timer_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/timer_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(timer_SUITE).
-export([all/1]).
-e... |
4fd8b433f282a8ddddd5dfc7e63a562734349c8ea02ca4a1e407aee47b785e99 | anton-k/reader-pattern-servant-app | Time.hs | -- | init time service
module App.DI.Time
( initTime
) where
import Data.Time
import DI.Time
import Types
initTime :: Url -> IO Time
initTime _url = do
pure $ Time
{ now = getCurrentTime
}
| null | https://raw.githubusercontent.com/anton-k/reader-pattern-servant-app/a0a44de8c789e64da30686eb1d896e36b88cd1b7/app/App/DI/Time.hs | haskell | | init time service | module App.DI.Time
( initTime
) where
import Data.Time
import DI.Time
import Types
initTime :: Url -> IO Time
initTime _url = do
pure $ Time
{ now = getCurrentTime
}
|
d296593778521b3472c8fce989197c456b141b370ae91fd2e2f9d91312d02336 | pavlobaron/ErlangOTPBookSamples | macros3.erl | -module(macros3).
-export([print/1]).
-define(PRINT(X), string:concat(string:concat(??X, " = "), integer_to_list(X))).
print(0) ->
?PRINT(0);
print(1) ->
?PRINT(1 + 2);
print(XYZ) ->
?PRINT(XYZ).
| null | https://raw.githubusercontent.com/pavlobaron/ErlangOTPBookSamples/50094964ad814932760174914490e49618b2b8c2/sprache/macros3.erl | erlang | -module(macros3).
-export([print/1]).
-define(PRINT(X), string:concat(string:concat(??X, " = "), integer_to_list(X))).
print(0) ->
?PRINT(0);
print(1) ->
?PRINT(1 + 2);
print(XYZ) ->
?PRINT(XYZ).
| |
8d90a35e24bc5ca50c25328221931bc50abb0bcfb66fcd598aee49946a62acc5 | ucsd-progsys/liquidhaskell | RefSplit.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Language.Haskell.Liquid.Transforms.RefSplit (
splitXRelatedRefs
) where
import Prelude hiding (error)
import Data.List (partition)
import Text.PrettyPrint.HughesPJ
import Language.Haskell.Li... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/2ead75f10a7dc664186828a6299e99f26042e754/src/Language/Haskell/Liquid/Transforms/RefSplit.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Language.Haskell.Liquid.Transforms.RefSplit (
splitXRelatedRefs
) where
import Prelude hiding (error)
import Data.List (partition)
import Text.PrettyPrint.HughesPJ
import Language.Haskell.Li... | |
111afd0ed774644037dc02971bd3ca83e7721f1bb7c019015d43e2272656723d | jeromesimeon/Galax | cursor_descendant.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/dm/cursor_descendant.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : cursor_descendant.ml , v 1.4 2007/02/01 22:08:46 simeon Exp $
open Error
open Cursor
open Cursor_context
open Dm_types
let rec next_descendant access_ops cursor_context =
let current_cursor = get_current_cursor cursor_context ... |
075535024e4ccfe0c3e2f737783ae4e07b477e52d5ab4d887af59a10456e861b | avsm/platform | rresult.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/rresult.0.6.0%2Bdune/src/rresult.mli | ocaml | * The type for results.
* Result value combinators.
* The type for results.
* [ok v] is [Ok v].
* [error e] is [Error e].
* [reword_error reword r] is:
{ul
{- [r] if [r = Ok v]}
{- [Error (reword e)] if [r = Error e]}}
* [get r] is [v] if [r = Ok v] and @raise Invalid_argument otherwise.
* [get... | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
8ae58fe7954c5055d892619292c6c5ca5e58ac664c1335e8785fe95026ce982f | morphismtech/squeal | Table.hs | |
Module : Squeal . PostgreSQL.Query . Table
Description : intermediate table expressions
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
intermediate table expressions
Module: Squeal.PostgreSQL.Query.Table
Description: intermediate table expressions
Copyright: (c) Eitan Chatav, 2019
Ma... | null | https://raw.githubusercontent.com/morphismtech/squeal/22f6aac13eeaae9ea6a664e1eccefad6b85831c3/squeal-postgresql/src/Squeal/PostgreSQL/Query/Table.hs | haskell | * Table Expression
* Grouping
* Row Locks
$setup
>>> import Squeal.PostgreSQL
----------------------------------------
Table Expressions
----------------------------------------
| A `TableExpression` computes a table. The table expression contains
a `fromClause` that is optionally followed by a `whereClause`,
`... | |
Module : Squeal . PostgreSQL.Query . Table
Description : intermediate table expressions
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
intermediate table expressions
Module: Squeal.PostgreSQL.Query.Table
Description: intermediate table expressions
Copyright: (c) Eitan Chatav, 2019
Ma... |
0ac1064fbea0d1588782e1d087aff8abda90e6575935829bf0804639df51a0d5 | ricardobcl/DottedDB | dotted_db_get_fsm.erl | %% @doc The coordinator for stat get operations. The key here is to
generate the preflist just like in wrtie_fsm and then query each
%% replica and wait until a quorum is met.
-module(dotted_db_get_fsm).
-behavior(gen_fsm).
-include("dotted_db.hrl").
%% API
-export([start_link/4]).
%% Callbacks
-export([init/1, co... | null | https://raw.githubusercontent.com/ricardobcl/DottedDB/e3b96a9ec77439af90f94a80b875a01732c1425e/src/dotted_db_get_fsm.erl | erlang | @doc The coordinator for stat get operations. The key here is to
replica and wait until a quorum is met.
API
Callbacks
Unique request ID.
The key to read.
The replica nodes for the key.
Do read repair on outdated replica nodes.
Return the final value or not
The current Object to return.
The timeout value fo... | generate the preflist just like in wrtie_fsm and then query each
-module(dotted_db_get_fsm).
-behavior(gen_fsm).
-include("dotted_db.hrl").
-export([start_link/4]).
-export([init/1, code_change/4, handle_event/3, handle_info/3,
handle_sync_event/4, terminate/3]).
States
-export([execute/2, waiting/2, wa... |
748462547a494f5d9d585b7bf107d051689bc4407b8f581f4ef0717d1f15bc31 | MyDataFlow/ttalk-server | lager_config.erl | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/lager/src/lager_config.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
@doc Helper functions for work... | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
3d94a37deb2925ed6d888bb80c4a0de5e185116817f5dc54ab43dd473cd8d35f | rauschma/reasonml-demo-iterators | gen_intf.ml |
(* This file is free software, part of gen. See file "license" for more details. *)
* { 1 Common signature for transient and restartable generators }
The signature { ! S } abstracts on a type [ ' a t ] , where the [ t ] can be
the type of transient or restartable generators . Some functions specify
... | null | https://raw.githubusercontent.com/rauschma/reasonml-demo-iterators/d69ff758cb0f159814d60ad76157dffba3e14634/src/lib/gen/gen_intf.ml | ocaml | This file is free software, part of gen. See file "license" for more details.
* Empty generator, with no elements
* Repeat same element endlessly
* [iterate x f] is [[x; f x; f (f x); f (f (f x)); ...]]
* Dual of {!fold}, with a deconstructing operation. It keeps on
unfolding the ['b] value into a new ['b], ... |
* { 1 Common signature for transient and restartable generators }
The signature { ! S } abstracts on a type [ ' a t ] , where the [ t ] can be
the type of transient or restartable generators . Some functions specify
explicitely that they use [ ' a gen ] ( transient generators ) .
The signature... |
bde653e8655cec1bb3d5148e7e224b5ebf3468ff86299a77f87a1699d576b752 | pink-gorilla/goldly | tick.cljs | (ns page.tick
(:require
[clojure.string :as str]
[tick.core :as t]
[tick.goldly :refer [dt-format]]
[goldly.page :as page]
[layout]
[cljs-libs.helper :refer [#_add-page-test test-header]]))
(defn tick-body []
[:div
[:h1.text-2xl.text-red-600.m-5 "goldly-test"]
[:p "blank? " (str (str/blank?... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/a0cb304f10ce23015986378eb40c11b9c683ae84/goldly-test/src/demo/page/tick.cljs | clojure |
[:div "header"] | (ns page.tick
(:require
[clojure.string :as str]
[tick.core :as t]
[tick.goldly :refer [dt-format]]
[goldly.page :as page]
[layout]
[cljs-libs.helper :refer [#_add-page-test test-header]]))
(defn tick-body []
[:div
[:h1.text-2xl.text-red-600.m-5 "goldly-test"]
[:p "blank? " (str (str/blank?... |
5c004455d65f66b3f120f9237f5fbcc3dd92e96386d38ff66fa792eb632894df | tomlokhorst/AwesomePrelude | Renamer.hs | module Compiler.Renamer (renameNamedDefinitions) where
import Compiler.Raw
import Control.Arrow
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Reify as R
renameNamedDefinitions :: Kleisli IO (R.Graph ExprF) Graph
renameNamedDefinitions = arr $ \(R.Graph xs r) ->
let strings = map (\(u, tu) ... | null | https://raw.githubusercontent.com/tomlokhorst/AwesomePrelude/c06fc73e1489aecdd3556b0395d427065245efee/src/Compiler/Unused/Renamer.hs | haskell | module Compiler.Renamer (renameNamedDefinitions) where
import Compiler.Raw
import Control.Arrow
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Reify as R
renameNamedDefinitions :: Kleisli IO (R.Graph ExprF) Graph
renameNamedDefinitions = arr $ \(R.Graph xs r) ->
let strings = map (\(u, tu) ... | |
08e74b5dc5b2279aae5edf02ab14f42adf63a9f939272c914184f90c64b60044 | Andromedans/andromeda | context.ml | (** The typing context *)
Type - checking assigns identifiers to types and operations , as these can be
statically determined . It can not do so for TT constructors and ML values ,
because they are computed at runtime .
For the moment we do not assign identifiers to modules because we never
comp... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/typing/context.ml | ocaml | * The typing context |
Type - checking assigns identifiers to types and operations , as these can be
statically determined . It can not do so for TT constructors and ML values ,
because they are computed at runtime .
For the moment we do not assign identifiers to modules because we never
compare modules .
statica... |
eedc56e2478a083db01eeb5cbf04134788fe329c6c25e310fa2066c44ba58acc | ptaoussanis/tufte | tufte.cljc | (ns taoensso.tufte
"A simple, fast, monitoring profiler for Clojure/Script.
Usage: wrap+name interesting body exprs with the `p` macro. Then activate
profiling of these wrapped exprs using the `profiled` or `profile` macros:
Returns [ < body - result > < ? > ]
(profile {} (p :my-fn (my-fn))) ; Returns ... | null | https://raw.githubusercontent.com/ptaoussanis/tufte/fe85ac8b40a390b6e8d82ebf37b63f4e66cafd48/src/taoensso/tufte.cljc | clojure | Returns <body-result>, dispatches
Core API
e.g. `(p ::my-pid (do-work))`
Level filtering
Terminology note: we distinguish between call/form and min levels to ensure
that it's always possible to set min-level > any call-level to disable profiling.
Namespace filtering
Terminology note: we distinguish loosely bet... | (ns taoensso.tufte
"A simple, fast, monitoring profiler for Clojure/Script.
Usage: wrap+name interesting body exprs with the `p` macro. Then activate
profiling of these wrapped exprs using the `profiled` or `profile` macros:
Returns [ < body - result > < ? > ]
? to any registered handlers .
Extensive f... |
33adcaf4c0210c630d7d2339f5982b5a12715d7eb70c230f610f55a94678316a | appleshan/cl-http | package.lisp | -*- Syntax : Ansi - Common - Lisp ; Base : 10 ; Mode : lisp ; Package : cl - user ; -*-
( C ) Copyright 1996 , Massachusetts Institute of Technology
;;; All Rights Reserved.
;;;
;;;
;;;
;;;-------------------------------------------------------------------
;;;
;;; BASIC PRESENTATION SYSTEM FOR THE WORLD-W... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/w3p/package.lisp | lisp | Base : 10 ; Mode : lisp ; Package : cl - user ; -*-
All Rights Reserved.
-------------------------------------------------------------------
BASIC PRESENTATION SYSTEM FOR THE WORLD-WIDE WEB
advise the lisp environment of the presence of W3P
classes
symbols
functions and macros
presentation-generic-functi... |
( C ) Copyright 1996 , Massachusetts Institute of Technology
(in-package :cl-user)
(pushnew :w3p *features*)
(defpackage www-present
(:use future-common-lisp)
(:nicknames w3p)
(:export
"HTML-VIEW"
"PRESENTATION-TYPE"
"TEXTUAL-VIEW"
"VIEW"
"TYPE-KEY"
"PARAMETERS"
"CAL... |
8e45282fb0dfca176f61441b97a8e87dec9edf60f605f13ea2a16ea8188a4e34 | boomerang-lang/boomerang | balign.ml | (******************************************************************************)
The Harmony Project
(******************************************************************************)
Copyright ( C ) 2007 and ... | null | https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/lib/balign.ml | ocaml | ****************************************************************************
****************************************************************************
This library is free software; you can redistribute it and/or
modify it u... | The Harmony Project
Copyright ( C ) 2007 and
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later ... |
057326899dafa9a652f67422e1b0797a9096ce80029649ee0290862d3135717a | expipiplus1/vulkan | SamplerReductionMode.hs | {-# language CPP #-}
No documentation found for Chapter " "
module Vulkan.Core12.Enums.SamplerReductionMode (SamplerReductionMode( SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE
, SAMPLER_REDUCTION_MODE_MIN
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Core12/Enums/SamplerReductionMode.hs | haskell | # language CPP #
| VkSamplerReductionMode - Specify reduction mode for texture filtering
= See Also
<-extensions/html/vkspec.html#VK_EXT_sampler_filter_minmax VK_EXT_sampler_filter_minmax>,
| 'SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE' specifies that texel values
are combined by computing a weighted average of val... | No documentation found for Chapter " "
module Vulkan.Core12.Enums.SamplerReductionMode (SamplerReductionMode( SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE
, SAMPLER_REDUCTION_MODE_MIN
... |
20179279c77134718acb1126ebfacdd449d3f6b5cf7be0ec2d62707517d4d33c | quil-lang/quilc | candidate-generation.lisp | ;;;; src/discrete/rz-approx/candidate-generation.lisp
;;;;
Author :
(cl:in-package #:cl-quil.discrete/rz-approx)
;;; Implements the candidate generation portion of the algirithm described in
;;; arXiv:1212.6253v2. Note that a different candidate generation technique can
;;; be implemented using arXiv:1403.2975.
... | null | https://raw.githubusercontent.com/quil-lang/quilc/e04c4d3fb9b7b1028ab7faaff1a3bf692dcb3d44/src/discrete/rz-approx/candidate-generation.lisp | lisp | src/discrete/rz-approx/candidate-generation.lisp
Implements the candidate generation portion of the algirithm described in
arXiv:1212.6253v2. Note that a different candidate generation technique can
be implemented using arXiv:1403.2975.
if x = ⌊x⌋ = ⌈x⌉ then c ≄ x and c-1 = x = ⌊x⌋
c-1 ≤ x < c ⇔ c = ⌊x⌋ + 1
(σ ... | Author :
(cl:in-package #:cl-quil.discrete/rz-approx)
(coalton-toplevel
(declare encapsulating-half-open-unit-interval
((Root2plex Fraction) -> Integer))
(define (encapsulating-half-open-unit-interval a)
"Given a point A/B = x∈ℝ, find c∈ℤ s.t. c-1≤x<c. See Eq (20) and (21)
in (arXiv:1212.6253... |
fb64706aa5a82d9340dc56c540bf281c5e997da25b83fff2b517730713615293 | janestreet/universe | cparser.ml | Parser for directives in C - like syntax , rewriting them into extensions ,
like ones we would get from parsing OCaml file .
like ones we would get from parsing OCaml file.
*)
open Ppxlib
module Parsing = Caml.Parsing
type lexer = Lexing.lexbuf -> Parser.token
(* +--------------------------------------... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_optcomp/src/cparser.ml | ocaml | +---------------------------------------------------------------+
| Parsing of directives |
+---------------------------------------------------------------+ | Parser for directives in C - like syntax , rewriting them into extensions ,
like ones we would get from parsing OCaml file .
like ones we would get from parsing OCaml file.
*)
open Ppxlib
module Parsing = Caml.Parsing
type lexer = Lexing.lexbuf -> Parser.token
let located x lexbuf =
{ Location.
... |
ab1fe2c29506c76b567c4f88caebe40c8c3aed3614724d1462158ef1be8f019f | monadbobo/ocaml-core | core_int.mli | include Int_intf.S with type t = int
val of_int : int -> t
val to_int : t -> int
val of_int32 : int32 -> t option
val to_int32 : t -> int32 option
val of_int64 : int64 -> t option
val of_int64_exn : int64 -> t
val of_nativeint : nativeint -> t option
val to_nativeint : t -> nativeint
module Infix : sig
* mod and div ... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/core_int.mli | ocaml | * float division of integers | include Int_intf.S with type t = int
val of_int : int -> t
val to_int : t -> int
val of_int32 : int32 -> t option
val to_int32 : t -> int32 option
val of_int64 : int64 -> t option
val of_int64_exn : int64 -> t
val of_nativeint : nativeint -> t option
val to_nativeint : t -> nativeint
module Infix : sig
* mod and div ... |
5f7bd9c05cc01d67b0ce218e66445e8daf8d824440c1582630985dc4d41bf0df | kafka4beam/kflow | kflow_pipe.erl | %%%-------------------------------------------------------------------
( C ) 2019 , Klarna Bank AB
%%% @doc This module implements interface towards pipe.
%%%
%%% <i>Note:</i>It does not require starting `kflow' root supervisor,
%%% so it can be reused in other applications.
%%%
%%% @end
%%%-------------------------... | null | https://raw.githubusercontent.com/kafka4beam/kflow/2c44379a2934385a17fb504e7a933c859da7ab06/src/framework/kflow_pipe.erl | erlang | -------------------------------------------------------------------
@doc This module implements interface towards pipe.
<i>Note:</i>It does not require starting `kflow' root supervisor,
so it can be reused in other applications.
@end
-------------------------------------------------------------------
API
Intern... | ( C ) 2019 , Klarna Bank AB
-module(kflow_pipe).
-behavior(gen_statem).
-include("kflow_int.hrl").
-include_lib("hut/include/hut.hrl").
-export([start_link/1, stop/1]).
-export([desugar_node_spec/1]).
-export([callback_mode/0, init/1, terminate/3]).
-export([handle_event/4]).
-type entrypoint() :: fun((kflow:... |
a4cf8ab9792bcff1cd77b2e2383d8cf8c2a7ec68f608ad16740f68646d9a68a8 | ice1000/learn | sum-list-values.hs | module SumList where
import Prelude hiding (sum)
sumList :: [Integer] -> Integer
sumList [ ] = 0
sumList (a : b) = (+) a $ sumList b
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/sum-list-values.hs | haskell | module SumList where
import Prelude hiding (sum)
sumList :: [Integer] -> Integer
sumList [ ] = 0
sumList (a : b) = (+) a $ sumList b
| |
0bbc2daae66512734c801c5f5277399b20cb435159af1d1f86e0d19aa903efbf | cram2/cram | gaussian.lisp | Gaussian distribution
, Sun Jul 16 2006 - 22:09
Time - stamp : < 2010 - 01 - 17 10:19:46EST gaussian.lisp >
;;
Copyright 2006 , 2007 , 2008 , 2009
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms ... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/random/gaussian.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Gaussian distribution
, Sun Jul 16 2006 - 22:09
Time - stamp : < 2010 - 01 - 17 10:19:46EST gaussian.lisp >
Copyright 2006 , 2007 , 2008 , 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundati... |
c7058035cdc626526a027f6a6c42980f738b7e74a45f22f742a888566ba8bc5b | haskell/cabal | GHCJS.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
# LANGUAGE CPP #
module Distribution.Simple.GHCJS (
getGhcInfo,
configure,
getInstalledPackages,
getInstalledPackagesMonitorFiles,
getPackageDBContents,
buildLib, buildFLib, buildExe,
... | null | https://raw.githubusercontent.com/haskell/cabal/ab24689731e9fb45efa6277f290624622a6c214f/Cabal/src/Distribution/Simple/GHCJS.hs | haskell | # LANGUAGE RankNTypes #
* Version-specific implementation quirks
-----------------------------------------------------------------------------
Configuring
runghcProgram' = runghcProgram {
programFindLocation = guessRunghcFromGhcjsPath ghcjsProg
}
addKnownProgram r... | # LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
# LANGUAGE CPP #
module Distribution.Simple.GHCJS (
getGhcInfo,
configure,
getInstalledPackages,
getInstalledPackagesMonitorFiles,
getPackageDBContents,
buildLib, buildFLib, buildExe,
replLib, replFLib, rep... |
0bc0a2d68715c438343b724a67017afe94702ed3def511f9b54e39eac4d846bc | roryk/bcbio.rnaseq | r.clj | (ns bcbio.qcsummary.r
(:require [bcbio.rnaseq.util :as util]
[clojure.java.shell :refer [sh]]
[clostache.parser :as stache]))
(def install-libraries-message
"There was an issue rendering the Rmarkdown file. You may need to install
the R libraries (see ) for instructions.
If you have d... | null | https://raw.githubusercontent.com/roryk/bcbio.rnaseq/66c629eb737c9a0096082d6683657bf9d89eb271/src/bcbio/qcsummary/r.clj | clojure | (ns bcbio.qcsummary.r
(:require [bcbio.rnaseq.util :as util]
[clojure.java.shell :refer [sh]]
[clostache.parser :as stache]))
(def install-libraries-message
"There was an issue rendering the Rmarkdown file. You may need to install
the R libraries (see ) for instructions.
If you have d... | |
eda496fd5710b275779b9b6208e504778553a82612f1690e8467b64750ea6ae0 | cbaggers/varjo | lambda-lists.lisp | (in-package :varjo.tests)
(5am:in-suite lambda-list-tests)
;;------------------------------------------------------------
;; Helper data
(add-external-function 'test-ll-0 '((x :int)) nil
'((* x x)))
;;------------------------------------------------------------
;; Tests
(5am:def-test lambda-l... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/tests/lambda-lists.lisp | lisp | ------------------------------------------------------------
Helper data
------------------------------------------------------------
Tests | (in-package :varjo.tests)
(5am:in-suite lambda-list-tests)
(add-external-function 'test-ll-0 '((x :int)) nil
'((* x x)))
(5am:def-test lambda-lists-0 (:suite lambda-list-tests)
(finishes-p
(compile-vert () :410 nil
(test-ll 10)
(v! 0 0 0 0))))
|
293d50093ceff08031f44357c6e8186d957d711fc8f98bbd0d77dd91a7a0d1da | malcolmreynolds/GSLL | autocorrelation.lisp | ;; Autocorrelation
, Sun Dec 31 2006 - 13:19
Time - stamp : < 2008 - 12 - 26 12:20:10EST autocorrelation.lisp >
$ Id$
(in-package :gsl)
To do : stride other than 1 when that information is availble from
;;; the vector.
(defmfun autocorrelation ((data vector) &optional mean)
(("gsl_stats" :type "_lag1_aut... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/statistics/autocorrelation.lisp | lisp | Autocorrelation
the vector.
Examples and unit test | , Sun Dec 31 2006 - 13:19
Time - stamp : < 2008 - 12 - 26 12:20:10EST autocorrelation.lisp >
$ Id$
(in-package :gsl)
To do : stride other than 1 when that information is availble from
(defmfun autocorrelation ((data vector) &optional mean)
(("gsl_stats" :type "_lag1_autocorrelation")
("gsl_stats" :typ... |
5aeb615ec82fc59bd807e249c38eec5a59629c75d057c5ca798c2b731f24a109 | ocsigen/js_of_ocaml | generate_closure.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/cb629335639c8e7ef9bda7745e7838c6c846664e/compiler/lib/generate_closure.ml | ocaml | make sure we have the latest version
Code.invariant (pc, blocks, free_pc); | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
936877fab268088749c32b9a35186a0e412e36daf320b7ae81713fa1c4a00cbd | falsetru/htdp | 41.3.3.scm | #lang racket
(provide
(struct-out child)
Carl
Bettina
Adam
Dave
Eva
Fred
Gustav
)
(define-struct child (name social father mother) #:mutable)
;; Oldest Generation:
(define Carl (make-child 'Carl 1926 false false))
(define Bettina (make-child 'Bettina 1926 false false))
;; Middle Generation:
(defin... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/41/41.3.3.scm | scheme | Oldest Generation:
Middle Generation:
Youngest Generation: | #lang racket
(provide
(struct-out child)
Carl
Bettina
Adam
Dave
Eva
Fred
Gustav
)
(define-struct child (name social father mother) #:mutable)
(define Carl (make-child 'Carl 1926 false false))
(define Bettina (make-child 'Bettina 1926 false false))
(define Adam (make-child 'Adam 1950 Carl Bettina))... |
71334ae31c8732ebff43b649db54a576f1b4936b8529e817c6ab0d20a7c6f8c4 | jkoppel/ecta | Evaluation.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Application.TermSearch.Evaluation
( runBenchmark
) where
import Control.Monad ( forM_ )
import Data.Time ( diffUTCTime
, getCurrentTime
... | null | https://raw.githubusercontent.com/jkoppel/ecta/865cf95fea1c875c2732991db6415d963c5d6189/src/Application/TermSearch/Evaluation.hs | haskell | # LANGUAGE OverloadedStrings #
let reducedNode = reduceFully filterNode | # LANGUAGE CPP #
module Application.TermSearch.Evaluation
( runBenchmark
) where
import Control.Monad ( forM_ )
import Data.Time ( diffUTCTime
, getCurrentTime
... |
c44ac9204009aa7385aadbd5f13676df4b57c9b7ea69a1f408f140dc04b64c2b | bitonic/tog | Synonyms.hs | module Tog.Term.Synonyms where
-- Useful type synonyms
------------------------------------------------------------------------
type Type t = t
type Term t = t
type Abs t = t
type Closed t = t
| null | https://raw.githubusercontent.com/bitonic/tog/0da3b6ec82ac1fa3ce91d7f9b683a8ddedfd732f/src/Tog/Term/Synonyms.hs | haskell | Useful type synonyms
---------------------------------------------------------------------- | module Tog.Term.Synonyms where
type Type t = t
type Term t = t
type Abs t = t
type Closed t = t
|
a3dab696335f80091ec5be88e00ae0f2343d070f4051f3da6b98fba19f2d936b | kakao/hbase-region-inspector | base.clj | (ns hbase-region-inspector.hbase.base)
(defn info->map
"Builds map from HRegionInfo"
[info]
{:encoded-name (.getEncodedName info)
; :table
:start-key (.getStartKey info)
:end-key (.getEndKey info)
:meta? (.isMetaRegion info)})
(defn load->map
"Builds map from RegionLoad"
[load]
... | null | https://raw.githubusercontent.com/kakao/hbase-region-inspector/333c4bddd4ed85cdc8b3d90138f2d1d0f32e275d/src/main/hbase_region_inspector/hbase/base.clj | clojure | :table
:store-uncompressed-size-mb | (ns hbase-region-inspector.hbase.base)
(defn info->map
"Builds map from HRegionInfo"
[info]
{:encoded-name (.getEncodedName info)
:start-key (.getStartKey info)
:end-key (.getEndKey info)
:meta? (.isMetaRegion info)})
(defn load->map
"Builds map from RegionLoad"
[load]
{:compacted-... |
410289b8cccbbe54cdd5246204689e46aac85e16d81466678523a3bb815fa3cc | mokus0/junkbox | Transcription.hs | {-# OPTIONS -fth #-}
- ` ` Transcription.hs ''
- ( c ) 2008
- ``Transcription.hs''
- (c) 2008 James Cook
-}
module Transcription where
add = [| \x y -> x + y |]
mult 0 = [| \y -> 0 |]
mult (n+1) = [| \y -> y + $(mult n) y |] | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Monads/Transcription.hs | haskell | # OPTIONS -fth # |
- ` ` Transcription.hs ''
- ( c ) 2008
- ``Transcription.hs''
- (c) 2008 James Cook
-}
module Transcription where
add = [| \x y -> x + y |]
mult 0 = [| \y -> 0 |]
mult (n+1) = [| \y -> y + $(mult n) y |] |
de64de02898006307ed455414008283b9d3962b648cd3b5fd512653f8b9e13d2 | metosin/reitit | pedestal.clj | (ns reitit.pedestal
(:require [io.pedestal.http :as http]
[io.pedestal.interceptor :as interceptor]
[io.pedestal.interceptor.chain :as chain]
[reitit.http]
[reitit.interceptor])
(:import (java.lang.reflect Method)
(reitit.interceptor Executor)))
;; TODO: v... | null | https://raw.githubusercontent.com/metosin/reitit/198cfda00d20093f3d7b3069e5e902835c396698/modules/reitit-pedestal/src/reitit/pedestal.clj | clojure | TODO: variadic
Public API
| (ns reitit.pedestal
(:require [io.pedestal.http :as http]
[io.pedestal.interceptor :as interceptor]
[io.pedestal.interceptor.chain :as chain]
[reitit.http]
[reitit.interceptor])
(:import (java.lang.reflect Method)
(reitit.interceptor Executor)))
(defn- ari... |
a96fbe3f533cb1a8aee92fe2b5f28dfc9efbf87a87294760407362b936b02f48 | clojure-goes-fast/clj-async-profiler | core_test.clj | (ns clj-async-profiler.core-test
(:require [clj-async-profiler.core :as sut]
[clojure.test :refer :all])
(:import java.net.URL))
(deftest basic-test
;; Check if agent can attach at all.
(sut/list-event-types)
;; Try profiling a little bit and verify that a file is created.
(sut/start {:event :i... | null | https://raw.githubusercontent.com/clojure-goes-fast/clj-async-profiler/f8264cd0bebd4beffa75300c4189cac0d57f1adf/test/clj_async_profiler/core_test.clj | clojure | Check if agent can attach at all.
Try profiling a little bit and verify that a file is created. | (ns clj-async-profiler.core-test
(:require [clj-async-profiler.core :as sut]
[clojure.test :refer :all])
(:import java.net.URL))
(deftest basic-test
(sut/list-event-types)
(sut/start {:event :itimer})
(reduce *' (range 1 100000))
(let [stacks-file (sut/stop {:generate-flamegraph? false})]
(... |
f35bacdd6644ec426cbf5ab2904d9490e40b96e3177ad3c320b0c1152c06915d | marinacavalari/modix | main_cli.clj | (ns modix.main-cli
(:require [modix.handlers.cli :as h.cli]))
(defn handle-option [option]
(case option
"1" (h.cli/create-clothe)
"2" (h.cli/update-clothe)
"3" (h.cli/delete-clothe)
"4" (h.cli/list-all-clothes)
(println "nao vai ta dando")))
(defn show-menu-options []
(println)
(println "... | null | https://raw.githubusercontent.com/marinacavalari/modix/bb22050d03b8828ff4b03af3c3ca23af21e5b34d/src/modix/main_cli.clj | clojure | (ns modix.main-cli
(:require [modix.handlers.cli :as h.cli]))
(defn handle-option [option]
(case option
"1" (h.cli/create-clothe)
"2" (h.cli/update-clothe)
"3" (h.cli/delete-clothe)
"4" (h.cli/list-all-clothes)
(println "nao vai ta dando")))
(defn show-menu-options []
(println)
(println "... | |
1ecc4badb050c60f4d22a5b5fd58202ee1bd80a064ce556fcdd37bbffd5e887f | maximedenes/native-coq | closure.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/closure.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Profiling
[r_const=(true,cl)] mea... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by with accoun... |
c4b14335d7848be1d1f52595363fe0c132ab8f4ca3252e1c19b6c1ef91920008 | synrc/nitro | nitro_static.erl | -module(nitro_static).
-description('NITRO Static bridge for MAD containers').
-author('Maxim Sokhatsky').
-compile(export_all).
-include_lib("kernel/include/file.hrl").
init(_, _, _) -> {upgrade, protocol, cowboy_rest}.
rest_init(Req, {dir, Path, Extra})
when is_binary(Path) ->
rest_init(Req, {dir, binar... | null | https://raw.githubusercontent.com/synrc/nitro/f9acfc0225f5db67f53b0eb55bdb3adadc3b4025/src/nitro_static.erl | erlang | -module(nitro_static).
-description('NITRO Static bridge for MAD containers').
-author('Maxim Sokhatsky').
-compile(export_all).
-include_lib("kernel/include/file.hrl").
init(_, _, _) -> {upgrade, protocol, cowboy_rest}.
rest_init(Req, {dir, Path, Extra})
when is_binary(Path) ->
rest_init(Req, {dir, binar... | |
b0328124a90d1319853b9aa4479ac733fccda2c3be69bf517de2b24682594fe8 | CryptoKami/cryptokami-core | VAR.hs | {-# LANGUAGE RankNTypes #-}
-- | Block verification, application, and rollback: processing of SSC-related payload.
module Pos.Ssc.Logic.VAR
(
sscVerifyBlocks
, sscApplyBlocks
, sscVerifyAndApplyBlocks
, sscRollbackBlocks
) where
import Control.Lens ((.=), _Wrappe... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/ssc/Pos/Ssc/Logic/VAR.hs | haskell | # LANGUAGE RankNTypes #
| Block verification, application, and rollback: processing of SSC-related payload.
--------------------------------------------------------------------------
Modes
--------------------------------------------------------------------------
------------------------------------------------------... |
module Pos.Ssc.Logic.VAR
(
sscVerifyBlocks
, sscApplyBlocks
, sscVerifyAndApplyBlocks
, sscRollbackBlocks
) where
import Control.Lens ((.=), _Wrapped)
import Control.Monad.Except (MonadError (throwError), runExceptT)
import Control.Monad.Morph... |
ffde89a75a9bc744d28d018a04d55a815081547d3d4a0f07d3e2bcb50116e948 | yuriy-chumak/ol | run-length_encoding.scm | ; -length_encoding#Ol
(define (RLE str)
(define iter (string->list str))
(let loop ((iter iter) (chr (car iter)) (n 0) (rle '()))
(cond
((null? iter)
(reverse (cons (cons n chr) rle)))
((char=? chr (car iter))
(loop (cdr iter) chr (+ n 1) rle))
(else
... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/751ac7b276233923a074fed29be27c6af759af14/tests/rosettacode/run-length_encoding.scm | scheme | -length_encoding#Ol
test |
(define (RLE str)
(define iter (string->list str))
(let loop ((iter iter) (chr (car iter)) (n 0) (rle '()))
(cond
((null? iter)
(reverse (cons (cons n chr) rle)))
((char=? chr (car iter))
(loop (cdr iter) chr (+ n 1) rle))
(else
(loop (cdr iter... |
56fc68cb824c6661014881aec137105cea40c41107dff2dc277397803217f065 | gedge-platform/gedge-platform | amqp10_client_app.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(amqp10_client_app).
-behaviour(applicati... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp10_client/src/amqp10_client_app.erl | erlang |
Application callbacks
====================================================================
API
====================================================================
====================================================================
==================================================================== | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(amqp10_client_app).
-behaviour(application).
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.