_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 |
|---|---|---|---|---|---|---|---|---|
01003aebbd7277c4e0f09eb9da1893d35bc72171d7cfad665d1c1d43c9e5f1ca | denisidoro/rosebud | grafana.clj | (ns rosebud.logic.grafana
(:require [clojure.set :as set]
[clojure.string :as str]
[quark.beta.time :as time]
[quark.conversion.data :as conversion]
[rosebud.logic.balance-map :as l.balance-map]))
(defn kw->wire
[x]
(if (keyword? x)
(-> x str (subs 1))
(str... | null | https://raw.githubusercontent.com/denisidoro/rosebud/90385528d9a75a0e17803df487a4f6cfb87e981c/server/src/rosebud/logic/grafana.clj | clojure | (ns rosebud.logic.grafana
(:require [clojure.set :as set]
[clojure.string :as str]
[quark.beta.time :as time]
[quark.conversion.data :as conversion]
[rosebud.logic.balance-map :as l.balance-map]))
(defn kw->wire
[x]
(if (keyword? x)
(-> x str (subs 1))
(str... | |
5543b7bf79b984e61d3d1f3394b1c7ba40342416a575aa46553e8924d26a0413 | denisshevchenko/circlehs | CheckoutKey.hs | |
Module : Network . CircleCI.CheckoutKey
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : alpha
API calls for work with Checkout Keys . CircleCI uses Checkout Keys to check out your GitHub project , submodules , and private dependencies .
For more info please see " ... | null | https://raw.githubusercontent.com/denisshevchenko/circlehs/0c01693723a234bb46ff8d1e6e114cce91dfa032/src/Network/CircleCI/CheckoutKey.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf #
* API calls
* Types for calls and responses
| Shows list of checkout keys. Based on /#list-checkout-keys.
Usage example:
@
main :: IO ()
>>= \\case
Left problem -> print problem
Right keys -> print keys
@
^ List of checkout keys... | |
Module : Network . CircleCI.CheckoutKey
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : alpha
API calls for work with Checkout Keys . CircleCI uses Checkout Keys to check out your GitHub project , submodules , and private dependencies .
For more info please see " ... |
c60978ca19cdff0fc41c6e0884055e9f11dbd33c5855bc235982888d41dd0839 | themetaschemer/malt | test-D-sum.rkt | (module+ test
(require rackunit)
(require "C-star-2-1.ss")
(require (only-in "../tensors.rkt" tensor))
(require (only-in "A-scalar-ops.ss" d-sqr d* d-))
(let ((a (tensor 3 4 5)))
(check-ρ-∇ (sum-1 a) 12
(list (tensor 1.0 1.0 1.0)))
(check-ρ-∇ (d-sum a) 12
(list (tensor 1... | null | https://raw.githubusercontent.com/themetaschemer/malt/97863c511adff146cfd38d3a22df790b99609141/flat-tensors/ext-ops/test/test-D-sum.rkt | racket | (module+ test
(require rackunit)
(require "C-star-2-1.ss")
(require (only-in "../tensors.rkt" tensor))
(require (only-in "A-scalar-ops.ss" d-sqr d* d-))
(let ((a (tensor 3 4 5)))
(check-ρ-∇ (sum-1 a) 12
(list (tensor 1.0 1.0 1.0)))
(check-ρ-∇ (d-sum a) 12
(list (tensor 1... | |
4c23a75472257d39c3b70888eba035b1aed5f07dde23959e9337d22e7f1d1f7d | Vagabond/erlang-alexander | gen_server_test.erl | -module(gen_server_test).
-compile([{parse_transform, alexander}]).
-behaviour(gen_server).
-export([start_link/0, blocking_call/2, blocking_call/1, blocking_infinite_call/2, blocking_timeout_call/2, recursive_call/1]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
... | null | https://raw.githubusercontent.com/Vagabond/erlang-alexander/46535df49356da7b38970f9fe029f12ff81ca744/test/gen_server_test.erl | erlang | gen_server callbacks | -module(gen_server_test).
-compile([{parse_transform, alexander}]).
-behaviour(gen_server).
-export([start_link/0, blocking_call/2, blocking_call/1, blocking_infinite_call/2, blocking_timeout_call/2, recursive_call/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
... |
b142a83372a8fd321c3414ed5909670a7edaa44c5274531f8f8f08fd4e654474 | zalky/reflet | debug.cljs | (ns reflet.debug
(:require [cinch.core :as util]
[re-frame.core :as f]
[re-frame.db :as rdb]
[re-frame.events :as events]
[re-frame.interceptor :as i]
[re-frame.interop :as interop]
[re-frame.registrar :as reg]
[reagent.core :as r]
... | null | https://raw.githubusercontent.com/zalky/reflet/fe88f7fd7d761dfa40af0e8f83d7f390e5a914b6/src/clojure/reflet/debug.cljs | clojure | ::d/tap must happen after the ::d/untap of the previous react
lifecycle. To guarantee this, ::d/tap must be invoked in either
the `:ref` callback, or the `:component-did-mount` phase of the
component lifecycle. Must not dispatch in a `with-let`, where it
reflet.core/cleanup :debug/id defmethod. | (ns reflet.debug
(:require [cinch.core :as util]
[re-frame.core :as f]
[re-frame.db :as rdb]
[re-frame.events :as events]
[re-frame.interceptor :as i]
[re-frame.interop :as interop]
[re-frame.registrar :as reg]
[reagent.core :as r]
... |
475db253b248e95ce4ecd179ea1ccff94f3705474912687073a602e428b8f5af | oden-lang/oden | ParseProtocolDefinitionSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Oden.Parser.ParseProtocolDefinitionSpec where
import Test.Hspec
import Oden.Identifier
import Oden.Parser
import Oden.SourceInfo
import Oden.Syntax
import Oden.Type.Signature
import Oden.Assertions
src ::... | null | https://raw.githubusercontent.com/oden-lang/oden/10c99b59c8b77c4db51ade9a4d8f9573db7f4d14/test/Oden/Parser/ParseProtocolDefinitionSpec.hs | haskell | # LANGUAGE OverloadedStrings # | module Oden.Parser.ParseProtocolDefinitionSpec where
import Test.Hspec
import Oden.Identifier
import Oden.Parser
import Oden.SourceInfo
import Oden.Syntax
import Oden.Type.Signature
import Oden.Assertions
src :: Line -> Column -> SourceInfo
src l... |
8e3de77a5b2a0f1fc0036dcf5e703cf3f836ede2ed17425029e9fca052c4cd4f | alphaHeavy/protobuf | Data.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Data where
import Control.DeepSeq (NFData)
import Data.ProtocolBuffers
import GHC.Generics(Generic)
import Data.Binary.Builder.Sized
import Data.Binary.Get
import Data.ByteString(ByteString)
import qualified Data.ByteSt... | null | https://raw.githubusercontent.com/alphaHeavy/protobuf/46cda829cf1e7b6bba2ff450e267fb1a9ace4fb3/bench/Data.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Data where
import Control.DeepSeq (NFData)
import Data.ProtocolBuffers
import GHC.Generics(Generic)
import Data.Binary.Builder.Sized
import Data.Binary.Get
import Data.ByteString(ByteString)
import qualified Data.ByteString.Lazy as LBS
data Burst = Burs... |
a767863ad8eb09819ced22d40aa27faa2357332143bf6190de88d1fdeeb31bb7 | nubank/mockfn | macros.cljc | (ns mockfn.macros
#?(:cljs (:require-macros [mockfn.macros]))
(:require [mockfn.mock :as mock]
[mockfn.internal.macros :as internal.macro]))
(defn calling
"Invoke mocked value as a function instead of returning it."
[func] (mock/calling func))
(def fall-through
"Invoke the original implementatio... | null | https://raw.githubusercontent.com/nubank/mockfn/7e51406edd237ba51687bfef4e66ee521c603b5f/src/mockfn/macros.cljc | clojure | (ns mockfn.macros
#?(:cljs (:require-macros [mockfn.macros]))
(:require [mockfn.mock :as mock]
[mockfn.internal.macros :as internal.macro]))
(defn calling
"Invoke mocked value as a function instead of returning it."
[func] (mock/calling func))
(def fall-through
"Invoke the original implementatio... | |
39c25bfefec945ec0166882100c50c79af7237083c6e187f2882cf0d7d792a2b | ssor/erlangDemos | sc_app.erl | -module(sc_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
sc_store:init(),
case sc_sup:start_link() of
{ok, Pid} ->
{ok, Pid};
Other ->
{error, Other}
end.
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/erlware-Erlang-and-OTP-in-Action-Source/chapter_06/simple_cache/src/sc_app.erl | erlang | -module(sc_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
sc_store:init(),
case sc_sup:start_link() of
{ok, Pid} ->
{ok, Pid};
Other ->
{error, Other}
end.
stop(_State) ->
ok.
| |
c245feae193797f4eb0d6d3a54be2c2a5c0c57eb5b533d3aa17c261f64c487f1 | S8A/htdp-exercises | ex160.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 ex160) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex160.rkt | racket | about the language level of this file in a form that our tools can easily process.
List-of-string String -> N
– empty
Son is used when it
applies to Son.L and Son.R
A Son.R is one of:
– empty
Constraint If s is a Son.R,
no number occurs twice in s
Son
Number Son -> Boolean
is x in s
Number Son.L -... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex160) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
8ee023eeb83751c8924f0a8739d274b5f42e28bf34b5db8ea1d961fb58baf17e | input-output-hk/plutus-apps | ExtrasSpec.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE NumericUnderscores #-}
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
# OPTIONS_GHC -Wno - orphans #
module Control.Concurrent.STM.ExtrasSpec
( tests
) where
import Control.Concurrent (threadD... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-pab/test/light/Control/Concurrent/STM/ExtrasSpec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE NumericUnderscores #
# LANGUAGE ScopedTypeVariables #
| # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wno - orphans #
module Control.Concurrent.STM.ExtrasSpec
( tests
) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (concurrently, forConcurrently)
import Control.Concurrent.STM (atomically)
impo... |
35c54206ca2927c0dcb9027eae511c5e9c89aedd73ead8f795a812c3862eafcd | mindreframer/clojure-stuff | stomp.clj | Copyright ( c ) . 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/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/ztellman/aleph/src/aleph/stomp.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns aleph.stomp
(:use
[potemkin]
[lamina core connections])
(:require
[clojure.string :as str]
[lamina.cache :as cache]
[aleph.tcp :as tcp]
[aleph.stomp.core :as stomp]
[aleph.stomp.codec :as codec]))
(defn- router-handshake? [handshake]
... |
38b76221442c263a5b15bf3e20285db2f061a33bbac01116ab89816f820e215a | bennn/dissertation | test.rkt | #lang racket
(require
(only-in "../core/math.rkt" vec3)
"interpolation.rkt")
(define (parse fn)
(define v (file->value fn))
(let loop ((v v))
(cond
[(pair? v)
(if (eq? 'struct:vec3 (car v))
(apply vec3 (cdr v))
(cons (loop (car v)) (loop (cdr v))))]
[else
v])))
... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/math-test/ruckus/test.rkt | racket | #lang racket
(require
(only-in "../core/math.rkt" vec3)
"interpolation.rkt")
(define (parse fn)
(define v (file->value fn))
(let loop ((v v))
(cond
[(pair? v)
(if (eq? 'struct:vec3 (car v))
(apply vec3 (cdr v))
(cons (loop (car v)) (loop (cdr v))))]
[else
v])))
... | |
cfd1d87e25299776c20ee8160a24589ff844b9269430310ed00c7dd54a0e8dcb | cljfx/cljfx | e09_todo_app.clj | (ns e09-todo-app
(:require [cljfx.api :as fx])
(:import [javafx.scene.input KeyCode KeyEvent]))
(def initial-state
{:typed-text ""
:by-id {0 {:id 0
:text "Buy milk"
:done true}
1 {:id 1
:text "Buy socks"
:done false}}})
(defn todo-view [{:key... | null | https://raw.githubusercontent.com/cljfx/cljfx/29aaef956b22cee774524912a3083ed651033f1b/examples/e09_todo_app.clj | clojure | (ns e09-todo-app
(:require [cljfx.api :as fx])
(:import [javafx.scene.input KeyCode KeyEvent]))
(def initial-state
{:typed-text ""
:by-id {0 {:id 0
:text "Buy milk"
:done true}
1 {:id 1
:text "Buy socks"
:done false}}})
(defn todo-view [{:key... | |
008b52b3ee68a1d17bdcc69ee8aa7584c54bd372c73963261ea0b082cd05c85a | gafiatulin/codewars | Balanced.hs | -- Are the brackets balanced?
-- /
module Codewars.Exercises.Balanced where
isBalanced :: String -> Bool
isBalanced = vp 0 . filter (`elem` "()")
where vp 0 [] = True
vp _ [] = False
vp n ('(':xs) = vp (n+1) xs
vp n (')':xs) | n > 0 = vp (n-1) xs
| otherwise... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/Beta/Balanced.hs | haskell | Are the brackets balanced?
/ |
module Codewars.Exercises.Balanced where
isBalanced :: String -> Bool
isBalanced = vp 0 . filter (`elem` "()")
where vp 0 [] = True
vp _ [] = False
vp n ('(':xs) = vp (n+1) xs
vp n (')':xs) | n > 0 = vp (n-1) xs
| otherwise = False
|
de2711bdbdb30ea6830682c06a6c3c299ad6e6e7c791e61835911abe7757188f | darrenldl/oali | answer_store.mli | type t = (string, string) Hashtbl.t
val create : unit -> t
val write : task_name:string -> t -> unit
val load : task_name:string -> t
| null | https://raw.githubusercontent.com/darrenldl/oali/d5fd4b2da61aa8bc21863af6bf352d1ac63de8f3/src/answer_store.mli | ocaml | type t = (string, string) Hashtbl.t
val create : unit -> t
val write : task_name:string -> t -> unit
val load : task_name:string -> t
| |
92a2db1fc5e8aaa7cca17e632f321e5c741429eafdf541a717b1bbe2bc68969f | 2600hz/kazoo | kz_dataconnection_sup.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
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 /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_data/src/kz_dataconnection_sup.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
==============================================================================
API functions
=========================================================... | ( C ) 2012 - 2020 , 2600Hz
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 /.
-module(kz_dataconnection_sup).
-behaviour(supervisor).
-include("kz_data.hrl").
-define(SERVER, ?MODULE).
-exp... |
d0e38495fb875eb7d3581d3aa117cf9a7e780082f185a2067aa0f674f1a3b192 | cosmos72/cl-parametric-types | 1-options.lisp | ;; -*- lisp -*-
;; This file is part of cl-parametric-types.
Copyright ( c ) 2016
;;
;; This library is free software: you can redistribute it and/or
modify it under the terms of the Lisp Lesser General Public License
;; (), known as the LLGPL.
;;
;; This library is distributed in the hope that it will be useful... | null | https://raw.githubusercontent.com/cosmos72/cl-parametric-types/05dbd839172d6eb6dfc78cc4e53238f95c0c7369/main/1-options.lisp | lisp | -*- lisp -*-
This file is part of cl-parametric-types.
This library is free software: you can redistribute it and/or
(), known as the LLGPL.
This library 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... |
Copyright ( c ) 2016
modify it under the terms of the Lisp Lesser General Public License
(in-package #:cl-parametric-types)
(defun parse-function-declaims (name declaims)
(declare (type list declaims))
(let ((new-declaims nil)
(cons-name `(,name)))
(dolist (form declaims)
(destructuring-bind (d... |
f32549b58781df828940b8af174380b9f449d4ca5774e95f2a08c9ea7bde7154 | mikelevins/folio2 | series-syntax.lisp | ;;;; ***********************************************************************
;;;;
Name : syntax.lisp
;;;; Project: folio2 - Functional idioms for Common Lisp
;;;; Purpose: series macros
;;;; Author: mikel evins
Copyright : 2015 by mikel evins
;;;;
;;;; *****************************... | null | https://raw.githubusercontent.com/mikelevins/folio2/a96052f78f0e0358376a498c6351342ece6a9b7b/src/series-syntax.lisp | lisp | ***********************************************************************
Project: folio2 - Functional idioms for Common Lisp
Purpose: series macros
Author: mikel evins
***********************************************************************
macro iterate
(iterate fn init) => vals
-----------... | Name : syntax.lisp
Copyright : 2015 by mikel evins
(in-package :net.bardcode.folio2.series)
Accepts a function FN that accepts a single argument and returns a
(defmacro iterate (fn init)
(let ((arg (gensym)))
`(series:scan-fn t
(lambda () ,init)
(l... |
35159f41de594daf6de0857ff310da10be1a11f7f521d876e817881650348451 | qriollo/qriollo | Py.hs |
-- Este archivo es parte de Qriollo.
Qriollo 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.
--
Qriollo is distributed in the... | null | https://raw.githubusercontent.com/qriollo/qriollo/b45ba0f4e9d444f786217ff931d7ecf74bfddbe4/src/Backend/Py.hs | haskell | Este archivo es parte de Qriollo.
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
For identifying self applications
Does the program use foreign function... |
Qriollo 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
Qriollo is distributed in the hope that it will be useful ,
You should have received a copy of the GNU Gen... |
7b45a7816b27c2330299add1269719620f19f838ceb5b7c42058685a486fe164 | rumblesan/improviz | BlockHandling.hs | module Language.Interpreter.StdLib.BlockHandling
( addBlockHandlingStdLib
) where
import Language.Ast ( Value(Null) )
import Language.Interpreter.Types ( InterpreterProcess
, setBuiltIn
... | null | https://raw.githubusercontent.com/rumblesan/improviz/23e16ae7b2d55d2204417ec60c7cb6673a93df7d/src/Language/Interpreter/StdLib/BlockHandling.hs | haskell | module Language.Interpreter.StdLib.BlockHandling
( addBlockHandlingStdLib
) where
import Language.Ast ( Value(Null) )
import Language.Interpreter.Types ( InterpreterProcess
, setBuiltIn
... | |
bdebb4eec13b6ed26625df9fe5f5ba28772826f9277b410895dc5d374b081a5a | robert-strandh/SICL | eliminate-fdefinition-asts.lisp | (cl:in-package #:sicl-ast-to-hir)
(defun find-fdefinition-asts (ast)
(let ((result '()))
(cleavir-ast:map-ast-depth-first-preorder
(lambda (node)
(when (typep node 'cleavir-ast:fdefinition-ast)
(push node result)))
ast)
result))
;;; when CST-to-AST detects a global function referen... | null | https://raw.githubusercontent.com/robert-strandh/SICL/7ea6532a849892bc3f573fa15ce7be10904b6da0/Code/Compiler/AST-to-HIR/eliminate-fdefinition-asts.lisp | lisp | when CST-to-AST detects a global function reference in a FUNCTION
code, looks like (CAR (LOAD-TIME-VALUE (FUNCTION-CELL 'NAME))).
In other words, the function cell is requested from the
environment at load time and then becomes a literal value at run
time. So at run time, only a CAR-INSTRUCTION is executed in ord... | (cl:in-package #:sicl-ast-to-hir)
(defun find-fdefinition-asts (ast)
(let ((result '()))
(cleavir-ast:map-ast-depth-first-preorder
(lambda (node)
(when (typep node 'cleavir-ast:fdefinition-ast)
(push node result)))
ast)
result))
special form , it creates an FDEFINITION - AST cont... |
9fae72f272b0fd86736ce12ae49237845af4a5cdd9e19c81b5a693be8f97770e | HunterYIboHu/htdp2-solution | ex112-checked-area-of-disk.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 ex112-checked-area-of-disk) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section6/ex112-checked-area-of-disk.rkt | racket | about the language level of this file in a form that our tools can easily process.
Number -> Number
computes the area of a disk with radius r
Any -> Number
computes the area of a disk with radius r
if r is a number. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex112-checked-area-of-disk) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-deci... |
9d2f45d049febb23edd57f9f9a68ae4a798668f4f309da20859b53394c79a2f4 | cky/guile | instruction.scm | ;;; Guile VM instructions
Copyright ( C ) 2001 , 2010 Free Software Foundation , Inc.
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at ... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/system/vm/instruction.scm | scheme | Guile VM instructions
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library 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 PA... |
Copyright ( C ) 2001 , 2010 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (system vm instruction)
#... |
9afdd48133edb63f78844f281af0b3745cc6d4e1251e076d45e22e947586c2bd | justinethier/nugget | sum1.scm | SUM1 -- One of the and benchmarks .
#;(import (scheme base)
(scheme file)
(scheme read)
(scheme write)
(scheme time))
(define (sumport port sum-so-far)
(let ((x (read port)))
(if (eof-object? x)
sum-so-far
(sumport port (+ x sum-so-far)))))
(define (sum port... | null | https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/benchmarks/chicken/sum1.scm | scheme | (import (scheme base)
The following code is appended to all benchmarks.
Given an integer and an object, returns the object
without making it too easy for compilers to tell
the object will be returned.
Given the name of a benchmark,
the number of times it should be executed,
a thunk that runs the benchmark once,
... | SUM1 -- One of the and benchmarks .
(scheme file)
(scheme read)
(scheme write)
(scheme time))
(define (sumport port sum-so-far)
(let ((x (read port)))
(if (eof-object? x)
sum-so-far
(sumport port (+ x sum-so-far)))))
(define (sum port)
(sumport port 0.0))
... |
afb21ce10ab8fcdd69bd2cc5de8b69af51d38373be6c2b674799bf442249c13c | esl/elarm | elarm.erl | %%%-------------------------------------------------------------------
Copyright ( C ) 2013 - 2014 , Erlang Solutions Ltd.
%%%
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
%%%
%%... | null | https://raw.githubusercontent.com/esl/elarm/d5af5a9632df104724c8dec85a774a1421c4caae/src/elarm.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 o... | Copyright ( C ) 2013 - 2014 , Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
Alarm Management Application .
Created : 26 Jul 2013 by < erlang-solutions.com >
-module(elarm).
-e... |
84f173e0a34142a83b66462a8463ed58105bcdf60cdfcd805e0b6c9db573eeb4 | everpeace/programming-erlang-code | status.erl | -module(status).
-compile(export_all).
-import(lists, [filter/2, map/2, member/2]).
start() ->
not_compiled().
not_compiled() ->
E = lib_files_find:files(".", "*.erl",false),
E1 = map(fun(I) -> filename:rootname(I) end, E),
B = lib_files_find:files(".", "*.beam",false),
B1 = map(fun(I) -> filenam... | null | https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/status.erl | erlang | -module(status).
-compile(export_all).
-import(lists, [filter/2, map/2, member/2]).
start() ->
not_compiled().
not_compiled() ->
E = lib_files_find:files(".", "*.erl",false),
E1 = map(fun(I) -> filename:rootname(I) end, E),
B = lib_files_find:files(".", "*.beam",false),
B1 = map(fun(I) -> filenam... | |
77845d6628633fedf1507a7004e9576419470ea47e9910c5e00b0328e9f5f0e0 | GaloisInc/llvm-verifier | MemModel.hs | # LANGUAGE PatternGuards #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
|
Module : $ Header$
Description : Symbolic execution tests
License : BSD3
Stability : provisional
Point - of - contact :
Module : $Header$
Descr... | null | https://raw.githubusercontent.com/GaloisInc/llvm-verifier/d97ee6d2e731f48db833cc451326e737e1e39963/src/Verifier/LLVM/MemModel.hs | haskell | # LANGUAGE Rank2Types #
| Stores writeable memory allocations.
| Allocation with given base and number of bytes.
| @MemCopy dst src len@ represents a copy from [src..src+len) to
[dst..dst+len).
| Memstore is given address, type of value, and value.
that holds if arithmetic did not overflow.
| Join all conditions... | # LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
|
Module : $ Header$
Description : Symbolic execution tests
License : BSD3
Stability : provisional
Point - of - contact :
Module : $Header$
Description : Symbolic execu... |
65de69b22d21ee3f80bd1820f85105f717a15cf741e0708a53cdf6d1f8ec1749 | hslua/hslua | Invokable.hs | # LANGUAGE OverloadedStrings #
{-# LANGUAGE RankNTypes #-}
|
Module : HsLua . Class . Invokable
Copyright : © 2007–2012 ,
2012–2016 ,
2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : beta
Portability : FlexibleInstances , ... | null | https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-classes/src/HsLua/Class/Invokable.hs | haskell | # LANGUAGE RankNTypes #
| Invoke a Lua function. Use as:
| # LANGUAGE OverloadedStrings #
|
Module : HsLua . Class . Invokable
Copyright : © 2007–2012 ,
2012–2016 ,
2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : beta
Portability : FlexibleInstances , ForeignFunctionInterface , ScopedTypeVa... |
7af2f3776780809f61d5123740e7e0c3382c07f573e7be373bf1f297819876e8 | evilmartians/foundry | codepoint.ml | type general_category =
| Cc
| Cf
| Co
| Cs
| Ll
| Lm
| Lo
| Lt
| Lu
| Mc
| Me
| Mn
| Nd
| Nl
| No
| Pc
| Pd
| Pe
| Pf
| Pi
| Po
| Ps
| Sc
| Sk
| Sm
| So
| Zl
| Zp
| Zs
type bidirectional_category =
| AL
| AN
| B
| BN
| CS
| EN
| ES
| ET
| L
... | null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ucs/lib/codepoint.ml | ocaml | codepoint
character_name
uppercase_mapping
lowercase_mapping
titlecase_mapping | type general_category =
| Cc
| Cf
| Co
| Cs
| Ll
| Lm
| Lo
| Lt
| Lu
| Mc
| Me
| Mn
| Nd
| Nl
| No
| Pc
| Pd
| Pe
| Pf
| Pi
| Po
| Ps
| Sc
| Sk
| Sm
| So
| Zl
| Zp
| Zs
type bidirectional_category =
| AL
| AN
| B
| BN
| CS
| EN
| ES
| ET
| L
... |
e7d1b39debf48e151adb7634f432a6342297f8ef78b91fbd001fb31dc27c336a | dparis/gen-phzr | in_camera.cljs | (ns phzr.impl.accessors.component.in-camera)
(def in-camera-get-properties
{:in-camera "inCamera"})
(def in-camera-set-properties
{}) | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/component/in_camera.cljs | clojure | (ns phzr.impl.accessors.component.in-camera)
(def in-camera-get-properties
{:in-camera "inCamera"})
(def in-camera-set-properties
{}) | |
2c8e32fffbfc35326eda0c3e3b6a6ecb702ecdd1d07b712c5b03599b1af24420 | Gadjib/ocamlhomeworks | p1.ml | let unst n =
let i = ref 1 in
begin
while (10.**(float !i)) < (float n) do
i:=!i+1;
done;
!i-1;
end
;;
let first_number n =
(n - (n mod (int_of_float (10.**(float (unst n))))))/(int_of_float (10.**(float (unst n))))
;;
let expictation () =
let sum = ref 0. ... | null | https://raw.githubusercontent.com/Gadjib/ocamlhomeworks/d5568d4830d4306ea56749f17af355bc35001eff/9%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81/1%20%D1%87%D0%B5%D1%82%D0%B2%D0%B5%D1%80%D1%82%D1%8C/HW%20to%2016-09-2019/p1.ml | ocaml | let unst n =
let i = ref 1 in
begin
while (10.**(float !i)) < (float n) do
i:=!i+1;
done;
!i-1;
end
;;
let first_number n =
(n - (n mod (int_of_float (10.**(float (unst n))))))/(int_of_float (10.**(float (unst n))))
;;
let expictation () =
let sum = ref 0. ... | |
b0227a250667255cc838d80fb8afc38c4e77f8cf81761b70370b9ff8fa766c53 | jesperes/aoc_erlang | aoc2016_day24.erl | -module(aoc2016_day24).
-define(WALL, $#).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2016,
day = 24,
name = "Air Duct Spelunking"... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2016/aoc2016_day24.erl | erlang | Compute the distance for a given order of numbers.
Compute a map of {X, Y} -> Dist for all combinations numbers
occurring in the map.
Helpers | -module(aoc2016_day24).
-define(WALL, $#).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2016,
day = 24,
name = "Air Duct Spelunking"... |
aab44c855ed77343ce2c719f16db2f607ca43b737088e88b699f54c2d4c72985 | kupl/FixML | sub6.ml | type heap = EMPTY | NODE of rank * value * heap * heap
and rank = int
and value = int
exception EmptyHeap
let rank h =
match h with
| EMPTY -> -1
| NODE(r,_,_,_) -> r
let shake (x,lh,rh) =
if (rank lh) >= (rank rh)
then NODE(rank rh+1, x, lh, rh)
else NODE(rank lh+1, x, rh, lh)
let r... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/priority_queue/priority_queue/submissions/sub6.ml | ocaml | type heap = EMPTY | NODE of rank * value * heap * heap
and rank = int
and value = int
exception EmptyHeap
let rank h =
match h with
| EMPTY -> -1
| NODE(r,_,_,_) -> r
let shake (x,lh,rh) =
if (rank lh) >= (rank rh)
then NODE(rank rh+1, x, lh, rh)
else NODE(rank lh+1, x, rh, lh)
let r... | |
d1666ac9866fd214bb716766a1f223b7a0a444c06c4325a789048bc8f7aadfe6 | glebec/haskell-programming-allen-moronuki | WordNumber.hs | # LANGUAGE LambdaCase #
module WordNumber where
import Data.List (intercalate)
digitToWord :: Int -> String
digitToWord = \case
0 -> "zero"
1 -> "one"
2 -> "two"
3 -> "three"
4 -> "four"
5 -> "five"
6 -> "six"
7 -> "seven"
8 -> "eight"
9 -> "nine"
digits :: Int -> [Int]
-- di... | null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/14-testing/projects/exercises/src/WordNumber.hs | haskell | digits = map ((read :: String -> Int) . (: [])) . show
reversing so as to avoid recursive `++`
replaced `concat . intersperse` with `intercalate` as per hlint | # LANGUAGE LambdaCase #
module WordNumber where
import Data.List (intercalate)
digitToWord :: Int -> String
digitToWord = \case
0 -> "zero"
1 -> "one"
2 -> "two"
3 -> "three"
4 -> "four"
5 -> "five"
6 -> "six"
7 -> "seven"
8 -> "eight"
9 -> "nine"
digits :: Int -> [Int]
sti... |
6fb9a95fd4a5899d5e2e837e4ef53ff131d6cf36f7b8be93ac28801cd5fdd2bb | blockchain-unica/defi-workbench | address.ml | type t = Addr of string
let addr s = Addr s
let compare (Addr s1) (Addr s2) = String.compare s1 s2
let to_string (Addr a) = a
| null | https://raw.githubusercontent.com/blockchain-unica/defi-workbench/a3606bf425cef8e81d1f12b13dc1410a48f3e860/lib/address.ml | ocaml | type t = Addr of string
let addr s = Addr s
let compare (Addr s1) (Addr s2) = String.compare s1 s2
let to_string (Addr a) = a
| |
c77cdb50a6e6a7573fb1c9915246a83ed60a80f293e3a46c036315d14c89ffd8 | haskell-works/hw-xml | TokenizeSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module HaskellWorks.Data.Xml.Token.TokenizeSpec (spec) where
import Data.ByteString (ByteString)
import HaskellWorks.Data.Xml.Token.Tokenize
import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import Test.Hspec
import qualified Data.Attoparsec.ByteString.Char8 a... | null | https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/test/HaskellWorks/Data/Xml/Token/TokenizeSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module HaskellWorks.Data.Xml.Token.TokenizeSpec (spec) where
import Data.ByteString (ByteString)
import HaskellWorks.Data.Xml.Token.Tokenize
import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import Test.Hspec
import qualified Data.Attoparsec.ByteString.Char8 as BC
import qualified Data.ByteStri... |
79cc45b68760ca7d7debf115ef41644b96b884de7712674f995d076a9b9fc034 | gas2serra/cldk | ev.lisp | (ql:quickload :cldk)
(ql:quickload :cldk-sdl2)
(ql:quickload :cldk-clx)
#|
(log:info (cldk:map-over-servers #'cldk:server-path))
(cldk:map-over-servers #'cldk:destroy-server)
(cldk:map-over-servers #'cldki::kill-server)
(log:info (bt:all-threads))
cldk:*events-to-log-list*
|#
(defvar *s*)
(defun simple-ev-window (... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/examples/ev.lisp | lisp |
(log:info (cldk:map-over-servers #'cldk:server-path))
(cldk:map-over-servers #'cldk:destroy-server)
(cldk:map-over-servers #'cldki::kill-server)
(log:info (bt:all-threads))
cldk:*events-to-log-list*
(cldk:set-window-size w 500 500) | (ql:quickload :cldk)
(ql:quickload :cldk-sdl2)
(ql:quickload :cldk-clx)
(defvar *s*)
(defun simple-ev-window (backend &optional (sec 10))
(let ((*s* (cldk:find-display-server :server-path backend)))
(setf (cldk:server-event-handler *s*)
(make-instance 'cldk:log-event-handler))
(setf (cldk:event-... |
5578e7d6fea58f33efb387cad550a3794ac91692c3400a8269ea62f5c01a26a4 | Armael/papiers | ui.ml | (******************************************************************************)
Copyright ( c ) 2013 - 2014 Armaël Guéneau .
(* See the file LICENSE for copying permission. *)
(**************************************************************************... | null | https://raw.githubusercontent.com/Armael/papiers/2cfab4759a6aee510a27d5ad4f02d210ced479a4/src/ui.ml | ocaml | ****************************************************************************
See the file LICENSE for copying permission.
****************************************************************************
****************************************************************************
Pretty prin... | Copyright ( c ) 2013 - 2014 Armaël Guéneau .
open Batteries
open Prelude
open Papierslib
module A = ANSITerminal
module C = Config.Colors
let colored = Config.colored_output && Unix.isatty Unix.stdout
let print_color style =
if colored then
A.print_string style
else
... |
3adc331a2c113954f9713794a738eb602fc8fc323c585b501ba6a5907bfcee24 | wireless-net/erlang-nommu | wxTextEntryDialog.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . 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 Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxTextEntryDialog.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 limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxTextEntryDialog).
-include("wxe... |
65bc6fb1aafb4ab6ea148c6010b6bbf9413dd4e899d8d12b9a22f0cbcff8d4ee | jonsterling/dreamtt | Env.mli | (** Representation of contexts and variables. *)
(** An abstract type representing environments that are extended on the right. *)
type 'a t
(** A pointer to a cell in the environment, counted from the right. *)
type ix
(** A pointer to a cell in the environment, counted from the left. *)
type lvl
val int_of_lvl : ... | null | https://raw.githubusercontent.com/jonsterling/dreamtt/aa30a57ca869e91a295e586773a892c6601b5ddb/core/Env.mli | ocaml | * Representation of contexts and variables.
* An abstract type representing environments that are extended on the right.
* A pointer to a cell in the environment, counted from the right.
* A pointer to a cell in the environment, counted from the left. |
type 'a t
type ix
type lvl
val int_of_lvl : lvl -> int
val empty : 'a t
val append : 'a t -> 'a -> 'a t
val proj : 'a t -> ix -> 'a
val lvl_to_ix : 'a t -> lvl -> ix
val fresh : 'a t -> lvl
|
f0dae00e72e0134bca1b2e43df962f20e23add2129ae76f40aee900892243d17 | codingteam/Hyperspace | webgl.cljs | (ns hyperspace.webgl)
(def vertex-shader "
attribute vec2 pos;
void main()
{
gl_Position = vec4(pos, 0, 1);
}
")
(def fragment-shader "
precision mediump float;
void main()
{
gl_FragColor = vec4(0, 0.8, 0, 1);
}
")
(defn create-shader
[gl text type]
(let [shader (.createShader gl type)]
(.shaderSource ... | null | https://raw.githubusercontent.com/codingteam/Hyperspace/b04ec588968f3a9c94b2992010a3a737afbe7eb5/web/frontend/src/main/clojurescript/hyperspace/webgl.cljs | clojure |
Let's call triangle as 'circle'. | (ns hyperspace.webgl)
(def vertex-shader "
void main()
{
}
")
(def fragment-shader "
void main()
{
}
")
(defn create-shader
[gl text type]
(let [shader (.createShader gl type)]
(.shaderSource gl shader text)
(.compileShader gl shader)
shader))
(defn create-program
[gl vstr fstr]
(let [program ... |
c3c14a28789bb0dec29cf68a93aa90c79ae2430adbc5d9a9d6323a0d4fb4dbf0 | imdea-software/leap | LeapIdMap.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/misc/LeapIdMap.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
cca22f289c664bf84d912a70f08a17650cc6e102880330bbbb29de7bcab9d50b | TorXakis/TorXakis | FreeMonoidX.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE DeriveDataTypeable ... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/valexpr/src/FreeMonoidX.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
---------------------------------------------------------------------------
|
Module : FreeMonoidX
Stability : experimental
Portability : portable
free-monoids of the form:
`ai \in A`, `<>` is a commutative (binary) ope... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE GeneralizedNewtypeDeriving #
... |
1dacf9680a14c58616623a5aa1a81dd1800e498d353a172197f877e959aa6cba | ryanpbrewster/haskell | P020.hs | module Problems.P020
( solve
) where
- Find the sum of the digits of 100 !
- Find the sum of the digits of 100!
-}
import Data.Char
solve :: String
solve = show $ problem020 100
problem020 n = sum $ map digitToInt $ show $ product [1 .. n]
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P020.hs | haskell | module Problems.P020
( solve
) where
- Find the sum of the digits of 100 !
- Find the sum of the digits of 100!
-}
import Data.Char
solve :: String
solve = show $ problem020 100
problem020 n = sum $ map digitToInt $ show $ product [1 .. n]
| |
fd3465b18bba58749fc47eb5b93dfa4c80bbdecff18015fd7fc86b2071370b4c | matthiasn/systems-toolbox-sente | project.clj | (defproject matthiasn/systems-toolbox-sente "0.6.32"
:description "WebSocket components for systems-toolbox"
:url "-toolbox"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/cljc" "src/clj" "src/cljs"]
:dependencies
[[org.clojure/tools.logging "0.4.1"]
[com.ta... | null | https://raw.githubusercontent.com/matthiasn/systems-toolbox-sente/edd0a8295f372063e507810c3fa92b23c0524f67/project.clj | clojure | (defproject matthiasn/systems-toolbox-sente "0.6.32"
:description "WebSocket components for systems-toolbox"
:url "-toolbox"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/cljc" "src/clj" "src/cljs"]
:dependencies
[[org.clojure/tools.logging "0.4.1"]
[com.ta... | |
cc884baf113aeb44f9e533d69a32ce68e831a68612a916374f26c67485815fe3 | juspay/atlas | SearchReqLocation.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Storage/Queries/SearchReqLocation.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | |
584d10b5f13b44edc800b48de14c3abf6fb7d44a6fd03d5d16df33b1e94e3a97 | nikodemus/SBCL | package.lisp |
;;;;
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absol... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/contrib/sb-concurrency/package.lisp | lisp |
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
MAILBOX
QUEUE
GATE
FRLOCK |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(defpackage :sb-concurrency
(:use :cl :sb-thread :sb-int :sb-ext :sb-sys)
(:export
"LIST-MAILBOX-MESSAGES"
"MA... |
e89f447575f075989cf8e2f53118af4b771a962b947574dfbcfbcc0fc9dcde14 | angavrilov/ecl-compute | minimize-live.lisp | ;;; -*- mode:lisp; indent-tabs-mode: nil; -*-
(in-package fast-compute)
(use-std-readtable)
(defun flatten-inner-loop (expr types &key split-all)
(let* ((assns nil))
(labels
((copy-tags (old new)
(copy-hash-data new old types)
new)
(dispatch (stmt)
(when stmt
... | null | https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/gen/minimize-live.lisp | lisp | -*- mode:lisp; indent-tabs-mode: nil; -*-
var->info
ref->info*
(print-live-stats shuffled)
(push shuffled *shuffled*) |
(in-package fast-compute)
(use-std-readtable)
(defun flatten-inner-loop (expr types &key split-all)
(let* ((assns nil))
(labels
((copy-tags (old new)
(copy-hash-data new old types)
new)
(dispatch (stmt)
(when stmt
(push stmt assns)))
(new-... |
9b08d013c44335bb9c1f90db955473c97881076b19fe6e8aa728b4dd9bc2de1c | nuvla/api-server | credential_template_infrastructure_service_coe.cljc | (ns sixsq.nuvla.server.resources.spec.credential-template-infrastructure-service-coe
"
Spec for credentials template of Container Orchestration Engine (COE).
"
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.credential-infrastructure-service-coe :as cred-infra-service-coe]
[sixsq... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/spec/credential_template_infrastructure_service_coe.cljc | clojure | Defines the contents of the swarm credential template resource itself.
Defines the contents of the swarm credential template used in a create resource. | (ns sixsq.nuvla.server.resources.spec.credential-template-infrastructure-service-coe
"
Spec for credentials template of Container Orchestration Engine (COE).
"
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.credential-infrastructure-service-coe :as cred-infra-service-coe]
[sixsq... |
842d09ba0dbe178d346c77925451ec14fa1d8d068941d60097ce771aed90e645 | roburio/builder-web | m20211105.ml | let new_version = 15L and old_version = 14L
and identifier = "2021-11-05"
and migrate_doc = "add platform to build"
and rollback_doc = "remove platform from build"
open Grej.Syntax
let new_build =
Caqti_type.unit ->. Caqti_type.unit @@
{| CREATE TABLE new_build (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NU... | null | https://raw.githubusercontent.com/roburio/builder-web/a85be8730cece0bd78df580fb7d48aff94e060d2/bin/migrations/m20211105.ml | ocaml | let new_version = 15L and old_version = 14L
and identifier = "2021-11-05"
and migrate_doc = "add platform to build"
and rollback_doc = "remove platform from build"
open Grej.Syntax
let new_build =
Caqti_type.unit ->. Caqti_type.unit @@
{| CREATE TABLE new_build (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NU... | |
8a90d2d89631a983afe64b311aa029795b30767d81b0bee56d89d1d9a13a1539 | xldenis/MGC | Pretty.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module MGC.Syntax.Pretty where
--import Text.PrettyPrint.HughesPJClass
import MGC.Syntax
import Data.List (intercalate, intersperse)
import MGC.Parser.Expression (binaryOps, unaryOps)
($-$) :: Doc -> Doc -> Doc
a $-$ b = a <> char '\n' <+> b
dat... | null | https://raw.githubusercontent.com/xldenis/MGC/caeb2d72d16fbbefeb5104d7133c537fea66ba21/src/MGC/Syntax/Pretty.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
import Text.PrettyPrint.HughesPJClass
not done
not a user facing type |
module MGC.Syntax.Pretty where
import MGC.Syntax
import Data.List (intercalate, intersperse)
import MGC.Parser.Expression (binaryOps, unaryOps)
($-$) :: Doc -> Doc -> Doc
a $-$ b = a <> char '\n' <+> b
data Doc = Doc Int String
| VUnion Int [Doc]
| HUnion Int [Doc]
| EmptyDoc deriving Show
... |
c6d32b9d792646a0bf8a8eadd017dad3803e50fa3ab163931eb31909dccdba3c | svenpanne/EOPL3 | exercise-1-28.rkt | #lang eopl
; ------------------------------------------------------------------------------
Exercise 1.28
(define merge
(lambda (loi1 loi2)
(cond ((null? loi1) loi2)
((null? loi2) loi1)
((< (car loi1) (car loi2))
(cons (car loi1) (merge (cdr loi1) loi2)))
(else
... | null | https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter1/exercise-1-28.rkt | racket | ------------------------------------------------------------------------------ | #lang eopl
Exercise 1.28
(define merge
(lambda (loi1 loi2)
(cond ((null? loi1) loi2)
((null? loi2) loi1)
((< (car loi1) (car loi2))
(cons (car loi1) (merge (cdr loi1) loi2)))
(else
(cons (car loi2) (merge loi1 (cdr loi2)))))))
|
6b611a4adef50ab9eae3080c591e0deb0033863a79e598f03128e92866dbc6bb | TrustInSoft/tis-kernel | state_dependency_graph.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/libraries/project/state_dependency_graph.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
9edd1f1fa1ee85fa20fbbec475ff129c12d69b52d86c2f59ff1a5c01eedc6559 | sfx/schema-contrib | project.clj | (defproject schema-contrib "0.1.5"
:description "Additional validators for Prismatic's Schema."
:url "-contrib"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[instaparse "1.3.0"]
[org.clojure/clojure "1.6.0"]
[org.clojure/test.check "0.5.... | null | https://raw.githubusercontent.com/sfx/schema-contrib/02cac012a982b40de570f9d5e432b58de54fa24c/project.clj | clojure | (defproject schema-contrib "0.1.5"
:description "Additional validators for Prismatic's Schema."
:url "-contrib"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[instaparse "1.3.0"]
[org.clojure/clojure "1.6.0"]
[org.clojure/test.check "0.5.... | |
59848c0989293315f8eab6f74c2e10dbd28b0d228f84e0b6b72f1fc07ed4a27c | wilbowma/cur | coc-saccharata.rkt | #lang turnstile+/quicklang
(require
turnstile+/more-utils
(for-syntax turnstile+/more-utils)
"coc.rkt")
saccharata ( after zea saccharata )
;;;; CoC, but with a little bit of sugar in the curnel, to simplify complex typing rules.
;;;; ------------------------------------------------------------------------
(pro... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-lib/cur/curnel/coc-saccharata.rkt | racket | CoC, but with a little bit of sugar in the curnel, to simplify complex typing rules.
------------------------------------------------------------------------
→ = Π = ∀
Curried core forms.
-----------------------------------------------------------
Curried Π
------------------------------------------------
Synta... | #lang turnstile+/quicklang
(require
turnstile+/more-utils
(for-syntax turnstile+/more-utils)
"coc.rkt")
saccharata ( after zea saccharata )
(provide
(for-syntax
multi-decl
xs+τ
(rename-out [~Π/c ~Π])
(rename-out [~λ/c ~λ])
~#%app)
→
(rename-out
[→ Π] [→ Pi] [→ ∀] [→ forall] [→ ->]
[λ/c λ] [λ/c ... |
e3283267a631fac89460e24864244e16acbae14416849aec06672419025fb081 | luqui/experiments | composite.hs | # LANGUAGE DataKinds , PolyKinds , TypeOperators , TypeFamilies , UndecidableInstances #
-- c is a combination of multiplication and continuation.
-- Nested2 sums all (c x y) where x and y range over the iterations of i
-- (i can be thought of "increment"). So if c is multiplication, Nested2
-- will calculate the com... | null | https://raw.githubusercontent.com/luqui/experiments/c0b9153c41507afbfdeb2b32bfc65fd1ac83fb26/composite.hs | haskell | c is a combination of multiplication and continuation.
Nested2 sums all (c x y) where x and y range over the iterations of i
(i can be thought of "increment"). So if c is multiplication, Nested2
will calculate the composites. But c could also include a continuation
so that we could apply some function to the com... | # LANGUAGE DataKinds , PolyKinds , TypeOperators , TypeFamilies , UndecidableInstances #
data Nested2 c i x y
= Leaf (c x y)
| L (Nested2 c i (i x) y)
| R (Nested2 c i x (i y))
Composite = Σ{n , where D(n ) is the number of nontrivial divisors of n.
newtype Composite = Composite { getComposite :: Nes... |
21e068c2e7eacaf6a96cc9f4872c0d970db76595ece099be9c51cac2273a883e | redplanetlabs/vector-backed-sorted-map | vector_backed_sorted_map_test.clj | (ns com.rpl.vector-backed-sorted-map-test
(:use [clojure test]
[clojure.test.check.clojure-test])
(:require [com.rpl.vector-backed-sorted-map :as vbsm]
[clojure.test.check
[generators :as gen]
[properties :as prop]])
)
(deftest vbsm-basic-test
(let [m (vbsm/read-o... | null | https://raw.githubusercontent.com/redplanetlabs/vector-backed-sorted-map/1a63e6ab4ddd2f580873be1823937868f2513e08/test/com/rpl/vector_backed_sorted_map_test.clj | clojure | (ns com.rpl.vector-backed-sorted-map-test
(:use [clojure test]
[clojure.test.check.clojure-test])
(:require [com.rpl.vector-backed-sorted-map :as vbsm]
[clojure.test.check
[generators :as gen]
[properties :as prop]])
)
(deftest vbsm-basic-test
(let [m (vbsm/read-o... | |
e2007bb97beed632f6eb13ab49483aa4a91b7889c0e87624390b9c1a9be6a9aa | vaclavsvejcar/headroom | Kotlin.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
-- |
Module : Headroom . FileSupport .
-- Description : Support for /Kotlin/ source code files
Copyright : ( c ) 2019 - 2022
-- License : BSD-3-Clause
... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/FileSupport/Kotlin.hs | haskell | # LANGUAGE OverloadedStrings #
|
Description : Support for /Kotlin/ source code files
License : BSD-3-Clause
Maintainer :
Stability : experimental
Portability : POSIX
Support for /Kotlin/ source code files. This implementation extracts /Kotlin/
package name as variable.
= Extracted Variables for Temp... | # LANGUAGE QuasiQuotes #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
Module : Headroom . FileSupport .
Copyright : ( c ) 2019 - 2022
module Headroom.FileSupport.Kotlin
( fileSupport
)
where
import Headroom.Data.Regex
( isMatch
, match
, r... |
2513c80756d38b2c8a5660c3c35cde19b12c07e792bb645761a91faaf403d0d6 | skeuchel/needle | Core.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Coq.Syntax.Core where
import Data.String
import GHC.Read
newtype Identifier = ID { fromID :: String }
deriving (Eq,Ord,IsString)
instance Read Identifier where
readPrec = fmap ID readPrec
instance Show Identifier where
showsPrec i (ID s) = showsPrec i s
| null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/Coq/Syntax/Core.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module Coq.Syntax.Core where
import Data.String
import GHC.Read
newtype Identifier = ID { fromID :: String }
deriving (Eq,Ord,IsString)
instance Read Identifier where
readPrec = fmap ID readPrec
instance Show Identifier where
showsPrec i (ID s) = showsPrec i s
| |
ebb634469aaf7bc5b07173fec32bd31d2ed5d3a99f0c40bed998e177ff0b39e6 | takikawa/racket-ppa | error-tests.rkt | #lang racket/base
(require (for-syntax racket/base)
"../lex.rkt"
rackunit)
(define-syntax (catch-syn-error stx)
(syntax-case stx ()
[(_ arg)
(datum->syntax
#'here
(with-handlers ((exn:fail:syntax? exn-message))
(syntax-local-expand-expression #'arg)
"not-an-err... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/parser-tools-lib/parser-tools/private-lex/error-tests.rkt | racket | Detecting mutual recursion cycle:
Detecting cycle within same abbreviation: | #lang racket/base
(require (for-syntax racket/base)
"../lex.rkt"
rackunit)
(define-syntax (catch-syn-error stx)
(syntax-case stx ()
[(_ arg)
(datum->syntax
#'here
(with-handlers ((exn:fail:syntax? exn-message))
(syntax-local-expand-expression #'arg)
"not-an-err... |
3752f9955db46c83223bf20c1e454dda146a0980f04a0cd47c8fd9483ac3eaf7 | jackfirth/lens | dict-nested.rkt | #lang sweet-exp racket/base
require racket/contract/base
provide
contract-out
dict-ref-nested-lens (->* [] #:rest (listof any/c) (lens/c functional-dict? any/c))
require lens/private/base/main
lens/private/compound/thrush
lens/private/dict/dict
lens/private/util/functional-dict
module+ t... | null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-data/lens/private/dict/dict-nested.rkt | racket | #lang sweet-exp racket/base
require racket/contract/base
provide
contract-out
dict-ref-nested-lens (->* [] #:rest (listof any/c) (lens/c functional-dict? any/c))
require lens/private/base/main
lens/private/compound/thrush
lens/private/dict/dict
lens/private/util/functional-dict
module+ t... | |
8ee99bfbff960f9c103726da4318dc437f70927e9a6c8ac2f612a37ecca43210 | haskell-opengl/OpenGLRaw | HalfFloatPixel.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.HalfFloatPixel
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-----------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/HalfFloatPixel.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.HalfFloatPixel
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Types
* Enums | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.HalfFloatPixel (
glGetARBHalfFloatPixel,
gl_ARB_half_float_pixel,
GLhalfARB,
pattern GL_HALF_FLOAT_ARB
) where
import Graphics.GL.ExtensionPredicates
import Graphics.GL.Types
import Graphics.GL.Tokens... |
7d28930e200a54e288f397eb2074f7e57b87b21c6c341402471e9fc6fbdf40a1 | Apress/practical-haskell | Chapter05.hs | {-# LANGUAGE BangPatterns #-}
module Chapter05 where
import Data.List
import Control.DeepSeq
data TimeMachine = TM { manufacturer :: String, year :: Integer }
deriving (Eq, Show)
timeMachinesFrom :: String -> Integer -> [TimeMachine]
timeMachinesFrom mf y = TM mf y : timeMachinesFrom mf (y+1)
timely... | null | https://raw.githubusercontent.com/Apress/practical-haskell/7c715b357f6871e883dbffa1ac3e1b61e2cf10b2/Chapter05.hs | haskell | # LANGUAGE BangPatterns #
# UNPACK #
# UNPACK #
# UNPACK # | module Chapter05 where
import Data.List
import Control.DeepSeq
data TimeMachine = TM { manufacturer :: String, year :: Integer }
deriving (Eq, Show)
timeMachinesFrom :: String -> Integer -> [TimeMachine]
timeMachinesFrom mf y = TM mf y : timeMachinesFrom mf (y+1)
timelyIncMachines :: [TimeMachine]
t... |
7e7bb24548d508217081c6fd07755a399efb82de21dc60d953525158b4348132 | open-company/open-company-web | ui.cljs | (ns oc.web.utils.ui
(:require [cuerdas.core :as string]
[oc.lib.cljs.useragent :as ua]))
(defn resize-textarea [textarea]
(when textarea
(set! (.-height (.-style textarea)) "")
(set! (.-height (.-style textarea)) (str (.-scrollHeight textarea) "px"))))
(defn remove-tooltips []
(.remove (js/$... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/utils/ui.cljs | clojure | "Get notified about new post activity"
"Don't show replies to this update" ; "Ignore future activity unless mentioned"
and >. | (ns oc.web.utils.ui
(:require [cuerdas.core :as string]
[oc.lib.cljs.useragent :as ua]))
(defn resize-textarea [textarea]
(when textarea
(set! (.-height (.-style textarea)) "")
(set! (.-height (.-style textarea)) (str (.-scrollHeight textarea) "px"))))
(defn remove-tooltips []
(.remove (js/$... |
4545ddf928d5745a39c4ac472fe3162300669bc5cc58bf05aad1eeae605683c9 | wdebeaum/step | visible.lisp | ;;;;
;;;; W::visible
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::visible
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin task-learning :entry-date 20050816 :change-date 20090915 :wn ("visible%3:00:00") :comments nil)
(lf-parent ont::visible-val)
(EXAMPL... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/visible.lisp | lisp |
W::visible
|
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::visible
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin task-learning :entry-date 20050816 :change-date 20090915 :wn ("visible%3:00:00") :comments nil)
(lf-parent ont::visible-val)
(EXAMPLE "set when the To Do item... |
d474bacf5ce91819911cadb23fb2ff2fcc9e01df4ac415f3bf6cd5263a4ddae8 | jgrodziski/keycloak-clojure | core.cljs | (ns myapp.front.core
(:require [reagent.core :as reagent]
[mount.core :as mount]
[re-frame.core :as re-frame]
[taoensso.timbre :as timbre :refer-macros [log trace debug info warn error fatal report
logf tracef debugf inf... | null | https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/2b71a1d1bf8d053f2e193af699daba3370ab6b2f/sample/frontend/src/cljs/myapp/front/core.cljs | clojure | (ns myapp.front.core
(:require [reagent.core :as reagent]
[mount.core :as mount]
[re-frame.core :as re-frame]
[taoensso.timbre :as timbre :refer-macros [log trace debug info warn error fatal report
logf tracef debugf inf... | |
219a021524927b3713a7317a174512e4c1d7a5ca990ab72b8049ee070ebdd638 | sylane/erod | erodlib_indices.erl | %%% ==========================================================================
Copyright ( c ) 2014 < >
%%%
%%% This file is part of erodlib.
%%%
Erodlib 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 ... | null | https://raw.githubusercontent.com/sylane/erod/b0c435f8546ea38b1501d3e22614fe7951c61c9a/apps/erodlib/src/erodlib_indices.erl | erlang | ==========================================================================
This file is part of erodlib.
(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 PARTICULAR... | Copyright ( c ) 2014 < >
Erodlib 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
You should have received a copy of the GNU General Public License
2014 < >... |
bf0392c95cfe888f4f858a706623ef859bb8dd4ac4ea352d9e5b42723950d123 | ctford/Idris-Elba-Dev | Simplified.hs | module IRTS.Simplified where
import IRTS.Defunctionalise
import Idris.Core.TT
import Idris.Core.Typecheck
import Data.Maybe
import Control.Monad.State
import Debug.Trace
-- Simplified expressions, where functions/constructors can only be applied
-- to variables
data SExp = SV LVar
| SApp Bool Name [LVar]
... | null | https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/IRTS/Simplified.hs | haskell | Simplified expressions, where functions/constructors can only be applied
to variables
erased value, will never be inspected
ar == 0
(ar == length args)
(ar == length args)
n already in env
(length args == ar) | module IRTS.Simplified where
import IRTS.Defunctionalise
import Idris.Core.TT
import Idris.Core.Typecheck
import Data.Maybe
import Control.Monad.State
import Debug.Trace
data SExp = SV LVar
| SApp Bool Name [LVar]
| SLet LVar SExp SExp
| SUpdate LVar SExp
| SCon Int Name [LVa... |
4685e6d6180fb99f14d2ab3847100066ba016cc73327b992042701c30376c8cb | samply/blaze | session.clj | (ns blaze.cassandra.session
(:require
[blaze.cassandra.config :as config])
(:import
[com.datastax.oss.driver.api.core CqlSession ]
[com.datastax.oss.driver.api.core.config DriverConfigLoader]
[com.datastax.oss.driver.api.core.session SessionBuilder]))
(set! *warn-on-reflection* true)
(defn sess... | null | https://raw.githubusercontent.com/samply/blaze/f50b6d7bcb0f8fad106197aae193ba988b83164d/modules/cassandra/src/blaze/cassandra/session.clj | clojure | (ns blaze.cassandra.session
(:require
[blaze.cassandra.config :as config])
(:import
[com.datastax.oss.driver.api.core CqlSession ]
[com.datastax.oss.driver.api.core.config DriverConfigLoader]
[com.datastax.oss.driver.api.core.session SessionBuilder]))
(set! *warn-on-reflection* true)
(defn sess... | |
0d557623e1629f89503cf22e068a12c69c1f6a8001619d84e7d691b38e693c50 | shirok/Gauche | reload.scm | ;;;
;;; reload.scm - reloading modules
;;;
Copyright(C ) 2002 by < >
;;;
;;; Permission to use, copy, modify, distribute this software and
;;; accompanying documentation for any purpose is hereby granted,
;;; provided that existing copyright notices are retained in all
;;; copies and that this notice is inclu... | null | https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/lib/gauche/reload.scm | scheme |
reload.scm - reloading modules
Permission to use, copy, modify, distribute this software and
accompanying documentation for any purpose is hereby granted,
provided that existing copyright notices are retained in all
copies and that this notice is included verbatim in all
distributions.
This software is ... | Copyright(C ) 2002 by < >
Created : < 2002 - 11 - 06 16:02:55 foof >
Time - stamp : < 2002 - 11 - 13 10:11:58 foof >
Author : < >
Slightly modified by
(define-module gauche.reload
(use file.util)
(use srfi.13)
(use gauche.libutil)
(export reload reload-modified-modules
m... |
27912c2fc096566ab4bf3de8d6cb9bc9d46c60def7b930749dbc52259adb7628 | ruricolist/cloture | clojure-packages.lisp | (in-package #:cloture)
(eval-always
(defvar *clojure-packages*
(tg:make-weak-hash-table :weakness :key))
(defun mark-clojure-package (package)
(let ((package (find-package package)))
(synchronized ('*clojure-packages*)
(setf (href *clojure-packages* package) t))))
(defun clojure-package? ... | null | https://raw.githubusercontent.com/ruricolist/cloture/623c15c8d2e5e91eb87f46e3ecb3975880109948/clojure-packages.lisp | lisp | complain about package variance. | (in-package #:cloture)
(eval-always
(defvar *clojure-packages*
(tg:make-weak-hash-table :weakness :key))
(defun mark-clojure-package (package)
(let ((package (find-package package)))
(synchronized ('*clojure-packages*)
(setf (href *clojure-packages* package) t))))
(defun clojure-package? ... |
97450881ac05a674aa81b516c6f269577a7d902bcd5a0c2e921f53ddd39c3463 | chenyukang/rubytt | style.ml | open Core
type style_ty =
| KEYWORD
| COMMENT
| STRING
| DOC_STRING
| IDENTIFIER
| BUILTIN
| NUMBER
| CONSTANT
| FUNCTION
| PARAMETER
| LOCAL
| DECORATOR
| CLASS
| ATTRIBUTE
| LINK
| ANCHOR
| DELIMITER
| TYPE_NAME
| ERROR
| WARNING
| INFO
type tag_ty =
| START
| END
type... | null | https://raw.githubusercontent.com/chenyukang/rubytt/3b9898cd9e180594ee30fb74cea9a8356a6e0c14/src/style.ml | ocaml | open Core
type style_ty =
| KEYWORD
| COMMENT
| STRING
| DOC_STRING
| IDENTIFIER
| BUILTIN
| NUMBER
| CONSTANT
| FUNCTION
| PARAMETER
| LOCAL
| DECORATOR
| CLASS
| ATTRIBUTE
| LINK
| ANCHOR
| DELIMITER
| TYPE_NAME
| ERROR
| WARNING
| INFO
type tag_ty =
| START
| END
type... | |
d074b238a0c0466616c4c9b563b898b55e6cb8f7ca295744ea987fd471496345 | Yuras/pdf-toolbox | merge-pdf-files.hs | {-# LANGUAGE OverloadedStrings #-}
An example how to merge PDF files into one big file .
--
-- Usage:
-- ./merge-pdf-files in1.pdf in2.pdf ... > out.pdf
--
-- TODO: Encrypted files are not supported
-- TODO: Annotations, media box
-- TODO: Inherited resources
-- TODO: Resources (fonts, etc) are written a number... | null | https://raw.githubusercontent.com/Yuras/pdf-toolbox/f1d20479fe6782bc293468ac05186e658216388b/examples/merge-pdf-files.hs | haskell | # LANGUAGE OverloadedStrings #
Usage:
./merge-pdf-files in1.pdf in2.pdf ... > out.pdf
TODO: Encrypted files are not supported
TODO: Annotations, media box
TODO: Inherited resources
TODO: Resources (fonts, etc) are written a number of times, check for dublicates |
An example how to merge PDF files into one big file .
module Main
(
main,
)
where
import Pdf.Core.Object
import Pdf.Core.Writer
import Pdf.Document
import Pdf.Document.Internal.Types
import Data.IORef
import qualified Data.ByteString.Lazy as Lazy.ByteString
import qualified Data.Vector as Vector
import qualifie... |
8d446d1e6d5ec470267b4ec2f94bc58dafb23b5eeb29110f509bf635e7673574 | stepcut/plugins | Env.hs | # LANGUAGE CPP #
--
Copyright ( C ) 2004 - 5
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
--... | null | https://raw.githubusercontent.com/stepcut/plugins/eaf90eeb3cb79e32a442776388f067754f513b5d/src/System/Plugins/Env.hs | haskell |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library 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 GN... | # LANGUAGE CPP #
Copyright ( C ) 2004 - 5
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02... |
37078bde16a9bef64e608140aa263d05e6e322e6576910ed4705477e8d88bce2 | axch/rules | rules-test.scm | ;;; This file is part of Rules, an extensible pattern matching,
pattern dispatch , and term rewriting system for MIT Scheme .
Copyright 2010 - 2013 , Massachusetts Institute of
;;; Technology
;;;
;;; Rules is free software; you can redistribute it and/or modify it
under the terms of the GNU Affero General Publi... | null | https://raw.githubusercontent.com/axch/rules/21f25c86c19fcb0500e9f6f3905de86d59225d8e/test/rules-test.scm | scheme | This file is part of Rules, an extensible pattern matching,
Technology
Rules is free software; you can redistribute it and/or modify it
either version 3 of the
License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even th... | pattern dispatch , and term rewriting system for MIT Scheme .
Copyright 2010 - 2013 , Massachusetts Institute of
under the terms of the GNU Affero General Public License as
You should have received a copy of the GNU Affero General Public
(in-test-group
rules
(let ((the-rule (rule '(foo (? x)) (succeed x))... |
c38a86bb2ef805deb8f492c273642b04e44744087a91f095555dad1c6f86c070 | Decentralized-Pictures/T4L3NT | transport.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2017 Vincent Bernar... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/vendors/ocaml-ledger-wallet/src/transport.mli | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2017 Vincent Bernar... | |
71073b9bf71a7dcf707bf033053f668adc2ec0db9ff4ac76e3df4de53221c4a5 | EasyCrypt/easycrypt | ecModules.ml | (* -------------------------------------------------------------------- *)
open EcSymbols
open EcPath
open EcCoreFol
module Sid = EcIdent.Sid
module Mid = EcIdent.Mid
(* -------------------------------------------------------------------- *)
include EcCoreModules
(* --------------------------------------------------... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/2e53a4272c940b41400de9ce42c8db7f6a514ee7/src/ecModules.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
val change_calls : t -> xpath list -> t
----------------------------------------------------------------... | open EcSymbols
open EcPath
open EcCoreFol
module Sid = EcIdent.Sid
module Mid = EcIdent.Mid
include EcCoreModules
Instantiation of EcCoreModules . PreOI on EcCoreFol.form .
module OI : sig
type t = form PreOI.t
val hash : t -> int
val equal : t -> t -> bool
val cost_self : t -> [`Bounded of form | `Unbou... |
6057355468c29dc0ffb4c275db3587dbfd1416d1930f4292c4843beb4bcbc015 | YoshikuniJujo/test_haskell | Type.hs | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Framebuffer.Type where
import qualified Gpu.Vulkan.TypeEnum as T
import qualified Gpu.Vulkan.Framebuffer.Middle as M
newtype FNew (fmt :: T.Format) sf = FNew M.F
fFromNew :: FNew fmt sf -> F sf
fFromNew (FN... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/568af7479f46d2c5e69f0a5afcfa4195a01f61e9/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Framebuffer/Type.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Framebuffer.Type where
import qualified Gpu.Vulkan.TypeEnum as T
import qualified Gpu.Vulkan.Framebuffer.Middle as M
newtype FNew (fmt :: T.Format) sf = FNew M.F
fFromNew :: FNew fmt sf -> F sf
fFromNew (FN... | |
567b60b88140e005028d5a411ee5068942dc0ee5e0c43f18093441ef18d10e38 | jimrthy/frereth | account.clj | (ns tracker.model.account
(:require
#_[tracker.model.free-database :as db]
[datomic.api :as d]
[ghostwheel.core :refer [>defn => | ?]]
[com.wsscode.pathom.connect :as pc :refer [defresolver defmutation]]
[taoensso.timbre :as log]
[clojure.spec.alpha :as s]))
(defn q-all-account-ids
[db]
;; Q: W... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/sonic-forces/tracker/src/main/tracker/model/account.clj | clojure | Q: What does the ... mean here?
A: It returns a collection
GIVEN nothing (e.g. this is usable as a root query)
I can output all accounts. NOTE: only ID is needed...other resolvers resolve the rest | (ns tracker.model.account
(:require
#_[tracker.model.free-database :as db]
[datomic.api :as d]
[ghostwheel.core :refer [>defn => | ?]]
[com.wsscode.pathom.connect :as pc :refer [defresolver defmutation]]
[taoensso.timbre :as log]
[clojure.spec.alpha :as s]))
(defn q-all-account-ids
[db]
(d/q '[... |
1fbad80f419a089035fd2d696a77da7529edae0801f7e2cbefb4c31f31161a6d | input-output-hk/marlowe-cardano | Main.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
-- | Client for `marlowe-test-spec` from the `marlowe` repository.
--
------------------------------------------------... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/27f83c21c76d05cb1f381022d596a5782a4655e1/marlowe-test/spec-client/Main.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
| Client for `marlowe-test-spec` from the `marlowe` repository.
---------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
* Testing
| ... | License : Apache 2.0
Portability : Portable
module Main
main
) where
import Data.List.Split (splitOn)
import Spec.Marlowe.Service (handle)
import Spec.Marlowe.Service.Types (Response(ResponseFailure))
import System.IO (BufferMode(NoBuffering), hSetBuffering, stdin, stdout)
import qualified Dat... |
81dd093d62d2648f106ce2c521baea8b6ddbca70410a6f7fe913d56d28d4236b | jeko2000/tiny-routes | response.lisp | ;;;; response.lisp
(in-package :cl-user)
(uiop:define-package :tiny-routes.response
(:use :cl)
(:export #:responsep
#:response
#:status
#:headers
#:body
#:make-response
#:ok
#:created
#:accepted
#:no-content
... | null | https://raw.githubusercontent.com/jeko2000/tiny-routes/8205fdd429d66320770024e76f8c27a1d7d1d00c/src/response.lisp | lisp | response.lisp
Refinements
Clack expects body to be either a list of strings, a byte vector,
or a path name
Constructors
Selectors
element
Combinators | (in-package :cl-user)
(uiop:define-package :tiny-routes.response
(:use :cl)
(:export #:responsep
#:response
#:status
#:headers
#:body
#:make-response
#:ok
#:created
#:accepted
#:no-content
#:redirect
... |
a342e9219f1070f2fef642ffbeb1cffc460c1c41c2b78b22f9379de87404561b | Carnap/Carnap | TestImport.hs | module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
import ClassyPrelude as X hiding (delete, deleteBy)
import Database.Persist as X hiding (get)
import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawExecut... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap-Server/test/TestImport.hs | haskell | This function will truncate all of the tables in your database.
'withApp' calls it before each test, creating a clean environment for each
spec to run in. | module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
import ClassyPrelude as X hiding (delete, deleteBy)
import Database.Persist as X hiding (get)
import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawExecut... |
562d55ece72ccaa246e309856f7d77b0fe35e89f0fdeb20e70b151ee5a3a5fcc | spawnfest/eep49ers | ex_slider.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/examples/demo/ex_slider.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ex_slider).
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
handle_info/2,... |
d188ea6e5a7e039a322c114e1b615bda4106c4dba501f4dabaf33c129f4e94f8 | ivarref/double-trouble | double_trouble.clj | (ns com.github.ivarref.double-trouble
(:require [com.github.ivarref.double-trouble.cas :as cas]
[com.github.ivarref.double-trouble.generated :as gen]
[com.github.ivarref.double-trouble.sha :as sha]
[datomic.api :as d])
(:import (clojure.lang IBlockingDeref IDeref IPending)
... | null | https://raw.githubusercontent.com/ivarref/double-trouble/7644d15adf2116d337abeeecb0739bc7ec8f91c3/src/com/github/ivarref/double_trouble.clj | clojure | Borrowed from clojure.core | (ns com.github.ivarref.double-trouble
(:require [com.github.ivarref.double-trouble.cas :as cas]
[com.github.ivarref.double-trouble.generated :as gen]
[com.github.ivarref.double-trouble.sha :as sha]
[datomic.api :as d])
(:import (clojure.lang IBlockingDeref IDeref IPending)
... |
46c895970408774b98ba737589c572cb766675d3c0de50d86d153961eb14b33c | imdea-software/leap | TslSolver.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/solvers/theory/TslSolver.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
bb7a8c06092397f5bdcd6a61246d6b11376a08a7683d5d2e36fb9cfa8d65650f | exercism/haskell | LeapYear.hs | module LeapYear (isLeapYear) where
isLeapYear year = hasFactor 4 && (not (hasFactor 100) || hasFactor 400)
where hasFactor n = year `rem` n == 0
| null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/leap/.meta/examples/error-nosig/src/LeapYear.hs | haskell | module LeapYear (isLeapYear) where
isLeapYear year = hasFactor 4 && (not (hasFactor 100) || hasFactor 400)
where hasFactor n = year `rem` n == 0
| |
f7c85a1dafd6635f0178edc2baf167bf5b4041f48baee01080d5bf3608368821 | reagent-project/reagent-cookbook | project.clj | (defproject file-upload "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.773"]
[reagent "1.0.0"]
[funcool/promesa "6.0.0"]]
:source-paths ["src/clj"]
:plugins [[lein-cljsbuild "1.1.8"]]
:clean-targets ^{:protec... | null | https://raw.githubusercontent.com/reagent-project/reagent-cookbook/ccda91a74377098d27e2707c306a0187243cb290/recipes/file-upload/project.clj | clojure | (defproject file-upload "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.773"]
[reagent "1.0.0"]
[funcool/promesa "6.0.0"]]
:source-paths ["src/clj"]
:plugins [[lein-cljsbuild "1.1.8"]]
:clean-targets ^{:protec... | |
8712cf755040558c35ed2471b6311d2c991602a6aa0ac71e19cf746ea735f6a4 | spechub/Hets | ProofParser.hs | |
Module : ./TPTP / Prover / ProofParser.hs
Description : Parses a TPTP proof .
Copyright : ( c ) of Magdeburg 2017
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : non - portable ( imports Logic )
Module : ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/TPTP/Prover/ProofParser.hs | haskell | Find the SZS status line
filters the lines of the proof
@insideProof@ tells if the line is between "SZS output start/end".
Since the lines are in reverse order (by foldr), we need to parse after
"SZS output end" and before "SZS output start". | |
Module : ./TPTP / Prover / ProofParser.hs
Description : Parses a TPTP proof .
Copyright : ( c ) of Magdeburg 2017
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : non - portable ( imports Logic )
Module : ... |
f88df1942959526d6cbd0dd7a58eda08d3dafd60095bad4670ca9ba3faad94d5 | lynkia/lynkia | lynkia_mapreduce_observer.erl | %%%-------------------------------------------------------------------
%% @doc This module contains the logic of the observer.
@author and
%% @end
%%%-------------------------------------------------------------------
-module(lynkia_mapreduce_observer).
-include("lynkia.hrl").
-ifdef(TEST).
-include_lib("eunit/i... | null | https://raw.githubusercontent.com/lynkia/lynkia/bde4d0bb1e0304b0dec42ff4df1e74b18d5e797c/src/lynkia_mapreduce_observer.erl | erlang | -------------------------------------------------------------------
@doc This module contains the logic of the observer.
@end
-------------------------------------------------------------------
API:
@doc Start an observer
Round - Number of the round
Pairs - Input pairs
Reduce - Reduce function
Propagate - Funct... | @author and
-module(lynkia_mapreduce_observer).
-include("lynkia.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-export([
start/2
]).
-record(state, {
timer :: identifier(),
data :: list()
}).
Options - Options
start([_Round, _Pairs, _Reduce, _Options] = Data, Propagate) ... |
704e4d7f2e5f004300b503159533443e94a7b7df46cbcd7d28b8ba9833bea330 | thheller/shadow-cljsjs | mr.cljs | (ns cljsjs.moment.locale.mr
(:require ["moment/locale/mr"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/mr.cljs | clojure | (ns cljsjs.moment.locale.mr
(:require ["moment/locale/mr"]))
| |
a7b37ab03a37fbfc2a6526cf9147668df95857d842faf61c7dee28d224102a33 | glguy/advent | Visualize.hs | |
Module : Advent . Visualize
Description : Module for visualizing components of the solutions
Copyright : ( c ) , 2018
License : ISC
Maintainer :
Thin wrapper around the JuicyPixels library to make it easy to generate
small animations from solution files .
Module : Advent.Visu... | null | https://raw.githubusercontent.com/glguy/advent/cf0ba12ad53feee9d78c899debdb868ce596a323/common/src/Advent/Visualize.hs | haskell | | Generate an image given coordinate bounds and a projection from coordinates to colors.
^ inclusive coordinate range
^ pixel coloring function
^ output filename
^ frame delay in centiseconds
^ animation frames | |
Module : Advent . Visualize
Description : Module for visualizing components of the solutions
Copyright : ( c ) , 2018
License : ISC
Maintainer :
Thin wrapper around the JuicyPixels library to make it easy to generate
small animations from solution files .
Module : Advent.Visu... |
6f2d533e90a9740268a4de7135ac8a75efdee58aba0037dd64bf6ba65011673b | kazu-yamamoto/witty | Witty.hs | module Main where
import qualified Control.Exception as E
import Control.Monad (when)
import Network.Socket (sClose)
import System.Console.GetOpt (OptDescr(..), ArgDescr(..), ArgOrder(..), getOpt, usageInfo)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
impo... | null | https://raw.githubusercontent.com/kazu-yamamoto/witty/7914449e3c7db8a999e26a3d2ae71eb6549ac382/src/Witty.hs | haskell | module Main where
import qualified Control.Exception as E
import Control.Monad (when)
import Network.Socket (sClose)
import System.Console.GetOpt (OptDescr(..), ArgDescr(..), ArgOrder(..), getOpt, usageInfo)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
impo... | |
efb4a042d50f122ba407bda57969a477c256f16b4e373eeef90bdf7bf5725167 | mbutterick/pitfall | text.rkt | #lang debug racket/base
(require
"core.rkt"
"page.rkt"
"annotation.rkt"
"font.rkt"
"vector.rkt"
"color.rkt"
racket/class
racket/match
racket/string
racket/list
sugar/unstable/dict
racket/promise
fontland/glyph-position)
(provide text string-width)
#|
approximates
|#
(define (do-horiz-line d... | null | https://raw.githubusercontent.com/mbutterick/pitfall/ad93e7f9f9ea70f9dedffb8d64b705c68f38b48c/pitfall/text.rkt | racket |
approximates
underline-position field is negative, by convention, so we change the sign
so we can move the text position.
Move the text position and flush just the current character
If the last character had an offset, reset the text position
Group segments that don't have any advance adjustments
calculate the... | #lang debug racket/base
(require
"core.rkt"
"page.rkt"
"annotation.rkt"
"font.rkt"
"vector.rkt"
"color.rkt"
racket/class
racket/match
racket/string
racket/list
sugar/unstable/dict
racket/promise
fontland/glyph-position)
(provide text string-width)
(define (do-horiz-line doc x y width [underl... |
298d4f9456c33d1baafd2f9d2048b469da68e931f0faaf55c2182a44bd6e21b9 | samcf/ogres | workspaces.cljs | (ns ogres.app.render.workspaces
(:require [clojure.string :refer [blank? trim]]
[ogres.app.hooks :refer [use-dispatch use-query]]))
(def query
[{:local/window [:entity/key]}
{:local/windows [:entity/key :window/label]}])
(defn workspaces []
(let [dispatch (use-dispatch)
result (use-quer... | null | https://raw.githubusercontent.com/samcf/ogres/c6441f6556403b3c4ed4300f38718173c18e8838/src/main/ogres/app/render/workspaces.cljs | clojure | (ns ogres.app.render.workspaces
(:require [clojure.string :refer [blank? trim]]
[ogres.app.hooks :refer [use-dispatch use-query]]))
(def query
[{:local/window [:entity/key]}
{:local/windows [:entity/key :window/label]}])
(defn workspaces []
(let [dispatch (use-dispatch)
result (use-quer... | |
ede0884bc4e193b0ca5f871ebb80f38521c1b2b4f3e09e5d5a0e8e0748b4b20b | camsaul/methodical | validate_arities_test.clj | (ns methodical.macros.validate-arities-test
(:require
[clojure.spec.alpha :as s]
[clojure.test :as t]
[methodical.macros :as macros]
[methodical.macros.validate-arities :as validate-arities]))
(t/deftest arglist-arities-test
(t/are [arglists expected] (= expected
(#'vali... | null | https://raw.githubusercontent.com/camsaul/methodical/c223cab205c135ffe7c7b5b206d042f79a82c4f7/test/methodical/macros/validate_arities_test.clj | clojure | ok
missing some required arities
has disallowed arities
disallowed AND missing | (ns methodical.macros.validate-arities-test
(:require
[clojure.spec.alpha :as s]
[clojure.test :as t]
[methodical.macros :as macros]
[methodical.macros.validate-arities :as validate-arities]))
(t/deftest arglist-arities-test
(t/are [arglists expected] (= expected
(#'vali... |
3a693804a9810a6a87fb092e26052b25d8496aa0ff99a87a8394f01440ee7c17 | tolysz/ghcjs-stack | UserHooks.hs | -----------------------------------------------------------------------------
-- |
Module : Distribution . Simple . UserHooks
Copyright : 2003 - 2005
-- License : BSD3
--
-- Maintainer :
-- Portability : portable
--
-- This defines the API that @Setup.hs@ scripts can use to customise the way... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/Distribution/Simple/UserHooks.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Portability : portable
This defines the API that @Setup.hs@ scripts can use to customise the way
build systems are defined in "Distribution.Simple". The 'UserHooks' is a big
itself. There are few ... | Module : Distribution . Simple . UserHooks
Copyright : 2003 - 2005
the build works . This module just defines the ' UserHooks ' type . The
predefined sets of hooks that implement the @Simple@ , @Make@ and @Configure@
record of functions . There are 3 for each action , a pre , post and the actio... |
5e27a83fc215f8bd5f0ec641eb49d272634bcaebe2fcbad9c8f2b5dddc0249eb | noinia/hgeometry | ConvexHullSpec.hs | module Algorithms.Geometry.ConvexHull.ConvexHullSpec where
import qualified Algorithms.Geometry.ConvexHull.DivideAndConquer as DivideAndConquer
import qualified Algorithms.Geometry.ConvexHull.GrahamScan as GrahamScan
import qualified Algorithms.Geometry.ConvexHull.JarvisMarch as JarvisMarch
import qualified Algorithms... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/test/src/Algorithms/Geometry/ConvexHull/ConvexHullSpec.hs | haskell | it "quickcheck lower hull " $
GrahamScan.lowerHull pts == DivideAndConquer.lowerHull pts
it "quickcheck " $
(PG $ GrahamScan.convexHull pts) == (PG $ DivideAndConquer.convexHull pts) | module Algorithms.Geometry.ConvexHull.ConvexHullSpec where
import qualified Algorithms.Geometry.ConvexHull.DivideAndConquer as DivideAndConquer
import qualified Algorithms.Geometry.ConvexHull.GrahamScan as GrahamScan
import qualified Algorithms.Geometry.ConvexHull.JarvisMarch as JarvisMarch
import qualified Algorithms... |
8832b077bacc8681ec469001e3a8b83d8862db6969c2d489f3b10b8943adbb9c | melange-re/melange | node_module.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/others/node_module.ml | ocaml | * Node Module API | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
52b46cdf4d70edf544025bd3bce638cc792c9dc3e245e00e41044f0f4f736404 | finos/metadata-tool | generators.clj | ;
Copyright 2017 Fintech Open Source Foundation
SPDX - License - Identifier : Apache-2.0
;
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 applicab... | null | https://raw.githubusercontent.com/finos/metadata-tool/61a48a91411f39fc543992f72535fd7ba82959f1/src/metadata_tool/tools/generators.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | Copyright 2017 Fintech Open Source Foundation
SPDX - License - Identifier : Apache-2.0
distributed under the License is distributed on an " AS IS " BASIS ,
(ns metadata-tool.tools.generators
(:require [clojure.tools.logging :as log]
[clojure.string :as s]
[cl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.