_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 |
|---|---|---|---|---|---|---|---|---|
56a05a9ed369b8b97beaed73845832d16ee68bf51adfc3c19a960d628026696b | NetComposer/nksip | nksip_dialog_lib.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 th... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_dialog_lib.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 User Dialog Libr... |
0a040a3cba16fe6d294fd046759a701e8aaf98d11629f1af294934a401ac353c | MyDataFlow/ttalk-server | ejabberd_node_id.erl | %%%-------------------------------------------------------------------
@author Michael < >
( C ) 2013 , Uvarov Michael
%%% @doc Allocates unique ids for each node.
%%% @end
%%%-------------------------------------------------------------------
-module(ejabberd_node_id).
-export([start/0, node_id/0]).
-include(... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_node_id.erl | erlang | -------------------------------------------------------------------
@doc Allocates unique ids for each node.
@end
-------------------------------------------------------------------
====================================================================
API
==============================================================... | @author Michael < >
( C ) 2013 , Uvarov Michael
-module(ejabberd_node_id).
-export([start/0, node_id/0]).
-include("ejabberd.hrl").
-include("jlib.hrl").
-type nodeid() :: non_neg_integer().
-record(node, {name :: atom(),
id :: nodeid()
}).
跟新Mneisa中的Node的ID
start() ->
mnes... |
5ed7fd2ac4c9abc84e7171c9840ec9c16d9d454931f86bd21f2a87c5c717cc4c | cpeikert/ALCHEMY | List.hs |
module Crypto.Alchemy.Language.List where
-- | Symantics for list operations.
class List_ expr where
-- | Empty list.
nil_ :: expr e [a]
-- | List constructor (analogue of ':').
cons_ :: expr e (a -> [a] -> [a])
CJP : Keeping these out for now . They are n't useful until we have a
way to compare aga... | null | https://raw.githubusercontent.com/cpeikert/ALCHEMY/adbef64576c6f6885600da66f59c5a4ad91810b7/src/Crypto/Alchemy/Language/List.hs | haskell | | Symantics for list operations.
| Empty list.
| List constructor (analogue of ':').
| Head of list ( input must be nonempty ) .
| Tail of list ( input must be nonempty ) .
| Head of list (input must be nonempty).
| Tail of list (input must be nonempty). |
module Crypto.Alchemy.Language.List where
class List_ expr where
nil_ :: expr e [a]
cons_ :: expr e (a -> [a] -> [a])
CJP : Keeping these out for now . They are n't useful until we have a
way to compare against nil , and have conditionals in the language .
head _ : : expr e ( [ a ] - > a )
tai... |
e8502230abb08f68c57e1220d875d801bc4937f606beda0601c25981509c0305 | clash-lang/clash-prelude | Synchronizer.hs | |
Copyright : ( C ) 2015 - 2016 , University of Twente ,
2016 - 2017 , Myrtle Software Ltd ,
2017 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Synchronizer circuits for safe clock domain crossings
Copyright : (C) 2... | null | https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Explicit/Synchronizer.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE Safe #
# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #
# OPTIONS_HADDOCK show-extensions #
* Bit-synchronizers
* Word-synchronizers
* Dual flip-flop synchronize... | |
Copyright : ( C ) 2015 - 2016 , University of Twente ,
2016 - 2017 , Myrtle Software Ltd ,
2017 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Synchronizer circuits for safe clock domain crossings
Copyright : (C) 2... |
7d2ab51a76ecf40c29ad1e2b65fd907212f912b53b5998d576c6181922c354f9 | charlieg/Sparser | loader1.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992,1993.1994.1995 -- all rights reserved
extensions copyright ( c ) 2007 BBNT Solutions LLC . All Rights Reserved
$ Id:$
;;;
;;; File: "loader"
Module : " : names : places : countries : "
version : 1.1 October 199... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/places/countries/loader1.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "loader"
(8/6/07) added relation. | copyright ( c ) 1992,1993.1994.1995 -- all rights reserved
extensions copyright ( c ) 2007 BBNT Solutions LLC . All Rights Reserved
$ Id:$
Module : " : names : places : countries : "
version : 1.1 October 1993
initiated December 1990
1.0 ( 10/12/92 v2.1 ) introducing new semantics
1.1 ( ... |
134cc94bb7ffac2d7b4d6ab7ec69ec9ab072fcf564dbc31d28aa8c0aa1b1f2cd | Bogdanp/koyo | info.rkt | #lang info
(define collection "tests")
(define deps '())
(define build-deps '("base"
"component-lib"
"db-lib"
"koyo-lib"
"koyo-north"
"threading-lib"
"rackunit-lib"
"app-... | null | https://raw.githubusercontent.com/Bogdanp/koyo/93f3fd06ee596a62bb0b286cb6290a800e911154/koyo-lib/blueprints/standard/app-name-here-tests/info.rkt | racket | #lang info
(define collection "tests")
(define deps '())
(define build-deps '("base"
"component-lib"
"db-lib"
"koyo-lib"
"koyo-north"
"threading-lib"
"rackunit-lib"
"app-... | |
4cb0f83a6b88a73fab3c5ed281f4938f5a1a0f25f198cfebc977209de13b2189 | ocurrent/solver-service | submit.ml | let program_name = "solver_pipeline"
open Current.Syntax
let reporter =
let report src level ~over k msgf =
let k _ =
over ();
k ()
in
let src = Logs.Src.name src in
msgf @@ fun ?header ?tags:_ fmt ->
Fmt.kpf k Fmt.stdout
("%a %a @[" ^^ fmt ^^ "@]@.")
Fmt.(styled `Magenta... | null | https://raw.githubusercontent.com/ocurrent/solver-service/6b9d62dedcc2d7eddbab523ad7a1a621fef3e6c5/examples/submit.ml | ocaml | Command-line parsing | let program_name = "solver_pipeline"
open Current.Syntax
let reporter =
let report src level ~over k msgf =
let k _ =
over ();
k ()
in
let src = Logs.Src.name src in
msgf @@ fun ?header ?tags:_ fmt ->
Fmt.kpf k Fmt.stdout
("%a %a @[" ^^ fmt ^^ "@]@.")
Fmt.(styled `Magenta... |
d28745279f31ea27c96298636f136c05c589faa85ed6d3452a1ba832a65eec42 | themattchan/advent-of-code | day3.hs | import Control.Applicative
import Data.Profunctor
import Data.List
import Data.List.Split
isTri [x,y,z] = x + y > z
process = dimap (map (map read . words))
(length . filter isTri . map sort)
part1 = process id
part2 = process (concatMap (chunksOf 3) . transpose)
main = do
i <- lines <$> readFile ... | null | https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2016/day3/day3.hs | haskell | import Control.Applicative
import Data.Profunctor
import Data.List
import Data.List.Split
isTri [x,y,z] = x + y > z
process = dimap (map (map read . words))
(length . filter isTri . map sort)
part1 = process id
part2 = process (concatMap (chunksOf 3) . transpose)
main = do
i <- lines <$> readFile ... | |
f2113f91d61e9631662474f6745ea0396e1e4d4e01ca0e9d88dc25936d36359c | droundy/iolaus-broken | iolaus.hs | Copyright ( C ) 2009
--
-- This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 , or ( at your option )
-- any later version.
--
-- This program is distributed in the hope that it... | null | https://raw.githubusercontent.com/droundy/iolaus-broken/e40c001f3c5a106bf39f437d6349858e7e9bf51e/iolaus.hs | haskell |
This program is free software; you can redistribute it and/or modify
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more... | Copyright ( C ) 2009
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 , or ( at your option )
You should have received a copy of the GNU General Public License
the Free Software Foundation , Inc. , 51 Franklin Street , Fifth Floor ,
Bosto... |
b88e30ec8cc8eacdbfae1486db71982d356118b31c01eec2556d9c07fb71b093 | spurious/sagittarius-scheme-mirror | %3a39.scm | (import (rnrs) (srfi :64) (srfi :39)
(sagittarius control) (sagittarius object))
(test-begin "SRFI 39 test")
issue 107
(let ()
(define x (make-parameter 3 (lambda (x) (+ x 3))))
(test-equal "param" 6 (x))
(parameterize ((x 4)) (test-equal "in parameterize" 7 (x)))
(test-equal "after" 6 (x)))
from Gauche... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/srfi/%253a39.scm | scheme | The dynamic environment needs to work on locations, not the values.
In the following code, when the continuation is invoked, the value of
f should be restored to c, not b. | (import (rnrs) (srfi :64) (srfi :39)
(sagittarius control) (sagittarius object))
(test-begin "SRFI 39 test")
issue 107
(let ()
(define x (make-parameter 3 (lambda (x) (+ x 3))))
(test-equal "param" 6 (x))
(parameterize ((x 4)) (test-equal "in parameterize" 7 (x)))
(test-equal "after" 6 (x)))
from Gauche... |
0759740cf1eceded3159441b7cc2e1dffb4beaf80820fb3ae97b55ad3b5e31fb | wdebeaum/step | wrinkle.lisp | ;;;;
W::wrinkle
;;;;
(define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::wrinkle
(SENSES
((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date nil :comments nil :vn ("bend-45.2") :wn ("?wrinkle%2:35:00" "wrinkle%2:30:10" "wrinkle%2:35:01" "wrinkle%2:35:02"))
(LF-PARENT... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wrinkle.lisp | lisp |
like fold | W::wrinkle
(define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::wrinkle
(SENSES
((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date nil :comments nil :vn ("bend-45.2") :wn ("?wrinkle%2:35:00" "wrinkle%2:30:10" "wrinkle%2:35:01" "wrinkle%2:35:02"))
(LF-PARENT ONT::fold... |
d91763a14e13dc742e4379b140cf377e97d3afaab60b65118d690483b71daacc | mokus0/junkbox | PatternMerge.hs | module PatternMerge where
import Control.Monad
import Data.List
import Data.Maybe
import Language.Haskell.TH
-- TODO: check for multiple bindings of same vars?
mergePat :: (Pat, a) -> (Pat, b) -> [(Pat, Maybe a, Maybe b)]
mergePat (WildP, a) (p, b) = [(p, Just a, Just b), (WildP, Just a, Nothing)]
mergePat (p, a) (W... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Template%20Haskell/PatternMerge.hs | haskell | TODO: check for multiple bindings of same vars?
TODO: implement other cases!
All this code could probably be simplified by:
constructors, each pattern having a Data.Set.Set of "as-bound" variable names,
and probably also strictness annotations (?). The resulting type should be
function should be easy... | module PatternMerge where
import Control.Monad
import Data.List
import Data.Maybe
import Language.Haskell.TH
mergePat :: (Pat, a) -> (Pat, b) -> [(Pat, Maybe a, Maybe b)]
mergePat (WildP, a) (p, b) = [(p, Just a, Just b), (WildP, Just a, Nothing)]
mergePat (p, a) (WildP, b) = [(p, Just a, Just b), (WildP, Nothing, ... |
893dff86fbf1014439d506d544a7553a99bbaeaa9a70df4dfaa9094e83751e3b | isovector/cornelis | Subscripts.hs | module Cornelis.Subscripts where
import Cornelis.Offsets
import Cornelis.Vim (getWindowCursor, getBufferLine, replaceInterval, setWindowCursor, reportError)
import Data.Foldable (asum, foldl', for_)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe... | null | https://raw.githubusercontent.com/isovector/cornelis/3d268e66aeebbafa4357b92e9001fc5893b8728c/src/Cornelis/Subscripts.hs | haskell | module Cornelis.Subscripts where
import Cornelis.Offsets
import Cornelis.Vim (getWindowCursor, getBufferLine, replaceInterval, setWindowCursor, reportError)
import Data.Foldable (asum, foldl', for_)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe... | |
b1eebf810dda1d6f3c4109fdc9796cb58dae6321ebc05ba23331efaf2f43c564 | eeng/mercurius | mediator_test.clj | (ns mercurius.core.domain.use-cases.mediator-test
(:require [clojure.test :refer [deftest testing is]]
[mercurius.core.domain.use-cases.mediator :refer [new-mediator dispatch]]))
(deftest dispatch-test
(testing "should route the request to the appropiate handler"
(let [uc1 (fn [data] [:result1 data... | null | https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/test/mercurius/core/domain/use_cases/mediator_test.clj | clojure | (ns mercurius.core.domain.use-cases.mediator-test
(:require [clojure.test :refer [deftest testing is]]
[mercurius.core.domain.use-cases.mediator :refer [new-mediator dispatch]]))
(deftest dispatch-test
(testing "should route the request to the appropiate handler"
(let [uc1 (fn [data] [:result1 data... | |
af0e8d7a7eb440933353ef2ee8cdaa1523c10f765197c7ecf5e4879af4d8d8d9 | SimulaVR/godot-haskell | VisualShaderNodeUniform.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeUniform
(Godot.Core.VisualShaderNode... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeUniform.hs | haskell | | Name of the uniform, by which it can be accessed through the @ShaderMaterial@ properties.
| Name of the uniform, by which it can be accessed through the @ShaderMaterial@ properties.
| Name of the uniform, by which it can be accessed through the @ShaderMaterial@ properties.
| Name of the uniform, by which it can b... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeUniform
(Godot.Core.VisualShaderNode... |
8a5ce9488d98b7e89d1ead5a05f494af995182b3164a17e2a93b2eb655adbd7b | baskeboler/cljs-karaoke-client | view.cljs | (ns cljs-karaoke.editor.view
(:require [re-frame.core :as rf]
[goog.string :as gstr]
[reagent.core :as reagent :refer [atom]]
[stylefy.core :as stylefy]
[ cljs-karaoke.components.autocomplete : refer [ autocomplete - input ] ]
[cljs-karaoke.editor.events :as editor-ev... | null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/editor/view.cljs | clojure | [cljs-karaoke.events :as events]
[cljs-karaoke.events.songs :as song-events]
[cljs-karaoke.events.audio :as audio-events]
[cljs-karaoke.events.modals :as modal-events]
"import lyrics"])
[:span.file-name "file name"]]
:margin "1em 0"}
(reset! segments-done? true)
(let [text (rf/subscribe [::editor-s... | (ns cljs-karaoke.editor.view
(:require [re-frame.core :as rf]
[goog.string :as gstr]
[reagent.core :as reagent :refer [atom]]
[stylefy.core :as stylefy]
[ cljs-karaoke.components.autocomplete : refer [ autocomplete - input ] ]
[cljs-karaoke.editor.events :as editor-ev... |
91b61859f2189f62900565057e056950f47f24872c9bea4e21a807da25f3b893 | stchang/macrotypes | dep-ind-cur2-eq-tests2.rkt | #lang s-exp turnstile/examples/dep/dep-ind-cur2
(require turnstile/examples/dep/dep-ind-cur2+data2
turnstile/examples/dep/dep-ind-cur2+sugar
"../rackunit-typechecking.rkt")
Π → λ ∀ ≻
same as dep - ind - cur2 - eq - tests except uses data2
;; testing user-defined equality
(define-datatype my... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/dep/dep-ind-cur2-eq-tests2.rkt | racket | testing user-defined equality
= id
a = x, b = z
= id (same as above) but combined λs
= symmetric
a = x, b = z
TODO: this must be separate app?
a = x, b = z
= transitive
a = x, b = z
constructor consumes params but 0 args
same as above but less parens and λs
debug pm= id:
(elim-pm=
pm= id
a = x, b = z
pm... | #lang s-exp turnstile/examples/dep/dep-ind-cur2
(require turnstile/examples/dep/dep-ind-cur2+data2
turnstile/examples/dep/dep-ind-cur2+sugar
"../rackunit-typechecking.rkt")
Π → λ ∀ ≻
same as dep - ind - cur2 - eq - tests except uses data2
(define-datatype my= [A : (Type 0)] : [a : A] [b : A... |
a0e9845f62bdf38bbd11f7649eb7b4e0b9681edc47b314983348e22974a95c99 | jamesdabbs/pi-base.hs | Theorems.hs | module Form.Theorems
( createTheoremForm
, updateTheoremForm
) where
import Import
import Form
import Yesod.Form.Bootstrap3
createTheoremForm :: Html -> MForm Handler (FormResult Theorem, Widget)
createTheoremForm = renderBootstrap3 fLayout $ Theorem
<$> areq formulaField (fs "Antecedent") Nothing
<*> areq formu... | null | https://raw.githubusercontent.com/jamesdabbs/pi-base.hs/1c7cb1f87c6525bd4844842b3f9442634f8dccd3/Form/Theorems.hs | haskell | module Form.Theorems
( createTheoremForm
, updateTheoremForm
) where
import Import
import Form
import Yesod.Form.Bootstrap3
createTheoremForm :: Html -> MForm Handler (FormResult Theorem, Widget)
createTheoremForm = renderBootstrap3 fLayout $ Theorem
<$> areq formulaField (fs "Antecedent") Nothing
<*> areq formu... | |
bae7a7a6e339537deec6eec16c341c6ae728e207d6c9676559271e579047a13a | kloimhardt/werkbank | core.cljs | (ns ui.core
(:require [reagent.core :as reagent :refer [atom]]
[clojure.string :as string :refer [split-lines split join]]
[ui.helpers :refer [cos sin style url val-cyc]]
[ui.shapes :as shapes :refer [tri square pent hex hept oct
b1 b2 b3 b... | null | https://raw.githubusercontent.com/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/ui_src/ui/core.cljs | clojure | hides heads up display for performance
------------------------ SETTINGS ---------------------
----------- ANIMATIONS ----------------
syntax reminder
(make-frames!
"NAME"
[frames]
(make-body "ATTRIBUTE" [values]))
(trans x y)
(nth-frame num FRAME)
(even-frame FRAME)
(odd-frame FRAME)
"fade-in-out" ... | (ns ui.core
(:require [reagent.core :as reagent :refer [atom]]
[clojure.string :as string :refer [split-lines split join]]
[ui.helpers :refer [cos sin style url val-cyc]]
[ui.shapes :as shapes :refer [tri square pent hex hept oct
b1 b2 b3 b... |
f4cb953d55ad3664fa991efcf0969d796e776a09217283656264f04d4ce55e90 | janegca/htdp2e | Exercise-327-eval-all.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-327-eval-all) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constr... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intertwined%20Data/Exercise-327-eval-all.rkt | racket | about the language level of this file in a form that our tools can easily process.
consumes the representation of an expression and of a definitions area.
at the prompt in the interactions area and the definitions area contains the
appropriate definitions.
Hint: Your eval-all function should process variables... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-327-eval-all) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 327 .
Design eval - all . Lik... |
b889d9a3f9a4878f2af859146e01f7537be00850f0b49230cfb53edf7f98c20f | exoscale/clojure-kubernetes-client | v1beta1_csi_node_spec.clj | (ns clojure-kubernetes-client.specs.v1beta1-csi-node-spec
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1beta1-csi-node-driver :refer :all]
)
(:import (java.io File)))
(declare v1beta1-csi-node-spec-data v1beta1-csi-node-sp... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_csi_node_spec.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-csi-node-spec
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1beta1-csi-node-driver :refer :all]
)
(:import (java.io File)))
(declare v1beta1-csi-node-spec-data v1beta1-csi-node-sp... | |
8fd80d7e8c8b33d3a4a7ca2b9d35c4396f38912df17ddacac63978108b23de74 | kelamg/HtDP2e-workthrough | ex407.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex407) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex407.rkt | racket | about the language level of this file in a form that our tools can easily process.
A DB is a structure:
(make-db Schema Content)
A Schema is a [List-of Spec]
A Label is a String
A Predicate is a [Any -> Boolean]
A (piece of) Content is a [List-of Row]
A Row is a [List-of Cell]
A Cell is Any
constraint cells... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex407) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct db [schema content])
A Spec is a [ ... |
0fea774ec99cd18021cc8e0322c551e88380a18ff8827805d56516108439e31a | acieroid/scala-am | sum.scm | SUM -- Compute sum of integers from 0 to 10000
(define (run n)
(let loop ((i n) (sum 0))
(if (< i 0)
sum
(loop (- i 1) (+ i sum)))))
(= (run 10000) 50005000) | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/gambit/sum.scm | scheme | SUM -- Compute sum of integers from 0 to 10000
(define (run n)
(let loop ((i n) (sum 0))
(if (< i 0)
sum
(loop (- i 1) (+ i sum)))))
(= (run 10000) 50005000) | |
075a1c8541235d6320ef2d562c9efa9afe9f626c57b072e35a6dc7bf1c9fd1f1 | rothfield/doremi-script | check_network.cljs | (ns doremi-script.check-network
(:require-macros
[cljs.core.async.macros :refer [go]]
)
(:require
[goog.Uri]
[doremi-script.dom-utils :refer [by-id listen seconds]]
[cljs.core.async :refer [<! chan close! timeout put!]]
[re-frame.core :refer [dispatch]]
))
(def debug false)
(defn ch... | null | https://raw.githubusercontent.com/rothfield/doremi-script/7141720e14bb0dbac344b55caab47c4f046635a5/src/doremi_script/check_network.cljs | clojure | TODO: use alt ???? review | (ns doremi-script.check-network
(:require-macros
[cljs.core.async.macros :refer [go]]
)
(:require
[goog.Uri]
[doremi-script.dom-utils :refer [by-id listen seconds]]
[cljs.core.async :refer [<! chan close! timeout put!]]
[re-frame.core :refer [dispatch]]
))
(def debug false)
(defn ch... |
2a5f01f6064ba93fa9922cc20a4469b8213c91843a313dfbdec17ab71f687659 | richcarl/erlguten | eg_test4.erl | %% -*- coding: latin-1 -*-
%%==========================================================================
Copyright ( C ) 2003
%%
%% 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 witho... | null | https://raw.githubusercontent.com/richcarl/erlguten/debd6120907e5e18b4bca5fbd5bdd9cb653f282d/test/eg_test4.erl | erlang | -*- coding: latin-1 -*-
==========================================================================
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
following con... | Copyright ( C ) 2003
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to permit
persons to whom the Software is furnished to do so , subject to the
in all copies or substantial portions of the Software .
THE SOFTWAR... |
8990f15e4fc27ac383adafce39d97d71a1c482c51ab942f5336aa1dbf6aa6fc4 | simonmar/monad-par | Wins.hs | module Wins where
type Win = [[Int]]
wins :: [Win]
wins = [win1,win2,win3,win4,win5,win6,win7,win8]
win1,win2,win3,win4,win5,win6,win7,win8 :: Win
win1 = [[1,1,1],
[0,0,0],
[0,0,0]]
win2 = [[0,0,0],
[1,1,1],
[0,0,0]]
win3 = [[0,0,0],
[0,0,0],
[1,1,1]]
win4 = [[... | null | https://raw.githubusercontent.com/simonmar/monad-par/1266b0ac1b4040963ab356cf032c6aae6b8a7add/examples/src/minimax/Wins.hs | haskell | module Wins where
type Win = [[Int]]
wins :: [Win]
wins = [win1,win2,win3,win4,win5,win6,win7,win8]
win1,win2,win3,win4,win5,win6,win7,win8 :: Win
win1 = [[1,1,1],
[0,0,0],
[0,0,0]]
win2 = [[0,0,0],
[1,1,1],
[0,0,0]]
win3 = [[0,0,0],
[0,0,0],
[1,1,1]]
win4 = [[... | |
a85d83dd010b9b79e7dd6040f59d6298c9992dae3c25b2296d434e569ae93acf | tonyg/kali-scheme | record.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; This is file record.scm.
Records
; This is completely vanilla Scheme code. Should work anywhere.
(define (make-record-type type-id ... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/alt/record.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
This is file record.scm.
This is completely vanilla Scheme code. Should work anywhere.
Faster: (eq? (vector-ref record 0) unique)
Faster: (eq? (vector-ref record 0) unique) | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Records
(define (make-record-type type-id field-names)
(define unique (list type-id))
(define size (+ (length field-names) 1))
(define (constructor . names-option)
(let* ((names ... |
978648deff90512a6ac919108260d204d72c402f38cf8bfb6935dcd74f9b9070 | fantasytree/fancy_game_server | rpc_cfg.erl | %%----------------------------------------------------
%% 客户端RPC调用配置
%% 此文件由程序生成,不要手动修改
%%----------------------------------------------------
-module(rpc_cfg).
-export([
get/1
,desc_fun/2
]
).
get(1101) ->
{rpc,1101,false,false,false,[],{rpc_cfg,desc_fun,{req,1101}},undefined,{rpc_cfg,desc_fun... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/proto/rpc_cfg.erl | erlang | ----------------------------------------------------
客户端RPC调用配置
此文件由程序生成,不要手动修改
---------------------------------------------------- | -module(rpc_cfg).
-export([
get/1
,desc_fun/2
]
).
get(1101) ->
{rpc,1101,false,false,false,[],{rpc_cfg,desc_fun,{req,1101}},undefined,{rpc_cfg,desc_fun,{reply,1101}},undefined,undefined,undefined};
get(1102) ->
{rpc,1102,false,false,false,[],{rpc_cfg,desc_fun,{req,1102}},undefined,{rpc_cf... |
5de18d8dc04928d3e6d6a966704700415aa1a41d25de09e4fafd598bb2ed2149 | poroh/ersip | ersip_authinfo_test.erl | %%
Copyright ( c ) 2018 Dmitry Poroh
%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%
%% SIP authorization info tests
%%
-module(ersip_authinfo_test).
-include_lib("eunit/include/eunit.hrl").
%%%===================================================================
... | null | https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/message/ersip_authinfo_test.erl | erlang |
All rights reserved.
SIP authorization info tests
===================================================================
Cases
===================================================================
===================================================================
Helpers
=============================================... | Copyright ( c ) 2018 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(ersip_authinfo_test).
-include_lib("eunit/include/eunit.hrl").
rebuild_test() ->
rebuild(<<"Digest realm=\"\", qop=\"auth,auth-int\",",
" nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093... |
06de80c2c1cad5764a02242da7a032bf0b7a3e30b80f1fad679406e14ade94ae | deadpendency/deadpendency | PomXml.hs | module DD.Effect.DetermineDependencies.Backend.LanguageFiles.Java.PomXml
( PomXmlInput (..),
)
where
import Common.Model.Dependency.Basic.BasicDependency
import Common.Model.Dependency.DependencyIdentifier
import Common.Model.Dependency.DependencyName
import Common.Model.Dependency.File.DependenciesFileType
import... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-determiner/src/DD/Effect/DetermineDependencies/Backend/LanguageFiles/Java/PomXml.hs | haskell | module DD.Effect.DetermineDependencies.Backend.LanguageFiles.Java.PomXml
( PomXmlInput (..),
)
where
import Common.Model.Dependency.Basic.BasicDependency
import Common.Model.Dependency.DependencyIdentifier
import Common.Model.Dependency.DependencyName
import Common.Model.Dependency.File.DependenciesFileType
import... | |
7ccb0fb4185d735c41d0174ff8f9223251cedd84ff0e8551d8d77340417ece81 | jeffreyrosenbluth/wallpaper | Wallpaper.hs | ---------------------------------------------------------------------------------
-- |
-- Module : Recipes.Wallpaper
Copyright : ( c ) 2017
-- License : BSD-style (see LICENSE)
-- Maintainer :
--
Recipes for the 17 wallpaper groups .
--
-- For more detailed descriptions of the various symmetry ... | null | https://raw.githubusercontent.com/jeffreyrosenbluth/wallpaper/b3c78025e7dff46a409830751ec8bbc22ba9d84f/src/Recipes/Wallpaper.hs | haskell | -------------------------------------------------------------------------------
|
Module : Recipes.Wallpaper
License : BSD-style (see LICENSE)
Maintainer :
For more detailed descriptions of the various symmetry groups see:
and
Appendices A and B
The color wheel used for all of the images:
... | Copyright : ( c ) 2017
Recipes for the 17 wallpaper groups .
" Creating Symmetry " by , 2015 Princeton University Press ,
module Recipes.Wallpaper
(
genericLattice
, p1
, p2
* * ( Centered ) Lattice
, rhombicLattice
, cm
, cmm
| Lattice vectors : _ _ 1 , i * l _ _ .
, rectangul... |
b22435d8a544b5de6c855fcdf8a58bba37e74f32f45db6446ca3197485df55d9 | troy-west/apache-kafka-number-stations-clj | image.clj | (ns numbers.image
(:require [clojure.java.io :as io]
[numbers.translate :as tx])
(:import (javax.imageio ImageIO)
(java.awt.image BufferedImage RenderedImage)
(java.awt Color)))
(defonce source
Width 960 , Height 540 .
(defn width
[^BufferedImage img]
(.getWidth (.getData i... | null | https://raw.githubusercontent.com/troy-west/apache-kafka-number-stations-clj/d38b8ef57c38c056b41e1d24a2b8671479113300/src/numbers/image.clj | clojure | (ns numbers.image
(:require [clojure.java.io :as io]
[numbers.translate :as tx])
(:import (javax.imageio ImageIO)
(java.awt.image BufferedImage RenderedImage)
(java.awt Color)))
(defonce source
Width 960 , Height 540 .
(defn width
[^BufferedImage img]
(.getWidth (.getData i... | |
435b2b281375fe62ef0d56a31cc6c89edd7226e2bb1745f94ec4af62ac2be5cd | seriyps/pe4kin | mock_longpoll_server.erl | %% @doc mock server for telegram long-poll API
-module(mock_longpoll_server).
-export([start/1, stop/1]).
-export([add_updates/2]).
-behaviour(cowboy_handler).
-export([init/2]).
-type update() :: map().
-record(st,
{cowboy,
state :: pid()}).
start(Opts0) ->
application:ensure_all_started(cowb... | null | https://raw.githubusercontent.com/seriyps/pe4kin/1f076af74abcdc7997ab60a74184fa46cc2b59fa/test/mock_longpoll_server.erl | erlang | @doc mock server for telegram long-poll API
Method = cowboy_req:method(Req0),
Path = cowboy_req:path(Req0),
Will block | -module(mock_longpoll_server).
-export([start/1, stop/1]).
-export([add_updates/2]).
-behaviour(cowboy_handler).
-export([init/2]).
-type update() :: map().
-record(st,
{cowboy,
state :: pid()}).
start(Opts0) ->
application:ensure_all_started(cowboy),
StatePid = proc_lib:spawn_link(fun sta... |
5f3a504fe29e93085c143dc348a56d97ec53b5737d56b40fa4b687a3c56e8205 | fetburner/compelib | enumeration.ml | let%test _ =
List.of_seq (Compelib.Enumeration.perm 2 [1; 2; 3; 4]) =
[[2; 1]; [3; 1]; [4; 1]; [1; 2]; [3; 2]; [4; 2];
[1; 3]; [2; 3]; [4; 3]; [1; 4]; [2; 4]; [3; 4]]
let%test _ = List.of_seq (Compelib.Enumeration.perm 0 [1; 2; 3]) = [[]]
let%test _ =
List.of_seq (Compelib.Enumeration.perm 3 [1; 2; 3]) =
[... | null | https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/test/enumeration.ml | ocaml | let%test _ =
List.of_seq (Compelib.Enumeration.perm 2 [1; 2; 3; 4]) =
[[2; 1]; [3; 1]; [4; 1]; [1; 2]; [3; 2]; [4; 2];
[1; 3]; [2; 3]; [4; 3]; [1; 4]; [2; 4]; [3; 4]]
let%test _ = List.of_seq (Compelib.Enumeration.perm 0 [1; 2; 3]) = [[]]
let%test _ =
List.of_seq (Compelib.Enumeration.perm 3 [1; 2; 3]) =
[... | |
ac9abee8330d80d58221a742aea9b675fbfe7d4b8398664b73b8ae7dea0aa630 | paurkedal/episql | gen_xml.mli | Copyright ( C ) 2018 - -2022 Petter A. Urkedal < >
*
* 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/paurkedal/episql/79a6b6e65a0917292fdc02bcb5d7f972078dffa2/bin/gen_xml.mli | ocaml | * XML generator. | Copyright ( C ) 2018 - -2022 Petter A. Urkedal < >
*
* 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... |
21e0be3430b45f531b014770cd9a3ee81c25d515eadb606b43bb501ca06f7a37 | skanev/playground | 59-tests.scm | (require rackunit rackunit/text-ui)
(load "../59.scm")
(define sicp-3.59-tests
(test-suite
"Tests for SICP exercise 3.59"
(check-equal? (stream-take (integrate-series integers) 6)
'(1 1 1 1 1 1))
(check-equal? (stream-take cosine-series 6)
(list 1 0 (/ -1 2) 0 (/ 1 2... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/59-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../59.scm")
(define sicp-3.59-tests
(test-suite
"Tests for SICP exercise 3.59"
(check-equal? (stream-take (integrate-series integers) 6)
'(1 1 1 1 1 1))
(check-equal? (stream-take cosine-series 6)
(list 1 0 (/ -1 2) 0 (/ 1 2... | |
bd7701e0bc1bdcbe90e58eb035981d657a7b6221f1da7cfdfbf1251e729bed43 | pjones/openid-connect | Discovery.hs | {-|
Copyright:
This file is part of the package openid-connect. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:
-connect
No part of this package, including this file, may be copied,
modified, propagated, or distributed except accord... | null | https://raw.githubusercontent.com/pjones/openid-connect/cfa5a1118c562c172e33c01022748d8031e48b8c/src/OpenID/Connect/Discovery.hs | haskell | |
Copyright:
This file is part of the package openid-connect. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:
-connect
No part of this package, including this file, may be copied,
modified, propagated, or distributed except accordin... | module OpenID.Connect.Discovery
( Discovery(..)
, ProviderDiscoveryURI
) where
import Data.List.NonEmpty (NonEmpty)
import Data.Text (Text)
import GHC.Generics (Generic)
import qualified Network.URI as Network
import OpenID.Connect.Authentication
import OpenID.Connect.JSON
import OpenID.Connect.Scope
| URI po... |
7658962b8c3573b2327e08818a058ef5feb73369aeec62f0adf22ce537d505fc | malcolmstill/ulubis | install.lisp |
(in-package :ulubis)
(defun build (&optional path)
(let ((ulubis-path (namestring (ql:where-is-system :ulubis))))
(load (concatenate 'string ulubis-path "build/build-ulubis-drm-gbm.lisp"))))
(defun build-sdl (&optional path)
(let ((ulubis-path (namestring (ql:where-is-system :ulubis))))
(load (concatenat... | null | https://raw.githubusercontent.com/malcolmstill/ulubis/23c89ccd5589930e66025487c31531f49218bb76/install.lisp | lisp |
(in-package :ulubis)
(defun build (&optional path)
(let ((ulubis-path (namestring (ql:where-is-system :ulubis))))
(load (concatenate 'string ulubis-path "build/build-ulubis-drm-gbm.lisp"))))
(defun build-sdl (&optional path)
(let ((ulubis-path (namestring (ql:where-is-system :ulubis))))
(load (concatenat... | |
90345586789ea14f21c8eef089c28a28d1ed401b8fdce4f794dbc2325d94ead4 | haskell-numerics/hmatrix | Devel.hs | --------------------------------------------------------------------------------
|
Module : Numeric . HMatrix . Devel
Copyright : ( c ) 2014
License : :
Stability : provisional
The library can be easily extended using the tools in this module .
Module : Numeric.... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/base/src/Numeric/LinearAlgebra/Devel.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
| See @examples/devel@ in the repository.
* ST
| In-place manipulation inside the ST monad.
** Mutable Vectors
** Mutable Matrices
** Unsafe functions
* Sp... | |
Module : Numeric . HMatrix . Devel
Copyright : ( c ) 2014
License : :
Stability : provisional
The library can be easily extended using the tools in this module .
Module : Numeric.HMatrix.Devel
Copyright : (c) Alberto Ruiz 2014
License : BSD3
Maintainer... |
fce1c11dff5899db4ca354380247960a59fcadaee2e6448367dddc6322727d67 | benknoble/jsond | main.rkt | #lang racket/base
(module+ reader
(provide (rename-out [read-jsond-syntax read-syntax]))
(require json
syntax/strip-context)
(define (read-jsond-syntax src in)
(define-values (names jsons)
(let loop ([names '()]
[jsons '()])
(define maybe-kw (read-syntax src in))
... | null | https://raw.githubusercontent.com/benknoble/jsond/0250aafa207c1520a000b700346419940776a181/main.rkt | racket | #lang racket/base
(module+ reader
(provide (rename-out [read-jsond-syntax read-syntax]))
(require json
syntax/strip-context)
(define (read-jsond-syntax src in)
(define-values (names jsons)
(let loop ([names '()]
[jsons '()])
(define maybe-kw (read-syntax src in))
... | |
2980c3a614bc5f944f85b650c860138a6b82c81644b394f94de50a230834ef49 | Hendekagon/iiiiioiooooo | structure.clj | (ns iiiiioiooooo.core.structure
(:require
[clojure.zip :as zip]
)
)
; Box of Pencils
This is an experimental Structure Editor for Clojure .
; It works by having a zipper on a map which has a focus, selection and context.
; The context is a zipper which is the scope of what we see when we visualize the data ... | null | https://raw.githubusercontent.com/Hendekagon/iiiiioiooooo/f7c2ab0468798b2065bdff9c564ca10a966cfa79/src/clj/iiiiioiooooo/core/structure.clj | clojure | Box of Pencils
It works by having a zipper on a map which has a focus, selection and context.
The context is a zipper which is the scope of what we see when we visualize the data we're editing.
The focus is a zipper which is what we're currently focussed to act on in the context.
All functions which modify the dat... | (ns iiiiioiooooo.core.structure
(:require
[clojure.zip :as zip]
)
)
This is an experimental Structure Editor for Clojure .
first - class environments before it really works .
(defn maybe [f x] (if x (f x) x))
(defn -_
([f _ x] (fn [y] (f y x)))
([f x] (partial f x))
)
(def -+ comp)
(def -- complem... |
03022ecb689161bf847f6bcdc7ef6a921777900284b09341fc71db4ffbded1a9 | emina/rosette | list-2.rkt | #lang rosette
(define (map f xs)
(cond
[(empty? xs) '()]
[else (cons (f (first xs)) (map f (rest xs)))]))
(define-symbolic b boolean?)
(map (thunk* (error 'bad)) (if b '() '(1)))
| null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/test/trace/code/list-2.rkt | racket | #lang rosette
(define (map f xs)
(cond
[(empty? xs) '()]
[else (cons (f (first xs)) (map f (rest xs)))]))
(define-symbolic b boolean?)
(map (thunk* (error 'bad)) (if b '() '(1)))
| |
d489001ffcc9e2192481e8c9371be7a937730bf7084d128a965abcdc94d9d0c2 | tchoutri/pg-entity | ErrorsGuide.hs | module ErrorsGuide where
import Control.Monad.Except (MonadError (..))
import Control.Monad.Trans
import Data.Text (Text)
import Database.PostgreSQL.Entity (Entity, selectById)
import Database.PostgreSQL.Entity.Types (GenericEntity)
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Transact (DBT)
import GHC... | null | https://raw.githubusercontent.com/tchoutri/pg-entity/c748e5e502f8a1c7098c2aaa2983e3ecacf2c5fa/docs/src/ErrorsGuide.hs | haskell | Error handling is a tricky subject, and most often you will have to provide translation layers between your different components to express how a request
has failed and what is the relevant information to be reported.
For example, inserting twice the same entity with the same primary key will raise an error in the d... | module ErrorsGuide where
import Control.Monad.Except (MonadError (..))
import Control.Monad.Trans
import Data.Text (Text)
import Database.PostgreSQL.Entity (Entity, selectById)
import Database.PostgreSQL.Entity.Types (GenericEntity)
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Transact (DBT)
import GHC... |
3821d79a1ac7aea9bdfefaf921f505f661d5831ad03898c99126b5d81bcb45b1 | anoma/juvix | Termination.hs | module Termination (allTests) where
import Base
import Termination.Negative qualified as N
import Termination.Positive qualified as P
allTests :: TestTree
allTests = testGroup "Termination checker tests" [P.allTests, N.allTests]
| null | https://raw.githubusercontent.com/anoma/juvix/423ccec70a53d25a773ea2583a5871ed88deaa76/test/Termination.hs | haskell | module Termination (allTests) where
import Base
import Termination.Negative qualified as N
import Termination.Positive qualified as P
allTests :: TestTree
allTests = testGroup "Termination checker tests" [P.allTests, N.allTests]
| |
020b3d5b93d9bcc37e747da4119c5ae46b769b25858340f30210e719480b264e | input-output-hk/project-icarus-importer | Main.hs | module Main
( main
) where
import Universum
import Control.Concurrent.Async (async, wait)
import System.IO (hSetEncoding, stdout, utf8)
import qualified Data.ByteString as BS
import Bench.Cardano.Wallet.Config (g... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/bench/Main.hs | haskell | | Example of benchmark command:
$ stack bench cardano-sl-wallet --benchmark-arguments \
"--tls-pub-cert=$PWD/scripts/tls-files/ca.crt \
--tls-priv-key=$PWD/scripts/tls-files/server.key \
--wal-conf=$PWD/wallet/bench/config/Wallets.yaml \
ep - conf=$PWD / wallet / bench / config / Endpoints.cs... | module Main
( main
) where
import Universum
import Control.Concurrent.Async (async, wait)
import System.IO (hSetEncoding, stdout, utf8)
import qualified Data.ByteString as BS
import Bench.Cardano.Wallet.Config (g... |
b47e4dc857a00e54e0d8c1fc29067c836cb62f3bc6765b909f1f18bac945ad2a | haskell-tools/haskell-tools | Crosslinking.hs | module CommentHandling.Crosslinking where
import Control.Monad
-- | forward
-- ^ back
import Control.Monad as Monad
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/CommentHandling/Crosslinking.hs | haskell | | forward
^ back | module CommentHandling.Crosslinking where
import Control.Monad
import Control.Monad as Monad
|
528b2c6ab124a531a32bd9daeecabe98211b3c78d4c9b35cab7246af3cc70ed3 | esl/rebar3_codecov | rebar3_codecov_prv.erl | -module(rebar3_codecov_prv).
-behaviour(provider).
%% API
-export([init/1, do/1, format_error/1]).
-define(NAMESPACE, codecov).
-define(PROVIDER, analyze).
-define(DEPS, [{default, app_discovery}]).
-define(DESC, "Converts .coverdata files to codecov compatible JSON").
-define(JSON_OUT_FILE, "codecov.json").
-define(... | null | https://raw.githubusercontent.com/esl/rebar3_codecov/789fa27797bd68d9ac216e7976b95039fea99802/src/rebar3_codecov_prv.erl | erlang | API
Public API
Private API
lcov file format description can be found here:
#FILES
currently this generator creates only the list of execution counts
for each instrumented line, which is enough for coveralls service. | -module(rebar3_codecov_prv).
-behaviour(provider).
-export([init/1, do/1, format_error/1]).
-define(NAMESPACE, codecov).
-define(PROVIDER, analyze).
-define(DEPS, [{default, app_discovery}]).
-define(DESC, "Converts .coverdata files to codecov compatible JSON").
-define(JSON_OUT_FILE, "codecov.json").
-define(LCOV_OU... |
f79f433b62adbc4b6bb7f75ac12cefea79a7c3a782dcbff7d386199dcbb402ac | lojic/RacketCon2020 | axio-init-structs.rkt | #lang racket/base
(provide (struct-out axio-context))
;; --------------------------------------------------------------------------------------------
;; Public Interface
;; --------------------------------------------------------------------------------------------
(struct axio-context (app-env-id
... | null | https://raw.githubusercontent.com/lojic/RacketCon2020/310e0ab01d8c3e1546029720f6bb66e6d1a5fb1e/TodoApp/axio/axio-init-structs.rkt | racket | --------------------------------------------------------------------------------------------
Public Interface
-------------------------------------------------------------------------------------------- | #lang racket/base
(provide (struct-out axio-context))
(struct axio-context (app-env-id
db-conn)
#:transparent)
|
b497857f2dc5fe9cb9172d82911730a5298ea16b8c12d02acfd81864c3910340 | dmitryvk/sbcl-win32-threads | debug.lisp | ;;;; the debugger
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided wi... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/debug.lisp | lisp | the debugger
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
variables and constants
things to consider when tweaking these values:
user inadvertently causes a hairy data structure to ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!DEBUG")
* We 're afraid to just default them to NIL and NIL , in case the
* We do n't want to trun... |
fa8ae8b9172eba6595ab7bfdd5488741f9f79ac4553189e0fe99636a41647f29 | edicl/hunchentoot | util.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistrib... | null | https://raw.githubusercontent.com/edicl/hunchentoot/0023dd3927e5840f1f02f9a8bdab2b4a7037c652/util.lisp | lisp | Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; 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 t... |
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :hunchentoot)
(defun starts-with-p (seq subseq &key (test 'eql))
"Tests whether the sequence SEQ ... |
961ad295e351d3dcd0d98ac0c8ecc69f9d2d3e7260bbc52a4a70cc877538f509 | mjlbach/guix-guile-example | main.scm | (use-modules (guix)
(guix build-system cmake)
(guix licenses)
(guix git-download)
(gnu packages guile)
(gnu packages cmake)
(gnu packages pkg-config))
(package
(name "example-guix-guile-package")
(version "0.0.1")
(source (local-file ... | null | https://raw.githubusercontent.com/mjlbach/guix-guile-example/aab0932759ed0d29d761c900a9577f71a4307b1f/main.scm | scheme | (use-modules (guix)
(guix build-system cmake)
(guix licenses)
(guix git-download)
(gnu packages guile)
(gnu packages cmake)
(gnu packages pkg-config))
(package
(name "example-guix-guile-package")
(version "0.0.1")
(source (local-file ... | |
1f4993431b62ccec6aa15516578827a4307151c4494c1d6b6d6667721081d25f | emedia-project/rebar_deps_graph | deps_graph_plugin.erl | %% -------------------------------------------------------------------
%%
%% Original file : mapdeps.erl
Copyright ( c ) 2013 Basho Technologies , Inc.
%%
Modifications :
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance ... | null | https://raw.githubusercontent.com/emedia-project/rebar_deps_graph/5c22e50c9e94645108447e4e88b53579f3f48801/plugins/deps_graph_plugin.erl | erlang | -------------------------------------------------------------------
Original file : mapdeps.erl
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,
KIND, either ... | Copyright ( c ) 2013 Basho Technologies , Inc.
Modifications :
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(deps_graph_plugin).
-export(['graph-deps'/2]).
-define(ABORT(... |
c0460e3e6be6660881e4a247643cbd3b13db5de358bb960af5d9db3f8167fc77 | tezos/tezos-mirror | client_proto_context.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/adb9ff09cb5f0a9cae8c8d8924efee6c4764399a/src/proto_alpha/lib_client/client_proto_context.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
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 , WHETH... |
ab2c904cb25a1d53d41444eec324a330e85c93b99ef5892731970aa60b3fa5b7 | webnf/webnf | enlive.clj | (ns webnf.cljs.enlive
(:require
[clojure.string :as str]))
;; selector syntax
(defn intersection [preds]
(condp = (count preds)
1 (first preds)
2 (let [[f g] preds] `#(and (~f %) (~g %)))
3 (let [[f g h] preds] `#(and (~f %) (~g %) (~h %)))
4 (let [[f g h k] preds] `#(and (~f %) (~g %) (~h %) (~... | null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/enlive.cljs/src/webnf/cljs/enlive.clj | clojure | selector syntax | (ns webnf.cljs.enlive
(:require
[clojure.string :as str]))
(defn intersection [preds]
(condp = (count preds)
1 (first preds)
2 (let [[f g] preds] `#(and (~f %) (~g %)))
3 (let [[f g h] preds] `#(and (~f %) (~g %) (~h %)))
4 (let [[f g h k] preds] `#(and (~f %) (~g %) (~h %) (~k %)))
`(fn [x#... |
a395b0ef1a2814e12a72f3f1a88af8cb5dfa5093f50cce34ea81111b2f339613 | sinasamavati/leptus | leptus_routes3.erl | Copyright ( c ) 2013 - 2015 Sina Samavati < >
%%
%% 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, me... | null | https://raw.githubusercontent.com/sinasamavati/leptus/e0d9bd2270dfa85bd5922e0a5c2d0289d2dc0ef9/test/leptus_router_SUITE_data/leptus_routes3.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice ... | Copyright ( c ) 2013 - 2015 Sina Samavati < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY ... |
4627e40d2d001e8317ce2c2b8c68708ae6df134fb7dda119a5d4a6ee193b83b6 | RedPRL/stagedtt | NbE.ml | open Eff
let eval ~stage ~env tm =
Staging.run ~stage @@ fun () ->
Eval.eval ~env tm
let eval_tp ~stage ~env tp =
Staging.run ~stage @@ fun () ->
Eval.eval_tp ~env tp
let do_el ~stage tm =
Staging.run ~stage @@ fun () ->
Eval.do_el tm
let quote ~size tm =
Quoting.run ~size @@ fun () ->
Quote.quote tm... | null | https://raw.githubusercontent.com/RedPRL/stagedtt/f88538036b51cebb83ebb0b418ec9b089550275d/lib/nbe/NbE.ml | ocaml | open Eff
let eval ~stage ~env tm =
Staging.run ~stage @@ fun () ->
Eval.eval ~env tm
let eval_tp ~stage ~env tp =
Staging.run ~stage @@ fun () ->
Eval.eval_tp ~env tp
let do_el ~stage tm =
Staging.run ~stage @@ fun () ->
Eval.do_el tm
let quote ~size tm =
Quoting.run ~size @@ fun () ->
Quote.quote tm... | |
f5f03c6575dca4a6c01d6d4f142c0464c7c351bd085e6ba5c4a96d6d0ec30e12 | JHU-PL-Lab/jaylang | inc.ml | let rec ar i = 0
let update a i x j = if j=i then x else a j
let rec g e a j =
if j<e then
(assert(0<=j && j<e);
g e (update a j (a(j)+1)) (j+1))
else ()
let main n =
g n ar 0
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/inc.ml | ocaml | let rec ar i = 0
let update a i x j = if j=i then x else a j
let rec g e a j =
if j<e then
(assert(0<=j && j<e);
g e (update a j (a(j)+1)) (j+1))
else ()
let main n =
g n ar 0
| |
204d58dd1e9854028f19afc81080eabff9e266ae3522848c938feef870963813 | bytekid/mkbtt | lazyList.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/util/src/lazyList.ml | ocaml | ** OPENS *******************************************************************
** TYPES *******************************************************************
** EXCEPTIONS **************************************************************
** FUNCTIONS ***************************************************************
************... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
9ac29a493691eed32c9f835da1354a51eda9697f905693a95bacf5d9ba219404 | okuoku/nausicaa | test-gensym.sps | -*- coding : utf-8 - unix -*-
;;;
Part of : / Scheme
Contents : tests for
Date : Tue Apr 27 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-gensym.sps | scheme |
Abstract
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warra... | -*- coding : utf-8 - unix -*-
Part of : / Scheme
Contents : tests for
Date : Tue Apr 27 , 2010
Copyright ( c ) 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
#... |
4544f72537b8b9dfc70530d0495ed9da787e53941f945cf80e48f2213cdf4db1 | marick/structural-typing | f_compile_path.clj | (ns structural-typing.guts.compile.f-compile-path
(:use structural-typing.clojure.core)
(:require [structural-typing.guts.compile.compile-path :as subject]
[structural-typing.guts.preds.wrap :as wrap]
[structural-typing.guts.exval :as exval]
[structural-typing.guts.explanations :... | null | https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/guts/compile/f_compile_path.clj | clojure | We happen to know that strings and keywords are handled by the same code,
so we don't test that much.
separate checks are so that printing failure messages doesn't go infinite
separate checks are so that printing failure messages doesn't go infinite | (ns structural-typing.guts.compile.f-compile-path
(:use structural-typing.clojure.core)
(:require [structural-typing.guts.compile.compile-path :as subject]
[structural-typing.guts.preds.wrap :as wrap]
[structural-typing.guts.exval :as exval]
[structural-typing.guts.explanations :... |
18074c67d21b08bb763174e3ac4ce030064e8f4a80e908b24b8b12412aa033b3 | HugoPeters1024/hs-sleuth | InspectionTests.hs | # LANGUAGE TemplateHaskell #
module InspectionTests where
import Test.Inspection
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import Data.ByteString
import HsComprehension.Plugin (dumpThisModule)
import Tree
addNothing : : Tree Int
--addNothing = mapTree (+0) . mapTree id
addNothing2... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/app/InspectionTests.hs | haskell | addNothing = mapTree (+0) . mapTree id
inspect $ 'countChars `hasNoType` ''T.Text
dumpThisModule | # LANGUAGE TemplateHaskell #
module InspectionTests where
import Test.Inspection
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import Data.ByteString
import HsComprehension.Plugin (dumpThisModule)
import Tree
addNothing : : Tree Int
addNothing2 : : Tree Int
addNothing2 = fmap ( +0... |
06d9f508b5de6e91382b4d8c2b6a03cc848829c09823bfcd89b6ffc2d9880126 | tommaisey/aeon | project.scm | ;; Handles creating and managing a new aeon music project.
(library (project)
(export new-project projects-dir global-config-file)
(import (chezscheme)
(utilities)
(file-tools)
(version-control))
A Chez parameter pointing to a directory for aeon projects .
(define projects-dir
... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/project.scm | scheme | Handles creating and managing a new aeon music project.
A Chez parameter pointing to a location for a global config file.
your global config file. Also initialises a git repo for saving.
do early, could error
-------------------------------------------------------------
Sadly Scheme's put-datum procedures don't ou... | (library (project)
(export new-project projects-dir global-config-file)
(import (chezscheme)
(utilities)
(file-tools)
(version-control))
A Chez parameter pointing to a directory for aeon projects .
(define projects-dir
(make-parameter (path+ home-dir "Music/aeon/")))
(def... |
59da91fa2ef51d0aa1d8f76b7e6ee2e470878359437fd6bf485f4237909a3722 | ygrek/ocaml-bpf | pkg.ml | #!/usr/bin/env ocaml
#use "topfind";;
#require "topkg";;
open Topkg
let () =
Pkg.describe "bpf" ~licenses:[] begin fun c ->
Ok [
Pkg.mllib "src/bpf.mllib";
Pkg.test "src/test";
]
end
| null | https://raw.githubusercontent.com/ygrek/ocaml-bpf/a0d77356b954e9e096a00217079e5119f870db3a/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind";;
#require "topkg";;
open Topkg
let () =
Pkg.describe "bpf" ~licenses:[] begin fun c ->
Ok [
Pkg.mllib "src/bpf.mllib";
Pkg.test "src/test";
]
end
| |
7afc5245a9f07348266d6084b630a2806e36e96c4093ee368205f6c0f3035ae7 | ober/metis | manardb.lisp | (ql:quickload :manardb)
(manardb:use-mmap-dir "/tmp/")
(manardb:defmmclass person ()
((name :type STRING :initarg :name :accessor name)))
(make-instance 'person :name "John")
(print (manardb:retrieve-all-instances 'person))
| null | https://raw.githubusercontent.com/ober/metis/de14f5ee3258aa31507b4b361a798b01e936eb9b/src/manardb.lisp | lisp | (ql:quickload :manardb)
(manardb:use-mmap-dir "/tmp/")
(manardb:defmmclass person ()
((name :type STRING :initarg :name :accessor name)))
(make-instance 'person :name "John")
(print (manardb:retrieve-all-instances 'person))
| |
27aed0fb25783f8b9dfdc491b6840167bf733d1e67cc0145e6cc77712af0a9ac | ghc/packages-dph | Gang.hs | {-# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #-}
# LANGUAGE CPP #
-- If a work request is sent to the gang while another is already running
-- then just run it sequentially instead of dying.
#define SEQ_IF_GANG_BUSY 1
Trace all work requests sent to the gang .
#define TRACE_GANG 1
-- | Gang pri... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Primitive/Gang.hs | haskell | # OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #
If a work request is sent to the gang while another is already running
then just run it sequentially instead of dying.
| Gang primitives.
Requests and operations on them --------------------------------------------
| The 'Req' type encapsulates work ... | # LANGUAGE CPP #
#define SEQ_IF_GANG_BUSY 1
Trace all work requests sent to the gang .
#define TRACE_GANG 1
module Data.Array.Parallel.Unlifted.Distributed.Primitive.Gang
( Gang
, Workload (..)
, seqGang
, forkGang
, gangSize
, gangIO, gangST)
where
import GHC.I... |
1d55f7c2ad155b14f17ea9d6108b1cfa2087e756565e5d27e2a712d30aadbad7 | quil-lang/qvm | permutation-tests.lisp | ;;;; tests/permutation-tests.lisp
;;;;
Author :
(in-package #:dqvm2-tests)
(deftest test-permutation ()
(signals error (make-permutation '((1 . 0) (1 . 2))))
(signals error (make-permutation '((1 . 2) (3 . 2))))
(let ((permutation '()))
(is (is-identity-permutation-p permutation))
(is (= (apply... | null | https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/dqvm/tests/permutation-tests.lisp | lisp | tests/permutation-tests.lisp
| Author :
(in-package #:dqvm2-tests)
(deftest test-permutation ()
(signals error (make-permutation '((1 . 0) (1 . 2))))
(signals error (make-permutation '((1 . 2) (3 . 2))))
(let ((permutation '()))
(is (is-identity-permutation-p permutation))
(is (= (apply-permutation permutation 0) 0))
(is... |
f4b8218a9340663ae19330bd5e7da398c227fdee63696ca67c5c68e3c128584a | mhallin/graphql_ppx | dirty_checker.ml | let log_head = "[dirty_checker]"
exception File_not_found
let hash file =
let () = Log.log ("[calc hash of] "^file) in
Digest.file file
let read_hash src =
let () = Log.log ("[read hash from] "^src) in
let hash_file = open_in_bin src in
let hash = Digest.input hash_file in
close_in hash_file;
hash
let... | null | https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/src/base/dirty_checker.ml | ocaml | dirty
dirty | let log_head = "[dirty_checker]"
exception File_not_found
let hash file =
let () = Log.log ("[calc hash of] "^file) in
Digest.file file
let read_hash src =
let () = Log.log ("[read hash from] "^src) in
let hash_file = open_in_bin src in
let hash = Digest.input hash_file in
close_in hash_file;
hash
let... |
e277aac7fd613a61d9f91bbdc947c181a9225714da9dacc048838b22fefe6184 | binsec/haunted | ida.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/ida/ida.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
99bc441a3421b499d55f3f49f1ecc9a62be0a65273ee4b4db6d33f092ddb3a8e | calvis/cKanren | base.rkt | #lang racket/base
;; This file provides the minimum core of cKanren functionalities
(require "macros.rkt")
(provide define-constraint-type transformer)
(provide define-constraint
constraint
add-constraint-event
remove-constraint-event)
;; constraints
(require "constraints.rkt")
(provide ... | null | https://raw.githubusercontent.com/calvis/cKanren/8714bdd442ca03dbf5b1d6250904cbc5fd275e68/cKanren/src/base.rkt | racket | This file provides the minimum core of cKanren functionalities
constraints
debugging
framework
(provide (for-syntax search-strategy))
lex
mk-structs
operators
package
running
variables | #lang racket/base
(require "macros.rkt")
(provide define-constraint-type transformer)
(provide define-constraint
constraint
add-constraint-event
remove-constraint-event)
(require "constraints.rkt")
(provide succeed fail transformer? #%app-safe)
(require "debugging.rkt")
(require "even... |
8e3ed36ddf44bb804397e51b732497fe7a5884af7c55fb4d4c67a09e83a12cc0 | Jobhdez/scheme-to-c | desugar.lisp | (in-package #:manifold-scheme)
(defun desugar (ast)
"Desugar the abstract syntax tree."
;; given: Node
;; expect: Node
(match ast
((var :v a)
(make-var :v a))
((int :i a)
(make-int :i a))
((bool :value a)
(make-bool :value a))
((ifscm :cond a :then b :else c)
(make-ifscm :cond a :then b... | null | https://raw.githubusercontent.com/Jobhdez/scheme-to-c/9633fecec06b927e91cb0a98eebcac12d99a4bd7/src/desugar.lisp | lisp | given: Node
expect: Node
given: Let Node
expect: Lambda Node | (in-package #:manifold-scheme)
(defun desugar (ast)
"Desugar the abstract syntax tree."
(match ast
((var :v a)
(make-var :v a))
((int :i a)
(make-int :i a))
((bool :value a)
(make-bool :value a))
((ifscm :cond a :then b :else c)
(make-ifscm :cond a :then b :else c))
((setscm :var a :rhs b... |
e4860f37bf07f2cffd8fda82250269839d7300df8f1eeb1916a48d68a63ae1c3 | sanette/bogue | b_slider.ml | open B_utils
open Tsdl
module Avar = B_avar
module Button = B_button
module Theme = B_theme
module Time = B_time
module Var = B_var
module Tvar = B_tvar
module Trigger = B_trigger
module Draw = B_draw
module Mouse = B_mouse
type kind =
| Horizontal (* Horizontal bar with a small slider; values increase from left
... | null | https://raw.githubusercontent.com/sanette/bogue/d023d873bb5e1258b3187f3473506a88434565e5/lib/b_slider.ml | ocaml | Horizontal bar with a small slider; values increase from left
to right. No background
Warning: values increase from bottom to top
Origin is on the positive real axis.
TODO: (int Avar.t) is here to make smoother transitions. not done yet
used to avoid computing too many times the same value
... | open B_utils
open Tsdl
module Avar = B_avar
module Button = B_button
module Theme = B_theme
module Time = B_time
module Var = B_var
module Tvar = B_tvar
module Trigger = B_trigger
module Draw = B_draw
module Mouse = B_mouse
type kind =
Horizontal bar filled up to the value
type t = {
The value of the slider is a... |
4ded584495f40f836f19d3a4abc5f14ac541ae294da91d6207d1b0e21b00f6f0 | clojure/core.typed | ns_deps_utils.clj | Copyright ( c ) , contributors .
;; 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/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/ns_deps_utils.clj | clojure | 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
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:skip-wiki clojure.core.typed.checker.ns-deps-utils
(:require [clojure.tools.namespace.parse :as ns-parse]
[clojure.tools.namespace.file :as ns-file]
[clojure.core.typed.coerce-utils :as coerce]
[clojure.core.typed.contract-utils :a... |
ced34069dc2665b31e384bf52c5939aa6690a7f80f0c8efcd0c6bdbfee98a4f0 | overtone/overtone | synth.clj | (ns overtone.inst.synth
(:use [overtone.sc.ugens]
[overtone.sc.envelope]
[overtone.sc.cgens.mix]
[overtone.sc.cgens.line]
[overtone.sc.machinery.ugen.fn-gen]
[overtone.music.pitch]
[overtone.studio.mixer]
[overtone.studio.inst]
[overtone.algo.chance :onl... | null | https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/inst/synth.clj | clojure | translated from: -quarks/SynthDefPool/blob/master/pool/apad_mh.scd
* Octave under root
* Root
* Octave over root
Work in progress... just getting started
Experimenting with Karplus Strong synthesis...
Don't think it's quite there, but almost...
// Originally from the STK instrument models...
var noise =... | (ns overtone.inst.synth
(:use [overtone.sc.ugens]
[overtone.sc.envelope]
[overtone.sc.cgens.mix]
[overtone.sc.cgens.line]
[overtone.sc.machinery.ugen.fn-gen]
[overtone.music.pitch]
[overtone.studio.mixer]
[overtone.studio.inst]
[overtone.algo.chance :onl... |
a84da17d95935afdd548d3c6d97d02c5103eb9290e2aad0eb89eaa5cb53559dc | wellposed/numerical | PropLayout.hs |
module PropLayout where
layoutProperties = undefined
a basic property that is always true ( for dense formats ):
for all valid Layout Forms FRM with shape SHP ,
for all index ix with 0≤ix≤SHP ,
ix = = toIndex FRM $ ! toAddress FRM ix
ie , id_Index = = toIndex FRM . toAddress FRM
the ` `... | null | https://raw.githubusercontent.com/wellposed/numerical/bf61926a854586b9707b88798887d7a72beeed13/tests/PropLayout.hs | haskell |
module PropLayout where
layoutProperties = undefined
a basic property that is always true ( for dense formats ):
for all valid Layout Forms FRM with shape SHP ,
for all index ix with 0≤ix≤SHP ,
ix = = toIndex FRM $ ! toAddress FRM ix
ie , id_Index = = toIndex FRM . toAddress FRM
the ` `... | |
69258c74ee7c6240c7692580323cea50d2b1dfe5ebd669e3c7904e5bbee1da91 | itchyny/vim-haskell-sort-import | comment.out.hs | import AA -- X
import BA -- X
import CA -- X
import AB -- X
import BB -- X
import CB -- X
import AC -- X
import BC -- X
import CC -- X
| null | https://raw.githubusercontent.com/itchyny/vim-haskell-sort-import/bfe4b6a5e212828ef14e611fa8c358b3960d4f9f/test/basic/comment.out.hs | haskell | X
X
X
X
X
X
X
X
X | |
bab9a6cbdbfba3343934b76386474e11f5a47eade667d6d477e2b9d590f719ce | Bogdanp/koyo-shorty | dashboard.rkt | #lang racket/base
(require koyo/haml
racket/contract
web-server/http
"../components/template.rkt")
(provide
dashboard-page)
(define/contract (dashboard-page _req)
(-> request? response?)
(page
(haml
(.container
(:h1 "Hello Screencast World!")))))
| null | https://raw.githubusercontent.com/Bogdanp/koyo-shorty/35f3fb9ce457c97002d6ebadcf20e283f68fa901/shorty/pages/dashboard.rkt | racket | #lang racket/base
(require koyo/haml
racket/contract
web-server/http
"../components/template.rkt")
(provide
dashboard-page)
(define/contract (dashboard-page _req)
(-> request? response?)
(page
(haml
(.container
(:h1 "Hello Screencast World!")))))
| |
66e0750b2212ff08b9eaaa79d3abdde2d564f0cbfd5c5e9ca5ea66f59f9f9b15 | manuel-serrano/hop | number.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / hopscript / number.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/c41c4185f34f984ab16d0060a99f0c6fa4be5d44/hopscript/number.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop / hop / hopscript / number.scm * /
* Author : * /
* Creation : Fri Sep 20 10:41:39 2013 * /
* Last change : Sun Oct 16 08:24:00 2022 ( serrano ) * /
* Copy... |
dadf801bb37dc25e2e1be217e03ef92b1981f5841325bf36754012445cb34055 | mivoq/hunpos | observables_graph.ml | open File_node
open Message_node
open Io
class o_o_data =
object
val mutable _name = ""
val mutable _observers = ([] : string list)
val mutable _observables = ([] : string list)
val mutable _lines = ([] : string list)
method get_name = _name
method set_n... | null | https://raw.githubusercontent.com/mivoq/hunpos/0f0f775039fa749e67711c07ac681a16c0979349/ocaml-cmake/examples/code-analysis/observables_graph.ml | ocaml | * to make it a unit | open File_node
open Message_node
open Io
class o_o_data =
object
val mutable _name = ""
val mutable _observers = ([] : string list)
val mutable _observables = ([] : string list)
val mutable _lines = ([] : string list)
method get_name = _name
method set_n... |
8c314a45113967eafa822573f5d7213132e6d9ca35e867c33df4387d579adf1a | rmculpepper/crypto | test-pkcs8.rkt | #lang racket/base
(require racket/file
racket/port
racket/class
racket/system
crypto
crypto/all
crypto/pkcs8
racket/runtime-path
rackunit)
(define-runtime-path here ".")
(define passwd #"password")
(define key-der (file->bytes (build-path here "r... | null | https://raw.githubusercontent.com/rmculpepper/crypto/4ddb88a84bdc2f79025d10c8757412c56a9ddd6c/crypto-test/tests/pkcs8/test-pkcs8.rkt | racket | (printf "+ testing ~s\n" p8-file)
(printf "+ testing roundtrip\n") | #lang racket/base
(require racket/file
racket/port
racket/class
racket/system
crypto
crypto/all
crypto/pkcs8
racket/runtime-path
rackunit)
(define-runtime-path here ".")
(define passwd #"password")
(define key-der (file->bytes (build-path here "r... |
33feb32e5383ebf4e00fe2250421fe519ffabe8a3f7ba989bbf199a2e23aa4b4 | tov/type-systems-seminar | stlc-sub.rkt | #lang s-exp "../stlc-sub.rkt"
(define (+/Num [n Num] [m Num] -> Num)
(-/Num n (-/Num 0 m)))
(define-type-alias Point (Record [x Num] [y Num]))
(define-type-alias ColorPoint (Record [x Num] [y Num] [color String]))
(define (manhattan-distance [p Point] -> Num)
(+/Num (project p x) (project p y)))
(define red-3-4... | null | https://raw.githubusercontent.com/tov/type-systems-seminar/f9c45af743606bce4613dcf6fd4f63b2526d6aef/turnstile/examples/stlc-sub.rkt | racket | #lang s-exp "../stlc-sub.rkt"
(define (+/Num [n Num] [m Num] -> Num)
(-/Num n (-/Num 0 m)))
(define-type-alias Point (Record [x Num] [y Num]))
(define-type-alias ColorPoint (Record [x Num] [y Num] [color String]))
(define (manhattan-distance [p Point] -> Num)
(+/Num (project p x) (project p y)))
(define red-3-4... | |
86adbe07a4cdcd97dc2fd093d43787b025dbbc3a87165a1cef522bdd0ae777f3 | rmloveland/scheme48-0.53 | interrupt.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Interrupts
; Create and install a vector of interrupt handlers. We want this to happen
; as early as possible. All but the post-gc and keyboard interrupts raise an
; exception by default. We exit when a keyboard interrupt occurs. The default
; post-g... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/rts/interrupt.scm | scheme | Interrupts
Create and install a vector of interrupt handlers. We want this to happen
as early as possible. All but the post-gc and keyboard interrupts raise an
exception by default. We exit when a keyboard interrupt occurs. The default
post-gc handler is defined below.
Set an interrupt handler.
I might consid... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (initialize-interrupts! spawn-on-root thunk)
(primitive-cwcc
(lambda (exit)
(let ((handlers (make-vector interrupt-count 0)))
(do ((i 0 (+ i 1)))
((= i interrupt-count))
(vector-set! handlers
i
(lambda stuff... |
42e55f9a81bcfdef613310db8b69fe5fd62594808be059a023377e404580ddd1 | jiangpengnju/htdp2e | ex71.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex71) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/adding-structure/ex71.rkt | racket | about the language level of this file in a form that our tools can easily process.
Click RUN and evaluate the following expressions:
Explain the results with step by step computations. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex71) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Place the following definitions in 's definition area :
(define... |
648cc221c3e7a31fb53f3b1e56bc9ca88da704bd58709307fb305a1574c7e957 | jeffa5/ocaml-grpc | server.mli | include Grpc.Server.S
| null | https://raw.githubusercontent.com/jeffa5/ocaml-grpc/efd6dbfc2d044fef97b122f831a8c162d9d46625/lib/grpc-lwt/server.mli | ocaml | include Grpc.Server.S
| |
62f728157b531ef7ea7849fa35d05b6dbb44e4d8cfafb8e9a75951dccd5f4a8e | SKS-Keyserver/sks-keyserver | reconComm.ml | (***********************************************************************)
(* reconComm.ml *)
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/reconComm.ml | ocaml | *********************************************************************
reconComm.ml
redistribute it and/or modify it under ... | Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published by the Free Software Foundation ; either
version 2 of the License , or... |
85008b57f44f8edbba7cc11f0b3a03a638d9670207c049541a92c127be5f17b8 | commercialhaskell/stack | Main.hs | import StackTest
main :: IO ()
main = do
stack ["build"]
| null | https://raw.githubusercontent.com/commercialhaskell/stack/d75e7a6aef5c27dd0d8e2eae8526caf69d53256f/test/integration/tests/allow-newer-specific-packages/Main.hs | haskell | import StackTest
main :: IO ()
main = do
stack ["build"]
| |
51db097bb509e1a7459f07e9c3befb87e6b605b6bf91ac9ce4643110b1ec743b | techascent/tech.datatype | typecast.clj | (ns tech.v2.datatype.typecast
(:require [tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.casting :as casting])
(:import [tech.v2.datatype
ObjectWriter ObjectReader ObjectMutable ObjectReaderIter ObjectIter
ByteWriter ByteReader ByteMutable ByteReaderIter ByteIter
... | null | https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/typecast.clj | clojure | (ns tech.v2.datatype.typecast
(:require [tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.casting :as casting])
(:import [tech.v2.datatype
ObjectWriter ObjectReader ObjectMutable ObjectReaderIter ObjectIter
ByteWriter ByteReader ByteMutable ByteReaderIter ByteIter
... | |
8eb72ff2f77f5bbe61391f2811975d6af57a1d2a22f1339c5a822cab561c23a8 | khmelevskii/duct-pedestal-reitit | exception.clj | (ns duct-pedestal-reitit.interceptors.exception
(:require
[muuntaja.core :as muuntaja]
[reitit.coercion :as coercion]
[reitit.http.interceptors.exception :as exception]
[clojure.spec.alpha :as s]))
(defn create-coercion-handler [status]
(fn [exception _]
{:status status
:headers {"Content-Typ... | null | https://raw.githubusercontent.com/khmelevskii/duct-pedestal-reitit/f1d27bc81f1ffa91633fc12771e316515b8de0df/src/duct_pedestal_reitit/interceptors/exception.clj | clojure | (ns duct-pedestal-reitit.interceptors.exception
(:require
[muuntaja.core :as muuntaja]
[reitit.coercion :as coercion]
[reitit.http.interceptors.exception :as exception]
[clojure.spec.alpha :as s]))
(defn create-coercion-handler [status]
(fn [exception _]
{:status status
:headers {"Content-Typ... | |
1b1d3b4ac1e9350f7b454f98e9aaf79f1f31f430676570566fa938307af50afa | sanette/bogue | b_sdl_area.ml | (* SDL Area Widget *)
This file is part of BOGUE
module Box = B_box
module Var = B_var
module Draw = B_draw
module Flow = B_flow
module Time = B_time
module Trigger = B_trigger
module Theme = B_theme
module Mouse = B_mouse
open B_utils
open Tsdl
type draw_element = {
id : int;
name : string;
mutable disable ... | null | https://raw.githubusercontent.com/sanette/bogue/abf8f294855d8f46fd4f68bb33b2c2907f0ec07a/lib/b_sdl_area.ml | ocaml | SDL Area Widget
if [update] is false, we just draw the box texture without applying the
[sheet]
For convenience, the layout position will be stored here
Note: it would be super smart to reinstall the commands that created the
cache when we clear the cache... TODO?
force the area to be redrawn, without c... | This file is part of BOGUE
module Box = B_box
module Var = B_var
module Draw = B_draw
module Flow = B_flow
module Time = B_time
module Trigger = B_trigger
module Theme = B_theme
module Mouse = B_mouse
open B_utils
open Tsdl
type draw_element = {
id : int;
name : string;
mutable disable : bool;
f : Tsdl.Sdl... |
9c44801eaedb7e87793fcaf2e1b159f36a0d4c50594a15e4fd37b8d55fd8bd20 | dnadales/sandbox | ExercisesMonad.hs | -- |
module ExercisesMonad where
| null | https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/my-typeclassopedia/my-typeclassopedia-haskell/src/ExercisesMonad.hs | haskell | | |
module ExercisesMonad where
|
d39fc9eec6adba59530f50b2c132e848a24290ad1950d18f406c91d0fc304195 | armedbear/abcl | asdf-mvn-module.lisp | (in-package :asdf)
dependencies : a list of maven artifacts . color or slash separated
components : :
managed - dependencies : a list of maven artifacts . If an dependency
with same groupid and artifactid are encountered , the version
;; specified here overrides.
exclusions : a list of partial ma... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/contrib/abcl-asdf/asdf-mvn-module.lisp | lisp | specified here overrides.
exluded
ASDF problems: method is deprecated. How do we define MVN-MODULE,
a subclass of ASDF:COMPONENT, which has no corresponding pathname? | (in-package :asdf)
dependencies : a list of maven artifacts . color or slash separated
components : :
managed - dependencies : a list of maven artifacts . If an dependency
with same groupid and artifactid are encountered , the version
exclusions : a list of partial maven artifacts
: artifactid ... |
a38df707c970a6d6fd44f809919ad1b8a73614a04b8e9456b97d83538235fed8 | adereth/girltalk-visualization | core_test.clj | (ns girltalk.core-test
(:require [clojure.test :refer :all]
[girltalk.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/adereth/girltalk-visualization/f02d9ef7c6b8d290a99a571a288653156aa4b9f9/test/girltalk/core_test.clj | clojure | (ns girltalk.core-test
(:require [clojure.test :refer :all]
[girltalk.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
41edeaed6e3e3a6ec3daaef25701ee90142badccf8041cbca01e9771d3b67095 | squirrel-prover/squirrel-prover | vars.mli | (** Basic module for variables, providing local environments to store
variables. *)
open Utils
(*------------------------------------------------------------------*)
(** {2 Variables} *)
(** Type of variables of sort ['a]. *)
type var
type vars = var list
(*----------------------------------------------------... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/d25b6dab570ea0e99915059a67599fd3a38caa8b/src/vars.mli | ocaml | * Basic module for variables, providing local environments to store
variables.
------------------------------------------------------------------
* {2 Variables}
* Type of variables of sort ['a].
------------------------------------------------------------------
* Print a variable, only showing its name.
* Prin... |
open Utils
type var
type vars = var list
* { 2 Pretty - Printing }
val pp : Format.formatter -> var -> unit
val pp_list : Format.formatter -> var list -> unit
val pp_typed_list : Format.formatter -> var list -> unit
* { 2 Functions on variables }
val hash : var -> int
val name : var -> string
val ty : ... |
8efc90bdf4b2eea3f64f8de6d1d0fd0dfb603fe69c72c0654bacf55fabd6a283 | logaan/erlang-bittorrent | need_server.erl | -module(need_server).
-export([start/1, stop/1, set_received/2, set_offered/2, set_requested/2,
set_sent/2]).
% API
start(NumberOfPieces) ->
Controller = self(),
spawn_link(fun() -> need_server(Controller, NumberOfPieces) end).
stop(Pid) ->
Pid ! stop.
set_received(Pid, PieceIndex) ->
Pid ! {set_stat... | null | https://raw.githubusercontent.com/logaan/erlang-bittorrent/e937bc3d71339623b2d070f06dfe1f2d0083ffb8/src/need_server.erl | erlang | API
Server | -module(need_server).
-export([start/1, stop/1, set_received/2, set_offered/2, set_requested/2,
set_sent/2]).
start(NumberOfPieces) ->
Controller = self(),
spawn_link(fun() -> need_server(Controller, NumberOfPieces) end).
stop(Pid) ->
Pid ! stop.
set_received(Pid, PieceIndex) ->
Pid ! {set_status, Pi... |
d5d0b426eb3b28b7964fe5ccc2e8163677499925833bc4c83ed673ea37f39747 | debug-ito/net-spider | CLISpec.hs | module NetSpider.RPL.CLISpec (main,spec) where
import Data.Monoid (mempty)
import qualified Options.Applicative as Opt
import Net.IPv6 (ipv6)
import NetSpider.CLI.Snapshot (makeSnapshotQuery)
import NetSpider.Query (startsFrom, defQuery)
import NetSpider.RPL.FindingID (IPv6ID(..))
import Test.Hspec
import NetSpider.R... | null | https://raw.githubusercontent.com/debug-ito/net-spider/82dfbdca1add1edfd54ef36cb1ca5129d528b814/net-spider-rpl-cli/test/NetSpider/RPL/CLISpec.hs | haskell | module NetSpider.RPL.CLISpec (main,spec) where
import Data.Monoid (mempty)
import qualified Options.Applicative as Opt
import Net.IPv6 (ipv6)
import NetSpider.CLI.Snapshot (makeSnapshotQuery)
import NetSpider.Query (startsFrom, defQuery)
import NetSpider.RPL.FindingID (IPv6ID(..))
import Test.Hspec
import NetSpider.R... | |
63cd6a2f2754067d5d3da16d4119c9e3f5e6f5cfe11049688df845ffcb99699b | kadena-io/pact | Continuation.hs | # LANGUAGE RecordWildCards #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module ... | null | https://raw.githubusercontent.com/kadena-io/pact/564cf5f3440337f806c249032fb40a2be8aad734/src/Pact/Types/Continuation.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
|
Module : Pact.Types.Continuation
License : BSD-style (see the file LICENSE)
Pact Continuation data
* Types
* Optics
| Provenance datatype contains all of the necessary
data to 'endorse' a yield object.
^ the target chain id for the endorsem... | # LANGUAGE RecordWildCards #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
Copyright : ( C ) 2019 ,
Maintainer : < > , < >
module ... |
e760d3d46da771425b313227fcd3b8a95b61b70dfe15fe455626c7cb2bc48413 | santiweight/poker-base | Range.hs | module Test.Poker.Range where
import qualified Data.Map.Strict as Map
import Poker.Range
( Freq (Freq),
Range (Range),
)
import qualified Poker.Range as Range
import Test.Hspec
spec_RangefromList :: SpecWith ()
spec_RangefromList =
let m = Range.rangeFromList [(1 :: Int, "bar")]
in it "fromList" $ m `sho... | null | https://raw.githubusercontent.com/santiweight/poker-base/39ad098afb2a18092c5f4556d6348ea352856f62/test/Test/Poker/Range.hs | haskell | module Test.Poker.Range where
import qualified Data.Map.Strict as Map
import Poker.Range
( Freq (Freq),
Range (Range),
)
import qualified Poker.Range as Range
import Test.Hspec
spec_RangefromList :: SpecWith ()
spec_RangefromList =
let m = Range.rangeFromList [(1 :: Int, "bar")]
in it "fromList" $ m `sho... | |
59933ecb8bd43f19d39416ccf188a4bd0ca763f12c3e271ae52b44c3b57b9406 | anishathalye/knox | interpreter.rkt | #lang rosette/safe
(require
"../semantics/syntax.rkt"
"../semantics/value.rkt"
"../semantics/environment.rkt"
"../semantics/shared.rkt"
(prefix-in $ "../semantics/lifted.rkt")
(only-in racket/base error)
(prefix-in lib: "lib.rkt")
rosutil
rosette/lib/destruct
syntax/parse/define
yosys/meta
yosys/generic)
... | null | https://raw.githubusercontent.com/anishathalye/knox/4791d55b5afb5c09d896c3fa8446c4f7580dacf6/knox/driver/interpreter.rkt | racket | Values
value ::=
| void?
| boolean?
| integer?
| string?
| bv?
| symbol?
| null?
| cons?
| closure?
| builtin?
| circuit-op?
| input?
| output?
checks if v is a value, but doesn't include input/output (because
that's slightly more annoying, those structs are supplied via
metadata)
Built-in functions... | #lang rosette/safe
(require
"../semantics/syntax.rkt"
"../semantics/value.rkt"
"../semantics/environment.rkt"
"../semantics/shared.rkt"
(prefix-in $ "../semantics/lifted.rkt")
(only-in racket/base error)
(prefix-in lib: "lib.rkt")
rosutil
rosette/lib/destruct
syntax/parse/define
yosys/meta
yosys/generic)
... |
3decbd0f84084eb1c7edea6272d9056512090580d490efd7099ee631bd80a71d | ecraven/r7rs-benchmarks | divrec.scm | DIVREC -- Benchmark which divides by 2 using lists of n ( ) 's .
(import (scheme base) (scheme read) (scheme write) (scheme time))
(define (create-n n)
(do ((n n (- n 1))
(a '() (cons '() a)))
((= n 0) a)))
(define (recursive-div2 l)
(cond ((null? l) '())
(else (cons (car l) (recursive-div... | null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/divrec.scm | scheme | DIVREC -- Benchmark which divides by 2 using lists of n ( ) 's .
(import (scheme base) (scheme read) (scheme write) (scheme time))
(define (create-n n)
(do ((n n (- n 1))
(a '() (cons '() a)))
((= n 0) a)))
(define (recursive-div2 l)
(cond ((null? l) '())
(else (cons (car l) (recursive-div... | |
ca398c9b289cc9aded1ac383098124ae8d305f75c23f34334f1ccf350095c6ef | phadej/zinza | fancy.hs | # OPTIONS_GHC -fno - warn - unused - imports #
module DemoFancy (render) where
import Prelude (String, fst, snd, ($), return)
import Control.Monad (forM_)
import Fancy
import qualified Data.Map.Strict as Map
type Writer a = (String, a)
tell :: String -> Writer (); tell x = (x, ())
execWriter :: Writer a -> String; exec... | null | https://raw.githubusercontent.com/phadej/zinza/80cc8e62ba479df192a46bc4a0dc1eff16d61194/fixtures/fancy.hs | haskell | # OPTIONS_GHC -fno - warn - unused - imports #
module DemoFancy (render) where
import Prelude (String, fst, snd, ($), return)
import Control.Monad (forM_)
import Fancy
import qualified Data.Map.Strict as Map
type Writer a = (String, a)
tell :: String -> Writer (); tell x = (x, ())
execWriter :: Writer a -> String; exec... | |
3940e717b90494a7fe6d368b49e4c661e33239881f7b28488969226135ab5b42 | io-tupelo-demo/graalvm | project.clj | (defproject hello-world "0.1.0-SNAPSHOT"
:dependencies [ [org.clojure/clojure "1.10.1"]
[prismatic/schema "1.1.12"]
]
:repl-options {:init-ns hello-world.core}
:main hello-world.core
:profiles {:uberjar {:aot :all}
:dev {:plugins [[lein-shell "0.5.0"]]} }
:aliase... | null | https://raw.githubusercontent.com/io-tupelo-demo/graalvm/b2afa3605d084609d0050adad0fb8694248b2de6/project.clj | clojure | (defproject hello-world "0.1.0-SNAPSHOT"
:dependencies [ [org.clojure/clojure "1.10.1"]
[prismatic/schema "1.1.12"]
]
:repl-options {:init-ns hello-world.core}
:main hello-world.core
:profiles {:uberjar {:aot :all}
:dev {:plugins [[lein-shell "0.5.0"]]} }
:aliase... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.