_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 |
|---|---|---|---|---|---|---|---|---|
7bc5620e2a150991e39a91b044f8dc08968e1e677c9f52ada2a7039f795e1978 | arcusfelis/xapian-erlang-bindings | xapian_const.erl | -module(xapian_const).
-export([command_id/1,
open_mode_id/1,
qlc_type_id/1,
test_id/1,
operator_id/1,
query_id/1,
parser_command_id/1,
stem_strategy_id/1,
document_part_id/1,
action_type/1,
posting_type/1,
term_type/1,
... | null | https://raw.githubusercontent.com/arcusfelis/xapian-erlang-bindings/29871b3e64d658e74701c6ba68bf59e1a9b168f1/src/xapian_const.erl | erlang | Command ids
Open modes of the DB
------------------------------------------------------------
Query Header
------------------------------------------------------------
From `include/xapian/query.h'
They are often used, that is why short version is usefult.
-------------------------------------------------------... | -module(xapian_const).
-export([command_id/1,
open_mode_id/1,
qlc_type_id/1,
test_id/1,
operator_id/1,
query_id/1,
parser_command_id/1,
stem_strategy_id/1,
document_part_id/1,
action_type/1,
posting_type/1,
term_type/1,
... |
c27eca143d03a93c89036ae0f9549b19e0853a1291ef2fc9cc7690fb4f836f7e | nadeemabdulhamid/racketui | web-file-size-mixed-struct.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 web-file-size-mixed-struct) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor ... | null | https://raw.githubusercontent.com/nadeemabdulhamid/racketui/045e0e647439623397cdf67e8e045ec7aa5e2def/bsl-tests/web-file-size-mixed-struct.rkt | racket | about the language level of this file in a form that our tools can easily process.
A File is either:
- an Image-File (make-image-file String Number Number)
;; file-func : File ... -> ...
;; purpose
(check-expect ...)
(define (file-func a-file ...)
(cond
[(text-file? a-file) ...]
[(image-file? a-fi... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname web-file-size-mixed-struct) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
- a Text - File ( make - text - file Str... |
d469e76bbbbfa8491ae8d657d9b172211d46b625f02bdedb0aab1342771915e2 | AdRoll/rebar3_format | function_composition.erl | -module(function_composition).
-export([local_calls/3, external_calls/0]).
-type t() :: only:function(application:is(affected(by:this(change)))) | not_types.
local_calls(should, be, unaffected) ->
g(f(b, h(a), w(x(y)))).
external_calls() ->
should:be(
indented:every(
singe:time([{even, "... | null | https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/inline_qualified_function_composition/function_composition.erl | erlang | -module(function_composition).
-export([local_calls/3, external_calls/0]).
-type t() :: only:function(application:is(affected(by:this(change)))) | not_types.
local_calls(should, be, unaffected) ->
g(f(b, h(a), w(x(y)))).
external_calls() ->
should:be(
indented:every(
singe:time([{even, "... | |
fd14ab46db746a5dd3cfad01d53daf0da51b815fd0c7df81ab891c448da8c655 | ghc/testsuite | tc041.hs | -- !!! a very simple test of class and instance declarations
module ShouldSucceed where
class H a where
op1 :: a -> a -> a
instance H Bool where
op1 x y = y
f :: Bool -> Int -> Bool
f x y = op1 x x
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc041.hs | haskell | !!! a very simple test of class and instance declarations |
module ShouldSucceed where
class H a where
op1 :: a -> a -> a
instance H Bool where
op1 x y = y
f :: Bool -> Int -> Bool
f x y = op1 x x
|
7cd342b3ccd1cd98628983de30de9b6f52df55d976a7909aa1774b411c90f21d | darkleaf/publicator | root_test.clj | (ns publicator.web.controllers.pages.root-test
(:require
[publicator.utils.test.instrument :as instrument]
[publicator.web.routing :as routing]
[ring.mock.request :as mock.request]
[ring.util.http-predicates :as http-predicates]
[clojure.test :as t]))
(t/use-fixtures :once instrument/fixture)
(t/deft... | null | https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/web/test/publicator/web/controllers/pages/root_test.clj | clojure | (ns publicator.web.controllers.pages.root-test
(:require
[publicator.utils.test.instrument :as instrument]
[publicator.web.routing :as routing]
[ring.mock.request :as mock.request]
[ring.util.http-predicates :as http-predicates]
[clojure.test :as t]))
(t/use-fixtures :once instrument/fixture)
(t/deft... | |
3df97c502b0ee60d609d52b615100b0250ccbf939bc354d8c9be7e1823e52251 | sky-big/RabbitMQ | rabbit_mgmt_app.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-management/src/rabbit_mgmt_app.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
在rabbit_web_dispatch应用中注册的名字
rabbitmq_management应用启动的入口函数接口
从rabbitmq... | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Management Plugin .
The Initial Developer of the Original Code... |
45d01517c88ed59a01d7aac8e52132bd49d1d14c79ae5428ab0a4fb834d05c68 | mmontone/cl-rest-server | api.lisp | (in-package :rest-server-tests)
(in-suite rest-server-tests)
;; API tests
(in-package :api-test)
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-schema user
(:object user
((:id :integer :documentation "The user id")
(:realname :string :documentation "The user re... | null | https://raw.githubusercontent.com/mmontone/cl-rest-server/cd3a08681a1c3215866fedcd36a6bc98d223d52d/test/api.lisp | lisp | API tests
Add Swagger resource
(rs.swagger::define-swagger-resource api-test)
else
else
else
Conditional dispatch
(implement-resource-operation api-test::api-test
api-test::conditional-dispatch ()
(error 'http-not-acceptable-error))
(implement-resource-operation-case
api-test::conditional-dispatch ... | (in-package :rest-server-tests)
(in-suite rest-server-tests)
(in-package :api-test)
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-schema user
(:object user
((:id :integer :documentation "The user id")
(:realname :string :documentation "The user realname")))))
... |
72bb4954dc10dedabf4a774e0c54e41c5e93ba344e9fb40221082c7bd974e375 | jeromesimeon/Galax | code_util_xpath.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_util/code_util_xpath.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : code_util_xpath.ml , v 1.7 2007/02/01 22:08:45 simeon Exp $
Module : Code_util_xpath
Description :
This module contains some auxiliary evaluation code for XPath .
Description:
This module contains some auxiliar... |
9ff946d40f85f355a686096b6fce9aa38845f23e36319ab665db2dd7ae6dbc51 | racket/racket7 | binding.rkt | #lang racket/base
(require "../common/set.rkt"
"../compile/serialize-property.rkt"
"../compile/serialize-state.rkt"
"../common/memo.rkt"
"syntax.rkt"
"property.rkt"
"scope.rkt"
"../common/phase.rkt"
"full-binding.rkt"
"module-binding.rkt"
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/syntax/binding.rkt | racket | ----------------------------------------
the same nominal info (i.e., claim to be required through the same
immediate path):
----------------------------------------
Helper to add a `free-identifier=?` equivance to a binding
----------------------------------------
To tag shifts that should not count as a module... | #lang racket/base
(require "../common/set.rkt"
"../compile/serialize-property.rkt"
"../compile/serialize-state.rkt"
"../common/memo.rkt"
"syntax.rkt"
"property.rkt"
"scope.rkt"
"../common/phase.rkt"
"full-binding.rkt"
"module-binding.rkt"
... |
240863c66861ccd9bc1dba066940d15ec161b06a812797222ec90e413c86303b | links-lang/links | lens_list.mli | include module type of List
module Seq = Lens_seq
val mem : 'a list -> 'a -> equal:('a -> 'a -> bool) -> bool
val findi : 'a list -> f:('a -> bool) -> (int * 'a) option
val find : 'a list -> f:('a -> bool) -> 'a option
val find_exn : 'a list -> f:('a -> bool) -> 'a
val for_all2_exn : 'a list -> 'b list -> f:('a -... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/lens_list.mli | ocaml | * Like [zip], but in the case of length mismatch it zips as many
elements as possible and then ends.
* Take a list of elements and group them by the value generated by `f`. | include module type of List
module Seq = Lens_seq
val mem : 'a list -> 'a -> equal:('a -> 'a -> bool) -> bool
val findi : 'a list -> f:('a -> bool) -> (int * 'a) option
val find : 'a list -> f:('a -> bool) -> 'a option
val find_exn : 'a list -> f:('a -> bool) -> 'a
val for_all2_exn : 'a list -> 'b list -> f:('a -... |
61ffd2e0f8ed39cc38c499d877c029033e0a4ba402110f9201c61156ea9df6c4 | akr/codegen | genc.ml |
Copyright ( C ) 2016- National Institute of Advanced Industrial Science and Technology ( AIST )
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 2.1 of the License , ... | null | https://raw.githubusercontent.com/akr/codegen/e4bd5510babecdcfaf8d80b76071adf427090ba4/src/genc.ml | ocaml | primary_cfunc
closure_id
fixfunc_id
fixfunc_id
fixfunc_id
closure_id
means that arguments contain function
extra arguments are mostly same for fix-bouded functions in a fix-term.
However, they can be different for primary function and siblings.
In such case, extra arguments are all bounded variab... |
Copyright ( C ) 2016- National Institute of Advanced Industrial Science and Technology ( AIST )
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 2.1 of the License , ... |
5e52331afddb30451107b4afa6f5e52effea6e1ecce79ffbcd91a32f1dbd3af8 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | OrdersV2ResourceTotalDetailsApiResourceBreakdown.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the types generated from the schema OrdersV2ResourceTotalDetailsApiResourceBreakdown
module StripeAPI.Types.Orde... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/OrdersV2ResourceTotalDetailsApiResourceBreakdown.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# SOURCE #
# SOURCE #
| Defines the object schema located at @components.schemas.orders_v2_resource_total_details_api_resource_breakdown@ in the specification.
| discounts: The aggregated discounts.
| taxes: The aggregated tax amounts by rate.
| 'ordersV2Resour... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema OrdersV2ResourceTotalDetailsApiResourceBreakdown
module StripeAPI.Types.OrdersV2ResourceTotalDetailsApiResourceBreakdown where
import qual... |
b41cb286a58e2c75e33c1b5f785501d1f6e3ca4f509e3a3ff5a1e2a20533f46f | tvraman/aster-math | browse-macros.lisp | ;;; -*- Mode: LISP -*- ;;;
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
;;; All Rights Reserved
;;;
(in-package :aster)
Macro : SAVE - POINTER - EXCURSION Author : raman
Created : Sun Mar 28 14:36:01 1993
(defmacro save-pointer-excursion (&body body)
"Sav... | null | https://raw.githubusercontent.com/tvraman/aster-math/14d9e1fc9b3c929ae3f3335587430e937c9c8382/lisp/browse/browse-macros.lisp | lisp | -*- Mode: LISP -*- ;;;
All Rights Reserved
|
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
(in-package :aster)
Macro : SAVE - POINTER - EXCURSION Author : raman
Created : Sun Mar 28 14:36:01 1993
(defmacro save-pointer-excursion (&body body)
"Save excursion"
`(let
((save-pointer *read-pointer* ))
... |
5eb283209d15d1557e0ad5713a9e5be3a564922bc2fbc7b793df5a09dbf97854 | ocamllabs/ocaml-modular-implicits | t10ok.ml | (* OK *)
module rec A : sig type 'a t = 'a array B.t * 'a list B.t end
= struct type 'a t = 'a array B.t * 'a list B.t end
and B : sig type 'a t = <m: 'a B.t> end
= struct type 'a t = <m: 'a B.t> end;;
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/typing-recmod/t10ok.ml | ocaml | OK | module rec A : sig type 'a t = 'a array B.t * 'a list B.t end
= struct type 'a t = 'a array B.t * 'a list B.t end
and B : sig type 'a t = <m: 'a B.t> end
= struct type 'a t = <m: 'a B.t> end;;
|
2f9147dc8f16634a2afd2def776e7d1664584b4bf671aed4b8ec021415e19c5c | gas2serra/cldk | drawing-tests.lisp | (in-package :cldk-demo)
(defparameter *drawing-tests* (make-hash-table :test 'equal))
(defparameter *width* 500)
(defparameter *height* 700)
(defparameter *border-width* 5)
(defstruct drawing-test name description drawer)
(defmacro define-drawing-test (name arglist description &body body)
(check-type name string)... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/Examples/drawing-tests.lisp | lisp |
utility functions
Testing
Testing points
'(:normal :point :coordinate))
'(1 5 6 7 10))
Rectangle
Text
If we use WRITE-STRING instead of DRAW-TEXT, the frontend will
than x = x1, confusing our diagram.
(with-text-style (stream style)
(write-string str stream))
Oval
Clipping
(draw-... | (in-package :cldk-demo)
(defparameter *drawing-tests* (make-hash-table :test 'equal))
(defparameter *width* 500)
(defparameter *height* 700)
(defparameter *border-width* 5)
(defstruct drawing-test name description drawer)
(defmacro define-drawing-test (name arglist description &body body)
(check-type name string)... |
cc78187ea243a555391975b0e754ef0af2d6178a739a225d7ff4d014f750b999 | alasconnect/auth0 | Guardian.hs | module Auth0.Management.Guardian where
--------------------------------------------------------------------------------
import Data.Aeson
import Data.Proxy
import Data.Text
import GHC.Generics
import Servant.API
import Servant.Client
--------------------------------------------------------------------------------
impo... | null | https://raw.githubusercontent.com/alasconnect/auth0/6e868552885729487e60a2dfe6073f485b505651/src/Auth0/Management/Guardian.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
GET... | module Auth0.Management.Guardian where
import Data.Aeson
import Data.Proxy
import Data.Text
import GHC.Generics
import Servant.API
import Servant.Client
import Auth0.Types
data Guardian
= Guardian
{ enabled :: Bool
, trialExpired :: Maybe Bool
, name :: Maybe Text
} deriving (Generic, Show)
i... |
74f4c4afcf7522420c11b67a4e11e535b8277a407530f1189a96ff9ae8de00fd | polyfy/polylith | m106_multiple_interface_occurrences_test.clj | (ns polylith.clj.core.validator.m106-multiple-interface-occurrences-test
(:require [clojure.test :refer :all]
[polylith.clj.core.util.interface.color :as color]
[polylith.clj.core.validator.m106-multiple-interface-occurrences :as m106]))
(def components [{:name "change"
:typ... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/validator/test/polylith/clj/core/validator/m106_multiple_interface_occurrences_test.clj | clojure | (ns polylith.clj.core.validator.m106-multiple-interface-occurrences-test
(:require [clojure.test :refer :all]
[polylith.clj.core.util.interface.color :as color]
[polylith.clj.core.validator.m106-multiple-interface-occurrences :as m106]))
(def components [{:name "change"
:typ... | |
804c3dc44c8c92ce247b5470963bc4a7038a4a53ce61888bd57f85486b97608f | BranchTaken/Hemlock | test_merge.ml | open! Basis.Rudiments
open! Basis
open Option
let test () =
let replacement = 77L in
List.iter [Some 42L; None] ~f:(fun o0 ->
List.iter [Some 43L; None] ~f:(fun o1 ->
File.Fmt.stdout
|> Fmt.fmt "merge ("
|> (pp Uns.pp) o0
|> Fmt.fmt ") ("
|> (pp Uns.pp) o1
|> Fmt.fmt ") ~f:(... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/option/test_merge.ml | ocaml | open! Basis.Rudiments
open! Basis
open Option
let test () =
let replacement = 77L in
List.iter [Some 42L; None] ~f:(fun o0 ->
List.iter [Some 43L; None] ~f:(fun o1 ->
File.Fmt.stdout
|> Fmt.fmt "merge ("
|> (pp Uns.pp) o0
|> Fmt.fmt ") ("
|> (pp Uns.pp) o1
|> Fmt.fmt ") ~f:(... | |
546022f303944ec692468c7d52ca1e39e6f71484edf04865dc143a6e707200a4 | skanev/playground | 42.scm | SICP exercise 3.42
;
suggests that it 's a waste of time to create a new serialized
; procedure in response to every withdraw and deposit message. He says that
; make-account could be changed so that the calls to protected are done
; outside the dispatch procedure. That is, an account would return the same
; seri... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/42.scm | scheme |
procedure in response to every withdraw and deposit message. He says that
make-account could be changed so that the calls to protected are done
outside the dispatch procedure. That is, an account would return the same
serialized procedure (which was created at the same time as the account)
each time it is asked f... | SICP exercise 3.42
suggests that it 's a waste of time to create a new serialized
what concurrency is allowed by these two versions of make - account ?
version , two withdrawals are two separate procedures that are serialized . In
's approach , we have one serialized procedure that can be called twice at
|
4c50d680b7a36a9fc21010172dc18da80744118d7824241853f41b17a1ffe50e | Clojure2D/clojure2d-examples | constant_medium.clj | (ns rt4.the-rest-of-your-life.ch06c.constant-medium
(:require [fastmath.core :as m]
[rt4.the-rest-of-your-life.ch06c.hittable :as hittable]
[rt4.the-rest-of-your-life.ch06c.material :as material]
[rt4.the-rest-of-your-life.ch06c.interval :as interval]
[fastmath.vector :... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/f47e1655902cc6bf1590aaecc144ac274ed3af66/src/rt4/the_rest_of_your_life/ch06c/constant_medium.clj | clojure | (ns rt4.the-rest-of-your-life.ch06c.constant-medium
(:require [fastmath.core :as m]
[rt4.the-rest-of-your-life.ch06c.hittable :as hittable]
[rt4.the-rest-of-your-life.ch06c.material :as material]
[rt4.the-rest-of-your-life.ch06c.interval :as interval]
[fastmath.vector :... | |
c3d2dfe543b7fa18c422c26d594f02820f83beaf323c35cb63bdf6169b82958f | cljfx/cljfx | double_spinner_value_factory.clj | (ns cljfx.fx.double-spinner-value-factory
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.fx.spinner-value-factory :as fx.spinner-value-factory])
(:import [javafx.scene.control SpinnerValueFactory$DoubleSpinnerValueFactory]))
(set! *... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/double_spinner_value_factory.clj | clojure | (ns cljfx.fx.double-spinner-value-factory
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.fx.spinner-value-factory :as fx.spinner-value-factory])
(:import [javafx.scene.control SpinnerValueFactory$DoubleSpinnerValueFactory]))
(set! *... | |
c96eeba8befbe573d8b64df81f6b7392ce7b47e39c07a5461e0e04f1ea22b7d7 | rowangithub/DOrder | 01_ic3.ml | (*
* IC3 motivating example
*)
let rec loop x y =
if (Random.bool ()) then
let t1 = x in
let t2 = y in
loop (t1 + t2) (t1 + t2)
else assert (y >= 1)
let main () =
let x = 1 in
let y = 1 in
loop x y
let _ = main () | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/01_ic3.ml | ocaml |
* IC3 motivating example
| let rec loop x y =
if (Random.bool ()) then
let t1 = x in
let t2 = y in
loop (t1 + t2) (t1 + t2)
else assert (y >= 1)
let main () =
let x = 1 in
let y = 1 in
loop x y
let _ = main () |
83d1d240bd0e291cce39d46b2b5448fad89d211e3ff8ccce10a21dc697e95092 | rm-hull/nvd-clojure | project.clj | (defproject example-with-known-vulnerabilities "1.4.17"
:description "Example project with dependencies that have known vulnerabilities"
:license {:name "The MIT License (MIT)"
:url ""}
:jvm-opts ["-Dclojure.main.report=stderr"
"-XX:-OmitStackTraceInFastThrow"]
:dependencies [[org.cloju... | null | https://raw.githubusercontent.com/rm-hull/nvd-clojure/f84616f815fdad9d541dffaeac918996883fde86/example/project.clj | clojure | No known vulnerabilities, but have dependencies
Sub-dependency has MEDIUM rated-vulnerabilities
Has HIGH severity vulnerabilities | (defproject example-with-known-vulnerabilities "1.4.17"
:description "Example project with dependencies that have known vulnerabilities"
:license {:name "The MIT License (MIT)"
:url ""}
:jvm-opts ["-Dclojure.main.report=stderr"
"-XX:-OmitStackTraceInFastThrow"]
:dependencies [[org.cloju... |
62617c57a8cf5e9b862432a437f3128520073c6dadefd091848603e2b1e15e6d | yenda/guix-packages | linux-nonfree.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 Ludovic Courtès < >
Copyright © 2013 , 2014 < >
Copyright © 2012 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 Bayırlı/Kammer < >
Copyright © 2015 < >
Copyright © 2... | null | https://raw.githubusercontent.com/yenda/guix-packages/0675fe15e5fc1e00ca91f069a6e279cfcdb29f42/linux-nonfree.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 Ludovic Courtès < >
Copyright © 2013 , 2014 < >
Copyright © 2012 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 Bayırlı/Kammer < >
Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public ... |
a358340454894975f3415957c7d6d2a3c17bac990008f363cce8cfa7c0eef96e | input-output-hk/ouroboros-network | Ping.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
# LANGUAGE InstanceSigs #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
module Cardano.Network.Ping
( PingOpts(..)
, LogMsg(..)
, NodeVersion(..)
, HandshakeFailure(..)
, StatPoint(.... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/a626c84f6df585dd27d735eb7eec73904a1f570e/cardano-ping/src/Cardano/Network/Ping.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
^ Number of messages to send to the server
^ The host to connect to
^ The unix socket to connect to
^ The port to connect to
^ The network magic to use for the connection
^ Print output in JSON
^ Less verbose output
HandshakeDecode... | # LANGUAGE DataKinds #
# LANGUAGE InstanceSigs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Cardano.Network.Ping
( PingOpts(..)
, LogMsg(..)
, NodeVersion(..)
, HandshakeFailure(..)
, StatPoint(..)
, mainnetMagic
, pingClient
, logger
, supportedNodeToNodeVersions
, supportedNo... |
faf5546d356a12bc30a769cdc9ff1e349be2de887d93119ef3b967fa80b87d26 | janestreet/memtrace_viewer | and_view.mli | open! Core
open Bonsai_web
type 'a t =
{ value : 'a
; view : Vdom.Node.t
}
val value : 'a t -> 'a
val view : _ t -> Vdom.Node.t
val map : f:('a -> 'b) -> 'a t -> 'b t
val map_view : f:(Vdom.Node.t -> Vdom.Node.t) -> 'a t -> 'a t
| null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/and_view.mli | ocaml | open! Core
open Bonsai_web
type 'a t =
{ value : 'a
; view : Vdom.Node.t
}
val value : 'a t -> 'a
val view : _ t -> Vdom.Node.t
val map : f:('a -> 'b) -> 'a t -> 'b t
val map_view : f:(Vdom.Node.t -> Vdom.Node.t) -> 'a t -> 'a t
| |
5afa6897ee43d25df6ff4b4882e121dbeecb720c39d08adcdde3be881f7cafd8 | plum-umd/c-strider | intmap.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/ocamlutil/intmap.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : intmap.ml 9877 2007 - 11 - 22... |
2d3959ec3fef7b40472ff89f20b4813d312c89ecd8280fff879b495185982ff1 | tejasbubane/haskell-book-code | Words.hs | module Words where
import System.Random (randomRIO)
newtype WordList =
WordList [String]
deriving (Eq, Show)
-- read all words from dictionary
allWords :: IO WordList
allWords = do
dict <- readFile "data/dict.txt"
return $ WordList (lines dict)
minWordLength :: Int
minWordLength = 5
maxWordLength :: Int
ma... | null | https://raw.githubusercontent.com/tejasbubane/haskell-book-code/deaac8ab4db0ae8692d0278826528bb8a746ed82/ch-13/hangman/src/Words.hs | haskell | read all words from dictionary
filter words within length limits
return random element from given list
call above function with gameWords | module Words where
import System.Random (randomRIO)
newtype WordList =
WordList [String]
deriving (Eq, Show)
allWords :: IO WordList
allWords = do
dict <- readFile "data/dict.txt"
return $ WordList (lines dict)
minWordLength :: Int
minWordLength = 5
maxWordLength :: Int
maxWordLength = 9
gameWords :: IO W... |
d6da82994678613cdfcd37c980851ba21cd378cf12eeefb82bbe95ad20dba49c | albertoruiz/easyVision | state.hs | import EasyVision
import Graphics.UI.GLUT
main = do
sz <- findSize
prepare
cam <- getCam 0 sz ~> channels
w <- evWindow (True,undefined) "bg diff" sz Nothing (mouse kbdQuit)
launch $ do
img <- fmap grayscale cam
(rec,bg) <- getW w
if rec
then putW w (False, img)
... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/tutorial/state.hs | haskell | import EasyVision
import Graphics.UI.GLUT
main = do
sz <- findSize
prepare
cam <- getCam 0 sz ~> channels
w <- evWindow (True,undefined) "bg diff" sz Nothing (mouse kbdQuit)
launch $ do
img <- fmap grayscale cam
(rec,bg) <- getW w
if rec
then putW w (False, img)
... | |
263a61d998af61fd0174894647bcae012e87195b97aeb21161b81c8eeab3c15d | avodonosov/datomic-helpers | datomic_helpers.clj | -*- Mode : clojure ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*-
Copyright ( C ) 2014 ( )
;;;; See LICENSE for details.
(ns datomic-helpers
(:use clojure.test))
(declare tempid)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; TO-TRANSACTION
(def... | null | https://raw.githubusercontent.com/avodonosov/datomic-helpers/de25503b601995f1c7de8eb53b13c0222411facb/src/datomic_helpers.clj | clojure | indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*-
See LICENSE for details.
TO-TRANSACTION
a vector with maps replaced by :db/id's if V is a vector, etc.)
each map already contains the :db/id.
try it
TO-SCHEMA-TRANSATION
just a default, may be overriden by extra-props
ig... | Copyright ( C ) 2014 ( )
(ns datomic-helpers
(:use clojure.test))
(declare tempid)
(defn- translate-value [v]
Returns a vector of two elements :
1 . The replacement for V ( new : db / id value if V is a map ,
2 . The sequence of maps which were replaced by their new : db / id 's ,
(letfn [(translate-... |
025ab616cdfe6d56fdc09942398c87d4b989734b29f5bd96519b0e45a50f255d | hadolint/hadolint | DL3056.hs | module Hadolint.Rule.DL3056 (rule) where
import Data.Either
import qualified Data.Map as Map
import qualified Data.SemVer as SemVer
import qualified Data.Text as Text
import Hadolint.Rule
import Language.Docker.Syntax
rule :: LabelSchema -> Rule args
rule labelschema = mconcat $
fmap labelIsNotSemVerRule (Map.keys... | null | https://raw.githubusercontent.com/hadolint/hadolint/dc6138245209dd4f7ba426eb313c3163437830da/src/Hadolint/Rule/DL3056.hs | haskell | module Hadolint.Rule.DL3056 (rule) where
import Data.Either
import qualified Data.Map as Map
import qualified Data.SemVer as SemVer
import qualified Data.Text as Text
import Hadolint.Rule
import Language.Docker.Syntax
rule :: LabelSchema -> Rule args
rule labelschema = mconcat $
fmap labelIsNotSemVerRule (Map.keys... | |
bf1aa91de70c59e746cf1bd129701a5c25bb4548cd1f4b1bcccde36605295662 | Eduap-com/WordMat | dstoda.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dstoda.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format single-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
c8e4bdd2674f020d758ef629976e2aadd58d766152562fccfbb824944f5b8200 | tweag/crem | BaseMachine.hs | # LANGUAGE DataKinds #
| A ` BaseMachine ` is a Mealy machine constrained by a provided ` Topology ` of
-- allowed transitions.
module Crem.BaseMachine where
import Crem.Topology
import "base" Data.Bifunctor (Bifunctor (..), first)
import "base" Data.Functor.Identity (Identity (..))
import "base" Data.Kind (Type)
i... | null | https://raw.githubusercontent.com/tweag/crem/4ae216adfab0f572f9906286739bd5e0aa348914/src/Crem/BaseMachine.hs | haskell | allowed transitions.
* Specifying state machines
| A @BaseMachineT m topology input output@ describes a state machine with
allowed transitions constrained by a given @topology@.
defines the @output@ and the new @state@ given the current @state@ and an
@input@.
The @m@ parameter describes the context where the `a... | # LANGUAGE DataKinds #
| A ` BaseMachine ` is a Mealy machine constrained by a provided ` Topology ` of
module Crem.BaseMachine where
import Crem.Topology
import "base" Data.Bifunctor (Bifunctor (..), first)
import "base" Data.Functor.Identity (Identity (..))
import "base" Data.Kind (Type)
import "profunctors" Data... |
3d2540c05d87c124fcce2255c84a4af16d9b59412eb3c7304aa9a06bbd875a69 | TerrorJack/ghc-alter | Bool.hs | {-# LANGUAGE TypeFamilyDependencies, Safe, PolyKinds #-}
# LANGUAGE TypeFamilies , TypeOperators , DataKinds , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Type.Bool
-- License : BSD-style (see the LICENSE file in the distribution)
-... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Data/Type/Bool.hs | haskell | # LANGUAGE TypeFamilyDependencies, Safe, PolyKinds #
---------------------------------------------------------------------------
|
Module : Data.Type.Bool
License : BSD-style (see the LICENSE file in the distribution)
Maintainer :
Stability : experimental
Portability : not portable
@since 4.... | # LANGUAGE TypeFamilies , TypeOperators , DataKinds , NoImplicitPrelude #
Basic operations on type - level Booleans .
module Data.Type.Bool (
If, type (&&), type (||), Not
) where
import Data.Bool
type family If cond tru fls where
If 'True tru fls = tru
If 'False tru fls = fls
type family a && b wher... |
baea89e8ea4e2ed573d2ff16787fba929e6d05f336460d2749caf93c44ed2ff2 | rowangithub/DOrder | 411_inc4.ml | let make_array (n:int) (i:int) = assert(0<=i && i<n); 0
let update (i:int) (n:int) (des:int->int) (x:int) =
des i; let a j = if i=j then x else des i in a
let rec inc3 (m:int) (a:int->int) (i:int) =
if i>=m
then ()
else
let a = update i m a ((a i)+1) in
inc3 m a (i+1)
let main n i =
if i=0 && n>0 then in... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/411_inc4.ml | ocaml | let make_array (n:int) (i:int) = assert(0<=i && i<n); 0
let update (i:int) (n:int) (des:int->int) (x:int) =
des i; let a j = if i=j then x else des i in a
let rec inc3 (m:int) (a:int->int) (i:int) =
if i>=m
then ()
else
let a = update i m a ((a i)+1) in
inc3 m a (i+1)
let main n i =
if i=0 && n>0 then in... | |
ccc953e855b35d82bedd62af7a097380a00e9e8e98cb3dabcfbe7390d947cc4c | MaskRay/99-problems-ocaml | 2.ml | let rec last2 = function
| [x;y] -> x
| _::xs -> last2 xs
| null | https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/1-10/2.ml | ocaml | let rec last2 = function
| [x;y] -> x
| _::xs -> last2 xs
| |
69fd2b43bf37a8c9cde61af49a02cbe151f2df64285969b2baa9dced91a828a7 | OCamlPro/liquidity | liquidMichelson.mli | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidMichelson.mli | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
c5f065a2df3200a86b41789d31726e2eed2aee788365572ef5d80323b966378b | nibbula/yew | pick-hist.lisp | ;;;
;;; pick-hist.lisp - Pick a history item using pick-list.
;;;
(defpackage :pick-hist
(:documentation
"Pick a history item using pick-list. Meant as an edtior command.")
(:use :cl :dlib :collections :terminal :inator :pick-list)
We use a bunch of internal RL stuff .
(:import-from :rl
#:use-first-contex... | null | https://raw.githubusercontent.com/nibbula/yew/00509c7deb3d2013fe532b8acd4c788bc3f81c19/tools/pick-hist.lisp | lisp |
pick-hist.lisp - Pick a history item using pick-list.
Set default functions.
Generate the list.
Pick it and insert it.
Go back to where we were. |
(defpackage :pick-hist
(:documentation
"Pick a history item using pick-list. Meant as an edtior command.")
(:use :cl :dlib :collections :terminal :inator :pick-list)
We use a bunch of internal RL stuff .
(:import-from :rl
#:use-first-context
#:with-context
#:buf
#:history-context
#:history-head
... |
8dfe7e4029f7842eed7c658bd1428602212f4119fbbad987b45243d8eede382d | bsansouci/reasonglexampleproject | myocamlbuild.ml | open Ocamlbuild_plugin
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " -S " )
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " -inline " )
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " 100 " )
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " -g " )
let _ = fla... | null | https://raw.githubusercontent.com/bsansouci/reasonglexampleproject/4ecef2cdad3a1a157318d1d64dba7def92d8a924/vendor/ReLayout/myocamlbuild.ml | ocaml | open Ocamlbuild_plugin
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " -S " )
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " -inline " )
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " 100 " )
let _ = flag [ " ocaml " ; " compile " ; " native " ] ( A " -g " )
let _ = fla... | |
d04008c99d1aa3cbf14bc29165228e947819a68779c81bf10d7083b8e281d9b4 | digital-asset/ghc | tc058.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
module ShouldSucceed where
class Eq2 a where
doubleeq :: a -> a -> Bool
class (Eq2 a) => Ord2 a where
lt :: a -> a -> Bool
instance Eq2 Int where
doubleeq x y = True
instance Ord2 Int where
lt x y = True
instance (Eq2 a,Ord2 a) => Eq2 [a] where
doubleeq x... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_compile/tc058.hs | haskell | # OPTIONS_GHC -fno - warn - redundant - constraints #
module ShouldSucceed where
class Eq2 a where
doubleeq :: a -> a -> Bool
class (Eq2 a) => Ord2 a where
lt :: a -> a -> Bool
instance Eq2 Int where
doubleeq x y = True
instance Ord2 Int where
lt x y = True
instance (Eq2 a,Ord2 a) => Eq2 [a] where
doubleeq x... | |
942da0b59751fbd1bedb8a655e1f04dd1b68136db4e2a82bdfa556552e1f8a1e | francescoc/scalabilitywitherlangotp | counters.erl | -module(counters).
-behaviour(gen_event).
-export([init/1, terminate/2, handle_event/2, handle_info/2]).
-export([get_counters/1, handle_call/2]).
get_counters(Pid) ->
gen_event:call(Pid, counters, get_counters).
init(_) ->
TableId = ets:new(counters, []),
{ok, TableId}.
terminate(_Reason, TableId) ->
... | null | https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch11/bsc/src/counters.erl | erlang | -module(counters).
-behaviour(gen_event).
-export([init/1, terminate/2, handle_event/2, handle_info/2]).
-export([get_counters/1, handle_call/2]).
get_counters(Pid) ->
gen_event:call(Pid, counters, get_counters).
init(_) ->
TableId = ets:new(counters, []),
{ok, TableId}.
terminate(_Reason, TableId) ->
... | |
4c17243d53edc68c6f5ba216f448f89f510339b4f6b7637cb329e82d79912f13 | cgrand/cljs-js-repl | main.cljs | (ns net.cgrand.cljs.js.repl.main
(:require [net.cgrand.cljs.js.repl.io :as io]
[net.cgrand.cljs.js.repl.dynvars :as dyn]
[net.cgrand.cljs.js.repl.async-reader :as async])
(:require-macros [net.cgrand.cljs.js.repl.main :refer [with-bindings]])
(:refer-clojure :exclude [with-bindings]))
(defn repl-prompt
... | null | https://raw.githubusercontent.com/cgrand/cljs-js-repl/46d73b70b0346a6dac3daf8be25e41db6ff8882b/src/net/cgrand/cljs/js/repl/main.cljs | clojure | ch) | (ns net.cgrand.cljs.js.repl.main
(:require [net.cgrand.cljs.js.repl.io :as io]
[net.cgrand.cljs.js.repl.dynvars :as dyn]
[net.cgrand.cljs.js.repl.async-reader :as async])
(:require-macros [net.cgrand.cljs.js.repl.main :refer [with-bindings]])
(:refer-clojure :exclude [with-bindings]))
(defn repl-prompt
... |
f57425e4d75f300f9b982878f5b3b591458beeddfd31720a49bb664d2cacf1f2 | jbrisbin/rabbit_common | priority_queue.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/jbrisbin/rabbit_common/80814606ae23cc820c74e443383e192cd69ec030/src/priority_queue.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
Priority queues... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2016 Pivotal Software , Inc. All rights reserved .
... |
4702dba8a296e28c802f10f0f643ae6eb7a82c28bcdee207d7b56989e26da4af | xapi-project/xcp-rrd | rrd_updates.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrd/496ed07c4989be7a86087c4778350b53a937b8a1/lib/rrd_updates.ml | ocaml | *
* @group Performance Monitoring
* Debugging only
Helper utility - use create_multi instead
Sanity - make sure the RRDs are homogeneous
Treat -ve start values as relative to the latest update.
Find the rrds that satisfy the requirements
The following timestep is that of the archive |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
cfa05d71ec52624428403edf377d296d84e12f44b5799c050bf83710c01e51f4 | instedd/planwise | api.cljs | (ns planwise.client.sources.api)
;; ----------------------------------------------------------------------------
;; API methods
(def load-sources
{:method :get
:uri "/api/sources"})
(defn create-source-with-csv
[{:keys [name unit csv-file]}]
(let [form-data (doto (js/FormData.)
... | null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/client/src/planwise/client/sources/api.cljs | clojure | ----------------------------------------------------------------------------
API methods | (ns planwise.client.sources.api)
(def load-sources
{:method :get
:uri "/api/sources"})
(defn create-source-with-csv
[{:keys [name unit csv-file]}]
(let [form-data (doto (js/FormData.)
(.append "name" name)
(.append "unit" unit)
(.append "c... |
56968b47c3ca6b2e217026fab04b052b6235d704e8bccd041f90c5684149f3bc | GaloisInc/ivory | Types.hs | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE QuasiQuotes #-}
module Ivory.Compile.C.Types where
import Prelude ()
import Prelude.Compat
import Data.List (nub)
#if !MIN_VERSION_bas... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-backend-c/src/Ivory/Compile/C/Types.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE QuasiQuotes #
------------------------------------------------------------------------------
^ @#include <foo.h>@
^ @#include "foo.h"@
------------------------------------------------------------------------------
| Run the monad and nub the lists. (W... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
module Ivory.Compile.C.Types where
import Prelude ()
import Prelude.Compat
import Data.List (nub)
#if !MIN_VERSION_base(4,11,0)
import Data.Semigroup (Semigroup(..))
#endif
import ... |
e0902939a8b0379227af8d85b23e99a28fd46d78b3a3d7901319d207f539efb4 | willghatch/rackterm | xterm.rkt | #lang racket/base
;; This is to be executed, running a GUI terminal emulator
(require racket/class)
(require racket/gui/base)
(require racket/cmdline)
(require racket/dict)
(require "private/terminal.rkt")
(require "private/terminal-canvas.rkt")
(require "private/term-key-event.rkt")
;; to run tic
(require racket/sy... | null | https://raw.githubusercontent.com/willghatch/rackterm/5d94185dea482974a1cf66099380bede6c2ce501/rackterm/xterm.rkt | racket | This is to be executed, running a GUI terminal emulator
to run tic
if the handler returns 'pass-through, let control pass through to the child
if handler is #f but the keymap was not the default, eat the key (don't pass it)
otherwise just let the kids handle it.
Let's just run tic here and not have others worry a... | #lang racket/base
(require racket/class)
(require racket/gui/base)
(require racket/cmdline)
(require racket/dict)
(require "private/terminal.rkt")
(require "private/terminal-canvas.rkt")
(require "private/term-key-event.rkt")
(require racket/system)
(require racket/runtime-path)
(define font-size (make-parameter 1... |
246bb5ddf8c22584d482f75afb8d0ef90db4dccbf35e078e11bc1153445fcabd | mmzeeman/breaky | breaky_fsm.erl | @author < >
2012
%%
%% @doc Erlang Circuit Breaker
%%
Copyright 2012
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by app... | null | https://raw.githubusercontent.com/mmzeeman/breaky/065a3c92bb3dff0facfb2655b50d3341a1f006e3/src/breaky_fsm.erl | erlang |
@doc Erlang Circuit Breaker
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the... | @author < >
2012
Copyright 2012
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(breaky_fsm).
-behaviour(gen_fsm).
-export([
start_link/2, start_link/3, start_link/4,
pid/1,
state/1,
... |
dd1b3673678b6b0f247a473d1865af4bbb70684de6a56da7980d58cb86073515 | kafka4beam/snabbkaffe | complete_tests.erl | -module(complete_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("snabbkaffe.hrl").
-define(foo(A), #{foo => A, bar => bar}).
-define(valid(T, L),
?assert(?projection_complete(foo, [?foo(I) || I <- T], L))).
-define(invalid(T, L),
?assertError( {panic, #{?snk_kind := "Trace is missing ... | null | https://raw.githubusercontent.com/kafka4beam/snabbkaffe/581c73a601ee3377fad85132323fd2b675dacd71/test/complete_tests.erl | erlang | -module(complete_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("snabbkaffe.hrl").
-define(foo(A), #{foo => A, bar => bar}).
-define(valid(T, L),
?assert(?projection_complete(foo, [?foo(I) || I <- T], L))).
-define(invalid(T, L),
?assertError( {panic, #{?snk_kind := "Trace is missing ... | |
e09e175062f9f07b8421547dc0b101c7be0272edb3c14ad413e5457d6073b1bf | philnguyen/soft-contract | parameter-contract.rkt | #lang racket/base
(require racket/contract)
(define n/c (parameter/c char?))
(define f/c (parameter/c (string? . -> . integer?)))
(define (f param)
(parameterize ([param (char-upcase (param))])
(make-parameter 45)))
(define (g param)
(parameterize ([param (λ (s) (+ 1 ((param) s)))])
param))
(provide
(... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/issues/parameter-contract.rkt | racket | #lang racket/base
(require racket/contract)
(define n/c (parameter/c char?))
(define f/c (parameter/c (string? . -> . integer?)))
(define (f param)
(parameterize ([param (char-upcase (param))])
(make-parameter 45)))
(define (g param)
(parameterize ([param (λ (s) (+ 1 ((param) s)))])
param))
(provide
(... | |
64af485d8407fd6266d1299c50af38e52641895bfcc554277dedf9bd23cd94af | hercules-ci/hercules-ci-agent | Context.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE TemplateHaskellQuotes #-}
module Hercules.CNix.Expr.Context
( context,
evalContext,
EvalState,
Value',
Attr',
BindingsBuilder',
module Hercules.CNix.Store.Context,
(=:),
)
where
import qualified Data.Map as M
import ... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/3aaa80c8fe8cd252b656d40eeec2428afe884c07/hercules-ci-cnix-expr/src/Hercules/CNix/Expr/Context.hs | haskell | # LANGUAGE EmptyDataDecls #
# LANGUAGE TemplateHaskellQuotes # | # LANGUAGE QuasiQuotes #
module Hercules.CNix.Expr.Context
( context,
evalContext,
EvalState,
Value',
Attr',
BindingsBuilder',
module Hercules.CNix.Store.Context,
(=:),
)
where
import qualified Data.Map as M
import Hercules.CNix.Store.Context hiding (context)
import qualified Language.... |
39af242b6dca5881906942d5a93935191358d20a1beac414c61c9c5d881eb5e9 | Tritlo/PropR | TastyFix.hs | module TastyFix where
import Test.Tasty
import Test.Tasty.HUnit (testCase, (@?=))
x :: Int
x = 2
test :: TestTree
test = testCase "Test 1" (x @?= 3)
---- EXPECTED ----
-- diff --git a/tests/cases/TastyFix.hs b/tests/cases/TastyFix.hs
-- --- a/tests/cases/TastyFix.hs
-- +++ b/tests/cases/TastyFix.hs
@@ -7,1 +7,1 @... | null | https://raw.githubusercontent.com/Tritlo/PropR/2a3654ad07f809fb6021ef4b3805d2032a5c7826/tests/cases/TastyFix.hs | haskell | -- EXPECTED ----
diff --git a/tests/cases/TastyFix.hs b/tests/cases/TastyFix.hs
--- a/tests/cases/TastyFix.hs
+++ b/tests/cases/TastyFix.hs
diff --git a/tests/cases/TastyFix.hs b/tests/cases/TastyFix.hs
--- a/tests/cases/TastyFix.hs
+++ b/tests/cases/TastyFix.hs
-- END EXPECTED ---- | module TastyFix where
import Test.Tasty
import Test.Tasty.HUnit (testCase, (@?=))
x :: Int
x = 2
test :: TestTree
test = testCase "Test 1" (x @?= 3)
@@ -7,1 +7,1 @@ x = 2
-x = 2
+ x = ( succ ( 2 ) )
@@ -7,1 +7,1 @@ x = 2
-x = 2
+ x = 3 |
db455139c268f45641a069c58d6de4e16c24c448d57fa4129e2415a707096416 | potapenko/playphraseme-site | prerenders_db.clj | (ns playphraseme.db.prerenders-db
(:require [monger.core :as mg]
[monger.collection :as mc]
[monger.query :as q]
[monger.operators :refer :all]
[mount.core :refer [defstate]]
[playphraseme.app.config :refer [env]]
[mount.core :as mount]
... | null | https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/clj/playphraseme/db/prerenders_db.clj | clojure | (ns playphraseme.db.prerenders-db
(:require [monger.core :as mg]
[monger.collection :as mc]
[monger.query :as q]
[monger.operators :refer :all]
[mount.core :refer [defstate]]
[playphraseme.app.config :refer [env]]
[mount.core :as mount]
... | |
19bfe9d0fd18ac1df8bdcf836e2cd8697a01ad79d99418cfa51647bbb14a29e0 | exercism/erlang | hamming_tests.erl | Generated with ' v0.2.0 '
%% Revision 1 of the exercises generator was used
%% -specifications/raw/7a8722ac4546baae28b4b2c1bdae14e04fdba88c/exercises/hamming/canonical-data.json
%% This file is automatically generated from the exercises canonical data.
-module(hamming_tests).
-include_lib("erl_exercism/include/exe... | null | https://raw.githubusercontent.com/exercism/erlang/9b3d3c14ef826e7efbc4fcd024fd20ed09332562/exercises/practice/hamming/test/hamming_tests.erl | erlang | Revision 1 of the exercises generator was used
-specifications/raw/7a8722ac4546baae28b4b2c1bdae14e04fdba88c/exercises/hamming/canonical-data.json
This file is automatically generated from the exercises canonical data. | Generated with ' v0.2.0 '
-module(hamming_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
'1_empty_strands_test_'() ->
{"empty strands",
?_assertMatch(0, hamming:distance([], []))}.
'2_single_letter_identical_strands_test_'() ->
{"single letter ... |
6e7a6a998dcd81b89a1d1317903df38b005e4993bb3be3af13dbce14c4fc2000 | clojure-android/lein-droid | sideload.clj | (ns leiningen.droid.sideload
"Wrappers around classes and methods that we pull dynamically from jars in
Android SDK."
(:require [cemerick.pomegranate :as cp]
[clojure.java.io :as io])
(:import [java.io File PrintStream]))
(def sideload-jars
"Dynamically adds jars from Android SDK on the classpath... | null | https://raw.githubusercontent.com/clojure-android/lein-droid/1e0f8d5a5dd3c53232e21a1874867c212edb9848/src/leiningen/droid/sideload.clj | clojure | (ns leiningen.droid.sideload
"Wrappers around classes and methods that we pull dynamically from jars in
Android SDK."
(:require [cemerick.pomegranate :as cp]
[clojure.java.io :as io])
(:import [java.io File PrintStream]))
(def sideload-jars
"Dynamically adds jars from Android SDK on the classpath... | |
79c43f471463afa2400c1da459b40f3197a2e12abd3da27222aa6603f151aeb2 | slyrus/mcclim-old | mp-cmu.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLIM-INTERNALS; -*-
;;; ---------------------------------------------------------------------------
Title : CLIM-2 , Chapter 32.2 Multi - processing
for CMU
Created : 2001 - 05 - 22
Author : < >
;;; License: LGPL (See file COPYING for de... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Lisp-Dep/mp-cmu.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLIM-INTERNALS; -*-
---------------------------------------------------------------------------
License: LGPL (See file COPYING for details).
---------------------------------------------------------------------------
This library is free software; you can redistribu... | Title : CLIM-2 , Chapter 32.2 Multi - processing
for CMU
Created : 2001 - 05 - 22
Author : < >
( c ) copyright 2001 by
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public Licens... |
91f4d395d38d53bb0233741eefec69e5893012c7b519c2b06b2c714fdf7a069d | pmundkur/flowcaml | solver.mli | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/types/solver.mli | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : , v 1.8 2003/06/26 13:32:57 si... |
8e26f19fca7521a93ab9ca7cc035ec100845379c47b97d0cf80512b5c60c996f | zwizwa/rai | synth.rkt | #lang s-exp rai/stream
(require rai/stream-lib
rai/synth-lib)
(provide (all-defined-out))
;; Example Audio Synthesizer.
;; Number of stream inputs.
(define main-nsi 0)
(define main-defaults '())
(define main
(lambda
(voice_freq voice_gate ;; Driven by voice allocator
timestep samplerate
sp... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/synth.rkt | racket | Example Audio Synthesizer.
Number of stream inputs.
Driven by voice allocator
UI input specs. Output is normalized units.
Filter
Oscillator
FIXME: scale isn't right: use a squashed log | #lang s-exp rai/stream
(require rai/stream-lib
rai/synth-lib)
(provide (all-defined-out))
(define main-nsi 0)
(define main-defaults '())
(define main
(lambda
timestep samplerate
spread
attack decay sustain release
cutoff
filter_attack
filter_decay
filter_env
filte... |
0a28f7e23e84e749ba3eef4d4eff9999ef8ad02f7350a4ee52e856d7340cf5d5 | ocaml-obuild/obuild | types.ml | type ocaml_compilation_option = Normal | WithDebug | WithProf
type ocaml_compiled_type = ByteCode | Native
type ocaml_compilation_mode = Interface | Compiled of ocaml_compiled_type
let extDP = function
| Normal -> ""
| WithDebug -> ".d"
| WithProf -> ".p"
| null | https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/obuild/types.ml | ocaml | type ocaml_compilation_option = Normal | WithDebug | WithProf
type ocaml_compiled_type = ByteCode | Native
type ocaml_compilation_mode = Interface | Compiled of ocaml_compiled_type
let extDP = function
| Normal -> ""
| WithDebug -> ".d"
| WithProf -> ".p"
| |
9490293fe1091d3b2064dbb092cef7d2bcee69a998c70a8fa106a9a4cd1cccb4 | replikativ/datahike-server | config.clj | (ns datahike-server.config
(:require [clojure.spec.alpha :as s]
[taoensso.timbre :as log]
[mount.core :refer [defstate]]
[environ.core :refer [env]]
[datahike.config :refer [int-from-env bool-from-env]]))
(s/fdef load-config-file
:args (s/cat :config-file string?)
... | null | https://raw.githubusercontent.com/replikativ/datahike-server/ec87469832e017bfaff98e86046de85f8e365817/src/clj/datahike_server/config.clj | clojure | (ns datahike-server.config
(:require [clojure.spec.alpha :as s]
[taoensso.timbre :as log]
[mount.core :refer [defstate]]
[environ.core :refer [env]]
[datahike.config :refer [int-from-env bool-from-env]]))
(s/fdef load-config-file
:args (s/cat :config-file string?)
... | |
117838f60423af125742204b00878d379f035a15aa0b493518e44f3a5d8cf923 | rmloveland/scheme48-0.53 | scm-arith.scm | Copyright ( c ) 1994 by . See file COPYING .
; Arithmetic inference rules
(define (arith-op-rule args node depth return?)
(for-each (lambda (arg)
(unify! (infer-type arg depth) type/integer node))
args)
type/integer)
(define (arith-comparison-rule args node depth return?)
(arith-op-rule args... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/primop/scm-arith.scm | scheme | Arithmetic inference rules
----------------------------------------------------------------
Arithmetic | Copyright ( c ) 1994 by . See file COPYING .
(define (arith-op-rule args node depth return?)
(for-each (lambda (arg)
(unify! (infer-type arg depth) type/integer node))
args)
type/integer)
(define (arith-comparison-rule args node depth return?)
(arith-op-rule args node depth return?)
type/b... |
6f252662c8d9551c451742cde8aff9ec74d3790746d6f0b9f59896aab542edaa | TyOverby/mono | bindgen.mli | open! Core
module Vdom = Vdom
module Name : sig
type t
val create : unit -> t
end
module Value : sig
type t
val named : Name.t -> t
val mapn : t list -> t
val singleton : unit -> t
end
module Computation : sig
type t
val sub : bound:t -> as_:Name.t -> for_:t -> t
val return : Value.t -> t
val ... | null | https://raw.githubusercontent.com/TyOverby/mono/94225736a93457d5c9aeed399c4ae1a08b239fd5/lib/bindgen/src/bindgen.mli | ocaml | open! Core
module Vdom = Vdom
module Name : sig
type t
val create : unit -> t
end
module Value : sig
type t
val named : Name.t -> t
val mapn : t list -> t
val singleton : unit -> t
end
module Computation : sig
type t
val sub : bound:t -> as_:Name.t -> for_:t -> t
val return : Value.t -> t
val ... | |
b304f76b5c2f2da4ce791db0fcc48dcf5b2ea8e846bb4177e5124fb71b3f713c | didierverna/clon | advanced.lisp | ;;; advanced.lisp --- Advanced usage demonstration program
Copyright ( C ) 2010 - 2012 , 2015 , 2021
Author : < >
This file is part of .
;; Permission to use, copy, modify, and distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright notice ... | null | https://raw.githubusercontent.com/didierverna/clon/8d431d288ef2488c7c4fa8d14a61ebe9362cdaff/demos/advanced.lisp | lisp | advanced.lisp --- Advanced usage demonstration program
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WA... |
Copyright ( C ) 2010 - 2012 , 2015 , 2021
Author : < >
This file is part of .
THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN ... |
7501b4f3fb49a8cfacf08b38fb5dffd9cb71f2b9229514e047094c9df4cba340 | nomnom-insights/nomnom.duckula | echo.clj | (ns duckula.test.handler.echo)
(defn handler
"No validation, echoes whatever"
[req]
{:status 200
:body {:echo (str "echo = " (:body req))}})
| null | https://raw.githubusercontent.com/nomnom-insights/nomnom.duckula/a6c8ee965da5717c5909bfbda5745be7a287d2ce/test/duckula/test/handler/echo.clj | clojure | (ns duckula.test.handler.echo)
(defn handler
"No validation, echoes whatever"
[req]
{:status 200
:body {:echo (str "echo = " (:body req))}})
| |
fef29c7af86728c0a2464bdbfcad306bdd70ae387d8876e32ca6749ac5b08b55 | clojure-vim/nvim-parinfer.js | test_runner.cljs | (ns ^:figwheel-always nvim-parinfer.test-runner
(:require [cljs.nodejs :as nodejs]
[cljs.test :refer-macros [run-tests]]
[nvim-parinfer.change-test]))
(nodejs/enable-util-print!)
(def -main (fn [] nil))
(set! *main-cli-fn* -main)
(defn test-it []
(run-tests 'nvim-parinfer.change-test))
| null | https://raw.githubusercontent.com/clojure-vim/nvim-parinfer.js/21d13850173377c975add540ec3163656aec730f/test/nvim_parinfer/test_runner.cljs | clojure | (ns ^:figwheel-always nvim-parinfer.test-runner
(:require [cljs.nodejs :as nodejs]
[cljs.test :refer-macros [run-tests]]
[nvim-parinfer.change-test]))
(nodejs/enable-util-print!)
(def -main (fn [] nil))
(set! *main-cli-fn* -main)
(defn test-it []
(run-tests 'nvim-parinfer.change-test))
| |
4017375181def1cae6971848fa6bba223de96cf804d08597d572858bb1e92f24 | whamtet/dogfort | data.cljs | (ns dogfort.util.data
"Miscellaneous functions for manipulating data structures.")
(defn assoc-conj
"Associate a key with a value in a map. If the key already exists in the map,
a vector of values is associated with the key."
[map key val]
(assoc map key
(if-let [cur (get map key)]
(if (vector? cur... | null | https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/src/dogfort/util/data.cljs | clojure | (ns dogfort.util.data
"Miscellaneous functions for manipulating data structures.")
(defn assoc-conj
"Associate a key with a value in a map. If the key already exists in the map,
a vector of values is associated with the key."
[map key val]
(assoc map key
(if-let [cur (get map key)]
(if (vector? cur... | |
bca151960d6a4c7448bd048f1e0503774b71a2c8a39e70088028b2941f49b106 | elaforge/karya | Cache_profile.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Profile performance with and without the cache.
--
-- This module is about performance, correctness is tested in
-- "Derive.Cache_test".
module Derive.Cache_profile where
import qual... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/Cache_profile.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Profile performance with and without the cache.
This module is about performance, correctness is tested in
"Derive.Cache_test".
pprint (Map.keys (Ui.state_tracks ui_state))
| Run the state transform a fe... | Copyright 2013
module Derive.Cache_profile where
import qualified System.IO as IO
import qualified Text.Printf as Printf
import Util.Test
import qualified Util.Thread as Thread
import qualified Ui.Diff as Diff
import qualified Ui.Event as Event
import qualified Ui.Ui as Ui
import qualified Ui.UiTest as UiTest
imp... |
d457c6fac969b659383f09cd1441cebef3ba951281d0b09a23a58bcab601b736 | dimitaruzunov/fp-2018 | fast-expt.scm | (require rackunit rackunit/text-ui)
(define (square x)
(* x x))
(define (fast-expt x n)
(cond ((= n 0) 1)
((< n 0) (/ 1 (fast-expt x (- n))))
((even? n) (square (fast-expt x (/ n 2))))
(else (* x (fast-expt x (- n 1))))))
(define fast-expt-tests
(test-suite
"Tests for fast-expt"
... | null | https://raw.githubusercontent.com/dimitaruzunov/fp-2018/f75f0cd009cc7f41ce55a5ec71fb4b8eadafc4eb/exercises/01/fast-expt.scm | scheme | (require rackunit rackunit/text-ui)
(define (square x)
(* x x))
(define (fast-expt x n)
(cond ((= n 0) 1)
((< n 0) (/ 1 (fast-expt x (- n))))
((even? n) (square (fast-expt x (/ n 2))))
(else (* x (fast-expt x (- n 1))))))
(define fast-expt-tests
(test-suite
"Tests for fast-expt"
... | |
4a1aea28be937aeb8be8681b37fb3742b6dcc5a793290e1fb45e30e7e1d24a4f | softwarelanguageslab/maf | R5RS_scp1_addition-2.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((1- (lambda (x)
(- x 1)))
(1+ (lambda (x)
(+ 1 x)))
(rec-add (lambda (a b)
(if (= b 0) a (1+ (rec-add a (1- b))))))... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_addition-2.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 0
(letrec ((1- (lambda (x)
(- x 1)))
(1+ (lambda (x)
(+ 1 x)))
(rec-add (lambda (a b)
(if (= b 0) a (1+ (rec-add a (1- b))))))
(iter-add (lambda (a b)
(<change>
... |
c365f97b6f57c4c59fd53a3894ef32b114de0e9dfa0fd482bb4168f759642ef2 | thelema/ocaml-community | jg_message.ml | (*************************************************************************)
(* *)
(* OCaml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/browser/jg_message.ml | ocaml | ***********************************************************************
OCaml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open StdLabels
open Tk
open J... |
d623ffdc3ae29bbbb97d961f6877c57ca95ecba57a65245deb4ede4b4661d7c1 | jeromesimeon/Galax | typing_step.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/typing/typing_step.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : typing_step.mli , v 1.7 2007/02/01 22:08:55 simeon Exp $
Module : Typing_step
Description :
This module implements static typing for XPath steps ( axis and
node tests ) .
Description:
This module implem... |
4ddf1819f4092c5e2e88fc4e54e584f0b1e8417ee1cd51382be17e945e25f23d | theodormoroianu/SecondYearCourses | lab12.hs | import System.Random
import Data.Char
import Test.QuickCheck
newtype MyRandom a = MyRandom { runRandom :: StdGen -> (a,StdGen) }
randomPositive :: MyRandom Int
randomPositive = (MyRandom next)
instance Functor MyRandom where
fmap f (MyRandom fnc) =
MyRandom (\gen ->
let (val, new_gen) = fnc g... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/lab12/lab12.hs | haskell | import System.Random
import Data.Char
import Test.QuickCheck
newtype MyRandom a = MyRandom { runRandom :: StdGen -> (a,StdGen) }
randomPositive :: MyRandom Int
randomPositive = (MyRandom next)
instance Functor MyRandom where
fmap f (MyRandom fnc) =
MyRandom (\gen ->
let (val, new_gen) = fnc g... | |
1d81582ca820bb77457aea86b1adaa38d353619ba35fd2245f11a2af2b25d1fc | NorfairKing/tickler | PostItem.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
module Tickler.Server.Handler.Protected.PostItem (servePostItem) where
import Data.Time
import Data.UUID.Typed
import Database.Persist
import Import
import Servant
import Tickler.API
import Tickler.Ser... | null | https://raw.githubusercontent.com/NorfairKing/tickler/71c6aec471d095fe2357e135bed90a92619de393/tickler-server/src/Tickler/Server/Handler/Protected/PostItem.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
module Tickler.Server.Handler.Protected.PostItem (servePostItem) where
import Data.Time
import Data.UUID.Typed
import Database.Persist
import Import
import Servant
import Tickler.API
import Tickler.Ser... | |
82e7aaf62707becbc14177414b6918c884f2be7ceaad807c487ea88fe869b895 | lasp-lang/types | pure_awset.erl | %%
Copyright ( c ) 2015 - 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/lasp-lang/types/e35b9b3a32b8f580daff1a7d1102813ad530835e/src/pure_awset.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
----------------------------... | Copyright ( c ) 2015 - 2016 . 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
@doc CRDT : pure o... |
2c09e9c542197635b84e9954c81604c5137a958d71fdf7f11e470b0ce98ba590 | erikd/haskell-big-integer-experiment | Integer.hs | # LANGUAGE BangPatterns , NoImplicitPrelude , MagicHash #
# OPTIONS_GHC -fno - warn - orphans #
module New4.Integer
( module New4.GHC.Integer
, hexShow
, hexShowNatural
, readInteger
) where
import Prelude hiding (Integer)
import Data.Char (ord)
import Data.List (foldl')
import GHC.Types
import Nu... | null | https://raw.githubusercontent.com/erikd/haskell-big-integer-experiment/7841ec3fcc5be219fa16963849bd12137112f8a9/New4/Integer.hs | haskell | # LANGUAGE BangPatterns , NoImplicitPrelude , MagicHash #
# OPTIONS_GHC -fno - warn - orphans #
module New4.Integer
( module New4.GHC.Integer
, hexShow
, hexShowNatural
, readInteger
) where
import Prelude hiding (Integer)
import Data.Char (ord)
import Data.List (foldl')
import GHC.Types
import Nu... | |
341037992f73053d8bc4ca5a10fb8a6e4f50740be91e61511ce73578c251129d | OCamlPro/ocplib-simplex | core.mli | (******************************************************************************)
(* ocplib-simplex *)
(* *)
(* Copyright (C) --- OCamlPro --- See README.md for information and licensing... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-simplex/f90e43982ee7a71bc9b628517e1b798d0d6b62f1/src/core.mli | ocaml | ****************************************************************************
ocplib-simplex
Copyright (C) --- OCamlPro --- See README.md for information and licensing
************... |
open ExtSigs
val src : Logs.src
module Make
(Var : Variables)
(R : Rationals)
(Ex : Explanations)
: CoreSig.S
with module Var = Var
and module R = R
and module Ex = Ex
|
0d91c1e3da9c081f088686ce37da91ca1a405441197b5187bad19b08da226459 | haskell-tools/haskell-tools | Recursive.hs | module Refactor.InlineBinding.Recursive where
b = f ()
f a = f a | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/Recursive.hs | haskell | module Refactor.InlineBinding.Recursive where
b = f ()
f a = f a | |
b89d5cfdf1da934e9243867e897feaec8eeff8b1db7248b989fba26bfe9788c4 | schemedoc/implementation-metadata | s2.scm | (title "S2")
(tagline "Scheme to Scheme Compiler")
(sourceforge "mangler")
(person "David Rush")
| null | https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/s2.scm | scheme | (title "S2")
(tagline "Scheme to Scheme Compiler")
(sourceforge "mangler")
(person "David Rush")
| |
2c415c8858b7d02408728cb938d72ef9bc88e81267e2ba2b007598f26e97371e | evolutics/haskell-formatter | Output.hs | predecessor = predecessor
-- ^comment 0
^comment 1
successor :: a
successor = successor
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/depends_on_displacement/single_annotation/line_pair/after_after/Output.hs | haskell | ^comment 0 | predecessor = predecessor
^comment 1
successor :: a
successor = successor
|
f44efb09fcb3d19f6fc086d1f951e997ac7e1258e44a6368ba195ba11ae20332 | javalib-team/sawja | jRTA.ml |
* This file is part of SAWJA
* Copyright ( c)2009 ( CNRS )
* Copyright ( c)2009 ( INRIA )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , either version 3 of
* th... | null | https://raw.githubusercontent.com/javalib-team/sawja/8307a939c30dc3b9dd2586842b28aa9b10776562/src/jRTA.ml | ocaml | type class_method = JCode.jcode class_node * JCode.jcode concrete_method
the clinits fields contains a set of class indexes whose clinit
methods have already been added to the workset
We assume that a call to add_class is done only when a class
has never
been loaded in the program. Loading a class implies lo... |
* This file is part of SAWJA
* Copyright ( c)2009 ( CNRS )
* Copyright ( c)2009 ( INRIA )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , either version 3 of
* th... |
6a3df5ffe0e12c57565e58c84ee44c59708cd6a747357d5b4d477fdca7b88421 | dbuenzli/down | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let lib_dir =
let doc = "Use $(docv) as the lib directory" in
let absent () =
let opam = Conf.tool "opam" `Host_os in
OS.Cmd.(run_out Cmd.(opam % "var" % "lib") |> to_string)
in
Conf.(discovered_key "lib-dir" fpath ~absent ~doc)
let top_c... | null | https://raw.githubusercontent.com/dbuenzli/down/3ab2e4119edf4daee70aeccb5da0fcc6efac9cef/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let lib_dir =
let doc = "Use $(docv) as the lib directory" in
let absent () =
let opam = Conf.tool "opam" `Host_os in
OS.Cmd.(run_out Cmd.(opam % "var" % "lib") |> to_string)
in
Conf.(discovered_key "lib-dir" fpath ~absent ~doc)
let top_c... | |
a6a610ece442f5ae13660b07ac9005598eabcb2c1bbc6657001c9cd787bdbaea | facebook/flow | cache_sig.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/utils/cache_sig.ml | ocaml | Returns the value as well as a boolean which is true if the cache was hit and false if it
* missed. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
68cc3036d24730dd8ffc40405504a89166d87436fd256c8f8808b40dcbb2bbe3 | vikram/lisplibraries | gen-doc.lisp |
(in-package :weblocks-scripts)
(export '(document-weblocks))
(defun compute-documentation-path ()
"Computes the directory where generated documentation should
reside."
(merge-pathnames
(make-pathname :directory '(:relative "docs" "gen"))
(make-pathname :directory
(pathname-directory (truename (asdf:sys... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/scripts/gen-doc.lisp | lisp | dynamically invoke 'document-system' (since reader has no access to tinaa)
lazily load necessary systems |
(in-package :weblocks-scripts)
(export '(document-weblocks))
(defun compute-documentation-path ()
"Computes the directory where generated documentation should
reside."
(merge-pathnames
(make-pathname :directory '(:relative "docs" "gen"))
(make-pathname :directory
(pathname-directory (truename (asdf:sys... |
b433e241ecae6a4ec333c2e8ca43c91d7ea2a742e9a1fbded3418ff09356f948 | openmusic-project/OMChroma | utils-vps.lisp | ;=====================================================
; CHROMA
;=====================================================
part of the OMChroma library
- > High - level control of sound synthesis in OM
;=====================================================
;
;This program is free software; you can redistribute it and/... | null | https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/chroma/vps/utils-vps.lisp | lisp | =====================================================
CHROMA
=====================================================
=====================================================
This program is free software; you can redistribute it and/or
either version 2
of the License, or (at your option) any later version.
See file LIC... | part of the OMChroma library
- > High - level control of sound synthesis in OM
modify it under the terms of the GNU General Public License
File author :
-------| This file is : $ LLvps / utils.lisp
-------| By and
-------| Version 1.0 , May 1998
-------| Copyright 1998 IRCAM
(in-package :cr)
(defmethod so... |
886b329af3b89ff84c47d22556596ad877f278999e166f57a01cb46caf2ef299 | KestrelInstitute/Specware | lm-tokenizer.lisp | -*- Mode : LISP ; Package : Specware ; Base : 10 ; Syntax : Common - Lisp -*-
(in-package :Parser4)
(defparameter *lm-tokenizer-parameters*
(create-tokenizer-parameters
;;
:name 'language-morphism
;;
:size-of-character-set 128
;;
:word-symbol-start-chars "ABCDEF... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Languages/MetaSlang/CodeGen/Handwritten/Lisp/lm-tokenizer.lisp | lisp | Package : Specware ; Base : 10 ; Syntax : Common - Lisp -*-
:string-quote-char #\"
I think these are called special characters in the user documentation
to avoid getting multiple tokens
t means recursive
Underbar #\_ is implicitly given its own code as a syllable separator |
(in-package :Parser4)
(defparameter *lm-tokenizer-parameters*
(create-tokenizer-parameters
:name 'language-morphism
:size-of-character-set 128
:word-symbol-start-chars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*_+-={}|\\:;'<>?/\""
:word-sym... |
6794fed8077baaae2b4fbf4ad414e6401e16c6fd743eb45f6f7d6d539b618385 | ageneau/blossom | primal_dual.cljc | (ns blossom.primal-dual
(:require [blossom.blossom :as blossom]
[blossom.constants :as c]
[blossom.dual :as dual]
[blossom.endpoint :as endp]
[blossom.graph :as graph]
[blossom.label :as label]
[blossom.options :as options]
[blossom.u... | null | https://raw.githubusercontent.com/ageneau/blossom/67a6a2bcc30776867fe16b4e79122e7f43e4928a/src/blossom/primal_dual.cljc | clojure | This subblossom does not have a list of least-slack edges;
get the information from the vertices.
top-level S-blossom: z = z + 2*delta
top-level T-blossom: z = z - 2*delta
no delta-1
No further improvement possible; max-cardinality optimum
reached. Do a final delta update to make the optimum
verifyable. | (ns blossom.primal-dual
(:require [blossom.blossom :as blossom]
[blossom.constants :as c]
[blossom.dual :as dual]
[blossom.endpoint :as endp]
[blossom.graph :as graph]
[blossom.label :as label]
[blossom.options :as options]
[blossom.u... |
7978409572b7d3fafd47222a91ff37d4cdf94860d14b02154357ede3c92bfa44 | semerdzhiev/fp-2020-21 | 11-slice.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме функция , и две числа и връща
списък , състоящ се от елементите на списъка , които се намират на индекси от първото число до второто .
(define (slice xs start end)
(void)
)
(define tests
(test-suite "Slice tests"
(check-equal? (slice '(... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-b/exercises/04.lists/11-slice.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме функция , и две числа и връща
списък , състоящ се от елементите на списъка , които се намират на индекси от първото число до второто .
(define (slice xs start end)
(void)
)
(define tests
(test-suite "Slice tests"
(check-equal? (slice '(... | |
d3fcabc69419fc6056ba3d3a45ca82d84a94c5fe98564357157d60000ead2dd7 | jakepearson/quickie | project.clj | (defproject quickie "0.4.2"
:description "Automatically run tests when clj files change"
:url ""
:license {:name "Eclipse Public License" :url "-v10.html"}
:signing {:gpg-key "37634C19"}
:eval-in-leiningen true
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.namespace "0.2.1... | null | https://raw.githubusercontent.com/jakepearson/quickie/ef005df803173b7707d16b63e24696e09264973a/project.clj | clojure | (defproject quickie "0.4.2"
:description "Automatically run tests when clj files change"
:url ""
:license {:name "Eclipse Public License" :url "-v10.html"}
:signing {:gpg-key "37634C19"}
:eval-in-leiningen true
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.namespace "0.2.1... | |
f38d9e4dcbfb10e297c1c62a0aa6c61cc49fe852f48abcd8f5d3a0a303c4dd01 | crclark/foundationdb-haskell | Internal.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE StrictData #-}
m... | null | https://raw.githubusercontent.com/crclark/foundationdb-haskell/c8c9527ffa02dd2d08c15e23b09dd982a0b2a0ec/src/FoundationDB/Layer/Tuple/Internal.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
# LANGUAGE StrictData #
| Elements of tuples. A tuple is represented as a list of these. Note that
a tuple may contain at most one incomplete version stamp. Future versions of
this library may introduce a more strongly typed tuple representation that
enforces this restri... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module FoundationDB.Layer.Tuple.Internal where
import Control.Applicative
import ... |
0b98779e8273733e59e338ea8afd64ef306a3ea84c74f7349c622a68d6d01280 | schell/editor | Text.hs | module Graphics.Cacheing.Text (
module T,
cacheText
) where
import Control.Lens
import Data.Monoid
import Graphics.Rendering.OpenGL
import Graphics.Cacheing.Types as T
import Graphics.Rendering.Text
import Graphics.Rendering.Shader.Text
import Graphics.Utils
import Graphics.Math
-- | Renders a string of text... | null | https://raw.githubusercontent.com/schell/editor/0f0d2eb67df19e8285c6aaeeeca96bff3110f68d/src/Graphics/Cacheing/Text.hs | haskell | | Renders a string of text into a texture and returns a render cache. | module Graphics.Cacheing.Text (
module T,
cacheText
) where
import Control.Lens
import Data.Monoid
import Graphics.Rendering.OpenGL
import Graphics.Cacheing.Types as T
import Graphics.Rendering.Text
import Graphics.Rendering.Shader.Text
import Graphics.Utils
import Graphics.Math
cacheText :: TextRenderer -> ... |
4ba2148b66942b6e675cc67f03fde7db4181e5d75a5ea45b2dad43173452f1f7 | jepsen-io/voltdb | core.clj | (ns replication-model.core
"A model of voltdb's replication algorithm"
(:require [clojure.set :as set]
[clojure.pprint :refer [pprint]]))
;; Util
(defn ->pprint [x desc]
(prn)
(prn desc)
(pprint x)
x)
(defn rand-non-empty-subset
"Take some elements from coll as a set"
[coll]
(set (take ... | null | https://raw.githubusercontent.com/jepsen-io/voltdb/7c29d0d6caa29b85143d6942e078d7c0bdb82e35/replication-model/src/replication_model/core.clj | clojure | Util
Our node id
Is this node alive
Is this node a leader
The previous set of cluster node ids
Set of cluster node ids
Set of applied writes
Map of op ids to sets of nodes waiting
Map of op ids to planned return values
Invariants
Apply message locally and acknowledge
If it's already been removed, noop.
Han... | (ns replication-model.core
"A model of voltdb's replication algorithm"
(:require [clojure.set :as set]
[clojure.pprint :refer [pprint]]))
(defn ->pprint [x desc]
(prn)
(prn desc)
(pprint x)
x)
(defn rand-non-empty-subset
"Take some elements from coll as a set"
[coll]
(set (take (inc (ra... |
8a9ff9811476b3cec77c5d755500d7a0d6130463547bc9552b82d8bff3fbe223 | RefactoringTools/wrangler | refac_batch_rename_fun.erl | @author < >
%%@hidden
%%@private
-module(refac_batch_rename_fun).
%%@hidden
%%@private
-export([composite_refac/1, select_focus/1, input_par_prompts/0]).
-behaviour(gen_composite_refac).
-include("wrangler.hrl").
input_par_prompts() ->
[].
select_focus(_Args) ->
{ok, none}.
composite_refac(_Args=#ar... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/refac_batch_rename_fun.erl | erlang | @hidden
@private
@hidden
@private
transform camelCase atom to camel_case. | @author < >
-module(refac_batch_rename_fun).
-export([composite_refac/1, select_focus/1, input_par_prompts/0]).
-behaviour(gen_composite_refac).
-include("wrangler.hrl").
input_par_prompts() ->
[].
select_focus(_Args) ->
{ok, none}.
composite_refac(_Args=#args{search_paths=SearchPaths}) ->
?non_... |
a2ac19da06da3cd4fef92d06d1a56b4a9e422841760b66da87a54045bebf0120 | FlowerWrong/erlim | toml_util.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < COMPANY >
%%% @doc
utils for < a href=" / toml - lang / toml">toml</a >
%%% @end
Created : 27 . 九月 2015 下午12:17
%%%-------------------------------------------------------------------
-module(toml_util).
-export([p... | null | https://raw.githubusercontent.com/FlowerWrong/erlim/91f0ddd903f6b708f6fc843d5e88885afc12b850/src/toml_util.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
@doc parse the "/etc/erlim/erlim.toml" file | @author
( C ) 2015 , < COMPANY >
utils for < a href=" / toml - lang / toml">toml</a >
Created : 27 . 九月 2015 下午12:17
-module(toml_util).
-export([parse/0]).
parse() ->
Data = readlines("/etc/erlim/erlim.toml"),
etoml:parse(Data).
readlines(FileName) ->
{ok, Device} = file:open(FileName, [read... |
c1c6000720e87afbdb81d0070dc00b2be867629d4c340ad6e6e6052cb017ae9d | Octachron/codept | stdlib_404.ml | let modules= let open Module in let open Sig in
Dict.of_list [("Arg",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Arg";namespace=["Stdlib"]}};path={name="Arg";namespace=["Stdlib"]}}; signature=empty}));
("Array",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Array";n... | null | https://raw.githubusercontent.com/Octachron/codept/1ecb2389a9a936dd937624e79970d4d6f112f16b/tests/bundle_refs/stdlib_404.ml | ocaml | let modules= let open Module in let open Sig in
Dict.of_list [("Arg",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Arg";namespace=["Stdlib"]}};path={name="Arg";namespace=["Stdlib"]}}; signature=empty}));
("Array",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Array";n... | |
cbda79c2331cadbd54c27a7d53ca7d3b46869846aca16ac07d03daa0d4fe9fac | tlaplus/tlapm | e_leibniz.ml | Detect positions .
This info is added as an array to
the property of all Operators and
applications of operators to arguments .
Copyright ( C ) 2008 - 2014 INRIA and Microsoft Corporation
This info is added as an array to
the property of all Operators and
applications of operators to arguments.
Copyr... | null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/expr/e_leibniz.ml | ocaml | A
B
C
A
B
C
* we assign leibnizity to operator arguments using an array
* | Detect positions .
This info is added as an array to
the property of all Operators and
applications of operators to arguments .
Copyright ( C ) 2008 - 2014 INRIA and Microsoft Corporation
This info is added as an array to
the property of all Operators and
applications of operators to arguments.
Copyr... |
1e7954effc3a432888ab7a7b4c154c6b28dd58d9951bddcc454ac7b8ff79f5cd | stepankuzmin/simple | simple.erl | -module(simple).
-compile(export_all).
-include("./deps/yaws/include/yaws_api.hrl").
-include("./src/token.hrl").
-define(KEY, "").
-define(SECRET, "").
%% API
start_link() ->
{ok, spawn(?MODULE, start, [])}.
start() ->
Id = "embedded",
GconfList = [{id, Id}],
Docroot = "./priv/www",
%% Port = l... | null | https://raw.githubusercontent.com/stepankuzmin/simple/2547d2a61de34b9dffac2b67dd0ce29490566760/src/simple.erl | erlang | API
Port = list_to_integer(os:getenv("PORT")),
Appmod callback
Routes callbacks | -module(simple).
-compile(export_all).
-include("./deps/yaws/include/yaws_api.hrl").
-include("./src/token.hrl").
-define(KEY, "").
-define(SECRET, "").
start_link() ->
{ok, spawn(?MODULE, start, [])}.
start() ->
Id = "embedded",
GconfList = [{id, Id}],
Docroot = "./priv/www",
SconfList = [{port... |
82dcdbe71f489e054dcc8d9c4e591dbe3527079eb36f1fd90a78a2c6663261f9 | larcenists/larceny | deriv.scm | ;;; DERIV -- Symbolic derivation.
;;; Returns the wrong answer for quotients.
;;; Fortunately these aren't used in the benchmark.
(define (deriv a)
(cond ((not (pair? a))
(if (eq? a 'x) 1 0))
((eq? (car a) '+)
(cons '+
(map deriv (cdr a))))
((eq? (car a) '-)
... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Stress/src/deriv.scm | scheme | DERIV -- Symbolic derivation.
Returns the wrong answer for quotients.
Fortunately these aren't used in the benchmark. |
(define (deriv a)
(cond ((not (pair? a))
(if (eq? a 'x) 1 0))
((eq? (car a) '+)
(cons '+
(map deriv (cdr a))))
((eq? (car a) '-)
(cons '-
(map deriv (cdr a))))
((eq? (car a) '*)
(list '*
a
(cons... |
e123564fd5243022c9195ba9c8c7784839636971a12c68febcb4a1cb182b3c77 | froggey/Mezzano | logitech.lisp | (defpackage :mezzano.driver.usb.logitech
(:use :cl :mezzano.driver.usb)
(:local-nicknames (:sup :mezzano.supervisor)))
(in-package :mezzano.driver.usb.logitech)
;;======================================================================
Hard coded device driver for TrackMan Wheel pointing device ( mouse )
;; which... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/drivers/usb/logitech.lisp | lisp | ======================================================================
which has the following descriptors:
HID Descriptor
End Point Descriptor
Summary of report descriptor:
byte 0:
byte 1:
======================================================================
Configuration number from configuratio... | (defpackage :mezzano.driver.usb.logitech
(:use :cl :mezzano.driver.usb)
(:local-nicknames (:sup :mezzano.supervisor)))
(in-package :mezzano.driver.usb.logitech)
Hard coded device driver for TrackMan Wheel pointing device ( mouse )
Configuration Descriptor
Length : 34 , Interfaces : 1 , Config Number : 1 ,... |
03cab87a123b516b1c38a8a8300d0a0bb161c8331e23597643c6ad7c29ed388a | zack-bitcoin/verkle | verify2.erl | -module(verify2).
-export([proof/3, update/3, remove_empty/1,
test/0
]).
-include("constants.hrl").
fill_points(Points, [], Result) ->
{lists:reverse(Result), Points};
fill_points(Ps, [T|R], Result) when is_list(T) ->
{T2, Ps2} = fill_points(Ps, T, []),
fill_points(Ps2, R, [T2|Result]);
f... | null | https://raw.githubusercontent.com/zack-bitcoin/verkle/46bf69f17170a71829f9243faea06ee42f224687/src/verify2.erl | erlang | walk down the tree, then update everything in reverse in the callback stack.
lets decompress all the points in this tree to start off.
Decompressed = fq:decompress(CPL),
io:fwrite(PL),
io:fwrite({PL, PL2}),
160 -> OldRoot0;
32 -> fq:decompress(OldRoot0)
end,
_ -> fq:e_a... | -module(verify2).
-export([proof/3, update/3, remove_empty/1,
test/0
]).
-include("constants.hrl").
fill_points(Points, [], Result) ->
{lists:reverse(Result), Points};
fill_points(Ps, [T|R], Result) when is_list(T) ->
{T2, Ps2} = fill_points(Ps, T, []),
fill_points(Ps2, R, [T2|Result]);
f... |
0062a8ed2f94a3f91e2efa33ed865381bbb8670ad68e80a7e5d8692962070306 | hverr/haskell-cache | Cache.hs | -- |
-- Module: Data.Cache
Copyright : ( c ) 2016
License : BSD3
Maintainer : < >
-- Stability: stable
--
-- An in-memory key/value store with expiration support, similar
-- to patrickmn/go-cache for Go.
--
The cache is a shared mutable HashMap implemented using STM . It
-- supports item e... | null | https://raw.githubusercontent.com/hverr/haskell-cache/246f24b404de318694f3ff4c6cc97ef38ef74f69/src/Data/Cache.hs | haskell | |
Module: Data.Cache
Stability: stable
An in-memory key/value store with expiration support, similar
to patrickmn/go-cache for Go.
supports item expiration.
* How to use this library
$use
* Creating a cache
* Cache properties
* Managing items
** Insertion
** Querying
** Deletion
** Combined acti... | Copyright : ( c ) 2016
License : BSD3
Maintainer : < >
The cache is a shared mutable HashMap implemented using STM . It
module Data.Cache (
Cache
, newCache
, newCacheSTM
, defaultExpiration
, setDefaultExpiration
, copyCache
, copyCacheSTM
, insert
, insert'
, insertSTM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.