_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 |
|---|---|---|---|---|---|---|---|---|
ce42a9b4e11474d4264d43ba4e2394fffb37fa476df7ad1dd212cbe054c222da | albertoruiz/easyVision | runmode2.hs | -- threaded GUI, returning result
-- (this mode drops display frames)
import Vision.GUI
import Image.Processing
main = do
r <- runT camera (observe "image" rgb >>> arr (sumPixels.grayscale))
print r
putStrLn "bye!"
| null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/tour/runmode2.hs | haskell | threaded GUI, returning result
(this mode drops display frames) |
import Vision.GUI
import Image.Processing
main = do
r <- runT camera (observe "image" rgb >>> arr (sumPixels.grayscale))
print r
putStrLn "bye!"
|
64a8d4693942f485b7e9dc15b2de8339645634e2b542e43794b736f8b3655ffb | gas2serra/mcclim-desktop | browser.lisp | (in-package :desktop-user)
(register-application "browser" 'standard-alias-application
:pretty-name "Browser"
:icon nil
;;:reference (find-application "closure")
:reference (find-application "system-browser")
)
| null | https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/dot-mcclim-desktop/apps/browser.lisp | lisp | :reference (find-application "closure") | (in-package :desktop-user)
(register-application "browser" 'standard-alias-application
:pretty-name "Browser"
:icon nil
:reference (find-application "system-browser")
)
|
76e3501b8cc89f10ae517c68d5e4f12f52408f7f7e5488c3eefafbec23e202ba | cark/cark.behavior-tree | base_nodes.cljc | (ns cark.behavior-tree.base-nodes
"Some utility function with usefull defaults for the broad node types"
(:require [cark.behavior-tree.type :as type]
[cark.behavior-tree.hiccup.spec :as hs]
[clojure.spec.alpha :as s]))
(defn log [value]
(tap> value)
value)
(defn params-spec
... | null | https://raw.githubusercontent.com/cark/cark.behavior-tree/4e229fcc2ed3af3c66e74d2c51dda6684927d254/src/main/cark/behavior_tree/base_nodes.cljc | clojure | (ns cark.behavior-tree.base-nodes
"Some utility function with usefull defaults for the broad node types"
(:require [cark.behavior-tree.type :as type]
[cark.behavior-tree.hiccup.spec :as hs]
[clojure.spec.alpha :as s]))
(defn log [value]
(tap> value)
value)
(defn params-spec
... | |
bdbea64fd7f01519727fa5fc240c14e3b87359c8ef07f84b47f0d3d28443de03 | roblaing/erlang-webapp-howto | webutil.erl | -module(webutil).
-export([ create_hash/1
, logged_in/1
, delete_uid/1
, getuuid/1
]).
-spec create_hash(Input::binary()) -> Hexdigest :: string().
%% @doc Rehash the hexdigest read from browser cookie and return as a new hexdigest.
create_hash(Binary) ->
Salt = "Some very long rando... | null | https://raw.githubusercontent.com/roblaing/erlang-webapp-howto/e1731dfc4e2cfdfee88e982d67155b83acd5cc04/unit6/apps/unit6/src/webutil.erl | erlang | @doc Rehash the hexdigest read from browser cookie and return as a new hexdigest.
@doc Check if uuid is false, and if not that it's a valid ID.
@doc Call before new login or signup to avoid cluttering ETS with uuid/name pairs which have been overwitten in browsers.
@doc Return a unique hashkey if the supplied user_... | -module(webutil).
-export([ create_hash/1
, logged_in/1
, delete_uid/1
, getuuid/1
]).
-spec create_hash(Input::binary()) -> Hexdigest :: string().
create_hash(Binary) ->
Salt = "Some very long randomly generated string",
<<I:256>> = crypto:mac(hmac, sha256, Salt, Binary),
string... |
63dccd8a6c31d8b7eaab5a76fd862eeebcb941fde0dbae9c27c2b0b9a437213c | jonase/eastwood | box.clj | Copyright ( c ) , Rich Hickey & contributors .
;; 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 b... | null | https://raw.githubusercontent.com/jonase/eastwood/c5b7d9f8ad8f8b38dc7138d853cc65f6987d6058/copied-deps/eastwood/copieddeps/dep2/clojure/tools/analyzer/passes/jvm/box.clj | clojure | 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 this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.box
(:require [eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm.utils :as u]
[eastwood.copieddeps.dep1.clojure.tools.analyzer.utils :refer [protocol-node? arglist-for-arity]]
... |
7dc762c692ba3d6de5f5a10128a29e461ae000f342b99f227533b9dc2dd9ad28 | REPROSEC/dolev-yao-star | Vale_Math_Poly2_Bits_s.ml | open Prims
let (to_uint : Prims.pos -> Vale_Math_Poly2_s.poly -> unit FStar_UInt.uint_t)
=
fun n ->
fun a ->
FStar_UInt.from_vec n
(Vale_Math_Poly2_s.to_seq
(Vale_Math_Poly2_s.reverse a (n - Prims.int_one)) n)
let (of_uint : Prims.pos -> unit FStar_UInt.uint_t -> Vale_Math_Poly2_s.poly)... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Math_Poly2_Bits_s.ml | ocaml | open Prims
let (to_uint : Prims.pos -> Vale_Math_Poly2_s.poly -> unit FStar_UInt.uint_t)
=
fun n ->
fun a ->
FStar_UInt.from_vec n
(Vale_Math_Poly2_s.to_seq
(Vale_Math_Poly2_s.reverse a (n - Prims.int_one)) n)
let (of_uint : Prims.pos -> unit FStar_UInt.uint_t -> Vale_Math_Poly2_s.poly)... | |
39813c7d7f1127eb6398ff67f19475b4815b9c797df338ac12382ae3c2ce35be | eareese/htdp-exercises | 200-itunes-total-time.rkt | #lang htdp/bsl+
;;---------------------------------------------------------------------------------------------------
Exercise 200 . Design the function total - time , which consumes an element of LTracks and produces
;; the total amount of play time. Once the program is done, compute the total play time of your
;; ... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/200-itunes-total-time.rkt | racket | ---------------------------------------------------------------------------------------------------
the total amount of play time. Once the program is done, compute the total play time of your
iTunes collection.
TEST HELPERS
consumes a List-of-tracks and produces the total amount of play time in ms
TOTAL
(total-t... | #lang htdp/bsl+
Exercise 200 . Design the function total - time , which consumes an element of LTracks and produces
(require 2htdp/itunes)
(define ITUNES-LOCATION "itunes.xml")
LTracks
( define itunes - tracks ( read - itunes - as - tracks ITUNES - LOCATION ) )
(define TEST-TRACK1
(create-track "Nearly Mi... |
9fd8f19f5be27b12b08e7c3a7ba209d4b50ddccc3dc744f6b1c1d5473f89fb86 | devaspot/games | relay.erl | %%% -------------------------------------------------------------------
Author : < >
%%% Description : The server for retranslating events of the table.
%%%
Created : Feb 25 , 2013
%%% -------------------------------------------------------------------
%% Table -> Relay requests:
{ register_player , UserId ... | null | https://raw.githubusercontent.com/devaspot/games/a1f7c3169c53d31e56049e90e0094a3f309603ae/apps/server/src/modules/relay.erl | erlang | -------------------------------------------------------------------
Description : The server for retranslating events of the table.
-------------------------------------------------------------------
Table -> Relay requests:
Table -> Relay messages:
{publish, Event}
{to_subscriber, SubscrId, Event}
stop
Relay... | Author : < >
Created : Feb 25 , 2013
{ register_player , UserId , } - > ok
{ unregister_player , , Reason } - > ok
{ to_client , , Event }
{ allow_broadcast_for_player , }
{ player_disconnected , }
{ player_connected , }
{ subscriber_added , , SubscriptionId } - it 's a hack to retrive ... |
0cd38982738b5a35a02b2f2668e06fb1bb8c86c2050bcb233679b231a6ccb097 | RDTK/generator | recipe-repository.lisp | ;;;; recipe-repository.lisp --- A repository for directory and filename information.
;;;;
Copyright ( C ) 2019 , 2020 , 2022 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.model.project)
;;; `mode'
(defclass mode (print-items:print-items-mixin)
((%name :initarg :name
:type ... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/model/project/concrete-syntax/recipe-repository.lisp | lisp | recipe-repository.lisp --- A repository for directory and filename information.
`mode'
`recipe-repository'
Name -> pathname
`recipe-path'
`probe-recipe-pathname'
`recipe-truename'
`recipe-truenames'
Pathname -> name
Parents files
Mode parent loading
This computes the templates/MODE sub-directory
"manuall... | Copyright ( C ) 2019 , 2020 , 2022 Jan Moringen
Author : < >
(cl:in-package #:build-generator.model.project)
(defclass mode (print-items:print-items-mixin)
((%name :initarg :name
:type string
:reader name)
(%parent :initarg :parent
:reader parent
... |
6f5a4712033d38c6c8f5b43f9360083b7e2c37730252672072377ebbfc01889c | Elzair/nazghul | loc.scm | (define (mk-loc place x y) (list place x y))
(define (loc-place loc) (car loc))
(define (loc-x loc) (cadr loc))
(define (loc-y loc) (caddr loc))
(define (loc-op a b op)
(mk-loc (loc-place a)
(op (loc-x a) (loc-x b))
(op (loc-y a) (loc-y b))))
(define (loc-sum a b) (loc-op a b +))
(define (loc-di... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/loc.scm | scheme | eastern half
southeast quarter
northeast quarter
southwest quarter
----------------------------------------------------------------------------
REVISIT: this has a form almost identical to the loc-adjacent? proc below
----------------------------------------------------------------------------
Convert a locat... | (define (mk-loc place x y) (list place x y))
(define (loc-place loc) (car loc))
(define (loc-x loc) (cadr loc))
(define (loc-y loc) (caddr loc))
(define (loc-op a b op)
(mk-loc (loc-place a)
(op (loc-x a) (loc-x b))
(op (loc-y a) (loc-y b))))
(define (loc-sum a b) (loc-op a b +))
(define (loc-di... |
368210919387d734bdedf743c728c72231efa1e8603bdce54b61c14823f4b08b | erszcz/learning | type_encoded_properties.erl | -module(type_encoded_properties).
-compile([export_all]).
-define(N_COMMON_FIELDS, 2).
-define(COMMON_FIELDS, field1=val1,
field2=val2).
-record(unauth_state, {?COMMON_FIELDS,
extra_unauth_field3=val3}).
-record(auth_state, {?COMMON_FIELDS,
extra_aut... | null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-type-encoded_properties/type_encoded_properties.erl | erlang | do clever stuff and then:
some action, probably proceed to auth
`function_clause` for unauthenticated user
allow requests requiring authentication
possibly catch other cases and log violation
state_after_auth(S) ->
log_violation(S). | -module(type_encoded_properties).
-compile([export_all]).
-define(N_COMMON_FIELDS, 2).
-define(COMMON_FIELDS, field1=val1,
field2=val2).
-record(unauth_state, {?COMMON_FIELDS,
extra_unauth_field3=val3}).
-record(auth_state, {?COMMON_FIELDS,
extra_aut... |
10c7ad7cfdbb236807ad3d47c53954f64a6be86586912672bcd3d97a3c25cba7 | rabbitmq/rabbitmq-tracing | rabbit_tracing_wm_files.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_tracing_wm_files).
-export([init/... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-tracing/85af9285bef54c1689757b3161035b21389dca2d/src/rabbit_tracing_wm_files.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_tracing_wm_files).
-export([init/2, to_... |
aa6847f56ab75875ef0276e56056d1e6e94fadbe8563edb5fed66110e7805bb7 | moquist/datomic-schematode | user.clj | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.test :as test]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[datomic.api :as d]
[... | null | https://raw.githubusercontent.com/moquist/datomic-schematode/b73206fc86bb61bc97ddd5df55f7441bf5fc0447/dev/user.clj | clojure | other stuff
-are-fn.com/2013/datomic_history_of_an_entity/
This query finds all transactions that touched a particular entity
The transactions are themselves represented as entities. We get the
The transaction entity has a txInstant attribute, which is a timestmap
as of the transaction write.
as-of yields the da... | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.test :as test]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[datomic.api :as d]
[... |
9fde85f3ec5d2cf3e2d39164db21676a4ddc926257aaa2476b52a431ca03ff9e | inhabitedtype/ocaml-aws | addTags.mli | open Types
type input = AddTagsInput.t
type output = unit
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticloadbalancing/lib/addTags.mli | ocaml | open Types
type input = AddTagsInput.t
type output = unit
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
bec1f32017d9725f231ee931d3626f3e7341d77476aed630a404487da502c847 | qmuli/qmuli | Gen.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLists #
{-# LANGUAGE RankNTypes ... | null | https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/library/Qi/Program/SQS/Ipret/Gen.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLists #
module Qi.Program.SQS.Ipret.Gen where
import Control.Lens (Getting, (.~), (?~), (^.))
import ... |
07d50ba2eef25ea2d107fcfb05e30219df9b054b9299285cdd15ebc4543179a4 | TypedLambda/eresye | journal.erl | -module (journal).
-include ("journal.hrl").
-export ([is_class/1, is_a/2, 'journal'/1,'international-journal'/1,'national-journal'/1, childof/1]).
is_class ('journal') -> true;
is_class ('international-journal') -> true;
is_class ('national-journal') -> true;
is_class ('IEEE-journal') -> true;
is_class ('ACM-journal'... | null | https://raw.githubusercontent.com/TypedLambda/eresye/58c159e7fbe8ebaed52018b1a7761d534b4d6119/examples/journal.erl | erlang | -module (journal).
-include ("journal.hrl").
-export ([is_class/1, is_a/2, 'journal'/1,'international-journal'/1,'national-journal'/1, childof/1]).
is_class ('journal') -> true;
is_class ('international-journal') -> true;
is_class ('national-journal') -> true;
is_class ('IEEE-journal') -> true;
is_class ('ACM-journal'... | |
11cabcf45fb134ffb64ea08019a78c977c89ca756288a52e7e973a2c661b44b6 | bracevac/corrl | Range.hs | -----------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the roo... | null | https://raw.githubusercontent.com/bracevac/corrl/416cd107087ac070a6bcabf8e7937211b6f415bb/koka/src/Common/Range.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
Source ranges and positions.
---------------------------------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
module Common.Range
( Pos, makePos, minPos, maxPos, posColumn, posLine
, posMove8, posMoves8, posNull
,... |
b1eab9a0f2634dc6ca4099f988961ff2742bb4eb6ec35e9abc17771daf6a02da | morloc-project/morloc | AST.hs | |
Module : Morloc . Frontend . AST
Description : Functions for parsing the abstract syntax trees
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.Frontend.AST
Description : Functions for parsing the Expr abstract syntax trees
Copyri... | null | https://raw.githubusercontent.com/morloc-project/morloc/e877221e1123b920f52b18ea7d1a319aacd0b927/library/Morloc/Frontend/AST.hs | haskell | | find all the non-generic terms in an unresolved type
| Find type signatures that are in the scope of the input expression. Do not
descend recursively into declaration where statements except if the input
expression is a declaration.
v is the name of the type
l is the optional label for the signature
t is the t... | |
Module : Morloc . Frontend . AST
Description : Functions for parsing the abstract syntax trees
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.Frontend.AST
Description : Functions for parsing the Expr abstract syntax trees
Copyri... |
51a60e6cec782d6007941ce5b3f87bffcd424b8832bdf87e65553d45cf2bde0e | janestreet/core | sexpable.ml | open! Import
include Base.Sexpable
module Stable = struct
module Of_sexpable = struct
module V1
(Sexpable : S) (M : sig
type t
val to_sexpable : t -> Sexpable.t
val of_sexpable : Sexpable.t -> t
end) : ... | null | https://raw.githubusercontent.com/janestreet/core/d0d1b3915c9350d8e9f2b395a817659e539e6155/core/src/sexpable.ml | ocaml | open! Import
include Base.Sexpable
module Stable = struct
module Of_sexpable = struct
module V1
(Sexpable : S) (M : sig
type t
val to_sexpable : t -> Sexpable.t
val of_sexpable : Sexpable.t -> t
end) : ... | |
3591c5a3ba12a7b2a4343503d52c0adf8639d00411b26c4a35656c5ae9100dc0 | liquidz/antq | boot.clj | (ns antq.dep.boot
(:require
[antq.constant :as const]
[antq.record :as r]
[antq.util.dep :as u.dep]
[clojure.java.io :as io]
[clojure.walk :as walk]))
(def ^:private project-file "build.boot")
(defn- exclude?
[v]
(-> (meta v)
(contains? const/deps-exclude-key)))
(defn extract-deps
{:mall... | null | https://raw.githubusercontent.com/liquidz/antq/51b257d94761a4642c6d35e65774a060248624b7/src/antq/dep/boot.clj | clojure | (ns antq.dep.boot
(:require
[antq.constant :as const]
[antq.record :as r]
[antq.util.dep :as u.dep]
[clojure.java.io :as io]
[clojure.walk :as walk]))
(def ^:private project-file "build.boot")
(defn- exclude?
[v]
(-> (meta v)
(contains? const/deps-exclude-key)))
(defn extract-deps
{:mall... | |
d7a11f6c11589cf1b3455776de490919e60ae12f53476103fefb04c3e3973b04 | dergraf/epmdpxy | epmdpxy_session.erl | -module(epmdpxy_session).
-behaviour(gen_server).
%% API
-export([start_link/2,
accept/1,
cut_cable/1,
fix_cable/1,
status/1]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_chan... | null | https://raw.githubusercontent.com/dergraf/epmdpxy/646506ba2117cb5ac81b9d37c2fe5cb7f042b043/src/epmdpxy_session.erl | erlang | API
gen_server callbacks
should be larger than netsplit time
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Starts the server
@end
--------------... | -module(epmdpxy_session).
-behaviour(gen_server).
-export([start_link/2,
accept/1,
cut_cable/1,
fix_cable/1,
status/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-record(state, {status... |
05974a6c30af10c552c38c2cc3911563c4a259917e0ab4a2182d3cc96a11b5c8 | arcfide/chez-srfi | link-dirs.chezscheme.sps | #! /usr/bin/env scheme-script
Copyright ( c ) 2012 < >
;;;
;;; Permission to use, copy, modify, and distribute this software for
;;; any purpose with or without fee is hereby granted, provided that the
;;; above copyright notice and this permission notice appear in all
;;; copies.
;;;
THE SOFTWARE IS PROVIDED... | null | https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/link-dirs.chezscheme.sps | scheme |
Permission to use, copy, modify, and distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS... | #! /usr/bin/env scheme-script
Copyright ( c ) 2012 < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL
OR PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER
(import (chezscheme))
people who use Chez Scheme prefer . :-)
(define (translate-name name)
(let f ([i 0] [j 0])
... |
027a6637dbbe14605f9429a09dec253138d189843e5f223c83f25c96ab2a3741 | yurug/ocaml4.04.0-copatterns | reachable_words.ml | let native =
match Filename.basename Sys.argv.(0) with
| "program.byte" | "program.byte.exe" -> false
| "program.native" | "program.native.exe" -> true
| s -> print_endline s; assert false
let size x = Obj.reachable_words (Obj.repr x)
let expect_size s x =
let i = size x in
if i <> s then
Printf.prin... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/testsuite/tests/lib-obj/reachable_words.ml | ocaml | sharing
cycle | let native =
match Filename.basename Sys.argv.(0) with
| "program.byte" | "program.byte.exe" -> false
| "program.native" | "program.native.exe" -> true
| s -> print_endline s; assert false
let size x = Obj.reachable_words (Obj.repr x)
let expect_size s x =
let i = size x in
if i <> s then
Printf.prin... |
8873187c534296ff0b9b527e3a695c5bb7a494194b9757a7feaf42cb5a1e13d0 | xvw/muhokama | topic_views.ml | open Lib_common
open Lib_service
module Create = struct
let category_select categories category_id =
let open Tyxml.Html in
let options =
Preface.Nonempty_list.map
(fun category ->
let open Models.Category in
let selected =
if category_id
|> Option... | null | https://raw.githubusercontent.com/xvw/muhokama/dcb71b5b7055249d2d03e4d609c3cdbb61a05276/app/views/topic_views.ml | ocaml | TODO: space between buttons? | open Lib_common
open Lib_service
module Create = struct
let category_select categories category_id =
let open Tyxml.Html in
let options =
Preface.Nonempty_list.map
(fun category ->
let open Models.Category in
let selected =
if category_id
|> Option... |
7dd062abda8a979864511af7b84e645168cdd01d36dbbea48fe7ee987529c99c | botsunit/bucs | buccode_tests.erl | -module(buccode_tests).
-include_lib("eunit/include/eunit.hrl").
buccode_test_() ->
{setup,
fun setup/0, fun teardown/1,
[
?_test(t_priv_dir())
]}.
setup() ->
ok.
teardown(_) ->
ok.
t_priv_dir() ->
?assertMatch({match, _}, re:run(buccode:priv_dir(bucs), "bucs/priv$")).
| null | https://raw.githubusercontent.com/botsunit/bucs/792437befd259042efaf95e301dec019a5dd6ea4/test/buccode_tests.erl | erlang | -module(buccode_tests).
-include_lib("eunit/include/eunit.hrl").
buccode_test_() ->
{setup,
fun setup/0, fun teardown/1,
[
?_test(t_priv_dir())
]}.
setup() ->
ok.
teardown(_) ->
ok.
t_priv_dir() ->
?assertMatch({match, _}, re:run(buccode:priv_dir(bucs), "bucs/priv$")).
| |
21e76ed47ad16e8f5bc752328dd0048a8a9a4c9c9aac590584b1a4a0392ea1ff | lambdamikel/DLMAPS | spatial-substrate.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
(in-package :THEMATIC-SUBSTRATE)
;;;
;;;
;;;
(defpersistentclass spatial-substrate (rolebox-substrate)
((consistency-relevant-edges :reader consistency-relevant-edges :initform nil)))
(defmethod create-substrate ((c... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/thematic-substrate/unfinished/spatial-substrate.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
(add-inverse-edges substrate)
Spatial-Relation-Methoden
|
(in-package :THEMATIC-SUBSTRATE)
(defpersistentclass spatial-substrate (rolebox-substrate)
((consistency-relevant-edges :reader consistency-relevant-edges :initform nil)))
(defmethod create-substrate ((class (eql 'spatial-substrate))
&key name tbox abox rbox (real-class 'spatial-subs... |
05b8b9fa007a87d25a371c56b82ef9db2fb2667509fbbb51f586651043400dff | deg/sodium | keys.clj | Author : ( )
Copyright ( c ) 2017 ,
(ns sodium.keys)
;;; [TODO] Fill in more keys
For mapping of HTML attributes to elements , see -US/docs/Web/HTML/Attributes
;;; For list of all HTML tags, see
;;; also,
;;; and
;;; See also /
(def ui-key-set-map (atom {}))
(defn key-set [key]
(key @ui-key-s... | null | https://raw.githubusercontent.com/deg/sodium/1855fe870c3719af7d16d85c2558df1799a9bd32/src/sodium/keys.clj | clojure | [TODO] Fill in more keys
For list of all HTML tags, see
also,
and
See also /
Common parameters; elided from the other sets below
custom
node
string
From -ui.com/views/advertisement
bool
bool|enum
enum: [left, right, top, bottom]
bool
bool
enum: [red orange yellow olive green teal blue violet purp... | Author : ( )
Copyright ( c ) 2017 ,
(ns sodium.keys)
For mapping of HTML attributes to elements , see -US/docs/Web/HTML/Attributes
(def ui-key-set-map (atom {}))
(defn key-set [key]
(key @ui-key-set-map))
(defn add-key-set [key key-set]
(swap! ui-key-set-map assoc key (set key-set)))
(add-key-s... |
9d57dcc5636a098cd98a97982610e1549f78e51c7f34d74c5326dee2b3225a25 | jperson/cl-reddit | util.lisp | Copyright ( c ) 2013 ,
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
;;
1 . Redistributions of source code must retain the above copyright notice , this
;; list of conditions and t... | null | https://raw.githubusercontent.com/jperson/cl-reddit/c78d2a5854cddfd9b72ffebb51c9253c242b4f5e/util.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:
list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation
and/or other mat... | Copyright ( c ) 2013 ,
1 . Redistributions of source code must retain the above copyright notice , this
2 . Redistributions in binary form must reproduce the above copyright notice ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND
DISCLAIMED . IN NO EVENT SHALL THE COPYRIG... |
0f2f7f1f6bb8d9a65c519e9b744fac1bd4d76044d84dda8f0425a63b72ba67c3 | dalmatinerdb/dflow | math_eqc.erl | @author < >
( C ) 2014 ,
%%% @doc
%%%
%%% @end
Created : 15 Dec 2014 by < >
-module(math_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("pulse/include/pulse.hrl").
-include_lib("pulse_otp/include/pulse_otp.hrl").
-compile(export_all).
-define(TREE_DEPTH, 7).
We do n't use divide since ... | null | https://raw.githubusercontent.com/dalmatinerdb/dflow/61d70b79a24c36bf72608b9fc91e91657eddd012/eqc/math_eqc.erl | erlang | @doc
@end
too much pain! | @author < >
( C ) 2014 ,
Created : 15 Dec 2014 by < >
-module(math_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("pulse/include/pulse.hrl").
-include_lib("pulse_otp/include/pulse_otp.hrl").
-compile(export_all).
-define(TREE_DEPTH, 7).
We do n't use divide since handeling the division... |
7d635c05bf5cf707d5dca2c60a7ddb7467502055e61b5e4c6efc8493d382a803 | Mokosha/Lambency | Utils.hs | module Lambency.Utils (
compareZero,
compareClose,
destructMat4,
clamp,
newRange,
newRangeC,
--
CyclicList(..),
advance,
cyclicLength,
cyclicFromList,
cyclicToList,
cycleSingleton,
cycles
) where
--------------------------------------------------------------------------------
import Control... | null | https://raw.githubusercontent.com/Mokosha/Lambency/43c58b62b9dc2c63b5f8c42248a6f7844093dac7/lib/Lambency/Utils.hs | haskell |
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | module Lambency.Utils (
compareZero,
compareClose,
destructMat4,
clamp,
newRange,
newRangeC,
CyclicList(..),
advance,
cyclicLength,
cyclicFromList,
cyclicToList,
cycleSingleton,
cycles
) where
import Control.Comonad
import Data.Foldable
import Linear.Epsilon
import Linear.Metric
import Pre... |
ba4ef71c7dbe190cc68a801a876652dfa2a1b0341ea5816a14d5ed8d54bd8445 | bcc32/advent-of-code | a.ml | open! Core
let () =
let input =
In_channel.with_file (Sys.get_argv ()).(1) ~f:In_channel.input_all
|> String.strip
|> Int.of_string
in
let buf = ref (Array.create 0 ~len:1) in
let pos = ref 0 in
for next = 1 to 2017 do
pos := (!pos + input) % Array.length !buf;
let buf' = Array.create 0 ~... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2017/17/a.ml | ocaml | open! Core
let () =
let input =
In_channel.with_file (Sys.get_argv ()).(1) ~f:In_channel.input_all
|> String.strip
|> Int.of_string
in
let buf = ref (Array.create 0 ~len:1) in
let pos = ref 0 in
for next = 1 to 2017 do
pos := (!pos + input) % Array.length !buf;
let buf' = Array.create 0 ~... | |
94a95a3b9628db16fef99623505ab458cee1d41396b6f3c281d9bfd41c9a6dda | AndrasKovacs/ELTE-func-lang | Lesson06_pre.hs | # LANGUAGE InstanceSigs , DeriveFoldable #
module Lesson05 where
data List a = Nil | Cons a (List a) deriving (Foldable, Show)
infixr 5 `Cons`
data BinaryTree a = Leaf a | Node (BinaryTree a) a (BinaryTree a)
data RoseTree a = RoseNode a [RoseTree a]
data Foo3 a = Foo3 a a a a a deriving Show
data Tree1 ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/b9855dbadacadd624d4648134733b6c4cc1ee602/2021-22-2/gyak_2/Lesson06_pre.hs | haskell | i-szeres elágazás
Törvények:
| # LANGUAGE InstanceSigs , DeriveFoldable #
module Lesson05 where
data List a = Nil | Cons a (List a) deriving (Foldable, Show)
infixr 5 `Cons`
data BinaryTree a = Leaf a | Node (BinaryTree a) a (BinaryTree a)
data RoseTree a = RoseNode a [RoseTree a]
data Foo3 a = Foo3 a a a a a deriving Show
data Tree1 ... |
da54a3b981b2f91355b1c383e655d61a99a875c4bfe4136e0fa54865f2d1e721 | exoscale/clojure-kubernetes-client | v1_list_meta.clj | (ns clojure-kubernetes-client.specs.v1-list-meta
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-list-meta-data v1-list-meta)
(def v1-list-meta-data
{
(ds/opt :continue) string?
(ds/opt :resourceVersion) string?
(ds/opt ... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_list_meta.clj | clojure | (ns clojure-kubernetes-client.specs.v1-list-meta
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-list-meta-data v1-list-meta)
(def v1-list-meta-data
{
(ds/opt :continue) string?
(ds/opt :resourceVersion) string?
(ds/opt ... | |
125b601c826bcd35298013c73f0bce2cf88b2cb017b285cebd5283d5a99c12b5 | CrypticButter/snoop | cljs.clj | (ns crypticbutter.snoop.impl.cljs)
| null | https://raw.githubusercontent.com/CrypticButter/snoop/4e7c820de45f811766c0164ed21e74701d27caa7/src/crypticbutter/snoop/impl/cljs.clj | clojure | (ns crypticbutter.snoop.impl.cljs)
| |
3bd095f2b76cac56c9dba25b5ed912df45b4bcf201cd2fc10a7229423001086c | zachgk/catln | TypeCheck.hs | --------------------------------------------------------------------
-- |
Module :
Copyright : ( c ) 2019
License : MIT
-- Maintainer:
-- Stability : experimental
-- Portability: non-portable
--
-- This is the main module for typechecking. It takes a program
-- with some typing information and ... | null | https://raw.githubusercontent.com/zachgk/catln/a7013bd5ab71a5034415296a009809466f9f3f69/src/TypeCheck.hs | haskell | ------------------------------------------------------------------
|
Maintainer:
Stability : experimental
Portability: non-portable
This is the main module for typechecking. It takes a program
with some typing information and computes the rest of the typing
information. It's general goal is to narrow down ty... | Module :
Copyright : ( c ) 2019
License : MIT
# LANGUAGE NamedFieldPuns #
module TypeCheck where
import CRes
import Data.Graph
import qualified Data.HashMap.Strict as H
import qualified Data.HashSet as S
import Data.Maybe
import Semantics
import ... |
4653bb271df25d05e39444a0237cc53c16d03bf8a87914b893a60656483a522a | modular-macros/ocaml-macros | cmt_format.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/typing/cmt_format.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Cmi_format
open Typedtree
Note that in Typerex , there is an awful hack to save a cmt file
together with the interface file that was generated by ( this
... |
617f8edd21edbae1c3a627dbf0d17488e4fea32c1f455fbb7a3759abf63dada4 | c-cube/cconv | cConvSexp.ml |
* CSexp - interface to Copyright ( C ) 2014
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any late... | null | https://raw.githubusercontent.com/c-cube/cconv/de165564973f673aacd63f53b53e230e6254eba5/src/sexp/cConvSexp.ml | ocaml |
* CSexp - interface to Copyright ( C ) 2014
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any late... | |
7691e59c5bbdbc8767d913ad3751f235035254e711d8e4e7c92b59a0b9702b85 | TomLisankie/Learning-Lisp | aoc-2018-1b.lisp | (defun open-file (file-name)
"Dumps contents of a text file into a list."
(with-open-file (file-stream file-name)
(loop for line = (read-line file-stream nil)
while line
collect line)))
(defun find-first-duplicate (list-from-file)
"Takes a list containing string representations of integers a... | null | https://raw.githubusercontent.com/TomLisankie/Learning-Lisp/27f9843cbb0c325a6531fd1332c6f19bebfe5a4d/code/Dec2018/10/aoc-2018-1b.lisp | lisp | (defun open-file (file-name)
"Dumps contents of a text file into a list."
(with-open-file (file-stream file-name)
(loop for line = (read-line file-stream nil)
while line
collect line)))
(defun find-first-duplicate (list-from-file)
"Takes a list containing string representations of integers a... | |
9ac20d73ab201c154a0d33ca4bd92eccccfa58d20cc676fc3ca82530e912516b | zwizwa/staapl | boot.rkt | #lang staapl/pic18 \ -*- forth -*-
provide-all
\ Boot init macros for PIC18 chips.
macro
\ stack init code
: init-xs 0 movlw STKPTR movwf ; \ XS (hardware return stack / eXecute stack)
: init-ds 1 - 0 lfsr ; \ DS
\ RS ( retain stack )
\ * INDF0 the data stack pointer
\ * INDF1 the byte-sized retain stack (r) ... | null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/pic18/boot.rkt | racket | \ XS (hardware return stack / eXecute stack)
\ DS
| #lang staapl/pic18 \ -*- forth -*-
provide-all
\ Boot init macros for PIC18 chips.
macro
\ stack init code
\ RS ( retain stack )
\ * INDF0 the data stack pointer
\ * INDF1 the byte-sized retain stack (r) pointer
\ * STKPTR the hardware return stack (x) pointer
\ boot
\ The PIC18 has 64-byte flash erase block... |
362a2564224e8a3007b21a5ab1a48675a0b26304d45ea40360396b80f65baf3c | fyquah/hardcaml_zprize | barrett_mult.ml | open Base
module Config = struct
type t =
{ multiplier_config : Karatsuba_ofman_mult.Config.t
; barrett_reduction_config : Barrett_reduction.Config.t
}
end
module With_interface (M : sig
val bits : int
end) =
struct
open M
module Karatsuba_ofman_mult = Karatsuba_ofman_mult.With_interface (M)
mo... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/src/barrett_mult.ml | ocaml | open Base
module Config = struct
type t =
{ multiplier_config : Karatsuba_ofman_mult.Config.t
; barrett_reduction_config : Barrett_reduction.Config.t
}
end
module With_interface (M : sig
val bits : int
end) =
struct
open M
module Karatsuba_ofman_mult = Karatsuba_ofman_mult.With_interface (M)
mo... | |
6eaf7c1f5efdb5733b3d3f1505991a802832d723530b1bbfb761a9649303b474 | jwaldmann/haskell-obdd | Cube.hs | {-# language FlexibleContexts #-}
# LANGUAGE TupleSections #
module OBDD.Cube where
import Prelude hiding ((&&),(||),not,and,or)
import qualified Prelude
import OBDD
import qualified Data.Bool
import Control.Monad (guard)
import Control.Applicative
import qualified Data.Map.Strict as M
import qualified Data.Set as... | null | https://raw.githubusercontent.com/jwaldmann/haskell-obdd/537f710bc3eb6d06370659fd8c79f4da94554aeb/src/OBDD/Cube.hs | haskell | # language FlexibleContexts #
* naive way of finding a minimal set of clauses. | # LANGUAGE TupleSections #
module OBDD.Cube where
import Prelude hiding ((&&),(||),not,and,or)
import qualified Prelude
import OBDD
import qualified Data.Bool
import Control.Monad (guard)
import Control.Applicative
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Data.List (partition, so... |
8ee37096744009c556d28983724532a210078d6fe806184c42f70f54f14ce6f4 | onyx-platform/onyx-examples | core.clj | (ns global-windows.core
(:require [clojure.core.async :refer [chan >!! <!! close!]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.api])
(:gen-class))
(def id (java.util.UUID/randomUUID))
(def env-config
{:zookeeper/address "127.0.0.1:2188"
:zookeeper/server? true
:zookeepe... | null | https://raw.githubusercontent.com/onyx-platform/onyx-examples/668fddd26bc6b692a478fb8dc0e6d3d329879396/global-windows/src/global_windows/core.clj | clojure | Sleep until the trigger timer fires. | (ns global-windows.core
(:require [clojure.core.async :refer [chan >!! <!! close!]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.api])
(:gen-class))
(def id (java.util.UUID/randomUUID))
(def env-config
{:zookeeper/address "127.0.0.1:2188"
:zookeeper/server? true
:zookeepe... |
46916ce2d12887c9054be73807346fd997b364b4d85b7b1950406607807a7838 | erlang/otp | scheduler_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applica... | null | https://raw.githubusercontent.com/erlang/otp/f02ae58612b257d187ad030d72b9e8b67ce471ef/erts/emulator/test/scheduler_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific la... | Copyright Ericsson AB 2008 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author :
Created : 27 Oct 2008 by
-module(scheduler_SUITE).
-define(line_trace , 1 ) .
-include_lib("c... |
669203a5a7b8fc6f94b33757ccd2fcdd9010cc6235817d55938c56b687dc456e | aaltodsg/instans | debug.lisp | ;;; -*- Mode: Lisp -*-
;;; -------------------- Debug messages --------------------
(in-package #:instans)
(proclaim '(optimize safety))
(defvar *dbg-stream* *error-output*)
(defvar *dbg-indent* 0)
(defun dbginc (inc)
(incf *dbg-indent* inc))
(defvar *dbgp* nil)
(eval-when (:compile-toplevel :load-toplevel :e... | null | https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/cl-ll1/debug.lisp | lisp | -*- Mode: Lisp -*-
-------------------- Debug messages -------------------- |
(in-package #:instans)
(proclaim '(optimize safety))
(defvar *dbg-stream* *error-output*)
(defvar *dbg-indent* 0)
(defun dbginc (inc)
(incf *dbg-indent* inc))
(defvar *dbgp* nil)
(eval-when (:compile-toplevel :load-toplevel :execute)
(setq *dbgp* nil))
(defmacro dbg (&rest args)
(cond ((not *dbgp*)
nil... |
6a7df94afc7405c9ebcc2baf7046fb549a49bbb0ea90f61cc533b6c0c44a0cda | williamleferrand/accretio | pa_operators.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/syntax/pa_operators.ml | ocaml | this is a duplicate, but I don't want to depend on pa_vertex outside of
/graph
get fields with a lwt argument
get fields
singleton case need to be handled separately
optimisation? we could use an iterator & skip the keys we're
not interested in
now we need to remap this array to a tuple of r... |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... |
571f3606c51cd6d5f352d02cbfce4b0382936a600d299787a460ba8b49beaaa2 | Frozenlock/wacnet | repl.clj | (ns wacnet.api.repl
(:require [clojure.stacktrace :refer [root-cause]]
[wacnet.api.bacnet.common :as co]
[wacnet.nrepl :as wnrepl]
[yada.resource :refer [resource]]
[schema.core :as s])
(:import java.io.StringWriter
[java.util.concurrent TimeoutException Ti... | null | https://raw.githubusercontent.com/Frozenlock/wacnet/4a4c21d423a9eeaaa70ec5c0ac4203a6978d3db9/src/clj/wacnet/api/repl.clj | clojure | from clojail
Default to milliseconds, because that's pretty common. | (ns wacnet.api.repl
(:require [clojure.stacktrace :refer [root-cause]]
[wacnet.api.bacnet.common :as co]
[wacnet.nrepl :as wnrepl]
[yada.resource :refer [resource]]
[schema.core :as s])
(:import java.io.StringWriter
[java.util.concurrent TimeoutException Ti... |
668414fe22fe63cbf20face2c255e9727840b4cead045b45359bc3662fefa733 | ygmpkk/house | ObjectIO.hs | -----------------------------------------------------------------------------
-- |
-- Module : ObjectIO
Copyright : ( c ) 2002
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
ObjectIO contains all definition modules of the Object I\/O libra... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO.hs | haskell | ---------------------------------------------------------------------------
|
Module : ObjectIO
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
The operations that generate identifica... | Copyright : ( c ) 2002
ObjectIO contains all definition modules of the Object I\/O library .
module Graphics.UI.ObjectIO
( module Graphics.UI.ObjectIO.StdId
, module Graphics.UI.ObjectIO.StdIOBasic
, module Graphics.UI.ObjectIO.StdIOCommon
, module Graphics.UI.Obj... |
e48ec15596e33528b91bc7bcf9d211a0b8f173b97b6c37d7dd8c7853a63afbd1 | rixed/ramen | RamenAtomic.ml | open Batteries
let with_mutex m f x =
Mutex.lock m ;
finally
(fun () -> Mutex.unlock m)
f x
module Base = struct
type 'a t = { mutex : Mutex.t ; x : 'a }
let make x =
{ mutex = Mutex.create () ; x }
let with_lock t f =
with_mutex t.mutex f t.x
end
module Flag = struct
type t = bool Base.t... | null | https://raw.githubusercontent.com/rixed/ramen/11b1b34c3bf73ee6c69d7eb5c5fbf30e6dd2df4f/src/RamenAtomic.ml | ocaml | open Batteries
let with_mutex m f x =
Mutex.lock m ;
finally
(fun () -> Mutex.unlock m)
f x
module Base = struct
type 'a t = { mutex : Mutex.t ; x : 'a }
let make x =
{ mutex = Mutex.create () ; x }
let with_lock t f =
with_mutex t.mutex f t.x
end
module Flag = struct
type t = bool Base.t... | |
fef8b0bf213638eb8f9860790ce999f4de16145504b8c12ba6962697fd105aa7 | pedropramos/PyonR | strings.rkt | (module strings racket
(provide (all-defined-out))
(require "engine.rkt"
"exceptions.rkt"
(only-in srfi/13 string-contains))
(define (py-string-hash x)
(let ([bytes (string->bytes/utf-8 x)])
(remainder (for/fold ([result 0]) ([byte bytes])
(+ (* result 256)... | null | https://raw.githubusercontent.com/pedropramos/PyonR/16edd14f3950fd5a01f8b0237e023536ef48d17b/engine/strings.rkt | racket | (module strings racket
(provide (all-defined-out))
(require "engine.rkt"
"exceptions.rkt"
(only-in srfi/13 string-contains))
(define (py-string-hash x)
(let ([bytes (string->bytes/utf-8 x)])
(remainder (for/fold ([result 0]) ([byte bytes])
(+ (* result 256)... | |
dbe1b204b9dbde3a7bdbb618f32a3afd2761aecc106f4ce4a5f39e2ae493582a | RefactoringTools/HaRe | Demote.hs | module MoveDef.Demote where
toplevel :: Integer -> Integer
toplevel x = c * x
-- c,d :: Integer
c = 7
d = 9
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/MoveDef/Demote.hs | haskell | c,d :: Integer | module MoveDef.Demote where
toplevel :: Integer -> Integer
toplevel x = c * x
c = 7
d = 9
|
dd98f1988a87bbf6577c198ee80c9650f52dd3c6f60f29529d134c905ac2c907 | nitrogen/NitrogenProject.com | demos_notices.erl | -module (demos_notices).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demos46.html" }.
title() -> "User Notices".
headline() -> "User Notices".
left() ->
[
"
<p>
Nitrogen provides you with a variety of ways to notify a use... | null | https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_notices.erl | erlang | -module (demos_notices).
-include_lib ("nitrogen_core/include/wf.hrl").
-compile(export_all).
main() -> #template { file="./templates/demos46.html" }.
title() -> "User Notices".
headline() -> "User Notices".
left() ->
[
"
<p>
Nitrogen provides you with a variety of ways to notify a use... | |
2fc42290497c664e9622054ecbe5cb69ff437ce2fe63a930d71b7728c22134ce | lambdacube3d/lambdacube-edsl | LC_GADT_DSLType.hs | module LC_GADT_DSLType where
import Data.Int
import Data.Word
import Data.Typeable
import LCType
import LC_GADT_APIType
-- IsScalar means here that the related type is not a tuple, but a GPU primitive type
class GPU a => IsScalar a where
toValue :: a -> Value
toType :: a -> InputType
instance (Typea... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/lambdacube-core/tmp/sandbox/LC_GADT_DSLType.hs | haskell | IsScalar means here that the related type is not a tuple, but a GPU primitive type
stream type restriction, these types can be used in vertex shader input
uniform type restriction
|Conversion between surface n-tuples and our tuple representation.
our language uses nested tuple representation
Tuple representation... | module LC_GADT_DSLType where
import Data.Int
import Data.Word
import Data.Typeable
import LCType
import LC_GADT_APIType
class GPU a => IsScalar a where
toValue :: a -> Value
toType :: a -> InputType
instance (Typeable dim, Typeable sh, Typeable t, Typeable ar) => IsScalar (Sampler dim sh t ar) where... |
c8d3af22615797d1990e62fbe674ffec7ae839d2e551298e1b8c0bea21cd90da | Kakadu/fp2022 | save.ml | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Rep
open Printf
open Type
exception Type of string
" /Users / akabynda / fp2022 / SQLyd "
let conc_comma = String.concat ","
let conc_line = String.concat "\n"
let rec type_to_string = function
| [] -> []
... | null | https://raw.githubusercontent.com/Kakadu/fp2022/0eb49bf60d173287607678159465c425cdf699be/SQLyd/lib/save.ml | ocaml | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Rep
open Printf
open Type
exception Type of string
" /Users / akabynda / fp2022 / SQLyd "
let conc_comma = String.concat ","
let conc_line = String.concat "\n"
let rec type_to_string = function
| [] -> []
... | |
36c0fbab1d2732b3e272643b119fdcc9dc18325339525d84880c0697fb7be62d | acieroid/scala-am | pcounter14.scm | (letrec ((counter (atom 0))
(thread (lambda (n)
(letrec ((old (deref counter))
(new (+ old 1)))
(if (compare-and-set! counter old new)
#t
(thread n)))))
(t1 (future (thread 1)))
(t2 (future... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/variations/pcounter14.scm | scheme | (letrec ((counter (atom 0))
(thread (lambda (n)
(letrec ((old (deref counter))
(new (+ old 1)))
(if (compare-and-set! counter old new)
#t
(thread n)))))
(t1 (future (thread 1)))
(t2 (future... | |
d9c66e759abf50fbe2e0ec3011f2f8db020dea809037b7b7d86bf9cad1cbed7b | cedlemo/OCaml-GLib2 | DLList.ml |
* Copyright 2018 ,
* This file is part of .
*
* OCaml - GLib2 is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* any later version .
*
* ... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GLib2/084a148faa4f18d0ddf78315d57c1d623aa9522c/lib/DLList.ml | ocaml | * GLib Doubly Linked List
-Doubly-Linked-Lists.html
|
* Copyright 2018 ,
* This file is part of .
*
* OCaml - GLib2 is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* any later version .
*
* ... |
c07a591bf028f8ace07bf5b1eb3b230b90dade81ce314b69681f4b2673bb4194 | anton-k/sharc-timbre | Viola.hs | module Sharc.Instruments.Viola (viola) where
import Sharc.Types
viola :: Instr
viola = Instr
"viola_vibrato"
"Viola"
(Legend "McGill" "1" "6")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 130.81 36 "c3"))
(Pitch 130.81 36 "c3")
(Amplitude 8372.03 (HarmonicFreq ... | null | https://raw.githubusercontent.com/anton-k/sharc-timbre/14be260021c02f31905b3e63269f582030a45c8d/src/Sharc/Instruments/Viola.hs | haskell | module Sharc.Instruments.Viola (viola) where
import Sharc.Types
viola :: Instr
viola = Instr
"viola_vibrato"
"Viola"
(Legend "McGill" "1" "6")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 130.81 36 "c3"))
(Pitch 130.81 36 "c3")
(Amplitude 8372.03 (HarmonicFreq ... | |
89f2c8c1f3ea15e61b70cd0de64cb9bd53f94ca458b48f162ba9a98dbb023556 | Earthen/clj-cb | fixtures.clj | (ns earthen.clj-cb.fixtures
(:require [clojure.test :refer :all]
[earthen.clj-cb.cluster :as c]))
(def cluster (atom nil))
(def bucket-name "earthen_test")
(def default-bucket-settings {:name bucket-name
:type :COUCHBASE
:quota 100
... | null | https://raw.githubusercontent.com/Earthen/clj-cb/aaf7db4bfd26a1d6506b980d6cae6399c3776751/test/earthen/clj_cb/fixtures.clj | clojure | [f]
(c/remove-bucket! manager bucket-name)
(let [create-bucket (c/insert-bucket! manager default-bucket-settings)
get-bucket (fn [name] (->> (c/buckets manager) (some #(if (= (:name %) name) %))))
manager (c/manager cluster {:username "earthen" :password "earthen"})]
(f))) | (ns earthen.clj-cb.fixtures
(:require [clojure.test :refer :all]
[earthen.clj-cb.cluster :as c]))
(def cluster (atom nil))
(def bucket-name "earthen_test")
(def default-bucket-settings {:name bucket-name
:type :COUCHBASE
:quota 100
... |
22d527c83dd3df1914e8139cef8aecd1f2fd8ff6704ce4cddf77a5eac297545a | jrm-code-project/LISP-Machine | load.lisp | -*- Mode : LISP ; Package : USER ; : CL ; -*-
(LET* ((P (SEND FS:FDEFINE-FILE-PATHNAME :TRANSLATED-PATHNAME))
(H (SEND P :HOST))
(W (SEND P :NEW-PATHNAME
:NAME :WILD :TYPE :WILD :VERSION :WILD))
(D (IF (ATOM (SEND P :DIRECTORY)) (LIST (SEND P :DIRECTORY)) (SEND P :DIRECTORY)))... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjcx/ts/load.lisp | lisp | Package : USER ; : CL ; -*- |
(LET* ((P (SEND FS:FDEFINE-FILE-PATHNAME :TRANSLATED-PATHNAME))
(H (SEND P :HOST))
(W (SEND P :NEW-PATHNAME
:NAME :WILD :TYPE :WILD :VERSION :WILD))
(D (IF (ATOM (SEND P :DIRECTORY)) (LIST (SEND P :DIRECTORY)) (SEND P :DIRECTORY)))
(LH "TS"))
(FORMAT T "~&;; Logical host ... |
07ff8b10697520f8701b63ea16632ce4104fbde42c6177b4480c7420c86d6131 | alanzplus/EOPL | a11.rkt | #lang racket
(require "mk.rkt")
(defrel (apply-Go G e t)
(fresh (a G^)
(== `(,a . ,G^) G)
(fresh (aa da)
(== `(,aa . ,da) a)
(conde
((== aa e) (== da t))
((=/= aa e) (apply-Go G^ e t))))))
(defrel (!- G e t)
(conde
((numbero e) (== 'Nat t))
((== t 'Bool)
(conde
((=... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/Indiana-CS311/a11-Type%20Inference/a11.rkt | racket | #lang racket
(require "mk.rkt")
(defrel (apply-Go G e t)
(fresh (a G^)
(== `(,a . ,G^) G)
(fresh (aa da)
(== `(,aa . ,da) a)
(conde
((== aa e) (== da t))
((=/= aa e) (apply-Go G^ e t))))))
(defrel (!- G e t)
(conde
((numbero e) (== 'Nat t))
((== t 'Bool)
(conde
((=... | |
2592fa35b00931912f4574ed30e75b3ee4b42af5d9c4ac164e816f6902af1580 | typedclojure/typedclojure | apply.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.checker/src/typed/cljc/checker/check/apply.clj | clojure | 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 this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.cljc.checker.check.apply
(:require [clojure.core.typed.util-vars :as vs]
[typed.cljc.checker.type-rep :as r]
[typed.cljc.checker.utils :as u]
[clojure.core.typed.errors :as err]
[typed.clj.checker.parse-unparse :as ... |
7304fd11416e95b1f8f3c8835a74bf9a0b00130c2b91e5c72e64465276a25209 | hjcapple/reading-sicp | binary_tree_set.scm | #lang racket
;; P105 - [集合作为二叉树]
(define (entry tree)
(car tree))
(define (left-branch tree)
(cadr tree))
(define (right-branch tree)
(caddr tree))
(define (make-tree entry left right)
(list entry left right))
(define (element-of-set? x set)
(cond ((null? set) false)
((= x (entry set)) true)
... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_2/binary_tree_set.scm | scheme | P105 - [集合作为二叉树]
| #lang racket
(define (entry tree)
(car tree))
(define (left-branch tree)
(cadr tree))
(define (right-branch tree)
(caddr tree))
(define (make-tree entry left right)
(list entry left right))
(define (element-of-set? x set)
(cond ((null? set) false)
((= x (entry set)) true)
((< x (entry se... |
95b0b3e9edced1b9ff2741f51e26a3b9320e0a893eed5c0cc53a8cf4d5ce5529 | facebookarchive/hs-zstd | DictionaryCompression.hs | module Main (main) where
import Codec.Compression.Zstd.Efficient
import Control.Monad (forM_)
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import System.FilePath (addExtension, splitExtension)
import System.IO (hPutStrLn, stderr)
import qualified Data.ByteString as B
main :: IO ()... | null | https://raw.githubusercontent.com/facebookarchive/hs-zstd/ae7f174bb614a2fb71cfbb36e93a136ff9430fd7/examples/low-level/DictionaryCompression.hs | haskell | module Main (main) where
import Codec.Compression.Zstd.Efficient
import Control.Monad (forM_)
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import System.FilePath (addExtension, splitExtension)
import System.IO (hPutStrLn, stderr)
import qualified Data.ByteString as B
main :: IO ()... | |
b9383281c666ca0a691ed0863fa9c1af03d50a48ea753feda941392d44b1d10d | maitria/avi | documents.clj | (ns avi.documents
(:refer-clojure :exclude [load])
(:require [clojure.spec :as s]
[avi.edit-context
[lines :as lines]]
[avi.world :as w])
(:import (java.io FileNotFoundException)))
(s/def ::name string?)
(s/def ::text string?)
(s/def ::in-transaction? boolean?)
(s/def ::undo-entry... | null | https://raw.githubusercontent.com/maitria/avi/c641e9e32af4300ea7273a41e86b4f47d0f2c092/src/avi/documents.clj | clojure | (ns avi.documents
(:refer-clojure :exclude [load])
(:require [clojure.spec :as s]
[avi.edit-context
[lines :as lines]]
[avi.world :as w])
(:import (java.io FileNotFoundException)))
(s/def ::name string?)
(s/def ::text string?)
(s/def ::in-transaction? boolean?)
(s/def ::undo-entry... | |
16079f19e99f5e0b719491aae34faf7b28ecea31cf046785796c67024a88c374 | ekmett/ekmett.github.com | Ring.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ring
Copyright : ( c ) 2009
-- License : BSD-style
-- Maintainer :
-- Stability ... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/monoids/_darcs/pristine/Data/Ring.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Ring
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable (instances use MPTCs)
See </~ccshan/wiki/blog/posts/WordNumbers1/>
----------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
Copyright : ( c ) 2009
Defines left- and right- seminearrings . Every ' MonadPlus ' wrapped around
a ' Monoid ' qualifies due to the distributivity of ( > > =) over ' ' .
module Data.Ring
... |
3e97951b28c0b39fc2563554b43a5202884df55711d7c468c9e06eab278e48ea | AccelerateHS/accelerate-examples | Issue286.hs | --
--
module Test.Issues.Issue286 (test_issue286)
where
import Config
import Test.Framework
import Test.Framework.Providers.HUnit
import Prelude as P
import Data.Array.Accelerate as A hiding ( (>->), (==) )
import Data.Array.Accel... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/nofib/Test/Issues/Issue286.hs | haskell |
module Test.Issues.Issue286 (test_issue286)
where
import Config
import Test.Framework
import Test.Framework.Providers.HUnit
import Prelude as P
import Data.Array.Accelerate as A hiding ( (>->), (==) )
import Data.Array.Accelerate.I... | |
5d964889f865d4597a7efdea30c90a9d0a1ed496290ba838fedcf27f099192e6 | rabbitmq/khepri | timeout.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(timeout).
-include_lib("eunit/include/eunit.... | null | https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/timeout.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved .
-module(timeout).
-include_lib("eunit/include/eunit.hrl").... | |
fe8525f57942d2bd67016fda3a6045af80b21da3147e2461979bcad17d0ef9ee | wavewave/hoodle | HitTest.hs | -- deprecated. will be removed
module Graphics.Hoodle.Render.Type.HitTest
( AlterList (..), -- re-export
NotHitted (..), -- re-export
Hitted (..), -- re-export
TAlterHitted, -- re-export
TEitherAlterHitted (..), -- re-export
getA, -- re-export
getB, -- re-export
interleave, -- re-export
... | null | https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/render/src/Graphics/Hoodle/Render/Type/HitTest.hs | haskell | deprecated. will be removed
re-export
re-export
re-export
re-export
re-export
re-export
re-export
re-export
re-export
re-export
|
|
|
| | module Graphics.Hoodle.Render.Type.HitTest
StrokeHitted,
RItemHitted,
takeFirstFromHitted,
takeLastFromHitted,
)
where
import Data.Hoodle.BBox (BBoxed)
import Data.Hoodle.Simple (Stroke)
import Graphics.Hoodle.Render.Type.Item (RItem)
import Hoodle.HitTest.Type
( AlterList (..),
Hitted (..),
... |
94b3713d3e85479dcdbbaf1fed98fced16bdaa7c844860b0c7e734dbe1c5ca0d | wingo/fibers | concurrent-web-hello.scm | (use-modules (fibers web server))
(define (handler request body)
(values '((content-type . (text/plain)))
"Hello, World!"))
(run-server handler)
| null | https://raw.githubusercontent.com/wingo/fibers/44d17e64e581fb281bae1390f74c762ecf089b58/examples/concurrent-web-hello.scm | scheme | (use-modules (fibers web server))
(define (handler request body)
(values '((content-type . (text/plain)))
"Hello, World!"))
(run-server handler)
| |
c903178207e4c0fa743e628534028451b8351404690a867e850536e13ae969b5 | kovasb/gamma-driver | arraybuffer.cljs | (ns gamma.webgl.model.arraybuffer
(:require [gamma.webgl.model.core :as m]))
(defn ->float32 [x]
(js/Float32Array.
(clj->js (flatten x))))
(defn arraybuffer-data [gl bo mode data]
(.bindBuffer gl (.-ARRAY_BUFFER gl) bo)
(.bufferData
gl
(.-ARRAY_BUFFER gl)
data
(.-STATIC_DRAW gl)))
(def... | null | https://raw.githubusercontent.com/kovasb/gamma-driver/abe0e1dd01365404342f4e8e04263e48c4648b6e/src/gamma/webgl/model/arraybuffer.cljs | clojure | (not (compare (:data p) v)) | (ns gamma.webgl.model.arraybuffer
(:require [gamma.webgl.model.core :as m]))
(defn ->float32 [x]
(js/Float32Array.
(clj->js (flatten x))))
(defn arraybuffer-data [gl bo mode data]
(.bindBuffer gl (.-ARRAY_BUFFER gl) bo)
(.bufferData
gl
(.-ARRAY_BUFFER gl)
data
(.-STATIC_DRAW gl)))
(def... |
7090aa41ca5a2a0629342b8c16c21606eb71ec8b6c594f4f956cb2f837c71a12 | omelkonian/AlgoRhythm | TMusic.hs | {-# LANGUAGE PostfixOperators #-}
# LANGUAGE ScopedTypeVariables #
module TMusic where
import Control.Arrow ((>>>))
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework.Providers.QuickCheck2 (testProperty)
i... | null | https://raw.githubusercontent.com/omelkonian/AlgoRhythm/fdc1ccbae0b3d8a7635b24d37716123aba2d6c11/AlgoRhythm/test/TMusic.hs | haskell | # LANGUAGE PostfixOperators # | # LANGUAGE ScopedTypeVariables #
module TMusic where
import Control.Arrow ((>>>))
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit ... |
aa3f93b323739cbf31577061a194a259bb60cf196307924312316eddb5c405e6 | redstarssystems/gantt | router.clj | (ns org.rssys.gantt.web.router
(:require
[reitit.ring]))
(def ^{:doc "Routes for health checks, like liveness / readiness probes."}
health-routes
["/health"
["/alive" {:handler (constantly {:status 200 :headers {"Content-Type" "text/plain"} :body "ok"})}]
["/ready" {:handler (constantly {:status 200 ... | null | https://raw.githubusercontent.com/redstarssystems/gantt/f419eed2bef7f2bfac8a4c06849ddc75ec0650fb/src/org/rssys/gantt/web/router.clj | clojure | (ns org.rssys.gantt.web.router
(:require
[reitit.ring]))
(def ^{:doc "Routes for health checks, like liveness / readiness probes."}
health-routes
["/health"
["/alive" {:handler (constantly {:status 200 :headers {"Content-Type" "text/plain"} :body "ok"})}]
["/ready" {:handler (constantly {:status 200 ... | |
2d33c2c06aab42bd2bc254f57200590219197f5549e9be2ce7731e2056dc0193 | FranklinChen/hugs98-plus-Sep2006 | Path.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.Win32.GDI.Path
Copyright : ( c ) , 1997 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : Vuokko < >
-- Stability : provisional
-- Portability : port... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/Win32/Graphics/Win32/GDI/Path.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Win32.GDI.Path
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
-----... | Copyright : ( c ) , 1997 - 2003
Maintainer : Vuokko < >
A collection of FFI declarations for interfacing with Win32 .
module Graphics.Win32.GDI.Path
( beginPath, closeFigure, endPath, fillPath, flattenPath
, pathToRegion, strokeAndFillPath, strokePath, widenPath
) where
import Graphics.Win32.GD... |
d5d36375d6dc4dd5555900aef3b1401050dea672232c5880dccb11d6c8449282 | JustusAdam/language-haskell | T0146c.hs | SYNTAX TEST " source.haskell " " Highlighting in multiline data declarations "
data D
= MethodCall "getDecks" Cards
| null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0146c.hs | haskell | SYNTAX TEST " source.haskell " " Highlighting in multiline data declarations "
data D
= MethodCall "getDecks" Cards
| |
ac2302034906275ee843746e5c39490f2e51626011206acf34a6cb140ab8b1e3 | input-output-hk/project-icarus-importer | QuickCheck.hs | -- | Wrappers around Test.QuickCheck that use 'Buildable' instead of 'Show'
--
-- Intended as a drop-in replacement for "Test.QuickCheck" (but only for the
-- test drivers; the properties themselves should just use "Test.QuickCheck").
module Util.Buildable.QuickCheck (
-- * Wrappers
forAll
-- * Re-exports
... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/unit/Util/Buildable/QuickCheck.hs | haskell | | Wrappers around Test.QuickCheck that use 'Buildable' instead of 'Show'
Intended as a drop-in replacement for "Test.QuickCheck" (but only for the
test drivers; the properties themselves should just use "Test.QuickCheck").
* Wrappers
* Re-exports
-------------------------------------------------------------------... | module Util.Buildable.QuickCheck (
forAll
, QC.Property
, QC.Gen
, QC.conjoin
, QC.choose
) where
import qualified Test.QuickCheck as QC
import Universum
import Util.Buildable
forAll :: (Buildable a, QC.Testable prop)
=> QC.Gen a -> (a -> prop) -> QC.Property
forAll gen f = ... |
16dc0be1b49f11908dbc0ba9916694298baa8cdbbdd1c597675ae1fe1810f0ac | ocaml-gospel/gospel | dterm.ml | (**************************************************************************)
(* *)
GOSPEL -- A Specification Language for OCaml
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/1662d614cbd171df757d2b3fed6cd9e76aead56d/src/dterm.ml | ocaml | ************************************************************************
(as described in file LICE... | GOSPEL -- A Specification Language for OCaml
Copyright ( c ) 2018- The VOCaL Project
This software is free software , distributed under the MIT license
module W = Warnings
open Ppxlib
open Utils
open Identifier
open Ttypes
open Symbols
open Tterm... |
11b5f7184cf66b035a533a01a62638428f4e430e5096428b9d46b0d7733d6de1 | DSLsofMath/DSLsofMath | PropositionalLogic_code.hs | # LANGUAGE TypeOperators #
# LANGUAGE EmptyCase #
module DSLsofMath.PropositionalLogic where
data Prop = Implies Prop Prop | And Prop Prop | Or Prop Prop
| Not Prop | Name Name | Con Bool
deriving (Eq, Show)
type Name = String
p1, p2, p3, p4 :: Prop
p1 ... | null | https://raw.githubusercontent.com/DSLsofMath/DSLsofMath/18f6622b075771fefd6290ce20b1471d51435720/L/02/PropositionalLogic_code.hs | haskell | "\quad"
incorrect proof
>>> checkProof conjunctionCommProof conjunctionComm
True
>>> checkProof conjunctionCommProof2 conjunctionComm
False
""
a proof of |False| wanted
to prove this, we can ...
... assume |Not (Or p (Not p))| and prove falsity.
because we assumed it earlier! | # LANGUAGE TypeOperators #
# LANGUAGE EmptyCase #
module DSLsofMath.PropositionalLogic where
data Prop = Implies Prop Prop | And Prop Prop | Or Prop Prop
| Not Prop | Name Name | Con Bool
deriving (Eq, Show)
type Name = String
p1, p2, p3, p4 :: Prop
p1 ... |
aa3ba5d57e529ee080e73edf5551aaed36b863b7bbcfc201ad8a5339248c1dcf | vernemq/vernemq | vmq_diversity_bcrypt.erl | Copyright 2018 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_diversity/src/vmq_diversity_bcrypt.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 2018 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_bcrypt).
-include_lib("luerl/include/luerl.hrl").
-export([install/1]).
install(St) ->
luerl_emul... |
bd6af67cc2c1b485ee57b5e3f215b6817359f1602fa31081dad03f6f44ec3b63 | marcelosousa/llvmvf | Instruction.hs | # LANGUAGE UnicodeSyntax , DoAndIfThenElse #
-------------------------------------------------------------------------------
-- Module : Analysis.Type.Inference.Instruction
Copyright : ( c ) 2013
-- Type Constraints Instruction
-------------------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/marcelosousa/llvmvf/c314e43aa8bc8bb7fd9c83cebfbdcabee4ecfe1b/src/Analysis/Type/Inference/Instruction.hs | haskell | -----------------------------------------------------------------------------
Module : Analysis.Type.Inference.Instruction
Type Constraints Instruction
-----------------------------------------------------------------------------
τℂ ∷ → PHI → ℂState
lift type
constraint the id to type τα
get values
compute ... | # LANGUAGE UnicodeSyntax , DoAndIfThenElse #
Copyright : ( c ) 2013
module Analysis.Type.Inference.Instruction where
import Language.LLVMIR hiding (Id)
import Language.LLVMIR.Util (typeOf)
import Analysis.Type.Inference.Base
import Analysis.Type.Memory.Util
import Analysis.Type.Memory.TyAnn as T
import Analysis... |
77ef9c678e9eca74b0352de87ce45bbf1cea19924683afbf1c9fa81336c45757 | ocamllabs/ocaml-modular-implicits | t092-pushacc6.ml | open Lib;;
let x = false in
let y = true in
let z = true in
let a = true in
let b = true in
let c = true in
let d = true in
if x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST0
10 PUSHCONST1
11 PUSHCONST1
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t092-pushacc6.ml | ocaml | open Lib;;
let x = false in
let y = true in
let z = true in
let a = true in
let b = true in
let c = true in
let d = true in
if x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST0
10 PUSHCONST1
11 PUSHCONST1
... | |
11ec8ee16502521f38573e5f99bccea965b0942b0233630251baf2a0ff74e311 | ChaosCabbage/very-lazy-boy | Viewers.hs | module Viewers (
viewCPU
, viewStack
, viewMem
, viewMem16
) where
import qualified CPU.Instructions as Ops
import CPU.FrozenEnvironment (FrozenCPUEnvironment(..), readFrzMemory)
import CPU.Types (Address)
import BitTwiddling (joinBytes)
import Text.Printf (printf)
import Data.Word (Word8, Word16... | null | https://raw.githubusercontent.com/ChaosCabbage/very-lazy-boy/53ec41a3ff296e9d602b73fee33a512126c8a8b4/src/Viewers.hs | haskell | A basic view showing the registers, flags and the next instruction:
A F B C D E H L SP
IME : ENABLED
Flags ZNHC
1011
Might be able to trace up the stack a bit,
but there's no way to tell where the base of the stack is.
| module Viewers (
viewCPU
, viewStack
, viewMem
, viewMem16
) where
import qualified CPU.Instructions as Ops
import CPU.FrozenEnvironment (FrozenCPUEnvironment(..), readFrzMemory)
import CPU.Types (Address)
import BitTwiddling (joinBytes)
import Text.Printf (printf)
import Data.Word (Word8, Word16... |
6ef810565849aa00a105900483b140fd155d9894e27174e200e15af88445b4ea | pierric/fei-nn | Optimizer.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE OverloadedLists #
# LANGUAGE UndecidableInstances #
module MXNet.NN.Optimizer where
import Control.Lens (use, (.=))
import GHC.Exts (Constraint)
import GHC.TypeLi... | null | https://raw.githubusercontent.com/pierric/fei-nn/0a78e31e98495a4ab5183ab1faabba5b0721280e/src/MXNet/NN/Optimizer.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ConstraintKinds #
| Abstract Optimizer type class
| Specific required arguments
| Specific optional arguments
type OptArgsList opt :: [KV *]
| make the optimizer
| run the optimizer with the input & expected tensor
optimizer
symbol name to optimize
parameter
g... | # LANGUAGE OverloadedLists #
# LANGUAGE UndecidableInstances #
module MXNet.NN.Optimizer where
import Control.Lens (use, (.=))
import GHC.Exts (Constraint)
import GHC.TypeLits
import RIO
import qualified RIO.HashMap as M
im... |
fb386c10621b64dc11626afba4c054f4c37257a7f7e8b3bc6ce2f34cdc1b78a4 | google/lisp-koans | clos.lisp | Copyright 2013 Google Inc.
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by applicable law or agreed to in writing, software
distrib... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans/clos.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
CLOS is a shorthand for Common Lisp Object System .
(defclass racecar ()
(color speed))
(define-test defclass
(let ((car-1 (make-instance 'racecar))
(car-2 (make-instance 'racecar)))
Slot values can be... |
136b10215f0ad40128534a4894650a497984e08f8758c625379c5cd1daf31204 | SamB/coq | environ.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/kernel/environ.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
i
i
s Unsafe environments. ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open ... |
7c2a6e508f6d578e85ff9944bcd464cdaac6f568596f7965897602ce8007a2d2 | Eduap-com/WordMat | cgrind.lisp | (in-package :maxima)
(macsyma-module cgrind)
This is heavily lifted from grind.lisp and fortra.lisp , and should have the
;; same features as the fortran command. In order to work it needs to be compiled and
then loaded , as in ( for the case of cmucl ):
: lisp ( compile - file " cgrind.lisp " ) , copy cgrind.s... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/contrib/cgrind.lisp | lisp | same features as the fortran command. In order to work it needs to be compiled and
load(cgrind)
Then one can run cgrind(expression) or cgrind(matrix).
checked to be a single expression. Then if the argument is a
symbol, and the symbol is bound to a matrix, the matrix is printed
using an array assignment notation.... | (in-package :maxima)
(macsyma-module cgrind)
This is heavily lifted from grind.lisp and fortra.lisp , and should have the
then loaded , as in ( for the case of cmucl ):
: lisp ( compile - file " cgrind.lisp " ) , copy cgrind.sse2f to ~/.maxima
( 2011 )
If NIL , no load message gets printed .
This funct... |
6d1dbf6fc4d7bbda22f39cc0b5ad32cc7c2c38bb9c45f3e68af8d09407772fff | timjb/halma | Types.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
module Game.Halma.TelegramBot.Model.Types
( Player (..)
... | null | https://raw.githubusercontent.com/timjb/halma/0267d636dbed0de03d2d6527ca35458637a0021c/halma-telegram-bot/src/Game/Halma/TelegramBot/Model/Types.hs | haskell | # LANGUAGE OverloadedStrings #
^ has another player finished in the same round?
^ number of moves after winner
^ in Unix time | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
module Game.Halma.TelegramBot.Model.Types
( Player (..)
, PartyResult (..)
, ExtendedPart... |
b7b37889d8c4b508afc91be75fc9e27286d622111f84b2c0535f4eefc667c088 | polytypic/rea-ml | SeqLazy.ml | open Rea
module Seq : sig
include module type of Stdlib.Seq
include module type of StdRea.Seq
end = struct
include Stdlib.Seq
include StdRea.Seq
end
let () =
let n_calls = ref 0 in
assert (
(let+ x = iota 1000000000000000 in
incr n_calls;
x + 1)
|> run Seq.monad_plus |> Seq.of_rea
|>... | null | https://raw.githubusercontent.com/polytypic/rea-ml/9849c3cf602702bc0cf0a955866b7932eb62a4bf/src/test/Rea/SeqLazy.ml | ocaml | open Rea
module Seq : sig
include module type of Stdlib.Seq
include module type of StdRea.Seq
end = struct
include Stdlib.Seq
include StdRea.Seq
end
let () =
let n_calls = ref 0 in
assert (
(let+ x = iota 1000000000000000 in
incr n_calls;
x + 1)
|> run Seq.monad_plus |> Seq.of_rea
|>... | |
1e1e80f6740026adc45ece1116328766bd50c6f650ab0c71602e0885176b73df | biocaml/biocaml | histogram.mli | * Histograms with polymorphic bin types .
A histogram is a list of bins , each with a count . [ i ] is
defined by a lower limit [ lo(i ) ] and an upper limit [ hi(i ) ] . It is
inclusive of the lower limit and exclusive of the upper limit . For
all [ i ] , [ hi(i ) = lo(i+1 ) ] . By convention... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/histogram.mli | ocaml | * Copy histogram.
* [bin hist i] returns the [i]th bin of [hist].
* [bin hist i] returns the [i]th bin of [hist]. Raise
[Invalid_argument] if an invalid bin number is requested.
* [count hist i] returns the count the [i]th bin.
* [count hist i] returns the count the [i]th bin. Raise
[Invalid_argument] if an... | * Histograms with polymorphic bin types .
A histogram is a list of bins , each with a count . [ i ] is
defined by a lower limit [ lo(i ) ] and an upper limit [ hi(i ) ] . It is
inclusive of the lower limit and exclusive of the upper limit . For
all [ i ] , [ hi(i ) = lo(i+1 ) ] . By convention... |
12b8387a31564ab6268037be952df19f60c575350245a612c933c3984013f754 | TrustInSoft/tis-interpreter | hptmap.mli | (**************************************************************************)
(* *)
This file was originally part of Menhir
(* *)
and , ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/utils/hptmap.mli | ocaml | ************************************************************************
en Automatique. All rights... | This file was originally part of Menhir
and , INRIA Rocquencourt
Copyright 2005 Institut National de Recherche en Informatique et
under the terms of the Q Public License version 1.0 , with the
File modified by CEA ( Commissariat à l'énergie ... |
1e3de9c6b248219e69dfd42255bee32532566e6f04062499d3b96bb298386c5c | travelping/ergw | ergw_charging.erl | Copyright 2018 , Travelping GmbH < >
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_charging).
... | null | https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/src/ergw_charging.erl | erlang | This program is free software; you can redistribute it and/or
===================================================================
Options Validation
===================================================================
validate_rule_def('Service-Identifier', [Value] = V)
when is_integer(Value) ->
V;
V;
v... | Copyright 2018 , Travelping GmbH < >
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_charging).
-export([validate_profile/2, validate_rule/2, validate_rulebase/... |
8188236d250064ee04868857268a56cc978117747cd5d7f74b71aa28d551b9de | erlang-ls/erlang_ls | elvis_diagnostics.erl | -module(elvis_diagnostics).
-export([foo/2]).
%% Trigger some elvis warnings
-spec foo(any(),any()) -> any().
foo(_X,_Y) -> 3 .
| null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/36bf0815e35db5d25a76e80f98f306f25fff7d8c/apps/els_lsp/priv/code_navigation/src/elvis_diagnostics.erl | erlang | Trigger some elvis warnings | -module(elvis_diagnostics).
-export([foo/2]).
-spec foo(any(),any()) -> any().
foo(_X,_Y) -> 3 .
|
dd4b9f803c7b2f97e18e223762144c595169de7593618a73967937d0c152c479 | tweag/asterius | CmmSwitchTestGen.hs | # LANGUAGE TupleSections #
-- Generates CmmSwitchTest.hs
import qualified Data.Set as S
import Data.Int
import Data.Word
import Data.List
import System.Environment
output :: Integer -> Integer
output n = n`div`2 + 42
def :: Integer
def = 1337
data Bits = X32 | X64
deriving Eq
type Spec = (String, Bool, [Intege... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/CmmSwitchTestGen.hs | haskell | Generates CmmSwitchTest.hs
Use IO to avoid lazy parsing | # LANGUAGE TupleSections #
import qualified Data.Set as S
import Data.Int
import Data.Word
import Data.List
import System.Environment
output :: Integer -> Integer
output n = n`div`2 + 42
def :: Integer
def = 1337
data Bits = X32 | X64
deriving Eq
type Spec = (String, Bool, [Integer], Bits)
primtyp True = "Int... |
a941104d143da397d7b2673d8e3462e19d920f4458cb5500a227345906d9e2a5 | teamwalnut/graphql-ppx | custom_decoder.ml | open Test_shared
module IntOfString = struct
let parse = int_of_string
let serialize = string_of_int
type t = int
end
module StringOfInt = struct
let parse = string_of_int
let serialize = int_of_string
type t = string
end
module My_query =
[%graphql
{|
{
variousScalars {
string @ppxDecoder(... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/tests_native/custom_decoder.ml | ocaml | open Test_shared
module IntOfString = struct
let parse = int_of_string
let serialize = string_of_int
type t = int
end
module StringOfInt = struct
let parse = string_of_int
let serialize = int_of_string
type t = string
end
module My_query =
[%graphql
{|
{
variousScalars {
string @ppxDecoder(... | |
dbe3700d219537d9ced2f4aa7697183d1d52134b169e3bd1548ffd26e0fef86e | penpot/penpot | viewport.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.viewport
(:require
[app.common.colors :as clr]
[app.common.data :as d]
[a... | null | https://raw.githubusercontent.com/penpot/penpot/0e585cd585af68829e86868cda494139a02b32f1/frontend/src/app/main/ui/workspace/viewport.cljs | clojure |
Copyright (c) KALEIDOS INC
--- Viewport
When adding data from workspace-local revisit `app.main.ui.workspace` to check
that the new parameter is sent
CONTEXT
DEREFS
STATE
REFS
STREAMS
The behaviour inside a foreign object is a bit different that in plain HTML so we wrap
inside a foreign object "dummy" so th... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.workspace.viewport
(:require
[app.common.colors :as clr]
[app.common.data :as d]
[app.common.data.macros :as dm]
... |
fcb7cf8f0827b2a1402a5487387403e61e00121e0dbfef051acfddc877b6c2f6 | softlab-ntua/bencherl | db_generator.erl | 2010 - 2011 Zuse Institute Berlin
% @end
%
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, softw... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/test/db_generator.erl | erlang | @end
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 lang... | 2010 - 2011 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 < >
@doc construction .
Created : 15/11/2011 by < >
-module(db_generator).
-include("scalaris.hrl").
-exp... |
0be22a443fb5820f67faf4b4fc537dac7db80d9b7ef1ee58ea5ddcbe937949f2 | nikodemus/SBCL | ir1opt.lisp | ;;;; This file implements the IR1 optimization phase of the compiler.
;;;; IR1 optimization is a grab-bag of optimizations that don't make
;;;; major changes to the block-level control flow and don't use flow
;;;; analysis. These optimizations can mostly be classified as
;;;; "meta-evaluation", but there is a sizable t... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/ir1opt.lisp | lisp | This file implements the IR1 optimization phase of the compiler.
IR1 optimization is a grab-bag of optimizations that don't make
major changes to the block-level control flow and don't use flow
analysis. These optimizations can mostly be classified as
"meta-evaluation", but there is a sizable top-down component as... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
Return true for an LVAR whose sole use is a reference to a
(defun constant-lvar-p (thing)
(declare... |
7b1be3b1fafeea98c96b2e69be7a90577bbeebbcb4c00ae769bd19e7b70cd717 | functionally/pigy-genetics | Mint.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
Copyright : ( c ) 2021
License : MIT
--
Maintainer : < >
-- Stability : Experimental
Portability : Portable
--
-- | Minting image tokens.
--
-----------------------------------... | null | https://raw.githubusercontent.com/functionally/pigy-genetics/ed2784faabfa77d8a94a147e9f7b11cac0f545b6/app/Pigy/Chain/Mint.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
| Minting image tokens.
---------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
* Minting
* Validation
* Filtering
| Validate inp... | Copyright : ( c ) 2021
License : MIT
Maintainer : < >
Portability : Portable
# LANGUAGE NumericUnderscores #
# LANGUAGE RecordWildCards #
module Pigy.Chain.Mint (
mint
, checkValue
, pigFilter
, findPigs
) where
import Cardano.Api (Addr... |
a3e0fb72bf497d70de0895f64bbcc362bb1d40ea22d6334281beb47c5f150fb5 | Bwooce/open-cgf | cdr_file_srv.erl | %%%-------------------------------------------------------------------
File : cdr_file_srv.erl
Author : < >
%%% Description :
%%%
Created : 27 Jan 2008 by < >
%%%
Copyright 2008
%%%
%%% This file is part of open-cgf.
%%%
%%% open-cgf is free software: you can redistribute it and/or modify
it und... | null | https://raw.githubusercontent.com/Bwooce/open-cgf/929f7e280493ca4bc47be05bb931044ee1321594/src/cdr_file_srv.erl | erlang | -------------------------------------------------------------------
Description :
This file is part of open-cgf.
open-cgf is free software: you can redistribute it and/or modify
open-cgf is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANT... | File : cdr_file_srv.erl
Author : < >
Created : 27 Jan 2008 by < >
Copyright 2008
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have received a copy of the GNU General Public License
-module(cdr_file_srv).
-behaviour(... |
36bea65150b1f17ca30ae9eb431aa7d87bf69fbd012c77ca41d16aefe1b89d79 | stopachka/bel-clojure | model.clj | (ns bel-clojure.model
(:refer-clojure :rename {type clj-type
symbol? clj-symbol?
string? clj-string?
char? clj-char?
number? clj-number?})
(:import
(java.util ArrayList)))
;; ----
;; Misc
(defn first-and... | null | https://raw.githubusercontent.com/stopachka/bel-clojure/d1bb33d1cf498c5f7fd7e9a9bfb8d2c57e2fc5b3/src/bel_clojure/model.clj | clojure | ----
Misc
-------------
Primitive Types
---------
Pair Cons
---------
Constants
-------------
Pair Helpers
---------
Variable
---------
Optional
---------
-------
----
Maps | (ns bel-clojure.model
(:refer-clojure :rename {type clj-type
symbol? clj-symbol?
string? clj-string?
char? clj-char?
number? clj-number?})
(:import
(java.util ArrayList)))
(defn first-and-only [xs msg]
... |
dea4a90d5e6cf65ea7de2c7c704bed93620a9ca64a170777fdbeb6dd6ac19ccd | logseq/deprecated-github-backend | interceptors.clj | (ns app.interceptors
(:require [io.pedestal.interceptor :refer [interceptor]]
[io.pedestal.interceptor.helpers :as helpers]
[io.pedestal.http.ring-middlewares :as ring-middlewares]
[app.cookie :as cookie]
[app.jwt :as jwt]
[app.db.user :as u]
[ap... | null | https://raw.githubusercontent.com/logseq/deprecated-github-backend/7aa2f187f0f2d7b1e9c3f6a057bede939b4790b7/src/main/app/interceptors.clj | clojure | move to a separate handler helper
token is expired | (ns app.interceptors
(:require [io.pedestal.interceptor :refer [interceptor]]
[io.pedestal.interceptor.helpers :as helpers]
[io.pedestal.http.ring-middlewares :as ring-middlewares]
[app.cookie :as cookie]
[app.jwt :as jwt]
[app.db.user :as u]
[ap... |
b12f5adedcabc072eccc214d3a6bbaa0001b46447cd1031ea5ec331badd39cbd | Haskell-Things/HSlice | Motorcycles.hs | {- ORMOLU_DISABLE -}
- Copyright 2021
-
- This program is free software : you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation , either version 3 of the License , or
- ( at your option ) any later version .... | null | https://raw.githubusercontent.com/Haskell-Things/HSlice/09389e9f31d39e7f2fa126d2390028253bb43056/Graphics/Slicer/Math/Skeleton/Motorcycles.hs | haskell | ORMOLU_DISABLE
Purpose of this file: to hold the logic and routines required for coliding
motorcycles, making motorcycle graphs, and generally reasoning about
motorcycles.
inherit instances when deriving.
| the type of collision.
only normal collisions (motorcycle intersects the other motorcycle's path) ar... |
- Copyright 2021
-
- This program is free software : you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation , either version 3 of the License , or
- ( at your option ) any later version .
-
- This progr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.