_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 |
|---|---|---|---|---|---|---|---|---|
d4e3ee527f0d08bd49308a01ac64a904322555f7e892f7c0ef7ef2eb82dd9981 | diku-dk/futhark | GPUMem.hs | # LANGUAGE TypeFamilies #
module Futhark.IR.GPUMem
( GPUMem,
-- * Simplification
simplifyProg,
simplifyStms,
simpleGPUMem,
-- * Module re-exports
module Futhark.IR.Mem,
module Futhark.IR.GPU.Op,
)
where
import Futhark.Analysis.PrimExp.Convert
import Futhark.Analysis.UsageTable qualif... | null | https://raw.githubusercontent.com/diku-dk/futhark/174e8d862def6f52d5c9a36fa3aa6e746049776e/src/Futhark/IR/GPUMem.hs | haskell | * Simplification
* Module re-exports
Slightly hackily and very inefficiently, we look at the inside
and add usages for those sizes. This is necessary so the
simplifier will hoist those sizes out as far as possible (most | # LANGUAGE TypeFamilies #
module Futhark.IR.GPUMem
( GPUMem,
simplifyProg,
simplifyStms,
simpleGPUMem,
module Futhark.IR.Mem,
module Futhark.IR.GPU.Op,
)
where
import Futhark.Analysis.PrimExp.Convert
import Futhark.Analysis.UsageTable qualified as UT
import Futhark.IR.Aliases (Aliases)
impor... |
3a6dd93106154afba0f58110221eb98ad6df1551051122138cda17b5b5c1a518 | mirage/cowabloga | blog.ml |
* Copyright ( c ) 2010 - 2013 Anil Madhavapeddy < >
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .... | null | https://raw.githubusercontent.com/mirage/cowabloga/2c256a92258f012c095bb72edcb639ad2fe164b3/lib/blog.ml | ocaml | * An entry in a feed: metadata plus a filename [body].
* [permalink feed entry] returns the permalink URI for [entry] in [feed].
* [to_atom feed entry]
* Entries separated by <hr /> tags
* [to_html ?sep feed entries] renders a series of entries in a feed, separated
by [sep], defaulting to [default_separator].
... |
* Copyright ( c ) 2010 - 2013 Anil Madhavapeddy < >
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .... |
662db49ce6144275482f3f5d0a915af7a8bad628001153c488cac93ed7b7a0d1 | aengelberg/paren.party | project.clj | (defproject paren.party "0.1.0-SNAPSHOT"
:description "PAREN PARTY"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.238"]
[org.clojure/core.async "0.4.474"]
[manifold-cljs "0.1.7-1"]
[reag... | null | https://raw.githubusercontent.com/aengelberg/paren.party/0ecd81b76793bbd9a3a7b8a500ff35325b77d44c/project.clj | clojure | :http-server-root "public" ;; default and assumes "resources"
; default
watch and update CSS
if you want to embed a ring handler into the figwheel http-kit
server, this is for simple ring servers, if this
:ring-handler hello_world.server/handler
To be able to open files in your editor from the heads up display
... | (defproject paren.party "0.1.0-SNAPSHOT"
:description "PAREN PARTY"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.238"]
[org.clojure/core.async "0.4.474"]
[manifold-cljs "0.1.7-1"]
[reag... |
de12ebb821dafa337c065b395743e4f71aa48f99864d2b9871aca2543e5033f9 | TheClimateCorporation/geojson-schema | core.cljc | Copyright 2014 The Climate Corporation
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
; -2.0
; Unless required by applicable law or agreed to in writing, software
distr... | null | https://raw.githubusercontent.com/TheClimateCorporation/geojson-schema/6571958391b0a41b5d53e4b1d14da1eeae6d6283/src/com/climate/geojson_schema/core.cljc | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing ... | Copyright 2014 The Climate Corporation
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.climate.geojson-schema.core
(:require
[schema.core :refer [Any optional-key required-key eq one pred both either maybe named conditional Str Num Keyword]]))
(def ^:private position [Num])
... |
dc57c0bf678f36de1dac5de18a163daa07ff5f4d738a0c10793e79b749501882 | chrisdone/ircbrowse | Extra.hs | module Data.String.Extra where
import Data.Char
trim :: String -> String
trim = dropWhile isSpace . reverse . dropWhile isSpace . reverse
limitLen :: Int -> [Char] -> [Char]
limitLen n xs | length xs > n = take (max 1 (n-2)) xs ++ "…"
| otherwise = xs
| null | https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/src/Data/String/Extra.hs | haskell | module Data.String.Extra where
import Data.Char
trim :: String -> String
trim = dropWhile isSpace . reverse . dropWhile isSpace . reverse
limitLen :: Int -> [Char] -> [Char]
limitLen n xs | length xs > n = take (max 1 (n-2)) xs ++ "…"
| otherwise = xs
| |
962b76ae0b47c39e29d0383f04337748e456d9ab0d3bf58899e765b5e3e8455e | hpyhacking/openpoker | ranking.erl | -module(ranking).
-behaviour(op_exch_mod).
-export([start/2, dispatch/2]).
-export([rank/1, notify/1]).
-include("openpoker.hrl").
%%%
%%% callback
%%%
start([], Ctx) ->
notify(Ctx),
{stop, Ctx}.
dispatch(_R, _Ctx) ->
ok.
%%%
%%% client
%%%
rank(#texas{seats = S, board = Cards}) ->
Seats = seat:lookup(?PS... | null | https://raw.githubusercontent.com/hpyhacking/openpoker/643193c94f34096cdcfcd610bdb1f18e7bf1e45e/src/mods/ranking.erl | erlang |
callback
client
private
| -module(ranking).
-behaviour(op_exch_mod).
-export([start/2, dispatch/2]).
-export([rank/1, notify/1]).
-include("openpoker.hrl").
start([], Ctx) ->
notify(Ctx),
{stop, Ctx}.
dispatch(_R, _Ctx) ->
ok.
rank(#texas{seats = S, board = Cards}) ->
Seats = seat:lookup(?PS_STANDING, S),
rank(Seats, Cards, []).... |
cae6a8139755dfad9f575f133733478d1cd8d30cd9879097566740488231927e | infinitelives/infinitelives.pixi | core.cljs | (ns pixelfont.core
(:require [infinitelives.pixi.canvas :as c]
[infinitelives.pixi.events :as e]
[infinitelives.pixi.resources :as r]
[infinitelives.pixi.texture :as t]
[infinitelives.pixi.sprite :as s]
[infinitelives.pixi.pixelfont :as pf]
[cljs... | null | https://raw.githubusercontent.com/infinitelives/infinitelives.pixi/877bd247f2bae327bc3a3bd70162a7880de9a0c7/examples/pixelfont/src/pixelfont/core.cljs | clojure | (ns pixelfont.core
(:require [infinitelives.pixi.canvas :as c]
[infinitelives.pixi.events :as e]
[infinitelives.pixi.resources :as r]
[infinitelives.pixi.texture :as t]
[infinitelives.pixi.sprite :as s]
[infinitelives.pixi.pixelfont :as pf]
[cljs... | |
7efac62a0308f9c1a4e7fbcb8f6cca9ab722b0c4c6ff9246ad4480989a66646d | diku-dk/futhark | CUDA.hs | -- | Code generation for ImpCode with CUDA kernels.
module Futhark.CodeGen.ImpGen.CUDA
( compileProg,
Warnings,
)
where
import Data.Bifunctor (second)
import Futhark.CodeGen.ImpCode.OpenCL
import Futhark.CodeGen.ImpGen.GPU
import Futhark.CodeGen.ImpGen.GPU.ToOpenCL
import Futhark.IR.GPUMem
import Futhark.Monad... | null | https://raw.githubusercontent.com/diku-dk/futhark/7c8494f809dbb1e41775471e88270068d8632407/src/Futhark/CodeGen/ImpGen/CUDA.hs | haskell | | Code generation for ImpCode with CUDA kernels.
| Compile the program to ImpCode with CUDA kernels. | module Futhark.CodeGen.ImpGen.CUDA
( compileProg,
Warnings,
)
where
import Data.Bifunctor (second)
import Futhark.CodeGen.ImpCode.OpenCL
import Futhark.CodeGen.ImpGen.GPU
import Futhark.CodeGen.ImpGen.GPU.ToOpenCL
import Futhark.IR.GPUMem
import Futhark.MonadFreshNames
compileProg :: MonadFreshNames m => Prog... |
15f1e95712e77a52661074121c28a75ad4dc2bb76f80cf3ac9879fd0527bb81e | racket/math | matrix-subspace.rkt | #lang typed/racket/base
(require racket/fixnum
racket/list
"matrix-types.rkt"
"matrix-basic.rkt"
"matrix-gauss-elim.rkt"
"utils.rkt"
"../array/array-indexing.rkt"
"../array/array-constructors.rkt"
"../array/array-struct.rkt")
(provide
matrix-ra... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/matrix/matrix-subspace.rkt | racket | Returns the dimension of the column space (equiv. row space) of M
Returns the dimension of the null space of M | #lang typed/racket/base
(require racket/fixnum
racket/list
"matrix-types.rkt"
"matrix-basic.rkt"
"matrix-gauss-elim.rkt"
"utils.rkt"
"../array/array-indexing.rkt"
"../array/array-constructors.rkt"
"../array/array-struct.rkt")
(provide
matrix-ra... |
2ddcc290ed9cfaf3332f850d6a3cd654e2c794a3e9e34e5fd89fb715d39fa049 | jumper149/go | Game.hs | module Go.Game.Game ( Game (..)
, AssociatedPlayer
, AssociatedStone
, updateBoard
, GameCoord (..)
, Stone (..)
) where
import Data.Aeson (FromJSON, ToJSON)
import qualified Data.Set as S
import GHC... | null | https://raw.githubusercontent.com/jumper149/go/603e61f64e8e7c890bbc914fef6033b5ed7dd005/src/Go/Game/Game.hs | haskell | | The states of a spot for a stone are represented by this data type.
| Stones placed on coordinates can form chains which are represented by this data type.
| Check if a coordinate is part of chain. Does not check if stones are matching.
| Remove chains of free stones and put them in an ordered list, that is cycle... | module Go.Game.Game ( Game (..)
, AssociatedPlayer
, AssociatedStone
, updateBoard
, GameCoord (..)
, Stone (..)
) where
import Data.Aeson (FromJSON, ToJSON)
import qualified Data.Set as S
import GHC... |
c0e17253793685a762a2ce5ad7e1115a79f2db84d1ace3eda03d7f87eff16d9d | arekinath/esaml | sp_handler.erl | esaml - SAML for erlang
%%
Copyright ( c ) 2013 , and the University of Queensland
%% All rights reserved.
%%
Distributed subject to the terms of the 2 - clause BSD license , see
%% the LICENSE file in the root of the distribution.
-module(sp_handler).
-include_lib("esaml/include/esaml.hrl").
-record(state, {... | null | https://raw.githubusercontent.com/arekinath/esaml/bf52dcb449184dc94e4fb1ff8820b08cc1ceab09/examples/sp/src/sp_handler.erl | erlang |
All rights reserved.
the LICENSE file in the root of the distribution.
We build all of our URLs (in metadata, and in requests) based on this | esaml - SAML for erlang
Copyright ( c ) 2013 , and the University of Queensland
Distributed subject to the terms of the 2 - clause BSD license , see
-module(sp_handler).
-include_lib("esaml/include/esaml.hrl").
-record(state, {sp, idp}).
-export([init/3, handle/2, terminate/3]).
init(_Transport, Req, _Args) ... |
07ead5bf9524bf5088e6ff89536dbc841d5038e58f45639c81882a92c55b1898 | venantius/photon | core.cljs | (ns photon.core
(:require-macros
[cljs.core.async.macros :as asyncm :refer (go go-loop)])
(:require
;; <other stuff>
[clojure.string :as str]
[cljs.core.async :as async :refer (<! >! put! chan)]
[photon.config :as config]
[photon.messages :as messages]
[taoensso.encore :as encore :refer-mac... | null | https://raw.githubusercontent.com/venantius/photon/95097d155526abb719948b5aa5a7fd12de9615a6/src/photon/core.cljs | clojure | <other stuff>
<--- Add this
Add this: --->
Note the same path as before
Subscribe to a change feed on the server.
Dispatch on event-id
Default/fallback case (no other matching handler) | (ns photon.core
(:require-macros
[cljs.core.async.macros :as asyncm :refer (go go-loop)])
(:require
[clojure.string :as str]
[cljs.core.async :as async :refer (<! >! put! chan)]
[photon.config :as config]
[photon.messages :as messages]
[taoensso.encore :as encore :refer-macros (have have?)]
... |
a7f77fc96c29fb311b5a3c68af8cebd6b8e81aba2fddd6be5096b5b34c764ac0 | NetComposer/nkpacket | nkpacket_transport_tcp.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . 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/NetComposer/nkpacket/4d74ab31b20ba7a1449f1f72c1c51829f18d2d5c/src/nkpacket_transport_tcp.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 ) 2019 . 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
@private TCP / TLS Transpo... |
0e7148c15237669d48c61b0e19f97bb28b4138a4fdd4b77eba155e6438209e6c | ucsd-progsys/dsolve | tests_rec_heap.ml | type 'a t =
| Empty
| Same of 'a * 'a t * 'a t (* same number of elements on both sides *)
| Diff of 'a * 'a t * 'a t (* left has [n+1] nodes and right has [n] *)
let rec set_of t = match t with
Empty - > Myaset.empty
| Same ( x , l , r ) - > Myaset.cup ( x ) ( Myaset.cup ( set_of l ) ( set_of r ) )
... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/ml/old/tests_rec_heap.ml | ocaml | same number of elements on both sides
left has [n+1] nodes and right has [n]
raise EmptyHeap
raise EmptyHeap
*
*
*
same code (and proof) for Same and Diff. the only purpose of matching a pattern is to assert !Empty
same symmetry as above
raise EmptyHeap | type 'a t =
| Empty
let rec set_of t = match t with
Empty - > Myaset.empty
| Same ( x , l , r ) - > Myaset.cup ( x ) ( Myaset.cup ( set_of l ) ( set_of r ) )
| Diff ( x , l , r ) - > Myaset.cup ( x ) ( Myaset.cup ( set_of l ) ( set_of r ) )
let rec sz t = match t with
Empty - > 0
| Same ... |
89efeec8817aa0681e3a01695b3ec1d8f09674db9a9bc2d3ec8cc9954f8c0bb7 | gogotanaka/Ringo | Compiler.hs | module Ringo where
import Ringo.Parser (eval)
import Data.Functor ((<$>))
import System.Environment (getArgs)
import Data.Char (isSpace)
main :: IO()
main = do
[path] <- getArgs
code <- filter (not.isSpace) <$> readFile path
putStr $ eval code
| null | https://raw.githubusercontent.com/gogotanaka/Ringo/8875f44bea9f8ce51df243f2a0ddaabf8015d4e2/src/Compiler.hs | haskell | module Ringo where
import Ringo.Parser (eval)
import Data.Functor ((<$>))
import System.Environment (getArgs)
import Data.Char (isSpace)
main :: IO()
main = do
[path] <- getArgs
code <- filter (not.isSpace) <$> readFile path
putStr $ eval code
| |
53a878cac1057a1b9e8f203a81fd58800512559c823cc675260b3351f272c10f | nebogeo/scheme-bricks | persist.scm | 28517 | null | https://raw.githubusercontent.com/nebogeo/scheme-bricks/d275062afef867610fda30ffa016e90b85a953c5/history/persist.scm | scheme | 28517 | |
ac0aae48fb0d18830ea4d244ec31f8362795efb5093dc435e7f4cb39c8e264a9 | v-kolesnikov/sicp | 1_35_test.clj | (ns sicp.chapter01.1-35-test
(:require [clojure.test :refer :all]
[sicp.test-helper :refer :all]
[sicp.chapter01.1-35 :refer :all]))
(deftest test-fixed-point
(letfn [(cos [x] (Math/cos x))
(sum-of-sin-and-cos [x] (+ (Math/sin x) (Math/cos x)))]
(assert-equal 0.739082298522402... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_35_test.clj | clojure | (ns sicp.chapter01.1-35-test
(:require [clojure.test :refer :all]
[sicp.test-helper :refer :all]
[sicp.chapter01.1-35 :refer :all]))
(deftest test-fixed-point
(letfn [(cos [x] (Math/cos x))
(sum-of-sin-and-cos [x] (+ (Math/sin x) (Math/cos x)))]
(assert-equal 0.739082298522402... | |
d0873a2d170ad4735d287e7987d1e2fc7013d260fb3a77581965cd2d3da10144 | keera-studios/keera-hails | HLintMain.hs | -----------------------------------------------------------------------------
-- |
-- Module : Main (hlint)
Copyright : ( C ) 2015 , 2013 - 2014
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : provisional
-- Portability : portable
--
-- This module runs H... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails-reactivelenses/tests/HLintMain.hs | haskell | ---------------------------------------------------------------------------
|
Module : Main (hlint)
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
This module runs HLint on the source tree.
-----------------------------------------------------------------... | Copyright : ( C ) 2015 , 2013 - 2014
Maintainer : < >
module Main where
import Control.Monad
import Language.Haskell.HLint
import System.Environment
import System.Exit
main :: IO ()
main = do
args <- getArgs
hints <- hlint $ ["src"] ++ args
unless (null hints) exitFailure
|
595fa7ffa2c87052fbdb17513f63c8774fc2858fcb227cc7257299da79ce11ee | rkallos/canal | canal_tests.erl | -module(canal_tests).
-include_lib("canal/include/canal_internal.hrl").
-include("canal_test.hrl").
-include_lib("eunit/include/eunit.hrl").
%% runners
canal_test_() ->
{setup,
fun () -> setup() end,
fun (_) -> cleanup() end,
[
fun auth_subtest/0,
fun read_subtest/0,
fu... | null | https://raw.githubusercontent.com/rkallos/canal/b1456e81615e986b04fd6727302972c55e10ad80/test/canal_tests.erl | erlang | runners
tests
utils | -module(canal_tests).
-include_lib("canal/include/canal_internal.hrl").
-include("canal_test.hrl").
-include_lib("eunit/include/eunit.hrl").
canal_test_() ->
{setup,
fun () -> setup() end,
fun (_) -> cleanup() end,
[
fun auth_subtest/0,
fun read_subtest/0,
fun write_sub... |
6b2d5f06a08b055c87b9876e5e2b10ffff68c587febcd79b08134dca9c4e5933 | restyled-io/restyled.io | Lens.hs | module Restyled.Test.Lens
( fieldLens
, (.~)
, (?~)
, (^.)
, (^..)
, (^?)
) where
import Restyled.Prelude hiding (fieldLens)
import qualified Database.Persist as P
import Lens.Micro ((.~), (?~), (^.), (^..), (^?))
| Use an ' EntityField ' as a lens
--
-- The library-provided @fieldLens@... | null | https://raw.githubusercontent.com/restyled-io/restyled.io/e3208b62dfea0916b9760cf8dd73abc7c5f080bb/test/Restyled/Test/Lens.hs | haskell |
The library-provided @fieldLens@ is over @'Entity' record@, and we need it
over just @record@ for Graphula. This is unsafe when used with a key
the way that it does.
| module Restyled.Test.Lens
( fieldLens
, (.~)
, (?~)
, (^.)
, (^..)
, (^?)
) where
import Restyled.Prelude hiding (fieldLens)
import qualified Database.Persist as P
import Lens.Micro ((.~), (?~), (^.), (^..), (^?))
| Use an ' EntityField ' as a lens
' EntityField ' , such as ' JobId ' ... |
18be621b21705ab8db0a72bb89fa8fa6b3d27fc2db5b2dc089eb95d4553e72a9 | strojure/zizzmap | core_02_assoc.clj | (ns project.readme.core-02-assoc
(:require [strojure.zizzmap.core :as zizz]))
(def ^:private -map1
(zizz/assoc* {} :a (do (println "Init") 1)))
(get -map1 :a)
Init
= > 1
(def ^:private -map2
(zizz/assoc* {}
:a (do (println "Init :a") 1)
:b (do (println "Init :b") 2)))
(get -map2 ... | null | https://raw.githubusercontent.com/strojure/zizzmap/45bdffbd6d7eeeb06566e699dd69e34835187cd7/test/project/readme/core_02_assoc.clj | clojure | (ns project.readme.core-02-assoc
(:require [strojure.zizzmap.core :as zizz]))
(def ^:private -map1
(zizz/assoc* {} :a (do (println "Init") 1)))
(get -map1 :a)
Init
= > 1
(def ^:private -map2
(zizz/assoc* {}
:a (do (println "Init :a") 1)
:b (do (println "Init :b") 2)))
(get -map2 ... | |
b83adf248f92d305ff3fb7ca2dd03690ce9d45e19d94771bf5ca00c6153cb1d2 | fortytools/holumbus | ClientMain.hs | -- ----------------------------------------------------------------------------
|
Module :
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Module :
Copyright : Copyright (C) 2... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples/MapReduce/Sort/ClientMain.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | |
Module :
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Module :
Copyright : Copyright (C) 2008 Stefan Schmidt
License : MIT
Maintainer : Stefan Schmidt ()
Stabil... |
fef08ce51eb3b8c0ae6ca1869adfe26a52cc06c991439e89df59be5f90a8b189 | mcorbin/meuse | token.clj | (ns meuse.db.public.token
(:require [meuse.db :refer [database]]
[meuse.db.actions.token :as token]
[mount.core :refer [defstate]]))
(defprotocol ITokenDB
(by-user [this user-name])
(create [this token])
(delete [this user-name token-name])
(set-last-used [this token-id])
(get-token... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/db/public/token.clj | clojure | (ns meuse.db.public.token
(:require [meuse.db :refer [database]]
[meuse.db.actions.token :as token]
[mount.core :refer [defstate]]))
(defprotocol ITokenDB
(by-user [this user-name])
(create [this token])
(delete [this user-name token-name])
(set-last-used [this token-id])
(get-token... | |
a92e878cb1c2b534452763814a355da7fed4674572e6aeffa7662bca4856710d | alang9/dynamic-graphs | EulerTour.hs | -- | This module provides dynamic connectivity for an acyclic graph (i.e. a
-- forest).
--
-- It is based on:
-- /Finding biconnected components and computing tree functions in logarithmic parallel time/
by and Uzi Vishki/ ( 1984 ) .
--
We use two naming conventions in this module :
--
-- * A prime suffix (@'@) ... | null | https://raw.githubusercontent.com/alang9/dynamic-graphs/b88f001850c7bee8faa62099e93172a0bb0df613/src/Data/Graph/Dynamic/EulerTour.hs | haskell | | This module provides dynamic connectivity for an acyclic graph (i.e. a
forest).
It is based on:
/Finding biconnected components and computing tree functions in logarithmic parallel time/
* A prime suffix (@'@) indicates a simpler or less polymorphic version of a
function or datatype. For example, see 'empty... | by and Uzi Vishki/ ( 1984 ) .
We use two naming conventions in this module :
# LANGUAGE GADTs #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Data.Graph.Dynamic.EulerTour
Forest
, Graph
, Graph'
, empty
, empty'
, edgeless
, edgeless'
... |
d31d5e864678692d09824ba1182c4efeec3c69f25ff00094e79125e552fac711 | fujita-y/ypsilon | srfi-41.scm | #!nobacktrace
(define-library (srfi srfi-41)
(import (srfi 41))
(export stream-null stream-cons stream? stream-null? stream-pair? stream-car
stream-cdr stream-lambda define-stream list->stream port->stream stream
stream->list stream-append stream-concat stream-constant stream-drop
stre... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/sitelib/srfi/srfi-41.scm | scheme | #!nobacktrace
(define-library (srfi srfi-41)
(import (srfi 41))
(export stream-null stream-cons stream? stream-null? stream-pair? stream-car
stream-cdr stream-lambda define-stream list->stream port->stream stream
stream->list stream-append stream-concat stream-constant stream-drop
stre... | |
853cbe6575a77db8af74abe71d6467368c027ee7a5b50dec46e2a6401bb5e2ca | awakesecurity/gRPC-haskell | Unregistered.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
module Network.GRPC.HighLevel.Server.Unregistered where
import ... | null | https://raw.githubusercontent.com/awakesecurity/gRPC-haskell/112777023f475ddd752c954056e679fbca0baa44/src/Network/GRPC/HighLevel/Server/Unregistered.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
to indicate that the thread which actually awakens from sleep
on file descriptor events may differ from the one which seeks
to "pluck" the resulting event.
Thus it seems possible that... | # LANGUAGE GADTs #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Network.GRPC.HighLevel.Server.Unregistered where
import Control.Arrow
import Control.Concurrent.MVar (newEmptyMVar,
... |
3c5678395375435ffcc18a4d4427e0e7844d872c719e1b38ac088d6e20fd5548 | finnishtransportagency/harja | paallystys_test.clj | (ns harja.palvelin.palvelut.yllapitokohteet.paallystys-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[namespacefy.core :refer [namespacefy]]
[harja.testi :refer :all]
[taoensso.timbre :as log]
[harja.palvelin.asetukset :as a]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/af09d60911ed31ea98634a9d5c7f4b062e63504f/test/clj/harja/palvelin/palvelut/yllapitokohteet/paallystys_test.clj | clojure | Päällystetoimenpiteen tiedot
Kiviaines- ja sideainetiedot
Päällystetoimenpiteen tiedot
Kiviaines- ja sideainetiedot
Päällystetoimenpiteen tiedot
Kiviaines- ja sideainetiedot
(erityisesti kohdeosien esitäyttö on tärkeää)
Päällystysilmoituksen perustiedot OK
Päällystetoimenpiteen tiedot
Kiviaines- ja sideaineti... | (ns harja.palvelin.palvelut.yllapitokohteet.paallystys-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[namespacefy.core :refer [namespacefy]]
[harja.testi :refer :all]
[taoensso.timbre :as log]
[harja.palvelin.asetukset :as a]
... |
0493bc707a53df78e28b7dfa30ff2b32adcded260d24ecac860c744bd061989b | athensresearch/athens | utils.cljc | (ns athens.common.utils
"Athens Common Utilities.
Shared between CLJ and CLJS."
(:require
[clojure.pprint :as pprint])
#?(:cljs
(:require-macros
[athens.common.utils]))
#?(:clj
(:import
(java.time
LocalDateTime)
(java.util
Date))))
(defn now-ts
[]
#?(... | null | https://raw.githubusercontent.com/athensresearch/athens/536ba577e38ead6810fd9d357f1ef5991999fc88/src/cljc/athens/common/utils.cljc | clojure | (ns athens.common.utils
"Athens Common Utilities.
Shared between CLJ and CLJS."
(:require
[clojure.pprint :as pprint])
#?(:cljs
(:require-macros
[athens.common.utils]))
#?(:clj
(:import
(java.time
LocalDateTime)
(java.util
Date))))
(defn now-ts
[]
#?(... | |
4d947704455f2dda97e47fd55b55c29eed9be6820675ecb0e3839b375e3061ef | stackbuilders/hapistrano | Main.hs | module Main where
import Lib
main :: IO ()
main = helloWorld
| null | https://raw.githubusercontent.com/stackbuilders/hapistrano/ffbe5b6263d9d6d84049932dbe5ef7732edc3f1e/example/app/Main.hs | haskell | module Main where
import Lib
main :: IO ()
main = helloWorld
| |
2a34ab74a84725f3b54d5b9fb0a73a7ff2e7a5007b2f4535f30b95277a4951f7 | blindglobe/clocc | defsys.lisp | (in-package :user)
(defparameter *here* (make-pathname
:directory (pathname-directory *load-truename*)))
(pushnew 'compile pcl::*defclass-times*)
(pushnew 'compile pcl::*defgeneric-times*)
(defvar *clx-directory* "target:clx/*")
(defvar *clue-directory* (merge-pathnames "clue/" *here*))
(setf (search-list "... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clue/defsys.lisp | lisp | Don't warn about botched values decls
Define packages
Modify xlib:create-window
pointer documentation window support
pw adds
The "guts"
Resource and type conversion
Gray stipple patterns
Standard cursor names
Event handling
Support for windowless contacts
Support for top-level window/session mgr.
interact... | (in-package :user)
(defparameter *here* (make-pathname
:directory (pathname-directory *load-truename*)))
(pushnew 'compile pcl::*defclass-times*)
(pushnew 'compile pcl::*defgeneric-times*)
(defvar *clx-directory* "target:clx/*")
(defvar *clue-directory* (merge-pathnames "clue/" *here*))
(setf (search-list "... |
b18ef625d778239728af29eb5f39eed72fc76231637a433f5b11a4d426afaa37 | tmattio/js-bindings | node_path.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es2020
module Path : sig
module ParsedPath : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val root : t -> string [@@js.get "root"]
val set_root : t -> string -> unit [@@js.set "root"]... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/node/node_path.mli | ocaml | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es2020
module Path : sig
module ParsedPath : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val root : t -> string [@@js.get "root"]
val set_root : t -> string -> unit [@@js.set "root"]... | |
14dfe93a397a81b050de82aa86d6259af9332e3d58229f83c79045b043e6d335 | project-oak/hafnium-verification | procCfgTests.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/unit/procCfgTests.ml | ocaml | let -> represent normal transitions and -*-> represent exceptional transitions
creating graph n1 -> n2, n1 -*-> n3, n2 -> n4, n2 -*-> n3, n3 -> n4 , n3 -*> n4
test the preds/succs using backward + instr cfg
test the succs of the normal cfg. forward...
... and backward...
...and the backward cfg...
same in ... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
ea1be4031913c50e757a38a2ffe244917ce6181cc83cfb2138222c85b76308d8 | google-research/dex-lang | Compile.hs | Copyright 2022 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
module LLVM.Compile
( compileLLVM, runPasses, standardCompilationPipeline
, LLVMOptLevel (..)) where
#ifdef DEX_DEBUG
import qualified LLVM.Analysis a... | null | https://raw.githubusercontent.com/google-research/dex-lang/2a8f44475e95b9bc235bcd8b6eecbab411a91784/src/lib/LLVM/Compile.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
The only reason this module depends on Types.Source is that we pass in the logger,
we can't just expose a functional API for each stage without taking a
performance hit. But maybe the perfo... | Copyright 2022 Google LLC
module LLVM.Compile
( compileLLVM, runPasses, standardCompilationPipeline
, LLVMOptLevel (..)) where
#ifdef DEX_DEBUG
import qualified LLVM.Analysis as L
#endif
import qualified LLVM.AST as L
import qualified LLVM.AST.Global as GL
import qualified LLVM.Module as Mod
import qualified LL... |
f01f1c38b0d15f89f03dea6dd6bc3bc1d48c6fa2fa4802c1492d9a725c2c7982 | hjcapple/reading-sicp | exercise_3_78.scm | #lang racket
P242 - [ 练习 3.78 ]
(require "stream.scm")
(require "infinite_stream.scm")
(define (integral delayed-integrand initial-value dt)
(define int
(cons-stream initial-value
(let ((integrand (force delayed-integrand)))
(add-streams (scale-stream integrand dt)
... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_78.scm | scheme | #lang racket
P242 - [ 练习 3.78 ]
(require "stream.scm")
(require "infinite_stream.scm")
(define (integral delayed-integrand initial-value dt)
(define int
(cons-stream initial-value
(let ((integrand (force delayed-integrand)))
(add-streams (scale-stream integrand dt)
... | |
adb1da495241f0ab659f495fe98f51935c72cd5de47b6414c0349b4c08eaf0b1 | auser/beehive | string_utils.erl | -module (string_utils).
-export([sub/3, gsub/3]).
% Mine
-export ([template_command_string/2]).
-import (string, [len/1, str/2, left/2,right/2,concat/2]).
sub(Str,Old,New) when is_list(Str) andalso is_list(Old) ->
Lstr = len(Str),
Lold = len(Old),
Pos = str(Str,Old),
if
Pos =:= 0 -> Str;
true ... | null | https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/src/bh_utils/string_utils.erl | erlang | Mine
turn the command string from the comand string with the values
the format: | -module (string_utils).
-export([sub/3, gsub/3]).
-export ([template_command_string/2]).
-import (string, [len/1, str/2, left/2,right/2,concat/2]).
sub(Str,Old,New) when is_list(Str) andalso is_list(Old) ->
Lstr = len(Str),
Lold = len(Old),
Pos = str(Str,Old),
if
Pos =:= 0 -> Str;
true ->
... |
c4e98419cf1b0ea014b27c9ab2957a91e003e6fe5ea6e13a0d83a88eeef3b28a | ndmitchell/catch | ArgElim.hs |
-- Eliminate useless arguments
module Hite.ArgElim(cmd) where
import Hite.Type
import Data.List
import Data.Maybe
cmd = cmdHitePure (const argElim) "arg-elim"
"Eliminate useless arguments"
argElim :: Hite -> Hite
argElim hite@(Hite datas funcs) = Hite datas newfuncs
where
... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Hite/ArgElim.hs | haskell | Eliminate useless arguments
|
module Hite.ArgElim(cmd) where
import Hite.Type
import Data.List
import Data.Maybe
cmd = cmdHitePure (const argElim) "arg-elim"
"Eliminate useless arguments"
argElim :: Hite -> Hite
argElim hite@(Hite datas funcs) = Hite datas newfuncs
where
newfuncs = map (newFunc hite) r... |
d3e7bc7c09724d6229771a261a533efe44a3358ff075929fabf21ed85ba1f2f2 | digital-asset/ghc | TcDaml.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
module TcDaml where
import GhcPrelude
import qualified Data.Set as S
import InstEnv
import Outputable
import TcRnTypes
import TyCoRep
import TyCon
import OccName
import Name
import Module
import PrelNames
i... | null | https://raw.githubusercontent.com/digital-asset/ghc/7be2c87f191abb4a13d77171968dcdbe9a25b40e/compiler/typecheck/TcDaml.hs | haskell | since interfaces implement themselves, we ignore if the target is itself
For unparameterised type aliases, we extract the name and print the alias | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
module TcDaml where
import GhcPrelude
import qualified Data.Set as S
import InstEnv
import Outputable
import TcRnTypes
import TyCoRep
import TyCon
import OccName
import Name
import Module
import PrelNames
i... |
782320053eb713f7bcda10ca46f379cbf681ee67fe0d016c955533bd18212ca9 | ocaml-ppx/ocamlformat | disabled_attr.ml | let _ =
let disabled = {|
|}[@ocamlformat "disable"] in
()
let _ =
let disabled = "
"[@ocamlformat "disable"] in
()
let _ =
let disabled =
begin
(* xxx
xxx *)
y
end[@ocamlformat "disable"]
in
()
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/134d89608748592d3e42c02b2459a2106878b1f3/test/passing/tests/disabled_attr.ml | ocaml | xxx
xxx | let _ =
let disabled = {|
|}[@ocamlformat "disable"] in
()
let _ =
let disabled = "
"[@ocamlformat "disable"] in
()
let _ =
let disabled =
begin
y
end[@ocamlformat "disable"]
in
()
|
64e1addaef65e6c6cf53b6819e8654a67e278106a6989cb153583907a3cd2f68 | jkvor/log_roller | log_roller_server.erl | Copyright ( c ) 2009 < >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, merge, publis... | null | https://raw.githubusercontent.com/jkvor/log_roller/1f072ab74532314f94bdc94dd5a8572d5ceb8d4e/src/log_roller_server.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | Copyright ( c ) 2009 < >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(log_roller_server).
-... |
8c36fd094590bbdb70c5127d0900cf45622e5dbba62075a2a8b42b8eecbe539a | GoNZooo/gotyno-hs | Spec.hs | module Main where
import qualified HaskellOutputSpec
import qualified ParsingSpec
import Qtility
import Test.Hspec
main :: IO ()
main = do
tsReferenceOutput <- ParsingSpec.typeScriptReferenceOutput
hsReferenceOutput <- ParsingSpec.haskellReferenceOutput
fsReferenceOutput <- ParsingSpec.fSharpReferenceOutput
p... | null | https://raw.githubusercontent.com/GoNZooo/gotyno-hs/0b70ba901ebb7c50b650eadc8104a708b5345a48/test/Spec.hs | haskell | module Main where
import qualified HaskellOutputSpec
import qualified ParsingSpec
import Qtility
import Test.Hspec
main :: IO ()
main = do
tsReferenceOutput <- ParsingSpec.typeScriptReferenceOutput
hsReferenceOutput <- ParsingSpec.haskellReferenceOutput
fsReferenceOutput <- ParsingSpec.fSharpReferenceOutput
p... | |
1d4294710c53bcb5ace4ea892d1d6a77cc6bd0650ca783e4dadb1cd2e4378523 | mark-watson/haskell_tutorial_cookbook_examples | CommonWords.hs | module Main where
import Data.Set (fromList, toList, intersection)
import Data.Char (toLower)
fileToWords fileName = do
fileText <- readFile fileName
return $ (fromList . words) (map toLower fileText)
commonWords file1 file2 = do
words1 <- fileToWords file1
words2 <- fileToWords file2
return $ toList ... | null | https://raw.githubusercontent.com/mark-watson/haskell_tutorial_cookbook_examples/b4ddfc7cc0290f4f1617fca9c363260f43ab66cf/ImPure/CommonWords.hs | haskell | module Main where
import Data.Set (fromList, toList, intersection)
import Data.Char (toLower)
fileToWords fileName = do
fileText <- readFile fileName
return $ (fromList . words) (map toLower fileText)
commonWords file1 file2 = do
words1 <- fileToWords file1
words2 <- fileToWords file2
return $ toList ... | |
074135da8165e471c14258524abc9bfc89f8e36b43159cd9a61ed5a52f27bc35 | 0install/0install | test.ml | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
Unix.putenv "TZ" "Europe/London"
open OUnit
open Zeroinstall
open Zeroinstall.General
open Support
open Support.Common
open Fake_system
let ( ) = Support.Logging.threshold : = Support . Log... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/tests/test.ml | ocaml | Prevent accidents
Check paths when not using portable base...
Now try with portable base...
This is really just for the coverage testing, which test_run_real doesn't do.
Escaping
Unescaping
Name the test cases and group them together
Gc.full_major ();
Useful if you want a stack-trace | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
Unix.putenv "TZ" "Europe/London"
open OUnit
open Zeroinstall
open Zeroinstall.General
open Support
open Support.Common
open Fake_system
let ( ) = Support.Logging.threshold : = Support . Log... |
b3cb6fbeddde98c03ce96c0e26fb207cc0f75ca94557dddacfa25446190e35f2 | fredokun/arbogen | frontend.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Arbogen - lib : fast uniform random generation of trees *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Module : ParseUtil ... | null | https://raw.githubusercontent.com/fredokun/arbogen/1c348767fbc5f40d32b4b83865c1b33ba04acc30/src/lib/frontend/frontend.ml | ocaml | * Specification parsing and configuration options management
* Configuration options available on the command line of the executable, and
in specification files in the form of `set option value` directives.
* A user-friendly representation of grammars. | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Arbogen - lib : fast uniform random generation of trees *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Module : ParseUtil ... |
ba0972af8b89e387322bd5141d719d20e72ee5befd363eeac4076afaf5fe850f | may-liu/qtalk | cyrsasl_anonymous.erl | %%%----------------------------------------------------------------------
%%% File : cyrsasl_anonymous.erl
Author : < >
%%% Purpose : ANONYMOUS SASL mechanism
%%% See -drafts/draft-ietf-sasl-anon-05.txt
Created : 23 Aug 2005 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% T... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/cyrsasl_anonymous.erl | erlang | ----------------------------------------------------------------------
File : cyrsasl_anonymous.erl
Purpose : ANONYMOUS SASL mechanism
See -drafts/draft-ietf-sasl-anon-05.txt
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distr... | Author : < >
Created : 23 Aug 2005 by < >
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
9c10ad7fffa403b8fdbd6e6ac17d8b3156caaf73e3c7ef6e13ada63e92b1bd18 | kafka4beam/kflow | kflow_wf_sysmon_receiver.erl | %%%===================================================================
2020 Klarna Bank AB ( publ )
%%%
%%% @doc This workflow receives `system_monitor' messages and puts
%%% them to postgres tables.
%%%
%%% == Configuration ==
%%%
%%% The following parameters are mandatory:
%%%
= = = kafka_topic = = =
%%%
%%% Typ... | null | https://raw.githubusercontent.com/kafka4beam/kflow/2c44379a2934385a17fb504e7a933c859da7ab06/src/workflows/kflow_wf_sysmon_receiver.erl | erlang | ===================================================================
@doc This workflow receives `system_monitor' messages and puts
them to postgres tables.
== Configuration ==
The following parameters are mandatory:
Type: `brod:topic()'.
=== group_id ===
=== database ===
Type: `epgsql:connect_opts()'. ... | 2020 Klarna Bank AB ( publ )
= = = kafka_topic = = =
Type : ` binary ( ) ' . group consumer ID used by the workflow .
[ #L63 ]
-module(kflow_wf_sysmon_receiver).
-include("kflow_int.hrl").
-export([workflow/2]).
-export([ nullable/1
, timestamp/1
, to_string/2
, format_function/1
... |
7804400ef941e68ad67f334f87436486b3a7a06936d766427138fa9e76eeb0d5 | clj-kondo/clj-kondo | interop.cljc | (ns interop
{:no-doc true}
(:refer-clojure :exclude [eval demunge var?])
(:require [clojure.string :as str]
[sci.impl.macros :as macros]
[sci.impl.types :as t]
[sci.impl.vars :as vars]
[sci.lang :as lang]))
(defn dynamic-var
([name]
(dynamic-var name nil (meta... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/c273b5d3f516556d38add478191260ecb9d03223/corpus/aliased_namespaces/interop.cljc | clojure | (ns interop
{:no-doc true}
(:refer-clojure :exclude [eval demunge var?])
(:require [clojure.string :as str]
[sci.impl.macros :as macros]
[sci.impl.types :as t]
[sci.impl.vars :as vars]
[sci.lang :as lang]))
(defn dynamic-var
([name]
(dynamic-var name nil (meta... | |
bf04adcdf8724f47d0a26cebd0ad237f2299c72b8090f96ad57488b18a64e464 | lukaszcz/coqhammer | msg.ml |
open Feedback
let error s = msg_notice (Pp.str ("Error: " ^ s))
let notice s = msg_notice (Pp.str s)
let info s = msg_info (Pp.str s)
| null | https://raw.githubusercontent.com/lukaszcz/coqhammer/fe83fb0eaf33f56da9ea1983114d0d94a2c41b9b/src/plugin/msg.ml | ocaml |
open Feedback
let error s = msg_notice (Pp.str ("Error: " ^ s))
let notice s = msg_notice (Pp.str s)
let info s = msg_info (Pp.str s)
| |
32d50651998efe839b266e882f819ea8de96b37543575ccce9f6a0cfd734b1ba | rbardou/red | command.ml | open Misc
module H = Help
(* Built-in command definitions. *)
type command =
{
name: string;
help: (Help.maker -> unit) option;
partial: Redl.Typing.command Redl.Typing.partial;
}
(* List of all built-in commands. *)
let commands: command list ref = ref []
type _ typ =
| Command: Redl.Typing.comma... | null | https://raw.githubusercontent.com/rbardou/red/e23c2830909b9e5cd6afe563313435ddaeda90bf/src/command.ml | ocaml | Built-in command definitions.
List of all built-in commands.
Make a parameterized command type.
Add a command, parameterized or not, to the list of built-in commands.
Declare command.
Declare help page.
****************************************************************************
... | open Misc
module H = Help
type command =
{
name: string;
help: (Help.maker -> unit) option;
partial: Redl.Typing.command Redl.Typing.partial;
}
let commands: command list ref = ref []
type _ typ =
| Command: Redl.Typing.command typ
| Function: { parameter_name: string; parameter_type: ('p, 'p) R... |
d3b8f55e7c4cf8830a468855f8df7c47ea23c73554831466cd6b03c60bf860a7 | tisnik/clojure-examples | details.clj | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/kafka-stream-pipe-2/target/default/classes",
:depen... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/ad495c2443e542269cf4784fd5cfa62787cdff98/kafka-stream-pipe-2/doc/details.clj | clojure | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/kafka-stream-pipe-2/target/default/classes",
:depen... | |
980672e0a06837d466436c7c67027abce24522bfb773947dadfe2a699762e9c0 | bgusach/exercises-htdp2e | ex-273.rkt | #lang htdp/isl
(require test-engine/racket-tests)
# # # Data Definitions
# # # Functions
; [A B] [A -> B] [List-of A] -> [List-of B]
(check-expect (map-clone add1 '()) '())
(check-expect (map-clone add1 '(1 2 3)) '(2 3 4))
(define (map-clone fn l)
(local
(; [A B] A B -> B
(define (merge x acc)
... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-273.rkt | racket | [A B] [A -> B] [List-of A] -> [List-of B]
[A B] A B -> B | #lang htdp/isl
(require test-engine/racket-tests)
# # # Data Definitions
# # # Functions
(check-expect (map-clone add1 '()) '())
(check-expect (map-clone add1 '(1 2 3)) '(2 3 4))
(define (map-clone fn l)
(local
(define (merge x acc)
(cons (fn x) acc)
))
(foldr merge '() l)
))
(tes... |
0c6ee77ae0740e85c9cfff70f21f989718afe8f782e63f37054cfee3b324bf78 | mainland/ref-fd | Ref.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - warnings - deprecations #
-- |
Module : Control . . Ref
Copyright : ( c ) Harvard University 2006 - 2011
... | null | https://raw.githubusercontent.com/mainland/ref-fd/9a95b1ccb5c637a6e29299b3d71c76c3ad1d7f98/Control/Monad/Ref.hs | haskell | |
License : BSD-style
Stability : experimental
Portability : non-portable
|The 'MonadRef' type class abstracts over the details of manipulating
references, allowing one to write code that uses references and can operate
in any monad that supports reference operations.
|Read the value of a reference
|... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - warnings - deprecations #
Module : Control . . Ref
Copyright : ( c ) Harvard University 2006 - 2011
( c... |
ec208c94ef8069c4085479ce575f4954bede5a00de9e75febae14e6e89c41c36 | jrh13/hol-light | platonic.ml | (* ========================================================================= *)
The five Platonic solids exist and there are no others .
(* ========================================================================= *)
needs "100/polyhedron.ml";;
needs "Multivariate/cross.ml";;
prioritize_real();;
... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/100/platonic.ml | ocaml | =========================================================================
=========================================================================
-------------------------------------------------------------------------
-------------------------------------------------------------------------
---------------... | The five Platonic solids exist and there are no others .
needs "100/polyhedron.ml";;
needs "Multivariate/cross.ml";;
prioritize_real();;
Some standard regular polyhedra ( vertex coordinates from Wikipedia ) .
let std_tetrahedron = new_definition
`std_tetrahedron =
convex hull
... |
dc8f4676c6f6b7b0553cd8b89c168b34c442f79cf73426f5d4d014e4cdd22b84 | futurice/haskell-mega-repo | Auth.hs | module Futurice.App.FUM.Auth where
import Control.Concurrent.STM (atomically, readTVar)
import Control.Lens (has)
import Futurice.Prelude
import Futurice.Exit
import Prelude ()
import Servant (Handler)
import Futurice.App.FUM.ACL
import Futurice.App.FUM.Ctx
import Futurice.App.FUM.Types
impo... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/fum-carbon-app/src/Futurice/App/FUM/Auth.hs | haskell | | Wrap endpoint requiring authentication.
^ Response to unauthenticated users | module Futurice.App.FUM.Auth where
import Control.Concurrent.STM (atomically, readTVar)
import Control.Lens (has)
import Futurice.Prelude
import Futurice.Exit
import Prelude ()
import Servant (Handler)
import Futurice.App.FUM.ACL
import Futurice.App.FUM.Ctx
import Futurice.App.FUM.Types
impo... |
a4b36e34ea4305bfafbbe6986f3ecb08c7bcfad664e549a323cfe584b584bc76 | s-expressionists/ctype | classes.lisp | (in-package #:ctype)
(defclass ctype () ())
(defmethod make-load-form ((obj ctype) &optional env)
(make-load-form-saving-slots obj :environment env))
;; A ctype corresponding to a class.
;; Note that to avoid complication, classes that could be some other ctype must
be instead of this . E.g. T , CONS , LIST , ARR... | null | https://raw.githubusercontent.com/s-expressionists/ctype/977f4bfce65c721ac1bb545ae52ec3873068831e/classes.lisp | lisp | A ctype corresponding to a class.
Note that to avoid complication, classes that could be some other ctype must
NIL means no bound, i.e. * in the type specifier.
The upgraded complex part type is some thing that can be meaningfully
Can be * to indicate all possible. Should be more efficient that way.
Other than th... | (in-package #:ctype)
(defclass ctype () ())
(defmethod make-load-form ((obj ctype) &optional env)
(make-load-form-saving-slots obj :environment env))
be instead of this . E.g. T , CONS , LIST , ARRAY , INTEGER must not end up as
cclass ctypes . SEQUENCE and subclasses of FUNCTION are handled specially
in pair... |
e8697009e096adb8f6cbb373c5f9ff1d9ed7e53bcb286bb9470b668728938455 | xach/octree | hex-art.lisp | ;;;; hex-art.lisp
(in-package #:octree)
(defun hex-path (centerpoint radius)
"Create a hexagon path centered at CENTERPOINT."
(let ((step (* pi 1/3))
(angle 0))
(move-to (add centerpoint (apoint angle radius)))
(dotimes (i 5)
(incf angle step)
(line-to (add centerpoint (apoint angle ra... | null | https://raw.githubusercontent.com/xach/octree/70c5ba6a5ddbf6d05540dad561e9ceffe6255da7/hex-art.lisp | lisp | hex-art.lisp |
(in-package #:octree)
(defun hex-path (centerpoint radius)
"Create a hexagon path centered at CENTERPOINT."
(let ((step (* pi 1/3))
(angle 0))
(move-to (add centerpoint (apoint angle radius)))
(dotimes (i 5)
(incf angle step)
(line-to (add centerpoint (apoint angle radius))))
(clos... |
8259b99df875b9d5b3f4968cae31230519d30bd5ee5f98a9dc71f46d3e0c3bdd | manetu/temporal-clojure-sdk | env.clj | Copyright © 2022 , Inc. All rights reserved
(ns temporal.testing.env
"Methods and utilities to assist with unit-testing Temporal workflows"
(:require [temporal.client.worker :as worker]
[temporal.internal.utils :as u])
(:import [io.temporal.testing TestWorkflowEnvironment]))
(defn create
"
Cr... | null | https://raw.githubusercontent.com/manetu/temporal-clojure-sdk/aa148b656c523d95b6b377081aa8c2ae68b32828/src/temporal/testing/env.clj | clojure | create and invoke workflows | Copyright © 2022 , Inc. All rights reserved
(ns temporal.testing.env
"Methods and utilities to assist with unit-testing Temporal workflows"
(:require [temporal.client.worker :as worker]
[temporal.internal.utils :as u])
(:import [io.temporal.testing TestWorkflowEnvironment]))
(defn create
"
Cr... |
f40c798f99117c12245da099544fec3fbaaa918dbe27c53dded5c6e06ce1b4f3 | mzp/coq-ruby | extract_env.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/extraction/extract_env.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s This module declares the extractio... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : extract_env.mli 1... |
d312f06cb87e861a012ba100a441219d88e1dcd7fcb3f16cade66ac26933106e | sapur/hexe | Hexe.hs | # LANGUAGE RecordWildCards #
module Hexe (hexeMain) where
import Control.Exception
import Control.Monad
import Data.Maybe
import System.Directory
import System.FilePath
import System.IO
import Text.Printf
import Graphics.Vty hiding (update, setMode)
import Command.Execute
import Command.Parser
import Control
import ... | null | https://raw.githubusercontent.com/sapur/hexe/e01036a1f8213938f9e1c72afc6aff48ba7fb0fd/src/Hexe.hs | haskell | defaults above --
command-line arguments below -- | # LANGUAGE RecordWildCards #
module Hexe (hexeMain) where
import Control.Exception
import Control.Monad
import Data.Maybe
import System.Directory
import System.FilePath
import System.IO
import Text.Printf
import Graphics.Vty hiding (update, setMode)
import Command.Execute
import Command.Parser
import Control
import ... |
17bb198dbee0fc50614ac80b939ef391395c856f542b678bf48876b7a03e4cd2 | ghcjs/ghcjs-dom | SpeechRecognition.hs | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.SpeechRecognition
(newSpeechRecognition, getMaxAlternatives, setMaxAlternatives,
getGrammars, setGrammars, getLang, setLang,
getInterimResults, setInterimResults,
getContinuous, setContinuous,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/SpeechRecognition.hs | haskell | | <-US/docs/Web/API/SpeechRecognition Mozilla SpeechRecognition documentation>
| <-US/docs/Web/API/SpeechRecognition.grammars Mozilla SpeechRecognition.grammars documentation>
| <-US/docs/Web/API/SpeechRecognition.grammars Mozilla SpeechRecognition.grammars documentation>
| <-US/docs/Web/API/SpeechRecognition.onaud... | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.SpeechRecognition
(newSpeechRecognition, getMaxAlternatives, setMaxAlternatives,
getGrammars, setGrammars, getLang, setLang,
getInterimResults, setInterimResults,
getContinuous, setContinuous,
... |
a443b6760052e24a386fc04a63fbedbc035f3d92a5a3f57aeeab6969db5539e9 | cpeikert/Lol | Benchmarks.hs | |
Module : Crypto . Lol . Applications . Examples
Description : Benchmarks for cryptographic applications .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Tensor - polymorphic benchmarks... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol-apps/Crypto/Lol/Applications/Benchmarks.hs | haskell | |
Module : Crypto . Lol . Applications . Examples
Description : Benchmarks for cryptographic applications .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Tensor - polymorphic benchmarks... | |
8fdf9b4359e9a6762b4640ef65eeac6ae31a09859bee96e3b9674ada713ee304 | serokell/tzbot | GetTimeshiftsSpec.hs | SPDX - FileCopyrightText : 2022 >
--
SPDX - License - Identifier : MPL-2.0
module Test.TzBot.GetTimeshiftsSpec
( test_getTimeshiftsSpec
, test_checkForTimeshifts
) where
import Universum
import Data.Time (UTCTime)
import Data.Time.TZInfo
import Data.Time.TZInfo qualified as TZI
import Data.Time.TZTime (... | null | https://raw.githubusercontent.com/serokell/tzbot/ef9c80a941474703ff8ab5eabb782e09c63928a9/test/Test/TzBot/GetTimeshiftsSpec.hs | haskell |
but we only check for offset changes in the past, so we don't return anything. | SPDX - FileCopyrightText : 2022 >
SPDX - License - Identifier : MPL-2.0
module Test.TzBot.GetTimeshiftsSpec
( test_getTimeshiftsSpec
, test_checkForTimeshifts
) where
import Universum
import Data.Time (UTCTime)
import Data.Time.TZInfo
import Data.Time.TZInfo qualified as TZI
import Data.Time.TZTime (toU... |
485be3261b7e43f578b057261f2e0b39bd5b944be7baf1d56c5b99d287de8b36 | jimpil/clambda | project.clj | (defproject clambda "0.1.6-SNAPSHOT"
:description "Utilities for working with Java Streams/Lambdas from Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:profiles {:dev {:dependencies [[org.clojure/clojure "1.10.1"]
[or... | null | https://raw.githubusercontent.com/jimpil/clambda/176831945e12e0736cee00b53d2b9a6a1b8c6964/project.clj | clojure | exact match of the test dictionary
["vcs" "push"]
lein release :patch | (defproject clambda "0.1.6-SNAPSHOT"
:description "Utilities for working with Java Streams/Lambdas from Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:profiles {:dev {:dependencies [[org.clojure/clojure "1.10.1"]
[or... |
8f554762b0e0c01caf904f526514322f9b8932b1897adaf2f4c8507a84014cd8 | gpetiot/Frama-C-StaDy | env.ml | open Cil_types
type t = Cil_types.varinfo list * Cil_types.stmt list * Cil_types.stmt list
let empty = ([], [], [])
let merge (v1, s1, c1) (v2, s2, c2) =
( List.rev_append (List.rev v1) v2
, List.rev_append (List.rev s1) s2
, List.rev_append (List.rev c1) c2 )
let make v s c = (v, s, c)
let loc = Cil_datatyp... | null | https://raw.githubusercontent.com/gpetiot/Frama-C-StaDy/48d8677c0c145d730d7f94e37b7b3e3a80fd1a27/env.ml | ocaml | open Cil_types
type t = Cil_types.varinfo list * Cil_types.stmt list * Cil_types.stmt list
let empty = ([], [], [])
let merge (v1, s1, c1) (v2, s2, c2) =
( List.rev_append (List.rev v1) v2
, List.rev_append (List.rev s1) s2
, List.rev_append (List.rev c1) c2 )
let make v s c = (v, s, c)
let loc = Cil_datatyp... | |
69d0291c41b9ad4f086c9800271f14cc517a52828642423ce34001d3c6aefb48 | Elzair/nazghul | lever.scm | ;; A lever is a basic binary mechanism.
(define (lever-state on?)
(if on?
(state-mk 's_R_lever_up #f pclass-none 0)
(state-mk 's_R_lever_down #f pclass-none 0)))
(define lever-ifc
(ifc bim-ifc
(method 'handle bim-toggle)
(method 'state lever-state)))
(mk-obj-type 't_lever "lever" '() la... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/template/lib/lever.scm | scheme | A lever is a basic binary mechanism.
----------------------------------------------------------------------------
Disguised lever
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Searchable Description of hidden ... |
(define (lever-state on?)
(if on?
(state-mk 's_R_lever_up #f pclass-none 0)
(state-mk 's_R_lever_down #f pclass-none 0)))
(define lever-ifc
(ifc bim-ifc
(method 'handle bim-toggle)
(method 'state lever-state)))
(mk-obj-type 't_lever "lever" '() layer-mechanism lever-ifc)
(define (mk-le... |
14a1c32676af025f8eb1a013f8e3d9757d4eccd0d6c8eb1171d6230b7706b366 | uxbox/uxbox-backend | locks.clj | 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 ) 2016 < >
(ns uxbox.locks
"Advirsory locks for specific handling concurrent modifications
on particular objects in t... | null | https://raw.githubusercontent.com/uxbox/uxbox-backend/036c42db8424be3ac34c38be80577ee279141681/src/uxbox/locks.clj | clojure | 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 ) 2016 < >
(ns uxbox.locks
"Advirsory locks for specific handling concurrent modifications
on particular objects in the ... | |
976ac5ec804bbe96cc873f535f60f378c07eeddf9373106a90b17968cedf860c | MassD/99 | graph.ml | type 'a edge_clause = ('a * 'a) list
type 'a graph_term = {nodes: 'a list; edges : ('a *'a) list}
type 'a human_friendly = string
let edge_clause_to_graph_term l =
let rec rm_dup acc = function
| [] -> acc
| (x,y)::tl ->
if List.mem x acc && List.mem y acc then rm_dup (acc) tl
else if List.mem ... | null | https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/80-89%2B94-graphs/graph.ml | ocaml | type 'a edge_clause = ('a * 'a) list
type 'a graph_term = {nodes: 'a list; edges : ('a *'a) list}
type 'a human_friendly = string
let edge_clause_to_graph_term l =
let rec rm_dup acc = function
| [] -> acc
| (x,y)::tl ->
if List.mem x acc && List.mem y acc then rm_dup (acc) tl
else if List.mem ... | |
92a1dae58f481a41628cdfe01c0714dd77ca13e7ba01b39dbf4adc414b9c0324 | singleheart/programming-in-haskell | ex5.hs | (&&) :: Bool -> Bool -> Bool
a && b =
if a == True
then if b == True
then True
else False
else False
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch04/ex5.hs | haskell | (&&) :: Bool -> Bool -> Bool
a && b =
if a == True
then if b == True
then True
else False
else False
| |
f9813fe3146dc4854be6f6db8464df38d86b1c6f417e2139aa1c98325147cb73 | tezos/tezos-mirror | node_context.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 TriliTech < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/1b26ce0f9c2a9c508a65c45641a0a146d9b52fc7/src/proto_016_PtMumbai/lib_sc_rollup_node/node_context.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 TriliTech < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER... |
9bfd51f517426d30e4c6ad94a0c9e2210caca94dc6ddc03c78467a248f7a6f90 | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("scheme-lib" ("base" #:version "6.5.0.2") "net-lib" "sandbox-lib" ("scribble-lib" #:version "1.34") "racket-index"))) (define build-deps (quote ("rackunit-doc" "compatibility" "errortrace-doc" "typed-racket-doc" "at-exp-li... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/d336bb10e3e0ec3a20020e9ade9e77d2f6f80b6d/share/pkgs/racket-doc/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("scheme-lib" ("base" #:version "6.5.0.2") "net-lib" "sandbox-lib" ("scribble-lib" #:version "1.34") "racket-index"))) (define build-deps (quote ("rackunit-doc" "compatibility" "errortrace-doc" "typed-racket-doc" "at-exp-li... | |
5c261e4c948271a1b9a6129617a19cf03735319dbe2a7a3162555d884b20784a | borodust/claw-legacy | struct.lisp | (cl:in-package :claw.cffi.c)
(declaim (special *anonymous-field-number*))
(uiop:define-package :%claw.anonymous
(:use))
(defun next-anonymous-field-number ()
(prog1 *anonymous-field-number*
(incf *anonymous-field-number*)))
;;;
;;; RECORD
;;;
(defun field-c-name->lisp (field)
(let ((name (claw.spec:for... | null | https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/cffi/c/generator/struct.lisp | lisp |
RECORD
STRUCT
UNION
| (cl:in-package :claw.cffi.c)
(declaim (special *anonymous-field-number*))
(uiop:define-package :%claw.anonymous
(:use))
(defun next-anonymous-field-number ()
(prog1 *anonymous-field-number*
(incf *anonymous-field-number*)))
(defun field-c-name->lisp (field)
(let ((name (claw.spec:foreign-entity-name fi... |
99d79a9f47d5d7283538b71f46bb1fd22bdb74ad09608cbc3678e0aa9e0d16cd | shayan-najd/NativeMetaprogramming | RecompilationChecking.hs | module Options.RecompilationChecking where
import Types
recompilationCheckingOptions :: [Flag]
recompilationCheckingOptions =
[ flag { flagName = "-fforce-recomp"
, flagDescription =
"Turn off recompilation checking. This is implied by any " ++
"``-ddump-X`` option when compiling a si... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/utils/mkUserGuidePart/Options/RecompilationChecking.hs | haskell | module Options.RecompilationChecking where
import Types
recompilationCheckingOptions :: [Flag]
recompilationCheckingOptions =
[ flag { flagName = "-fforce-recomp"
, flagDescription =
"Turn off recompilation checking. This is implied by any " ++
"``-ddump-X`` option when compiling a si... | |
ade8edc8f9da8ca47442be09982c39a41f47c1bcbff544ec28ed2218da7d741f | blancas/tinypost | main.clj | Copyright ( c ) 2013 . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; ... | null | https://raw.githubusercontent.com/blancas/tinypost/1afc54017e68a488a428cae0c417130b1721610d/src/main/clojure/blancas/tinypost/main.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) 2013 . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns blancas.tinypost.main
(:gen-class)
(:use [blancas.tinypost scan interpret]))
(defn -main
"\nRuns a PostScript program.
Usage: ps <file>
file A PostScript source file."
[& args]
(try
(if-let [file (firs... |
5bad6b461d68406ec2f5a94149df0ad7aea2bd4e02c0fa6ac3f87822edd0050a | philoskim/debux | core.clj | (ns examples.core
(:require [debux.core :as d])
(:gen-class))
(defn -main []
(println "\nRunning debux examples...\n")
;(d/set-debug-mode! false)
;(d/set-ns-whitelist! ["example.dbg*"])
;(d/set-ns-blacklist! ["example.dbgn"])
You should require dynamically the namespaces that you want to laod
;; if y... | null | https://raw.githubusercontent.com/philoskim/debux/24c0641499c21ad86eb43f6b7ca7b7164df8ea37/examples/src/clj/examples/core.clj | clojure | (d/set-debug-mode! false)
(d/set-ns-whitelist! ["example.dbg*"])
(d/set-ns-blacklist! ["example.dbgn"])
if you want to use set-ns-blacklist! or set-ns-whitelist!.
(require 'examples.demo)
(require 'examples.lab) | (ns examples.core
(:require [debux.core :as d])
(:gen-class))
(defn -main []
(println "\nRunning debux examples...\n")
You should require dynamically the namespaces that you want to laod
(require 'examples.common)
(require 'examples.dbg)
(require 'examples.dbgn)
(require 'examples.options)
(requir... |
c553d85509de5fa5afb37de5ff762ef270be6689e9a3facae3de0f9db8efad78 | homebaseio/datalog-console | tree_table.cljs | (ns datalog-console.components.tree-table
{:no-doc true}
(:require [reagent.core :as r]
[clojure.set]))
(declare tree-table)
(defn table-row []
(let [open? (r/atom false)]
(fn [{:keys [level row expandable-row? expand-row render-col full-width? _conn] :as props}]
[:<>
[:tr {:class "... | null | https://raw.githubusercontent.com/homebaseio/datalog-console/a041f920ffb6434a14f81efe79197d56819d6363/src/main/datalog_console/components/tree_table.cljs | clojure | truncate
top-0 left-2.5 absolute h - full border - gray-300 border - l transform hover : border - l-6 hover:-translate - x-1 focus : outline - none | (ns datalog-console.components.tree-table
{:no-doc true}
(:require [reagent.core :as r]
[clojure.set]))
(declare tree-table)
(defn table-row []
(let [open? (r/atom false)]
(fn [{:keys [level row expandable-row? expand-row render-col full-width? _conn] :as props}]
[:<>
[:tr {:class "... |
1355076d4724136e4456c807b5cffb0e51c25f2d73554ac0216a1369a0860d00 | taruen/apertiumpp | add-travis-yml.rkt | #lang racket
Add .travis.yml file to an Apertium linguistic data package if it 's missing
By default , will only ` make ' the package . It wo n't run ` make test '
; or `make check` or anything else.
(require rash)
(require "turkic-repos.rkt")
(define MONOLINGUAL-TRAVIS-YML
#<<end
dist: xenial
before_install:... | null | https://raw.githubusercontent.com/taruen/apertiumpp/73eeacc19015170e54c77824e015224f6456cf3e/apertiumpp/cookbook/add-travis-yml.rkt | racket | or `make check` or anything else.
(for ([l MONOLINGUAL])
git pull
etc | #lang racket
Add .travis.yml file to an Apertium linguistic data package if it 's missing
By default , will only ` make ' the package . It wo n't run ` make test '
(require rash)
(require "turkic-repos.rkt")
(define MONOLINGUAL-TRAVIS-YML
#<<end
dist: xenial
before_install:
- wget -nightly.sh -O - | sudo ... |
221206ec0ee732258943ab125d776d7766571b4d8372d9cbabba2c416399f5dd | racket/htdp | abstraction.rkt | #lang racket
(provide (all-from-out 2htdp/abstraction))
(require 2htdp/abstraction)
| null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/teachpack/2htdp/abstraction.rkt | racket | #lang racket
(provide (all-from-out 2htdp/abstraction))
(require 2htdp/abstraction)
| |
cc876e4cd308d60531f67088d89ed82ce9b809848fa753639b12827d607ef7fe | mlemerre/l-lang | cpsbase.ml | include Cpsbasepack.Cpsdef;;
module Print = Cpsbasepack.Cpsprint;;
module Change = Cpsbasepack.Cpschange;;
module Build = Cpsbasepack.Cpsbuild;;
module Check = Cpsbasepack.Cpscheck;;
module Traverse = Cpsbasepack.Cpstraverse;;
module type VAR = sig
type var
type occur_maker
type occur
module Var: sig
type... | null | https://raw.githubusercontent.com/mlemerre/l-lang/88201e861c6cc30bb3b9510d7f55c681eded4085/src/cps/cpsbase.ml | ocaml | include Cpsbasepack.Cpsdef;;
module Print = Cpsbasepack.Cpsprint;;
module Change = Cpsbasepack.Cpschange;;
module Build = Cpsbasepack.Cpsbuild;;
module Check = Cpsbasepack.Cpscheck;;
module Traverse = Cpsbasepack.Cpstraverse;;
module type VAR = sig
type var
type occur_maker
type occur
module Var: sig
type... | |
e982723ecc90e7852d0190a5849c13b0e7b46219d09f2b9337a1be42beb9783b | mark-watson/lisp_practical_semantic_web | packages.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
$ Header : /usr / local / cvsrep / drakma / packages.lisp , v 1.22 2008/01/14 01:57:01 edi Exp $
Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;;... | null | https://raw.githubusercontent.com/mark-watson/lisp_practical_semantic_web/2d9d5bb06b574ab0bff15664fe747a5b99e1fb1b/utils/drakma-1.2.3/packages.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | $ Header : /usr / local / cvsrep / drakma / packages.lisp , v 1.22 2008/01/14 01:57:01 edi Exp $
Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package ... |
548c4e801331f3fe1ebbe2ed7b223b3e6a6ed5377b8933d33c164a6a8a3e4c21 | haskell-works/avro | JSONSpec.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Avro.JSONSpec where
import Control.Monad (forM_)
import Control.Monad.Identity (Identity (..))
import qualified Data.Aeson as Aeson
import qualified Da... | null | https://raw.githubusercontent.com/haskell-works/avro/aeea12b07a1c6fcc3708d1afe7209c5497665296/test/Avro/JSONSpec.hs | haskell | # LANGUAGE OverloadedStrings #
it "should do roundtrip (enums)" $ require $ property $ do
it "should do roundtrip (reused)" $ require $ property $ do
msg <- forAll reusedWrapperGen
it "should do roundtrip (small)" $ require $ property $ do
msg <- forAll endpointGen
enumsExampleJSON <- runIO $ getFileName "t... | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Avro.JSONSpec where
import Control.Monad (forM_)
import Control.Monad.Identity (Identity (..))
import qualified Data.Aeson as Aeson
import qualified Data.ByteString as BS
import qua... |
1e0736cea2a831275aa563b0e13dcf2cb0e926541104ac55786343c47c5ca3b2 | fosskers/kanji | Base.hs | {-# LANGUAGE OverloadedStrings #-}
module Pages.Base where
import Lucid
import Lucid.Base (makeAttribute)
import Pages.Bootstrap
---
-- | The basic template for all pages.
base :: Html () -> Html ()
base content = do
doctype_
html_ $ do
head_ $ do
meta_ [charset_ "utf-8"]
title_ "NanQ - Analyse ... | null | https://raw.githubusercontent.com/fosskers/kanji/93dd7d16d1a3690db36ca0ffbeb21e05083c42ea/nanq-site/Pages/Base.hs | haskell | # LANGUAGE OverloadedStrings #
-
| The basic template for all pages.
| The Home Page, accessible through the `/` endpoint. |
module Pages.Base where
import Lucid
import Lucid.Base (makeAttribute)
import Pages.Bootstrap
base :: Html () -> Html ()
base content = do
doctype_
html_ $ do
head_ $ do
meta_ [charset_ "utf-8"]
title_ "NanQ - Analyse Japanese Text"
link_ [ href_ "/assets/bootstrap.min.css"
, r... |
50b2a12e3977fae75889208c732ffe50223423c955c6aa296204b03b02442286 | DanielG/ghc-mod | MonadSpec.hs | module MonadSpec where
import Test.Hspec
import TestUtils
import Control.Monad.Error.Class
import Control.Concurrent
import Control.Exception
spec :: Spec
spec = do
describe "When using GhcModT in a do block" $
it "a pattern match failure causes a call to `fail` on ErrorT in the monad stack" $ do
... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/MonadSpec.hs | haskell | module MonadSpec where
import Test.Hspec
import TestUtils
import Control.Monad.Error.Class
import Control.Concurrent
import Control.Exception
spec :: Spec
spec = do
describe "When using GhcModT in a do block" $
it "a pattern match failure causes a call to `fail` on ErrorT in the monad stack" $ do
... | |
c1ce850ed05b629b5dabbadc5632423d03fc1e3b1e95d1d0a574182ff050e555 | parapluu/Concuerror | ets_new.erl | %%%----------------------------------------------------------------------
Copyright ( c ) 2012 , < > ,
< >
and < > .
%%% All rights reserved.
%%%
This file is distributed under the Simplified BSD License .
%%% Details can be found in the LICENSE file.
%%%------------... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/ets_new.erl | erlang | ----------------------------------------------------------------------
All rights reserved.
Details can be found in the LICENSE file.
----------------------------------------------------------------------
Description : Test the `ets:new' instrumentation
--------------------------------------------------------------... | Copyright ( c ) 2012 , < > ,
< >
and < > .
This file is distributed under the Simplified BSD License .
Authors : < >
-module(ets_new).
-export([scenarios/0]).
-export([test/0]).
scenarios() ->
[{test, inf, dpor}].
test() ->
spawn(fun child/0),
... |
e5c48ba7e55e052c6419cc3d04b63745e4fed817fad757df23b823c3b427dc46 | bmeurer/ocaml-rbtrees | rbset.ml | -
* Copyright ( c ) 2007 , < >
*
* Permission is hereby granted , free of charge , to any person obtaining a
* copy of this software and associated documentation files ( the " Software " ) ,
* to deal in the Software without restriction , including without limitation
* the rights to use , copy , mo... | null | https://raw.githubusercontent.com/bmeurer/ocaml-rbtrees/06c879da5b009025e65b9cbe9a36405bcf301f35/src/rbset.ml | ocaml | -
* Copyright ( c ) 2007 , < >
*
* Permission is hereby granted , free of charge , to any person obtaining a
* copy of this software and associated documentation files ( the " Software " ) ,
* to deal in the Software without restriction , including without limitation
* the rights to use , copy , mo... | |
f8c438a01b65820c1ae1c5dda02cefde907e07af3134123e47422e385d53c02b | losfair/Violet | Gpr.hs | module Violet.Backend.Gpr where
import Clash.Prelude
import Violet.Types.Gpr
import qualified Violet.Types.Fifo as FifoT
gpr :: HiddenClockResetEnable dom
=> Signal dom ((FifoT.FifoItem, FifoT.FifoItem), WritePort, WritePort)
-> Signal dom ((RegValue, RegValue), (RegValue, RegValue))
gpr inputs = bundle (bund... | null | https://raw.githubusercontent.com/losfair/Violet/dcdd05f8dc08a438a157347f424966da73ccc9b8/src/Violet/Backend/Gpr.hs | haskell | module Violet.Backend.Gpr where
import Clash.Prelude
import Violet.Types.Gpr
import qualified Violet.Types.Fifo as FifoT
gpr :: HiddenClockResetEnable dom
=> Signal dom ((FifoT.FifoItem, FifoT.FifoItem), WritePort, WritePort)
-> Signal dom ((RegValue, RegValue), (RegValue, RegValue))
gpr inputs = bundle (bund... | |
5436b7df838e92f0938c17016fcc38afd9e475940e1f72c2a41abe8622f3f351 | qkrgud55/ocamlmulti | main.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/testsuite/tests/tool-lexyacc/main.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 .
$ I d : main.ml 11156 2011 - 07 - 27 ... |
663e6e62acaded632e9abcd940ae3e429da6837abfa1f932a58e3a95766e7671 | drdo/logic-translation | Parse.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE UnicodeSyntax #
module Parse
( tlP, fomloP
, ParseError (..), parseText, parseString
)
where
import Data.ByteString (ByteString)
import Data.Char
import Data.Functor.Identity
import Data.Text (Text)
import Text.Parsec
import qualified Data.ByteString.UTF8 as BSU8
import ... | null | https://raw.githubusercontent.com/drdo/logic-translation/3efca7ce74b2e018a6ac4a8dacfc8a2dcfbd467f/library/Parse.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------
------------------
------------------------------------------------------------------------------ | # LANGUAGE FlexibleContexts #
# LANGUAGE UnicodeSyntax #
module Parse
( tlP, fomloP
, ParseError (..), parseText, parseString
)
where
import Data.ByteString (ByteString)
import Data.Char
import Data.Functor.Identity
import Data.Text (Text)
import Text.Parsec
import qualified Data.ByteString.UTF8 as BSU8
import ... |
d58c13693776a37bfc3aac5825c1b3b35466e742a2bd5ba91dd00a3cba6c2a3e | xsc/kithara | confirmation_defaults.clj | (ns kithara.middlewares.confirmation-defaults
(:require [manifold.deferred :as d]))
(defn- postprocess
[result default-confirmation error-confirmation]
(if (map? result)
(if (keyword? (:status result))
result
(merge default-confirmation result))
default-confirmation))
(defn- confirm-error
... | null | https://raw.githubusercontent.com/xsc/kithara/3394a9e9ef5e6e605637a74e070c7d24bfaf19cc/src/kithara/middlewares/confirmation_defaults.clj | clojure | (ns kithara.middlewares.confirmation-defaults
(:require [manifold.deferred :as d]))
(defn- postprocess
[result default-confirmation error-confirmation]
(if (map? result)
(if (keyword? (:status result))
result
(merge default-confirmation result))
default-confirmation))
(defn- confirm-error
... | |
27b67b025319fea90f53ad9667202666b5cdd8713964269beaddc6bf6ae8d9be | acl2/acl2 | decimal-digits-validation@useless-runes.lsp | (JAVA::GRAMMAR-DEC-DIGITP)
(JAVA::GRAMMAR-DEC-DIGITP-SUFF)
(JAVA::BOOLEANP-OF-GRAMMAR-DEC-DIGITP)
(JAVA::GRAMMAR-DEC-DIGITP)
(JAVA::SINGLETON-WHEN-GRAMMAR-DEC-DIGITP
(1606 1602 (:REWRITE DEFAULT-CAR))
(1602 1602 (:REWRITE CAR-WHEN-ALL-EQUALP))
(920 120 (:REWRITE ABNF::TREE-TERMINATEDP-OF-CAR-WHEN-TREE-LIST-TERMINATE... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/java/language/.sys/decimal-digits-validation%40useless-runes.lsp | lisp | (JAVA::GRAMMAR-DEC-DIGITP)
(JAVA::GRAMMAR-DEC-DIGITP-SUFF)
(JAVA::BOOLEANP-OF-GRAMMAR-DEC-DIGITP)
(JAVA::GRAMMAR-DEC-DIGITP)
(JAVA::SINGLETON-WHEN-GRAMMAR-DEC-DIGITP
(1606 1602 (:REWRITE DEFAULT-CAR))
(1602 1602 (:REWRITE CAR-WHEN-ALL-EQUALP))
(920 120 (:REWRITE ABNF::TREE-TERMINATEDP-OF-CAR-WHEN-TREE-LIST-TERMINATE... | |
f6756fd986c7a61285048f4beb13e3e1500c39ac6722fe500280f5b9ae1bf910 | replomancer/Swordfight | project.clj | (defproject swordfight "0.8.0-SNAPSHOT"
:description "Chess engine"
:url ""
:main swordfight.core
:license {:name "BSD-2-clause"
:url "-2-Clause"}
:dependencies [[org.clojure/clojure "1.9.0"]]
:profiles {:dev {:source-paths ["dev"]
:dependencies [[midje "1.9.0-alpha6"]
... | null | https://raw.githubusercontent.com/replomancer/Swordfight/4ac956d0c9076792774dd05db3f258a8c713c49c/project.clj | clojure | (defproject swordfight "0.8.0-SNAPSHOT"
:description "Chess engine"
:url ""
:main swordfight.core
:license {:name "BSD-2-clause"
:url "-2-Clause"}
:dependencies [[org.clojure/clojure "1.9.0"]]
:profiles {:dev {:source-paths ["dev"]
:dependencies [[midje "1.9.0-alpha6"]
... | |
f2652fdff955dfbc575388122466d29e3a9c481970f587a517cdc3b08e41db5d | darrenldl/stramon | ctx.ml | type 'a t = {
proc_ctxs : (int, Proc_ctx.t) Hashtbl.t;
mutable stats : Stats.t;
mutable user_ctx : 'a;
}
let make (user_ctx : 'a) : 'a t =
{
proc_ctxs = Hashtbl.create 100;
stats = Stats.empty;
user_ctx;
}
let get_user_ctx t = t.user_ctx
let set_user_ctx t x = t.user_ctx <- x
let get_stats t =... | null | https://raw.githubusercontent.com/darrenldl/stramon/60680249af7367301115158eaee5d8cc3c5ce506/lib/ctx.ml | ocaml | type 'a t = {
proc_ctxs : (int, Proc_ctx.t) Hashtbl.t;
mutable stats : Stats.t;
mutable user_ctx : 'a;
}
let make (user_ctx : 'a) : 'a t =
{
proc_ctxs = Hashtbl.create 100;
stats = Stats.empty;
user_ctx;
}
let get_user_ctx t = t.user_ctx
let set_user_ctx t x = t.user_ctx <- x
let get_stats t =... | |
95be6b0945c19005ded334ec2a0a173588d04ced01542e1b9e59cf00cc6da944 | ggreif/omega | CircularFinal.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , FlexibleContexts
, ViewPatterns , TypeOperators #
, ViewPatterns, TypeOperators #-}
import Prelude hiding (max, null, lookup, map)
import qualified Prelude as Prelude (max)
import Data.Map
import qualified Data.List as L
--import Data.Set hi... | null | https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/mosaic/CircularFinal.hs | haskell | import Data.Set hiding (singleton)
ICFP 2013
join monoid
operator for indeterministic choice
NOTE: unify must have a *much* more precise type, that describes all the
distinct islands that are known. Then it can be decided whether
obligations surface because of island merging. It must be a minimal
... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , FlexibleContexts
, ViewPatterns , TypeOperators #
, ViewPatterns, TypeOperators #-}
import Prelude hiding (max, null, lookup, map)
import qualified Prelude as Prelude (max)
import Data.Map
import qualified Data.List as L
import qualified Dat... |
07cbc9e0001f30e1634dddf5b277019f9e86c78f03d0cf799726429ac53260b5 | Akii/elescore | Bogestra.hs | # LANGUAGE DataKinds #
module Elescore.Integration.Bogestra
( runBogSource
) where
import ClassyPrelude
import Pipes
import Pipes.Concurrent
import qualified Pipes.Prelude as P
import Database.SimpleEventStore
import Elescore.Integration.... | null | https://raw.githubusercontent.com/Akii/elescore/216540f9891f8317179abd8dde215d7cd7deb448/src/Elescore/Integration/Bogestra.hs | haskell | # LANGUAGE DataKinds #
module Elescore.Integration.Bogestra
( runBogSource
) where
import ClassyPrelude
import Pipes
import Pipes.Concurrent
import qualified Pipes.Prelude as P
import Database.SimpleEventStore
import Elescore.Integration.... | |
a63cab6b315bbd3bbe92571ec87350fd773e23c4e35745a261dc007598771838 | mtravers/goddinpotty | templating_test.clj | (ns goddinpotty.templating-test
(:require [goddinpotty.templating :refer :all]
[goddinpotty.database :as db]
[org.parkerici.multitool.core :as u]
[clojure.test :refer :all]))
;;; → utils
(defn structure-contains?
[elt struct]
(u/walk-find #(= % elt) struct))
(deftest formatte... | null | https://raw.githubusercontent.com/mtravers/goddinpotty/b0b7f4fe5781a56b226d151d11a25130224bf093/test/goddinpotty/templating_test.clj | clojure | → utils | (ns goddinpotty.templating-test
(:require [goddinpotty.templating :refer :all]
[goddinpotty.database :as db]
[org.parkerici.multitool.core :as u]
[clojure.test :refer :all]))
(defn structure-contains?
[elt struct]
(u/walk-find #(= % elt) struct))
(deftest formatted-page-title... |
f272ebbfed8dbc584b6b559cfa7fe13715483d471b93f180e984dfd2df6f4789 | dariusf/ppx_polyprint | main.ml |
open Config
let rec fact n =
if n = 0 then 1 else n * fact (n - 1)
[@@tracerec Recursive]
let rec roll n =
match n with
| 0 -> ()
| 3 -> ignore @@ fact 5; roll 2
| n -> roll (n - 1)
[@@tracerec Recursive]
let rec fib n =
if n <= 1 then 1 else fib (n - 1) + fib (n - 2)
[@@tracerec Minimal]
let () ... | null | https://raw.githubusercontent.com/dariusf/ppx_polyprint/6cd87e948a27888d251f851424ad8bd5545989ad/examples/configs/src/main.ml | ocaml |
open Config
let rec fact n =
if n = 0 then 1 else n * fact (n - 1)
[@@tracerec Recursive]
let rec roll n =
match n with
| 0 -> ()
| 3 -> ignore @@ fact 5; roll 2
| n -> roll (n - 1)
[@@tracerec Recursive]
let rec fib n =
if n <= 1 then 1 else fib (n - 1) + fib (n - 2)
[@@tracerec Minimal]
let () ... | |
cfabee0661cf76b817abc7b6ee786f397470aba307ec6640f2fa8733f44adf37 | emqx/emqx | emqx_gateway_cm.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/33b3c4fa9a1a60e4b1574328043100aa93d655cf/apps/emqx_gateway/src/emqx_gateway_cm.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_gateway_cm).
-behaviour(gen_server).
-include("include/emqx_gateway.hrl").
-inclu... |
865419ade898e38c4976cbffd3c069bfa6ea50672d70cd45b0096cce947bd202 | cky/guile | curried-definitions.scm | Copyright ( C ) 2010 , 2013 Free Software Foundation , Inc.
;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any la... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/ice-9/curried-definitions.scm | scheme |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Se... | Copyright ( C ) 2010 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (ice-9 curried-definitions)
... |
7d02f4e9d3e296df8fa9efee1a381348c97f9afeb0da6e4a86cfad297e57c290 | fortytools/holumbus | IndexM.hs | -- ----------------------------------------------------------------------------
|
Module : . Build . Crawl
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Indexer functions for... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Build/IndexM.hs | haskell | ----------------------------------------------------------------------------
-----------------------------------------------------------------------------
# OPTIONS -fglasgow-exts #
-----------------------------------------------------------------------------
* Building indexes
* Indexer Configuration
import ... |
|
Module : . Build . Crawl
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Indexer functions for the monadic index class
Module : Holumbus.Build.Crawl
Copyright : C... |
1dc45396041d74fe43c116cd4b52a315558db63262b8d2026120fbb1ea3412dc | realworldocaml/mdx | label.ml |
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/realworldocaml/mdx/aa5551a8eb0669fa4561aeee55d6f1528661a510/lib/label.ml | ocaml | can not happen, filtered by the regexp
Specifies the language tag that is specified in the [mli] syntax, if
any. Can be left out if none is specified, in such case it will also
not be added back. |
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
894941b060ec18e0c9a732476ec9dc505adcce5d9aa6fb0318c9a78f3fa1d5b5 | fortytools/holumbus | Core.hs | {-# OPTIONS -XBangPatterns #-}
-- ------------------------------------------------------------
module Holumbus.Crawler.Core
where
import Control.Concurrent.MapFold ( mapFold )
import Control.Sequential.MapFoldBinary ( mapFoldBinaryM )
import Control.DeepSeq
import Control.Monad.Rea... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/crawl2/src/Holumbus/Crawler/Core.hs | haskell | # OPTIONS -XBangPatterns #
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
sequential crawling
sequential crawling with binary mapFold
parallel mapFold crawling
-----------------... |
module Holumbus.Crawler.Core
where
import Control.Concurrent.MapFold ( mapFold )
import Control.Sequential.MapFoldBinary ( mapFoldBinaryM )
import Control.DeepSeq
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.ReaderStateIO
import Data.B... |
5422a4c2ed97ab389fbc266b620f6b23cc9d6d0286f118088c6cfdc2585c9724 | ananthakumaran/webify | Webify.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
# LANGUAGE RecordWildCards #
import Control.Exception
import Control.Monad
import Data.Binary.Strict.Get
import qualified Data.ByteString as B
import Data.Monoid
import EOT
import Font ... | null | https://raw.githubusercontent.com/ananthakumaran/webify/e73fa2e3aa01512fe735dbf00a81e5909ccabbc9/src/Webify.hs | haskell | # OPTIONS_GHC -fno - warn - missing - signatures #
# LANGUAGE RecordWildCards #
import Control.Exception
import Control.Monad
import Data.Binary.Strict.Get
import qualified Data.ByteString as B
import Data.Monoid
import EOT
import Font ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.