_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 |
|---|---|---|---|---|---|---|---|---|
0ce6f7ff7bc63e8a0cd2b0a54589c434042a6a09bbab735ecb4f455c864a7b5a | alexandergunnarson/quantum | type.cljc | (ns
^{:doc "Type-checking predicates, 'transientization' checks, class aliases, etc."
:attribution "alexandergunnarson"}
quantum.core.type
(:refer-clojure :exclude
[vector? map? set? associative? seq? seqable? string? fn? map-entry? boolean?
double? decimal?
nil? char? number? integer? float?
... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/type.cljc | clojure | TODO: Should include typecasting? (/cast/)
inline this?
TODO #{(- prim? long) Object}
Have to use reflection here because we can't check *ALL* possible array types in a `defnt`
TODO `ref?`, `future?`
; ======= TRANSIENTS =======
TODO this is just intuition . Better to |bench| it
TODO move these vars
macro bec... | (ns
^{:doc "Type-checking predicates, 'transientization' checks, class aliases, etc."
:attribution "alexandergunnarson"}
quantum.core.type
(:refer-clojure :exclude
[vector? map? set? associative? seq? seqable? string? fn? map-entry? boolean?
double? decimal?
nil? char? number? integer? float?
... |
6335437bb6b00ff85ed405ac038fe71837ebcb9d7f385370b2c6bb3b452fb564 | soegaard/cairo | info.rkt | #lang info
(define collection 'multi)
(define deps '("cairo-lib" "cairo-test"))
(define implies '("cairo-lib" "cairo-test"))
(define pkg-desc "Bindings for the 2d graphics library Cairo mathing the C api.")
(define pkg-authors '(soegaard))
| null | https://raw.githubusercontent.com/soegaard/cairo/fb2821d915d1a6a817e323507650f4390a0c99f1/cairo/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("cairo-lib" "cairo-test"))
(define implies '("cairo-lib" "cairo-test"))
(define pkg-desc "Bindings for the 2d graphics library Cairo mathing the C api.")
(define pkg-authors '(soegaard))
| |
89fdcf22926d383ee7bb8a10a2debe1e06d902d44a8585eb603ff03cad75abab | galdor/tungsten | package.lisp | (defpackage :influxdb
(:use :cl)
(:export
#:request-failure
#:*builtin-metrics-collection-interval*
#:*client*
#:client
#:start-client
#:stop-client
#:enqueue-point
#:enqueue-points))
| null | https://raw.githubusercontent.com/galdor/tungsten/3a5ff159d38cece59ebb33535118983d25152815/tungsten-influxdb/src/package.lisp | lisp | (defpackage :influxdb
(:use :cl)
(:export
#:request-failure
#:*builtin-metrics-collection-interval*
#:*client*
#:client
#:start-client
#:stop-client
#:enqueue-point
#:enqueue-points))
| |
b90556aa13ee617a460099347f859c4888172ea02a96fa8e9898a08ad8a3864f | metabase/metabase | field_values.clj | (ns metabase.models.field-values
"FieldValues is used to store a cached list of values of Fields that has `has_field_values=:auto-list or :list`.
Check the doc in [[metabase.models.field/has-field-values-options]] for more info about `has_field_values`.
There are 2 main classes of FieldValues: Full and Advanced.... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/models/field_values.clj | clojure | it is used purely to inform
are fieldvalues but filtered by sandbox permissions
are fieldvalues but has constraints from other linked parameters on dashboard/embedding
default type for fieldvalues where it contains values for a field without constraints
+------------------------------------------------------------... | (ns metabase.models.field-values
"FieldValues is used to store a cached list of values of Fields that has `has_field_values=:auto-list or :list`.
Check the doc in [[metabase.models.field/has-field-values-options]] for more info about `has_field_values`.
There are 2 main classes of FieldValues: Full and Advanced.... |
e6787ebb76d4e35033bf71f23e491c007a3532c88080b2cd22224ed9726f05ac | alex-gutev/generic-cl | package.lisp | package.lisp
;;;;
Copyright 2018
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;;; restriction, including without limitation the rights to use,
;;;; copy, mod... | null | https://raw.githubusercontent.com/alex-gutev/generic-cl/9d0c89d4115bb18c18de65564a0565df73f2dfbe/src/sequence/package.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | package.lisp
Copyright 2018
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(uiop:define-package :ge... |
4801771f7f35c637e090365498640d738fcf7efac9718e8593962c9c239188de | mzp/coq-ide-for-ios | common.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/plugins/extraction/common.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Some pretty-print utility function... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : common.ml 14010 201... |
1f48583843f85dc02addb93016b31239f6eca9921b7a546a1cb872c5ade1e64e | Oblosys/proxima | DefaultRules.hs | # OPTIONS_GHC -fbang - patterns #
UUAGC 0.9.10 ( DefaultRules.ag )
module DefaultRules where
import qualified List (delete,intersperse)
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.Sequence as Seq
import Data.Sequence(Seq,(><))
import UU.Scanner.Posit... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src-derived/DefaultRules.hs | haskell | Patterns.ag imports
hack
a used as (String,String)
Child -------------------------------------------------------
cata
semantic domain
Children ----------------------------------------------------
cata
semantic domain
Grammar -----------------------------------------------------
cata
semantic domain
--------... | # OPTIONS_GHC -fbang - patterns #
UUAGC 0.9.10 ( DefaultRules.ag )
module DefaultRules where
import qualified List (delete,intersperse)
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.Sequence as Seq
import Data.Sequence(Seq,(><))
import UU.Scanner.Posit... |
8f0aea9a430ea563a6d7590d0e279394bb20d686dcb448c83d61605300f84c0a | huangjs/cl | zairy.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/zairy.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
9e7f30d1a9dddb9b8e223d8e6033521469eeb4ae09dfb6ea829d2a60125878d1 | tiensonqin/lymchat | slack.clj | (ns api.services.slack
(:require [aleph.http :as http]
[cheshire.core :refer [generate-string]]
[api.util :refer [prod-or-stage?]]
[clojure.string :as str]
[taoensso.timbre :as t]
[environ-plus.core :refer [env]]))
(defn slack-escape [message]
"Escape mes... | null | https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/api/src/api/services/slack.clj | clojure | (ns api.services.slack
(:require [aleph.http :as http]
[cheshire.core :refer [generate-string]]
[api.util :refer [prod-or-stage?]]
[clojure.string :as str]
[taoensso.timbre :as t]
[environ-plus.core :refer [env]]))
(defn slack-escape [message]
"Escape mes... | |
d50d7dc1b75050db815b02391b90006de48014a9af8952d2eb147fd9ff1e6ddf | dvingo/malli-code-gen | eql.cljc | (ns space.matterandvoid.malli-gen.eql
"Generate EQL pull vectors from schemas
EQL reference -query-language/eql#eql-for-selections"
(:require [malli.util :as mu]
[malli.core :as m]
[space.matterandvoid.malli-gen.test-schema2 :as ts2]
[space.matterandvoid.malli-gen.util :as u]))... | null | https://raw.githubusercontent.com/dvingo/malli-code-gen/8400a2d1f8e21b9de19d33329b225e8bb813c132/src/main/space/matterandvoid/malli_gen/eql.cljc | clojure | (prn ::is-atomic prop-name et-schema root-schema)
fixme add maps support
(def s1 ref-coll-schema)
(prn ::pull-vector et-schema)
(def e1 et-schema)
nesting operation | (ns space.matterandvoid.malli-gen.eql
"Generate EQL pull vectors from schemas
EQL reference -query-language/eql#eql-for-selections"
(:require [malli.util :as mu]
[malli.core :as m]
[space.matterandvoid.malli-gen.test-schema2 :as ts2]
[space.matterandvoid.malli-gen.util :as u]))... |
9166dab31d3dc121b4d8249ad2da1a8fdc63c124b8769045459837ff83c1702e | wilkerlucio/lein-node-webkit-build | io_test.clj | (ns node-webkit-build.io-test
(:import (org.apache.commons.io FileUtils))
(:require [clojure.test :refer :all]
[node-webkit-build.io :refer :all]))
(defn fixture [& paths]
(apply path-join "test" "fixtures" paths))
(deftest test-path-join
(is (= "part/other" (path-join "part" "other"))))
(deftest... | null | https://raw.githubusercontent.com/wilkerlucio/lein-node-webkit-build/a587a0bfa181499949c0e887402191e4b8140f38/test/node_webkit_build/io_test.clj | clojure | (ns node-webkit-build.io-test
(:import (org.apache.commons.io FileUtils))
(:require [clojure.test :refer :all]
[node-webkit-build.io :refer :all]))
(defn fixture [& paths]
(apply path-join "test" "fixtures" paths))
(deftest test-path-join
(is (= "part/other" (path-join "part" "other"))))
(deftest... | |
1bc56c8a426e05410e0a5d39bc737a110e1e0b19d761e07119226b9412519c2c | larcenists/larceny | 128.body2.scm | Copyright ( C ) ( 2015 ) . All Rights Reserved .
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without limitation the rights to use,
;;;... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/128.body2.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
Software is furnished to do so, subject to the following
conditions... | Copyright ( C ) ( 2015 ) . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without
sell copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
... |
50a5f5095fd1749a5b7b545c06ecfbbdd1aa7e8dbfd7eee3f15460f1f68fe082 | ananthakumaran/eopl | 8.clj | ;; Add to the environment interface an observer called empty-env? and
;; implement it using the a-list representation
(ns eopl.chap-2.8
(:use clojure.test)
(:use eopl.chap-2.5))
(defn empty-env? [env]
(= env (empty-env)))
| null | https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_2/8.clj | clojure | Add to the environment interface an observer called empty-env? and
implement it using the a-list representation |
(ns eopl.chap-2.8
(:use clojure.test)
(:use eopl.chap-2.5))
(defn empty-env? [env]
(= env (empty-env)))
|
c0937699a55e1a512e0c2f898ad3597fa396ec097d34bd52e7452420e089de75 | qfpl/reflex-tutorial | Common.hs | {-# LANGUAGE OverloadedStrings #-}
module Ex04.Common (
Money
, Product (..)
, Stock (..)
, carrot
, celery
, cucumber
, Inputs(..)
, Outputs(..)
, Error(..)
, errorText
, Ex04Fn
) where
import Data.Text
import Reflex
type Money = Int
data Product =
Product {
pName :: Text
, pCost ... | null | https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex04/Common.hs | haskell | # LANGUAGE OverloadedStrings # | module Ex04.Common (
Money
, Product (..)
, Stock (..)
, carrot
, celery
, cucumber
, Inputs(..)
, Outputs(..)
, Error(..)
, errorText
, Ex04Fn
) where
import Data.Text
import Reflex
type Money = Int
data Product =
Product {
pName :: Text
, pCost :: Money
} deriving (Eq, Ord, Sho... |
b17c1fbb97ec4d79b19b776acc0bb31b237f518082019287b035ed8226b0fa3b | haskell/haskell-language-server | HieBin.hs | {-
Binary serialization for .hie files.
-}
module Compat.HieBin ( module GHC.Iface.Ext.Binary)
where
import GHC.Iface.Ext.Binary
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/830596ee212d4f2fbbc81bcf5d08574ae96947d3/hie-compat/src-reexport-ghc92/Compat/HieBin.hs | haskell |
Binary serialization for .hie files.
|
module Compat.HieBin ( module GHC.Iface.Ext.Binary)
where
import GHC.Iface.Ext.Binary
|
f26b03f2692c3af1f7e46e5966193f96cf8813d2b85b767fde7bd946fe38d665 | wireless-net/erlang-nommu | digraph_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/digraph_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(digraph_SUITE).
-ifdef(STANDALONE... |
99103f8d952eecdf61190ea9a9b8f3d4878ff4d2e516c4c22934a63aa6b4dc74 | elastic/apm-agent-ocaml | metrics.mli | module Metric_transaction : sig
type t [@@deriving yojson_of]
val make : name:string -> type_:string -> t
end
module Metric_span : sig
type t [@@deriving yojson_of]
val make : type_:string -> subtype:string -> t
end
module Metric : sig
type t =
| Histogram of {
counts : int64 list;
val... | null | https://raw.githubusercontent.com/elastic/apm-agent-ocaml/6eb74081abedc949cfe0fa548ca4396e76540f63/core/metrics.mli | ocaml | module Metric_transaction : sig
type t [@@deriving yojson_of]
val make : name:string -> type_:string -> t
end
module Metric_span : sig
type t [@@deriving yojson_of]
val make : type_:string -> subtype:string -> t
end
module Metric : sig
type t =
| Histogram of {
counts : int64 list;
val... | |
806a86904a0d07263b7b0965b2d4e515bedb267049aeedcf1b839c05e0f5c4a0 | mput/sicp-solutions | 1_43.test.rkt | #lang racket
(require rackunit/text-ui)
(require rackunit "custom-checks.rkt")
(require rackunit "../solutions/utils.rkt")
(require rackunit "../solutions/1_43.rkt")
(define tests
(test-suite
"Test for exercise 1_43"
(check-equal? ((repeated square 2) 5) 625)
(check-equal? ((repeated square 0) 5) 5)
... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/tests/1_43.test.rkt | racket | #lang racket
(require rackunit/text-ui)
(require rackunit "custom-checks.rkt")
(require rackunit "../solutions/utils.rkt")
(require rackunit "../solutions/1_43.rkt")
(define tests
(test-suite
"Test for exercise 1_43"
(check-equal? ((repeated square 2) 5) 625)
(check-equal? ((repeated square 0) 5) 5)
... | |
07fe2989cdeda9c8a9a9c920e5fbb928b8712465012e4496264db9c80bf25f61 | facebook/pyre-check | annotationParserTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/73713668f78632dd6310e702ff5cea757f928884/source/interprocedural_analyses/taint/test/annotationParserTest.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
929da30c8376be521d7bdb5d97254d96447afd8e9a16cedf8c41b8c329fc8bc7 | tweag/ormolu | applicative.hs | f =
Foo <$> bar
<*> baz
<*> baz'
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/infix/applicative.hs | haskell | f =
Foo <$> bar
<*> baz
<*> baz'
| |
6fafa9854a3a9996e0e6a4abdaa9929cfbd0d83eed2305c9adc1f4cf3c2c267e | maxigit/sql-fragment | Operators.hs | # LANGUAGE TypeFamilies , DataKinds , TypeOperators #
# LANGUAGE FlexibleInstances #
module Database.SQLFragment.Operators where
-- standard
import Data.Monoid
import Data.List (intercalate)
import Data.String
import GHC.TypeLits
third - party
import Data.HList
-- local
import Database.SQLFragment.SQLFragment
import ... | null | https://raw.githubusercontent.com/maxigit/sql-fragment/01b91ac3bdbbf437d43018b0d68fd9428d6239fd/src/Database/SQLFragment/Operators.hs | haskell | standard
local
$setup
>>> :set -XOverloadedStrings
>>> :set -XDataKinds
>>> let toSelectQuery' q = unwords.lines.toSelectQuery $ q
* Combination
phantom types as well.
>>> toSelectQuery' $ "a" !&! "t."
"SELECT a FROM t"
>>> toSelectQuery' $ "a" !&! "b"
"SELECT a, b"
>>> toSelectQuery' $ "t.a1" !&! "s.b... | # LANGUAGE TypeFamilies , DataKinds , TypeOperators #
# LANGUAGE FlexibleInstances #
module Database.SQLFragment.Operators where
import Data.Monoid
import Data.List (intercalate)
import Data.String
import GHC.TypeLits
third - party
import Data.HList
import Database.SQLFragment.SQLFragment
import Database.SQLFragment.... |
90cfad254e8996b47183cbc5f0a269e9672730471e1973c0690f76f837bcaa43 | acw/eve | Region.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
module EVE.Static.Database.Region(
RegionDatabase
, Region(..)
, regionByName
, loadRegions
)
where
import Control.Exception(throwIO)
import Data.Map.Strict(Map)
import qualified Data.Map.St... | null | https://raw.githubusercontent.com/acw/eve/95c3a158e181e9708c2f3b5d998512bbc1b06e57/src/EVE/Static/Database/Region.hs | haskell | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
module EVE.Static.Database.Region(
RegionDatabase
, Region(..)
, regionByName
, loadRegions
)
where
import Control.Exception(throwIO)
import Data.Map.Strict(Map)
import qualified Data.Map.St... | |
b33c6d8646e5c1281e5d2b74fe95cec2eb732d273bca7d37785bdc63e1a6ff45 | funimage/funimage | display.clj | (ns funimage.test.imp.display
(:use [funimage imp]
[clojure.test]))
Disabling for
#_(deftest test-show-imp
(let [imp1 (open-imp "")]
(show-imp imp1)
(is imp1)))
| null | https://raw.githubusercontent.com/funimage/funimage/397d1ed9a1c11287f8562d05c10040ce24717f04/test/funimage/test/imp/display.clj | clojure | (ns funimage.test.imp.display
(:use [funimage imp]
[clojure.test]))
Disabling for
#_(deftest test-show-imp
(let [imp1 (open-imp "")]
(show-imp imp1)
(is imp1)))
| |
9b94ecf12b57453819b520435e5e4e907cf1b761fb3959788f097c1da118f118 | RunOrg/RunOrg | ast.ml | (* © 2014 RunOrg *)
type t =
| Inline of Json.t
| Context of string
| Member of t * string
| Index of t * int
| Flat of t list
| null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/unturingLib/ast.ml | ocaml | © 2014 RunOrg |
type t =
| Inline of Json.t
| Context of string
| Member of t * string
| Index of t * int
| Flat of t list
|
7ba7c4b4cf82980d665425527ca196f0cd165659a5eb015553dc042f6588a410 | zack-bitcoin/amoveo-mining-pool | accounts.erl | -module(accounts).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
give_share/1,got_reward/0,pay_veo/0,balance/1,
check/0, final_reward/0,pay_veo/1,
fix_total/0, total_veo/0, save_cron/0,
save/0]).
-record(account, {pubkey, veo = 0, work... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo-mining-pool/fd39d6812e0bc9bdd613aec0e82c3c3907df23c5/apps/amoveo_mining_pool/src/accounts.erl | erlang | if someone gives us valid work, then give their account a share.
save_internal(X3),
reduce how many veo they have in the pool, pay them veo on the blockchain.
save_internal(X2),
save_internal(X2),
change shares into veo.
save_internal(X2), | -module(accounts).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
give_share/1,got_reward/0,pay_veo/0,balance/1,
check/0, final_reward/0,pay_veo/1,
fix_total/0, total_veo/0, save_cron/0,
save/0]).
-record(account, {pubkey, veo = 0, work... |
c546bb08e1a15aff87ef95b600a66b4661eeb2be559983545dba0eab695f7d72 | pixlsus/registry.gimp.org_static | script-fu-fibonacci-spiral.scm | Fibonacci Spiral , V1.0
;
AUTHOR : ( ) , ( c ) 2009
;
This script was tested with GIMP 2.6.7
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3 as
published by the Free Software Foundation .
;
; This program... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/script-fu-fibonacci-spiral.scm | scheme |
This program is free software; you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License at for
more ... | Fibonacci Spiral , V1.0
AUTHOR : ( ) , ( c ) 2009
This script was tested with GIMP 2.6.7
it under the terms of the GNU General Public License Version 3 as
published by the Free Software Foundation .
The user can specify the angle ( in 90 degree increments , measured
value of 90 , or poss... |
1cec8d0858f18496dc737030ea18fa8f6dcd89c9c48912cd69da16224ae68d2a | daigotanaka/mern-cljs | core.cljs | (ns ^:figwheel-always app.core
(:require
[clojure.string :as string]
[cljs.core.async :as async :refer [chan close! timeout put!]]
[goog.events :as events]
[reagent.core :as reagent]
[app.atom :refer [app-state]]
[mern-utils.frontend-lib :refer [get-js-var get-path get-url-params
... | null | https://raw.githubusercontent.com/daigotanaka/mern-cljs/a9dedbb3b622f96dd0b06832733b4fd961e6437d/example/www/src/frontend/app/core.cljs | clojure | (ns ^:figwheel-always app.core
(:require
[clojure.string :as string]
[cljs.core.async :as async :refer [chan close! timeout put!]]
[goog.events :as events]
[reagent.core :as reagent]
[app.atom :refer [app-state]]
[mern-utils.frontend-lib :refer [get-js-var get-path get-url-params
... | |
d3706477bbc77d58ca582550b37b5ad67d007b473e9ce5594f6e2252c5fa9d46 | slipstream/SlipStreamServer | javawrapper_test.clj | (ns sixsq.slipstream.prs.javawrapper-test
(:require
[clojure.test :refer :all]
[com.sixsq.slipstream.db.serializers.service-config-impl :as sci]
[com.sixsq.slipstream.db.serializers.utils :as su]
[com.sixsq.slipstream.dbtest.es.utils-esdb :as sud]
[sixsq.slipstream.prs.javawrapper :refer :all]
... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/jar-prslib/test/clj/sixsq/slipstream/prs/javawrapper_test.clj | clojure | Fixtures | (ns sixsq.slipstream.prs.javawrapper-test
(:require
[clojure.test :refer :all]
[com.sixsq.slipstream.db.serializers.service-config-impl :as sci]
[com.sixsq.slipstream.db.serializers.utils :as su]
[com.sixsq.slipstream.dbtest.es.utils-esdb :as sud]
[sixsq.slipstream.prs.javawrapper :refer :all]
... |
e52c95fcf13f18dd053601784d4a724680fea630b1b08793fef453e7e3c0fb61 | owlbarn/owl_symbolic | example_09.ml | open Owl_symbolic
open Op
(** TODO: automaticall test all examples *)
let ( ) =
let a = variable ~shape:[| 3 ; 4 | ] " a " in
let b = variable ~shape:[| 4 ; 5 | ] " b " in
( * the user need to know that the correct shape of c
let test_gemm () =
let a = variable ~shape:[| 3; 4 |] "a" in
let b = var... | null | https://raw.githubusercontent.com/owlbarn/owl_symbolic/dc853a016757d3f143c5e07e50075e7ae605d969/example/example_09.ml | ocaml | * TODO: automaticall test all examples
the user need to know that the correct shape of c | open Owl_symbolic
open Op
let ( ) =
let a = variable ~shape:[| 3 ; 4 | ] " a " in
let b = variable ~shape:[| 4 ; 5 | ] " b " in
( * the user need to know that the correct shape of c
let test_gemm () =
let a = variable ~shape:[| 3; 4 |] "a" in
let b = variable ~shape:[| 4; 5 |] "b" in
let c = var... |
f8fa7eeef175c7f2e9975f455f0ef40d0b88fecd9570d6ccc1a3c75515c9d0c3 | yanatan16/clj-kubernetes-api | project.clj | (defproject kubernetes-api "0.1.1-SNAPSHOT"
:description "Kubernetes Client API Library"
:url "-kubernetes-api"
:license {:name "MIT"
:url "-kubernetes-api/blob/master/LICENSE"}
:deploy-repositories [["releases" :clojars]]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/... | null | https://raw.githubusercontent.com/yanatan16/clj-kubernetes-api/bd8a8a6d0570cb68081806d723600527ebcd921d/project.clj | clojure | (defproject kubernetes-api "0.1.1-SNAPSHOT"
:description "Kubernetes Client API Library"
:url "-kubernetes-api"
:license {:name "MIT"
:url "-kubernetes-api/blob/master/LICENSE"}
:deploy-repositories [["releases" :clojars]]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/... | |
792faf7e04c66148462ec20ec4c30a8f1b840cfd50aeb5b2911f647c3fce6856 | craff/pacomb | input.ml | type context = Utf8.context
type stream_infos =
| File of { name : string
; length : int
; date : float
}
| String of string
| Stream
let stream_infos_of_fd file_name fd =
let open Unix in
let s = fstat fd in
File { name = f... | null | https://raw.githubusercontent.com/craff/pacomb/3e83f56bc483f6b9c495ae91d773aa9b484eb321/lib/input.ml | ocaml | * Uses utf8 for positions
* The name of the buffer (e.g. file name)
* Unique identifier
Offset to the line ( bytes )
Contents of the buffer
Following line
for map table, initialized if used
infos common to the whole fil... | type context = Utf8.context
type stream_infos =
| File of { name : string
; length : int
; date : float
}
| String of string
| Stream
let stream_infos_of_fd file_name fd =
let open Unix in
let s = fstat fd in
File { name = f... |
1420929d8e06eed05ec18c23e2eb79b11d5428553234069f972f5330c12763ac | typeclasses/loc | Exception.hs | module Data.Loc.Exception
(
LocException (..),
)
where
import Data.Loc.Internal.Prelude
data LocException
= EmptySpan
deriving (Eq, Ord)
instance Exception LocException
instance Show LocException where
showsPrec _ EmptySpan = showString "empty Span"
| null | https://raw.githubusercontent.com/typeclasses/loc/9fe47b1f6097bbe0d850443bcdea5267c955a3c5/loc/src/Data/Loc/Exception.hs | haskell | module Data.Loc.Exception
(
LocException (..),
)
where
import Data.Loc.Internal.Prelude
data LocException
= EmptySpan
deriving (Eq, Ord)
instance Exception LocException
instance Show LocException where
showsPrec _ EmptySpan = showString "empty Span"
| |
d74845a2b9ef72714e2d0936acbc7ff45040894add32bb217f954ba53f96521d | RBornat/jape | facts.ml |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... | null | https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/facts.ml | ocaml | ok. RB
the names of the functions are intended to indicate that the function tells us
only when a fact is definitely known to be true.
I use eqterms, but it might be a bit inefficient ...
that is wrong, in general. What is needed is a test
* that c1 and c2 have a common ancestor.
Substituti... |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... |
159bf9addfb789ce8b16a9ea0bffbf86aa4aa23731264283e2f34d148941b6a5 | strictly-lang/compiler | Base.hs | module Parser.View.Base (viewParser, viewContentParser) where
import Control.Applicative (optional, (<|>))
import Data.List
import Parser.Util.Base (feedParser, identityParser, indentParser, indentParserRepeat, leftHandSideParser, mergeOptions, mixedTextParser, optionsParser, rightHandSideFunctionParser, rightHandSide... | null | https://raw.githubusercontent.com/strictly-lang/compiler/d7da81e1901926fa3026aba8f407cfaae00bae40/src-lib/Parser/View/Base.hs | haskell | module Parser.View.Base (viewParser, viewContentParser) where
import Control.Applicative (optional, (<|>))
import Data.List
import Parser.Util.Base (feedParser, identityParser, indentParser, indentParserRepeat, leftHandSideParser, mergeOptions, mixedTextParser, optionsParser, rightHandSideFunctionParser, rightHandSide... | |
05476c732005cad4637868b8c7a5228132383e6a9320515dccd6750b381c6a8e | Risto-Stevcev/haskell-church-encodings | Church.hs | {-# LANGUAGE RankNTypes #-}
Church Encodings -
- - - - - - - - - - -
- By
- - - - - - - - - - -
- By Risto Stevcev -}
module Church where
import Prelude hiding (succ, pred, and, or, not, exp, div, head, tail)
Church Logical Operators -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - -... | null | https://raw.githubusercontent.com/Risto-Stevcev/haskell-church-encodings/1cbe921e6940fc6b75de2afaa176e1d8acfc3c2a/RankNTypes/Church.hs | haskell | # LANGUAGE RankNTypes #
Church Boolean (True)
λt.λf.t
Church Boolean (False)
λt.λf.f
Church AND
λa.λb.a b false
λa.λb.a true b
Church NOT
λp.λa.λb.p b a
Church XOR
λa.λb.a (not b) b
(λa.λb.λc.c a b) True False
Church Natural Numbers (n ∈ ℕ) -
- - - - - - - - - - - - - - - - -
The type system isn't powe... | Church Encodings -
- - - - - - - - - - -
- By
- - - - - - - - - - -
- By Risto Stevcev -}
module Church where
import Prelude hiding (succ, pred, and, or, not, exp, div, head, tail)
Church Logical Operators -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - -}
type ChurchBool = foral... |
b276734330f862e4d9aa8dfbe09ad1d9886948787d02aad66e49ff9ab518603f | benoitc/hackney_lib | hackney_bstr.erl | %%% -*- erlang -*-
%%%
This file is part of released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2012 - 2014 < >
%%%
-module(hackney_bstr).
-export([to_binary/1,
to_lower/1, to_upper/1,
char_to_lower/1, char_to_upper/1,
join/2,
t... | null | https://raw.githubusercontent.com/benoitc/hackney_lib/86030830c17f92ba2199fd5a8341ebb3324c02a4/src/hackney_bstr.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc Convert a binary string to lowercase.
@doc Convert [A-Z] characters to lowercase.
@end
We gain noticeable speed by matching each value directly.
@doc Convert [a-z] characters to uppercase.
Changes all characters to lowercase.
From the RFC:
<blockquo... | This file is part of released under the Apache 2 license .
Copyright ( c ) 2012 - 2014 < >
-module(hackney_bstr).
-export([to_binary/1,
to_lower/1, to_upper/1,
char_to_lower/1, char_to_upper/1,
join/2,
to_hex/1,
token_ci/2, token/2,
list/2,
nonempt... |
cef8cb49d96ee478f1a23b27e58cce2a8c7b6201511190ba0a7f3925704bf064 | Zulu-Inuoe/clution | package.lisp | clution.lib - project development tools for CL
Written in 2018 by < >
;;;
;;;To the extent possible under law, the author(s) have dedicated all copyright
;;;and related and neighboring rights to this software to the public domain
;;;worldwide. This software is distributed without any warranty.
You should h... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/clution.lib-master/src/package.lisp | lisp |
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
with this software. If not, see
</>.
| clution.lib - project development tools for CL
Written in 2018 by < >
You should have received a copy of the CC0 Public Domain Dedication along
(defpackage #:clution.lib
(:use
#:%clution.lib
#:clution.lib.asd
#:clution.lib.clu
#:alexandria
#:cl
#:cl-arrows
#:enumerable
#:... |
47f474964aed6da7f90c5e166ec2572c8eb0426e1fca9ddc71d773f53e9fa380 | agocorona/TCache | weakTest.hs | import System.Mem.Weak
import Debug.Trace
debug :: c -> String -> c
debug = flip trace
dat :: String
dat = "this is the data"
main :: IO b
main = do
_ <- mkWeakPtr dat . Just $ print "deleted" `debug` "deleted"
main
| null | https://raw.githubusercontent.com/agocorona/TCache/72158de657f72c3b480cea1878b5cebfbfd65d13/demos/weakTest.hs | haskell | import System.Mem.Weak
import Debug.Trace
debug :: c -> String -> c
debug = flip trace
dat :: String
dat = "this is the data"
main :: IO b
main = do
_ <- mkWeakPtr dat . Just $ print "deleted" `debug` "deleted"
main
| |
e4c4aaa77aed674cee5d235c9b86561062d928a5c174a5ca601c894fe0b29e29 | shayne-fletcher/zen | parsefloat.ml | combinators
(*The type of the result of a parse*)
type ('a, 'b) parse_result =
| Prreturns of 'b * 'a list
| Prparse_failed
let accept : ('a, 'b) parse_result -> 'b = function
| Prreturns (v, []) -> v
| Prreturns (_, _ ::_) -> failwith "Couldn't consume all the input"
| Prparse_failed -> failwith "Failed"
P... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/labs/lab_029/parsefloat.ml | ocaml | The type of the result of a parse
[empty v b] recognizes the empty string. It always returns a value
and never consumes any tokens
[token test l] computes a parser. The parser succeeds or not by
testing the predicate [test] against the head of the token list
[char_ ch] computes a parser that matches a specific toke... | combinators
type ('a, 'b) parse_result =
| Prreturns of 'b * 'a list
| Prparse_failed
let accept : ('a, 'b) parse_result -> 'b = function
| Prreturns (v, []) -> v
| Prreturns (_, _ ::_) -> failwith "Couldn't consume all the input"
| Prparse_failed -> failwith "Failed"
Parsers are functions
type ('a, 'b) par... |
c1382910a7397028aff0a38f386bd27bd85099a7ff58d1e0500c6ae1b4cbffd7 | elastic/eui-cljs | icon_token_property.cljs | (ns eui.icon-token-property
(:require ["@elastic/eui/lib/components/icon/assets/tokenProperty.js" :as eui]))
(def tokenProperty eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_token_property.cljs | clojure | (ns eui.icon-token-property
(:require ["@elastic/eui/lib/components/icon/assets/tokenProperty.js" :as eui]))
(def tokenProperty eui/icon)
| |
6610d7a3eb92406dd13020d4b8f356ae7c7b7d37be8dc534c9c41c2cc08d8481 | bytekid/mkbtt | trsSyntax.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/ttt2/src/input/trsSyntax.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** FUNCTIONS... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
f6bfe64c4b2f25db2b8028102a29e566d18e2364d32275ec440e710b17664f13 | themetaschemer/malt | test-C-tensor-ops.rkt | (module+ test
(require rackunit)
(require "A-equality.ss")
(define r0-td 3.0)
(define r1-td (tensor 3.0 4.0 5.0))
(define r2-td (tensor (tensor 3.0 4.0 5.0) (tensor 7.0 8.0 9.0)))
(define r3-td
(tensor (tensor (tensor 0 1) (tensor 2 3) (tensor 4 5))
(tensor (tensor 6 7) (tensor 8 9) (tensor... | null | https://raw.githubusercontent.com/themetaschemer/malt/c847313ba65bf999e2d2932db91a4448a700bdbb/flat-tensors/tensors/test/test-C-tensor-ops.rkt | racket | (module+ test
(require rackunit)
(require "A-equality.ss")
(define r0-td 3.0)
(define r1-td (tensor 3.0 4.0 5.0))
(define r2-td (tensor (tensor 3.0 4.0 5.0) (tensor 7.0 8.0 9.0)))
(define r3-td
(tensor (tensor (tensor 0 1) (tensor 2 3) (tensor 4 5))
(tensor (tensor 6 7) (tensor 8 9) (tensor... | |
642c95d8f1b6a70e0d387d83d369fad22ad470dc357e3106f9f0d501011bf76c | FranklinChen/hugs98-plus-Sep2006 | AAIndex.hs |
AAIndex.hs ( adapted from aaindex.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2006 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program draws shows how to draw anti - aliased lines in color in... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/GLUT/examples/RedBook/AAIndex.hs | haskell | ramp starting at ramp1Start, and a blue color ramp starting at ramp2Start.
resolve overloading, not needed in "real" programs
Open window with initial window size, title bar,
color index display mode, and handle input events. |
AAIndex.hs ( adapted from aaindex.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2006 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program draws shows how to draw anti - aliased lines in color in... |
422cdf0e9cadacba8a2a873e4ff66793949f856311ab3b9b194c9f1087bbf64b | c-cube/tiny_httpd | http_of_dir.ml | module S = Tiny_httpd
module U = Tiny_httpd_util
module D = Tiny_httpd_dir
module Pf = Printf
let serve ~config (dir:string) addr port j : _ result =
let server = S.create ~max_connections:j ~addr ~port () in
Printf.printf "serve directory %s on http://%(%s%):%d\n%!"
dir (if S.is_ipv6 server then "[%s]" else "... | null | https://raw.githubusercontent.com/c-cube/tiny_httpd/c68ec5c2f61df365e5f6c4b0e2f6896e7128bfdc/src/bin/http_of_dir.ml | ocaml | module S = Tiny_httpd
module U = Tiny_httpd_util
module D = Tiny_httpd_dir
module Pf = Printf
let serve ~config (dir:string) addr port j : _ result =
let server = S.create ~max_connections:j ~addr ~port () in
Printf.printf "serve directory %s on http://%(%s%):%d\n%!"
dir (if S.is_ipv6 server then "[%s]" else "... | |
6dbc3c54e99dcdaf867339964c7c38468e5aab0409f54cacbb436105dddad3cc | anoma/juvix | Eval.hs | module BackendGeb.Eval where
import BackendGeb.Eval.Positive qualified as EvalP
import Base
allTests :: TestTree
allTests =
testGroup
"JuvixGeb eval tests"
[EvalP.allTests]
| null | https://raw.githubusercontent.com/anoma/juvix/23f34403f521c0aaab481b7e4071d0736da08508/test/BackendGeb/Eval.hs | haskell | module BackendGeb.Eval where
import BackendGeb.Eval.Positive qualified as EvalP
import Base
allTests :: TestTree
allTests =
testGroup
"JuvixGeb eval tests"
[EvalP.allTests]
| |
5587b851f22175af7d3dfc4be218c8b59a741865130be2879eee9ccac104eb0e | a-nikolaev/wanderers | console.ml |
module Memory = struct
type t = {buf: string array; last_entry: int; first_entry: int; cursor: int;}
let size = 200
let make () =
{buf = Array.init size (fun _ -> ""); first_entry = 0; last_entry = 1; cursor = 1;}
let go_back m =
if m.cursor <> m.first_entry then
{m with cursor = (m.cursor - 1 ... | null | https://raw.githubusercontent.com/a-nikolaev/wanderers/054c1cdc6dd833d8938357e6d898def510531d67/src/console.ml | ocaml | to the last entry
remove the char at the position x
let s = String.make c.len ' ' in
for i = 0 to c.len-1 do s.[i] <- c.buf.(i) done;
s
|
module Memory = struct
type t = {buf: string array; last_entry: int; first_entry: int; cursor: int;}
let size = 200
let make () =
{buf = Array.init size (fun _ -> ""); first_entry = 0; last_entry = 1; cursor = 1;}
let go_back m =
if m.cursor <> m.first_entry then
{m with cursor = (m.cursor - 1 ... |
da43a528f7deec882fb1e1b8b77a21a77f73f89720036367b62d094ae116a724 | hiram-madelaine/codemirror-parinfer | editor.cljs | (ns parinfer-codemirror.editor
"Glues Parinfer's formatter to a CodeMirror editor"
(:require
[clojure.string :refer [join]]
[parinfer-codemirror.state :refer [state
empty-editor-state]]
[parinfer-codemirror.editor-support :refer [update-cursor!
... | null | https://raw.githubusercontent.com/hiram-madelaine/codemirror-parinfer/5b8628e8c19059ebbb966e6dcddc9ae42c9142db/src/parinfer_codemirror/editor.cljs | clojure | ----------------------------------------------------------------------
Life Cycle events
----------------------------------------------------------------------
NOTE:
Text is either updated after a change in text or
a cursor movement, but not both.
When typing, on-change is called, then on-cursor-activity.
So we ... | (ns parinfer-codemirror.editor
"Glues Parinfer's formatter to a CodeMirror editor"
(:require
[clojure.string :refer [join]]
[parinfer-codemirror.state :refer [state
empty-editor-state]]
[parinfer-codemirror.editor-support :refer [update-cursor!
... |
33186327a33bd9b3d61f9a6f4774c39b6b679d37fe01e62dc77e1a51218e4425 | ralsei/graphite | error-bars.rkt | #lang racket/base
(require (prefix-in plot: plot/no-gui)
plot/utils
racket/contract/base
"aes.rkt"
"renderer.rkt"
"util.rkt")
(provide
(contract-out [error-bars (->* (#:mapping (and/c (aes-with/c #:perc-error string?)
(aes-... | null | https://raw.githubusercontent.com/ralsei/graphite/5e866cf95c3adf92163b8b0336967dd89cc74997/graphite-lib/error-bars.rkt | racket | #lang racket/base
(require (prefix-in plot: plot/no-gui)
plot/utils
racket/contract/base
"aes.rkt"
"renderer.rkt"
"util.rkt")
(provide
(contract-out [error-bars (->* (#:mapping (and/c (aes-with/c #:perc-error string?)
(aes-... | |
6fbcadf6547837c9e659acc7b19b978749a6b39700b586a4ac9acec82ad91710 | elastic/eui-cljs | theme_shadow_sizes.cljs | (ns eui.theme-shadow-sizes
(:require ["@elastic/eui/lib/global_styling/variables/shadow.js" :as eui]))
(def _EuiShadowSizesDescriptions eui/_EuiShadowSizesDescriptions)
(def EuiThemeShadowSizes eui/EuiThemeShadowSizes)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/theme_shadow_sizes.cljs | clojure | (ns eui.theme-shadow-sizes
(:require ["@elastic/eui/lib/global_styling/variables/shadow.js" :as eui]))
(def _EuiShadowSizesDescriptions eui/_EuiShadowSizesDescriptions)
(def EuiThemeShadowSizes eui/EuiThemeShadowSizes)
| |
5cefd91327b837f0456338539b18bc0327c5bc651ffed6f0b6e41883680b95cf | 40ants/cl-prevalence | test-managed-prevalence.lisp | ;;;; -*- mode: Lisp -*-
;;;;
$ Id$
;;;;
;;;; Testing Managed Object Prevalence in Common Lisp
;;;;
Copyright ( C ) 2003 , 2004 , Beta Nine BVBA .
Altered for managed prevalence testing ; Sept 2004 ,
, RandallSquared
;;;;
;;;; You are granted the rights to distribute and use this software
as governed by ... | null | https://raw.githubusercontent.com/40ants/cl-prevalence/89f5767b61fd2aabbaf7c8ee1161908f75000809/test/test-managed-prevalence.lisp | lisp | -*- mode: Lisp -*-
Testing Managed Object Prevalence in Common Lisp
Sept 2004 ,
You are granted the rights to distribute and use this software
(), also known as the LLGPL.
Throw away any xml files that we find: we want to start from scratch
A Test CLOS class
convenience function
Some basic functions to con... | $ Id$
Copyright ( C ) 2003 , 2004 , Beta Nine BVBA .
, RandallSquared
as governed by the terms of the Lisp Lesser General Public License
(in-package :cl-prevalence-test)
(def-suite test-managed-prevalence :in :cl-prevalence)
(in-suite test-managed-prevalence)
(defparameter *test-system-directory* (path... |
5ac4b176f249def73604a483ffaaca230ecfc92ba96cb86c068f6f090c3201a8 | alevy/postgresql-orm | GetField.hs | {-# LANGUAGE Safe #-}
# LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE OverlappingInstances #
#endif
{-# LANGUAGE RankNTypes #-}
# LANGUAGE AllowAmb... | null | https://raw.githubusercontent.com/alevy/postgresql-orm/9316db2f226c512036c2b72983020f6bdefd41bd/src/Data/GetField.hs | haskell | # LANGUAGE Safe #
# LANGUAGE RankNTypes #
| Functions to extract a field of a particular type from a
constructor (not variant types).
An example of usage:
position 0
position 1
position 2
position 3
position 4
> } deriving (Show, Generic)
>
"my type"
Nothing
ambiguous
<interactive... | # LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE OverlappingInstances #
#endif
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeOperators #
# LANGUAG... |
05afed7343e86e079fb098d5803126620bb286302d8e7283f357c22557ebe0cc | lambdaisland/souk | json_ld.clj | (ns lambdaisland.souk.json-ld
"Interfacing with JSON-LD endpoints, and converting to and from idiomatic
Clojure data."
(:require [hato.client :as hato]
[clojure.string :as str]
[clojure.walk :as walk]))
(defn json-get [url]
(hato/get url
{:headers {"Accept" "application/json... | null | https://raw.githubusercontent.com/lambdaisland/souk/8184ee40dae81df2589250f04e03d38a70757892/src/lambdaisland/souk/json_ld.clj | clojure | url -> context
(compact
(expand (:body (json-get "")))
common-prefixes)
"name"
"profileName" | (ns lambdaisland.souk.json-ld
"Interfacing with JSON-LD endpoints, and converting to and from idiomatic
Clojure data."
(:require [hato.client :as hato]
[clojure.string :as str]
[clojure.walk :as walk]))
(defn json-get [url]
(hato/get url
{:headers {"Accept" "application/json... |
54b9f2ef9c1f61efacd959a9ad84f0896e7bc784440fa354e0381638835ba04a | remvee/ring-basic-authentication | basic_authentication.clj | Copyright ( c ) Remco van ' t . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php) which
;; can be found in the file epl-v10.html at the root of this distribution. By
;; using this software in any fashion, you are agreeing to be bound... | null | https://raw.githubusercontent.com/remvee/ring-basic-authentication/c209e5902b590fc358976ef794be7e828e048532/src/ring/middleware/basic_authentication.clj | clojure | Public License 1.0 (-1.0.php) which
can be found in the file epl-v10.html at the root of this distribution. By
using this software in any fashion, you are agreeing to be bound by the
terms of this license. You must not remove this notice, or any other, from
this software. | Copyright ( c ) Remco van ' t . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
(ns ring.middleware.basic-authentication
"HTTP basic authentication middleware for ring."
{:author "Remco van 't Veer"}
(:require [clojure.string :as s])
(:import java.util.Bas... |
3c329fdbfbba16395f937a19a694c7f8c2ef5d5a8de78164f59c02a7b3514099 | logseq/logseq | keycode.cljs | (ns frontend.util.keycode
"Provides names for common keycodes")
;; code / keycode should all be deprecated for non funcional keys
( def left - square - bracket 219 ) ; ; deprecated
( def left - paren 57 ) ; ; deprecated
(def enter 13)
( def left - square - bracket - code " BracketLeft " ) ; ; deprecated
( d... | null | https://raw.githubusercontent.com/logseq/logseq/9c7b4ea2016fb28b16ee42a7136c73dd52d8ce4b/src/main/frontend/util/keycode.cljs | clojure | code / keycode should all be deprecated for non funcional keys
; deprecated
; deprecated
; deprecated
; deprecated | (ns frontend.util.keycode
"Provides names for common keycodes")
(def enter 13)
(def enter-code "Enter")
(def left-square-brackets-keys #{"[" "【"})
(def left-paren-keys #{"(" "("})
|
6ebe2959c4982dc837897563cd078c48181c03b49d178cda3ed653b4afb4207b | oakes/play-cljc-examples | start.clj | (ns dungeon-crawler.start
(:require [dungeon-crawler.core :as c]
[play-cljc.gl.core :as pc])
(:import [org.lwjgl.glfw GLFW Callbacks
GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI
GLFWCharCallbackI GLFWFramebufferSizeCallbackI GLFWWindowCloseCallbackI
... | null | https://raw.githubusercontent.com/oakes/play-cljc-examples/dec348241c2f0a880ac3074c5d8f1b66d3159a70/dungeon-crawler/src/dungeon_crawler/start.clj | clojure | (ns dungeon-crawler.start
(:require [dungeon-crawler.core :as c]
[play-cljc.gl.core :as pc])
(:import [org.lwjgl.glfw GLFW Callbacks
GLFWCursorPosCallbackI GLFWKeyCallbackI GLFWMouseButtonCallbackI
GLFWCharCallbackI GLFWFramebufferSizeCallbackI GLFWWindowCloseCallbackI
... | |
43e96837f39cfcff1e67702c30bfec777bfbd3bfc9f688aff22f4aff5376a1d6 | fragnix/fragnix | Control.Monad.ST.Safe.hs | # LINE 1 " Control.Monad.ST.Safe.hs " #
# LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
-- |
Module : Control . Monad . ST.Safe
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/Control.Monad.ST.Safe.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (requires universal quantification for runST)
Jones /Lazy Functional State Threads/.
Safe API Onl... | # LINE 1 " Control.Monad.ST.Safe.hs " #
# LANGUAGE Trustworthy #
Module : Control . Monad . ST.Safe
Copyright : ( c ) The University of Glasgow 2001
This library provides support for /strict/ state threads , as
described in the PLDI \'94 paper by and
# DEPRECATED " Safe is now the default , p... |
771482d969af6648f5b66a02577867aa42029d417b150a40ee9ee2e97df33b54 | habit-lang/alb | Common.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , TemplateHaskell #
module Common where
import Prelude hiding ((<$>))
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Writer (WriterT(..), Writer(..), tel... | null | https://raw.githubusercontent.com/habit-lang/alb/567d4c86194a884cc1ceeffca9663211de2d554c/src/Common.hs | haskell | --------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
The obvious approach at this point would be to use the various MonadX classes with particular
values to capture the b... | # LANGUAGE FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , TemplateHaskell #
module Common where
import Prelude hiding ((<$>))
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Writer (WriterT(..), Writer(..), tel... |
6402be21d91905f358980c3890d16f57aa142244198fc4034565eb4e21aa06bd | awkay/om-tutorial | tutorial.cljs | (ns om-tutorial.tutorial
(:require
om-tutorial.A-Introduction
om-tutorial.B-UI
om-tutorial.B-UI-Exercises
om-tutorial.C-App-Database
om-tutorial.C-App-Database-Exercises
om-tutorial.D-Queries
om-tutorial.E-State-Reads-and-Parsing
om-tutorial.E-State-Reads-and-Parsing-Exercises
om-t... | null | https://raw.githubusercontent.com/awkay/om-tutorial/83ca10d91380ba62458b98ccaa80fd11b9c8321d/src/tutorial/om_tutorial/tutorial.cljs | clojure | (ns om-tutorial.tutorial
(:require
om-tutorial.A-Introduction
om-tutorial.B-UI
om-tutorial.B-UI-Exercises
om-tutorial.C-App-Database
om-tutorial.C-App-Database-Exercises
om-tutorial.D-Queries
om-tutorial.E-State-Reads-and-Parsing
om-tutorial.E-State-Reads-and-Parsing-Exercises
om-t... | |
5d0f729878e40ba8fbaf59fd2f7a069e86fc71e2ae1c965d6d79a32f36872b5a | ghc/ghc | Rts.hs | {-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -O0 #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.StgToJS.Rts.Rts
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
... | null | https://raw.githubusercontent.com/ghc/ghc/5b0388880e10ce53565721a9569d009d4534cbc1/compiler/GHC/StgToJS/Rts/Rts.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -O0 #
---------------------------------------------------------------------------
|
Module : GHC.StgToJS.Rts.Rts
License : BSD-style (see the file LICENSE)
Stability : experimental
Haskell. It assumes the existence of pre-generated JS functions, included... |
Copyright : ( c ) The University of Glasgow 2001
Maintainer : < >
Luite Stegeman < >
>
< >
Top level driver of the JavaScript Backend RTS . This file is an
implementation of the JS RTS for the JS backend written as an EDSL in
consta... |
aa41b7120bb737c2608fe87d664b9384f8f116eafa54cd47bd1545bd990e478b | mpickering/apply-refact | Lambda34.hs | foo = [\column -> set column [treeViewColumnTitle := printf "%s (match %d)" name (length candidnates)]] | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Lambda34.hs | haskell | foo = [\column -> set column [treeViewColumnTitle := printf "%s (match %d)" name (length candidnates)]] | |
8e97b91087258618b053fa20c7027ef3648370f5bd4a9d0439c525c3427e9dff | flora-pm/flora-server | Types.hs | module Flora.Model.Release.Types
( ReleaseId (..)
, TextHtml (..)
, Release (..)
, ReleaseMetadata (..)
, ImportStatus (..)
, SupportedCompilers (..)
, ReleaseDeprecation (..)
)
where
import Data.Aeson
import Data.Aeson.Orphans ()
import Data.ByteString (ByteString)
import Data.Text (Text, unpack)
impo... | null | https://raw.githubusercontent.com/flora-pm/flora-server/94d9f3feec577a4f3e4cb394739d61f619458b53/src/core/Flora/Model/Release/Types.hs | haskell |
^ The unique ID of this release
^ The package to which this release is linked
^ The version that this release represents
^ Metadata associated with this release
^ The SHA256 checksum of the stored archive for this release
^ The timestamp of upload, provided by Hackage
^ Date of creation of this release
^ Last... | module Flora.Model.Release.Types
( ReleaseId (..)
, TextHtml (..)
, Release (..)
, ReleaseMetadata (..)
, ImportStatus (..)
, SupportedCompilers (..)
, ReleaseDeprecation (..)
)
where
import Data.Aeson
import Data.Aeson.Orphans ()
import Data.ByteString (ByteString)
import Data.Text (Text, unpack)
impo... |
f5602c78a6b103a037d1fb0e05183fc5a0aaaef59a0a712ede53f8444f65428c | babashka/pod-registry | fluree-crypto.clj | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'com.fluree/crypto "0.1.1")
(require '[pod.fluree.crypto :as crypto])
;; sign a message with a secp256k1 key
(def keys
(crypto/generate-key-pair))
(def message
"Babashka rocks!")
(defn signature []
(let [sig (crypto/sign-message message (:p... | null | https://raw.githubusercontent.com/babashka/pod-registry/b0680a290871a1d3c8a517dda4d1ccc2b89f1292/examples/fluree-crypto.clj | clojure | sign a message with a secp256k1 key
verify signature | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'com.fluree/crypto "0.1.1")
(require '[pod.fluree.crypto :as crypto])
(def keys
(crypto/generate-key-pair))
(def message
"Babashka rocks!")
(defn signature []
(let [sig (crypto/sign-message message (:private keys))]
(println "Signing me... |
51016eabdd0858dbb42d10899523b5fbaaf47dc212b98a77467a893ad49d6406 | namin/minikanren-confo | live.clj | (ns live
(:refer-clojure :exclude [==])
(:use [clojure.core.logic :exclude [is] :as l]
[clojure.core.logic.nominal :exclude [fresh hash] :as nom])
(:use [clojure.test]))
(def ==> '==>)
(defmacro eg [a _ b]
`(is (= ~a ~b)))
(defmacro about
[name & args]
`(deftest ~(symbol (str 'tests-about- name))... | null | https://raw.githubusercontent.com/namin/minikanren-confo/8f6ae49bde478a9e950aaca27768f21aad25c8ff/src/live.clj | clojure | (ns live
(:refer-clojure :exclude [==])
(:use [clojure.core.logic :exclude [is] :as l]
[clojure.core.logic.nominal :exclude [fresh hash] :as nom])
(:use [clojure.test]))
(def ==> '==>)
(defmacro eg [a _ b]
`(is (= ~a ~b)))
(defmacro about
[name & args]
`(deftest ~(symbol (str 'tests-about- name))... | |
c375b7c0ed997aac7764100b9d62dd8ae99b1c324c9a4594b15dc3bdfcd05f1d | iskandr/parakeet-retired | Block.ml | type 'a t = 'a DynArray.t
let create () = DynArray.create()
let singleton x =
let b = DynArray.make 1 in
DynArray.add b x;
b
let of_list xs = DynArray.of_list xs
let of_array xs = DynArray.of_array xs
let append b1 b2 =
let b1' = DynArray.copy b1 in
(* put b2 at the end of b1 *)
DynArray.append b2 b1';
... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/SSA/Block.ml | ocaml | put b2 at the end of b1 | type 'a t = 'a DynArray.t
let create () = DynArray.create()
let singleton x =
let b = DynArray.make 1 in
DynArray.add b x;
b
let of_list xs = DynArray.of_list xs
let of_array xs = DynArray.of_array xs
let append b1 b2 =
let b1' = DynArray.copy b1 in
DynArray.append b2 b1';
b1'
let add b x = DynArray.ad... |
2cf75627564b03ce3d5b748721676ff0c134101beef3a81a64f77f393ed37362 | gersh/erlang-rtmp | rtmp.erl | @author < > [ ]
2009
@doc RTMP encoding / decoding module .
%%% @reference See <a href="" target="_top"></a> for more information.
%%% @end
%%%
%%%
%%% The MIT License
%%%
Copyright ( c ) 2009
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of th... | null | https://raw.githubusercontent.com/gersh/erlang-rtmp/57157fb3be20278af19c87232f99aa9a83041d18/src/rtmp.erl | erlang | @reference See <a href="" target="_top"></a> for more information.
@end
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/... | @author < > [ ]
2009
@doc RTMP encoding / decoding module .
Copyright ( c ) 2009
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .... |
c07a8672b582c6ed80e4d1fab83651a6db8c3f11d658054eb9b2e44a0acc9362 | ocaml-ppx/ppx_view | test.ml | open Migrate_parsetree.Ast_407
open Viewast.Parseview
let int x = Ast_helper.(Exp.constant (Const.int x))
let int32 x = Ast_helper.(Exp.constant (Const.int32 x))
let float x = Ast_helper.(Exp.constant (Const.float x))
let ident x = Ast_helper.(Exp.ident { txt = Lident x; loc = Location.none; })
let%expect_test "... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_view/ffc7ecc3aa21af798a315ddd27538333e31080c5/test/test.ml | ocaml | open Migrate_parsetree.Ast_407
open Viewast.Parseview
let int x = Ast_helper.(Exp.constant (Const.int x))
let int32 x = Ast_helper.(Exp.constant (Const.int32 x))
let float x = Ast_helper.(Exp.constant (Const.float x))
let ident x = Ast_helper.(Exp.ident { txt = Lident x; loc = Location.none; })
let%expect_test "... | |
11b5e8783458c8f5c8f93c41811b76f9c6789b3e62c1b755f2e4b8ab91b7c93f | LexiFi/lrt | matcher.ml | (******************************************************************************)
Copyright ( C ) 2020 by LexiFi .
(* *)
This source file is released under the terms of the MIT license as part ... | null | https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/test/matcher.ml | ocaml | ****************************************************************************
of the lrt package. Details can be found in the attached LICENSE file.
****************************************************************************
stripped do... | Copyright ( C ) 2020 by LexiFi .
This source file is released under the terms of the MIT license as part
open Lrt
module T = struct
type t0 = string list
and 'a t1 = 'a array
and ('a, 'b) t2 = ('a * 'b) option [@@deriving t]
module Matcher = Matcher.Ma... |
04a87d99d09529ab9262b20dbc1ba8402cd92090a47970abc9ea592b7af118dd | g-andrade/erlffx | erlffx.erl | -module(erlffx).
-author('Guilherme Andrade <erlffx(at)gandrade(dot)net>').
-compile([inline, inline_list_funcs]).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([config/2]). -ignore_xref({con... | null | https://raw.githubusercontent.com/g-andrade/erlffx/acdf9e8a2ba6b15bef10c8206c18f242a56a08c9/src/erlffx.erl | erlang | ------------------------------------------------------------------
API Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
------------------------------------------------------------------
-------------------------... | -module(erlffx).
-author('Guilherme Andrade <erlffx(at)gandrade(dot)net>').
-compile([inline, inline_list_funcs]).
-export([config/2]). -ignore_xref({config,2}).
-export([config/3]). -ignore_xref({config,3}).
-export([encrypt/2]). -ignore_xref({encrypt,2}).
-export([decrypt/2]). -ignore_xref({decrypt,2}).
Macro ... |
73e1706de2ffb173acf613dd584fcf93acc317b8988af1b2d270f816e667ae81 | NetComposer/nksip | nksip_callbacks.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_callbacks.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . 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(nksip_callbacks).
-... |
ec2a9dcd4f76d2b1e5d437a0f19a8b7f7ec3f44027dd4af8dc0844826ce9b104 | ktakashi/sagittarius-scheme | ecdh.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; sagittarius/crypto/keys/operations/asymmetric/ecdh.scm - ECDH
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are me... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3a973b75337ff83f421f8eedcb6de544d78fb583/ext/crypto/sagittarius/crypto/keys/operations/asymmetric/ecdh.scm | scheme | coding : utf-8 ; -*-
sagittarius/crypto/keys/operations/asymmetric/ecdh.scm - ECDH
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
... | Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (sagittarius crypto keys opera... |
68b72c0617cc9c83603e336b55cbfe05a66bc50e970651f94f64eeb2294304c1 | mkremins/starfreighter | util.cljs | (ns starfreighter.util)
(defn bucket
"Given a numerical `value` and a seq of pairs `[threshold bucket]`, returns
the value of `bucket` for the first pair where `value` <= `threshold`."
[value threshold-bucket-pairs]
(->> threshold-bucket-pairs
(drop-while (fn [[threshold _]] (> value threshold)))
... | null | https://raw.githubusercontent.com/mkremins/starfreighter/2be40b4aa5f288bb9829a2e1362a7bfc1e7f12dc/docs/js/app/starfreighter/util.cljs | clojure | (ns starfreighter.util)
(defn bucket
"Given a numerical `value` and a seq of pairs `[threshold bucket]`, returns
the value of `bucket` for the first pair where `value` <= `threshold`."
[value threshold-bucket-pairs]
(->> threshold-bucket-pairs
(drop-while (fn [[threshold _]] (> value threshold)))
... | |
11711ad7cb99be5a65906ae04df3ae103993178785afad7a3dc978ce6267f45f | thephoeron/quipper-language | Simulation.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- | This library provides functions for simulati... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/QuipperLib/Simulation.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
| This library provides functions for simulating certain classes of
circuits, for testing and debugging purposes.
We can efficient... | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
module QuipperLib.Simulation (
run_classical_generic,
run_clifford_generic,
* Quantum simulation
run_generic,
run_generic_io,
sim_amps,
QuantumTrace (..),
run_generic_trace,
run_generic_trace_io,
Vector (..)... |
a834714bb1df7c66b766aa051a52012035b6de5f15f4b38505a7e1fdc697bdd0 | utkarshkukreti/bs-preact | Preact_Ppx.ml | open Parsetree
(* Check that there are no bs-preact attributes left after the code is processed. *)
let check expr =
let mapper =
{ Ast_mapper.default_mapper with
expr =
(fun mapper expr ->
match expr with
| { pexp_attributes =
[ ({ txt = ("preact.component" | "p... | null | https://raw.githubusercontent.com/utkarshkukreti/bs-preact/61d10d40543e1f8fc83b8a82f6353bcb52489c91/ppx/src/Preact_Ppx.ml | ocaml | Check that there are no bs-preact attributes left after the code is processed. | open Parsetree
let check expr =
let mapper =
{ Ast_mapper.default_mapper with
expr =
(fun mapper expr ->
match expr with
| { pexp_attributes =
[ ({ txt = ("preact.component" | "preact.hook" | "hook") as txt }, _) ]
; pexp_loc
} ->
... |
7aeb97a9d915a5a656376dd5854f4508b3e56a003136a3f110b06216e0340eee | herbelin/coq-hh | recordops.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/pretyping/recordops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Operations concerning records and ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Nametab
open ... |
3088091e113e78396ad41eb5b4ecfcd00c1f9e4ab289df92b5ef0f09bd5c526f | Leberwurscht/Diaspora-User-Directory | decode.ml | (************************************************************************)
This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/decode.ml | ocaml | **********************************************************************
*********************************************************************
* Handles decoding aspect of set-reconciliation algorithm.
* takes [values], an array of evaluations of an unknown rational function,
evaluated at [points], and [d], the degree... | This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
This program is distributed in ... |
48767aef5394112644f610ae67e599e2174f68ab3c7bf0370e3f1ba03f7bae33 | uhc/uhc | Standard.hs | {-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
-----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/top/Implementation/TypeGraph/Standard.hs | haskell | # OPTIONS -fglasgow-exts #
---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
---------------------------------------------------------------------------
group numb... |
module Top.Implementation.TypeGraph.Standard where
import Top.Implementation.TypeGraph.Basics
import Top.Implementation.TypeGraph.EquivalenceGroup
import Top.Implementation.TypeGraph.Class
import Top.Implementation.General
import Top.Types
import qualified Data.Map as M
import Data.List (nub)
import Data.Maybe (isJus... |
fcd68e0874ddaae854ce9a2843995ab1173362519c2c230f959b073626942ae0 | HCADatalab/powderkeg | fixtures.clj | (ns powderkeg.fixtures
(:require [powderkeg.core :as keg]))
(defmacro with-resources
"Setup resources and tear them down after running body.
Takes a function, which when called, will setup necessary resources,
and returns a function, which when called, will tear the resources down.
Can be given multiple set... | null | https://raw.githubusercontent.com/HCADatalab/powderkeg/5629e9314d0f5bd7db0b33bcf1683a45a8303c54/test/powderkeg/fixtures.clj | clojure | (ns powderkeg.fixtures
(:require [powderkeg.core :as keg]))
(defmacro with-resources
"Setup resources and tear them down after running body.
Takes a function, which when called, will setup necessary resources,
and returns a function, which when called, will tear the resources down.
Can be given multiple set... | |
bb8c9b2a08f7252d98dc643120a8376442ece7cfa55e9c34fc0ec363e0c88bc0 | michiakig/sicp | ex-1.22.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 1 Section 2 Procedures and the Processes They Generate
Exercise 1.22
(define (timed-prime-test n)
(start-prime-test n (runtime)))
(define (start-prime-test n start-time)
(if (prime? n)
(report-prime (- (runtime) start-time) n)
#f))
... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch1/ex-1.22.scm | scheme | Structure and Interpretation of Computer Programs
dependencies from previous in the primality test discussion...
RESULTS:
;Value: ()
100003 *** 0.
100043 *** 0.
;Value: ()
;Value: ()
;Value: ()
;Value: ()
;Value: ()
;Value: ()
;Value: ()
| Chapter 1 Section 2 Procedures and the Processes They Generate
Exercise 1.22
(define (timed-prime-test n)
(start-prime-test n (runtime)))
(define (start-prime-test n start-time)
(if (prime? n)
(report-prime (- (runtime) start-time) n)
#f))
(define (report-prime elapsed-time n)
(newline)
(di... |
b7d94d3c715d2658ff96899fb0f7e4adf0d19020ea5964102eca6af2ccd168c2 | ThomasCrevoisier/chrome-remote-interface-haskell | Launcher.hs | # LANGUAGE RecordWildCards #
|
Module : Chrome . Launcher
Description : Helpers allowing to launch Chrome programmatically
|
Module: Chrome.Launcher
Description: Helpers allowing to launch Chrome programmatically
|-}
module Chrome.Launcher
( ChromeConfig(..)
, defaultConfig
, withChrome
) where
import ... | null | https://raw.githubusercontent.com/ThomasCrevoisier/chrome-remote-interface-haskell/b7cb4a2367fda40a1e90bc3378a6c4e52578b2d7/src/Chrome/Launcher.hs | haskell |
Example:
^ Port for using the remote debugging protocol
| Default configuration for launching "google-chrome" with the remote debugging port set to 9222 | # LANGUAGE RecordWildCards #
|
Module : Chrome . Launcher
Description : Helpers allowing to launch Chrome programmatically
|
Module: Chrome.Launcher
Description: Helpers allowing to launch Chrome programmatically
|-}
module Chrome.Launcher
( ChromeConfig(..)
, defaultConfig
, withChrome
) where
import ... |
37f2b316cfb42fac5cb171b4cb53d17b4e8df239865ee7eb4d3c90176282165c | expede/rescue | Cleanup.hs | module Control.Monad.Trans.Cleanup
(module Control.Monad.Trans.Cleanup.Types) where
import Control.Monad.Trans.Cleanup.Types
| null | https://raw.githubusercontent.com/expede/rescue/5f460a4cd9a01ac84e669a50711375c8f8dcba75/library/Control/Monad/Trans/Cleanup.hs | haskell | module Control.Monad.Trans.Cleanup
(module Control.Monad.Trans.Cleanup.Types) where
import Control.Monad.Trans.Cleanup.Types
| |
8183b23cc4248eccb07433d828959992475fbc647f8d27aeab6ef24384895089 | Shirakumo/kandria | races.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass race-results-screen (pausing-panel menuing-panel)
())
(defmethod initialize-instance :after ((panel race-results-screen) &key (storyline (storyline +world+)))
(let* ((layout (make-instance 'big-prompt-layout))
(focus (make-instance 'alloy:focus-list))
... | null | https://raw.githubusercontent.com/Shirakumo/kandria/26b88c6963b2d2e3457628abbee44604cf11c7db/ui/races.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass race-results-screen (pausing-panel menuing-panel)
())
(defmethod initialize-instance :after ((panel race-results-screen) &key (storyline (storyline +world+)))
(let* ((layout (make-instance 'big-prompt-layout))
(focus (make-instance 'alloy:focus-list))
... | |
2b6db417deeeff0dbba04c2979024a6342be7b1cd8ebcd02b27b5288cdf42578 | BinaryAnalysisPlatform/bap | bap_build.ml | module Plugin_rules = struct
module Fl = Findlib
open Printf
open Ocamlbuild_plugin
module Ocamlbuild = Ocamlbuild_pack
module List = ListLabels
module String = Ocamlbuild_plugin.String
let (/) = Pathname.concat
let is_installed pkg =
try ignore (Fl.package_directory pkg); true
with Fl.No_su... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/36d8dfd39e1ea660708d0050826028e51b6c2447/lib/bap_build/bap_build.ml | ocaml | module Plugin_rules = struct
module Fl = Findlib
open Printf
open Ocamlbuild_plugin
module Ocamlbuild = Ocamlbuild_pack
module List = ListLabels
module String = Ocamlbuild_plugin.String
let (/) = Pathname.concat
let is_installed pkg =
try ignore (Fl.package_directory pkg); true
with Fl.No_su... | |
d46cc89d8f5e64f61e134624ebc3848fc688dd44219a9401b9facd567e3bda66 | iu-parfunc/haskell_dsl_tour | MicroScheme.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
module FrameworkHs.GenGrammars.MicroScheme where
import FrameworkHs.Prims
import FrameworkHs.Helpers
import Text.PrettyPrint.HughesPJ (text)
import Blaze.ByteString.Builder (fromByteString)
data Prog
= ExprP Expr
data Expr
= Immediate Immediate
... | null | https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/middle_end/nanopass/exercise/FrameworkHs/GenGrammars/MicroScheme.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE StandaloneDeriving #
module FrameworkHs.GenGrammars.MicroScheme where
import FrameworkHs.Prims
import FrameworkHs.Helpers
import Text.PrettyPrint.HughesPJ (text)
import Blaze.ByteString.Builder (fromByteString)
data Prog
= ExprP Expr
data Expr
= Immediate Immediate
| Quote Datum
| Let [(UVar,Expr... |
32c658c1337e914237939bb2ae17d05781a017602da7b399af465818b0d268eb | tuscland/lw-dns-sd | package.lisp | -*- encoding : utf-8 ; mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
DNS Service Discovery for LispWorks .
Copyright ( c ) 2013 , . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the ... | null | https://raw.githubusercontent.com/tuscland/lw-dns-sd/2ae7e54b8bc3a89d267c2e91b083cd154bb1187d/src/package.lisp | lisp | mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
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,
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
exp... |
DNS Service Discovery for LispWorks .
Copyright ( c ) 2013 , . All rights reserved .
software distributed under the License is distributed on an " AS
(in-package "CL-USER")
(require "comm")
(defpackage "COM.WILDORA.DNS-SD"
(:nicknames "DNS-SD")
(:export
"*DEFAULT-TIMEOUT*"
"DAEMON-VERSION"
"... |
fefe05e91ddb711ec218c3b42759354f23e0b5aceaa05979b21221ae7ac41696 | stepcut/plugins | Test.hs |
module Test where
import API
resource = test { field = "success" }
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/load/load_0/Test.hs | haskell |
module Test where
import API
resource = test { field = "success" }
| |
5f6151421dab6c1e63d86bfaf8946ec25a89dc0fbc09695f561df5992d5d74cc | otto-de/tesla-microservice | system.clj | (ns de.otto.tesla.system
(:require [com.stuartsierra.component :as c]
[de.otto.tesla.stateful.app-status :as app-status]
[de.otto.tesla.stateful.health :as health]
[de.otto.goo.goo :as goo]
[de.otto.tesla.stateful.configuring :as configuring]
[de.otto.tesla.... | null | https://raw.githubusercontent.com/otto-de/tesla-microservice/eb2190dacc1634f625ed216186cad00fc9853868/src/de/otto/tesla/system.clj | clojure | (ns de.otto.tesla.system
(:require [com.stuartsierra.component :as c]
[de.otto.tesla.stateful.app-status :as app-status]
[de.otto.tesla.stateful.health :as health]
[de.otto.goo.goo :as goo]
[de.otto.tesla.stateful.configuring :as configuring]
[de.otto.tesla.... | |
03943f9c55a6cc9060ddc68ed1be393503de4628fab403621f080a0adc58f876 | serokell/haskell-crypto | Internal.hs | SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : MPL-2.0
-- | Internals of @crypto_auth@.
module NaCl.Auth.Internal
( Key
, toKey
, Authenticator
, toAuthenticator
, create
, verify
) where
import Prelude hiding (length)
import Data.ByteArray (ByteArray, ByteArrayAccess, length, ... | null | https://raw.githubusercontent.com/serokell/haskell-crypto/c7a3752fcf80f0db41702e2ca5127ffbeaf2598c/NaCl/lib/NaCl/Auth/Internal.hs | haskell |
| Internals of @crypto_auth@.
This type is parametrised by the actual data type that contains
bytes. This can be, for example, a @ByteString@, but, since this
is a secret key, it is better to use @ScrubbedBytes@.
| Make a 'Key' from an arbitrary byte array.
This function returns @Just@ if and only if the byte ... | SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : MPL-2.0
module NaCl.Auth.Internal
( Key
, toKey
, Authenticator
, toAuthenticator
, create
, verify
) where
import Prelude hiding (length)
import Data.ByteArray (ByteArray, ByteArrayAccess, length, withByteArray)
import Data.ByteArray... |
d5f12f0afacfd8a16ded598904e62fca1c2251d68fabce91d5cbbfba3446e7ad | 8c6794b6/haskell-sc-scratch | ParallelSeq2.hs | ----------------------------------------------------------------------
-- | Scratch for parallel sequencing, again.
--
Note the use of @tDuty@ . This ugen will return next trigger
after specified duration , in it 's second argument . The list of
duration is retrieved from @[Note]@ , by extracting @noteDur@. The... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Misc/ParallelSeq2.hs | haskell | --------------------------------------------------------------------
| Scratch for parallel sequencing, again.
amplitude and frequency. | Note the use of @tDuty@ . This ugen will return next trigger
after specified duration , in it 's second argument . The list of
duration is retrieved from @[Note]@ , by extracting @noteDur@. Then
the trigger from @tDuty@ will be sent to , and the
returning values from @demand@ ugens are used for controlling... |
544e2dc63f993ff62b61f387fbfcfe36cd4f66c651d780f4816ea0c7890fb563 | alexandergunnarson/quantum | core.cljc | (ns quantum.ai.core)
; TO EXPLORE
; - /
; - Mathematica
; - Supervised and unsupervised machine learning tools for data, images and sounds
including Neural Networks
; - Data mining tools such as cluster analysis, sequence alignment and pattern matching
; =============================
| null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/ai/core.cljc | clojure | TO EXPLORE
- /
- Mathematica
- Supervised and unsupervised machine learning tools for data, images and sounds
- Data mining tools such as cluster analysis, sequence alignment and pattern matching
============================= | (ns quantum.ai.core)
including Neural Networks
|
616e3ccbb1681b7209030b75cd63d8d561dbfec18b564177230a54ce97c2b2e8 | raffy2010/grand-slam | init.cljs | (ns electron.init
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async :refer [<! >! put! chan alts! timeout]]
[electron.common :refer [preview-dir]]
[electron.utils :refer [mkdir]]))
(defn prepare-preview-dir
[]
(mkdir preview-dir))
| null | https://raw.githubusercontent.com/raffy2010/grand-slam/752984d606f4e201b305c6ac931dd0d03a12f4b4/electron_src/electron/init.cljs | clojure | (ns electron.init
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async :refer [<! >! put! chan alts! timeout]]
[electron.common :refer [preview-dir]]
[electron.utils :refer [mkdir]]))
(defn prepare-preview-dir
[]
(mkdir preview-dir))
| |
4f6829575469ac58e251e9f821185613cfc594c10bd039158802ce635e948475 | mu-chaco/ReWire | funcase.hs | import ReWire
data In = A | B | C | D
data Out = Out1 | Out2
proc :: In -> Out
proc i = case i of
A -> Out1
B -> Out1
C -> Out1
_ -> Out2
startp :: In -> ReT In Out I ()
startp i = signal (proc i) >>= \ x -> startp x
starti :: ReT In Out I ()
starti = startp A
start :: ReT In Out I ()
star... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/tests/regression/funcase.hs | haskell | import ReWire
data In = A | B | C | D
data Out = Out1 | Out2
proc :: In -> Out
proc i = case i of
A -> Out1
B -> Out1
C -> Out1
_ -> Out2
startp :: In -> ReT In Out I ()
startp i = signal (proc i) >>= \ x -> startp x
starti :: ReT In Out I ()
starti = startp A
start :: ReT In Out I ()
star... | |
80335e0a15b0958f2d72a93ae7a94236d80f11091425e7f713da28e0a8199ae6 | ucsd-progsys/nate | breakpoints.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/debugger/breakpoints.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Objective Caml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
... |
a4dbf7c689ee8c108267fef56fe6e02066bd1ce35bd1e40431a8ed11841f4c95 | green-labs/gosura | schema.clj | (ns gosura.schema)
(def resolver-settings-schema
[:map {:closed true}
[:auth {:optional true} [:or [:or symbol? [:fn var?]] [:cat [:or symbol? [:fn var?]] [:* any?]]]]
[:kebab-case? {:optional true} boolean?]
[:return-camel-case? {:optional true} boolean?]])
(def base-mutation-config-schema
[:map
[:s... | null | https://raw.githubusercontent.com/green-labs/gosura/ca92389325557cbe749ee42a2986c0d528de7458/src/gosura/schema.clj | clojure | (ns gosura.schema)
(def resolver-settings-schema
[:map {:closed true}
[:auth {:optional true} [:or [:or symbol? [:fn var?]] [:cat [:or symbol? [:fn var?]] [:* any?]]]]
[:kebab-case? {:optional true} boolean?]
[:return-camel-case? {:optional true} boolean?]])
(def base-mutation-config-schema
[:map
[:s... | |
e71a809f2d461d12896f5c387348015538878293b37371537c43458fcf9a679c | anton-k/hindley-milner-type-check | Infer.hs | -- | Defines type-inference algorithm.
--
For type inference we have to define instance of the class :
--
> data NoPrim
-- > deriving (Show)
-- >
-- > data TestLang
-- >
> instance where
> type TestLang = ( ) -- ^ define type for source code locations
> type Var TestLang = Text ... | null | https://raw.githubusercontent.com/anton-k/hindley-milner-type-check/2e28ff70cb76d8941f924b090818ff94a0e2c5be/src/Type/Check/HM/Infer.hs | haskell | | Defines type-inference algorithm.
> deriving (Show)
>
> data TestLang
>
^ define type for source code locations
^ define type for variables
^ define type for primitive operators
> getPrimType _ _ = error "No primops" -- ^ reports types for primitives
Also we define context for type inference that h... | For type inference we have to define instance of the class :
> data NoPrim
> instance where
> termI = lamE ( ) " x " $ varE ( ) " x "
> termK = lamE ( ) " x " $ lamE ( ) " y " $ varE ( ) " x "
> typeI = inferType termI
> typeK = inferType termK
There are functions to check that two types unify ( @u... |
4b8c6db1b1dd4eb5e16cabf6ebb68c66e58ee732239dc31bc368d970fb2e5cba | artyom-poptsov/guile-deck | session.scm | ;;; matrix.scm -- Description of the <session> class.
Copyright ( C ) 2021 < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your option... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-deck/417296482ad2d8ce3064efab8e098072e3da6c7f/modules/deck/core/session.scm | scheme | matrix.scm -- Description of the <session> class.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
The 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 ... |
Copyright ( C ) 2021 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
< session > describes a Matrix client session . Usually this class is obt... |
c2598388514981211fa6a2b1e81694bec46efea9e5d823b75e53e7de5444a92c | clojure/clojure-api-doc | collect.clj | (use 'autodoc-collect.collect-info)
(collect-info-to-file
Clojure repo directory
"../../repo/"
Relative path in repo to Clojure source
"src/clj"
;; Analyze these namespaces
"clojure.core:clojure.core.protocols:clojure.data:clojure.inspector:clojure.java.browse:clojure.java.io:clojure.java.javadoc:clojur... | null | https://raw.githubusercontent.com/clojure/clojure-api-doc/947dcb48c4fbf7e97732f0775a5ff1d8437a8a19/config/1.3/collect.clj | clojure | Analyze these namespaces
Skip these namespaces
Trim prefix - don't set
Output analysis data file
Branch name | (use 'autodoc-collect.collect-info)
(collect-info-to-file
Clojure repo directory
"../../repo/"
Relative path in repo to Clojure source
"src/clj"
"clojure.core:clojure.core.protocols:clojure.data:clojure.inspector:clojure.java.browse:clojure.java.io:clojure.java.javadoc:clojure.java.shell:clojure.main:cloju... |
5032cc58ce9938d5cc8f4120f30975da20330ba853700f7a6c7a1896474c5e35 | criticic/llpp | glFunc.mli | $ I d : glFunc.mli , v 1.4 2000 - 04 - 03 02:57:41 garrigue Exp $
val accum : op:[`accum|`add|`load|`mult|`return] -> float -> unit
val alpha_func : Gl.cmp_func -> ref:Gl.clampf -> unit
type sfactor =
[`dst_alpha|`dst_color|`one|`one_minus_dst_alpha|`one_minus_dst_color
|`one_minus_src_alpha|`src_alpha|`src_al... | null | https://raw.githubusercontent.com/criticic/llpp/04431d79a40dcc0215f87a2ad577f126a85c1e61/lablGL/glFunc.mli | ocaml | $ I d : glFunc.mli , v 1.4 2000 - 04 - 03 02:57:41 garrigue Exp $
val accum : op:[`accum|`add|`load|`mult|`return] -> float -> unit
val alpha_func : Gl.cmp_func -> ref:Gl.clampf -> unit
type sfactor =
[`dst_alpha|`dst_color|`one|`one_minus_dst_alpha|`one_minus_dst_color
|`one_minus_src_alpha|`src_alpha|`src_al... | |
b8fe6efa60b137601ccb013417592d7dadda5ba29486eadd34a082227182a515 | sarabander/p2pu-sicp | 2.95.scm |
(define P1 (mathpoly->listpoly 'x "x^2 - 2x + 1"))
(define P2 (mathpoly->listpoly 'x "11x^2 + 7"))
(define P3 (mathpoly->listpoly 'x "13x + 5"))
(define Q1 (mul P1 P2))
(define Q2 (mul P1 P3))
(listpoly->mathpoly Q1) ; "11x⁴ - 22x³ + 18x² - 14x + 7"
(listpoly->mathpoly Q2) ; "13x³ - 21x² + 3x + 5"
(listpoly->mathpo... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.5/2.95.scm | scheme | "11x⁴ - 22x³ + 18x² - 14x + 7"
"13x³ - 21x² + 3x + 5"
"1458/169x² - 2916/169x + 1458/169"
We add printf statements to gcd-terms in polynomial package:
(define (gcd-terms a b)
(printf "------------------------------------\n")
(printf "a: ~a\n" (listpoly->mathpoly (tag (cons 'x a))))
(printf "b: ~a\n" (list... |
(define P1 (mathpoly->listpoly 'x "x^2 - 2x + 1"))
(define P2 (mathpoly->listpoly 'x "11x^2 + 7"))
(define P3 (mathpoly->listpoly 'x "13x + 5"))
(define Q1 (mul P1 P2))
(define Q2 (mul P1 P3))
(listpoly->mathpoly (greatest-common-divisor Q1 Q2))
Execution trace of ( listpoly->mathpoly ( greatest - common - div... |
765d990e09cc387d15c95aff928e58a4c8811301b8373efebb9425db7548d189 | synduce/Synduce | max_sum_gt.ml | * @synduce -s 2 -NB
type 'a tree =
| Leaf of 'a
| Node of 'a * 'a tree * 'a tree
type 'a tree_memo =
| MLeaf of 'a
| MNode of int * 'a * 'a tree_memo * 'a tree_memo
let rec tree_max = function
| MLeaf x -> x
| MNode (n, a, l, r) -> max a (max (tree_max l) (tree_max r))
;;
The memo trees memoize the v... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/memo/max_sum_gt.ml | ocaml | Can we take advantage of the memoized value?
Note that if you try to synthesize the condition now it will break the ability of
synduce to find counterexamples.
| * @synduce -s 2 -NB
type 'a tree =
| Leaf of 'a
| Node of 'a * 'a tree * 'a tree
type 'a tree_memo =
| MLeaf of 'a
| MNode of int * 'a * 'a tree_memo * 'a tree_memo
let rec tree_max = function
| MLeaf x -> x
| MNode (n, a, l, r) -> max a (max (tree_max l) (tree_max r))
;;
The memo trees memoize the v... |
736abbc23df26123bc3e9f7db1835417a4e8b2e69e1650df55e85787b8f22e82 | luismbo/galton | results.lisp | (in-package :galton)
;;;; Displaying Response Summary
;; The `results' page is powered by results.js which gets JSON data
;; via the `data' route.
(defpage results ("/results")
(<:html
(<:head
(<:title (format nil "~a - Results" (form :title)))
(<:link :href (genurl 'css :file "results") :type "text/css"... | null | https://raw.githubusercontent.com/luismbo/galton/240857deb1d931a87cc8e7686741dd0210c5ee03/results.lisp | lisp | Displaying Response Summary
The `results' page is powered by results.js which gets JSON data
via the `data' route.
Returns a JSON object with the following format:
"title": <some title>, | (in-package :galton)
(defpage results ("/results")
(<:html
(<:head
(<:title (format nil "~a - Results" (form :title)))
(<:link :href (genurl 'css :file "results") :type "text/css" :rel "stylesheet")
(<:script :src "jquery.min.js")
(<:script :src "highcharts.js"))
(<:body
(<:h1 (<:ah (forma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.