_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 |
|---|---|---|---|---|---|---|---|---|
d2011d110cb0be1a4a2afa948e5402c4d264916e985dc3569449ee81dfe48829 | RefactoringTools/HaRe | Empty.hs | module Empty where
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/TypeUtils/Empty.hs | haskell | module Empty where
| |
0fd05d42aadd663929a5f6837653ceee2486cb166da13c055699f7bab03ec9f2 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PaymentIntentNextActionPromptpayDisplayQrCode.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema PaymentIntentNextActionPromptpayDisplayQrCode
module StripeAPI.Types.Paymen... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentIntentNextActionPromptpayDisplayQrCode.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema PaymentIntentNextActionPromptpayDisplayQrCode
| Defines the object schema located at @components.schemas.payment_intent_next_action_promptpay_display_qr_code@ in the specification.
| data: The raw data string used t... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.PaymentIntentNextActionPromptpayDisplayQrCode where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encodi... |
7d748b1a60340c5205d2dc96bd83b386f444bcfc5b733d4d57ca8c4eb7fbcba0 | jdreaver/quantities | DefinitionParser.hs | -- | Uses parsec to parse definition lines.
module Data.Quantities.DefinitionParser where
import Control.Applicative ((<*))
import Text.ParserCombinators.Parsec
import Data.Quantities.Data
import Data.Quantities.ExprParser (parseMultExpr)
| Parse multiline string of definitions ( say , from a file ) into a
-- list... | null | https://raw.githubusercontent.com/jdreaver/quantities/c0317b7d8d5aac1b77dd482c6dea7e203c5eb70f/library/Data/Quantities/DefinitionParser.hs | haskell | | Uses parsec to parse definition lines.
list of definitions.
| Parse any definition line
skipMany comment
skipMany comment
| Custom eol parsec parser.
| Parse a line containing unit definition
skipMany comment
| Parses the synonyms at the end of a base or unit definition.
Ex: meter = [length] = m
| Parse th... | module Data.Quantities.DefinitionParser where
import Control.Applicative ((<*))
import Text.ParserCombinators.Parsec
import Data.Quantities.Data
import Data.Quantities.ExprParser (parseMultExpr)
| Parse multiline string of definitions ( say , from a file ) into a
parseDefinitions :: String -> [Definition]
parseDef... |
fa7d78e41a3339bcc0309cac1baeafea4ef35c34af127b7cf73cddc8886c4739 | andrenth/release | master.ml | open Lwt.Infix
open Printf
open Ipc
open Release.Util
let slave_connections = ref None
let ipc_handler fd =
let handler req =
let s = SlaveIpcOps.string_of_request req in
Lwt_log.notice_f "got IPC request: %s" s >>= fun () ->
match req with
| SlaveIpcOps.Req1 pid -> Lwt.return (SlaveIpcOps.Resp1 pi... | null | https://raw.githubusercontent.com/andrenth/release/c88b472d8b142f7f306299d0f51cfd8add4a1a58/test/master.ml | ocaml | open Lwt.Infix
open Printf
open Ipc
open Release.Util
let slave_connections = ref None
let ipc_handler fd =
let handler req =
let s = SlaveIpcOps.string_of_request req in
Lwt_log.notice_f "got IPC request: %s" s >>= fun () ->
match req with
| SlaveIpcOps.Req1 pid -> Lwt.return (SlaveIpcOps.Resp1 pi... | |
8458eaf6b5aaae376929a329359d940d5dc2437e7ee5e8d1cf481fad8c18ad94 | mathematical-systems/clml | dlasq2.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlasq2.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
c84d81a750ce6fbeca14cae0140430cd7aeec542007b92e1d9a2b36cd3a9e59a | ijvcms/chuanqi_dev | email.erl | -module(email).
-include("email.hrl").
-export([send/1]).
-compile(export_all).
-define(MAX_SIZE, 1024).
-define(DE, io:format("~p:~p~n", [?FILE, ?LINE])).
%% send email by email record
send(Email) when
undefined =/= Email#email.server_ip,
undefined =/= Email#email.account,
undefined =/= Emai... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/email/email.erl | erlang | send email by email record
ok = ssl:start(),
ssl:stop();
connect your email
send email head
send email info
send email data
send email text
{ok, Fd} = file:open(FilePath, [binary, read]),
ok = file:close(Fd),
send email other type
io:format("Client: Send ~p to server....~n", [FilePath]),
send file
send content... | -module(email).
-include("email.hrl").
-export([send/1]).
-compile(export_all).
-define(MAX_SIZE, 1024).
-define(DE, io:format("~p:~p~n", [?FILE, ?LINE])).
send(Email) when
undefined =/= Email#email.server_ip,
undefined =/= Email#email.account,
undefined =/= Email#email.to_emails,
und... |
8d5db0fa4023789af29f915d7996313b46d0ed6ff9c5bf34bad869398589f9a7 | kupl/FixML | sub27.ml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula
let rec eval : formula -> bool
=fun f -> match f with
|True -> true
|False -> false
|Neg x -> if x = True then false else true
|Or (x, y) ... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula2/submissions/sub27.ml | ocaml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula
let rec eval : formula -> bool
=fun f -> match f with
|True -> true
|False -> false
|Neg x -> if x = True then false else true
|Or (x, y) ... | |
e0de80794af86a36de32c9a4ded09970e784ca2c5ad079b88aed2275861d336a | janestreet/memtrace_viewer | filter_editor.mli | open! Core
open Bonsai_web
type t = Filter_spec.Clause.t option list And_view.t
val component
: max_time:Time_ns.Span.t Bonsai.Value.t
-> start_time:Time_ns.t Bonsai.Value.t
-> time_view:Graph_view.Time_view.t Bonsai.Value.t
-> t Bonsai.Computation.t
| null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/filter_editor.mli | ocaml | open! Core
open Bonsai_web
type t = Filter_spec.Clause.t option list And_view.t
val component
: max_time:Time_ns.Span.t Bonsai.Value.t
-> start_time:Time_ns.t Bonsai.Value.t
-> time_view:Graph_view.Time_view.t Bonsai.Value.t
-> t Bonsai.Computation.t
| |
46c22af5dd980068228c6f8c82e5ad2da1368dbf5fd4686553edf767ce2c0bc7 | benoitc/couchdbproxy | couchdbproxy_web.erl | Copyright 2009 < >
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 ... | null | https://raw.githubusercontent.com/benoitc/couchdbproxy/9aff3001f11afff021269d8048a0527551aca6c3/couchdbproxy/src/couchdbproxy_web.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... | Copyright 2009 < >
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(couchdbproxy_web).
-author('Benoît Chesneau <>').
-export([start/1, stop/0, loop/3]).
-export([host/1, absolute_uri/2]).
-... |
1b567c593a0c8df6f2474b1de6c4d9289190104dfa8059785fc3521ccb30dda4 | GaloisInc/surveyor | Info.hs | {-# LANGUAGE GADTs #-}
module Surveyor.Core.Handlers.Info (
handleInfoEvent
) where
import qualified Control.Concurrent.Async as CCA
import qualified Control.Exception as X
import Control.Lens ( (&), (^.), (.~) )
import Control.Monad.IO.Class ( MonadIO, liftIO )
import qualified Data.GraphViz a... | null | https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-core/src/Surveyor/Core/Handlers/Info.hs | haskell | # LANGUAGE GADTs #
that we don't block the UI
FIXME: Stash the task handle away so that we can monitor it from a
UI somewhere (and clean them up periodically, and on program
termination)
| Get the current mode (looking through the minibuffer if necessary) | module Surveyor.Core.Handlers.Info (
handleInfoEvent
) where
import qualified Control.Concurrent.Async as CCA
import qualified Control.Exception as X
import Control.Lens ( (&), (^.), (.~) )
import Control.Monad.IO.Class ( MonadIO, liftIO )
import qualified Data.GraphViz as DG
import qualified D... |
68b16e3f88a3f15bba122d36d5e3931c6e2861ff51755c95210e94b7f95f2749 | mfikes/fifth-postulate | ns68.cljs | (ns fifth-postulate.ns68)
(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 (xs... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns68.cljs | clojure | (ns fifth-postulate.ns68)
(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 (xs... | |
478821242d210428f6709a064b51f03aebc0efda68ac0d592ef928debe3fdc48 | jeromesimeon/Galax | typing_call.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/typing/typing_call.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : typing_call.ml , v 1.34 2008/03/25 01:47:28 mff Exp $
open Format
open Error
open Occurrence
open Namespace_names
open Norm_context
open Processing_context
open Datatypes
open Datatypes_util
open Xquery_common_ast
open Xquery_cor... |
187569de7078662b9bebc1916ce04e2ef5d93a345468cc67fa44d5e99a3040e3 | anycable/erlycable | erlycable_disconnector.erl | -module(erlycable_disconnector).
-behaviour(gen_server).
-include_lib("deliverly/include/deliverly.hrl").
-include_lib("erlycable/include/erlycable.hrl").
-include_lib("erlycable/include/log.hrl").
-include_lib("erlycable/include/priv.hrl").
-define(SERVER, ?MODULE).
%% API
-export([start_link/0]).
%% gen_server
-exp... | null | https://raw.githubusercontent.com/anycable/erlycable/6f52a5b16c080bfa0feeb1f4f9e45fc552af71b5/src/erlycable_disconnector.erl | erlang | API
gen_server
API
------------------------------------------------------------------
Internal Function Definitions
------------------------------------------------------------------ | -module(erlycable_disconnector).
-behaviour(gen_server).
-include_lib("deliverly/include/deliverly.hrl").
-include_lib("erlycable/include/erlycable.hrl").
-include_lib("erlycable/include/log.hrl").
-include_lib("erlycable/include/priv.hrl").
-define(SERVER, ?MODULE).
-export([start_link/0]).
-export([init/1, disconne... |
6c27134ccd737d62a55bfd6068503211567adab2f7ba32cef89244d1b000f8fd | ds-wizard/engine-backend | Api.hs | module Wizard.Api.Handler.QuestionnaireImporter.Api where
import Servant
import Servant.Swagger.Tags
import Wizard.Api.Handler.QuestionnaireImporter.Detail_GET
import Wizard.Api.Handler.QuestionnaireImporter.Detail_PUT
import Wizard.Api.Handler.QuestionnaireImporter.List_GET
import Wizard.Api.Handler.QuestionnaireImp... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Handler/QuestionnaireImporter/Api.hs | haskell | module Wizard.Api.Handler.QuestionnaireImporter.Api where
import Servant
import Servant.Swagger.Tags
import Wizard.Api.Handler.QuestionnaireImporter.Detail_GET
import Wizard.Api.Handler.QuestionnaireImporter.Detail_PUT
import Wizard.Api.Handler.QuestionnaireImporter.List_GET
import Wizard.Api.Handler.QuestionnaireImp... | |
e087b80dc9992d4abe40ea1614abf623c37b6048f3a517873841e42109c2d91b | ericcervin/getting-started-with-sketching | pg041.rkt | #lang sketching
(define (setup)
(size 480 120)
(smoothing 'smoothed)
(background 200)
(no-loop)
)
(define (draw)
(stroke-weight 8)
(for ([i (in-range 20 400 60)])
(line i 40 (+ i 60) 80)
))
| null | https://raw.githubusercontent.com/ericcervin/getting-started-with-sketching/5371380b673ade6d187c43d230a33bc50a6b641b/pg041.rkt | racket | #lang sketching
(define (setup)
(size 480 120)
(smoothing 'smoothed)
(background 200)
(no-loop)
)
(define (draw)
(stroke-weight 8)
(for ([i (in-range 20 400 60)])
(line i 40 (+ i 60) 80)
))
| |
07cdd8cd46b1844dd4bbc1556e9d508ff9c55668a0e57c9af9735f83b732b5b5 | martinklepsch/tenzing | rum.cljs | (ns {{name}}.app
(:require [rum.core :as rum]))
(rum/defc label [text]
[:div
[:h1 "A label"]
[:p text]])
(defn init []
(rum/mount (label) (. js/document (getElementById "container"))))
| null | https://raw.githubusercontent.com/martinklepsch/tenzing/d147f988128f3377be7d94c6cbf78d01d481c86e/resources/leiningen/new/tenzing/rum.cljs | clojure | (ns {{name}}.app
(:require [rum.core :as rum]))
(rum/defc label [text]
[:div
[:h1 "A label"]
[:p text]])
(defn init []
(rum/mount (label) (. js/document (getElementById "container"))))
| |
93c7e399dc2d84a2bcfc2cfadc6ae50f371b70f67b2b1b0ba31d33d2b21b0fa1 | votinginfoproject/data-processor | v3_0.clj | (ns vip.data-processor.validation.db.v3-0
(:require
[vip.data-processor.validation.db.v3-0.admin-addresses :as admin-addresses]
[vip.data-processor.validation.db.v3-0.candidate-addresses :as candidate-addresses]
[vip.data-processor.validation.db.v3-0.fips :as fips]
[vip.data-processor.validation.db.v3-0.j... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/db/v3_0.clj | clojure | (ns vip.data-processor.validation.db.v3-0
(:require
[vip.data-processor.validation.db.v3-0.admin-addresses :as admin-addresses]
[vip.data-processor.validation.db.v3-0.candidate-addresses :as candidate-addresses]
[vip.data-processor.validation.db.v3-0.fips :as fips]
[vip.data-processor.validation.db.v3-0.j... | |
764dfec7a221805b404c7a587bd3a0db79b410fc7f94c47b6abad2187b42bcf6 | originrose/think.datatype | core.clj | (ns think.datatype.core
"Generalized efficient manipulations of sequences of primitive datatype.
Includes specializations for java arrays, array views (subsection of an array)
and nio buffers. There are specializations to allow implementations to provide
efficient full typed copy functions when the types can be asce... | null | https://raw.githubusercontent.com/originrose/think.datatype/31372d6e18fe3a5146262693c0df5256a2a58095/src/think/datatype/core.clj | clojure | Macros to use to use the sub views as efficiently as one uses arrays.
Add the overloads for object for marshal-type copies. | (ns think.datatype.core
"Generalized efficient manipulations of sequences of primitive datatype.
Includes specializations for java arrays, array views (subsection of an array)
and nio buffers. There are specializations to allow implementations to provide
efficient full typed copy functions when the types can be asce... |
f836d7fc742f0b89712a3e295b159a8cda3e5191a6d3eea156a70674c36f5f00 | alexandergunnarson/quantum | websocket.cljc | (ns quantum.test.net.websocket
(:require [quantum.net.websocket :as ns]))
(defn test:put!
[#?(:clj uid) [msg-id msg] callback & [timeout]])
(defn test:try-put!
[?times ?sleep & args])
(defn test:->ChannelSocket [m]) | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/net/websocket.cljc | clojure | (ns quantum.test.net.websocket
(:require [quantum.net.websocket :as ns]))
(defn test:put!
[#?(:clj uid) [msg-id msg] callback & [timeout]])
(defn test:try-put!
[?times ?sleep & args])
(defn test:->ChannelSocket [m]) | |
e1d69b65c3f9f8d404b9c2dc48ef5cf349fdbd98f6a5d3e9a70f5c9614ee5796 | pedestal/pedestal-app | events.cljs | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; 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 licens... | null | https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/src/io/pedestal/app/render/events.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 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns io.pedestal.app.render.events
(:require [io.pedestal.app.protocols :as p]
[io.pedestal.app.messages :as msg]
[domina :as d]
[domina.events :as event]
[goog.object :as gobj]
[goog.event... |
f6f19635cb7a398a8164d1c3a7df4de6d09e12d1be49aae9123ef3ca8f6f0bdc | SonyCSLParis/fcg-server | package.lisp | 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... | null | https://raw.githubusercontent.com/SonyCSLParis/fcg-server/99962c6f10e9e415a729f256f43767373a8dc9fe/Archive/v1.0/server-interface/package.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... |
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :common-lisp)
(defpackage :server-interface
(:nicknames :si)
(:use :common-lisp :cl-user :utils)
(:documentation "A package for the server interface"))
|
a1a7075531fa84232ea6bb5cf89ba489476a7e15a1117174c1ef7dceaebc468f | rems-project/lem | finite_map.ml | (**************************************************************************)
(* Lem *)
(* *)
, University of Cambridge
, INRIA Paris -... | null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/finite_map.ml | ocaml | ************************************************************************
Lem
... | , University of Cambridge
, INRIA Paris - Rocquencourt
, University of Cambridge
, University of Cambridge
, University of Cambridge ( while working on Lem )
... |
4db8a74bad193dcc2990a3084c1ccbcf152ee3f900b47b69b6ff3e33eb2f31e1 | CSCfi/rems | core.clj | (ns rems.db.core
"Database connections. Exposes queries defined in resources/sql/queries.sql as functions using hugsql.
That is, something like ':name get-catalogue-items' queries.sql, there will be a function
rems.db.core/get-catalogue-items.
See also: docs/architecture/012-layers.md"
{:ns-tracker/resource-... | null | https://raw.githubusercontent.com/CSCfi/rems/51b91a92c128bb4fb88274c94c0e64152146aa7f/src/clj/rems/db/core.clj | clojure | convert db timestamps to joda-time objects
See docs/architecture/010-transactions.md
HikariConfig wants an actual String, no support for parameterized queries...
get a connection from the pool to get errors earlier | (ns rems.db.core
"Database connections. Exposes queries defined in resources/sql/queries.sql as functions using hugsql.
That is, something like ':name get-catalogue-items' queries.sql, there will be a function
rems.db.core/get-catalogue-items.
See also: docs/architecture/012-layers.md"
{:ns-tracker/resource-... |
73ca1dd3be137b4c8c914180808f2336621fa5ab85b88f7f7b0f0f5cd0cfefcd | ollef/sixty | CursorAction.hs | # LANGUAGE BlockArguments #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE OverloadedRecordDot #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
# LANGUAGE NoFieldSelectors #
module LanguageServer.CursorAction where
import Control.Monad.Trans.Maybe
import Core.B... | null | https://raw.githubusercontent.com/ollef/sixty/5d630ca6fde91da5a691dc7cd195f5cbf6491eb0/src/LanguageServer/CursorAction.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE BlockArguments #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
# LANGUAGE NoFieldSelectors #
module LanguageServer.CursorAction where
import Control.Monad.Trans.Maybe
import Core.Binding (Binding)
import qualified Core.Binding as B... |
9eb679114d94323a98b5166a29e1c2d85cb053fab27f787d7c1f937cf85f3983 | thma/ThreepennyElectron | Ui.hs | module Ui where
import GHC.IO.Handle.Types (Handle)
import System.FilePath (dropFileName)
import System.Environment (getExecutablePath)
import System.Info (os)
import System.Process (ProcessHandle, createProces... | null | https://raw.githubusercontent.com/thma/ThreepennyElectron/53a4af17fec74fbd3d464ed73f8b399b115bd1d5/app/Ui.hs | haskell | | main entry point from main.js launch script
| setup window layout and event handling
define page
define UI controls
define the button grid
keys :: Event String
keys = fmap (UI.keypress outputBox) (: [])
map buttons to Command. (buttonMap :: [(Element, Command)] )
register mouse click events to all buttons. (... | module Ui where
import GHC.IO.Handle.Types (Handle)
import System.FilePath (dropFileName)
import System.Environment (getExecutablePath)
import System.Info (os)
import System.Process (ProcessHandle, createProces... |
384c487b87b467bb5f636844df3c6569b4b3cf8a78ad985d3606c93d6680f7e0 | Hakuyume/pandoc-filter-graphviz | Main.hs | import Text.Pandoc.JSON
import GraphvizBlock
main = toJSONFilter graphvizBlock
| null | https://raw.githubusercontent.com/Hakuyume/pandoc-filter-graphviz/5e0ec28c3a9e7682e815078e41117cb4334b44e4/Main.hs | haskell | import Text.Pandoc.JSON
import GraphvizBlock
main = toJSONFilter graphvizBlock
| |
72b18acb8f338bc01b4174437ebc14feb5e4c4460d7fc37f33d8a90ab9160dce | codinuum/cca | f_stmt.ml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/fortran/parsing/src/labels/f_stmt.ml | ocaml | dummy
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2003
F2008
F2008
F2008
F2008
F2008
F2008
F2008
F2003
F2003
F2003
F2003
F2003
?F2008
| TypeParamDefStmt _ |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... |
bb7489dd66bdcc5fdd6a7cf17dbe63286ff6ad9246f0f27ce533906021f85e7a | simonmar/async | Async.hs | # LANGUAGE CPP , MagicHash , UnboxedTuples , RankNTypes ,
ExistentialQuantification #
ExistentialQuantification #-}
#if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
#if __GLASGOW_HASKELL__ < 710
{-# LANGUAGE DeriveDataTypeable #-}
#endif
{-# OPTIONS -Wall #-}
-----------------------------------... | null | https://raw.githubusercontent.com/simonmar/async/f37d21764aefe7f1a24a820edd745fef0e6e0377/Control/Concurrent/Async.hs | haskell | # LANGUAGE DeriveDataTypeable #
# OPTIONS -Wall #
---------------------------------------------------------------------------
|
Module : Control.Concurrent.Async
License : BSD3 (see the file LICENSE)
Stability : provisional
Portability : non-portable (requires concurrency)
asynchronously and wait... | # LANGUAGE CPP , MagicHash , UnboxedTuples , RankNTypes ,
ExistentialQuantification #
ExistentialQuantification #-}
#if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
#if __GLASGOW_HASKELL__ < 710
#endif
Copyright : ( c ) 2012
Maintainer : < >
This module provides a set of ope... |
5fe81bd66403d6dc3bf4bde2797f6fe2c9671b676c9375cc14dd96f3fc5f68ac | ocaml/dune | display.mli | (** Type of display modes.
- [status_line] indictates if a status line is shown.
- [verbosity] indicates how verbose the display will be. *)
type t =
| Simple of
{ status_line : bool
; verbosity : Dune_engine.Display.t
}
| Tui
(** All the supported display modes for setting from the comm... | null | https://raw.githubusercontent.com/ocaml/dune/8d88ee8068abb053fe8ed7c9c21b3a1883dbaf47/src/dune_config/display.mli | ocaml | * Type of display modes.
- [status_line] indictates if a status line is shown.
- [verbosity] indicates how verbose the display will be.
* All the supported display modes for setting from the command line.
* Shows a progress bar together with any errors.
* Shows a progress bar with a single line output for a... | type t =
| Simple of
{ status_line : bool
; verbosity : Dune_engine.Display.t
}
| Tui
val all : (string * t) list
val progress : t
* Shows a progress bar with a verbose output showng all commands . &
val verbose : t
val short : t
val quiet : t
val short_no_status : t
val to_dyn : t -> Dyn.t... |
439b5316636a98995017236134e9825244595017e19ff6655809fa8d50e7d345 | swift-nav/plover | CodeGen.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE RecursiveDo #
# LANGUAGE PatternSynonyms #
-- Remember: CODE GEN DON'T CARE. This should be as simple as
-- possible while generating code which isn't too terrible. It should
-- not do any simplifications that the reducer could do.
module Language.Plover.CodeGen where
import Lan... | null | https://raw.githubusercontent.com/swift-nav/plover/3d00d70802c6696ddf0ea71b073def46595e07f0/src/Language/Plover/CodeGen.hs | haskell | Remember: CODE GEN DON'T CARE. This should be as simple as
possible while generating code which isn't too terrible. It should
not do any simplifications that the reducer could do.
^ True/False means reference/value (for out variables)
^ used to "abort the continuation", (e.g. return)
^ a database of boolean exp... | # LANGUAGE QuasiQuotes #
# LANGUAGE RecursiveDo #
# LANGUAGE PatternSynonyms #
module Language.Plover.CodeGen where
import Language.C.Quote.C
import qualified Language.C.Syntax as C
import Language.C.Pretty
import qualified Text.PrettyPrint.Mainland as Mainland
import Data.Either
import Data.Tag
import Data.List
im... |
664450a53ce7b99774d76e4fc32932ab9423766c6849e28acff3d73b60e8802f | janestreet/universe | tabpage.mli | open Core
type t = Types.Tabpage.t
val of_msgpack : Msgpack.t -> t Or_error.t
val to_msgpack : t -> Msgpack.t
module Untested : sig
val list_wins : tabpage:t -> Types.Window.t list Or_error.t Api_call.t
val get_var : tabpage:t -> name:string -> Msgpack.t Or_error.t Api_call.t
val set_var : tabpage:t -> name:st... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/src/tabpage.mli | ocaml | open Core
type t = Types.Tabpage.t
val of_msgpack : Msgpack.t -> t Or_error.t
val to_msgpack : t -> Msgpack.t
module Untested : sig
val list_wins : tabpage:t -> Types.Window.t list Or_error.t Api_call.t
val get_var : tabpage:t -> name:string -> Msgpack.t Or_error.t Api_call.t
val set_var : tabpage:t -> name:st... | |
084ab8162aa3c5917feff77d1bf4c7d9aafaf6d847a1cb96a8b0302d573675bf | buntine/Simply-Scheme-Exercises | 22-4.scm | ; Write a procedure to count the number of characters in a file, including space
; characters. It should take the filename as argument and return the number.
(define (numchars file)
(let ((inport (open-input-file file)))
(define chars (count-chars inport))
(close-input-port inport)
chars))
(define (coun... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/22-files/22-4.scm | scheme | Write a procedure to count the number of characters in a file, including space
characters. It should take the filename as argument and return the number. |
(define (numchars file)
(let ((inport (open-input-file file)))
(define chars (count-chars inport))
(close-input-port inport)
chars))
(define (count-chars inport)
(let ((line (read-string inport)))
(if (eof-object? line)
0
(+ (count line) (count-chars inport)))))
|
e2b965385d992ed8fe84a492b4920d9a49bf2e6232509c615a389337a41deb23 | poscat0x04/telegram-types | Input.hs | module Web.Telegram.Types.Input
( InputFile (..),
InputFileType (..),
InputMedia (..),
)
where
import Web.Telegram.Types.Internal.InputFile
import Web.Telegram.Types.Internal.InputMedia
| null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Input.hs | haskell | module Web.Telegram.Types.Input
( InputFile (..),
InputFileType (..),
InputMedia (..),
)
where
import Web.Telegram.Types.Internal.InputFile
import Web.Telegram.Types.Internal.InputMedia
| |
23ecff7ffb7691132734b7604da88c0fe97134c4d9ea39099840533823cf39e2 | Decentralized-Pictures/T4L3NT | carbonated_map.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/carbonated_map.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN A... |
ed5a68c9a48118d39bdf22bbe93213b6e696e65a127b3911f6df7e86921c3066 | ghcjs/ghcjs | GhcjsPlatform.hs | # LANGUAGE CPP #
|
ghcjs builds for a strange platform : like 32 bit
instead of letting autoconf doing the defines , we override them here
and try to get our own includes included instead of the library ones
ghcjs builds for a strange platform: like 32 bit
instead of letting autoconf doing the defines... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/src/Compiler/GhcjsPlatform.hs | haskell | ^ JS objects for linking against
settings = settings' }
settings' = (settings df) { sTargetPlatform = ghcjsPlatform
, sPlatformConstants = ghcjsPlatformConstants
, sProgramName = "ghcjs"
, sProjectVersion = Info.getF... | # LANGUAGE CPP #
|
ghcjs builds for a strange platform : like 32 bit
instead of letting autoconf doing the defines , we override them here
and try to get our own includes included instead of the library ones
ghcjs builds for a strange platform: like 32 bit
instead of letting autoconf doing the defines... |
fed4d2a2e9476591ae30cf81273a7a6432194998de826c47aaed7ac1118873a3 | Gopiandcode/SWIPL-OCaml | inline.ml |
SWIPL - OCaml
Copyright ( C ) 2021
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
This program is di... | null | https://raw.githubusercontent.com/Gopiandcode/SWIPL-OCaml/257a9ae0845d80fc423beb089c3f97135e1d8e94/examples/inline/inline.ml | ocaml |
SWIPL - OCaml
Copyright ( C ) 2021
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
This program is di... | |
628aaa975e931f11f57ea0be5d1f23572760c511480f43249f44fac4f2e6cca2 | tact-lang/tact-obsolete | tonvm.ml | module Instr = Instr
module VM = Vm
module Codepage = Cp
| null | https://raw.githubusercontent.com/tact-lang/tact-obsolete/675fc19d6a76a4a44b671227ef62427d961f2bde/tonvm/tonvm.ml | ocaml | module Instr = Instr
module VM = Vm
module Codepage = Cp
| |
4d5c9df366dddff5699d11bfa0a88dc44ad48b46ee25b5fa840a0aa80d3b5d90 | jacobstanley/hadoop-tools | Path.hs | {-# LANGUAGE OverloadedStrings #-}
module Hadoop.Tools.Path
( getHomeDir
, getWorkingDir
, setWorkingDir
, getAbsolute
, dropFileName
, takeFileName
, takeParent
, displayPath
) where
import Control.Exception (SomeException)
import Control.Monad.Catch (handle)
im... | null | https://raw.githubusercontent.com/jacobstanley/hadoop-tools/8adc178a599d28f4ee3baedd34397e566f7b3fa6/hadoop-tools/src/Hadoop/Tools/Path.hs | haskell | # LANGUAGE OverloadedStrings #
| The path in which our working dir state is stored.
| Get the working directory for your current session.
| Set the working directory for your current session. | module Hadoop.Tools.Path
( getHomeDir
, getWorkingDir
, setWorkingDir
, getAbsolute
, dropFileName
, takeFileName
, takeParent
, displayPath
) where
import Control.Exception (SomeException)
import Control.Monad.Catch (handle)
import Control.Monad.IO.Cla... |
41934e7460578cc61a9eb1132a74ebbeaf047f84cc18d93b828ee177f294d8f7 | arxaqapi/ojo | watcher.ml | open Utils
exception Unix_stat_error
exception Cannot_retrieve_unix_stats
let get_modification_time filename =
try Ok (int_of_float (Unix.stat filename).st_mtime)
with Unix.Unix_error _ -> Error Unix_stat_error
module FileData = struct
type t = { mutable last_modification_time : int }
let make_exn path =
... | null | https://raw.githubusercontent.com/arxaqapi/ojo/0a03b2efc33f02889830619362162eb8fe89c6d8/lib/watcher.ml | ocaml | * Update FileData modification time with argument value or get last system value
* Returns true if the file has been modified. The internal last modification time is also updated.
path -> FileData.t
* Creates a Dir structure and populates its internal files corresponding to the [path] parameter
Do nothing
* Loop ... | open Utils
exception Unix_stat_error
exception Cannot_retrieve_unix_stats
let get_modification_time filename =
try Ok (int_of_float (Unix.stat filename).st_mtime)
with Unix.Unix_error _ -> Error Unix_stat_error
module FileData = struct
type t = { mutable last_modification_time : int }
let make_exn path =
... |
d339f5d3db84881e97ac633cd4f7a74fddb7166aa948d2a9332c2c3d5e0a4275 | bytekid/mkbtt | equation.ml | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/equation.ml | ocaml | ** OPENS *******************************************************************
** SUBMODULES *********************************************************
** TYPES **************************************************************
** EXCEPTIONS *********************************************************
** GLOBALS ****************... | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
2730be8b3c743324fd0abc3c45452a9f3d223d0a91a09e0170704741acadf5ef | AdaCore/why3 | check_ce.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/src/mlw/check_ce.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
* { 1 Validation of candidate counterexamples and classification of proof
failures using runtime - as... |
141bebf239ff222c706cca76ea5755648054c1cf8f7c10dc57378e02a6ead72c | pentlandedge/s4607 | seg_header_tests.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright 2016 Pentland Edge Ltd.
%%
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
%%
%% Un... | null | https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/test/seg_header_tests.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... | Copyright 2016 Pentland Edge Ltd.
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(seg_header_tests).
-include_lib("eunit/include/eunit.hrl").
seg_header_test_() ->
[header_check1(), header... |
2629fecd110d6d660d55d5f60e57c11579649e7144c2a44745a47534999f6974 | Mbodin/murder-generator | names.ml |
open Libutils
open ExtList
type property = Attribute.PlayerAttribute.constructor
(** A specification of the language sounds.
This type works like an automaton, the parameterised type being the state system.
Each step can fire properties: the final property has to be the whole set of properties. *)
type 'a auto... | null | https://raw.githubusercontent.com/Mbodin/murder-generator/2024a924ffb4ee12d1b7119b699346b21e098892/src/names.ml | ocaml | * A specification of the language sounds.
This type works like an automaton, the parameterised type being the state system.
Each step can fire properties: the final property has to be the whole set of properties.
* The initial state.
* A transition.
It takes as argument the current set of properties.
... |
open Libutils
open ExtList
type property = Attribute.PlayerAttribute.constructor
type 'a automaton = {
transition : 'a -> string * ('a * property list) option
}
type data =
| Automaton : 'a automaton -> data
| AttrList of (string * property list) list
type t = {
property_infos : Attribute.PlayerAttri... |
8a9c81cbe934fe3b0897afa21136d5a0a4cc2d6503743fc53770372dcd489491 | K2InformaticsGmbH/egambo | egambo_tictac_jasonrobertfox.erl | -module(egambo_tictac_jasonrobertfox).
-include("egambo_tictac.hrl"). % import tictac game definitions
-behavior(gen_server). % callbacks provided by (bot) players
%-behavior(egambo_gen_player). % callbacks provided by (bot) players
-record(state, { bid :: egBotId() % bot id (= module name... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_tictac_jasonrobertfox.erl | erlang | import tictac game definitions
callbacks provided by (bot) players
-behavior(egambo_gen_player). % callbacks provided by (bot) players
bot id (= module name)
game type id
game engine (rule engine)
sucess run length
do moves fall towards higher row numbers
unbounded repeating board
win function module
numbe... | -module(egambo_tictac_jasonrobertfox).
board width > = 3
board height > = 3
}).
-export([ start_link/1
, init/1
, handle_call/3
, handle_cast/2
, handle_info/2
, terminate/2
, code_change/3
]).
]).
-export([ state/1
]).
... |
7878f7db8847039c86f18df04511a60eaad1c72b92549bd6fe7b83c8b3cd7bb9 | apauley/hledger-flow | Integration.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE OverloadedLists #
module CSVImport.Integration (tests) where
import Test.HUnit
import Turtle
import qualified Data.Map.Strict as Map
import qualified Data.List as List (sort)
import TestHelpers (defaultOpts)
import TestHelpersTurtle (journalFiles, hiddenFiles, touchAll, ... | null | https://raw.githubusercontent.com/apauley/hledger-flow/8664e237d46ccda50df4339facca468f2b2bb563/test/CSVImport/Integration.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE OverloadedLists #
module CSVImport.Integration (tests) where
import Test.HUnit
import Turtle
import qualified Data.Map.Strict as Map
import qualified Data.List as List (sort)
import TestHelpers (defaultOpts)
import TestHelpersTurtle (journalFiles, hiddenFiles, touchAll, extraFiles)
import Hledger.Flow.Com... |
402fce2d8ca40c2ca01d69793b171c4351432758e248afa0a3038d7c3dd0964c | aryx/xix | kproc.ml | open Common
open Types
open Proc_
(* todo: can call files/chan.ml from here? *)
module Chan = struct
let share chan =
Ref.inc chan.Chan_.refcnt;
chan
end
(* less:
* let kernel_shared_namespace = ...
*)
let kproc name f =
let up = Globals.up () in
(* I prefer to inline Proc.alloc () here *)
let pid = C... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/processes/kproc.ml | ocaml | todo: can call files/chan.ml from here?
less:
* let kernel_shared_namespace = ...
I prefer to inline Proc.alloc () here
no need segment, f() uses kernel space memory
todo: misc fields | open Common
open Types
open Proc_
module Chan = struct
let share chan =
Ref.inc chan.Chan_.refcnt;
chan
end
let kproc name f =
let up = Globals.up () in
let pid = Counter.gen Proc.pidcounter in
let p = {
pid = pid;
state = Scheding;
kproc = Some f;
slash = up.slash;
dot = Chan.share... |
5f5434f394b9605f7415b6649e733ed8ef7c172620bec77e71735fd7035fd5ef | nvim-treesitter/nvim-treesitter | highlights.scm | ; Variables
(variable) @variable
((variable) @constant.builtin
(#eq? @constant.builtin "$ENV"))
((variable) @constant.macro
(#eq? @constant.macro "$__loc__"))
; Properties
(index
(identifier) @property)
; Labels
(query
label: (variable) @label)
(query
break_statement: (variable) @label)
; Literals
... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/69867ffe7e05559fdb055f6b5a2589fc6bee1070/queries/jq/highlights.scm | scheme | Variables
Properties
Labels
Literals
Interpolation
Format
Functions
jq -n 'builtins | map(split("/")[0]) | unique | .[]'
Keywords
".."
Punctuation
Comments |
(variable) @variable
((variable) @constant.builtin
(#eq? @constant.builtin "$ENV"))
((variable) @constant.macro
(#eq? @constant.macro "$__loc__"))
(index
(identifier) @property)
(query
label: (variable) @label)
(query
break_statement: (variable) @label)
(number) @number
(string) @string
[
"tru... |
1ca331ea00be2aa9825c5d4af5e318f7f21fa82d350b8b0ac40fba911ed004a3 | fluree/db | credential_test.cljc | (ns fluree.db.json-ld.credential-test
(:require [fluree.db.json-ld.credential :as cred]
[clojure.core.async :as async]
#?(:clj [clojure.test :as t :refer [deftest testing is]]
:cljs [cljs.test :as t :refer [deftest testing is] :include-macros true])))
(def auth
{:id "did:flur... | null | https://raw.githubusercontent.com/fluree/db/1a88130b9e114aa6daae032fed1ad8c543045ef8/test/fluree/db/json_ld/credential_test.cljc | clojure | (ns fluree.db.json-ld.credential-test
(:require [fluree.db.json-ld.credential :as cred]
[clojure.core.async :as async]
#?(:clj [clojure.test :as t :refer [deftest testing is]]
:cljs [cljs.test :as t :refer [deftest testing is] :include-macros true])))
(def auth
{:id "did:flur... | |
a380c354189e9f31caaf5b08d8be4d31f6634ef5926c8952a7934db64398e0ae | NicklasBoto/funQ | InterpreterTests.hs | module InterpreterTests(
runTests,
) where
import Control.Monad.Except (runExceptT, liftIO)
import Interpreter.Run
runTests :: IO Bool
runTests = do
runExceptT tar en exceptT - transformerad monad och kör den , tar ur den inre
-- och returnar Either left right
res <- runExceptT (foldr runTest (pure 0) te... | null | https://raw.githubusercontent.com/NicklasBoto/funQ/1b8ba1e8d6b267e3ae3991db734d1c1f1133dfde/test/InterpreterTests.hs | haskell | och returnar Either left right | module InterpreterTests(
runTests,
) where
import Control.Monad.Except (runExceptT, liftIO)
import Interpreter.Run
runTests :: IO Bool
runTests = do
runExceptT tar en exceptT - transformerad monad och kör den , tar ur den inre
res <- runExceptT (foldr runTest (pure 0) tests)
case res of
Left err -> p... |
16d0281a16e73d1ec57694228cdd0d1ab4ddde4e0e759796cb94b8774d5bed55 | serokell/universum | Unsafe.hs | # LANGUAGE Unsafe #
| Unsafe functions to work with lists and ' Maybe ' .
Sometimes unavoidable but better do n't use them . This module
is intended to be imported qualified and it 's not even included
in default prelude exports .
@
import qualified Universum . Unsafe as Unsafe
foo : : [ a ] - > a
fo... | null | https://raw.githubusercontent.com/serokell/universum/7fc5dd3951d1177d1873e36b0678c759aeb5dc08/src/Universum/Unsafe.hs | haskell | | Similar to '!!' but with flipped arguments.
@ at :: n : Nat -> {xs : NonEmptyList a | len xs > n} -> a @ | # LANGUAGE Unsafe #
| Unsafe functions to work with lists and ' Maybe ' .
Sometimes unavoidable but better do n't use them . This module
is intended to be imported qualified and it 's not even included
in default prelude exports .
@
import qualified Universum . Unsafe as Unsafe
foo : : [ a ] - > a
fo... |
cb05235849e362ce163c54a7882c5bf3ac8bd405e70938e1ea397f2ca77616f6 | HachiSecurity/plc-llvm | Pair.hs |
module Hachi.Compiler.CodeGen.Constant.Pair (
newPair,
getFst,
getSnd
) where
-------------------------------------------------------------------------------
import LLVM.AST
import LLVM.AST.Constant
import LLVM.IRBuilder as IR
import Hachi.Compiler.CodeGen.Closure
import Hachi.Compiler.CodeGen.Externals... | null | https://raw.githubusercontent.com/HachiSecurity/plc-llvm/c99c8d58ec7cbbb8942604338cfde00ad23e7f13/compiler/src/Hachi/Compiler/CodeGen/Constant/Pair.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
| `newPair` @fst snd@ generates code which constructs a new pair value,
allocate memory for the new pair
return the pointer to the pair
-------------------------... |
module Hachi.Compiler.CodeGen.Constant.Pair (
newPair,
getFst,
getSnd
) where
import LLVM.AST
import LLVM.AST.Constant
import LLVM.IRBuilder as IR
import Hachi.Compiler.CodeGen.Closure
import Hachi.Compiler.CodeGen.Externals
import Hachi.Compiler.CodeGen.Monad
import Hachi.Compiler.CodeGen.Types
whe... |
7603bda1d33308d99ed528c046aad9f12b8a83176946d982abfdc50a54089780 | clojupyter/clojupyter | api.clj | (ns clojupyter.cmdline.api
(:require [clojure.pprint :refer [pprint]]
[clojure.string :as str]
[io.simplect.compose :refer [c C def- P]]))
(defn output [s] (P update-in [:cmdline/output] #(conj (or % []) s)))
(defn outputs [ss] (fn [S] (reduce (fn [SS s] ((output s) SS)) S ss)))
(defn set... | null | https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/cmdline/api.clj | clojure | (ns clojupyter.cmdline.api
(:require [clojure.pprint :refer [pprint]]
[clojure.string :as str]
[io.simplect.compose :refer [c C def- P]]))
(defn output [s] (P update-in [:cmdline/output] #(conj (or % []) s)))
(defn outputs [ss] (fn [S] (reduce (fn [SS s] ((output s) SS)) S ss)))
(defn set... | |
a1e434ffd189d37e4641dacc42d696307ee76fb0b2c7cb5ae3d18f69b6a65133 | bendlas/davstore | type_check_test.clj | (ns davstore.type-check-test
(:require [clojure.core.typed :refer [check-ns]]
[clojure.test :refer :all]))
(defn check [ns]
(is (= :ok (check-ns ns)) (str "Typecheck for " ns)))
(deftest main-typecheck
(check 'davstore.store))
| null | https://raw.githubusercontent.com/bendlas/davstore/f8af4849c04c0404ebd0d6b000ef3b2bcd641d0b/test/davstore/type_check_test.clj | clojure | (ns davstore.type-check-test
(:require [clojure.core.typed :refer [check-ns]]
[clojure.test :refer :all]))
(defn check [ns]
(is (= :ok (check-ns ns)) (str "Typecheck for " ns)))
(deftest main-typecheck
(check 'davstore.store))
| |
ea9e93456653a31b392c2912febf94b1efa5c08b17d2ff5b025da0fb7700eac8 | mchung94/pyramid-solver | pyramid-solver-tests.lisp | (defpackage #:pyramid-solver-tests
(:use #:cl #:fiveam))
(in-package #:pyramid-solver-tests)
(def-suite pyramid-solver-tests)
(in-suite pyramid-solver-tests)
(defparameter *ordered-deck*
'("Ac" "2c" "3c" "4c" "5c" "6c" "7c" "8c" "9c" "Tc" "Jc" "Qc" "Kc"
"Ad" "2d" "3d" "4d" "5d" "6d" "7d" "8d" "9d" "Td" "Jd" "... | null | https://raw.githubusercontent.com/mchung94/pyramid-solver/c6dde73fd27ec817e2f1329f2a761b384cd8c663/t/pyramid-solver-tests.lisp | lisp | Tests on the precalculated PYRAMID-FLAGs
00
01 02
Tests on deck precalculations
remove top card of the stock pile if it's a king
remove top card of the waste pile if it's a king
remove uncovered kings on the pyramid
draw a card if possible
recycle the waste pile if possible
To perform f... | (defpackage #:pyramid-solver-tests
(:use #:cl #:fiveam))
(in-package #:pyramid-solver-tests)
(def-suite pyramid-solver-tests)
(in-suite pyramid-solver-tests)
(defparameter *ordered-deck*
'("Ac" "2c" "3c" "4c" "5c" "6c" "7c" "8c" "9c" "Tc" "Jc" "Qc" "Kc"
"Ad" "2d" "3d" "4d" "5d" "6d" "7d" "8d" "9d" "Td" "Jd" "... |
e79b1eaeff71e6ff1f40b5d665ad81a947999ddbc8c808b484816ce93cebd1a1 | zotonic/zotonic | m_seo_sitemap.erl | @author < >
2021 - 2022
%% @doc Model for tracking all URLs to be included in the sitemap.
Copyright 2021 - 2022
%%
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
%%
%% ... | null | https://raw.githubusercontent.com/zotonic/zotonic/37dfa79b1e3643070bfced705a9e49bc3782697f/apps/zotonic_mod_seo_sitemap/src/models/m_seo_sitemap.erl | erlang | @doc Model for tracking all URLs to be included in the sitemap.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i... | @author < >
2021 - 2022
Copyright 2021 - 2022
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(m_seo_sitemap).
-export([
m_get/3
]).
-export([
count/1,
max_id/1,
slice/3,
updat... |
ed1a288554370824f4c1fa1c77b569e314f9c2d1fe2853ee02cc681f82dab997 | mirage/alcotest | test_color.ml | let () =
let open Alcotest in
let id () = () in
run __FILE__
[
( "alpha",
[
test_case "Output may or may not contain ANSI escape codes" `Quick id;
test_case "according to whether or not [--color] is set." `Quick id;
test_case "(See the corresponding [dune] file.)" `... | null | https://raw.githubusercontent.com/mirage/alcotest/e2d5ddf31594e0f9c3bcef98ca4859856b281efc/test/e2e/alcotest/inside-dune/test_color.ml | ocaml | let () =
let open Alcotest in
let id () = () in
run __FILE__
[
( "alpha",
[
test_case "Output may or may not contain ANSI escape codes" `Quick id;
test_case "according to whether or not [--color] is set." `Quick id;
test_case "(See the corresponding [dune] file.)" `... | |
5178a8c235b4265f256eb0a9764f4edf597850e2766a1f6d1b9c5a4b4bad640f | macchiato-framework/macchiato-core | proxy_headers.cljs | (ns macchiato.test.middleware.proxy-headers
(:require
[macchiato.middleware.proxy-headers :refer [wrap-forwarded-remote-addr]]
[macchiato.test.mock.util :refer [mock-handler ok-response raw-response]]
[macchiato.util.response :refer [ok content-type get-header]]
[macchiato.test.mock.request :refer [he... | null | https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/test/macchiato/test/middleware/proxy_headers.cljs | clojure | (ns macchiato.test.middleware.proxy-headers
(:require
[macchiato.middleware.proxy-headers :refer [wrap-forwarded-remote-addr]]
[macchiato.test.mock.util :refer [mock-handler ok-response raw-response]]
[macchiato.util.response :refer [ok content-type get-header]]
[macchiato.test.mock.request :refer [he... | |
531bc8a0974d53d6a9f206143f1bbb3ccf823ed47b091ebbc15ce974656c92af | chenyukang/eopl | 21.scm | (load "../libs/init.scm")
(define value?
(lambda (v)
#t))
(define-datatype env env?
(empty-env-inter)
(apply-env-inter
(_var symbol?)
(_env env?))
(extend-env-inter
(_var symbol?)
(_val value?)
(_env env?))
(has-binding-inter
(_var symbol?)
(_env env?)))
(define empty-env
(lambda... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch2/21.scm | scheme | (load "../libs/init.scm")
(define value?
(lambda (v)
#t))
(define-datatype env env?
(empty-env-inter)
(apply-env-inter
(_var symbol?)
(_env env?))
(extend-env-inter
(_var symbol?)
(_val value?)
(_env env?))
(has-binding-inter
(_var symbol?)
(_env env?)))
(define empty-env
(lambda... | |
7192c7827c0199063982b17e1038652bde12037aa1ccb5d784e1a9f6bb706bca | kssytsrk/cellular-automata | rules.lisp | ;;;; -*-lisp-*-
;;;;
;;;; rules.lisp
(in-package #:ca)
(defmacro transition-rule-fn (rule-name)
"Returns the transition rule's function #'<rule-name>-TRANSITION-RULE."
`(function ,(find-symbol (concatenate 'string
(symbol-name rule-name)
... | null | https://raw.githubusercontent.com/kssytsrk/cellular-automata/173ada0a89b6095501d91829288927e8d46ccd9d/rules.lisp | lisp | -*-lisp-*-
rules.lisp |
(in-package #:ca)
(defmacro transition-rule-fn (rule-name)
"Returns the transition rule's function #'<rule-name>-TRANSITION-RULE."
`(function ,(find-symbol (concatenate 'string
(symbol-name rule-name)
"-TRANSITION-RULE")
... |
ddf174091c45abfeadf21d27b4918aed6965fa1b7b490072da28b465b3d67e29 | unclebob/AdventOfCode2022 | project.clj | (defproject day11-monkey-in-the-middle "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day11-monkey-in-the-middle.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.2"]]... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2022/269ba2cf08293beaf88011ae67b33c47710682c7/day11-monkey-in-the-middle/project.clj | clojure | (defproject day11-monkey-in-the-middle "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day11-monkey-in-the-middle.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.2"]]... | |
2559208b727cc4dbad4e92f633b1efb5c02b11daae616f0e63e83d6440edf972 | takikawa/racket-ppa | portal-syntax.rkt | #lang racket/base
(require "../syntax/syntax.rkt")
(provide (struct-out portal-syntax)
make-portal-syntax)
(struct portal-syntax (content))
(define (make-portal-syntax stx)
(unless (syntax? stx)
(raise-argument-error 'make-portal-syntax "syntax?" stx))
(portal-syntax stx))
| null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/src/expander/expand/portal-syntax.rkt | racket | #lang racket/base
(require "../syntax/syntax.rkt")
(provide (struct-out portal-syntax)
make-portal-syntax)
(struct portal-syntax (content))
(define (make-portal-syntax stx)
(unless (syntax? stx)
(raise-argument-error 'make-portal-syntax "syntax?" stx))
(portal-syntax stx))
| |
35ea87e61144c1042b41b8ed1feca996fa7b9e5039012c8b6222488599cc91fa | BinaryAnalysisPlatform/bap | bap_c_term_attributes.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
module Data = Bap_c_data
module Type = struct
include Bap_c_type
let pp = Bap_c_type_printer.pp
end
module Layout = struct
open Bap_c_data
type t = layout [@@deriving bin_io, compare, sexp]
let pp = pp_layout
end
module Proto = struct
type t = ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/5a71fb10683f0d865322a9df99951c3b11ba1a50/lib/bap_c/bap_c_term_attributes.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
module Data = Bap_c_data
module Type = struct
include Bap_c_type
let pp = Bap_c_type_printer.pp
end
module Layout = struct
open Bap_c_data
type t = layout [@@deriving bin_io, compare, sexp]
let pp = pp_layout
end
module Proto = struct
type t = ... | |
0f222001e84b27a1b62c1e9416c65cfb700930bd691927d4baaa4bc32235a7aa | Hans-Halverson/myte | exhaustive_returns.mli | val analyze_function : cx:Type_context.t -> Ast.Function.t -> unit
val analyze_anonymous_function : cx:Type_context.t -> Ast.Expression.AnonymousFunction.t -> unit
| null | https://raw.githubusercontent.com/Hans-Halverson/myte/d848b351197ab8e1d01e4557915096d9f459392d/src/analyze/exhaustive_returns.mli | ocaml | val analyze_function : cx:Type_context.t -> Ast.Function.t -> unit
val analyze_anonymous_function : cx:Type_context.t -> Ast.Expression.AnonymousFunction.t -> unit
| |
7ca5d76742910bb3cb036d01e6f933db880afc46a8275671da2cb51c531525f9 | zalando-incubator/chisel | access_logs.clj | (ns chisel.access-logs
"Provides access logs to all incomming requests"
(:require [chisel.logging :as log]
[chisel.correlation-ctx :as correlation-id]
[io.pedestal.interceptor.helpers :as interceptor]))
(def interceptor
(interceptor/around ::interceptor
(fn [context] (assoc context :... | null | https://raw.githubusercontent.com/zalando-incubator/chisel/8ddf7e32bd66980555ef809f0b78b1d5af051d4f/src/chisel/access_logs.clj | clojure | (ns chisel.access-logs
"Provides access logs to all incomming requests"
(:require [chisel.logging :as log]
[chisel.correlation-ctx :as correlation-id]
[io.pedestal.interceptor.helpers :as interceptor]))
(def interceptor
(interceptor/around ::interceptor
(fn [context] (assoc context :... | |
f8d76df7e82b9ed45e4f0462451bea44976836bb7724c8d8c6a01e2b11bb36cb | OCADml/OSCADml | quat_cube.ml | open OCADml
open OSCADml
let quat_cube =
(* NOTE: These cubes should be equivalent if quaternion is working correctly. *)
let box = Scad.cube ~center:true (v3 10. 10. 10.)
and angle = Float.pi /. 4.
and ax = v3 1. 1. 0. in
let a = Scad.axis_rotate ax angle box
and b = Scad.affine Quaternion.(to_affine (mak... | null | https://raw.githubusercontent.com/OCADml/OSCADml/d2f64a3f6454ff37a3c725b619c6a89252af789d/test/quat_cube.ml | ocaml | NOTE: These cubes should be equivalent if quaternion is working correctly. | open OCADml
open OSCADml
let quat_cube =
let box = Scad.cube ~center:true (v3 10. 10. 10.)
and angle = Float.pi /. 4.
and ax = v3 1. 1. 0. in
let a = Scad.axis_rotate ax angle box
and b = Scad.affine Quaternion.(to_affine (make ax angle)) box in
Scad.union3 [ a; b ]
let () = print_string (Scad.to_string q... |
f91602295f651208fae1f3b16b512a734c892651c0e54935710a52ca423f4663 | PLTools/GT | test795intoption.ml | (* There you can find manual implementation of the code to be derived from
type 'a option = None | Some of 'a
and
type intoption = int otpion
*)
open Printf
let (!!!) = Obj.magic
type 'a option = None | Some of 'a
(* gcata goes in the beginnigbecause it doesn't depend on anything *)
let rec option_meta... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test795intoption.ml | ocaml | There you can find manual implementation of the code to be derived from
type 'a option = None | Some of 'a
and
type intoption = int otpion
gcata goes in the beginnigbecause it doesn't depend on anything
TODO: introduce per-argument synthesized arguments
TODO: we probably should not make self_holder... |
open Printf
let (!!!) = Obj.magic
type 'a option = None | Some of 'a
let rec option_meta_gcata fa (tpo: 'tpoT) trans (initial_inh: 'inh) subj : 'syn =
let self = option_meta_gcata fa tpo trans in
match subj with
| None -> trans#c_None initial_inh (GT.make self subj tpo)
| Some p0 ->
trans#c_Some initi... |
d6215fbf4eba14395269e83cde27d66f7f59d6fd85f879aacb5a9cf2fc86fb1f | mck-/Open-VRP | output.lisp | ;;; Output functions
;;; --------------------------
(in-package :open-vrp.util)
(defgeneric print-routes (prob/algo &optional stream)
(:documentation "Prints solution given a <problem>/<algo> object. Also prints the total distance when the input is a <problem>/<algo> object."))
(defmethod print-routes ((prob proble... | null | https://raw.githubusercontent.com/mck-/Open-VRP/408cb67063474ab61ddfc1631b5ac39714f2535e/lib/output.lisp | lisp | Output functions
--------------------------
---------------------------
Object printing methods
---------------------------
-------------------------
Timestamp printing
-------------------------
-------------------------
Log header printing
-------------------------
-------------------------
with-log-file ... | (in-package :open-vrp.util)
(defgeneric print-routes (prob/algo &optional stream)
(:documentation "Prints solution given a <problem>/<algo> object. Also prints the total distance when the input is a <problem>/<algo> object."))
(defmethod print-routes ((prob problem) &optional (stream t))
(format stream "~&-------... |
81b047d6bc524d353da134342bf2e865bbd3f4acc46e14a2c2036cd87cc96476 | originrose/cortex | layers.clj | (ns cortex.nn.layers
"Descriptions are the canonical representation of layers in cortex. Implementations
are expected to work with descriptions that are annotated with special information
on them that pertails exactly to that implementation. They are expected to be tolerant
of extra keys/information on the descript... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/src/cortex/nn/layers.clj | clojure | Helpers
This type of initialization finds the next activation in the graph and then
decides what to do from there.
Input Layer
Activation Functions
Convolutional Layers
We have to force the dimension operation to be floor for convolutional operations
due to cudnn compatibility constraints
Convolutional layers hav... | (ns cortex.nn.layers
"Descriptions are the canonical representation of layers in cortex. Implementations
are expected to work with descriptions that are annotated with special information
on them that pertails exactly to that implementation. They are expected to be tolerant
of extra keys/information on the descript... |
c7082b2b733e5368b2ec611994fea78f58417e0f90676eac3cb68f2daccf8d85 | Frama-C/Qed | intmap.ml | (**************************************************************************)
(* *)
This file is part of Qed Library
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/Frama-C/Qed/69fa79d9ede7a76f320c935405267a97c660814e/src/intmap.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Qed Library
Copyright ( C ) 2007 - 2016
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ver... |
db6ee876d0db2b1d70fd6154b6e364c060f2fb07a3b625c60dd8f15ad3723a96 | IagoAbal/haskell-z3 | IntList.hs | # LANGUAGE ScopedTypeVariables #
module Example.Monad.IntList where
import Z3.Monad
import Control.Monad.IO.Class (liftIO)
run :: IO ()
run = evalZ3 datatypeScript
{- Create a recursive int list datatype
-}
mkIntListDatatype :: Z3 Sort
mkIntListDatatype = do
intS <- mkIntSort
-- nil constructor
nil <- mk... | null | https://raw.githubusercontent.com/IagoAbal/haskell-z3/247dac33c82b52f6ca568c1cdb3ec5153351394d/examples/Example/Monad/IntList.hs | haskell | Create a recursive int list datatype
nil constructor
cons constructors
Simple test of the recursive list datatype with mkEq
Build the list-equiv function
Both lists are nil
lists are nil or cons and equivalent
Define the body of the function
equiv
not equiv
equiv
not equiv
equiv
not equiv
not equiv
eq... | # LANGUAGE ScopedTypeVariables #
module Example.Monad.IntList where
import Z3.Monad
import Control.Monad.IO.Class (liftIO)
run :: IO ()
run = evalZ3 datatypeScript
mkIntListDatatype :: Z3 Sort
mkIntListDatatype = do
intS <- mkIntSort
nil <- mkStringSymbol "nil"
isNil <- mkStringSymbol "is_nil"
hd <- mk... |
b29653ec5946b705c6bc95e09ac2c93caed81bb27f024c85462c2e1f1a269ce1 | reanimate/reanimate | Images.hs | -- |
Module : Reanimate . Builtin . Images
Copyright : Written by
License :
-- Maintainer :
-- Stability : experimental
-- Portability : POSIX
--
-- Collection of built-in images.
module Reanimate.Builtin.Images
( svgLogo,
haskellLogo,
githubIcon,
githubWhiteIcon,
smallEarth... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/Builtin/Images.hs | haskell | |
Maintainer :
Stability : experimental
Portability : POSIX
Collection of built-in images.
| <<docs/gifs/doc_svgLogo.gif>>
| <<docs/gifs/doc_haskellLogo.gif>>
| <<docs/gifs/doc_githubIcon.gif>>
| <<docs/gifs/doc_githubWhiteIcon.gif>>
<<docs/gifs/doc_smallEarth.gif>> | Module : Reanimate . Builtin . Images
Copyright : Written by
License :
module Reanimate.Builtin.Images
( svgLogo,
haskellLogo,
githubIcon,
githubWhiteIcon,
smallEarth,
)
where
import Codec.Picture
import qualified Data.ByteString as B
import qualified Data.Text.... |
4bb071a07265d38231ffbd0da3e1a9b185b89e10ff806461185641f8c873467a | lazamar/nix-package-versions | LimitedConc.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeFamilies #
module Control.Monad.LimitedConc
( MonadLimitedConc
, LimitedConcT
, runTask
, asyncTas... | null | https://raw.githubusercontent.com/lazamar/nix-package-versions/3b2caa78b7e130619818e5afa8b549b23377ac30/src/Control/Monad/LimitedConc.hs | haskell | # MINIMAL runTask #
| Pass-through instance
# OVERLAPPABLE #
| Block until a thread becomes available for this task
| Take a thread
| Return the thread to the pool | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeFamilies #
module Control.Monad.LimitedConc
( MonadLimitedConc
, LimitedConcT
, runTask
, asyncTas... |
e1905a311c4e0be337858aea6c944d308f8570a64ee73a03e23b0ee17a033385 | OCamlPro/ez_api | wsCohttp.real.ml | (**************************************************************************)
(* *)
(* Copyright 2018-2023 OCamlPro *)
(* *)
(* All righ... | null | https://raw.githubusercontent.com/OCamlPro/ez_api/5253f7dd8936e923290aa969ee43ebd3dc6fce2d/src/server/websocket/cohttp/wsCohttp.real.ml | ocaml | ************************************************************************
Copyright 2018-2023 OCamlPro
All rights reserved. This ... | GNU Lesser General Public License version 2.1 , with the special
open WsCommon
let ws req ?onclose ?step ~react ~bg id =
let rsend = ref (fun _ -> ()) in
let ping_loop, pong_fill = ping_pong ?step id rsend in
Lwt.bind (Websocket_cohttp_lwt.upgrade_connection req
(ws_react ?onclose react ... |
7d78560fad4e0c98dfd274e17567af52dfc563eedded75b6e12e1abf6a572bb4 | marcoheisig/Petalisp | shape-syntax.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.api)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Printing
(defmethod print-object ((shape shape) stream)
(if *print-readably*
(call-next-method)
(format stream "~:... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/0e8716ddc5d1a29c04e83d189fc6fb33c1b76e7e/code/api/shape-syntax.lisp | lisp |
Printing
| © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.api)
(defmethod print-object ((shape shape) stream)
(if *print-readably*
(call-next-method)
(format stream "~:<~@{~:_~<~S~^ ~D~^ ~D~^ ~D~:>~^ ~}~:>"
(listify-shape-for-printing shape))))
(defu... |
d71975294906ba8edfa42ef85c487cdef73ac8df668b8698474db710acc3fd1e | kim/leveldb-haskell | Monadic.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ExistentialQuantification #
-- |
-- Module : Data.Stream.Monadic
Copyright : ( c ) 2014
-- License : BSD3
-- Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- (Mostly mechanical) adaptation of the
< -fusion/docs/Data... | null | https://raw.githubusercontent.com/kim/leveldb-haskell/71538084a74d0ad44f3b455902c2dd0f75959307/src/Data/Stream/Monadic.hs | haskell | # LANGUAGE BangPatterns #
|
Module : Data.Stream.Monadic
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
(Mostly mechanical) adaptation of the
module from the
<-fusion stream-fusion> package to a
<-stream-fusion proposed> by
package.
The intention ... | # LANGUAGE ExistentialQuantification #
Copyright : ( c ) 2014
< -fusion/docs/Data-Stream.html Data . Stream >
monadic ' Stream ' datatype similar to the one
for the < conduit >
" Database . LevelDB.Iterator"s with predictable space and time complexity ( see
" Database . LevelDB.Streaming " ) , and ... |
add536741e2e93b267960e039f8cdb9433ef67c12d9e73087998ad3091be0bb6 | TheLortex/ocaml-maelstrom | broadcast.ml | open Maelstrom
let can_send_to = ref []
module IntSet = Set.Make (Int)
let messages = ref IntSet.empty
let ack str = Ok (MessageBody.make ~type':str [])
let broadcast_handler ~sw ~clock ~ms msg =
let open Yojson.Safe.Util in
let message =
`Assoc (MessageBody.payload msg) |> member "message" |> to_int
in
... | null | https://raw.githubusercontent.com/TheLortex/ocaml-maelstrom/1975c354c334606fa90bb2ca05974e7852a78c4a/bin/broadcast.ml | ocaml | open Maelstrom
let can_send_to = ref []
module IntSet = Set.Make (Int)
let messages = ref IntSet.empty
let ack str = Ok (MessageBody.make ~type':str [])
let broadcast_handler ~sw ~clock ~ms msg =
let open Yojson.Safe.Util in
let message =
`Assoc (MessageBody.payload msg) |> member "message" |> to_int
in
... | |
31fe8cca5af1949a6acc5cff4f22ba0eee6e0e68c137884a2b1e70305087d280 | jeffa5/mirage-xmpp | config.ml | open Mirage
let port =
let doc =
Key.Arg.info ~doc:"The TCP port on which to listen for incoming connections." ["port"]
in
Key.(create "port" Arg.(opt int 5222 doc))
;;
let hostname =
let doc = Key.Arg.info ~doc:"The hostname for the server." ["hostname"] in
Key.(create "hostname" Arg.(opt string "local... | null | https://raw.githubusercontent.com/jeffa5/mirage-xmpp/df3dafecba9081880809d8649ed0727b9f6a9dc7/mirage/config.ml | ocaml | open Mirage
let port =
let doc =
Key.Arg.info ~doc:"The TCP port on which to listen for incoming connections." ["port"]
in
Key.(create "port" Arg.(opt int 5222 doc))
;;
let hostname =
let doc = Key.Arg.info ~doc:"The hostname for the server." ["hostname"] in
Key.(create "hostname" Arg.(opt string "local... | |
55fc11dbc701700a137c5476453bd9db67fccc079ef4daae257802129cebae85 | static-analysis-engineering/codehawk | bCHMetricsHandler.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT )... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/dd2c3b9f84b4b5f3c88898505ee912e1e461e809/CodeHawk/CHB/bchlib/bCHMetricsHandler.ml | ocaml | chutil
bchlib
------------------------------------------------------- export metrics ---
-------------------------------------------------- disassembly metrics ---
-------------------------------------------------------- memacc_metrics ---
---------------------------------------------------- precision metric... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT )... |
c9fb5835b9f87807d4df613d579457b2a2e69ae639571b5196a92c182805629a | janestreet/hardcaml | test_pow_log_bits.ml | (* Test [is_pow2], [floor_log2] and [ceil_log2]. *)
open! Import
let%expect_test "[is_pow2]" =
for bits = 1 to 4 do
print_s [%message (bits : int)];
for i = 0 to (1 lsl bits) - 1 do
print_s
[%message
"is_pow2"
~_:(i : int)
"="
~_:(Bits.is_pow2 (Bit... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/test/lib/test_pow_log_bits.ml | ocaml | Test [is_pow2], [floor_log2] and [ceil_log2]. |
open! Import
let%expect_test "[is_pow2]" =
for bits = 1 to 4 do
print_s [%message (bits : int)];
for i = 0 to (1 lsl bits) - 1 do
print_s
[%message
"is_pow2"
~_:(i : int)
"="
~_:(Bits.is_pow2 (Bits.of_int ~width:bits i) : Bits.t)]
done
done;
... |
4ca03b86da70e5305fe8f6766d24ea54d24b5ef5dd5c97863cddba3851a3dac5 | wdebeaum/step | parser-trains-basic.lisp | ;;;;
;;;; parser.lisp : Load the TRAINS/TRIPS parser
;;;;
, , 13 Dec 1995
Time - stamp : < Thu Jun 12 15:20:11 EDT 2003 ferguson >
;;;;
(unless (boundp 'user::*TRIPS_BASE*)
(load (make-pathname :directory '(:relative :up "config" "code")
:name "trips")))
(setq user::*default-scenario-directory*
(... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/Parser/parser-trains-basic.lisp | lisp |
parser.lisp : Load the TRAINS/TRIPS parser
| , , 13 Dec 1995
Time - stamp : < Thu Jun 12 15:20:11 EDT 2003 ferguson >
(unless (boundp 'user::*TRIPS_BASE*)
(load (make-pathname :directory '(:relative :up "config" "code")
:name "trips")))
(setq user::*default-scenario-directory*
(directory-namestring
(translate-logical-pathname "TRIPS:Scen... |
838e322ec1d32ea9bd402b449c8e5782cfbf475e066c9bf55934fdf797e9a8eb | erlio/vmq_diversity | vmq_diversity_script_sup.erl | Copyright 2016 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/erlio/vmq_diversity/cdfb41c684971c617da55da43cd518c926839027/src/vmq_diversity_script_sup.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 or implied.
See the License for the specific language governing perm... | Copyright 2016 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_script_sup).
-behaviour(supervisor).
-export([start_link/0,
start_script/1,
reload_... |
a6d2fb68e330a68c78d4036fcdd365eddee73c42f3b2741a17fd5b1e0f8abcca | craigl64/clim-ccl | scroll-pane.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : SILICA ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
" Copyright ( c ) 1991 , 1992 by Franz , Inc. All rights reserved .
Portions copyright(c ) 1991 , 1992 International Lisp Associates .
Portio... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/silica/scroll-pane.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : SILICA ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
seem to require this file so it is duplicated here with
modifications. At some point this file and the file in homegrown should
An implementation of a scroller pane
Ad... |
" Copyright ( c ) 1991 , 1992 by Franz , Inc. All rights reserved .
Portions copyright(c ) 1991 , 1992 International Lisp Associates .
Portions copyright ( c ) 1992 by Symbolics , Inc. All rights reserved . "
This file also exists in / homegrown . The homegrown directory
contains files to implement CLIM ... |
6a844ae9dd1e715c00686ca6e4642d7dcbef926b6179781acd4bcb5799e7fa46 | ocaml-community/zed | test_zed.ml | let () =
let s = "\247\165\165\165" in
let (ofs, _, message) = Zed_utf8.next_error s 0 in
Printf.printf "next_error (scalar value too large) = (%d, _, %S)\n" ofs message
| null | https://raw.githubusercontent.com/ocaml-community/zed/7e9cf851a0cecf5ca546a1e35dd74d144f119eb9/test/test_zed.ml | ocaml | let () =
let s = "\247\165\165\165" in
let (ofs, _, message) = Zed_utf8.next_error s 0 in
Printf.printf "next_error (scalar value too large) = (%d, _, %S)\n" ofs message
| |
12ddb71d8a5af06e110edf5af6b072d8311bdc443154fd7995753ff55137cdd9 | code-iai/ros_emacs_utils | swank-trace-dialog.lisp | (defpackage :swank-trace-dialog
(:use :cl)
(:import-from :swank :defslimefun :from-string :to-string)
(:export #:clear-trace-tree
#:dialog-toggle-trace
#:dialog-trace
#:dialog-traced-p
#:dialog-untrace
#:dialog-untrace-all
#:inspect-trace-part
... | null | https://raw.githubusercontent.com/code-iai/ros_emacs_utils/67aafa699ff0d8c6476ec577a8587bac3d498028/slime_wrapper/slime/contrib/swank-trace-dialog.lisp | lisp | `trace-entry' model
the current trace might have been wiped away if the
user cleared the tree in the meantime. no biggie,
don't do anything.
A special kind of trace call
Reporting to emacs
HACK: `swank::*inspector-history*' is unbound by default and needs
a reset in that case so that it won't error `swank:... | (defpackage :swank-trace-dialog
(:use :cl)
(:import-from :swank :defslimefun :from-string :to-string)
(:export #:clear-trace-tree
#:dialog-toggle-trace
#:dialog-trace
#:dialog-traced-p
#:dialog-untrace
#:dialog-untrace-all
#:inspect-trace-part
... |
f561863f83c4b069a7b0b2e58606b8e46e38980901f9c175c371067db279f25f | spechub/Hets | Version.hs | |
Module : $ Header$
Description : module for the hets version string
Copyright : ( c ) Uni - Bremen , DFKI 2012
License : similar to LGPL , see HetCATS / LICENSE.txt or LIZENZ.txt
Maintainer :
Stability : provisional
Portability : portable
generated version module ... | null | https://raw.githubusercontent.com/spechub/Hets/3d5524057a2fcbd80c99d5640774a3710a960e01/Driver/Version.hs | haskell | |
Module : $ Header$
Description : module for the hets version string
Copyright : ( c ) Uni - Bremen , DFKI 2012
License : similar to LGPL , see HetCATS / LICENSE.txt or LIZENZ.txt
Maintainer :
Stability : provisional
Portability : portable
generated version module ... | |
d8a4063156afc724ded9293d793dc2a8253f87b9788b799e5ceefa16720a30fc | mbutterick/brag | codepoints.rkt | #lang brag
start: A c def hello-world
A : "\"\101\\" ; A
c : '\'\U0063\\' ; c
def : "*\u64\\\"\\\x65f\"" ; de
hello-world : "\150\145\154\154\157\40\167\157\162\154\144"
| null | https://raw.githubusercontent.com/mbutterick/brag/81f4fd25e78ce9cbb0abf39b89d85e07637b4cb5/brag-lib/brag/examples/codepoints.rkt | racket | A
c
de | #lang brag
start: A c def hello-world
hello-world : "\150\145\154\154\157\40\167\157\162\154\144"
|
53df6cee3badf14cec12bda8820399882eacddff3b07a35467f37539e86fc0e1 | libguestfs/supermin | format_chroot.mli | supermin 5
* Copyright ( C ) 2009 - 2016 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/supermin/fd9f17c7eb63979af882533a0d234bfc8ca42de3/src/format_chroot.mli | ocaml | * Implements [--build -f chroot]. | supermin 5
* Copyright ( C ) 2009 - 2016 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
f7b64c95154ce6cb732338160972a7e30f680cb6a736cd21597d9b459eefb70f | juspay/atlas | Ride.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Domain/Types/Ride.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | |
4314976e08dfc400006f0a826138aefd75cbb2fe1eac9b0c67a31dc373153613 | petablox/arbitrar | features.ml | open Processing
open Checker
module type FEATURE = sig
type t
(* The name of the feature, will be the name of the feature JSON *)
val name : string
(* Take in a single trace, do some internal mutation *)
val init_with_trace : Function.t -> Trace.t -> unit
(* Take in a function definition (name + type), ... | null | https://raw.githubusercontent.com/petablox/arbitrar/f965f8e8cd0ebc00061a847c8f7ebb6ec9c61a45/src/old_analyzer/src/features.ml | ocaml | The name of the feature, will be the name of the feature JSON
Take in a single trace, do some internal mutation
Take in a function definition (name + type), return whether we
should include the feature
Extract a feature from the function definition and a trace
Turn the feature into a JSON
Argval Check F... | open Processing
open Checker
module type FEATURE = sig
type t
val name : string
val init_with_trace : Function.t -> Trace.t -> unit
val filter : Function.t -> bool
val extract : Function.t -> Trace.t -> t
val to_yojson : t -> Yojson.Safe.t
end
module ContextFeature = struct
type t = {no_context: bo... |
04c659602e4c897acfcd89a8d01b0e24f6ddefceb78d1bfc6cc33bb13149bac2 | bolt12/laop | Dist.hs | -----------------------------------------------------------------------------
-- |
Module : LAoP.Dist
Copyright : ( c ) 2019 - 2020
-- Maintainer :
-- Stability : experimental
--
-- __LAoP__ is a library for algebraic (inductive) construction and manipulation of matrices
in Haskell . See < -thesis my ... | null | https://raw.githubusercontent.com/bolt12/laop/54968c9e92e9243a731320758da7d59b98e903da/src/LAoP/Dist.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
__LAoP__ is a library for algebraic (inductive) construction and manipulation of matrices
motivation behind the library, the underlying theory, and implementation details.
This module exports a ... | Module : LAoP.Dist
Copyright : ( c ) 2019 - 2020
in Haskell . See < -thesis my > for the
module LAoP.Dist
is equal to 1 then this stochastic matrix
problems with it . Import ' Matrix . ' or ' Matrix . Type '
Dist (..),
Prob,
Countable,
CountableN,
CountableDimsN,
FLN... |
9c9eed9a48cd823a2da46774cbaa993e2d58179c33db14d67893c299f5e4d091 | locusmath/locus | ap.clj | (ns locus.set.logic.numeric.ap
(:require [locus.set.logic.core.set :refer :all]))
; Let (N,+) be the set of natural numbers equipped with addition. Then every natural number is
; associated to a set of additive partitions of it. These can be classified further based upon
; the properties of the additive partition, s... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/logic/numeric/ap.clj | clojure | Let (N,+) be the set of natural numbers equipped with addition. Then every natural number is
associated to a set of additive partitions of it. These can be classified further based upon
the properties of the additive partition, such as the number of parts and the maximum
and minimum values available in it. This fil... | (ns locus.set.logic.numeric.ap
(:require [locus.set.logic.core.set :refer :all]))
(defn restricted-partitions
"This lists the additive partitions of n into k parts."
[n k]
(cond
(= n k 0) '(())
(or (<= k 0) (< n k)) '()
(= k 1) (list (list n))
(= n (inc k)) (list (concat (repeat (dec k) 1) (list 2... |
b25783db4116605dc2f334518132a00f877a275551d8bbc97f2a423d671317b0 | softlab-ntua/bencherl | lazy_hashtable.erl | Copyright ( C ) 2011 - 2014
%
This file is part of the Ceylan Erlang library .
%
% This library is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License or
the GNU General Public License , as they are published by the Free Software
Foundation , eith... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/common/src/data-management/lazy_hashtable.erl | erlang |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License or
any later version.
You can also redistribute it and/or modify it under the terms of the
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; w... | Copyright ( C ) 2011 - 2014
This file is part of the Ceylan Erlang library .
the GNU General Public License , as they are published by the Free Software
Foundation , either version 3 of these Licenses , or ( at your option )
Mozilla Public License , version 1.1 or later .
GNU Lesser General Public License... |
779cd48edb4511f47a49693957724aaf0929428a7299d5e316bee5fcc19caf52 | sighingnow/mxnet-haskell | Internal.hs | -----------------------------------------------------------
-- |
-- module: MXNet.Core.Base.Internal
copyright : ( c ) 2016 - 2017 He
license : MIT
-- maintainer:
--
Interfaces in core module of MXNet .
--
# LANGUAGE ExistentialQuanti... | null | https://raw.githubusercontent.com/sighingnow/mxnet-haskell/b8e8c6834519df512533094122ee223fd9fb91d8/mxnet/src/MXNet/Core/Base/Internal.hs | haskell | ---------------------------------------------------------
|
module: MXNet.Core.Base.Internal
maintainer:
# LANGUAGE TypeSynonymInstances #
* Data type definitions
** Type alias
** Handlers and Creators
** Callback types
* Error handling.
* Global State setups
* Symboli... | copyright : ( c ) 2016 - 2017 He
license : MIT
Interfaces in core module of MXNet .
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedLists #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables ... |
001b2fef529142f497b0568a1f30c927baf5c1a4d8a65754afa761afcc0ef4cc | esl/MongooseIM | mod_time.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2015 ,
@doc XEP-0202 : Entity Time
%%% @end
%%%-------------------------------------------------------------------
-module(mod_time).
-author('').
-behaviour(gen_mod).
-behaviour(mongoose_module_metrics).
-export([sta... | null | https://raw.githubusercontent.com/esl/MongooseIM/a465408fcc98a171cbfbcad242dedbdb5abb022d/src/mod_time.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
Internals | @author < >
( C ) 2015 ,
@doc XEP-0202 : Entity Time
-module(mod_time).
-author('').
-behaviour(gen_mod).
-behaviour(mongoose_module_metrics).
-export([start/2]).
-export([stop/1]).
-export([supported_features/0]).
-export([config_spec/0]).
-export([process_local_iq/5]).
-ignore_xref([process_local_iq/5]... |
a516d4744e25bb4392103a29e5733d0d9c5defc28e17e101ab25ca76b431f58f | dchelimsky/sicp-exercises | factorial.scm | #lang scheme
(define (factorial n)
(if (= n 1)
1
(* n (factorial (- n 1)))))
(factorial 4)
| null | https://raw.githubusercontent.com/dchelimsky/sicp-exercises/55c804e3775b87a490e05f8337fc59bc7ce07f28/chapter-1/factorial.scm | scheme | #lang scheme
(define (factorial n)
(if (= n 1)
1
(* n (factorial (- n 1)))))
(factorial 4)
| |
3b247a16d5023b6c62c54e189c21113c95f411993124bc4bb7c18d5cd255b4f1 | bennn/dissertation | render.rkt | #lang typed/racket/base
(provide pdf-renderer%)
;; -----------------------------------------------------------------------------
(require
require-typed-check
"../base/quad-types.rkt"
(only-in racket/list filter-not)
(only-in typed/racket/draw Font-Weight Font-Style Font% make-font current-ps-setup pdf-dc% the-co... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadU/typed/render.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
=============================================================================
hash implementation
use in lieu of 'abstract' definition
use in lieu of 'abstrac... | #lang typed/racket/base
(provide pdf-renderer%)
(require
require-typed-check
"../base/quad-types.rkt"
(only-in racket/list filter-not)
(only-in typed/racket/draw Font-Weight Font-Style Font% make-font current-ps-setup pdf-dc% the-color-database)
(only-in typed/racket/class inherit define/override send* class ne... |
511ec1151d943007e79ccc5dc55e4bddccd78c7cd5ccb2ba51f161e182990b98 | marick/structural-typing | f_global_type.clj | (ns structural-typing.use.f-global-type
"Some basic tests of global-types code"
(:use [structural-typing type global-type])
(:use midje.sweet
structural-typing.assist.testutil))
(start-over!)
(on-error! (partial cons :error))
(on-success! (constantly "yay"))
(type! :A (requires :a))
(type! :B (requi... | null | https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/use/f_global_type.clj | clojure | (ns structural-typing.use.f-global-type
"Some basic tests of global-types code"
(:use [structural-typing type global-type])
(:use midje.sweet
structural-typing.assist.testutil))
(start-over!)
(on-error! (partial cons :error))
(on-success! (constantly "yay"))
(type! :A (requires :a))
(type! :B (requi... | |
8e12ef25eaf61004968ad33b435480dbbfaae97ffb42c4433038a139ad583130 | frankiesardo/sicp-in-clojure | chapter-1.clj | (ns sicp.ch1)
Exercise 1.3 .
Define a procedure that takes three numbers as arguments and returns the sum of the of the two larger numbers
(defn square [x] (* x x))
(defn sum-squares [x y]
(+ (square x) (square y)))
(defn sum-largest-squares [x y z]
(cond
(and (< x y) (< x z)) (sum-squares y z)
(and (... | null | https://raw.githubusercontent.com/frankiesardo/sicp-in-clojure/dc341617c2ab8eb34ac316175a56141a0c605421/src/sicp/chapter-1.clj | clojure | --
Exercise 1.12
compute p'
compute q'
Exercise 1.21.
Exercise 1.22.
Most Lisp implementations include a primitive called runtime that returns an integer that specifies the amount of time the system has been running (measured, for example, in microseconds).
The following timed-prime-test procedure, when called ... | (ns sicp.ch1)
Exercise 1.3 .
Define a procedure that takes three numbers as arguments and returns the sum of the of the two larger numbers
(defn square [x] (* x x))
(defn sum-squares [x y]
(+ (square x) (square y)))
(defn sum-largest-squares [x y z]
(cond
(and (< x y) (< x z)) (sum-squares y z)
(and (... |
13a3db536963d01aae8d23656cd1f60b9df6ac7395f1626a2283f4beef54b8df | richmit/mjrcalc | exp-ODElorenzEuler.lisp | ;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;; @file exp-ODElorenzEuler.lisp
@author < >
@brief ... | null | https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/exp-ODElorenzEuler.lisp | lisp | -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
@file exp-ODElorenzEuler.lisp
@std Common Lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
and/or other materials... | @author < >
@brief Compute and draw the strange attracter without : MJR_ODE .. @EOL
@parblock
Copyright ( c ) 2011,2015 , < > All rights reserved .
1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer .
2 .... |
dd3b42137886abb5ddfbcd5689da4b34ac3cb9eef3d5c28d2ceb1486405c2775 | keithj/cl-genomic | obo.lisp | ;;;
Copyright ( c ) 2008 - 2011 . All rights reserved .
;;;
;;; This file is part of cl-genomic.
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;... | null | https://raw.githubusercontent.com/keithj/cl-genomic/d160199c2b369df97afd3fded16b1ade507b80dd/src/io/obo.lisp | lisp |
This file is part of cl-genomic.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR P... | Copyright ( c ) 2008 - 2011 . All rights reserved .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :bio-sequence)
(defvar *default-base-conc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.