_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 |
|---|---|---|---|---|---|---|---|---|
4ac75e277d8f0370f65dfc628af8e27d410f7e9fe918ac965150952d25c1f051 | binsec/haunted | disasm_cfg.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/disasm/disasm_cfg.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
06820b9325d464fc9f0bd9fc06156b18cd25ec9c7f056131757f06b3fd99530b | lgessler/glam | fixtures.clj | (ns glam.fixtures
(:require [clojure.test :refer :all]
[glam.xtdb.user :as user]
[glam.xtdb.project :as prj]
[xtdb.api :as xt]
[glam.xtdb.document :as doc]
[glam.xtdb.text-layer :as txtl]
[glam.xtdb.token-layer :as tokl]
[glam.xtdb.sp... | null | https://raw.githubusercontent.com/lgessler/glam/867bd3d638c451a496d602a2c0dbbc8d7e76f8cb/src/test/glam/fixtures.clj | clojure | Note: normally none of the things we'll do with this parser would work without auth, but `-Dpathom_auth=disabled`
in the :test profile bypasses all auth checks
don't need to delete--we use this only with :each, and the with-crux cleanup will take care of deletions | (ns glam.fixtures
(:require [clojure.test :refer :all]
[glam.xtdb.user :as user]
[glam.xtdb.project :as prj]
[xtdb.api :as xt]
[glam.xtdb.document :as doc]
[glam.xtdb.text-layer :as txtl]
[glam.xtdb.token-layer :as tokl]
[glam.xtdb.sp... |
8356570a35116298c0b221acaa2108db0c27bbaf6966a8bab60b7c2a88c39bd9 | RedPRL/algaett | Eff.mli | exception Error of Errors.t
val bind : name:Yuujinchou.Trie.path option -> tp:NbE.Domain.t -> (NbE.Domain.cell -> 'a) -> 'a
val trap : (unit -> 'a) -> ('a, Errors.t) Result.t
val blessed_ulvl : unit -> NbE.Domain.t
module type Handler =
sig
val resolve : Yuujinchou.Trie.path -> ResolveData.t
end
module Perform :... | null | https://raw.githubusercontent.com/RedPRL/algaett/5bc95fcce57c735a068a3f9d676ee673ee4e2b21/src/refiner/Eff.mli | ocaml | TODO: what is the unit for?
* invariant: the return values must be effect-less | exception Error of Errors.t
val bind : name:Yuujinchou.Trie.path option -> tp:NbE.Domain.t -> (NbE.Domain.cell -> 'a) -> 'a
val trap : (unit -> 'a) -> ('a, Errors.t) Result.t
val blessed_ulvl : unit -> NbE.Domain.t
module type Handler =
sig
val resolve : Yuujinchou.Trie.path -> ResolveData.t
end
module Perform :... |
850e4f3aade4f7de242d6d356718d49c8665ba8fefcab333af2705b1baccc806 | liwp/corax | http.clj | (ns corax.http)
(defn build-url
[{:keys [scheme server-name server-port uri]}]
(let [port-str (if (= server-port 80) "" (str ":" server-port))]
(str (name scheme) "://" server-name port-str uri)))
(defn build-http-info
[{:keys [headers request-method params query-string remote-addr] :as req}
& [env]]
{... | null | https://raw.githubusercontent.com/liwp/corax/944e5532d039a330f3ce41e2896408a92b4e589f/src/corax/http.clj | clojure | (ns corax.http)
(defn build-url
[{:keys [scheme server-name server-port uri]}]
(let [port-str (if (= server-port 80) "" (str ":" server-port))]
(str (name scheme) "://" server-name port-str uri)))
(defn build-http-info
[{:keys [headers request-method params query-string remote-addr] :as req}
& [env]]
{... | |
32b4d4657063e5371af021a54e483d9c5b252c31abe0de6d707f2e6eb73496f5 | dannypsnl/sauron | binding.rkt | #lang racket
(provide (struct-out binding))
(struct binding
(name start end external?)
#:transparent)
(module+ test
(require rackunit)
(check-equal? (binding "fake" 0 1 #t)
(binding "fake" 0 1 #t)))
| null | https://raw.githubusercontent.com/dannypsnl/sauron/1d1d0e263e104251b44b2baa7741869374e922e1/collect/binding.rkt | racket | #lang racket
(provide (struct-out binding))
(struct binding
(name start end external?)
#:transparent)
(module+ test
(require rackunit)
(check-equal? (binding "fake" 0 1 #t)
(binding "fake" 0 1 #t)))
| |
ad409bfcd2610ce61040b7741c24e9e34530665a9743efc70c84ef330a54151f | sebastiaanvisser/clay | Selector.hs | # LANGUAGE
OverloadedStrings
, FlexibleInstances
, , StandaloneDeriving
, UndecidableInstances
, ViewPatterns
, PatternGuards
#
OverloadedStrings
, FlexibleInstances
, GeneralizedNewtypeDeriving
, StandaloneDeriving
, UndecidableInstances
, ViewPatterns
, PatternGuards
... | null | https://raw.githubusercontent.com/sebastiaanvisser/clay/16f55a5c6ab7fd98e39cedf852bd3400a02ac45f/src/Clay/Selector.hs | haskell | | The star selector applies to all elements. Maps to @*@ in CSS.
| Select elements by name. The preferred syntax is to enable
| Named alias for `**`.
| The deep selector composer. Maps to @sel1 sel2@ in CSS.
| Named alias for `|>`.
| The child selector composer. Maps to @sel1 > sel2@ in CSS.
| The adjacent selec... | # LANGUAGE
OverloadedStrings
, FlexibleInstances
, , StandaloneDeriving
, UndecidableInstances
, ViewPatterns
, PatternGuards
#
OverloadedStrings
, FlexibleInstances
, GeneralizedNewtypeDeriving
, StandaloneDeriving
, UndecidableInstances
, ViewPatterns
, PatternGuards
... |
f94fb950aa4c01b8ff5165d5fdfe636475ecb944995ba0cda7bbe11ab2388159 | fjames86/ftw | constants.lisp | Copyright ( c ) 2016 < >
This code is licensed under the MIT license .
(in-package #:ftw)
;;; This file defines all the many constants that Win32 programming requires.
Rather than exporting eaching of these from the FTW package we instead
provide a macro CONST which converts the stringy argument ... | null | https://raw.githubusercontent.com/fjames86/ftw/adcad8a10b31d127643adba37f7c376eb28abf01/constants.lisp | lisp | This file defines all the many constants that Win32 programming requires.
----------------------
---------------
special case for handles which need to be pointers
-2
-1
-3
uint-max
LVM_SETITEMW
input console modes
output console modes
| Copyright ( c ) 2016 < >
This code is licensed under the MIT license .
(in-package #:ftw)
Rather than exporting eaching of these from the FTW package we instead
provide a macro CONST which converts the stringy argument to a symbol
in the FTW package . This allows users to reference these const... |
773420a4227c86e0392001e28c138e5988eb518beb7ca88e8e90a0f242f11e53 | raxod502/minimal-webapp | server.clj | (ns minimal-webapp.server
(:require [compojure.core :refer [defroutes GET PUT POST DELETE ANY]]
[compojure.handler :as handler]
[compojure.route :as route]
[hiccup.core :as hiccup]
[hiccup.page :refer [include-js]]
[ring.adapter.jetty :as jetty])
(:gen-cla... | null | https://raw.githubusercontent.com/raxod502/minimal-webapp/1771c750541c6ff93d016f3649a074817c185108/src/minimal_webapp/server.clj | clojure | Base HTML pages
Handlers and middleware | (ns minimal-webapp.server
(:require [compojure.core :refer [defroutes GET PUT POST DELETE ANY]]
[compojure.handler :as handler]
[compojure.route :as route]
[hiccup.core :as hiccup]
[hiccup.page :refer [include-js]]
[ring.adapter.jetty :as jetty])
(:gen-cla... |
8cd4a197636a915c8585319238205721d25748ebf85ed11b55534fc207a4fec8 | cj1128/sicp-review | 1.33.scm | (define (filtered-accumulate combiner null-value term a next b filter)
(if (or (> a b))
null-value
(combiner
(if (filter a) (term a) null-value)
(filtered-accumulate combiner null-value term (next a) next b filter))))
(define (problem-a a b)
Copied from chapter-1/1.2 / prime.scm
(defi... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-1/1.3/1.33.scm | scheme | Subproblem a: | (define (filtered-accumulate combiner null-value term a next b filter)
(if (or (> a b))
null-value
(combiner
(if (filter a) (term a) null-value)
(filtered-accumulate combiner null-value term (next a) next b filter))))
(define (problem-a a b)
Copied from chapter-1/1.2 / prime.scm
(defi... |
8647a2b197f255c39dd1dc9bfd9ba33a89632cdac6535b69c002cd1fe7a57640 | gonzojive/sbcl | pathname.lisp | ;;;; the known-to-the-cross-compiler part of PATHNAME logic
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in... | null | https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/code/pathname.lisp | lisp | the known-to-the-cross-compiler part of PATHNAME logic
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
data types used by pathnames
pathname information into structure slot entries, and aft... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
The HOST structure holds the functions that both parse the
translation the inverse ( unparse ) ... |
9aa6c9c3975e57eb4b999f2cf531c362e3222d1ae9190fb06237be46c5e3d80a | djblue/portal | user.clj | (ns user)
(defn lazy-fn [symbol]
(fn [& args] (apply (requiring-resolve symbol) args)))
(def start! (lazy-fn 'shadow.cljs.devtools.server/start!))
(def watch (lazy-fn 'shadow.cljs.devtools.api/watch))
(def repl (lazy-fn 'shadow.cljs.devtools.api/repl))
(defn cljs
([] (cljs :client))
([buil... | null | https://raw.githubusercontent.com/djblue/portal/a11c6b39d38098366eb75194eeb78a69c2ca4d05/dev/user.clj | clojure | (ns user)
(defn lazy-fn [symbol]
(fn [& args] (apply (requiring-resolve symbol) args)))
(def start! (lazy-fn 'shadow.cljs.devtools.server/start!))
(def watch (lazy-fn 'shadow.cljs.devtools.api/watch))
(def repl (lazy-fn 'shadow.cljs.devtools.api/repl))
(defn cljs
([] (cljs :client))
([buil... | |
a1f0b06f6ed4ad4f40c073d15019e9806cd846aeb4ab18b76cdf8eeff27c8913 | shayan-najd/NativeMetaprogramming | HpcMarkup.hs | ---------------------------------------------------------
The main program for the hpc - markup tool , part of HPC .
and , June 2006
---------------------------------------------------------
module HpcMarkup (markup_plugin) where
import Trace.Hpc.Mix
import Trace.Hpc.Tix
import Trace.Hpc.Util
import HpcFlags... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/utils/hpc/HpcMarkup.hs | haskell | -------------------------------------------------------
-------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Add characters to the left of a string until it is at... | The main program for the hpc - markup tool , part of HPC .
and , June 2006
module HpcMarkup (markup_plugin) where
import Trace.Hpc.Mix
import Trace.Hpc.Tix
import Trace.Hpc.Util
import HpcFlags
import HpcUtils
import System.Directory
import System.FilePath
import System.IO (localeEncoding)
import Data.List
... |
2a12d9d3e9f19d7fa847e3fe7931aec4c0c5fa4b66d5a3f785327f0fecda33c0 | borkdude/lein2deps | api.clj | (ns lein2deps.api
(:require
[babashka.cli :as cli]
[babashka.fs :as fs]
[flatland.ordered.map :refer [ordered-map]]
[lein2deps.internal :refer [safe-parse convert-dep
add-prep-lib
#_:clj-kondo/ignore
defproject
... | null | https://raw.githubusercontent.com/borkdude/lein2deps/4f6d4a0140ddea10c5ac28cc24b49643660f42f6/src/lein2deps/api.clj | clojure | (ns lein2deps.api
(:require
[babashka.cli :as cli]
[babashka.fs :as fs]
[flatland.ordered.map :refer [ordered-map]]
[lein2deps.internal :refer [safe-parse convert-dep
add-prep-lib
#_:clj-kondo/ignore
defproject
... | |
0580721d22e560a95bb1c14c79c4c0c4082855cdcaeff12d69e15c200525772c | retro/keechma-next-realworld-app | spec.cljs | (ns keechma.next.spec
(:require
[cljs.spec.alpha :as s]))
(defn dynamic-config? [{:keys [:keechma.controller/params]}]
(= :dynamic (first params)))
(defn static-config? [{:keys [:keechma.controller/params]}]
(= :static (first params)))
(defn dep? [val]
(or (keyword? val)
(and (vector? val) (= 1 (co... | null | https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/keechma/next/spec.cljs | clojure | (ns keechma.next.spec
(:require
[cljs.spec.alpha :as s]))
(defn dynamic-config? [{:keys [:keechma.controller/params]}]
(= :dynamic (first params)))
(defn static-config? [{:keys [:keechma.controller/params]}]
(= :static (first params)))
(defn dep? [val]
(or (keyword? val)
(and (vector? val) (= 1 (co... | |
d587705fc19257e06e0a7b1d7a4850db55479bf8a4e950cb7325831ebc00ddfe | narkisr-deprecated/core | persistency.clj | (ns re-core.integration.persistency
"Integration test for persistency that use a redis instance"
(:refer-clojure :exclude [type])
(:import clojure.lang.ExceptionInfo)
(:require
[re-core.fixtures.data :refer (foo)]
[re-core.fixtures.core :refer (with-conf is-type?)]
[re-core.fixtures.populate :refer... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/test/re_core/integration/persistency.clj | clojure | (ns re-core.integration.persistency
"Integration test for persistency that use a redis instance"
(:refer-clojure :exclude [type])
(:import clojure.lang.ExceptionInfo)
(:require
[re-core.fixtures.data :refer (foo)]
[re-core.fixtures.core :refer (with-conf is-type?)]
[re-core.fixtures.populate :refer... | |
97f0108189408d0574a74c3d9f83a7b07632629c2ab7fd78506793a43f59031e | TorXakis/TorXakis | Error.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE TemplateHaskell #
{-# LANGUAG... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/txs-compiler/src/TorXakis/Compiler/Error.hs | haskell | # LANGUAGE DeriveDataTypeable #
------------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
------------------------------------------------------------------------------
* Error type and field accessors.
** Lenses for error fields.
* Type... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE TemplateHaskell #
Module ... |
2d130579a0f87d1a79a002ff7363cec62e384b59e32c85be7050f6a02dea31d8 | ciderpunx/57-exercises-for-programmers | P51FirebaseNotes.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
module P51FirebaseNotes where
import Control.Monad.Trans
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Data.Aeson
import Data.Time
import Data.List (sort)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Time... | null | https://raw.githubusercontent.com/ciderpunx/57-exercises-for-programmers/25958ab80cc3edc29756d3bddd2d89815fd390bf/src/P51FirebaseNotes.hs | haskell | import Servant.Docs
TODO: Do we really need picoseconds in time?
to consider: just returning some number of notes
to discover: does firebase keep things in order or do I still need to do sorting here?
egclient :: IO ()
egclient = do
n <- postNote "test API implementation"
print =<< getNotes | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
module P51FirebaseNotes where
import Control.Monad.Trans
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Data.Aeson
import Data.Time
import Data.List (sort)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Time... |
0431678babc4522b641c0e18ba61c3dde4037076f9fccd462502e8c50c38a2aa | puppetlabs/puppetdb | anonymizer.clj | (ns puppetlabs.puppetdb.anonymizer
(:require [clojure.string :as str]
[puppetlabs.kitchensink.core :refer [regexp? uuid string-contains?]]
[puppetlabs.puppetdb.utils :as utils]
[puppetlabs.puppetdb.random
:refer [random-bool
random-node-name
... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/anonymizer.clj | clojure | Validation functions, for use within pre/post conditions
I would have liked to have used the catalog/validate validation, however
it isn't designed for the post-processed format, only the original format
that the master gives us.
Rules engine functions
Default to returning true if there is no match
Functions for... | (ns puppetlabs.puppetdb.anonymizer
(:require [clojure.string :as str]
[puppetlabs.kitchensink.core :refer [regexp? uuid string-contains?]]
[puppetlabs.puppetdb.utils :as utils]
[puppetlabs.puppetdb.random
:refer [random-bool
random-node-name
... |
bcf9f896209f1b4026fc959679a7211ade5dd3c4055af91bd6914dc4025bfd9d | tarides/ocaml-jit | toplevel_res.ml | type t = Ok of Obj.t | Err of string
| null | https://raw.githubusercontent.com/tarides/ocaml-jit/fe2fce1a5bb89acf5f7239917f6098d53c2c14ec/lib/jit/toplevel_res.ml | ocaml | type t = Ok of Obj.t | Err of string
| |
ff000d1cfce6a51c14889e574df008b038ba1232cfb64fb1f3d34d2444ce1fbe | schibsted/spid-tech-docs | types_test.clj | (ns spid-docs.pimp.types-test
(:require [spid-docs.pimp.types :refer :all]
[midje.sweet :refer :all]))
(fact
"It creates a list with client types and a check mark for specified clients using spid-client tags"
(create-types (str "<spid-types>WA</spid-types>"))
=> (str "<ul class=\"types-list\">"
... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/test/spid_docs/pimp/types_test.clj | clojure | (ns spid-docs.pimp.types-test
(:require [spid-docs.pimp.types :refer :all]
[midje.sweet :refer :all]))
(fact
"It creates a list with client types and a check mark for specified clients using spid-client tags"
(create-types (str "<spid-types>WA</spid-types>"))
=> (str "<ul class=\"types-list\">"
... | |
29430b8a30ec7985600f3b2bafea478a0b5fde1f58f4171a4648383ce3a29290 | spechub/Hets | As.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./HasCASL / As.hs
Description : abstract syntax for HasCASL
Copyright : ( c ) and Uni Bremen 2003 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
abstrac... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/HasCASL/As.hs | haskell | # LANGUAGE DeriveDataTypeable #
* abstract syntax entities with small utility functions
| annotated basic items
| the possible items
pos "program", dots
pos "class", ";"s
pos "var", ";"s
pos "free", "type", ";"s
pos "generated" "{", ";"s, "}"
or "generated" "type" ";"s
pos "forall" (if GenVarDecl not empty)... | |
Module : ./HasCASL / As.hs
Description : abstract syntax for HasCASL
Copyright : ( c ) and Uni Bremen 2003 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
abstract syntax for HasCASL ,
more lib... |
0855595666723ed2dbad13029415c8c900fce948a5982ad640c87279e184b145 | emqx/emqx | emqx_authn_password_hashing_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_authn/test/emqx_authn_password_hashing_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_authn_password_hashing_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
... |
8f2339848b1a3d57a1cfc5a24e34cbb224bf1e89e9e45272ba552a4a14500d09 | trevorbernard/phaser | dsl.clj | Copyright 2013 - 2014 UserEvents Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
dis... | null | https://raw.githubusercontent.com/trevorbernard/phaser/7b97c0df9d65d669a85b439d50e29a85b753f481/src/phaser/dsl.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2013 - 2014 UserEvents Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns phaser.dsl
"A concise syntax for setting up the disruptor pattern around a RingBuffer.
A simple example of setting up the disruptor with two event handlers that
must process events in order:"
(:r... |
ab6aff617b29d0d91e66d5234651a04c89a4cc498ac583e94d058189d7278b6c | reborg/clojure-essential-reference | 5.clj | (require '[criterium.core :refer [quick-bench]])
(let [x 5000 ^clojure.lang.PersistentVector v (into [] (range 1e5))]
< 1 >
Execution time mean : 88.201576 µs
(let [x 5000 ss (into (sorted-set) (range 1e5))]
< 2 >
Execution time mean : 1.223698 µs | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialGeneration/FromCollections/subseqandrsubseq/5.clj | clojure | (require '[criterium.core :refer [quick-bench]])
(let [x 5000 ^clojure.lang.PersistentVector v (into [] (range 1e5))]
< 1 >
Execution time mean : 88.201576 µs
(let [x 5000 ss (into (sorted-set) (range 1e5))]
< 2 >
Execution time mean : 1.223698 µs | |
faa453cadb44bb6d25a67ef9577e2ffefd0d99b87d4081a7e92be77fe63ba45e | manavpatnaik/haskell | 19_largest_of_3_nums.hs | largestOfThree :: (Ord a) => a -> a -> a -> a
largestOfThree a b c
| (a >= b) && (a >= c) = a
| (b >= a) && (b >= c) = b
| otherwise = c
main = do
print(largestOfThree 1 2 3)
print(largestOfThree 3 2 3) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/af45c3eb5c3461aa77cf25610dfcb3b41c7f7ef9/practice-set-1-basics/19_largest_of_3_nums.hs | haskell | largestOfThree :: (Ord a) => a -> a -> a -> a
largestOfThree a b c
| (a >= b) && (a >= c) = a
| (b >= a) && (b >= c) = b
| otherwise = c
main = do
print(largestOfThree 1 2 3)
print(largestOfThree 3 2 3) | |
dd7773f1526a07a296be41d7530b7a0b3e551930717cb1652309185ae45938ea | rubenbarroso/EOPL | 3_14.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/2-3-2.scm") ;environments
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(define scanner-spec-3-13
'((white-sp
(whitespace) skip)
... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter3/3_14.scm | scheme | environments
Lambda-calculus to the rescue. We can use a procedural implementation of
the boolean values:
if will need only to do (see eval-expression):
(if c a b) (c a b)
We no longer need true-value?
the interpreter
Tests | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(define scanner-spec-3-13
'((white-sp
(whitespace) skip)
(comment
("%" (arbno (not #\newline))) skip)
(identifier
... |
38781d1b87deb5c9d44d835ba1eacf1cd482caff25d10429aae9a8a692f6ec49 | slyrus/mcclim-old | gif.lisp | -*- Mode : Lisp ; Package : MCCLIM - IMAGES -*-
( c ) copyright 2008 by
( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License , o... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Extensions/Bitmap-formats/gif.lisp | lisp | Package : MCCLIM - IMAGES -*-
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
License along with ... |
( c ) copyright 2008 by
( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Free Software Fou... |
40cacaa31ba09304c6470f031cabd1ec4afcdd7eb2e24ec2d393dbfbecfce606 | mirage/irmin | io.mli |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/8e083d88dc6b38964e38b4f1dc7dbfa541439c0b/src/irmin-pack/unix/io.mli | ocaml |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | |
a74c1dbedbfff96d213f133340202d56764be2fa5b884a5d52e6d9d052799ee8 | tmaciejewski/see | see_db_storage_mnesia.erl | -module(see_db_storage_mnesia).
-include_lib("see_db_records.hrl").
-export([create_tables/0,
create_tables/1,
start/0,
stop/0,
update_url/3,
add_url/1,
get_unvisited/0,
set_unvisited/1,
get_page/1,
get_pages_from_index/1,
get_w... | null | https://raw.githubusercontent.com/tmaciejewski/see/3838d06c291fe486a5b3634f1fedcd82336ed985/apps/db/src/see_db_storage_mnesia.erl | erlang | ------------------------------------------------------------------------- | -module(see_db_storage_mnesia).
-include_lib("see_db_records.hrl").
-export([create_tables/0,
create_tables/1,
start/0,
stop/0,
update_url/3,
add_url/1,
get_unvisited/0,
set_unvisited/1,
get_page/1,
get_pages_from_index/1,
get_w... |
f1ef96dba88ce543f23f8db677f04bb762399e1c187a53e5db5d011548702965 | klakplok/goji | PPrintOCaml.mli | (**************************************************************************)
(* *)
(* PPrint *)
(* *)
, INRIA... | null | https://raw.githubusercontent.com/klakplok/goji/78da18fafdd32910fc85f334210c9cd3aae2f974/pprint-20130324/src/PPrintOCaml.mli | ocaml | ************************************************************************
PPrint
... | , INRIA Paris - Rocquencourt
, IT University of Copenhagen
Copyright 2007 - 2013 INRIA . All rights reserved . This file is
distributed under the terms of the CeCILL - C license , as described
type constructor = string
type type_nam... |
239311e908450e1fccde333fce60d8f1f64a456e2ea2d7c1eeaa3cf9e591ebf7 | alanzplus/EOPL | 1.23-test.rkt | #lang eopl
(require rackunit "1.23.rkt")
(require rackunit/text-ui)
(define list-index-test
(test-suite
"Tests for (list-index pred lst)"
(check-equal? (list-index number? '(a 2 (1 3) b 7)) 1)
(check-equal? (list-index symbol? '(a (b c) 17 foo)) 0)
(check-equal? (list-index symbol? '(1 2 (a b) 3)) #... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/1.23-test.rkt | racket | #lang eopl
(require rackunit "1.23.rkt")
(require rackunit/text-ui)
(define list-index-test
(test-suite
"Tests for (list-index pred lst)"
(check-equal? (list-index number? '(a 2 (1 3) b 7)) 1)
(check-equal? (list-index symbol? '(a (b c) 17 foo)) 0)
(check-equal? (list-index symbol? '(1 2 (a b) 3)) #... | |
5eac2840309471702bee6bd72d4cf98fc024c49d0623346db8320b42b4291a39 | korya/efuns | optimize2.ml | (***********************************************************************)
(* *)
(* AsmOpt *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/optimize2.ml | ocaml | *********************************************************************
AsmOpt
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Args
open Asm
open Approx
let stat_dead_instrs = ref 0
let stat_spill_deleted = ref 0
let... |
ea5be2e276e438c44ae135136298552b8cbb0b694fc024a45e4a08711d7ba8a9 | imrehg/ypsilon | exceptions.scm | (library (rnrs exceptions (6))
(export with-exception-handler guard raise raise-continuable else =>)
(import (core exceptions)))
| null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/stdlib/rnrs/exceptions.scm | scheme | (library (rnrs exceptions (6))
(export with-exception-handler guard raise raise-continuable else =>)
(import (core exceptions)))
| |
5740853c88355248fdfd56bb4565744b7fc0b2e3c13849e7539045784ff25e4d | takikawa/racket-ppa | util.rkt | #lang scribble/doc
@(require scribble/manual
scribble/eval
scriblib/render-cond
scribble/core
scribble/html-properties
(for-syntax scheme/base)
(for-label scheme/base
racket/stream))
@(provide (all-defined-out))
@(define-syntax (srfi st... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/srfi-doc/srfi/scribblings/util.rkt | racket | { The `lst' argument is a list of
| #lang scribble/doc
@(require scribble/manual
scribble/eval
scriblib/render-cond
scribble/core
scribble/html-properties
(for-syntax scheme/base)
(for-label scheme/base
racket/stream))
@(provide (all-defined-out))
@(define-syntax (srfi st... |
ebab3aee2ae98c920e65de1dc5ac076a134beb88b5570917ece26fe4edd31051 | axelarge/advent-of-code | day10.clj | (ns advent-of-code.y2018.day10
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def test-input (get-input 2018 10 "test"))
(def input (get-input 2018 10))
(defn parse-line [line]
(let [[x y vx vy] (find-ints line)]
{:x x :y y :vx vx :vy vy}))
(defn bounds [points]
(let... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2018/day10.clj | clojure | (ns advent-of-code.y2018.day10
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def test-input (get-input 2018 10 "test"))
(def input (get-input 2018 10))
(defn parse-line [line]
(let [[x y vx vy] (find-ints line)]
{:x x :y y :vx vx :vy vy}))
(defn bounds [points]
(let... | |
35ce78989a69af97239ff5600dc67b6a27d7632f17fa259200083b1ca96c8c7f | michalmarczyk/ctries.clj | clj_test.clj | (ns ctries.clj-test
(:use clojure.test)
(:require [ctries.clj :as ct]
[collection-check :refer [assert-map-like assert-equivalent-maps]]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.t... | null | https://raw.githubusercontent.com/michalmarczyk/ctries.clj/f7212112ffd01d3e41d516cc5d5e8f34127a4579/test/ctries/clj_test.clj | clojure | (ns ctries.clj-test
(:use clojure.test)
(:require [ctries.clj :as ct]
[collection-check :refer [assert-map-like assert-equivalent-maps]]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.t... | |
3143771eddf55aaffdd52ee0c73144d76798b299261fcfd029bb93d4f150f9a5 | skvamme/pigpio | callback.erl | -module(callback).
-author(skvamme).
%-export([make/2,init/2,loop/4]).
-compile(export_all).
-define(PIGPIO_IP,"127.0.0.1").
-define(PIGPIO_PORT,8888).
make(Parent,Bits) ->
spawn(?MODULE,init,[Parent,Bits]).
init(Parent,Bits) ->
io:format("New process: ~p~n", [?MODULE]),
{ok,Socket} = gen_tcp:co... | null | https://raw.githubusercontent.com/skvamme/pigpio/1637defce9b8691e1e75159b65d37fd6a13a0497/src/callback.erl | erlang | -export([make/2,init/2,loop/4]).
notifybegin
io:format("~p got unknown msg: ~p~n",[?MODULE, Any]), | -module(callback).
-author(skvamme).
-compile(export_all).
-define(PIGPIO_IP,"127.0.0.1").
-define(PIGPIO_PORT,8888).
make(Parent,Bits) ->
spawn(?MODULE,init,[Parent,Bits]).
init(Parent,Bits) ->
io:format("New process: ~p~n", [?MODULE]),
{ok,Socket} = gen_tcp:connect(?PIGPIO_IP, ?PIGPIO_PORT, [b... |
e4d6e9e9179aa327ca68a31e5a87a172a4b15f74d8666c27e4a648b22f8da98f | IBM-Watson/kale | document_conversion_test.clj | ;;
( C ) Copyright IBM Corp. 2016 All Rights Reserved .
;;
(ns kale.document-conversion-test
(:require [kale.document-conversion :as dc]
[kale.common :refer [set-language]]
[org.httpkit.fake :refer [with-fake-http]]
[clojure.test :refer :all]
[slingshot.test :refer :... | null | https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/test/kale/document_conversion_test.clj | clojure | ( C ) Copyright IBM Corp. 2016 All Rights Reserved .
(ns kale.document-conversion-test
(:require [kale.document-conversion :as dc]
[kale.common :refer [set-language]]
[org.httpkit.fake :refer [with-fake-http]]
[clojure.test :refer :all]
[slingshot.test :refer :all]))... | |
eaba01c64f343520b3866d2b580a5f7e24966febcbc09b92110bb0de70cc589a | saolsen/floclo | main.clj | (ns floclo.main
(:require [clojure.edn :as edn]
[floclo.core :as f]
[floclo.plugins.clojure :as clj]
[floclo.plugins.echo :as echo]))
(defn -main [org room plugin-file]
(let [plugins (edn/read-string (slurp plugin-file))]
(f/start org room plugins)))
| null | https://raw.githubusercontent.com/saolsen/floclo/c92604eaf20c259083074ae4c4bf3a2ca79c3fde/src/floclo/main.clj | clojure | (ns floclo.main
(:require [clojure.edn :as edn]
[floclo.core :as f]
[floclo.plugins.clojure :as clj]
[floclo.plugins.echo :as echo]))
(defn -main [org room plugin-file]
(let [plugins (edn/read-string (slurp plugin-file))]
(f/start org room plugins)))
| |
c157eedee79753a6afb45b543053936a07e10bd9cd6f69adc3d0b1460ccea807 | gafiatulin/codewars | PriceOfMango.hs | -- Price of Mangoes
module PriceOfMango where
mango :: Int -> Int -> Int
mango q p = (q `quot` 3) * (2*p) + (q `mod` 3) * p
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/8%20kyu/PriceOfMango.hs | haskell | Price of Mangoes |
module PriceOfMango where
mango :: Int -> Int -> Int
mango q p = (q `quot` 3) * (2*p) + (q `mod` 3) * p
|
0277dbc99db968f6558cbec1efd4916510c33e2eb65249ec9af08c80694ca1f9 | ruanpienaar/hawk | hawk_node_mon.erl | -module(hawk_node_mon).
-export([
start_link/0,
do_start_link/0,
add_node/2
]).
-ifdef(TEST).
-export([
loop/0
]).
-endif.
start_link() ->
proc_lib:start_link(?MODULE, do_start_link, []).
do_start_link() ->
process_flag(trap_exit, true),
true = erlang:register(?MODULE, self()),
?MODUL... | null | https://raw.githubusercontent.com/ruanpienaar/hawk/078252cea07e73efc7d2c4e283fc74d3082db8e2/src/hawk_node_mon.erl | erlang | is_known_node(Node) ->
ok.
error_logger:error_msg("", []),
Another node connected to our cluster... | -module(hawk_node_mon).
-export([
start_link/0,
do_start_link/0,
add_node/2
]).
-ifdef(TEST).
-export([
loop/0
]).
-endif.
start_link() ->
proc_lib:start_link(?MODULE, do_start_link, []).
do_start_link() ->
process_flag(trap_exit, true),
true = erlang:register(?MODULE, self()),
?MODUL... |
3dbcb0c9a7979937d7ce7e15587d7d0b3746c18add65b08fee06b50a8a209af3 | thelema/ocaml-community | hashtbl.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/stdlib/hashtbl.mli | 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 GNU Library General Public License , with
* { 6 Generic interface }
type ('a,... |
d8b7fc3d741f78f0209340ec17b10b3e28a3ee60eda42afcc43fc99c652c098b | lisp-korea/sicp | eval.scm |
(define true #t)
(define false #f)
(define (true? x)
(not (eq? x false)))
(define (false? x)
(eq? x false))
(define (tagged-list? exp tag)
(if (pair? exp) (eq? (car exp) tag) false))
(define (self-evaluating? exp)
(cond ((number? exp) true)
((string? exp) true)
(else false)))
;; =======================... | null | https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch04/4.1/eval.scm | scheme | ======================================================================
조건식
======================================================================
if
======================================================================
잇단식
======================================================================
begin
==========... |
(define true #t)
(define false #f)
(define (true? x)
(not (eq? x false)))
(define (false? x)
(eq? x false))
(define (tagged-list? exp tag)
(if (pair? exp) (eq? (car exp) tag) false))
(define (self-evaluating? exp)
(cond ((number? exp) true)
((string? exp) true)
(else false)))
(define (if? exp)
(tagg... |
2aecca0dcd2b2f79661a7095a41d15d6a17554c2c15a1394ba39a21e148162ef | wireapp/wire-server | Members.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/galley/src/Galley/Cassandra/Conversation/Members.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
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 PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Galley.Cassandra.Conversa... |
d5e844296d9fed980aa88c533e340534249efca049c959d6f4c3e5da8bbc1c67 | jeromesimeon/Galax | sxp_context.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/streaming_xpath/sxp_context.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : sxp_context.mli , v 1.2 2007/02/01 22:08:54 simeon Exp $
Module :
Description :
This module provides data structures and accessors that together
constitute the context for streaming XPath evaluation over
l... |
8fa25f244c10af03a7f9607bcfb356094a85c934b389be3a0c3d42bc262575c2 | puppetlabs/trapperkeeper-webserver-jetty9 | example_services.clj | (ns examples.webrouting-app.example-services
(:require [clojure.tools.logging :as log]
[puppetlabs.trapperkeeper.core :refer [defservice]]
[puppetlabs.trapperkeeper.services :refer [get-services]]
[compojure.core :as compojure]
[compojure.route :as route]))
(defn hello... | null | https://raw.githubusercontent.com/puppetlabs/trapperkeeper-webserver-jetty9/98fd16ef3df2b0b753fce743848bc078d9527cb7/examples/webrouting_app/src/examples/webrouting_app/example_services.clj | clojure | (ns examples.webrouting-app.example-services
(:require [clojure.tools.logging :as log]
[puppetlabs.trapperkeeper.core :refer [defservice]]
[puppetlabs.trapperkeeper.services :refer [get-services]]
[compojure.core :as compojure]
[compojure.route :as route]))
(defn hello... | |
35d10f1520e4fe1be10e12bef2113f6777d363346ba308d151edc17a951a9dc9 | kowainik/typerep-map | Vector.hs | module Test.TypeRep.Vector
( vectorSpec
) where
import Prelude hiding (lookup)
import Data.Functor.Identity (Identity (..))
import Test.Hspec (Spec, describe, it, shouldBe)
import Data.TypeRep.Vector (TF (..), fromList, lookup)
-- | Simple test for 'lookup', 'insert' and 'size' functions.
vectorSpec :: Spe... | null | https://raw.githubusercontent.com/kowainik/typerep-map/88b9ac5a236c72bddf610283f6341cebb42f13ea/test/Test/TypeRep/Vector.hs | haskell | | Simple test for 'lookup', 'insert' and 'size' functions. | module Test.TypeRep.Vector
( vectorSpec
) where
import Prelude hiding (lookup)
import Data.Functor.Identity (Identity (..))
import Test.Hspec (Spec, describe, it, shouldBe)
import Data.TypeRep.Vector (TF (..), fromList, lookup)
vectorSpec :: Spec
vectorSpec = describe "Vector TypeRep" $
describe "Looku... |
aac3ccb0322fb5fe306fd9c2c66d4879ab2ac32d72d05c71c659dd500f10bb87 | CorticalComputer/Book_NeuroevolutionThroughErlang | morphology.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_17/morphology.erl | erlang |
All rights reserved.
Get Init Standard Actuators/Sensors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Get Init Substrate_CPPs/Substrate_CEPs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{cartesian,Dimensions*2+3},
{centripital_distances,2+3},
{cart... | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(m... |
8b95d8f90d5b11b1332882ffb1e8d00c188deab696b11c9beac238d8694cf82d | openweb-nl/kafka-graphql-examples | config.cljs | (ns nl.openweb.bank.config)
(def debug?
^boolean goog.DEBUG)
| null | https://raw.githubusercontent.com/openweb-nl/kafka-graphql-examples/a404a265b5b0f13968a24d00c6494981063937fe/frontend/src/cljs/nl/openweb/bank/config.cljs | clojure | (ns nl.openweb.bank.config)
(def debug?
^boolean goog.DEBUG)
| |
b9ae1d8c8cdc70ef7667af504291891556c6b11e3b379c073e6b8641875951d2 | PseudoPower/AFSM | SMMonoid.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.AFSM.SMMonoid
Copyright : ( c ) , 2016 ,
License : MIT License
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
------------------------------------------------... | null | https://raw.githubusercontent.com/PseudoPower/AFSM/9d6ace9d279992a18f44856058040a0ef391abd6/src/Control/AFSM/Draft/SMMonoid.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.AFSM.SMMonoid
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
smempty
smid
smappend
3 fanoutSMM
Category instanc... | Copyright : ( c ) , 2016 ,
License : MIT License
module Control.AFSM.Draft.SMMonoid where
import Data.Monoid
import Control.Category
import Control.Arrow
import Control.AFSM.CoreType
import Control.AFSM.Core
class SMMonoid a where
smempty :: Int -> a
smid :: Int -> a -> a
smappend :: Int ... |
2c44b4b830562ddf8ecd206c03b4a7864ac9ab6486f34d03d3deb9c7508c861a | clojure-interop/google-cloud-clients | Type$StructField.clj | (ns com.google.cloud.spanner.Type$StructField
"Describes an individual field in a STRUCT type."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner Type$StructField]))
(defn *of
"name - `java.lang.String`
type - `com.google.cloud.spanner.Type`
returns: `com.google.cloud.spa... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/Type%24StructField.clj | clojure | (ns com.google.cloud.spanner.Type$StructField
"Describes an individual field in a STRUCT type."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner Type$StructField]))
(defn *of
"name - `java.lang.String`
type - `com.google.cloud.spanner.Type`
returns: `com.google.cloud.spa... | |
681265edec1a89a9daf12abd0c4d78bdc927cfad65cdba78285a06dac69e8b31 | footprintanalytics/footprint-web | util.cljc | (ns metabase.mbql.util
"Utilitiy functions for working with MBQL queries."
(:refer-clojure :exclude [replace])
#?@
(:clj
[(:require [clojure.string :as str]
[clojure.tools.logging :as log]
[metabase.mbql.schema :as mbql.s]
[metabase.mbql.schema.helpers :as schema.hel... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/shared/src/metabase/mbql/util.cljc | clojure | -> true
-> true"
+----------------------------------------------------------------------------------------------------------------+
| Functions for manipulating queries |
+-------------------------------------------------------------------... | (ns metabase.mbql.util
"Utilitiy functions for working with MBQL queries."
(:refer-clojure :exclude [replace])
#?@
(:clj
[(:require [clojure.string :as str]
[clojure.tools.logging :as log]
[metabase.mbql.schema :as mbql.s]
[metabase.mbql.schema.helpers :as schema.hel... |
70f9f06b813be8e53994bc3ed4abe4d0f3ab76022b752d4986e1a6a7eefc989b | 8c6794b6/haskell-sc-scratch | Take02.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE KindSignatures #
{-# LANGUAGE Rank2Types #-}
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : un... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Oleg/TTF/Extra/Take02.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE Rank2Types #
Node "var" [Leaf v] -> ???
each by each. We need a method to denote the argument as var.
How can we?
fromTree_lam e d = case e of
let Node "var" [Leaf idx] = v
ety@(ExtTy argty) <- tree2ty ty
This does not work:
But below does.
type Gamma = [(String,TypeR... | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE KindSignatures #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
To deseria... |
7c3c959af130fec8d1735327b7d23c72672a3a151a81cc5478b3c043b29ceb54 | f-f/dhall-clj | beta_normalize_test.clj | (ns dhall-clj.beta-normalize-test
(:require [clojure.test :refer :all]
[medley.core :refer [map-vals]]
[dhall-clj.ast :refer :all]
[dhall-clj.parse :refer [parse expr]]
[dhall-clj.import :refer [resolve-imports]]
[dhall-clj.beta-normalize :refer [beta-... | null | https://raw.githubusercontent.com/f-f/dhall-clj/05d25d2464972bbeae46d828b478b4cfd59836dc/test/dhall_clj/beta_normalize_test.clj | clojure | Simple tests from the spec
(λ(x : Bool) → x == False) True ⇥ False
Doesn't terminate :( | (ns dhall-clj.beta-normalize-test
(:require [clojure.test :refer :all]
[medley.core :refer [map-vals]]
[dhall-clj.ast :refer :all]
[dhall-clj.parse :refer [parse expr]]
[dhall-clj.import :refer [resolve-imports]]
[dhall-clj.beta-normalize :refer [beta-... |
d22765d6793a73b28cd6d4d3b70551ee939fff0216b01a488841c58547f2f6c0 | susanemcg/pandoc-tufteLaTeX2GitBook | Shared.hs | # LANGUAGE DeriveDataTypeable , CPP , MultiParamTypeClasses ,
FlexibleContexts , ScopedTypeVariables #
FlexibleContexts, ScopedTypeVariables #-}
Copyright ( C ) 2006 - 2014 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License ... | null | https://raw.githubusercontent.com/susanemcg/pandoc-tufteLaTeX2GitBook/00c34b4299dd89c4e339e1cde006061918b559ab/pandoc-1.12.4.2/src/Text/Pandoc/Shared.hs | haskell | * List processing
* Text processing
* Date/time
* Pandoc block and inline list processing
* TagSoup HTML handling
* File handling
* Error handling
* Safe read
List processing
| Split string into chunks divided at specified indices.
Text processing
| Returns an association list of backslash escapes for t... | # LANGUAGE DeriveDataTypeable , CPP , MultiParamTypeClasses ,
FlexibleContexts , ScopedTypeVariables #
FlexibleContexts, ScopedTypeVariables #-}
Copyright ( C ) 2006 - 2014 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License ... |
f72712e35b5f813b25f9fcfd5407a024f552d268a75358f694cc72cac5be9a26 | wdebeaum/step | worthless.lisp | (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(w::worthless
(SENSES
((meta-data :origin adjective-reorganization :entry-date 20170403 :change-date nil :comments nil :wn nil :comlex nil)
(lf-parent ont::not-worthy-val)
)
)
)))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/worthless.lisp | lisp | (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(w::worthless
(SENSES
((meta-data :origin adjective-reorganization :entry-date 20170403 :change-date nil :comments nil :wn nil :comlex nil)
(lf-parent ont::not-worthy-val)
)
)
)))
| |
57e9da5d4e9650c822a927d9d6ed32421ef826dc6c37440a43a38eda64329a68 | seckcoder/course-compiler | r3_6.rkt | (let ([v (vector 0)])
(let ([void (vector-set! v 0 #f)])
(vector-ref v 0)))
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r3_6.rkt | racket | (let ([v (vector 0)])
(let ([void (vector-set! v 0 #f)])
(vector-ref v 0)))
| |
c639793802b2c53ad32de47c56ff531a4c627a8bfc8d8564a319fd3bfe299934 | clojure-interop/aws-api | AmazonTranscribeClientBuilder.clj | (ns com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder
"Fluent builder for AmazonTranscribe. Use of the builder is preferred over
using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.transcribe AmazonTranscribeClientBuilder]))
(... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.transcribe/src/com/amazonaws/services/transcribe/AmazonTranscribeClientBuilder.clj | clojure | (ns com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder
"Fluent builder for AmazonTranscribe. Use of the builder is preferred over
using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.transcribe AmazonTranscribeClientBuilder]))
(... | |
671cdc44b103d7340da0113b3ed6f9b90e9a66fa42b614cf9aec7eb35296a6c6 | airbus-seclab/bincat | newspeak.mli |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 - 2021 ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/4ece34bf6f18b938ab67151b5738bd15e8b3c5e1/ocaml/src/npk/newspeak/newspeak.mli | ocaml | * {2 Types}
The type of a program: file names, global variable declarations,
function definitions and the size of pointers.
* table of all declared global
variables
* initialization block for globals
* table of all declared functions
* size of pointers in number of bits
* source language from the progr... |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 - 2021 ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... |
78e34c59a7fc1cb3faa4fae7ac1ecbda1b3632e4d524f6fcb93b65f29b9b1063 | NetComposer/nksip | path_test_p2.erl | %% -------------------------------------------------------------------
%%
%% path_test: Path (RFC3327) Tests
%%
Copyright ( c ) 2013 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the Licen... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/test/callbacks/path_test_p2.erl | erlang | -------------------------------------------------------------------
path_test: Path (RFC3327) Tests
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
spe... | Copyright ( c ) 2013 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(path_test_p2).
-inc... |
a1ce39f3c860e57fc2e97536ce863d3d205aec64c92198c61073cff07bb346ef | soulomoon/SICP | Exercise3.17.scm | Exercise 3.17 : Devise a correct version of the count - pairs procedure of Exercise 3.16 that returns the number of distinct pairs in any structure . ( Hint : Traverse the structure , maintaining an auxiliary data structure that is used to keep track of which pairs have already been counted . )
(define (count_pairs ... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter3/Exercise3.17.scm | scheme | memory limit : 128 MB .
> | Exercise 3.17 : Devise a correct version of the count - pairs procedure of Exercise 3.16 that returns the number of distinct pairs in any structure . ( Hint : Traverse the structure , maintaining an auxiliary data structure that is used to keep track of which pairs have already been counted . )
(define (count_pairs ... |
428eb504f8b37737114d2606a21bc38662961492783a11bd482c5a9210fb3f2a | sebschrader/programmierung-ss2015 | AM0.hs | module AMx.AM0 where
import Prelude hiding (EQ,LT,GT)
import Data.List(intercalate)
import Data.Map.Strict(Map)
import qualified Data.IntMap.Strict as IntMap
import AMx.Language(InstructionSpecification(..), Type(..), Program, getInstruction, fromList, programBounds)
type Address = Int
type Value = Int
type Stack = [V... | null | https://raw.githubusercontent.com/sebschrader/programmierung-ss2015/88fc40107dc42f013d1a1374b2b44a481b4f1746/AMx/AM0.hs | haskell | Possible runtime errors
AM0 Instructions
Specifications for AM0 instructions
Configuration state of an AM0 machine
Load/Store instructions
Arithmetic and logical instructions
Control flow instructions | module AMx.AM0 where
import Prelude hiding (EQ,LT,GT)
import Data.List(intercalate)
import Data.Map.Strict(Map)
import qualified Data.IntMap.Strict as IntMap
import AMx.Language(InstructionSpecification(..), Type(..), Program, getInstruction, fromList, programBounds)
type Address = Int
type Value = Int
type Stack = [V... |
37d11be89be048624923ec351961806a8df857be0cafd4e9c8db5c694264b052 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Distance.D... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Distance/DE/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
Metric | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE LambdaCase #
module Duckling.Distance.DE.Rules (rules) where
import Data.String
import Data.Text (Text)
import Prelude
import Duckling.Dimensions.Types
import Duckling.Distance.Helpers
import Duckling.Distance.Types (DistanceData(..))
import qualified Du... |
f4681dee8deaedac37aa5c337fd638627844152fbf71d85d9fc7a4cec7e702cf | nextjournal/advent-of-clerk | day_20.clj | # 🎄 Advent of Clerk : Day 20
(ns advent-of-clerk.day-20
(:require [nextjournal.clerk :as clerk])) | null | https://raw.githubusercontent.com/nextjournal/advent-of-clerk/9f358c9f13995f591981a26fc3683dea574933b1/src/advent_of_clerk/day_20.clj | clojure | # 🎄 Advent of Clerk : Day 20
(ns advent-of-clerk.day-20
(:require [nextjournal.clerk :as clerk])) | |
f1040f9d1c363b7fd8eb33e9e64b42fca721342c9c1652b87c84d0cc05884cb3 | samply/blaze | logical_operators_test.clj | (ns blaze.elm.compiler.logical-operators-test
"13. Logical Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.elm.compiler :as c]
[blaze.elm.compiler.logical-operators]
[blaze.elm.compiler.test-util :as tu]
[blaze.elm.literal :as elm]
[blaze.elm.literal... | null | https://raw.githubusercontent.com/samply/blaze/f7d26bf3db0bc74b9195c59891261b1eb2c5accb/modules/cql/test/blaze/elm/compiler/logical_operators_test.clj | clojure |
The And operator returns the logical conjunction of its arguments. Note that
either argument is false, the result is false; if both arguments are true,
otherwise , the result is null . Note also that ELM does
not prescribe short-circuit evaluation.
The Implies operator returns the logical implication of its argu... | (ns blaze.elm.compiler.logical-operators-test
"13. Logical Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.elm.compiler :as c]
[blaze.elm.compiler.logical-operators]
[blaze.elm.compiler.test-util :as tu]
[blaze.elm.literal :as elm]
[blaze.elm.literal... |
b18460e670a2042b4987ee71155e8b07fda8010402ec011a85e0776cc1808ca8 | nosco/hx | core.cljs | (ns workshop.core
(:require [devcards.core :as dc :include-macros true]
["react" :as react]
["react-dom" :as react-dom]
[hx.react :as hx]
[hx.hooks :as hooks]
["scheduler" :as scheduler]))
(defn Example [props]
(react/createElement "div" nil (prn-str prop... | null | https://raw.githubusercontent.com/nosco/hx/ce7752b2a551b9d1ca534a550e4a4644386c6241/examples/workshop/core.cljs | clojure | (ns workshop.core
(:require [devcards.core :as dc :include-macros true]
["react" :as react]
["react-dom" :as react-dom]
[hx.react :as hx]
[hx.hooks :as hooks]
["scheduler" :as scheduler]))
(defn Example [props]
(react/createElement "div" nil (prn-str prop... | |
0e4b9eb83b2e342639c32258c6572729ece93af542ab8a04f287d4c9fcc9983d | jacekschae/learn-datomic-course-files | db.clj | (ns cheffy.conversation.db
(:require [datomic.client.api :as d]
[com.yetanalytics.squuid :as sq])
(:import (java.util Date)))
(def conversation-pattern
[:conversation/conversation-id
{:conversation/messages
[:message/message-id
:message/body
{:message/owner
[:account/account-id... | null | https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/be20cd3f77c70fac33c95f3231f0ccdf41525f67/increments/63-squuid/src/main/cheffy/conversation/db.clj | clojure | transact-message
find conversation by account-id | (ns cheffy.conversation.db
(:require [datomic.client.api :as d]
[com.yetanalytics.squuid :as sq])
(:import (java.util Date)))
(def conversation-pattern
[:conversation/conversation-id
{:conversation/messages
[:message/message-id
:message/body
{:message/owner
[:account/account-id... |
c6ccb08f91435b8e5b5bfe867d8660664f32afe8e2c94be067c6b7b0556c5041 | janegca/htdp2e | Exercise-221-fold1.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname Exercise-221-fold1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repe... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise-221-fold1.rkt | racket | about the language level of this file in a form that our tools can easily process.
[List-of Number] -> Number
computes the sum of
the numbers on l
[List-of Number] -> Number
computes the product of
the numbers on l
[Number->Number] -> Number -> [List-of Number] -> Number
reduces a list of numbers using the... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname Exercise-221-fold1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 221 .
Design fold1 , which is the abstr... |
c5c1b12f7ac84be03bb3dbfa4c09cdc84c2be2105024eae30e0ab723f6e29cbc | marigold-dev/deku | base58.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/marigold-dev/deku/21ec2bf05ce688c5b6012be16545175e75403f06/deku-p/src/core/repr/base58.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
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 " ,... |
50b159fa0be2e2be534f5adeb35a2f05d33932180eaba96134accef3e9a6d38a | jnavila/plotkicadsch | boundingBox.ml | open Kicadsch.Sigs
type t = { left_inf: coord; right_sup: coord}
let create () =
{ left_inf= Coord(10000000000, 1000000000); right_sup = Coord(-100000, -100000)}
let create_from_rect (Coord (x, y) as c1) (Coord (width, height)) =
{ left_inf= c1; right_sup= Coord(x+width, y+height)}
let create_from_limits (Coor... | null | https://raw.githubusercontent.com/jnavila/plotkicadsch/a8afb216bf04aeaeb9088ef264407b094553d145/plotkicadsch/src/boundingBox.ml | ocaml | open Kicadsch.Sigs
type t = { left_inf: coord; right_sup: coord}
let create () =
{ left_inf= Coord(10000000000, 1000000000); right_sup = Coord(-100000, -100000)}
let create_from_rect (Coord (x, y) as c1) (Coord (width, height)) =
{ left_inf= c1; right_sup= Coord(x+width, y+height)}
let create_from_limits (Coor... | |
275c8fd3a6e204457f64f54117c51f18d90e6ea111a12c157a4904b3e0dcbdec | Dasudian/DSDIN | wormhole_codec.erl | -module(wormhole_codec).
-export([enc/2,
dec/1]).
-export_types([ch_open_msg/0,
ch_accept_msg/0,
ch_reestabl_msg/0,
fnd_created_msg/0,
fnd_signed_msg/0,
fnd_locked_msg/0,
upd_deposit_msg/0,
upd_withdrawal... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/wormhole/src/wormhole_codec.erl | erlang | -type length() :: i2bytes(). | -module(wormhole_codec).
-export([enc/2,
dec/1]).
-export_types([ch_open_msg/0,
ch_accept_msg/0,
ch_reestabl_msg/0,
fnd_created_msg/0,
fnd_signed_msg/0,
fnd_locked_msg/0,
upd_deposit_msg/0,
upd_withdrawal... |
a1811a6aad5427ac100042f0c0503c038300e7ef1ba319befc3c9f420134c8a9 | tweag/webauthn | Main.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Main
( main,
)
where
import Crypto.Hash (hash)
import qualified Crypto.WebAuthn.Cose.SignAlg as Cose
import qualified Crypto.WebAuthn.Encoding.WebAuthnJson as WJ
impo... | null | https://raw.githubusercontent.com/tweag/webauthn/b9341781bc82ed32a8b729036ae96f636198542f/tests/Main.hs | haskell | # LANGUAGE GADTs #
| Load all files in the given directory, and ensure that all of them can be
decoded. The caller can pass in a function to run further checks on the
decoded value, but this is mainly there to ensure that `a` occurs after the
fat arrow.
| During tests, we need access to the metadata to verify the ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Main
( main,
)
where
import Crypto.Hash (hash)
import qualified Crypto.WebAuthn.Cose.SignAlg as Cose
import qualified Crypto.WebAuthn.Encoding.WebAuthnJson as WJ
import qualified Crypto.Web... |
eb8d02880235f6f271e21eefd0fd12fc8c8d8de4cb855f9957934180ee814803 | mikewin/cspbox-trading | swbr-ecn.clj | (ns
autorun.trade.proj.swbr-ecn
(:require
[cspbox.runtime.sys.emit.inout.inject
:refer
[call-fn mult-send replace-by-config]]
[clojure.core.match :refer [match]]
[cspbox.runtime.sys.emit.state.use
:refer
[lookup-state fsm-run state-get state-set]]
[cspbox.runtime.sys.emit.group
:refer
[run-d... | null | https://raw.githubusercontent.com/mikewin/cspbox-trading/76f9cfb780d5f36e5fbd6d8cec7c978a0e51cb94/test/stra/swbr-ecn.clj | clojure | (ns
autorun.trade.proj.swbr-ecn
(:require
[cspbox.runtime.sys.emit.inout.inject
:refer
[call-fn mult-send replace-by-config]]
[clojure.core.match :refer [match]]
[cspbox.runtime.sys.emit.state.use
:refer
[lookup-state fsm-run state-get state-set]]
[cspbox.runtime.sys.emit.group
:refer
[run-d... | |
d9096c642cfa1319fed07b1c97ef94587baee27b70d23ad08c37b414c383ef22 | dinosaure/art | make.ml | open Rresult
let reporter ppf =
let report src level ~over k msgf =
let k _ =
over () ;
k () in
let with_metadata header _tags k ppf fmt =
Format.kfprintf k ppf
("%a[%a]: " ^^ fmt ^^ "\n%!")
Logs_fmt.pp_header (level, header)
Fmt.(styled `Magenta string)
(Log... | null | https://raw.githubusercontent.com/dinosaure/art/ae9379210a7f4bca317b2624e7c8a730c41734f9/bin/make.ml | ocaml | open Rresult
let reporter ppf =
let report src level ~over k msgf =
let k _ =
over () ;
k () in
let with_metadata header _tags k ppf fmt =
Format.kfprintf k ppf
("%a[%a]: " ^^ fmt ^^ "\n%!")
Logs_fmt.pp_header (level, header)
Fmt.(styled `Magenta string)
(Log... | |
05b354475bde4306c6ea0f35ba51364d255fdb02de2517ac211ff39831b8bd89 | open-company/open-company-web | custom_tag.cljs | (ns oc.web.components.ui.custom-tag
(:require [cuerdas.core :as string]
[oops.core :refer (oget oget+ ocall)]
[oc.web.lib.utils :as utils]
[oc.web.utils.dom :as dom-utils]
["react-dom" :as react-dom :refer (findDOMNode)]
["react" :as react]
[goog... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/components/ui/custom_tag.cljs | clojure | Mention is at the bottom, not visible or partially visible
Mention is at the top, not visible or partially visible
Let it where it is, is already visible
(oset! user "selectedKey" "name")
(oset! user "selectedKey" "last-name")
(oset! user "selectedKey" "email")
Right and down arrow
Left and up arrow
Enter... | (ns oc.web.components.ui.custom-tag
(:require [cuerdas.core :as string]
[oops.core :refer (oget oget+ ocall)]
[oc.web.lib.utils :as utils]
[oc.web.utils.dom :as dom-utils]
["react-dom" :as react-dom :refer (findDOMNode)]
["react" :as react]
[goog... |
7f232ad647e0c88653628b1fa136a3a264c87d0ffe722ec7485252dfd427b237 | aantron/luv | pipe_hello_world.ml | let () =
let client = Luv.Pipe.init () |> Result.get_ok in
Luv.Pipe.connect client "echo-pipe" begin function
| Error e ->
Printf.eprintf "Connect error: %s\n" (Luv.Error.strerror e)
| Ok () ->
let message = Luv.Buffer.from_string "Hello, world!" in
Luv.Stream.write client [message] (fun ... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/example/pipe_hello_world.ml | ocaml | let () =
let client = Luv.Pipe.init () |> Result.get_ok in
Luv.Pipe.connect client "echo-pipe" begin function
| Error e ->
Printf.eprintf "Connect error: %s\n" (Luv.Error.strerror e)
| Ok () ->
let message = Luv.Buffer.from_string "Hello, world!" in
Luv.Stream.write client [message] (fun ... | |
c9e6aa5123a12b6d93460b6aa5dbbcba158177f297e8ad79cc562c47197ad339 | BitGameEN/bitgamex | emysql_conn_mgr.erl | -*- mode : erlang;erlang - indent - level : 8;indent - tabs - mode : t -*-
Copyright ( c ) 2009 - 2012
< >
< >
< >
%% Eonblast Corporation <>
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Softwa... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/emysql/src/emysql_conn_mgr.erl | erlang | Eonblast Corporation <>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
tion, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to... | -*- mode : erlang;erlang - indent - level : 8;indent - tabs - mode : t -*-
Copyright ( c ) 2009 - 2012
< >
< >
< >
files ( the " Software"),to deal in the Software without restric-
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARR... |
66645043ee27342664d260d6b5dcb9f1216f5d0c0b1d2ff5e4aed7419204bda0 | kupl/FixML | sub25.ml | type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list;;
let rec diff : aexp * string -> aexp
=fun (aexp,x) ->
match aexp with
|Const(a) -> Const 0
|Var(y) -> if x=y then Const 1 else Const 0
|Power(y, a) ->
if x<>y then Const 0
else if a=1 then dif... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub25.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list;;
let rec diff : aexp * string -> aexp
=fun (aexp,x) ->
match aexp with
|Const(a) -> Const 0
|Var(y) -> if x=y then Const 1 else Const 0
|Power(y, a) ->
if x<>y then Const 0
else if a=1 then dif... | |
841254dbc036e4978d033fd981a4cc5afce5b1ef5719c5e44e5cad5ace0df601 | input-output-hk/cardano-wallet | Compatibility.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
-- |
Copyright : © 202... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/1b42c6e8617955c8df0d07c62133cb16309b5598/lib/wallet/src/Cardano/Wallet/Byron/Compatibility.hs | haskell | |
License: Apache-2.0
* Chain Parameters
* Conversions
------------------------------------------------------------------------------
Chain Parameters
it became an updateable protocol parameter.
NOTE
the following assumption:
This assumption is _true_ for any user using HD wallets (sequential or
random)... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
Copyright : © 2020
... |
0ac6086e34292202a95699f2b2d56ffaf119865e747df47da4db83279acb2a7a | ddssff/refact-global-hse | If.hs | -- | A module with some imports protected by #if. When the cleaner
runs it can only understand one set of CPP variables . It should
-- not modify imports which it cannot see. It should clean imports
-- that are inside a combination of #ifs where it can see, leaving them
-- inside the #ifs where they appeared.
# ... | null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/input/If.hs | haskell | | A module with some imports protected by #if. When the cleaner
not modify imports which it cannot see. It should clean imports
that are inside a combination of #ifs where it can see, leaving them
inside the #ifs where they appeared.
Imports always visible - should be cleaned. Empty should be removed.
Break sh... | runs it can only understand one set of CPP variables . It should
# LANGUAGE CPP , FlexibleInstances , OverloadedStrings #
module If where
import Data.Text (all, unpack, empty)
import Prelude hiding (all, break, empty)
#if !__GHCJS__
imports visible to GHC - should be cleaned and kept inside an ifdef .
import ... |
636f46bc4366570da41e3e9509eb68f11c69295e38793530847c41257bf959fc | apibot-org/apibot | core.cljs | (ns apibot.core
(:require
[apibot.coll :as coll]
[apibot.grexec :as grexec]
[apibot.mixpanel :as mixpanel]
[apibot.raven :as raven]
[apibot.router :as router]
[apibot.state :refer [*app-state]]
[apibot.views.dialogs :as dialogs]
[apibot.views.editor :as editor]
[apibot.views.execut... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/cljs/apibot/core.cljs | clojure | ---- Views ----
------------------------- | (ns apibot.core
(:require
[apibot.coll :as coll]
[apibot.grexec :as grexec]
[apibot.mixpanel :as mixpanel]
[apibot.raven :as raven]
[apibot.router :as router]
[apibot.state :refer [*app-state]]
[apibot.views.dialogs :as dialogs]
[apibot.views.editor :as editor]
[apibot.views.execut... |
981e6e9b8ca41c41eaa23006d05ac928147ff18b3fbc88d44f1e74ae31e2d01d | SKA-ScienceDataProcessor/RC | imaging.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE BangPatterns #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE TemplateHaskell #-}
-- | High level dataflow for imaging program
module Main where
import Con... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS4/dna-programs/imaging.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
| High level dataflow for imaging program
--------------------------------------------------------------
* Imaging dataflow
It's implicitly assumed that all dataflow for generating single
image i... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
module Main where
import Control.Monad
import DNA
import DNA.Channel.File
import Data.Aeson
import qualified Data.ByteString.Lazy as LBS
import Data.Maybe (fromJust,isNothing)
import Data.Time.Clock... |
da7fdbc50e15c8f0bea657f42478e27ce4ea827ed4ae5c37dcbd60f500788406 | screenshotbot/screenshotbot-oss | events.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
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 /.
(defpackage :screenshotbot/events
(:use #:cl)
(:import-from #:easy-macros
... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/87b0cf70ba78a66571939c6f90a1cd59bd585b5e/src/screenshotbot/events.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
if the connection fails, then we'll drop the events and that's okay
(push-event :test-sdf) | 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 /.
(defpackage :screenshotbot/events
(:use #:cl)
(:import-from #:easy-macros
#:def-easy-macro)
(:import-from #:clsql-sys
... |
8cef2b9bae6267f570133e23912c1bd6db76dec103104bccec855ae459da63d6 | dalaing/little-languages | Pretty.hs | module Components.Type.Nat.Pretty where
import Control.Lens (preview)
import Text.PrettyPrint.ANSI.Leijen
import Common.Recursion
import Common.Type.Pretty
import Components.Type.Nat.Data
prettyTyNat :: WithNatType ty
=> ty
-> Maybe Doc
prettyTyNat =
fmap (const . text $ "Nat") .
previe... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Components/Type/Nat/Pretty.hs | haskell | module Components.Type.Nat.Pretty where
import Control.Lens (preview)
import Text.PrettyPrint.ANSI.Leijen
import Common.Recursion
import Common.Type.Pretty
import Components.Type.Nat.Data
prettyTyNat :: WithNatType ty
=> ty
-> Maybe Doc
prettyTyNat =
fmap (const . text $ "Nat") .
previe... | |
49455343559d943185c58942cdf1b56f0df095e41ccf5544a92124e15fb0059f | quux00/land-of-lisp-in-clojure | util.clj | (ns thornydev.orc.util)
macro from 2010 blog post to have default values
specified in a defrecord definition
;; not sure if there is a more "standard" way to do it yet
;; source: -slot-defaults/
(defmacro defrecord+defaults
"Defines a new record, along with a new-RecordName factory function that
returns an... | null | https://raw.githubusercontent.com/quux00/land-of-lisp-in-clojure/2a15a89afa0cd04cf1757ccf7da289031e135165/orc-battle/src/thornydev/orc/util.clj | clojure | not sure if there is a more "standard" way to do it yet
source: -slot-defaults/ | (ns thornydev.orc.util)
macro from 2010 blog post to have default values
specified in a defrecord definition
(defmacro defrecord+defaults
"Defines a new record, along with a new-RecordName factory function that
returns an instance of the record initialized with the default values
provided as part of the... |
68eb48d1dfbc0a7d578f3c2534a86ad26721119220beaf373a6465ab0edc86eb | BinaryAnalysisPlatform/bap | bap_bil_pass.ml | open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_bil
type t = {
name : string;
desc : string;
body : bil -> bil;
}
type pass = t
let passes : t String.Table.t = String.Table.create ()
let selected : (bil -> bil) list ref = ref []
let register_pass ?(desc="No description provided") name body =
let p... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_types/bap_bil_pass.ml | ocaml | open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_bil
type t = {
name : string;
desc : string;
body : bil -> bil;
}
type pass = t
let passes : t String.Table.t = String.Table.create ()
let selected : (bil -> bil) list ref = ref []
let register_pass ?(desc="No description provided") name body =
let p... | |
e04bf30425bbd60afa10d5c61f944add6b850c0bfe7f9ec473723f39ed166c3c | davidsantiago/stencil | no_cache.clj | (ns stencil.test.no-cache
(:use clojure.test)
(:require [stencil.loader :as sldr]
[stencil.utils :as utils])
(:import
[stencil.loader CoreCacheUnavailableStub_SeeReadme]))
;; This namespace only runs a test when core.cache is unavailable.
;; It merely tests that the stencil.loader functio... | null | https://raw.githubusercontent.com/davidsantiago/stencil/a91f860c05cbb3b80c89e9c35d170fdddc90ff91/test/stencil/test/no_cache.clj | clojure | This namespace only runs a test when core.cache is unavailable.
It merely tests that the stencil.loader functions will barf with
a message to the user when the user has not set a usable cache
alternative using set-cache. | (ns stencil.test.no-cache
(:use clojure.test)
(:require [stencil.loader :as sldr]
[stencil.utils :as utils])
(:import
[stencil.loader CoreCacheUnavailableStub_SeeReadme]))
(defn core-cache-unavailable-stub-fixture
[f]
(sldr/set-cache (CoreCacheUnavailableStub_SeeReadme.))
(f)
(... |
6c86f80a91e35e1e16b26958b334e1ff5d2e4073e9ddbaef936517a4ba2aaecb | MinaProtocol/mina | pallas_based_plonk.ml | open Core_kernel
open Kimchi_backend_common
open Kimchi_pasta_basic
module Field = Fq
module Curve = Pallas
module Bigint = struct
include Field.Bigint
let of_data _ = failwith __LOC__
let to_field = Field.of_bigint
let of_field = Field.to_bigint
end
let field_size : Bigint.t = Field.size
module Verificat... | null | https://raw.githubusercontent.com/MinaProtocol/mina/cee2e182c50d1e36f132e73a146ff0be613f2bb5/src/lib/crypto/kimchi_backend/pasta/pallas_based_plonk.ml | ocaml | TODO: change name
compute witness | open Core_kernel
open Kimchi_backend_common
open Kimchi_pasta_basic
module Field = Fq
module Curve = Pallas
module Bigint = struct
include Field.Bigint
let of_data _ = failwith __LOC__
let to_field = Field.of_bigint
let of_field = Field.to_bigint
end
let field_size : Bigint.t = Field.size
module Verificat... |
53e715fea417320206f338d26b32b573cea6636f2613d8fe00ccd470c7319259 | bintracker/bintracker | md-command.scm | ;; This file is part of the libmdal library.
Copyright ( c ) utz / irrlicht project 2018 - 2020
;; See LICENSE for license details.
;; -----------------------------------------------------------------------------
MDCONF : COMMANDS
;; -----------------------------------------------------------------------------
;;... | null | https://raw.githubusercontent.com/bintracker/bintracker/9d34028089f67452c9521b84b2271ccfa3608b90/libmdal/md-command.scm | scheme | This file is part of the libmdal library.
See LICENSE for license details.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
MDAL Command Configuration
command config record type
user-defined type
number of... | Copyright ( c ) utz / irrlicht project 2018 - 2020
MDCONF : COMMANDS
(module md-command
(make-command
command-type
command-bits
command-default
command-reference-to
command-keys
command-flags
command-range
command-description
command-has-flag?
command-has-flag... |
1701e4adbda91e26512ed778e31c3a6462b0deac29196ccf330a6ee0d9687378 | qiao/sicp-solutions | 1.22.scm | (define (smallest-divisor n)
(find-divisor n 2))
(define (find-divisor n test-divisor)
(cond ((> (square test-divisor) n) n)
((divides? test-divisor n) test-divisor)
(else (find-divisor n (+ test-divisor 1)))))
(define (divides? a b)
(= (remainder b a) 0))
(define (prime? n)
(= n (smallest-di... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter1/1.22.scm | scheme | (define (smallest-divisor n)
(find-divisor n 2))
(define (find-divisor n test-divisor)
(cond ((> (square test-divisor) n) n)
((divides? test-divisor n) test-divisor)
(else (find-divisor n (+ test-divisor 1)))))
(define (divides? a b)
(= (remainder b a) 0))
(define (prime? n)
(= n (smallest-di... | |
cbd4cef90d186b494d51bd91a8319e5d7254050d81853b4d26d5c1b6fcd1863c | 2600hz/kazoo | kz_cache_amqp_tests.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%% @doc
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 /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_caches/test/kz_cache_amqp_tests.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2011 - 2020 , 2600Hz
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(kz_cache_amqp_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("kazoo_amqp/include/kz_amqp.... |
9751554cedfb6655c5b4215d3c66d1499f4614e6199b159705ac03f6da3330b7 | TrustInSoft/tis-kernel | th_struct.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/th_struct.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
open Logic
open Simplifier
module Make(T : Term) =
struct
open T
let is_struct e = match T.repr e wit... |
d9c7c1d7d26681b6b885795d28ee09d87f26c5e4759a1403595583f40890a897 | rafaeldelboni/graphmosphere | hmac.clj | (ns graphmosphere.hmac
(:import [java.util Base64]
[javax.crypto Mac]
[javax.crypto.spec SecretKeySpec]))
(set! *warn-on-reflection* true)
(defn ^:private return-signing-key
"Get an hmac key from the raw key bytes given some 'mac' algorithm.
Known 'mac' options: HmacSHA1"
[^String key ^M... | null | https://raw.githubusercontent.com/rafaeldelboni/graphmosphere/764904ee60674c5d5cbc83cb26d70c0bc5579385/src/graphmosphere/hmac.clj | clojure | (ns graphmosphere.hmac
(:import [java.util Base64]
[javax.crypto Mac]
[javax.crypto.spec SecretKeySpec]))
(set! *warn-on-reflection* true)
(defn ^:private return-signing-key
"Get an hmac key from the raw key bytes given some 'mac' algorithm.
Known 'mac' options: HmacSHA1"
[^String key ^M... | |
64c8973ead8b080e6f22d0c9d8d7e29dbec4bb367c58455e296e64ff6f87585e | wargrey/schema | port-lines-counting.rkt | #lang typed/racket/base
(require "../csv.rkt")
(require racket/file)
(port-count-lines-enabled #true)
(define StateDepartment.csv : Path (build-path (#%dir) "StateDepartment.csv"))
(printf "vct: ")
(define vectors : (Listof (Vectorof CSV-Field))
(with-logging-to-port (current-error-port)
(λ [] (with-input-fr... | null | https://raw.githubusercontent.com/wargrey/schema/4824a1fecea1dc557941b08f05a457da9f628f78/tamer/csv/reader/performance/port-lines-counting.rkt | racket | #lang typed/racket/base
(require "../csv.rkt")
(require racket/file)
(port-count-lines-enabled #true)
(define StateDepartment.csv : Path (build-path (#%dir) "StateDepartment.csv"))
(printf "vct: ")
(define vectors : (Listof (Vectorof CSV-Field))
(with-logging-to-port (current-error-port)
(λ [] (with-input-fr... | |
0608b228b31f091a6fae97439996baf51d7bee7ba1f092c1d0f4c4bc8c15e85a | hraberg/deuce | dynamic.clj | (ns deuce.test.dynamic
(:use [deuce.test.common]))
" 11.9.1 Dynamic Binding"[1 ]
[ 1 ] -Binding.html
(with-fresh-emacs)
(repl example-1
(defvar x -99) ⇒ 'x
(defun getx ()
x) ⇒ 'getx
(let ((x 1))
(getx)) ⇒ 1
(getx) ⇒ -99)
(repl example-2
... | null | https://raw.githubusercontent.com/hraberg/deuce/9d507adb6c68c0f5c19ad79fa6ded9593c082575/test/deuce/test/dynamic.clj | clojure | (ns deuce.test.dynamic
(:use [deuce.test.common]))
" 11.9.1 Dynamic Binding"[1 ]
[ 1 ] -Binding.html
(with-fresh-emacs)
(repl example-1
(defvar x -99) ⇒ 'x
(defun getx ()
x) ⇒ 'getx
(let ((x 1))
(getx)) ⇒ 1
(getx) ⇒ -99)
(repl example-2
... | |
b981cfb699ae084a6d4e6c021f8f8b1b28be2b33437505fccaa106aabf0a98e4 | yjqww6/drcomplete | tool.rkt | #lang racket
(require drracket/tool racket/gui framework srfi/2)
(require drcomplete-base)
(provide tool@)
(require "private/main.rkt" "interface.rkt")
(define tool@
(unit
(import drracket:tool^)
(export drracket:tool-exports^)
(define phase2 void)
(define fc-mixin
(mixin (racket:text<%> ... | null | https://raw.githubusercontent.com/yjqww6/drcomplete/b3f7390149e8d006c92b8a8a4da1593da547e235/drcomplete-filename/tool.rkt | racket | #lang racket
(require drracket/tool racket/gui framework srfi/2)
(require drcomplete-base)
(provide tool@)
(require "private/main.rkt" "interface.rkt")
(define tool@
(unit
(import drracket:tool^)
(export drracket:tool-exports^)
(define phase2 void)
(define fc-mixin
(mixin (racket:text<%> ... | |
8bbeaf570e0ef401c96c5ce8787ea1095f7cbd3a587fd28f01d3dd4dd42bbdf3 | defndaines/meiro | division.clj | (ns meiro.division
"The Recursive Division algorithm is a 'wall adding' algorithm, which divides
a completely open grid into subsections until it can no longer be subdivided."
(:require [meiro.core :as m]))
(defn- link-all
"Generate a grid where all cells are already linked."
[grid]
(let [rows (count grid... | null | https://raw.githubusercontent.com/defndaines/meiro/f91d4dee2842c056a162c861baf8b71bb4fb140c/src/meiro/division.clj | clojure | (ns meiro.division
"The Recursive Division algorithm is a 'wall adding' algorithm, which divides
a completely open grid into subsections until it can no longer be subdivided."
(:require [meiro.core :as m]))
(defn- link-all
"Generate a grid where all cells are already linked."
[grid]
(let [rows (count grid... | |
c215b13be6597c8c9d7b17f957bc7481a3531819518a2a39359e2a69a70f88a6 | links-lang/links | databaseDriver.mli | val driver : string option Settings.setting
val load : string -> unit
| null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/databaseDriver.mli | ocaml | val driver : string option Settings.setting
val load : string -> unit
| |
3b20da8301bf8cf56457477a9d30e526e2a8dc17c52338fccb09355635034793 | diagrams/diagrams-lib | Shapes.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
# LANGUAGE UndecidableInstances #
------------------... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/ed8276e7babecace51aad34b3dfd608847be2c47/src/Diagrams/ThreeD/Shapes.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
---------------------------------------------------------------------------
|
License : BSD-style (see LICENSE)
Maintainer :
-------... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Module : Diagrams .
Copyright : ( c ) 2011 diagrams - lib team ( see LICENSE )
Various three - dimensional shapes .
module Diagrams.ThreeD.Shapes
(
Skinned(..)
, Ellipsoid(..)
, sph... |
b7d0743d11706caf948af81817088ac4c6dd5f2166f3f9053de1315f5a380593 | racket/pict | transform.rkt | #lang racket/base
(require "pict.rkt" racket/match racket/list)
(provide get-child-transformation)
;; get a matrix suitable for the transform method of
;; dc<%> which shifts one into the drawing coordinates
;; of the pict given by the pict path pp.
(define (get-child-transformation p pp)
(convert-affine-form
(uni... | null | https://raw.githubusercontent.com/racket/pict/2ea1662a4d0755709139605c17b668f417104c94/pict-lib/pict/private/transform.rkt | racket | get a matrix suitable for the transform method of
dc<%> which shifts one into the drawing coordinates
of the pict given by the pict path pp.
matricies to allow for easy composition. This
switch from the inverted coordinates used by
pict-child to normal drawing coordinates. | #lang racket/base
(require "pict.rkt" racket/match racket/list)
(provide get-child-transformation)
(define (get-child-transformation p pp)
(convert-affine-form
(uninvert-coordinartes
p (last (flatten pp))
(cond
[(pict-convertible? pp)
(if (pict-path-element=? p pp)
(vector 1 0 0
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.