_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 |
|---|---|---|---|---|---|---|---|---|
81b1fa271c0260c54328f65f9569c83a226b0a31a5029b978e52f41d5d540321 | Zilliqa/scilla-compiler | ClosureConversion.ml |
This file is part of scilla .
Copyright ( c ) 2019 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... | null | https://raw.githubusercontent.com/Zilliqa/scilla-compiler/ac42584ec49a25c917a5ec4e6404b0c953b8e711/src/astlowering/ClosureConversion.ml | ocaml | A small utility to generate env alloc and env store statements.
TODO: This is potentially quadratic. The way to fix it is to have
an accumulator. But that will require accummulating in the reverse
order and calling List.rev at at end.
Push the gas charge to inside the body of the function... |
This file is part of scilla .
Copyright ( c ) 2019 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... |
af2736eaf0303879925acbbbd35eade062ca98b04996b092c04691341fc116c0 | bzliu94/cs61a_fa07 | serial.scm | (define (make-serializer)
(let ((mutex (make-mutex)))
(lambda (p)
(define (serialized-p . args)
(mutex 'acquire)
(let ((val (apply p args)))
(mutex 'release)
val))
serialized-p)))
(define (make-mutex)
(let ((cell (list false)))
(define (the-mutex ... | null | https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/01%20-%20homework/hw10/experiments/includes/serial.scm | scheme | (define (make-serializer)
(let ((mutex (make-mutex)))
(lambda (p)
(define (serialized-p . args)
(mutex 'acquire)
(let ((val (apply p args)))
(mutex 'release)
val))
serialized-p)))
(define (make-mutex)
(let ((cell (list false)))
(define (the-mutex ... | |
a86f5e99e76f1d8fbbd88a855b12d2c3be92b270d3e7bba5048a88d4796aeb15 | ghcjs/jsaddle-dom | PopStateEvent.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.PopStateEvent
(newPopStateEvent, getState, PopStateEvent(..), gTypePopStateEvent)
where
import Prelude ((.),... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/PopStateEvent.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.PopStateEvent
(newPopStateEvent, getState, PopStateEvent(..), gTypePopStateEvent)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFr... |
d715445164148fcfc3ee8aba18125f278d927f270a40c82bba42361e54e1970d | input-output-hk/cardano-ledger | Properties.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Test.Byron.Spec.Ledger.Relation.Properties (testRelation) where
import Byron.Spec.Ledger.Core hiding ((<|))
import Data.Bimap (Bimap)
import qualified Data.Bimap as Bimap
import Da... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/ledger/executable-spec/test/Test/Byron/Spec/Ledger/Relation/Properties.hs | haskell | # LANGUAGE OverloadedStrings #
| testProperty has been deprecated. We make our own version here.
------------------------------------------------------------------------------
Properties on Relations
------------------------------------------------------------------------------
| (dom r) ∩ s == dom (s ◁ r)
By res... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Test.Byron.Spec.Ledger.Relation.Properties (testRelation) where
import Byron.Spec.Ledger.Core hiding ((<|))
import Data.Bimap (Bimap)
import qualified Data.Bimap as Bimap
import Data.Map.Strict (Map)
import Data.Set... |
3f697929ffd648173e5b7e635ca7db1023e8fdce2e6279ed4fec589b44108be4 | mbutterick/aoc-racket | 03.rkt | #lang br
(require racket/file rackunit)
(define (trees-in-slope horiz vert)
(for/fold ([mod 0]
[sum 0]
#:result sum)
([(ln lidx) (in-indexed (file->lines "03.rktd"))]
#:when (zero? (modulo lidx vert)))
(values (+ mod horiz)
(if (char=? #\# (string-re... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2020/03.rkt | racket | #lang br
(require racket/file rackunit)
(define (trees-in-slope horiz vert)
(for/fold ([mod 0]
[sum 0]
#:result sum)
([(ln lidx) (in-indexed (file->lines "03.rktd"))]
#:when (zero? (modulo lidx vert)))
(values (+ mod horiz)
(if (char=? #\# (string-re... | |
f3f1f6dc48f6708c7a2b9a4c74f528ad6da4b74da2354133243182d273614b81 | binsec/binsec | riscv_arch.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/disasm/riscv/riscv_arch.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
c0b2779ecaf8e077c7208b892381f4f14c19983ded74cdcedaf946b2ca414d97 | owickstrom/komposition | InMemoryProjectStore.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInst... | null | https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/test/Komposition/Project/InMemoryProjectStore.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances # | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
module Komposition.Project.InMemoryProjectStore where
import Komposition.Prelude hiding (State, br... |
593face56d680fd8992c992dd2cc5f72f448035c84199de88962e352903e2b85 | racket/htdp | stop-when-crash.rkt | #lang racket
;; ---------------------------------------------------------------------------------------------------
;; the stop-when clause crashes. make sure that it signals a catchable error.
(require 2htdp/universe 2htdp/image)
(with-handlers ((exn:fail? void))
(big-bang 0
(on-draw (λ _ (empty-scene... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/2htdp/tests/stop-when-crash.rkt | racket | ---------------------------------------------------------------------------------------------------
the stop-when clause crashes. make sure that it signals a catchable error. | #lang racket
(require 2htdp/universe 2htdp/image)
(with-handlers ((exn:fail? void))
(big-bang 0
(on-draw (λ _ (empty-scene 500 500)))
(stop-when (λ _ (car '()))))
(displayln '(*** something went wrong in stop-when crash ***)))
|
59938cdedb2f8c1896d8935352d006df599b4969c06574f63db6fe95612a0589 | pixlsus/registry.gimp.org_static | 2dgradient_12.scm | ; This script is intended for use with
; GIMP - The GNU Image Manipulation Program
Copyright ( C ) 1995 and
;
2 - dimensional Gradient
; This script generates a new image containing a gradient based on the corners or edges of a rectangle.
Copyright ( C ) 2009
;
;
; This program is free software; you can re... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/2dgradient_12.scm | scheme | This script is intended for use with
GIMP - The GNU Image Manipulation Program
This script generates a new image containing a gradient based on the corners or edges of a rectangle.
This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any la... | Copyright ( C ) 1995 and
2 - dimensional Gradient
Copyright ( C ) 2009
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
1.0 Create 2 - D gradient script - fu... |
5419df20ca10f1ba58ff9a801a21242cd2e743af186e7db141786a64d7fb91db | mathematical-systems/clml | backends.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;; See the file LICENCE for licence information.
CL - STORE now has a concept of backends .
;; store and restore now take an optional backend as an
;; argument to do the actual restoring. Examples of use are
;; in default-backend.lisp and xml-backe... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/cl-store/backends.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
See the file LICENCE for licence information.
store and restore now take an optional backend as an
argument to do the actual restoring. Examples of use are
in default-backend.lisp and xml-backend.lisp |
CL - STORE now has a concept of backends .
(in-package :cl-store)
(defun required-arg (name)
(error "~S is a required argument" name))
(defclass backend ()
((name :accessor name :initform "Unknown" :initarg :name :type symbol)
(magic-number :accessor magic-number :initarg :magic-number :type integer)
(c... |
a84b8c7b71785831b0780609c8dd54899008de906e346dea182932ec493dcb1e | vbmithr/ocaml-thrift-lib | server.ml |
let () =
let iface = object
inherit Calculator.iface
method ping =
Printf.printf "server: got ping\n%!";
print_endline "ping"
method add i j =
Printf.printf "server: got add\n%!";
match i, j with
| Some i, Some j -> Int32.add i j
| _ -> failwith "missing arg"
met... | null | https://raw.githubusercontent.com/vbmithr/ocaml-thrift-lib/70669ce410e99389975384b46492f9a55281ca10/examples/server.ml | ocaml |
let () =
let iface = object
inherit Calculator.iface
method ping =
Printf.printf "server: got ping\n%!";
print_endline "ping"
method add i j =
Printf.printf "server: got add\n%!";
match i, j with
| Some i, Some j -> Int32.add i j
| _ -> failwith "missing arg"
met... | |
0f8d88a47f7b5e5bafa0f35984d1912ecb5fbbcccc39e6c20336e6875b8ca788 | relevance/labrepl | accounts_1.clj | (ns ^{:author "Stu Halloway"
:doc "BROKEN version of accounts example. total-balance does not read consistently"}
solutions.accounts-1)
(defn make-accounts
"Create a map of account-num->:initial-balance for :count numbered
accounts."
[{:keys [count initial-balance]}]
(zipmap (range count) (repeatedly (... | null | https://raw.githubusercontent.com/relevance/labrepl/51909dcb3eeb9f148eeae109316f7d73cc81512a/src/solutions/accounts_1.clj | clojure | (ns ^{:author "Stu Halloway"
:doc "BROKEN version of accounts example. total-balance does not read consistently"}
solutions.accounts-1)
(defn make-accounts
"Create a map of account-num->:initial-balance for :count numbered
accounts."
[{:keys [count initial-balance]}]
(zipmap (range count) (repeatedly (... | |
5ed21c240b8d43334e974ea170dfcf8b6037c0e08cf459ab8b53402abf92145c | stjahns/ripple | project.clj | (defproject ripple "0.1.0-SNAPSHOT"
:description "A Clojure game development framework"
:url ""
:license {:name "MIT License"
:url ""}
:dependencies [[com.badlogicgames.gdx/gdx "1.1.0"]
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.1.0"]
[com.badlogicgames.gdx/gdx-box... | null | https://raw.githubusercontent.com/stjahns/ripple/fdb4a8a29141ad5b46ec0560c329033b893eb319/project.clj | clojure | (defproject ripple "0.1.0-SNAPSHOT"
:description "A Clojure game development framework"
:url ""
:license {:name "MIT License"
:url ""}
:dependencies [[com.badlogicgames.gdx/gdx "1.1.0"]
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.1.0"]
[com.badlogicgames.gdx/gdx-box... | |
61807c685ce380d0c2b3a83ff355603449acb29c0282c0133b48013129b7f165 | rabbitmq/rabbitmq-peer-discovery-common | rabbit_peer_discovery_httpc.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 /.
%%
The Initial Developer of the Original Code is AWeber Communications .
Copyright ( c ) 2015 - 2016 AWeber Communications
Copyright ( c )... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-peer-discovery-common/02e664d07de5b2ce4589227cc14b8ef4142175a2/src/rabbit_peer_discovery_httpc.erl | erlang |
API
Export all for unit tests
where Scheme = string()
Host = string()
Port = integer()
Path = string()
@doc Build the request URI
@end
@doc Build the query parameters string from a proplist
@end
@where Scheme = string(),
Host = string(),
Port = integer(),
P... | 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 /.
The Initial Developer of the Original Code is AWeber Communications .
Copyright ( c ) 2015 - 2016 AWeber Communications
Copyright ( c ) 20... |
538b56c0ecca93aaa618779a348f1af66cd4c4a038177e9afa9f32bc8a4af440 | ml4tp/tcoq | eqdecide.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/tactics/eqdecide.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
b... |
ed634fad55020aa339614f73a9776f490dd2d421c57d203ff14f984a12dbd30c | ostinelli/pgpool | pgpool_app.erl | %% ==========================================================================================================
PGPool - A PosgreSQL client that automatically uses connection pools and reconnects in case of errors .
%%
The MIT License ( MIT )
%%
Copyright ( c ) 2016 - 2019 < > and Neato Robotics , Inc.
%%
%% Per... | null | https://raw.githubusercontent.com/ostinelli/pgpool/f733a321033ba85da12d4c27e408e6b7fb7b30cc/src/pgpool_app.erl | erlang | ==========================================================================================================
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, s... | PGPool - A PosgreSQL client that automatically uses connection pools and reconnects in case of errors .
The MIT License ( MIT )
Copyright ( c ) 2016 - 2019 < > and Neato Robotics , Inc.
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit pers... |
eec054c9ed5a529daae731501e2048b97c4aefb55aa6e6a029cf3557bb76969c | PEZ/pirate-lang | peano.clj | (ns pez.lab.sicp.peano)
(defn plus-a [x y]
(if (zero? x)
y
(plus-a (dec x) (inc y))))
(comment
(plus-a -4 5.5))
(defn plus-b [x y]
(if (zero? x)
y
(inc (plus-b (dec x) y))))
(comment
(plus-b 4.5 5.5))
| null | https://raw.githubusercontent.com/PEZ/pirate-lang/d8fe9402142f48ed958934718acd0c8ba5849b95/src/pez/lab/sicp/peano.clj | clojure | (ns pez.lab.sicp.peano)
(defn plus-a [x y]
(if (zero? x)
y
(plus-a (dec x) (inc y))))
(comment
(plus-a -4 5.5))
(defn plus-b [x y]
(if (zero? x)
y
(inc (plus-b (dec x) y))))
(comment
(plus-b 4.5 5.5))
| |
d3ab826ab1e78e2772d21443876f276a5902f098868b0eca3a18e7f51c62b717 | amnh/poy5 | clustalSeq.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2011 , , , Ward Wheeler
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/parser/clustalSeq.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2011 , , , Ward Wheeler
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
8379869f02ab48a343918c1d9175730c1bd759f72b040f4a541e3e644fea8a64 | agentbellnorm/dativity | core_test.cljc | (ns dativity.core-test
(:require
[ysera.test :refer [is= is is-not deftest testing]]
[dativity.core :as c]
[dativity.define :as d]))
(def case-graph
(d/create-model
{:actions [:create-case
:consent-to-personal-data-retrieval-and-storage
... | null | https://raw.githubusercontent.com/agentbellnorm/dativity/8d03d0a1ee7bf48397d900faef6f119649d95c83/test/dativity/core_test.cljc | clojure | (ns dativity.core-test
(:require
[ysera.test :refer [is= is is-not deftest testing]]
[dativity.core :as c]
[dativity.define :as d]))
(def case-graph
(d/create-model
{:actions [:create-case
:consent-to-personal-data-retrieval-and-storage
... | |
e3066469ed74f713403ede6737b3d39f2bd49fbb1632c5f6af41ed7cc53b2319 | inaka/lsl | lsl_auth.erl | %%% @doc Default rest handler auth implementation
-module(lsl_auth).
-author('').
-export([is_authorized/3]).
-type authorization_mechanism() :: none | player | session.
-export_type([authorization_mechanism/0]).
-type state() :: sr_state:state().
-export_type([state/0]).
-spec is_authorized(
[authorization_mecha... | null | https://raw.githubusercontent.com/inaka/lsl/fdb5690fa51bc2f7fe8b50a22caca78fd9d8a7a5/src/handlers/lsl_auth.erl | erlang | @doc Default rest handler auth implementation | -module(lsl_auth).
-author('').
-export([is_authorized/3]).
-type authorization_mechanism() :: none | player | session.
-export_type([authorization_mechanism/0]).
-type state() :: sr_state:state().
-export_type([state/0]).
-spec is_authorized(
[authorization_mechanism(), ...], cowboy_req:req(), state()) ->
{tru... |
16e729f9bf0e204b6bd9beadbb931c8d1d9c26e1b906fb02f3a72ad204d5f424 | evilmartians/foundry | fy_num.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ocaml-num/fy_num.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : num.mli 9547 2010 - 01 - 22 12:48:24Z d... |
f368d43f9b3352e3bdfc082517a21e3054d6f2d6d86fe01edc68409d26102687 | jiangpengnju/htdp2e | ex125.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex125) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/intermezzo-bsl/ex125.rkt | racket | about the language level of this file in a form that our tools can easily process.
Evaluate the following program, step by step:
Does the evaluation of the following program signal an error?
(define (fahrenheit->celsius f)
How about the next one?
A: | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex125) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define PRICE 5)
(define SALES-TAX (* 0.08 PRICE))
(define TOTAL ... |
b53a2bb20a673b0c058a1c6d1c1c497d1f396ffb904846435553a9894f86e5ce | locusmath/locus | object.clj | (ns locus.algebra.semigroup.element.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.quiver.relation.binary.sr :refer :all]
[locus.set.quiver.relation.binary.product :refer :all]
[locus.set.mapping.general.co... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/algebra/semigroup/element/object.clj | clojure | The category of semigroups is a concrete category. The Set-valued functor of the category of semigroups
maps any given semigroup to its class of morphisms. Therefore, we can refer to the morphisms of a semigroup
as the elements of a semigroup. We define these morphisms by the semigroup element class.
Composition of... | (ns locus.algebra.semigroup.element.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.quiver.relation.binary.sr :refer :all]
[locus.set.quiver.relation.binary.product :refer :all]
[locus.set.mapping.general.co... |
f2575d81612f8afb595636a0da71089a40e3db327bcafdfd68d70ab8e1f4d1dc | WorksHub/client | db.cljs | (ns wh.admin.tags.db)
| null | https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/admin/tags/db.cljs | clojure | (ns wh.admin.tags.db)
| |
8f94db7d66d81736caf3fce7ba691c5e6d23cca42633bca5be38bdb4fdbcd4ea | Armael/pixels | client.ml | let rgb_of_hue h =
let x = 1. -. Float.abs (fst (Float.modf (float h /. 120.)) *. 2. -. 1.) in
let r', g', b' =
if h < 60 then (1., x, 0.)
else if h < 120 then (x, 1., 0.)
else if h < 180 then (0., 1., x)
else if h < 240 then (0., x, 1.)
else if h < 300 then (x, 0., 1.)
else (1., 0., x)
in... | null | https://raw.githubusercontent.com/Armael/pixels/bad569376f476cedb9e3f0834dcb85ab241d329d/client/client.ml | ocaml | let rgb_of_hue h =
let x = 1. -. Float.abs (fst (Float.modf (float h /. 120.)) *. 2. -. 1.) in
let r', g', b' =
if h < 60 then (1., x, 0.)
else if h < 120 then (x, 1., 0.)
else if h < 180 then (0., 1., x)
else if h < 240 then (0., x, 1.)
else if h < 300 then (x, 0., 1.)
else (1., 0., x)
in... | |
9abfa367df3c4d61fa7bfffbea09bc5856b5e2e55ff5e0aed91b6a7085ab5199 | freizl/dive-into-haskell | Main.hs | module Main where
import Control.Monad
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
---
-- * Nope a
---
data Nope a = NopeDotJpg
deriving (Eq, Show)
instance Functor Nope where
fmap _ NopeDotJpg = NopeDotJpg
instance Applicative Nope where
pure _ = NopeDotJpg
Nope... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/18/Main.hs | haskell | -
* Nope a
-
-
-
-
* Identity a
-
-
* List
-
a :: a
as :: List a
f :: a -> List b
-
* type driven implementation
-
fmap
applicative | module Main where
import Control.Monad
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
data Nope a = NopeDotJpg
deriving (Eq, Show)
instance Functor Nope where
fmap _ NopeDotJpg = NopeDotJpg
instance Applicative Nope where
pure _ = NopeDotJpg
NopeDotJpg <*> NopeDotJp... |
933fda72acc4f9458edfa2779638cf6325eb8eb5e7034965cc9df051caa4456f | REMath/mit_16.399 | abexp.mli | (* abexp.mli *)
open Linear_Syntax
open Aenv
(* abstract interpretation of boolean operations *)
val a_bexp : lbexp -> Aenv.t -> Aenv.t
| null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-REL-Abstract-Interpreter/abexp.mli | ocaml | abexp.mli
abstract interpretation of boolean operations | open Linear_Syntax
open Aenv
val a_bexp : lbexp -> Aenv.t -> Aenv.t
|
fd84bf222e4e4bbe506ec0300c2a5c7ba75fd021dcc81015af530f64e456276f | dylex/haskell-nfs | webdavnfs.hs | # LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
import Data.List (foldl')
import Data.String (fromString)
import Data.Word (Word32)
import qualified Network.NFS.V4 as NFS
import qualified Network.ONCRPC as RPC
import qualified Network.Wai.Handler.Warp as Warp (run)
import qualified ... | null | https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/webdav/server/webdavnfs.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
import Data.List (foldl')
import Data.String (fromString)
import Data.Word (Word32)
import qualified Network.NFS.V4 as NFS
import qualified Network.ONCRPC as RPC
import qualified Network.Wai.Handler.Warp as Warp (run)
import qualified ... | |
7d2d99766d0a1ed688f2c84e4bf6edd0aaf8d742118ecb7c6e7b1ee6212be246 | unsplash/intlc | LinterSpec.hs | module Intlc.LinterSpec where
import Control.Comonad.Cofree (Cofree ((:<)))
import Data.Functor.Foldable (cata)
import Intlc.Error (WithAnn)
import Intlc.ICU
import Intlc.Linter
import Prelude
import Test.Hspec
-- | Annotate an AST with... | null | https://raw.githubusercontent.com/unsplash/intlc/1e3e00add41db6b5f87d438f9998be2b18c27d99/test/Intlc/LinterSpec.hs | haskell | | Annotate an AST with nonsense. We won't test the annotations.
An example interpolation that's affected by this lint rule. | module Intlc.LinterSpec where
import Control.Comonad.Cofree (Cofree ((:<)))
import Data.Functor.Foldable (cata)
import Intlc.Error (WithAnn)
import Intlc.ICU
import Intlc.Linter
import Prelude
import Test.Hspec
withAnn :: Message Node -... |
591195bb6aa5959e696f84826d98d5d7d7c6173efbad4e6bb55bc8e4ccc99557 | andrewthad/sockets | Macro.hs | # language BangPatterns #
# language DuplicateRecordFields #
# language LambdaCase #
# language MagicHash #
{-# language OverloadedStrings #-}
{-# language ScopedTypeVariables #-}
{-# language TypeFamilies #-}
# language UnboxedTuples #
-- This is a benchmark designed to stress both the sockets library
and the GHC e... | null | https://raw.githubusercontent.com/andrewthad/sockets/90d314bd2ec71b248a90da6ad964c679f75cfcca/bench/Macro.hs | haskell | # language OverloadedStrings #
# language ScopedTypeVariables #
# language TypeFamilies #
This is a benchmark designed to stress both the sockets library
thread for each socket. The thread sends a datagram to a pseudorandomly
detemined socket on the other team. Then, it waits to receive a datagram
from a socket on ... | # language BangPatterns #
# language DuplicateRecordFields #
# language LambdaCase #
# language MagicHash #
# language UnboxedTuples #
and the GHC event manager . It opens a moderate number of datagram sockets
that each belong to one of two teams : A and B. There is one worker
the lucky worker thread performing ... |
ed81218ce1d40a6eac348c59f9779d031f20f13aa01c75ecff4651d426aa6693 | ocaml-ppx/ppx | ml.mli | val id : string -> string
val tvar : string -> string
val tag : string -> string
val module_name : string -> string
val list_lit : string list -> string
val tuple : string list -> string
val arrow_type : string list -> string
val tuple_type : string list -> string
val poly_type : string -> tvars:string list -> strin... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/cinaps/ml.mli | ocaml | val id : string -> string
val tvar : string -> string
val tag : string -> string
val module_name : string -> string
val list_lit : string list -> string
val tuple : string list -> string
val arrow_type : string list -> string
val tuple_type : string list -> string
val poly_type : string -> tvars:string list -> strin... | |
92af92ee193999cd1d6230cda2bf28e911e2d53435a992823afaf04195c891ed | CDSoft/abp | Config.hs |
This file is part of ABP .
ABP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ABP is distributed... | null | https://raw.githubusercontent.com/CDSoft/abp/02e0331577847437c8308fbe1af3ed3a7671a6a3/src/Config.hs | haskell | # LANGUAGE OverloadedStrings # |
This file is part of ABP .
ABP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ABP is distributed... |
d4f1f9783ff132be3b0de8df9ca6adb7d1e2de756f44c6e002b13d5a94ec34af | richhickey/clojure-contrib | test_helper.clj | helper.clj -- part of the pretty printer for Clojure
by
April 3 , 2009
Copyright ( c ) , April 2009 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of thi... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/test/clojure/clojure/contrib/pprint/test_helper.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 ... | helper.clj -- part of the pretty printer for Clojure
by
April 3 , 2009
Copyright ( c ) , April 2009 . All rights reserved .
(ns clojure.contrib.pprint.test-helper
(:use [clojure.test :only (deftest are run-tests)]))
(defmacro simple-tests [name & test-pairs]
`(deftest ~name (are [x y] (= x y) ~@t... |
0ee96fb33de721ec00cecc5d990d35f5581ae683df98f602095d6d0017faf70b | hnc-agency/hnc | hnc_worker_sup.erl | Copyright ( c ) 2020 - 2022 , < >
Copyright ( c ) 2020 - 2022 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS... | null | https://raw.githubusercontent.com/hnc-agency/hnc/fc454f00d12f2d08d7b565cb289b53b860d98306/src/hnc_worker_sup.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2020 - 2022 , < >
Copyright ( c ) 2020 - 2022 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(hnc_wo... |
5af5025518aa7238af138609542c042b77efb3715390e358c3e24f4461659785 | ppelleti/McLabel | TransformItem.hs | module TransformItem (transformItems) where
import qualified Data.ByteString as B ( readFile )
import qualified Data.ByteString.Base64 as B64 ( encode )
import qualified Data.ByteString.Char8 as B8 ( unpack )
import Data.Char ( isSpace )
import Data.Ord ( comparing )
import Data.List ( sortBy, dropWhileEnd )
i... | null | https://raw.githubusercontent.com/ppelleti/McLabel/4673b86705f701d29c8d730c59dc5654fcc6c441/src/TransformItem.hs | haskell | module TransformItem (transformItems) where
import qualified Data.ByteString as B ( readFile )
import qualified Data.ByteString.Base64 as B64 ( encode )
import qualified Data.ByteString.Char8 as B8 ( unpack )
import Data.Char ( isSpace )
import Data.Ord ( comparing )
import Data.List ( sortBy, dropWhileEnd )
i... | |
a370b0ac2d162c32f4d99b144db2106f64a580e9707289ecc31f1a8bbb7f25b9 | granule-project/granule-compiler-llvm | MarkGlobals.hs | module Language.Granule.Codegen.MarkGlobals where
import Language.Granule.Codegen.NormalisedDef
import Language.Granule.Syntax.Expr
import Language.Granule.Syntax.Type
import Language.Granule.Syntax.Identifiers
import Language.Granule.Syntax.Pretty
import Data.Bifunctor.Foldable
data GlobalMarker =
GlobalVar Type ... | null | https://raw.githubusercontent.com/granule-project/granule-compiler-llvm/76b50728dfb426ba1478cffcba0b5731a4f173c0/src/Language/Granule/Codegen/MarkGlobals.hs | haskell | module Language.Granule.Codegen.MarkGlobals where
import Language.Granule.Codegen.NormalisedDef
import Language.Granule.Syntax.Expr
import Language.Granule.Syntax.Type
import Language.Granule.Syntax.Identifiers
import Language.Granule.Syntax.Pretty
import Data.Bifunctor.Foldable
data GlobalMarker =
GlobalVar Type ... | |
d65ae0185c9a61fff44d7ef5cc7a6680959050d1f63f39f0fdb09da9311c4731 | mfoemmel/erlang-otp | wxe_master.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/wxe_master.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Author :
Created : 17 Jan 2007 b... |
8e9c82cc2db2899bb51003b8446c0f4729f858e792db286876bae2d9c299b6d0 | henry-hz/erlang-trader | fix_engine_server_sup.erl | -module(fix_engine_server_sup).
-behaviour(supervisor).
%% API.
-export([start_link/0]).
%% supervisor.
-export([init/1]).
%% API.
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
fix_engine_server = ets:new(fix_engine_server, [... | null | https://raw.githubusercontent.com/henry-hz/erlang-trader/5ec6a20902a894e0c29712f199bb6be3fad68a3b/fix_engine/src/fix_engine_server_sup.erl | erlang | API.
supervisor.
API. | -module(fix_engine_server_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
fix_engine_server = ets:new(fix_engine_server, [ordered_set, public, named_tabl... |
f3553118e9eb94817aa5ca06908508e02a1bec4eeeba6e737a3c1f3d9b14b4cf | otabat/couchbase-clj | client_builder.clj | (ns couchbase-clj.client-builder
(:import [java.net URI]
[java.util Collection ArrayList]
[java.util.concurrent TimeUnit]
[net.spy.memcached FailureMode DefaultHashAlgorithm]
[com.couchbase.client CouchbaseConnectionFactoryBuilder])
(:require [couchbase-clj.config :as cb-... | null | https://raw.githubusercontent.com/otabat/couchbase-clj/5f975dc85d0eec554034eefa9d97f1ee7ad9e84a/src/couchbase_clj/client_builder.clj | clojure | (set-min-reconnect-interval! [clj-client-builder interval]
"Set the default minimum reconnect interval in millisecs.
This value means that if a reconnect is needed,
it won't try to reconnect more frequently than default value.
You can set this to higher to try reconnecting less frequently.")
(set-min-reconnect-interv... | (ns couchbase-clj.client-builder
(:import [java.net URI]
[java.util Collection ArrayList]
[java.util.concurrent TimeUnit]
[net.spy.memcached FailureMode DefaultHashAlgorithm]
[com.couchbase.client CouchbaseConnectionFactoryBuilder])
(:require [couchbase-clj.config :as cb-... |
0dbf0198b88ad624bcc51c3e5911d89570412f07c3697d1113383c72c5cafcdd | whamtet/Excel-REPL | bencode.clj | ;-
; Copyright (c) Meikel Brandmeyer. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to ... | null | https://raw.githubusercontent.com/whamtet/Excel-REPL/cae2ef8e423e2f2723c60e4758785973f06c6ba4/Excel-REPL/nrepl/clojure/tools/nrepl/bencode.clj | clojure | -
Copyright (c) Meikel Brandmeyer. All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bou... |
(ns #^{:author "Meikel Brandmeyer, modified for ClojureCLR by David Miller"
:doc "A netstring and bencode implementation for Clojure."}
clojure.tools.nrepl.bencode
To address these issues developed the so called
BitTorrent extended this to the [ bencode][bc ] protocol which also
[ bc ] : #Bencoding... |
718cbca5472ec79cbc53f5d2b993426c80f7d4196259c468561c82c9c8d82d51 | Octachron/talaria_bibtex | fields.mli | * Predefined and helper functions .
include Field_types.self
* exposes its own [ orec ] namespace
@closed
@closed *)
include Orec.Namespace.S [@@odoc.inline off]
* A bibtex field consists of an [ orec ] field , a name and a
translation between the raw text of the field towards a typed field
... | null | https://raw.githubusercontent.com/Octachron/talaria_bibtex/244772f9fc8f3381df4692f82f7a3bac463d95d9/src/fields.mli | ocaml | * The exception {!Unknown_attribute} is raised whenever a type dkey fails to parse
its contents to its underlying type.
* Create a string view from a {!type-named_field}
* Field creation helper
* {!val-state} default to {!WIP} when the field is absent
* Type alias | * Predefined and helper functions .
include Field_types.self
* exposes its own [ orec ] namespace
@closed
@closed *)
include Orec.Namespace.S [@@odoc.inline off]
* A bibtex field consists of an [ orec ] field , a name and a
translation between the raw text of the field towards a typed field
... |
18e97d3200a52290a9986c9419b4118f7c4213442a8d87577c43894738f9a178 | ahungry/ruse | project.clj | (defproject ruse "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-http "3.9.1"]
[org.clojure/java.jdbc "0.7.8"]
[org.postgr... | null | https://raw.githubusercontent.com/ahungry/ruse/2a648dbc50cdc4ba0fc7eca2052fed71b62447d7/project.clj | clojure | (defproject ruse "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-http "3.9.1"]
[org.clojure/java.jdbc "0.7.8"]
[org.postgr... | |
6591e6bb273bb4beb1d1fc07d15cb095a3577ffca759c8f6728a34d0c3f3e492 | patrickt/flexible-numeric-parsers | Flexible.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
-- | Flexible numeric parsers for real-world programming languages.
-- These parsers aim to be a superset of the numeric syntaxes across
-- the most popular programming languages.
--
-- All parsers assume any trailing whitespace has already been
-- consumed, an... | null | https://raw.githubusercontent.com/patrickt/flexible-numeric-parsers/6e631b56ff8e72caa05c04257efc914a7c3688a1/src/Numeric/Parse/Flexible.hs | haskell | # LANGUAGE RankNTypes #
| Flexible numeric parsers for real-world programming languages.
These parsers aim to be a superset of the numeric syntaxes across
the most popular programming languages.
All parsers assume any trailing whitespace has already been
consumed, and places no requirement for an @endOfInput@ at ... | # LANGUAGE TypeApplications #
parsers do not use ' Text . . Token . TokenParsing ' , and therefore
module Numeric.Parse.Flexible
( integer,
natural,
decimal,
hexadecimal,
octal,
binary,
floating,
signed,
imaginary,
)
where
import Control.Applicative
import Control.Monad hiding (... |
e44291d454f42f1d9f862440b7d2a7ffba10effdade224a817fdab2b60fa2428 | thomaseding/hearthshroud | NonEmpty.hs | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Data.NonEmpty where
--------------------------------------------------------------------------------
data NonEmpty a = NonEmpty a [a]
deriving (Show, Eq, Ord)
toList :: NonEmpty a -> [a]
toList (NonEmpty x xs) = x : xs
fromList :: [a] -> NonEmpty... | null | https://raw.githubusercontent.com/thomaseding/hearthshroud/b21e2f69f394c94a106a3b57b95aa1a76b8d4003/src/Data/NonEmpty.hs | haskell | ------------------------------------------------------------------------------ | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Data.NonEmpty where
data NonEmpty a = NonEmpty a [a]
deriving (Show, Eq, Ord)
toList :: NonEmpty a -> [a]
toList (NonEmpty x xs) = x : xs
fromList :: [a] -> NonEmpty a
fromList = \case
x : xs -> NonEmpty x xs
[] -> error $ show 'fromList
... |
965a04383f71da93b11d13f60cef6e61cced148a7cfb5a3cfb2eeb4a1a71c11f | haskelling/aoc2020 | 12a.hs | import AOC
main = interact f
m :: ((Int, Int), (Int, Int)) -> String -> ((Int, Int), (Int, Int))
m s (x:xs) = m' s x $ read xs
where
m' (x, v) 'F' n = (x + (n *$ v), v)
m' (x, v) 'L' n = (x, rotn (n `div` 90) v)
m' (x, v) 'R' n = m' (x, v) 'L' (-n)
m' (x, v) v' n = (x + (n *$ dir v'), v)
f :: [Str... | null | https://raw.githubusercontent.com/haskelling/aoc2020/0f0e44ad16d3eda4add1f05684070dd161010d75/12a.hs | haskell | import AOC
main = interact f
m :: ((Int, Int), (Int, Int)) -> String -> ((Int, Int), (Int, Int))
m s (x:xs) = m' s x $ read xs
where
m' (x, v) 'F' n = (x + (n *$ v), v)
m' (x, v) 'L' n = (x, rotn (n `div` 90) v)
m' (x, v) 'R' n = m' (x, v) 'L' (-n)
m' (x, v) v' n = (x + (n *$ dir v'), v)
f :: [Str... | |
b42337dd2f69c4635439eef8a672303a05361c3036ad12d22b74d95210101a02 | bjorng/wings | wings_drag.erl | %%
%% wings_drag.erl --
%%
%% This module handles interactive commands.
%%
Copyright ( c ) 2001 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wings_drag).
-export([do_drag/2,fold/3,fol... | null | https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/src/wings_drag.erl | erlang |
wings_drag.erl --
This module handles interactive commands.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Main drag record. Kept in state.
Original 2D position,
Summary of mouse movements
Z move in screen rel... | Copyright ( c ) 2001 - 2011
-module(wings_drag).
-export([do_drag/2,fold/3,fold/4,
matrix/3,matrix/4,general/4,drag_only/4,
compose/1,translate_fun/2]).
-export_type([drag/0,vec_transform_fun/0,vertices/0,vertex_transform/0]).
-define(NEED_ESDL, 1).
-define(NEED_OPENGL, 1).
-include("wings.hrl... |
17731b295f6c8a2a4dfd08dcbf5f295dfe7f90b103a64c58baa0f8e1d09f4052 | DHSProgram/DHS-Indicators-SPSS | WE_ASSETS_IR.sps | * Encoding: windows-1252.
*****************************************************************************************************
Program: WE_ASSETS_IR.sps
Purpose: Code to compute employment, earnings, and asset ownership in men and women
Data inputs: IR dataset
Data outputs: coded variables
Author: Shireen ... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap15_WE/WE_ASSETS_IR.sps | scheme | * Encoding: windows-1252.
*****************************************************************************************************
Program: WE_ASSETS_IR.sps
Purpose: Code to compute employment, earnings, and asset ownership in men and women
Data inputs: IR dataset
Data outputs: coded variables
Author: Shireen ... | |
456d44d1a114b77963269b42b2f172c04b6817fbd6f4328431c4f25a6ad0b708 | ekmett/bytes | Signed.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
--------------------------------------------------------------------
-- |
-- License : BSD3
-- Stability : experimental
-- Portability: type-families
--
-- When one wants to think of an 'Int' as a dumb bitstring, converting
-- it to a 'Word' avoids pesky compl... | null | https://raw.githubusercontent.com/ekmett/bytes/ab86ccca280b0d1000efe725e523e22ba129c92c/src/Data/Bytes/Signed.hs | haskell | ------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Portability: type-families
When one wants to think of an 'Int' as a dumb bitstring, converting
it to a 'Word' avoids pesky complications with respect to sign
extension.
------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Data.Bytes.Signed
( Unsigned, unsigned
, Signed, signed
) where
import Data.Int
import Data.Word
type family Unsigned i :: *
type instance Unsigned Int = Word
type instance Unsigned Int8 = Word8
type instance Unsigned Int16 = Word16
type instance ... |
7a22cb28d8922a0a8a6431f70dfe670fddbcf8d53af68d70ce01222ef8375c58 | oscaro/clj-gcloud-common | project.clj | (defproject com.oscaro/clj-gcloud-common "0.185-2.0-SNAPSHOT"
:description "Common library for all google cloud clojure wrappers"
:url "-gcloud-common"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:deploy-repositories [["snapshots" {:url ""
:usern... | null | https://raw.githubusercontent.com/oscaro/clj-gcloud-common/fb4debcd99205a6dddb9969b7a2c90366435d5f2/project.clj | clojure | dependency versions that work well with each other.
This must correspond to the version pinned in BOM files.
grpc-api is required to compile ‘clj-gcloud.common’ namespace | (defproject com.oscaro/clj-gcloud-common "0.185-2.0-SNAPSHOT"
:description "Common library for all google cloud clojure wrappers"
:url "-gcloud-common"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:deploy-repositories [["snapshots" {:url ""
:usern... |
439259f830b1af673f97cd0868c6f88790618cc8a056d9b04db4872d05ceb630 | aradarbel10/Styff | main.ml | open Styff.Exec
let () =
print_newline ();
ignore (compile_prog_file {elab_diagnostics = true; dump_output = true} "examples/builtins.stf"); | null | https://raw.githubusercontent.com/aradarbel10/Styff/a9cfc17923ef2468cd67e9082d426a6bee8fe55f/app/main.ml | ocaml | open Styff.Exec
let () =
print_newline ();
ignore (compile_prog_file {elab_diagnostics = true; dump_output = true} "examples/builtins.stf"); | |
946bcb1037d6bd236fbf775c32e85d620944aae4d2e23e8200b5c24dfd9511b5 | tfausak/patrol | SpanStatusSpec.hs | # LANGUAGE QuasiQuotes #
module Patrol.Type.SpanStatusSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Patrol.Type.SpanStatus as SpanStatus
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.SpanStatus" $ do
Hspe... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/SpanStatusSpec.hs | haskell | # LANGUAGE QuasiQuotes #
module Patrol.Type.SpanStatusSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Patrol.Type.SpanStatus as SpanStatus
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.SpanStatus" $ do
Hspe... | |
3b1628dd45190caa59e3a0dbc62784cbc31d6bfb02ee58c67032a1f0866c3c69 | DavidAlphaFox/RabbitMQ | amqp_channel_sup_sup.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-erlang-client/src/amqp_channel_sup_sup.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
@priv... |
e040857a9aa854a4b2a4eb7b38e3fe56d056f8d55d235376c542cc3f8383aeb9 | homegrownlabs/sim-template | sim_test.clj | (ns leiningen.new.sim-test
(:require [leiningen.new.templates :refer [renderer name-to-path ->files sanitize-ns project-name]]
[leiningen.core.main :as main]))
(def render (renderer "sim-test"))
(defn sim-test
"Generate a sim-test project"
[name]
(let [sanitized-ns (sanitize-ns name)
data ... | null | https://raw.githubusercontent.com/homegrownlabs/sim-template/2ddba7c1a3c2a17aff1e1ed30bada941bcb938a3/src/leiningen/new/sim_test.clj | clojure | (ns leiningen.new.sim-test
(:require [leiningen.new.templates :refer [renderer name-to-path ->files sanitize-ns project-name]]
[leiningen.core.main :as main]))
(def render (renderer "sim-test"))
(defn sim-test
"Generate a sim-test project"
[name]
(let [sanitized-ns (sanitize-ns name)
data ... | |
c6a9d3d83cc7182403f54a7e5aa10bf9873a84f7841c39e0c3826968f2fed133 | fisherdj/miniAdapton | memoization-impl.scm |
(define (make-kv-store) (list '()))
(define (add-kv-store! s k v)
(set-car! s `((,k . ,v) . ,(car s))))
(define (lookup-kv-store s k)
(assoc k (car s)))
(define (memoize f)
(let ((s (make-kv-store)))
(lambda x
(let ((k/v (lookup-kv-store s x)))
(if k/v
(cdr k/v)
(let ((... | null | https://raw.githubusercontent.com/fisherdj/miniAdapton/1b5749422304567c96ac5367f2221dda9eff5880/memoization-impl.scm | scheme |
(define (make-kv-store) (list '()))
(define (add-kv-store! s k v)
(set-car! s `((,k . ,v) . ,(car s))))
(define (lookup-kv-store s k)
(assoc k (car s)))
(define (memoize f)
(let ((s (make-kv-store)))
(lambda x
(let ((k/v (lookup-kv-store s x)))
(if k/v
(cdr k/v)
(let ((... | |
cf9752b8d7a568699fc683cc1bed849e4a537b159990dacb3787512a9c6d7d0e | mokus0/junkbox | Config.hs | # LANGUAGE GADTs , DeriveDataTypeable , TemplateHaskell #
-- |Configuration interface using a XML Property Lists for a mutable
-- configuration/user-editable-state store.
module Susie.Module.Config
( configModule
, configService
, getConfigVar
, getConfigVarWithDefault
) where
import Susie.Module
i... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Projects/susie/src/Susie/Module/Config.hs | haskell | |Configuration interface using a XML Property Lists for a mutable
configuration/user-editable-state store.
, run = do
TODO : using a FS change notification service , or polling if necessary ,
-- check for external changes. Update "prisine" caches as needed,
-- resolving conflicts by compar... | # LANGUAGE GADTs , DeriveDataTypeable , TemplateHaskell #
module Susie.Module.Config
( configModule
, configService
, getConfigVar
, getConfigVarWithDefault
) where
import Susie.Module
import Susie.Module.Config.Cache
import Data.Maybe
import Data.PropertyList
import System.Directory
import System.... |
f5ba77ee69e84020208369fc04d9b74d9a52f4849cf9fa2c8021422054f635ed | sadiqj/ocaml-esp32 | records.ml | (* undefined labels *)
type t = {x:int;y:int};;
{x=3;z=2};;
[%%expect{|
type t = { x : int; y : int; }
Line _, characters 5-6:
Error: Unbound record field z
|}];;
fun {x=3;z=2} -> ();;
[%%expect{|
Line _, characters 9-10:
Error: Unbound record field z
|}];;
(* mixed labels *)
{x=3; contents=2};;
[%%expect{|
Line _, ch... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/typing-misc/records.ml | ocaml | undefined labels
mixed labels
private types
Punning and abbreviations
messages
bugs
PR#5865 | type t = {x:int;y:int};;
{x=3;z=2};;
[%%expect{|
type t = { x : int; y : int; }
Line _, characters 5-6:
Error: Unbound record field z
|}];;
fun {x=3;z=2} -> ();;
[%%expect{|
Line _, characters 9-10:
Error: Unbound record field z
|}];;
{x=3; contents=2};;
[%%expect{|
Line _, characters 6-14:
Error: The record field con... |
f671f7176c0a1ced0f7ec196d4b653ecf0b0031549d4ca8d48da404106899fe3 | chunsj/TH | vgg16.lisp | (defpackage :vgg16-example
(:use #:common-lisp
#:mu
#:th
#:th.m.vgg16
#:th.m.imagenet
#:th.image))
(in-package :vgg16-example)
;; load weights - takes some time
(defparameter *vgg16-weights* (read-vgg16-weights))
(defparameter *vgg16-function* (vgg16 :all *vgg16-weights*))
... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/pretrained/vgg16.lisp | lisp | load weights - takes some time | (defpackage :vgg16-example
(:use #:common-lisp
#:mu
#:th
#:th.m.vgg16
#:th.m.imagenet
#:th.image))
(in-package :vgg16-example)
(defparameter *vgg16-weights* (read-vgg16-weights))
(defparameter *vgg16-function* (vgg16 :all *vgg16-weights*))
cat categorizing - input should b... |
1f218915193df5d4bbd4e37be6af5808ed17d971ea4bee17ad701a3cdc9d0b10 | triffon/fp-2019-20 | 06--member.rkt | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 6
Напишете функция ` ( member ? x L ) ` ,
; която намира дали `x` е елемент на списъка `L`.
(define (member? x L)
(void))
(define l1 '(1 2 3 4 5 6 7 8))
(define l2 '(0 (12 13) (21 22)))
(run-tests (test-suite "member? tests"
(check-tr... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/04--lists/06--member.rkt | racket | която намира дали `x` е елемент на списъка `L`. | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 6
Напишете функция ` ( member ? x L ) ` ,
(define (member? x L)
(void))
(define l1 '(1 2 3 4 5 6 7 8))
(define l2 '(0 (12 13) (21 22)))
(run-tests (test-suite "member? tests"
(check-true (member? 5 l1))
(check-true (membe... |
ca3b76c471db49f574b03d47a9e6d2737fb0aa619b6a919abdb27d79ae6eac5d | xapi-project/xcp-rrdd | utils.ml |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/lib/plugin/utils.ml | ocaml | create pipe for reading from the command's output |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... |
9eaff40ecd4191fe00d6f2a2b7c355eded7b56e15c8bf3f4aa8ce612c3e489b7 | footprintanalytics/footprint-web | native_query_snippet.clj | (ns metabase.models.native-query-snippet
(:require [metabase.models.collection :as collection]
[metabase.models.interface :as mi]
[metabase.models.native-query-snippet.permissions :as snippet.perms]
[metabase.models.serialization.base :as serdes.base]
[metabase.models.s... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/models/native_query_snippet.clj | clojure | ----------------------------------------------- Entity & Lifecycle -----------------------------------------------
---------------------------------------------------- Schemas -----------------------------------------------------
------------------------------------------------- Serialization -----------------------... | (ns metabase.models.native-query-snippet
(:require [metabase.models.collection :as collection]
[metabase.models.interface :as mi]
[metabase.models.native-query-snippet.permissions :as snippet.perms]
[metabase.models.serialization.base :as serdes.base]
[metabase.models.s... |
2f1c8b922abbf7b2881eb9d3f1504e9899d9ab343a5ee5176058c5b498323eec | foreverbell/project-euler-solutions | 265.hs | import Data.Bits (shiftL, shiftR, (.&.))
import Data.List (sort)
n = 5 :: Int
check :: Int -> Bool
check x = sum xs == sum0 && sort xs == [0 .. mask]
where
xs = map (\d -> (shift d) .&. mask) [-n + 1 .. 2^n - n]
sum0 = sum [0 .. mask]
shift d | d < 0 = x `shiftL` (-d)
| d >= 0 = x `shiftR`... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/265.hs | haskell | import Data.Bits (shiftL, shiftR, (.&.))
import Data.List (sort)
n = 5 :: Int
check :: Int -> Bool
check x = sum xs == sum0 && sort xs == [0 .. mask]
where
xs = map (\d -> (shift d) .&. mask) [-n + 1 .. 2^n - n]
sum0 = sum [0 .. mask]
shift d | d < 0 = x `shiftL` (-d)
| d >= 0 = x `shiftR`... | |
30b5a63a22b827ac302af6811c8892da444c0a7b9a65980316ac10752029744b | buntine/Simply-Scheme-Exercises | functions.scm | ; Legal/credit stuff: I did not write this program. It's exposed as an example
; and the reader is asked a series of questions at the end
; of the chapter as per usual.
; I've supplied it here purely for contextual reasons (and
; also becau... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/21-example_the-functions-program/functions.scm | scheme | Legal/credit stuff: I did not write this program. It's exposed as an example
and the reader is asked a series of questions at the end
of the chapter as per usual.
I've supplied it here purely for contextual reasons (and
also because I ... |
(define (functions)
(show "Welcome to the FUNCTIONS program.")
(functions-loop))
(define (functions-loop)
(let ((fn-name (get-fn)))
(if (equal? fn-name 'exit)
"Thanks for using FUNCTIONS!"
(let ((args (get-args (arg-count fn-name))))
(if (not (in-domain? args fn-name))
(show ... |
b0d3b9eb6f274a2b2f2ca38693e7f56070168ca9c94708ab30bb03740ac6bc07 | svenpanne/EOPL3 | exercise-1-24.rkt | #lang eopl
; ------------------------------------------------------------------------------
Exercise 1.24
(define every?
(lambda (pred lst)
(cond ((null? lst) #t)
((pred (car lst)) (every? pred (cdr lst)))
(else #f))))
| null | https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter1/exercise-1-24.rkt | racket | ------------------------------------------------------------------------------ | #lang eopl
Exercise 1.24
(define every?
(lambda (pred lst)
(cond ((null? lst) #t)
((pred (car lst)) (every? pred (cdr lst)))
(else #f))))
|
32b80680f7e40630b1de3619c04c99d695c2e1c8a93c0a3fc936cb84a7216dfe | tcsprojects/pgsolver | elevators.ml | open Tcsset ;;
open Paritygame ;;
open Mucalculus ;;
let rec range i j = if j >= i then i :: (range (i+1) j) else []
let rec insert x = function [] -> [x]
| y::ys -> if x=y then y::ys else y::(insert x ys)
let storeys = ref 0
(* fair means that any new request will be added to the end... | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/generators/modelchecking/elevators.ml | ocaml | fair means that any new request will be added to the end of the list (FIFO),
whereas unfair means that it will be added to the beginning (LIFO)
any button could be pressed or no requests could come in
for each possibility decide in which direction to go
fair means that any new request will be added to the end... | open Tcsset ;;
open Paritygame ;;
open Mucalculus ;;
let rec range i j = if j >= i then i :: (range (i+1) j) else []
let rec insert x = function [] -> [x]
| y::ys -> if x=y then y::ys else y::(insert x ys)
let storeys = ref 0
let fair = ref true
module ElevatorProblem =
struct
... |
81fcbd3d120424b286e2f9823e3335100def3feb84641fe4b8f19c4eca410496 | haskell-repa/repa | Index.hs | # LANGUAGE TypeOperators , FlexibleInstances , ScopedTypeVariables #
-- | Index types.
module Data.Array.Repa.Index
(
-- * Index types
Z (..)
, (:.) (..)
-- * Common dimensions.
, DIM0, DIM1, DIM2, DIM3, DIM4, DIM5
, ix1, ix2, ix3, ix4, ix5)
whe... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa/Data/Array/Repa/Index.hs | haskell | | Index types.
* Index types
* Common dimensions.
| Our index type, used for both shapes and indices.
Common dimensions
| Helper for index construction.
Use this instead of explicit constructors like @(Z :. (x :: Int))@.
The this is sometimes needed to ensure that 'x' is constrained to
be in @Int@.
Sh... | # LANGUAGE TypeOperators , FlexibleInstances , ScopedTypeVariables #
module Data.Array.Repa.Index
(
Z (..)
, (:.) (..)
, DIM0, DIM1, DIM2, DIM3, DIM4, DIM5
, ix1, ix2, ix3, ix4, ix5)
where
import Data.Array.Repa.Shape
import GHC.Base (quotInt, r... |
1691d1bd1fb6247593773f2a0c2a2f0dbd69f3ea0af7ace2d0e59c9c8dbabaf2 | philc/watchman | models.clj | (ns watchman.models
(:require [clj-time.core :as time-core]
[clj-time.coerce :as time-coerce]
[clj-time.format :as time-format]
[clojure.core.incubator :refer [-?>]]
[clojure.string :as string]
[korma.db :refer [transaction]]
[korma.incubator.cor... | null | https://raw.githubusercontent.com/philc/watchman/15bbe618c11784ec1f6460d322ffa935cce06708/src/watchman/models.clj | clojure | - path
- nickname
- timeout
- max_retries: how many times to retry before considering the check a failure.
- expected_status_code
- expected_response_contents
- hostname
- nickname
The status of a check for a given host.
- host_id
- check_id
- state: enabled or paused.
- last_checked_at
- last_response_st... | (ns watchman.models
(:require [clj-time.core :as time-core]
[clj-time.coerce :as time-coerce]
[clj-time.format :as time-format]
[clojure.core.incubator :refer [-?>]]
[clojure.string :as string]
[korma.db :refer [transaction]]
[korma.incubator.cor... |
fdc351ea8ba4b65996b70f829b8aec4caf2e473b7eef515fd93c388b196f0dbb | exoscale/clojure-kubernetes-client | v1_volume_attachment_source.clj | (ns clojure-kubernetes-client.specs.v1-volume-attachment-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-volume-attachment-source-data v1-volume-attachment-source)
(def v1-volume-attachment-source-data
{
(ds/opt :persis... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_volume_attachment_source.clj | clojure | (ns clojure-kubernetes-client.specs.v1-volume-attachment-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-volume-attachment-source-data v1-volume-attachment-source)
(def v1-volume-attachment-source-data
{
(ds/opt :persis... | |
efa4aa3fa796bddd67fe6680ce7ce6ba0e58ea76fa63f43291cc0d68dce7f2df | kana-sama/sicp | 1.32 - accum.scm | (define (map-reduce-range mapper reducer next init a b)
(let loop ((i a)
(acc init))
(cond ((> i b) acc)
(else (loop (next i)
(reducer acc (mapper i)))))))
(define (sum fn next a b)
(map-reduce-range fn + next 0 a b))
(define (product fn next a b)
(map-reduce-ran... | null | https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/1/1.32%20-%20accum.scm | scheme | (define (map-reduce-range mapper reducer next init a b)
(let loop ((i a)
(acc init))
(cond ((> i b) acc)
(else (loop (next i)
(reducer acc (mapper i)))))))
(define (sum fn next a b)
(map-reduce-range fn + next 0 a b))
(define (product fn next a b)
(map-reduce-ran... | |
9b7c7d1bf74ea75bfc01eec689711568763c485ab69dd021d2d366079472ac90 | ghollisjr/cl-ana | hdf-table.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana 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 Li... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-table/hdf-table.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
1fca6ed7e36f401045d2e98745e1d3d10a242a7dc4ac2081c8c9b610433c33da | ocsigen/ocsimore | wiki_data.mli | open User_sql.Types
open Wiki_types
*
This is the wiki component of .
@author
@author
@author
This is the wiki component of Ocsimore.
@author Jaap Boender
@author Piero Furiesi
@author Vincent Balat
*)
* Exception raised when a wikipage already exists . The argument
is the wikibox for the pre ... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/wiki/server/wiki_data.mli | ocaml | * Creates the specified wiki if the user has enough permissions.
Raise [Permission_denied] if it is not the case, and or fails with
the same errors as [Wiki.create_wiki] if the wiki cannot be created.
The options are the same as for the this function, except for
the field [admin], which is used as the a... | open User_sql.Types
open Wiki_types
*
This is the wiki component of .
@author
@author
@author
This is the wiki component of Ocsimore.
@author Jaap Boender
@author Piero Furiesi
@author Vincent Balat
*)
* Exception raised when a wikipage already exists . The argument
is the wikibox for the pre ... |
27b8150fc107fcd2029189488addc23c4fdd42e578818bd5dd5b691f90db8322 | ryzhyk/cocoon | Ops.hs |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right 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 applicable law or agreed to in ... | null | https://raw.githubusercontent.com/ryzhyk/cocoon/409d10b848a4512e7cf653d5b6cf6ecf247eb794/cocoon/Ops.hs | haskell |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right 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 applicable law or agreed to in ... | |
41d6d156800ec5917fb7ffdb02c65c73a021e086c96fde809e8adf82184eb825 | escherize/tracks | core_test.clj | (ns tracks.core-test
(:require [clojure.test :refer :all]
[tracks.core :as t :refer :all :exclude [let]]
[clojure.test.check :as tc]
[clojure.test.check.generators :as g]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defsp... | null | https://raw.githubusercontent.com/escherize/tracks/03228bac567f08e450903bb3927ce27598c26126/test/tracks/core_test.clj | clojure | <- note the more complex leaf! | (ns tracks.core-test
(:require [clojure.test :refer :all]
[tracks.core :as t :refer :all :exclude [let]]
[clojure.test.check :as tc]
[clojure.test.check.generators :as g]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defsp... |
62956672798a88776571cb1f0d4b0dde50343182dba2f3138a357f2fbdb1ad46 | krajj7/BotHack | behaviors.clj | (ns bothack.behaviors
(:require [clojure.tools.logging :as log]
[bothack.handlers :refer :all]
[bothack.actions :refer :all]
[bothack.dungeon :refer :all]
[bothack.pathing :refer :all]
[bothack.player :refer :all]
[bothack.game :refer :all]
... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/behaviors.clj | clojure | (ns bothack.behaviors
(:require [clojure.tools.logging :as log]
[bothack.handlers :refer :all]
[bothack.actions :refer :all]
[bothack.dungeon :refer :all]
[bothack.pathing :refer :all]
[bothack.player :refer :all]
[bothack.game :refer :all]
... | |
24b89e27b2f461f57a101d3ceb39956e203ef006693725c25c740f7beea92a50 | nasa/Common-Metadata-Repository | index_set_generics.clj | (ns cmr.indexer.test.data.index-set-generics
(:require
[clojure.test :refer :all]
[cmr.indexer.data.index-set-generics :as gen]))
(def index-definition-def
{:MetadataSpecification
{:URL "-quality-summary/v1.0.0"
:Name "Data Quality Summary",
:Version "1.0.0"}
:SubConceptType "DQS",
:IndexSet... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/5bed3637580e2ad6e0b0ecda4c90845171ffeb8a/indexer-app/test/cmr/indexer/test/data/index_set_generics.clj | clojure | Test getting the settings from either the config file, the environment variable, or the default value.
Testing the read schema functionality. | (ns cmr.indexer.test.data.index-set-generics
(:require
[clojure.test :refer :all]
[cmr.indexer.data.index-set-generics :as gen]))
(def index-definition-def
{:MetadataSpecification
{:URL "-quality-summary/v1.0.0"
:Name "Data Quality Summary",
:Version "1.0.0"}
:SubConceptType "DQS",
:IndexSet... |
a0a6ae5c8bbbf15a62164cd04f4cec055df88dc59ee40308e792d0f5e2cb82d8 | ucsd-progsys/nate | winfo_contained.mli | ##ifdef CAMLTK
val contained : int -> int -> widget -> bool
(** [contained x y w] returns true if (x,y) is in w *)
##else
val contained : x:int -> y:int -> 'a widget -> bool
(** [contained x y w] returns true if (x,y) is in w *)
##endif
| null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/builtin/winfo_contained.mli | ocaml | * [contained x y w] returns true if (x,y) is in w
* [contained x y w] returns true if (x,y) is in w | ##ifdef CAMLTK
val contained : int -> int -> widget -> bool
##else
val contained : x:int -> y:int -> 'a widget -> bool
##endif
|
9dc70d2f78116aaab1aa1f4f26aa23a56745ffd495df219319b29bc8aed99cad | ublubu/shapes | Main.hs | # LANGUAGE MagicHash #
module Main where
import GHC.Types (Double(D#))
import Criterion.Main
import qualified Shapes.Linear.Double as D
import qualified Shapes.Linear.Boxed as B
import qualified Linear.V2 as L
import qualified Linear.Matrix as L
import qualified Linear.Metric as L
main :: IO ()
main = defaultMain ... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes-math/bench/Main.hs | haskell | # LANGUAGE MagicHash #
module Main where
import GHC.Types (Double(D#))
import Criterion.Main
import qualified Shapes.Linear.Double as D
import qualified Shapes.Linear.Boxed as B
import qualified Linear.V2 as L
import qualified Linear.Matrix as L
import qualified Linear.Metric as L
main :: IO ()
main = defaultMain ... | |
f366cbd0244bc662aa14bd25cba344466a869537b624bd3bd8b39e447cd27fc9 | tek/ribosome | Map.hs | |Helper for encoding values to a heterogeneous MessagePack map .
module Ribosome.Host.Class.Msgpack.Map where
import Data.MessagePack (Object)
import Ribosome.Host.Class.Msgpack.Encode (MsgpackEncode (toMsgpack))
|Utility class for ' ' .
class MsgpackMapElem a where
msgpackMapElem :: a -> Map Text Object
# ov... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/host/lib/Ribosome/Host/Class/Msgpack/Map.hs | haskell | This function is variadic, meaning that it takes an arbitrary number of arguments:
This avoids the need to call 'Ribosome.toMsgpack' once for each element and then once more for the map. | |Helper for encoding values to a heterogeneous MessagePack map .
module Ribosome.Host.Class.Msgpack.Map where
import Data.MessagePack (Object)
import Ribosome.Host.Class.Msgpack.Encode (MsgpackEncode (toMsgpack))
|Utility class for ' ' .
class MsgpackMapElem a where
msgpackMapElem :: a -> Map Text Object
# ov... |
d463932070644cbddd45c158bb46e3a40be51f1a6f8bdae262ac6a4346ac15fb | 2600hz-archive/whistle | rabbit_variable_queue.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_variable_queue.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
exported for te... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved .
-module(rabbi... |
21405e677f6ee301360a8b8dde3359a8597f6e08f21c3eda8036a072e25c7668 | iokasimov/pandora | Stack.hs | # LANGUAGE AllowAmbiguousTypes #
module Pandora.Paradigm.Structure.Interface.Stack where
import Pandora.Core.Functor (type (<), type (<<))
import Pandora.Paradigm.Primary.Functor.Maybe (Maybe)
import Pandora.Paradigm.Inventory.Some.State (State)
import Pandora.Paradigm.Inventory.Some.Optics (Lens)
{- |
> When providi... | null | https://raw.githubusercontent.com/iokasimov/pandora/4a8eb485febeedc9e0954d7a47db202eea11ed07/Pandora/Paradigm/Structure/Interface/Stack.hs | haskell | |
> When providing a new instance, you should ensure it satisfies:
> * Idempotency: item @Push x . morph @Pop ≡ identity
| # LANGUAGE AllowAmbiguousTypes #
module Pandora.Paradigm.Structure.Interface.Stack where
import Pandora.Core.Functor (type (<), type (<<))
import Pandora.Paradigm.Primary.Functor.Maybe (Maybe)
import Pandora.Paradigm.Inventory.Some.State (State)
import Pandora.Paradigm.Inventory.Some.Optics (Lens)
class Stack struct... |
0ba64487d2fcdbac78ce95ef6a838158d6a8a5ad0dc2755bb21ead5b741f0c15 | sealchain-project/sealchain | Persist.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Pact.Persist
(Persist,
Table(..),DataTable,TxTable,
TableId(..),tableId,
PactKey(..),PactValue,
DataKey(..),T... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src/Pact/Persist.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
key query stuff
a key value pairs with an operator: >= k, < k, etc.
connectors join operators: (>= k1 -AND- < k2) -OR- /= k3
| SQL equivalents for 'KeyConj'
| Convenience for infix usage.
| Convenience for infix usage.
| Boolean argument t... | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
module Pact.Persist
(Persist,
Table(..),DataTable,TxTable,
TableId(..),tableId,
PactKey(..),PactValue,
DataKey(..),TxKey(..),
KeyCmp(..),cmpToOp,
KeyConj(..),conjToOp,
KeyQuery(..),kAnd,kOr,com... |
fdf048e0ec2946a0b0b54da777a1d666189c9d2f3521342e61ae2cd8c5670929 | NaOHman/XMonadPlus | Operations.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , PatternGuards , TypeSynonymInstances #
-- --------------------------------------------------------------------------
-- |
-- Module : XMonad.Operations
Copyright : ( c ) 2007
-- License : BSD3-style (see LI... | null | https://raw.githubusercontent.com/NaOHman/XMonadPlus/1495e102ae3304817d1897a393e1f31fef71d41f/xmonad-darcs/src/XMonad/Operations.hs | haskell | --------------------------------------------------------------------------
|
Module : XMonad.Operations
License : BSD3-style (see LICENSE)
Stability : unstable
---------------------------------------------------------------------------
-------------------------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , PatternGuards , TypeSynonymInstances #
Copyright : ( c ) 2007
Maintainer :
Portability : not portable , Typeable deriving , mtl ,
Operations .
module XMonad.Operations where
import XMonad.Core
import X... |
b51412819ac7a04a7f537554a27006eb98cc64bb1ea5760f86cae2a048b59707 | scalaris-team/scalaris | db_mnesia.erl | 2013 - 2019 Zuse Institute Berlin ,
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/db_mnesia.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2013 - 2019 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 DB back - end using .
Two keys K and L are considered equal if K = = L yields true .
-module(db_mn... |
1af23d0029fcd3e2727c428377430b1ccdeb22192edc6a328cd4b64d80aa3a94 | TristeFigure/shuriken | syntax_quote_test.clj | (ns shuriken.monkey-patches.syntax-quote-test
(:require [clojure.test :refer :all]
[shuriken.monkey-patches.syntax-quote]
[clojure.pprint :refer [pprint]]))
(require '[clojure.core :refer [from-syntax-quote]])
(deftest test-syntax-quote
(testing "` reader macro expansion"
(is (= `abc
... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/test/shuriken/monkey_patches/syntax_quote_test.clj | clojure | (ns shuriken.monkey-patches.syntax-quote-test
(:require [clojure.test :refer :all]
[shuriken.monkey-patches.syntax-quote]
[clojure.pprint :refer [pprint]]))
(require '[clojure.core :refer [from-syntax-quote]])
(deftest test-syntax-quote
(testing "` reader macro expansion"
(is (= `abc
... | |
4aa9c21f6050adc0ccb0b948c2ac48b4298435ffb68c635cd3893d4636b8f70f | xcoo/proton | function_test.cljc | (ns proton.function-test
(:require #?(:clj [clojure.test :refer [deftest is]]
:cljs [cljs.test :refer-macros [deftest is]])
[proton.function :as function]))
(deftest lcomp-test
(is (= ((comp (partial * 2) inc) 8) 18))
(is (= ((function/lcomp inc (partial * 2)) 8) 18)))
(deftest comp-a... | null | https://raw.githubusercontent.com/xcoo/proton/3c8d5ddd43da5bb7d54343645ddaae4ceb9b76ef/test/proton/function_test.cljc | clojure | (ns proton.function-test
(:require #?(:clj [clojure.test :refer [deftest is]]
:cljs [cljs.test :refer-macros [deftest is]])
[proton.function :as function]))
(deftest lcomp-test
(is (= ((comp (partial * 2) inc) 8) 18))
(is (= ((function/lcomp inc (partial * 2)) 8) 18)))
(deftest comp-a... | |
a76a26700eeeb311bfdd89474e5c1b9d0ead416b9aba29ac51d7e1d36f3a24cb | alex-gutev/tridash | coalescer.lisp | ;;;; coalescer.lisp
;;;;
;;;; Tridash Programming Language.
Copyright ( C ) 2018 - 2019
;;;;
;;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;;; (... | null | https://raw.githubusercontent.com/alex-gutev/tridash/48853919257f512893b5d041afe5d609c48ecd0a/src/coalescer.lisp | lisp | coalescer.lisp
Tridash Programming Language.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A ... | Copyright ( C ) 2018 - 2019
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :tridash.frontend)
(in-readtable cut-syntax)
(defun c... |
cc8715a055b92646236115e2331e3b934e24c2c39013e94aafd28457d098bfc1 | morpheusgraphql/morpheus-graphql | Utils.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Internal.Utils
( IsMap (..),
KeyOf (..),
toPair,
selectBy,
traverseCollection,
... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/1d422eb1c2c40fee1148d236fc848144a0b08e11/morpheus-graphql-core/src/Data/Morpheus/Internal/Utils.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE PolyKinds #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Internal.Utils
( IsMap (..),
KeyOf (..),
toPair,
selectBy,
traverseCollection,
prop,
fromLBS,
toLBS,
mergeT,
Empty (..),
... |
bafd99f17896be0f993adcdd72a893357cf1c434ce2916c4e72bfaa96256db6f | openmusic-project/openmusic | textbuffer.lisp | ;;===========================================================================
LW Lisp Tools
Lisp programming tools for LispWorks delivered applications
;;===========================================================================
;===========================================================================
; This progr... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/0bd8613a844a382e5db7185be1b5a5d026d66b20/OPENMUSIC/code/api/om-LW/lw-lisp-tools/textbuffer.lisp | lisp | ===========================================================================
===========================================================================
===========================================================================
This program is free software; you can redistribute it and/or
either version 2
See file ... | LW Lisp Tools
Lisp programming tools for LispWorks delivered applications
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Bo... |
5d1783801adf53ea0467e876f224be44e5f62af85fffeb30168d6c98b0c2230a | chrisdone/lucid | Base.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DeriveDataTypeable #-}
Search for UndecidableInstances to see why this is needed
# LANGUAGE UndecidableInstances #
-- | Base types ... | null | https://raw.githubusercontent.com/chrisdone/lucid/10b93cff4b2d447a552b583e8914170250be35a6/lucid1/src/Lucid/Base.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
# LANGUAGE DeriveDataTypeable #
| Base types and combinators.
* Rendering
* Running
* Combinators
* Types
* Classes
------------------------------------------------------------------------------
Types
| A simple attribute. Don't use the constructor, use
'makeAttribu... | # LANGUAGE CPP #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Search for UndecidableInstances to see why this is needed
# LANGUAGE UndecidableInstances #
module Lucid.Base
renderText
,renderBS
,renderTextT
,renderBST
,renderToFile
,execHtmlT
,... |
bd803f012adaeb9dca81373c86fbe897f3717a7f25918891c4a4d91be3dcab98 | marick/Midje | fus_nested_backgrounds.clj | (ns user.fus-nested-backgrounds
(:require [midje.sweet :refer :all]
[midje.test-util :refer :all]))
;; It's proven tricky to get the nesting of the macroexpansion of backgrounds correct. Hence these tests.
(unfinished f)
First , a little demonstration that deeply - nested errors do n't get lost .
(s... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/user/fus_nested_backgrounds.clj | clojure | It's proven tricky to get the nesting of the macroexpansion of backgrounds correct. Hence these tests.
The nesting cases
Some of the new looser forms of against-background
Want to show that error cases work as well. | (ns user.fus-nested-backgrounds
(:require [midje.sweet :refer :all]
[midje.test-util :refer :all]))
(unfinished f)
First , a little demonstration that deeply - nested errors do n't get lost .
(silent-fact
(against-background [(f 1) => 1]
(fact
(against-background [(f 2) => 2]
(fa... |
5ae53efef5b78aa75652daba5247657e22d1f771138391e4e09d0cdae301e462 | lenn0x/Event-Notifier | thrift_client.erl | %%
Licensed to the Apache Software Foundation ( ASF ) under one
%% or more contributor license agreements. See the NOTICE file
%% distributed with this work for additional information
%% regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
%% "License"); you ... | null | https://raw.githubusercontent.com/lenn0x/Event-Notifier/5b370624578f4610b4af71c989c13068c2cbbf58/thrift-erl/src/thrift_client.erl | erlang |
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 require... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(thrift_client).
-export([new/2, call/3, send_call/3, close/1]).
-inclu... |
c339a58cc2b26fa02cb72801bf01959034ccb4b49bb3b9f4a25241b3f8a3794e | yav/graphmod | X.hs | module D.X where
import B
| null | https://raw.githubusercontent.com/yav/graphmod/53ab1304357c8e71c874808bd67002d573e7ed25/tests/T1/D/X.hs | haskell | module D.X where
import B
| |
96d8f57faa6e524a715617452fea7c6955c2a60d0ff08199d8e548b0aa8b23c5 | buntine/Simply-Scheme-Exercises | 12-13.scm | Write a new version of the describe- time procedure from Exercise 6.14 .
; Instead of returning a decimal number, it should behave like this:
;
> ( describe - time 22222 )
( 6 HOURS 10 MINUTES 22 SECONDS )
;
> ( describe - time 4967189641 )
( 1 CENTURIES 57 YEARS 20 WEEKS 6 DAYS 8 HOURS 54 MINUTES 1 SECONDS )... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/12-the-leap-of-faith/12-13.scm | scheme | Instead of returning a decimal number, it should behave like this:
to use a tree data structure. Please fork if you know a better solution!
This is specific to this problem and not at all
general-purpose! | Write a new version of the describe- time procedure from Exercise 6.14 .
> ( describe - time 22222 )
( 6 HOURS 10 MINUTES 22 SECONDS )
> ( describe - time 4967189641 )
( 1 CENTURIES 57 YEARS 20 WEEKS 6 DAYS 8 HOURS 54 MINUTES 1 SECONDS )
Can you make the program smart about saying 1 CENTURY instead of 1 CEN... |
16606fd6163a01febb392e952905c705a77b4eb9701aa2f6685c2e3e2d3fedc5 | hoplon/hoplon | core.clj | Copyright ( c ) and . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;;... | null | https://raw.githubusercontent.com/hoplon/hoplon/2f886d10d942e72e4565dfbb997487e90c8d5e3a/src/hoplon/core.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
; ;... | Copyright ( c ) and . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns hoplon.core
(:require [clojure.string :as string]
[clojure.spec.alpha :as spec]
[javelin.core :as j]
[hoplon.spec]))
(defn- ^{:from 'org.clojure/core.incubator} silent-read
... |
37dcede7fce88fa8f23a75a6c2acd346c0de403da3ea7f6a6276079337300b94 | clash-lang/clash-compiler | T1063.hs | module T1063 where
import Clash.Prelude
# ANN topEntity ( defSyn " top " )
{ t_inputs = [ " wrong " [ PortName " one " , PortName " two " ] ] }
#
{t_inputs = [PortProduct "wrong" [PortName "one", PortName "two"]]}
#-}
topEntity :: Int -> Int
topEntity = id
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldfail/TopEntity/T1063.hs | haskell | module T1063 where
import Clash.Prelude
# ANN topEntity ( defSyn " top " )
{ t_inputs = [ " wrong " [ PortName " one " , PortName " two " ] ] }
#
{t_inputs = [PortProduct "wrong" [PortName "one", PortName "two"]]}
#-}
topEntity :: Int -> Int
topEntity = id
| |
994412ed5917de3c761622b7b0e9430328ead44d7fbdec4a6be76ddd2d5e8508 | luizalbertocviana/haskell-experiments | Heap.hs | module Heap (Heap, empty, lookup, insert, pop, changeKey) where
import Prelude (Ord, (<=), Show)
import Bool
import Maybe
data Heap k v = Empty
| Heap (k, v) [Heap k v]
lookup :: Heap k v -> Maybe (k, v)
lookup Empty = Nothing
lookup (Heap keyval _) = Just keyval
merge :: Ord k => Heap k v -> Heap k ... | null | https://raw.githubusercontent.com/luizalbertocviana/haskell-experiments/eee61245316e3d78819f88b0e60e0c3a3374483e/Heap.hs | haskell | module Heap (Heap, empty, lookup, insert, pop, changeKey) where
import Prelude (Ord, (<=), Show)
import Bool
import Maybe
data Heap k v = Empty
| Heap (k, v) [Heap k v]
lookup :: Heap k v -> Maybe (k, v)
lookup Empty = Nothing
lookup (Heap keyval _) = Just keyval
merge :: Ord k => Heap k v -> Heap k ... | |
52887ca22dafe9cf4cd05e83c11dd3c66e45999f259d5f161d44f05a7b5a76b5 | hopbit/sonic-pi-snippets | ll_dnb_la.sps | # key: ll dnb la
# point_line: 3
# point_index: 0
# --
live_loop :beats do
# use_bpm 170
sample :loop_amen, beat_stretch: 4, amp: 0.25
sleep 4
end
| null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/live_loop/ll_dnb_la.sps | scheme | # key: ll dnb la
# point_line: 3
# point_index: 0
# --
live_loop :beats do
# use_bpm 170
sample :loop_amen, beat_stretch: 4, amp: 0.25
sleep 4
end
| |
8e075c0d17f04d35526cf80c62d88f3e7ddd9fb176ec3a3d067e1c9e4df12cec | agda/agda | Issue2063.hs | # LANGUAGE RecordWildCards #
import Control.Monad
import System.Directory
import System.FilePath
import RunAgda
-- The directory used to store output created by this script. Will be
-- deleted.
name = "Issue2063"
mainFile = name </> "Bug.agda"
correctCode = unlines
[ "module " ++ name ++ ".Bug where"
, ""
, ... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/interaction/Issue2063.hs | haskell | The directory used to store output created by this script. Will be
deleted.
Create some interface files.
Load the main module (with caching turned on), add some more
lines of code, and reload the module. | # LANGUAGE RecordWildCards #
import Control.Monad
import System.Directory
import System.FilePath
import RunAgda
name = "Issue2063"
mainFile = name </> "Bug.agda"
correctCode = unlines
[ "module " ++ name ++ ".Bug where"
, ""
, "open import " ++ name ++ ".Class"
]
incorrectCode = correctCode ++ unlines
[ ... |
181fe4f5ca67115152a90a47f413bab44d5eaa981f101fee0cb1d4c9b5001685 | amnh/PCG | Class.hs | -----------------------------------------------------------------------------
-- |
-- Module : Bio.Character.Exportable.Class
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Class for needed operati... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/exportable/src/Bio/Character/Exportable/Class.hs | haskell | ---------------------------------------------------------------------------
|
Module : Bio.Character.Exportable.Class
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
Class for needed operations of coded sequences and characters
--------------------------------... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
module Bio.Character.Exportable.Class
*
ExportableCharacterBuffer(..)
, ExportableCharacterElements(..)
, ReIm... |
48297842266a4ae878d2869f5061990050789dbc6f7a5fd6f94b504668445830 | static-analysis-engineering/codehawk | tCHBchlibAssertion.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Unit Testing Framework
Author : Adapted from : ( )
------------------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHT/CHB_tests/bchlib_tests/tbchlib/tCHBchlibAssertion.mli | ocaml | chutil
bchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Unit Testing Framework
Author : Adapted from : ( )
------------------------------------------------------------------------------
... |
93170e7ee00cbf4cc771100313d55833de22ca0eb89f567dd68abe245ef089f6 | achirkin/qua-view | Info.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
module Widgets.Tabs.Info
( panelInfo
) where
import Control.Lens
import Data.Map (fromList, toList, filterWithKey)
import Data.Maybe (fromMa... | null | https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Widgets/Tabs/Info.hs | haskell | # LANGUAGE OverloadedStrings #
Show user-provided description of their submission
draw an image above the info table if it is available
| Returns tuple (property-updated-event, property-selected-event)
^ Can edit properties
draw the info table
| Assume value is constant, because we redraw the whole list on every ... | # LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
module Widgets.Tabs.Info
( panelInfo
) where
import Control.Lens
import Data.Map (fromList, toList, filterWithKey)
import Data.Maybe (fromMaybe)
import qualified Data.Set as S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.