_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 |
|---|---|---|---|---|---|---|---|---|
0742b587be68828aa305b943ce56d3c19147b8f54d2f222326721c1e10cb77e9 | mfikes/fifth-postulate | ns351.cljs | (ns fifth-postulate.ns351)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns351.cljs | clojure | (ns fifth-postulate.ns351)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
80efc1853f24ae0d9184532defb35cfde9180d880a85be7d99fb57df95e372ce | iloveponies/p-p-p-pokerface | p_p_p_pokerface.clj | (ns p-p-p-pokerface)
(defn rank [card]
nil)
(defn suit [card]
nil)
(defn pair? [hand]
nil)
(defn three-of-a-kind? [hand]
nil)
(defn four-of-a-kind? [hand]
nil)
(defn flush? [hand]
nil)
(defn full-house? [hand]
nil)
(defn two-pairs? [hand]
nil)
(defn straight? [hand]
nil)
(defn straight-flush... | null | https://raw.githubusercontent.com/iloveponies/p-p-p-pokerface/0daa7266a751399616a97c016ace8da4e9df4db4/src/p_p_p_pokerface.clj | clojure | (ns p-p-p-pokerface)
(defn rank [card]
nil)
(defn suit [card]
nil)
(defn pair? [hand]
nil)
(defn three-of-a-kind? [hand]
nil)
(defn four-of-a-kind? [hand]
nil)
(defn flush? [hand]
nil)
(defn full-house? [hand]
nil)
(defn two-pairs? [hand]
nil)
(defn straight? [hand]
nil)
(defn straight-flush... | |
4df1804eb62f839ffcce4d160ee97ccbb8e00e643886ca8a3662f99c909b09d4 | mattjbray/ocaml-decoders | bs_json.mli | (** Turn JSON values into Ocaml values. *)
module Decode : sig
include Decoders.Decode.S with type value = Js.Json.t
end
module Encode : sig
include Decoders.Encode.S with type value = Js.Json.t
end
| null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/00d930a516805f1bb8965fed36971920766dce60/src-bs/bs_json.mli | ocaml | * Turn JSON values into Ocaml values. |
module Decode : sig
include Decoders.Decode.S with type value = Js.Json.t
end
module Encode : sig
include Decoders.Encode.S with type value = Js.Json.t
end
|
c5c2950c2522c6957e6a6bc6815b6c503201ceb51808c59edc6034ede375bb17 | NorfairKing/smos | MonthlySpec.hs | # LANGUAGE OverloadedLists #
module Smos.Calendar.Import.RecurrenceRule.MonthlySpec
( spec,
)
where
import Data.Time
import Safe
import Smos.Calendar.Import.RecurrenceRule
import Smos.Calendar.Import.RecurrenceRule.Gen ()
import Smos.Calendar.Import.RecurrenceRule.Recurrence.Monthly
import Test.Syd
import Test.Sy... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-calendar-import/test/Smos/Calendar/Import/RecurrenceRule/MonthlySpec.hs | haskell | An unimportant limit because we don't specify any rules that have no occurrances
No 'ByWeekNo' because it's excluded by the table
No 'ByYearDay' because it's excluded by the table
An unimportant limit because we don't specify any rules that have no occurrances
No 'ByWeekNo' because it's excluded by the table
No... | # LANGUAGE OverloadedLists #
module Smos.Calendar.Import.RecurrenceRule.MonthlySpec
( spec,
)
where
import Data.Time
import Safe
import Smos.Calendar.Import.RecurrenceRule
import Smos.Calendar.Import.RecurrenceRule.Gen ()
import Smos.Calendar.Import.RecurrenceRule.Recurrence.Monthly
import Test.Syd
import Test.Sy... |
78285c5e926d8c67fa8b19a4b2ac2f420754d3c4df58a83a38c2c7a22b46cf25 | Lupino/haskell-periodic | Types.hs | module Periodic.Types
( module X
) where
import Periodic.Types.ClientType as X
import Periodic.Types.Error as X
import Periodic.Types.Internal as X
import Periodic.Types.Job as X
import Periodic.Types.Packet as X
| null | https://raw.githubusercontent.com/Lupino/haskell-periodic/c04517bb9195b39c8ddc8839d367f9adf219c6bc/periodic-common/src/Periodic/Types.hs | haskell | module Periodic.Types
( module X
) where
import Periodic.Types.ClientType as X
import Periodic.Types.Error as X
import Periodic.Types.Internal as X
import Periodic.Types.Job as X
import Periodic.Types.Packet as X
| |
d5764d85da2ec1460c50020e49a3c3dfe8898bef8cc3f43bfd9e1feb70862ef6 | tonyg/racket-explorer | main.rkt | #lang racket/gui
;; Utility for interactive exploration of complex data structures.
Copyright ( c ) 2013 , 2015 < >
;;
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
in the Software without restri... | null | https://raw.githubusercontent.com/tonyg/racket-explorer/2a1836d01a7ff2ed025a67cc5f06c38b56776b2d/explorer/main.rkt | racket | Utility for interactive exploration of complex data structures.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, s... | #lang racket/gui
Copyright ( c ) 2013 , 2015 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY... |
ab3e24ab4613712ecca5dac950e437531bef79bbe9f07985cbbc929f1b2fb0b1 | deadeyejoe/fabrikk | directives_one.clj | (ns joe.tutorial.alpha.directives-one
(:require [fabrikk.alpha.core :as fab]))
(defn admin-email []
(str "admin-" (rand-int 10000) "@example.com"))
(def user
(fab/->factory
{:id ::user
:template {:id (fab/sequence)
:name "John Smith"
:email ""
:role "user"
... | null | https://raw.githubusercontent.com/deadeyejoe/fabrikk/c731cd435baaf241450a9b280286b894c8cee81c/development/src/joe/tutorial/alpha/directives_one.clj | clojure | (ns joe.tutorial.alpha.directives-one
(:require [fabrikk.alpha.core :as fab]))
(defn admin-email []
(str "admin-" (rand-int 10000) "@example.com"))
(def user
(fab/->factory
{:id ::user
:template {:id (fab/sequence)
:name "John Smith"
:email ""
:role "user"
... | |
41a7a785d91aafeea0e549f02ed86ae34ca1a633943de65ade24d9a03fa8475a | inaka/canillita | canillita_single_newsitem_handler.erl | %%% @doc GET /newspapers/:name/news/:id handler.
-module(canillita_single_newsitem_handler).
-behaviour(trails_handler).
-include_lib("mixer/include/mixer.hrl").
-mixin([{ sr_single_entity_handler
, [ init/3
, rest_init/2
, allowed_methods/2
, content_types_provided/2
,... | null | https://raw.githubusercontent.com/inaka/canillita/56e7fa6b7441a591dbf2396dc85a43cdca6878c6/src/canillita_single_newsitem_handler.erl | erlang | @doc GET /newspapers/:name/news/:id handler. | -module(canillita_single_newsitem_handler).
-behaviour(trails_handler).
-include_lib("mixer/include/mixer.hrl").
-mixin([{ sr_single_entity_handler
, [ init/3
, rest_init/2
, allowed_methods/2
, content_types_provided/2
, handle_get/2
]
}]).
-mixin([{ ... |
0dbc0cb49ed236dba0920120e6dea91f7187055e67c422edc08af491549043f2 | theosotr/buildfs | interpreter.mli |
* Copyright ( c ) 2018 - 2020
*
* 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 , version 3 .
*
* This program is distributed in the hope that it will be useful , but
... | null | https://raw.githubusercontent.com/theosotr/buildfs/3cd287da0d1184934c1bcd28d301f2545196f44b/src/analysis/interpreter.mli | ocaml | * This function interprets the given trace.
It transitions the given state to a new state based on the semantics
of the given BuildFS statement |
* Copyright ( c ) 2018 - 2020
*
* 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 , version 3 .
*
* This program is distributed in the hope that it will be useful , but
... |
dbc64bb2e0867754095566bffd8ba971e2776b4ec79fbe96e231fc6b2092ee54 | manuel-serrano/bigloo | walk.scm | ;*=====================================================================*/
* ... /prgm / project / bigloo / / comptime / Dataflow / walk.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : F... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/1ae5b060fcfd05ad33440765b45add3a26ced5b4/comptime/Dataflow/walk.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Compute type variable references according to dataflow tests. */
* For instance, for an ex... | * ... /prgm / project / bigloo / / comptime / Dataflow / walk.scm * /
* Author : * /
* Creation : Fri Nov 26 08:17:46 2010 * /
* Last change : Sat Aug 27 16:37:31 2022 ( serrano ) * /
* Copyright... |
c56e5fba0b8780c5e2e9d8aee431030a8a069d743f2def5a63ae752b03e1094e | emqx/emqx-auth-mongo | emqx_auth_mongo_app.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the L... | null | https://raw.githubusercontent.com/emqx/emqx-auth-mongo/5e37f2ca0e777ca6ad8a618256a15d91cde064d3/src/emqx_auth_mongo_app.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_auth_mongo_app).
-behaviour(application).
-emqx_plugin(auth).
-include("emqx_auth_mongo... |
501e739dff697312bc9b544d46f4d37b939c0be6bc4dc507d2a7c859b868cbcc | Kong/HARchiver | network.mli | open Core.Std
module CLU = Conduit_lwt_unix
val get_addr_from_ch : CLU.flow -> string
val dns_lookup : string -> (string, string) Result.t Lwt.t | null | https://raw.githubusercontent.com/Kong/HARchiver/eb0aca5c15d536ab2d7fba9d00ed1928466e1a54/src/network.mli | ocaml | open Core.Std
module CLU = Conduit_lwt_unix
val get_addr_from_ch : CLU.flow -> string
val dns_lookup : string -> (string, string) Result.t Lwt.t | |
b76669acda6a69e1a358c8c049ec1337ba4a3aeffa1ebfd3a892d711d62c108c | tomjridge/tjr_simple_earley | profiler.ml | let now =
Core.(fun () ->
Time_stamp_counter.(now () |> to_int63)
|>Int63.to_int_exn)
let profiler = Tjr_profile.make_string_profiler ~now
| null | https://raw.githubusercontent.com/tomjridge/tjr_simple_earley/ca558e0e7f4ddba4cd6573bf180710cd02f25ba4/_archive/.dockerfile/tjr_simple_earley/bin/profiler.ml | ocaml | let now =
Core.(fun () ->
Time_stamp_counter.(now () |> to_int63)
|>Int63.to_int_exn)
let profiler = Tjr_profile.make_string_profiler ~now
| |
2e068056c45459402dd60905a55b8f5c2bba0022ad7fd62b975ea7b8057f7c69 | replikativ/datahike | lookup_refs_test.cljc | (ns datahike.test.lookup-refs-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
[datahike.api :as d]
[datahike.db :as db]
[datahike.test.core-test :as tdc]))
(deftest test-lookup-refs
(let [db (d/... | null | https://raw.githubusercontent.com/replikativ/datahike/408cb0f538a837267e44b098df895fa00348fe10/test/datahike/test/lookup_refs_test.cljc | clojure | Additions
lookup refs are resolved at intermediate DB value
Retractions
Additions
reverse refs | (ns datahike.test.lookup-refs-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
[datahike.api :as d]
[datahike.db :as db]
[datahike.test.core-test :as tdc]))
(deftest test-lookup-refs
(let [db (d/... |
08d442453601bf08e0f6008272704a35acb76eda8d46ec88b8df6371c459a16e | mirage/irmin | process.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/examples/process.ml | ocaml | ubuntu; |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
615366ced3a03760dc2ef221b607a4d0712407dbd9dee2d5720f89fad8611b49 | ericmoritz/wsdemo | wsdemo_server_logger.erl | -module(wsdemo_server_logger).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([start_link/3, start_link/2, stop/0]).
%% ----------------------... | null | https://raw.githubusercontent.com/ericmoritz/wsdemo/4b242ff56e8dc1d2af78b695d23b8c7eeb884682/src/wsdemo_server_logger.erl | erlang | ------------------------------------------------------------------
API Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
------------------------------------------------------------------
-------------------------... | -module(wsdemo_server_logger).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-export([start_link/3, start_link/2, stop/0]).
gen_server Function Exports
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
start_link(Host, Port, Servername) when is_integer(Port)... |
527b849e40c5083fd194dc54922dbe298f7b53ca909baffc75cf4bd1355466c4 | helium/blockchain-etl | be_db_backfill.erl | -module(be_db_backfill).
-include("be_db_worker.hrl").
-include("be_db_follower.hrl").
-export([
receipts_challenger/4,
reversed_receipts_path/3,
gateway_names/0,
oui_subnets/0,
location_geometry/0,
reward_gateways/2,
gateway_location_hex/0,
dc_burn/2,
oracle_price_at/1,
gatewa... | null | https://raw.githubusercontent.com/helium/blockchain-etl/06dd1e23584366f9243e4fbb68666a5685dd5efd/src/be_db_backfill.erl | erlang |
Returns a map receipts_txn:hash() -> receipts_txn
returns the B58 addresses for the challengees in a path for a given
receipts txn
Reversed path, re-store json for transaction
Correct path order, leave json alone
Fill in gateway names if they're null
Fill in gateway location_hex
Fill in gateway p... | -module(be_db_backfill).
-include("be_db_worker.hrl").
-include("be_db_follower.hrl").
-export([
receipts_challenger/4,
reversed_receipts_path/3,
gateway_names/0,
oui_subnets/0,
location_geometry/0,
reward_gateways/2,
gateway_location_hex/0,
dc_burn/2,
oracle_price_at/1,
gatewa... |
0324dabc82795b78b3b8e3acb5b6c59d47a9beaff9ac12bda3da36cd6529b980 | google-research/dex-lang | OccAnalysis.hs | Copyright 2022 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
module OccAnalysis (analyzeOccurrences) where
import Control.Monad.State.Strict
import Data.Functor
import Data.List (foldl')
import Data.List.NonEmpty qu... | null | https://raw.githubusercontent.com/google-research/dex-lang/a24a77143bd2863b7085439ff5472adb381d69c2/src/lib/OccAnalysis.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
=== External API ===
This annotates every `Let` binding in the given `Block` with an `OccInfo`
annotation holding a summary of how that binding is used. It also eliminates
unused pure bin... | Copyright 2022 Google LLC
module OccAnalysis (analyzeOccurrences) where
import Control.Monad.State.Strict
import Data.Functor
import Data.List (foldl')
import Data.List.NonEmpty qualified as NE
import Data.Maybe (fromMaybe)
import Control.Monad.Reader.Class
import Core
import LabeledItems
import IRVariants
import ... |
c933b58baf50f7761fc784821f2841c5315006e4274f753af93e9f1573769ff9 | alesaccoia/festival_flinger | build_clunits.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2005 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_clb_cg/festvox/build_clunits.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
(defvar cmu_us_clb::dir ".")
(require 'clunits_build)
Basic voice definition file with voice defines and
(load "festvox/cmu_us_clb_clunits.scm")
(defvar cluster_feature_filename "all.desc")
(set! cmu_us_clb::dt_params
(cons
(list 'db_dir (string-append cmu_us_clb::dir "/"))
(append
cmu_us_c... |
166bb1bb58e456e5e08256e364d14ea488665e84415bf1070cc42950387e8f32 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Distance.ES.Rules
( rules ) whe... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Distance/ES/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Distance.ES.Rules
( rules ) where
import Data.String
import Prelude
import Duckling.Dimensions.Types
import Duckling.Distance.Helpers
import qualified Duckling.Distance.Types as TDistance
import Duckling.Types
ruleLatentDistKm :: Rule
ruleLatent... |
ef7abc4d58140b1937b5aff1050ee004d54bf94b192a5c23ed16e65b014fc927 | janestreet/universe | comparison_result.ml | open! Core_kernel
open! Import
type t =
| Binary_same
| Binary_different of
{ prev_is_binary : bool
; next_is_binary : bool
}
| Hunks of Hunks.t
let update_config_infer_keep_ws config ~prev ~next =
let keep_ws =
config.Configuration.keep_ws || Should_keep_whitespace.for_diff ~prev ~next
... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/patdiff/kernel/src/comparison_result.ml | ocaml | open! Core_kernel
open! Import
type t =
| Binary_same
| Binary_different of
{ prev_is_binary : bool
; next_is_binary : bool
}
| Hunks of Hunks.t
let update_config_infer_keep_ws config ~prev ~next =
let keep_ws =
config.Configuration.keep_ws || Should_keep_whitespace.for_diff ~prev ~next
... | |
f8860ef47615df7684bb227d1be0c66595f1c3d84838cc837ca050afd41c8243 | clojure-interop/java-jdk | core.clj | (ns javax.tools.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[javax.tools.Diagnostic$Kind])
(require '[javax.tools.Diagnostic])
(require '[javax.tools.DiagnosticCollector])
(require '[javax.tools.DiagnosticListener])
(require '[javax.tools.DocumentationTool$DocumentationTask])
(requi... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.tools/src/javax/tools/core.clj | clojure | (ns javax.tools.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[javax.tools.Diagnostic$Kind])
(require '[javax.tools.Diagnostic])
(require '[javax.tools.DiagnosticCollector])
(require '[javax.tools.DiagnosticListener])
(require '[javax.tools.DocumentationTool$DocumentationTask])
(requi... | |
54daf4ac6f886ee862668d5264f8f0046f16ed070cb28fe0ccb36cefbdb2506d | owlbarn/owl_opt | gd_s.mli | module Make (P : Prms.PT) :
Gd_intf.Sig
with type 'a t := 'a P.t
and type fv = Owl.Algodiff.S.t
and type prm = Owl.Algodiff.S.t
| null | https://raw.githubusercontent.com/owlbarn/owl_opt/c3b34072dddbce2d70e1698c5f1fd84d783f9cef/src/opt/gd/gd_s.mli | ocaml | module Make (P : Prms.PT) :
Gd_intf.Sig
with type 'a t := 'a P.t
and type fv = Owl.Algodiff.S.t
and type prm = Owl.Algodiff.S.t
| |
e19cfde0f38883bf17152fd30f8470f26ce2dd74931abe11770ff80b04598168 | aantron/luv | request.mli | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* Requests .
See { { : } { i Requests } } in
the user guide and { { : } [ uv_req_t ]
— { i Base request } } in .
Requests are objects libuv uses to track ... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/request.mli | ocaml | * Tries to cancel a pending request.
Binds {{:#c.uv_cancel}
[uv_cancel]}.
*/* | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* Requests .
See { { : } { i Requests } } in
the user guide and { { : } [ uv_req_t ]
— { i Base request } } in .
Requests are objects libuv uses to track ... |
e75e7d76a8f8b43044d20da629780ec5a393473e21441dfedf054496ff1238c1 | iu-parfunc/lvars | Memo.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
{-# OPTIONS_GHC -O2 #-}
{-|
This basic version of memotables is implemented on top of existing LVars without
breaking any rules.
The proble... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish-extra/Data/LVar/Memo.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE EmptyDataDecls #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -O2 #
|
This basic version of memotables is implemented on top of existing LVars without
breaking any rules.
The problem is that it cannot do cycle detection, because that requires tracking
extra informati... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Data.LVar.Memo
(
Memo, MemoFuture, makeMemo,
getLazy, getMemo, force
) where
import Debug.Trace
import Control.LVish
import qualified Data.LVar.PureMap as IM
import Data.LVar.PureSet as IS
... |
1d6a7bcbf67f076593808c3d670ad849e67f66bac2525f5708a2f9470148dd75 | MinaProtocol/mina | hash_prefix_states.mli | open Snark_params
open Tick
open Random_oracle
val signature : Field.t State.t
val signature_for_mainnet : Field.t State.t
val signature_for_testnet : Field.t State.t
val signature_legacy : Field.t Legacy.State.t
val signature_for_mainnet_legacy : Field.t Legacy.State.t
val signature_for_testnet_legacy : Field.t ... | null | https://raw.githubusercontent.com/MinaProtocol/mina/9c59ae9d8f627459d26e40d7018b9d4c38d2159a/src/lib/hash_prefix_states/hash_prefix_states.mli | ocaml | * [merkle_tree depth] gives the hash prefix for the given node depth.
This function performs caching: all prefixes up to the given depth will be
computed, and subsequent calls will retrieve them with negligible cost.
| open Snark_params
open Tick
open Random_oracle
val signature : Field.t State.t
val signature_for_mainnet : Field.t State.t
val signature_for_testnet : Field.t State.t
val signature_legacy : Field.t Legacy.State.t
val signature_for_mainnet_legacy : Field.t Legacy.State.t
val signature_for_testnet_legacy : Field.t ... |
5ba9c6abcc25474277b788793fac07fcaf5e0ae04dc2561b5ebfd2fc60ad4305 | snoyberg/packdeps | Application.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE BangPatterns #-}
# OPTIONS_GHC -fno - warn - orphans #
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import hiding (log)
import Settings
import Yesod.Default.Config
import Yesod.Default.Main
import... | null | https://raw.githubusercontent.com/snoyberg/packdeps/20389cf29f5556af22eefba6dbb9a1d08484167b/packdeps-yesod/src/Application.hs | haskell | # LANGUAGE BangPatterns #
Import all relevant handler modules here.
Don't forget to add new modules to your cabal file!
the comments there for more details.
This function allocates resources (such as a database connection pool),
place to put your migrate statements to have automatic database | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import hiding (log)
import Settings
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import... |
ce6a02aa2de63ed6a97f428ea9e09866423caeb6bbc19abbb145eea7d3b9c9b5 | liqd/thentos | UtilSpec.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
# OPTIONS_GHC #
module Thentos.UtilSpec where
import Data.String.Conversions (ST, SBS)
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Thentos.Types
import Thentos.Util
import Thentos.Test.Arbitrary ()
import Thent... | null | https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-tests/tests/Thentos/UtilSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
The samples for this test have been generated with the following python script:
>>> from cryptacular.bcrypt import BCRYPTPasswordManager
>>> manager = BCRYPTPasswordManager()
>>>
>>> def run(password):
>>>
>>> run('')
>>> run('***')
>>> run('... |
# OPTIONS_GHC #
module Thentos.UtilSpec where
import Data.String.Conversions (ST, SBS)
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Thentos.Types
import Thentos.Util
import Thentos.Test.Arbitrary ()
import Thentos.Test.Config (forceUserEmail)
mkUser :: HashedSecret UserPass -> User
mk... |
39d8e3b557714b2552a4e1fba335a966ee38fe2e42866b1c14c71d0924d3c5ed | oriansj/mes-m2 | number2string.scm | GNU --- Maxwell Equations of Software
Copyright ( C ) 2008 Kragen
;;;
This file is part of GNU .
;;;
GNU 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 the License , or ( ... | null | https://raw.githubusercontent.com/oriansj/mes-m2/b44fbc976ae334252de4eb82a57c361a195f2194/test/test026/number2string.scm | scheme |
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Setup output file | GNU --- Maxwell Equations of Software
Copyright ( C ) 2008 Kragen
This file is part of GNU .
under the terms of the GNU General Public License as published by
GNU is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public License
along with GNU... |
1c1915d5468f8718fa56f1110ae0793289ba75326c4a9e7a8585b6c75cab6955 | dmjio/trie | Trie.hs | # LANGUAGE TupleSections #
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
--------------------------------------------------------------------------------
-- |
Module : Data . Trie
Copyright : ( c ) 2018 - 2019
-- License : All Rights Reserv... | null | https://raw.githubusercontent.com/dmjio/trie/ebc756527133657f8b4d28504201b12f20457edb/src/Data/Trie.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ViewPatterns #
------------------------------------------------------------------------------
|
License : All Rights Reserved
Stability : Experimental
------------------------------------------------------------------------------
* Construction
* Query
* Manip... | # LANGUAGE TupleSections #
# LANGUAGE RecordWildCards #
Module : Data . Trie
Copyright : ( c ) 2018 - 2019
Maintainer : < >
Portability : GHC
module Data.Trie
singleton
, fromList
, emptyTrie
, insert
, null
, member
, lookup
, delete
, Trie (..)
) where
import qua... |
a7a5f2cc3787cbc24db5c15aa6aeff9695d5cb28c83fab5eb9f1204c3b16ff33 | goblint/analyzer | intOps.ml | (* --------------------------------------------------------------
* IntOps Basics
* -------------------------------------------------------------- *)
open Batteries
IntOps
* Wrapper around integer types providing unified interface for
* arithmetic and logical operations .
* Wrapper around integer types pro... | null | https://raw.githubusercontent.com/goblint/analyzer/69d12c316e89e66d10ad655cbc4e235e4d51bc69/src/util/intOps.ml | ocaml | --------------------------------------------------------------
* IntOps Basics
* --------------------------------------------------------------
Constants
Arithmetic
Conversions
Logical: These are intended to be the logical operations in the C sense!
-------------------------------------------------------... |
open Batteries
IntOps
* Wrapper around integer types providing unified interface for
* arithmetic and logical operations .
* Wrapper around integer types providing unified interface for
* arithmetic and logical operations. *)
module type IntOpsBase =
sig
type t
val zero : t
val one : t
TODO : unuse... |
9d56ec15ef79eda9f27df5a14a831525260614f6a0c989fd21c06106cfaa9e91 | chapmanb/r-var | project.clj | (defproject r-var "0.0.1-SNAPSHOT"
:description "Share and explore our genomic variability."
:aot [rvar.servlet]
:keep-non-project-classes true
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[compojure "0.5.3"]
[hiccup "0.3.1... | null | https://raw.githubusercontent.com/chapmanb/r-var/6fce17dd0460c78c3a210a95f16aacbdd70ccf0a/project.clj | clojure | (defproject r-var "0.0.1-SNAPSHOT"
:description "Share and explore our genomic variability."
:aot [rvar.servlet]
:keep-non-project-classes true
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[compojure "0.5.3"]
[hiccup "0.3.1... | |
619c0baa4189144443bab4dd15904755c07950efe39ed9d6534b1614b220bd4f | imvu/dtm-redis | session.erl | Copyright ( C ) 2011 - 2013 IMVU Inc.
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy of
%% this software and associated documentation files (the "Software"), to deal in
the Software without restriction , including without limitation the rights to
%% use, copy, modify, merge, publ... | null | https://raw.githubusercontent.com/imvu/dtm-redis/719bca5903ed513d28be3b5e1a210b3e18dcc309/apps/dtm_redis/src/session.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
so, subject to the following conditions:
The above copyright notice and this ... | Copyright ( C ) 2011 - 2013 IMVU Inc.
the Software without restriction , including without limitation the rights to
of the Software , and to permit persons to whom the Software is furnished to do
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND... |
549a4733818cbd8d5eb3a4f72024975d72e6355442d25114e03d8143324f7f9d | ocaml-community/calendar | date.mli | (**************************************************************************)
(* *)
(* This file is part of Calendar. *)
(* *)
Copyright... | null | https://raw.githubusercontent.com/ocaml-community/calendar/a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da/src/date.mli | ocaml | ************************************************************************
This file is part of Calendar.
... | Copyright ( C ) 2003 - 2011
Lesser General Public License version 2.1 as published by the
Free Software Foundation , with a special linking exception ( usual
See the GNU Lesser General Public Licence version 2.1 for more
include Date_sig.S
|
653cd596a6e38c4dc20e9a4f8db7925f28155b1287f2701bb369cf4faa59bb46 | camlp4/camlp4 | Camlp4Ast2OCamlAst.mli | camlp4r
(****************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.mli | ocaml | **************************************************************************
OCaml
... | camlp4r
Copyright 2002 - 2006 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 the special
Authors :
* - Daniel de Rauglaudre : initial version
* - : refac... |
7ce9da4a90256e4c518eca03eabd99a650c37427f8a57dd102cc22208d389318 | solita/mnt-teet | meeting_controller.cljs | (ns teet.meeting.meeting-controller
(:require goog.math.Long
[teet.common.common-controller :as common-controller]
[teet.localization :refer [tr]]
[tuck.core :as t]
[teet.util.collection :as cu]
[teet.snackbar.snackbar-controller :as snackbar-controller]))
... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/meeting/meeting_controller.cljs | clojure | We alread marked this meeting as seen
Mark it as seen now
Remember that we already marked this as seen
Remove the seen timestamp so we don't show the indicators anymore | (ns teet.meeting.meeting-controller
(:require goog.math.Long
[teet.common.common-controller :as common-controller]
[teet.localization :refer [tr]]
[tuck.core :as t]
[teet.util.collection :as cu]
[teet.snackbar.snackbar-controller :as snackbar-controller]))
... |
1a056bfe7eff6355b1c97be74df232baf0e2b5d32c29fd045eb7d92001bdf7fc | ocaml-community/calendar | test_date.ml | (**************************************************************************)
(* *)
(* This file is part of Calendar. *)
(* *)
Copyright... | null | https://raw.githubusercontent.com/ocaml-community/calendar/f119658010cc9045e1866eddadc4a776adbcc146/tests/test_date.ml | ocaml | ************************************************************************
This file is part of Calendar.
... | Copyright ( C ) 2003 - 2011
Lesser General Public License version 2.1 as published by the
Free Software Foundation , with a special linking exception ( usual
See the GNU Lesser General Public Licence version 2.1 for more
open CalendarLib;;
open Date;;
let test() =
let test x s =... |
715098c462539fb3b4c9a0cb9f147f49113def4f368f0901063b2ce328144edb | hasufell/hsfm | History.hs | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... | null | https://raw.githubusercontent.com/hasufell/hsfm/322c766ae534fb21e3427d2845011123ddb90952/src/HSFM/History.hs | haskell | }
|This is meant to be called after e.g. a new path is entered
(not navigated to via the history) and the history needs updating. | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... |
66914a0f41a3080fd34e96e465043313c2739437b6bc5e498cd7781a6d48a1be | sam46/Paskell | Intermediate.hs | {-# LANGUAGE OverloadedStrings #-}
module Intermediate where
import Grammar (OP, Type, Ident, IdentList,
VarDecl, TypeDecl, CallByRef, ToDownTo)
import Data.List (intercalate)
import Prelude hiding (showList)
data Program = Program Ident Block Type deriving (Eq)
data Block = Block [Decl] Statement Type derivi... | null | https://raw.githubusercontent.com/sam46/Paskell/634881e980def791b9869d6bf8fa647aff0c5b1d/src/Intermediate.hs | haskell | # LANGUAGE OverloadedStrings #
todo
------- Pretty-Printer --------- |
module Intermediate where
import Grammar (OP, Type, Ident, IdentList,
VarDecl, TypeDecl, CallByRef, ToDownTo)
import Data.List (intercalate)
import Prelude hiding (showList)
data Program = Program Ident Block Type deriving (Eq)
data Block = Block [Decl] Statement Type deriving (Eq)
data Decl = DeclVar [VarDe... |
959e6301def898ac073fedcd78de820df71d6b9fea039cccf350f1d137c35514 | acl2/acl2 | primitive-functions@useless-runes.lsp | (ACL2PL::EVAL-ACL2-NUMBERP)
(ACL2PL::VALUEP-OF-EVAL-ACL2-NUMBERP)
(ACL2PL::EVAL-ACL2-NUMBERP-OF-VALUE-FIX-X)
(ACL2PL::EVAL-ACL2-NUMBERP-VALUE-EQUIV-CONGRUENCE-ON-X)
(ACL2PL::EVAL-RATIONALP)
(ACL2PL::VALUEP-OF-EVAL-RATIONALP)
(ACL2PL::EVAL-RATIONALP-OF-VALUE-FIX-X)
(ACL2PL::EVAL-RATIONALP-VALUE-EQUIV-CONGRUENCE-ON-X)
(A... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/acl2pl/.sys/primitive-functions%40useless-runes.lsp | lisp | (ACL2PL::EVAL-ACL2-NUMBERP)
(ACL2PL::VALUEP-OF-EVAL-ACL2-NUMBERP)
(ACL2PL::EVAL-ACL2-NUMBERP-OF-VALUE-FIX-X)
(ACL2PL::EVAL-ACL2-NUMBERP-VALUE-EQUIV-CONGRUENCE-ON-X)
(ACL2PL::EVAL-RATIONALP)
(ACL2PL::VALUEP-OF-EVAL-RATIONALP)
(ACL2PL::EVAL-RATIONALP-OF-VALUE-FIX-X)
(ACL2PL::EVAL-RATIONALP-VALUE-EQUIV-CONGRUENCE-ON-X)
(A... | |
79801509845484b859f422219bcbef6d38130730552415f3b04c2e731bc78ccb | haskell-works/cabal-cache | Env.hs | {-# LANGUAGE OverloadedStrings #-}
module HaskellWorks.CabalCache.AWS.Env
( awsLogger
, mkEnv
) where
import Control.Concurrent (myThreadId)
import Control.Lens ((<&>), (.~))
import Control.Monad (when, forM_)
import Data.ByteString.Builder (toLazyByteString)
import... | null | https://raw.githubusercontent.com/haskell-works/cabal-cache/3719fc7518fcd6be4d2a1312b5ed213a237ae267/src/HaskellWorks/CabalCache/AWS/Env.hs | haskell | # LANGUAGE OverloadedStrings # |
module HaskellWorks.CabalCache.AWS.Env
( awsLogger
, mkEnv
) where
import Control.Concurrent (myThreadId)
import Control.Lens ((<&>), (.~))
import Control.Monad (when, forM_)
import Data.ByteString.Builder (toLazyByteString)
import HaskellWorks.CabalCache.Show (tsho... |
dd15e239e56441d76ca8eb33e105d095a94e5898f90129871ae6902f2c6fe9cb | yogthos/memory-hole | dev.cljs | (ns ^:figwheel-no-load memory-hole.app
(:require [memory-hole.core :as core]
[devtools.core :as devtools]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:on-jsload core/mount-components)
(devt... | null | https://raw.githubusercontent.com/yogthos/memory-hole/925e399b0002d59998d10bd6f54ff3464a4b4ddb/env/dev/cljs/memory_hole/dev.cljs | clojure | (ns ^:figwheel-no-load memory-hole.app
(:require [memory-hole.core :as core]
[devtools.core :as devtools]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:on-jsload core/mount-components)
(devt... | |
3431e098aff1c1e32a139d95172781558860625345b6bf607710998eb692010b | fredlund/McErlang | mce_behav_stackOps.erl | Copyright ( c ) 2009 ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions a... | null | https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/behaviours/src/mce_behav_stackOps.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2009 ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
@author
2006 - 2009
@private
-module(mce_behav_stackOps).
-include("stack.hrl").
-include("stackEntry.hrl").
-export(... |
1281440c3baa39c0c16fae206198b442927d4ad205934600394e1fec94d556da | wh5a/thih | InvaderWithTypeSigs.hs | Invader.hs
-----------------------------------------------------------------------------
-- Library of functions for writing interactive programs with screen-oriented
I / O ( assumes screen ) .
--
Suitable for use with Hugs 98 .
-----------------------------------------------------------------------------
modu... | null | https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/examples/InvaderWithTypeSigs.hs | haskell | ---------------------------------------------------------------------------
Library of functions for writing interactive programs with screen-oriented
---------------------------------------------------------------------------
import Random
Start coordinates
Maximum input length
How to use entered string
Maximum ... | Invader.hs
I / O ( assumes screen ) .
Suitable for use with Hugs 98 .
module Main where
import System
import IOExts
import IO
module AnsiInteract (
module AnsiInteract ,
module Interact ,
module AnsiScreen
) where
import AnsiScreen
import Interact
module AnsiInteract(
module AnsiInterac... |
eac35e74a024715d2c9a98ddb6f5e4fa681afbb8d47240fb1b6d6dfd6413e46f | lpw25/ecaml | const.mli | (** Built in constants *)
(** Type of constants. *)
type t = private
| Integer of int
| String of string
| Boolean of bool
(** Print a constant. *)
val print : t -> Format.formatter -> unit
(** Create a constant from an integer. *)
val of_integer : int -> t
(** Create a constant from a string. *)
val of_strin... | null | https://raw.githubusercontent.com/lpw25/ecaml/4588abb18436fb8a4983a353923ee667bf8c90a0/src/utils/const.mli | ocaml | * Built in constants
* Type of constants.
* Print a constant.
* Create a constant from an integer.
* Create a constant from a string.
* Create a constant from a boolean. |
type t = private
| Integer of int
| String of string
| Boolean of bool
val print : t -> Format.formatter -> unit
val of_integer : int -> t
val of_string : string -> t
val of_boolean : bool -> t
|
39e920c7951af51d4f12494d4bc93bb827ddd17b3c714ad8d64ba650cea7a41d | whitequark/ocaml-llvm-ng | llvmcomp.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/whitequark/ocaml-llvm-ng/79ddd2b22d1ac2a30e079f68379429ef81aed18c/lib/llvmcomp.ml | ocaml | *********************************************************************
OCaml
... |
Copyright 2014 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Cmm
let llctx = Llvm.global_contex... |
b6053602f9e0bad25bf6ec5887708ab75594fba33c89cecb9c46fdf8d44e67fb | elarous/O2SN | helpers.cljs | (ns o2sn.maps.helpers
(:require [ajax.core :as ajax]))
(defn- make-url [{:keys [lat lng]}]
(str "="
lat "," lng
"&key=AIzaSyBUGwGf5iRDVzcJ-22B-JhzpTrCA2FMW1o"
"&language=fr"
"&result_type=country%7Cadministrative_area_level_1"
"%7Cadministrative_area_level_2%7Clocality"))
(defn-... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/maps/helpers.cljs | clojure | (ns o2sn.maps.helpers
(:require [ajax.core :as ajax]))
(defn- make-url [{:keys [lat lng]}]
(str "="
lat "," lng
"&key=AIzaSyBUGwGf5iRDVzcJ-22B-JhzpTrCA2FMW1o"
"&language=fr"
"&result_type=country%7Cadministrative_area_level_1"
"%7Cadministrative_area_level_2%7Clocality"))
(defn-... | |
5885ec2b23547a98caa3d0d9930022eb5ab8eb84e63898e13db700300ebc5646 | portkey-cloud/aws-clj-sdk | _2015-12-10.clj | (ns portkey.aws.servicecatalog.-2015-12-10 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope
{:service "servicecatalog", :region "ap-northeast-1"},
:ssl-common-name "servicecatalog.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-versio... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/servicecatalog/_2015-12-10.clj | clojure | (ns portkey.aws.servicecatalog.-2015-12-10 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope
{:service "servicecatalog", :region "ap-northeast-1"},
:ssl-common-name "servicecatalog.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-versio... | |
a3fc983f3e4192d6926b6299c84045bd18f490c57095f194ed1265fb4c433edc | hercules-ci/hercules-ci-agent | PatchInstallationBuilder.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.GitLab.PatchInstallationBuilder where
import Hercules.API.Prelude
data PatchInstallationBuilder = PatchInstallationBuilder
{ name :: Maybe Text,
displayName :: Maybe Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
| null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/b3f8aa8e4a8b22dbbe92cc5a89e6881090b933b3/hercules-ci-api/src/Hercules/API/GitLab/PatchInstallationBuilder.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Hercules.API.GitLab.PatchInstallationBuilder where
import Hercules.API.Prelude
data PatchInstallationBuilder = PatchInstallationBuilder
{ name :: Maybe Text,
displayName :: Maybe Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
|
bb6c36f5223a1a2684f3ca216b72bc56e94b32c7e2b1f909d5c0b1653a4a9dc5 | Novus-School/novus | integrant.clj | (ns novus.samples.integrant
(:refer-clojure :exclude [ref read-string run!])
(:require [clojure.edn :as edn]
[clojure.repl :as repl]
[clojure.walk :as walk]
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[weavejester.dependen... | null | https://raw.githubusercontent.com/Novus-School/novus/c65b37a654173df52084253651edc87033409f4b/novus/src/main/novus/samples/integrant.clj | clojure |
it will always result in the same key | (ns novus.samples.integrant
(:refer-clojure :exclude [ref read-string run!])
(:require [clojure.edn :as edn]
[clojure.repl :as repl]
[clojure.walk :as walk]
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[weavejester.dependen... |
fc7179285ab103c1bbb647f025b6a15d66718cdc982b554fdd2ad7970eae0ab9 | kawu/nerf | Server.hs | module NLP.Nerf.Server
(
-- * Server
runNerfServer
-- * Client
, ner
) where
import Prelude hiding (Word)
import Control.Applicative ((<$>))
import Control.Monad (forever, void)
import Control.Concurrent (forkIO)
import System.IO (Handle, hFlush)
import qualified D... | null | https://raw.githubusercontent.com/kawu/nerf/29ad341368d0869a15c205bda40247d9db2fdea8/src/NLP/Nerf/Server.hs | haskell | * Server
* Client
-----------------------------------------------
Server
-----------------------------------------------
putStrLn "Connection established"
putStrLn "Waiting for input..."
putStr "> " >> T.putStrLn inp
putStr "No. of sentences: " >> print (length out)
----------------------------------------------... | module NLP.Nerf.Server
(
runNerfServer
, ner
) where
import Prelude hiding (Word)
import Control.Applicative ((<$>))
import Control.Monad (forever, void)
import Control.Concurrent (forkIO)
import System.IO (Handle, hFlush)
import qualified Data.Binary as B
import q... |
3ee5fb742fa91061932889f7db8d3a6852bb0804f725b346977bf96b954bc669 | kudu-dynamics/blaze | FcmpGeOp.hs | module Blaze.Types.Pil.Op.FcmpGeOp where
-- This module is generated. Please use app/gen_pil_ops/Main.hs to modify.
import Blaze.Prelude
data FcmpGeOp expr = FcmpGeOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Has... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Types/Pil/Op/FcmpGeOp.hs | haskell | This module is generated. Please use app/gen_pil_ops/Main.hs to modify. | module Blaze.Types.Pil.Op.FcmpGeOp where
import Blaze.Prelude
data FcmpGeOp expr = FcmpGeOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Hashable (FcmpGeOp a)
|
b562f682d40d482c7559b37945efbd1028f15484342bdaa24855b8f44d35a815 | retro/keechma-next-realworld-app | settings.cljs | (ns app.settings)
(def api-endpoint "")
(def articles-per-page 10)
(def jwt-ls-name "conduit-jwt-token") | null | https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/app/settings.cljs | clojure | (ns app.settings)
(def api-endpoint "")
(def articles-per-page 10)
(def jwt-ls-name "conduit-jwt-token") | |
14759925e6722cd838e1c0a5d5674250fbd3f251f93fd807a86a5fcbcd9cafb7 | input-output-hk/ouroboros-network | Serialisation.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Standalo... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-byron/src/Ouroboros/Consensus/Byron/Ledger/Serialisation.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
* Data family instances
* Serialisation
* Support for on-disk format
-------------------------------------------------------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.Byron.Ledger.Serialisation (
NestedCtxt_ (..)
, RawBoundaryHeader
, RawHe... |
08811bab6257d715820588539dd047a3e49f9021c713bba568183accc66d0fab | tsloughter/kuberl | kuberl_admissionregistration_v1beta1_webhook_client_config.erl | -module(kuberl_admissionregistration_v1beta1_webhook_client_config).
-export([encode/1]).
-export_type([kuberl_admissionregistration_v1beta1_webhook_client_config/0]).
-type kuberl_admissionregistration_v1beta1_webhook_client_config() ::
#{ 'caBundle' => kuberl_byte_array:kuberl_byte_array(),
'service' =>... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_admissionregistration_v1beta1_webhook_client_config.erl | erlang | -module(kuberl_admissionregistration_v1beta1_webhook_client_config).
-export([encode/1]).
-export_type([kuberl_admissionregistration_v1beta1_webhook_client_config/0]).
-type kuberl_admissionregistration_v1beta1_webhook_client_config() ::
#{ 'caBundle' => kuberl_byte_array:kuberl_byte_array(),
'service' =>... | |
f46e508e0f0c0370e4c3386f161a2d1de435991882abf7d72bd3e5f102e5eb59 | greglook/clj-multiformats | codec.cljc | (ns multiformats.address.codec
"Internal namespace for parsing/formatting multiaddr formats"
(:require
[alphabase.bytes :as b]
#?@(:cljs [[clojure.string :as str]
[goog.crypt :as crypt]
[goog.net.ipaddress :as ipaddress]]))
#?(:clj
(:import
java.net.InetAddress)))... | null | https://raw.githubusercontent.com/greglook/clj-multiformats/ab9990261bdf05df622bc1f8609ae11bc680ffbf/src/multiformats/address/codec.cljc | clojure | handle negative byte as unsigned byte
goog.math.Integer is array of int32 under the hood
so need to iterate backwards for network order
to build IP from bytes, so manually construct string | (ns multiformats.address.codec
"Internal namespace for parsing/formatting multiaddr formats"
(:require
[alphabase.bytes :as b]
#?@(:cljs [[clojure.string :as str]
[goog.crypt :as crypt]
[goog.net.ipaddress :as ipaddress]]))
#?(:clj
(:import
java.net.InetAddress)))... |
537cc8cc12135b02def60aacb12853f5c082fb7b444df49c7dbb9945f780a843 | dimitri/pgcharts | settings.lisp | (in-package #:pgcharts)
(setf *config-filename* "/etc/pgcharts.ini")
(setf *pidfile* "/var/run/pgcharts.pid")
(setf *logfile* "/var/log/pgcharts.log")
| null | https://raw.githubusercontent.com/dimitri/pgcharts/9b9549c53cca77039e8aaca18bce939ecb2b6549/debian/settings.lisp | lisp | (in-package #:pgcharts)
(setf *config-filename* "/etc/pgcharts.ini")
(setf *pidfile* "/var/run/pgcharts.pid")
(setf *logfile* "/var/log/pgcharts.log")
| |
124b4d9ba26702f6dcb9d5c6109444626293cfa8ea38eb48ccb7fdcfa5f05b15 | mirage/mirage-entropy | test.ml | open Lwt.Infix
let fpr ppf fmt = Format.fprintf ppf fmt
let pp_cs ppf cs =
fpr ppf "@,";
for i = 0 to Cstruct.len cs - 1 do
fpr ppf "%02x" (Cstruct.get_uint8 cs i)
done;
fpr ppf "@,"
let handler ~source buf =
Format.printf "recv: (src:%d) %a%!" source pp_cs buf
let with_entropy act =
Entropy.connect... | null | https://raw.githubusercontent.com/mirage/mirage-entropy/8d4c9ed42dbea225b306af082acd8e15464287ba/test/test.ml | ocaml | open Lwt.Infix
let fpr ppf fmt = Format.fprintf ppf fmt
let pp_cs ppf cs =
fpr ppf "@,";
for i = 0 to Cstruct.len cs - 1 do
fpr ppf "%02x" (Cstruct.get_uint8 cs i)
done;
fpr ppf "@,"
let handler ~source buf =
Format.printf "recv: (src:%d) %a%!" source pp_cs buf
let with_entropy act =
Entropy.connect... | |
0f525b378ff4a7dbb6d0e12ff5842bcde8fad2e2ef936f4ca73b850ed6f297fe | ocaml/dune | menu.ml | open Import
open Types
(* This list of methods and generations is exactly the list of existing methods
as of commit [3cd240e], which the initial versioning implementation was based
on. *)
let compatibility_menu =
Method.Name.Map.of_list_exn
[ ("ping", 1)
; ("diagnostics", 1)
; ("shutdown", 1)
;... | null | https://raw.githubusercontent.com/ocaml/dune/89c0c9efd1bdbbec2164e0d2f29a9dd64af18ab7/otherlibs/dune-rpc/private/menu.ml | ocaml | This list of methods and generations is exactly the list of existing methods
as of commit [3cd240e], which the initial versioning implementation was based
on. | open Import
open Types
let compatibility_menu =
Method.Name.Map.of_list_exn
[ ("ping", 1)
; ("diagnostics", 1)
; ("shutdown", 1)
; ("subscribe", 1)
; ("unsubscribe", 1)
; ("build", 1)
; ("status", 1)
; ("notify/abort", 1)
; ("notify/diagnostic", 1)
; ("notify/log", 1)
; ("... |
ebd3262bdea34f26177926df39caf63de81a944c1f03905c380a658eb358d0a8 | hyperfiddle/electric | missionary_cp.cljc | (ns dustin.y2022.missionary-cp
(:require [hyperfiddle.photon :as p]
[hyperfiddle.rcf :as rcf :refer [tests tap % with]]
[missionary.core :as m]))
(hyperfiddle.rcf/enable!)
(defn odd-flow [x]
(m/ap
(m/amb :ignored (m/? (m/sleep 1000 :ignored2)))
x))
(tests
(def it ((odd-flow 1) #... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/m/missionary_cp.cljc | clojure | (ns dustin.y2022.missionary-cp
(:require [hyperfiddle.photon :as p]
[hyperfiddle.rcf :as rcf :refer [tests tap % with]]
[missionary.core :as m]))
(hyperfiddle.rcf/enable!)
(defn odd-flow [x]
(m/ap
(m/amb :ignored (m/? (m/sleep 1000 :ignored2)))
x))
(tests
(def it ((odd-flow 1) #... | |
9d39ecbd22d357aa54b024a25591da7abd1f3fe71875ff6ed13eb8b1618e3b00 | BurntSushi/erd | Render.hs | {-# LANGUAGE OverloadedStrings #-}
module Erd.Render
(htmlAttr,
htmlFont,
recordAttr,
withLabelFmt
) where
import qualified Erd.ER as ER
import qualified Data.GraphViz.Attributes.Complete as A
import qualified Data.GraphViz.Attributes.HTML as H
import qualified Data.Text.L... | null | https://raw.githubusercontent.com/BurntSushi/erd/06c72643682a42a890a2ffadac82cfc1dafd5edd/src/Erd/Render.hs | haskell | # LANGUAGE OverloadedStrings #
| Converts a single attribute to an HTML table row.
should change to add port support!
| Formats an arbitrary string with the options given (using only font
attributes).
| Formats HTML text with a label. The format string given should be
given.) |
module Erd.Render
(htmlAttr,
htmlFont,
recordAttr,
withLabelFmt
) where
import qualified Erd.ER as ER
import qualified Data.GraphViz.Attributes.Complete as A
import qualified Data.GraphViz.Attributes.HTML as H
import qualified Data.Text.Lazy as L
import ... |
76d888a7b6713f8db507a90be12f1ca5061bcc2e59b1eaa4cddbe8784a5dc0db | own-pt/cl-krr | snark-tff.lisp |
;; using types
question how to connect the SNARK types with the ( instance ... )
;; declared types? We may also declare the relation between the types
(declare-sort 'Hole)
(declare-sort 'SelfConnectedObject)
(declare-sort 'Entity)
(declare-sort 'SetOrClass)
(declare-predicate-symbol 'hole :sort (Hole SelfConnecte... | null | https://raw.githubusercontent.com/own-pt/cl-krr/d21ce3c385ecb0b5b51bd2b6491a082532f9867c/development/experiments/inconsistency-may-19/snark-tff.lisp | lisp | using types
declared types? We may also declare the relation between the types |
question how to connect the SNARK types with the ( instance ... )
(declare-sort 'Hole)
(declare-sort 'SelfConnectedObject)
(declare-sort 'Entity)
(declare-sort 'SetOrClass)
(declare-predicate-symbol 'hole :sort (Hole SelfConnectedObject))
(declare-predicate-symbol 'instance :sort (Entity SetOrClass))
(assert '(f... |
059f7077c2f0cff010c25fba4fee49aebd637f4feefa01b29be6dda36af683cf | headwinds/reagent-reframe-material-ui | repl.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/cljs/repl.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.repl
(:require-macros cljs.repl)
(:require [cljs.spec.alpha :as spec]))
(defn print-doc [{n :ns nm :name :as m}]
(println "-------------------------")
(println (str (when-let [ns (:ns m)] (str ns "/")) (:name m)))
... |
9c17771a62f2e4aed04a68cb9a98815d2e1e00770dc8b2f519660c59fdcfb667 | startalkIM/ejabberd | fxml_sup.erl | %%%----------------------------------------------------------------------
File : fxml_sup.erl
Author : < >
%%% Purpose : XML supervisor
Created : 1 May 2013 by < >
%%%
%%%
Copyright ( C ) 2002 - 2019 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( th... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/fast_xml/src/fxml_sup.erl | erlang | ----------------------------------------------------------------------
Purpose : XML supervisor
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 CONDITION... | File : fxml_sup.erl
Author : < >
Created : 1 May 2013 by < >
Copyright ( C ) 2002 - 2019 ProcessOne , SARL . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(fxml_sup).
-beha... |
cfa18a3f477ab83e667fe9f445d484a0a18b940cedf18c4ccfb5aa1c8d779490 | haskell/cabal | Generic.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE BangPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Utils.Generic
Copyright : , 2... | null | https://raw.githubusercontent.com/haskell/cabal/c21dbcd2a9d54962eb39f598dfce2d012ff7fd1c/Cabal-syntax/src/Distribution/Utils/Generic.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
Module : Distribution.Utils.Generic
License : BSD3
Maintainer :
Portability : portable
A large and somewhat miscellaneous collection of utility functions used
has low l... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE DeriveGeneric #
Copyright : , 2003 - 2004
portions Copyright ( c ) 2007 , Galois Inc.
throughout the rest of the lib and in other tools that use the
lib like - install@. It has a very simple se... |
55d8284b48076c4cd54cd998bbb502028b469254edc07459e21dd908d6bbc7e4 | darkling/lagra | lagra_sup.erl | @private
-module(lagra_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [#{id => manager,
start => {lagra_mgr, start_link, []}},
#{id => stores_sup,
start => {lagra_store_trivial_sup... | null | https://raw.githubusercontent.com/darkling/lagra/6827ea20db86aeb4c139db45bd3133ffccfddb7d/src/lagra_sup.erl | erlang | @private
-module(lagra_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [#{id => manager,
start => {lagra_mgr, start_link, []}},
#{id => stores_sup,
start => {lagra_store_trivial_sup... | |
9002f34b956432612bc78f86fdc039a05868aa1a89a7387ec1098847702f080e | collaborativetrust/WikiTrust | revs_to_files_analysis.ml |
Copyright ( c ) 2007 - 2009 The Regents of the University of California
All rights reserved .
Authors : , and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyri... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/revs_to_files_analysis.ml | ocaml | * This module contains a class that:
1) Writes each revision in a separate disk file, named after the revision id.
2) Produces an xml file containing empty revision text, that can be used e.g.
via mwdumper to load all revision information (but not the revision itself)
in the DB for a wiki inst... |
Copyright ( c ) 2007 - 2009 The Regents of the University of California
All rights reserved .
Authors : , and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyri... |
c617e8744ef46918e1f86a24b3e9c81d31eab1887b565d84fc4a4524996b6dca | let-def/grenier | test.ml | let run_test error seed count =
let hll = Hll.make ~error in
Printf.printf "counting %d elements using HLL with %.02f%% error rate (seed = %Ld)\n"
count (error *. 100.0) seed;
for i = 0 to count - 1 do
Hll.add hll (Hll.hash_int64 (Int64.(add seed (of_int i))))
done;
let card = Hll.card hll in
assert... | null | https://raw.githubusercontent.com/let-def/grenier/3391e5e31db88e587100436e9407881fb8ef7873/hll/test.ml | ocaml | let run_test error seed count =
let hll = Hll.make ~error in
Printf.printf "counting %d elements using HLL with %.02f%% error rate (seed = %Ld)\n"
count (error *. 100.0) seed;
for i = 0 to count - 1 do
Hll.add hll (Hll.hash_int64 (Int64.(add seed (of_int i))))
done;
let card = Hll.card hll in
assert... | |
526b30b2b51e56f953d393ace570ed91d7cd86e3c64be8c150f0c39525c85c24 | ulisses/Static-Code-Analyzer | XML.hs | {-#OPTIONS -XTypeSynonymInstances#-}
------------------------------------------------------------------------------
-- |
Author :
-- Stability : experimental
-- Portability : portable
--
-- This module is part of 'Static-Code-Analyzer', a library to automatic
calculate some metrics related with C99 ... | null | https://raw.githubusercontent.com/ulisses/Static-Code-Analyzer/4c3f6423d43e1bccb9d1cf04e74ae60d9170186f/Analyzer/XML.hs | haskell | #OPTIONS -XTypeSynonymInstances#
----------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
This module is part of 'Static-Code-Analyzer', a library to automatic
In this module I implement the latex exporter
------------------------------... | Author :
calculate some metrics related with C99 and GNU C extensions code .
module XML where
import Text.XML.HXT.Core
import Text.XML.HXT.Arrow.Pickle.Xml
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Map as M
import AbsolutePath
import Metrics
instance XmlPickler Metrics wher... |
30cc545f97b9b072ada221160dbbebdb05c952b53c958fb6d74be1e2325da0ba | donaldsonjw/bigloo | classgen.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Object / classgen.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Object/classgen.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Generate the class accessors. */
*===========================... | * serrano / prgm / project / bigloo / comptime / Object / classgen.scm * /
* Author : * /
* Creation : Sun Nov 6 06:14:12 2011 * /
* Last change : Sat Nov 7 18:26:52 2015 ( serrano ) * /
* Co... |
ab70880f961ec82cecd23a821736752c598f4a2d41af333238fae884a6f7f917 | martyall/servant-zeppelin | ZeppelinSpec.hs | # OPTIONS_GHC -fno - warn - unused - top - binds #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Ov... | null | https://raw.githubusercontent.com/martyall/servant-zeppelin/2848a06974148614d062056cdad819671d0f2946/servant-zeppelin-server/test/Servant/Zeppelin/ZeppelinSpec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
... | # OPTIONS_GHC -fno - warn - unused - top - binds #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Servant.Zeppelin... |
f93889875c06c044cf3480df726c3284e78ebfbd527ff53194cdb410129b30cf | wilbowma/cur | pattern-tree-matcher.rkt | #lang cur
(require cur/stdlib/pattern-tree
cur/stdlib/nat
(except-in cur/stdlib/list
cons)
(for-syntax rackunit))
(begin-for-syntax
simple 1
(check-equal?
(syntax->datum
(match (list #'z #'z)
(create-pattern-tree
#'((n m)
([z z => A]
... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/stdlib/pattern-tree-matcher.rkt | racket | #lang cur
(require cur/stdlib/pattern-tree
cur/stdlib/nat
(except-in cur/stdlib/list
cons)
(for-syntax rackunit))
(begin-for-syntax
simple 1
(check-equal?
(syntax->datum
(match (list #'z #'z)
(create-pattern-tree
#'((n m)
([z z => A]
... | |
2b3ccd7bf4b9e43f5d3a72852863c6f3223af6832d0f8d0b3c94ba81b36d5aab | nasa/Common-Metadata-Repository | request.clj | (ns cmr.versioning.rest.request
(:require
[cmr.http.kit.request :as request]
[cmr.versioning.components.config :as config]
[taoensso.timbre :as log])
(:refer-clojure :exclude [get]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Header Support ;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/api-versioning/src/cmr/versioning/rest/request.clj | clojure |
Header Support ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Accept Header/Version Support ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| (ns cmr.versioning.rest.request
(:require
[cmr.http.kit.request :as request]
[cmr.versioning.components.config :as config]
[taoensso.timbre :as log])
(:refer-clojure :exclude [get]))
(def version-format "application/vnd.%s%s+%s")
(defn default-accept
[system]
(format version-format
(confi... |
df9f774c740055588a923610b7eeeb5a300a92b2bd0cf85207d3d0a40aa0be34 | rowangithub/DOrder | 449_lock.ml | (*
USED: PLDI2011 as r-lock
USED: PEPM2013 as r-lock
*)
let lock st = assert (st=0); 1
let unlock st = assert (st=1); 0
let f n st : int= if n > 0 then lock (st) else st
let g n st : int = if n > 0 then unlock (st) else st
let main n = assert ((g n (f n 0)) = 0) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/449_lock.ml | ocaml |
USED: PLDI2011 as r-lock
USED: PEPM2013 as r-lock
|
let lock st = assert (st=0); 1
let unlock st = assert (st=1); 0
let f n st : int= if n > 0 then lock (st) else st
let g n st : int = if n > 0 then unlock (st) else st
let main n = assert ((g n (f n 0)) = 0) |
09080df3753b6a55edab3afb8c755d3df4511417344064116ff8be43a48d4ac1 | contentjon/cljasmine | core_test.cljs | (ns cljasmine.core-test
(:require-macros [cljasmine.macros :as j])
(:require [cljasmine.checkers]))
(j/describe "Equality"
(j/it ":="
(j/expect true := true))
(j/it ":not="
(j/expect true :not= false)))
(j/describe "Arithmetics"
(j/it ":<"
(j/expect 5 :< 6))
(j/it ":<="
(j/expect 6 :<= 6))... | null | https://raw.githubusercontent.com/contentjon/cljasmine/193bce4c8d61297e810885bf39c38a4ed2bf8849/test/cljasmine/core_test.cljs | clojure | (ns cljasmine.core-test
(:require-macros [cljasmine.macros :as j])
(:require [cljasmine.checkers]))
(j/describe "Equality"
(j/it ":="
(j/expect true := true))
(j/it ":not="
(j/expect true :not= false)))
(j/describe "Arithmetics"
(j/it ":<"
(j/expect 5 :< 6))
(j/it ":<="
(j/expect 6 :<= 6))... | |
3f23681fd3e1df44ce4e110d8dfd97d268ca4594c86b3faf585be96bfd4e014c | clj-commons/seesaw | style.clj | Copyright ( c ) , 2011 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this
; distribution.
; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/src/seesaw/style.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remo... | Copyright ( c ) , 2011 . All rights reserved .
(ns ^{:doc "Functions for styling apps. Prefer (seesaw.core/stylesheet) and friends."
:author "Dave Ray"}
seesaw.style
(:use [seesaw.config :only [config!]]
[seesaw.selector]))
(defn apply-stylesheet
"ALPHA - EXPERIMENTAL AND GUARANTEED TO CHANG... |
0e5f3444b2d481d1e8d76265ec1e35f0d50038be24dec6c967dea7ccb12b6452 | ekmett/category-extras | Parameterized.hs | {-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
Module : Control . Applicative .
Copyright : ( C ) 2008
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : p... | null | https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Applicative/Parameterized.hs | haskell | # OPTIONS -fglasgow-exts #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : portable
-------------------------------------------------------------------------- | Module : Control . Applicative .
Copyright : ( C ) 2008
Maintainer : < >
module Control.Applicative.Parameterized
( PApplicative(..)
, PPointed(..)
) where
import Control.Functor.Pointed
class PPointed f => PApplicative f where
pap :: f (a -> b) c -> f a c -> f b c
|
c99694e4072d01f81e1fa549fb2db13badac8aacfded4fcd59123051fcbeaf65 | elkowar/infix-lisp | Main.hs | # LANGUAGE ScopedTypeVariables #
module Main where
import Parse
import Eval
import Control.Monad ( when )
import Control.Monad.IO.Class ( liftIO )
import Control.Exception ( catch )
import qualified Text.Megaparsec.Error
import ... | null | https://raw.githubusercontent.com/elkowar/infix-lisp/6acac9b3a3d4d1eb2e9a3a08aedfdf8d0e567c12/app/Main.hs | haskell | (
(num = (nil readInt nil))
in
(
then
(
else
(
then
(
(nil print "Fizz")
else
(
then
(
(nil print "buzz")
else
(nil print num)
)
)
)
)
)
)
) | # LANGUAGE ScopedTypeVariables #
module Main where
import Parse
import Eval
import Control.Monad ( when )
import Control.Monad.IO.Class ( liftIO )
import Control.Exception ( catch )
import qualified Text.Megaparsec.Error
import ... |
42930b9f8da29b5f78a09d30f738138844be9fdcd09897338eebd6af19f337c9 | HumbleUI/HumbleUI | scroll.clj | (ns io.github.humbleui.ui.scroll
(:require
[io.github.humbleui.canvas :as canvas]
[io.github.humbleui.core :as core]
[io.github.humbleui.paint :as paint]
[io.github.humbleui.protocols :as protocols]))
(core/deftype+ VScroll [^:mut offset ^:mut self-rect ^:mut child-size]
:extends core/AWrapper
... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/d07ddd4c46e1def229180e4bb9e7509c5b7b8fc2/src/io/github/humbleui/ui/scroll.clj | clojure | (ns io.github.humbleui.ui.scroll
(:require
[io.github.humbleui.canvas :as canvas]
[io.github.humbleui.core :as core]
[io.github.humbleui.paint :as paint]
[io.github.humbleui.protocols :as protocols]))
(core/deftype+ VScroll [^:mut offset ^:mut self-rect ^:mut child-size]
:extends core/AWrapper
... | |
475c514ad5c427c409d37a9c7ee9b2d44a966b04b73e30b9b1167ac8e2ff8099 | rbkmoney/hellgate | hg_invoice_template_tests_SUITE.erl | -module(hg_invoice_template_tests_SUITE).
-include("hg_ct_domain.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-include_lib("hellgate/include/domain.hrl").
-export([all/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/454939c7f20679daefb8838988fb65da2310ef78/apps/hellgate/test/hg_invoice_template_tests_SUITE.erl | erlang | tests descriptions
starting/stopping
_ = dbg:tracer(),
_ = dbg:p(all, c),
_ = dbg:tpl({'woody_client', '_', '_'}, x),
tests
| -module(hg_invoice_template_tests_SUITE).
-include("hg_ct_domain.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-include_lib("hellgate/include/domain.hrl").
-export([all/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_... |
2396bc8a49707c09af7a3ef21aac2f26ba4e60c602e8959f948e8625a2e61d9d | johnmn3/cljs-thread | re_frame.cljs | (ns cljs-thread.re-frame
(:require
[reagent.ratom :as ra]
[re-frame.core :as re-frame]
[reagent.core :as r]
[cljs-thread.re-state :as state]
[cljs-thread.core :refer [in]]
[cljs-thread.env :as env]))
(def ^:export reg-sub
(if-not (env/in-core?)
identity
(fn [& args]
(apply re-frame/... | null | https://raw.githubusercontent.com/johnmn3/cljs-thread/e98edc26ae71d1e17cea96a1f0e978df41b34d3f/shadow_dashboard/src/lib/cljs_thread/re_frame.cljs | clojure | (ns cljs-thread.re-frame
(:require
[reagent.ratom :as ra]
[re-frame.core :as re-frame]
[reagent.core :as r]
[cljs-thread.re-state :as state]
[cljs-thread.core :refer [in]]
[cljs-thread.env :as env]))
(def ^:export reg-sub
(if-not (env/in-core?)
identity
(fn [& args]
(apply re-frame/... | |
9ba19137e6cab5aa636c985a948b017f98ad35e43509c64a24c91f4e98b39eaf | larcenists/larceny | ntakl.scm | NTAKL -- The TAKeuchi function using lists as counters ,
;;; with an alternative boolean expression.
(define (listn n)
(if (= n 0)
'()
(cons n (listn (- n 1)))))
(define l18 (listn 18))
(define l12 (listn 12))
(define l6 (listn 6))
(define (mas x y z)
(if (not (shorterp y x))
z
(mas (ma... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/CrossPlatform/src/ntakl.scm | scheme | with an alternative boolean expression.
Part of the fun of this benchmark is seeing how well the compiler
can understand this ridiculous code, which dates back to the original
Common Lisp. So it probably isn't a good idea to improve upon it.
code above is rewritten as follows, so I tried it for Scheme also. | NTAKL -- The TAKeuchi function using lists as counters ,
(define (listn n)
(if (= n 0)
'()
(cons n (listn (- n 1)))))
(define l18 (listn 18))
(define l12 (listn 12))
(define l6 (listn 6))
(define (mas x y z)
(if (not (shorterp y x))
z
(mas (mas (cdr x) y z)
(mas (cdr y) z x)
... |
b24fd1e7d9449f970107e61fda9fcc1a3bded858113a25ecbe8e78bdb713a381 | HealthSamurai/igpop | parser.clj | (ns igpop.parser
(:require
[igpop.inline-parser :refer [parse-inline]]
[clojure.string :as str]))
;; TODO:
;; inline + obj + coll
;; comments
;; multiline txt
;; collect value
;; collect parse errors
(defn parse-lines [s]
(->>
(str/split-lines s)
(map-indexed
(fn [i ln]
(let [len (count ln)
... | null | https://raw.githubusercontent.com/HealthSamurai/igpop/d4e6f6100b78c20a1706add125e90ff7d912e3d4/src/igpop/parser.clj | clojure | TODO:
inline + obj + coll
comments
multiline txt
collect value
collect parse errors
decremented on nested block parse
immutable position
if block element - collect related lines and parse | (ns igpop.parser
(:require
[igpop.inline-parser :refer [parse-inline]]
[clojure.string :as str]))
(defn parse-lines [s]
(->>
(str/split-lines s)
(map-indexed
(fn [i ln]
(let [len (count ln)
ltrim-s (str/replace ln #"^\s*" "")
ident (- len (count ltrim-s))]
{:l... |
beaba344544a17e02631f909a7cfac326cd4526aa681816215d8fce017dfb6e8 | MinaProtocol/mina | pseudo.mli | (* Pseudo *)
module Make (Impl : Snarky_backendless.Snark_intf.Run) : sig
type ('a, 'n) t =
'n One_hot_vector.T(Impl).t * ('a, 'n) Pickles_types.Vector.t
val seal : Impl.Field.t -> Impl.Field.t
val mask :
'n One_hot_vector.T(Impl).t
-> (Impl.Field.t, 'n) Pickles_types.Vector.t
-> Impl.Field.... | null | https://raw.githubusercontent.com/MinaProtocol/mina/b19a220d87caa129ed5dcffc94f89204ae874661/src/lib/pickles/pseudo/pseudo.mli | ocaml | Pseudo
* Compute the 'shifts' used by the kimchi permutation argument.
These values are selected deterministically-randomly to appear outside
of the domain, so that every choice of [i] and [shift] results in a
distinct value for [shift * domain_generator ^ i].
|
module Make (Impl : Snarky_backendless.Snark_intf.Run) : sig
type ('a, 'n) t =
'n One_hot_vector.T(Impl).t * ('a, 'n) Pickles_types.Vector.t
val seal : Impl.Field.t -> Impl.Field.t
val mask :
'n One_hot_vector.T(Impl).t
-> (Impl.Field.t, 'n) Pickles_types.Vector.t
-> Impl.Field.t
val choo... |
5009005d937661c2918e6aa841a21b7d862d52a78c423789d027edb29aa6031e | Chris00/ocaml-cairo | pythagoras_tree.ml | (* Example inspired from
*)
open Cairo
let pi = acos(-1.)
let set_green cr = Cairo.set_source_rgb cr 0. 0.7 0.
let set_darkgreen cr = Cairo.set_source_rgb cr 0. 0.5 0.
let set_burlywood cr = Cairo.set_source_rgb cr 0.87 0.72 0.53
let transform_data m = function
| MOVE_TO (x, y) -> let x, y = Matrix.transform_... | null | https://raw.githubusercontent.com/Chris00/ocaml-cairo/202674a8d0c533b689ceacdb523ca167611e1b4c/examples/pythagoras_tree.ml | ocaml | Example inspired from
Transform matrices (in "abstract" coordinates)
last
first
Simple (but not very efficient) to ensure that all squares of a
given level is drawn at the same time.
compensate scaling |
open Cairo
let pi = acos(-1.)
let set_green cr = Cairo.set_source_rgb cr 0. 0.7 0.
let set_darkgreen cr = Cairo.set_source_rgb cr 0. 0.5 0.
let set_burlywood cr = Cairo.set_source_rgb cr 0.87 0.72 0.53
let transform_data m = function
| MOVE_TO (x, y) -> let x, y = Matrix.transform_point m x y in
... |
341c34573c9daf104a9fbf2f637358a2a472e62366cf1619bc85f4c0b9d6bcd0 | purescript/purescript | ObjectWildcards.hs | module Language.PureScript.Sugar.ObjectWildcards
( desugarObjectConstructors
, desugarDecl
) where
import Prelude
import Control.Monad (forM)
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.Supply.Class
import Data.Foldable (toList)
import... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Sugar/ObjectWildcards.hs | haskell | If we don't have an anonymous argument then we need to generate a let wrapper
so that the object expression isn't re-evaluated for each nested update.
recursively build up the nested `ObjectUpdate` expressions | module Language.PureScript.Sugar.ObjectWildcards
( desugarObjectConstructors
, desugarDecl
) where
import Prelude
import Control.Monad (forM)
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.Supply.Class
import Data.Foldable (toList)
import... |
63af01883f6587471baa710066597daff21a43911d65b85d631db0cfee8b612d | patrikja/AFPcourse | Shallow.hs | -- | A very simple library for manipulating continuous signals. Shallow embedding.
module Signal.Shallow
( Time
-- | the 'Signal' type is abstract
, Signal
-- * Smart constructors
, constS, timeS
-- * Combinators
, ($$), mapT
-- * Derived operation
, mapS
-- * Run function
, sample
) where
--... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L2/src/Signal/Shallow.hs | haskell | | A very simple library for manipulating continuous signals. Shallow embedding.
| the 'Signal' type is abstract
* Smart constructors
* Combinators
* Derived operation
* Run function
* Smart constructors
* Combinators
* Derived operation
* Run function
| The constant signal.
| The time signal
| Function app... | module Signal.Shallow
( Time
, Signal
, constS, timeS
, ($$), mapT
, mapS
, sample
) where
constS :: a -> Signal a
timeS :: Signal Time
($$) :: Signal (a -> b) -> Signal a -> Signal b
mapT :: (Time -> Time) -> Signal a -> Signal a
mapS :: (a -> b) -> Signal a -> Signal b
sample :: S... |
e11a30eb190cafb44edf359f25f1d4c20ac71485269963fa7ad96b050607cf39 | D00mch/PWA-clojure | figwheel.clj | (ns pwa.figwheel
(:require [figwheel-sidecar.repl-api :as ra]))
(defn start-fw []
(ra/start-figwheel!))
(defn stop-fw []
(ra/stop-figwheel!))
(defn cljs []
(ra/cljs-repl))
| null | https://raw.githubusercontent.com/D00mch/PWA-clojure/39ab4d3690c7a8ddbdd8095d65a782961f92c183/env/dev/clj/pwa/figwheel.clj | clojure | (ns pwa.figwheel
(:require [figwheel-sidecar.repl-api :as ra]))
(defn start-fw []
(ra/start-figwheel!))
(defn stop-fw []
(ra/stop-figwheel!))
(defn cljs []
(ra/cljs-repl))
| |
43dd4e6a673bf8927e431043ef02302660870f1559ebf9b8636dc1c2198061f4 | rems-project/lem | trans.ml | (**************************************************************************)
(* Lem *)
(* *)
, University of Cambridge
, INRIA Paris -... | null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/trans.ml | ocaml | ************************************************************************
Lem
... | , University of Cambridge
, INRIA Paris - Rocquencourt
, University of Cambridge
, University of Cambridge
, University of Cambridge ( while working on Lem )
... |
c3a08dd3433be9bacded6016af2a847109d9d6543fb277b26061b132a5f4db9c | Frama-C/Frama-C-snapshot | postdominators_parameters.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/postdominators/postdominators_parameters.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
e2332b37b361584e9d3524cb1ef86a3b0cd645a87d5d40ef3396cc4a700b4494 | unisonweb/unison | TermEdit.hs | module Unison.Codebase.TermEdit where
import Unison.Reference (Reference)
data TermEdit = Replace Reference Typing | Deprecate
deriving (Eq, Ord, Show)
references :: TermEdit -> [Reference]
references (Replace r _) = [r]
references Deprecate = []
-- Replacements with the Same type can be automatically propagated.... | null | https://raw.githubusercontent.com/unisonweb/unison/7843e48cddbe46436bffb5a2e1bb5fb444f55302/parser-typechecker/src/Unison/Codebase/TermEdit.hs | haskell | Replacements with the Same type can be automatically propagated.
Replacements of a Different type need to be manually propagated by the programmer. | module Unison.Codebase.TermEdit where
import Unison.Reference (Reference)
data TermEdit = Replace Reference Typing | Deprecate
deriving (Eq, Ord, Show)
references :: TermEdit -> [Reference]
references (Replace r _) = [r]
references Deprecate = []
Replacements with a Subtype can be automatically propagated but m... |
52f22d6f7fe7db961b0b955b3bbb2126df0477c3d374e4436444107b3cc9961c | benoitc/opencouch | couch_app.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/benoitc/opencouch/fef7be42f37515a6f73e2dfbab74fea75188e415/src/couch_app.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_app).
-behaviour(application).
-export([start/2, stop/1]).
-export([get_env/1, get_env/2]).
start(_Type, _) ->
couch_sup:start_link().
... |
33af7b49d26e61281500b6ab20ab4137f706a36f0ba4baedb58a8f8d41a1f6e1 | goblint/analyzer | yamlWitnessType.ml | module Producer =
struct
type t = {
name: string;
version: string;
(* TODO: configuration *)
command_line: string;
(* TODO: description *)
}
let to_yaml {name; version; command_line} =
`O [
("name", `String name);
("version", `String version);
("command_line", `String co... | null | https://raw.githubusercontent.com/goblint/analyzer/4828e7b40860c84ce5b9fe072cf484202805dff4/src/witness/yamlWitnessType.ml | ocaml | TODO: configuration
TODO: description | module Producer =
struct
type t = {
name: string;
version: string;
command_line: string;
}
let to_yaml {name; version; command_line} =
`O [
("name", `String name);
("version", `String version);
("command_line", `String command_line);
]
let of_yaml y =
let open GobYaml... |
fb26693790bfc3c36f6416cf1ed072bc53c5bc01a781d574066f6a0e7e58d81b | paurkedal/viz | ast_print.ml | Copyright ( C ) 2011 - -2016 Petter A. Urkedal < >
*
* This file is part of the Viz Compiler < / > .
*
* The Viz Compiler 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... | null | https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/ast_print.ml | ocaml | to borrow precedence levels. | Copyright ( C ) 2011 - -2016 Petter A. Urkedal < >
*
* This file is part of the Viz Compiler < / > .
*
* The Viz Compiler 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... |
f3b87a4333271906c330686a3d067e2fd41c31bee5db73435961b30b3a85b98e | comby-tools/comby | test_nested_comments_omega.ml | open Core
open Test_helpers
include Test_omega
(* See -comments-in-c-c *)
let%expect_test "nested_multiline_ocaml" =
let source = {|int nest = /*/*/ 0 */**/ 1;|} in
let template = {|0 * 1|} in
(* 0 is not commented out *)
let matches_no_nesting = C.all ~configuration ~template ~source () in
print_only_matc... | null | https://raw.githubusercontent.com/comby-tools/comby/7b401063024da9ddc94446ade27a24806398d838/test/common/test_nested_comments_omega.ml | ocaml | See -comments-in-c-c
0 is not commented out
0 is commented out | open Core
open Test_helpers
include Test_omega
let%expect_test "nested_multiline_ocaml" =
let source = {|int nest = /*/*/ 0 */**/ 1;|} in
let template = {|0 * 1|} in
let matches_no_nesting = C.all ~configuration ~template ~source () in
print_only_match matches_no_nesting;
[%expect_exact {|[ "0 */**/ 1" ]|}... |
919e43711e61c787e2784f50a5a3c579f745fe4318776266376c61114113b66c | wdebeaum/step | wean.lisp | ;;;;
;;;; W::wean
;;;;
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::wean
(SENSES
((meta-data :origin "verbnet-2.0" :entry-date 20060315 :change-date 20090529 :comments nil :vn ("cheat-10.6") :wn ("wean%2:37:00"))
(LF-PARENT ONT::deprive)
(TEMPL AGENT-AFFECTED-FORMAL-XP-OPTIONAL... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wean.lisp | lisp |
W::wean
|
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::wean
(SENSES
((meta-data :origin "verbnet-2.0" :entry-date 20060315 :change-date 20090529 :comments nil :vn ("cheat-10.6") :wn ("wean%2:37:00"))
(LF-PARENT ONT::deprive)
(TEMPL AGENT-AFFECTED-FORMAL-XP-OPTIONAL-B-TEMPL (xp (% w::cp (... |
ed79172b3c063ee13b0f222dd1eaf3305df613b5af84dee5d547ba6d32632a1e | ndmitchell/catch | Faster.hs |
-- some things take quite a while and are very common
-- solve them super fast
module Typey.Faster(canFastEval, fastEval) where
import Hite
import Typey.Abstract
[ " subset","dif","insert " ]
canFastEval :: FuncName -> Bool
canFastEval x = x `elem` (["map", "or"] ++ fakeFast)
fastEval :: (Eq ... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Typey/Faster.hs | haskell | some things take quite a while and are very common
solve them super fast
map is perfectly specified
or is perfectly specified
++ is reasonable, but a little bit general in some cases
mainly in the x cases, I think
do not use, since not really a speed up and a loss of accuracy
|
module Typey.Faster(canFastEval, fastEval) where
import Hite
import Typey.Abstract
[ " subset","dif","insert " ]
canFastEval :: FuncName -> Bool
canFastEval x = x `elem` (["map", "or"] ++ fakeFast)
fastEval :: (Eq a, Show a) => ([Abstract a] -> IO (Abstract a)) -> FuncName -> [Abstract a] -> IO... |
8e0b7b83b6f232929490904bf475a0fb1f84d02adc23424aebaad6f16ff04242 | potapenko/playphraseme-site | figwheel.clj | (ns playphraseme.figwheel
(:require [figwheel-sidecar.repl-api :as ra]))
(defn start-fw []
(ra/start-figwheel!))
(defn stop-fw []
(ra/stop-figwheel!))
(defn cljs []
(ra/cljs-repl))
| null | https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/env/dev/clj/playphraseme/figwheel.clj | clojure | (ns playphraseme.figwheel
(:require [figwheel-sidecar.repl-api :as ra]))
(defn start-fw []
(ra/start-figwheel!))
(defn stop-fw []
(ra/stop-figwheel!))
(defn cljs []
(ra/cljs-repl))
| |
2f0ee23fd36731f5c2cc329bc5cd6a925ca0b79b0c699a6c63f7ff01504b2d40 | plexus/hillchart | views.cljs | (ns hillchart.views)
| null | https://raw.githubusercontent.com/plexus/hillchart/aa46b8136fa350dadea7899f3249943421e33860/src/hillchart/views.cljs | clojure | (ns hillchart.views)
| |
762911cbaeda2e7bfc3db2eac66f52f28287c826213042e6da6cde29031aec9b | aeternity/aeternity | aec_connection_sup.erl | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%=============================================================================
2018 , Aeternity Anstalt
%%% @doc
%%% Supervisor for servers dealing with inter node communication.
%%%
%%% Individual connections cannot bring down the central servers (aec... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aecore/src/aec_connection_sup.erl | erlang | -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
=============================================================================
@doc
Supervisor for servers dealing with inter node communication.
Individual connections cannot bring down the central servers (aec_peers,
down, and the whole peer/sync hand... | 2018 , Aeternity Anstalt
aec_sync ) , but if one of those goes down , all connections are brought
-module(aec_connection_sup).
-behaviour(supervisor).
-export([sync_port/0,
ext_sync_port/0]).
-export([start_link/0]).
-export([init/1]).
-define(DEFAULT_SYNC_PORT, 3015).
sync_port() ->
aeu_env... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.