_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
8f5e7c5daab97aea7c811449abd230c994652c45e98ef7e7aae3decbcfeaf0ab
aphyr/clj-antlr
interpreted.clj
(ns clj-antlr.interpreted "Interpreter for antlr grammars. Slightly slower, but easier to use than the full antlr compilation process." (:require [clj-antlr.common :as common] [clj-antlr.proto :as proto]) (:import (java.lang ThreadLocal) (org.antlr.v4 Tool) (org.antlr.v4.tool ...
null
https://raw.githubusercontent.com/aphyr/clj-antlr/d82f80e4d63341d4e04c81dc01a23321e2a2fc21/src/clj_antlr/interpreted.clj
clojure
"Builds a new parser interpreter around a given grammar and lexer." [^Grammar grammar ^Lexer lexer] (.createParserInterpreter grammar (common/tokens lexer))) Re-uses the same lexer and parser each time. Note that the :tokens and :parser returned by (parse) may be mutated at any time; they should only be...
(ns clj-antlr.interpreted "Interpreter for antlr grammars. Slightly slower, but easier to use than the full antlr compilation process." (:require [clj-antlr.common :as common] [clj-antlr.proto :as proto]) (:import (java.lang ThreadLocal) (org.antlr.v4 Tool) (org.antlr.v4.tool ...
7b3658b48ac9222f2af654039d122c0f24d8d7ccab6d25501bd36f7a543b63a9
Zeta611/L
util.mli
exception VersionError of string val get_program : in_channel -> L.prog val check_version : int -> L.expr -> unit
null
https://raw.githubusercontent.com/Zeta611/L/1e1b1ca363e5ce5fae6c3b643f6ba3920f39c90a/lib/util.mli
ocaml
exception VersionError of string val get_program : in_channel -> L.prog val check_version : int -> L.expr -> unit
83fb7401a687a08cb651edb2391f140cde1dc1c63b3ab60e3a5aab7eca59639f
camsaul/methodical
macros.clj
(ns methodical.macros "Methodical versions of vanilla Clojure [[defmulti]] and [[defmethod]] macros." (:refer-clojure :exclude [defmulti defmethod]) (:require [clojure.core.specs.alpha] [clojure.spec.alpha :as s] [clojure.string :as str] [methodical.impl :as impl] [methodical.interface :as i] [m...
null
https://raw.githubusercontent.com/camsaul/methodical/258d0d12e4b25077574bd1ad4a8b4cfaa9c2910b/src/methodical/macros.clj
clojure
for the specs below not sure how to validate this. Is there a predicate for something that can be used as a spec? [[clojure.spec.alpha/spec]] will happily turn random things into specs for us do a "soft" cut here where any map argument is always interpreted as an attribute map, and only later subject attach the ...
(ns methodical.macros "Methodical versions of vanilla Clojure [[defmulti]] and [[defmethod]] macros." (:refer-clojure :exclude [defmulti defmethod]) (:require [clojure.core.specs.alpha] [clojure.spec.alpha :as s] [clojure.string :as str] [methodical.impl :as impl] [methodical.interface :as i] [m...
165c5b5b4aab21d6918316d52a7153ee44d534ddf99557db21edf55225e17c7f
tlikonen/cl-enchant
load-enchant.lisp
(cl:eval-when (:load-toplevel :execute) (cffi:load-foreign-library '(:or (:default "libenchant-2") (:default "libenchant"))))
null
https://raw.githubusercontent.com/tlikonen/cl-enchant/b26850625b73c4b6f0edceb60b8d81cf130c525e/load-enchant.lisp
lisp
(cl:eval-when (:load-toplevel :execute) (cffi:load-foreign-library '(:or (:default "libenchant-2") (:default "libenchant"))))
9aec0a72f4b6cd5e8173dcdf33bb6dfb62a318f0cf7625d72c5bd85da0fa910e
threatgrid/ctia
scalars.clj
(ns ctia.schemas.graphql.scalars (:require [clj-momo.lib.clj-time.coerce :as time-coerce]) (:import [graphql.schema GraphQLScalarType Coercing])) type (def GraphQLDate (GraphQLScalarType. "DATE" "Date" (reify Coercing (serialize [_ ^Object input] (-> input time-coerce/from-dat...
null
https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/src/ctia/schemas/graphql/scalars.clj
clojure
(ns ctia.schemas.graphql.scalars (:require [clj-momo.lib.clj-time.coerce :as time-coerce]) (:import [graphql.schema GraphQLScalarType Coercing])) type (def GraphQLDate (GraphQLScalarType. "DATE" "Date" (reify Coercing (serialize [_ ^Object input] (-> input time-coerce/from-dat...
e95aad7c2c2f56698552b2ab29ffff353480bd3e68c5193eab3092c64dc3e6c1
copton/bitcoin-script-tools
Main.hs
module Main (main) where import Language.Bitcoin.Main (main)
null
https://raw.githubusercontent.com/copton/bitcoin-script-tools/078a021a5cdebea50b8a2f28bf452792cae7feaf/src/Main.hs
haskell
module Main (main) where import Language.Bitcoin.Main (main)
f06fa1dfad67278a861f6e379f2d31dd3775d932cf4595fae80993976e1a7e72
objmagic/LR
hmap.ml
module type OrderedType = sig type 'a t type 'a value val compare : 'a t -> 'b t -> ('a, 'b) Ordering.ordering end module type S = sig type _ key type _ value type t type iter = {iter: 'a. 'a key -> 'a value -> unit} type 'b fold = {fold: 'a. 'a key -> 'a value -> 'b -> 'b} val empty : t val is_emp...
null
https://raw.githubusercontent.com/objmagic/LR/4bfc2ea57a4092f75c627ad6b58067e9822a43f0/hmap.ml
ocaml
handle scope escaping
module type OrderedType = sig type 'a t type 'a value val compare : 'a t -> 'b t -> ('a, 'b) Ordering.ordering end module type S = sig type _ key type _ value type t type iter = {iter: 'a. 'a key -> 'a value -> unit} type 'b fold = {fold: 'a. 'a key -> 'a value -> 'b -> 'b} val empty : t val is_emp...
4f4b12851407130fd12f7bfa3efe03ab946d4dde7cc7b9db796717ba7cf56620
fantasytree/fancy_game_server
test_client_open_rpc.erl
%%---------------------------------------------------- %% 客户端连接测试 %%---------------------------------------------------- -module(test_client_open_rpc). -export([ handle/3 ] ). -include("common.hrl"). -include("tester.hrl"). handle(login, [Account, Platform, ZoneId], _T) -> SessionId = <<>>, tester:...
null
https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/tester/test_client_open_rpc.erl
erlang
---------------------------------------------------- 客户端连接测试 ---------------------------------------------------- ========================================================================= self() ! connected_zone, 容错处理
-module(test_client_open_rpc). -export([ handle/3 ] ). -include("common.hrl"). -include("tester.hrl"). handle(login, [Account, Platform, ZoneId], _T) -> SessionId = <<>>, tester:pack_send(1001, {Account, Platform, ZoneId, SessionId}), ok; handle(1001, {?false, _Msg}, _T = #tester{account = _A...
0124a3238ba9e6fdaf9a29929bb484368f64917e5824d574dc5b855d62b5b584
yuriy-chumak/ol
multitexture.scm
; =========================================================================== ARB_multitexture ( included in OpenGL 1.3 ) ; ; ; ; Version ; ; Overview ; (define-library (OpenGL ARB multitexture) ; --------------------------------------------------------------------------- ; Depend...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/5f40dbd0b113ffd2579807d003ccfcfe21124589/libraries/OpenGL/ARB/multitexture.scm
scheme
=========================================================================== Version Overview --------------------------------------------------------------------------- Dependencies --------------------------------------------------------------------------- -------------------------------------------------...
ARB_multitexture ( included in OpenGL 1.3 ) (define-library (OpenGL ARB multitexture) (import (scheme core) (OpenGL platform)) (export ARB_multitexture void GLenum texture ) void GLenum texture ) void ) void * ) void GLenum GLfloat s ) void GLenum GLfloat * ) v...
6f03e90181dd60e46c749e5ab02368348e19cd5380ac2a79afd9243052cc2261
emil0r/reverie
core.clj
(ns reverie.core (:require [clojure.spec.alpha :as spec] [clojure.string :as str] [reverie.area :as a] [reverie.i18n :as i18n] [reverie.helpers.middleware :refer [wrap-response-with-handlers]] [reverie.http.route :as route] [reverie.module :as mo...
null
https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-core/src/reverie/core.clj
clojure
check for an override and the validity of the name have we designed the renderer to be overriding another renderer?
(ns reverie.core (:require [clojure.spec.alpha :as spec] [clojure.string :as str] [reverie.area :as a] [reverie.i18n :as i18n] [reverie.helpers.middleware :refer [wrap-response-with-handlers]] [reverie.http.route :as route] [reverie.module :as mo...
dad6b10ebef608be60c21d76adb68fe71caa9fa432d99e5781d5debc62aa4b40
8bitgentleman/Roam-Render-Components
shopping-list-sum.cljs
(ns shopping-sum-v2 (:require [reagent.core :as r] [datascript.core :as d] [roam.datascript.reactive :as dr] [clojure.pprint :as pp])) (defn flatten-block "Flattens a blocks children into a flat list" [acc block] (reduce flatten-block (conj acc (dissoc block :block/children)) ...
null
https://raw.githubusercontent.com/8bitgentleman/Roam-Render-Components/accf6512109c6b8d9172bdbef8acc32690db0e2e/Shopping%20List%20Sum/shopping-list-sum.cljs
clojure
(ns shopping-sum-v2 (:require [reagent.core :as r] [datascript.core :as d] [roam.datascript.reactive :as dr] [clojure.pprint :as pp])) (defn flatten-block "Flattens a blocks children into a flat list" [acc block] (reduce flatten-block (conj acc (dissoc block :block/children)) ...
e69c8df25bc78de02d446f89633d9cb0e04a8542a6786c1e35ac0d8b37bb29b6
facebookarchive/pfff
ast_csharp.ml
* * Copyright ( C ) 2010 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_csharp/parsing/ast_csharp.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** *************************************************************************** -----...
* * Copyright ( C ) 2010 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
51db98b3970fc554479b4987f4f593374bc3f6e67ffee9e6c4230f791b8a3ad2
jwiegley/notes
Nixpkgs.hs
module Nixpkgs where import Control.Lens import Data.Map type Pkgs = Map String String An extension function always receives two arguments : self and super . -- -- 'super' is the package set state *up to that override function*. Thus, you -- can always refer to entries in 'super' without fear of infinite recursion...
null
https://raw.githubusercontent.com/jwiegley/notes/7d60f42981d636b0bed1499e9c58b481eb5604d7/haskell/Nixpkgs.hs
haskell
'super' is the package set state *up to that override function*. Thus, you can always refer to entries in 'super' without fear of infinite recursion. 'self' is the completed package set after all overrides have been performed. This works due to laziness, and requires that every tree of attributes forced after ov...
module Nixpkgs where import Control.Lens import Data.Map type Pkgs = Map String String An extension function always receives two arguments : self and super . override1 :: Pkgs -> Pkgs -> Pkgs override1 self super = super & at "alpha" ?~ "beta" & at "foo" ?~ super ^?! ix "foo" ++ self ^?! ix "alph...
640f87e434377422bae799a99fa8efbaf6d75bce5fec3bbeda9e93c50bfacbf6
typedclojure/typedclojure
spec.cljc
(ns typed.clj.annotator.frontend.spec (:require [typed.clj.annotator.util :refer [qualify-spec-symbol kw-val? nil-val? *preserve-unknown* qualify-core-symbol kw->sym list*-force current-ns ...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/ed2e68f8955a4b5925077b5bd0e6d789d376e016/typed/clj.annotator/src/typed/clj/annotator/frontend/spec.cljc
clojure
Answers: is this a good alias to generate `s/keys`? if we have a bunch of maps with a similar key, _ (prn "top-level-var" top-level-def top-level-var) _ (prn "arglists" arglists) prefer actual fixed arguments over derived ones _ (prn "fixed-arglists" fixed-arglists) _ (prn "rest-arglist" rest-arglist) map from arit...
(ns typed.clj.annotator.frontend.spec (:require [typed.clj.annotator.util :refer [qualify-spec-symbol kw-val? nil-val? *preserve-unknown* qualify-core-symbol kw->sym list*-force current-ns ...
5411465751e2db6e5933578708b98f4741aa3632567c5673c830721be9e70db8
BetterThanTomorrow/joyride
require_js_from_subdir.cljs
(ns subdir.require-js-from-subdir (:require ["../js-file.js" :as js-file])) (defn hello [] (js-file/hello)) (def fortytwo js-file/fortytwo) (comment (hello) fortytwo :rcf) fortytwo
null
https://raw.githubusercontent.com/BetterThanTomorrow/joyride/760e24ba61e0454f715b15ed29b7ed3d0ca01312/vscode-test-runner/workspace-1/.joyride/src/subdir/require_js_from_subdir.cljs
clojure
(ns subdir.require-js-from-subdir (:require ["../js-file.js" :as js-file])) (defn hello [] (js-file/hello)) (def fortytwo js-file/fortytwo) (comment (hello) fortytwo :rcf) fortytwo
1908be9af56198d8c6ad1b545412065240c68b814da4aa2d61824ec7d713e0a7
racket/libs
info.rkt
#lang setup/infotab SPDX - License - Identifier : ( Apache-2.0 OR MIT ) (define collection 'multi) (define deps '("base")) (define pkg-desc "native libraries for \"racket\" package") (define pkg-authors '(mflatt)) (define license '((Apache-2.0 OR MIT) AND (LGPL-3.0-or-later AND OpenSSL)))
null
https://raw.githubusercontent.com/racket/libs/ebcea119197dc0cb86be1ccbbfbe5806f7280976/racket-win32-x86_64-2/info.rkt
racket
#lang setup/infotab SPDX - License - Identifier : ( Apache-2.0 OR MIT ) (define collection 'multi) (define deps '("base")) (define pkg-desc "native libraries for \"racket\" package") (define pkg-authors '(mflatt)) (define license '((Apache-2.0 OR MIT) AND (LGPL-3.0-or-later AND OpenSSL)))
44ec25132d86b56a836319b86426073cd4c20a1545069f20003974f14b81be1e
jarcane/heresy
celebrate.rkt
#lang heresy (def fn celebrate () (for (x in (range 0 to 9) with "!") (do (print (& "Heresy is 1 year old" cry)) (carry (& "!" cry))))) (celebrate)
null
https://raw.githubusercontent.com/jarcane/heresy/a736b69178dffa2ef97f5eb5204f3e06840088c2/examples/celebrate.rkt
racket
#lang heresy (def fn celebrate () (for (x in (range 0 to 9) with "!") (do (print (& "Heresy is 1 year old" cry)) (carry (& "!" cry))))) (celebrate)
10895921519f85d42536b15acd6ae9b172bbabd4d4bb787f4369f4290e37fe72
Tim-ats-d/Macron
settings.mli
type t = { mode : mode; mouse_filename : string; keyboard_filename : string } and mode = [ `both | `keyboard | `mouse ] val parse : string -> (t, string) result
null
https://raw.githubusercontent.com/Tim-ats-d/Macron/bf9170f98d46b4388b323f31f1d860c2f9d699eb/lib/config/settings.mli
ocaml
type t = { mode : mode; mouse_filename : string; keyboard_filename : string } and mode = [ `both | `keyboard | `mouse ] val parse : string -> (t, string) result
285a1bae651d77e931d0014bd34795097a337fcd2c47c224f173ca8a31571804
gildor478/ocaml-gettext
gettextMo.ml
(**************************************************************************) (* ocaml-gettext: a library to translate messages *) (* *) Copyright ( C ) 2003 - 2008 < > (* ...
null
https://raw.githubusercontent.com/gildor478/ocaml-gettext/9b7afc702bccace9a544b8efa2a28bc2b13371ed/src/lib/gettext/base/gettextMo.ml
ocaml
************************************************************************ ocaml-gettext: a library to translate messages This library is free softw...
Copyright ( C ) 2003 - 2008 < > License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version ; You should have received a copy of the GNU Lesser General Public License along with this library ; if not ,...
6507cdc2b2f9554f44c93788913313a7fece4f88b6416e71900549a698e00bee
TaktInc/reflex-dhtmlx
Main.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RecursiveDo # module Main (main) where import Control.Monad.IO.Class (liftIO) import qualified Data.Text as T import Data....
null
https://raw.githubusercontent.com/TaktInc/reflex-dhtmlx/32de222bf365454d4022ae89d85b29efdb09dac4/reflex-dhtmlx-example/src/Main.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # posix only | It's important that we do not use @mainWidget@ here. If you create the dhtmlx calendar on page load, like in this example, it needs to attach the calendar "base" to "document.body". If we use @mainWid...
# LANGUAGE FlexibleContexts # # LANGUAGE RecursiveDo # module Main (main) where import Control.Monad.IO.Class (liftIO) import qualified Data.Text as T import Data.Time.Clock (addUTCTime, getCurrentTime, utctDay) ...
2acae1fd46d3f7b483da21ec05f9be344a1d376ac044338f9531886582034493
gedge-platform/gedge-platform
rabbit_federation_sup.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 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_federation_sup). -behaviour(super...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_federation/src/rabbit_federation_sup.erl
erlang
Supervises everything. There is just one of these. This supervisor needs to be part of the rabbit application since a) it needs to be in place when exchange recovery takes place b) it needs to go up and down with rabbit ---------------------------------------------------------------------------- -----------------...
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 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_federation_sup). -behaviour(supervisor)...
b748202988fa302bdc0b322da60d2be52996a9b27f3434404f873c8f509c5e1c
elsys/fp-haskell
AST.hs
module AST where data ArithOp = Add | Sub | Mul | Div deriving (Show) data Value = IntValue Int | Function String [String] Expr deriving (Show) data Expr = Constant Int | Arith ArithOp Expr Expr | Var String | Application Expr [Expr] deriving (Show) ...
null
https://raw.githubusercontent.com/elsys/fp-haskell/9a2d0cf8b99739c4fee21dc2e2d142de8e87df73/exercises/funky/03-all/AST.hs
haskell
module AST where data ArithOp = Add | Sub | Mul | Div deriving (Show) data Value = IntValue Int | Function String [String] Expr deriving (Show) data Expr = Constant Int | Arith ArithOp Expr Expr | Var String | Application Expr [Expr] deriving (Show) ...
432437934d719e16be4d18d2f6f155ad9fe4d443f137ef82edac821e913e1ea6
purerl/purerl
Run.hs
# LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE PartialTypeSignatures # # LANGUAGE BlockArguments # module Language.PureScript.Erl.Run where import Prelude.Compat import System.IO import Control.Monad (when) import qualified Language.PureScr...
null
https://raw.githubusercontent.com/purerl/purerl/d4c933b36dfaed8f4ae4e07a8806cf8a822885f4/src/Language/PureScript/Erl/Run.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE PartialTypeSignatures # # LANGUAGE BlockArguments # module Language.PureScript.Erl.Run where import Prelude.Compat import System.IO import Control.Monad (when) import qualified Language.PureScript as P import Data.Text...
a9e137c02f1cfd2497c34389f4f58369c0765b4789125e8bc86e1ecc155a11c6
BitGameEN/bitgamex
jiffy_11_proper_tests.erl
This file is part of Jiffy released under the MIT license . % See the LICENSE file for more information. -module(jiffy_11_proper_tests). -ifdef(JIFFY_DEV). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("jiffy_util.hrl"). opts() -> [ {max_size, 15}, ...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/jiffy/test/jiffy_11_proper_tests.erl
erlang
See the LICENSE file for more information. io:format(standard_error, "Data: ~p~n", [Data]), JSON Generation XXX: Add generators We should add generators that generate JSON binaries directly so we can test things that aren't produced by the encoder. We should also have a version of the JSON generator that insert...
This file is part of Jiffy released under the MIT license . -module(jiffy_11_proper_tests). -ifdef(JIFFY_DEV). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("jiffy_util.hrl"). opts() -> [ {max_size, 15}, {numtests, 1000} ]. run(Name) -> {...
22f11de7462b8424ff379d2fa5e12e9feab076fcf2a7d6659cc9f948c766216d
aeternity/aeternity
aest_genesis_SUITE.erl
-module(aest_genesis_SUITE). %=== EXPORTS =================================================================== % Common Test exports -export([all/0]). -export([init_per_suite/1]). -export([init_per_testcase/2]). -export([end_per_testcase/2]). -export([end_per_suite/1]). % Test cases -export([ test_node_starts_wit...
null
https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/system_test/common/aest_genesis_SUITE.erl
erlang
=== EXPORTS =================================================================== Common Test exports Test cases === INCLUDES ================================================================== === COMMON TEST FUNCTIONS ===================================================== === TEST CASES ================================...
-module(aest_genesis_SUITE). -export([all/0]). -export([init_per_suite/1]). -export([init_per_testcase/2]). -export([end_per_testcase/2]). -export([end_per_suite/1]). -export([ test_node_starts_with_30k_accounts/1 ]). -import(aest_nodes, [ setup_nodes/2, start_node/2, wait_for_value/4, wait_for_...
8fafda090b89275ebdd5cf833c4f38080f114c8e481723c5abb0ec3ba5828123
gar1t/psycho
sample_proc.erl
-module(sample_proc). -behavior(proc). -export([start_link/0, ping/1, ping_async/1]). -export([handle_msg/3]). start_link() -> proc:start_link(?MODULE, []). ping(Proc) -> proc:call(Proc, ping). ping_async(Proc) -> proc:call(Proc, ping_async). handle_msg(ping, _From, State) -> {reply, pong, State}...
null
https://raw.githubusercontent.com/gar1t/psycho/6335b9c27559f417e613372776edbea760720559/src/sample_proc.erl
erlang
-module(sample_proc). -behavior(proc). -export([start_link/0, ping/1, ping_async/1]). -export([handle_msg/3]). start_link() -> proc:start_link(?MODULE, []). ping(Proc) -> proc:call(Proc, ping). ping_async(Proc) -> proc:call(Proc, ping_async). handle_msg(ping, _From, State) -> {reply, pong, State}...
05740d512088d832cd26a6b9e0f1d90154c0e272f9cd2e51fa72d101f1e5309d
Verites/verigraph
FromVerigraph.hs
| Description : This module converts Verigraph into Partitions structures . Maintainer : < > Description : This module converts Verigraph into Partitions structures. Maintainer : Andrei Costa <> -} module Data.TypedGraph.Partition.FromVerigraph ( createDisjointUnion, createSatisfyingNacsDisjointUnion ...
null
https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Data/TypedGraph/Partition/FromVerigraph.hs
haskell
| The starting integer id for the generated elements.
| Description : This module converts Verigraph into Partitions structures . Maintainer : < > Description : This module converts Verigraph into Partitions structures. Maintainer : Andrei Costa <> -} module Data.TypedGraph.Partition.FromVerigraph ( createDisjointUnion, createSatisfyingNacsDisjointUnion ...
8d650d3a5a8be38c9e326d9db3c61f1a31576d2a37f09eede36b6281f890a0d3
robert-stuttaford/bridge
spec.cljc
(ns bridge.spec (:require [clojure.spec.alpha :as s] [clojure.string :as str])) (def not-blank? (complement str/blank?)) (s/def :bridge.spec/required-string (s/and string? not-blank?)) (s/def :bridge.spec/optional-string (s/or :empty str/blank? :str not-blank?)) (def email-regex "/" #?(:cljs :...
null
https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/spec.cljc
clojure
Errors
(ns bridge.spec (:require [clojure.spec.alpha :as s] [clojure.string :as str])) (def not-blank? (complement str/blank?)) (s/def :bridge.spec/required-string (s/and string? not-blank?)) (s/def :bridge.spec/optional-string (s/or :empty str/blank? :str not-blank?)) (def email-regex "/" #?(:cljs :...
c4a866870af3720dee3d21b14f846ae8116c7a18189916369189daf5f76d3a56
oshyshko/adventofcode
D01.hs
module Y22.D01 where import Imports solve1 :: String -> Int solve1 = maximum . fmap (sum . fmap read) . splitWhen null . lines solve2 :: String -> Int solve2 = sum . take 3 . sortBy (flip compare) . fmap (sum . fmap read) . splitWhen null . lines
null
https://raw.githubusercontent.com/oshyshko/adventofcode/bd974f097a6658f7c533aaf74a22e2eb1807ce56/src/Y22/D01.hs
haskell
module Y22.D01 where import Imports solve1 :: String -> Int solve1 = maximum . fmap (sum . fmap read) . splitWhen null . lines solve2 :: String -> Int solve2 = sum . take 3 . sortBy (flip compare) . fmap (sum . fmap read) . splitWhen null . lines
ba1370e4fa3a33b4f51da0a8574de8c6029254acbf686e1992a393d213b5c84d
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
PaymentIntentCardProcessing.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema PaymentIntentCardProcessing module StripeAPI.Types.PaymentIntentCardProcess...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentIntentCardProcessing.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema PaymentIntentCardProcessing # SOURCE # | customer_notification:
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.PaymentIntentCardProcessing where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import...
31364732573aca3491a67ccf67a7aeb35c461067d2ec3d136b8b5d357a32cfda
fission-codes/fission
Types.hs
module Fission.User.Provision.Types (Provision (..)) where import Data.Swagger as Swagger hiding (url) import qualified Servant.Client.Core as Client import Fission.Prelude import Fission.Security import Fission.User.Username.Types import ...
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/User/Provision/Types.hs
haskell
module Fission.User.Provision.Types (Provision (..)) where import Data.Swagger as Swagger hiding (url) import qualified Servant.Client.Core as Client import Fission.Prelude import Fission.Security import Fission.User.Username.Types import ...
171ef360e003e8bffee43f3f14d56de7cf08c0d672778bfd7454d7b6aceb1d52
guriguri/cauca
crawler.clj
(ns cauca.component.crawler (:use [cauca.domain] ) (:require [cauca.factory :as f] [cauca.log :as log] [cauca.config :as config] [clj-http.client :as client] [net.cgrand.enlive-html :as e] [clojure.string :as string] ) (:gen-class) ) ...
null
https://raw.githubusercontent.com/guriguri/cauca/38ba3ee7200d2369a1a4f7ae58e286bd09dd16f3/src/clj/cauca/component/crawler.clj
clojure
:court :caNo :caDesc :itemNo :addr1 :addr2 :addr :addrInfo :remarks :value :valueMin :auctionInfo :auctionDate :status :regDate :updDate
(ns cauca.component.crawler (:use [cauca.domain] ) (:require [cauca.factory :as f] [cauca.log :as log] [cauca.config :as config] [clj-http.client :as client] [net.cgrand.enlive-html :as e] [clojure.string :as string] ) (:gen-class) ) ...
6d2dd23aa6c77c6500f0d82bda4c7b719d0989f22ceeb504e3477320b23ca2ac
travelping/ergw
gtp_api.erl
-module(gtp_api). -if(?OTP_RELEASE =< 23). -ignore_xref([behaviour_info/1]). -endif. -include_lib("gtplib/include/gtp_packet.hrl"). -include_lib("pfcplib/include/pfcp_packet.hrl"). -include("include/ergw.hrl"). -optional_callbacks([handle_response/5]). -callback validate_options(Opts :: [{Key :: atom(), Value :: te...
null
https://raw.githubusercontent.com/travelping/ergw/b577328c8bbdc4959b45c321338971ed242bb822/apps/ergw_core/src/gtp_api.erl
erlang
Current state Current state Current state Current state Current state Clean up before the server terminates.
-module(gtp_api). -if(?OTP_RELEASE =< 23). -ignore_xref([behaviour_info/1]). -endif. -include_lib("gtplib/include/gtp_packet.hrl"). -include_lib("pfcplib/include/pfcp_packet.hrl"). -include("include/ergw.hrl"). -optional_callbacks([handle_response/5]). -callback validate_options(Opts :: [{Key :: atom(), Value :: te...
bec23831e19edd8af5ddc0ace624b93f249c6b6f045c8f8858d3220bdd14e097
smallhadroncollider/taskell-2.0
Error.hs
module Taskell.Error where import RIO newtype Error = Error Text deriving (Show, Eq) type EitherError a = Either Error a txt :: Text -> Error txt = Error e :: Text -> EitherError a e text = Left (txt text) mEither :: Text -> Maybe a -> EitherError a mEither text = maybe (e text) pure
null
https://raw.githubusercontent.com/smallhadroncollider/taskell-2.0/c32b2f48d9c44544f43be49c2b100b414a8d3376/src/Taskell/Error.hs
haskell
module Taskell.Error where import RIO newtype Error = Error Text deriving (Show, Eq) type EitherError a = Either Error a txt :: Text -> Error txt = Error e :: Text -> EitherError a e text = Left (txt text) mEither :: Text -> Maybe a -> EitherError a mEither text = maybe (e text) pure
9a79da1f58de42b5195ab1e81a7a5e472b7debe29c8ea856b650f393d932915e
multimodalrouting/osm-fulcro
hexbin.cljs
(ns app.ui.leaflet.layers.hexbin (:require [com.fulcrologic.fulcro.components :refer [defsc]] [com.fulcrologic.fulcro.algorithms.react-interop :refer [react-factory]] ["react-leaflet" :refer [withLeaflet]] ["react-leaflet-d3" :refer [HexbinLayer]])) (def hexbinLayer (react-factory (withLeaflet Hexbin...
null
https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/ui/leaflet/layers/hexbin.cljs
clojure
(ns app.ui.leaflet.layers.hexbin (:require [com.fulcrologic.fulcro.components :refer [defsc]] [com.fulcrologic.fulcro.algorithms.react-interop :refer [react-factory]] ["react-leaflet" :refer [withLeaflet]] ["react-leaflet-d3" :refer [HexbinLayer]])) (def hexbinLayer (react-factory (withLeaflet Hexbin...
e9339401c1d96ede092e7bfd452c05e59f6e3fcb121bdb65686e889680a1986f
luciodale/arco
utils.cljc
(ns arco.utils (:require [tick.alpha.api :as t] [clojure.string :as string])) (def default-intervals {:now {:limit 6 :seconds 1} :second {:limit 60 :seconds 1} :minute {:limit 3600 :seconds 60} :hour {:limit 86400 :seconds 3600} ...
null
https://raw.githubusercontent.com/luciodale/arco/0bb78c826fe8eaf7052e0d6cf94726fa1c85e1c0/src/arco/utils.cljc
clojure
(ns arco.utils (:require [tick.alpha.api :as t] [clojure.string :as string])) (def default-intervals {:now {:limit 6 :seconds 1} :second {:limit 60 :seconds 1} :minute {:limit 3600 :seconds 60} :hour {:limit 86400 :seconds 3600} ...
5888d9f08ec6025aae7303bc4e20368899f3a7bc7f384136cc42364b39e3a7d4
dmrd/ebbinghaus
routes.clj
(ns ebbinghaus.routes (:require [clojure.java.io :as io] [compojure.core :refer [ANY GET PUT POST DELETE routes]] [compojure.route :refer [resources]] [ring.util.response :refer [response]])) (defn home-routes [endpoint] (routes (GET "/" _ (-> "public/index.html" ...
null
https://raw.githubusercontent.com/dmrd/ebbinghaus/573389a5a07a44d7bcfe817a8fd9fd8397862913/src/clj/ebbinghaus/routes.clj
clojure
(ns ebbinghaus.routes (:require [clojure.java.io :as io] [compojure.core :refer [ANY GET PUT POST DELETE routes]] [compojure.route :refer [resources]] [ring.util.response :refer [response]])) (defn home-routes [endpoint] (routes (GET "/" _ (-> "public/index.html" ...
ae5fdcfbb91a89021234c28f60ce0ac91d831bcaa9e59e96b1eb4fe31391439f
ocsigen/lwt
user.ml
let () = Lwt_unix.stdout |> ignore
null
https://raw.githubusercontent.com/ocsigen/lwt/9943ba77a5508feaea5e1fb60b011db4179f9c61/test/packaging/dune/unix/user.ml
ocaml
let () = Lwt_unix.stdout |> ignore
1faf431e4aba69330e004e94ea8f1dd9ecb79dbf75d41ebd675519130cad1f33
AndrasKovacs/elaboration-zoo
Errors.hs
module Errors where import Control.Exception import Text.Printf import Common import Cxt import Syntax -------------------------------------------------------------------------------- data UnifyError = UnifyError deriving (Show, Exception) data ElabError = NameNotInScope Name | CantUnify Tm Tm | InferName...
null
https://raw.githubusercontent.com/AndrasKovacs/elaboration-zoo/9599e7ecca77262b6d11a363647e833aaa5cb4c7/04-implicit-args/Errors.hs
haskell
------------------------------------------------------------------------------
module Errors where import Control.Exception import Text.Printf import Common import Cxt import Syntax data UnifyError = UnifyError deriving (Show, Exception) data ElabError = NameNotInScope Name | CantUnify Tm Tm | InferNamedLam | NoNamedImplicitArg Name | IcitMismatch Icit Icit deriving (Show, Exc...
07e6ab99f5144ff930af6c930aeda23be941ae38f1e8c05d99fb43a1be6fad24
hanshuebner/vlm
support-sysdcl.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : SCT ; Base : 10 ; Lowercase : Yes -*- (defsystem alpha-axp-emulator-support (:pretty-name "Alpha AXP Emulator Support" :default-pathname "VLM:ALPHA-EMULATOR;" :maintain-journals t :patchable t :required-systems ("Alpha-axp-Assembler")) (:...
null
https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/emulator/support-sysdcl.lisp
lisp
Syntax : Common - Lisp ; Package : SCT ; Base : 10 ; Lowercase : Yes -*-
(defsystem alpha-axp-emulator-support (:pretty-name "Alpha AXP Emulator Support" :default-pathname "VLM:ALPHA-EMULATOR;" :maintain-journals t :patchable t :required-systems ("Alpha-axp-Assembler")) (:module translator-support ("Alpha-AXP-Translator-Support") (:type :system)) (:module defini...
0ef9c77819ae72589483b298bb36811bf867a855a44f9f63066ac2955dafb0f1
jellelicht/guix
conkeror.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2014 , 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 License as published by the Free Software Foundati...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/conkeror.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 © 2014 < > Copyright © 2014 , 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 conkeror) #:use-module ((guix licenses) #:prefix l...
05d9b53b87d0371e6ccc7d73574db48fbcf40ca5877fee8f69110bb7f954a14b
kelsey-sorrels/robinson
airborn_item.clj
;; Utility functions for rendering state (ns robinson.fx.airborn-item (:require [robinson.common :as rc] [robinson.error :as re] [robinson.renderutil :as rutil] [robinson.math :as rmath] [robinson.color :as rcolor] [robinson.actors :as ractors] ...
null
https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/fx/airborn_item.clj
clojure
Utility functions for rendering state triggers a trap remove item and trigger trap didn't hit anything, drop into cell at max-distance player in cell npc in cell move item update path will hit wall? drop item into cell before hitting colliding cell items dropped into fire add to fuel items not dropped into ...
(ns robinson.fx.airborn-item (:require [robinson.common :as rc] [robinson.error :as re] [robinson.renderutil :as rutil] [robinson.math :as rmath] [robinson.color :as rcolor] [robinson.actors :as ractors] [robinson.actor-protocol :as ...
5dfae7990f82d946fd524249c10932eda106f51037302d4c8b7c4f8eb118133c
nasa/Common-Metadata-Repository
error_handling_test.clj
(ns cmr.system-int-test.transmit.error-handling-test (:require [cheshire.core :as json] [clojure.test :refer :all] [cmr.common.util :as util :refer [are3]] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c] [cmr.system-int-test.utils.ingest-...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/8b0ee5b35036c27e2c1bdb6dc3c8d05adab3ee10/system-int-test/test/cmr/system_int_test/transmit/error_handling_test.clj
clojure
(ns cmr.system-int-test.transmit.error-handling-test (:require [cheshire.core :as json] [clojure.test :refer :all] [cmr.common.util :as util :refer [are3]] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c] [cmr.system-int-test.utils.ingest-...
ea5516384637af6228bf1a0903ad290e8a95985e4981e3f3696142a25a09ed45
anoma/juvix
FunctionsTable.hs
module Juvix.Compiler.Internal.Translation.FromInternal.Analysis.TypeChecking.Data.FunctionsTable where import Juvix.Compiler.Internal.Language import Juvix.Prelude newtype FunctionsTable = FunctionsTable { _functionsTable :: HashMap FunctionName Expression } deriving newtype (Semigroup, Monoid) makeLenses ''F...
null
https://raw.githubusercontent.com/anoma/juvix/0f29b3ee936c3498e3e7e22ed27fc0e6a38133e0/src/Juvix/Compiler/Internal/Translation/FromInternal/Analysis/TypeChecking/Data/FunctionsTable.hs
haskell
module Juvix.Compiler.Internal.Translation.FromInternal.Analysis.TypeChecking.Data.FunctionsTable where import Juvix.Compiler.Internal.Language import Juvix.Prelude newtype FunctionsTable = FunctionsTable { _functionsTable :: HashMap FunctionName Expression } deriving newtype (Semigroup, Monoid) makeLenses ''F...
0d11acbaf68c937cff8437e82e36bc6064be011721aa71a30e274e6316405cb0
stchang/macrotypes
rackunit-typechecking.rkt
#lang racket/base ;; alias for rackunit/macrotypes; for backwards compat (provide (all-from-out rackunit/macrotypes)) (require rackunit/macrotypes)
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-test/tests/macrotypes/rackunit-typechecking.rkt
racket
alias for rackunit/macrotypes; for backwards compat
#lang racket/base (provide (all-from-out rackunit/macrotypes)) (require rackunit/macrotypes)
8cdb3559f82ff337e4946315477c020b0780e0ed8573dd74308b8f4a9cdff828
rubenbarroso/EOPL
3-9.scm
(let ((time-stamp "Time-stamp: <2001-05-10 16:22:06 dfried>")) (eopl:printf "3-9.scm: language with statements ~a~%" (substring time-stamp 13 29))) this file adapted from one written by . This may differ in some details from the code in section 3.9 and in other ;;; interpreters. ;;;;;;;;;;;;;;;; top le...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/3-9.scm
scheme
interpreters. top level and tests ;;;;;;;;;;;;;;;; needed for testing grammatical specification ;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;; booleans ;;;;;;;;;;;;;;;; environments ;;;;;;;;;;;;;;;; can use this for anything. procedures ;;;;;;;;;;;;;;;; references ;;;;;;;;;;;;;;;;
(let ((time-stamp "Time-stamp: <2001-05-10 16:22:06 dfried>")) (eopl:printf "3-9.scm: language with statements ~a~%" (substring time-stamp 13 29))) this file adapted from one written by . This may differ in some details from the code in section 3.9 and in other (define run (lambda (string) (begin...
47ae7d7f08cf1cc317c60a749618279656385f9e947d9f9a5ae0538f0c3d9447
conscell/hugs-android
ListSeq.hs
Copyright ( c ) 1998 . -- See COPYRIGHT file for terms and conditions. module ListSeq {-# DEPRECATED "This module is unmaintained, and will disappear soon" #-} ( -- type synonym Seq, -- sequence operations empty,single,cons,snoc,append,lview,lhead,ltail,rview,rhead,rtail, null,size,conc...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/ListSeq.hs
haskell
See COPYRIGHT file for terms and conditions. # DEPRECATED "This module is unmaintained, and will disappear soon" # type synonym sequence operations documentation signatures for exported functions can be improved using a counter and bit ops! depends on n to be unboxed, should test this! depends on i (and n?) bei...
Copyright ( c ) 1998 . module ListSeq ( Seq, empty,single,cons,snoc,append,lview,lhead,ltail,rview,rhead,rtail, null,size,concat,reverse,reverseOnto,fromList,toList, map,concatMap,foldr,foldl,foldr1,foldl1,reducer,reducel,reduce1, copy,tabulate,inBounds,lookup,lookupM,lookupWithDefault,u...
a445dade15e72448bf2a4ce43439ae030a423ada90d1d53a69994d99506cb8aa
ulricha/dsh
Segments.hs
# LANGUAGE MonadComprehensions # -- | Statically infer information about the segments of a vector. Currently we -- can determine wether the vector is 'flat' (i.e. has only the unit segment) or -- whether it is a proper segmented vector. module Database.DSH.SL.Opt.Properties.Segments where import Control.Monad.Except ...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/SL/Opt/Properties/Segments.hs
haskell
| Statically infer information about the segments of a vector. Currently we can determine wether the vector is 'flat' (i.e. has only the unit segment) or whether it is a proper segmented vector. Check wether all rows are in the unit segment
# LANGUAGE MonadComprehensions # module Database.DSH.SL.Opt.Properties.Segments where import Control.Monad.Except import Database.DSH.SL.Lang import Database.DSH.Common.VectorLang import Database.DSH.SL.Opt.Properties.Types import Database.DSH.SL.Opt.Properties.Common unp :: Show a => VectorProp a -> Either String...
8e5215634014412c1bab330b631d2c56741de8850d8949c9d7412ca6b7bd865e
tolitius/mount
test_self_host.cljs
(ns mount.test-self-host (:require [cljs.test :as t] mount.test.fun-with-values mount.test.private-fun mount.test.printing )) (t/run-tests 'mount.test.fun-with-values 'mount.test.private-fun 'mount.test.printing ) (defn run-tests [] (t/run-all-tests #"mount.test.*"))
null
https://raw.githubusercontent.com/tolitius/mount/c85da6149ceab96c903c1574106ec56f78338b5f/test/core/mount/test_self_host.cljs
clojure
(ns mount.test-self-host (:require [cljs.test :as t] mount.test.fun-with-values mount.test.private-fun mount.test.printing )) (t/run-tests 'mount.test.fun-with-values 'mount.test.private-fun 'mount.test.printing ) (defn run-tests [] (t/run-all-tests #"mount.test.*"))
78ddb77d8418195edc4c4b252a45c74fd6c2228f440bd04f86e6a00b68f1ceb1
vikram/lisplibraries
utilities.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; utilities.lisp: utilities for xmls and general use Copyright ( C ) 2004 < > ;;;; ;;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by t...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/xmls-tools/utilities.lisp
lisp
utilities.lisp: utilities for xmls and general use This library is free software; you can redistribute it and/or either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
Copyright ( C ) 2004 < > modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library General Public Free Software Foundation , Inc. , 5...
298cc5ebe991c8332ebe9c02737f4f45f8f2e16d0c0a9b53c2696328ffd97c4a
ijvcms/chuanqi_dev
rfc4627_jsonrpc.erl
JSON - RPC , transport - neutral . %%--------------------------------------------------------------------------- @author < > @author LShift Ltd. < > 2007 - 2010 , 2011 , 2012 and 2007 - 2010 LShift Ltd. @license %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy o...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/misc/rfc4627/rfc4627_jsonrpc.erl
erlang
--------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, a...
JSON - RPC , transport - neutral . @author < > @author LShift Ltd. < > 2007 - 2010 , 2011 , 2012 and 2007 - 2010 LShift Ltd. @license files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substant...
8495ea0f17110dc55a8ea8568362515f03ae6ab86397e0fccc29b8ee5d1dd945
hipsleek/hipsleek
sleekengine.ml
#include "xdebug.cppo" open VarGen (* The frontend engine of SLEEK. *) open Globals open Wrapper open Others open Sleekcommons open Gen.Basic open . ETABLE_NFLOW open Exc.GTable open Perm open Label_only let string_of_vres t = match t with | VR_Valid -> "Valid" | VR_Fail s -> "Fail"^(if s<0 then "_May"...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/sleekengine.ml
ocaml
The frontend engine of SLEEK. let pr1 = !CP.print_formula in let pr2 = Typeinfer.string_of_tlist in match lc with | CF.FailCtx _ -> if CF.is_sat_failure lc then (\* must fail + have cex*\) else VR_Fail (-1) else if CF.is_may_failure lc then (\* may fail...
#include "xdebug.cppo" open VarGen open Globals open Wrapper open Others open Sleekcommons open Gen.Basic open . ETABLE_NFLOW open Exc.GTable open Perm open Label_only let string_of_vres t = match t with | VR_Valid -> "Valid" | VR_Fail s -> "Fail"^(if s<0 then "_May" else if s>0 then "_Must" else "") ...
6cf3c65593d19ae9128b303faa99b4d09dbc595ef6bcc9673ba43ee35e7fc8b1
marcinjangrzybowski/cubeViz2
Base.hs
# LANGUAGE TupleSections # # LANGUAGE TupleSections # # LANGUAGE TupleSections # # LANGUAGE FlexibleInstances # module Drawing.Base where import Data.Bifunctor import Data.Tuple import Data . Colour import Data.Maybe import Data.List import Data.Bool import Data . Floating . Classes import PiecesEval import C...
null
https://raw.githubusercontent.com/marcinjangrzybowski/cubeViz2/0a46ffa9d293b598bd5f3cd45f98bd79aa8a77b5/src/Drawing/Base.hs
haskell
# OVERLAPPING # instance Bi a => InSpace (a [ Float ]) where todo Smplx should be non empty! throws error when aproching unrenderable extrudeNotMeta :: [Float] -> Drawing a -> Drawing a extrudeNotMeta v (Drawing l) = Drawing $ (=<<) (\(s , a) -> (=<<) (\(s , a) -> map (\i -> in s0 ++ s1 ) $ fmap ...
# LANGUAGE TupleSections # # LANGUAGE TupleSections # # LANGUAGE TupleSections # # LANGUAGE FlexibleInstances # module Drawing.Base where import Data.Bifunctor import Data.Tuple import Data . Colour import Data.Maybe import Data.List import Data.Bool import Data . Floating . Classes import PiecesEval import C...
0a34d2c79ab0de51aa8e7a8687c04045387374ac1a1e8eec970b26d8e6dceb6c
honzabrecka/karma-reporter
karma.clj
(ns jx.reporter.karma (:require [cljs.env :as env] [cljs.analyzer :as ana] [cljs.analyzer.api :as api])) (defmacro tests-count [& namespaces] `(+ ~@(map (fn [[_ ns]] (count (filter #(true? (get-in % [1 :test])) (cljs.analyzer.api/ns...
null
https://raw.githubusercontent.com/honzabrecka/karma-reporter/88f38a09313b12bf889d8325b9c7d6c23e679d42/src/jx/reporter/karma.clj
clojure
only namespaces with
(ns jx.reporter.karma (:require [cljs.env :as env] [cljs.analyzer :as ana] [cljs.analyzer.api :as api])) (defmacro tests-count [& namespaces] `(+ ~@(map (fn [[_ ns]] (count (filter #(true? (get-in % [1 :test])) (cljs.analyzer.api/ns...
94b4e6ce80a426b5ec519c730456b62b7a77974d41d352430330a486e3b2315c
lemmih/lhc
NodeSizing.hs
( lowerNodeSize ) where import Control . Applicative ( pure , ( < $ > ) , ( < * > ) ) import Control . Monad . State import qualified Data . Map as Map import Data . Bedrock import Data . Bedrock . HPT import Data . Bedrock...
null
https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/bedrock/src/Data/Bedrock/NodeSizing.hs
haskell
InvokeHandler { } - > invalid " InvokeHandler " VarPat ( setVariableSize hpt var ) InvokeHandler{} -> invalid "InvokeHandler" VarPat var -> VarPat (setVariableSize hpt var)
( lowerNodeSize ) where import Control . Applicative ( pure , ( < $ > ) , ( < * > ) ) import Control . Monad . State import qualified Data . Map as Map import Data . Bedrock import Data . Bedrock . HPT import Data . Bedrock...
f563a74454b422f14fb0d4e7f87e9bd2e87d13e0b1397612d4b201a3fd3feb71
ragkousism/Guix-on-Hurd
wm.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > Copyright © 2015 xd1le < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/wm.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 © 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > Copyright © 2015 xd1le < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 , 2017 ng0 < > Copyright ...
3fcb0dd14060590c1fac25ebcfe028190e53f282b7f156cbd419b567325e4110
thosmos/riverdb
theta.cljs
(ns riverdb.ui.theta (:require [clojure.string :as str] [clojure.data] [com.fulcrologic.fulcro.algorithms.data-targeting :as targeting] [com.fulcrologic.fulcro.algorithms.form-state :as fs] [com.fulcrologic.fulcro.algorithms.merge :as merge] [com.fulcrologic.fulcro.application :as fapp] [c...
null
https://raw.githubusercontent.com/thosmos/riverdb/c0a31710e4430113924178bd0a3b9e8304f58009/src/main/riverdb/ui/theta.cljs
clojure
default globals locals if we have user prefs for display cols, otherwise use the spec prKeys :parallel true :parallel true if we have user prefs for display keys, otherwise use the spec prKeys save state where this component is about to load: [:riverdb.theta.list/ns ident-val] if no prKeys, then use ...
(ns riverdb.ui.theta (:require [clojure.string :as str] [clojure.data] [com.fulcrologic.fulcro.algorithms.data-targeting :as targeting] [com.fulcrologic.fulcro.algorithms.form-state :as fs] [com.fulcrologic.fulcro.algorithms.merge :as merge] [com.fulcrologic.fulcro.application :as fapp] [c...
a1bac32eace0f5365b5b1df868b0cd50b9301147452fcd12ab0aa6dbeb659b1e
jdreaver/oanda-rest-api
Accounts.hs
-- | Defines the endpoints listed in the < -live-v20/account-ep/ Account > section of the -- API. module OANDA.Accounts ( AccountProperties (..) , oandaAccounts , AccountsResponse (..) , oandaAccountDetails , AccountDetailsResponse (..) , oandaAccountChanges , AccountChangesResponse (..) , AccountCha...
null
https://raw.githubusercontent.com/jdreaver/oanda-rest-api/8cba9cb7c18a8563b85f5ee737d7e1d78024cd0a/src/OANDA/Accounts.hs
haskell
| Defines the endpoints listed in the API. | Wraps the JSON response for accounts TODO: accountNAV :: AccountUnits TODO: accountTrades :: [TradeSummary] TODO: accountChangesTradesOpened :: [TradeSummary] TODO: accountChangesTradesReduced :: [TradeSummary] TODO: accountChangesTradesClosed :: [TradeSummary] TODO...
< -live-v20/account-ep/ Account > section of the module OANDA.Accounts ( AccountProperties (..) , oandaAccounts , AccountsResponse (..) , oandaAccountDetails , AccountDetailsResponse (..) , oandaAccountChanges , AccountChangesResponse (..) , AccountChanges (..) , AccountChangesState (..) , Accoun...
70f394d8d5cfc906ae5d5dea79a00402e5fe4c0644bce1cd8cd8b7ee5b9157c4
rudymatela/extrapolate
redblack.hs
Copyright 2016 - -2017 , and . -- Adapted from a SmartCheck example : -- -- which in turn was adapted from: -- -quickcheck/ {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # Note from Might : Note : lecture notes are where I learned to -- generate properly ordered binary search trees...
null
https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/eg/redblack.hs
haskell
which in turn was adapted from: -quickcheck/ # LANGUAGE DeriveDataTypeable # generate properly ordered binary search trees: /~cis552/12fa/lectures/stub/BST.html Count the black depth of a red-black tree: Check for red-red violations: Check for black-balanced violations: Check for ordering violations: Ch...
Copyright 2016 - -2017 , and . Adapted from a SmartCheck example : # LANGUAGE DeriveGeneric # Note from Might : Note : lecture notes are where I learned to import RedBlackSet import Test.Extrapolate instance (Ord a, Listable a) => Listable (RBSet a) where tiers = cons1 fromList transforms a ...
de1b8ba6bf43e46a3834ffebc886680e0d842a50ce6be85183599e63be7669ee
th0ma5w/rosettamesh
unwrap.clj
(ns rosettamesh.unwrap (:gen-class :name rosettamesh.unwrap :methods [#^{:static true}[toUnwrap [processing.core.PApplet processing.core.PFont Object] unwrap.Unwrap] #^{:static true}[fromUnwrap [unwrap.Unwrap] Object]]) (:use rosettamesh.util)) (import '(unwrap Unwrap UPoint UTriangle...
null
https://raw.githubusercontent.com/th0ma5w/rosettamesh/f5cfc0e00a6bf1882e22efea2c0f00beade8df64/src/rosettamesh/unwrap.clj
clojure
(ns rosettamesh.unwrap (:gen-class :name rosettamesh.unwrap :methods [#^{:static true}[toUnwrap [processing.core.PApplet processing.core.PFont Object] unwrap.Unwrap] #^{:static true}[fromUnwrap [unwrap.Unwrap] Object]]) (:use rosettamesh.util)) (import '(unwrap Unwrap UPoint UTriangle...
038091433eb39915d11c6df303efd5d63df4939ca3c90c8a135003f51503a6b5
dalaing/little-languages
Parse.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Parsers for types of the N language . Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable Parsers for types of the N langua...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/n/src/Type/Parse.hs
haskell
from 'base' from 'unordered-containers' from 'parsers' local $setup >>> import Text.Trifecta.Result >>> import Text.Trifecta.Delta | The tokenizer style for types in the N language. | A helper function to parse reserved types. nat<EOF> ^ >>> parse parseTyNat "potato" potato<EOF> ^ | The set of parsing...
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Parsers for types of the N language . Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable Parsers for types of the N langua...
23a0855558c8dcbac55708e66e4997326b00e68c47d160d58667c91b6634df34
haskus/packages
UCD.hs
# LANGUAGE TemplateHaskell # -- | Unicode character database module Haskus.Text.Unicode.UCD ( blocks --, names ) where import Haskus.Text.Unicode.UCDParser import Haskus.Text.Unicode.CodePoint -- | Plane blocks -- > > > blocks ! ! 1 -- (U+0080..U+00FF,"Latin-1 Supplement") -- blocks :: [(CodePointRange,St...
null
https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-text/src/lib/Haskus/Text/Unicode/UCD.hs
haskell
| Unicode character database , names | Plane blocks (U+0080..U+00FF,"Latin-1 Supplement") | Names (Left U+0021,"EXCLAMATION MARK") >> names !! 41630 (Right U+2B740..U+2B81D,"CJK UNIFIED IDEOGRAPH-*")
# LANGUAGE TemplateHaskell # module Haskus.Text.Unicode.UCD ( blocks ) where import Haskus.Text.Unicode.UCDParser import Haskus.Text.Unicode.CodePoint > > > blocks ! ! 1 blocks :: [(CodePointRange,String)] blocks = $(parseFile "src/data/ucd/Blocks.txt" parseBlocks) > > names ! ! 1 names : : [ ( Either Cod...
7c3d28bdbc4c36e289bf37114bdd046d7c23fda37bdf3fc2da646a070c2c86c0
grin-compiler/ghc-grin
nfib.hs
module Main(main) where #ifdef __HBCC__ #define print xprint #endif main = print (nfib 35) nfib :: Int -> Int nfib n = if n <= 1 then 1 else 1 + nfib (n-1) + nfib (n-2) 32 - > 7049155 35 - > 29860703
null
https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boquist-grin-bench/other/nfib/nfib.hs
haskell
module Main(main) where #ifdef __HBCC__ #define print xprint #endif main = print (nfib 35) nfib :: Int -> Int nfib n = if n <= 1 then 1 else 1 + nfib (n-1) + nfib (n-2) 32 - > 7049155 35 - > 29860703
198d3bcbabfc4a7910871048e8ca38bf3fe1b6b0690cb3c940d8b7c1a73964cb
typed-wire/typed-wire
Test.hs
# OPTIONS_GHC -F -pgmF htfpp # module Main where import {-@ HTF_TESTS @-} TW.CodeGen.HaskellTest import {-@ HTF_TESTS @-} TW.CodeGen.PureScriptTest import Test.Framework main :: IO () main = htfMain htf_importedTests
null
https://raw.githubusercontent.com/typed-wire/typed-wire/cce9f8fa14b5033084d941d7be630b495967543a/test/Test.hs
haskell
@ HTF_TESTS @ @ HTF_TESTS @
# OPTIONS_GHC -F -pgmF htfpp # module Main where import Test.Framework main :: IO () main = htfMain htf_importedTests
7cc3c7a5e616da4b3afc664547993cb573f266e07e7e81cb96b2ead7791202ce
tomjridge/tjr_simple_earley
test.ml
(* test, represent nt_item as int *) probably superceded by test2 , which uses lazy enumeration (* This test code represents items as ints. The representation is set up so that the operation of "cutting" an item against another complete item can be done by incrementing the int for the blocked item. *) open T...
null
https://raw.githubusercontent.com/tomjridge/tjr_simple_earley/ca558e0e7f4ddba4cd6573bf180710cd02f25ba4/_archive/2019-04-16/bin/test.ml
ocaml
test, represent nt_item as int This test code represents items as ints. The representation is set up so that the operation of "cutting" an item against another complete item can be done by incrementing the int for the blocked item. Simple map implementation NOTE we need to be able to distinguish nontermina...
probably superceded by test2 , which uses lazy enumeration open Tjr_simple_earley open Util open Set_ops open Map_ops open Earley module Map_make = functor (Ord:Set.OrderedType) -> struct include struct module X = Map.Make(Ord) open X type 'a t = 'a X.t let map_add = add let map_find default...
30417ff6566824dc8913cf02737c4323c6ef1c4b8655a65633c5c0ae1bec367d
futurice/haskell-mega-repo
Types.hs
module Personio.Types ( module Personio.Types.Cfg, module Personio.Types.ContractType, module Personio.Types.Currency, module Personio.Types.Employee, module Personio.Types.EmployeeId, module Personio.Types.EmploymentType, module Personio.Types.Envelope, module Personio.Types.PersonalIdV...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/personio-client/src/Personio/Types.hs
haskell
module Personio.Types ( module Personio.Types.Cfg, module Personio.Types.ContractType, module Personio.Types.Currency, module Personio.Types.Employee, module Personio.Types.EmployeeId, module Personio.Types.EmploymentType, module Personio.Types.Envelope, module Personio.Types.PersonalIdV...
fb3388f8499d80b32bde7dd8441dc645639844fe2970cf1af857c41091679098
dawranliou/markdown-editor
core.cljs
(ns markdown-editor.core (:require [reagent.core :as reagent :refer [atom]] [alandipert.storage-atom :refer [local-storage]] [cemerick.url :as url] [markdown-editor.icon :as icon] [markdown-editor.action :as action])) (def default-welcome-text (clojure.string/join "\...
null
https://raw.githubusercontent.com/dawranliou/markdown-editor/79678944ec9a2bc217a1ba676a7ade440158c1b5/src/markdown_editor/core.cljs
clojure
(ns markdown-editor.core (:require [reagent.core :as reagent :refer [atom]] [alandipert.storage-atom :refer [local-storage]] [cemerick.url :as url] [markdown-editor.icon :as icon] [markdown-editor.action :as action])) (def default-welcome-text (clojure.string/join "\...
f687b14ce3b8a76ff1dac920f6ee9bea84c757cbeaeb73073afe79bc448b70df
mooreryan/ocaml_python_bindgen
orange.ml
open! Base let filter_opt = List.filter_opt let py_module = lazy (let source = {pyml_bindgen_string_literal|class Orange: def __init__(self, flavor): self.flavor = flavor |pyml_bindgen_string_literal} in let filename = {pyml_bindgen_string_literal|py/orange.py|pyml_bindgen_st...
null
https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/2d8439c9c7ad3ec00264644cdb62687529a2f2a2/examples/gen_ml_and_mli/lib/orange.ml
ocaml
open! Base let filter_opt = List.filter_opt let py_module = lazy (let source = {pyml_bindgen_string_literal|class Orange: def __init__(self, flavor): self.flavor = flavor |pyml_bindgen_string_literal} in let filename = {pyml_bindgen_string_literal|py/orange.py|pyml_bindgen_st...
79586aac525a25d97d3a2cf032e89bd670571c15245007ac7e277bb544d91458
onedata/op-worker
file_ops_test_utils.erl
%%%------------------------------------------------------------------- @author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc Utils used to create files and dirs ...
null
https://raw.githubusercontent.com/onedata/op-worker/99b86a7229f6db6a694997bd5df4aa69e140e7ee/test_distributed/utils/file/file_ops_test_utils.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc e.g. on other provider or after node restart. @end ------------------------------------------------------------------- API TODO VFS-7215 - merge this module with lfm_te...
@author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . Utils used to create files and dirs and verify their state -module(file_ops_test_utils). -author("Michal Wrzeszcz"). -include("global_definitions.hrl"). -include("modules/fslogic/fslogic_common.h...
0f6d9656401d497b8b58ef63f6b598035cb00d68c6f121ca01fa1104f95abca5
ddmcdonald/sparser
time.lisp
;;; -*- Mode: Lisp; Syntax: Common-lisp; -*- Copyright ( c ) 2016 - 2017 ;;; ;;; File: "time" ;;; Module: grammar/model/core/kinds/ version : August 2017 ;; Initiated 2/1/16 to collect the basic parts of the time model ;; so they can be referenced by later modules without worry about ;; the or...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/0f5ecedd572bc054725ee0d3b23f390c336b7b0f/Sparser/code/s/grammar/model/core/kinds/time.lisp
lisp
-*- Mode: Lisp; Syntax: Common-lisp; -*- File: "time" Module: grammar/model/core/kinds/ Initiated 2/1/16 to collect the basic parts of the time model so they can be referenced by later modules without worry about the order in which they're loaded. This just provides a root in the hierarchy for the div...
Copyright ( c ) 2016 - 2017 version : August 2017 (in-package :sparser) (without-comparatives (define-category time :instantiates nil :specializes region :realization (:adj "temporal") :documentation "For modeling the stuff, not the verb for recording an elapsed period of time or t...
faaa3f3d2b360a295a0d08ff9e1451f8c49440942c5f61195860e271031a8226
CREATe-centre/sociaml-oauth-client
s.mli
module type CLOCK = sig type tm = { tm_sec : int; tm_min : int; tm_hour : int; tm_mday : int; tm_mon : int; tm_year : int; tm_wday : int; tm_yday : int; tm_isdst : bool; } val time : unit -> float val gmtime : float -> tm end module type MAC = sig type ...
null
https://raw.githubusercontent.com/CREATe-centre/sociaml-oauth-client/9115101bc15c3f995651bb2ae2f5f95ae58a5b34/src/s.mli
ocaml
module type CLOCK = sig type tm = { tm_sec : int; tm_min : int; tm_hour : int; tm_mday : int; tm_mon : int; tm_year : int; tm_wday : int; tm_yday : int; tm_isdst : bool; } val time : unit -> float val gmtime : float -> tm end module type MAC = sig type ...
76944be6c5689cecb5a8fe69450b5c64e48381656a0ce8dcabf0b8f06076fd8f
zhongwencool/ecron
ecron_spec.erl
@private -module(ecron_spec). -include("ecron.hrl"). %% API -export([parse_spec/1]). -export([parse_crontab/2]). -export([parse_start_end_time/2]). -export([parse_valid_opts/1]). -export([valid_time/4]). @private valid_time(cron, {SH, SM, SS}, {EH, EM, ES}, CronTab) -> Start = SH * 3600 + SM * 60 + SS, ...
null
https://raw.githubusercontent.com/zhongwencool/ecron/2feda986a02c6544c4b1c795078e5764f121ed60/src/ecron_spec.erl
erlang
API Same as @yearly error error For PropEr Test
@private -module(ecron_spec). -include("ecron.hrl"). -export([parse_spec/1]). -export([parse_crontab/2]). -export([parse_start_end_time/2]). -export([parse_valid_opts/1]). -export([valid_time/4]). @private valid_time(cron, {SH, SM, SS}, {EH, EM, ES}, CronTab) -> Start = SH * 3600 + SM * 60 + SS, End = E...
3ffc5cc06bec5584d5cd0ee885d8dbe115665cf1fa8a42e3340bd770698bfb7e
careercup/CtCI-6th-Edition-Clojure
chapter_4_q3_test.clj
(ns ^{:author "Leeor Engel"} chapter-4.chapter-4-q3-test (:require [clojure.test :refer :all] [data-structures.tree :refer :all] [chapter-4.chapter-4-q3 :refer :all])) (deftest list-of-depths-test (let [tree (create-tree [1]) actual (list-of-depths tree)] (is (= {0 '(1)} actu...
null
https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/chapter_4/chapter_4_q3_test.clj
clojure
(ns ^{:author "Leeor Engel"} chapter-4.chapter-4-q3-test (:require [clojure.test :refer :all] [data-structures.tree :refer :all] [chapter-4.chapter-4-q3 :refer :all])) (deftest list-of-depths-test (let [tree (create-tree [1]) actual (list-of-depths tree)] (is (= {0 '(1)} actu...
a46bd3d04f92cadfe5d36d08c8005496b09614b109d9d5542d73316157869969
ermine-language/ermine
Combinators.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # module Ermine.Monitor.Combinators ( Setting(..) , Updating(..) , Gauged(..) , Incremental(..) ) where import Control.Monad.Trans import Data.Int class Setting t a | t -> a where assign :: MonadIO m => t -> a -> m () -- set ass...
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Monitor/Combinators.hs
haskell
set modify
# LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # module Ermine.Monitor.Combinators ( Setting(..) , Updating(..) , Gauged(..) , Incremental(..) ) where import Control.Monad.Trans import Data.Int class Setting t a | t -> a where assign _ _ = return () class Updating t a | t -> a where...
1778c48074a2684a20ce2332fb94d9473a28c6f97782f7d8ebd46fff9817a044
haskell-mafia/mismi
S3.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Test.Mismi.S3 ( module X , Token (..) , LocalPath (..) , testBucket , createSmallFiles , files , newAddress , newFilePath , addCleanupFinalizer , addPrintFinalizer , addLocalCleanupFinalizer , addLocalPrintFinalizer ) w...
null
https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-s3/test/Test/Mismi/S3.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # module Test.Mismi.S3 ( module X , Token (..) , LocalPath (..) , testBucket , createSmallFiles , files , newAddress , newFilePath , addCleanupFinalizer , addPrintFinalizer , addLocalCleanupFinalizer , addLocalPrintFinalizer ) where import Control.Mon...
96d8cb0b1af10ae1ee48517c66775cfb5e42c444d6335f6e584c1d47159172d4
dalaing/little-languages
Infer.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Type inference for the NB language . Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable Type inference for the NB language...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/nb/src/Term/Infer.hs
haskell
# LANGUAGE FlexibleContexts # from 'base' local | Infer the type of 'TmSucc'. >>> runInfer . fromMaybe (throwError NoMatchingTypeRule) . (inferTmSucc inferTerm) $ TmSucc TmZero >>> runInfer . fromMaybe (throwError NoMatchingTypeRule) . (inferTmSucc inferTerm) $ TmSucc TmFalse Left (Unexpected TyBool TyNat...
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Type inference for the NB language . Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable Type inference for the NB language...
fd58f0601a25b5c8f1cc3aa6bd924007638d4e54abd8f7d1f6d40ec2473854f5
GaloisInc/saw-script
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified Argo import qualified Argo.DefaultMain as Argo (defaultMain) import qualified Argo.Doc as Doc import SAWServer ( SAWState, initialState ) import SAWServer.ClearState ( clearStateDescr, clearState, clearAllStatesDescr, c...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/2c5cffd498464f1dd2a9c92013a652c464163a2b/saw-remote-api/saw-remote-api/Main.hs
haskell
# LANGUAGE OverloadedStrings # JVM General
module Main (main) where import qualified Argo import qualified Argo.DefaultMain as Argo (defaultMain) import qualified Argo.Doc as Doc import SAWServer ( SAWState, initialState ) import SAWServer.ClearState ( clearStateDescr, clearState, clearAllStatesDescr, clearAllStates ) import SAWServer.Cr...
1dd527ed3e32949c752d84a09a3ff338d568f96767f2f5455ca21ddf0e571097
8treenet/xy_server
login_server.erl
%%%-------------------------------------- %%% @Module : login_server @Author : ys @Email : @Created : 2013.06.7 %%% @Description: 登陆服务器 %%%-------------------------------------- -include("common.hrl"). -module(login_server). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_inf...
null
https://raw.githubusercontent.com/8treenet/xy_server/352679e01eb4a26433ccbec513fbd282307a33bd/src/login_server.erl
erlang
-------------------------------------- @Module : login_server @Description: 登陆服务器 -------------------------------------- ==================================================================== API functions ==================================================================== ========================================...
@Author : ys @Email : @Created : 2013.06.7 -include("common.hrl"). -module(login_server). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start_link/1]). -record(state, {}). @doc < a href=" / doc / man / gen_server.html#Mod...
c1bf95b800177f50aa1890bb14d602c67f5802e7337bcaeea7ee710dbce3f1ac
waldheinz/bling
MaterialParser.hs
module Graphics.Bling.IO.MaterialParser ( defaultMaterial, pMaterial, pMaterial', pDiscSpectrumMap2d, namedDiscSpectrumMap2d, pScalarMap2d ) where import Control.Monad.IO.Class ( liftIO ) import Text.ParserCombinators.Parsec import Graphics.Bling.Reflection import Graphics.Bling.SunSky import Graphics....
null
https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/IO/MaterialParser.hs
haskell
------------------------------------------------------------------------------ Texture Maps ------------------------------------------------------------------------------
module Graphics.Bling.IO.MaterialParser ( defaultMaterial, pMaterial, pMaterial', pDiscSpectrumMap2d, namedDiscSpectrumMap2d, pScalarMap2d ) where import Control.Monad.IO.Class ( liftIO ) import Text.ParserCombinators.Parsec import Graphics.Bling.Reflection import Graphics.Bling.SunSky import Graphics....
0898b3a9d9ca7f30b16c4f096a71380ad6253f47095fedb415d01bec160334d5
shirok/Gauche
gap-buffer.scm
;;; ;;; text.gap-buffer - gap-buffer for character array ;;; Copyright ( c ) 2015 - 2022 < > ;;; ;;; 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 re...
null
https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/libsrc/text/gap-buffer.scm
scheme
text.gap-buffer - gap-buffer for character array Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the...
Copyright ( c ) 2015 - 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING For the time being , we naively use flat ...
3d9b54b6a8974c77bdd10593f744dc7a5c90c7ecf536306d85c30bfdaba14a43
pallet/clj-jclouds
compute2_test.clj
; Licensed to the Apache Software Foundation ( ASF ) under one or more ; contributor license agreements. See the NOTICE file distributed with ; this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License , Version 2.0 ( the " License " ) ; you ma...
null
https://raw.githubusercontent.com/pallet/clj-jclouds/dabb71487f7cc5398b7eaa07a8eb58400025259e/test/com/palletops/jclouds/compute2_test.clj
clojure
contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. you may not use this file except in compliance with -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND...
Licensed to the Apache Software Foundation ( ASF ) under one or more The ASF licenses this file to You under the Apache License , Version 2.0 the License . You may obtain a copy of the License at distributed under the License is distributed on an " AS IS " BASIS , (ns com.palletops.jclouds.compute2-test (:...
8d540345342ed41c807a19099a125e8ef176250b4b1e998ee9978ccb60c6a0f7
lehins/massiv
Main.hs
module Main where import System.IO import Test.Hspec import Spec main :: IO () main = do hSetBuffering stdout LineBuffering hspec spec
null
https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv-examples/examples/tests/Main.hs
haskell
module Main where import System.IO import Test.Hspec import Spec main :: IO () main = do hSetBuffering stdout LineBuffering hspec spec
477f4e4811d3e0987fd2d411fc659e1a4c311bce9160331b4aa2805598aef966
johnlawrenceaspden/hobby-code
indentical.clj
;; Experimentally testing lecture notes (defn boxes[k] (vec (repeat k 0))) (defn add-ball [boxes] (let [i (rand-int (count boxes)) a (boxes i)] (assoc boxes i (inc a)))) (add-ball (boxes 8)) ;-> [0 0 1 0 0 0 0 0] - > [ 3 3 3 1 ] (defn arrangement "n boxes, k things" [n k] (nth (iterate add-ball (box...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/indentical.clj
clojure
Experimentally testing lecture notes -> [0 0 1 0 0 0 0 0] -> false -> true -> true -> false -> false -> (false false false) 18 seconds 170 seconds -> ;[O X X X O X X X O O O O O O X O O] Doesn't look likely either!
(defn boxes[k] (vec (repeat k 0))) (defn add-ball [boxes] (let [i (rand-int (count boxes)) a (boxes i)] (assoc boxes i (inc a)))) - > [ 3 3 3 1 ] (defn arrangement "n boxes, k things" [n k] (nth (iterate add-ball (boxes k)) n)) - > [ 2 2 2 0 0 2 2 0 ] (defn all-in-one [boxes] (let [[f & rst] (re...
4c809bc1ccb1162610f5bfaa79e47257e2d23b25dd62698117ee47fa80ea1a2d
cloojure/tupelo
hierarchy.cljc
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public ; License 1.0 (-1.0.php) which can be found in the ; file epl-v10.html at the root of this distribution. By using this software in any ; fashion, you are agreeing to be bound by th...
null
https://raw.githubusercontent.com/cloojure/tupelo/4105fefbb1c4d1b2f06fa4993f9dd007e5e41e00/src/cljc/tupelo/hierarchy.cljc
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 th...
Copyright ( c ) . All rights reserved . (ns tupelo.hierarchy (:require [clojure.set :as set] [schema.core :as s] [tupelo.core :as t :refer [spyx spyxx it-> ] ] [tupelo.schema :as tsk])) (def ^:no-doc Symbol-or-Keyword (s/cond-pre s/Keyword s/Symbol)) (s/defn ^:no-doc validate-item-types [...
7f72a8b9f389997aafa6724f8d05ee6640354e900d1be73a3b95c3774718e141
incoherentsoftware/defect-process
RoomInfo.hs
module Player.RoomInfo ( PlayerRoomInfo(..) , mkPlayerRoomInfo ) where import Attack.Util import Player.EquipmentInfo import Player.Types data PlayerRoomInfo = PlayerRoomInfo { _equipment :: PlayerEquipmentInfo , _health :: Health } mkPlayerRoomInfo :: Player -> PlayerRoomInfo mkPlayerRoom...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/a05dec4565153718834781a212def825488201bf/src/Player/RoomInfo.hs
haskell
module Player.RoomInfo ( PlayerRoomInfo(..) , mkPlayerRoomInfo ) where import Attack.Util import Player.EquipmentInfo import Player.Types data PlayerRoomInfo = PlayerRoomInfo { _equipment :: PlayerEquipmentInfo , _health :: Health } mkPlayerRoomInfo :: Player -> PlayerRoomInfo mkPlayerRoom...
833eecfe0785f39f592b173b98025b391f5f2bb5f61d3199499fbf2ea9cb588e
milankinen/cuic
test_runner.clj
(ns test-runner (:require [clojure.string :as string] [eftest.runner :refer [find-tests run-tests]])) (defn- include [names] (fn [t] (let [test-name (str (:ns (meta t)) "/" (:name (meta t)))] (some #(string/includes? test-name %) names)))) (defn run-tests-cli [& names] (let [tests (->> (fi...
null
https://raw.githubusercontent.com/milankinen/cuic/94718c0580da2aa127d967207f163c7a546b6fb1/test/test_runner.clj
clojure
(ns test-runner (:require [clojure.string :as string] [eftest.runner :refer [find-tests run-tests]])) (defn- include [names] (fn [t] (let [test-name (str (:ns (meta t)) "/" (:name (meta t)))] (some #(string/includes? test-name %) names)))) (defn run-tests-cli [& names] (let [tests (->> (fi...
d670f4ce93c790da9cbca9336cf7b8ceee6a5700fe0858ab9d29a2beb26fb321
typekernel/typekernel
C4mAST.hs
# LANGUAGE GADTs , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # # LANGUAGE TypeFamilies , DataKinds , PolyKinds , TemplateHaskell , UndecidableInstances , DeriveFunctor , ScopedTypeVariables , RecursiveDo # . -- C---- is a chosen subset from C that works as code generation target. -- The ide...
null
https://raw.githubusercontent.com/typekernel/typekernel/7404834853bab0fcda4081ce9c2c255d0482515f/src/Typekernel/C4mAST.hs
haskell
C---- is a chosen subset from C that works as code generation target. The ideal result should be something that has TAC-style assignments and structured control flow. instance (CIntegral t ~ isint, I ntegerLiteral isint l)=>Literal t l instance IntegerLiteral True Integer Declaring operators, both unary and binary. ...
# LANGUAGE GADTs , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # # LANGUAGE TypeFamilies , DataKinds , PolyKinds , TemplateHaskell , UndecidableInstances , DeriveFunctor , ScopedTypeVariables , RecursiveDo # . module Typekernel.C4mAST where import Data.Proxy import qualified Data.Word...
708060820ac17c1fa1ce51b57a8c3df0c46aed16c847ad94f2bcbf05c96c8cda
vseloved/cl-nlp
util.lisp
( c ) 2013 Vsevolod Dyomkin (in-package #:nlp.contrib.wordnet) (named-readtables:in-readtable rutils-readtable) ;;; download methods (defmethod download ((what (eql :wordnet)) &key (url "-1.0.1/wordnet30-sqlite-1.0.1.zip/download") (dir "data/")) (let* ((dir (merge...
null
https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/contrib/wordnet/util.lisp
lisp
download methods SQL utilities
( c ) 2013 Vsevolod Dyomkin (in-package #:nlp.contrib.wordnet) (named-readtables:in-readtable rutils-readtable) (defmethod download ((what (eql :wordnet)) &key (url "-1.0.1/wordnet30-sqlite-1.0.1.zip/download") (dir "data/")) (let* ((dir (merge-pathnames dir (asdf:...
50bf6afb68a5ef39de4a31c2a1ec8d4f08a00a8bc115eb22daf005efd60cb0f8
clj-kondo/clj-kondo
reader.cljs
Copyright ( c ) , Rich Hickey & contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be b...
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/inlined/clj_kondo/impl/toolsreader/v1v2v2/cljs/tools/reader.cljs
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , Rich Hickey & contributors . (ns clj-kondo.impl.toolsreader.v1v2v2.cljs.tools.reader {:no-doc true} (:refer-clojure :exclude [read read-line read-string char default-data-readers *default-data-reader-fn* *data-readers* *suppress-read*]...
0fd04842439f2a6b522114a637535709ab02ece25f17fbe05ee02c00e89ce735
FranklinChen/hugs98-plus-Sep2006
GLU.hs
----------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GLU Copyright : ( c ) 2002 - 2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : portable --...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GLU.hs
haskell
--------------------------------------------------------------------------- | Module : Graphics.Rendering.OpenGL.GLU License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : provisional Portability : portable -------------------------------------------------------...
Copyright : ( c ) 2002 - 2005 A binding for GLU , OpenGL\ 's accompanying utility library . module Graphics.Rendering.OpenGL.GLU ( module Graphics.Rendering.OpenGL.GLU.Initialization, module Graphics.Rendering.OpenGL.GLU.Mipmapping, module Graphics.Rendering.OpenGL.GLU.Matrix, module Gr...
2dde57813b53394a943223a9d5beb8d962e7aad30389b39d6c2dfff8bc548fdd
jyh/metaprl
itt_mpoly3.mli
extends Itt_list2 extends Itt_ring_uce open Basic_tactics type var_set val empty : unit -> var_set val add : var_set -> term -> var_set val find_index : var_set -> term -> int option val vars_of_term : var_set -> term -> term -> var_set val var_list : var_set -> term list (* * RESOURCES USED BY standardizeT *) ...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/applications/algebra/itt_mpoly3.mli
ocaml
* RESOURCES USED BY standardizeT
extends Itt_list2 extends Itt_ring_uce open Basic_tactics type var_set val empty : unit -> var_set val add : var_set -> term -> var_set val find_index : var_set -> term -> int option val vars_of_term : var_set -> term -> term -> var_set val var_list : var_set -> term list resource (term * conv, conv) mpoly_eval v...
9e410da1b01bcf6d4dca22931d0ad338185bb05d162bc461ce56019ccc377f9f
qitab/cl-protobufs
conditions.lisp
Copyright 2012 - 2020 Google LLC ;;; Use of this source code is governed by an MIT - style ;;; license that can be found in the LICENSE file or at ;;; . (in-package #:cl-protobufs.implementation) (define-condition protobuf-error (simple-error) () (:documentation "Supertype of all errors explicitly signale...
null
https://raw.githubusercontent.com/qitab/cl-protobufs/b4dbae253fa0edf2dd97da98f7ec9fe296c803e9/conditions.lisp
lisp
license that can be found in the LICENSE file or at .
Copyright 2012 - 2020 Google LLC Use of this source code is governed by an MIT - style (in-package #:cl-protobufs.implementation) (define-condition protobuf-error (simple-error) () (:documentation "Supertype of all errors explicitly signaled by cl-protobufs. As a subtype of simple-error this accepts :...
abbca8e2ec65c634e758b76433d9965dcecec389b799e9a9caa9a8d04eeb0532
ndmitchell/catch
ParseMonad.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Language.Haskell.ParseMonad Copyright : ( c ) The GHC Team , 1997 - 2000 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : experimental -- Portabi...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Haskell/ParseMonad.hs
haskell
#hide --------------------------------------------------------------------------- | Module : Language.Haskell.ParseMonad License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable ---------------------------------------------------...
Copyright : ( c ) The GHC Team , 1997 - 2000 Monads for the parser and lexer . module Haskell.ParseMonad( P, ParseResult(..), atSrcLoc, LexContext(..), ParseMode(..), defaultParseMode, runParserWithMode, runParser, getSrcLoc, pushCurrentContext,...
fd94938fc10b408acf3d9201afd0cd4807d62b5d3c390152a6261fdc29c307bd
ocaml-sf/learn-ocaml-corpus
eval_neg_forgotten.ml
(* ------------------------------------------------------------------------------ *) (* Building formulae. *) let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if sense then truth else falsity (* [FConst sense] would work too, but would allocate memory *) let neg ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/eval_neg_forgotten.ml
ocaml
------------------------------------------------------------------------------ Building formulae. [FConst sense] would work too, but would allocate memory ------------------------------------------------------------------------------ Evaluating formulae. wrong
let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if sense then truth else falsity let neg f = match f with | FConst sense -> const (not sense) | FNeg f -> f | _ -> FNeg f let conn sense f1 f2 = match f1, f2 with | FConst sense', f | f...
05f2c3b4a43db4ce0882ee0ee0cc22294650d7d07b65cfd7f7d97af637c47bcd
realworldocaml/examples
counter.ml
open Core.Std type t = int String.Map.t let empty = String.Map.empty let to_list t = Map.to_alist t let touch t s = let count = match Map.find t s with | None -> 0 | Some x -> x in Map.add t ~key:s ~data:(count + 1) part 1 let singleton l = Counter.touch Counter.empty part 2 type median = | ...
null
https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/files-modules-and-programs-freq-cyclic1/counter.ml
ocaml
open Core.Std type t = int String.Map.t let empty = String.Map.empty let to_list t = Map.to_alist t let touch t s = let count = match Map.find t s with | None -> 0 | Some x -> x in Map.add t ~key:s ~data:(count + 1) part 1 let singleton l = Counter.touch Counter.empty part 2 type median = | ...
f6b99d57f7e49f2db4528afdfe4af726747ceb596d4d2ca41dab327fcbfda9a8
bubba/lsp-test
Main.hs
{-# LANGUAGE TypeInType #-} {-# LANGUAGE OverloadedStrings #-} import Control.Monad import Control.Monad.Reader import Data.Aeson hiding (defaultOptions) import qualified Data.HashMap.Strict as HM import Data.List (isSuffixOf) import Data.String import Language.LSP.Server import Language.LSP.Types import System.Direct...
null
https://raw.githubusercontent.com/bubba/lsp-test/e5f79572bad3163f6f60a3f9254e8eda9e78f8b9/test/dummy-server/Main.hs
haskell
# LANGUAGE TypeInType # # LANGUAGE OverloadedStrings # also act as a registerer for workspace/didChangeWatchedFiles also act as an unregisterer for workspace/didChangeWatchedFiles
import Control.Monad import Control.Monad.Reader import Data.Aeson hiding (defaultOptions) import qualified Data.HashMap.Strict as HM import Data.List (isSuffixOf) import Data.String import Language.LSP.Server import Language.LSP.Types import System.Directory import System.FilePath import UnliftIO import UnliftIO.Conc...
a1aea60ec44138200b162f5e5714eb78debe5cafbe5bd20087209d1ea333039f
8c6794b6/guile-tjit
t-args-09.scm
(define (micro a) (let lp ((a a) (b 0) (c 0) (d 0) (e 0) (f 0) (g 0) (h 0) (i 0)) (if (< 0 a) (lp (- a 1) (+ b 1) (+ c 1) (+ d 1) (+ e 1) (+ f 1) (+ g 1) (+ h 1) (+ i 1)) (+ a b c d e f g h i)))) (micro #e1e3)
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-args-09.scm
scheme
(define (micro a) (let lp ((a a) (b 0) (c 0) (d 0) (e 0) (f 0) (g 0) (h 0) (i 0)) (if (< 0 a) (lp (- a 1) (+ b 1) (+ c 1) (+ d 1) (+ e 1) (+ f 1) (+ g 1) (+ h 1) (+ i 1)) (+ a b c d e f g h i)))) (micro #e1e3)
2939186864043977d47670cf5b03453166be318be4630c40b3e40ce70d0cc708
noitcudni/google-webmaster-tools-bulk-outdated-content-removal
storage.cljs
(ns google-webmaster-tools-bulk-outdated-content-removal-clj.background.storage (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [<! >! chan close!]] [cljs-time.core :as t] [cljs-time.coerce :as tc] [chromex.logging :refer-macros [l...
null
https://raw.githubusercontent.com/noitcudni/google-webmaster-tools-bulk-outdated-content-removal/e618a9b90a8d2e2f0fccbeb905619b7e8d6a448d/src/background/google_webmaster_tools_bulk_outdated_content_removal_clj/background/storage.cljs
clojure
xxx local-storage (storage/get-local) xxx xxx TODO: maybe consider closing the channel
(ns google-webmaster-tools-bulk-outdated-content-removal-clj.background.storage (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [<! >! chan close!]] [cljs-time.core :as t] [cljs-time.coerce :as tc] [chromex.logging :refer-macros [l...
f792ea2e274dc6569d8fc951c87b5ce4a543fe92da63e2bc8f6ad59064ce4cbb
marcelocra/chrome-extension-cljs
database.cljs
(ns chrome-extras-cljs.options.database) (enable-console-print!) (def initial-value {:history true :history-items []}) (def app-state (atom initial-value)) (defn c-get ([key cb] (.get js/chrome.storage.sync key (fn [items] (cb (js->clj (aget items key)))))...
null
https://raw.githubusercontent.com/marcelocra/chrome-extension-cljs/2a7950dfacfe69f741d4588a2b800c1ad8b823d9/references/0.0.2-cljs-implementation/src/chrome_extras_cljs/options/database.cljs
clojure
Load the information as soon as the file is loaded.
(ns chrome-extras-cljs.options.database) (enable-console-print!) (def initial-value {:history true :history-items []}) (def app-state (atom initial-value)) (defn c-get ([key cb] (.get js/chrome.storage.sync key (fn [items] (cb (js->clj (aget items key)))))...
9353c66c2214f68b462e7ccb9d34a988c6e8c4d70850e2482d83048038249970
gsakkas/rite
20060324-22:01:55-60f7617e7e801a26ea584bcc86751861.seminal.ml
type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt | SaveHeap of string | RestoreHeap of string type heap = (string * storage)...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060324-22%3A01%3A55-60f7617e7e801a26ea584bcc86751861.seminal.ml
ocaml
type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt | SaveHeap of string | RestoreHeap of string type heap = (string * storage)...