_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 |
|---|---|---|---|---|---|---|---|---|
0e159116fdb49952db5b074480612d24c5c7fca0d4040f5b37ed2d833161762e | Oblosys/proxima | Derivation.hs | {-# OPTIONS_GHC -fglasgow-exts -fallow-incoherent-instances -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #-}
module Derivation where
import Layers
import DPP_Lib
--import DPPClass_Lib
import Char
newtype InfTupleExplicit a b = InfTupleExplicit (a, (b, InfTupl... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/papers/Haskell%202008/Haskell/src/Derivation.hs | haskell | # OPTIONS_GHC -fglasgow-exts -fallow-incoherent-instances -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #
import DPPClass_Lib
now use liftStep to remove Step
capture recursion with fix
remove Fix with specifal fix
remove Comp with special composition
rewrite, dropp... | module Derivation where
import Layers
import DPP_Lib
import Char
newtype InfTupleExplicit a b = InfTupleExplicit (a, (b, InfTupleExplicit a b))
newtype TupleStep a inft = I (a, inft)
type InfTuple2 a b = Fix ((TupleStep a) :.: (TupleStep b))
type InfTuple3 a b c = Fix ((TupleStep a) :.: (TupleStep ... |
178174c88d1e0f36c66d490a4f3a24c453e8e53c4e1c1831d87d36a0ef97abd2 | cburgmer/greenyet | selection.clj | (ns greenyet.selection
(:require [clojure.string :as str]))
(defn- filter-by-systems [host-status-pairs selected-systems]
(let [systems (set (map str/lower-case selected-systems))]
(filter (fn [[{system :system} _]]
(contains? systems (str/lower-case system)))
host-status-pairs)))
(d... | null | https://raw.githubusercontent.com/cburgmer/greenyet/b07e8257cafb779bbfe172de2c53db1053cfc495/src/greenyet/selection.clj | clojure | (ns greenyet.selection
(:require [clojure.string :as str]))
(defn- filter-by-systems [host-status-pairs selected-systems]
(let [systems (set (map str/lower-case selected-systems))]
(filter (fn [[{system :system} _]]
(contains? systems (str/lower-case system)))
host-status-pairs)))
(d... | |
da52ad9d552f2882173796f6e78e30f475ec88363446107d1c6e336d73247595 | metaocaml/ber-metaocaml | pr9384.ml | (* TEST
* expect
*)
module M : sig
type 'a t := [< `A ] as 'a
val f : 'a -> 'a t
end = struct
let f x = x
end;;
[%%expect{|
Line 2, characters 2-28:
2 | type 'a t := [< `A ] as 'a
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Destructive substitutions are not supported for constrained
types (other than whe... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules/pr9384.ml | ocaml | TEST
* expect
|
module M : sig
type 'a t := [< `A ] as 'a
val f : 'a -> 'a t
end = struct
let f x = x
end;;
[%%expect{|
Line 2, characters 2-28:
2 | type 'a t := [< `A ] as 'a
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Destructive substitutions are not supported for constrained
types (other than when replacing a type cons... |
1ab5666abdefa7ff7c5ee76e88391b700d02f097476956321a69b830007ea33e | ocaml-multicore/ocaml-tsan | float_compare.ml | (* TEST *)
let equal (x : float) (y : float) =
x, "=", y, (x = y)
[@@inline never]
let not_equal (x : float) (y : float) =
x, "!=", y, (x <> y)
[@@inline never]
let less_than (x : float) (y : float) =
x, "<", y, (x < y)
[@@inline never]
let not_less_than (x : float) (y : float) =
x, "!<", y, not (x < y)
[@@... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/basic-float/float_compare.ml | ocaml | TEST |
let equal (x : float) (y : float) =
x, "=", y, (x = y)
[@@inline never]
let not_equal (x : float) (y : float) =
x, "!=", y, (x <> y)
[@@inline never]
let less_than (x : float) (y : float) =
x, "<", y, (x < y)
[@@inline never]
let not_less_than (x : float) (y : float) =
x, "!<", y, not (x < y)
[@@inline neve... |
e434c4ba6e6f25a9a3e2da583a0b3c0209d9a6810af59061cf98b4bc52f33332 | exercism/common-lisp | pig-latin.lisp | (defpackage :pig-latin
(:use :cl)
(:export :translate))
(in-package :pig-latin)
(defun translate (phrase))
| null | https://raw.githubusercontent.com/exercism/common-lisp/3c159cf4511feab74a2f710b89540ab4f5116d80/exercises/practice/pig-latin/pig-latin.lisp | lisp | (defpackage :pig-latin
(:use :cl)
(:export :translate))
(in-package :pig-latin)
(defun translate (phrase))
| |
232276e1d18656bce71d41bbf591fd16e5dbfeadbd15854991bd18be8c53b23c | techascent/tvm-clj | topi.clj | (ns tvm-clj.impl.fns.topi
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "topi") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/topi.clj | clojure | (ns tvm-clj.impl.fns.topi
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "topi") | |
8ffec25515fc63ce636b0dad1512fc84974de4aae7c56a6862385971062c0bd9 | jesperes/aoc_erlang | aoc2019_day15.erl | Advent of Code solution for 2019 day 15 .
Created : 2019 - 12 - 15T10:32:09 + 00:00
-module(aoc2019_day15).
-include_lib("stdlib/include/assert.hrl").
-include("aoc_puzzle.hrl").
-export([parse/1, solve/1, info/0]).
-behavior(aoc_puzzle).
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODUL... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2019/aoc2019_day15.erl | erlang | same function.
Wall
New pos is space. Robot was moved.
We must move the robot back after exploring; it has
its own state in the intcode machine and does not
automatically rewind with our stack.
Found oxygen source. Throw to wind back up (we want
to leave the intcode computer as is, and continue
with the oxygen... | Advent of Code solution for 2019 day 15 .
Created : 2019 - 12 - 15T10:32:09 + 00:00
-module(aoc2019_day15).
-include_lib("stdlib/include/assert.hrl").
-include("aoc_puzzle.hrl").
-export([parse/1, solve/1, info/0]).
-behavior(aoc_puzzle).
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODUL... |
e1d10a97d31a33915ed0d8a4c1cfa57c565b7ec09e10aef5c698171d6d0b1222 | techascent/tech.ml | sparse_logreg_test.clj | (ns tech.v3.libs.smile.sparse-logreg-test
(:require [clojure.test :refer :all]
[tech.v3.dataset :as ds]
[tech.v3.dataset.modelling :as ds-mod]
[tech.v3.libs.smile.discrete-nb :as nb]
[tech.v3.libs.smile.nlp :as nlp]
[tech.v3.ml :as ml]
[tech.v3.l... | null | https://raw.githubusercontent.com/techascent/tech.ml/7f2cc506980a05f0f8c85f8b1ff0cde6b9451f54/test/tech/v3/libs/smile/sparse_logreg_test.clj | clojure | (ns tech.v3.libs.smile.sparse-logreg-test
(:require [clojure.test :refer :all]
[tech.v3.dataset :as ds]
[tech.v3.dataset.modelling :as ds-mod]
[tech.v3.libs.smile.discrete-nb :as nb]
[tech.v3.libs.smile.nlp :as nlp]
[tech.v3.ml :as ml]
[tech.v3.l... | |
462798799293adc243b48586f96d79f964093ac20ce6120ef4e958354645320f | deadpendency/deadpendency | Api.hs | # LANGUAGE DataKinds #
module DD.Serve.Api
( AppApi (..),
)
where
import DD.Handler.DependencyDeterminerHandler (DependencyDeterminerRoute)
import Servant.API.Generic ((:-))
newtype AppApi route = AppApi
{ dependencyDeterminer ::
route
:- DependencyDeterminerRoute
}
deriving stock (Generic)
| null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-determiner/src/DD/Serve/Api.hs | haskell | # LANGUAGE DataKinds #
module DD.Serve.Api
( AppApi (..),
)
where
import DD.Handler.DependencyDeterminerHandler (DependencyDeterminerRoute)
import Servant.API.Generic ((:-))
newtype AppApi route = AppApi
{ dependencyDeterminer ::
route
:- DependencyDeterminerRoute
}
deriving stock (Generic)
| |
1a5c3430956ec2d9e1b9ffbf9a398e67c18ef562f84eb77be689679b7c8e0cc0 | daveray/dorothy | er.clj | Copyright ( c ) , 2011 . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
; which can be found in the file epl-v10.html at the root of this
; distribution.
; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/daveray/dorothy/207570804dfda2162a15b9ee55b5e76ec6e1ecfa/src/dorothy/examples/er.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
... | Copyright ( c ) , 2011 . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns dorothy.examples.er
(:use dorothy.core))
(defn -main []
(->
(graph :ER [
{:rankdir :LR}
(node-attrs {:shape :box})
:course :institute :student
(node-attrs {:shape :ellipse})
(sub... |
c7bb1dc9614391465cade3611fffc46137d9594c87f16a15f28d54f010986f74 | liquidz/misaki | 02-directory-structure.html.clj | ; @layout post
; @title Directory Structure
(h2 "Default structure")
[:pre {:class "block"} "
root/
|
+- template/
| |
| +- posts/
| | |
| | +- YYYY-MM-DD-posttitle.html.clj
| |
| +- layouts/
| | |
| | +- default.clj
| |
| +- index.html.clj
|
+- public/
| ... | null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/doc/.template/posts/02-directory-structure.html.clj | clojure | @layout post
@title Directory Structure
directory setting
posts and tags url setting
default value: "/"
ex)
"/" => "/YYYY-MM/POST.html"
"/foo" => "/foo/YYYY-MM/POST.html"
dev server port
site language
default value: "en"
default site data
post file compile hook
tag setting
post settin... |
(h2 "Default structure")
[:pre {:class "block"} "
root/
|
+- template/
| |
| +- posts/
| | |
| | +- YYYY-MM-DD-posttitle.html.clj
| |
| +- layouts/
| | |
| | +- default.clj
| |
| +- index.html.clj
|
+- public/
| |
| +- css/
| |
| +- js/
|
+-... |
9d933361a7bcf822505f35868852f8a846d3933c7d4db63dfeb79094f9751d10 | padsproj/pads-haskell | First.hs | # LANGUAGE FlexibleContexts , TypeFamilies , TypeSynonymInstances , TemplateHaskell , QuasiQuotes ,
MultiParamTypeClasses , FlexibleInstances , UndecidableInstances ,
DeriveDataTypeable , ScopedTypeVariables #
MultiParamTypeClasses, FlexibleInstances, UndecidableInstances,
... | null | https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/examples/First.hs | haskell | -- PADS EXAMPLES
reference to another named type
nested tuple type.
type that consumes a line boundary.
String base types
Regular expression types
Prints error message
md is the meta-data descriptor for the underyling type.
expect_AB_test2 = (AB_test {field_AB = A},0,"") -- if backtracking
Restate after Mayb... | # LANGUAGE FlexibleContexts , TypeFamilies , TypeSynonymInstances , TemplateHaskell , QuasiQuotes ,
MultiParamTypeClasses , FlexibleInstances , UndecidableInstances ,
DeriveDataTypeable , ScopedTypeVariables #
MultiParamTypeClasses, FlexibleInstances, UndecidableInstances,
... |
4191d742ebc4355432b062a669faadafbac83bfbb25ccf1543de8f08e33f0fc7 | sunng87/rigui | math.cljc | (ns rigui.math)
(defn pow [base p]
#?(:clj (Math/pow base p)
:cljs (.pow js/Math base p)))
(defn log [base]
#?(:clj (Math/log base)
:cljs (.log js/Math base)))
(defn floor [v]
#?(:clj (Math/floor v)
:cljs (.floor js/Math v)))
| null | https://raw.githubusercontent.com/sunng87/rigui/1c695b8259dc8dd4a527298e8dbb9e0f738e517c/src/rigui/math.cljc | clojure | (ns rigui.math)
(defn pow [base p]
#?(:clj (Math/pow base p)
:cljs (.pow js/Math base p)))
(defn log [base]
#?(:clj (Math/log base)
:cljs (.log js/Math base)))
(defn floor [v]
#?(:clj (Math/floor v)
:cljs (.floor js/Math v)))
| |
7381fbcaa90fefb563095124c18971e8716eecce4d17c6e2f9219c413ed0091a | OCamlPro/alt-ergo | polynome.mli | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/lib/reasoners/polynome.mli | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
cee0a4f6f9afc1643e328e38e481deaaeba610fa9e619ad608ed25d5aeb76f58 | mainland/nikola | Program.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
-- |
-- Module : Data.Array.Nikola.Program
Copyright : ( c ) 2012
-- License : BSD-style
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
module Data.Array.Nikola.Program (
P,
seqK
) where
... | null | https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/src/Data/Array/Nikola/Program.hs | haskell | |
Module : Data.Array.Nikola.Program
License : BSD-style
Stability : experimental
Portability : non-portable
import Text.PrettyPrint.Mainland
| Prepend a monadic action to the program being generated. | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
Copyright : ( c ) 2012
Maintainer : < >
module Data.Array.Nikola.Program (
P,
seqK
) where
import Data.Array.Nikola.Language.Monad
import Data.Array.Nikola.Language.Syntax hiding (Var, Exp)
import qualified Data.Array.Nikola.Lan... |
cf5aa00493d7ac88e85d4e2d87b2d7c1bdde7059ba93e9ed4332688ccd816d3c | threatgrid/ctia | feed_test.clj | (ns ctia.entity.feed-test
(:require
[clj-http.client :as client]
[clojure.edn :as edn]
[clojure.string :as string]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.entity.feed :as sut]
[ctia.test-helpers.access-control :refer [access-control-test]]
[ctia.test-helpers.au... | null | https://raw.githubusercontent.com/threatgrid/ctia/6c11ba6a7c57a44de64c16601d3914f5b0cf308e/test/ctia/entity/feed_test.clj | clojure | teardown | (ns ctia.entity.feed-test
(:require
[clj-http.client :as client]
[clojure.edn :as edn]
[clojure.string :as string]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.entity.feed :as sut]
[ctia.test-helpers.access-control :refer [access-control-test]]
[ctia.test-helpers.au... |
ed5cd84c158438238110d50c3396dd822145a7f8590beb5a5f260c6aabcf0975 | asivitz/Hickory | Mesh.hs | # LANGUAGE OverloadedLists #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE DataKinds , PatternSynonyms #
{-# OPTIONS_GHC -Wno-deferred-out-of-scope-variables #-}
module Hickory.Vulkan.Mesh where
import Data.Binary
import Data.Vector.Binary ()
import Data.Vector.Storable as SV
import Data.Vector as V
import Data.F... | null | https://raw.githubusercontent.com/asivitz/Hickory/2295504d3ba82054cc8b68db441b8e9f256ee5fa/core/Hickory/Vulkan/Mesh.hs | haskell | # OPTIONS_GHC -Wno-deferred-out-of-scope-variables #
Buffer Utils
Rather than copying directly from CPU to GPU, we want the buffer to
live in memory only accesible from GPU for better peformance.
So we set up a staging buffer, transfer from host to staging,
and then go from staging to optimized memory.
Set up th... | # LANGUAGE OverloadedLists #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE DataKinds , PatternSynonyms #
module Hickory.Vulkan.Mesh where
import Data.Binary
import Data.Vector.Binary ()
import Data.Vector.Storable as SV
import Data.Vector as V
import Data.Functor ((<&>))
import Vulkan (VertexInputBindingDescripti... |
4c0c12d4ff62b20b33903006ad2954d7ee7236a0e40925223a6d2106d0c5f325 | facebookarchive/pfff | glade.ml | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlgtk/src/glade.ml | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
20c9f89041510ac195d27aeba4e0d9ef6f68d5a5814ebf3b93a69525aa2757a7 | rabbitmq/rabbitmq-mqtt | java_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(java_SUITE).
-compile([export_all]).
-in... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-mqtt/817971bfec4461630a2ef7e27d4fa9f4c4fb8ff9/test/java_SUITE.erl | erlang |
-------------------------------------------------------------------
Testsuite setup/teardown.
-------------------------------------------------------------------
Write permission
Read permission
-------------------------------------------------------------------
Testsuite cases
-------------------------------... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(java_SUITE).
-compile([export_all]).
-include_... |
53bed05fde4b098bd78bcd6efea2f57e0102c2592827cfacdb3be07d91c60384 | c4-project/c4f | call.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir/src/call.ml | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
8d368c5eaa929ebe015b2cb56e2cc285f9fa43d44cc65bca6b5ed60c90bc6644 | cronokirby/haze | Tracker.hs | # LANGUAGE RecordWildCards #
|
Description : Contains functions related to trackers
This file provides a more abstract description of
the communication protocol with trackers . First it
specificies the data in a .torrent file with MetaInfo ,
then data sent to and returned from a tracker .
Description: Co... | null | https://raw.githubusercontent.com/cronokirby/haze/3cfbc9de8d923a541429f4a5cb1eb4151d5aea08/src/Haze/Tracker.hs | haskell | | Represents the MD5 sum of a file
| Construct a new SHA1 hash from the data
| Check whether or not a given piece hashes to the right value
| Represents the information in the `info` of a metainfo file
A torrent can contain either a single file, or multiple files,
and what each file contains in the multi file mode... | # LANGUAGE RecordWildCards #
|
Description : Contains functions related to trackers
This file provides a more abstract description of
the communication protocol with trackers . First it
specificies the data in a .torrent file with MetaInfo ,
then data sent to and returned from a tracker .
Description: Co... |
81b8710cce39eed30e7a56f207e84e726cf30458b8ea038d2104beb3578a3675 | xu-hao/QueryArrow | BuiltIn.hs | # LANGUAGE FlexibleContexts , OverloadedStrings #
module QueryArrow.SQL.BuiltIn where
import QueryArrow.DB.GenericDatabase
import QueryArrow.Syntax.Term
import QueryArrow.SQL.SQL
import QueryArrow.Mapping
import Data.Namespace.Namespace
import Data.Text (unpack)
import qualified Data.Text as T
import Data.Map.Strict ... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-db-sql-common/src/QueryArrow/SQL/BuiltIn.hs | haskell | SQLStringConstExpr str | T.length str == 0 || str `T.index` 0 /= '{' -> SQLCompCond "in" (head args) (convertTextToSQLText str) | # LANGUAGE FlexibleContexts , OverloadedStrings #
module QueryArrow.SQL.BuiltIn where
import QueryArrow.DB.GenericDatabase
import QueryArrow.Syntax.Term
import QueryArrow.SQL.SQL
import QueryArrow.Mapping
import Data.Namespace.Namespace
import Data.Text (unpack)
import qualified Data.Text as T
import Data.Map.Strict ... |
6cad5874065083b460d8144e2575d0bbe360fc36df45648904dcf6edc58e3ec6 | alesaccoia/festival_flinger | cmu_us_fem_f0model.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_fem_cg/festvox/cmu_us_fem_f0model.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | F0 model for English
(require 'f2bf0lr)
(set! cmu_us_fem_int_lr_params
'(
(model_f0_mean 170)
(model_f0_std 34)))
(define (cmu_us_fem::select_f0model)
"(cmu_us_fem::select_f0model)
Set up the F0 model for English."
(set! f0_lr_start f2b_f0_lr_start)
(set! f0_lr_mid f2b_f0_lr_mid)
(set! f0_lr_end f2... |
6808b49d345740d5bf348f2768d1b06c31d68a01a8a99e5b7c39e7407e451f79 | higherkindness/mu-haskell | Rpc.hs | # language ConstraintKinds #
# language DataKinds #
# language ExistentialQuantification #
{-# language FlexibleInstances #-}
# language GADTs #
# language MultiParamTypeClasses #
# language OverloadedStrings #
# language PolyKinds ... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/core/rpc/src/Mu/Rpc.hs | haskell | # language FlexibleInstances #
# language ScopedTypeVariables #
# language TypeOperators #
|
Description : Protocol-independent declaration of services
This module defines a type-level language to describe
RPC-like microservices independently of the transport
and protocol.
| Packages whose ... | # language ConstraintKinds #
# language DataKinds #
# language ExistentialQuantification #
# language GADTs #
# language MultiParamTypeClasses #
# language OverloadedStrings #
# language PolyKinds #
# language TypeApplications #
#... |
ac97548ed8f6e822d8a2d8d388c65b76a86021faa84482a624c58de20ecba175 | FlowerWrong/mblog | see.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/see/see.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
starts the system
" -init_debug ", | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(see).
load_module/1,
modules_loaded/0,
log_error/1,
make_server/3,
cast/2,
rpc/2,
change_behaviour/2,
keep_alive/2,
make_global/2... |
ee4d5c7ce60bd97524abc0f16664e5ddc1e06f4399cebdbbf129fa91122a3cb5 | glondu/belenios | spool.mli | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2023
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/5306402c15c6a76438b13b8b9da0f45d02a0563d/src/web/server/common/spool.mli | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2023
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
6282460248eeb66a13db8d456ec559933a6bfb1d9ba83c53156145fb9f1231aa | district0x/district-designer | smart_contract_events.cljs | (ns tokens.shared.spec.smart-contract-events
(:require
[cljs.spec.alpha :as s]
[district-designer.shared.spec.ipfs-events :refer [ipfs-hash? address? edn? event-type]]
[district-designer.shared.spec.smart-contract-events]
[tokens.shared.spec.ipfs-events]))
(s/def ::token address?)
(s/def ::token-typ... | null | https://raw.githubusercontent.com/district0x/district-designer/3f2a585b866b6e173f2cb7b32ecadcffa33e2804/src/tokens/shared/spec/smart_contract_events.cljs | clojure | (ns tokens.shared.spec.smart-contract-events
(:require
[cljs.spec.alpha :as s]
[district-designer.shared.spec.ipfs-events :refer [ipfs-hash? address? edn? event-type]]
[district-designer.shared.spec.smart-contract-events]
[tokens.shared.spec.ipfs-events]))
(s/def ::token address?)
(s/def ::token-typ... | |
7bbe106137badc13f8e3da0fcf89d5c2fd8db310c82e3c0225130324757c9c05 | jimrthy/frereth | user.clj | (ns user
(:require
[clojure.repl :refer [doc]]
[clojure.spec.alpha :as s]
[clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs]]
[expound.alpha :as expound]
[mount.core :as mount]
;; this is the top-level dependent component...mount will find the rest via ns requires
[tracker.serve... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/sonic-forces/tracker/src/dev/user.clj | clojure | this is the top-level dependent component...mount will find the rest via ns requires
==================== SERVER ====================
Change the default output of spec to be more readable | (ns user
(:require
[clojure.repl :refer [doc]]
[clojure.spec.alpha :as s]
[clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs]]
[expound.alpha :as expound]
[mount.core :as mount]
[tracker.server-components.http-server :refer [http-server]]))
(set-refresh-dirs "src/main" "src/dev" "s... |
57632e26d3d7b699961e41dfb1485f1ba877b286db220649edb222de9b1a778f | NalaGinrut/guile-lua-rebirth | io.scm | Copyright ( C ) 2016
" Mu Lei " known as " NalaGinrut " < >
;; This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later versi... | null | https://raw.githubusercontent.com/NalaGinrut/guile-lua-rebirth/ca52e0f481d3b1702810b822c7d316b18456d13e/language/lua/stdlib/io.scm | scheme | This file is free software: you can redistribute it and/or modify
(at your option) any later version.
This file 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 L... | Copyright ( C ) 2016
" Mu Lei " known as " NalaGinrut " < >
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
(define-module (language lua stdli... |
66e6d7549bc56ebfb9956edcf795ed38d96be9468ca9e6f4a943be2294098844 | clarkhillm/Hawkmoth | messageBox.clj | (ns
^{:author cWX205128}
framework.messageBox
(:use framework.managedResoreces)
(:import [java.util HashMap ArrayDeque]))
(def box (HashMap.))
(defn box_init [threadName] (.put box threadName (ArrayDeque.)))
(defn sendMessage [threadName message]
(if (nil? (.get box threadName)) (box_init threadName))
(i... | null | https://raw.githubusercontent.com/clarkhillm/Hawkmoth/608767bb86c380fadaf12f9201e2198e5766eabb/src/framework/messageBox.clj | clojure | (ns
^{:author cWX205128}
framework.messageBox
(:use framework.managedResoreces)
(:import [java.util HashMap ArrayDeque]))
(def box (HashMap.))
(defn box_init [threadName] (.put box threadName (ArrayDeque.)))
(defn sendMessage [threadName message]
(if (nil? (.get box threadName)) (box_init threadName))
(i... | |
325dc31c9a625eed20667b2c369a5e107f1ed50b92b55a745fa5f8978fe522ed | spawngrid/htoad | i18n_manager.erl | Author :
Created : Feb 26 , 2010
%% Description: TODO: Add description to dets_generator
-module(i18n_manager).
%%
%% Include files
%%
%% Exported Functions
%%
-export([generate_pos/1]).
-define(EPOT_TABLE,epos).
-define(EPOT_TABLE_FUZZY,epos_fuzzy).
%%
%% API Functions
%%
generate_pos([Lang,Files])->
... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/deps/erlydtl/src/i18n/i18n_manager.erl | erlang | Description: TODO: Add description to dets_generator
Include files
Exported Functions
API Functions
Recover already present translations
Local Functions
Open a temporal table for a given locale
TODO better way to do cleanup
dets:delete_all_objects(?EPOT_TABLE),
Get all data from dets table
File info are al... | Author :
Created : Feb 26 , 2010
-module(i18n_manager).
-export([generate_pos/1]).
-define(EPOT_TABLE,epos).
-define(EPOT_TABLE_FUZZY,epos_fuzzy).
generate_pos([Lang,Files])->
io:format("~s -> ~s ~n",[Lang,Files]),
{ok, SplittedLocales} = string:tokens(Lang,","),
{ok, SplittedFiles} = string:t... |
d6fd392388529b848a11713084227b1e817841bdf46bd32d721800968f1e4b31 | g-andrade/quack | quic_data_kv.erl | -module(quic_data_kv).
-include("quic_data_kv.hrl").
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([fully_decode/1]).
-export([decode/1]).
-export([decode_tagged_values/1]).
-export([decode_t... | null | https://raw.githubusercontent.com/g-andrade/quack/b6decb23674dd97f6918d8ac637ede2ef7bcc507/src/quic_data_kv.erl | erlang | ------------------------------------------------------------------
API Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
Type Exports
------------------------------------------------------------------
-----------... | -module(quic_data_kv).
-include("quic_data_kv.hrl").
-export([fully_decode/1]).
-export([decode/1]).
-export([decode_tagged_values/1]).
-export([decode_tag_list/1]).
-export([encode/1]).
-export([encode_tagged_values/1]).
-export([encode_tag_list/1]).
-export_type([data_kv/0]).
fully_decode(Data) ->
{DataKv,... |
8452cbe282d238a92a67844b034dc0c2bb3c07f934155b8d245f4c1e083b3ad7 | rmloveland/scheme48-0.53 | define-primitive.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 - 1999 by and . See file COPYING .
These are hacked to ensure that all calls to INPUT - TYPE - PREDICATE and
INPUT - TYPE - COERCION are evaluated at load time ( because they do n't
; have readily reconstructed types).
(define-syn... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/vm/define-primitive.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
have readily reconstructed types).
----------------
Checking inputs and coercing results
Output coercion
ignored | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
These are hacked to ensure that all calls to INPUT - TYPE - PREDICATE and
INPUT - TYPE - COERCION are evaluated at load time ( because they do n't
(define-syntax define-primitive
(syntax-rules ()
((define-primitive opcode input-types action)
... |
0b907a6c287875a91581b467d749bdb7bb7a6646f0bd47e856381b42c859e810 | TorXakis/TorXakis | ValExprImplsExtension.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
----------------------------------------... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/valexpr/src/ValExprImplsExtension.hs | haskell | ---------------------------------------------------------------------------
|
Module : ValExprImplsExtension
License : BSD3 (See LICENSE at root directory of this repository)
Stability : experimental
Portability : portable
This module defines extension of functions on and constructors of value ex... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
Copyright : ( c ) TNO and Radboud... |
d12c4f38e5eeef440eff173d4b4bfd68281bc47350647f553dbf53f3740cee33 | ocheron/cryptostore | PBES1.hs | -- |
-- Module : Data.Store.PKCS5.PBES1
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
-- Password-Based Encryption Schemes
{-# LANGUAGE BangPatterns #-}
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE Multi... | null | https://raw.githubusercontent.com/ocheron/cryptostore/b4e742b4ed0146ddf510b765f64317b6f8be58d7/src/Crypto/Store/PKCS5/PBES1.hs | haskell | |
Module : Data.Store.PKCS5.PBES1
License : BSD-style
Stability : experimental
Portability : unknown
Password-Based Encryption Schemes
# LANGUAGE BangPatterns #
# LANGUAGE GADTs #
Some key-derivation functions add restrictions to what characters
are supported.
The data type provides a special val... | Maintainer : < >
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Crypto.Store.PKCS5.PBES1
( PBEParameter(..)
, Key
, ProtectionPassword
, emptyNotTerminated
, fromProtectionPassword
, toProtectionPassword
, toProtectionPasswords
... |
8c064b0af190b2cef040055fa5c4b8daf7ff942608a8673f649b7354e3d24611 | ml4tp/tcoq | summary.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/library/summary.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Special handling of the ml_module ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open CErrors
open Uti... |
7d4b26c602f6edfa4bfebaeaef52d65bc378ad0a88c680e658a8627a5b1c01af | thheller/shadow-cljs | relay_tcp.clj | (ns shadow.cljs.devtools.server.relay-tcp
(:require [shadow.jvm-log :as log]
[clojure.core.async :as async :refer (>!! <!!)]
[shadow.remote.relay.api :as relay]
[clojure.tools.reader.edn :as edn]
[shadow.cljs.devtools.api :as api])
(:import [java.net SocketException S... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/cljs/devtools/server/relay_tcp.clj | clojure | writing to lost connection throws se
nil returns loopback | (ns shadow.cljs.devtools.server.relay-tcp
(:require [shadow.jvm-log :as log]
[clojure.core.async :as async :refer (>!! <!!)]
[shadow.remote.relay.api :as relay]
[clojure.tools.reader.edn :as edn]
[shadow.cljs.devtools.api :as api])
(:import [java.net SocketException S... |
9e9feb51f5626e50f3027b7839940769306ffe9c8f2d338f448ddf851b2ba6e3 | heroku/sdiff | model_join.erl | -module(model_join).
-define(MAGIC_KEY, <<"$$ THIS IS SPECIAL $$">>).
-export([start_link/1, stop/1, join/0]).
start_link(disterl) ->
application:ensure_all_started(sdiff),
ets:new(client, [named_table, public, set]),
ets:new(server, [named_table, public, set]),
{ok, SdiffServ} = sdiff_serv:start_link(... | null | https://raw.githubusercontent.com/heroku/sdiff/15e3fb2974919b7349387288a89881c2850f3073/test/model_join.erl | erlang | Synchronize a stream here. We do it by inserting a magic key with a unique
value and waiting for it to come to the client, meaning everything in-
between should be there.
This relies on a property by which a stream of updates is in order.
However, because things aren't interrupted by diff sequences, little
this p... | -module(model_join).
-define(MAGIC_KEY, <<"$$ THIS IS SPECIAL $$">>).
-export([start_link/1, stop/1, join/0]).
start_link(disterl) ->
application:ensure_all_started(sdiff),
ets:new(client, [named_table, public, set]),
ets:new(server, [named_table, public, set]),
{ok, SdiffServ} = sdiff_serv:start_link(... |
220f3e715f935d0e1db3e13f19ce33c2bc01919dc467559806870d4997c30628 | ocaml-flambda/flambda-backend | compilenv.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/121bb5f26c0e844c5bf8eba2abb3c63110ee92d9/middle_end/compilenv.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
, OCamlPro
and ,
Copyright 2010 Institut National de Recherche en Informatique et
Copyright 2014 - -2016 Jane Street Group LLC
t... |
c060c7a6d844eb0adbbe9e2736f7773e074eb5153ec80973b5c404932fbcd7c9 | agentm/project-m36 | HTML.hs | module ProjectM36.Relation.Show.HTML where
import ProjectM36.Base
import ProjectM36.Relation
import ProjectM36.Tuple
import ProjectM36.Atom
import ProjectM36.Attribute as A
import ProjectM36.AtomType
import qualified Data.List as L
import Data.Text (Text, pack)
import qualified Data.Text as T
import qualified Data.Text... | null | https://raw.githubusercontent.com/agentm/project-m36/57a75b35e84bebf0945db6dae53350fda83f24b6/src/lib/ProjectM36/Relation/Show/HTML.hs | haskell | web browsers don't display tables with empty cells or empty headers, so we have to insert some placeholders- it's not technically the same, but looks as expected in the browser | module ProjectM36.Relation.Show.HTML where
import ProjectM36.Base
import ProjectM36.Relation
import ProjectM36.Tuple
import ProjectM36.Atom
import ProjectM36.Attribute as A
import ProjectM36.AtomType
import qualified Data.List as L
import Data.Text (Text, pack)
import qualified Data.Text as T
import qualified Data.Text... |
fc9e8469845a6c01283ec7905a1f06050617068b13cdc84a9a368eb59d91722f | babashka/nbb | common.cljs | (ns nbb.impl.common)
(def opts (atom nil))
| null | https://raw.githubusercontent.com/babashka/nbb/4d06aa142a5fb5baac48a8ad8e611d672f779b5f/src/nbb/impl/common.cljs | clojure | (ns nbb.impl.common)
(def opts (atom nil))
| |
f123edf5c44d618c41ad2c805889e24d05427c250b80de84528af4fd70c505b2 | input-output-hk/plutus | KnownTypeAst.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TypeApplications #
{-#... | null | https://raw.githubusercontent.com/input-output-hk/plutus/e00e617e7bdf8ff14d308d1ad5583a8739b0b000/plutus-core/plutus-core/src/PlutusCore/Builtin/KnownTypeAst.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
See Note [Rep vs Type context].
| The kind of holes.
See Note [Rep vs Type context].
| A hole in the Rep context.
See Note [Rep vs Type context].
| A hole in the ... | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module PlutusCore.Builtin.KnownTypeAst
( Ty... |
6ea8d7154ce9e754f4597229a4e6bccb0d13b732f7d7fbc04ba37469fbbba199 | akc/hops | CLIProperties.hs | -- |
Copyright :
Maintainer : < >
-- License : BSD-3
--
import System.Process
main = callCommand "tests/cli-properties.sh"
| null | https://raw.githubusercontent.com/akc/hops/fa5c0c731d586a50b86d2b0c08350d53769295e9/tests/CLIProperties.hs | haskell | |
License : BSD-3
| Copyright :
Maintainer : < >
import System.Process
main = callCommand "tests/cli-properties.sh"
|
1fb79e7672c9d6e0a13ceb425ce6bb0d2739521563de07139a49f5433e6cc0ba | mwand/eopl3 | environments.scm | (module environments (lib "eopl.ss" "eopl")
(require "data-structures.scm")
(provide init-env empty-env extend-env apply-env)
;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;;
;; init-env : () -> environment
;; (init-env) builds an environment in which i is bound to the
expressed value 1 , v is b... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter7/inferred/environments.scm | scheme | initial environment ;;;;;;;;;;;;;;;;
init-env : () -> environment
(init-env) builds an environment in which i is bound to the
environment constructors and observers ;;;;;;;;;;;;;;;; | (module environments (lib "eopl.ss" "eopl")
(require "data-structures.scm")
(provide init-env empty-env extend-env apply-env)
expressed value 1 , v is bound to the expressed value 5 , and x is
bound to the expressed value 10 .
(define init-env
(lambda ()
(extend-env
'i (num-val ... |
0494d2bf7450ddd7dd94622081011f691d9f0f9f25043c205c5f08416c78b627 | avsm/mirage-duniverse | bin_prot_test.ml | open Bigarray
open Printf
open OUnit
open Bin_prot
open Common
open Utils
open ReadError
open Type_class
open Bin_prot.Std
module Bigstring = struct
type t = buf
let create = create_buf
let of_string str =
let len = String.length str in
let buf = create len in
blit_string_buf str buf ~len;
bu... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppx_bin_prot/test/bin_prot_test.ml | ocaml | subnormal
subnormal
Test that the binary forms of [float array] and [float_array] are the same
Check that the canonical closures used in the short circuit test of float
arrays are indeed allocated closures as opposed to [compare] for example
which is a primitive. Even if it looks like ... | open Bigarray
open Printf
open OUnit
open Bin_prot
open Common
open Utils
open ReadError
open Type_class
open Bin_prot.Std
module Bigstring = struct
type t = buf
let create = create_buf
let of_string str =
let len = String.length str in
let buf = create len in
blit_string_buf str buf ~len;
bu... |
9e74f7f29f7b1649e326eb69675f21dcb6657589ea64e049d0dab18feb0338f5 | cbaggers/nineveh | axis.lisp | (in-package :nineveh.graphing)
Based on excellent article here :
;; -high-frequency-functions-using-a-gpu/
;;
;; We don't use dithering on this version
(defun-g axis ((uv :vec2) (xy-range :vec4) (axis-style :vec4))
(let* ((axis-thickness (w axis-style))
(axis-color (v! (s~ axis-style :xyz) 1))
... | null | https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/graphing/axis.lisp | lisp | -high-frequency-functions-using-a-gpu/
We don't use dithering on this version | (in-package :nineveh.graphing)
Based on excellent article here :
(defun-g axis ((uv :vec2) (xy-range :vec4) (axis-style :vec4))
(let* ((axis-thickness (w axis-style))
(axis-color (v! (s~ axis-style :xyz) 1))
(diff (/ (s~ xy-range :xz) (- (s~ xy-range :yw) (s~ xy-range :xz))))
(uv (+... |
46cb0a1b736273ef14320204c79222479e4f5c79d1590500944b9c4719b11e3a | maxlapshin/fix | fix_reader_tests.erl | -module(fix_reader_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("fix/include/business.hrl").
% -include_lib("trader/include/trader.hrl").
-compile(export_all).
Needed to keep test order and to ensure broken test does not affect other tests with left
reader_test_() ->
% Labels increase as line nu... | null | https://raw.githubusercontent.com/maxlapshin/fix/4b5208c7c11528fe477954f48152a1922cf17630/test/fix_reader_tests.erl | erlang | -include_lib("trader/include/trader.hrl").
Labels increase as line number increase. Use that fact for sorting
prepare
error_logger:delete_report_handler(sasl_report_tty_h),
start and check start is successful
start supervisor where readers go
Start reader and sync to ensure it completes startup
Check reader sup... | -module(fix_reader_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("fix/include/business.hrl").
-compile(export_all).
Needed to keep test order and to ensure broken test does not affect other tests with left
reader_test_() ->
{ok, {_, [{labeled_exports, LExports}]}} = beam_lib:chunks(code:which(?MO... |
044bdbfd64d9e9beef230b47bc70476631733075269f98465e7cb29a2e0645e7 | AbstractMachinesLab/caramel | ast_mapper.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_405/parsing/ast_mapper.ml | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
A generic Parsetree mapping class
[ @@@ocaml.warning " +9 " ]
( * Ensure that record patterns do ... |
57c0223affa6f05dd18e87a60b8c71f74370cbffdc0cc8b4d58cee881d0c6465 | digitallyinduced/ihp | TypeInfo.hs | # LANGUAGE TemplateHaskell #
|
Module : IHP.Postgres . TypeInfo
Description : Extension Of The Database . PostgreSQL.Simple . TypeInfo Module
Copyright : ( c ) digitally induced GmbH , 2021
Module: IHP.Postgres.TypeInfo
Description: Extension Of The Database.PostgreSQL.Simple.TypeInfo Module
Copyright: (c) digi... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/c287c5b7c5212ea5e45f162391ffbc48c9f65172/IHP/Postgres/TypeInfo.hs | haskell | `SELECT oid, typname FROM pg_type WHERE typname ~ 'tsvector';` | # LANGUAGE TemplateHaskell #
|
Module : IHP.Postgres . TypeInfo
Description : Extension Of The Database . PostgreSQL.Simple . TypeInfo Module
Copyright : ( c ) digitally induced GmbH , 2021
Module: IHP.Postgres.TypeInfo
Description: Extension Of The Database.PostgreSQL.Simple.TypeInfo Module
Copyright: (c) digi... |
3e14b38ff35275023b805631d0bdecfb9a5654287d84c8502dbf6966c56196b6 | 2600hz-archive/whistle | ecallmgr_amqp_pool.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP INC
%%% @doc
Manage a pool of amqp queues
%%% @end
Created : 28 Mar 2011 by < >
%%%-------------------------------------------------------------------
-module(ecallmgr_amqp_pool).
-behaviour(gen_server).... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/ecallmgr/src/ecallmgr_amqp_pool.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
If RP < WC, reduce Ws by max(WC-RP, OrigWC)
arbitrary at this point
scale back workers after a period of time
================================... | @author < >
( C ) 2011 , VoIP INC
Manage a pool of amqp queues
Created : 28 Mar 2011 by < >
-module(ecallmgr_amqp_pool).
-behaviour(gen_server).
-export([start_link/0, start_link/1, route_req/1, route_req/2, reg_query/1, reg_query/2, media_req/1, media_req/2]).
-export([authn_req/1, authn_req/2, authz_... |
0f4e392421b27245743768918c75f4933908df3bee4d8fd1ff53f5cc895e3ff4 | bsansouci/reasonglexampleproject | seq.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/reasonglexampleproject/4ecef2cdad3a1a157318d1d64dba7def92d8a924/vendor/camlimages/examples/liv/seq.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 - 2004 ,
Institut National de Recherche en Informatique et en Automatique .
$ I d : seq.ml , v 1.3 2004/09/21 18:15:46 weis Exp $
open Images
let load_sequence_as_pixmaps ~window fi... |
f50a9f187a13b5d3cb5465cd7784ffa2a858574482cd3051559019723e3a6faf | l3kn/lisp-compiler-llvm | llvm.scm | (defn emit-alloca (var)
(puts (format " ~A = alloca i64" (list var))))
(defn emit-store (value in)
(puts (format " store i64 ~A, i64* ~A" (list value in))))
(defn emit-load (var from)
(puts (format " ~A = load i64, i64* ~A" (list var from))))
(defn emit-copy (var var_)
(puts (format " ~A = add i64 ~A, 0"... | null | https://raw.githubusercontent.com/l3kn/lisp-compiler-llvm/4d9a734e882eed5c4da7f4cd2a779d867359511b/llvm.scm | scheme | (defn emit-alloca (var)
(puts (format " ~A = alloca i64" (list var))))
(defn emit-store (value in)
(puts (format " store i64 ~A, i64* ~A" (list value in))))
(defn emit-load (var from)
(puts (format " ~A = load i64, i64* ~A" (list var from))))
(defn emit-copy (var var_)
(puts (format " ~A = add i64 ~A, 0"... | |
de2b12a12e6d31985b6c9a60c849275b96b5b9bd35de18731b1ff2ba4ad5933b | rbkmoney/hellgate | hg_cash_range.erl | -module(hg_cash_range).
-include_lib("damsel/include/dmsl_domain_thrift.hrl").
-include("domain.hrl").
-export([marshal/1]).
-export([unmarshal/1]).
-export([is_inside/2]).
-export([is_subrange/2]).
-export([intersect/2]).
-type cash_range() :: dmsl_domain_thrift:'CashRange'().
-type cash() :: dmsl_domain_thrift:'... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/4159f30c726d550c86251f86f00deec73f191c2b/apps/hellgate/src/hg_cash_range.erl | erlang |
Marshalling
Unmarshalling | -module(hg_cash_range).
-include_lib("damsel/include/dmsl_domain_thrift.hrl").
-include("domain.hrl").
-export([marshal/1]).
-export([unmarshal/1]).
-export([is_inside/2]).
-export([is_subrange/2]).
-export([intersect/2]).
-type cash_range() :: dmsl_domain_thrift:'CashRange'().
-type cash() :: dmsl_domain_thrift:'... |
95e6dbca764ef9cb96362d1ea5e74b85528f3072c961728e43c91f0411066b60 | sgbj/MaximaSharp | zunm2r.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/zunm2r.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp 20d (20D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ "
" f2cl6.l , v 1d5cbacbb... |
a52c5504957a1f3da22303bb3ae8bdeed5cad9a7a1aaa63c47507aeab6de2a60 | tisnik/clojure-examples | project.clj | ;
( C ) Copyright 2015 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(defproject seesaw10 "0.1.0-SNAPSHOT... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/cf9b3484a332ebd93bc585f051802c333ebde3df/seesaw10/project.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2015 , 2020
-v10.html
(defproject seesaw10 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[seesaw "1.4.5"]]
:plugins [[lei... |
bdacd7a4bbd8a015be7ae403f8e64087d4f501f11f10e710ba25b25201f1de53 | mput/sicp-solutions | 2_10.rkt | #lang racket
Solution for exercise 2_10 .
(require rackunit "2_07.rkt")
(provide div-interval)
(define (div-interval x y)
(if (and (< (lower-bound y) 0) (> (upper-bound y) 0))
(error "Second interval is crossing zerro")
(mul-interval x
(make-interval (/ 1.0 (upper-bound y))
... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_10.rkt | racket | #lang racket
Solution for exercise 2_10 .
(require rackunit "2_07.rkt")
(provide div-interval)
(define (div-interval x y)
(if (and (< (lower-bound y) 0) (> (upper-bound y) 0))
(error "Second interval is crossing zerro")
(mul-interval x
(make-interval (/ 1.0 (upper-bound y))
... | |
c76f5e47aeb0c281060009ea7d7218fb6b31ced7469c5c803e9d99e1cfbaa472 | tchoutri/pg-entity | Main.hs | module Main where
import Data.Pool (createPool, withResource)
import qualified Database.PostgreSQL.Simple as PG
import qualified Database.Postgres.Temp as Postgres.Temp
import qualified EntitySpec
import qualified GenericsSpec
import Optics.Core
import Test.Tasty (TestTree, defaultMain, testGroup)
import Utils
main :... | null | https://raw.githubusercontent.com/tchoutri/pg-entity/b5727da1bb655ec5be41c146524bf22e168f7274/test/Main.hs | haskell | module Main where
import Data.Pool (createPool, withResource)
import qualified Database.PostgreSQL.Simple as PG
import qualified Database.Postgres.Temp as Postgres.Temp
import qualified EntitySpec
import qualified GenericsSpec
import Optics.Core
import Test.Tasty (TestTree, defaultMain, testGroup)
import Utils
main :... | |
a35a2bfa1ad45124a2cdb2ef7d8102e498b2e877769bc87acced18aee1083d02 | vikram/lisplibraries | httpd.lisp | ;; -*- lisp -*-
(in-package :it.bese.ucw)
;;;; ** A Trivial HTTP Server
We do n't actually expect anyone to use this backend but 1 ) it 's
convenient when getting starting and 2 ) the mod_lisp backend
;;;; reuses most of it.
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass httpd-backend (backe... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_ajax/src/backend/httpd.lisp | lisp | -*- lisp -*-
** A Trivial HTTP Server
reuses most of it.
Backend methods
if we get here there's no handler defined for the request
The single threaded server
Message headers methods
Request handling
add both the cr and this char to the buffer
CR
reverse the (cdr it) so that writer lambda's see the values
in... |
(in-package :it.bese.ucw)
We do n't actually expect anyone to use this backend but 1 ) it 's
convenient when getting starting and 2 ) the mod_lisp backend
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass httpd-backend (backend)
((port :accessor port :initarg :port :initform 8080)
(hos... |
32ab6da6dd6a3e69f94e62e0f4e8ba30f8a0dc9cc5c2146b0b5dbad4bb6230f6 | zenspider/schemers | compiler_bug_1.scm | #!/usr/bin/env csi -s
(require rackunit)
(require-library compiler)
(import compiler)
(assert-compile 11 '(+ 1 (* 2 3) 4))
(assert-assemble
11
'((assign proc (op lookup-variable-value) (const +) (reg env))
(save proc)
(assign val (const 4))
(assign argl (op list) (reg val))
(save argl) ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_5/compiler_bug_1.scm | scheme | NOTE: added to fix bug
NOTE: added to fix bug
NOTE: switched to cons | #!/usr/bin/env csi -s
(require rackunit)
(require-library compiler)
(import compiler)
(assert-compile 11 '(+ 1 (* 2 3) 4))
(assert-assemble
11
'((assign proc (op lookup-variable-value) (const +) (reg env))
(save proc)
(assign val (const 4))
(assign argl (op list) (reg val))
(assign proc (op lookup-vari... |
1ccad15fd54d2a26fc08a7fc4f2b3d4a4553400f195317d28c981b411c188449 | google/haskell-trainings | Tests.hs | Copyright 2021 Google LLC
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distributed und... | null | https://raw.githubusercontent.com/google/haskell-trainings/c0d0017f179cede0ee7b18a271ee52208441e2e5/haskell_102/codelab/01_mastermind/src/Tests.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2021 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE CPP #
module Tests (check) where
import Data.Function (on)
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import Da... |
8a79d8b416f323032994a6d4e76545041b5b7b23dc85acadac0018c48d5b9e92 | NorfairKing/yamlparse-applicative | IO.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module YamlParse.Applicative.IO where
import qualified Data.ByteString as SB
import qualified Data.Text as T
import qualified Data.Yaml as Yaml
... | null | https://raw.githubusercontent.com/NorfairKing/yamlparse-applicative/a250d9ea4b0c10dd6a96174f4942f73ec9652a2a/yamlparse-applicative/src/YamlParse/Applicative/IO.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module YamlParse.Applicative.IO where
import qualified Data.ByteString as SB
import qualified Data.Text as T
import qualified Data.Yaml as Yaml
import Path
import Path.IO
import System.Exit
import YamlParse.Applicative.Class
impor... |
1983fe5b8c0e03176ed05a0ef63b6687483433152d1dc4e103f9be079504fbf4 | charlieg/Sparser | then-and-else.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1990 Content Technologies Inc.
copyright ( c ) 1992,1993 -- all rights reserved
;;;
;;; File: "then&else"
;;; Module: "tools:basics:syntactic sugar"
Version : 2.0 June 1990
(in-package :sparser)
(defmacro e... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/tools/basics/syntactic-sugar/then-and-else.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "then&else"
Module: "tools:basics:syntactic sugar" | copyright ( c ) 1990 Content Technologies Inc.
copyright ( c ) 1992,1993 -- all rights reserved
Version : 2.0 June 1990
(in-package :sparser)
(defmacro else (&body forms)
"Helps make `if' forms self-documenting when they get
complex and you can't always parse the parens by eye."
`(pro... |
387711fcc91ef26348cdd9625eab418df51f0a6cc27896701307cb1ccba72191 | project-oak/hafnium-verification | FbThreadSafety.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/opensource/FbThreadSafety.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
f1c1159a153d17dde846c53d61a238a1bebdf11e9507e84a73c31c66c3cc222d | kupl/FixML | sol.ml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec exp_eval : exp -> int
= fun exp ->
match exp with
| Nu... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/sol.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec exp_eval : exp -> int
= fun exp ->
match exp with
| Nu... | |
2a79c2f5226c422851265300c7079fc6747f0d79f7589ff81d09cfe2fdd12942 | pavankumarbn/DroneGUIROS | _package_FlightAnim.lisp | (cl:in-package ardrone_autonomy-srv)
(cl:export '(TYPE-VAL
TYPE
DURATION-VAL
DURATION
RESULT-VAL
RESULT
)) | null | https://raw.githubusercontent.com/pavankumarbn/DroneGUIROS/745320d73035bc50ac4fea2699e22586e10be800/devel/share/common-lisp/ros/ardrone_autonomy/srv/_package_FlightAnim.lisp | lisp | (cl:in-package ardrone_autonomy-srv)
(cl:export '(TYPE-VAL
TYPE
DURATION-VAL
DURATION
RESULT-VAL
RESULT
)) | |
f93e0ba5ebcee822aa133c46a61d20e6c134267c1e86d0db4e65ed9a8497ee91 | onaio/milia | submissions_test.cljs | (ns milia.api.submissions-test
(:require-macros [cljs.test :refer [is deftest async]]
[cljs.core.async.macros :refer [go]])
(:require [milia.api.submissions :as sub]
[cljs.test :as test]
[cljs.core.async :refer [<! >! chan take!]]))
(deftest test-get-stats
[]
(is (= (... | null | https://raw.githubusercontent.com/onaio/milia/c68b612bd640aa2499e4ac2f907a7ef793d0820a/test/cljs/milia/api/submissions_test.cljs | clojure | (ns milia.api.submissions-test
(:require-macros [cljs.test :refer [is deftest async]]
[cljs.core.async.macros :refer [go]])
(:require [milia.api.submissions :as sub]
[cljs.test :as test]
[cljs.core.async :refer [<! >! chan take!]]))
(deftest test-get-stats
[]
(is (= (... | |
1d4be80b2bf2c12d86bfa80052216a170c19203c8d5d4685968c1ff31f127b8b | roman01la/clojurescript-workshop | core.cljs | ;; Atom is a reference type and is used for shared state
;; define an atom which holds a value of `0`
(def state (atom 0))
set atom 's value to ` 100 `
100
;; update atom's value with a function
101
;; read atom's value
101
101
;; observe chages
(add-watch state :logger (fn [key st old-val new-val]
... | null | https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/04.atom/core.cljs | clojure | Atom is a reference type and is used for shared state
define an atom which holds a value of `0`
update atom's value with a function
read atom's value
observe chages |
(def state (atom 0))
set atom 's value to ` 100 `
100
101
101
101
(add-watch state :logger (fn [key st old-val new-val]
(println "New value is:" new-val)))
" New value is : 102 "
" New value is : 103 "
(remove-watch state :logger)
|
eba9e026cdd197715685e929e4c436f4268c6f5fca6554e11210da95d8f8e821 | jsa-aerial/hanasu | client.clj | (ns aerial.hanasu.client
(:require [http.async.client :as http]
[http.async.client.websocket :as wss]
[clojure.core.async :as async]
[msgpack.core :as mpk]
[msgpack.clojure-extensions]
[clojure.data.json :as json]
[aerial.hanasu.common :refer [... | null | https://raw.githubusercontent.com/jsa-aerial/hanasu/7c04e43b64095ed597c5bc65250d244412272ec8/src/clj/aerial/hanasu/client.clj | clojure | Else
Testing comment area
| (ns aerial.hanasu.client
(:require [http.async.client :as http]
[http.async.client.websocket :as wss]
[clojure.core.async :as async]
[msgpack.core :as mpk]
[msgpack.clojure-extensions]
[clojure.data.json :as json]
[aerial.hanasu.common :refer [... |
e353fe90113500c98a70dc47e8756c36611cbb83aee92868767dab8b32e7b4f9 | whalliburton/academy | randomness.lisp | (in-package :academy)
(defun random-element (sequence)
(elt sequence (random (length sequence))))
(defun random-booleans (num &optional (probability 2))
(loop for i from 1 to num
collect (zerop (random probability))))
(defmacro random-do (&rest statements)
(let ((length (length statements)))
`(case... | null | https://raw.githubusercontent.com/whalliburton/academy/87a1a13ffbcd60d8553e42e647c59486c761e8cf/randomness.lisp | lisp | (in-package :academy)
(defun random-element (sequence)
(elt sequence (random (length sequence))))
(defun random-booleans (num &optional (probability 2))
(loop for i from 1 to num
collect (zerop (random probability))))
(defmacro random-do (&rest statements)
(let ((length (length statements)))
`(case... | |
0eb7754a1f8944a1a9b3b6c385e24b01b362038eb0e4d323d640a34d290646f8 | input-output-hk/rscoin-haskell | Glade.hs | {-# LANGUAGE OverloadedStrings #-}
module GUI.RSCoin.Glade
( GladeMainWindow (..)
, AddContactWindow (..)
, importGlade
) where
import GUI.RSCoin.MainWindow (AddContactWindow (..))
import qualified RSCoin.Core as C
import qualified Graphics.UI.Gtk as G
import ... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/User/GUI/RSCoin/Glade.hs | haskell | # LANGUAGE OverloadedStrings # |
module GUI.RSCoin.Glade
( GladeMainWindow (..)
, AddContactWindow (..)
, importGlade
) where
import GUI.RSCoin.MainWindow (AddContactWindow (..))
import qualified RSCoin.Core as C
import qualified Graphics.UI.Gtk as G
import Paths_rscoin (getDa... |
b5f32a41cbcbd637c8da103c30dc18f2b31457ac51950fcecb71c5289dda5041 | wdebeaum/DeepSemLex | tether.lisp | ;;;;
;;;; W::tether
;;;;
(define-words :pos W::v :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::tether
(SENSES
((meta-data :origin calo :entry-date 20031230 :change-date nil :comments html-purchasing-corpus)
(LF-PARENT ONT::ATTACH)
(SEM (F::Aspect F::bounded) (F::Time-span F::Atomic))
(TEMPL A... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/tether.lisp | lisp |
W::tether
|
(define-words :pos W::v :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::tether
(SENSES
((meta-data :origin calo :entry-date 20031230 :change-date nil :comments html-purchasing-corpus)
(LF-PARENT ONT::ATTACH)
(SEM (F::Aspect F::bounded) (F::Time-span F::Atomic))
(TEMPL AGENT-AFFECTED-AFFECTED1-X... |
af70f3ae9eab82d6fccc3d06fe1e6cff131caa43f1864504cf517766d6b7ad12 | noitcudni/google-search-console-bulk-url-removal | core.cljs | (ns google-webmaster-tools-bulk-url-removal.content-script.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [cljs.core.async :refer [<! >! put! chan] :as async]
[hipo.core :as hipo]
[dommy.core :refer-macros [sel sel1] :as dommy]
[testdouble.cljs.csv ... | null | https://raw.githubusercontent.com/noitcudni/google-search-console-bulk-url-removal/0f922c7301e26fba0c7ec75e73e4f8df29962348/src/content_script/google_webmaster_tools_bulk_url_removal/content_script/core.cljs | clojure | [cognitect.transit :as t]
default to Temporarily remove and Remove this URL only
wait for the modal dialog to show
Who cares? Click on all the radiobuttons
Increment the wait time in between clicking on the `Clear cached URL` and the `Temporarily remove URL` tabs.
Don't stop until the next button is clickable
tr... | (ns google-webmaster-tools-bulk-url-removal.content-script.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [cljs.core.async :refer [<! >! put! chan] :as async]
[hipo.core :as hipo]
[dommy.core :refer-macros [sel sel1] :as dommy]
[testdouble.cljs.csv ... |
b3dd4f1c0a3e673292155ff6d4c85adee62960594092d78999902e12f3315164 | blindglobe/clocc | lalr.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: LALR; -*-
(provide 'lalr)
(defpackage "LALR"
(:export "DEFINE-GRAMMAR"))
(in-package "LALR")
(declaim (optimize (speed 3)))
;;; lalr.lisp
;;;
This is an LALR parser generator .
( c ) 1988 .
This is * not * the property of Xerox Corporation !
Modi... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clx/docs/lalr.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: LALR; -*-
lalr.lisp
the rules that expand a category, and the items that expand
a category
There is a sample grammar at the end of this file.
Use your text-editor to search for "Test grammar" to find it.
atomic end marker. It produces a list which is the Lisp... |
(provide 'lalr)
(defpackage "LALR"
(:export "DEFINE-GRAMMAR"))
(in-package "LALR")
(declaim (optimize (speed 3)))
This is an LALR parser generator .
( c ) 1988 .
This is * not * the property of Xerox Corporation !
Modified to cache the first terminals , the epsilon derivations
( in - package '... |
fea6dcc8265a0c298499f126c316cf6c6631bcb05dd772b1a83e74863fe591cb | spechub/Hets | Logic_Hybrid.hs | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : / Logic_Hybrid.hs
Description : Instance of class Logic for Hybrid CASL
Instance of class Logic for hybrid logic .
Module : ./Hybrid/Logic_Hybrid.hs
Description : Instance of class Logic for Hybrid CAS... | null | https://raw.githubusercontent.com/spechub/Hets/fc26b4947bf52be6baf7819a75d7e7f127e290dd/Hybrid/Logic_Hybrid.hs | haskell | Hybrid logic
simplifySen for ExtFORMULA | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : / Logic_Hybrid.hs
Description : Instance of class Logic for Hybrid CASL
Instance of class Logic for hybrid logic .
Module : ./Hybrid/Logic_Hybrid.hs
Description : Instance of class Logic for Hybrid CAS... |
c3e63b6bbf49e89fd32080dabddc616a9436ac48f1701fb2705e2975287a8c0e | aeternity/aeternity | aec_parent_chain_cache_tests.erl | %%%-------------------------------------------------------------------
( C ) 2022 , Aeternity Anstalt
%%% @doc
EUnit tests for aec_parent_chain_cache
%%% @end
%%%-------------------------------------------------------------------
-module(aec_parent_chain_cache_tests).
-include_lib("eunit/include/eunit.hrl").
-d... | null | https://raw.githubusercontent.com/aeternity/aeternity/1c819d843c44baf554d97f29dc3f86f2b530c59c/apps/aecore/test/aec_parent_chain_cache_tests.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
===================================================================
Test cases
===================================================================
========================... | ( C ) 2022 , Aeternity Anstalt
EUnit tests for aec_parent_chain_cache
-module(aec_parent_chain_cache_tests).
-include_lib("eunit/include/eunit.hrl").
-define(TEST_MODULE, aec_parent_chain_cache).
-define(ALICE, <<123450:32/unit:8>>).
-define(BOB, <<123451:32/unit:8>>).
-define(CAROL, <<123452:32/unit:8>>).
-... |
609e6ab76ab11848a8003820b66c7f8ddf2fb9ea81095d84fc1597aa2d441566 | bpiel/guildsman | cytoscape.cljs | (ns guildsman.cytoscape
(:require [re-frame.core :as rf]
[reagent.core :as r]
[re-com.core :as rc]))
(def c1 (volatile! nil))
(def a1 (atom nil))
(def last-node-click (volatile! [nil 0]))
(defn now-ts [] (.getTime (js/Date.)))
(defn on-click-node
[xc-api evt-js]
(def evt-js1 evt-js)
... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/resources/public/js/compiled/out/guildsman/cytoscape.cljs | clojure | (println "flush") | (ns guildsman.cytoscape
(:require [re-frame.core :as rf]
[reagent.core :as r]
[re-com.core :as rc]))
(def c1 (volatile! nil))
(def a1 (atom nil))
(def last-node-click (volatile! [nil 0]))
(defn now-ts [] (.getTime (js/Date.)))
(defn on-click-node
[xc-api evt-js]
(def evt-js1 evt-js)
... |
567b37a67844a9acf70d4c6380298c404b554b81b31bd12ad911b9127af7a756 | haslab/HAAP | Debugger.hs |
HAAP : Haskell Automated Assessment Platform
This module provides the @Debugger@ plugin that invokes external debugging tools .
HAAP: Haskell Automated Assessment Platform
This module provides the @Debugger@ plugin that invokes external debugging tools.
-}
# LANGUAGE EmptyDataDecls , TypeOperators , ScopedTy... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Code/Debugger.hs | haskell | path relative to the project whose files are being debugged
debugged files relative to the debugger path
path relative to the project path of already instrumented debug files
debug files relative to the instrumented path
a list of modules to import or the source code
a list of imports to prefix the file
let html ... |
HAAP : Haskell Automated Assessment Platform
This module provides the @Debugger@ plugin that invokes external debugging tools .
HAAP: Haskell Automated Assessment Platform
This module provides the @Debugger@ plugin that invokes external debugging tools.
-}
# LANGUAGE EmptyDataDecls , TypeOperators , ScopedTy... |
310556f916ef7cf24e2c9e4ed092bd7067e474ddf647bf9638cf0c430b6d2993 | Liqwid-Labs/liqwid-plutarch-extra | Functor.hs | module Plutarch.Extra.Functor (
-- * Type classes
Plut,
PFunctor (..),
PBifunctor (..),
-- * Functions
(#<$),
(#$>),
(#<$>),
(#<&>),
pvoid,
) where
import Data.Kind (Constraint)
import Plutarch.Api.V1.AssocMap (KeyGuarantees, PMap (PMap))
import Plutarch.Api.V1.Maybe (PMaybeData (PDJust, PDNothing... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/8741fde489a0123cab0b90e01d0ac207d306af33/src/Plutarch/Extra/Functor.hs | haskell | * Type classes
* Functions
# MINIMAL pfmap #
over\'.
Common choices for this are:
@Data@-encodable\'
Haskell-level equivalent\'
> b) :--> f a :--> f b)
| Replace all values to be computed with a fixed value. Defaults to
@'pfmap' 'pconst'@, but could be more efficient for some 'PFunctor's.
@since 1.2.0
> f b... | module Plutarch.Extra.Functor (
Plut,
PFunctor (..),
PBifunctor (..),
(#<$),
(#$>),
(#<$>),
(#<&>),
pvoid,
) where
import Data.Kind (Constraint)
import Plutarch.Api.V1.AssocMap (KeyGuarantees, PMap (PMap))
import Plutarch.Api.V1.Maybe (PMaybeData (PDJust, PDNothing))
import Plutarch.Builtin (ppairData... |
7c60e42c6ff7574eb7585d481448401ec4d8aba423954665c01614c71cdc57d3 | heroku/lein-heroku | middleware.clj | (ns happy-path.middleware
(:require [happy-path.layout :refer [*app-context* error-page]]
[taoensso.timbre :as timbre]
[environ.core :refer [env]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]
[ring-ttl-session.core... | null | https://raw.githubusercontent.com/heroku/lein-heroku/337a56787b42b7291e519090fa9bb7d96470667c/it/happy-path/src/happy_path/middleware.clj | clojure | If we're not inside a servlet environment
(for example when using mock requests), then
.getContextPath might not exist
if the context is not specified in the request
we check if one has been specified in the environment
instead | (ns happy-path.middleware
(:require [happy-path.layout :refer [*app-context* error-page]]
[taoensso.timbre :as timbre]
[environ.core :refer [env]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]
[ring-ttl-session.core... |
5cd24019cea41a1e43f9f3cc31d7786a103667532b6ac0132c1095bd0fbb4bed | xapi-project/xen-api-libs | base64.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/stdext/base64.mli | ocaml | * encode a string into base64 |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program 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 ; version 2.1 only . with the special
* exception on linking describe... |
d001abf08324ba5410393c702f8a0feb9307e2c31eb00d2ee2b41abcc43c20c7 | tommaisey/aeon | offset-out.help.scm | ;; (offset-out bufferindex inputs)
;; output signal to a bus, the sample offset within the bus is kept
exactly . This is used where sample accurate output is needed .
(audition
(mrg2 (offset-out 0 (impulse ar 5 0))
(out 0 (mul (sin-osc ar 60 0) 0.1))))
(audition
(mrg2 (out 0 (impulse ar 5 0))
... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/io/offset-out.help.scm | scheme | (offset-out bufferindex inputs)
output signal to a bus, the sample offset within the bus is kept |
exactly . This is used where sample accurate output is needed .
(audition
(mrg2 (offset-out 0 (impulse ar 5 0))
(out 0 (mul (sin-osc ar 60 0) 0.1))))
(audition
(mrg2 (out 0 (impulse ar 5 0))
(out 0 (mul (sin-osc ar 60 0) 0.1))))
|
fbc99de9260c934f06fd5ecb72ae59e43e3466c2ea714c89b299a3b2c17165b4 | monadplus/twitch-game | Lib.hs | module Twitch.Lib (module M) where
import Twitch.Internal.Client as M
import Twitch.Internal.Parser as M
import Twitch.Internal.Constants as M
import Twitch.Internal.Types as M
| null | https://raw.githubusercontent.com/monadplus/twitch-game/39c73aa76003e778e32e88f1b2b9add68f90799f/src/Twitch/Lib.hs | haskell | module Twitch.Lib (module M) where
import Twitch.Internal.Client as M
import Twitch.Internal.Parser as M
import Twitch.Internal.Constants as M
import Twitch.Internal.Types as M
| |
2f56317ec5fad0fc308c99bf4864aa00ea2004c70f1114929678ddfcd08b5af4 | basho/riak_test | ts_cluster_keys_SUITE.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 Basho Technologies , Inc.
%%
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 Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_cluster_keys_SUITE.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
s
-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 permissi... | Copyright ( c ) 2016 Basho Technologies , Inc.
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
Riak Time Series .
-module(ts_... |
f688673517575bb4ce8f56238211a45dba01318f57e44fd960dc0971104c8515 | jarvinet/scheme | listtest.scm | (define q (make-deque))
(define a (cons 'a 1))
(define b (cons 'b 1))
(define c (cons 'c 1))
(define d (cons 'd 1))
(front-insert-deque! q a)
(front-insert-deque! q b)
(front-insert-deque! q c)
(front-insert-deque! q d)
(print-deque q)
(define (f value)
(lambda (v)
(eq? (car v) value)))
(define n (find-deque... | null | https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/test/listtest.scm | scheme | (define ht (make-hashtable))
(display "foo") (newline)
(lookup-hashtable ht 'a #t 1)
(lookup-hashtable ht 'e #t 5)
(display "bar") (newline)
(define z (lookup-hashtable ht 'c #f 0))
(display "baz") (newline)
(remove-hashtable ht 'c) | (define q (make-deque))
(define a (cons 'a 1))
(define b (cons 'b 1))
(define c (cons 'c 1))
(define d (cons 'd 1))
(front-insert-deque! q a)
(front-insert-deque! q b)
(front-insert-deque! q c)
(front-insert-deque! q d)
(print-deque q)
(define (f value)
(lambda (v)
(eq? (car v) value)))
(define n (find-deque... |
fd1783d6ea662d551cc21f88a241bd767501e50682a739aa7749982adaf435fa | spurious/sagittarius-scheme-mirror | consumer.scm | ;;; -*- Scheme -*-
;;;
token.scm - OAuth 1.0 library .
;;;
Copyright ( c ) 2010 - 2013 < >
;;;
;;; 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... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/net/oauth/consumer.scm | scheme | -*- Scheme -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
... | token.scm - OAuth 1.0 library .
Copyright ( c ) 2010 - 2013 < >
" 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
#!read-mac... |
6fa3938dc728e837bab0d379eb39471534f349bbcda669da41fb833c05900706 | ertugrulcetin/ClojureNews | login.cljs | (ns view.login)
(defn component
[log-in sign-up]
[:table
[:tbody
[:tr
[:td "username:"]
[:td
[:input {:id "loginUsernameId" :name "username" :type "text"}]]]
[:tr
[:td "password:"]
[:td
[:input {:id "loginPasswordId" :name "password" :type "password" :on-key-down (fn [e... | null | https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/view/login.cljs | clojure | (ns view.login)
(defn component
[log-in sign-up]
[:table
[:tbody
[:tr
[:td "username:"]
[:td
[:input {:id "loginUsernameId" :name "username" :type "text"}]]]
[:tr
[:td "password:"]
[:td
[:input {:id "loginPasswordId" :name "password" :type "password" :on-key-down (fn [e... | |
6fb7d8c7e691af636f66e1f097ab1684119a0e0cd245fdf926cb11b0410fb973 | Clojure2D/clojure2d-examples | randomwalktrail.clj | (ns examples.NOC.introduction.randomwalktrail
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v])
(:import [fastmath.vector Vec2]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
no deftype app... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/introduction/randomwalktrail.clj | clojure | position
history | (ns examples.NOC.introduction.randomwalktrail
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v])
(:import [fastmath.vector Vec2]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
no deftype app... |
15261a6f2d33355a1427608239b7d607ae9fc44d9f9a6a1c346f7fbe2c80c600 | PyroclastIO/metamorphic | util.cljc | (ns metamorphic.util
#?(:clj (:import [java.util UUID])))
(def final-state-name "__metamorphic-final__")
(defn conjv [xs x]
((fnil conj []) xs x))
(defn index-by [k xs]
(zipmap (map k xs) xs))
(defn kw->fn [kw]
#?(:clj
(let [user-ns (symbol (namespace kw))
user-fn (symbol (name kw))]
... | null | https://raw.githubusercontent.com/PyroclastIO/metamorphic/27dc43ad89423873ca6bcc012cd91fbe2d39271d/src/metamorphic/util.cljc | clojure | (ns metamorphic.util
#?(:clj (:import [java.util UUID])))
(def final-state-name "__metamorphic-final__")
(defn conjv [xs x]
((fnil conj []) xs x))
(defn index-by [k xs]
(zipmap (map k xs) xs))
(defn kw->fn [kw]
#?(:clj
(let [user-ns (symbol (namespace kw))
user-fn (symbol (name kw))]
... | |
7dbe617ffb12774bdeeed1953ab727f17a594bf88018ba4dfda5233470a81821 | kaizhang/bioinformatics-toolkit | Alignment.hs | {-# LANGUAGE Rank2Types #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE BangPatterns #-}
module Bio.Motif.Alignment
( alignment
, alignmentBy
, linPenal
, quadPenal
, cubPenal
, expPenal
, l1
, l2
, l3
, lInf
, AlignFn
, CombineFn
) w... | null | https://raw.githubusercontent.com/kaizhang/bioinformatics-toolkit/89b8d1cdf4fa7b075794c37c070cab8ac27acfaf/bioinformatics-toolkit/src/Bio/Motif/Alignment.hs | haskell | # LANGUAGE Rank2Types #
# LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns #
| penalty function takes the number of gaps and matched positions as input,
return penalty value
^ (distance, (on same direction,
| combine distances from different positions of alignment
| linear penalty
| quadratic penalty
| cubic... | # LANGUAGE FlexibleContexts #
module Bio.Motif.Alignment
( alignment
, alignmentBy
, linPenal
, quadPenal
, cubPenal
, expPenal
, l1
, l2
, l3
, lInf
, AlignFn
, CombineFn
) where
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Unboxed as U
imp... |
002244be22f0b5b0d101bb65a1973fc5522cc762fcd4359800e403e020cb79c7 | gafiatulin/codewars | Lucas.hs | -- Lucas numbers
-- /
module Codewars.Exercise.Lucas where
lucasnum :: Int -> Integer
lucasnum n = (if (n<0) then (-1)^n' else 1) * (fibS n' + 2 * fibS (n'-1))
where n' = abs n
fib = (map fibS [0 ..] !!)
fibS 0 = 0
fibS 1 = 1
fibS k | k > 0 = fib (k-2) + fib (k-1)
... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Lucas.hs | haskell | Lucas numbers
/ |
module Codewars.Exercise.Lucas where
lucasnum :: Int -> Integer
lucasnum n = (if (n<0) then (-1)^n' else 1) * (fibS n' + 2 * fibS (n'-1))
where n' = abs n
fib = (map fibS [0 ..] !!)
fibS 0 = 0
fibS 1 = 1
fibS k | k > 0 = fib (k-2) + fib (k-1)
| otherwise = ... |
87eaff77ba3ae53664364e9fb1a2a052246ed6fbf722700dea67abe344490ec9 | rizo/snowflake-os | asmlibrarian.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/asmlibrarian.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Config
open Co... |
ed0d1b2a1bc8912e5b17d1d9ab666ca9ad0e9f201b26c32d4b6ad81946ffb518 | Copilot-Language/copilot-language | Interpret.hs | Copyright ( c ) 2011 National Institute of Aerospace / Galois , Inc.
| This module implements two interpreters , which may be used to simulated or
-- executed Copilot specifications on a computer to understand their behavior
-- to debug possible errors.
--
-- The interpreters included vary in how the present the r... | null | https://raw.githubusercontent.com/Copilot-Language/copilot-language/ea3bb24bc02079d2b96be9e55c73cae7430fca2f/src/Copilot/Language/Interpret.hs | haskell | executed Copilot specifications on a computer to understand their behavior
to debug possible errors.
The interpreters included vary in how the present the results to the user.
other uses a format that may be easier for humans to read.
# LANGUAGE Safe #
# LANGUAGE GADTs, FlexibleInstances #
Input
, var
, array
... | Copyright ( c ) 2011 National Institute of Aerospace / Galois , Inc.
| This module implements two interpreters , which may be used to simulated or
One of them uses a format ( csv ) that may be more machine - readable , while the
module Copilot.Language.Interpret
csv
, interpret
) where
import Copilot ... |
a113fd4b07a0f301781330a8af6413769fcd9881302791bc34ff7b8aeaddf485 | pingles/googlecloud | project.clj | (defproject googlecloud "0.3.4"
:description "Google Cloud service clients for Clojure"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:plugins [[lein-sub "0.3.0"]]
:sub ["core" "bigquery" "cloudstorage"]
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/pingles/googlecloud/8d31afb1c627d40f7293f85c479cbfa98317b056/project.clj | clojure | (defproject googlecloud "0.3.4"
:description "Google Cloud service clients for Clojure"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:plugins [[lein-sub "0.3.0"]]
:sub ["core" "bigquery" "cloudstorage"]
:eval-in-leiningen true)
| |
c6f51aeac3c5c3cb72986fdbe62536448babd7e565b10afffe3c8e510a47e261 | eglaysher/rldev | kfnTypes.ml |
: KFN type definitions
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option ) any later
... | null | https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/common/kfnTypes.ml | ocaml |
: KFN type definitions
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option ) any later
... | |
3f36bb71206d260dbc6f3073774335520b596e4db3057d72b12d7236bc7ff15f | satori-com/mzbench | mzb_dummycloud_plugin.erl | -module(mzb_dummycloud_plugin).
-export([
start/2,
create_cluster/3,
destroy_cluster/1
]).
%%%===================================================================
%%% API
%%%===================================================================
start(Name, Opts) -> {Name, Opts}.
create_cluster({_Name, _Opts... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/server/src/mzb_dummycloud_plugin.erl | erlang | ===================================================================
API
=================================================================== | -module(mzb_dummycloud_plugin).
-export([
start/2,
create_cluster/3,
destroy_cluster/1
]).
start(Name, Opts) -> {Name, Opts}.
create_cluster({_Name, _Opts}, _N, _Config) ->
{ok, _Ref = erlang:make_ref(), _User = undefined, ["127.0.0.1"]}.
destroy_cluster(_Ref) ->
ok.
|
082460665abbf9ad2ee909c292132eb311000420b2ab368adf7dde0c4d12c153 | atdixon/thurber | stateful_team_score_test.clj | (ns demo.stateful-team-score-test
(:require [clojure.test :refer :all]
[game.stateful-team-score]
[test-support]
[thurber :as th])
(:import (org.joda.time Duration Instant)
(org.apache.beam.sdk.values TimestampedValue)
(org.apache.beam.sdk.testing TestStream... | null | https://raw.githubusercontent.com/atdixon/thurber/38b86a683e446f2deed55fad157476ae05940d50/test/demo/stateful_team_score_test.clj | clojure | (ns demo.stateful-team-score-test
(:require [clojure.test :refer :all]
[game.stateful-team-score]
[test-support]
[thurber :as th])
(:import (org.joda.time Duration Instant)
(org.apache.beam.sdk.values TimestampedValue)
(org.apache.beam.sdk.testing TestStream... | |
1de41723c94bd057311061d91493bb4740d66100e158c3e3e7f1cd9a0d3fcc9a | sweirich/trellys | Rewriting.hs | # LANGUAGE TemplateHaskell , DeriveDataTypeable , ScopedTypeVariables ,
FlexibleInstances , MultiParamTypeClasses , FlexibleContexts ,
UndecidableInstances , TypeSynonymInstances #
FlexibleInstances, MultiParamTypeClasses, FlexibleContexts,
UndecidableInstances, TypeSynonymInstances #-}
module Language.... | null | https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/lib/sep-core/Language/SepCore/Rewriting.hs | haskell | | val t judgement
v1 <- isValue (ETermVar x)
v2 <- isValue t'
return (v1 && v2)
| instantiate variable from the definition context.
v <-isValue (ETermVar x)
if v then return (ETermVar x) else inst (ETermVar x)
| beta-v reduction
typeError $ disp trace1 <+> text "$$"<+>disp trace2 <... | # LANGUAGE TemplateHaskell , DeriveDataTypeable , ScopedTypeVariables ,
FlexibleInstances , MultiParamTypeClasses , FlexibleContexts ,
UndecidableInstances , TypeSynonymInstances #
FlexibleInstances, MultiParamTypeClasses, FlexibleContexts,
UndecidableInstances, TypeSynonymInstances #-}
module Language.... |
13c2a53c273672c40f5ebd8bf7740b5a8826afee6649ff5111b2de15c95f828f | SamueleGiraudo/Bud-Music-Box | DegreeMonoid.ml | Author :
* Creation : apr . 2021
* Modifications : apr . 2021 , aug . 2022
* Creation: apr. 2021
* Modifications: apr. 2021, aug. 2022
*)
(* A degree monoid is a monoid structure on degrees. Operads on (multi-)patterns are
* parametrized by degree monoids. *)
type degree_monoid = {
is_element: int... | null | https://raw.githubusercontent.com/SamueleGiraudo/Bud-Music-Box/45eae635fcbd85555f74d864b31ab25ee50e6bde/Sources/DegreeMonoid.ml | ocaml | A degree monoid is a monoid structure on degrees. Operads on (multi-)patterns are
* parametrized by degree monoids.
Returns the element which is the product of x and x' in the degree monoid dm.
Returns the unity of the degree monoid dm.
Returns the additive degree monoid.
Returns the cyclic degree monoid of o... | Author :
* Creation : apr . 2021
* Modifications : apr . 2021 , aug . 2022
* Creation: apr. 2021
* Modifications: apr. 2021, aug. 2022
*)
type degree_monoid = {
is_element: int -> bool;
product: int -> int -> int;
unity: int
}
Returns a function testing if its argument is an element of t... |
fee8db8536fd5b8b0a78bde1c0269fd19f075ed5e13c6b0c1aff5d8361921105 | huangjs/cl | ddr-exs-tests.lisp | (in-package :ddr-tests)
Test cases for the exercises in ddr-exs.html
;;; MEMBER
(define-test member
(assert-false (ask '(member a nil)))
(assert-true (ask '(member a (cons a nil))))
(assert-true (ask '(member b (cons a (cons b (cons c nil))))))
(assert-false (ask '(member d (cons a (cons b (cons c nil)))))... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/ddr-exs-tests.lisp | lisp | MEMBER
ALL-DIFFERENT
MAP COLORING
SHAKEY 1.0
the robot ends up.
SHAKEY 2.0
The goal state is always
where the robot is or what rooms are unlocked.
Test with rooms unlocked
Test with the room with the box locked
Test with the goal room locked, robot and box in hall
Test with both rooms locked and the rob... | (in-package :ddr-tests)
Test cases for the exercises in ddr-exs.html
(define-test member
(assert-false (ask '(member a nil)))
(assert-true (ask '(member a (cons a nil))))
(assert-true (ask '(member b (cons a (cons b (cons c nil))))))
(assert-false (ask '(member d (cons a (cons b (cons c nil))))))
)
(d... |
8d667d7745b4e49358aa7483a4d7a76ff9422277ea28715cc1f4cf9e457cb0f9 | w7cook/AoPL | Stateful.hs | module Stateful where
import Prelude hiding (LT, GT, EQ, id)
import Base
import Data.Maybe
import Operators
--BEGIN:Addr11
data Value = IntV Int
| BoolV Bool
| ClosureV String Exp Env
| AddressV Int -- new
deriving (Eq, Show)
END : Addr11
--BEGIN:Memo4
type Memory = [Value]... | null | https://raw.githubusercontent.com/w7cook/AoPL/af2f9d31ec658e9d175735335ad27101cca3e247/src/Stateful.hs | haskell | BEGIN:Addr11
new
BEGIN:Memo4
END:Memo4
BEGIN:Acce3
END:Acce3
BEGIN:Upda4
new
new
new
BEGIN:Summ9
BEGIN:Stat11
END:Stat11
BEGIN:Sema27
END:Sema27
END:Summ9 BEGIN:Summ11 BEGIN:Sema20
END:Sema20
BEGIN:Sema23
END:Sema23
BEGIN:Sema25
END:Sema25
END:Summ11 | module Stateful where
import Prelude hiding (LT, GT, EQ, id)
import Base
import Data.Maybe
import Operators
data Value = IntV Int
| BoolV Bool
| ClosureV String Exp Env
deriving (Eq, Show)
END : Addr11
type Memory = [Value]
access i mem = mem !! i
update :: Int -> Value -> Memory -> Memory... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.