_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 |
|---|---|---|---|---|---|---|---|---|
28564d264b15135343b861ae815c781e9d8521cb9173b8b619a0ef1ef6325924 | gafiatulin/codewars | ExclMark3.hs | Exclamation marks series # 4 : Remove all exclamation marks from sentence but ensure a exclamation mark at the end of string
--
module Kata where
remove :: String -> String
remove = (++ "!") . filter (/= '!')
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/8%20kyu/ExclMark3.hs | haskell | Exclamation marks series # 4 : Remove all exclamation marks from sentence but ensure a exclamation mark at the end of string
module Kata where
remove :: String -> String
remove = (++ "!") . filter (/= '!')
| |
571974b0d9c5c9d5fb023c087f0c7a01355c5369a88516f4d6e8bb8ce4f8c2bb | jeroanan/rkt-coreutils | fileaccessstr.rkt | #lang typed/racket/base
Copyright 2020
; See COPYING for details
(provide get-mode-str)
(require "../typedef/stat.rkt")
(require typed/racket/class)
(define (get-file-type-char [stat : (Instance Stat%)])
(cond
[(send stat get-is-directory?) "d"]
[else "-"]))
(define-syntax-rule (get-permissions-mode... | null | https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/repl/util/fileaccessstr.rkt | racket | See COPYING for details | #lang typed/racket/base
Copyright 2020
(provide get-mode-str)
(require "../typedef/stat.rkt")
(require typed/racket/class)
(define (get-file-type-char [stat : (Instance Stat%)])
(cond
[(send stat get-is-directory?) "d"]
[else "-"]))
(define-syntax-rule (get-permissions-mode name rwx r w x)
(define... |
114f431018d56878c4a2641441b572980b80353ad35e5e3b7cdc6ce170b8e945 | seckcoder/course-compiler | r2_8.rkt | (if (not 1) 777 42)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r2_8.rkt | racket | (if (not 1) 777 42)
| |
18fca27eed3cdb1da940ef7402239c9fa6c3d9a55ba4025b69b35cf0e4aaf1e5 | mfoemmel/erlang-otp | typer_annotator.erl | -*- erlang - indent - level : 2 -*-
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should hav... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/typer/src/typer_annotator.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | -*- erlang - indent - level : 2 -*-
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Aut... |
6ad52d56b6b91cf8e8a87b4e6047e23ff9b7ed20b1558cfc5eb5e146fb5ac1e5 | vereis/jarlang | digraph.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/src/erl/lib/stdlib/digraph.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 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(digraph).
-export([new/0, new/1, delete/1, info/1]).
-export([add_vertex/1, add_vertex/2, add_vertex/3]).
-... |
c352b63e46ea6f12ab1a4bba6d7b492b57a96a63264ea67bc0475b00eac530ca | BinaryAnalysisPlatform/bap | x86_cpu.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_env
module Make_CPU(Env : ModeVars) = struct
include X86_env
include Env
(* we do not include pc into a set of gpr *)
let gpr = Var.Set.of_list @@ [
rax; rcx; rdx; rsi; rdi;
rbx; rbp; rsp;
] @ Array.to_list r
@ Array.to_list ymms
... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/x86_cpu/x86_cpu.ml | ocaml | we do not include pc into a set of gpr | open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_env
module Make_CPU(Env : ModeVars) = struct
include X86_env
include Env
let gpr = Var.Set.of_list @@ [
rax; rcx; rdx; rsi; rdi;
rbx; rbp; rsp;
] @ Array.to_list r
@ Array.to_list ymms
let flags = Var.Set.of_list [
cf; pf; af;... |
1ce6072ec13131506f9978738704efddc4537925c6ac5f9a62979ef109cb3663 | dleslie/allegro-egg | bitmap.scm | (define new-bitmap-format-set! (foreign-lambda void "al_set_new_bitmap_format" pixel-format))
(define new-bitmap-flags-set! (foreign-lambda void "al_set_new_bitmap_flags" integer))
(define new-bitmap-format (foreign-lambda pixel-format "al_get_new_bitmap_format"))
(define new-bitmap-flags (foreign-lambda integer "al_ge... | null | https://raw.githubusercontent.com/dleslie/allegro-egg/0435fb891dda5c64e95aa9dedccddd31b17e27da/bitmap.scm | scheme | (define new-bitmap-format-set! (foreign-lambda void "al_set_new_bitmap_format" pixel-format))
(define new-bitmap-flags-set! (foreign-lambda void "al_set_new_bitmap_flags" integer))
(define new-bitmap-format (foreign-lambda pixel-format "al_get_new_bitmap_format"))
(define new-bitmap-flags (foreign-lambda integer "al_ge... | |
6a4349b89dbc61d271308889ee9d14d217792bb5625e3f3db9c3c7616ae96e33 | bkomuves/nanohs | main.hs |
module Main where
import qualified Nano
main = Nano.main
| null | https://raw.githubusercontent.com/bkomuves/nanohs/0eb3f7a14526f96e59ea9a51514a8ed3c3ce56f5/main.hs | haskell |
module Main where
import qualified Nano
main = Nano.main
| |
7b6ff92d35db84a248288a2aabf1b009f5c805e861d53166afb569bbefdc0ea1 | tmattio/inquire | style.ml | include Ansi
type t =
{ qmark_icon : string
; qmark_format : Ansi.style list
; message_format : Ansi.style list
; error_icon : string
; error_format : Ansi.style list
; default_format : Ansi.style list
; option_icon_marked : string
; option_icon_unmarked : string
; pointer_icon : string
}
let defa... | null | https://raw.githubusercontent.com/tmattio/inquire/f5bb64ab8d9ed8987c8e529007cf380ab67fd9fd/lib/style.ml | ocaml | include Ansi
type t =
{ qmark_icon : string
; qmark_format : Ansi.style list
; message_format : Ansi.style list
; error_icon : string
; error_format : Ansi.style list
; default_format : Ansi.style list
; option_icon_marked : string
; option_icon_unmarked : string
; pointer_icon : string
}
let defa... | |
5d395858f4226900f2adf05f36452385fa72a8315208077156325c3e7a1251ab | awakesecurity/language-ninja | Compile.hs | -*- coding : utf-8 ; mode : ; -*-
-- File: library/Language/Ninja/Errors/Compile.hs
--
-- License:
-- Copyright 2017 Awake Security
--
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 ... | null | https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/library/Language/Ninja/Errors/Compile.hs | haskell | File: library/Language/Ninja/Errors/Compile.hs
License:
Copyright 2017 Awake Security
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... | -*- coding : utf-8 ; mode : ; -*-
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns... |
2e0b4bba5980e9ef5848ff3b9c18dc0b23cfa7a20f0d5872eb942b392389c3cf | wavejumper/rehook | util.cljc | (ns rehook.util
#?(:cljs (:require ["react" :as react])))
(defn react-props [props]
(some-> props meta :react/props))
(defn children [props]
(some-> props react-props (aget "children")))
#?(:cljs
(defn child-seq [props]
(some-> props children react/Children.toArray)))
(defn rehook-component? [e]
(->... | null | https://raw.githubusercontent.com/wavejumper/rehook/c1a4207918827f4b738cdad9a9645385e5e10ff4/rehook-dom/src/rehook/util.cljc | clojure | (ns rehook.util
#?(:cljs (:require ["react" :as react])))
(defn react-props [props]
(some-> props meta :react/props))
(defn children [props]
(some-> props react-props (aget "children")))
#?(:cljs
(defn child-seq [props]
(some-> props children react/Children.toArray)))
(defn rehook-component? [e]
(->... | |
2e66cac93b507f082e005333f2c9dc4fa17c7ecf813bbe220598ca64e25ff02d | glotcode/glot-www | Simple.hs | # LANGUAGE ConstrainedClassMethods #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGuards #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric #
module Yesod.Auth.Simple (
YesodAuthSimple(..)... | null | https://raw.githubusercontent.com/glotcode/glot-www/cef0d7d00c0b0501fa2fdc407a26d13b19b84bd9/Yesod/Auth/Simple.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types #
| Salt a password with a randomly generated salt.
^ cleartext password
^ salted password
^ cleartext password
^ salted password
Re-encode to url-safe base64
Re-encode to regular base64
TODO: Get this function through a type class method or something | # LANGUAGE ConstrainedClassMethods #
# LANGUAGE FlexibleContexts #
# LANGUAGE PatternGuards #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric #
module Yesod.Auth.Simple (
YesodAuthSimple(..),
authSimple,
loginR,
registerR,
setPasswordR,
... |
3d196703adf46c6707c060cd6735822486bd06cb5712b57b7de3c69c29a262fb | flipstone/orville | IfExists.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Orville.PostgreSQL.Internal.Expr.IfExists
( IfExists,
ifExists,
)
where
import qualified Orville.PostgreSQL.Internal.RawSql as RawSql
newtype IfExists
= IfExists RawSql.RawSql
deriving (RawSql.SqlExpression)
ifExists :: IfExists
ifExists =
IfExists $ RawS... | null | https://raw.githubusercontent.com/flipstone/orville/a018288c5d3fe8c567b156b980d9f8aab2d06b28/orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/IfExists.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module Orville.PostgreSQL.Internal.Expr.IfExists
( IfExists,
ifExists,
)
where
import qualified Orville.PostgreSQL.Internal.RawSql as RawSql
newtype IfExists
= IfExists RawSql.RawSql
deriving (RawSql.SqlExpression)
ifExists :: IfExists
ifExists =
IfExists $ RawS... | |
95869d802ff6539d8b5dc7ecaafbd5f2161b03c475d31dcef08d1c232f21cd0f | simmone/racket-simple-xlsx | theme.rkt | #lang racket
(require simple-xml)
(provide (contract-out
[theme (-> list?)]
[write-theme (->* () (path-string?) void?)]
[read-theme (-> void?)]
))
(require "../../xlsx/xlsx.rkt")
(require "../../sheet/sheet.rkt")
(define (theme)
'("a:theme"
("xmlns:a" . "")
("name" ... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/xl/theme/theme.rkt | racket | #lang racket
(require simple-xml)
(provide (contract-out
[theme (-> list?)]
[write-theme (->* () (path-string?) void?)]
[read-theme (-> void?)]
))
(require "../../xlsx/xlsx.rkt")
(require "../../sheet/sheet.rkt")
(define (theme)
'("a:theme"
("xmlns:a" . "")
("name" ... | |
83214ef90c17b989574f0853c5f9113d08aa8c1984fe5acbe3876a2b92d9fc51 | Gbury/dolmen | term.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
(** Interfaces for Terms.
This module defines Interfaces that implementation of terms must
respect in order to be used to instantiated the corresponding
language classes. *)
* { 2 Signature for Parsing Logic languag... | null | https://raw.githubusercontent.com/Gbury/dolmen/0ef0a8a09fb1122e45d66c931ab7b1706bd74495/src/interface/term.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information
* Interfaces for Terms.
This module defines Interfaces that implementation of terms must
respect in order to be used to instantiated the corresponding
language classes.
* The type of terms.
* The type of identifiers used... |
* { 2 Signature for Parsing Logic languages }
module type Logic = sig
* Signature used by the Logic class , which parses languages
such as tptp , smtlib , etc ...
Mainly used to parse first - order terms , it is also used to
parse tptp 's THF language , which uses higher order terms , so
... |
c41df3e2f1993fbd88ce05d6c7b3c97ca0857caf1ba3521e3c2f8881a32ec125 | hyperfiddle/electric | local.cljc | (ns hyperfiddle.electric.impl.local
#?(:cljs (:require-macros [hyperfiddle.electric.impl.local :refer [local get-local set-local with-local]])))
(defmacro local []
(if (:js-globals &env) `(volatile! nil) `(ThreadLocal.)))
(defmacro get-local [l]
(if (:js-globals &env) `(deref ~l) `(.get ~(with-meta l (assoc (me... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/src/hyperfiddle/electric/impl/local.cljc | clojure | (ns hyperfiddle.electric.impl.local
#?(:cljs (:require-macros [hyperfiddle.electric.impl.local :refer [local get-local set-local with-local]])))
(defmacro local []
(if (:js-globals &env) `(volatile! nil) `(ThreadLocal.)))
(defmacro get-local [l]
(if (:js-globals &env) `(deref ~l) `(.get ~(with-meta l (assoc (me... | |
7932836214575891341f908d44469b79354b58ed11fb8a44bcb78750872f74ac | ParaPhraseAGH/erlang-emas | random_one_pre_process_SUITE.erl | -module(random_one_pre_process_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0,
init_per_testcase/2,
end_per_testcase/2]).
-export([should_be_called_in_each_worker/1,
one_process_should_call_random_only_once/1]).
all() ->
[should_be_called_in_each_worker,
one_... | null | https://raw.githubusercontent.com/ParaPhraseAGH/erlang-emas/08b936a437af90a38f55d4bcb0c8a61f10ccb9a6/test/random_one_pre_process_SUITE.erl | erlang | GIVEN
WHEN
THEN
GIVEN
WHEN
THAN
but seed_random was called only once
and __only__ once | -module(random_one_pre_process_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0,
init_per_testcase/2,
end_per_testcase/2]).
-export([should_be_called_in_each_worker/1,
one_process_should_call_random_only_once/1]).
all() ->
[should_be_called_in_each_worker,
one_... |
642ba00090be6ec24e1aeaf4c822f7e4f1c1f7674b154dc98e4fa11758d4af71 | scrintal/heroicons-reagent | arrows_pointing_out.cljs | (ns com.scrintal.heroicons.outline.arrows-pointing-out)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "ro... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/arrows_pointing_out.cljs | clojure | (ns com.scrintal.heroicons.outline.arrows-pointing-out)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "ro... | |
f2b978d41c51c0654e55d716b9470c81efe0c1b2daf65b85541270f673bd8961 | mojombo/yaws | yaws_soap_srv.erl | %%%-------------------------------------------------------------------
Created : 29 Nov 2006 by < >
Author : ( ) .
%%% Desc : A SOAP server.
%%%-------------------------------------------------------------------
-module(yaws_soap_srv).
-behaviour(gen_server).
%% API
-export([start_link/0,
setup/1, s... | null | https://raw.githubusercontent.com/mojombo/yaws/f75fde80f1e35a87335f21d0983e3285eb665f17/src/yaws_soap_srv.erl | erlang | -------------------------------------------------------------------
Desc : A SOAP server.
-------------------------------------------------------------------
API
gen_server callbacks
====================================================================
API
=========================================================... | Created : 29 Nov 2006 by < >
Author : ( ) .
-module(yaws_soap_srv).
-behaviour(gen_server).
-export([start_link/0,
setup/1, setup/2, setup/3,
handler/4
]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-include("../include/yaws_api.hrl").
-include(".... |
75416d391d868f7976bae3a4ed483622d69d58cef41a42e2b08272f1b57c2249 | basho/riak_test | verify_leave.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/verify_leave.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(verify_leave).
-behavior... |
92db898682fe290161f8f7be533afb02b9f8f5f82baa792e55c4c28dd66e1b1e | ddssff/refact-global-hse | Utils.hs | # LANGUAGE CPP #
{-# LANGUAGE PackageImports #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts , FlexibleInstances , RankNTypes , ScopedTypeVariables #
module Refactor.Utils where
import Control.Exception (SomeException, thro... | null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/src/Refactor/Utils.hs | haskell | # LANGUAGE PackageImports #
import Data.Bool (bool)
| Do a hard reset of all the files of the repository containing the
working directory.
| Do a hard reset of all the files of a subdirectory within a git
repository. (Does this every throw an exception?)
| Determine whether the repository containing the working d... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts , FlexibleInstances , RankNTypes , ScopedTypeVariables #
module Refactor.Utils where
import Control.Exception (SomeException, throw)
import Control.Exception.Lift... |
92b44808c759e90b76b92f61d6fb9d811fd3bf7b08f2d8cd185bc1e4ca7f8064 | soenkehahn/getopt-generics | HasArguments.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DefaultSignatures #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses... | null | https://raw.githubusercontent.com/soenkehahn/getopt-generics/735319c8146043f704d17f06b7bbfa41d84fe3e6/src/WithCli/HasArguments.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE TypeSynonymInstances #
| Everything that can be used as an argument to your @main@ function
to create more complex command line interfaces. Here's an example:
|
> {-# LANGUAGE DeriveAnyClass #-}
>... | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverlappingInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSectio... |
e16e1ed8200f79d58abbcee71a70153ba076f7fd8c11016e445b0d2479d4e5fb | mbutterick/typesetting | info.rkt | #lang info
(define scribblings '(("scribblings/hyphenate.scrbl" ())))
(define compile-omit-paths '("tests.rkt"))
(define post-install-collection "post-installer.rkt") | null | https://raw.githubusercontent.com/mbutterick/typesetting/8eedb97bb64cb2ff0cd9646eb1b0e46b67f1af44/hyphenate/hyphenate/info.rkt | racket | #lang info
(define scribblings '(("scribblings/hyphenate.scrbl" ())))
(define compile-omit-paths '("tests.rkt"))
(define post-install-collection "post-installer.rkt") | |
9c6138c1e40111fcc767baf517ff3603994df255bcad29cbd48b84c5cff12509 | mentat-collective/Mafs.cljs | vec.cljs | (ns mafs.vec)
(defn add
"Add two vectors"
[[x1 y1] [x2 y2]]
[(+ x1 x2) (+ y1 y2)])
(defn sub
"Subtract one vector from another"
[[x1 y1] [x2 y2]]
[(- x1 x2) (- y1 y2)])
(defn dot
"Dot product of two vectors"
[[x1 y1] [x2 y2]]
(+ (* x1 x2) (* y1 y2)))
(defn mag
"Get the magnitude of a vector"
[... | null | https://raw.githubusercontent.com/mentat-collective/Mafs.cljs/802f147b4ce0372d6cab06dbe1f6000f1b4b63b3/src/mafs/vec.cljs | clojure | (ns mafs.vec)
(defn add
"Add two vectors"
[[x1 y1] [x2 y2]]
[(+ x1 x2) (+ y1 y2)])
(defn sub
"Subtract one vector from another"
[[x1 y1] [x2 y2]]
[(- x1 x2) (- y1 y2)])
(defn dot
"Dot product of two vectors"
[[x1 y1] [x2 y2]]
(+ (* x1 x2) (* y1 y2)))
(defn mag
"Get the magnitude of a vector"
[... | |
76d332f4f7a826d5ffc7c97cd37ad512030d3ce421d7c29546f50374cfb98071 | mpickering/hs-speedscope | HsSpeedscope.hs | {-# language CPP #-}
# language DuplicateRecordFields #
# language NamedFieldPuns #
{-# language OverloadedStrings #-}
# language ViewPatterns #
module HsSpeedscope (
entry,
) where
import Data.String ( fromString )
import Control.Monad
import Data.Aeson
import Data.Char
import Data.Functor.Identity (Identity (..... | null | https://raw.githubusercontent.com/mpickering/hs-speedscope/5a77aeb163e07dc63769d4e0a659e5821cdee527/src/HsSpeedscope.hs | haskell | # language CPP #
# language OverloadedStrings #
| Delimit the event process.
^ predicate to always pass through events
^ moore process triggered by markers
if current or next state is open (== True), emit the marker.
for other events, emit if the state is open.
Filter out system frames | # language DuplicateRecordFields #
# language NamedFieldPuns #
# language ViewPatterns #
module HsSpeedscope (
entry,
) where
import Data.String ( fromString )
import Control.Monad
import Data.Aeson
import Data.Char
import Data.Functor.Identity (Identity (..))
import Data.List.Extra
import Data.Machine (Moore (..... |
e18069492109917e919885920708912580534d22ae6fcda23daa01ebd83bf360 | ocamllabs/ocaml-effects | invalid_formats.ml | Empty file added to create a conflict with branch 4.02 because
the test only makes sense on 4.02.x and will not work on 4.03 +
When merging , do n't forget to remove also the .ml.reference file .
the test only makes sense on 4.02.x and will not work on 4.03+
When merging, don't forget to remove als... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/testsuite/tests/formats-transition/invalid_formats.ml | ocaml | Empty file added to create a conflict with branch 4.02 because
the test only makes sense on 4.02.x and will not work on 4.03 +
When merging , do n't forget to remove also the .ml.reference file .
the test only makes sense on 4.02.x and will not work on 4.03+
When merging, don't forget to remove als... | |
b642eb803021beaaeb360eedc42b0c04cd178480ebd8e3a3f78cad6667f59f9e | qiao/sicp-solutions | 4.04.scm | ;; register the handler
(put 'and
(lambda (exp env) (eval-and exp env)))
(put 'or
(lambda (exp env) (eval-or exp env)))
;; implement as special forms
(define (eval-and exp env)
(define (eval-expressions exps)
(cond ((null? exps) true)
((true? (eval (car exps) env))
(eval-expressio... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter4/4.04.scm | scheme | register the handler
implement as special forms
implement as derived expressions | (put 'and
(lambda (exp env) (eval-and exp env)))
(put 'or
(lambda (exp env) (eval-or exp env)))
(define (eval-and exp env)
(define (eval-expressions exps)
(cond ((null? exps) true)
((true? (eval (car exps) env))
(eval-expressions (cdr exps)))
(else false)))
(eval-expre... |
1e03a2d7eedc44e1f6871905e722df4f51f8c7e2b8aa7b1db954032bca7814a1 | racket/compatibility | pregexp.rkt | ;; pregexp.rkt
;; Originally:
;; ;Portable regular expressions for Scheme
;
;; ;/~dorai/pregexp/pregexp.html
but functionality is now built into Racket , so
;; this is mostly a wrapper module.
(module pregexp mzscheme
(require (only racket/base regexp-quote regexp-split)
mzlib/kw)
(provide prege... | null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/mzlib/pregexp.rkt | racket | pregexp.rkt
Originally:
;Portable regular expressions for Scheme
;/~dorai/pregexp/pregexp.html
this is mostly a wrapper module. | but functionality is now built into Racket , so
(module pregexp mzscheme
(require (only racket/base regexp-quote regexp-split)
mzlib/kw)
(provide pregexp
pregexp-match-positions
pregexp-match
pregexp-split
pregexp-replace
pregexp-replace*
(rename regexp-quote pregexp-quote))
(de... |
6ee322da6e76a355ec0c5fad9e761fe57b5061019af62a93b77e8a366228168c | mveety/lispmake | package.lisp | lispmake , written by , et al .
( c ) 2012 - 2021 . Under BSD License .
(defpackage :lispmake
(:use :common-lisp)
(:export #:main))
| null | https://raw.githubusercontent.com/mveety/lispmake/3eb4e8ac280de3c31b4826424093b11c7dbbf289/package.lisp | lisp | lispmake , written by , et al .
( c ) 2012 - 2021 . Under BSD License .
(defpackage :lispmake
(:use :common-lisp)
(:export #:main))
| |
bb812f24779049419c5900095ea4d4717493384ef4045947681925634732cb2a | static-analysis-engineering/codehawk | jCHCodegraph.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpre/jCHCodegraph.ml | ocaml | chutil
jchlib
jchpre | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
e8fb28da27477319fd3f5a7aa8a4379b6791f3238537d19e250de634b45c1039 | mfoemmel/erlang-otp | snmpm_net_if.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/src/manager/snmpm_net_if.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmpm_net_if).
-behaviour(gen_ser... |
34f6a0c53b48effdf8330c094aa6992f6a8b2d2a5a1c59b2ce2d7116b6081f97 | rtoy/cmucl | boot24.lisp | ;;;
Bootstrap file for adding support for source location recording
from .
;;;
(in-package "C")
(setf lisp::*enable-package-locked-errors* nil)
(defstruct (form-numbers)
;; The tlf-number and form-number encoded in a fixnum.
(form-numbers (required-argument) :type fixnum))
(defstruct (file-source-location... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/18e/boot24.lisp | lisp |
The tlf-number and form-number encoded in a fixnum.
| Bootstrap file for adding support for source location recording
from .
(in-package "C")
(setf lisp::*enable-package-locked-errors* nil)
(defstruct (form-numbers)
(form-numbers (required-argument) :type fixnum))
(defstruct (file-source-location
(:include form-numbers)
(:make-load-form-fun :just-d... |
3bdccd29e83d6b1f46422e0aff7d4ef376b4d14021f4f3ec459cbac8ba4f3b7b | ocaml-multicore/domainslib | task.ml | open Effect
open Effect.Deep
type 'a task = unit -> 'a
type message =
| Work of (unit -> unit)
(* Invariant: the Work function does not need to run under the 'step' handler,
it installs its own handler or re-invokes a deep-handler continuation. *)
| Quit
type task_chan = message Multi_channel.t
type pool_dat... | null | https://raw.githubusercontent.com/ocaml-multicore/domainslib/446d45718330b3dff0c5e2ae82481fd4b40a670c/lib/task.ml | ocaml | Invariant: the Work function does not need to run under the 'step' handler,
it installs its own handler or re-invokes a deep-handler continuation.
Remove the pool from the table | open Effect
open Effect.Deep
type 'a task = unit -> 'a
type message =
| Work of (unit -> unit)
| Quit
type task_chan = message Multi_channel.t
type pool_data = {
domains : unit Domain.t array;
task_chan : task_chan;
name: string option
}
type pool = pool_data option Atomic.t
type 'a promise_state =
Return... |
4717d809fd9ec58e447c31ee921ba4ca4a5d44b7186e33b83a5bd4c286cce3e5 | shayne-fletcher/zen | polynomial.ml | Exercise 31 ( Polynomials with one variable ) from
{ { : -ocaml/ocaml-modules.html#Exo-31}"Using ,
Understanding , and Unraveling the OCaml Language " } --
{{:-ocaml/ocaml-modules.html#Exo-31}"Using,
Understanding, and Unraveling the OCaml Language"} -- Didier Remy*)
#load "nums.cma";;
(*Type of a modul... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/mod_gen/polynomial.ml | ocaml | Type of a module implementing arithmetic
Arithmetic with [int]
Arithmetic with [float]
The type of an additive group
Build a ring over an arithmetic using [int] for the external
representation type [extern_t]
Build a ring over an arithmetic using [string] for the external
representation type [extern_t]
Rings over v... | Exercise 31 ( Polynomials with one variable ) from
{ { : -ocaml/ocaml-modules.html#Exo-31}"Using ,
Understanding , and Unraveling the OCaml Language " } --
{{:-ocaml/ocaml-modules.html#Exo-31}"Using,
Understanding, and Unraveling the OCaml Language"} -- Didier Remy*)
#load "nums.cma";;
module type ARITH... |
109eb43b0f3dab5d4001a5bb7982bb6531bfcdc433efa7bc2bb8c635cb790458 | keechma/forms | core.cljs | (ns forms.test.core
(:require [cljs.test :refer-macros [deftest is]]
[forms.validator :as v]
[forms.core :as core]
[forms.test.common :refer [not-nil? not-empty? is-one? is-twitter? is-facebook?]]
[forms.util :as util]))
(deftest errors-keypaths []
(is (= [[:user :us... | null | https://raw.githubusercontent.com/keechma/forms/5a9e02b76a4b5efd441f9a71e9831b2161139fdd/test/forms/test/core.cljs | clojure | (ns forms.test.core
(:require [cljs.test :refer-macros [deftest is]]
[forms.validator :as v]
[forms.core :as core]
[forms.test.common :refer [not-nil? not-empty? is-one? is-twitter? is-facebook?]]
[forms.util :as util]))
(deftest errors-keypaths []
(is (= [[:user :us... | |
147e76202d2b9ae3a6cd0afc0631318e6dbf8c76c1e97dbc5b2db76856c4fdab | vikram/lisplibraries | utils.lisp | ;;;;
Copyright ( c ) 2008 , All Rights Reserved
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions
;;;; are met:
;;;;
;;;; * Redistributions of source code must retain the above copyright
;;;; notice, this list o... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/zs3-1.0.4/utils.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form... | Copyright ( c ) 2008 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:zs3)
(defvar *months* #("Jan" "Feb" "Mar" "Apr" "May" "Jun"
"Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
... |
8e51502e91692c7f1feaadb0717f9a26e02ae5bde2b3bade5ce10bcb8004ab37 | rtoy/cmucl | methods.lisp | Copyright ( C ) 2002 < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
1 . Redistributions of source code must retain the above copyright
;;; notice, this list of condi... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/tests/pcl/methods.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
document... | Copyright ( C ) 2002 < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of the author may not be used to endorse or promote
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS
ARE DISCL... |
02934b19ecdaf9e1ac00086a10a59f336a796a8e49c1380f44f940cafc620960 | bmeurer/ocamljit2 | morematch.ml | (**************************************************************)
(* This suite tests the pattern-matching compiler *)
(* it should just compile and run. *)
(* While compiling the following messages are normal: *)
(***********************************************************... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/basic-more/morematch.ml | ocaml | ************************************************************
This suite tests the pattern-matching compiler
it should just compile and run.
While compiling the following messages are normal:
************************************************************
Number of inte... |
File " morematch.ml " , line 38 , characters 10 - 93 :
Warning : this pattern - matching is not exhaustive .
Here is an example of a value that is not matched :
0
File " morematch.ml " , line 376 , characters 2 - 15 :
Warning : this match case is unused .
File " morematch.ml " , line 443 , characters 2 -... |
e81d88a46ce4acab406d0b57469c8ab019dcd85606c7a9d435b3081f09de421d | PrecursorApp/precursor | we_made_precursor_for_teams.clj | (ns pc.views.blog.we-made-precursor-for-teams
(:require [ring.middleware.anti-forgery :refer (wrap-anti-forgery)]
[pc.http.urls :as urls]
[pc.views.email :as email]
[pc.product-hunt :as product-hunt]
[pc.profile :as profile]
[pc.views.common :refer (cdn-path... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/views/blog/we_made_precursor_for_teams.clj | clojure | export
voice
github embed
sms
space pan
replay
(common/tweet "PrecursorApp" "582719313410326528") ; text sizing
read only
arrows | (ns pc.views.blog.we-made-precursor-for-teams
(:require [ring.middleware.anti-forgery :refer (wrap-anti-forgery)]
[pc.http.urls :as urls]
[pc.views.email :as email]
[pc.product-hunt :as product-hunt]
[pc.profile :as profile]
[pc.views.common :refer (cdn-path... |
8fc3fb03f0d72ee32498ee15710e4b0d9ca769d0cfd0fe02e013c346346a258f | cxxxr/valtan | should-string.lisp | Copyright ( C ) 2002 - 2004 , < >
;; ALL RIGHTS RESERVED.
;;
$ I d : should - string.lisp , v 1.8 2004/02/20 07:23:42 yuji Exp $
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributions of... | null | https://raw.githubusercontent.com/cxxxr/valtan/ec3164d42b86869357dc185b747c5dfba25c0a3c/tests/sacla-tests/should-string.lisp | lisp | ALL RIGHTS RESERVED.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistribu... | Copyright ( C ) 2002 - 2004 , < >
$ I d : should - string.lisp , v 1.8 2004/02/20 07:23:42 yuji Exp $
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIAB... |
db78d0fd5889c2ec6475d90366f70c16fb3873140c8d2e1a4754e051c86d5f3e | jobjo/popper | ppx_deriving_popper.ml | open Ppxlib
type bindings =
{ type_name : string
; sized : value_binding
; alias : value_binding
; num_poly : int
}
let with_loc ~loc txt = { txt; loc }
let rec label_of_long_ident = function
| Lident label -> label
| Ldot (longident, label) ->
Printf.sprintf "%s.%s" (label_of_long_ident longident)... | null | https://raw.githubusercontent.com/jobjo/popper/f59307129a5ee81f7e1f20862baee6fecfc5e4e7/src/ppx/ppx_deriving_popper.ml | ocaml | Select the non-recursive fields first | open Ppxlib
type bindings =
{ type_name : string
; sized : value_binding
; alias : value_binding
; num_poly : int
}
let with_loc ~loc txt = { txt; loc }
let rec label_of_long_ident = function
| Lident label -> label
| Ldot (longident, label) ->
Printf.sprintf "%s.%s" (label_of_long_ident longident)... |
2462f980dddba52dd9a229cdd76b00227db128db7959e48a54a015f1e6ebf8be | mokus0/junkbox | ModNTable.hs | import Graphics.Gloss
-- mod-n multiplication tables
n = 23
picture
= scale (500 / n) (500 / n)
$ translate (-0.5 * n) (-0.5 * n)
$ grid n n $ \i j -> number (((i+1) * (j+1)) `mod` n)
grid n m cell = pictures $ concat
[ [ line [(flt i, 0), (flt i, flt m)] | i <- [0..n]]
, [ line [( 0, flt... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/gloss-web/ModNTable.hs | haskell | mod-n multiplication tables | import Graphics.Gloss
n = 23
picture
= scale (500 / n) (500 / n)
$ translate (-0.5 * n) (-0.5 * n)
$ grid n n $ \i j -> number (((i+1) * (j+1)) `mod` n)
grid n m cell = pictures $ concat
[ [ line [(flt i, 0), (flt i, flt m)] | i <- [0..n]]
, [ line [( 0, flt i), (flt n, flt i)] | i <- [0.... |
92d1fd861f6b51680b7de0f2596da40bd2a0d7b351c461fa0c5e351b792208c0 | ryanpbrewster/haskell | P056Test.hs | module Problems.P056Test
( case_056_main
) where
import Problems.P056
import Test.Tasty.Discover (Assertion, (@?=))
case_056_main :: Assertion
case_056_main = solve @?= "972"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P056Test.hs | haskell | module Problems.P056Test
( case_056_main
) where
import Problems.P056
import Test.Tasty.Discover (Assertion, (@?=))
case_056_main :: Assertion
case_056_main = solve @?= "972"
| |
08c4aabdf85766c1a2479f652774731acd3f92fec4fb45f0cabbf8f78298f5db | tud-fop/vanda-haskell | LM.hs | # LANGUAGE FlexibleInstances #
-----------------------------------------------------------------------------
-- |
Module : . Grammar .
Copyright : ( c ) Technische Universität Dresden 2013
-- License : BSD-style
--
-- Maintainer :
-- Stability : unknown
-- Portability : portable
--
-- Cl... | null | https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Vanda/Grammar/LM.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : unknown
Portability : portable
Class of n-gram language models.
---------------------------------------------------------------------------
indexOf = KN.dictIndex
order =... | # LANGUAGE FlexibleInstances #
Module : . Grammar .
Copyright : ( c ) Technische Universität Dresden 2013
module Vanda.Grammar.LM where
import qualified Data.Text.Lazy as T
import qualified Data.Map as M
import qualified Data.Vector.Unboxed as VU
import Vanda.Util
import Vanda.Grammar.NGrams.Vand... |
ef58f7cfc39bdf7525e7cb87c2c080165edae1adb8914f8da0f488bf1db559b9 | clojureverse/clojurians-log-app | user.clj | (ns user
(:require [reloaded.repl :as reloaded]))
(alter-var-root #'*print-namespace-maps* (constantly false))
;; (set! *print-namespace-maps* false)
(defmacro jit [sym]
`(or (resolve '~sym)
(do
(-> '~sym namespace symbol require)
(resolve '~sym))))
(reloaded/set-init! #((jit clojurians-... | null | https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/profiles/dev/user.clj | clojure | (set! *print-namespace-maps* false)
Set up aliases so they don't accidentally
get scrubbed from the namespace declaration | (ns user
(:require [reloaded.repl :as reloaded]))
(alter-var-root #'*print-namespace-maps* (constantly false))
(defmacro jit [sym]
`(or (resolve '~sym)
(do
(-> '~sym namespace symbol require)
(resolve '~sym))))
(reloaded/set-init! #((jit clojurians-log.application/dev-system)
... |
502bbd20f53f6c11ade1baecd4d53dc519268a12e7a672ead82ddf2241634dd2 | takikawa/racket-ppa | universe.rkt | #lang racket/gui
;; ---------------------------------------------------------------------------------------------------
;; provides the universe functionality (distributed worlds)
(provide
universe%
;; --- sample worlds and function on worlds ---
iworld? ;; Any -> Boolean
World World - > Boolean
World - > S... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/share/pkgs/htdp-lib/2htdp/private/universe.rkt | racket | ---------------------------------------------------------------------------------------------------
provides the universe functionality (distributed worlds)
--- sample worlds and function on worlds ---
Any -> Boolean
sample worlds
--- sending 'mail' to worlds ---
is this a bundle?
is this a real mail?
... | #lang racket/gui
(provide
universe%
World World - > Boolean
World - > Symbol
iworld2
iworld3
type Bundle = ( make - bundle [ Listof World ] Universe [ Listof Mail ] )
type Mail = ( make - mail World S - expression )
[ Listof World ] Universe [ Listof Mail ] - > Bundle
World S - expression - > Mail
)
... |
20677aa50d6caf5184886cfd0746c9e3e35060d0985f1e957114baef3a8d30c4 | nammayatri/beckn-gateway | Search.hs |
Copyright 2022 - 23 , Juspay India Pvt Ltd
This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ... | null | https://raw.githubusercontent.com/nammayatri/beckn-gateway/dcdadbb647a3049d62df283d35ae61eb5420d50e/app/gateway/src/Types/API/Search.hs | haskell |
Copyright 2022 - 23 , Juspay India Pvt Ltd
This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ... | |
5c67d5f4681f62441527452aedae4e0b0e97979bfb5b8ec93f7bf4393e414148 | 2600hz/kazoo | cb_parked_calls.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%%
@author
%%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/modules/cb_parked_calls.erl | erlang | -----------------------------------------------------------------------------
@end
----------------------------------------------------------------------------- | ( C ) 2011 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(cb_parked_calls).
-include("crossbar.hrl").
-export([init/0
,allowed_methods/0
... |
4b1c5fe79b8c878a5f3b8ab715ff0a5c38daf453483e017e5ce75fc7d9b5f895 | rubenbarroso/EOPL | 5_18.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
;See methods marked with ;'' to see the needed changes
;^;; 5-3.scm: basis for OOP interps
(let ((time-stamp "Time-stamp: <2001-05-10 1... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter5/5_18.scm | scheme | See methods marked with ;'' to see the needed changes
^;; 5-3.scm: basis for OOP interps
top level and tests ;;;;;;;;;;;;;;;;
needed for testing
^;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
^;;;;;;;;;;;;;;; new productions for oop ;;;;;;;;;;;;;;;;
method ids
^;;;;;;;;;;;;;;; end new productions for oo... | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(let ((time-stamp "Time-stamp: <2001-05-10 16:18:14 dfried>"))
(eopl:printf "5-3.scm - basis for OOP interps ~a~%"
(substring tim... |
20b059971a36cfd58990ae3fa4cd7ea54efd8d64f97eb9558258c0f476729137 | carlosganzerla/cl-gen | continuations.lisp | (in-package #:cl-gen)
(defvar *ignored* (gensym))
(defun multi-id (&rest args)
(apply #'values args))
(defun return-lambda (block-name)
`(lambda (&rest x)
(return-from ,block-name (apply #'values x))))
(defmacro cc-context (&body body)
(with-gensyms (block)
`(block ,block
(let (($cc #'mul... | null | https://raw.githubusercontent.com/carlosganzerla/cl-gen/a74368d1a72d6d8b065a35aca0841e27e8b81502/src/continuations.lisp | lisp | (in-package #:cl-gen)
(defvar *ignored* (gensym))
(defun multi-id (&rest args)
(apply #'values args))
(defun return-lambda (block-name)
`(lambda (&rest x)
(return-from ,block-name (apply #'values x))))
(defmacro cc-context (&body body)
(with-gensyms (block)
`(block ,block
(let (($cc #'mul... | |
5fac72f1d1d4ac24f815ef2b831c4f7fa006d1970bb6cfbc6150757afd95884c | sellout/yaya | Functor.hs | -- | This should probably be a separate library, but it provides a number of
-- functor type classes between various categories.
module Yaya.Functor where
import Control.Applicative.Backwards (Backwards (..))
import Control.Applicative.Lift (Lift (..))
import qualified Control.Monad.Trans.Except as Ex
import qualifi... | null | https://raw.githubusercontent.com/sellout/yaya/3801a84a4371f016fa9e1483f5a38f828e257c2d/core/src/Yaya/Functor.hs | haskell | | This should probably be a separate library, but it provides a number of
functor type classes between various categories.
be a mnemonic for “down”, as we’re “lowering” from endofunctors to types.
| This isn’t a Functor instance because of the position of the @a@, but you
can use it like:
> instance Funct... | module Yaya.Functor where
import Control.Applicative.Backwards (Backwards (..))
import Control.Applicative.Lift (Lift (..))
import qualified Control.Monad.Trans.Except as Ex
import qualified Control.Monad.Trans.Identity as I
import qualified Control.Monad.Trans.Maybe as M
import qualified Control.Monad.Trans.RWS.Lazy ... |
ca1132e2ad13ec25dcbfe68c7f216f21cbf54a2f3e4ff6d69013177ab9bce03a | rabbitmq/rabbitmq-trust-store | rabbit_trust_store_certificate_provider.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_trust_store_certificate_provider).... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-trust-store/b6a0cb779ae8d2efd58e66c9e291b54ab82322fa/src/rabbit_trust_store_certificate_provider.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_trust_store_certificate_provider).
-inc... | |
e16968c82efe9a668a97f4082182e3ca36ddc4b26d98c87eed5fb9d76b1655cb | binsec/haunted | trace_loader.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/trace/trace_loader.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
0efcbb0150294b25e033552d409ec55f70fb205c78f560b4eb8a7f09cb8ba371 | ocurrent/ocluster | admin.ml | open Lwt.Infix
open Capnp_rpc_lwt
let ( >>!= ) = Lwt_result.bind
let local ~pools ~pool ~add_client ~remove_client ~list_clients =
let module X = Raw.Service.Admin in
X.local @@ object
inherit X.service
method pools_impl _params release_param_caps =
let open X.Pools in
release_param_caps ();
... | null | https://raw.githubusercontent.com/ocurrent/ocluster/5a9c0c2304adb9b786178fadc007e0cfa92a8e08/api/admin.ml | ocaml | open Lwt.Infix
open Capnp_rpc_lwt
let ( >>!= ) = Lwt_result.bind
let local ~pools ~pool ~add_client ~remove_client ~list_clients =
let module X = Raw.Service.Admin in
X.local @@ object
inherit X.service
method pools_impl _params release_param_caps =
let open X.Pools in
release_param_caps ();
... | |
0b36e65114019cad8aaea05cc72b5744676625be86b306169dd03b39367f4534 | futurice/haskell-mega-repo | Config.hs | # LANGUAGE DataKinds #
module Futurice.App.PlanMillSync.Config (
Config (..),
) where
import Futurice.EnvConfig
import Futurice.Integrations
import Futurice.Prelude
import Prelude ()
import Servant.Client (BaseUrl)
import qualified Okta.Types.GroupInfo as Okta
import qualified FUM.Types.Login ... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/bddcdb2378a76916530d63ce4eecb4c0e26eca43/planmill-sync/src/Futurice/App/PlanMillSync/Config.hs | haskell | # LANGUAGE DataKinds #
module Futurice.App.PlanMillSync.Config (
Config (..),
) where
import Futurice.EnvConfig
import Futurice.Integrations
import Futurice.Prelude
import Prelude ()
import Servant.Client (BaseUrl)
import qualified Okta.Types.GroupInfo as Okta
import qualified FUM.Types.Login ... | |
a877d91e500f71b0f7539b6826750d148736442e13d7b3008f01f98d1505fd97 | iamFIREcracker/adventofcode | day03.lisp | (defpackage :aoc/2016/03 #.cl-user::*aoc-use*)
(in-package :aoc/2016/03)
(defun read-single-triangle-specification (string)
(cl-ppcre:register-groups-bind ((#'parse-integer a b c))
("(\\d+)\\s+(\\d+)\\s+(\\d+)" string)
(list a b c)))
(defun read-specifications (data)
(mapcar #'read-single-triangle-speci... | null | https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2016/day03.lisp | lisp | (defpackage :aoc/2016/03 #.cl-user::*aoc-use*)
(in-package :aoc/2016/03)
(defun read-single-triangle-specification (string)
(cl-ppcre:register-groups-bind ((#'parse-integer a b c))
("(\\d+)\\s+(\\d+)\\s+(\\d+)" string)
(list a b c)))
(defun read-specifications (data)
(mapcar #'read-single-triangle-speci... | |
70a21c8ebd4ae99544a9e50b4ee91bc93170bf3f67a1eb5ec42940ba1a9d840f | biocaml/biocaml | pos.ml | type t = { source : string option; line : int option; offset : int option }
[@@deriving sexp]
let make ?source ?line ?offset () = { source; line; offset }
let unknown = { source = None; line = None; offset = None }
let incr_line ?(n = 1) t =
let prev = match t.line with None -> 0 | Some x -> x in
{ t with line = ... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/pos.ml | ocaml | type t = { source : string option; line : int option; offset : int option }
[@@deriving sexp]
let make ?source ?line ?offset () = { source; line; offset }
let unknown = { source = None; line = None; offset = None }
let incr_line ?(n = 1) t =
let prev = match t.line with None -> 0 | Some x -> x in
{ t with line = ... | |
19287ba15088e859fd8fbfcfda797dbc313d52126b868f912ebe685c09a80e02 | gedge-platform/gedge-platform | rabbit_plugins.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2011 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_plugins).
-include_lib("rabbit_com... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_plugins.erl | erlang |
Export for testing purpose.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
the modules for the disabled plugins - if they are unloaded
that won't work.
pass them here in dependency order.
@doc Prepares the ... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2011 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_plugins).
-include_lib("rabbit_common/in... |
0d36a14bb9d1f64d98854515deb1268f3670f4c366bfe0a7c6d7065ceffe9f72 | commercialhaskell/stack | Main.hs | import StackTest
main :: IO ()
main = do
stackCleanFull
stackErr ["haddock"]
stackCleanFull
stackErr ["haddock", "--no-haddock-deps"]
stack ["build"]
stackErr ["haddock", "--no-haddock-deps"]
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/4754-rebuild-haddocks/Main.hs | haskell | import StackTest
main :: IO ()
main = do
stackCleanFull
stackErr ["haddock"]
stackCleanFull
stackErr ["haddock", "--no-haddock-deps"]
stack ["build"]
stackErr ["haddock", "--no-haddock-deps"]
| |
171099f172fdda9402a24c76b3639d3d7b0373f097f35eaa61899574ccddafa7 | clojure/core.typed | trans.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/trans.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.checker.trans
(:require [clojure.core.typed.checker.utils :as u]
[clojure.core.typed.checker.type-rep :as r]
[clojure.core.typed.checker.type-ctors :as c]
[clojure.core.typed.checker.subst :as subst]
[c... |
ae209f998e8e73aaa4060fcf25e3f908cd364d5cab7d90af9bbe0c2d05ec506b | solatis/haskell-network-anonymous-i2p | Main.hs | module Main where
import Test.Hspec.Runner
import qualified Spec
import Network (withSocketsDo)
main :: IO ()
main =
withSocketsDo $ hspecWith defaultConfig Spec.spec
| null | https://raw.githubusercontent.com/solatis/haskell-network-anonymous-i2p/57681eedc06ed349f3ac011ada221c567c91739a/test/Main.hs | haskell | module Main where
import Test.Hspec.Runner
import qualified Spec
import Network (withSocketsDo)
main :: IO ()
main =
withSocketsDo $ hspecWith defaultConfig Spec.spec
| |
7b6ba3acf69ca38d73eb8b51775d8351f37f713900f124849f8f1703b09fc20f | gas2serra/mcclim-desktop | application.lisp | (in-package :desktop-internals)
;;;
Clim resource for applications
;;;
(defun application->textual-string (app)
(application-pretty-name app))
;;; presentations
(clim:define-presentation-method clim:present (app (type application)
stream
(view clim:textual-view)
&key)
(princ (applic... | null | https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/Resource/src/application.lisp | lisp |
presentations
command table
translators
parameters
commands
utility
translators | (in-package :desktop-internals)
Clim resource for applications
(defun application->textual-string (app)
(application-pretty-name app))
(clim:define-presentation-method clim:present (app (type application)
stream
(view clim:textual-view)
&key)
(princ (application->textual-string app)... |
a90e6f28a72d9bca6e30b26aa2f145fbde922edfdc8a6225fd440177d51579a6 | haskell/haskell-platform | Releases2014.hs | module Releases2014 where
import PlatformDB
import Types
releases2014 :: [Release]
releases2014 = [hp2014_2_0_0]
hp2014_2_0_0 :: Release
hp2014_2_0_0 =
release "2014.2.0.0"
[ incGHC "7.8.3"
, incGHCLib "array" "0.5.0.0"
, incGHCLib "base" ... | null | https://raw.githubusercontent.com/haskell/haskell-platform/6357fb6645782278f43fc8340bf46771f1c2768d/hptool/src/Releases2014.hs | haskell | , onlyWindows $ incGHCLib "Win32" "2.3.0.2"
, incLib "cgi" "3001.1.7.5" -- no longer builds | module Releases2014 where
import PlatformDB
import Types
releases2014 :: [Release]
releases2014 = [hp2014_2_0_0]
hp2014_2_0_0 :: Release
hp2014_2_0_0 =
release "2014.2.0.0"
[ incGHC "7.8.3"
, incGHCLib "array" "0.5.0.0"
, incGHCLib "base" ... |
8eb127dbc3ad3bfb0c0420b299bf1fc1b8d8d7b70a659b3bb3d98b7e6f8c195a | BillHallahan/G2 | Support.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
-- Converts types with Name's to types with QQNames, since uniques in the
will most likely not match up with uniques from the original
-- code
module G2.QuasiQuotes.Support ( QQName (..)
... | null | https://raw.githubusercontent.com/BillHallahan/G2/5b5635369af5a1f108e84ddec0e4d8dd69be5e5d/src/G2/QuasiQuotes/Support.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
Converts types with Name's to types with QQNames, since uniques in the
code | # LANGUAGE DeriveGeneric #
will most likely not match up with uniques from the original
module G2.QuasiQuotes.Support ( QQName (..)
, QQMap
, qqMap
, nameToQQName
, thNameToQQName
... |
52793e38fb6eaf743ade8761056a1c01fa21c5623f6eb3baf9aeb75dcce929c9 | jellelicht/guix | sdl.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2015 >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public ... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/sdl.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2015 >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages ... |
a58350719a6f5422bd330156ca378d64d184cf0a77546c7a1005705216530df8 | Clojure2D/clojure2d-examples | P_2_2_2_02.clj | (ns GG.P.P-2-2-2-02
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.random :as r]
[clojure2d.color :as c]
[clojure2d.pixels :as p]))
(def ^:const ^double angle-count 7.0)
(def ^:const ^double step-size 3.0)
(def ^:const ^double min-length 10.0)
(... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/P/P_2_2_2_02.clj | clojure | (ns GG.P.P-2-2-2-02
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.random :as r]
[clojure2d.color :as c]
[clojure2d.pixels :as p]))
(def ^:const ^double angle-count 7.0)
(def ^:const ^double step-size 3.0)
(def ^:const ^double min-length 10.0)
(... | |
46457f6828edb00790494ae6b173764ae4dcbdd186d64afe1e426cba4542b8bc | aryx/lfs | multiset.ml |
open Logic
module type PARAM =
sig
val toks_sep : Token.t list
val toks_begin : Token.t list
val toks_end : Token.t list
val toks_empty : Token.t list
val no_begin_end_when_singleton : bool
end
module Make (Param : PARAM) (E : T) =
struct
include Default
let props =
fixpoint
... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/src/multiset.ml | ocaml | in ress, the booleans indicates which elements are subsumed by y
(true,e) :: |
open Logic
module type PARAM =
sig
val toks_sep : Token.t list
val toks_begin : Token.t list
val toks_end : Token.t list
val toks_empty : Token.t list
val no_begin_end_when_singleton : bool
end
module Make (Param : PARAM) (E : T) =
struct
include Default
let props =
fixpoint
... |
a437813dcd5076341dbd4fb53ccd5f84f0063d1e384657f1ecf87cf09f106162 | mrphlip/aoc | 10.hs | # OPTIONS_GHC -Wno - tabs #
import Data.Either
import Data.List
import Control.Exception
import Utils
type Rating = Either Integer Integer
getInput :: IO [String]
getInput = do
dat <- readFile "10.txt"
return $ lines dat
opening :: Char -> Bool
opening '(' = True
opening ')' = False
opening '[' = True
opening ']' ... | null | https://raw.githubusercontent.com/mrphlip/aoc/8838653f45cb63511f46628cbe5ab0919249fae2/2021/10.hs | haskell | # OPTIONS_GHC -Wno - tabs #
import Data.Either
import Data.List
import Control.Exception
import Utils
type Rating = Either Integer Integer
getInput :: IO [String]
getInput = do
dat <- readFile "10.txt"
return $ lines dat
opening :: Char -> Bool
opening '(' = True
opening ')' = False
opening '[' = True
opening ']' ... | |
ab712e15127b1ab96dc2fc65c3b55a9964c015cb05dcf4767e95d6e0dea6d1fc | threatgrid/asami | idx_codec_test.cljc | (ns ^{:doc "Tests the coder/decoder code for accessing index blocks"
:author "Paula Gearon"}
asami.durable.idx-codec-test
(:require [clojure.test #?(:clj :refer :cljs :refer-macros) [deftest is]]
[asami.durable.test-utils :refer [new-block]]
[asami.durable.encoder :refer [to-by... | null | https://raw.githubusercontent.com/threatgrid/asami/870b334c5ad28a56de483770329d0f75a2489932/test/asami/durable/idx_codec_test.cljc | clojure | (ns ^{:doc "Tests the coder/decoder code for accessing index blocks"
:author "Paula Gearon"}
asami.durable.idx-codec-test
(:require [clojure.test #?(:clj :refer :cljs :refer-macros) [deftest is]]
[asami.durable.test-utils :refer [new-block]]
[asami.durable.encoder :refer [to-by... | |
e3984647998c507585b38048d9f24cd63c48c95d9150f6c1e102338fda9da074 | tanakh/monadius | Main.hs | Copyright 2005 Hideyuki Tanaka &
This program is distributed under the terms of the GNU General Public License .
NOTE
This project meant to list up , not to solve , many possible problems that will appear
while writing a game in Haskell .
Only nushio is responsible to the unreadability of these c... | null | https://raw.githubusercontent.com/tanakh/monadius/d87364a67e8c18cb1a98a72856f5069ad4a157e9/src/Main.hs | haskell | | 'recorderMode' means general gamemode that user wants,
'mode' of a recorder means current gamemode.
,WithDepthBuffer,WithAlphaComponent
Where' GameModeBitsPerPlane IsEqualTo 32,
then returns the Scene that are to be executed in next frame.
it is possible to temporary set (recordermode /= recorderMode vars) | Copyright 2005 Hideyuki Tanaka &
This program is distributed under the terms of the GNU General Public License .
NOTE
This project meant to list up , not to solve , many possible problems that will appear
while writing a game in Haskell .
Only nushio is responsible to the unreadability of these c... |
978bf30d27bede2c2bb8a6b90560da06dd9c5af9cd0c2b67da4c5f7f6dde9810 | developandplay/material-components-web-miso | Filter.hs | {-# LANGUAGE OverloadedStrings #-}
module Material.ChipSet.Filter (chipSet) where
import qualified Data.Function
import qualified Data.Maybe as Maybe
import qualified Data.Void as Void
import qualified Material.Chip.Filter as Chip
import qualified Material.Chip.Filter.Internal as Internal
import qualified Miso
import... | null | https://raw.githubusercontent.com/developandplay/material-components-web-miso/97a20097bf522b62743c884b66757eb895edd690/sample-app-jsaddle/Material/ChipSet/Filter.hs | haskell | # LANGUAGE OverloadedStrings #
| Filter chip set view function |
module Material.ChipSet.Filter (chipSet) where
import qualified Data.Function
import qualified Data.Maybe as Maybe
import qualified Data.Void as Void
import qualified Material.Chip.Filter as Chip
import qualified Material.Chip.Filter.Internal as Internal
import qualified Miso
import qualified Miso.String
import quali... |
0b1e5ed07411cd1e142318242393e17044d2ceefb481a0b914f316ae0a82085f | phylogeography/spread | sqs.clj | (ns aws.sqs
(:require [aws.utils :refer [throw-on-error]]
[cognitect.aws.client.api :as aws]
[cognitect.aws.credentials :as credentials]
[shared.utils :refer [decode-transit encode-transit]]))
(defn create-client
"Creates a sqs client, needed to call all sqs related functions."... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/clj/aws/sqs.clj | clojure | only for dev
if we are in testing lets smash a real region
the aws/invoke fails with "No region found by any region provider."
if we don't provide a real one. Providing "spread-test-1" doesn't work
should we configure this here or is it already configured
in aws console? | (ns aws.sqs
(:require [aws.utils :refer [throw-on-error]]
[cognitect.aws.client.api :as aws]
[cognitect.aws.credentials :as credentials]
[shared.utils :refer [decode-transit encode-transit]]))
(defn create-client
"Creates a sqs client, needed to call all sqs related functions."... |
e7cfc71856086c8fb388720a51f230c98c2a0d20d0ffad6e7149901a5f75aafc | Kappa-Dev/KappaTools | symmetries_sig.ml | *
* symmetries_sig.ml
* openkappa
* , projet Antique , INRIA Paris - Rocquencourt
*
* Creation : 2016 , the 5th of December
* Last modification : Time - stamp : < May 13 2017 >
*
* Abstract domain to record relations between pair of sites in connected agents .
*
*... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/symmetries/symmetries_sig.ml | ocaml | *
* symmetries_sig.ml
* openkappa
* , projet Antique , INRIA Paris - Rocquencourt
*
* Creation : 2016 , the 5th of December
* Last modification : Time - stamp : < May 13 2017 >
*
* Abstract domain to record relations between pair of sites in connected agents .
*
*... | |
2813fd416979ac167ab6699f186aa96e1589170087612459282703d8b6fae4a3 | manuel-serrano/hop | arraybuffer.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / hopscript / arraybuffer.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/d39336c2ca1f2f6939be8a24f99feeb9a70cc008/hopscript/arraybuffer.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop / hop / hopscript / arraybuffer.scm * /
* Author : * /
* Creation : Fri Jun 13 08:07:32 2014 * /
* Last change : Thu Aug 19 11:27:37 2021 ( serrano ) * /
* Copy... |
211576a0937a92d13ea8121e48a379319f8515ed183d7c7da5aabe01e726988c | Novus-School/novus | routes.clj | (ns novus.account.routes
(:require [novus.account.handlers :as account]
[novus.middleware :as mw]))
(def routes
["/account" {:swagger {:tags ["account"]}
:middleware [[mw/wrap-auth0]]}
[""
{:post {:handler account/create-account!
:responses {201 {:body nil?}}
... | null | https://raw.githubusercontent.com/Novus-School/novus/8a6a08c550ac48ed8adec8d52cbaed351be84b5c/novus/src/main/novus/account/routes.clj | clojure | (ns novus.account.routes
(:require [novus.account.handlers :as account]
[novus.middleware :as mw]))
(def routes
["/account" {:swagger {:tags ["account"]}
:middleware [[mw/wrap-auth0]]}
[""
{:post {:handler account/create-account!
:responses {201 {:body nil?}}
... | |
d0c09c30227e2ed00fb63a89063e0f6dfc8370b09e66c5aff64893794ed8649e | philnguyen/soft-contract | main.rkt | #lang racket/base
(require require-typed-check)
(require "zo-shell.rkt")
;; Stress tests: search entire bytecode for the fairly-common branch struct
(define SELF-TEST '("../base/zo-shell.zo" "../base/zo-find.zo" "../base/zo-string.zo" "../base/zo-transition.zo"))
(define (self-test)
(for ([b SELF-TEST]) (init (vec... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/gradual-typing-benchmarks/zordoz.6.5/main.rkt | racket | Stress tests: search entire bytecode for the fairly-common branch struct
-----------------------------------------------------------------------------
1316ms
(time (main small-test)) ;
63ms | #lang racket/base
(require require-typed-check)
(require "zo-shell.rkt")
(define SELF-TEST '("../base/zo-shell.zo" "../base/zo-find.zo" "../base/zo-string.zo" "../base/zo-transition.zo"))
(define (self-test)
(for ([b SELF-TEST]) (init (vector b "branch"))))
(define SMALL-TEST "../base/hello-world.zo")
(define (sm... |
ae179d291ee6928d738f9bdd3c3b0aaf888bbdcb202702ab25c77df440bf45f1 | lexi-lambda/racket-r7rs | cond-expand.rkt | #lang racket/base
(require (for-syntax racket/base
racket/function
syntax/parse)
(prefix-in 6: rnrs/base-6)
"import.rkt")
(provide cond-expand features)
(define-syntax supported-features
'(r7rs racket exact-closed exact-complex ieee-float full-unicode rat... | null | https://raw.githubusercontent.com/lexi-lambda/racket-r7rs/5834ec6e66f63c61589130aaebd0f25ab3eefc2b/r7rs-lib/private/cond-expand.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/function
syntax/parse)
(prefix-in 6: rnrs/base-6)
"import.rkt")
(provide cond-expand features)
(define-syntax supported-features
'(r7rs racket exact-closed exact-complex ieee-float full-unicode rat... | |
3a4008d9411a09f3abdcb3bf79aaabcb68dfe0e32792666f847af451f98a2903 | xsc/claro | juxt.cljc | (ns claro.projection.juxt
(:refer-clojure :exclude [juxt])
(:require [claro.projection.protocols :as pr]
[claro.data.error :refer [with-error?]]
[claro.data.ops.chain :as chain]))
# # Record
(deftype JuxtProjection [templates]
pr/Projection
(project [_ value]
(with-error? value
... | null | https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/projection/juxt.cljc | clojure | (ns claro.projection.juxt
(:refer-clojure :exclude [juxt])
(:require [claro.projection.protocols :as pr]
[claro.data.error :refer [with-error?]]
[claro.data.ops.chain :as chain]))
# # Record
(deftype JuxtProjection [templates]
pr/Projection
(project [_ value]
(with-error? value
... | |
cdf52de992ef12b7405ab528d135d8a747d7ebd00c15f9a1118b138f24b580da | FundingCircle/fc4-framework | runner.clj | (ns fc4.test-runner.runner
"This works just fine for local dev/test use cases but is also fine-tuned to
serve our needs when run in this project’s CI service (CircleCI)."
(:require [clojure.test]
[eftest.report :as report :refer [report-to-file]]
[eftest.report.progress :as progre... | null | https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/test/fc4/test_runner/runner.clj | clojure | Now bind the clojure.test/*report-counters* to nil and then run the rest
of the functions, so as to avoid double-counting of the assertions,
Our project has CI test jobs that run on the CircleCI machine executors using the
In order to optimize for wall-clock time, we want to run the tests across all available vCPU... | (ns fc4.test-runner.runner
"This works just fine for local dev/test use cases but is also fine-tuned to
serve our needs when run in this project’s CI service (CircleCI)."
(:require [clojure.test]
[eftest.report :as report :refer [report-to-file]]
[eftest.report.progress :as progre... |
25e1b104cc5438e1381fd489b7576d123da2a5fd6f89499e8e854c1c4f084beb | acieroid/scala-am | scheme.scm | SCHEME -- A Scheme interpreter evaluating a sort , written by .
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(define (scheme-eval expr)
(let ((code (scheme-comp expr scheme-global-environment)))
(code #f)))
(define scheme-global-environment
(cons '() ; environment cha... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changes/scheme/scheme.scm | scheme | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
environment chain
macros
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -... | SCHEME -- A Scheme interpreter evaluating a sort , written by .
(define (scheme-eval expr)
(let ((code (scheme-comp expr scheme-global-environment)))
(code #f)))
(define scheme-global-environment
(define (scheme-add-macro name proc)
(set-cdr! scheme-global-environment
(cons (cons name proc) ... |
8add2e0cf54356d03bb0f5915a45179c7218fd18aa97ba53e9fd66d7403e4c91 | snowleopard/hadrian | Configure.hs | module Settings.Builders.Configure (configureBuilderArgs) where
import Packages
import Rules.Gmp
import Settings.Builders.Common
configureBuilderArgs :: Args
configureBuilderArgs = do
gmpPath <- expr gmpBuildPath
libffiPath <- expr libffiBuildPath
mconcat [ builder (Configure gmpPath) ? do
... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Settings/Builders/Configure.hs | haskell | TODO: add support for yes | module Settings.Builders.Configure (configureBuilderArgs) where
import Packages
import Rules.Gmp
import Settings.Builders.Common
configureBuilderArgs :: Args
configureBuilderArgs = do
gmpPath <- expr gmpBuildPath
libffiPath <- expr libffiBuildPath
mconcat [ builder (Configure gmpPath) ? do
... |
4b72e5e22dbb2d93a0d7cdf77ec605eee9f254cc7b9031723ab2744eacc28713 | Sudha247/ocaml5-tutorial-icfp-22 | nqueens.ml | module T = Domainslib.Task
let rec ok i j k xs =
match xs with
| [] -> true
| h::t -> h<>i && h<>j && h<>k && ok i (j+1) (k-1) t
let rec _nqueens_seq n j xs =
match n with
| n when n = j -> 1
| _ -> begin
let count = ref 0 in
for i = 0 to n-1 do
if ok i (i+1) (i-1) xs then
... | null | https://raw.githubusercontent.com/Sudha247/ocaml5-tutorial-icfp-22/7f04991a10270e5f5be0d2b1b6d931b242f4d3a2/code/parallel/nqueens.ml | ocaml | module T = Domainslib.Task
let rec ok i j k xs =
match xs with
| [] -> true
| h::t -> h<>i && h<>j && h<>k && ok i (j+1) (k-1) t
let rec _nqueens_seq n j xs =
match n with
| n when n = j -> 1
| _ -> begin
let count = ref 0 in
for i = 0 to n-1 do
if ok i (i+1) (i-1) xs then
... | |
73b50ec112ca1acef3b3d61f650a984b759611622dfc75d9587e6dd4bfb103ca | omnyway-labs/vulcan | deps.clj | (ns vulcan.deps
(:refer-clojure :exclude [flatten resolve])
(:require
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.tools.reader.edn :as edn]
[clojure.tools.deps.alpha.util.maven :as mvn]
[vulcan.util :as u]
[vulcan.deps.upgrade :as up]
[vulcan.deps.classpath :as cp]
[vulcan.dep... | null | https://raw.githubusercontent.com/omnyway-labs/vulcan/9cebe1f666b323080689b5283f313bd2292375fc/src/vulcan/deps.clj | clojure | (ns vulcan.deps
(:refer-clojure :exclude [flatten resolve])
(:require
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.tools.reader.edn :as edn]
[clojure.tools.deps.alpha.util.maven :as mvn]
[vulcan.util :as u]
[vulcan.deps.upgrade :as up]
[vulcan.deps.classpath :as cp]
[vulcan.dep... | |
055857238aae40c32b3e77d3f91a475209c67db5de93fb858040c1b124e08607 | karamellpelle/grid | Make.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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 optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/Grid/GridWorld/Make.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
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
module Game.Grid.GridWorld.Make
(
makeGridWor... |
340e37bdf51721af9908e56d95526fe481f56d188baa9859b1746b970a457e3c | kindista/kindista | requests.lisp | Copyright 2012 - 2016 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at you... | null | https://raw.githubusercontent.com/kindista/kindista/60da1325e628841721200aa00e4de5f9687c0adb/src/features/requests.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
now using publish-facebook-action to get action-id
"/")
(get-parameter-integer ... | Copyright 2012 - 2016 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distr... |
6cf1422596029e01336066451f630a6e6026eb5afef28705da648c7c7875e307 | jakemcc/sicp-study | 1.46.clj | Exercise 1.46
(defn iterative-improve [good? improve-guess]
(fn [guess]
(loop [previous-guess guess
current-guess (improve-guess guess)]
(if (good? previous-guess current-guess)
current-guess
(recur current-guess (improve-guess current-guess))))))
; Redefine sqrt from section 1.1.7 usin... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section1.3/1.46.clj | clojure | Redefine sqrt from section 1.1.7 using iterative-improve
Redefine fixed-point of section 1.3.3 to use iterative-improve
Procedure to show that fixed-point works | Exercise 1.46
(defn iterative-improve [good? improve-guess]
(fn [guess]
(loop [previous-guess guess
current-guess (improve-guess guess)]
(if (good? previous-guess current-guess)
current-guess
(recur current-guess (improve-guess current-guess))))))
(defn average [x y]
(/ (+ x y) 2))
... |
4d6e193419d622c83cb629a134b3b3af252e004cfe8137fd5a794c952d49b799 | rm-hull/big-bang | sprite.cljs | (ns big-bang.examples.pacman.sprite
(:require [big-bang.examples.pacman.config :refer [cell-size] :as config]
[big-bang.examples.pacman.util :refer [posn]]))
(defn- frames
"Returns a function which given a frame number, will return the appropriate
frame reference."
[& frame-refs]
(let [v (mapv v... | null | https://raw.githubusercontent.com/rm-hull/big-bang/2825e7f0bb7615e1158a72d58f426bc1e33bd9ef/examples/pacman/src/sprite.cljs | clojure | red
pink
cyan
orange | (ns big-bang.examples.pacman.sprite
(:require [big-bang.examples.pacman.config :refer [cell-size] :as config]
[big-bang.examples.pacman.util :refer [posn]]))
(defn- frames
"Returns a function which given a frame number, will return the appropriate
frame reference."
[& frame-refs]
(let [v (mapv v... |
5229e9d45d6cdff9a4b18f98f9d4b15206ec0b69569a40ddbca6c7126789e563 | fortytools/holumbus | PkgIndexerCore.hs | {-# LANGUAGE OverloadedStrings #-}
-- ------------------------------------------------------------
module Hayoo.Hunt.PkgIndexerCore
where
import Control.Applicative ((<$>))
import Control.DeepSeq
import Data.Binary (Binary)
import qualified Data.Binary ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Hayoo/HayooIndexer/Hayoo/Hunt/PkgIndexerCore.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
no words found in document,
so there are no refs in index
and document is thrown away
add "package"... |
module Hayoo.Hunt.PkgIndexerCore
where
import Control.Applicative ((<$>))
import Control.DeepSeq
import Data.Binary (Binary)
import qualified Data.Binary as B
import qualified Data.StringMap.Strict as M
import qualified Data.Text ... |
a3f63b3b2feab3c236e04bd8a1da60d936d9ca1bb3b51e75259b175071c73183 | dmitryvk/sbcl-win32-threads | parms.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/alpha/parms.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
the natural width of a machine word (as seen in e.g. register width,
address space)
number of bits per byte where a byte is the smallest addr... | This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(eval-when (:compile-toplevel :load-toplevel :execute)
number of bits per word where a word holds on... |
07d5a9c11d1150730f5071a5515d8c5bad040dac632c84062444fbb004bd3fe9 | input-output-hk/qeditas | assets.mli | Copyright ( c ) 2015 - 2016 The Qeditas developers
Distributed under the MIT software license , see the accompanying
file COPYING or -license.php .
file COPYING or -license.php. *)
open Hash
open Db
open Mathdata
type obligation = (payaddr * int64 * bool) option
type preasset =
| Currency of int64
| ... | null | https://raw.githubusercontent.com/input-output-hk/qeditas/f4871bd20833cd08a215f9d5fc9df2d362cba410/src/assets.mli | ocaml | ** asset is (assetid,birthday,obligation,preasset) ** | Copyright ( c ) 2015 - 2016 The Qeditas developers
Distributed under the MIT software license , see the accompanying
file COPYING or -license.php .
file COPYING or -license.php. *)
open Hash
open Db
open Mathdata
type obligation = (payaddr * int64 * bool) option
type preasset =
| Currency of int64
| ... |
983ff11039b56b578c9a802a4f94a06703833aa6d63599bb3592f88e9a0660cc | sgbj/MaximaSharp | compat.lisp | (in-package :maxima)
( format t " ~%The functions ~/maxima::tilde - are inverses "
;; (st-rat #$[x+1,1/(x+1)]$))
should print : The functions x+1 and 1/(x+1 ) are inverses
;; See the last part of polyb for the definition of FSH.
(defun tilde-q-fsh (stream arg colonp at-p) ;atp is special...
(declare (ignore... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/affine/compat.lisp | lisp | (st-rat #$[x+1,1/(x+1)]$))
See the last part of polyb for the definition of FSH.
atp is special... | (in-package :maxima)
( format t " ~%The functions ~/maxima::tilde - are inverses "
should print : The functions x+1 and 1/(x+1 ) are inverses
(declare (ignore colonp at-p))
(fsh arg stream))
|
94cfec0342cb9d0f1009788982fb88364162847e74e25e71b9e05a529a15d092 | yetanalytics/datasim | http.clj | (ns com.yetanalytics.datasim.onyx.http
(:require [cheshire.core :as json]))
(defn after-read-batch
"Encode statements and add request"
[event {lrs-request ::lrs-request
:as lifecycle}]
(update event
:onyx.core/batch
(partial map
(fn [{:keys [statements]
... | null | https://raw.githubusercontent.com/yetanalytics/datasim/d55f24098aca78db69e2f03d4f202ce58b5fdb49/src/onyx/com/yetanalytics/datasim/onyx/http.clj | clojure | TODO: Buffr | (ns com.yetanalytics.datasim.onyx.http
(:require [cheshire.core :as json]))
(defn after-read-batch
"Encode statements and add request"
[event {lrs-request ::lrs-request
:as lifecycle}]
(update event
:onyx.core/batch
(partial map
(fn [{:keys [statements]
... |
1eaa2d4911428a41d91d3af56a8f7705b82c0d8e51c9b1ede68e917572fb375a | txyyss/Project-Euler | Euler001.hs | If we list all the natural numbers below 10 that are multiples of 3
or 5 , we get 3 , 5 , 6 and 9 . The sum of these multiples is 23 .
Find the sum of all the multiples of 3 or 5 below 1000 .
module Euler001 where
-- naive version
result001 = sum [x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0]
-- more e... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler001.hs | haskell | naive version
more efficient version | If we list all the natural numbers below 10 that are multiples of 3
or 5 , we get 3 , 5 , 6 and 9 . The sum of these multiples is 23 .
Find the sum of all the multiples of 3 or 5 below 1000 .
module Euler001 where
result001 = sum [x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0]
sumDivisibleBy :: Integral... |
58017683c0afedfe9cd5d0078c2c895177e6e0a6bae836b8b7094d755e17ea5f | aysylu/loom | derived.cljc | (ns loom.test.derived
(:require [loom.derived :refer [mapped-by nodes-filtered-by edges-filtered-by
subgraph-reachable-from bipartite-subgraph]]
[loom.graph :refer (graph digraph edges)]
[loom.alg :refer (eql?)]
#?@(:clj [[clojure.test :refer :all]... | null | https://raw.githubusercontent.com/aysylu/loom/bb9068c5c5f4c3cf66344bf1b966cfd730e92693/test/loom/test/derived.cljc | clojure | digraph | (ns loom.test.derived
(:require [loom.derived :refer [mapped-by nodes-filtered-by edges-filtered-by
subgraph-reachable-from bipartite-subgraph]]
[loom.graph :refer (graph digraph edges)]
[loom.alg :refer (eql?)]
#?@(:clj [[clojure.test :refer :all]... |
a239a4dae52400a8e7de1fa44780cc4f8fff2a3ebb6f8740d07714dc99c885e1 | jeromesimeon/Galax | dm_atomic_btree.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/dm/atomic/dm_atomic_btree.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : dm_atomic_btree.ml , v 1.5 2007/02/01 22:08:46 simeon Exp $
open Dm_atomic
type key = atomicValue
type position = int
type 'a pair = (key * 'a)
type 'a btree = 'a pair array
Comparison between points and elements of ... |
4db267072fbcf22d681b5c981082d705623403faaee5b533523127310b913f2b | screenshotbot/screenshotbot-oss | swt_buttons.lisp | ;;;
(in-java-context "hello-swt")
(java-import "org.eclipse.swt.*")
(java-import "org.eclipse.swt.widgets.*")
(java-import "org.eclipse.swt.layout.*")
(defun button1-pushed (event data)
(declare (ignore event data))
(format t "~&Button 1 was pushed.~%")
)
(defun button2-pushed (event data)
(declare (ignore... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/fb88dc205c052caf98d6833d03594323390800d3/third-party/cl%2Bj-0.4/demos/swt_buttons.lisp | lisp |
(in-java-context "hello-swt")
(java-import "org.eclipse.swt.*")
(java-import "org.eclipse.swt.widgets.*")
(java-import "org.eclipse.swt.layout.*")
(defun button1-pushed (event data)
(declare (ignore event data))
(format t "~&Button 1 was pushed.~%")
)
(defun button2-pushed (event data)
(declare (ignore eve... | |
5ffa1795dff7ba623ccca6f0b60824582a2bd9391d9bfefb741a9e633d4962b5 | acieroid/scala-am | graphs.scm | GRAPHS -- Obtained from .
(define fold
(lambda (lst folder state)
(do ((lst lst
(cdr lst))
(state state
(folder (car lst)
state)))
((null? lst)
state))))
(define proc->vector
(lambda (size f)
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/gambit/graphs.scm | scheme | GRAPHS -- Obtained from .
(define fold
(lambda (lst folder state)
(do ((lst lst
(cdr lst))
(state state
(folder (car lst)
state)))
((null? lst)
state))))
(define proc->vector
(lambda (size f)
... | |
2f36f1da1bd15fdbd03a76996269f79f82465b22bf1c9357f4891f42c2aab893 | jiangpengnju/htdp2e | ex165.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 ex165) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/more-on-lists/ex165.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design the function subst-robot, which consumes a list of toy descriptions (strings)
and places all occurrences of "robot" with "r2d2";
all other descriptions remain the same.
strings, called new and old, and a list of strings. It p... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex165) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
subst - robot to the function substitute . The new function co... |
d6849f58c7324fb5b36baf92af2efdc6ec4f3f3cb5ae4995d587a4e5c7ba22c2 | revnull/noisefunge-legacy | nfviewer.hs |
This source file is a part of the noisefunge programming environment .
Copyright ( C ) 2015 Rev. < >
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... | null | https://raw.githubusercontent.com/revnull/noisefunge-legacy/fc43cd4b024d26650818280403eee21fc6e0fcf6/nfviewer/nfviewer.hs | haskell |
This source file is a part of the noisefunge programming environment .
Copyright ( C ) 2015 Rev. < >
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... | |
e2a0953344de228154f4f72ae7c564473eeb362baaccaaedfe8423f19cadabbc | jiangpengnju/htdp2e | definition-of-on-the-order-of.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 definition-of-on-the-order-of) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/intermezzo-the-cost-of-computation/definition-of-on-the-order-of.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname definition-of-on-the-order-of) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.