_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 |
|---|---|---|---|---|---|---|---|---|
a3f6dae1b7b42ae198d08b9189617c511ee109a24349352e162ec4b13f8e9139 | shin-sakata/Citrous | Router.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Citrous.Integration.Router where
import Citrous.Integration.Handler (toResponse)
import Citrous.Unit.ServerErr (ServerErr, err400, err401,
... | null | https://raw.githubusercontent.com/shin-sakata/Citrous/85ecf51ae41852a3d1c038c76c56a78145a6e21d/src/Citrous/Integration/Router.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
throwErrorを利用して最初にマッチしたRouteを返す。
Ordを導出している
smart constructor
It's the lowest priority. | # LANGUAGE DataKinds #
module Citrous.Integration.Router where
import Citrous.Integration.Handler (toResponse)
import Citrous.Unit.ServerErr (ServerErr, err400, err401,
err404, err405, err406, err415,
... |
c60f3884bee45a5372e45051979299edcf797fea5ebc762e954f121bb2d4e1eb | ejgallego/dualquery | bineval.ml | Copyright ( c ) 2014 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
(* Query evaluat... | null | https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/src/bineval.ml | ocaml | Query evaluation for binarrays
FIXME: We should define a module, etc... and integrate this in query.ml
We can improve performance on this
Perform the normalization in place
This is the same than eval_queries but with the print
The performance here is not very good, but indeed in large
databases we a... | Copyright ( c ) 2014 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
open Binarray
o... |
81790a3ed0bcc1874da8bd4b4a4250aef71afba8b167869f4e659315e0334ef4 | open-company/open-company-web | onboard_wrapper.cljs | (ns oc.web.components.ui.onboard-wrapper
(:require [rum.core :as rum]
[org.martinklepsch.derivatives :as drv]
[cuerdas.core :as string]
[oc.web.lib.jwt :as jwt]
[oc.web.urls :as oc-urls]
[oc.web.router :as router]
[oc.web.dispatcher :as dis]
... | null | https://raw.githubusercontent.com/open-company/open-company-web/3f7aad2708fa6083fcab25637c3d19652e51de78/src/main/oc/web/components/ui/onboard_wrapper.cljs | clojure | Load the list of teams if it's not already
to make sure the name is truncated
Load the list of teams if it's not already
Create org and show setup screen
Load the list of teams if it's not already
Load the list of teams if it's not already
There were errors inviting users, show them and let the user retry
All i... | (ns oc.web.components.ui.onboard-wrapper
(:require [rum.core :as rum]
[org.martinklepsch.derivatives :as drv]
[cuerdas.core :as string]
[oc.web.lib.jwt :as jwt]
[oc.web.urls :as oc-urls]
[oc.web.router :as router]
[oc.web.dispatcher :as dis]
... |
3e6ef698c8483cc83c026b56db171715311669e9a02879b10dd85037b340dbde | mwand/5010-examples | 03-3-two-draggable-cats.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 03-3-two-draggable-cats) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor rep... | null | https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/03-3-two-draggable-cats.rkt | racket | about the language level of this file in a form that our tools can easily process.
draggable. But space pauses or unpauses the entire system.
draggable cat.
like falling cat, but user can drag the cat with the mouse.
button-down to select, drag to move, button-up to release.
falling cat.
A cat falls from the ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 03-3-two-draggable-cats) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
two draggable cats .
like draggable cat , but t... |
e4b095ce67d58531ab16e4318a26c12ee350295b2a4f0a16040c5a1ab529f384 | essiene/erlami | test_amievent_manager.erl | -module(test_amievent_manager).
-behaviour(gen_event).
-include_lib("eunit/include/eunit.hrl").
-export([
init/1,
handle_event/2,
handle_call/2,
handle_info/2,
terminate/2,
code_change/3
]).
new_test() ->
EvtMgr = amievent_manager:start(),
amievent_manage... | null | https://raw.githubusercontent.com/essiene/erlami/c566f229c8bb1debe3c468c7124551b912bd6b1f/tests/test_amievent_manager.erl | erlang | -module(test_amievent_manager).
-behaviour(gen_event).
-include_lib("eunit/include/eunit.hrl").
-export([
init/1,
handle_event/2,
handle_call/2,
handle_info/2,
terminate/2,
code_change/3
]).
new_test() ->
EvtMgr = amievent_manager:start(),
amievent_manage... | |
168aa09460062d9b422881163009fc89772382fa4b269390b4b21a57b09b2226 | lexi-lambda/blackboard | pango.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/alloc
ffi/unsafe/cvector
ffi/unsafe/define
racket/draw/unsafe/glib
racket/draw/unsafe/pango
racket/flonum
(only-in "cairo.rkt" _cairo_scaled_font_t)
(only-in "harfbuzz.rkt" _hb_font_t))
(provide (s... | null | https://raw.githubusercontent.com/lexi-lambda/blackboard/cfc987e9bb3a357a10d23a44419bbe16215ea656/blackboard-lib/blackboard/private/draw/unsafe/pango.rkt | racket | -----------------------------------------------------------------------------
types
-----------------------------------------------------------------------------
----------------------------------------------------------------------------- | #lang racket/base
(require ffi/unsafe
ffi/unsafe/alloc
ffi/unsafe/cvector
ffi/unsafe/define
racket/draw/unsafe/glib
racket/draw/unsafe/pango
racket/flonum
(only-in "cairo.rkt" _cairo_scaled_font_t)
(only-in "harfbuzz.rkt" _hb_font_t))
(provide (s... |
e74b968bdf0baa5f55a5dd9372c20bfc328c808219751b16bbc59d8d8e2f2e83 | haskus/haskus-system | Download.hs | # LANGUAGE FlexibleContexts #
module Haskus.Apps.System.Build.Download
( download
)
where
import Network.HTTP.Simple
import Conduit
download ::
( MonadUnliftIO m
, MonadThrow m
) => String -> FilePath -> m ()
download url filepath = do
req <- parseRequest url
runResourceT $ httpSink req $ const ... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system-build/src/apps/Haskus/Apps/System/Build/Download.hs | haskell | # LANGUAGE FlexibleContexts #
module Haskus.Apps.System.Build.Download
( download
)
where
import Network.HTTP.Simple
import Conduit
download ::
( MonadUnliftIO m
, MonadThrow m
) => String -> FilePath -> m ()
download url filepath = do
req <- parseRequest url
runResourceT $ httpSink req $ const ... | |
ed8406c3b26fdb4fa63abaef2f64000ba82dbc66e86d073907c8b8ced7bbb256 | potatosalad/erlang-jose | jose_jwe_enc_aes.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 22 Jul 2015 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwe/jose_jwe_enc_aes.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
jose_jwe callbacks
jose_jwe_enc callbacks
API
Types
====================================================================
jose_jwe callb... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 22 Jul 2015 by < >
-module(jose_jwe_enc_aes).
-behaviour(jose_jwe).
-behaviour(jose_jwe_enc).
-export([from_map/1]).
-export([to_map/2]).
-export([algorithm/1]).
-export([bit... |
f9237c624bfe036ee36c5803bad41edb2961cbd85287b86523b9ef073210b679 | wdebeaum/DeepSemLex | subordinate.lisp | ;;;;
;;;; W::subordinate
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::subordinate
(SENSES
((LF-PARENT ONT::PERSON)
(meta-data :origin calo-ontology :entry-date 20060714 :change-date nil :wn ("subordinate%1:18:00") :comments caloy3)
)
)
)
))
(define-words :pos W::adj :t... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/subordinate.lisp | lisp |
W::subordinate
(example "a wall good for climbing")
(TEMPL adj-purpose-TEMPL (XP (% W::PP (W::PTYPE W::to))))
)
(EXAMPLE "a drug suitable for cancer")
;; this is a sense that allows for implicit/indirect senses of "for"
;; the main sense is adj-purpose-templ for cases such as "thi... |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::subordinate
(SENSES
((LF-PARENT ONT::PERSON)
(meta-data :origin calo-ontology :entry-date 20060714 :change-date nil :wn ("subordinate%1:18:00") :comments caloy3)
)
)
)
))
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words... |
aaa4144601e7dc70ac9b0a84a09cde6ac0c57b8b77c3efd83b97d3f5afa83aa2 | gregr/ina | js.scm | ;; WARNING: This is not a fully abstract code generator. Assume insecurity by
;; default. These operations do very little sanity checking and validation.
(define (js-stmt* stx*) (map js-stmt stx*))
(define (js-stmt stx)
(match stx
(`(vars . ,(? list? binding*))
(string-append "var " (comma* (js-binding* ... | null | https://raw.githubusercontent.com/gregr/ina/5e0a5b7ec44c8c9575b22ce5c394f7a96b766545/nscheme/old/old-1/js.scm | scheme | WARNING: This is not a fully abstract code generator. Assume insecurity by
default. These operations do very little sanity checking and validation. |
(define (js-stmt* stx*) (map js-stmt stx*))
(define (js-stmt stx)
(match stx
(`(vars . ,(? list? binding*))
(string-append "var " (comma* (js-binding* binding*)) ";"))
(`(return ,expr) (string-append "return " (js-expr expr) ";"))
(`(throw ,expr) (string-append "throw " (js-expr expr) ";"))
(`(... |
921ea4a347b71e7780a3bb02983339fb07ae33d4aa7c042c569a8cd6b05ff0f7 | g000001/Starlisp-simulator | make.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : User ; Base : 10 -*-
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(cl-user::ms cl-user::msc cl-user::mss cl-user::mss-all cl-user::make-system)
(find-package :cl-user)))
#+OLD
(defpackage :cl-user
(:export ... | null | https://raw.githubusercontent.com/g000001/Starlisp-simulator/12a6513d316a27fc130b83dcb023578312a79788/make.lisp | lisp | Syntax : Common - lisp ; Package : User ; Base : 10 -*-
this is where the make-system code looks for system definition
files. Change this as appropriate to your system.
set up mechanism so that 'logical names' (aliases) can be
defined and undefined. Aliases are recognized by beginning
with a specific user-defin... |
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(cl-user::ms cl-user::msc cl-user::mss cl-user::mss-all cl-user::make-system)
(find-package :cl-user)))
#+OLD
(defpackage :cl-user
(:export "MS" "MSC" "MSS" "MSS-ALL" "MAKE-SYSTEM"))
#+Allegro
(defpackage "CG-USER"
... |
4f7956f1fe88761880229c2a7b3846b4e96df34d3c27b21d69770aab31a3b3e1 | Ivana-/fhir-face | fetch.cljs | (ns zframes.fetch
(:require [re-frame.core :as rf]
[clojure.string :as str]))
(defn to-query [params]
(->> params
(mapv (fn [[k v]] (str (name k) "=" v)))
(str/join "&")))
#_(rf/reg-sub
:xhr/url
(fn [db [_ url]]
(str (get-in db [:config :base-url]) url)))
#_(comment
(defn json-fetc... | null | https://raw.githubusercontent.com/Ivana-/fhir-face/0910012395de3d877a23a17a5b8d2d5e578ab256/src/zframes/fetch.cljs | clojure | if success/error are maps - calling dispatch events, else calling as functions
Via promices
(.catch (fn [e] (throw (js/Error. (str "failed to fetch " uri))))) | (ns zframes.fetch
(:require [re-frame.core :as rf]
[clojure.string :as str]))
(defn to-query [params]
(->> params
(mapv (fn [[k v]] (str (name k) "=" v)))
(str/join "&")))
#_(rf/reg-sub
:xhr/url
(fn [db [_ url]]
(str (get-in db [:config :base-url]) url)))
#_(comment
(defn json-fetc... |
a9e966528fcddf8c32decbb973f877591c27d4b478be58f43d139bc731484806 | juxt/reap | rfc7231_test.clj | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.encoders.rfc7231-test
(:require
[clojure.test :refer [deftest are]]
[juxt.reap.alpha.encoders.rfc7231 :as enc]
[juxt.reap.alpha.decoders.rfc7231 :as dec]
[juxt.reap.alpha.regex :as re]))
(deftest vary-test
(are [original expected]
(let [decoded... | null | https://raw.githubusercontent.com/juxt/reap/29ffc8664df26041ebd93a53f009d2606d1a5b6c/test/juxt/reap/alpha/encoders/rfc7231_test.clj | clojure | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.encoders.rfc7231-test
(:require
[clojure.test :refer [deftest are]]
[juxt.reap.alpha.encoders.rfc7231 :as enc]
[juxt.reap.alpha.decoders.rfc7231 :as dec]
[juxt.reap.alpha.regex :as re]))
(deftest vary-test
(are [original expected]
(let [decoded... | |
9545e65993bc5c27c59cda85be583497e526b5217a036ca14227156f2d2d07f4 | re-ops/re-cog | package.clj | (ns re-cog.resources.package
(:require
[re-cog.resources.download :refer (download)]
[re-cog.common.resources :refer (run-)]
[re-cog.common.functions :refer (require-functions)]
[re-cog.common.defs :refer (def-serial def-inline)]
[re-cog.common.constants :refer (require-constants)]))
(require-function... | null | https://raw.githubusercontent.com/re-ops/re-cog/2ab85fa85e97a163b6229982fd91a510f3db22a4/src/re_cog/resources/package.clj | clojure | consumers
remove package | (ns re-cog.resources.package
(:require
[re-cog.resources.download :refer (download)]
[re-cog.common.resources :refer (run-)]
[re-cog.common.functions :refer (require-functions)]
[re-cog.common.defs :refer (def-serial def-inline)]
[re-cog.common.constants :refer (require-constants)]))
(require-function... |
b141bad4f21d46bb4f14d7ac80b82623792725ba5973514dde9c458647302c09 | Carnap/Carnap | SequentCheck.hs | # LANGUAGE FlexibleContexts #
module Carnap.GHCJS.Action.SequentCheck (sequentCheckAction) where
import Lib
import Data.Tree
import Data.Map as M (lookup,Map, toList)
import Data.Either
import Data.Aeson
import Data.Text (pack)
import Data.Typeable (Typeable)
import Data.Aeson.Types
import Data.IORef (IORef, readIORe... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap-GHCJS/src/Carnap/GHCJS/Action/SequentCheck.hs | haskell | initial check in case we preload a tableau
will eventually want the equivalent of ndNotation
may need to update the parent of the changed node if it exists
XXX: we do these separately in order to keep a parse error in
either of the inferences from causing trouble in the
other inference.
blank out the info of empty leav... | # LANGUAGE FlexibleContexts #
module Carnap.GHCJS.Action.SequentCheck (sequentCheckAction) where
import Lib
import Data.Tree
import Data.Map as M (lookup,Map, toList)
import Data.Either
import Data.Aeson
import Data.Text (pack)
import Data.Typeable (Typeable)
import Data.Aeson.Types
import Data.IORef (IORef, readIORe... |
0f5e9ad8db09dc8858ea9afb59c37c20f826b13135f15d378c7598198182a24e | tlaplus/tlapm | m_globalness.ml | Detect global operators .
Copyright ( C ) 2008 - 2013 INRIA and Microsoft Corporation
Copyright (C) 2008-2013 INRIA and Microsoft Corporation
*)
open Property
open M_t
open Proof.T
let isglobal: unit pfuncs =
Property.make "Module.Globalness.isglobal"
let is_global x = Property.has x isglobal
let globa... | null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/module/m_globalness.ml | ocaml | Detect global operators .
Copyright ( C ) 2008 - 2013 INRIA and Microsoft Corporation
Copyright (C) 2008-2013 INRIA and Microsoft Corporation
*)
open Property
open M_t
open Proof.T
let isglobal: unit pfuncs =
Property.make "Module.Globalness.isglobal"
let is_global x = Property.has x isglobal
let globa... | |
6129ddce93bc80f9ea8db77d7bd46461ad2fe2cb568669400018c262b4eacb7f | oakes/Nightcode | paren_soup.cljs | (ns nightcode.paren-soup
(:require [goog.functions :refer [debounce]]
[paren-soup.core :as p]
[mistakes-were-made.core :as mwm]
[cross-parinfer.core :as cp]
[cljs.reader :refer [read-string]]
[goog.dom :as gdom]
[goog.object :as gobj])
(:import... | null | https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/src/cljs/nightcode/paren_soup.cljs | clojure | don't refresh editor when this is true
don't autosave unless user changed
the text afterwards
don't refresh editor when this is true
don't refresh editor when this is true
hack thanks to | (ns nightcode.paren-soup
(:require [goog.functions :refer [debounce]]
[paren-soup.core :as p]
[mistakes-were-made.core :as mwm]
[cross-parinfer.core :as cp]
[cljs.reader :refer [read-string]]
[goog.dom :as gdom]
[goog.object :as gobj])
(:import... |
8aecde45cc0a5bdfb63a2249283624cca975683a6e7134cd6fcd0dbed83f5f70 | tweag/funflow2 | Requests.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE OverloadedLists #
-- | Functions for sending HTTP requests to the Docker Engine API
module Docker.API.Client.Internal.Requests where
import Conduit (filterC, mapC)
import Control.Monad.Except
import Control.Monad.Trans.Resource (runResourceT)
import Data.Aeson (eitherDeco... | null | https://raw.githubusercontent.com/tweag/funflow2/642cbb6a1eb3c03b31fe32d22886e4eba4b877cc/docker-client/src/Docker/API/Client/Internal/Requests.hs | haskell | # LANGUAGE OverloadedStrings #
| Functions for sending HTTP requests to the Docker Engine API
| Docker Engine API version. This value will prefix all docker api url paths.
| Helper function which formats the response of a failed HTTP request
| Similar to the `docker run` command. Runs a container in the background ... | # LANGUAGE OverloadedLists #
module Docker.API.Client.Internal.Requests where
import Conduit (filterC, mapC)
import Control.Monad.Except
import Control.Monad.Trans.Resource (runResourceT)
import Data.Aeson (eitherDecode, encode)
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 a... |
45ea35ca22eb745f6c3238e938d1130b6c9bf0af75c40e796675af9ec99bf26a | kupl/LearnML | patch.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec __s3 (__s4 : lambda) : string list =
match __s4 with
| V __s5 -> [ __s5 ]
| P (__s6, __s7) ->
List.filter (fun (__s8 : string) -> not (__s6 = __s8)) (__s3 __s7)
| C (__s9, __s10) -> __s3 __s9 @ __s3 __s10
le... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub138/patch.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec __s3 (__s4 : lambda) : string list =
match __s4 with
| V __s5 -> [ __s5 ]
| P (__s6, __s7) ->
List.filter (fun (__s8 : string) -> not (__s6 = __s8)) (__s3 __s7)
| C (__s9, __s10) -> __s3 __s9 @ __s3 __s10
le... | |
3d6cd9274f81772e7f8d166a4bb69e9283c95d64a293bd99814235bfbf575dd9 | clojure/clojurescript | metadata_test.cljc | 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
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs/cljs/metadata_test.cljc | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.metadata-test
(:require
#?(:cljs [cljs.test :refer-macros [deftest testing is]]
:clj [clojure.test :refer [deftest testing is]])))
(defn seq-interface-tests
"Tests that all seqs handle metadata corre... |
7dfd6e349b2aa827bd3d1da68bc8c6640c1838fc2c5311463022db4cb1243628 | Liqwid-Labs/agora | Orphans.hs | # OPTIONS_GHC -Wno - orphans #
module Agora.Plutarch.Orphans () where
import Plutarch.Lift (PConstantDecl (..), PUnsafeLiftDecl (PLifted))
import Data.Bifunctor (Bifunctor (bimap))
import Data.Map.Strict qualified as StrictMap
import Data.Tagged (Tagged (Tagged))
import Data.Traversable (for)
import Plutarch.Api.V1 ... | null | https://raw.githubusercontent.com/Liqwid-Labs/agora/fadd6ca2da60af2861a4fbe86854bc5128aec1f1/agora/Agora/Plutarch/Orphans.hs | haskell | | @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0 | # OPTIONS_GHC -Wno - orphans #
module Agora.Plutarch.Orphans () where
import Plutarch.Lift (PConstantDecl (..), PUnsafeLiftDecl (PLifted))
import Data.Bifunctor (Bifunctor (bimap))
import Data.Map.Strict qualified as StrictMap
import Data.Tagged (Tagged (Tagged))
import Data.Traversable (for)
import Plutarch.Api.V1 ... |
a72d1254fe7ebe4481f4d0aa4d7d94fe5373288c1f801f41f55ec56d82857301 | input-output-hk/io-sim | Main.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Concurrent.Class.MonadSTM
import Control.Monad (forever, replicateM)
import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadFork
import Control... | null | https://raw.githubusercontent.com/input-output-hk/io-sim/a4efa0b73d5167d2f2ab72631679bb00557c31ff/io-sim/bench/Main.hs | haskell | # LANGUAGE BangPatterns #
timers, delays, timeouts
threads, async
| # LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Concurrent.Class.MonadSTM
import Control.Monad (forever, replicateM)
import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadFork
import Control.Monad.Class.MonadSay
import ... |
cf449ac4a00dcb0226411e372fe477d1c2353297f50fc01bf8b87c135d25941f | mransan/btree | dbtlk_types.ml |
The MIT License ( MIT )
Copyright ( c ) 2016 ( )
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to use ,... | null | https://raw.githubusercontent.com/mransan/btree/530cadca4d1569fc0a638d9fdbb1bd962fd8e171/src/dbtlk_types.ml | ocaml |
The MIT License ( MIT )
Copyright ( c ) 2016 ( )
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to use ,... | |
736844e2ea2e7c7e4d270679c4aab609b7bf3b76520fe9889d76f897dd57302f | csabahruska/jhc-components | Read.hs | # OPTIONS_JHC -fno - prelude -fm4 #
module Jhc.Inst.Read() where
import Prelude.Text
import Jhc.Basics
import Jhc.Float
import Prelude.Float
import Jhc.Num
import Numeric(showSigned, showInt, readSigned, readDec, showFloat,
readFloat, lexDigits)
Reading at the Integer type avoids
possible difficul... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/jhc/Jhc/Inst/Read.hs | haskell | # OPTIONS_JHC -fno - prelude -fm4 #
module Jhc.Inst.Read() where
import Prelude.Text
import Jhc.Basics
import Jhc.Float
import Prelude.Float
import Jhc.Num
import Numeric(showSigned, showInt, readSigned, readDec, showFloat,
readFloat, lexDigits)
Reading at the Integer type avoids
possible difficul... | |
8e2a8ec49b8bcc30cabb64a2f26a349dc5c10ebbe411487b73cf6d05b9f78084 | Mishio595/disml | snowflake.ml | open Core
type t = Int.t [@@deriving sexp]
let of_yojson_exn d = Yojson.Safe.Util.to_string d |> Int.of_string
let of_yojson d =
try Ok (of_yojson_exn d)
with Yojson.Safe.Util.Type_error (why,_) -> Error why
let to_yojson s : Yojson.Safe.t = `String (Int.to_string s)
let timestamp snowflake = (... | null | https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/models/snowflake.ml | ocaml | open Core
type t = Int.t [@@deriving sexp]
let of_yojson_exn d = Yojson.Safe.Util.to_string d |> Int.of_string
let of_yojson d =
try Ok (of_yojson_exn d)
with Yojson.Safe.Util.Type_error (why,_) -> Error why
let to_yojson s : Yojson.Safe.t = `String (Int.to_string s)
let timestamp snowflake = (... | |
ddcb6e8d04e3d75861bd9e05d9bc6f9cb8c58e3f59474c30c0ff10186549a8b8 | degree9/enterprise | debug.cljs | (ns degree9.debug
(:require ["debug" :as dbg])
(:require-macros [degree9.debug]))
(defn debug [name]
(dbg name))
(defn extend [dbg name]
(.extend dbg name))
| null | https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/debug.cljs | clojure | (ns degree9.debug
(:require ["debug" :as dbg])
(:require-macros [degree9.debug]))
(defn debug [name]
(dbg name))
(defn extend [dbg name]
(.extend dbg name))
| |
70111f57d3418daea0ba638209b6aae888334774f87b78126ae6ec7264127a38 | yetibot/yetibot | sed.clj | (ns yetibot.commands.sed
(:require
[clojure.string :as s]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn sed-cmd
"sed s/<search-pattern>/<replace-pattern> <string> # replace <search-pattern> with <replace-pattern> on piped contents
sed s/<search-pattern/ <string> # replace <search-pattern> with nothing ... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/sed.clj | clojure | clear out the appended args on rp - this is mainly to support spaces in rp | (ns yetibot.commands.sed
(:require
[clojure.string :as s]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn sed-cmd
"sed s/<search-pattern>/<replace-pattern> <string> # replace <search-pattern> with <replace-pattern> on piped contents
sed s/<search-pattern/ <string> # replace <search-pattern> with nothing ... |
d3ba11cbb8e08aefe72f9eaca366bbd3440dbec3378e3c61bf14223082230fd2 | kelamg/HtDP2e-workthrough | ex328.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex328) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex328.rkt | racket | about the language level of this file in a form that our tools can easily process.
An Atom is one of:
– Number
– String
– Symbol
– '()
Any -> Boolean
produces true if x is of atomic
replaces all occurrences of old in sexp with new | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex328) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
An S - expr is one of :
– Atom
– SL
An SL is... |
a7fe92a61c9568bd6c8d9ac000c42aa7b91b58db7f19bda25a780f87f679d887 | LdBeth/star-lisp | utilities.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : * SIM - I ; Base : 10 ; Muser : yes -*-
(in-package :*sim-i)
;;;> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
;;;>
;;;> The Thinking Machines *Lisp Simulator is in the public domain.
;;;> You are free to do whatever y... | null | https://raw.githubusercontent.com/LdBeth/star-lisp/034fb97fe8780d6e9fbff7c1d8c4a6b8c331797b/source/utilities.lisp | lisp | Syntax : COMMON - LISP ; Package : * SIM - I ; Base : 10 ; Muser : yes -*-
> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
>
> The Thinking Machines *Lisp Simulator is in the public domain.
> You are free to do whatever you like with it, including but
> not limited to distri... |
(in-package :*sim-i)
(defun iota (n)
(let ((result nil))
(dotimes (j n) (push j result))
(nreverse result)
))
(defun power-of-two-p (x) (and (plusp x) (eql 1 (logcount x))))
(defun next-power-of-two->= (x)
(assert (and (integerp x) (> x 0)) () "The domain of next-power-of-two->= is positive inte... |
6ed78966e02b144aed77367c378d74d19bfdf5b9dfc3d1336344983de015186e | igorhvr/bedlam | coerce.scm | ;;"coerce.scm" Scheme Implementation of COMMON-LISP COERCE and TYPE-OF.
Copyright ( C ) 1995 , 2001
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . An... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/coerce.scm | scheme | "coerce.scm" Scheme Implementation of COMMON-LISP COERCE and TYPE-OF.
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and... | Copyright ( C ) 1995 , 2001
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
(require-if 'compiling 'array)
(define (type-of obj)
(cond
((boolean? obj) ... |
ebc78f9aa22722cd862691228aa35551643449f0ecdce531b0916af402133665 | Vaguery/klapaucius | printable.clj | (ns push.instructions.aspects.printable
(:use [push.instructions.core
:only (build-instruction)]
[push.instructions.dsl]))
(defn print-instruction
"returns a new x-print instruction for a PushType"
[pushtype]
(let [typename (:name pushtype)
instruction-name (str (name typename) "-pr... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/src/push/instructions/aspects/printable.clj | clojure | (ns push.instructions.aspects.printable
(:use [push.instructions.core
:only (build-instruction)]
[push.instructions.dsl]))
(defn print-instruction
"returns a new x-print instruction for a PushType"
[pushtype]
(let [typename (:name pushtype)
instruction-name (str (name typename) "-pr... | |
ebdfa02907fe758dbb71080c7aa4f0f37b6216866b2079ae512c057649edfb52 | iambrj/imin | interp-Cif.rkt | #lang racket
(require "utilities.rkt")
(require "interp-Rif.rkt")
(require "interp-Cvar.rkt")
(provide interp-Cif interp-Cif-mixin)
(define (interp-Cif-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/override (interp-stmt env)
(lambda (s)
(match s
[... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/interp-Cif.rkt | racket | #lang racket
(require "utilities.rkt")
(require "interp-Rif.rkt")
(require "interp-Cvar.rkt")
(provide interp-Cif interp-Cif-mixin)
(define (interp-Cif-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/override (interp-stmt env)
(lambda (s)
(match s
[... | |
ddb3b0d34e297e57ce7847632263df2eb1a46ec8e3eb3aa18080850dfc328f4d | ayamada/copy-of-svn.tir.jp | command.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
Simple ( or S - exp ) Data Storage Sevice command module
;;; ToDo: とりあえず、コマンドを充実させて、ひとまず使える状態にしよう!
ToDo : sdss - serverを操作する部分を、あとで関数化する事 。
;;; note: 色々と考えたが、dbmと同じく、コマンドの結果が
;;; readableであるかどうかはチェックしない事にしたい。
;;; (tabl... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir03/0.0.4/lib/tir03/sdss/command.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
ToDo: とりあえず、コマンドを充実させて、ひとまず使える状態にしよう!
note: 色々と考えたが、dbmと同じく、コマンドの結果が
readableであるかどうかはチェックしない事にしたい。
(table:put!等の返り値として#<undef>等を返さないように、注意しながら作る)
(しかし、evalの返り値に#<undef>が出るかどうかは気にしない)
なので、sdssクライアントは、readできない事も考慮する事!
dbmは、明示的にcreateする事も可... | $ Id$
Simple ( or S - exp ) Data Storage Sevice command module
ToDo : sdss - serverを操作する部分を、あとで関数化する事 。
ToDo : dbm自体をカプセル化して、将来メモリ上にキャッシュ可能にしたい
ToDo : auto - incrementの実装
ToDo : テーブル部分は、クライアントからも使う前提とする
` ( , コマンド名 r )
ToDo : sandboxモジュール生成 / 管理部分は別モジュール化する事 。
(define-modul... |
418da1b7382c0d8ed1b98e865521ff60894a96f01e49572fc6dbae599c549611 | tov/shcaml | flags.mli | (** Quick and dirty argument processing. For full featured argument
* processing, use [Arg], but if all you need is something very simple,
* {!Flags} might do. *)
(** Raised by methods {!lookup.string} and {!lookup.int}
* when the requested argument isn't present. *)
exception Argument_missing of string
(** The a... | null | https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/flags.mli | ocaml | * Quick and dirty argument processing. For full featured argument
* processing, use [Arg], but if all you need is something very simple,
* {!Flags} might do.
* Raised by methods {!lookup.string} and {!lookup.int}
* when the requested argument isn't present.
* The argument parser {!Flags.go} returns an object for ... |
exception Argument_missing of string
class type lookup = object
method bool : string -> bool
method int : ?default:int -> string -> int
method string : ?default:string -> string -> string
method bcount : string -> int
method ints : string -> int list
method strings : string -> string lis... |
ea7937a2d325e1610b847614ca9779a3aca909be3588b1ac55ba6351f913da76 | azimut/shiny | hell.lisp | (in-package :shiny)
(fg 2f0)
(freverb-toggle 1)
(freverb-preset 6)
(fp 0 40)
(fp 1 0)
(setf *instances* 1)
(defun pat1 ())
(defpattern pat1 ((get-pattern 'blood) .5)
(p time *gm-kick* (rcosr 60 5 3) .35 1)
(p time *gm-snare* (rcosr 60 5 3) .35 1)
(p time *gm-closed-hi-hat* (rcosr 60 5 3) .35 1)
(p time *gm... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/hell.lisp | lisp | (in-package :shiny)
(fg 2f0)
(freverb-toggle 1)
(freverb-preset 6)
(fp 0 40)
(fp 1 0)
(setf *instances* 1)
(defun pat1 ())
(defpattern pat1 ((get-pattern 'blood) .5)
(p time *gm-kick* (rcosr 60 5 3) .35 1)
(p time *gm-snare* (rcosr 60 5 3) .35 1)
(p time *gm-closed-hi-hat* (rcosr 60 5 3) .35 1)
(p time *gm... | |
42eeb40ed4be5f1139b3b70386dca894ecd5c2ef970acad7a9a6f9b04f851b99 | danieljharvey/mimsa | Stdlib.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Language.Mimsa.Project.Stdlib
( buildStdlib,
stdModules,
stdlib,
addModule,
)
where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Data.Text (Text)
import qualified Data.Text as T
import qualified Language.Mim... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Project/Stdlib.hs | haskell | # LANGUAGE OverloadedStrings #
| these are files in /static/modules folder that we import
| add a module to the stdlib, adding some named imports | # LANGUAGE LambdaCase #
module Language.Mimsa.Project.Stdlib
( buildStdlib,
stdModules,
stdlib,
addModule,
)
where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Data.Text (Text)
import qualified Data.Text as T
import qualified Language.Mimsa.Actions.Helpers.Parse as Actions... |
5ef43ec5f26639e78fa67777736128c09759429d97dc8ad634557fef63c85089 | ericthorsen/enclojure-repl | main.clj | (comment
;*
* Copyright ( c ) ThorTech , L.L.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 ... | null | https://raw.githubusercontent.com/ericthorsen/enclojure-repl/eeae31ba5ddccde5a1aa11a122db6e8d8a49cd8f/org-enclojure-repl-server/src/test/clojure/org/enclojure/repl/main.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 this... | (comment
* Copyright ( c ) ThorTech , L.L.C .. All rights reserved .
* Author : ,
)
(in-ns org.enclojure.repl.main)
(defn start-repl []
(-main "External REPL" 12000))
|
cdf72adf9b1ee609c0e968e0e5656d832366c1764b91fe24bdc09ada65f28706 | gothinkster/clojurescript-keechma-realworld-example-app | tags.cljs | (ns app.controllers.tags
(:require [keechma.next.controller :as ctrl]
[keechma.next.controllers.pipelines :as pipelines]
[keechma.pipelines.core :as pp :refer-macros [pipeline!]]
[app.api :as api]
[keechma.next.controllers.dataloader :as dl]))
(derive :tags ::pipelines... | null | https://raw.githubusercontent.com/gothinkster/clojurescript-keechma-realworld-example-app/f6d32f8eea5439b0b33df1afb89da6d27b7da66b/src/app/controllers/tags.cljs | clojure | (ns app.controllers.tags
(:require [keechma.next.controller :as ctrl]
[keechma.next.controllers.pipelines :as pipelines]
[keechma.pipelines.core :as pp :refer-macros [pipeline!]]
[app.api :as api]
[keechma.next.controllers.dataloader :as dl]))
(derive :tags ::pipelines... | |
15214a4a9a63f980dc9358130ac0b8f92d4e08a91e3dd6a581c991e36672a31c | nixeagle/nisp | json-classes.lisp | (defpackage #:nisp.fbi.json-classes
(:use :cl :usocket :json :iterate :alexandria
:nisp.util.json :eos)
(:export :auth :subscribe :json-action-mixin
:commit-author :commit-data
:irc-data :irc-message :irc-private :publish
:sender :url
;; methods
#:json-... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/fbi/json-classes.lisp | lisp | methods
publish
irc
nil for no signature by this binding.
not exist go looking for long-url. | (defpackage #:nisp.fbi.json-classes
(:use :cl :usocket :json :iterate :alexandria
:nisp.util.json :eos)
(:export :auth :subscribe :json-action-mixin
:commit-author :commit-data
:irc-data :irc-message :irc-private :publish
:sender :url
#:json->alist #:make-json-typ... |
ab8a2fb158af2d946adb95ec2292426da1722de9e16e0d457fbd0a2e519ec002 | lfe/lfe | lfe_eval_bits.erl | Copyright ( c ) 2021
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under ... | null | https://raw.githubusercontent.com/lfe/lfe/dbfd16af065b12d2dbce26ff1fbad151765243fd/src/lfe_eval_bits.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
File :
Author :
We follow Erlang here in many cases even though it is sometimes a
-module(lfe_eval_bits).
-export([expr_bitsegs/2,mat... |
5d8b77e6697e5d41642ff7fa9e7f515d4a01492e31e7b744c8eada76947b107e | mathiasbourgoin/ocaml_mammut | mammut_stubs_description.ml | open Ctypes
module Mt = Generate_types
module T = Mt.Types (Mammut_types)
module Bindings (F : Cstubs.FOREIGN) = struct
type mammut
let mammut : mammut structure typ = structure "MammutHandle"
open F
module Topology = struct
module Cpu = struct
type t
let t : t structure typ = structure "Ma... | null | https://raw.githubusercontent.com/mathiasbourgoin/ocaml_mammut/41efa63644307d175562a197aecf9dd150f9f3a2/src/c/mammut_stubs_description.ml | ocaml | open Ctypes
module Mt = Generate_types
module T = Mt.Types (Mammut_types)
module Bindings (F : Cstubs.FOREIGN) = struct
type mammut
let mammut : mammut structure typ = structure "MammutHandle"
open F
module Topology = struct
module Cpu = struct
type t
let t : t structure typ = structure "Ma... | |
dfe50e64acb6628dc34f1862bfa25366b368f7c01f958dc7b188d96e86a42889 | archimag/cl-routes | routes-swank.lisp | ;;;; routes-swank.lisp
;;;;
;;;; This file is part of the cl-routes library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package #:routes)
(defparameter *indention* 4)
(defparameter *current-indention* nil)
(defgeneric route-emacs-inspect (route))
(defmethod route-emacs-... | null | https://raw.githubusercontent.com/archimag/cl-routes/1b79e85aa653e1ec87e21ca745abe51547866fa9/src/routes-swank.lisp | lisp | routes-swank.lisp
This file is part of the cl-routes library, released under Lisp-LGPL.
See file COPYING for details.
| Author : < >
(in-package #:routes)
(defparameter *indention* 4)
(defparameter *current-indention* nil)
(defgeneric route-emacs-inspect (route))
(defmethod route-emacs-inspect (route)
(list (format nil "~A" route)))
(defmethod route-emacs-inspect ((route variable-template))
`((:value ,route ,(format nil "... |
53b7e26db961d1e489be17bd9df6df781da336c40e25a3f2e3e773388b637366 | jherrlin/guitar-theory-training | tones.cljc | (ns se.jherrlin.drills.tones
(:require
[se.jherrlin.music-theory.utils
:refer [fformat]
:as utils]
[clojure.string :as str]))
(defn find-all-locations-of-tone [all-tones fret-table-with-tones-f]
(let [
;; all-tones se.jherrlin.music-theory/tones
;; fret-table-with-tones... | null | https://raw.githubusercontent.com/jherrlin/guitar-theory-training/8b5782384fa24edb4f95bb0f6422afca35493c3a/src/se/jherrlin/drills/tones.cljc | clojure | all-tones se.jherrlin.music-theory/tones
fret-table-with-tones-f se.jherrlin.music-theory/fret-table-with-tones-p | (ns se.jherrlin.drills.tones
(:require
[se.jherrlin.music-theory.utils
:refer [fformat]
:as utils]
[clojure.string :as str]))
(defn find-all-locations-of-tone [all-tones fret-table-with-tones-f]
(let [
]
(->> all-tones
(filter (comp #(not (str/includes? % "#")) name))
v... |
8b9103109b9a75ba30e93aed5054c1e5599469ba464fdcf43854ffacca38f2e4 | tomhanika/conexp-clj | handler_test.clj | ;; Copyright ⓒ the conexp-clj developers; all rights reserved.
;; The use and distribution terms for this software are covered by the
Eclipse Public Lic : ense 1.0 ( -1.0.php )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in a... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/9f53c71913fa39b95516c388d9e426bec34e3a77/src/test/clojure/conexp/api/handler_test.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the... | Eclipse Public Lic : ense 1.0 ( -1.0.php )
(ns conexp.api.handler-test
(:use conexp.main
conexp.layouts.base
conexp.api.handler
conexp.api.util-test)
(:use clojure.test))
(apply use conexp-clj-namespaces)
Generic tests
(deftest test-empty-request
(is (= (mock-request {}) {})))
(d... |
5f5a1229f233a9bf80a1304e7417685bdd55b4ed26144fc47ebf8465ae4264e5 | gedge-platform/gedge-platform | ranch_acceptors_sup.erl | Copyright ( c ) 2011 - 2021 , < >
Copyright ( c ) 2020 - 2021 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ranch/src/ranch_acceptors_sup.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2021 , < >
Copyright ( c ) 2020 - 2021 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch_... |
0c2a6937501b96b9049425f00edda2fd57c709c1a5e94bd26be6b70f1eaa4152 | 8c6794b6/guile-tjit | spec.scm | Continuation - passing style ( CPS ) intermediate language ( IL )
Copyright ( C ) 2015 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
... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/cps/spec.scm | scheme | 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 PARTICULAR PURPOSE. See ... | Continuation - passing style ( CPS ) intermediate language ( IL )
Copyright ( C ) 2015 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 , ... |
cb427cb370b0216d5dda988a08b3321415689a2e0a6f5c2fc8c33425f888f02f | KoenvdBerg/csv-validator | validation_utils.lisp | ;; This file contains the utilities that are used to validate data.
(in-package :csv-validator)
;; data type validations
(defun check-integer-string (x)
"Checks if the incoming string is an integer
returns
----
t if integer, else nil
"
(declare (type string x))
(when (check-not-null x)
(let* ((is... | null | https://raw.githubusercontent.com/KoenvdBerg/csv-validator/a3f56d30ea9241dc4a8943c2073a199cf488bfcc/src/validation_utils.lisp | lisp | This file contains the utilities that are used to validate data.
data type validations
date checks
number checks |
(in-package :csv-validator)
(defun check-integer-string (x)
"Checks if the incoming string is an integer
returns
----
t if integer, else nil
"
(declare (type string x))
(when (check-not-null x)
(let* ((is-negative (string= (subseq x 0 1) "-")))
(if is-negative
(every #'digit-char-p (subs... |
0214c5f7069b71f0d90e518f750dafb3aee22d5152cbef1aa1782b578edbd1e0 | mbenke/zpf2013 | Declare3.hs | # LANGUAGE TemplateHaskell #
import Language.Haskell.TH
import Build3
$(build_ps)
main = mapM_ print
[ p2_1 (1,2)
, p2_2 (1,2)
] | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/TH/Projections/Declare3.hs | haskell | # LANGUAGE TemplateHaskell #
import Language.Haskell.TH
import Build3
$(build_ps)
main = mapM_ print
[ p2_1 (1,2)
, p2_2 (1,2)
] | |
49a6c8d8adc9563e19f56527906c5f7830527abf06f7711a0e4bcbc6e8d1b331 | rroohhh/guix_system | base.scm | (define-module (config base)
#:use-module (vup patches) ; really bad hacks, but who cares
#:use-module (guix utils)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (gnu)
;; #:use-module ((gnu system nss) #:select (%mdns-host-lookup-nss))
#:use-module (gnu packages ssh)
#:use-module... | null | https://raw.githubusercontent.com/rroohhh/guix_system/3ed37fdca8ad782e431b2b7a94caae336d188187/config/base.scm | scheme | really bad hacks, but who cares
#:use-module ((gnu system nss) #:select (%mdns-host-lookup-nss))
for HTTPS access | (define-module (config base)
#:use-module (guix utils)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (gnu)
#:use-module (gnu packages ssh)
#:use-module (gnu packages vim)
#:use-module (gnu packages certs)
#:use-module (gnu packages cpio)
#:use-module (gnu packages linux)
#:us... |
2dcf3f1eb742853e1d666f59253a9102bd8a065170dc7eed8652e9f6bd82f737 | zv/SICP-guile | picture.rkt | #lang sicp
(#%require sicp-pict)
;; -----------------------------------------------------------
Utilities
;; -----------------------------------------------------------
(define (flipped-pairs painter)
(let [(painter2 (beside painter (flip-vert painter)))]
(below painter2 painter2)))
(define (right-split painter... | null | https://raw.githubusercontent.com/zv/SICP-guile/0a33e858c18f9e1c13bde903cfc1aae2e652a436/picture.rkt | racket | -----------------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
/Utilities (End)
----------------------------------------------------------- | #lang sicp
(#%require sicp-pict)
Utilities
(define (flipped-pairs painter)
(let [(painter2 (beside painter (flip-vert painter)))]
(below painter2 painter2)))
(define (right-split painter n)
(if (= n 0) painter
(let [(smaller (right-split painter (- n 1)))]
(beside painter (below smaller smaller)... |
5fbcc4e19bcc371044532b3fd8249e6cbfe98aed47f50075a1f758c7ff75c093 | coq-community/coqffi | witness.ml | open Sexplib
open Coqffi
open Coqffi.Mod
open Coqffi.Entry
open Coqffi.Conflict
let str s = Sexp.Atom s
let list l = Sexp.List l
let ns_to_string = function
| [ base ] -> [ base ]
| base :: rst ->
let seps = [ "."; "__" ] in
List.map (fun sep -> base ^ sep ^ String.concat "." rst) seps
| _ -> asser... | null | https://raw.githubusercontent.com/coq-community/coqffi/25448de56107fe5047661375a2c8c7628ebab07d/bin/witness.ml | ocaml | open Sexplib
open Coqffi
open Coqffi.Mod
open Coqffi.Entry
open Coqffi.Conflict
let str s = Sexp.Atom s
let list l = Sexp.List l
let ns_to_string = function
| [ base ] -> [ base ]
| base :: rst ->
let seps = [ "."; "__" ] in
List.map (fun sep -> base ^ sep ^ String.concat "." rst) seps
| _ -> asser... | |
95d27b6e1d34f39bb97787681668d4f14fbc429102b8a2a928bd56e9bd9e686e | janestreet/ppx_typed_fields | typed_deriver_fields.mli | open Base
open Ppxlib
(* Generate a Typed_fields(_t | of_x) structure item given a specific implementation
module for how to handle the specific conversions like how the names for the
typed_fields constructors are determined and how setter/getter functions work.*)
val gen_str
: (module Type_kind_intf.S with t... | null | https://raw.githubusercontent.com/janestreet/ppx_typed_fields/cf7511db2ccfdbbc0e43601e4d9a0c9d0a36c9e2/src/typed_deriver_fields.mli | ocaml | Generate a Typed_fields(_t | of_x) structure item given a specific implementation
module for how to handle the specific conversions like how the names for the
typed_fields constructors are determined and how setter/getter functions work. | open Base
open Ppxlib
val gen_str
: (module Type_kind_intf.S with type t = 'a)
-> original_type:core_type option
-> original_kind:type_kind
-> loc:location
-> elements_to_convert:('a * Type_kind_intf.granularity) list
-> params:(core_type * (variance * injectivity)) list
-> structure_item list
include ... |
12ddce3517a4a6ca864c006c598bfcad65e5a0b49767e640920b83aaedae3b98 | sybilant/sybilant | ast.clj | (ns sybilant.generators.ast
(:require
[clojure.test.check.generators :as gen]
[sybilant.ast.symbol :as symbol]
[sybilant.kind :as-alias kind]))
(def type-gen
(gen/hash-map
:kind (gen/return ::kind/type)
:name gen/symbol-ns))
(defn string-gen
[min max]
(gen/fmap
(fn string-gen
[code-poin... | null | https://raw.githubusercontent.com/sybilant/sybilant/1338fcc51212f41dd4d3ca0bfc8b1e27d018f897/test/sybilant/generators/ast.clj | clojure | (ns sybilant.generators.ast
(:require
[clojure.test.check.generators :as gen]
[sybilant.ast.symbol :as symbol]
[sybilant.kind :as-alias kind]))
(def type-gen
(gen/hash-map
:kind (gen/return ::kind/type)
:name gen/symbol-ns))
(defn string-gen
[min max]
(gen/fmap
(fn string-gen
[code-poin... | |
9d0a2be30096bd518e22f5aaf3502b60a2d0cfaeb3df652bee193e6b23dd3c08 | dwayne/eopl3 | interpreter.test.rkt | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/LETREC-3.31/interpreter.test.rkt | racket | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | |
e2192ad61cd82cdee84b79a9efe73991b3a4f869c6fd3abb6757e98ed2edc796 | gpwwjr/LISA | node2-not.lisp | This file is part of LISA , the Lisp - based Intelligent Software
;;; Agents platform.
Copyright ( C ) 2000 ( )
;;; 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 versi... | null | https://raw.githubusercontent.com/gpwwjr/LISA/bc7f54b3a9b901d5648d7e9de358e29d3b794c78/src/rete/reference/node2-not.lisp | lisp | Agents platform.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FI... | This file is part of LISA , the Lisp - based Intelligent Software
Copyright ( C ) 2000 ( )
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 59 T... |
33317ccdb89a32efd2fe3464f156db9390d962848571a3ebe9096be22620b49d | jbreindel/battlecraft | bc_manager_sup.erl | %%%-------------------------------------------------------------------
%% @doc bc_manager_sup top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(bc_manager_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1])... | null | https://raw.githubusercontent.com/jbreindel/battlecraft/622131a1ad8c46f19cf9ffd6bf32ba4a74ef4137/apps/bc_game/src/bc_manager_sup.erl | erlang | -------------------------------------------------------------------
@doc bc_manager_sup top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
========================... |
-module(bc_manager_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
{ok, {
#{strategy => one_for_one,
intensity => 1,
period ... |
854754fbae00f7a826c73f7774bd2794a7f5ca7581a8e643520fdb556b9518a9 | neongreen/haskell-ex | Main.hs | import Test.QuickCheck
bin :: Int -> String
bin n =
let
(q, r) = divMod n 2
in
if q == 0
then show r
else bin q ++ show r
dec :: String -> Int
dec b = sum [2^i | (i, '1') <- zip [0..] (reverse b)]
identity :: Int -> Bool
identity n = n == (dec $ bin n)
main :: IO ... | null | https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week3/binary/thalesmg/Main.hs | haskell | import Test.QuickCheck
bin :: Int -> String
bin n =
let
(q, r) = divMod n 2
in
if q == 0
then show r
else bin q ++ show r
dec :: String -> Int
dec b = sum [2^i | (i, '1') <- zip [0..] (reverse b)]
identity :: Int -> Bool
identity n = n == (dec $ bin n)
main :: IO ... | |
97b224804847a2eba23785c48405ddefd895eecfe5e3d90d34c9c10831ae4827 | jamis/rtc-ocaml | RTCTransform.ml | let translation x y z = [| [| 1.; 0.; 0.; x |];
[| 0.; 1.; 0.; y |];
[| 0.; 0.; 1.; z |];
[| 0.; 0.; 0.; 1. |] |]
let scaling x y z = [| [| x; 0.; 0.; 0. |];
[| 0.; y; 0.; 0. |];
[| 0.; 0... | null | https://raw.githubusercontent.com/jamis/rtc-ocaml/f5ba04e874ef0b54d100cdabfe9a67c2b80a643f/src/RTCTransform.ml | ocaml | let translation x y z = [| [| 1.; 0.; 0.; x |];
[| 0.; 1.; 0.; y |];
[| 0.; 0.; 1.; z |];
[| 0.; 0.; 0.; 1. |] |]
let scaling x y z = [| [| x; 0.; 0.; 0. |];
[| 0.; y; 0.; 0. |];
[| 0.; 0... | |
29ce9e9d7a0594ecf99769da8cc601c3532e0b4dcdb4820dc2d36372b22901e5 | jwiegley/notes | archive.hs | fileChecksum :: FilePath -> IO BS.ByteString
fileChecksum fp = run $ ("openssl", ["sha1", "-binary", fp])
hexString :: BS.ByteString -> String
hexString = concat . map (printf "%02x") . BS.unpack
recordChecksum :: FilePath -> IO ()
recordChecksum fp = do
csum <- fileChecksum fp
shell "xattr" ["-w", "checksum-sha... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/91560/archive.hs | haskell | fileChecksum :: FilePath -> IO BS.ByteString
fileChecksum fp = run $ ("openssl", ["sha1", "-binary", fp])
hexString :: BS.ByteString -> String
hexString = concat . map (printf "%02x") . BS.unpack
recordChecksum :: FilePath -> IO ()
recordChecksum fp = do
csum <- fileChecksum fp
shell "xattr" ["-w", "checksum-sha... | |
123224e864b55a605cf67d051ffef40297291a0dcbeca17b5b05fbfd103a2f06 | thattommyhall/offline-4clojure | p98.clj | ;; Equivalence Classes - Medium
A function f defined on a domain D induces an < a href=" / wiki / Equivalence_relation">equivalence relation</a > on D , as follows : a is equivalent to b with respect to f if and only if ( f a ) is equal to ( f b ) . Write a function with arguments f and D that computes the < a href... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p98.clj | clojure | Equivalence Classes - Medium
tags -
restricted -
your solution here | A function f defined on a domain D induces an < a href=" / wiki / Equivalence_relation">equivalence relation</a > on D , as follows : a is equivalent to b with respect to f if and only if ( f a ) is equal to ( f b ) . Write a function with arguments f and D that computes the < a href=" / wiki / Equivalence_class">e... |
02b5c896e343dc4857ebe5317eef3bccbcda1b120de5d51bf54797a06dfadad8 | melange-re/melange | test_functor_dead_code.ml | include (struct
module M = Map.Make(String)
let v = M.is_empty M.empty
end : sig val v : bool end)
| null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_functor_dead_code.ml | ocaml | include (struct
module M = Map.Make(String)
let v = M.is_empty M.empty
end : sig val v : bool end)
| |
a8a7d10108b0e0d8cfe4dfe44a0e756140bdcd9aeaf2853513a8cf9eb9c39f83 | jlollis/sicp-solutions | 3A.scm | Lecture : 2B
Lecturer :
# SLIDE 0:01:25
(define (+vect v1 v2)
(make-vector
(+ (xcor v1) (xcor v2))
(+ (ycor v1) (ycor v2))))
;# END SLIDE
# SLIDE 0:02:05
(define (scale s v)
(make-vector (* s (xcor v))
(* s (ycor v))))
;# END SLIDE
;# SLIDE 0:02:50
Representing Vectors
(define make-vector con... | null | https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Supplemental%20Materials/mit-lectures/3A.scm | scheme | # END SLIDE
# END SLIDE
# SLIDE 0:02:50
# END SLIDE
# END SLIDE
# BOARD 0:12:10
# END BOARD
# TERMINAL 0:13:00
# END TERMINAL
# TERMINAL 0:14:30
# END TERMINAL
# END SLIDE
# END SLIDE
# END SLIDE
# BOARD 0:21:15
# END BOARD
# SLIDE 0:23:45
# END SLIDE
# END BOARD
# SLIDE 0:42:45
# END SLIDE
# END SLIDE
# END BOARD
... | Lecture : 2B
Lecturer :
# SLIDE 0:01:25
(define (+vect v1 v2)
(make-vector
(+ (xcor v1) (xcor v2))
(+ (ycor v1) (ycor v2))))
# SLIDE 0:02:05
(define (scale s v)
(make-vector (* s (xcor v))
(* s (ycor v))))
Representing Vectors
(define make-vector cons)
(define xcor car)
(define ycor cdr)
#... |
9fba8e5a4789d860d7512c35cb5b9bb8afb0e4d137920621ec9a44b26450604c | rackerlabs/gen_batch | batch_crash.erl | -module(batch_crash).
-behaviour(gen_batch).
-export([init/1, process_item/3, worker_died/5, job_stopping/1, job_complete/2]).
init([]) ->
{ok, 1, [one], []}.
process_item(one, _StartTime, []) ->
erlang:error(fubar).
worker_died(_, _WorkerPid, _StartTime, _Info, []) ->
erlang:error(fubar).
job_stopping... | null | https://raw.githubusercontent.com/rackerlabs/gen_batch/cbd50ad86985d042cc33ae9c99491f37bdd23e89/test/batch_crash.erl | erlang | -module(batch_crash).
-behaviour(gen_batch).
-export([init/1, process_item/3, worker_died/5, job_stopping/1, job_complete/2]).
init([]) ->
{ok, 1, [one], []}.
process_item(one, _StartTime, []) ->
erlang:error(fubar).
worker_died(_, _WorkerPid, _StartTime, _Info, []) ->
erlang:error(fubar).
job_stopping... | |
0cf92246022857c497038145081537b22ae5ec36f87e291dd4fee9d1fd63d467 | wavewave/hoodle | Commit.hs | module Hoodle.Coroutine.Commit where
import Control.Lens (set, view, (.~))
import Control.Monad.State (get, liftIO, put)
import Hoodle.Accessor (pureUpdateUhdl, updateUhdl)
import Hoodle.Coroutine.Draw (callRenderer_, invalidateAll)
import Hoodle.GUI.Reflect (reflectUIToggle)
import Hoodle.ModelAction.Page (updatePage... | null | https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/Coroutine/Commit.hs | haskell | | save state and add the current status in undo history
|
|
|
| | module Hoodle.Coroutine.Commit where
import Control.Lens (set, view, (.~))
import Control.Monad.State (get, liftIO, put)
import Hoodle.Accessor (pureUpdateUhdl, updateUhdl)
import Hoodle.Coroutine.Draw (callRenderer_, invalidateAll)
import Hoodle.GUI.Reflect (reflectUIToggle)
import Hoodle.ModelAction.Page (updatePage... |
a209a749d2f123523db6e5e0fee8428fb2e59df60df161fd1e88490aafa0a10a | well-typed/visualize-cbn | HTML.hs | {-# LANGUAGE OverloadedStrings #-}
module CBN.Util.Doc.Rendered.HTML () where
import Control.Monad (replicateM_)
import Data.Char (isSpace)
import Data.Default
import Data.Function (on)
import Data.List (intersperse, groupBy)
import Data.Monoid
import Text.Blaze.Html5 (Html, toHtml, (!))
import Text.Blaze (ToMarkup(..... | null | https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/src/CBN/Util/Doc/Rendered/HTML.hs | haskell | # LANGUAGE OverloadedStrings #
Make all spaces non-breaking so that layout works as expected | module CBN.Util.Doc.Rendered.HTML () where
import Control.Monad (replicateM_)
import Data.Char (isSpace)
import Data.Default
import Data.Function (on)
import Data.List (intersperse, groupBy)
import Data.Monoid
import Text.Blaze.Html5 (Html, toHtml, (!))
import Text.Blaze (ToMarkup(..))
import qualified Text.Blaze.Html... |
13de51f2fe62ab7dc04c904e1a9f661aa37d795b64a1c62989706ebadf98178f | ghcjs/jsaddle-dom | TextMetrics.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.TextMetrics
(getWidth, TextMetrics(..), gTypeTextMetrics) where
import Prelude ((.), (==), (>>=), return, IO, Int, ... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/TextMetrics.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.TextMetrics
(getWidth, TextMetrics(..), gTypeTextMetrics) where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, ... |
7e1ec946464f94749edc14c0be3609639707b6620b1ea0f4efa14c3ad1ea8da8 | sof/feed | Syntax.hs | --------------------------------------------------------------------
-- |
-- Module : Text.RSS1.Syntax
Copyright : ( c ) Galois , Inc. 2008 ,
( c ) Sigbjorn Finne 2009-
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <>
-- Stability : provisional
-- Portability: portable
--
---------------------... | null | https://raw.githubusercontent.com/sof/feed/74891cf9d7c9a69e38a8f84dc34fefdb174a9da5/Text/RSS1/Syntax.hs | haskell | ------------------------------------------------------------------
|
Module : Text.RSS1.Syntax
License : BSD3
Maintainer: Sigbjorn Finne <>
Stability : provisional
Portability: portable
------------------------------------------------------------------
format is yyyy-mm-ddThh:mm
the image resource, most ... | Copyright : ( c ) Galois , Inc. 2008 ,
( c ) Sigbjorn Finne 2009-
module Text.RSS1.Syntax where
import Text.XML.Light.Types as XML
import Text.DublinCore.Types
type URIString = String
type TitleString = String
type TimeString = String
type TextString = String
data Feed
= Feed { feedVersion ::... |
7249216d752217b816a6fceec80e1d5604443e7e83b09691c85de28af3875122 | ijp/guildhall | pack.scm | -*- mode : scheme ; coding : utf-8 -*-
Copyright © 2008 , 2009 , 2010 , 2011 < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your opti... | null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/guildhall/weinholt/struct/pack.scm | scheme | coding : utf-8 -*-
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the... | Copyright © 2008 , 2009 , 2010 , 2011 < >
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
#!r6rs
Syntax for packing and unpacking C structs using bytev... |
781db7a4be29c917efc8dc0ad4df22f4accd8ab5d2cb7e491dd2be4c422aac78 | digikar99/polymorphic-functions | compiler-macro.lisp | (in-package :polymorphic-functions)
(defvar *disable-static-dispatch* nil
"If value at the time of compilation of the call-site is non-NIL,
the polymorphic-function being called at the call-site is dispatched dynamically.")
TODO : Allow user to specify custom - speed etc
(defun pf-compiler-macro-function (form ... | null | https://raw.githubusercontent.com/digikar99/polymorphic-functions/b3b1f335f8b0aa2eac0645a73a00a4f5717f1ed4/src/compiler-macro.lisp | lisp | Expanding things here results in O(n) calls to this function
rather than O(n^2); although the actual effects of this are
insignificant for day-to-day compilations
We already have the expanded forms
FORM-TYPE-FAILURE: We not only want to inform the user that there
was a failure, but also inform them what the failu... | (in-package :polymorphic-functions)
(defvar *disable-static-dispatch* nil
"If value at the time of compilation of the call-site is non-NIL,
the polymorphic-function being called at the call-site is dispatched dynamically.")
TODO : Allow user to specify custom - speed etc
(defun pf-compiler-macro-function (form ... |
6dc71010358ee7fa6eb055835bbb09ea3ddd2dc8023589c3946a18d2ee2261f5 | 0install/0repo-queue | log.ml | Copyright ( C ) 2014 , the README file for details .
* See the README file for details. *)
let write = ref (fun x -> print_endline x; Lwt.return ())
let info fmt = Printf.ksprintf !write ("info: " ^^ fmt)
let warn fmt = Printf.ksprintf !write ("WARN: " ^^ fmt)
| null | https://raw.githubusercontent.com/0install/0repo-queue/2c7812793d1ade403223a82e679ac4349a16f6ad/log.ml | ocaml | Copyright ( C ) 2014 , the README file for details .
* See the README file for details. *)
let write = ref (fun x -> print_endline x; Lwt.return ())
let info fmt = Printf.ksprintf !write ("info: " ^^ fmt)
let warn fmt = Printf.ksprintf !write ("WARN: " ^^ fmt)
| |
db78d877636a7f3b88cf61c0bedd4a8f8ba5639412c2705c885cea5bbb2bac57 | kadena-io/pact | ApiReq.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
-- |
-- Module : Pact.ApiReq
Copyright : ( C ) 2016
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
--
module Pact.ApiReq
... | null | https://raw.githubusercontent.com/kadena-io/pact/0f22b41543a9397391477fb26d1d62798aa23803/src-ghc/Pact/ApiReq.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Pact.ApiReq
License : BSD-style (see the file LICENSE)
| For fully-signed commands
| For unsigned commands
| `returnSigDataOrCommand` will either:
- validate all signatures if all signatures are provided, and output the resulting `Command`
and serialize ... | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
Copyright : ( C ) 2016
Maintainer : < >
module Pact.ApiReq
(
ApiKeyPair(..)
,ApiSigner(..)
,ApiPublicMeta(..)
,ApiReq(..)
,apiReq
,uapiReq
,mkApiReq
... |
599beced1a591895e19adb6a0d4da8755e51d303b5fced30b7dec73f09de5fe6 | opennars/Narjure | concept.clj | (ns narjure.memory-management.concept
(:require
[co.paralleluniverse.pulsar
[core :refer :all]
[actors :refer :all]]
[taoensso.timbre :refer [debug info]]
[clojure.core.unify :refer [unifier]]
[nal.term_utils :refer [not-statement-and-conceptid-equal
statement-and... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/narjure/memory_management/concept.clj | clojure | check observable and set if necessary
(println "obs1")
task concept here
todo get a belief which has highest confidence when projected to task time
dummy? belief as "empty" termlink belief selection for structural inference
(println (syntactic-complexity (:id @state)))
task concept here | (ns narjure.memory-management.concept
(:require
[co.paralleluniverse.pulsar
[core :refer :all]
[actors :refer :all]]
[taoensso.timbre :refer [debug info]]
[clojure.core.unify :refer [unifier]]
[nal.term_utils :refer [not-statement-and-conceptid-equal
statement-and... |
fdfb44b1e3d4f4b68dc3c977624c05fee2644c25d0360f02deb0129b1604a891 | objecthub/swift-lispkit | Environments.scm | ;;; Environments.scm
;;; Regression test data
;;;
Author :
Copyright © 2021 ObjectHub . 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
;;;
;;; -... | null | https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Tests/LispKitTests/Code/Environments.scm | scheme | Environments.scm
Regression test data
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 Lice... | Author :
Copyright © 2021 ObjectHub . All rights reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(
"Basic environments"
(#t #f #t #f #t "a" "b" (a b) ((a "a")(b "b")))
(define (esort xs)
(sort (lambda (x y) (string<? (symbol->string (car x)) (symbol->string (car y)))) ... |
d15511f7a0280ac6830991ccb096ebb92360eb4234f3f88ac2dc6ee93f5aa769 | atgreen/red-light-green-light | package.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - USER ; -*-
(defpackage :cl-postgres
(:use :common-lisp)
(:export #:database-error
#:database-connection-lost
#:database-error-message
#:database-error-code
#:database-error-detail
#... | null | https://raw.githubusercontent.com/atgreen/red-light-green-light/f067507721bbab4aa973866db5276c83df3e8784/local-projects/postmodern-20220220-git/cl-postgres/package.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - USER ; -*-
Optimization settings (only used by functions that need it).
RLGL-LOCAL |
(defpackage :cl-postgres
(:use :common-lisp)
(:export #:database-error
#:database-connection-lost
#:database-error-message
#:database-error-code
#:database-error-detail
#:database-error-query
#:database-error-cause
#:database-error-constr... |
278bf312f58655bb0e9a0f6976149d83ce5b70a415b229d72c66f44f46994801 | haskell-distributed/distributed-process-platform | BlockingQueue.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE DeriveGeneric #
-----------------------------------------------------------------------------
-- |
Module : Control .... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process-platform/46d63f81910e7dd527fb1d41e654a5cfb0dbfdba/src/Control/Distributed/Process/Platform/Task/Queue/BlockingQueue.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
---------------------------------------------------------------------------
|
License : BSD3 (see the file LICENSE)
Stability : experimental
Portability : non-portable (requires concurrency... | # LANGUAGE ExistentialQuantification #
# LANGUAGE DeriveGeneric #
Module : Control . Distributed . Process . Platform . Task . Queue . BlockingQueue
Copyright : ( c ) 2012 - 2013
Maintainer : < >
of concurrent tasks that are allowed to execute - if the limit is 3 , then
the... |
046df0da89e89646c8074ad23829341435d69e2dd20ca263c976382b18aaadc2 | xavierleroy/ocamlmpi | test.ml | (***********************************************************************)
(* *)
(* The Caml/MPI interface *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/xavierleroy/ocamlmpi/29eae81935a39dd866edf088f1d61e780b3156c8/test.ml | ocaml | *********************************************************************
The Caml/MPI interface
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ Id$
open Printf
open Mpi
let si... |
3797840a256c7dcab9333a2e73755974fb951aaabba3b6b4046bab43826812a8 | GNOME/gimp-tiny-fu | perspective-shadow.scm | ; GIMP - The GNU Image Manipulation Program
Copyright ( C ) 1995 and
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
; (at your option) any later ve... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/perspective-shadow.scm | scheme | GIMP - The GNU Image Manipulation Program
This program is free software: you can redistribute it and/or modify
either version 3 of the License , or
(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
... | Copyright ( C ) 1995 and
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
perspective-shadow.scm version 1.2 2000/11/08
Copyright ( C ) 1997 - 2000 < >
(define (script-fu-perspective-shadow image
... |
60c85543100e868cfd7790f5a5e622efd70644a536a6255c0a34081b5962c5da | slindley/effect-handlers | FreeHandlers.hs | {- Handlers using a free monad -}
# LANGUAGE TypeFamilies ,
MultiParamTypeClasses ,
GADTs ,
TypeOperators ,
RankNTypes ,
FunctionalDependencies ,
PolyKinds
#
MultiParamTypeClasses,
GADTs,
TypeOperators,
RankNTypes,
FunctionalDependencies,
PolyKinds
#-}
... | null | https://raw.githubusercontent.com/slindley/effect-handlers/39d0d09582d198dd6210177a0896db55d92529f4/FreeHandlers.hs | haskell | Handlers using a free monad |
# LANGUAGE TypeFamilies ,
MultiParamTypeClasses ,
GADTs ,
TypeOperators ,
RankNTypes ,
FunctionalDependencies ,
PolyKinds
#
MultiParamTypeClasses,
GADTs,
TypeOperators,
RankNTypes,
FunctionalDependencies,
PolyKinds
#-}
module FreeHandlers where
type f... |
fe7a89aa654da464196c660fdc76f80241031f810ede86569358e4e39f17d4cb | deps-app/versions | project_test.clj | (ns jarkeeper.views.project-test
(:require [clojure.test :refer :all])
(:require [jarkeeper.views.project :as project :refer [index]]))
(deftest index-test
(is (= "[](/)" (project/md-image "Hi" "/img.png" "/"))))
| null | https://raw.githubusercontent.com/deps-app/versions/5e58ac456cb3ec90c5d87dbfdde8f9414f8b1f3b/test/jarkeeper/views/project_test.clj | clojure | (ns jarkeeper.views.project-test
(:require [clojure.test :refer :all])
(:require [jarkeeper.views.project :as project :refer [index]]))
(deftest index-test
(is (= "[](/)" (project/md-image "Hi" "/img.png" "/"))))
| |
bed402d54b03096baaf6b14188a91b6af418d20d1575ebe5f5deac4edd87298e | ddmcdonald/sparser | loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 2021 -- all rights reserved
;;;
;;; File: "loader"
;;; Module: "analyzers;psp:word-spotting:"
Version : August 2021
;; Initiated 5/18/21
;; Spotting motif-triggers also involves motif-key-words in
;; dossiers and a file of... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/c35f160e94b12d5c7ed95e61dba5e937fbe77eea/Sparser/code/s/analyzers/psp/word-spotting/loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "loader"
Module: "analyzers;psp:word-spotting:"
Initiated 5/18/21
Spotting motif-triggers also involves motif-key-words in
dossiers and a file of categories in model/sl/motifs/basic-categories | copyright ( c ) 2021 -- all rights reserved
Version : August 2021
(in-package :sparser)
(lload "spot;driver")
(lload "spot;object")
(lload "spot;actions")
(lload "spot;analysis")
(lload "spot;context")
( " spot;tests " )
|
e565de53374639d224d2d6f8961e979167e9ef4aa35a1075eae58f868c511a4e | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | DeleteTerminalLocationsLocation.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the different functions to run the operation deleteTerminalLocationsLocation
mo... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/DeleteTerminalLocationsLocation.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the different functions to run the operation deleteTerminalLocationsLocation
| > DELETE /v1/terminal/locations/{location}
\<p>Deletes a \<code>Location\<\/code> object.\<\/p>
| Monadic computation which returns the result... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Operations.DeleteTerminalLocationsLocation where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualif... |
b24fae652cf97b260e43463384b8ed1ad1382b35d77c5973003cbf9e57f94635 | dwysocki/hidden-markov-music | core.clj | (ns hidden-markov-music.demo.core
(:require [hidden-markov-music.demo.random-sampling
:as random-sampling]
[hidden-markov-music.demo.repeated-baum-welch
:as repeated-baum-welch]
[hidden-markov-music.util :as util]
[clojure.tools.cli :refer [parse-opts]]
... | null | https://raw.githubusercontent.com/dwysocki/hidden-markov-music/5601e17dd582d0a73be16fe98fec099296303c95/src/hidden_markov_music/demo/core.clj | clojure | (ns hidden-markov-music.demo.core
(:require [hidden-markov-music.demo.random-sampling
:as random-sampling]
[hidden-markov-music.demo.repeated-baum-welch
:as repeated-baum-welch]
[hidden-markov-music.util :as util]
[clojure.tools.cli :refer [parse-opts]]
... | |
d891b4e320e7db88a57899c98b1cb9292dc61451c83e2c62901f95163962a703 | mzp/coq-ide-for-ios | edit.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/lib/edit.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
The type of editors.
* An editor i... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : edit.mli 13323 2010... |
2f594adfb811a9a5e5193bfd04ab6a7b66e5cdd1550672906b7f1666b7c0b317 | mhkoji/Senn | unix.lisp | (defpackage :senn-ipc.server.unix
(:use :cl)
(:export :handle-request
:start-server))
(in-package :senn-ipc.server.unix)
(defstruct client socket)
(defmethod senn-ipc.server:client-read-line ((client client))
(let ((stream (senn-ipc.unix:socket-stream (client-socket client))))
(let ((line (read-l... | null | https://raw.githubusercontent.com/mhkoji/Senn/77201e07b3a46973d910f89676f4dbdfa3c69331/senn-ipc/src/server/unix.lisp | lisp | (defpackage :senn-ipc.server.unix
(:use :cl)
(:export :handle-request
:start-server))
(in-package :senn-ipc.server.unix)
(defstruct client socket)
(defmethod senn-ipc.server:client-read-line ((client client))
(let ((stream (senn-ipc.unix:socket-stream (client-socket client))))
(let ((line (read-l... | |
d8a45051ea8555522a6b05d3bd8ccd2e62411889378811d24da8a86bcca71f16 | spechub/Hets | AS_BASIC_QBF.der.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./QBF / AS_BASIC_QBF.der.hs
Description : Abstract syntax for propositional logic extended with QBFs
Copyright : ( c ) , DFKI GmbH 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : experimental
... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/QBF/AS_BASIC_QBF.der.hs | haskell | # LANGUAGE DeriveDataTypeable #
Items of a Basic Spec
Basic Spec
List of symbols
Symbols
Symbol map
Symbol or symbol map
Predicates
DrIFT command
| predicates = propositions
pos: dots
pos: "False
pos: "True"
pos: Propositional Identifiers
pos: not
pos: "/\"s
pos: "\/"s
pos: "=>"
pos: "<=>"
ranges are... | |
Module : ./QBF / AS_BASIC_QBF.der.hs
Description : Abstract syntax for propositional logic extended with QBFs
Copyright : ( c ) , DFKI GmbH 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : experimental
Portability : portable
Definit... |
024902d61a6af4e1ef5fe5cb531bf48842b5ca9e395ca12ca3afe7fc013494f7 | xcoo/proton | core.cljc | (ns proton.core
"More commonly used utilities"
(:require [clojure.string :as string]))
;;; convert
(defn- sanitize-number-string
[s]
(-> s
(string/replace #"," "")))
(defn as-long
"Returns a new long number initialized to the value represented by s.
as-int returns nil if s is an illegal string or n... | null | https://raw.githubusercontent.com/xcoo/proton/8ecc323aac0dd484995c3f584c23f8a7843369f7/src/cljc/proton/core.cljc | clojure | convert
type check
random string
error handling
bytes
math
merge | (ns proton.core
"More commonly used utilities"
(:require [clojure.string :as string]))
(defn- sanitize-number-string
[s]
(-> s
(string/replace #"," "")))
(defn as-long
"Returns a new long number initialized to the value represented by s.
as-int returns nil if s is an illegal string or nil."
[s]
... |
53a374b08fb81256e54eba285baa73fdc2910a91864ecf2dd3437db0b71c51dc | niquola/c3 | c3_test.clj | (ns c3-test
(:require [c3 :as sut]
[clojure.test :refer :all]
[clojure.string :as str]
[clojure.java.io :as io]))
(defn mock-http [ctx {url :url :as req}]
(println "HTTP:" (or (:method req) :get) (:url req))
(cond
(str/ends-with? url "c3.yaml")
{:body (clj-yaml.core/ge... | null | https://raw.githubusercontent.com/niquola/c3/05682d8aa04e2acdb1511a8d47c69a6bec753f69/test/c3_test.clj | clojure | (ns c3-test
(:require [c3 :as sut]
[clojure.test :refer :all]
[clojure.string :as str]
[clojure.java.io :as io]))
(defn mock-http [ctx {url :url :as req}]
(println "HTTP:" (or (:method req) :get) (:url req))
(cond
(str/ends-with? url "c3.yaml")
{:body (clj-yaml.core/ge... | |
d181ac622a6875a656ce6c0ade689fecc99db34cfefe2e157f8bbf9e90a35a43 | AntidoteDB/antidote | logging_vnode.erl | %% -------------------------------------------------------------------
%%
Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
%% >
%%
This file is provided... | null | https://raw.githubusercontent.com/AntidoteDB/antidote/32a89d42be644d3ba616ebf705fce4fa43e781ab/apps/antidote/src/logging_vnode.erl | erlang | -------------------------------------------------------------------
>
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expressed or implied. See the License for the
specific language governing perm... | Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
This file is provided to you under the Apache License ,
except in compliance with the License . You... |
cf8284c345e3fd7be410cfa3a56fb354f8589cf8cf52857ac742b77e86c15af6 | Alex-Zhuk/esmpp_lib | my_sms.erl | -module(my_sms).
-behaviour(esmpp_lib_worker).
-include("esmpp_lib.hrl").
-define(SERVER, ?MODULE).
%% ------------------------------------------------------------------
%% Callback Function Exports
%% ------------------------------------------------------------------
-export([submit_sm_resp_handler/2, deliver_sm... | null | https://raw.githubusercontent.com/Alex-Zhuk/esmpp_lib/2a66688eb277d2d0ff39b322a38837570b75224e/src/my_sms.erl | erlang | ------------------------------------------------------------------
Callback Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
Behaviour Function Definitions
--------------------------------------------------------... | -module(my_sms).
-behaviour(esmpp_lib_worker).
-include("esmpp_lib.hrl").
-define(SERVER, ?MODULE).
-export([submit_sm_resp_handler/2, deliver_sm_handler/2, data_sm_handler/2,
data_sm_resp_handler/2, query_sm_resp_handler/2, unbind_handler/1,
outbind_handler/2, submit_error/2, network_err... |
d0f6f33f2caf482f42bf5388522c637ccb2650d491200decb3d41e77fa392370 | jrheard/voke | entity.cljs | (ns voke.entity
(:require [cljs.spec :as s]
[voke.specs]))
;; Private functions
(defonce next-entity-id (atom 0))
(defn get-next-entity-id []
(let [id-to-return @next-entity-id]
(swap! next-entity-id inc)
id-to-return))
(s/fdef get-next-entity-id
:ret :entity/id)
(defn make-entity
[enti... | null | https://raw.githubusercontent.com/jrheard/voke/15b272955d214ce0c531fb2b8d645feb217255c2/src/voke/entity.cljs | clojure | Private functions
Public
:weapon nil
xxx ai component not spec'd / standardized yet, these are just some example values | (ns voke.entity
(:require [cljs.spec :as s]
[voke.specs]))
(defonce next-entity-id (atom 0))
(defn get-next-entity-id []
(let [id-to-return @next-entity-id]
(swap! next-entity-id inc)
id-to-return))
(s/fdef get-next-entity-id
:ret :entity/id)
(defn make-entity
[entity-map]
(assoc enti... |
77206db8b63b28b978b267afd1ff798ff21422ff5a1c00d6bd761f8a8bd70db8 | amnh/poy5 | xslt.ml | external process : string -> string -> string -> unit = "caml_XSLT_process"
| null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/xslt.ml | ocaml | external process : string -> string -> string -> unit = "caml_XSLT_process"
| |
223e03f03784ff3ff18810e9d2df793a6a9ab024e3a6d414594b5f5ec561f409 | spawnfest/eep49ers | proc_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2019 . 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 applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/src/proc_lib.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 lan... | Copyright Ericsson AB 1996 - 2019 . 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(proc_lib).
Then a process terminates the is checked and
a crash report is generated if the was not exp... |
406524b706af97735d139456ef5c10ca71eebf98e4728e48ceb74074b9f04529 | hakaru-dev/hakaru | Function.hs | {-# LANGUAGE DataKinds, NoImplicitPrelude #-}
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
module Tests.Function (allTests) where
import Prelude ((.), id, ($), asTypeOf)
import Language.Hakaru.Syntax.Prelude
import Language.Hakaru.Types.DataKind
import Language.Hakaru.Syntax.AST (Term)
import Language.Hakaru.Syntax.ABT (ABT... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Tests/Function.hs | haskell | # LANGUAGE DataKinds, NoImplicitPrelude #
# OPTIONS_GHC -Wall -fwarn-tabs # | module Tests.Function (allTests) where
import Prelude ((.), id, ($), asTypeOf)
import Language.Hakaru.Syntax.Prelude
import Language.Hakaru.Types.DataKind
import Language.Hakaru.Syntax.AST (Term)
import Language.Hakaru.Syntax.ABT (ABT)
import Language.Hakaru.Expect (expect)
import Test.HUnit
import Tests.TestToo... |
86dd357daf87429923ab1436d12ecc9f5484414de6f613a0e62f8bd7dcf3e66f | openmusic-project/openmusic | midi.lisp | ( c ) copyright 2003 by , ,
and
;;;
( c ) copyright 2003 by ( )
;;;
( c ) copyright 2007 by , ,
and contributors
;;;
;;; This library is free software; you can redistribute it and/or
modify it under the terms of version 2 of the GNU Lesser Ge... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/MIDI/CL-MIDI/midi-20070618/midi.lisp | lisp |
This library is free software; you can redistribute it and/or
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 GNU
Lesser General Public License for more details.
Licens... | ( c ) copyright 2003 by , ,
and
( c ) copyright 2003 by ( )
( c ) copyright 2007 by , ,
and contributors
modify it under the terms of version 2 of the GNU Lesser General
Public License as published by the Free Software Foundation .
You sh... |
76c861f52d14ebf362eb4a83da2aeece76c3c496ab0b9c721371a803b8d1bcf5 | racket/racket7 | file-lock.rkt | #lang racket/base
(require "../common/check.rkt"
"../host/thread.rkt"
"../host/rktio.rkt"
"../host/error.rkt"
"port.rkt"
"input-port.rkt"
"output-port.rkt"
"file-stream.rkt"
"check.rkt")
(provide port-try-file-lock?
port-file-unlock)
(de... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/port/file-lock.rkt | racket | #lang racket/base
(require "../common/check.rkt"
"../host/thread.rkt"
"../host/rktio.rkt"
"../host/error.rkt"
"port.rkt"
"input-port.rkt"
"output-port.rkt"
"file-stream.rkt"
"check.rkt")
(provide port-try-file-lock?
port-file-unlock)
(de... | |
0c80da0b21e65b3a3a6f996ba844d392c3402419bd7ed90081596e0fa9bfab51 | mariari/vomitchan | Modifier.hs | module Modifier where
import qualified Data.Vector as V
import Bot.Modifier
TODO ∷ add HUnit tests
emptyTest =
applyEffects
(Unit Scope {block = [], individual = []}
(Text "Hello My Name is Bob"))
testNoOveride =
applyEffects
(Unit (Scope
{ block = [Set Italics, Set (Color White)]
... | null | https://raw.githubusercontent.com/mariari/vomitchan/ad29a4aeae965e40a87cd3c7a851892f43d398f4/test/Modifier.hs | haskell | module Modifier where
import qualified Data.Vector as V
import Bot.Modifier
TODO ∷ add HUnit tests
emptyTest =
applyEffects
(Unit Scope {block = [], individual = []}
(Text "Hello My Name is Bob"))
testNoOveride =
applyEffects
(Unit (Scope
{ block = [Set Italics, Set (Color White)]
... | |
dfb6dae8fe08078b49011dad09206274c8211d05550c1170849bae14c0a19e26 | olleharstedt/subsetphp | sharedMem.ml | *
* Copyright ( c ) 2014 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... | null | https://raw.githubusercontent.com/olleharstedt/subsetphp/37f7967594bdda38531f4fbde6ffc5ae33a307a3/sharedMem.ml | ocaml | ***************************************************************************
Initializes the shared memory. Must be called before forking.
***************************************************************************
***************************************************************************
****************************... | *
* Copyright ( c ) 2014 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... |
7ba2350a1d80a753b59c9336c31d510cd0960290e02d3f374ed0098d84b8a269 | MastodonC/kixi.large | large.clj | (ns kixi.large
(:require [kixi.large.legacy :as ll]
[tablecloth.api :as tc])
(:import org.apache.poi.ss.usermodel.Workbook
(org.apache.poi.xssf.usermodel XSSFWorkbook)
(org.apache.poi.ss.usermodel Workbook Sheet Cell Row CellType
Row$MissingC... | null | https://raw.githubusercontent.com/MastodonC/kixi.large/c593467394c7007b565fbd395afe00920c6d334d/src/kixi/large.clj | clojure |
pict.resize();
doesn't properly size pic
doesn' properly size pic
needed or picture doesn't show up | (ns kixi.large
(:require [kixi.large.legacy :as ll]
[tablecloth.api :as tc])
(:import org.apache.poi.ss.usermodel.Workbook
(org.apache.poi.xssf.usermodel XSSFWorkbook)
(org.apache.poi.ss.usermodel Workbook Sheet Cell Row CellType
Row$MissingC... |
6f4f6a4cbd95d06bf62e4a539320efa7410313e20c1cc610df3dd7d7c213f43b | Rydgel/flappy-haskell | Game.hs | {-# LANGUAGE Arrows #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Game where
import FRP.Yampa
import Prelude hiding (init)
import Input
import Types
birdX :: Double
birdX = 75.0
winHeight :: Double
winHeight = 600.0
winW... | null | https://raw.githubusercontent.com/Rydgel/flappy-haskell/4790c34978e47b048af1550f6d3af8604d9c8a89/src/Game.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE OverloadedStrings #
^ velocity
^ position
^ to handle bird sprite animation state
^ this will make the bird fly more "naturally"
upper sky limit | # LANGUAGE RecordWildCards #
module Game where
import FRP.Yampa
import Prelude hiding (init)
import Input
import Types
birdX :: Double
birdX = 75.0
winHeight :: Double
winHeight = 600.0
winWidth :: Double
winWidth = 276.0
groundHeight :: Double
groundHeight =... |
ba6aab21080c4498ac5fce0d4369e54df2175272eeddf87bba6d80d416dea3a3 | ucsd-progsys/liquidhaskell | InlineSubExp0.hs | {-@ LIQUID "--expect-error-containing=== f B C" @-}
-- -progsys/liquidhaskell/issues/1258
{-@ LIQUID "--reflection" @-}
{-@ LIQUID "--short-names" @-}
module InlineSubExp0 where
import Language.Haskell.Liquid.ProofCombinators
data Foo = A | B
data Bar = C | D
data Baz = E | F
{-@ reflect f @-}
f :: Foo -> Bar ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/InlineSubExp0.hs | haskell | @ LIQUID "--expect-error-containing=== f B C" @
-progsys/liquidhaskell/issues/1258
@ LIQUID "--reflection" @
@ LIQUID "--short-names" @
@ reflect f @
@ prop :: {f B C == F} @ |
module InlineSubExp0 where
import Language.Haskell.Liquid.ProofCombinators
data Foo = A | B
data Bar = C | D
data Baz = E | F
f :: Foo -> Bar -> Baz
f B C = F
f _ _ = E
prop = f B C === E *** QED
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.