_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 |
|---|---|---|---|---|---|---|---|---|
fa767b9e337292c92bfefe6d6f05e5060ccbecd1fcc3dbafc5be0f2f9e0afec9 | baconpaul/composition-kit | scratch_pad.clj | (ns composition-kit.compositions.scratch-pad
(:require [composition-kit.music-lib.midi-util :as midi])
(:require [composition-kit.music-lib.tempo :as tempo])
(:require [composition-kit.music-lib.tonal-theory :as th])
(:require [composition-kit.music-lib.logical-sequence :as ls])
(:require [composition-kit.mus... | null | https://raw.githubusercontent.com/baconpaul/composition-kit/fce0addb74a9c30ba06e051d3bca51c5a2b0ce6f/src/composition_kit/compositions/scratch_pad.clj | clojure | Just a place for trying out syntax and APIS and what not. | (ns composition-kit.compositions.scratch-pad
(:require [composition-kit.music-lib.midi-util :as midi])
(:require [composition-kit.music-lib.tempo :as tempo])
(:require [composition-kit.music-lib.tonal-theory :as th])
(:require [composition-kit.music-lib.logical-sequence :as ls])
(:require [composition-kit.mus... |
8204276033089a8710c2dfe365c1902b0da0197cde7afd4824c39f6850c3dbc6 | probprog/anglican-infcomp-examples | hdf5.clj | (ns helpers.hdf5
(:require [clojure.core.matrix :as m]
[clj-hdf5.core :as hdf5]
[clojure.string :as str]))
(defn- array-to-mat-vec [array]
"Takes in either 1D or 2D Java array and returns either Clojure vector or matrix."
(let [temp (seq array)]
(if (number? (first temp))
(m/to-... | null | https://raw.githubusercontent.com/probprog/anglican-infcomp-examples/63b0e0f5413b4f4d6552a90a94f57028b96dd185/src/helpers/hdf5.clj | clojure | Code for pre-generating random projection matrices
(def HEIGHT 50)
(.writeDoubleMatrix writer "/R200" (mat-vec-to-array (vec (map vec R200))))
(.writeDoubleMatrix writer "/R500" (mat-vec-to-array (vec (map vec R500))))
(.writeDoubleMatrix writer "/R2000" (mat-vec-to-array (vec (map vec R2000))))
(.delete writer "... | (ns helpers.hdf5
(:require [clojure.core.matrix :as m]
[clj-hdf5.core :as hdf5]
[clojure.string :as str]))
(defn- array-to-mat-vec [array]
"Takes in either 1D or 2D Java array and returns either Clojure vector or matrix."
(let [temp (seq array)]
(if (number? (first temp))
(m/to-... |
0e12f7c126718523a36dd9ad95f89fd0ca50df445a519958e2b67f44881379e5 | sophiabrandt/markdown-preview | core.cljs | (ns mdpreview.core
(:require [reagent.core :as r]
[mdpreview.views :as views]))
(defn ^:dev/after-load start
[]
(r/render [views/app]
(.getElementById js/document "app")))
(defn ^:export main
[]
(start))
| null | https://raw.githubusercontent.com/sophiabrandt/markdown-preview/bc01798289cdd6e8775b1ab472d4afe217a27580/src/mdpreview/core.cljs | clojure | (ns mdpreview.core
(:require [reagent.core :as r]
[mdpreview.views :as views]))
(defn ^:dev/after-load start
[]
(r/render [views/app]
(.getElementById js/document "app")))
(defn ^:export main
[]
(start))
| |
ed8c5e27688c39012700cdcde594cff5c3e3d696473c99da5ccc6a3d87f19ec6 | serokell/nixfmt | Pretty.hs | © 2019 < >
- © 2019 < >
-
- SPDX - License - Identifier : MPL-2.0
- © 2019 Lars Jellema <>
-
- SPDX-License-Identifier: MPL-2.0
-}
# LANGUAGE FlexibleInstances , OverloadedStrings #
module Nixfmt.Pretty where
import Prelude hiding (String)
import Data.Char (isSpace)
import Data.Maybe (fromMay... | null | https://raw.githubusercontent.com/serokell/nixfmt/d15f5d37eda66217b42dc360cecfca03c9affce7/src/Nixfmt/Pretty.hs | haskell | | Pretty print a term without wrapping it in a group.
STRINGS
cleanly represented in an indented string. | © 2019 < >
- © 2019 < >
-
- SPDX - License - Identifier : MPL-2.0
- © 2019 Lars Jellema <>
-
- SPDX-License-Identifier: MPL-2.0
-}
# LANGUAGE FlexibleInstances , OverloadedStrings #
module Nixfmt.Pretty where
import Prelude hiding (String)
import Data.Char (isSpace)
import Data.Maybe (fromMay... |
3a9cf1f40cd1164f5e1b577904781805f61a4735a4c9bd18818072f9f7fc5cd6 | johnswanson/tictag | about.cljs | (ns tictag.views.about
(:require [tictag.nav :refer [route-for]]))
(def tagtime-link [:a {:href "/"} "TagTime"])
(def about-content
[:div
[:h1 "About Tictag"]
[:p "Tictag is stochastic time tracking, heavily inspired by/stolen from " tagtime-link "."]
[:h2 "Okay, what's that?"]
[:p "(On average) every... | null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/src/cljs/tictag/views/about.cljs | clojure | (ns tictag.views.about
(:require [tictag.nav :refer [route-for]]))
(def tagtime-link [:a {:href "/"} "TagTime"])
(def about-content
[:div
[:h1 "About Tictag"]
[:p "Tictag is stochastic time tracking, heavily inspired by/stolen from " tagtime-link "."]
[:h2 "Okay, what's that?"]
[:p "(On average) every... | |
e3f7d7f76c5814f8860024111587ae73b194750114eadac437aad8c8c160774b | rd--/hsc3 | dbrown.help.hs | -- dbrown
let n = dbrownId 'α' dinf 0 15 1
x = mouseX kr 1 40 Exponential 0.1
t = impulse kr x 0
f = demand t 0 n * 30 + 340
in sinOsc ar f 0 * 0.1
-- dbrown
let n = demand (impulse kr 10 0) 0 (dbrownId 'α' dinf (-1) 1 0.05)
f = linExp n (-1) 1 64 9600
in sinOsc ar f 0 * 0.1
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/dbrown.help.hs | haskell | dbrown
dbrown | let n = dbrownId 'α' dinf 0 15 1
x = mouseX kr 1 40 Exponential 0.1
t = impulse kr x 0
f = demand t 0 n * 30 + 340
in sinOsc ar f 0 * 0.1
let n = demand (impulse kr 10 0) 0 (dbrownId 'α' dinf (-1) 1 0.05)
f = linExp n (-1) 1 64 9600
in sinOsc ar f 0 * 0.1
|
538972c52377e73a9e7db595590e70796d6b8e065d048e137223ca8865ce9082 | simonstl/introducing-erlang-2nd | drop.erl | -module(drop).
-export([fall_velocity/2]).
fall_velocity(Planemo, Distance) ->
Gravity = case Planemo of
earth -> 9.8;
moon -> 1.6;
mars -> 3.71
end, % note comma - function isn't done yet
try math:sqrt(2 * Gravity * Distance) of
Result -> Result
catch
error:Error -> {found, Error}
end. | null | https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch09/ex2-debug/drop.erl | erlang | note comma - function isn't done yet | -module(drop).
-export([fall_velocity/2]).
fall_velocity(Planemo, Distance) ->
Gravity = case Planemo of
earth -> 9.8;
moon -> 1.6;
mars -> 3.71
try math:sqrt(2 * Gravity * Distance) of
Result -> Result
catch
error:Error -> {found, Error}
end. |
f39a15584779314d3bd5d5bf359e743300db071eb2ed42a593140e2a6dc3d5ab | ayamada/copy-of-svn.tir.jp | cgi.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
ToDo : 雑多になってきたので、モジュール名をtir03.cgi.miscにする ?
;;; ToDo: cgi-mainの内側か外側か判定可能な何かが無いかどうか確認し、
;;; 可能なら、locationは内側でも外側でも機能するように直す事。
ToDo : location時の#の扱い
;;; - location手続きは対応済み
;;; - webサーバにhoge.cgi#abc等のアクセスが来た際に、
;;; ... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir03/0.0.3/lib/tir03/cgi.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
ToDo: cgi-mainの内側か外側か判定可能な何かが無いかどうか確認し、
可能なら、locationは内側でも外側でも機能するように直す事。
- location手続きは対応済み
- webサーバにhoge.cgi#abc等のアクセスが来た際に、
(本来はwebサーバが行うべき???)
- どうしても#付きurlにリダイレクトしたい時の為に、
meta http-equiv="Refresh"
-- 更に、副作用を伴う動作後に上記リダイレクトを行わせた... | $ Id$
ToDo : 雑多になってきたので、モジュール名をtir03.cgi.miscにする ?
ToDo : location時の#の扱い
でリダイレクトさせるhtml - treeを返す手続きを用意する 。
ToDo : test caseを用意
ToDo : text->inline - html text->block - html関数を追加する事 。
(define-module tir03.cgi
(use gauche.charconv)
(use gauche.parameter)
(use srfi-1)
(use srfi-2)
... |
631341defdaed40dbe552a78877a878536052021dadda05363beaf117555010c | MyDataFlow/ttalk-server | cow_qs.erl | Copyright ( c ) 2013 - 2014 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowlib/src/cow_qs.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2013 - 2014 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cow_qs).
-export([parse_qs/1]).
-export([qs/... |
c8a6fb4539ae8d63f85d9350881d7889d93f40be6d0a9b042bba638a390b4189 | startalkIM/ejabberd | luerl.erl | Copyright ( c ) 2013
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under ... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/luerl/src/luerl.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Authors : ,
Purpose : Basic LUA 5.2 interface .
-module(luerl).
-include("luerl.hrl").
-export([eval/1,eval/2,evalfile/1,evalfile/2,
do/1,... |
6d0eb0992df9dfb7b8bf4aa2937de37d71374549cc8041438c2c8c9c1c228a09 | casperschipper/ocaml-cisp | tablepath2.ml | let max = 512
let noise = Cisp.sineseg max |> Array.of_seq
let steps =
Array.init max (fun idx -> let next = ((idx + 1) mod max) in Infseq.repeat next)
let get_table arr idx =
if idx > Array.length arr || (idx < 0) then
None
else
Some (arr.(idx))
let play_index_table arr =
let rec aux arr idx () =... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/tablepath2.ml | ocaml | let max = 512
let noise = Cisp.sineseg max |> Array.of_seq
let steps =
Array.init max (fun idx -> let next = ((idx + 1) mod max) in Infseq.repeat next)
let get_table arr idx =
if idx > Array.length arr || (idx < 0) then
None
else
Some (arr.(idx))
let play_index_table arr =
let rec aux arr idx () =... | |
d0ed315eda058f9dad0baa20da0d039997e72319dc7cc48e6c4cb0ed9e6e224c | froydnj/ironclad | rsa.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
rsa.lisp -- implementation of the RSA public key algorithm
(in-package :crypto)
;;; class definitions
(defclass rsa-key ()
((n :initarg :n :reader rsa-key-modulus :type integer)))
(defclass rsa-public-key (rsa-key)
((e :initarg :e :reader rsa-key-exponent :type... | null | https://raw.githubusercontent.com/froydnj/ironclad/fe88483bba68eac4db3b48bb4a5a40035965fc84/src/public-key/rsa.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
class definitions
function definitions | rsa.lisp -- implementation of the RSA public key algorithm
(in-package :crypto)
(defclass rsa-key ()
((n :initarg :n :reader rsa-key-modulus :type integer)))
(defclass rsa-public-key (rsa-key)
((e :initarg :e :reader rsa-key-exponent :type integer)))
(defclass rsa-private-key (rsa-key)
((d :initarg :d :r... |
a75c17456aabbd4ce49022dd8f62a71f0904ea4acccebe8784ea0ef42741a599 | jimweirich/sicp-study | ex2_20.scm | Exercise 2.20 . The procedures + , * , and list take arbitrary
numbers of arguments . One way to define such procedures is to use
;; define with dotted-tail notation. In a procedure definition, a
;; parameter list that has a dot before the last parameter name
;; indicates that, when the procedure is called, the i... | null | https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter2/ex2_20.scm | scheme | define with dotted-tail notation. In a procedure definition, a
parameter list that has a dot before the last parameter name
indicates that, when the procedure is called, the initial
parameters (if any) will have as values the initial arguments, as
usual, but the final parameter's value will be a list of any
remai... | Exercise 2.20 . The procedures + , * , and list take arbitrary
numbers of arguments . One way to define such procedures is to use
the procedure f can be called with two or more arguments . If we
then in the body of f , x will be 1 , y will be 2 , and z will be the
list ( 3 4 5 6 ) . Given the definition... |
d54d95d47a6f94cb431d29593e0354bf0f4274f081bb3448ec1e7cd34f04eb18 | ericclack/racket-examples | asteroids4.rkt | #lang racket
#|
Asteroids - (go) to run.
Left / right to rotate
Up / down to speed up, slow down
Space to fire.
DONE:
- Score
TODO:
- Lives
|#
(require 2htdp/universe 2htdp/image)
(require "util.rkt")
(struct world (asteroids ship bullets score) #:transparent)
(struct pos (x y) #:transparent)
(struct ship (pos ... | null | https://raw.githubusercontent.com/ericclack/racket-examples/ee858daac3577ead0c8463b9701a8653220039de/asteroids4.rkt | racket |
Asteroids - (go) to run.
Left / right to rotate
Up / down to speed up, slow down
Space to fire.
DONE:
- Score
TODO:
- Lives
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Asteroids that are too small are deleted.
A list like this (a a a a a) will result in a list
like this (a a (a a) a a) on hit... | #lang racket
(require 2htdp/universe 2htdp/image)
(require "util.rkt")
(struct world (asteroids ship bullets score) #:transparent)
(struct pos (x y) #:transparent)
(struct ship (pos direction speed) #:transparent)
(struct asteroid (pos direction speed size) #:transparent)
(struct bullet (pos direction speed) #:trans... |
deefaee6152a2fd2fbf85e962688f55943d0ace1e7f5569b27750b47353c0229 | thheller/shadow-cljs | deps.cljs | {:externs
["foo/externs.js"]
:foreign-libs
[{:file "file.js"
:file-min "file-min.js"
:externs ["file-externs.js"]
:provides ["file"]}]}
| null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/test/resource-dir/deps.cljs | clojure | {:externs
["foo/externs.js"]
:foreign-libs
[{:file "file.js"
:file-min "file-min.js"
:externs ["file-externs.js"]
:provides ["file"]}]}
| |
7ad82252f080e8dc6629d8d4084959b1bbcc4157d78116c4751e3a26b7df9747 | TheLortex/mirage-monorepo | integer_interface.ml | module type S = sig
type t
val zero : t
(** Integer 0. *)
val one : t
(** Integer 1. *)
val minus_one : t
(** Integer (-1). *)
val neg : t -> t
(** Unary negation. *)
val add : t -> t -> t
(** Addition. *)
val sub : t -> t -> t
(** Subtraction. *)
val mul : t -> t -> t
(** Mulitplic... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/optint/src/integer_interface.ml | ocaml | * Integer 0.
* Integer 1.
* Integer (-1).
* Unary negation.
* Addition.
* Subtraction.
* Mulitplication.
* Successor. [succ x] is [add x one].
* Predecessor. [pred x] is [sub x one].
* Return the absolute value its argument.
* The greatest representable integer.
* The smallest representable integer.
* Bitwi... | module type S = sig
type t
val zero : t
val one : t
val minus_one : t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
* Integer division . Raise [ Division_by_zero ] if the second argument is zero .
This division rounds the real ... |
5bb92a1f7d7b0744904e2566b35c1001e9805d03c8a63df77956c8f2725bbe71 | carotene/carotene | carotene_subscriber_sup.erl | -module(carotene_subscriber_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
-export([start_child/1]).
%% Supervisor callbacks
-export([init/1]).
%% ===================================================================
%% API functions
%% ==================================================================... | null | https://raw.githubusercontent.com/carotene/carotene/963ecad344ec1c318c173ad828a5af3c000ddbfc/src/carotene_subscriber_sup.erl | erlang | API
Supervisor callbacks
===================================================================
API functions
===================================================================
===================================================================
Supervisor callbacks
================================================... | -module(carotene_subscriber_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([start_child/1]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_child(Args) ->
supervisor:start_child(?MODULE, Args).
init([]) ->
{ok, { {simple_one_for_one, 5,... |
0656d62a63413af2edb23737be15246a439310fd940cc7a5ecaa3081cf7eb6be | WickedShell/clj-mavlink | core.clj | (ns mavlink.core
(:require [clojure.core.async :as async]
[mavlink.checksum :refer :all]
[mavlink.type :refer [byte-to-long]]
[mavlink.mavlink_xml :refer :all])
(:import [java.io InputStream OutputStream DataOutputStream IOException]
[java.nio ByteBuffer ByteOrder]
... | null | https://raw.githubusercontent.com/WickedShell/clj-mavlink/21d79d07f862e3fb6d9a75be8e65151e2ab4952b/src/mavlink/core.clj | clojure |
Encode support functions
now copy the array from the payload to the packed array.
get the current timestamp
the packet plus the
link id and timestamp
add link ID to the packet
add the timestamp to the packet
calculate the sha256 from the secret-key and the packet
so no or'ing necessary
encode the payload
... | (ns mavlink.core
(:require [clojure.core.async :as async]
[mavlink.checksum :refer :all]
[mavlink.type :refer [byte-to-long]]
[mavlink.mavlink_xml :refer :all])
(:import [java.io InputStream OutputStream DataOutputStream IOException]
[java.nio ByteBuffer ByteOrder]
... |
60c704046f10275976bd350b8decef073e7a00f40b516b49bc25190f0858180a | oshyshko/adventofcode | AXY.hs | module Geom.AXY where
import Imports
data XY a = XY a a deriving (Show, Functor, Foldable)
data Line a = Line (XY a) (XY a) deriving (Show, Functor, Foldable)
instance Applicative XY where
pure a = XY a a
liftA2 f (XY x0 y0) (XY x1 y1) = XY (f x0 x1) (f y0 y1)
| null | https://raw.githubusercontent.com/oshyshko/adventofcode/95b6bb4d514cf02680ba1a62de5a5dca2bf9e92d/src/Geom/AXY.hs | haskell | module Geom.AXY where
import Imports
data XY a = XY a a deriving (Show, Functor, Foldable)
data Line a = Line (XY a) (XY a) deriving (Show, Functor, Foldable)
instance Applicative XY where
pure a = XY a a
liftA2 f (XY x0 y0) (XY x1 y1) = XY (f x0 x1) (f y0 y1)
| |
83c4cd3a67ea1828176448b06b7f3fcf802d9ca3ce7c430f8eaff6f655cef637 | wjrforcyber/SystemT | Tests.hs | # LANGUAGE ScopedTypeVariables #
module Lang.L3.Tests (propertyTests) where
import Data.Maybe
import qualified Lang.L3.Eval.EEval as E
import Lang.L3.Syntax.Extrinsic
import Lang.L3.Typecheck
import Test.Tasty
import Test.Tasty.QuickCheck as QC
propertyTests :: TestTree
propertyTests = testGroup "L3 Property tests" ... | null | https://raw.githubusercontent.com/wjrforcyber/SystemT/0b402e5a9a335e28e8a19ba0274f1b8e40c08eaf/tests/Lang/L3/Tests.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Lang.L3.Tests (propertyTests) where
import Data.Maybe
import qualified Lang.L3.Eval.EEval as E
import Lang.L3.Syntax.Extrinsic
import Lang.L3.Typecheck
import Test.Tasty
import Test.Tasty.QuickCheck as QC
propertyTests :: TestTree
propertyTests = testGroup "L3 Property tests" ... | |
a8df1d6c08dda5750fa618735f8d731bf841b17caf414b5817c507926b5f14fa | facebook/pyre-check | typeVariableTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/518f5ef44d7079c68b273ff8bcbfd4a8bdd985d6/source/analysis/test/integration/typeVariableTest.ml | ocaml | Test strict mode bounds with explicit Any types
Type variables in the nesting function is correctly captured
Type variables in the parent class is correctly captured
Type variables in the parent class of nesting function is correctly captured
Correctly mark the boundness of nested function type variables when ... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
f698bd28715e58228f09487a706c421c063eb46bdb7c4f13ba00997568946057 | janestreet/memtrace_viewer_with_deps | ascii_table_kernel.ml | open! Core_kernel
open! Import
include Ascii_table_kernel_intf
module Align = Column.Align
module Attr = Attr
module Column = Column
module Table_char = Table_char
module Display = struct
type t = Grid.Display.t =
| Short_box
| Tall_box
| Line
| Blank
| Column_titles
[@@deriving compare, sexp_o... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/textutils/ascii_table/kernel/ascii_table_kernel.ml | ocaml | [Screen] is mostly private stuff, so we explicitly export the public bits instead of
saying [Private] everywhere. | open! Core_kernel
open! Import
include Ascii_table_kernel_intf
module Align = Column.Align
module Attr = Attr
module Column = Column
module Table_char = Table_char
module Display = struct
type t = Grid.Display.t =
| Short_box
| Tall_box
| Line
| Blank
| Column_titles
[@@deriving compare, sexp_o... |
6d4c21edec4a347b9186678e9407018673eade12e80456806e0e97c7ca423039 | tolitius/mount | printing.cljc | (ns mount.test.printing
(:require
#?@(:cljs [[cljs.test :as t :refer-macros [is are deftest testing use-fixtures]]
[mount.core :as mount :refer-macros [defstate]]]
:clj [[clojure.test :as t :refer [is are deftest testing use-fixtures]]
[mount.core :as mount :refer [defstate]]]))... | null | https://raw.githubusercontent.com/tolitius/mount/c85da6149ceab96c903c1574106ec56f78338b5f/test/core/mount/test/printing.cljc | clojure | Test that printing an unstarted DerefableState does not have the
side-effect of starting it | (ns mount.test.printing
(:require
#?@(:cljs [[cljs.test :as t :refer-macros [is are deftest testing use-fixtures]]
[mount.core :as mount :refer-macros [defstate]]]
:clj [[clojure.test :as t :refer [is are deftest testing use-fixtures]]
[mount.core :as mount :refer [defstate]]]))... |
cb669dda9868f3b6ff8b0c74ec0aa0ab08636736a69045c0f9aee77260c5601c | rescript-lang/rescript-compiler | lam_compile_external_call.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of ReScript
* 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 , either version 3 of the... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/7b206bf06c0f3c267017898aaa0ba1ef5f310cca/jscomp/core/lam_compile_external_call.ml | ocaml | *
[bind_name] is a hint to the compiler to generate
better names for external module
leave up later to decide
FIXME: encode invariant below in the signature
can not be Optional
FIXME: the order of effects?
FIXME: the order of effects?
TODO: what happens when scope contains "default" ?
no [@@module... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of ReScript
* 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 , either version 3 of the... |
6bdbc01e9603401382229bbc09a560d71390c26fc0f84bf7c615b7c9dad2b4db | markcox80/lisp-executable | test-creation.lisp | Copyright ( c ) 2011 ,
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;; - Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the fo... | null | https://raw.githubusercontent.com/markcox80/lisp-executable/989b68ed946e1d99e6e65b7383a64ff035e833c7/tests/test-creation.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in... | Copyright ( c ) 2011 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(in-package "LIS... |
bb0d8d01a7529a401b273abfeaefb4dc85dcae4917e3690e5b5c7ec80553c4d3 | wagjo/hangman | words.clj | Copyright ( C ) 2012 , .
;;
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0
;; (-1.0.php) which can be found
;; in the file epl-v10.html at the root of this distribution.
;;
;; By using this software in any fashion, you are agreeing to be bound
;; by the terms of ... | null | https://raw.githubusercontent.com/wagjo/hangman/6abab88feb593c2ee3629f0047fbabb844caf194/src/hangman/words.clj | clojure |
The use and distribution terms for this software are covered by the
(-1.0.php) which can be found
in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound
by the terms of this license.
You must not remove this notice, or any other, from this... | Copyright ( C ) 2012 , .
Eclipse Public License 1.0
(ns hangman.words
(:require [hangman.util :as util]
[incanter.core :as incanter]
[incanter.charts :as charts]
[clojure.java.io :as jio]))
For Hangman , we need a list of words to guess .
STEP 1 : Where is the list of ... |
5b8e2271dd4a530cf66cf25afd9416be2a412a78d5a51d8db258c4f2f56b5544 | spwhitton/consfigurator | package.lisp | ;;; Consfigurator -- Lisp declarative configuration management system
Copyright ( C ) 2021 < >
;;; 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 , or ( at your option )
;... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/3019bfea87ab6df33845f3bf7f7df03a33a5970d/src/property/package.lisp | lisp | Consfigurator -- Lisp declarative configuration management system
This file is free software; you can redistribute it and/or modify
either version 3 , or ( 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 o... |
Copyright ( C ) 2021 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :consfigurator.property.package)
(named-readtables:in-readtable :consfigurator)
(define-constant +consfigurator-system-dependencies... |
b20640d16a0676b69bca8ad5c4cbeec60cd42a89f75b2e44c3945474ebee0b17 | project-oak/hafnium-verification | PulseAbstractValue.ml |
* 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/pulse/PulseAbstractValue.ml | 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
... | |
ba52a3cc66808d98000b439617f171f294f5a1b7c21fd0b2a746856382af4d1b | DrTom/clj-pg-types | all.clj | (ns pg-types.all
(:require
[pg-types.read-column.array]
[pg-types.read-column.json]
[pg-types.read-column.timestamp.java-time]
[pg-types.read-column]
[pg-types.sql-parameter.array]
[pg-types.sql-parameter.json]
[pg-types.sql-parameter.timestamp]
[pg-types.sql-parameter.uuid]
[pg-ty... | null | https://raw.githubusercontent.com/DrTom/clj-pg-types/d847735c46b2da173fd50a6ebe492bead0d75dd5/src/pg_types/all.clj | clojure | (ns pg-types.all
(:require
[pg-types.read-column.array]
[pg-types.read-column.json]
[pg-types.read-column.timestamp.java-time]
[pg-types.read-column]
[pg-types.sql-parameter.array]
[pg-types.sql-parameter.json]
[pg-types.sql-parameter.timestamp]
[pg-types.sql-parameter.uuid]
[pg-ty... | |
0bca48847854be2ea6cb9b13d86fa66c89f7ef39549e0c4c3e7bd0efbab4f48c | manavpatnaik/haskell | 17_largest_of_two_nums.hs | largestOfTwoNums :: (Ord a) => a -> a -> a
largestOfTwoNums a b
| (a >= b) = a
| otherwise = b
main = do
print(largestOfTwoNums 2 2)
print(largestOfTwoNums 2 4)
print(largestOfTwoNums 21 4) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/af45c3eb5c3461aa77cf25610dfcb3b41c7f7ef9/practice-set-1-basics/17_largest_of_two_nums.hs | haskell | largestOfTwoNums :: (Ord a) => a -> a -> a
largestOfTwoNums a b
| (a >= b) = a
| otherwise = b
main = do
print(largestOfTwoNums 2 2)
print(largestOfTwoNums 2 4)
print(largestOfTwoNums 21 4) | |
3a85298f28409fc6bba73b6dae92d23d274f631f28c8686d3c665bac800152ff | ltoth/unison | transfer.mli | Unison file synchronizer : src / transfer.mli
Copyright 1999 - 2010 , ( see COPYING for details )
Rsync : general algorithm description
The rsync algorithm is a technique for reducing the cost of a file
transfer by avoiding the transfer of blocks that are already at the
destination .
... | null | https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/transfer.mli | ocaml | Transfer instruction giving data to build a file incrementally
***********************************************************************
GENERIC TRANSMISSION
***********************************************************************
Send the whole source file encoded in ... | Unison file synchronizer : src / transfer.mli
Copyright 1999 - 2010 , ( see COPYING for details )
Rsync : general algorithm description
The rsync algorithm is a technique for reducing the cost of a file
transfer by avoiding the transfer of blocks that are already at the
destination .
... |
3d2c612bfed73f3953605fdf2e20680c03f0fc5d43c6fe32cc030c3467255172 | xh4/web-toolkit | box.lisp | (in-package :css-test)
(in-suite :css-test)
(test margin
(margin-top "1px")
(margin-right "1px")
(margin-bottom "1px")
(margin-left "1px")
(margin "1px")
(margin "1px 2px")
(margin "1px 2px 3px")
(margin "1px 2px 3px 4px"))
(test padding
(padding-top "1px")
(padding-right "1px")
(padding-bottom... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/css/box.lisp | lisp | (in-package :css-test)
(in-suite :css-test)
(test margin
(margin-top "1px")
(margin-right "1px")
(margin-bottom "1px")
(margin-left "1px")
(margin "1px")
(margin "1px 2px")
(margin "1px 2px 3px")
(margin "1px 2px 3px 4px"))
(test padding
(padding-top "1px")
(padding-right "1px")
(padding-bottom... | |
bed2eaeb698b0dd2bd34f81cad04a158a839c21072c3ef44ea7bd7ee84ae1719 | mzp/coq-ruby | uoptions.mli | (**************************************************************************)
(* Cameleon *)
(* *)
Copyright ( C ) 2002 Institut National de Recherche en Informatique et
(* ... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/ide/utils/uoptions.mli | ocaml | ************************************************************************
Cameleon
en Automatique. All rights reserved.
... | Copyright ( C ) 2002 Institut National de Recherche en Informatique et
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU General Public License
al... |
956ad0c7874ddcd4eec1a65292c6a92d44c19634c81c2dfec7350070111f961d | racket/typed-racket | tc-apply.rkt | #lang racket/unit
(require racket/match racket/list
"signatures.rkt"
"tc-app-helper.rkt"
"../types/utils.rkt"
"../types/abbrev.rkt"
"../types/substitute.rkt"
"../types/type-table.rkt"
"../utils/tc-utils.rkt"
"tc-funapp.rkt"
"../rep/type-r... | null | https://raw.githubusercontent.com/racket/typed-racket/8b7bd594c66e53beba3d2568ca5ecb28f61c6d96/typed-racket-lib/typed-racket/typecheck/tc-apply.rkt | racket | Raises an error message for the case that the arguments do not match any of the domains
apply of a simple function or polymorphic function
Takes a possible substitution and computes
the substituted range type if it is not #f | #lang racket/unit
(require racket/match racket/list
"signatures.rkt"
"tc-app-helper.rkt"
"../types/utils.rkt"
"../types/abbrev.rkt"
"../types/substitute.rkt"
"../types/type-table.rkt"
"../utils/tc-utils.rkt"
"tc-funapp.rkt"
"../rep/type-r... |
78e7b08b2e4f51a46d0b7b15c82a8d5c9dc55cf165b109f2b3bc8e80f568b802 | ocurrent/ocaml-ci | analyse_ocamlformat.mli | (** Detect the required version of ocamlformat used in a source repository. *)
type source =
| Opam of { version : string; opam_repo_commit : string }
* Should install OCamlformat from Opam .
| Vendored of { path : string }
* OCamlformat is vendored . [ path ] is relative to the project 's root .
[@@deriving yojso... | null | https://raw.githubusercontent.com/ocurrent/ocaml-ci/bac90619e2404a4761e8dcd95fe87b64489f7739/lib/analyse_ocamlformat.mli | ocaml | * Detect the required version of ocamlformat used in a source repository.
* Pretty print [source]. |
type source =
| Opam of { version : string; opam_repo_commit : string }
* Should install OCamlformat from Opam .
| Vendored of { path : string }
* OCamlformat is vendored . [ path ] is relative to the project 's root .
[@@deriving yojson, eq, ord]
val pp_source : source Fmt.t
val get_ocamlformat_source :
Curre... |
e4b9968cfd20429ec8fa48739cb676e0d55047f9ab448279da2fa0e6c8bfa617 | mks-m/wower | realm_helper.erl | -module(realm_helper).
-export([chars/2,
number_of_chars/2,
realms/0]).
-import(common_helper, [do/1]).
-include("database_records.hrl").
-include_lib("stdlib/include/qlc.hrl").
number_of_chars(int ( ) , int ( ) ) - > int ( ) .
number_of_chars(AccId, RealmId) ->
length(chars(AccId, RealmId)).... | null | https://raw.githubusercontent.com/mks-m/wower/ce9724876cf57b67ce72f2a9a6f74bb1ebffd53a/realm/src/realm_helper.erl | erlang | -module(realm_helper).
-export([chars/2,
number_of_chars/2,
realms/0]).
-import(common_helper, [do/1]).
-include("database_records.hrl").
-include_lib("stdlib/include/qlc.hrl").
number_of_chars(int ( ) , int ( ) ) - > int ( ) .
number_of_chars(AccId, RealmId) ->
length(chars(AccId, RealmId)).... | |
a4524bc256c85a29d2daae191a35f53e3ffab4135432b1583f048fee6e4579e3 | alyssa-p-hacker/SchemeBBS | bbs.scm | (load-option 'format)
(load "lib/utils")
(load "deps/irregex")
(load "deps/srfi-26")
(load "deps/httpio")
(load "deps/server")
(load "lib/html")
(load "lib/parameters")
(load "lib/markup")
(load "templates")
(define *sexp* "data/sexp")
(define *html* "data/html")
(define *frontpage-threads* 10)
(define *max-headline-s... | null | https://raw.githubusercontent.com/alyssa-p-hacker/SchemeBBS/7a5506e7fad22472e1e94671b4fabfce6432199a/bbs.scm | scheme | helpers
static files
(pp ip)
(pp headers)
(pp (http-header 'host headers #f))
errors
views
controllers GET
we shouldn't go here, reverse proxy fetches the page itself
we shouldn't go there with a reverse proxy
(make-response (list-template board threads))))
controllers POST | (load-option 'format)
(load "lib/utils")
(load "deps/irregex")
(load "deps/srfi-26")
(load "deps/httpio")
(load "deps/server")
(load "lib/html")
(load "lib/parameters")
(load "lib/markup")
(load "templates")
(define *sexp* "data/sexp")
(define *html* "data/html")
(define *frontpage-threads* 10)
(define *max-headline-s... |
a3bb9611e242a3d6ecef90e1622d033aab16920d1554aa24284a707c4ac2671e | returntocorp/semgrep | graph_code_prolog.mli | type context =
| NoCtx
| CallCtx of Graph_code.node
| AssignCtx of Graph_code.node
val hook_use_edge_for_prolog :
context ->
bool ->
Graph_code.node * Graph_code.node ->
Graph_code.t ->
Parse_info.token_location ->
unit
val build : Graph_code.t -> Prolog_code.fact list
| null | https://raw.githubusercontent.com/returntocorp/semgrep/855abad9ada6ea5fd72d437fd69ff2e5fa42c1f1/libs/graph_code/graph_code_prolog.mli | ocaml | type context =
| NoCtx
| CallCtx of Graph_code.node
| AssignCtx of Graph_code.node
val hook_use_edge_for_prolog :
context ->
bool ->
Graph_code.node * Graph_code.node ->
Graph_code.t ->
Parse_info.token_location ->
unit
val build : Graph_code.t -> Prolog_code.fact list
| |
83d844c0a1fdf977b25a017f7c5cd47a1d5dc12d6e48e8b4b64bacba5677ab1e | AHartNtkn/IotaTT | TypeChecker.hs | module TypeChecker where
import qualified Data.Map.Strict as Map
import Control.Monad.Reader hiding (liftIO)
import Control.Monad.State hiding (liftIO)
import Control.Monad.Except hiding (liftIO)
import Control.Monad.Trans.Except hiding (liftIO)
import AbstractSyntax
import PrettyPrinting
infer :: ATerm -> Proof ATe... | null | https://raw.githubusercontent.com/AHartNtkn/IotaTT/ada8e4b5aa7b525463369b56591ddc58dca91b4d/TypeChecker.hs | haskell | Note: this isn't used, x just needs some type.
Note: this isn't used, unquote ty just needs some type.
Note: this isn't used, unquote ty just needs to be a.
Note: this isn't used, unquote ty just needs some type.
Note: this isn't used, ty just needs some type.
Note: this isn't used, ty just needs some type.
Note... | module TypeChecker where
import qualified Data.Map.Strict as Map
import Control.Monad.Reader hiding (liftIO)
import Control.Monad.State hiding (liftIO)
import Control.Monad.Except hiding (liftIO)
import Control.Monad.Trans.Except hiding (liftIO)
import AbstractSyntax
import PrettyPrinting
infer :: ATerm -> Proof ATe... |
5222ca2920d4628df62186c83c6b22c610dd2f9543bb31692ff5ebe2aea50eb5 | scrintal/heroicons-reagent | hand_thumb_down.cljs | (ns com.scrintal.heroicons.mini.hand-thumb-down)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M18.905 12.75a1.25 1.25 0 01-2.5 0v-7.5a1.25 1.25 0 112.5 0v7.5zM8.905 17v1.3c0 .268-.14.526-.395.607A2 2 0 015.9... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/hand_thumb_down.cljs | clojure | (ns com.scrintal.heroicons.mini.hand-thumb-down)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M18.905 12.75a1.25 1.25 0 01-2.5 0v-7.5a1.25 1.25 0 112.5 0v7.5zM8.905 17v1.3c0 .268-.14.526-.395.607A2 2 0 015.9... | |
31cc6df863c048ccdc58ef916a391f3ff283f16ea852954678540a26adec1786 | jrm-code-project/LISP-Machine | fasupd.lisp | ;; -*-Mode:LISP; Package:ZWEI; Base:8 -*-
(DEFCOM COM-FASL-UPDATE
"Update the fasl file of the file you are visiting.
Uses the function definitions present in the environment,
offering to compile them if they have changed.
Note that DECLAREs and EVAL-WHEN (COMPILE)s will be ignored!" ()
(LET ((BUFFER ... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/zwei/fasupd.lisp | lisp | -*-Mode:LISP; Package:ZWEI; Base:8 -*-
Default is current buffer.
We assume that the user has compiled all the functions he has changed.
We don't actually do any compilation or evaluation of the buffer,
though we do expand the macros.
Normally, we read each form from the buffer and process it.
function name, whic... |
(DEFCOM COM-FASL-UPDATE
"Update the fasl file of the file you are visiting.
Uses the function definitions present in the environment,
offering to compile them if they have changed.
Note that DECLAREs and EVAL-WHEN (COMPILE)s will be ignored!" ()
(LET ((BUFFER (READ-BUFFER-NAME "Update fasl file of buf... |
f3c032bd68d84563554bbfe868a5942fa7101f804315e906dd24f80469fae075 | aligusnet/mltool | GradientDescent.hs | |
Module : MachineLearning . Optimization . GradientDescent
Description : Gradient Descent
Copyright : ( c ) , 2016
License : BSD-3
Stability : experimental
Portability : POSIX
Module: MachineLearning.Optimization.GradientDescent
Description: Gradient Descent
Copyright: (c) Alexander Ignatyev, 2016
Lic... | null | https://raw.githubusercontent.com/aligusnet/mltool/92d74c4cc79221bfdcfb76aa058a2e8992ecfe2b/src/MachineLearning/Optimization/GradientDescent.hs | haskell | | Gradient Descent method implementation. See "MachineLearning.Regression" for usage details. | |
Module : MachineLearning . Optimization . GradientDescent
Description : Gradient Descent
Copyright : ( c ) , 2016
License : BSD-3
Stability : experimental
Portability : POSIX
Module: MachineLearning.Optimization.GradientDescent
Description: Gradient Descent
Copyright: (c) Alexander Ignatyev, 2016
Lic... |
2da83a52081c1055a37447070c4d68cdbefcfa50976fdecde88eda8bfceb842e | processone/ejabberd | ejabberd_auth_mnesia.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_auth_mnesia.erl
Author : < >
%%% Purpose : Authentication via mnesia
Created : 12 Dec 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can red... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/ejabberd_auth_mnesia.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_auth_mnesia.erl
Purpose : Authentication via mnesia
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be use... | Author : < >
Created : 12 Dec 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
8b0b2be4d383ae9333b1736963f9f22c430eaacb409a3ffc4551160b9ddb99ac | finnishtransportagency/harja | indeksit_test.clj | (ns harja.palvelin.palvelut.indeksit-test
(:require [clojure.test :refer :all]
[taoensso.timbre :as log]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.indeksit :refer :all]
[harja.testi :refer :all]
[com.stuartsierra.compone... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/c57d742beaff2bef7b30318819f07d4a13423404/test/clj/harja/palvelin/palvelut/indeksit_test.clj | clojure | HAR-4035 bugin verifiointi
")))]
CLJ-indeksikorjaus
SQL-indeksikorjaus | (ns harja.palvelin.palvelut.indeksit-test
(:require [clojure.test :refer :all]
[taoensso.timbre :as log]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.indeksit :refer :all]
[harja.testi :refer :all]
[com.stuartsierra.compone... |
e0247af5a85470c2b3b16c79327a1ce26044bd7043f28b9ec95a358dcd3a9f3a | lisp/de.setf.thrift | DenseLinkingTest-types.lisp | ;;; -*- Package: thrift-generated -*-
;;;
Autogenerated by Thrift
;;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
(def-package :thrift-generated)
(thrift:def-struct "oneofeachzz"
(("im_true" nil :type bool :id 1)
("im_false" nil :type bool :id 2)
("a_bite" nil :type byte :id 3)
("in... | null | https://raw.githubusercontent.com/lisp/de.setf.thrift/32b0d1ca3d9fa95327165b8090e1021bc563ed3e/test/gen-cl/DenseLinkingTest-types.lisp | lisp | -*- Package: thrift-generated -*-
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | Autogenerated by Thrift
(def-package :thrift-generated)
(thrift:def-struct "oneofeachzz"
(("im_true" nil :type bool :id 1)
("im_false" nil :type bool :id 2)
("a_bite" nil :type byte :id 3)
("integer16" nil :type i16 :id 4)
("integer32" nil :type i32 :id 5)
("integer64" nil :type i64 :id 6)
("dou... |
b11b1788dcc27961f702dc847164eb15b3cb1e3480e752356193bb6ca1f0f088 | erlang/erlide_kernel | erlide_log.erl | %%% ******************************************************************************
Copyright ( c ) 2008 and others .
%%% 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 avai... | null | https://raw.githubusercontent.com/erlang/erlide_kernel/763a7fe47213f374b59862fd5a17d5dcc2811c7b/common/apps/erlide_common/src/erlide_log.erl | erlang | ******************************************************************************
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:
************************... | Copyright ( c ) 2008 and others .
-v10.html
Author :
-module(erlide_log).
-export([log/1, logp/1, logp/2, log/2, erlangLog/4, erlangLogStack/4]).
-define(DEFAULT_LEVEL, info).
log(Msg) ->
log(?DEFAULT_LEVEL, Msg).
logp(Msg) ->
logp("~p", [Msg]).
logp(Fmt, Msgs) when is_list(Fmt), ... |
2de8f5a29dd813ff5e0f03d78e26a036526d13ec7d20267c399ac09777d95c2a | shimmering-void/sketches | project.clj | (defproject sketches "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.7.1"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.773"]]
:source-paths ["src"]
... | null | https://raw.githubusercontent.com/shimmering-void/sketches/84d29636a798720e8db3379c21814fe9f92686fd/project.clj | clojure | need to add the compiled assets to the :clean-targets | (defproject sketches "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.7.1"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.773"]]
:source-paths ["src"]
... |
80b60e8a32a3f0cbb337d40cd3c9eb33d98d74625e61eee7124ca843ead08c1c | bradrn/brassica | MDF.hs | # LANGUAGE BlockArguments #
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
| This module contains types and functions for working with the MDF
dictionary format , used by programs such as [ SIL Toolbox]( / toolbox/ ) .
For more on the MDF format , refer to e.g.
[ Coward & ... | null | https://raw.githubusercontent.com/bradrn/brassica/6be84287fe3c3027493d47064d0a6bbba04b0ef8/src/Brassica/MDF.hs | haskell | * MDF files
* Parsing
** Re-export
* Conversion
| An MDF (Multi-Dictionary Formatter) file, represented as a list
of (field marker, whitespace, field value) tuples. The field marker
is represented excluding its initial slash; whitespace after the
field marker is also stored, allowing the original MDF fil... | # LANGUAGE BlockArguments #
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
| This module contains types and functions for working with the MDF
dictionary format , used by programs such as [ SIL Toolbox]( / toolbox/ ) .
For more on the MDF format , refer to e.g.
[ Coward & ... |
151b84492806469eb9c13c83ab3b270c2cb5d1b4aac353d583d94c99d6e328a0 | geneweb/geneweb | checkItem.mli | $ I d : checkItem.mli , v 1.12 2007 - 09 - 05 13:19:25
Copyright ( c ) 2006 - 2007 INRIA
open Gwdb
type base_error = person Def.error
(** Database specification error *)
type base_warning =
(iper, person, ifam, family, title, pers_event, fam_event) Def.warning
(** Database specification warning *)
(* *)
ty... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/checkItem.mli | ocaml | * Database specification error
* Database specification warning
* [person onchange base warn p] checks person's properties:
- personal events
- person's age
- person's titles dates
- etc.
If [onchange] is set then sort person's events
Calls [warn] on corresponding [base_warning] when find s... | $ I d : checkItem.mli , v 1.12 2007 - 09 - 05 13:19:25
Copyright ( c ) 2006 - 2007 INRIA
open Gwdb
type base_error = person Def.error
type base_warning =
(iper, person, ifam, family, title, pers_event, fam_event) Def.warning
type base_misc = (person, family, title) Def.misc
val check_siblings :
?onchang... |
814435157cdc577093b507574c76e74b69dcb72b726aa1e6be1d3dc1996b982f | rd--/hsc3 | integrator.help.hs | -- integrator
let x = mouseX kr 0.001 0.999 Exponential 0.2
o = lfPulse ar 300 0.2 0.1 * 0.1
in integrator o x
-- integrator ; used as an envelope
let i = lfPulse ar 3 0.2 0.0004
o = sinOsc ar 700 0 * 0.1
in integrator i 0.999 * o
-- integrator ; scope
let x = mouseX kr 0.01 0.999 Exponential 0.2
o = lfPu... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/integrator.help.hs | haskell | integrator
integrator ; used as an envelope
integrator ; scope
integrator ; a triangle wave is the integration of square wave
-- ; drawings | let x = mouseX kr 0.001 0.999 Exponential 0.2
o = lfPulse ar 300 0.2 0.1 * 0.1
in integrator o x
let i = lfPulse ar 3 0.2 0.0004
o = sinOsc ar 700 0 * 0.1
in integrator i 0.999 * o
let x = mouseX kr 0.01 0.999 Exponential 0.2
o = lfPulse ar (1500 / 4) 0.2 0.1
in integrator o x * 0.1
let f = mouseX kr 440... |
a4f197cb655b25b5cc4944ba7a5b9c1eb50f7f67b7b51ee776442ca9349f32c4 | shenxs/about-scheme | 16.5.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |16.5|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "... | null | https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/16.5.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |16.5|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "abst... |
9fa96737aa1154a2a38f8419ec6e711ccb89235cdcc5015d06c8eefecbe5cde6 | blindglobe/clocc | cmd-frame.lisp | -*- Mode : Lisp ; Package : CLIO - OPEN ; ; Lowercase : T ; Syntax : Common - Lisp -*-
;;;----------------------------------------------------------------------------------+
;;; |
;;; TEXAS INSTRUMENTS INCORPO... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clue/clio/examples/cmd-frame.lisp | lisp | Package : CLIO - OPEN ; ; Lowercase : T ; Syntax : Common - Lisp -*-
----------------------------------------------------------------------------------+
|
TEXAS INSTRUMENTS INCORPORATED ... |
, TEXAS 78714 - 9149 |
Copyright ( C ) 1989 , 1990 Texas Instruments Incorporated . |
Texas Instruments Incorporated provides this software " as is " without express or |
(in-package "CLIO-OPEN")
(export '(
command-frame
... |
024bc580d893d26d9f412bbfa1931dea08e960da0d6c1878277d3ecf219ed2c8 | GaloisInc/daedalus | JSON.hs | module Daedalus.RTS.JSON
( JSON
, jsonToBytes
, jsNull
, jsText
, jsString
, jsArray
, jsObject
, jsTagged
, ToJSON(..)
) where
import Data.ByteString(ByteString)
import Data.ByteString.Short(fromShort,ShortByteString)
import Data.Text(Text)
import qualified Data.Text as Text
import qualified Data.... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/3f180d29441960e35386654ec79a2b205bddc157/rts-hs-data/src/Daedalus/RTS/JSON.hs | haskell | | A shortcur for a common encoding of sum types
"
\ | module Daedalus.RTS.JSON
( JSON
, jsonToBytes
, jsNull
, jsText
, jsString
, jsArray
, jsObject
, jsTagged
, ToJSON(..)
) where
import Data.ByteString(ByteString)
import Data.ByteString.Short(fromShort,ShortByteString)
import Data.Text(Text)
import qualified Data.Text as Text
import qualified Data.... |
fa35fd3f0a2aa7f11725b7bf310a1c29c9e8754c6d05e04e5663ae54e58d0e21 | shayan-najd/NativeMetaprogramming | T11120.hs | # LANGUAGE TypeInType , MagicHash , DataKinds #
-- See also TypeOf.hs
import GHC.Prim
import Data.Typeable
data CharHash = CharHash Char#
main :: IO ()
main = print $ typeRep (Proxy :: Proxy 'CharHash)
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_run/T11120.hs | haskell | See also TypeOf.hs | # LANGUAGE TypeInType , MagicHash , DataKinds #
import GHC.Prim
import Data.Typeable
data CharHash = CharHash Char#
main :: IO ()
main = print $ typeRep (Proxy :: Proxy 'CharHash)
|
10016e680e8c679bdb5c3eda0a7a2f2146eae86f8b3a454f60870402deffb6ab | dongcarl/guix | hg-download.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 , 2016 , 2017 , 2019 < >
Copyright © 2016 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public Licen... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/guix/hg-download.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 , 2015 , 2016 , 2017 , 2019 < >
Copyright © 2016 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix hg-download)
... |
8babb01d2daf5c9ffdc82473b1c46cc6bb327901d56e7f5b5e8b39e1230368bc | wardle/nhspd | postcode.clj | (ns com.eldrix.nhspd.postcode
"UK postcode normalization and formatting."
(:require
[clojure.string :as str]))
(defn normalize
"Normalizes a postcode into uppercase 8-characters with left-aligned outward
code and right-aligned inward code returning the original if normalization
not possible.
This is th... | null | https://raw.githubusercontent.com/wardle/nhspd/b3487b10e538a88b7d27f3e81ed9c62bbb62b312/src/com/eldrix/nhspd/postcode.clj | clojure | (ns com.eldrix.nhspd.postcode
"UK postcode normalization and formatting."
(:require
[clojure.string :as str]))
(defn normalize
"Normalizes a postcode into uppercase 8-characters with left-aligned outward
code and right-aligned inward code returning the original if normalization
not possible.
This is th... | |
8eead4527988a1fac65f9bd2bb683885556d2b45e2412d65f86a81ae82fe7980 | bcc32/projecteuler-ocaml | sol_062.ml | open! Core
open! Import
module Digit_set : sig
type t [@@deriving compare, hash, sexp_of]
val of_int : int -> t
end = struct
type t = int list [@@deriving compare, hash, sexp_of]
let of_int int =
Number_theory.Int.As_base10.to_list int |> List.sort ~compare:Int.compare
;;
end
let find min_permutations... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/e47a58cb8d6a448be8907b1fef2b4d1988fb4c87/sol/sol_062.ml | ocaml | open! Core
open! Import
module Digit_set : sig
type t [@@deriving compare, hash, sexp_of]
val of_int : int -> t
end = struct
type t = int list [@@deriving compare, hash, sexp_of]
let of_int int =
Number_theory.Int.As_base10.to_list int |> List.sort ~compare:Int.compare
;;
end
let find min_permutations... | |
5d1a86f79c9d12df82085991f72ddeaab76514a11e545822fd92a89084c560cd | modular-macros/ocaml-macros | prodcons.ml | Classic producer - consumer
type 'a prodcons =
{ buffer: 'a array;
lock: Mutex.t;
mutable readpos: int;
mutable writepos: int;
notempty: Condition.t;
notfull: Condition.t }
let create size init =
{ buffer = Array.make size init;
lock = Mutex.create();
readpos = 0;
writepos = 0;
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/lib-threads/prodcons.ml | ocaml | Test | Classic producer - consumer
type 'a prodcons =
{ buffer: 'a array;
lock: Mutex.t;
mutable readpos: int;
mutable writepos: int;
notempty: Condition.t;
notfull: Condition.t }
let create size init =
{ buffer = Array.make size init;
lock = Mutex.create();
readpos = 0;
writepos = 0;
... |
3a31ba6ba92b7696af29301d03e05a2bd18c3c0195734c9b54861e698137401f | FreeProving/free-compiler | TypeDecl.hs | -- | This module contains the definition of data type and type synonym
-- declarations of our intermediate language.
module FreeC.IR.Syntax.TypeDecl where
import FreeC.IR.SrcSpan
import FreeC.IR.Syntax.Name
import FreeC.IR.Syntax.Type
import FreeC.IR.Syntax.TypeVarDecl
import ... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/IR/Syntax/TypeDecl.hs | haskell | | This module contains the definition of data type and type synonym
declarations of our intermediate language.
-----------------------------------------------------------------------------
Type Declarations --
-------------------------------------------------... | module FreeC.IR.Syntax.TypeDecl where
import FreeC.IR.SrcSpan
import FreeC.IR.Syntax.Name
import FreeC.IR.Syntax.Type
import FreeC.IR.Syntax.TypeVarDecl
import FreeC.Pretty
data TypeDecl
= DataDecl { typeDeclSrcSpan :: SrcSpan
, typeDeclIdent :: DeclI... |
c72355445368dcf5378d7bc9a2549ae2a9c7bfc321aa506cfbdd4fad3ea44a3b | logicblocks/salutem | project.clj | (defproject io.logicblocks/salutem.core "0.1.8-RC4"
:description "A health check library for sync / async health checks."
:parent-project {:path "../parent/project.clj"
:inherit [:scm
:url
:license
:plugins... | null | https://raw.githubusercontent.com/logicblocks/salutem/c648d9aeafc2cf38578b5e7e693994d2655fb5b8/core/project.clj | clojure | (defproject io.logicblocks/salutem.core "0.1.8-RC4"
:description "A health check library for sync / async health checks."
:parent-project {:path "../parent/project.clj"
:inherit [:scm
:url
:license
:plugins... | |
86ca6095b119783306adda248878c356a44714e4c30883e394e7b2acce648fbb | emqx/emqx-lwm2m | emqx_lwm2m_tlv.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the L... | null | https://raw.githubusercontent.com/emqx/emqx-lwm2m/6b02495beebe3b3596c75f730f4e64f3e92dd3a2/src/emqx_lwm2m_tlv.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_lwm2m_tlv).
-export([ parse/1
, encode/1
]).
-include("emqx_lwm2m.hrl").... |
9f084d39bee2a35bfd7df3b2280daba9ae170a9c2518a2b11bb5e7048d5609d3 | expede/rescue | Types.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | The 'RescueT' transformer
module Control.Monad.Trans.Rescue.Types
( RescueT (..)
, Rescue
... | null | https://raw.githubusercontent.com/expede/rescue/5f460a4cd9a01ac84e669a50711375c8f8dcba75/library/Control/Monad/Trans/Rescue/Types.hs | haskell | # LANGUAGE LambdaCase #
| The 'RescueT' transformer
| Add type-directed error handling abilities to a 'Monad'
absurd | # LANGUAGE ApplicativeDo #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Control.Monad.Trans.Rescue.Types
( RescueT (..)
, Rescue
, runRescue
) where
import Control.Monad.Base
import ... |
7ef5b4becd0f8755c3803232af148771e3251724f7d05dcfef93d3f8fba0edc3 | day8/re-frame | settings.cljc | (ns re-frame.settings
(:require
[re-frame.interop :as interop]
[re-frame.loggers :refer [console]]))
(def defaults
{:loaded? false
:global-interceptors interop/empty-queue})
(def store
(atom defaults))
(interop/on-load
#(swap! store (fn [m] (assoc m :loaded? true))))
(defn loaded?
[... | null | https://raw.githubusercontent.com/day8/re-frame/ecb756e66fe30efca896879369a420df1e271605/src/re_frame/settings.cljc | clojure | If the id already exists we replace it in-place to maintain the ordering of
global interceptors esp during hot-code reloading in development. | (ns re-frame.settings
(:require
[re-frame.interop :as interop]
[re-frame.loggers :refer [console]]))
(def defaults
{:loaded? false
:global-interceptors interop/empty-queue})
(def store
(atom defaults))
(interop/on-load
#(swap! store (fn [m] (assoc m :loaded? true))))
(defn loaded?
[... |
0de5397f7608201c54aa0f88f84c3d844119dc83ed4f7fbd63d17e22e8dfd676 | flyspeck/flyspeck | canon.ml | (* ========================================================================= *)
(* Reasonably efficient conversions for various canonical forms. *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/flyspeck/flyspeck/05bd66666b4b641f49e5131a37830f4881f39db9/azure/hol-light-nat/canon.ml | ocaml | =========================================================================
Reasonably efficient conversions for various canonical forms.
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
open Parser
include Trivia
let PRESIMP_CONV =
GEN_REWRITE_CONV TOP_DEPTH_CONV
[NOT_CLAUSES; AND_... |
dcf69fb016c04b923d93244f6741ead47827a05b3b64ed970a1b6ce688c3ec1e | isovector/containers-good-graph | Good.hs | # OPTIONS_GHC -Wall #
module Data.Graph.Good
( Graph
, graphFromEdges
, vertices
, edges
, outdegree
, indegree
, transposeG
, dfs
, dff
, topSort
, reverseTopSort
, components
, scc
, bcc
, reachable
, path
) where
import Control.Applicative (empty)
import Contro... | null | https://raw.githubusercontent.com/isovector/containers-good-graph/92281a6e841fc4679edf46cad8b011e0c2c7ff7f/src/Data/Graph/Good.hs | haskell | # OPTIONS_GHC -Wall #
module Data.Graph.Good
( Graph
, graphFromEdges
, vertices
, edges
, outdegree
, indegree
, transposeG
, dfs
, dff
, topSort
, reverseTopSort
, components
, scc
, bcc
, reachable
, path
) where
import Control.Applicative (empty)
import Contro... | |
ca48833ec20d2032b293644b0c1c6f070fbe8fc3a226096e8913bed5c2758c02 | simmsb/calamity | MiscRoutes.hs | -- | Miscellaneous routes
module Calamity.HTTP.MiscRoutes where
import Calamity.HTTP.Internal.Request
import Calamity.HTTP.Internal.Route
import Calamity.HTTP.Internal.Types
import Data.Function ((&))
data MiscRequest a where
GetGateway :: MiscRequest GatewayResponse
GetGatewayBot :: MiscRequest BotGatewayRespons... | null | https://raw.githubusercontent.com/simmsb/calamity/1cdcace44eab62c03350c055e2db045d8a902c2e/calamity/Calamity/HTTP/MiscRoutes.hs | haskell | | Miscellaneous routes | module Calamity.HTTP.MiscRoutes where
import Calamity.HTTP.Internal.Request
import Calamity.HTTP.Internal.Route
import Calamity.HTTP.Internal.Types
import Data.Function ((&))
data MiscRequest a where
GetGateway :: MiscRequest GatewayResponse
GetGatewayBot :: MiscRequest BotGatewayResponse
instance Request (MiscR... |
f72a569442f1229ce4161120c2b8934722c2375977b89cfd57594bcf24917f11 | cyga/real-world-haskell | BloomFilter.hs | file : ch26 / BloomFilter.hs
module BloomFilter
(
Bloom
, length
, elem
, notElem
, fromList
) where
import BloomFilter.Internal
import BloomFilter.Mutable (insert, new)
import Data.Array.ST (runSTUArray)
import Data.Array.IArray ((!), bounds)
import Data.Word (Word32)
import Prelude hi... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch26/BloomFilter.hs | haskell | family of hash functions to use
number of bits in filter
values to populate with | file : ch26 / BloomFilter.hs
module BloomFilter
(
Bloom
, length
, elem
, notElem
, fromList
) where
import BloomFilter.Internal
import BloomFilter.Mutable (insert, new)
import Data.Array.ST (runSTUArray)
import Data.Array.IArray ((!), bounds)
import Data.Word (Word32)
import Prelude hi... |
179ab665c62d68a3675b8170613785abc6f2dbb015c9f199d9c1e86303fd3837 | wiseman/orbital-detector | project.clj | (defproject com.lemondronor/orbital-detector "0.1.0-SNAPSHOT"
:description "Detect orbiting rotorcraft."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[clj-time "0.12.2"]
[com.lemondronor.leaflet-gorilla "0.1.3"]
[com.lemonodor/gf... | null | https://raw.githubusercontent.com/wiseman/orbital-detector/21a029f979caa24c5d1ceeeedd67b8c2ea26d6e1/project.clj | clojure | (defproject com.lemondronor/orbital-detector "0.1.0-SNAPSHOT"
:description "Detect orbiting rotorcraft."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[clj-time "0.12.2"]
[com.lemondronor.leaflet-gorilla "0.1.3"]
[com.lemonodor/gf... | |
d4463ed39a8150effd86cf47c94c433b21114b51332a4ffdd06c479d61aceda8 | xray-tech/xorc-xray | pipeline.clj | (ns re.pipeline
"It specifies a control flow, where execution is running by propagating ctx
forth and back via pipeline. A pipeline consists of stages, each stage is a
map with keys :enter and/or :leave. ctx is a map with arbitrary keys.
:enter is a function of ctx which returns zero or more ctx for further st... | null | https://raw.githubusercontent.com/xray-tech/xorc-xray/ee1c841067207c5952473dc8fb1f0b7d237976cb/src/re/pipeline.clj | clojure | TODO tracing keys & spans | (ns re.pipeline
"It specifies a control flow, where execution is running by propagating ctx
forth and back via pipeline. A pipeline consists of stages, each stage is a
map with keys :enter and/or :leave. ctx is a map with arbitrary keys.
:enter is a function of ctx which returns zero or more ctx for further st... |
cdcd35e876ee37282de577293b9ad55404ef18ae8d89855b691684a3acd4b2a3 | jb55/elm-export-persistent | BackendKey.hs | -- |
-- Module : Elm.Export.Persist.Ent
Copyright : ( C ) 2016 - 17
License : MIT
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
-- Orphan instances needed for SQL keys
--
-- This is usually required, but optionally exported in case you have your own
-... | null | https://raw.githubusercontent.com/jb55/elm-export-persistent/eabb242caa79f8c779388bb5b66c044838835c4b/src/Elm/Export/Persist/BackendKey.hs | haskell | |
Module : Elm.Export.Persist.Ent
Stability : experimental
Portability : non-portable
Orphan instances needed for SQL keys
This is usually required, but optionally exported in case you have your own
already | Copyright : ( C ) 2016 - 17
License : MIT
Maintainer : < >
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
module Elm.Export.Persist.BackendKey () where
import GHC.Generics
import Elm
import Database.Persist
... |
4b3bdec4dee8968e2e55b74c4f29b268ad544a4f0c6fcd51c61e014bda395145 | philipcristiano/etsdb | etsdb_numbers.erl | -module(etsdb_numbers).
-export([to_float/1]).
to_float(X) when is_list(X)->
case string:to_float(X) of
{error, no_float} -> erlang:float(erlang:list_to_integer(X));
{Float, _Rest} -> Float
end;
to_float(X) when is_binary(X)->
to_float(erlang:binary_to_list(X)).
| null | https://raw.githubusercontent.com/philipcristiano/etsdb/f1c0d1d8baff8666d55a1f30e77a40652d173826/src/etsdb_numbers.erl | erlang | -module(etsdb_numbers).
-export([to_float/1]).
to_float(X) when is_list(X)->
case string:to_float(X) of
{error, no_float} -> erlang:float(erlang:list_to_integer(X));
{Float, _Rest} -> Float
end;
to_float(X) when is_binary(X)->
to_float(erlang:binary_to_list(X)).
| |
465ccd5eecfca369fb82652d01e7b3241b24a858e19c0c81e6999c3200f8964a | ChicagoBoss/ChicagoBoss | outgoing_mail_controller.erl | -module({{appid}}_outgoing_mail_controller).
-compile(export_all).
%% See -mail-controller.html for what should go in here
test_message(FromAddress, ToAddress, Subject) ->
Headers = [
{"Subject", Subject},
{"To", ToAddress},
{"From", FromAddress}
],
{ok, FromAddress, ToAddress, Hea... | null | https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/skel/src/mail/outgoing_mail_controller.erl | erlang | See -mail-controller.html for what should go in here | -module({{appid}}_outgoing_mail_controller).
-compile(export_all).
test_message(FromAddress, ToAddress, Subject) ->
Headers = [
{"Subject", Subject},
{"To", ToAddress},
{"From", FromAddress}
],
{ok, FromAddress, ToAddress, Headers, [{address, ToAddress}]}.
|
100caca45b1f167cec3e10b31c736fddeb157d23aafa7a865ca718dd3d34445a | haskell-distributed/distributed-process | Explicit.hs | # LANGUAGE ScopedTypeVariables
, MultiParamTypeClasses
, FlexibleInstances
, FunctionalDependencies
, FlexibleContexts
, UndecidableInstances
, , GADTs
, EmptyDataDecls
, DeriveDataTypeable #
, MultiParamTypeClasses
, FlexibleInstances
, FunctionalDependencies
, FlexibleContext... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process/ccc002c928d29335b5eb73be1d876007adaa0b53/src/Control/Distributed/Process/Internal/Closure/Explicit.hs | haskell | Static dictionaries and associated operations
| This takes an explicit name, a function of arity one, and creates a creates a function yielding a closure and a remote register for it.
| This takes an explict name, a function of any arity, and creates a function yielding a closure and a remote register for it.
| Wor... | # LANGUAGE ScopedTypeVariables
, MultiParamTypeClasses
, FlexibleInstances
, FunctionalDependencies
, FlexibleContexts
, UndecidableInstances
, , GADTs
, EmptyDataDecls
, DeriveDataTypeable #
, MultiParamTypeClasses
, FlexibleInstances
, FunctionalDependencies
, FlexibleContext... |
0cc7ebf8ff10f5103becd1b23130c4dda60e981b354b665f77d2371603930221 | AdaCore/why3 | stackify.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/plugins/cfg/stackify.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Why3
open Cfg_ast
type labeled_block = label * block
type usage = Multi | One
type exp_tree =
| S... |
ff9a69d58b3670d8dcfaa8cd0758993be33e1b4a35db46ddcf69ea8a97f3e0b5 | alex-hhh/ActivityLog2 | cp-test.rkt | #lang racket/base
;; cp-test.rkt -- test the critical power functionality
;;
;; This file is part of ActivityLog2 -- -hhh/ActivityLog2
Copyright ( c ) 2020 , 2022 < >
;;
;; 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 t... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/a021adbd16f015e53da89858c2c3af0357bfdca4/test/cp-test.rkt | racket | cp-test.rkt -- test the critical power functionality
This file is part of ActivityLog2 -- -hhh/ActivityLog2
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty of... | #lang racket/base
Copyright ( c ) 2020 , 2022 < >
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 )
You should have received a copy of the GNU General Public License along
(require al2-test-runner
... |
d7688fa572adeba171fcf1e486ffb0936127acefc3827383dd7cfa41ff1b9c17 | coq/coq | output.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/3dfa597540c0e4aa720c9af966f92b359a0c29f3/tools/coqdoc/output.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
02227b9cc8e77b7d7159e577957dee09da1fa91d95d2c16826981a830de427bb | deadpendency/deadpendency | PackagistAllSpec.hs | # OPTIONS_GHC -fno - warn - orphans #
module Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Packagist.PackagistAllSpec (spec) where
import Common.Model.Dependency.DependencyName
import Common.Model.Dependency.Registry.DependencyRegistryInfo
import DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFi... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/test/Effect/FetchRegistryRepoInfo/Backend/LanguageRegistryFiles/Packagist/PackagistAllSpec.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Packagist.PackagistAllSpec (spec) where
import Common.Model.Dependency.DependencyName
import Common.Model.Dependency.Registry.DependencyRegistryInfo
import DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFi... | |
5b550b5eccfb5815346e7dc6ee8cd62605e63358f337b32959421aea3926267a | dramforever/finlog | Type.hs | # LANGUAGE TemplateHaskell #
module Finlog.Frontend.Type where
import Control.Monad.Except
import Data.Foldable
import qualified Data.HashMap.Strict as HM
import Data.Maybe
import Finlog.Framework.DAG
import Finlog.Frontend.AST
import Finlog.Utils.Mark
import... | null | https://raw.githubusercontent.com/dramforever/finlog/ca642dfa7ea89b131ab13b6b267fabf317e12d9c/src/Finlog/Frontend/Type.hs | haskell | TODO: Simplify this | # LANGUAGE TemplateHaskell #
module Finlog.Frontend.Type where
import Control.Monad.Except
import Data.Foldable
import qualified Data.HashMap.Strict as HM
import Data.Maybe
import Finlog.Framework.DAG
import Finlog.Frontend.AST
import Finlog.Utils.Mark
import... |
e463cbd7d004491409279a6b4a93bf345106c551d191a492c995cec23e4a2926 | TorXakis/TorXakis | ModelDecl.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/txs-compiler/src/TorXakis/Parser/ModelDecl.hs | haskell | ------------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
| Parser for model declarations. |
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.
-}
Module : TorXakis . . ModelDe... |
f60667f0704df53bc637e1082234d0cd4cd146c59c7e6062c4bb62580e0b972c | basho/merge_index | mi_locks.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You... | null | https://raw.githubusercontent.com/basho/merge_index/b701dde5c28956c3b629411e5ff7e50cbb5cb4b3/src/mi_locks.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
f2989257a6a7f9a49299b2cc1eda1d42381b9c0321288fb7264a64c2de6bfc50 | hraberg/deuce | lists.clj | (ns deuce.test.lists
(:use [deuce.test.common]))
" 5 Lists"[1 ]
[ 1 ]
(with-fresh-emacs)
(repl predicates-on-lists
(listp '(1)) ⇒ true
(listp '()) ⇒ true
(null '(1)) ⇒ nil
(null '() ⇒ true))
(repl accessing-elements-on-lists
(car '(a b c)) ⇒ 'a
... | null | https://raw.githubusercontent.com/hraberg/deuce/9d507adb6c68c0f5c19ad79fa6ded9593c082575/test/deuce/test/lists.clj | clojure | (ns deuce.test.lists
(:use [deuce.test.common]))
" 5 Lists"[1 ]
[ 1 ]
(with-fresh-emacs)
(repl predicates-on-lists
(listp '(1)) ⇒ true
(listp '()) ⇒ true
(null '(1)) ⇒ nil
(null '() ⇒ true))
(repl accessing-elements-on-lists
(car '(a b c)) ⇒ 'a
... | |
de9208ca471fd9cbc2fd0425e03016f17a236e3ee064bb6edddf7a7c0d5f5008 | fulcro-legacy/semantic-ui-wrapper | ui_item.cljs | (ns fulcrologic.semantic-ui.views.item.ui-item
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/views/Item/Item" :default Item]))
(def ui-item
"An item view presents large collections of site content for display.
Props:
- as (custom): An element type to r... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/views/item/ui_item.cljs | clojure | (ns fulcrologic.semantic-ui.views.item.ui-item
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/views/Item/Item" :default Item]))
(def ui-item
"An item view presents large collections of site content for display.
Props:
- as (custom): An element type to r... | |
7b694afa865584aa0905494494809a058c527c4d8685df4cc9932da7b116450d | Soyn/sicp | Ex2.41.rkt | #lang racket
;----------Support Function--------------------------------------
(define (accumulate op initial sequence)
(if (null? sequence)
initial
( op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (enumerate-interval low high)
(if (> low high)
null
(cons lo... | null | https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.2/Ex2.41.rkt | racket | ----------Support Function--------------------------------------
生成序列(i, j),其中j < i < n
----------Support Function End-------------------------------------
------------Ex 2.41------------------------------------------------ | #lang racket
(define (accumulate op initial sequence)
(if (null? sequence)
initial
( op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (enumerate-interval low high)
(if (> low high)
null
(cons low (enumerate-interval (+ low 1) high))))
(define (flatmap proc se... |
5e02d32a537d1a183883e88e974eee1a962336aebe10a70c4c46ae8bfdd17459 | vlstill/hsExprTest | IO.hs | # LANGUAGE Safe , NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - orphans #
( c ) 2016 - 2018
module Test.Testable.IO (
* IO replacements
IO
, getLine
, getChar
, getContents
, interact
, readIO
, readLn
, putChar
, putStr
, putStrLn
, print
, readFile
, wri... | null | https://raw.githubusercontent.com/vlstill/hsExprTest/0c7754979cf837d48f5740674639e2decb96e547/testlib/Test/Testable/IO.hs | haskell | * running | # LANGUAGE Safe , NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - orphans #
( c ) 2016 - 2018
module Test.Testable.IO (
* IO replacements
IO
, getLine
, getChar
, getContents
, interact
, readIO
, readLn
, putChar
, putStr
, putStrLn
, print
, readFile
, wri... |
df9903eabaa127e3c93bad5038ae55c4af753479064de9219907c4acb6c0f777 | facebook/pyre-check | callGraph.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/3032acd2ffe3567defa05211bd6344cc7b7b10b1/source/interprocedural/callGraph.ml | ocaml | * Represents type information about the return type of a call.
Try to infer the return type from the callable type, otherwise lazily fallback
* to the resolved return type.
* A specific target of a given call, with extra information.
True if the call has an implicit receiver.
* For instance, `x.foo()` shou... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
8b867cfbe4cbe88d46d4d5c52fa344c4fdeeacaf757f00090a82e113b3be0308 | darrenldl/ProVerif-ATP | parser_components.mli | open MParser
type 'a stateless_p = ('a, unit) parser
val ignore_space : 'a stateless_p -> 'a stateless_p
val ident_p : string stateless_p
| null | https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/narrator/src/parser_components.mli | ocaml | open MParser
type 'a stateless_p = ('a, unit) parser
val ignore_space : 'a stateless_p -> 'a stateless_p
val ident_p : string stateless_p
| |
7c81b27df00a2ecb5135ccfdef7c6209b80ebc0d0e2041076268898d28f8026b | TheBestTvarynka/Lisp-SQL-Parser | table.lisp | ;;;; Simple table data structure.
Copyright ( c ) 2013 , All rights reserved ( see COPYING file for details ) .
(in-package :cl-simple-table)
(deftype row ()
"Table row type."
`(vector t *))
(deftype table ()
"Table type."
`(vector row *))
(defun make-table ()
"Creates a table."
(make-array 1 :eleme... | null | https://raw.githubusercontent.com/TheBestTvarynka/Lisp-SQL-Parser/d8f1283fc00e394d76e4ac28e434c99d1bee72aa/src/cl-simple-table-master/table.lisp | lisp | Simple table data structure. | Copyright ( c ) 2013 , All rights reserved ( see COPYING file for details ) .
(in-package :cl-simple-table)
(deftype row ()
"Table row type."
`(vector t *))
(deftype table ()
"Table type."
`(vector row *))
(defun make-table ()
"Creates a table."
(make-array 1 :element-type 'row :fill-pointer 0 :adju... |
1c05b1a2af440fe1db1b4369943f69e74c3514bd22b32f50d1a040949e916b61 | exoscale/clojure-kubernetes-client | v1_node.clj | (ns clojure-kubernetes-client.specs.v1-node
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1-node-spec :refer :all]
[clojure-kubernetes-client.specs.v1-nod... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_node.clj | clojure | (ns clojure-kubernetes-client.specs.v1-node
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1-node-spec :refer :all]
[clojure-kubernetes-client.specs.v1-nod... | |
6a39e278c7a33d989db77aa3b29558880196441f03284569a9b91cabc7d8efb9 | google/ormolu | bracket-declaration-out.hs | # LANGUAGE TemplateHaskell #
[d|data T a where Foo :: T ()|]
foo =
[d|
foo :: Int -> Char
bar = 42
|]
[d|
data T = T
deriving (Eq, Ord, Enum, Bounded, Show)
|]
$(do [d|baz = baz|])
$(singletons [d|data T = T deriving (Eq, Ord, Enum, Bounded, Show)|])
$( singletons
[d|
data T = T... | null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/splice/bracket-declaration-out.hs | haskell | # LANGUAGE TemplateHaskell #
[d|data T a where Foo :: T ()|]
foo =
[d|
foo :: Int -> Char
bar = 42
|]
[d|
data T = T
deriving (Eq, Ord, Enum, Bounded, Show)
|]
$(do [d|baz = baz|])
$(singletons [d|data T = T deriving (Eq, Ord, Enum, Bounded, Show)|])
$( singletons
[d|
data T = T... | |
76ecf8e09192e20596b517b3612fea34c8bfba6e89e0d9cd843c79783cffb1d0 | scalaris-team/scalaris | leases_proto_sched_SUITE.erl | 2010 - 2014 Zuse Institute Berlin
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
di... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/leases_proto_sched_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2010 - 2014 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(leases_proto_sched_SUITE).
-author('').
-vsn('$Id').
-compile(export_all).
-include("scalaris.hrl").
-incl... |
1a1bf427b5fe3408f2cd5a39c39d58deb4692d57f4a69d1986787ebb2a24b9be | colis-anr/morbig | morbigDriver.ml | (**************************************************************************)
(* -*- tuareg -*- *)
(* *)
Copyright ( C ) 2017 - 2021 , ,
. ... | null | https://raw.githubusercontent.com/colis-anr/morbig/77c2ca402785979c4af351b412fe7be2d521838f/src/morbigDriver.ml | ocaml | ************************************************************************
-*- tuareg -*-
This is free software: you... | Copyright ( C ) 2017 - 2021 , ,
.
under the terms of the GNU General Public License , version 3 .
open Morbig
let save input_filename (cst : CST.program) =
Options.(
if backend () = NoSerialisation
then
()
... |
eea3c4c8a9fc4f05f2e61964e2c2656515dccf2352816b3d31c99d1fbc1c5aff | namin/clpset-miniKanren | test-all.scm | (load "mktests.scm")
(load "clpset-tests.scm")
(load "lib-tests.scm")
(load "recordsub-tests.scm")
(load "tapl.scm")
| null | https://raw.githubusercontent.com/namin/clpset-miniKanren/c0cf0342431b36467cf217555a63a3d0477bd477/test-all.scm | scheme | (load "mktests.scm")
(load "clpset-tests.scm")
(load "lib-tests.scm")
(load "recordsub-tests.scm")
(load "tapl.scm")
| |
fb45e498acba820395e3cb7b28f0a6edd351746accffe60d3e14ee11cb59e1e9 | ghcjs/ghcjs-examples | threads.hs | # LANGUAGE QuasiQuotes , OverloadedStrings , ScopedTypeVariables #
start 10000 threads that each randomly update the color of a single cell in a table
start 10000 threads that each randomly update the color of a single cell in a table
-}
module Main where
import Control.Applicative
import Control.Concurren... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-examples/217b7fd3816f57634977beac711452704c3ea688/threads/threads.hs | haskell | # LANGUAGE QuasiQuotes , OverloadedStrings , ScopedTypeVariables #
start 10000 threads that each randomly update the color of a single cell in a table
start 10000 threads that each randomly update the color of a single cell in a table
-}
module Main where
import Control.Applicative
import Control.Concurren... | |
eb2b2494b6fdc115a90d66a6407587f20d0b9aa000434ea7d08df53b02ad8ff9 | JonathanLorimer/weft | ResolverSpec.hs | module ResolverSpec where
import Control.Monad
import Data.Void
import qualified Data.Map as M
import Test.Hspec hiding (Arg)
import Weft.Generics.Resolve
import Weft.Internal.Types
import Weft.Internal.Utils
import Weft.Types
data Tester = Tester
{ testFoo :: Meth... | null | https://raw.githubusercontent.com/JonathanLorimer/weft/fc0396240905ab0202c5896019cf1e482d216f8d/test/ResolverSpec.hs | haskell | module ResolverSpec where
import Control.Monad
import Data.Void
import qualified Data.Map as M
import Test.Hspec hiding (Arg)
import Weft.Generics.Resolve
import Weft.Internal.Types
import Weft.Internal.Utils
import Weft.Types
data Tester = Tester
{ testFoo :: Meth... | |
78ca765e02f557e69e693435275ddb577e4c7af875b3f3de4ed692721ea1cc22 | issuu/broen | cookies_SUITE.erl | -module(cookies_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-include_lib("amqp_client/include/amqp_client.hrl").
-include_lib("common_test/include/ct.hrl").
suite() ->
[{timetrap, {seconds, 30}}].
init_per_suite(Config) ->
{ok, _} = application:ensure_all_started(broen),
{ok, ConnProps} = app... | null | https://raw.githubusercontent.com/issuu/broen/7d0e1ad9017b9e9907d924b54c3c63dd1d741c9c/test/cookies_SUITE.erl | erlang | -module(cookies_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-include_lib("amqp_client/include/amqp_client.hrl").
-include_lib("common_test/include/ct.hrl").
suite() ->
[{timetrap, {seconds, 30}}].
init_per_suite(Config) ->
{ok, _} = application:ensure_all_started(broen),
{ok, ConnProps} = app... | |
bd26de1b7e6fffd4aac1f76f2913ec251dac54534192799fd3eb3a05add2bb7d | quephird/fun-with-quil | flower.clj | (ns fun-with-quil.animations.flower
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(defn setup []
(smooth)
(no-stroke)
(blend-mode :exclusion)
(ellipse-mode :center)
(color-mode :hsb))
(defn draw []
(let [fc (frame-count)
r (+ 150 (* 150 (sin (/ (* fc PI) 70))))
θ ... | null | https://raw.githubusercontent.com/quephird/fun-with-quil/3b3a6885771f5a1a4cffeb8379f05a28048a1616/src/fun_with_quil/animations/flower.clj | clojure | (ns fun-with-quil.animations.flower
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(defn setup []
(smooth)
(no-stroke)
(blend-mode :exclusion)
(ellipse-mode :center)
(color-mode :hsb))
(defn draw []
(let [fc (frame-count)
r (+ 150 (* 150 (sin (/ (* fc PI) 70))))
θ ... | |
3438fd31c1f99a08d7a927ab7d94793ea1ab5250c32cab189a552a2b4cbf3dd3 | bendudson/py4cl | callpython.lisp | (in-package :py4cl)
(define-condition python-error (error)
((text :initarg :text :reader text))
(:report (lambda (condition stream)
(format stream "Python error: ~a" (text condition)))))
(defun dispatch-reply (stream value)
(write-char #\r stream)
(stream-write-value value stream)
(force-output... | null | https://raw.githubusercontent.com/bendudson/py4cl/601ed206a43beb8504015be464c45be98dc856d0/src/callpython.lisp | lisp | Returned value
Error
Slot read
User must register a function to handle slot access
Provide some restarts for missing handler or missing slot
Slot write
User must register a function to handle slot write
Callback. Value returned is a list, containing the function ID then the args
Send a reply
Print stdout
Wri... | (in-package :py4cl)
(define-condition python-error (error)
((text :initarg :text :reader text))
(:report (lambda (condition stream)
(format stream "Python error: ~a" (text condition)))))
(defun dispatch-reply (stream value)
(write-char #\r stream)
(stream-write-value value stream)
(force-output... |
65f9ad6411756e5eef783b2cdc20f7816793c6d413f4a0f6de400aa680180083 | fission-codes/fission | Types.hs | -- | Application security
module Fission.Security.Types
( Secret (..)
, SecretDigest
) where
import Data.Swagger
import Fission.Prelude
-- | A text digest
type SecretDigest = Text
-- | An application secret
newtype Secret = Secret { unSecret :: Text }
deriving ( Eq
... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-core/library/Fission/Security/Types.hs | haskell | | Application security
| A text digest
| An application secret | module Fission.Security.Types
( Secret (..)
, SecretDigest
) where
import Data.Swagger
import Fission.Prelude
type SecretDigest = Text
newtype Secret = Secret { unSecret :: Text }
deriving ( Eq
, Show
, Generic
)
deri... |
89c37c9f3d582e0ae85624d03a32508ee1a0c2e0058e02a9dedb13f53d453046 | gfngfn/SATySFi | state.ml |
exception NotDuringPageBreak
type state = {
mutable during_page_break : bool;
}
let state = {
during_page_break = false;
}
let start_page_break () = state.during_page_break <- true
let during_page_break () = state.during_page_break
| null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/frontend/state.ml | ocaml |
exception NotDuringPageBreak
type state = {
mutable during_page_break : bool;
}
let state = {
during_page_break = false;
}
let start_page_break () = state.during_page_break <- true
let during_page_break () = state.during_page_break
| |
a0576beff24f06ac61a9d5d1b98d399c7268fd79cbf27c083c7ee74c67d62c01 | Frechmatz/cl-synthesizer | example-2.lisp | (defpackage :cl-synthesizer-modules-vco-example-2
(:use :cl))
(in-package :cl-synthesizer-modules-vco-example-2)
(defun example ()
"A frequency modulated triangle"
(let ((rack (cl-synthesizer:make-rack :environment (cl-synthesizer:make-environment))))
(cl-synthesizer:add-module
rack "LFO"
#'cl-syn... | null | https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/ba2e4003448829078187013f6723eb5c8ce8adbc/src/modules/vco/example-2.lisp | lisp | (run-example) | (defpackage :cl-synthesizer-modules-vco-example-2
(:use :cl))
(in-package :cl-synthesizer-modules-vco-example-2)
(defun example ()
"A frequency modulated triangle"
(let ((rack (cl-synthesizer:make-rack :environment (cl-synthesizer:make-environment))))
(cl-synthesizer:add-module
rack "LFO"
#'cl-syn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.