_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 |
|---|---|---|---|---|---|---|---|---|
e98ba9bc8ad55a739037c52b8385ecbbecfcacd7a5bc7ea5e4ccaba7dc36de34 | fukamachi/lack | builder.lisp | (in-package :cl-user)
(defpackage lack.builder
(:use :cl)
(:import-from :lack.component
:to-app)
(:import-from :lack.util
:find-middleware)
(:export :builder))
(in-package :lack.builder)
(defun clack-middleware-symbol-p (symbol)
(and (symbolp symbol)
(find-package :clac... | null | https://raw.githubusercontent.com/fukamachi/lack/1f155216aeea36291b325c519f041e469262a399/src/builder.lisp | lisp | for old Clack middlewares
for old Clack middlewares
Normal form
reconvert the result of the form | (in-package :cl-user)
(defpackage lack.builder
(:use :cl)
(:import-from :lack.component
:to-app)
(:import-from :lack.util
:find-middleware)
(:export :builder))
(in-package :lack.builder)
(defun clack-middleware-symbol-p (symbol)
(and (symbolp symbol)
(find-package :clac... |
e196956ba926567454045d70c06ab9f71fd7461a7518eb16b98e5f12470300c7 | reasonml/reason | eol_convert.ml | open Eol_detect
let lf_to_crlf s =
let rec loop sz =
match String.index sz '\n' with
| exception Not_found -> sz
| idx ->
let l = (String.sub sz 0 idx) ^ "\r\n" in
let length = String.length sz in
l ^ (loop (String.sub sz (idx + 1) ((length - idx) - 1))) in
loop s
let get_forma... | null | https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/src/refmt/eol_convert.ml | ocaml | open Eol_detect
let lf_to_crlf s =
let rec loop sz =
match String.index sz '\n' with
| exception Not_found -> sz
| idx ->
let l = (String.sub sz 0 idx) ^ "\r\n" in
let length = String.length sz in
l ^ (loop (String.sub sz (idx + 1) ((length - idx) - 1))) in
loop s
let get_forma... | |
e3de3796cf333da2d9f9acf84940161762b0cffa7084683ebfda7ac0a8f9a132 | craigl64/clim-ccl | activities.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-internals)
" Copyright ( c ) 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1992 Franz , Inc... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/activities.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
Activities
An activity acts like both an application frame and a frame manager
--- Implement other relevant frame and frame-manager methods
--- What about meth... |
(in-package :clim-internals)
" Copyright ( c ) 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1992 Franz , Inc. All rights reserved . "
(defclass activity (application-frame)
((frames :initform nil :accessor frame-manager-frames)
(pretty-name :accessor frame-pretty-name)
(... |
20e3da71345c5740532ea8a74ae134e089758781c473c349961379c04aed7aab | graninas/Functional-Design-and-Architecture | ConsoleLogger1.hs | module Framework.Logging.Logger.Impl.ConsoleLogger1 where
import qualified Data.Text.IO as T
import qualified Data.Text as T
import Control.Monad.Free.Church
import Control.Monad
import Framework.Logging.Types
import Framework.Logging.Logger.Language
interpretLoggerMethod
:: LoggerF a
-> IO a
interpretLoggerMet... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/17c555a35dd884415a4aeedf1e1ba1416dc35cb1/Second-Edition-Manning-Publications/BookSamples/CH10/Section10p1/src/Framework/Logging/Logger/Impl/ConsoleLogger1.hs | haskell | module Framework.Logging.Logger.Impl.ConsoleLogger1 where
import qualified Data.Text.IO as T
import qualified Data.Text as T
import Control.Monad.Free.Church
import Control.Monad
import Framework.Logging.Types
import Framework.Logging.Logger.Language
interpretLoggerMethod
:: LoggerF a
-> IO a
interpretLoggerMet... | |
2f2b24fac983277bcd305472c19f48fb96359362e76b736a5e9f58ebab538fc5 | bhauman/figwheel-main | core.cljs | (ns exproj.core
(:require
[goog.events]
[goog.object :as gobj]
[clojure.string :as string]
#_[exproj.other]
#_[react]
[cljs.test :refer [deftest is]]))
#_(js/console.log react/Component)
#_(defn)
#_(prn "ouchy")
(defn hello []
"hello exproj")
(defn ^:after-load after-hook []
(js/console.lo... | null | https://raw.githubusercontent.com/bhauman/figwheel-main/ead06b94b1b2747ed37e5d8c37118d6e7ae77193/devel/exproj/core.cljs | clojure | stable reference
idempotent with stable reference
idempotent with stable reference
idempotent with stable reference | (ns exproj.core
(:require
[goog.events]
[goog.object :as gobj]
[clojure.string :as string]
#_[exproj.other]
#_[react]
[cljs.test :refer [deftest is]]))
#_(js/console.log react/Component)
#_(defn)
#_(prn "ouchy")
(defn hello []
"hello exproj")
(defn ^:after-load after-hook []
(js/console.lo... |
da0740f63c565840c3b968219428cbe7ea9cae7d1af062f080955d546a202f12 | nubank/selvage | flow_test.clj | (ns selvage.midje.flow-test
(:require [matcher-combinators.midje :refer [match]]
[matcher-combinators.matchers :as m]
[selvage.core :as core]
[selvage.midje.flow :as f :refer [*flow* *world* flow tabular-flow]]
[midje.emission.api :as emission.api]
[midje.em... | null | https://raw.githubusercontent.com/nubank/selvage/3b2da9c95e82c7f2cbacb6cae3ed3af131d8a5e4/test/selvage/midje/flow_test.clj | clojure | All checks are doubled, because we need to wrap the flow in a fact. | (ns selvage.midje.flow-test
(:require [matcher-combinators.midje :refer [match]]
[matcher-combinators.matchers :as m]
[selvage.core :as core]
[selvage.midje.flow :as f :refer [*flow* *world* flow tabular-flow]]
[midje.emission.api :as emission.api]
[midje.em... |
8ca30ba5e9262cb6682168c205095dee32f7c11543dfe8ca617f886bc802ec64 | tonyrog/bt | bt_send_wav.erl | @author < >
( C ) 2021 ,
%%% @doc
Send wav file to bluetooth headset
%%% @end
Created : 20 Dec 2021 by < >
-module(bt_send_wav).
-export([file/2]).
-export([test_jbl/0, test_jabra/0]).
-define(PAYLOAD_TYPE , 96 ) . % % SBC payload ? what number 96 ? ? ? ?
%% -define(SOURCE_NUM, 1).
-include(".... | null | https://raw.githubusercontent.com/tonyrog/bt/d7cbea62c114c74de38ce19137abd18f49d736fa/src/bt_send_wav.erl | erlang | @doc
@end
% SBC payload ? what number 96 ? ? ? ?
-define(SOURCE_NUM, 1).
Get protocol info
assert!
{ok,Enc} = alsa_sbc:new(msbc),
?? | @author < >
( C ) 2021 ,
Send wav file to bluetooth headset
Created : 20 Dec 2021 by < >
-module(bt_send_wav).
-export([file/2]).
-export([test_jbl/0, test_jabra/0]).
-include("../include/avdtp.hrl").
test_jbl() ->
Sounds = filename:join(code:lib_dir(alsa), "sounds"),
File = filename:... |
d689936b9ded3b56dec1413056393b0a4673d38412410a869e74d2ad5e46999f | aws-beam/aws-erlang | aws_codecommit.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc AWS CodeCommit
%%
%% This is the AWS CodeCommit API Reference.
%%
%% This reference provides descriptions of the operations and data types for
%% AWS CodeCommit API along with usage examples.
%%
%% You can use the AWS Code... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_codecommit.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc AWS CodeCommit
This is the AWS CodeCommit API Reference.
This reference provides descriptions of the operations and data types for
AWS CodeCommit API along with usage examples.
You can use the AWS CodeCommit API to work with the following objects:
Repositories,... | See -beam/aws-codegen for more details .
< ul > < li > ` BatchGetRepositories ' , which returns information about one
< /li > < li > ` CreateRepository ' , which creates an AWS CodeCommit
< /li > < li > ` DeleteRepository ' , which deletes an AWS CodeCommit
< /li > < li > ` GetRepository ' , which returns in... |
b456736272eb1a8e7a417d55d8824854b5a6fc1d5dd5eb29e3eedd43499e5cda | mzp/coq-ruby | envars.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/lib/envars.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val coqlib : unit -> string... |
9a3232b5633c1d4b199de4eaea996254310c0e95033956e065a53c9632c78eab | kosmikus/multirec | HFunctor.hs | # LANGUAGE GADTs #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
-----------------------------------------------------------------------------
-- |
-- Module : Generics.MultiRec.HFunctor
Copy... | null | https://raw.githubusercontent.com/kosmikus/multirec/10ea901f0e1067bbe3632b1fab34103c83eeff0f/src/Generics/MultiRec/HFunctor.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
---------------------------------------------------------------------------
|
Module : Generics.MultiRec.HFunctor
License : BSD3
Stability : experimental
Portability : non-portable
The definition of functorial map.
-----------... | # LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
Copyright : ( c ) 2008 - -2010 Universiteit Utrecht
Maintainer :
module Generics.MultiRec.HFunctor where
import Control.Applicative (Applicative(..), (<$>), (<*>), WrappedMonad(..))
import Data.Tra... |
e945fcfcfb8ec5b797cf311b76a59b9ce96b1c7b9fd7dffe9d61feb32c2bd8da | lispbuilder/lispbuilder | objects.lisp | ;;;;; Converted from the "Objects" Processing example at:
;;;;; ""
;;;;; (C)2006 Luke J Crook
(in-package #:sdl-gfx-examples)
(defvar *width* 200)
(defvar *height* 200)
(defclass m-rect ()
((w :accessor w :initform 0 :initarg :w)
(xpos :accessor xpos :initform 0 :initarg :xpos)
(h :accessor h :initform 0 :in... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl-gfx/examples/objects.lisp | lisp | Converted from the "Objects" Processing example at:
""
(C)2006 Luke J Crook |
(in-package #:sdl-gfx-examples)
(defvar *width* 200)
(defvar *height* 200)
(defclass m-rect ()
((w :accessor w :initform 0 :initarg :w)
(xpos :accessor xpos :initform 0 :initarg :xpos)
(h :accessor h :initform 0 :initarg :h)
(ypos :accessor ypos :initform 0 :initarg :ypos)
(d :accessor d :initform 0 :i... |
7a536963eef12a66bca4136331a7a6e894de6bde206139345f963125bf400a0c | bhauman/advent-of-clojure | day24.clj | (ns advent-2017.day24
(:require
[clojure.java.io :as io]
[clojure.string :as string]))
(def data
(->> (io/resource "2017/day24")
slurp))
(defn make-index [raw-data]
(->> (string/split-lines raw-data)
(map #(string/replace % "/" " "))
(map #(format "[%s]" %))
(mapv read-string)
... | null | https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2017/day24.clj | clojure | an indexed version of the data for constant time look ups
ignores partial briges as they don't matter for solution
A tree-seq based solution
it collects the needed totals as it travels | (ns advent-2017.day24
(:require
[clojure.java.io :as io]
[clojure.string :as string]))
(def data
(->> (io/resource "2017/day24")
slurp))
(defn make-index [raw-data]
(->> (string/split-lines raw-data)
(map #(string/replace % "/" " "))
(map #(format "[%s]" %))
(mapv read-string)
... |
45233827ba53576ca87e287fe3908472c77f8e9b2e6aaad9b61e615a67ea5faf | tuura/plato | Celement_with_env_3.hs | module Concept where
import Tuura.Concept.STG
-- C-element with environment circuit described using protocol-level concepts
component a b c = handshake00 a c <> handshake00 b c
<> inputs [a, b] <> outputs [c]
| null | https://raw.githubusercontent.com/tuura/plato/4b528f73ad677cf634dde7644a0ec5c759114baf/examples/Celement_with_env_3.hs | haskell | C-element with environment circuit described using protocol-level concepts | module Concept where
import Tuura.Concept.STG
component a b c = handshake00 a c <> handshake00 b c
<> inputs [a, b] <> outputs [c]
|
ef18d27056beacd9eda3267e4faaf14fd09ab7d5d0bef66ba48daa10b8b701f6 | fredrikt/yxa | sipsocket_test.erl | %%%-------------------------------------------------------------------
%%% File : sipsocket_test.erl
@author < >
%%% @doc Sipsocket test module, fakes network communication to
%%% make it possible to test other modules.
%%%
@since 18 Jul 2005 by < >
%%% @end
%%%-----------------------... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/transportlayer/sipsocket_test.erl | erlang | -------------------------------------------------------------------
File : sipsocket_test.erl
@doc Sipsocket test module, fakes network communication to
make it possible to test other modules.
@end
-------------------------------------------------------------------
-compile(export_all).
---------... | @author < >
@since 18 Jul 2005 by < >
-module(sipsocket_test).
-behaviour(sipsocket).
-export([
start_link/0,
send/5,
is_reliable_transport/1,
get_socket/1,
get_specific_socket/1,
get_raw_socket/1,
get_remote_peer/1,
close_socket/1
]).
-include("sipsocket.hrl").
start_link() ->
... |
4cb82f2ac4371a77c4192106b3fd9b69d39ff9d98aae71f3da97f70de8357a18 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] xpq
[ @Native name@ ] -
[ @English name@ ] Mohegan - Pequot
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] xpq
[@Native name@] -
[@English name@] Mohegan-Pequot
-}
module Text.Numeral.La... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/XPQ/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] xpq
[ @Native name@ ] -
[ @English name@ ] Mohegan - Pequot
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] xpq
[@Native name@] -
[@English name@] Mohegan-Pequot
-}
module Text.Numeral.La... |
024ab3cf2c5b6f227d17bd4ef4a10dce44d381bb1ee7e3bf39106a83ed7d976d | emqx/emqx | emqx_gateway_api_authn.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/emqx_gateway_api_authn.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_gateway_api_authn).
-behaviour(minirest_api).
-include("emqx_gateway_http.hrl").
... |
dec23ab52d9185eaa92081b6c4a5ea96d903c7fe73a5bbc4b9cb9fe34e113583 | helium/blockchain-node | bn_wallets.erl | -module(bn_wallets).
-include("bn_jsonrpc.hrl").
-behavior(bn_jsonrpc_handler).
-behavior(gen_server).
%% gen_server
-export([start_link/1, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]).
%% jsonrpc_handler
-export([handle_rpc/2]).
-define(DB_FILE, "wallets.db").
-define(SERVER, ?MODULE).
-defin... | null | https://raw.githubusercontent.com/helium/blockchain-node/de938c8cede2eb3013b7c7459feae0574a5ca3eb/src/bn_wallets.erl | erlang | gen_server
jsonrpc_handler
gen_server
jsonrpc_handler
Gets a nonce from a given jsonrpc parameter list. If not present it gets the
nonce. | -module(bn_wallets).
-include("bn_jsonrpc.hrl").
-behavior(bn_jsonrpc_handler).
-behavior(gen_server).
-export([start_link/1, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]).
-export([handle_rpc/2]).
-define(DB_FILE, "wallets.db").
-define(SERVER, ?MODULE).
-define(KEY_TIMEOUT, 60000).
-define(UN... |
091ca3cea55ce0eb33b9644aadc68af83e526d957dc16bb892c78c8f33f6bdb4 | nuprl/gradual-typing-performance | scope2.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname scope2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeat... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/htdp/base/Images/scope2.rkt | racket | about the language level of this file in a form that our tools can easily process.
| The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname scope2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define (h x)
(f (* 2 x)))
(define (f x)
(+... |
b7177c56e494d1b010deb87d9afce4859cc5bd9f6266061539ac0c07341efe19 | racket/libs | pack-all.rkt | #lang racket/base
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
(require racket/cmdline
racket/file
racket/port
racket/string
racket/list
racket/path
file/zip
openssl/sha1
net/url
pkg/strip
pkg/lib
setup/getinfo)... | null | https://raw.githubusercontent.com/racket/libs/ebcea119197dc0cb86be1ccbbfbe5806f7280976/pack-all.rkt | racket | Increment this number if something about the way packages are
generated changes, so that previously generated packages are
reliably replaced:
Generate ".zip" files for all native packages at `src-dir`,
generating the output to `dest-dir`. The output includes a
"catalog" dir with information about the generated pa... | #lang racket/base
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
(require racket/cmdline
racket/file
racket/port
racket/string
racket/list
racket/path
file/zip
openssl/sha1
net/url
pkg/strip
pkg/lib
setup/getinfo)... |
f59523c16b9fd97ea9747db388529cb8e78e6110c2b41d514b341ffd8c83c1e1 | egraphdb/egraphdb | egraph_reindexing_server.erl | %%%-------------------------------------------------------------------
@author neerajsharma
( C ) 2018 ,
%%% @doc
%%%
%%% @end
%%%
%%% %CopyrightBegin%
%%%
Copyright < > 2017 .
All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file ... | null | https://raw.githubusercontent.com/egraphdb/egraphdb/41a0131be227f7f0a35ba0e2c1cb23d70cd86b03/src/egraph_reindexing_server.erl | erlang | -------------------------------------------------------------------
@doc
@end
%CopyrightBegin%
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 CONDIT... | @author neerajsharma
( C ) 2018 ,
Copyright < > 2017 .
All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(egraph_reindexing_server).
-behaviour(gen_server).
-include("egraph_constant... |
3dfa411a199466bfc3dd51a3705192999a2917c92d4891c24870cf1f9e2291a4 | Kappa-Dev/KappaTools | result_util.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/777835b82f449d3d379713df76ff25fd5926b762/core/dataStructures/result_util.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
type status =
[ `OK | `Accepted | `Created |
`Bad_request | `Conflict | `Not_found | `Request_timeout ]
type message = {
severity : Logs.level;
range : Locality.t option;
}
type ('a,'b) t = {
value : ('a,'b) Result.result;... |
6d14748ee3cb31a5df4f1e6282d4d051ce293344fc6019e62029c6ee2075c35c | riemann/riemann | slack_test.clj | (ns riemann.slack-test
(:require [riemann.logging :as logging]
[riemann.slack :as slack]
[cheshire.core :as json]
[clj-http.client :as client]
[clojure.test :refer :all]))
(def api-key (System/getenv "SLACK_API_KEY"))
(def room (System/getenv "SLACK_ALERT_ROOM"))
(def... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/slack_test.clj | clojure | (ns riemann.slack-test
(:require [riemann.logging :as logging]
[riemann.slack :as slack]
[cheshire.core :as json]
[clj-http.client :as client]
[clojure.test :refer :all]))
(def api-key (System/getenv "SLACK_API_KEY"))
(def room (System/getenv "SLACK_ALERT_ROOM"))
(def... | |
7b357064a0d555f8e3c29dd272aae301504a55575b392421a90ea667cddd3313 | deadpendency/deadpendency | PublishComponentResult.hs | # LANGUAGE TemplateHaskell #
module Common.Effect.PublishComponentResult.PublishComponentResult
( PublishComponentResult (..),
publishComponentResult,
)
where
import Common.Effect.PublishComponentResult.Model.ComponentResult
import Control.Effect.TH
data PublishComponentResult (p :: Type) (m :: Type -> Type)... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/PublishComponentResult/PublishComponentResult.hs | haskell | # LANGUAGE TemplateHaskell #
module Common.Effect.PublishComponentResult.PublishComponentResult
( PublishComponentResult (..),
publishComponentResult,
)
where
import Common.Effect.PublishComponentResult.Model.ComponentResult
import Control.Effect.TH
data PublishComponentResult (p :: Type) (m :: Type -> Type)... | |
7a5bd8693b26722a7d78bff21b3020c53d413e036aa6e1f80f8b4d881c2aec4d | gsakkas/rite | 0107.ml | CaseG VarG [(VarPatG,Nothing,IteG EmptyG EmptyG EmptyG)]
match helper with
| f -> if f = b
then (f , false)
else (f , true)
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/clusters/0107.ml | ocaml | CaseG VarG [(VarPatG,Nothing,IteG EmptyG EmptyG EmptyG)]
match helper with
| f -> if f = b
then (f , false)
else (f , true)
| |
f05acddb551c0696175f58bd4ebaf4e5cf52b5b2297c20c03d5fb8a840cc9a64 | mauny/the-functional-approach-to-programming | arith.ml | (* +type_big_int+ *)
type sign = Neg | Pos;;
type big_int = {big_sign:sign; big_val:nat};;
(* +type_big_int+ *)
(* +big_int_utilities+ *)
let prod_sign = fun
(Neg,Neg) -> Pos
| (Neg,Pos) -> Neg
| (Pos,Neg) -> Neg
| (Pos,Pos) -> Pos;;
let big_int_of_int n =
{big_sign= if n >= 0 then Pos else Neg;
big_val= na... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Arith/arith.ml | ocaml | +type_big_int+
+type_big_int+
+big_int_utilities+
+big_int_utilities+
+big_int_parser+
+big_int_parser+
+big_int_printer+
+big_int_printer+
+type_rat+
+type_rat+
+rat_utilities+
+rat_utilities+
+pgcd+
+pgcd+
+reduce+
+reduce+
+rat_parser+
+rat_parser+
+rat_printer+
+rat_printer+
... |
type sign = Neg | Pos;;
type big_int = {big_sign:sign; big_val:nat};;
let prod_sign = fun
(Neg,Neg) -> Pos
| (Neg,Pos) -> Neg
| (Pos,Neg) -> Neg
| (Pos,Pos) -> Pos;;
let big_int_of_int n =
{big_sign= if n >= 0 then Pos else Neg;
big_val= nat_of_int (abs n)};;
let big_int_of_nat n = {big_sign=Pos; big_val=n... |
40f5e1cf966ec80f277f1edea11dbd0668c946e0fbf147b244ae4c4d1dbb26da | smanek/trivial-lisp-webapp | util.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
$ Header : /usr / local / cvsrep / hunchentoot / util.lisp , v 1.35 2008/04/08 14:39:18 edi Exp $
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;... | null | https://raw.githubusercontent.com/smanek/trivial-lisp-webapp/36816c17ea378822e02a123c1be960fd9ce3e29d/aux/hunchentoot/util.lisp | lisp | Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... | $ Header : /usr / local / cvsrep / hunchentoot / util.lisp , v 1.35 2008/04/08 14:39:18 edi Exp $
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :... |
1c1bd2a1b7bf20b3c318289468ac9badb910f60c7de77543a2e4e40c990520b7 | stevenvar/OMicroB | solilet.ml | (*************************************************************************)
(* *)
(* OMicrob *)
(* *)
(* ... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/tests/tuto_6_solilet/solilet.ml | ocaml | ***********************************************************************
OMicrob
... | This file is distributed under the terms of the CeCILL license .
open Avr
let ignore x = () ;;
type peg = Out | Empty | Peg ;;
exception Found;;
let board = [|
[| Out; Out; Out; Out; Out; Out; Out; Out; Out|];
[| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out|];
[| Out; Out; Out; Peg; Peg; Peg; Out; Out;... |
2f4a91dc13f015499113901a569b7c58a699f3dc1f81c4b4a78cd71e12949f9a | shortishly/pgec | pgec_h.erl | Copyright ( c ) 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
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under... | null | https://raw.githubusercontent.com/shortishly/pgec/9b665f68379eef5b06304b739542fc19338a6c56/src/pgec_h.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 permissi... | Copyright ( c ) 2022 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(pgec_h).
-define(JSON, <<"application/json">>).
-export([init/2]).
-include_lib("kernel/include/logger.hrl").
-include_lib("stdlib/incl... |
637f42841aaf6eecfbfae1d7fb90167a33b68118c2d0c05310807102601b1496 | LeventErkok/hArduino | LCD.hs | -------------------------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Arduino.Parts.LCD
Copyright : ( c )
-- License : BSD3
-- Maintainer :
-- Stability : experimental
--
LCD ( Liquid Crystal Display ) parts supported by hArduino .... | null | https://raw.githubusercontent.com/LeventErkok/hArduino/b568087b51b75babb1dc90d3f7a6e7b3c8d134b9/System/Hardware/Arduino/Parts/LCD.hs | haskell | -----------------------------------------------------------------------------------------------
|
Module : System.Hardware.Arduino.Parts.LCD
License : BSD3
Maintainer :
Stability : experimental
source code: </>
-----------------------------------------------------------------------------------... | Copyright : ( c )
LCD ( Liquid Crystal Display ) parts supported by hArduino . The code
below has partly been implemented following the Arduino LiquidCrystal project
The Hitachi44780 data sheet is at : < -linux.sourceforge.net/pdfdocs/hd44780.pdf >
For an example program using this library , see " Sys... |
4f8d5f2874e754e1a963f34f4ab0b58728988a48ffdb9c0cc0e73120516f4227 | yoshihiro503/ocamltter | conf.ml | let oauth_signature_method = `Hmac_sha1
let oauth_callback = Some None (* oob *)
let host = "www.flickr.com"
let request_path = "/services/oauth/request_token"
let access_path = "/services/oauth/access_token"
let authorize_url = "="
let app = App.app
| null | https://raw.githubusercontent.com/yoshihiro503/ocamltter/be7ac68c8076bc2ca8ccec216d6647c94ec9f814/flickr/conf.ml | ocaml | oob | let oauth_signature_method = `Hmac_sha1
let host = "www.flickr.com"
let request_path = "/services/oauth/request_token"
let access_path = "/services/oauth/access_token"
let authorize_url = "="
let app = App.app
|
361d28a23bc95753a5407b25cfbefe83fa7888e8b0d7075094877294db14b89f | chetmurthy/pa_ppx | surveil.ml | (* camlp5r *)
(* surveil.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "q_MLast.cmo";
#load "pa_extfun.cmo";
open Asttools;
open MLast;
open Pa_ppx_utils ;
open Pa_ppx_base ;
open Pa_passthru ;
open Ppxutil ;
open Pa_deriving ;
value debug = Pa_passthru.debug ;
* Attributes and extensions in deriving come in th... | null | https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/pa_deriving/surveil.ml | ocaml | camlp5r
surveil.ml,v | Copyright ( c ) INRIA 2007 - 2017
#load "q_MLast.cmo";
#load "pa_extfun.cmo";
open Asttools;
open MLast;
open Pa_ppx_utils ;
open Pa_ppx_base ;
open Pa_passthru ;
open Ppxutil ;
open Pa_deriving ;
value debug = Pa_passthru.debug ;
* Attributes and extensions in deriving come in three forms :
@opaque , % prin... |
dbb4459921d988bbf0cff16b3234b92b1939b7dbb9f22bc8c6032cfeea662b8d | viercc/kitchen-sink-hs | balanced-tree.hs | #!/usr/bin/env cabal
{- cabal:
build-depends: base
-}
module Main where
main :: IO ()
main = ppr $ buildBalanced [1..23 :: Int]
data Tree a = Node (Tree a) (Tree a) | Leaf a | Empty
deriving (Show, Read, Eq, Ord)
ppr :: Show a => Tree a -> IO ()
ppr = putStrLn . prettyTree
prettyTree :: Show a => Tree a -> Strin... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/5038b17a39e4e6f19e6fb4779a7c8aaddf64d922/scripts/balanced-tree.hs | haskell | cabal:
build-depends: base
| #!/usr/bin/env cabal
module Main where
main :: IO ()
main = ppr $ buildBalanced [1..23 :: Int]
data Tree a = Node (Tree a) (Tree a) | Leaf a | Empty
deriving (Show, Read, Eq, Ord)
ppr :: Show a => Tree a -> IO ()
ppr = putStrLn . prettyTree
prettyTree :: Show a => Tree a -> String
prettyTree = go 0
where
g... |
dca607956462e3d7d431f6b7ffec4e99d159fd190b8bc541d126c18a5d0b644e | potapenko/playphraseme-site | view.cljs | (ns playphraseme.views.not-found.view
(:require [reagent.core :as r]))
(defn page []
(r/create-class
{:component-did-mount
(fn [])
:reagent-render
(fn []
[:div.page-container
[:h1 "Page not found."]])}))
| null | https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/cljs/playphraseme/views/not_found/view.cljs | clojure | (ns playphraseme.views.not-found.view
(:require [reagent.core :as r]))
(defn page []
(r/create-class
{:component-did-mount
(fn [])
:reagent-render
(fn []
[:div.page-container
[:h1 "Page not found."]])}))
| |
be8b0aaca033b1b8453af5e9898f77f07bb181a055da3ea7d265dc7694e8e137 | disteph/cdsat | arrays.ml | open Top
module Known = struct
let known =
let open Symbols in
function
| Eq _ | Select _ | Store _ | Diff _ -> true
| _ -> false
end
include Generic.Make(Known)
| null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/termstructures.mld/VarSet.mld/arrays.ml | ocaml | open Top
module Known = struct
let known =
let open Symbols in
function
| Eq _ | Select _ | Store _ | Diff _ -> true
| _ -> false
end
include Generic.Make(Known)
| |
0b2664feb65a8687f4c555b2e1857e7b0a996743b3258484c641c180d67d948b | fnumatic/messaging-client | reagent_hooks.cljs | (ns mailclient.tools.reagent-hooks
(:require [reagent.core :as r]))
(defn use-state [value]
(let [r (r/atom value)]
[r #(reset! r %)]))
(defn use-ref []
(let [a (volatile! nil)]
(reify
IDeref
(-deref [_]
@a)
IFn
(-invoke [this value]
(vreset! a value)))))
(defn ... | null | https://raw.githubusercontent.com/fnumatic/messaging-client/bcdc351d064b6c3a06250086a5f8e7d544a5d1b1/src/mailclient/tools/reagent_hooks.cljs | clojure | (ns mailclient.tools.reagent-hooks
(:require [reagent.core :as r]))
(defn use-state [value]
(let [r (r/atom value)]
[r #(reset! r %)]))
(defn use-ref []
(let [a (volatile! nil)]
(reify
IDeref
(-deref [_]
@a)
IFn
(-invoke [this value]
(vreset! a value)))))
(defn ... | |
67fc4ffb2f242eba91e36c4635d64f7a256282eabeaf4efa732a1f9765209eb4 | hspec/hspec-expectations | Spec.hs | module Main where
import Test.Hspec
import qualified Test.Hspec.ExpectationsSpec
import qualified Test.Hspec.Expectations.MatcherSpec
spec :: Spec
spec = do
describe "Test.Hspec.ExpectationsSpec" Test.Hspec.ExpectationsSpec.spec
describe "Test.Hspec.Expectations.MatcherSpec" Test.Hspec.Expectations.MatcherSpec.s... | null | https://raw.githubusercontent.com/hspec/hspec-expectations/55f00d0fd98421cf67c4726e8272ec1d33f2c6f2/test/Spec.hs | haskell | module Main where
import Test.Hspec
import qualified Test.Hspec.ExpectationsSpec
import qualified Test.Hspec.Expectations.MatcherSpec
spec :: Spec
spec = do
describe "Test.Hspec.ExpectationsSpec" Test.Hspec.ExpectationsSpec.spec
describe "Test.Hspec.Expectations.MatcherSpec" Test.Hspec.Expectations.MatcherSpec.s... | |
daa8594f86eadaec7337ee0c514de5166dddb05c97ef80ea33241c292cf42306 | GaloisInc/mistral | DeadCode.hs | # LANGUAGE FlexibleInstances #
-- | Eliminate dead code from a Mistral program.
module Mistral.CodeGen.DeadCode (
elimDeadCode
) where
import Mistral.Driver
import Mistral.TypeCheck.AST
import Mistral.Utils.Names
import Mistral.Utils.PP
import Mistral.Utils.SCC
import qualified Data.Foldable as F
import ... | null | https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/src/Mistral/CodeGen/DeadCode.hs | haskell | | Eliminate dead code from a Mistral program.
Dead Code Removal -----------------------------------------------------------
| Remove declarations that aren't in the transitive closure of any task
declaration.
Eliminate dead local variables.
Let statements
| Partition declarations by whether or not they are reach... | # LANGUAGE FlexibleInstances #
module Mistral.CodeGen.DeadCode (
elimDeadCode
) where
import Mistral.Driver
import Mistral.TypeCheck.AST
import Mistral.Utils.Names
import Mistral.Utils.PP
import Mistral.Utils.SCC
import qualified Data.Foldable as F
import Data.List ( partition )
import Data.... |
d370d84425881c6b5309111e97795348efda1d1d2b5a434460d415bb815772ca | ocsigen/js_of_ocaml | test.ml | (* This is demo input for wiki. It will be loaded automatically into window on startup *)
let test1 =
"\n\n\
====this is h4\n\n\
# number list el 1\n\
# number list e2 2 //with italic text\n\n\n\
//with italic\n\n\
* bullet list el1 ** with bold text\n\
* bullet list el2 ** with bold // and italic... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/examples/wiki/test.ml | ocaml | This is demo input for wiki. It will be loaded automatically into window on startup |
let test1 =
"\n\n\
====this is h4\n\n\
# number list el 1\n\
# number list e2 2 //with italic text\n\n\n\
//with italic\n\n\
* bullet list el1 ** with bold text\n\
* bullet list el2 ** with bold // and italic text\n\n\
<<youtube 1XNTjVScm_8>>\n\n\
[[|Link to Yandex]]\n\n\
[[]]\n\n\
{{-... |
0ea310a6a7e1483be908fd8161652aef19ea6d627444567fcc22b0f5d4a715d1 | jeanparpaillon/erlang-dbus | dbus_remote_service.erl | %%
@author < >
Copyright 2014
%% @doc Implements a remote service ...
%%
%% @todo Remember what this module does ;)
%% @end
-module(dbus_remote_service).
-behaviour(gen_server).
-include("dbus.hrl").
%% api
-export([
start_link/3,
get_object/2,
release_object/2
]).
-export([
init/1,
code_ch... | null | https://raw.githubusercontent.com/jeanparpaillon/erlang-dbus/a1feab01d2cdf07baf09d3761ab1175a8ce56435/src/dbus_remote_service.erl | erlang |
@doc Implements a remote service ...
@todo Remember what this module does ;)
@end
api
gen_server callbacks
No more pids, remove object
Update registry entry | @author < >
Copyright 2014
-module(dbus_remote_service).
-behaviour(gen_server).
-include("dbus.hrl").
-export([
start_link/3,
get_object/2,
release_object/2
]).
-export([
init/1,
code_change/3,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2
]).
-record(state, {
name,... |
0665831a2ce5583822a645802a32e08c3ce6cca33fe009fc1345fc2688065b0b | vikram/lisplibraries | boolean.lisp |
(in-package :weblocks)
(export '(predicate predicate-presentation
predicate-presentation-false-string
predicate-presentation-true-string
checkbox checkbox-presentation
predicate-parser))
;;; Data presentation
(defclass predicate-presentation (text-presentation)
((false-string :initform "No"
:accesso... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/views/types/boolean.lisp | lisp | Data presentation
Form presentation
Scaffolding magic |
(in-package :weblocks)
(export '(predicate predicate-presentation
predicate-presentation-false-string
predicate-presentation-true-string
checkbox checkbox-presentation
predicate-parser))
(defclass predicate-presentation (text-presentation)
((false-string :initform "No"
:accessor predicate-presentati... |
7dae9fe89d247d2068946217d7e26923f063a467e5cea1dd0dea5366e71f82f3 | pcarbonn/H-Calc | B_Add.hs | module Interpreter.B_Add where
-- this module adds the following language construct to the DSL
( α i )
( Add α ( i1,i2 ) )
-------------------------------------------------------
import Interpreter.A_Nucleus
import Interpreter.Transfos
import Fmt
import Haskus.Utils.EADT
import Haskus.Utils.... | null | https://raw.githubusercontent.com/pcarbonn/H-Calc/00f6d8d4344f43a3356d29fd45c9ec3c23ccce65/src/Interpreter/B_Add.hs | haskell | this module adds the following language construct to the DSL
-----------------------------------------------------
define nodes
------------------------------------------------------
define patterns, for creation and pattern matching
syntactic sugar for embedded DSL
-------------------------------------------------... | module Interpreter.B_Add where
( α i )
( Add α ( i1,i2 ) )
import Interpreter.A_Nucleus
import Interpreter.Transfos
import Fmt
import Haskus.Utils.EADT
import Haskus.Utils.EADT.TH
import Text.Megaparsec
import Text.Megaparsec.Char as M
import Text.Show
data ValF e = ValF e I... |
fd43fdb1d0fc35da39e83674ddd396004f30e207d3a43fc93c24ee7e075d568b | exercism/clojure | restructure.clj | (import java.io.File)
(require '[cheshire.core :as json]
'[clojure.java.io :as io]
'[clojure.java.shell :refer [sh with-sh-dir]]
'[clojure.string :as string])
(doseq [problem ((json/parse-string (slurp "config.json")) "problems")]
(with-sh-dir problem
(sh "mkdir" ... | null | https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/bin/restructure.clj | clojure | (import java.io.File)
(require '[cheshire.core :as json]
'[clojure.java.io :as io]
'[clojure.java.shell :refer [sh with-sh-dir]]
'[clojure.string :as string])
(doseq [problem ((json/parse-string (slurp "config.json")) "problems")]
(with-sh-dir problem
(sh "mkdir" ... | |
667878b2ab4630a4056090717f434d9e2602eed73a270c358395066419b2a361 | bcc32/advent-of-code | b.ml | open! Core
open! Async
open! Import
let try_ elf_attack_power lines =
let battlefield = Battlefield.create lines ~elf_attack_power in
let rec loop rounds =
match Battlefield.perform_round battlefield with
| () -> loop (rounds + 1)
| exception Battlefield.End_of_combat { winning_team = Elf }
when ... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2018/15/b.ml | ocaml | open! Core
open! Async
open! Import
let try_ elf_attack_power lines =
let battlefield = Battlefield.create lines ~elf_attack_power in
let rec loop rounds =
match Battlefield.perform_round battlefield with
| () -> loop (rounds + 1)
| exception Battlefield.End_of_combat { winning_team = Elf }
when ... | |
ac2ef2c40292308eaf0ef92463cd797dcbe4d19bf22eccec0524345b8c9ad7ad | tamarit/edd | mergesort.erl | -module(mergesort).
-export([mergesort/1, mergesort/2, mergesort/3, comp/2]).
mergesort(L) ->
mergesort(L, fun ?MODULE:comp/2, none).
mergesort(L, Comp) ->
mergesort(L, Comp, none).
mergesort([], _Comp, Parent) -> send_return([],Parent);
mergesort([X], _Comp, Parent) -> send_return([X],Parent);
mergesort(L,... | null | https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/examples/Concurrency/mergesort/mergesort.erl | erlang | Correct
false -> [H1 | merge([H2 | T1], T2, Comp)]; % Incorrect
take(N,[H|T])->[H | take(N-1, T)]. % Correct | -module(mergesort).
-export([mergesort/1, mergesort/2, mergesort/3, comp/2]).
mergesort(L) ->
mergesort(L, fun ?MODULE:comp/2, none).
mergesort(L, Comp) ->
mergesort(L, Comp, none).
mergesort([], _Comp, Parent) -> send_return([],Parent);
mergesort([X], _Comp, Parent) -> send_return([X],Parent);
mergesort(L,... |
49df27ece1740fc06ac6d158e6ebee310ba774cbe1190c39533bd7db2c7615c0 | thufschmitt/tix | of_onix.ml | *
Conversion between [ . Ast.t ] and [ Ast.t ]
Conversion between [Parse.Ast.t] and [Ast.t]
*)
module A = Common.Type_annotations
module O = Parse.Ast
module N = Ast
module Loc = Common.Location
module W = Common.Writer.Make (Common.Warning.List)
module WL = Loc.With_loc
open W.Infix
let map_loc = WL.map
... | null | https://raw.githubusercontent.com/thufschmitt/tix/bfbf7b6de9160bae8af3e0686b783bbc75c79fd7/lib/simple/of_onix.ml | ocaml | Invariant: all the access paths are non-empty
The access-path can't be empty
This shouldn't happen
treated separately
TODO: smarter compilation of some form of if-then-else
FIXME: don't drop the tail of the access_path
[let %%x /*: t | %%undef */ = x ]
[if isUndef [%e %%var] then [%e e] else [%e %%var]] | *
Conversion between [ . Ast.t ] and [ Ast.t ]
Conversion between [Parse.Ast.t] and [Ast.t]
*)
module A = Common.Type_annotations
module O = Parse.Ast
module N = Ast
module Loc = Common.Location
module W = Common.Writer.Make (Common.Warning.List)
module WL = Loc.With_loc
open W.Infix
let map_loc = WL.map
... |
ba6ae9456dd170ae5a9b85aa69e074a4d29cabaa18fcaccd3d50a785f6e5339c | SquidDev/illuaminate | parser.ml | open IlluaminateCore
let parse ~name contents =
let lexbuf = Lexing.from_string contents in
let errs = Error.make () in
let name = Span.Filename.mk name in
match IlluaminateParser.program name lexbuf with
| Error err ->
let buffer = Buffer.create 128 in
IlluaminateParser.Error.report errs err.spa... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/test/parser.ml | ocaml | open IlluaminateCore
let parse ~name contents =
let lexbuf = Lexing.from_string contents in
let errs = Error.make () in
let name = Span.Filename.mk name in
match IlluaminateParser.program name lexbuf with
| Error err ->
let buffer = Buffer.create 128 in
IlluaminateParser.Error.report errs err.spa... | |
b78cb9a4c67598b0e943c67bb8bd2322aa4f23e802035214eba32d49549fd7e2 | samrushing/irken-compiler | t12.scm |
(include "lib/core.scm")
(define (thing1 a b c) (+ a 1))
(define (thing2 a b c) (+ b 1))
(define (thing3 a b c) (+ c 1))
(print (thing1 10 11 12))
(print (thing2 10 11 12))
(print (thing3 10 11 12))
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t12.scm | scheme |
(include "lib/core.scm")
(define (thing1 a b c) (+ a 1))
(define (thing2 a b c) (+ b 1))
(define (thing3 a b c) (+ c 1))
(print (thing1 10 11 12))
(print (thing2 10 11 12))
(print (thing3 10 11 12))
| |
207623c794de257f8e5a8cefd38bc909b33dc23412ce98f1ded5372bb2922aa4 | goranmoomin/cl-cowsay | default.lisp | ;;;; default.lisp
(defpackage #:cl-cowsay.default
(:use #:cl
#:alexandria)
(:export #:*defaults*
#:defaults))
(in-package #:cl-cowsay.default)
(defparameter *defaults*
(alist-hash-table
'((:borg . (:eyes "==" :tongue " " :thoughts "\\"))
(:dead . (:eyes "xx" :tongue "U " :thoughts "... | null | https://raw.githubusercontent.com/goranmoomin/cl-cowsay/36b1123cdbefeb9bcde4572f992705cc7da5acaf/default.lisp | lisp | default.lisp |
(defpackage #:cl-cowsay.default
(:use #:cl
#:alexandria)
(:export #:*defaults*
#:defaults))
(in-package #:cl-cowsay.default)
(defparameter *defaults*
(alist-hash-table
'((:borg . (:eyes "==" :tongue " " :thoughts "\\"))
(:dead . (:eyes "xx" :tongue "U " :thoughts "\\"))
(:greed... |
fff1748b38c83c76f78c8850455d4cb01fdd84e88d6f3eb1db2076a27e9a3d8a | CloudI/CloudI | ct_expand.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% --------------------------------------------------
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License a... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_parse_trans/src/ct_expand.erl | erlang | --------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@author : ... |
16f2490ddf85158029f5170081434ae20529c66caa9fee4692c03576881e5b6e | mokus0/junkbox | Moku.hs | module Math.Moku
where
x = 5
y = (6, "Hello")
z = x * fst y
roots [a, b, c] =
[
(-b + det) / (2 * a),
(-b - det) / (2 * a)
]
where
det = sqrt (b*b - 4*a*c)
fib 0 = 0
fib 1 = 1
fib n = if n > 1
then fib (n - 1) + fib (n - 2)
else fib (n + 2) - fib (n + 1)
xor True = not
xor False = id
join :: [a] -> [[... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Math/Moku.hs | haskell | isPrime x = | module Math.Moku
where
x = 5
y = (6, "Hello")
z = x * fst y
roots [a, b, c] =
[
(-b + det) / (2 * a),
(-b - det) / (2 * a)
]
where
det = sqrt (b*b - 4*a*c)
fib 0 = 0
fib 1 = 1
fib n = if n > 1
then fib (n - 1) + fib (n - 2)
else fib (n + 2) - fib (n + 1)
xor True = not
xor False = id
join :: [a] -> [[... |
71be2f11be072e66d31c6475c1deef577938d6c6082e8c0dbf43dd4b64e6ffbb | haskell/cabal | CabalGH5213Other.hs | module CabalGH5213Other where
bar :: Int
bar = 42
| null | https://raw.githubusercontent.com/haskell/cabal/496d6fcc26779e754523a6cc7576aea49ef8056e/cabal-testsuite/PackageTests/Regression/T5213ExeCoverage/src/CabalGH5213Other.hs | haskell | module CabalGH5213Other where
bar :: Int
bar = 42
| |
26615bb071acafa749e76a4f68be4de8a2e684709df0a6fdb3cde8a453c8a1b2 | KMahoney/squee | StdLib.hs | module Squee.StdLib (stdLib) where
import qualified Data.Text as T
import qualified Data.Map as M
import qualified Squee.Types.Type as Type
import qualified Database.Schema as Schema
import qualified Squee.QueryBuilder as QB
import Squee.Types.CommonType
import Squee.AST (Symbol(..))
import Squee.Eval
type EnvEntry ... | null | https://raw.githubusercontent.com/KMahoney/squee/b2ebad2ec6f3c866398600793d0a231edc8c23e4/src/Squee/StdLib.hs | haskell | Helpers
>) :: Type.Type -> Type.Type -> Type.Type
>
Filter
> tBool) --> tQuery (tRow (tv 0)) --> tQuery (tRow (tv 0))
Order
> tQuery ( tRow ( tv 0 ) ) -- > tQuery ( tRow ( tv 0 ) )
Map
> tQuery ( tRow ( tv 0 ) ) -- > tQuery ( tRow ( tv 1 ) )
Natural Join
> tQuery ( tRow ( tv 2 ) )
Join
> rB --> tBool) --> (rA ... | module Squee.StdLib (stdLib) where
import qualified Data.Text as T
import qualified Data.Map as M
import qualified Squee.Types.Type as Type
import qualified Database.Schema as Schema
import qualified Squee.QueryBuilder as QB
import Squee.Types.CommonType
import Squee.AST (Symbol(..))
import Squee.Eval
type EnvEntry ... |
3280a593107b6aa61d31f6f0fff7f2cbf05a90248aa46ef477f8fd6c84422d62 | mirage/mirage | functoria.mli |
* Copyright ( c ) 2013 - 2020 < >
* Copyright ( c ) 2013 - 2020 Anil Madhavapeddy < >
* Copyright ( c ) 2015 - 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice an... | null | https://raw.githubusercontent.com/mirage/mirage/df34501c4203fba59718bcee7d6ebd1198926838/lib/functoria/functoria.mli | ocaml | * The signature for run-time and configure-time command-line keys.
* [job] is the signature for user's application main module.
* [noop] is an implementation of {!type-job} that holds no state, does nothing
and has no dependency.
* The type for command-line arguments, similar to the usual [Sys.argv].
* [argv] i... |
* Copyright ( c ) 2013 - 2020 < >
* Copyright ( c ) 2013 - 2020 Anil Madhavapeddy < >
* Copyright ( c ) 2015 - 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice an... |
d4a36b3fa5f456a3fcf450505fa01abcd170e14c939cf552a3e32e348b02df0b | typeclasses/haskell-phrasebook | test-dynamic.hs | main = propertyMain $ withTests 1 $ property do
x <- exeStdout $ phrasebook "dynamic"
strLines x ===
[ "The answer is yes", "5 is an integer", "Unrecognized type: [Char]" ]
| null | https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/2b0aa44ef6f6e9745c51ed47b4e59ff704346c87/tests/test-dynamic.hs | haskell | main = propertyMain $ withTests 1 $ property do
x <- exeStdout $ phrasebook "dynamic"
strLines x ===
[ "The answer is yes", "5 is an integer", "Unrecognized type: [Char]" ]
| |
96420776e24b07ccf1e437496159508c4a8797025a8add3320f57a2ab79a635c | RDTK/generator | util.lisp | ;;;; util.lisp --- Utilities used by the target.dockerfile module.
;;;;
Copyright ( C ) 2018 , 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.deployment.dockerfile)
;;; Commands
(defun trim-command (command)
(string-trim '(#\Space #\Tab #\Newline) command))
| null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/deployment/dockerfile/util.lisp | lisp | util.lisp --- Utilities used by the target.dockerfile module.
Commands | Copyright ( C ) 2018 , 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.deployment.dockerfile)
(defun trim-command (command)
(string-trim '(#\Space #\Tab #\Newline) command))
|
ce6ab86c4cc6a527f4699eddc698936a98f06c7b42e70387730f2a91c7de64dc | mirage/ocaml-launchd | example.ml |
* Copyright ( c ) 2015 Unikernel Systems
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS "... | null | https://raw.githubusercontent.com/mirage/ocaml-launchd/b605b27c9f3e4ab4223a37bb50b454c068897b28/example/example.ml | ocaml |
* Copyright ( c ) 2015 Unikernel Systems
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS "... | |
419d2cae148703272c5c091c2d8be6ca2f6d224af9b4702f688532440b0732ba | elastic/eui-cljs | property_sort.cljs | (ns eui.services.property-sort
(:require ["@elastic/eui/lib/services/sort/property_sort.js" :as eui]))
(def PropertySortType eui/PropertySortType)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/services/property_sort.cljs | clojure | (ns eui.services.property-sort
(:require ["@elastic/eui/lib/services/sort/property_sort.js" :as eui]))
(def PropertySortType eui/PropertySortType)
| |
b643053bfc425c7e973f2f2b91de6c80be688c60f7fb9f4bdac3e98fdabf1d1c | let-def/lwd | main.ml | open Brr
open Brr_lwd
let ui =
let values = Lwd_table.make () in
let items = Lwd.var Lwd_seq.empty in
let shuffle () =
let all = Lwd_seq.to_array (Lwd.peek items) in
for i = Array.length all - 1 downto 1 do
let i' = Random.int (i + 1) in
let x = all.(i) in
let x' = all.(i') in
all... | null | https://raw.githubusercontent.com/let-def/lwd/9ebcf4cefef92de6bb9faf82a28cedcf05d1b59f/examples/focustest-brr/main.ml | ocaml | El.set_children (Document.body G.document) [ui] | open Brr
open Brr_lwd
let ui =
let values = Lwd_table.make () in
let items = Lwd.var Lwd_seq.empty in
let shuffle () =
let all = Lwd_seq.to_array (Lwd.peek items) in
for i = Array.length all - 1 downto 1 do
let i' = Random.int (i + 1) in
let x = all.(i) in
let x' = all.(i') in
all... |
d7f55e02f2d2739a78df40d522e0e25c9d628404d9e3a312db656bfb7fbbbe13 | haskell/lsp | DiagnosticsSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module DiagnosticsSpec where
import qualified Data.Map as Map
import qualified Data.HashMap.Strict as HM
import qualified Data.SortedList as SL
import Data.Text (Text)
import ... | null | https://raw.githubusercontent.com/haskell/lsp/5422dd13f0362917e5981e07d60617ca6e233833/lsp/test/DiagnosticsSpec.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------
-- |Used when running from ghci, and it sets the current directory to ./tests
tt :: IO ()
tt = do
cd ".."
---------------------------------------------------------------------
----------------------------------... | module DiagnosticsSpec where
import qualified Data.Map as Map
import qualified Data.HashMap.Strict as HM
import qualified Data.SortedList as SL
import Data.Text (Text)
import Language.LSP.Diagnostics
i... |
970ac6d953f27856576a405eed3110bb1e366d3a811710671c8d43a6e1ea4184 | hcarty/ezlogs-cli | ezlogs_cli.ml | module Json = Yojson.Basic
module String_map = Map.Make (String)
let timestamp_of_tags_or_now (tags : Logs.Tag.set) =
match Logs.Tag.find Ecs.tag tags with
| None -> Ecs.Epoch.to_timestamp (Ptime_clock.now ())
| Some ecs ->
( match Ecs.Fields.find (Base (Timestamp Ptime.epoch)) ecs with
| None -> Ecs.Epo... | null | https://raw.githubusercontent.com/hcarty/ezlogs-cli/aa6079a279c93d8ac1e437ade34ec81835f6e121/src/ezlogs_cli.ml | ocaml | Always include the log message | module Json = Yojson.Basic
module String_map = Map.Make (String)
let timestamp_of_tags_or_now (tags : Logs.Tag.set) =
match Logs.Tag.find Ecs.tag tags with
| None -> Ecs.Epoch.to_timestamp (Ptime_clock.now ())
| Some ecs ->
( match Ecs.Fields.find (Base (Timestamp Ptime.epoch)) ecs with
| None -> Ecs.Epo... |
c7d5872589dfde78b4f0d63886ee58a7f03a49352a6b4749e22dc3a96035fe97 | clojure-interop/aws-api | AmazonPinpointAsyncClientBuilder.clj | (ns com.amazonaws.services.pinpoint.AmazonPinpointAsyncClientBuilder
"Fluent builder for AmazonPinpointAsync. Use of the builder is preferred over
using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.pinpoint AmazonPinpointAsyncClientBuilder]... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.pinpoint/src/com/amazonaws/services/pinpoint/AmazonPinpointAsyncClientBuilder.clj | clojure | (ns com.amazonaws.services.pinpoint.AmazonPinpointAsyncClientBuilder
"Fluent builder for AmazonPinpointAsync. Use of the builder is preferred over
using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.pinpoint AmazonPinpointAsyncClientBuilder]... | |
fb21a0eabcf0e231f1f9274a4a56a3cb426baf55e02719557f147ee1b806df92 | aryx/ocamltarzan | expr2.ml | type ptype =
| BoolTy
| IntTy
| DoubleTy
| StringTy
| ArrayTy
| ObjectTy
(* with sexp *)
| null | https://raw.githubusercontent.com/aryx/ocamltarzan/4140f5102cee83a2ca7be996ca2d92e9cb035f9c/tests/expr2.ml | ocaml | with sexp | type ptype =
| BoolTy
| IntTy
| DoubleTy
| StringTy
| ArrayTy
| ObjectTy
|
10ba925c0612b8dc87986d2442b80f86145151e07bac847723c4d119a062fc37 | byorgey/AoC | 05.hs | #!/usr/bin/env stack
stack --resolver lts-19.28 script --package containers --package split --package mtl --package lens
import Control.Arrow ((>>>))
import Control.Lens (ix, use, (%=))
import Control.Monad.State
import Data.Char (isAlpha, isDigit, isSpa... | null | https://raw.githubusercontent.com/byorgey/AoC/a7fb36686ca3d7e07df26ff8183ffc526d091de0/2022/05/05.hs | haskell | resolver lts-19.28 script --package containers --package split --package mtl --package lens
Input ---------------------------------------------------
Solving ------------------------------------------------- | #!/usr/bin/env stack
import Control.Arrow ((>>>))
import Control.Lens (ix, use, (%=))
import Control.Monad.State
import Data.Char (isAlpha, isDigit, isSpace)
import Data.List (transpose)
import Data.List.Split (splitOn)
m... |
6208e0f4533f116f5723347543288ce24cb6fbc59951dac7cfc0438921d4f6c5 | cl-rabbit/cl-bunny | basic.ack.lisp | (in-package :cl-bunny.test)
(plan 1)
(subtest "Basic.ack tests"
(subtest "Acknowledges a message with a valid (known) delivery tag"
(with-connection ()
(with-channel ()
(let ((q (queue.declare :name "cl-bunny.basic.ack.manual-acks" :exclusive t))
(x (exchange.default)))
(pu... | null | https://raw.githubusercontent.com/cl-rabbit/cl-bunny/6da7fe161efc8d6bb0b8b09ac8efad03553d765c/t/integration/amqp/basic.ack.lisp | lisp | (in-package :cl-bunny.test)
(plan 1)
(subtest "Basic.ack tests"
(subtest "Acknowledges a message with a valid (known) delivery tag"
(with-connection ()
(with-channel ()
(let ((q (queue.declare :name "cl-bunny.basic.ack.manual-acks" :exclusive t))
(x (exchange.default)))
(pu... | |
8a510b71c50910a388bdc57492097a45af808f2f7cb0dafc92b90c1b8f9ceb84 | bpiel/guildsman | box.cljs | (ns re-com.box
(:require [clojure.string :as string]
[re-com.validate :refer [justify-style? justify-options-list align-style? align-options-list scroll-style?
scroll-options-list string-or-hiccup? css-style? html-attr?] :refer-macros [validate-args-macro]]))
... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/resources/public/js/compiled/out/re_com/box.cljs | clojure | ------------------------------------------------------------------------------------
Private Helper functions
------------------------------------------------------------------------------------
TODO: Could make initial/auto/none into keywords???
Split into words separated by whitespace
Split into number + ... | (ns re-com.box
(:require [clojure.string :as string]
[re-com.validate :refer [justify-style? justify-options-list align-style? align-options-list scroll-style?
scroll-options-list string-or-hiccup? css-style? html-attr?] :refer-macros [validate-args-macro]]))
... |
b49d75d16b83ab19619a7134f86ed3cf9f1b5cfcf761286c572893f4f6bf1430 | paypal/seazme-sources | es.clj | (ns seazme.common.es
(:require
[clojurewerkz.elastisch.rest :as esr]
[clojurewerkz.elastisch.rest.index :as esi]
[clojurewerkz.elastisch.rest.document :as esd])
)
(defn mk-connection[profile & {:keys [debug debug-body] :or {debug false debug-body false}}]
(esr/connect (profile :host) {:socket-timeout 60... | null | https://raw.githubusercontent.com/paypal/seazme-sources/57e5b7579f5e475a908b2318a00549dd131f7745/src/main/clojure/seazme/common/es.clj | clojure | (ns seazme.common.es
(:require
[clojurewerkz.elastisch.rest :as esr]
[clojurewerkz.elastisch.rest.index :as esi]
[clojurewerkz.elastisch.rest.document :as esd])
)
(defn mk-connection[profile & {:keys [debug debug-body] :or {debug false debug-body false}}]
(esr/connect (profile :host) {:socket-timeout 60... | |
9601ce45b79bcb37884c74d15c5016ae4b30a74af990a927e7a47ca3df699ab0 | ericfinster/opetopictt | lexer.ml | (*****************************************************************************)
(* *)
(* *)
(*****************************************... | null | https://raw.githubusercontent.com/ericfinster/opetopictt/766a547b59280b4016657318d9fb486940b863da/lib/lexer.ml | ocaml | ***************************************************************************
***************************************************************************
lower lambda is... |
open Syntax
open Parser
let space = [%sedlex.regexp? ' ' | '\t' | '\r']
let digit = [%sedlex.regexp? '0'..'9']
let number = [%sedlex.regexp? Plus digit]
let upper = [%sedlex.regexp? 'A'..'Z']
let lower = [%sedlex.regexp? 'a'..'z']
let greek_lower = [%sedlex.regexp? 0x3B1 .. 0x3B... |
28937d6a22e6903d02f64aecbc570cf6ec38a73bf6c53f6bcb9ae88910db88ea | TristeFigure/shuriken | string_test.clj | (ns shuriken.string-test
(:require [clojure.test :refer :all]
[shuriken.core :refer :all]))
(deftest test-words
(is (= ["abc" "def" "xyz" "12'uçé"]
(words "abc def \n xyz 12'uçé"))))
(deftest test-tabulate
(is (= (str "- aaa\n"
"- aaa\n"
"- aaa") ;; terminal name... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/test/shuriken/string_test.clj | clojure | terminal namespaces are dropped | (ns shuriken.string-test
(:require [clojure.test :refer :all]
[shuriken.core :refer :all]))
(deftest test-words
(is (= ["abc" "def" "xyz" "12'uçé"]
(words "abc def \n xyz 12'uçé"))))
(deftest test-tabulate
(is (= (str "- aaa\n"
"- aaa\n"
(tabulate
(str "aaa... |
7bcf51270ec7ca6829de1ed89f4af310dbc74a15236cdbe21aa5f3795789dd55 | blindglobe/clocc | symbol10.lisp | ;;; based on v1.5 -*- mode: lisp -*-
(in-package :cl-user)
(check-for-bug :symbol10-legacy-4
(progn (in-package :cl-user) nil)
nil
"in-package expects a 'string designator'
this is or a character, a symbol or a string.")
;; test der neuen valuezelle
1 . ungebundenes symbol
(check-for-bug :symbol10-legacy-14... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/tools/ansi-test/symbol10.lisp | lisp | based on v1.5 -*- mode: lisp -*-
test der neuen valuezelle
gebunden
wert/nil
funktion. eigenschaft
macro?
spezialform?
p-liste?
p-liste?
i1
i2
i3
sys::%p-set-cdr-content
value - umbinden - macro - umbinden - props - umbinden
value
umbinden
macro
umbinden
props
umbinden
specvar - props - rebind - fun... | (in-package :cl-user)
(check-for-bug :symbol10-legacy-4
(progn (in-package :cl-user) nil)
nil
"in-package expects a 'string designator'
this is or a character, a symbol or a string.")
1 . ungebundenes symbol
(check-for-bug :symbol10-legacy-14
(defun testvar (var)
(if (boundp var)
(... |
4adf6124ed5bd1cb0c55b44a5f470b002583dfe912bf65b1f2e151efe881fcbe | LuisThiamNye/chic | style.clj | (ns chic.style
(:require
[babashka.fs :as fs]
[taoensso.encore :as enc]
[chic.util :as util])
(:import
[io.github.humbleui.skija FontMgr FontStyle Typeface Data Font Paint]))
(def input-font-path (let [s "/Volumes/Carbonator/csync/fonts/Input-Font/Input_Fonts/InputSans/InputSansCondensed/InputSansConde... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/style.clj | clojure | slow? | (ns chic.style
(:require
[babashka.fs :as fs]
[taoensso.encore :as enc]
[chic.util :as util])
(:import
[io.github.humbleui.skija FontMgr FontStyle Typeface Data Font Paint]))
(def input-font-path (let [s "/Volumes/Carbonator/csync/fonts/Input-Font/Input_Fonts/InputSans/InputSansCondensed/InputSansConde... |
02533f114cd0173009bbdccad9c5cab00d1efbd452729b60461c00391f171f22 | charlieg/Sparser | moving.lisp | copyright ( c ) 2011 -- all rights reserved
$ Id:$
;;;
;;; File: "moving"
Module : " : places : "
version : August 2011
;; Intended for modeling movement in direction or w.r.t. some
;; spatial feature.
initated 8/4/11
(in-package :sparser)
;; drive to <location>
;; travel <measurement ... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/places/moving.lisp | lisp |
File: "moving"
Intended for modeling movement in direction or w.r.t. some
spatial feature.
drive to <location>
travel <measurement (distance)> <direction> on<path> to<location
turn <direction> onto<path>
cross <landmark ??>
follow <path> to<configuration> past<landmark> (<distance>)
we'll just 'action', ... | copyright ( c ) 2011 -- all rights reserved
$ Id:$
Module : " : places : "
version : August 2011
initated 8/4/11
(in-package :sparser)
(define-category move
:instantiates self
but if they do n't individually combine we 'll get there one adjunct
(defun define-movement-verb (string ... |
dc47e23155825396774db42bdcbf9a216c80f9362c300a0822d9801e5020f7a9 | circleci/circleci.test | test_test.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/circleci/circleci.test/eb2e44fe94e430648c852f7f736419dc70a4e5a1/test/circleci/test_test.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
by
January 16 , 2009
Thanks to , , and for
(ns circleci.test-test
(:use circleci.test)
(:require [clojure.stacktrace :as stack]
[circleci.test :as t]
[circleci.test.report :as report]
[clojure.test :refer (deftest t... |
bcfc6bc334ac318c587fefe75753e921746a9364397cdabd589acac32e5d9c7f | markbastian/partsbin | system.clj | (ns partsbin.system
"Utility ns for creating a ns-global reloadable system"
(:require [integrant.core :as ig]))
(defmacro create-system
"Create a ns-global system. Takes code that evaluates to a system configuration.
The following items will be created:
* *system* dynamic variable to hold the system.
*... | null | https://raw.githubusercontent.com/markbastian/partsbin/8dc159327f296c9625d129b5943ec79433019e54/src/partsbin/system.clj | clojure | (ns partsbin.system
"Utility ns for creating a ns-global reloadable system"
(:require [integrant.core :as ig]))
(defmacro create-system
"Create a ns-global system. Takes code that evaluates to a system configuration.
The following items will be created:
* *system* dynamic variable to hold the system.
*... | |
648bac14441cfc2afa86eb33d719883499a9ee56c83266e1e3c58350c61ec206 | basho/machi | machi_flu_psup.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You... | null | https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/src/machi_flu_psup.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
822535cc2edeb42e77c5f1dc814ef81b430fddfc2478463713b0bcb513e10b48 | elizabethsiegle/reddit-slack-bot | Applications.hs | # LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
module Twilio.Applications
( -- * Resource
Applications(..)
, Twilio.Applications.get
) where
import Control.Applicative
import Control.Monad.Catch
import Data.Aeson
import Data.Maybe
import Control.Monad.Twilio
import Twilio.Application
... | null | https://raw.githubusercontent.com/elizabethsiegle/reddit-slack-bot/a52ab60dcaae8e16bee8cdba22fce627157a42d8/twilio-haskell-move-to-stack/src/Twilio/Applications.hs | haskell | #LANGUAGE OverloadedStrings #
* Resource
| Print applications .
| Print applications. | # LANGUAGE MultiParamTypeClasses #
module Twilio.Applications
Applications(..)
, Twilio.Applications.get
) where
import Control.Applicative
import Control.Monad.Catch
import Data.Aeson
import Data.Maybe
import Control.Monad.Twilio
import Twilio.Application
import Twilio.Internal.Request
import Twilio.Interna... |
e5eaa8978efa4cbf265fb181e142bf673cf07cad19684939630181abf2a67805 | jonase/eastwood | consumer.clj | (ns testcases.const.unused-namespaces.consumer
""
(:require [testcases.const.unused-namespaces.producer :as a]))
(defn project-info []
{:version a/version})
| null | https://raw.githubusercontent.com/jonase/eastwood/0d1cb5930775ccd6ab897b7b85d9e118149a24eb/cases/testcases/const/unused_namespaces/consumer.clj | clojure | (ns testcases.const.unused-namespaces.consumer
""
(:require [testcases.const.unused-namespaces.producer :as a]))
(defn project-info []
{:version a/version})
| |
fe55092ebc44b3c22c9d617be7889671a96690c7edff4861dc5fe89246b890cf | webyrd/untitled-relational-interpreter-book | files-to-be-ported.scm | slatex-src.scm
| null | https://raw.githubusercontent.com/webyrd/untitled-relational-interpreter-book/247e29afd224586c39c1983e042524c7cc9fe17b/latex/slatex/dialects/files-to-be-ported.scm | scheme | slatex-src.scm
| |
f1f24331508daff36d716b683b92bff834f9872edb36805b85889a60f07a1b9a | spurious/chibi-scheme-mirror | extract-case-offsets.scm | #!/usr/bin/env chibi-scheme
;; Extract sets of char case offsets.
;;
;; Usage:
;; extract-case-offsets.scm options CaseFolding.txt > out
;;
;; Recognized options are:
;;
;; -c <min-count> - the minimum required count to output a char-set
for an offset , default 32
;; -m <max-char-set... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tools/extract-case-offsets.scm | scheme | Extract sets of char case offsets.
Usage:
extract-case-offsets.scm options CaseFolding.txt > out
Recognized options are:
-c <min-count> - the minimum required count to output a char-set
-m <max-char-sets> - the maximum number of character sets to output
regardless of min-count... | #!/usr/bin/env chibi-scheme
for an offset , default 32
(import (chibi) (srfi 1) (srfi 69) (srfi 95) (chibi io) (chibi string)
(chibi iset) (chibi iset optimize))
(define (warn . args)
(let ((err (current-error-port)))
(for-each (lambda (x) (display x err)) args)
(newline er... |
a4796af2ae829d98b018a9ecb1075d61b321a336ac9e4fb77355729fd569ed6d | IUCompilerCourse/public-student-support-code | interp-Lvec-prime.rkt | #lang racket
(require "interp-Lvec.rkt")
(require "utilities.rkt")
(require (prefix-in runtime-config: "runtime-config.rkt"))
(provide interp-Lvec-prime interp-Lvec-prime-mixin interp-Lvec-prime-class)
(define (interp-Lvec-prime-mixin super-class)
(class super-class
(super-new)
;; The simulated global state... | null | https://raw.githubusercontent.com/IUCompilerCourse/public-student-support-code/7ccbcb4cba9ed11a3efffd7a6c8c3da2f28072fb/interp-Lvec-prime.rkt | racket | The simulated global state of the program
define produces private fields
field is like define but public
after a call to collect we must guarantee there is enough
memory to allocate the requested block of memory
I am only advancing the end of the heap because we
are not reclaiming memory
Find the last address
... | #lang racket
(require "interp-Lvec.rkt")
(require "utilities.rkt")
(require (prefix-in runtime-config: "runtime-config.rkt"))
(provide interp-Lvec-prime interp-Lvec-prime-mixin interp-Lvec-prime-class)
(define (interp-Lvec-prime-mixin super-class)
(class super-class
(super-new)
(define memory (box '()))
... |
74192a0f3fbd14ac6fe344ab0ab7a1924d4f4cb8419af92035130d12909a79b9 | RefactoringTools/HaRe | LetIn1_TokOut.hs | module LetIn1 where
data Tree a = Leaf a | Branch (Tree a) (Tree a)
fringe_global x = let
fringe :: Tree a -> [a]
fringe (Leaf x) = [x]
fringe (Branch left@(Leaf b_1) right)
= (fringe left) ++ (fringe right)
... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/subIntroPattern/LetIn1_TokOut.hs | haskell | module LetIn1 where
data Tree a = Leaf a | Branch (Tree a) (Tree a)
fringe_global x = let
fringe :: Tree a -> [a]
fringe (Leaf x) = [x]
fringe (Branch left@(Leaf b_1) right)
= (fringe left) ++ (fringe right)
... | |
388fa52bcdfb01383b2b88626bce376ffb29a369e62b3c4882a721be657fc9c1 | expipiplus1/vulkan | VK_EXT_depth_range_unrestricted.hs | {-# language CPP #-}
-- | = Name
--
-- VK_EXT_depth_range_unrestricted - device extension
--
-- == VK_EXT_depth_range_unrestricted
--
-- [__Name String__]
-- @VK_EXT_depth_range_unrestricted@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
14
--
-- [__Revision__]
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_EXT_depth_range_unrestricted.hs | haskell | # language CPP #
| = Name
VK_EXT_depth_range_unrestricted - device extension
== VK_EXT_depth_range_unrestricted
[__Name String__]
@VK_EXT_depth_range_unrestricted@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
... | 14
1
- Requires support for Vulkan 1.0
-
< -Docs/issues/new?body=[VK_EXT_depth_range_unrestricted ] @pdaniell - nv%0A*Here describe the issue or question you have about the VK_EXT_depth_range_unrestricted extension * >
2017 - 06 - 22
- , NVIDIA
- , N... |
69fcada3467a784162b1e99d3807988c055b87c2d56d58570c255ba76cf5ed96 | iu-parfunc/lvars | k-CFA-lvish.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -fwarn - incomplete - patterns #
module Main where
Translated from article : -of-kcfa-and-0cfa/k-CFA.scm
-- Extended with less ad-hoc support for h... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish-apps/cfa/k-CFA-lvish.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
# LANGUAGE RankNTypes #
Extended with less ad-hoc support for halting
------------------------------------------------------------------------------
Abstract State Space for analysis
------------------------------------------------------------------------------
Ab... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# OPTIONS_GHC -fwarn - incomplete - patterns #
module Main where
Translated from article : -of-kcfa-and-0cfa/k-CFA.scm
import Control.Applicative (liftA2, liftA3)
import qualified Control.Monad.State as State
import Control.Monad
import Control.... |
912da72cb8b6e2047450d75675d3a96ea77f841e34d786c4f99382fe2e2ef046 | actondev/s7-reaper | gen.scm | (ns rpr.actions.gen
:doc "Generating functions from the action list
The rpr.actions.item/track/time-selection are generated from here"
:require ((rpr)
(aod.c.string :as s)))
(define (gen-file the-ns file regex)
(call-with-output-file file
(lambda (out)
;; paredit freaks out with multi-line s... | null | https://raw.githubusercontent.com/actondev/s7-reaper/4e407e72c3e08b5a984b351fd2c355f0bb560e8e/src/scheme/rpr/actions/gen.scm | scheme | paredit freaks out with multi-line strings
TODO implement -> and ->> clojure macros
named command: appending underscore before the returned name id
native action | (ns rpr.actions.gen
:doc "Generating functions from the action list
The rpr.actions.item/track/time-selection are generated from here"
:require ((rpr)
(aod.c.string :as s)))
(define (gen-file the-ns file regex)
(call-with-output-file file
(lambda (out)
(format out ";; auto-generated file. se... |
5a407c39919994ab699baff8718c93cd2814d42a17a2d6eeb3c90060a0a2f71c | c-cube/tiny_httpd | Tiny_httpd_camlzip.mli |
val middleware :
?compress_above:int ->
?buf_size:int -> unit ->
Tiny_httpd_server.Middleware.t
* Middleware responsible for deflate compression / decompression .
@since 0.11
@since 0.11 *)
val setup :
?compress_above:int ->
?buf_size:int -> Tiny_httpd_server.t -> unit
(** Install middleware for t... | null | https://raw.githubusercontent.com/c-cube/tiny_httpd/533a42a661d458de5f4819773eb8133bc582da90/src/camlzip/Tiny_httpd_camlzip.mli | ocaml | * Install middleware for tiny_httpd to be able to encode/decode
compressed streams
@param compress_above threshold above with string responses are compressed
@param buf_size size of the underlying buffer for compression/decompression |
val middleware :
?compress_above:int ->
?buf_size:int -> unit ->
Tiny_httpd_server.Middleware.t
* Middleware responsible for deflate compression / decompression .
@since 0.11
@since 0.11 *)
val setup :
?compress_above:int ->
?buf_size:int -> Tiny_httpd_server.t -> unit
|
8bd9b32539aed75c3f2fa1bbded06fa40f28048307dd2b38926d6b2de7aa74b5 | jitlogic/micrometer-clj | newrelic.clj | (ns io.resonant.micrometer.newrelic
(:require
[io.resonant.micrometer :refer [create-registry to-duration]])
(:import (io.micrometer.newrelic NewRelicMeterRegistry NewRelicConfig ClientProviderType)
(io.micrometer.core.instrument.step StepRegistryConfig)
(io.micrometer.core.instrument Cloc... | null | https://raw.githubusercontent.com/jitlogic/micrometer-clj/16918a1ef67f7e7e422a58ccd58742a1496cba26/src/io/resonant/micrometer/newrelic.clj | clojure | (ns io.resonant.micrometer.newrelic
(:require
[io.resonant.micrometer :refer [create-registry to-duration]])
(:import (io.micrometer.newrelic NewRelicMeterRegistry NewRelicConfig ClientProviderType)
(io.micrometer.core.instrument.step StepRegistryConfig)
(io.micrometer.core.instrument Cloc... | |
58f0722e72e63e53c4eb7c39948bd2f3ff38f7f9f4a40483308c7a1b97db493f | bugsbio/lein-tern | tern.clj | (ns leiningen.tern
(:require [tern.config :as config]
[tern.commands :as c]
[tern.log :as log]
[tern.version :refer [tern-version]]
[leiningen.core.project :as project]
[leiningen.core.eval :refer [eval-in-proje... | null | https://raw.githubusercontent.com/bugsbio/lein-tern/1496cc11fb343393416cc62fd874cd2fb634b2f3/src/leiningen/tern.clj | clojure | (ns leiningen.tern
(:require [tern.config :as config]
[tern.commands :as c]
[tern.log :as log]
[tern.version :refer [tern-version]]
[leiningen.core.project :as project]
[leiningen.core.eval :refer [eval-in-proje... | |
5e5b5c79c1994def1014a246354339d2a1bcf44d16a7350aa4f0cbd1723827ef | walmartlabs/lacinia | no_unused_fragments.clj | Copyright ( c ) 2017 - present Walmart , Inc.
;
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
dist... | null | https://raw.githubusercontent.com/walmartlabs/lacinia/e2a0da69f1b31b947b1245d8071601ad9ee3d84b/src/com/walmartlabs/lacinia/validation/no_unused_fragments.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2017 - present Walmart , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.walmartlabs.lacinia.validation.no-unused-fragments
{:no-doc true}
(:require
[clojure.set :as set]
[com.walmart... |
d6532623a2c9cc9549570264713d3a17ca8cd51565a68341d50c1d35d88d6c3d | wlitwin/graphv | Gv.ml | include Graphv_webgl
open Js_of_ocaml
let canvas : Dom_html.canvasElement Js.t =
Js.Unsafe.coerce (Dom_html.getElementById_exn "canvas")
;;
let ctx_webgl : WebGL.renderingContext Js.t =
WebGL.getContextWithAttributes canvas
(Js.Unsafe.coerce (object%js
val antialias = Js._false
val stenc... | null | https://raw.githubusercontent.com/wlitwin/graphv/1416fe1daaedc411e8b54e5458d6005d2d3678b5/examples/web/Gv.ml | ocaml | include Graphv_webgl
open Js_of_ocaml
let canvas : Dom_html.canvasElement Js.t =
Js.Unsafe.coerce (Dom_html.getElementById_exn "canvas")
;;
let ctx_webgl : WebGL.renderingContext Js.t =
WebGL.getContextWithAttributes canvas
(Js.Unsafe.coerce (object%js
val antialias = Js._false
val stenc... | |
78e402696b14a7615009ba1e7f3ba13a9a98cdbfee70d3556e0a60ad6b6a4ece | GillianPlatform/Gillian | LCmd.ml | module SSubst = Gillian.Symbolic.Subst
module Expr = Gillian.Gil_syntax.Expr
module Formula = Gillian.Gil_syntax.Formula
module Type = Gillian.Gil_syntax.Type
(***************************************************************)
(** Logic Commmands **)
(**************************... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/6547ef923404309c1d709ff5debcabff2035f9ca/Gillian-JS/lib/JSIL/LCmd.ml | ocaml | *************************************************************
* Logic Commmands *
*************************************************************
* If-then-else
* branching on a FO formual
* Macro
* Assert
* Assume
* Assume Type | module SSubst = Gillian.Symbolic.Subst
module Expr = Gillian.Gil_syntax.Expr
module Formula = Gillian.Gil_syntax.Formula
module Type = Gillian.Gil_syntax.Type
* { b JSIL logic commands } .
type t =
| FreshSVar of string
| SL of SLCmd.t
let rec pp fmt lcmd =
let pp_list = Fmt.list ~sep:Fmt.semi pp in
let pp_... |
903aa473af488b620913d3c1a67e427b878dca199c6896c0916735f362daf463 | yuriy-chumak/ol | window.scm | (define-library (lib gtk-3 window)
(export
GtkWindow*
gtk_window_set_title
gtk_window_set_default_size
gtk_window_get_size
gtk_window_get_default_size
gtk_window_resize
gtk_window_present
)
(import
(scheme core)
(otus ffi)
(lib gtk-3 gtk)
(lib... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/7beb5e2a58bf25201cc34daa42efa1c179f893e2/libraries/lib/gtk-3/window.scm | scheme | (define-library (lib gtk-3 window)
(export
GtkWindow*
gtk_window_set_title
gtk_window_set_default_size
gtk_window_get_size
gtk_window_get_default_size
gtk_window_resize
gtk_window_present
)
(import
(scheme core)
(otus ffi)
(lib gtk-3 gtk)
(lib... | |
a1021f34b4b616323160306ad47e074197fe3c1b3bdf2d96b887c5efa65a5245 | muldvarp/CFGAnalyzer | cfg.ml | open Basics ;;
type symbol = Nonterminal of string
| Terminal of string
type pureCFG = (string * (symbol list list)) list
type alphabet = string list
type fullCFG = { cfg: pureCFG;
origcfg: pureCFG;
alphabet: string list;
nonterminals: string list;
... | null | https://raw.githubusercontent.com/muldvarp/CFGAnalyzer/d9dcde837a03fba04ac24aca469c4b86e1b9b021/src/cfg.ml | ocaml | termprods: (string * (string list)) list;
let index = Array.make l (-1) in
termprods = terminalProductions cfg; | open Basics ;;
type symbol = Nonterminal of string
| Terminal of string
type pureCFG = (string * (symbol list list)) list
type alphabet = string list
type fullCFG = { cfg: pureCFG;
origcfg: pureCFG;
alphabet: string list;
nonterminals: string list;
... |
c57393eaea7a26f9f7c8175d10fe969bafb5f152d225db0f4619a37a6ab56a72 | clj-commons/iapetos | fn.clj | (ns iapetos.collector.fn
(:require [iapetos.collector :as collector]
[iapetos.core :as prometheus]
[iapetos.metric :as metric]
[iapetos.collector.exceptions :as ex])
(:import [io.prometheus.client CollectorRegistry]))
# # Instrumentation
(defmacro ^:private wrap
[body f]
... | null | https://raw.githubusercontent.com/clj-commons/iapetos/0fecedaf8454e17e41b05e0e14754a311b9f4ce2/src/iapetos/collector/fn.clj | clojure | ## Collectors | (ns iapetos.collector.fn
(:require [iapetos.collector :as collector]
[iapetos.core :as prometheus]
[iapetos.metric :as metric]
[iapetos.collector.exceptions :as ex])
(:import [io.prometheus.client CollectorRegistry]))
# # Instrumentation
(defmacro ^:private wrap
[body f]
... |
634d0dbc4116831cc58fc90ea66e682d67208d8609958ef7039c12dddbc8df84 | vibrato-team/vibrato-programming-language | Assembly.hs | module Backend.Assembly where
import Backend.TAC.TAC
import Backend.TAC.Monad
import Backend.FlowGraph.DSatur
import Data.Maybe
import Data.List
import qualified AST
tacToAssembly :: Instruction -> String
tacToAssembly (ThreeAddressCode Assign (Just x) (Just y@Constant{}) Nothing) = assemblyInst "li" (Just x) (... | null | https://raw.githubusercontent.com/vibrato-team/vibrato-programming-language/f6d98c2686604a91cd99307bc3fdc06828c7f538/src/Backend/Assembly.hs | haskell | TODO: Cast between int and float
TODO: Use floating point arithmetic if necessary
TODO: Use floating point arithmetic if necessary
Print integer
Print float
Print double
Print character
Print string
Read integer
Read float
Read double
Read character
Read string | module Backend.Assembly where
import Backend.TAC.TAC
import Backend.TAC.Monad
import Backend.FlowGraph.DSatur
import Data.Maybe
import Data.List
import qualified AST
tacToAssembly :: Instruction -> String
tacToAssembly (ThreeAddressCode Assign (Just x) (Just y@Constant{}) Nothing) = assemblyInst "li" (Just x) (... |
a5d4fb5538d759a4eb03fd56cc07f56d279c71bcedb72038498e0b2fcd136742 | tnelson/Forge | handshake.rkt | #lang racket/base
;; RFC 6455 Handshaking.
Copyright ( c ) 2013
;;
;; This module is distributed under the GNU Lesser General Public
;; License (LGPL). This means that you can link it into proprietary
;; applications, provided you follow the rules stated in the LGPL. You
;; can also modify this module; if you di... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/racket-rfc6455/net/rfc6455/rfc6455/handshake.rkt | racket | RFC 6455 Handshaking.
This module is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link it into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this module; if you distribute a modified version,
you must distribute it under... | #lang racket/base
Copyright ( c ) 2013
(require rackunit)
(require file/sha1)
(require net/base64)
(provide key-digest)
(define (key-digest key)
(base64-encode (sha1-bytes (open-input-bytes
(bytes-append key #"258EAFA5-E914-47DA-95CA-C5AB0DC85B11")))
#""))
(check-equal? (key-digest #"dGhlIHNhbX... |
4a73df84c273c10567605828159ba40b9d9309de860f9f2bd93eb22f4f803b0f | per-gron/blackhole | module-info.scm | ;;; -------------------------------------------------------------- ;;;
;;; ;;;
;;; Module info data structure ;;;
;;; ;;;
;;; -----------------------... | null | https://raw.githubusercontent.com/per-gron/blackhole/3f78eb726f85a6b8bddf757e6f28c785bc70e53d/src/module-info.scm | scheme | -------------------------------------------------------------- ;;;
;;;
Module info data structure ;;;
;;;
--------------------------------------... |
(define-type module-info
id: 726DB40B-AB18-4396-A570-BB715B602DB9
constructor: make-module-info/internal
(symbols read-only:)
(exports read-only:)
(imports read-only:)
(definitions read-only:)
(runtime-dependencies read-only:)
(compiletime-dependencies read-only:)
(options read-only:)
(cc-op... |
5d67eda937edaeddf7cf3ffd2dd4127d82e1a8294c9cda0a4b19845f3bc246d6 | hasktorch/hasktorch | GCrossAttention.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVaria... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/cf0ed1aba9c41123ba46f7c0788a4df10fbfe1ef/experimental/gradually-typed/src/Torch/GraduallyTyped/NN/Transformer/GCrossAttention.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Generic cross-attention layer data type.
- @initialLayerNorm@: the initial layer normalization
- @mha@: the multi-headed attention layer
- @dropout@: the dropout layer
- @finalLayerNorm@: the final layer normalization
| initial layer normalization of the cross-... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators ... |
c686a79cc709b64c038cced56afbac1740f6cc5ed032c7ba8e64b04ef19bcc0c | foreverbell/project-euler-solutions | 89.hs |
roman :: String -> String
roman ('I':'I':'I':'I':r) = 'I':'V':roman r
roman ('V':'I':'I':'I':'I': r) = 'I':'X':roman r
roman ('X':'X':'X':'X':r) = 'X':'L':roman r
roman ('L':'X':'X':'X':'X':r) = 'X':'C':roman r
roman ('C':'C':'C':'C':r) = 'C':'D':roman r
roman ('D':'C':'C':'C':'C':r) = 'C':'M':roman r... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/89.hs | haskell |
roman :: String -> String
roman ('I':'I':'I':'I':r) = 'I':'V':roman r
roman ('V':'I':'I':'I':'I': r) = 'I':'X':roman r
roman ('X':'X':'X':'X':r) = 'X':'L':roman r
roman ('L':'X':'X':'X':'X':r) = 'X':'C':roman r
roman ('C':'C':'C':'C':r) = 'C':'D':roman r
roman ('D':'C':'C':'C':'C':r) = 'C':'M':roman r... | |
0671123b5bb889cc1544615c8059432e94c9925eddb6f4de927d102f037ae351 | elastic/eui-cljs | colors.cljs | (ns eui.themes.colors
(:require ["@elastic/eui/lib/themes/amsterdam/global_styling/variables/_colors.js" :as eui]))
(def special_colors eui/special_colors)
(def shade_colors eui/shade_colors)
(def dark_shades eui/dark_shades)
(def brand_colors eui/brand_colors)
(def dark_colors_ams eui/dark_colors_ams)
(def lig... | null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/themes/colors.cljs | clojure | (ns eui.themes.colors
(:require ["@elastic/eui/lib/themes/amsterdam/global_styling/variables/_colors.js" :as eui]))
(def special_colors eui/special_colors)
(def shade_colors eui/shade_colors)
(def dark_shades eui/dark_shades)
(def brand_colors eui/brand_colors)
(def dark_colors_ams eui/dark_colors_ams)
(def lig... | |
ec8dcb74f3a86eb342defceaaf8b80bff146b81ff2791cfcf62110f01366ca37 | geophf/1HaskellADay | Exercise.hs | # LANGUAGE OverloadedStrings , QuasiQuotes , TypeSynonymInstances #
module Y2017.M12.D26.Exercise where
-
Yesterday , we were able to parse the HTML content of articles stored in JSON .
But we want to take a step back today , and go back to before then when we
simply ingested the JSON as blocks of ( unprocesse... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M12/D26/Exercise.hs | haskell | }
-
Read in subset.json from D20 exercise, now: save each article block to the
PostgreSQL database.
-
(also image attached from the Entity-relation diagram)
insertStagedArt stores a set of articles and returns the ids the database
assigns to these articles it stores
What are these stored article ids? How many artic... | # LANGUAGE OverloadedStrings , QuasiQuotes , TypeSynonymInstances #
module Y2017.M12.D26.Exercise where
-
Yesterday , we were able to parse the HTML content of articles stored in JSON .
But we want to take a step back today , and go back to before then when we
simply ingested the JSON as blocks of ( unprocesse... |
2341862a510a6d4ffaa1a566bd1d023d14ce033d74f952997f3e153c293294d5 | helium/router | router_discovery_SUITE.erl | -module(router_discovery_SUITE).
-export([
all/0,
init_per_testcase/2,
end_per_testcase/2
]).
-export([discovery_test/1, fail_to_connect_test/1]).
-include_lib("helium_proto/include/blockchain_state_channel_v1_pb.hrl").
-include_lib("helium_proto/include/discovery_pb.hrl").
-include_lib("common_test/incl... | null | https://raw.githubusercontent.com/helium/router/0b553f0c7b192ed52387fe807760cdec779c9d74/test/router_discovery_SUITE.erl | erlang | --------------------------------------------------------------------
COMMON TEST CALLBACK FUNCTIONS
--------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Running tests for this suite
@end
-------------------------------------... | -module(router_discovery_SUITE).
-export([
all/0,
init_per_testcase/2,
end_per_testcase/2
]).
-export([discovery_test/1, fail_to_connect_test/1]).
-include_lib("helium_proto/include/blockchain_state_channel_v1_pb.hrl").
-include_lib("helium_proto/include/discovery_pb.hrl").
-include_lib("common_test/incl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.