_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 |
|---|---|---|---|---|---|---|---|---|
4eb73f8f4b75ea878e332fc1ac28edaaaa1f2bcc97e4af2d7b2df64b649179f2 | 2600hz/kazoo | knm_ops.erl | %%%-----------------------------------------------------------------------------
( C ) 2015 - 2020 , 2600Hz
%%% @doc Bulk operations on numbers.
%%%
%%% <div class="notice">Functions should not throw, instead should return
%%% {@link knm_pipe:collection()}.</div>
%%%
@author
@author
This Source Code Form i... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/knm_ops.erl | erlang | -----------------------------------------------------------------------------
@doc Bulk operations on numbers.
<div class="notice">Functions should not throw, instead should return
{@link knm_pipe:collection()}.</div>
@end
-----------------------------------------------------------------------------
------------... | ( C ) 2015 - 2020 , 2600Hz
@author
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(knm_ops).
-export([get/1, get/2
,create/2
,move/2, move/3
... |
5d3012c0123f20b4842d8e5a8b8220c0dad0c177326c1b2eb6fff631f9700262 | athos/admin-kit | core.cljs | (ns admin-kit.views.core
(:require [reagent.core :as reagent]
[re-frame.core :as r]
[cljsjs.react-bootstrap]
[admin-kit.handlers :as handlers]
[admin-kit.subs]
[admin-kit.views.utils :as utils]
[admin-kit.views.nav :as nav]
[admin-kit... | null | https://raw.githubusercontent.com/athos/admin-kit/0c18d85ea5c5d187a5712a9741e6c9cc776d3afb/src/cljs/lib/admin_kit/views/core.cljs | clojure | (ns admin-kit.views.core
(:require [reagent.core :as reagent]
[re-frame.core :as r]
[cljsjs.react-bootstrap]
[admin-kit.handlers :as handlers]
[admin-kit.subs]
[admin-kit.views.utils :as utils]
[admin-kit.views.nav :as nav]
[admin-kit... | |
c616928f8b9f7df532fae936f5a7a0f77e40ee1cda6408bb0aab5186f9f617da | dfinity-side-projects/dhc | bm.hs | -- Benchmark parsing.
import Criterion.Main
import qualified Data.ByteString as B
import Hero.Parse
import WasmOp
main :: IO ()
main = do
s <- B.getContents
defaultMain $ pure $ bench "parse" $ (`whnf` s) $ functions . either error id . parseWasm
| null | https://raw.githubusercontent.com/dfinity-side-projects/dhc/60ac6c85ca02b53c0fdd1f5852c1eaf35f97d579/src/Hero/test/bm.hs | haskell | Benchmark parsing. | import Criterion.Main
import qualified Data.ByteString as B
import Hero.Parse
import WasmOp
main :: IO ()
main = do
s <- B.getContents
defaultMain $ pure $ bench "parse" $ (`whnf` s) $ functions . either error id . parseWasm
|
47222cc155d9fd9e6391c318f166754b04f598d9999252ff8de0365fe03886ca | polyfy/polylith | non_top_namespace.clj | (ns polylith.clj.core.workspace-clj.non-top-namespace
(:require [clojure.string :as str]
[polylith.clj.core.file.interface :as file]
[polylith.clj.core.common.interface :as common]
[polylith.clj.core.util.interface.str :as str-util]))
(defn is-not-top-ns? [path top-src-dir]
(not... | null | https://raw.githubusercontent.com/polyfy/polylith/858363d7db5d3bc439074be451ff42765f405a76/components/workspace-clj/src/polylith/clj/core/workspace_clj/non_top_namespace.clj | clojure | (ns polylith.clj.core.workspace-clj.non-top-namespace
(:require [clojure.string :as str]
[polylith.clj.core.file.interface :as file]
[polylith.clj.core.common.interface :as common]
[polylith.clj.core.util.interface.str :as str-util]))
(defn is-not-top-ns? [path top-src-dir]
(not... | |
123c354991f83cdb1f51fd1057b79ef8ede727d1e8c4db02909f3cb739d750ff | ocaml-multicore/tezos | baking_commands_registration.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_delegate/baking_commands_registration.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
3d5444919500145d866ffaac9804ddb70dba5c879fb43bc687386c2fc20bc244 | sogaiu/alc.x-as-tests | rewrite.clj | (ns alc.x-as-tests.impl.rewrite
(:require
[alc.x-as-tests.impl.ast :as ast]
[alc.x-as-tests.impl.ex :as ex]
[alc.x-as-tests.impl.utils :as utils]
[clojure.string :as cs]))
(defn last-non-whitespace
[nodes]
(utils/last-not nodes ast/whitespace?))
(comment
(last-non-whitespace [(ast/first-form " ")... | null | https://raw.githubusercontent.com/sogaiu/alc.x-as-tests/86cfc58393f4d81e1a74d58e85f89717afb3d9b0/src/alc/x_as_tests/impl/rewrite.clj | clojure | => nil
=> "(clojure.test/deftest test-at-line-7650)"
=> "{:a a}"
the point of this is splicing
=> "(= 2 (+ 1 1))"
=> "(clojure.test/is (= 2 (+ 1 1)))"
XXX: deftest style for the moment
splicing seems cumbersome
XXX: abstract out?
pass through
rewrite
XXX: tweaking this leads to test tweaking...
rewritten... | (ns alc.x-as-tests.impl.rewrite
(:require
[alc.x-as-tests.impl.ast :as ast]
[alc.x-as-tests.impl.ex :as ex]
[alc.x-as-tests.impl.utils :as utils]
[clojure.string :as cs]))
(defn last-non-whitespace
[nodes]
(utils/last-not nodes ast/whitespace?))
(comment
(last-non-whitespace [(ast/first-form " ")... |
3f464c947e408f9c7cb459c58a15d43bd086a723c0e8208214e97bf1f309743f | ktakashi/sagittarius-scheme | types.scm | ;;; -*- Scheme -*-
;;;
;;; types.scm - ASN.1 basic types
;;;
Copyright ( c ) 2009 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must re... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/18086ec8343823a0c7f5c90aa5d253246d0dca13/sitelib/asn.1/types.scm | scheme | -*- Scheme -*-
types.scm - ASN.1 basic types
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the fo... | Copyright ( c ) 2009 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (asn.1 types)
(expo... |
151b57e467eeeb2bf42b41575cddae79f6c422c3ba5dab30f59b4d1d17da852f | cnuernber/charred | csv_test.clj | (ns charred.csv-test
(:require [charred.api :refer [read-csv] :as api]
[clojure.test :refer [deftest is testing]]))
(deftest funky-csv
(is (= [["a,b" "c\"def\"" "one,two" "\"a,b,c\"def\"g\""]
["abba" "def" "1" "2"]
["df" "ef" "5" ""]]
(->> (read-csv (java.io.File. "test/da... | null | https://raw.githubusercontent.com/cnuernber/charred/c7bcf9af0410a92180f4aa51d8f52800e663d95c/test/charred/csv_test.clj | clojure | Make;Model
Ford;E350
Mercury;Cougar
)]
Test to ensure that contiuning any particular parse pathway
into a new buffer works. | (ns charred.csv-test
(:require [charred.api :refer [read-csv] :as api]
[clojure.test :refer [deftest is testing]]))
(deftest funky-csv
(is (= [["a,b" "c\"def\"" "one,two" "\"a,b,c\"def\"g\""]
["abba" "def" "1" "2"]
["df" "ef" "5" ""]]
(->> (read-csv (java.io.File. "test/da... |
054e8cd77cee14251fe8b96d6c0bcdf44548156b27324fc6099e99c13ee5119a | finnishtransportagency/harja | kulut.clj | (ns harja.palvelin.palvelut.kulut
"Nimiavaruutta käytetään vain urakkatyypissä teiden-hoito (MHU)."
(:require [com.stuartsierra.component :as component]
[clojure.string :as str]
[taoensso.timbre :as log]
[harja.kyselyt
[kulut :as q]
[kustannusarvioidut-t... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/1c9ed494fe3e33b8bb919b59b4e2b336bad50cc0/src/clj/harja/palvelin/palvelut/kulut.clj | clojure | [[:taulukko
{:otsikko Tehtäväryhmä}
{:otsikko Maksuerä}
{:otsikko Summa}] | (ns harja.palvelin.palvelut.kulut
"Nimiavaruutta käytetään vain urakkatyypissä teiden-hoito (MHU)."
(:require [com.stuartsierra.component :as component]
[clojure.string :as str]
[taoensso.timbre :as log]
[harja.kyselyt
[kulut :as q]
[kustannusarvioidut-t... |
fd3eef6f4d13beb8a91e3832baa1616d6004d46053c61a465f9665fa6304c125 | lexi-lambda/racket-commonmark | entity.rkt | #lang racket/base
(require (for-syntax racket/base
racket/match
racket/runtime-path
json)
racket/match
syntax/parse/define
"../regexp.rkt")
(provide decode-entities
try-read-entity)
;; ---------------------------------... | null | https://raw.githubusercontent.com/lexi-lambda/racket-commonmark/1d7f1d5fc70bedfbe201c2e794da69dc7afe6e63/commonmark-lib/commonmark/private/parse/entity.rkt | racket | -----------------------------------------------------------------------------
The authoritative list of HTML entity names, retrieved from
<>. | #lang racket/base
(require (for-syntax racket/base
racket/match
racket/runtime-path
json)
racket/match
syntax/parse/define
"../regexp.rkt")
(provide decode-entities
try-read-entity)
(begin-for-syntax
(define-runtime... |
c7f776cac181c784f70f2cb88b2b34f9138d7f76d533bfbe7e7a56f54e999ee3 | rabbitmq/rabbitmq-shovel | parameters_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(parameters_SUITE).
-compile(export_all).... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-shovel/f9f4e95343a81aea093687b0fd610711bd3f70ac/test/parameters_SUITE.erl | erlang |
-------------------------------------------------------------------
Testsuite setup/teardown.
-------------------------------------------------------------------
-------------------------------------------------------------------
Testcases.
------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(parameters_SUITE).
-compile(export_all).
-inc... |
53fc27076c3fa232c214bd9d05f14a532449f85f720e4a6d82098abef5ea2ac8 | rvalentini/fix.core | components.clj | (ns fix.definitions.components
(:require [clojure.edn :as edn]
[taoensso.timbre :refer [error]])
(:import (java.io FileNotFoundException)))
(def components (try
(edn/read-string (slurp "resources/components.edn"))
(catch FileNotFoundException _
... | null | https://raw.githubusercontent.com/rvalentini/fix.core/bb4476842d0c876f8cced95b3e350cf64ce3ceae/src/fix/definitions/components.clj | clojure | (ns fix.definitions.components
(:require [clojure.edn :as edn]
[taoensso.timbre :refer [error]])
(:import (java.io FileNotFoundException)))
(def components (try
(edn/read-string (slurp "resources/components.edn"))
(catch FileNotFoundException _
... | |
b8baa6c86923e61589e02556982255c1a75403b05b83c1f2607bb909ab9715fb | melange-re/melange | test_ramification.ml |
let ff x =
let a =
match x with
| "0"
|"1"
|"2" -> 3
| "3" -> 4
| "4" -> 6
| "7" -> 7
| _ -> 8
in a + 3
let f2 x =
(
match x with
| "0"
|"1"
|"2" -> 3
| "3" -> 4
| "4" -> 6
| "7" -> 7
| _ -> 8
) + 3
type u = A of int * int | B of int
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_ramification.ml | ocaml |
let ff x =
let a =
match x with
| "0"
|"1"
|"2" -> 3
| "3" -> 4
| "4" -> 6
| "7" -> 7
| _ -> 8
in a + 3
let f2 x =
(
match x with
| "0"
|"1"
|"2" -> 3
| "3" -> 4
| "4" -> 6
| "7" -> 7
| _ -> 8
) + 3
type u = A of int * int | B of int
... | |
624aacd809a1d4f907e8e3da5ffb9c5a4f2186311860d29a4d5f980c4b77a2de | l29ah/Network-NineP | Msg.hs | # LANGUAGE OverloadedStrings , FlexibleContexts #
module Network.NineP.Internal.Msg
( Config(..)
, rversion
, rattach
, rwalk
, rstat
, rwstat
, rclunk
, rauth
, ropen
, rcreate
, rread
, rwrite
, rremove
, rflush
) where
import Control.Concurrent.MState hiding (put)
import Control.Exception
import Con... | null | https://raw.githubusercontent.com/l29ah/Network-NineP/90df325f1a72c7d188d985da4ca2deff46e999fe/Network/NineP/Internal/Msg.hs | haskell | TODO meaningful flush behaviour instead of pretending it works | # LANGUAGE OverloadedStrings , FlexibleContexts #
module Network.NineP.Internal.Msg
( Config(..)
, rversion
, rattach
, rwalk
, rstat
, rwstat
, rclunk
, rauth
, ropen
, rcreate
, rread
, rwrite
, rremove
, rflush
) where
import Control.Concurrent.MState hiding (put)
import Control.Exception
import Con... |
410bae0975750117106a37a74f46251f6fe5ef20a292333c0ba8cdeecc5c04f4 | dieu/consulerl | consulerl_agent_tests.erl | -module(consulerl_agent_tests).
-include("consulerl.hrl").
-include("consulerl_eunit.hrl").
-include_lib("eunit/include/eunit.hrl").
-import(consulerl_eunit, [
command/4,
command_async/4,
command_async_twice/4
]).
setup_200(Response) -> fun() ->
ok = consulerl_eunit:setup_app(),
ok = consulerl_eunit:s... | null | https://raw.githubusercontent.com/dieu/consulerl/a8c003dbc380911a1ad90a3468e60017aef38c79/test/consulerl_agent_tests.erl | erlang | -module(consulerl_agent_tests).
-include("consulerl.hrl").
-include("consulerl_eunit.hrl").
-include_lib("eunit/include/eunit.hrl").
-import(consulerl_eunit, [
command/4,
command_async/4,
command_async_twice/4
]).
setup_200(Response) -> fun() ->
ok = consulerl_eunit:setup_app(),
ok = consulerl_eunit:s... | |
9d4e2077fda34c8486367060f6d7031dd1d4f7b1df5d07a06c7fd04380f134a7 | GaloisInc/macaw | Translations.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Data.Macaw.SemMC.Translations (
bvconcat,
bvselect
) where
import GHC.TypeLits
import Data.Macaw.CFG
import qualified Data.Macaw.Memory as MM
import ... | null | https://raw.githubusercontent.com/GaloisInc/macaw/ff894f9286f976d0ab131325bea902ef6275aad2/macaw-semmc/src/Data/Macaw/SemMC/Translations.hs | haskell | # LANGUAGE GADTs #
| The implementation of bitvector concatenation
| # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Data.Macaw.SemMC.Translations (
bvconcat,
bvselect
) where
import GHC.TypeLits
import Data.Macaw.CFG
import qualified Data.Macaw.Memory as MM
import Data.Macaw.Types... |
c881f98c32f351e0641863a169e9e081a5c971f15ef0f26b11d8c281bc2fe272 | patrickt/miller | Main.hs | # LANGUAGE ImportQualifiedPost #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Main where
import Data.List (nub)
import Doors
import GHC.Stack
import Hedgehog hiding (Var (..))
import Hedgehog.Gen qualified as Gen
import Hedgehog.Internal.Gen qualified as Gen (ens... | null | https://raw.githubusercontent.com/patrickt/miller/b520e960c9131e5e10397a8180c79bf4c64137e8/test/Main.hs | haskell | # LANGUAGE OverloadedStrings #
--- TI tests | # LANGUAGE ImportQualifiedPost #
# LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
module Main where
import Data.List (nub)
import Doors
import GHC.Stack
import Hedgehog hiding (Var (..))
import Hedgehog.Gen qualified as Gen
import Hedgehog.Internal.Gen qualified as Gen (ensure)
import Hedgehog.Internal.Prope... |
0e0fa63b8444eef16e28f08cf1c4ebc446d2154fc1f0a5998d197647c80030bc | smart-chain-fr/tokenomia | Environment.hs | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ImportQualifiedPost #
module Tokenomia.Common.Environment
( getTestnetEnvironmment
, getMainnetEnvironmment
, getPreprodEnvironmment
, getNetworkEnvironmment
, readNetworkM... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/8f3ec5df0713b866dfab5e52a76e34111d6052f5/src/Tokenomia/Common/Environment.hs | haskell | as I was thinking initially... I won't delete the code from now, but it will be eventually...
losing the milliseconds precision. | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ImportQualifiedPost #
module Tokenomia.Common.Environment
( getTestnetEnvironmment
, getMainnetEnvironmment
, getPreprodEnvironmment
, getNetworkEnvironmment
, readNetworkM... |
da18b869c4a899a5024347639d7e9df9b8d5a9221bf526f8cb6f19b7988b3ce1 | sile/logi | logi_location.erl | 2014 - 2016 < >
%%
%% @doc The location where log message issued
%%
%% == EXAMPLE ==
%% <pre lang="erlang">
> Location = logi_location : new(lists , filter , 10 ) .
%% > logi_location:to_map(Location).
%% #{application => stdlib,
%% function => filter,
line = > 10 ,
%% module => lists,
%% process => &... | null | https://raw.githubusercontent.com/sile/logi/1022fbc238a7d18765fe864a7174958142160ee8/src/logi_location.erl | erlang |
@doc The location where log message issued
== EXAMPLE ==
<pre lang="erlang">
> logi_location:to_map(Location).
#{application => stdlib,
function => filter,
module => lists,
process => <0.91.0>}
</pre>
{@link guess_location/0} returns the current location.
<pre lang="erlang">
> Location = logi... | 2014 - 2016 < >
> Location = logi_location : new(lists , filter , 10 ) .
line = > 10 ,
= WARNING REPORT==== 19 - Oct-2015::14:02:26 = = =
line : 673
line = > 673 ,
-module(logi_location).
-deprecated({guess_location, 0}).
-export([new/3, new/5, unsafe_new/5]).
-export([is_location/1]).
-export(... |
a8c8845bcb484348f1b191443aeb5c779e446bfba30edb2af9cf4413d2992ffc | DavidAlphaFox/RabbitMQ | rabbit_stomp_processor.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-stomp/src/rabbit_stomp_processor.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
958805b6ee85b6b49b28d7d55c66045d8e0e9aa3e9a77771cb8e64f6299c46af | erlang/otp | observer_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/observer/test/observer_SUITE.erl | erlang |
%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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2006 - 2023 . 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(observer_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("wx/include/wx.hrl").
-include_lib... |
21debcc9e152ee25145dc9fa8d9ee05eddffb42b0c5d443ea6449bc09faf17de | kadena-io/pact | PersistSpec.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
module PersistSpec (spec) where
import Test.Hspec
import Pact.PersistPactDb.Regression
import qualified Pact.Persist.SQLite as SQLite
import System.Directory
import Control.Monad
import Pact.Types.Logger
import Control.Concurrent
spec :: Spec
spec = do
... | null | https://raw.githubusercontent.com/kadena-io/pact/603f1523162c95742fb3e040ac065ff82f2b2aea/tests/PersistSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module PersistSpec (spec) where
import Test.Hspec
import Pact.PersistPactDb.Regression
import qualified Pact.Persist.SQLite as SQLite
import System.Directory
import Control.Monad
import Pact.Types.Logger
import Control.Concurrent
spec :: Spec
spec = do
it "regress Pure" (void $ regressP... |
6e10396f63c131abce99fc50e36bbe1f9d5757d15343ccc717e75b6e6c6a2cfb | ashinn/chibi-scheme | 134.scm | ;;;
;;; srfi-134 reference implementation
;;;
Copyright ( c ) 2015 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copyrig... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/134.scm | scheme |
srfi-134 reference implementation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disc... | Copyright ( c ) 2015 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
Purely Functional Data Structures .
Original... |
f2c0e2d419f3edf76e216ab80709a650a236949087aaa16a0a1b80a5f8ba3825 | jimrthy/frereth | hello.cljs | (ns frereth.apps.roadblocks.hello)
(throw (ex-info "This just doesn't fit"))
(defn click-counter [click-count]
[:div
"The atom " [:code "click-count"] " has value: "
@click-count ". "
[:input {:type "button" :value "Click me!"
:on-click #(swap! click-count inc)}]])
(def click-count (atom 0))
... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/roadblocks/src/cljs/frereth/apps/roadblocks/hello.cljs | clojure | (ns frereth.apps.roadblocks.hello)
(throw (ex-info "This just doesn't fit"))
(defn click-counter [click-count]
[:div
"The atom " [:code "click-count"] " has value: "
@click-count ". "
[:input {:type "button" :value "Click me!"
:on-click #(swap! click-count inc)}]])
(def click-count (atom 0))
... | |
e5a27ecdc5af87df282c7dfc7fd3882b4566a11ea9ceadc1f4305fa344041a60 | Carnap/Carnap | Bonevac.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PurePropositional.Logic.Bonevac
(parseBonevacSL, parseBonevacSLProof, BonevacSL(..), bonevacSLCalc) where
import Data.Map as M (lookup, Map)
import Data.Char
import Text.Parsec
import Carnap.Core.Data.Types (Form)
im... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Languages/PurePropositional/Logic/Bonevac.hs | haskell | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PurePropositional.Logic.Bonevac
(parseBonevacSL, parseBonevacSLProof, BonevacSL(..), bonevacSLCalc) where
import Data.Map as M (lookup, Map)
import Data.Char
import Text.Parsec
import Carnap.Core.Data.Types (Form)
im... | |
0474c5ab0b6a45ea63c937b81a2fe495cdf84e0690fba4dc0ca3b44c7bb82917 | ocamllabs/ocaml-modular-implicits | subst.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/typing/subst.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Misc
open Path
open Types
open Bt... |
26a353d32545007536922f0f14261d69f1e7b59b62ae27bc9b5e345a706653f4 | jaspervdj/blaze-html | TestSuite.hs | -- | Main module to run all tests.
--
module Main where
import Test.Framework (defaultMain, testGroup)
import qualified Text.Blaze.Html.Tests
import qualified Util.Tests
main :: IO ()
main = defaultMain
[ testGroup "Text.Blaze.Html.Tests" Text.Blaze.Html.Tests.tests
, testGroup "Util.Tests" Util.... | null | https://raw.githubusercontent.com/jaspervdj/blaze-html/1c76db3cf02712569fd22b021fb0a367df028eb4/tests/TestSuite.hs | haskell | | Main module to run all tests.
| module Main where
import Test.Framework (defaultMain, testGroup)
import qualified Text.Blaze.Html.Tests
import qualified Util.Tests
main :: IO ()
main = defaultMain
[ testGroup "Text.Blaze.Html.Tests" Text.Blaze.Html.Tests.tests
, testGroup "Util.Tests" Util.Tests.tests
]
|
973b6e5ccde8243c2db30431455dcc08d5f01c44369adeed2a9450e5642fb957 | janestreet/sexp | located.mli | open! Core
(* container type where each element is associated with some labeled input source *)
type 'a t
(* [stdin label_opt] indicates standard input as a labeled sources *)
val stdin : string option -> unit t
(* [files [f1; f2; ... ;fn]]
indicates files [f1] ... [f2] as sources labeled with their own filenam... | null | https://raw.githubusercontent.com/janestreet/sexp/56e485b3cbf8a43e1a8d7647b0df31b27053febf/bin/located.mli | ocaml | container type where each element is associated with some labeled input source
[stdin label_opt] indicates standard input as a labeled sources
[files [f1; f2; ... ;fn]]
indicates files [f1] ... [f2] as sources labeled with their own filenames
open all associated input channels
map across the container
ite... | open! Core
type 'a t
val stdin : string option -> unit t
val files : string list -> unit t
val channels : unit t -> In_channel.t t
val map : 'a t -> f:('a -> 'b) -> 'b t
val iter : 'a t -> f:(string -> 'a -> unit) -> unit
|
137ab6c312f6d3496e2d1c397b87b69bcf63f2f8bbcae36edf68854c06f62363 | phylogeography/spread | components.cljs | (ns analysis-viewer.components
(:require [re-frame.core :refer [dispatch subscribe]]
[reagent.core :as r]))
(defn switch-button [{:keys [id]}]
(let [on? @(subscribe [:switch-buttons/on? id])]
[:div.switch-button {:class (if on? "on" "off")
:on-click (fn [evt]
... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/analysis_viewer/components.cljs | clojure | if it is vertical? it will store y, x otherwise | (ns analysis-viewer.components
(:require [re-frame.core :refer [dispatch subscribe]]
[reagent.core :as r]))
(defn switch-button [{:keys [id]}]
(let [on? @(subscribe [:switch-buttons/on? id])]
[:div.switch-button {:class (if on? "on" "off")
:on-click (fn [evt]
... |
525005ae7a9f00409a9c1df5c804e69c043c5c2e35d43207219123ed52467722 | hipsleek/hipsleek | myocamlbuild.ml | open Ocamlbuild_plugin
open Command
;;
dispatch begin
function
| After_rules ->
(* the main CIL library *)
ocaml_lib "src/cil";
(* residual reliance on make to build some OCaml source files *)
let make target =
let basename = Pathname.basename target in
rule ("make " ^ target)
~dep: "Makefile"... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/myocamlbuild.ml | ocaml | the main CIL library
residual reliance on make to build some OCaml source files | open Ocamlbuild_plugin
open Command
;;
dispatch begin
function
| After_rules ->
ocaml_lib "src/cil";
let make target =
let basename = Pathname.basename target in
rule ("make " ^ target)
~dep: "Makefile"
~prod: basename
begin
fun env _ ->
Cmd (S [A "make";
A "-s";
A "-C";... |
a9ae96632d028058f88ef47367935988f574f9b2c3a78316d05f1c2f0e44ecb6 | aumouvantsillage/Hydromel-lang | instance.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"slot.rkt"
"signal.rkt"
"types.rkt")
(provide
instance-ref
instance-ref*
instance-set!
instance-dump)
; ... | null | https://raw.githubusercontent.com/aumouvantsillage/Hydromel-lang/914f31409654289f362a9b3d47bcdcd42e391448/hydromel/lib/instance.rkt | racket | Get the content of the given instance at the given path.
`path` is a list of symbols and integers that represent port names and indices.
Get the slot value in the given instance at the given path.
Assign a new value to a slot in the given instance at the given path.
Flatten a hierarchy of instances into a dictiona... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"slot.rkt"
"signal.rkt"
"types.rkt")
(provide
instance-ref
instance-ref*
instance-set!
instance-dump)
(d... |
ae08d4bdcad646db6af63b4b6cd312f4fa62eea9b38e567d010f35f7bde92045 | isovector/ld52 | CollectPowerup.hs | module Game.Objects.CollectPowerup where
import Game.Common
collectPowerup :: V2 WorldPos -> PowerupType -> Object
collectPowerup pos pt
oscillate ( \t - > coerce $ V2 0 ( cos ( t * 5 ) * 0.3 ) )
$ onHitByTag IsPlayer
( mconcat
[ standardDeathResponse
, playSoundReponse CoinSound
... | null | https://raw.githubusercontent.com/isovector/ld52/2589e0392b74d947dac247acb462702998368f64/src/Game/Objects/CollectPowerup.hs | haskell | module Game.Objects.CollectPowerup where
import Game.Common
collectPowerup :: V2 WorldPos -> PowerupType -> Object
collectPowerup pos pt
oscillate ( \t - > coerce $ V2 0 ( cos ( t * 5 ) * 0.3 ) )
$ onHitByTag IsPlayer
( mconcat
[ standardDeathResponse
, playSoundReponse CoinSound
... | |
e5d3076e52e58760af1de5cc1a587e830873b42dc7c10730a52c7c049a44bc76 | geophf/1HaskellADay | Exercise.hs | module Y2018.M02.D01.Exercise where
{--
So there's a clever algorithm to find whether words are anagrams.
So, from the fundamental theorem of arithmetic we know that an integer is an
unique product of primes, so, knowing that, we can substitute letters for
primesand, boom, our 'hashing algorithm' 'automagically' fal... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M02/D01/Exercise.hs | haskell | -
So there's a clever algorithm to find whether words are anagrams.
So, from the fundamental theorem of arithmetic we know that an integer is an
unique product of primes, so, knowing that, we can substitute letters for
primesand, boom, our 'hashing algorithm' 'automagically' falls out:
all words with the same prime ... | module Y2018.M02.D01.Exercise where
import Data.Map (Map)
localDictionary :: FilePath
localDictionary = "/usr/share/dict/words"
anagramSets :: [String] -> Map Integer [String]
anagramSets words = undefined
Which sets have the most words that are anagrams ? There may be more than one
|
61902d24cb6e9159b6fe30d0a2758289e8ba02974b6031ad75a27554c59a07f1 | ktakashi/sagittarius-scheme | descriptors.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; sagittarius/crypto/descriptor.scm - Crypto descriptors
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; ... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/14c57d84e46b2ac24f9a127585cf77dc019ba006/ext/crypto/sagittarius/crypto/descriptors.scm | scheme | coding : utf-8 ; -*-
sagittarius/crypto/descriptor.scm - Crypto descriptors
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
not... | Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
Basically a wrapper of underlying crypto engine (... |
bd9bb11c2c3e55c2cd03ca2771315becd8ce104ab97d8a1306ee53f21b87d399 | dcolthorp/matchure | compile.clj | (ns matchure.compile
(:require [clojure.zip :as zip]
[clojure.walk :as walk]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Utilities
(defmacro with-gensyms "Create gensyms bound to names." [names & code]
(let [syms (into [] (map (fn [name] `(gensym '~name)) name... | null | https://raw.githubusercontent.com/dcolthorp/matchure/88cc1654b05d2a01c41f859d3b78599ade420372/src/matchure/compile.clj | clojure |
state manipulation/usage helpers
Pattern match compilation
Pattern compilation
ad-hoc hierarchies for dispatching compilation
Default compilation matching - use the pattern matcher stored in state
Regular Expressions
Variables
Vectors - the sequence type that is destructured, a la let
Maps - pattern match... | (ns matchure.compile
(:require [clojure.zip :as zip]
[clojure.walk :as walk]))
Utilities
(defmacro with-gensyms "Create gensyms bound to names." [names & code]
(let [syms (into [] (map (fn [name] `(gensym '~name)) names))]
`(let [~names ~syms]
~@code)))
(defn variable-binding? "Decide w... |
4f45d947eb51e654f60607053cab334f6a488ef6499a8c7aa919b48112d59928 | crategus/cl-cffi-gtk | gtk.stock-images.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.stock-images.lisp
;;;
;;; The documentation of this file is taken from the GTK 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK library .
;;; See <>. The API documentation of the Lisp binding i... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/gtk/gtk.stock-images.lisp | lisp | ----------------------------------------------------------------------------
gtk.stock-images.lisp
The documentation of this file is taken from the GTK 3 Reference Manual
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms... | Version 3.24 and modified to document the Lisp binding to the GTK library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2009 - 2011
Copyright ( C ) 2011 - 2021
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Public License that clarifies the terms for us... |
c8930a1bbb82e6a7ab68eb650073c7d41f5260944917766f07bd4c6462f749f8 | yakaz/yamerl | ex_8.3_invalid_block_scalar_indentation_indicators_1.erl | -module('ex_8.3_invalid_block_scalar_indentation_indicators_1').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
13,
true,
[],
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_8.3_invalid_block_scalar_indentation_indicators_1.erl | erlang | -module('ex_8.3_invalid_block_scalar_indentation_indicators_1').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
13,
true,
[],
... | |
2f8f341c1d49d05ae75c66b9413e907a2f40369b3610f010c085bbcc1f8e4f97 | helium/blockchain-core | blockchain_region_suite_helper.erl | -module(blockchain_region_suite_helper).
-include("blockchain_region_test.hrl").
-export([
serialized_us915/0,
serialized_eu868/0,
serialized_au915/0,
serialized_as923_1/0,
serialized_as923_1b/0,
serialized_as923_2/0,
serialized_as923_3/0,
serialized_as923_4/0,
serialized_ru864/0,
... | null | https://raw.githubusercontent.com/helium/blockchain-core/d1cbe7fb11ca604a01d4eb4d77d90e41f83ff7fd/test/blockchain_region_suite_helper.erl | erlang | --------------------------------------------------------------------
helpers
-------------------------------------------------------------------- | -module(blockchain_region_suite_helper).
-include("blockchain_region_test.hrl").
-export([
serialized_us915/0,
serialized_eu868/0,
serialized_au915/0,
serialized_as923_1/0,
serialized_as923_1b/0,
serialized_as923_2/0,
serialized_as923_3/0,
serialized_as923_4/0,
serialized_ru864/0,
... |
36276e774909a8093d72ab96ae57bdf888ba6a91067d585d360de54ae960fb37 | kino3/Mini-TT | Par.hs | # OPTIONS_GHC -w #
# OPTIONS_GHC -fno - warn - incomplete - patterns -fno - warn - overlapping - patterns #
module Core.Par where
import Core.Abs
import Core.Lex
import Core.ErrM
import Control.Applicative(Applicative(..))
import Control.Monad (ap)
-- parser produced by Happy Version 1.19.5
data HappyAbsSyn ... | null | https://raw.githubusercontent.com/kino3/Mini-TT/442b08f9a56c25ff79bc8c007c78be6197daed61/Core/Par.hs | haskell | parser produced by Happy Version 1.19.5
# LINE 1 "templates\GenericTemplate.hs" #
# LINE 1 "templates\\GenericTemplate.hs" #
# LINE 1 "<built-in>" #
# LINE 1 "<command-line>" #
# LINE 1 "G:\\GitHub\\haskell-platform\\build\\ghc-bindist\\local\\lib/include\\ghcversion.h" #
# LINE 7 "<command-line>" #
# LINE 1 "templat... | # OPTIONS_GHC -w #
# OPTIONS_GHC -fno - warn - incomplete - patterns -fno - warn - overlapping - patterns #
module Core.Par where
import Core.Abs
import Core.Lex
import Core.ErrM
import Control.Applicative(Applicative(..))
import Control.Monad (ap)
data HappyAbsSyn
= HappyTerminal (Token)
| HappyErrorTok... |
be25d1608ab903099adf76495c9980bba371610ee02a227082ad41c2448daeb7 | mattmundell/nightshade | sync.lisp | ;;;; Syncing source trees.
(in-package "SYNC")
(export '(copy-manifest-tree update-manifest-times merge-from-server))
(defstruct (manifest-entry
(:constructor make-manifest-entry (name time)))
"An entry from a manifest file."
name
time)
FIX use m - p or make merge - pathnames work for these
(defun cop... | null | https://raw.githubusercontent.com/mattmundell/nightshade/7a67f9eac96414355de1463ec251b98237cb4009/src/code/sync.lisp | lisp | Syncing source trees.
FIX ::
FIX deftest
(read-manifest (build-server-pathname "localhost"
"/home/matt/src/nightshade/src/code/"
".manifest"))
(read-manifest (build-server-pathname "localhost:/usr/local/src/nightshade/"
"src/code/"
".manifest"))
Update client manifest entry ... |
(in-package "SYNC")
(export '(copy-manifest-tree update-manifest-times merge-from-server))
(defstruct (manifest-entry
(:constructor make-manifest-entry (name time)))
"An entry from a manifest file."
name
time)
FIX use m - p or make merge - pathnames work for these
(defun copy-manifest-tree (dir dest-d... |
4f164368053f66c13a626f8b253a61c67c574e35f02ac2b3b34851e2a26cb898 | ralphrecto/xic | pre.ml | open Core.Std
open Cfg
open Dataflow
open Ir
open Tiling
open Fresh
(* ************************************************************************** *)
Helpers
(* ************************************************************************** *)
module Expr... | null | https://raw.githubusercontent.com/ralphrecto/xic/7dddfc855775467244a7949ee6d311dd8150f748/src/ocaml/pre.ml | ocaml | **************************************************************************
**************************************************************************
**************************************************************************
Preprocessing Step
***********... | open Core.Std
open Cfg
open Dataflow
open Ir
open Tiling
open Fresh
Helpers
module ExprSet = struct
include Set.Make (struct
type t = expr [@@deriving sexp, compare]
end)
let concat_map xs ~f =
union_list (List.map xs ~f)
let to_st... |
4432008bef5a93daa34a3ca15e5e939a801eb4f0564f885969a3bd17f0160c7a | mathiasbourgoin/SPOC | VecAdd.ml |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2 , December 2004
Copyright ( C ) 2004 < >
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document , and changing it is allowed as long
as the name is changed .
... | null | https://raw.githubusercontent.com/mathiasbourgoin/SPOC/8cdaa01149655513a8e3708702786ddbd4033043/Samples/src/VecAdd/VecAdd.ml | ocaml | * VecAdd.ml
*
Kernel launch : computation
Kernel launch : computation |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2 , December 2004
Copyright ( C ) 2004 < >
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document , and changing it is allowed as long
as the name is changed .
... |
23c6ea3a5f0365a05fe22d8fa6aa02f6cad8450cdfb2cdd262b87f2affa422dc | kawu/dawg | Node.hs | # LANGUAGE RecordWildCards #
-- | Internal representation of dynamic automata nodes.
module Data.DAWG.Dynamic.Node
( Node(..)
, onSym
, edges
, children
, insert
) where
import Control.Applicative ((<$>), (<*>))
import Data.Binary (Binary, Get, put, get)
import Data.DAWG.Types
import Data.DAWG.Util (combine)
import... | null | https://raw.githubusercontent.com/kawu/dawg/1bb3d139aece1610eab255949951e21cb07648ff/src/Data/DAWG/Dynamic/Node.hs | haskell | | Internal representation of dynamic automata nodes.
| Two nodes (states) belong to the same equivalence class (and,
iff they are equal with respect to their values and outgoing
edges.
equal with respect to '==' function are always kept in one 'Leaf'
node in the graph. It doesn't change the fact that to all 'Br... | # LANGUAGE RecordWildCards #
module Data.DAWG.Dynamic.Node
( Node(..)
, onSym
, edges
, children
, insert
) where
import Control.Applicative ((<$>), (<*>))
import Data.Binary (Binary, Get, put, get)
import Data.DAWG.Types
import Data.DAWG.Util (combine)
import Data.DAWG.HashMap (Hash, hash)
import Data.DAWG.Trans.M... |
e788ceef2f2dfc2572225068766c4a1d032d7c8567f4b6bddeebf61618a7cb37 | neilprosser/mr-maestro | environments.clj | (ns maestro.environments
(:require [clojure.tools.logging :refer [warn]]
[maestro.lister :as lister]
[ninjakoala.ttlr :as ttlr]))
(defn environments
[]
(ttlr/state :environments))
(defn- map-by-name-kw
[values]
(apply merge (map (fn [v] {(keyword (:name v)) v}) values)))
(defn envir... | null | https://raw.githubusercontent.com/neilprosser/mr-maestro/469790fd712262016729c1d83d4b4e11869237a2/src/maestro/environments.clj | clojure | (ns maestro.environments
(:require [clojure.tools.logging :refer [warn]]
[maestro.lister :as lister]
[ninjakoala.ttlr :as ttlr]))
(defn environments
[]
(ttlr/state :environments))
(defn- map-by-name-kw
[values]
(apply merge (map (fn [v] {(keyword (:name v)) v}) values)))
(defn envir... | |
1ede4556acd69e481878d63f3bb6d93d3efca85c3e8bf0e801459945e611ee00 | ammarhakim/gkylcas | basisMax2x2v.lisp | ;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima)
(DSKSETQ |$varsC| '((MLIST SIMP) $X $Y))
(ADD2LNC '|$varsC| $VALUES)
(DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $VX $VY))
(ADD2LNC '|$varsP| $VALUES)
(DSKSETQ |$basisC|
'((MLIST SIMP
(10.
"/Users/JunoRavi... | null | https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g2/basis-precalc/basisMax2x2v.lisp | lisp | -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- | (in-package :maxima)
(DSKSETQ |$varsC| '((MLIST SIMP) $X $Y))
(ADD2LNC '|$varsC| $VALUES)
(DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $VX $VY))
(ADD2LNC '|$varsP| $VALUES)
(DSKSETQ |$basisC|
'((MLIST SIMP
(10.
"/Users/JunoRavin/gkyl/cas-scripts/basis-precalc/basis-pre-calc.mac"
... |
8467067bb7e9a22ac65276d832eec192ce76ddb28ce1bf5879fd19b4ff99fe79 | haskell-opengl/OpenGLRaw | BindlessTexture.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.BindlessTexture
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
----------------------------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/BindlessTexture.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.NV.BindlessTexture
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Functions | Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.NV.BindlessTexture (
glGetNVBindlessTexture,
gl_NV_bindless_texture,
glGetImageHandleNV,
glGetTextureHandleNV,
glGetTextureSamplerHandleNV,
glIsImageHandleResidentNV,
glIsTextureHandleResidentNV,
glMakeImageHandleNonResidentNV... |
98c521cdfce9426fd14a3c274e9ae4198919dc6cec43887ebd1d978f22d5e860 | PascalLG/nubo-hs | Spec.hs | -----------------------------------------------------------------------------
Nubo Client Application - Unit Testing
Copyright ( c ) 2017 ,
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the S... | null | https://raw.githubusercontent.com/PascalLG/nubo-hs/390212b73c31746f4ff03a3e341f92d657db0223/Client/test/Spec.hs | haskell | ---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished ... | Nubo Client Application - Unit Testing
Copyright ( c ) 2017 ,
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHO... |
4d8e96af929ab77b48b0ced150c21e517c6b9306791a56a508268af7c9fd2d82 | esl/ejabberd_tests | amp_SUITE.erl | -module(amp_SUITE).
%% @doc Tests for XEP-0079 Advanced Message Processing support
< a href=" / extensions / xep-0079.html">XEP-0079</a >
@author < >
2014 Erlang Solutions , Ltd.
This work was sponsored by Grindr.com
-compile([export_all]).
-include_lib("common_test/include/ct.hrl").
-include_lib("escalus/i... | null | https://raw.githubusercontent.com/esl/ejabberd_tests/913fb0a5a8c1ab753eb35c1e1b491e8572633b54/tests/amp_SUITE.erl | erlang | @doc Tests for XEP-0079 Advanced Message Processing support
given
drop is unsupported
when
then
given
expire-at is unsupported
when
then
given
when
then
given
when
then
given
when
then
given
when
then
given
when
then
given
when
then
given
when
then
given
when
then
given
when
then
gi... | -module(amp_SUITE).
< a href=" / extensions / xep-0079.html">XEP-0079</a >
@author < >
2014 Erlang Solutions , Ltd.
This work was sponsored by Grindr.com
-compile([export_all]).
-include_lib("common_test/include/ct.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xml... |
2986e77e423fd130408059a3e1e8b3984f154d4c63bc5228338e83b2826a09ba | iraikov/chicken-pyffi | h5py.scm | ;;
;; Example from Python h5py documentation.
;;
;;
;; This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
;; License, or (at your option) any later version.
;;
;; This progra... | null | https://raw.githubusercontent.com/iraikov/chicken-pyffi/9afea980df89ddb5a38f1c5e2b2af50b8aa4984a/examples/h5py.scm | scheme |
Example from Python h5py documentation.
This program is free software: you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A ... | modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
(import scheme (chicken base) pyffi)
(py-start)
(py-import "h5py")
(py-import "numpy")
(define-pyfun "h5py.File" name mode)
(define-pyslot "shape" Dataset.shape)
(define-pyslot "d... |
5b6c580c4f7d53823f6bad0b65d2ee5d136ad4c017012760e939190e75034ebe | chrisdone/prana | Float.hs | # LANGUAGE Trustworthy #
{-# LANGUAGE CPP
, GHCForeignImportPrim
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
, UnliftedFFITypes
#-}
# LANGUAGE CApiFFI #
-- We believe we could deorphan this module, by moving lots of things
-- around, but we haven't got there ... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/GHC/Float.hs | haskell | # LANGUAGE CPP
, GHCForeignImportPrim
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
, UnliftedFFITypes
#
We believe we could deorphan this module, by moving lots of things
around, but we haven't got there yet:
# OPTIONS_HADDOCK hide #
------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE CApiFFI #
# OPTIONS_GHC -Wno - orphans #
Copyright : ( c ) The University of Glasgow 1994 - 2002
Portions obtained from hbc ( c )
Portability : non - portable ( GHC Extensions )
The types ' Float ' and ' Double ' , the classes ' Floating ' and ' RealF... |
90962550e5a99adb33fb536ab6b9693f0c1c4f1f6926a0eca9f7d63c09e00d71 | Clozure/ccl-tests | mismatch.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Aug 26 23:55:29 2002
;;;; Contains: Tests for MISMATCH
(in-package :cl-test)
(deftest mismatch-list.1
(mismatch '() '(a b c))
0)
(deftest mismatch-list.2
(mismatch '(a b c d) '())
0)
(deftest mismatch-list.3
(mismatch '(a b c) '(a b c))
nil)
(de... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/mismatch.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for MISMATCH
tests on vectors
tests on bit vectors
tests on strings
test and test-not tests
Keyword tests
Order of evaluation
Error cases | Author :
Created : Mon Aug 26 23:55:29 2002
(in-package :cl-test)
(deftest mismatch-list.1
(mismatch '() '(a b c))
0)
(deftest mismatch-list.2
(mismatch '(a b c d) '())
0)
(deftest mismatch-list.3
(mismatch '(a b c) '(a b c))
nil)
(deftest mismatch-list.4
(mismatch '(a b c) '(a b d))
2)
... |
3c2a2c92f7ed8007b613281603c6f424fa92a3693dc1a148aad7dea8f309aa8d | expipiplus1/vulkan | VK_QCOM_tile_properties.hs | {-# language CPP #-}
-- | = Name
--
-- VK_QCOM_tile_properties - device extension
--
-- == VK_QCOM_tile_properties
--
-- [__Name String__]
-- @VK_QCOM_tile_properties@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
485
--
-- [__Revision__]
1
--
-- [__Extension... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_QCOM_tile_properties.hs | haskell | # language CPP #
| = Name
VK_QCOM_tile_properties - device extension
== VK_QCOM_tile_properties
[__Name String__]
@VK_QCOM_tile_properties@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR... | 485
1
- Requires support for Vulkan 1.0
-
2022 - 07 - 11
- , Qualcomm Technologies , Inc.
- , Qualcomm Technologies , Inc.
- , Qualcomm Technologies , Inc.
- , Qualcomm Technologies , Inc.
- ' '
- ' Vulkan . Extensions . VK_KHR... |
ff0de0aa4285f7ce9650522083f7844ddaa015cee3fa9709a00d75f2b3f1dcdf | alanz/ghc-exactprint | Transform.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
---------------------------------------------... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/3b36f5d0a498e31d882fe111304b2cf5ca6cad22/src/Language/Haskell/GHC/ExactPrint/Transform.hs | haskell | # LANGUAGE RankNTypes #
---------------------------------------------------------------------------
|
Module : Language.Haskell.GHC.ExactPrint.Transform
This module is currently under heavy development, and no promises are made
about API stability. Use with care.
We welcome any feedback / contributions on ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Language.Haskell.GHC.ExactPrint.Transform
(
Tran... |
ceff732c949b143c528933f34bea05612193aa67444124eb7462c80400afac6c | HuwCampbell/orc-haskell | main.hs | module Main (
main
) where
import Control.Monad.IO.Class
import qualified Orc.Serial.Binary.Base as Base
import Orc.Schema.Types (CompressionKind (..), types)
import qualified Orc.Logical as Logical
import qualified Orc.Striped as Striped
import Options.Applicative
import ... | null | https://raw.githubusercontent.com/HuwCampbell/orc-haskell/53950c54f4ff35d386d4b72983ac7151e29de5b4/main/main.hs | haskell | module Main (
main
) where
import Control.Monad.IO.Class
import qualified Orc.Serial.Binary.Base as Base
import Orc.Schema.Types (CompressionKind (..), types)
import qualified Orc.Logical as Logical
import qualified Orc.Striped as Striped
import Options.Applicative
import ... | |
a6bfceafdf62f539b320cd8440ca77bbe0ba88d2bd25c6d18c43178944df9be1 | lambduli/frea | Type.hs | module Compiler.Syntax.Type where
import Data.List (intercalate)
data Type
= TyVar String
| TyCon String
| TyTuple [Type]
| TyArr Type Type
| TyApp Type Type
| TyOp String Type -- type operator/function
deriving (Eq)
instance Show Type where
show (TyVar name)
= name
show (TyCon name)
= n... | null | https://raw.githubusercontent.com/lambduli/frea/f240a1a4a57996dcc2ab685e2bd499ad0cdb5dfc/src/Compiler/Syntax/Type.hs | haskell | type operator/function | module Compiler.Syntax.Type where
import Data.List (intercalate)
data Type
= TyVar String
| TyCon String
| TyTuple [Type]
| TyArr Type Type
| TyApp Type Type
deriving (Eq)
instance Show Type where
show (TyVar name)
= name
show (TyCon name)
= name
show (TyTuple types)
= "(" ++ interca... |
93d04dd1fc3362deb2c424f6516802ba66fc752969333576bc032cf54505210e | RyanGlScott/echo | Echo.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 704
{-# LANGUAGE Safe #-}
#elif __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
|
Module : System . IO.Echo
Copyright : ( C ) 2016 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portab... | null | https://raw.githubusercontent.com/RyanGlScott/echo/112b59cabfc6bdff05467bec4aac83f926c992b8/src/System/IO/Echo.hs | haskell | # LANGUAGE Safe #
* Public interface
* Alternative interface | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 704
#elif __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
|
Module : System . IO.Echo
Copyright : ( C ) 2016 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : Portable
Ex... |
2e21501669e998c36ddba3c9b69b52b0ed308d7941777b4349bb04b94461d56e | frankiesardo/linked | map_test.cljc | (ns linked.map-test
(:require [linked.core :as linked]
#?@(:clj [[clojure.test :refer :all]
[collection-check.core :refer :all]
[clojure.test.check.generators :as gen]]
:cljs [[cljs.test :refer-macros [is are testing deftest run-tests]]])
... | null | https://raw.githubusercontent.com/frankiesardo/linked/d000c4e526a4b275f787196100cac36d37c991ba/test/linked/map_test.cljc | clojure | (ns linked.map-test
(:require [linked.core :as linked]
#?@(:clj [[clojure.test :refer :all]
[collection-check.core :refer :all]
[clojure.test.check.generators :as gen]]
:cljs [[cljs.test :refer-macros [is are testing deftest run-tests]]])
... | |
af0da0c773a27df81130471c2d71ca1763f9be071ba503313602845e96da56ed | haskell-opengl/GLUT | GLUT.hs | -----------------------------------------------------------------------------
-- |
Module : Graphics . UI.GLUT
Copyright : ( c ) 2002 - 2018
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
A binding for GLUT , the OpenGL Utility Toolkit , ... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/src/Graphics/UI/GLUT.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
independent toolkit for writing OpenGL programs. It includes support for
the extended functionality available in freeglut (see
</>) and OpenGLUT (see
</>), too.
----... | Module : Graphics . UI.GLUT
Copyright : ( c ) 2002 - 2018
Maintainer : < >
A binding for GLUT , the OpenGL Utility Toolkit , a window system
module Graphics.UI.GLUT (
$ LegalStuff
$ APIVersions
module Graphics.Rendering.OpenGL,
module Graphics.UI.GLUT.Initializat... |
0708e21dc1486e74c9d395a8d6d2e0addaa8d2e74a5ce15709a2fab10328a167 | mbj/stratosphere | PipelineDefinitionProperty.hs | module Stratosphere.SageMaker.Pipeline.PipelineDefinitionProperty (
module Exports, PipelineDefinitionProperty(..),
mkPipelineDefinitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratospher... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/Pipeline/PipelineDefinitionProperty.hs | haskell | # SOURCE # | module Stratosphere.SageMaker.Pipeline.PipelineDefinitionProperty (
module Exports, PipelineDefinitionProperty(..),
mkPipelineDefinitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourcePrope... |
eeeb11519897765c90502b8efd6436d67fcecb5c4733ad86b20a3cff2a9a1542 | input-output-hk/cardano-ledger | Tools.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Cardano.Ledger.Alonzo.Tools (tests, testExUnitCalculation) where
import Cardano.Crypto.DSIGN
import qualified Cardano.Crypto.Hash as Cry... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/da48c5ba96b72426a51f36507d49604505fc96a7/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Alonzo/Tools.hs | haskell | # LANGUAGE RankNTypes #
ExUnits should remain intact when translating to and from the plutus type
its ex units replaced by the output of evaluateTransactionExecutionUnits | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Cardano.Ledger.Alonzo.Tools (tests, testExUnitCalculation) where
import Cardano.Crypto.DSIGN
import qualified Cardano.Crypto.Hash as Crypto
import Cardano.Ledger.Al... |
8449adfa23cc0788cf690414885e91937229b4b4f9394cc9542d34ed6e955b14 | unison-code/unison | HexagonRegisterDecl.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Target/Hexagon/HexagonRegisterDecl.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
f30809a3b435050aaef1a2e469729a8ea91ccedf9e9912cbf56c8baac83d863e | yallop/ocaml-reex | reex_parse.ml |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Reex_types
exception Pa... | null | https://raw.githubusercontent.com/yallop/ocaml-reex/8941fb7033762f6b87fa2f33afa87440001eccbe/lib/reex_parse.ml | ocaml | We've seen [. Special characters:
^ (beginning of negation)
* ralt ::= rint
rint | ralt |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Reex_types
exception Pa... |
99e7b25804e00d9710078970b9c3d4335107d0b04166a8e271fc6978e9588a21 | input-output-hk/cardano-wallet-legacy | Replot.hs | # LANGUAGE TupleSections #
module InputSelection.Evaluation.Replot (
replot
) where
import Universum
import Data.List (foldl1', isSuffixOf)
import qualified Prelude
import System.Directory (getDirectoryContents)
import System.FilePath ((</>))
import InputSelec... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/InputSelection/Evaluation/Replot.hs | haskell | ------------------------------------------------------------------------------
Reconstruction
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Auxiliary
------------------------------------------------------... | # LANGUAGE TupleSections #
module InputSelection.Evaluation.Replot (
replot
) where
import Universum
import Data.List (foldl1', isSuffixOf)
import qualified Prelude
import System.Directory (getDirectoryContents)
import System.FilePath ((</>))
import InputSelec... |
2e7b929b912211cbbb7537f76e56a9e8d196be4ac4f7550438be140db60dd1e8 | robert-strandh/SICL | labels.lisp | (cl:in-package #:cleavir-ast-visualizer)
(defgeneric label (ast))
;;; The default label is the lower-case version of the name of the
;;; class (as a string) with suffix -ast stripped off.
(defmethod label (ast)
(let ((name (string (class-name (class-of ast)))))
(string-downcase (subseq name 0 (- (length name)... | null | https://raw.githubusercontent.com/robert-strandh/SICL/5dbb0e8e4ab7fc1fd729fa2876c3d1d28823638a/Code/Cleavir/Abstract-syntax-tree/Visualizer/labels.lisp | lisp | The default label is the lower-case version of the name of the
class (as a string) with suffix -ast stripped off. | (cl:in-package #:cleavir-ast-visualizer)
(defgeneric label (ast))
(defmethod label (ast)
(let ((name (string (class-name (class-of ast)))))
(string-downcase (subseq name 0 (- (length name) 4)))))
(defmethod label ((ast cleavir-ast:literal-ast))
(let* ((label (format nil "~s" (cleavir-ast:value ast)))
... |
044fedd5b82ea7722b6c5975cbdf3d3977e3174db466bc5e1628ede5035d13da | tomlokhorst/AwesomePrelude | Function.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Generic.Control.Function where
import qualified Prelude
import Generic.Control.Category
undefined :: a
undefined = Prelude.undefined
class NameC j where
named :: Prelude.String -> j a -> j a
... | null | https://raw.githubusercontent.com/tomlokhorst/AwesomePrelude/c06fc73e1489aecdd3556b0395d427065245efee/src/Generic/Control/Function.hs | haskell | -synonyms/
Helper functions. | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Generic.Control.Function where
import qualified Prelude
import Generic.Control.Category
undefined :: a
undefined = Prelude.undefined
class NameC j where
named :: Prelude.String -> j a -> j a
... |
2578771ca606af9b247ad6a5c07742f2805df4b0713aa41ba1c533e8ceb56184 | ekoontz/menard | tenses.cljc | (ns menard.english.tenses
(:require [clojure.java.io :as io :refer [resource]]))
(def finite-tenses
(-> "english/finite-tenses.edn" resource slurp read-string))
(def nonfinite-tenses
(-> "english/nonfinite-tenses.edn" resource slurp read-string))
(def tenses
(concat finite-tenses
nonfinite-tenses))... | null | https://raw.githubusercontent.com/ekoontz/menard/ad36eca784be973c4f5472c0f7f9a75a0b08e84d/src/menard/english/tenses.cljc | clojure | (ns menard.english.tenses
(:require [clojure.java.io :as io :refer [resource]]))
(def finite-tenses
(-> "english/finite-tenses.edn" resource slurp read-string))
(def nonfinite-tenses
(-> "english/nonfinite-tenses.edn" resource slurp read-string))
(def tenses
(concat finite-tenses
nonfinite-tenses))... | |
28fd0e1d1bf04e217b725eed4e519c12f052063772980ef415371719e46e3225 | Octachron/olivine | enum.ml | module Aliases= struct
module L = Info.Linguistic
module B = Lib
module Ty = B.Ty
module T = B.T
module H = Ast_helper
module Exp = H.Exp
module Pat = H.Pat
module P = Parsetree
module C = Common
end
open Aliases
open Item
open Utils
type implementation = Std | Poly
let constr (_,name_0) (c, _) =
... | null | https://raw.githubusercontent.com/Octachron/olivine/b9d64b2a0157d79de5b85bb7f18380a0ad75874e/aster/enum.ml | ocaml | module Aliases= struct
module L = Info.Linguistic
module B = Lib
module Ty = B.Ty
module T = B.T
module H = Ast_helper
module Exp = H.Exp
module Pat = H.Pat
module P = Parsetree
module C = Common
end
open Aliases
open Item
open Utils
type implementation = Std | Poly
let constr (_,name_0) (c, _) =
... | |
ad39dd88db6217141af43d715bb557811da117701d37abbe04d08a097747e1ee | Zulu-Inuoe/clution | multipart-parser.lisp | (in-package :cl-user)
(defpackage fast-http-test.multipart-parser
(:use :cl
:fast-http
:fast-http.multipart-parser
:fast-http.parser
:fast-http-test.test-utils
:xsubseq
:prove)
(:import-from :cl-utilities
:collecting
:collect))
(in-pack... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/fast-http-20180131-git/t/multipart-parser.lisp | lisp |
Continuous calling | (in-package :cl-user)
(defpackage fast-http-test.multipart-parser
(:use :cl
:fast-http
:fast-http.multipart-parser
:fast-http.parser
:fast-http-test.test-utils
:xsubseq
:prove)
(:import-from :cl-utilities
:collecting
:collect))
(in-pack... |
715c9593dda1b6241ee2d65e6479a9ab8508faed6df57d5c6f4f40b463cc98ea | mfikes/fifth-postulate | ns120.cljs | (ns fifth-postulate.ns120)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns120.cljs | clojure | (ns fifth-postulate.ns120)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
4f7dacf1024387b868f5ba02489f4cdb49ae647fc655027b0a53961ad1974ea4 | jlouis/etorrent_core | etorrent_magnet_ctl.erl | -module(etorrent_magnet_ctl).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([start_link/5]).
%% ---------------------------------------------... | null | https://raw.githubusercontent.com/jlouis/etorrent_core/7db7f4ef36c1d055812504f00df92c6a67c2e4af/src/etorrent_magnet_ctl.erl | erlang | ------------------------------------------------------------------
API Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
------------------------------------------------------------------
-------------------------... | -module(etorrent_magnet_ctl).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-export([start_link/5]).
gen_server Function Exports
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(mctl_state, {
torrent_id :: non_neg_integer(),
info_has... |
c891d40eeb6e6f165b1794bce58c61177ce5eb5663af24c2401ba70fa7eb2554 | helium/helium-packet-router | hpr_packet_reporter.erl | -module(hpr_packet_reporter).
-behaviour(gen_server).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([
start_link/1,
report_packet/2
]).
%% --------------------------------------------... | null | https://raw.githubusercontent.com/helium/helium-packet-router/bbd8b15cb116e7915be6e9c1f7f8bb27886fffc4/src/hpr_packet_reporter.erl | erlang | ------------------------------------------------------------------
API Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
------------------------------------------------------------------
-------------------------... | -module(hpr_packet_reporter).
-behaviour(gen_server).
-export([
start_link/1,
report_packet/2
]).
gen_server Function Exports
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2
]).
-ifdef(TEST).
-export([
get_bucket/1,
get_client/1
]).
-endif.
-define... |
9cfbb99794d51d85babe21cbaee2313704e9cfea7f12259c2d7ccc523b4b71c8 | mfikes/advent-of-code | day_06.cljc | (ns advent-2018.day-06
(:require
#?(:cljs [planck.core :refer [line-seq read-string]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]))
(def input-lines (->> "advent_2018/day_06/input" io/resource io/reader line-seq))
(defn read-coordinates [s]
(mapv read-string (re-seq #"\d+" s)))
(defn add-vectors [& ... | null | https://raw.githubusercontent.com/mfikes/advent-of-code/72a015ac8fd9b1097efea69a0bb8acc26462665e/src/advent_2018/day_06.cljc | clojure | (ns advent-2018.day-06
(:require
#?(:cljs [planck.core :refer [line-seq read-string]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]))
(def input-lines (->> "advent_2018/day_06/input" io/resource io/reader line-seq))
(defn read-coordinates [s]
(mapv read-string (re-seq #"\d+" s)))
(defn add-vectors [& ... | |
5cf5d90940ba6ba06846378027da357cafe503063fc5c416c96b324d46d642d3 | semilin/layoup | evtest2.lisp |
(MAKE-LAYOUT :NAME "evtest2" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/evtest2.lisp | lisp |
(MAKE-LAYOUT :NAME "evtest2" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | |
01b480f3c997ed1f348c479b06c117f30f37127961c4e1675e75430ee7118674 | project-oak/hafnium-verification | AccessPath.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/IR/AccessPath.mli | ocaml | * Module for naming heap locations via the path used to access them (e.g., x.f.g, y[a].b)
* array element type with list of access paths in index
* field name
* remove and return the last access of the access path if the access list is non-empty. returns
the original access path * None if the access list is empt... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
39d84ef81b998df4a04ec35baebd29874b02fa999ae576021a1af6a794741b2a | taksuyu/mahjong | Board.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- | Stability: Experimental
module Mahjong.Board where
import Data.Map
import Mahjong.Class (Cycle (..))
import Mahjong.Player
import Mahjong.Tile
data Board a
= Board
{ players :: Map PlayerSeat (Player a)
, wall :: Wall a
, round :: Round
, ... | null | https://raw.githubusercontent.com/taksuyu/mahjong/720abe28ccee8ee21a2590b5abe08e64287458e0/src/Mahjong/Board.hs | haskell | | Stability: Experimental
| Aside from the number of players and the initial setup of the wall,
everything else about the board stays the same.
writing I am unaware of any variant that does without it being a declared
option of the game.
| Each round goes through each player acting as dealer (east seat) | # LANGUAGE GeneralizedNewtypeDeriving #
module Mahjong.Board where
import Data.Map
import Mahjong.Class (Cycle (..))
import Mahjong.Player
import Mahjong.Tile
data Board a
= Board
{ players :: Map PlayerSeat (Player a)
, wall :: Wall a
, round :: Round
, roundHand :: RoundHand
,... |
dab2c1ea0e20614ac21f676d52ccff70dfe8a65bf7f0ccbef0e87ec045a4b0a2 | NorfairKing/smos | ContentsMapSpec.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE TypeApplications #
module Smos.Sync.Client.Sync.ContentsMapSpec
( spec,
)
where
import qualified Data.Map as M
import Path
import Smos.Sync.Client.Contents
import Smos.Sync.Client.ContentsMap (ContentsMap (..))
import qualified Smos.Sync.Client.ContentsMap as CM
import Smos.Syn... | null | https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-sync-client-gen/test/Smos/Sync/Client/Sync/ContentsMapSpec.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE TypeApplications #
module Smos.Sync.Client.Sync.ContentsMapSpec
( spec,
)
where
import qualified Data.Map as M
import Path
import Smos.Sync.Client.Contents
import Smos.Sync.Client.ContentsMap (ContentsMap (..))
import qualified Smos.Sync.Client.ContentsMap as CM
import Smos.Syn... | |
de645b3ba6d7d04b42b40720015d274ec7254ec95bcde2f78dff4e870819bd67 | pariyatti/kosa | footer.clj | (ns kosa.layouts.shared.footer
(:require [hiccup2.core :as h]))
(defn render []
(h/html
[:div.meditate-illustration]))
| null | https://raw.githubusercontent.com/pariyatti/kosa/884411521c856155da0c7adea62786ff2b984067/src/kosa/layouts/shared/footer.clj | clojure | (ns kosa.layouts.shared.footer
(:require [hiccup2.core :as h]))
(defn render []
(h/html
[:div.meditate-illustration]))
| |
e3574588e9e19bbe3e77a2bb5351159a332fa001f08333d74df6e4e83d36a3f5 | uw-unsat/serval | ubsan.rkt | #lang rosette
(require (prefix-in core: "lib/core.rkt"))
(provide (all-defined-out))
; types
(struct source-location (filename line column) #:transparent
#:methods gen:custom-write
[(define (write-proc loc port mode)
(fprintf port "~a:~a" (source-location-filename loc) (source-location-line loc))
(let ([c... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/ubsan.rkt | racket | types
constructors
helpers
handlers
define a function that evaluates variables given a solution | #lang rosette
(require (prefix-in core: "lib/core.rkt"))
(provide (all-defined-out))
(struct source-location (filename line column) #:transparent
#:methods gen:custom-write
[(define (write-proc loc port mode)
(fprintf port "~a:~a" (source-location-filename loc) (source-location-line loc))
(let ([column (s... |
ef5059cde603f7b07bdfbbf080a20fd31050cadd78a155f95f5706760e8f9206 | reifyhealth/specmonstah | 03.clj | (ns reifyhealth.specmonstah-tutorial.03
(:require [reifyhealth.specmonstah.core :as sm]))
(def schema
{:user {:prefix :u}
:post {:prefix :p
:relations {:owner-id [:user :id]}}})
(defn ex-01
[]
(sm/add-ents {:schema schema} {:post [[2]]}))
(defn ex-02
[]
(sm/add-ents {:schema schema} {:pos... | null | https://raw.githubusercontent.com/reifyhealth/specmonstah/afe38e7a39149836c31719f7e36a7504c14dbb80/tutorial/reifyhealth/specmonstah_tutorial/03.clj | clojure | (ns reifyhealth.specmonstah-tutorial.03
(:require [reifyhealth.specmonstah.core :as sm]))
(def schema
{:user {:prefix :u}
:post {:prefix :p
:relations {:owner-id [:user :id]}}})
(defn ex-01
[]
(sm/add-ents {:schema schema} {:post [[2]]}))
(defn ex-02
[]
(sm/add-ents {:schema schema} {:pos... | |
50307e23115d6d0402a89edc1db20e2a5b4d4e21751dcd738d7c4fefe073c934 | lancelet/wgpu-hs | Pipeline.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
-- |
-- Module : WGPU.Internal.Pipeline
-- Description : Pipelines.
module WGPU.Internal.Pipeline
( -- * Types
PipelineLayout (..),
PipelineLayoutDescriptor (..),
VertexFormat (..),
VertexAttribute (..),
InputStepMode (..),
... | null | https://raw.githubusercontent.com/lancelet/wgpu-hs/8e002bd2d9210688ccf63eef613889f6c62b05aa/wgpu-hs/src-internal/WGPU/Internal/Pipeline.hs | haskell | |
Module : WGPU.Internal.Pipeline
Description : Pipelines.
* Types
* Functions
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
| Describes a pipeline layout.
| Debug label of the pipeline layout.
| B... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
module WGPU.Internal.Pipeline
PipelineLayout (..),
PipelineLayoutDescriptor (..),
VertexFormat (..),
VertexAttribute (..),
InputStepMode (..),
VertexBufferLayout (..),
VertexState (..),
PrimitiveTopology (..),
FrontFace... |
d28e1c3f45db5cfaaf06af9ad5651523081855b5a8912c0b875a9e0872068d11 | rowangithub/DOrder | treap.ml | type 'a t =
| Node of 'a * int * 'a t * 'a t
| Leaf
let empty = Leaf
let is_empty t =
t = Leaf
let balance t =
match t with
| Node (elt, priority, left, right) ->
(match left, right with
| (Node (lelt, lpriority, lleft, lright)),
(Node (relt, rpriority, rleft... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/reachability/treap.ml | ocaml | type 'a t =
| Node of 'a * int * 'a t * 'a t
| Leaf
let empty = Leaf
let is_empty t =
t = Leaf
let balance t =
match t with
| Node (elt, priority, left, right) ->
(match left, right with
| (Node (lelt, lpriority, lleft, lright)),
(Node (relt, rpriority, rleft... | |
afe8e0a265bcf531afccbc9724f119f6165bbc04f01ea48b37ccbcdfc652a7d5 | dbuenzli/hyperbib | crossref.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2019 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/8cf79152cb71950dacc7e1467d62c9b695a2089c/src/crossref.mli | ocaml | * The type for {{:-api-doc/blob/master/api_format.md#partial-date}partial date}.
* [partial_date] queries a partial date.
* Query contributor objects.
* Query reference objects.
* Query work objects. | ---------------------------------------------------------------------------
Copyright ( c ) 2019 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
b7e4e0620b2e92b6ce11d58112effc95996b69194cc8ebcb86664ca1e53ba916 | ichistmeinname/free-theorems | Intermediate.hs | # LANGUAGE FlexibleContexts #
-- | Declares an intermediate data structure along with a function to transform
-- type signatures into the intermediate structure. There are also other
-- functions working on intermediate structures, namely to retrieve relation
-- variables and to instantiate them to functions.
m... | null | https://raw.githubusercontent.com/ichistmeinname/free-theorems/9a84f28d6a0d1e141932d61d30f01254b465ea1e/free-theorems/src/Language/Haskell/FreeTheorems/Intermediate.hs | haskell | | Declares an intermediate data structure along with a function to transform
type signatures into the intermediate structure. There are also other
functions working on intermediate structures, namely to retrieve relation
variables and to instantiate them to functions.
----- Intermediate data structure -------... | # LANGUAGE FlexibleContexts #
module Language.Haskell.FreeTheorems.Intermediate (
Intermediate (..)
, interpret
, interpretM
, relationVariables
, specialise
, specialiseInverse
) where
import Control.Monad (liftM, liftM2, mapM)
import Control.Monad.Reader (ReaderT, ask, asks, runReaderT, local)
impo... |
fdf705371eb190436da84d416528ab77c3735ac331aaa09ff5a8b3440ceda358 | zotonic/zotonic | action_wires_reload.erl |
@author < >
2009
%% @doc Refresh the current page.
Copyright 2009
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable l... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_wires/src/actions/action_wires_reload.erl | erlang | @doc Refresh the current page.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the ... |
@author < >
2009
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(action_wires_reload).
-include_lib("zotonic_core/include/zotonic.hrl").
-export([render_action/4]).
render_action(_Trig... |
26e5076d57b064de8f924a1419ad5828ea9f052c312730cb3137ebac298abcc8 | amnh/poy5 | pm.ml | (** This is potentially garbage, but we leave it because we might need some
* of the effort placed here somewhere else *)
(* A phylogenetic analysis machine written for the S_K computer
* This machine uses the most simply defined functions, so we will start by
* defining some basic functionality *)
let u_Tl = SK (S K)... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/kolmo/pm.ml | ocaml | * This is potentially garbage, but we leave it because we might need some
* of the effort placed here somewhere else
A phylogenetic analysis machine written for the S_K computer
* This machine uses the most simply defined functions, so we will start by
* defining some basic functionality
A representation of DNA se... | let u_Tl = SK (S K)
let u_Hd = SK K
exception Unsupported
module type List = sig
type ocaml_repr
type ocaml_list
val empty_list : S_K.primitives
val is_not_empty : S_K.primitives -> S_K.primitives
val ml_zero_signal : S_K.primitives -> bool
val head : S_K.primitives -> S_K.primitives
val t... |
de15f49923017f400237e0ac40f137fd2e6cded53a2dbe58736a94f48d6cb552 | jahfer/othello | store.cljc | (ns othello.store
(:require [othello.composers :as composers]
[othello.transforms :as transforms]
[othello.documents :as documents]))
(defrecord Operation [id parent-id operations])
(defn operation
[operations & {:keys [id parent-id] :or {id nil parent-id nil}}]
(Operation. id parent-i... | null | https://raw.githubusercontent.com/jahfer/othello/443fc3aae65a6d7ebd8f5943279f029a091edf4c/src/othello/store.cljc | clojure | ----------- | (ns othello.store
(:require [othello.composers :as composers]
[othello.transforms :as transforms]
[othello.documents :as documents]))
(defrecord Operation [id parent-id operations])
(defn operation
[operations & {:keys [id parent-id] :or {id nil parent-id nil}}]
(Operation. id parent-i... |
09cbc2a0a416d4df6f46b11fd79e9a3dff42bc4c4043f4156a6c5917594b2d53 | kloimhardt/clj-tiles | genblocks.cljs | (ns cljtiles.genblocks
(:require-macros [hiccups.core :as hiccups :refer [html]])
(:require [hiccups.runtime :as hiccupsrt]))
(defmulti gen (fn [m _] (:type m)))
(defmethod gen :slot [] nil)
(defn blockmap [type givenid & [inline?]]
(cond-> {:type type :id (str type givenid)}
(some? inline?) (assoc :inline... | null | https://raw.githubusercontent.com/kloimhardt/clj-tiles/bbcd192cd0a6ebc5bb2e621566b1b4554679a52d/src/cljtiles/genblocks.cljs | clojure | is really a vector
(rearrange [1 2 3 4]) => (1 3 2 4)
the end->code/parse depends on it
then the :value
(infix-sensible? l) (appl fun-infi) ;;detect infix automatically for simple expressions | (ns cljtiles.genblocks
(:require-macros [hiccups.core :as hiccups :refer [html]])
(:require [hiccups.runtime :as hiccupsrt]))
(defmulti gen (fn [m _] (:type m)))
(defmethod gen :slot [] nil)
(defn blockmap [type givenid & [inline?]]
(cond-> {:type type :id (str type givenid)}
(some? inline?) (assoc :inline... |
5dfd9661bcd59966263bf056dbcf78a8d3a415e82be84005aa8fdeb85f24a56e | tisnik/clojure-examples | core_test.clj | ;
( C ) Copyright 2018 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(ns spec-demo5.core-test
(:require... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/spec-demo5/test/spec_demo5/core_test.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2018 , 2020
-v10.html
(ns spec-demo5.core-test
(:require [clojure.test :refer :all]
[spec-demo5.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
|
de7c0e0cb0770a55def6793b3d41eaf713b099c201f724a04b1ccbad01f893a6 | gotthardp/lorawan-server | lorawan_admin.erl | %
Copyright ( c ) 2016 - 2019 < >
% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%
-module(lorawan_admin).
-export([handle_authorization/2, handle_authorization_ex/2, fields_empty/1, auth_field/2]).
-export([write/1, parse/1, build/1]).
-export([parse_field/2, bui... | null | https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_admin.erl | erlang |
All rights reserved.
when the client provided HTTP Basic password
when the client did respond to the HTTP Digest challenge
retrieve and check password
if nothing was provided
we need the list to be non-empty (so the request is not forbidden),
but also must not grant access to any of the existing fields
tempor... | Copyright ( c ) 2016 - 2019 < >
Distributed under the terms of the MIT License . See the LICENSE file .
-module(lorawan_admin).
-export([handle_authorization/2, handle_authorization_ex/2, fields_empty/1, auth_field/2]).
-export([write/1, parse/1, build/1]).
-export([parse_field/2, build_field/2]).
-export([set_... |
8aa9fea21355882f57037c50526a05bcbaa8372fb119e1a0eca91a34e8e01b03 | heraldry/heraldicon | gore.cljs | (ns heraldicon.heraldry.ordinary.type.gore
(:require
[clojure.string :as str]
[heraldicon.context :as c]
[heraldicon.heraldry.cottising :as cottising]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.line.core :as line]
[heraldicon.heraldry.option.position :as position]
... | null | https://raw.githubusercontent.com/heraldry/heraldicon/0e72e14efdc6dc7f1aa059c4b10e49962cdf293c/src/heraldicon/heraldry/ordinary/type/gore.cljs | clojure | TODO: needs to be improved | (ns heraldicon.heraldry.ordinary.type.gore
(:require
[clojure.string :as str]
[heraldicon.context :as c]
[heraldicon.heraldry.cottising :as cottising]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.line.core :as line]
[heraldicon.heraldry.option.position :as position]
... |
6a187538fea7eb0535320f28149aee37a75965ad193dc522e13f47086604f597 | haskell-tools/haskell-tools | Demo.hs | # LANGUAGE OverloadedStrings , DeriveGeneric , TypeApplications , ScopedTypeVariables , LambdaCase , TemplateHaskell , PatternGuards , FlexibleContexts #
module Language.Haskell.Tools.Demo where
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad
import Control.Monad.State
import Dat... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/demo/src/Language/Haskell/Tools/Demo.hs | haskell | | The application that is evoked for each incoming request
| This function does the real job of acting upon client messages in a stateful environment of a client
clean the workspace to remove source files from earlier sessions
| # LANGUAGE OverloadedStrings , DeriveGeneric , TypeApplications , ScopedTypeVariables , LambdaCase , TemplateHaskell , PatternGuards , FlexibleContexts #
module Language.Haskell.Tools.Demo where
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad
import Control.Monad.State
import Dat... |
69609ad1192e161131fed6412ede3077338845fe68c41706c9f7cbae929cdeda | propan/geheimtur | http_basic_test.clj | (ns geheimtur.impl.http-basic-test
(:require [clojure.test :refer :all]
[geheimtur.impl.http-basic :refer :all]
[geheimtur.util.auth :as auth]
[geheimtur.util.response :refer [forbidden unauthorized]]))
(def user-identity
{:username "Bobby Briggs" :roles #{:user}})
(defn valida... | null | https://raw.githubusercontent.com/propan/geheimtur/bae0b1f69182289a92813ddc42db0604e53c99af/test/geheimtur/impl/http_basic_test.clj | clojure | (ns geheimtur.impl.http-basic-test
(:require [clojure.test :refer :all]
[geheimtur.impl.http-basic :refer :all]
[geheimtur.util.auth :as auth]
[geheimtur.util.response :refer [forbidden unauthorized]]))
(def user-identity
{:username "Bobby Briggs" :roles #{:user}})
(defn valida... | |
de5a66c0cd82ec7403126144198dcf2d924357f5c60b335105991c0964ae55b4 | nibbula/yew | image-xbm.lisp | ;;;
bitmap images
;;;
(defpackage :image-xbm
(:documentation "XBM images")
(:use :cl :dlib :dlib-misc :image #| :ppcre |#)
(:export
#:image-format-xbm
#:x-hot-spot
#:y-hot-spot
#:bitmap-name
#:read-xbm
))
(in-package :image-xbm)
(declaim (optimize (speed 0) (safety 3) (debug 3) (space 0) ... | null | https://raw.githubusercontent.com/nibbula/yew/e4172647e7f8df116f12009de6f6b5cf53ba7cf8/image/image-xbm.lisp | lisp |
:ppcre
@@@ some other junk could appear in names besides "-A-Za-z0-9_."
"static\\s+.*char\\s+([-A-Za-z0-9_.]+)_bits\\[\\]\\s*=\\s*{"
some bitmaps don't even say "static"
This should be faster than:
(ppcre:scan "\\s*0x([0-9A-Fa-f][0-9A-Fa-f])\\s*." string :start start)
and a parse-integer | bitmap images
(defpackage :image-xbm
(:documentation "XBM images")
(:export
#:image-format-xbm
#:x-hot-spot
#:y-hot-spot
#:bitmap-name
#:read-xbm
))
(in-package :image-xbm)
(declaim (optimize (speed 0) (safety 3) (debug 3) (space 0) (compilation-speed 0)))
( declaim ( optimize ( speed 3 )... |
cdafc13e0e5c0c38671418447a5a6d25e4b9efd4bbf1e9c4515dc3ab64c85a33 | CarlosMChica/HaskellBook | binaryTree.hs | module BinaryTree where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
insert' :: (Ord a) => a -> BinaryTree a -> BinaryTree a
insert' x Leaf = Node Leaf x Leaf
insert' x (Node left x' right)
| x == x' = Node left x right
| x < x' = Node (insert' x left) x' right... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter11/binaryTree.hs | haskell | module BinaryTree where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
insert' :: (Ord a) => a -> BinaryTree a -> BinaryTree a
insert' x Leaf = Node Leaf x Leaf
insert' x (Node left x' right)
| x == x' = Node left x right
| x < x' = Node (insert' x left) x' right... | |
3e4f54941a4838832b27ead372e8a8f9a827e75ca31ca94884082e50d9e7bf22 | jaspervdj/advent-of-code | 08.hs | {-# LANGUAGE BangPatterns #-}
import Data.Map (Map)
import qualified Data.Map as M
import Data.List (foldl')
import Data.Maybe (fromMaybe)
import Text.Read (readMaybe)
data Operation = Inc | Dec deriving (Show)
parseOperation :: String -> Either String Operation
parseOperation "inc" = Right Inc
... | null | https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/2017/08.hs | haskell | # LANGUAGE BangPatterns # | import Data.Map (Map)
import qualified Data.Map as M
import Data.List (foldl')
import Data.Maybe (fromMaybe)
import Text.Read (readMaybe)
data Operation = Inc | Dec deriving (Show)
parseOperation :: String -> Either String Operation
parseOperation "inc" = Right Inc
parseOperation "dec" = Right D... |
2c6f2e29c57691910773d6db447d75e09fff69faa9f6ce14326d24c102fdc20b | scotty-web/scotty-tls | Main.hs | {-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mconcat)
import Web.Scotty
import Web.Scotty.TLS
main :: IO ()
main = scottyTLS 3000 "server.key" "server.crt" $ do
get "/:word" $ do
beam <- param "word"
html $ mconcat ["<h1>Scotty, ", beam, " ... | null | https://raw.githubusercontent.com/scotty-web/scotty-tls/83c3455a0e919006aff5f0603d637be88c45ecbf/examples/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
import Data.Monoid (mconcat)
import Web.Scotty
import Web.Scotty.TLS
main :: IO ()
main = scottyTLS 3000 "server.key" "server.crt" $ do
get "/:word" $ do
beam <- param "word"
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
|
c66c8797010402147db69521925e5010d6f7c685a9476359f75fcb243600964e | haskell-tools/haskell-tools | UseQualMulti.hs | # LANGUAGE TemplateHaskell #
module TH.Splice.UseQualMulti where
import qualified TH.Splice.Define as Def
import qualified TH.Splice.Define as Def2
$(Def.def "x")
$(Def2.def "y")
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/TH/Splice/UseQualMulti.hs | haskell | # LANGUAGE TemplateHaskell #
module TH.Splice.UseQualMulti where
import qualified TH.Splice.Define as Def
import qualified TH.Splice.Define as Def2
$(Def.def "x")
$(Def2.def "y")
| |
07609ad92cfa0fc88d24c4ee63acb8d390cf3ccc1f9c0fb1cef7c9ede232f24f | killme2008/clj-xmemcached | benchmark.clj | (ns benchmark
(:require [clj-xmemcached.core :as xm]))
(def client (xm/memcached "localhost:11211" :transcoder xm/nippy-transcoder))
(def threads 50)
(def repeats 10000)
(defmacro benchmark [doc & body]
(println (str doc ": threads=" threads ",repeats=" repeats ",total=" (* threads repeats)))
`(let [start# (Sy... | null | https://raw.githubusercontent.com/killme2008/clj-xmemcached/d06fd530260c2bf1e82640d31efd0999993c08f1/example/benchmark.clj | clojure | (ns benchmark
(:require [clj-xmemcached.core :as xm]))
(def client (xm/memcached "localhost:11211" :transcoder xm/nippy-transcoder))
(def threads 50)
(def repeats 10000)
(defmacro benchmark [doc & body]
(println (str doc ": threads=" threads ",repeats=" repeats ",total=" (* threads repeats)))
`(let [start# (Sy... | |
aaf7e4a8a46d89f80e8c739648aa1714f362cd302a8276f56cbbf288278e7580 | hanshuebner/bos | web-utils.lisp | (in-package :bos.web)
(enable-interpol-syntax)
(defclass bos-website (website)
((google-maps-api-key :initarg :google-maps-api-key
:reader website-google-maps-api-key)))
(defmethod website-show-page ((website bos-website) fn title)
(html
(:html
(:head
(bknr.web::header :title ... | null | https://raw.githubusercontent.com/hanshuebner/bos/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/web/web-utils.lisp | lisp | write language param and remaining get params | (in-package :bos.web)
(enable-interpol-syntax)
(defclass bos-website (website)
((google-maps-api-key :initarg :google-maps-api-key
:reader website-google-maps-api-key)))
(defmethod website-show-page ((website bos-website) fn title)
(html
(:html
(:head
(bknr.web::header :title ... |
6a41f1830ef4c2a9990b1290b4752cfad33fbb9e91ca00356e293c9964427302 | bnoordhuis/chicken-core | c-backend.scm | c-backend.scm - C - generating backend for the CHICKEN compiler
;
Copyright ( c ) 2008 - 2013 , The Chicken Team
Copyright ( c ) 2000 - 2007 ,
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are m... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/c-backend.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
Redistributio... | c-backend.scm - C - generating backend for the CHICKEN compiler
Copyright ( c ) 2008 - 2013 , The Chicken Team
Copyright ( c ) 2000 - 2007 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.