_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
f3ad1ce75fe7804b692850bced1291f3f196e0618666c9b358452e11ca67bc14
input-output-hk/cardano-sl
UserKeyError.hs
-- | Possible errors with files which stores secret and public keys. module Pos.Util.UserKeyError ( UserKeyType (..) , UserKeyError (..) , KeyError (..) ) where import Universum import Control.Exception.Safe (Exception) | ' PublicKey ' is for external wallets , ' Se...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Util/UserKeyError.hs
haskell
| Possible errors with files which stores secret and public keys.
module Pos.Util.UserKeyError ( UserKeyType (..) , UserKeyError (..) , KeyError (..) ) where import Universum import Control.Exception.Safe (Exception) | ' PublicKey ' is for external wallets , ' SecretKey ' is for internal wallets . data UserKeyType = Public ...
eb7f0f28547ebeaf355e0ef9f76da89c6532aee2fcd7c893010f57aea2d8f079
markostanimirovic/re-action
post_details.cljs
(ns blog.posts.post-details (:require [blog.posts.resource :as resource] [re-action.core :as re-action] [re-action.router :as router] [re-streamer.core :as re-streamer :refer [subscribe]])) ;; === Presentational Components === (defn header [edit back] [:div.card-header.page-hea...
null
https://raw.githubusercontent.com/markostanimirovic/re-action/d6cb33d9ac73bedeac4f09996c2c741d21bda7ba/examples/blog/src/blog/posts/post_details.cljs
clojure
=== Presentational Components === === Facade === === Container Component ===
(ns blog.posts.post-details (:require [blog.posts.resource :as resource] [re-action.core :as re-action] [re-action.router :as router] [re-streamer.core :as re-streamer :refer [subscribe]])) (defn header [edit back] [:div.card-header.page-header [:div.page-title [:h5 "Post De...
fe9496177edf3efe5363876abdb6cb838a8d18db07616ca5da1c74d11f10365e
basho/riak_core
riak_core_claim.erl
%% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except...
null
https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_claim.erl
erlang
------------------------------------------------------------------- riak_core: Core Riak Application Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the sp...
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
44cb5cd9eb113042d534d768536361cc50af905cd2d531aa3dc9543968870684
kronkltd/jiksnu
feed_subscription_actions_test.clj
(ns jiksnu.modules.admin.actions.feed-subscription-actions-test (:require [jiksnu.mock :as mock] [jiksnu.modules.core.db :as db] [jiksnu.modules.admin.actions.feed-subscription-actions :as actions.feed-subscription] [jiksnu.test-helper :as th] [midje.sweet ...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test/jiksnu/modules/admin/actions/feed_subscription_actions_test.clj
clojure
(ns jiksnu.modules.admin.actions.feed-subscription-actions-test (:require [jiksnu.mock :as mock] [jiksnu.modules.core.db :as db] [jiksnu.modules.admin.actions.feed-subscription-actions :as actions.feed-subscription] [jiksnu.test-helper :as th] [midje.sweet ...
84299c961a54a5bea933eb334b218085e469ea8c46342934a3a65c98102cd167
sveri/ffdc
friend.clj
(ns de.sveri.structconverter.service.friend (:require [cemerick.friend.credentials :as creds] [cemerick.friend.workflows :as workflows] [de.sveri.friendui.routes.user :as friend-routes] [de.sveri.friendui-datomic.db :as f-d-db])) (derive :user/admin :user/free) (defn friend-setti...
null
https://raw.githubusercontent.com/sveri/ffdc/303c94b9e3b1bd0e4aa13ca948d08eac26f96acf/src/clj/de/sveri/structconverter/service/friend.clj
clojure
(ns de.sveri.structconverter.service.friend (:require [cemerick.friend.credentials :as creds] [cemerick.friend.workflows :as workflows] [de.sveri.friendui.routes.user :as friend-routes] [de.sveri.friendui-datomic.db :as f-d-db])) (derive :user/admin :user/free) (defn friend-setti...
3587a3d38fbf70c0efdf42fb5ab3c4fb2e096a33e2c20421b6f1f1b5dc9c186a
raptazure/experiments
Lib.hs
# LANGUAGE DefaultSignatures # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # #...
null
https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/wiwinwlh/languageExtensions/src/Lib.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveTraversable # # LANGUAGE MultiWayIf # {-# LANGUAGE OverloadedLabels #-} # LANGUAGE OverloadedStrings # | View patterns are like pattern guards that can be nested inside of other patterns. | MultiWayIf allows us to write “pattern matching predicates” on a value, equivalent...
# LANGUAGE DefaultSignatures # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NumDecimals # # LANGUA...
5d8b904ac5675df5e3dca96449ca017ff92cce5f82492c1f63ee262fc006dafe
Octachron/codept
codept_server.ml
(** Codept server *) open Params let tool_name = "codept-server" let version = 0.3 let stderr= Format.err_formatter let std = Format.std_formatter let prefix = "_build" let cache = Cache.Shared.make Cache.empty module Sh = Cache.Shared let sign filename = let cached = Sh.get cache in match Name.Map.find_opt file...
null
https://raw.githubusercontent.com/Octachron/codept/66fb4b2caac8e9757eefb3f4e605b392a0fa457f/experimental/server/codept_server.ml
ocaml
* Codept server
open Params let tool_name = "codept-server" let version = 0.3 let stderr= Format.err_formatter let std = Format.std_formatter let prefix = "_build" let cache = Cache.Shared.make Cache.empty module Sh = Cache.Shared let sign filename = let cached = Sh.get cache in match Name.Map.find_opt filename cached.signature...
b38ccb8b35feb77366c3087dd6f0a2fdd09cc31ba81efc0648488ab2a622a71c
nyu-acsys/drift
flip_twice_2.ml
let twice tf (tx:int) (ty:int) = tf (tf tx ty) ty let flip (f: int -> int -> int) (x:int) (y:int) = f y x let square_diff sx sy = (sx + sy) * (sx - sy) let main_p (mx:int) = let res = flip (twice square_diff) mx mx in assert(res = mx * (0 - mx)) let main (w:unit) = let _ = main_p 6 in let _ = mai...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DRIFT/high/flip_twice_2.ml
ocaml
let twice tf (tx:int) (ty:int) = tf (tf tx ty) ty let flip (f: int -> int -> int) (x:int) (y:int) = f y x let square_diff sx sy = (sx + sy) * (sx - sy) let main_p (mx:int) = let res = flip (twice square_diff) mx mx in assert(res = mx * (0 - mx)) let main (w:unit) = let _ = main_p 6 in let _ = mai...
c38768450a475afee90054208d5e87c3e0fb4cb10cb50b87c5b65c92f3e77a8a
klutometis/clrs
15.5-2.scm
(require-extension syntax-case check array-lib) (require '../util/util) (require '../15.5/section) (import* util round-array) (import section-15.5) (let ((p (array-align (list->array 1 '(#f 0.04 0.06 0.08 0.02 0.10 0.12 0.14)) -1)) (q (array-align (list->array 1 '(0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05)) -1))) ...
null
https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/15.5/15.5-2.scm
scheme
(require-extension syntax-case check array-lib) (require '../util/util) (require '../15.5/section) (import* util round-array) (import section-15.5) (let ((p (array-align (list->array 1 '(#f 0.04 0.06 0.08 0.02 0.10 0.12 0.14)) -1)) (q (array-align (list->array 1 '(0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05)) -1))) ...
bc897b4d07e540e63a5f7c2bd79db2b479a3f3a1d2357e19d366bee4b3dd863e
dfinity/motoko
effect.mli
open Mo_def open Mo_types open Source open Syntax open Type val max_eff : eff -> eff -> eff (* (incremental) effect inference on Source *) (* TODO: delete once await.ml ported to IR *) val effect_exp: exp -> eff val infer_effect_exp : exp -> eff val infer_effect_dec : dec -> eff val infer_effect_dec_fields : dec_fi...
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/mo_frontend/effect.mli
ocaml
(incremental) effect inference on Source TODO: delete once await.ml ported to IR
open Mo_def open Mo_types open Source open Syntax open Type val max_eff : eff -> eff -> eff val effect_exp: exp -> eff val infer_effect_exp : exp -> eff val infer_effect_dec : dec -> eff val infer_effect_dec_fields : dec_field list -> eff val typ : ('a, typ_note) annotated_phrase -> typ val eff : ('a, typ_note) ann...
8a24747529b4ab0fc6665fad68a2d2379339bb0873312655a48220ae04833de4
BU-CS320/Fall-2018
Lang1Test.hs
module Lang1Test where import Data.Char import Test.Tasty (testGroup) import Test.Tasty.HUnit (assertEqual, assertBool, testCase) import Test.Tasty.QuickCheck (testProperty,Arbitrary, oneof,arbitrary ) import Lang1(Ast(AstInt,Plus,Separator), eval) unitTests = testGroup "Lang1Test" [showP...
null
https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week5/hw/tests/Lang1Test.hs
haskell
module Lang1Test where import Data.Char import Test.Tasty (testGroup) import Test.Tasty.HUnit (assertEqual, assertBool, testCase) import Test.Tasty.QuickCheck (testProperty,Arbitrary, oneof,arbitrary ) import Lang1(Ast(AstInt,Plus,Separator), eval) unitTests = testGroup "Lang1Test" [showP...
a490c783e583fa6d2aacacc2d6937f821caaad21f08fbfcdd3f72231129383bf
ocaml/dune
menhir_rules.mli
* Menhir rules open Import (** Return the list of modules that are generated by this stanza. *) val module_names : Menhir_stanza.t -> Module_name.t list * Generate the rules for a [ ( menhir ... ) ] stanza . val gen_rules : dir:Path.Build.t -> Compilation_context.t -> Menhir_stanza.t -> unit Memo.t
null
https://raw.githubusercontent.com/ocaml/dune/715825e0b032015ff7f1652a2b3ea448513c43ac/src/dune_rules/menhir/menhir_rules.mli
ocaml
* Return the list of modules that are generated by this stanza.
* Menhir rules open Import val module_names : Menhir_stanza.t -> Module_name.t list * Generate the rules for a [ ( menhir ... ) ] stanza . val gen_rules : dir:Path.Build.t -> Compilation_context.t -> Menhir_stanza.t -> unit Memo.t
132693098826a8c0b110558a292dd77717d3c32194f467cca922b9f5b5934d3a
eslick/cl-registry
admin-page.lisp
(in-package :registry) (define-plugin admin (site-app) "The create function accepts a list of plugins" :tab-name 'admin :create 'make-admin-page) (defun make-admin-page (&rest args) (declare (ignore args)) (make-instance 'composite :dom-id "admin-page" :widgets (list (apply #'make-navigation ...
null
https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/admin/admin-page.lisp
lisp
Login as another user Add a new user Set a user's password Change username Edit user permissions 'guide-test (make-instance 'composite :widgets (list (make-instance 'guide-viewer Pop up a dialog of users whose username or namestring contains SUBSTRING.
(in-package :registry) (define-plugin admin (site-app) "The create function accepts a list of plugins" :tab-name 'admin :create 'make-admin-page) (defun make-admin-page (&rest args) (declare (ignore args)) (make-instance 'composite :dom-id "admin-page" :widgets (list (apply #'make-navigation ...
c0c9d3eafcd557e63c831cda98a877ce1a5e3c0f7530e69fb89066e72f3c104c
dgrnbrg/redl
complete.clj
(ns redl.complete (:use [clojure.string :only [split]] [complete.core :only [top-level-classes nested-classes]])) (defn common-subseq-score "Takes 2 seqs, and checks for common subseq. Allows any characters to be skipped between matches, and returns how many were skipped in the order of each gap in th...
null
https://raw.githubusercontent.com/dgrnbrg/redl/e4d87e50c277e6fffdf2809d886324c699a8df06/src/redl/complete.clj
clojure
special case for an anchor and nothing else Pattern fully consumed Enabled anchoring mode text fully consumed consume pattern token didn't match; so fail check if fail due to reserved set penalize score Namespace, aliases, or var qualified var TODO: include ns doc Static member of java class plain java class
(ns redl.complete (:use [clojure.string :only [split]] [complete.core :only [top-level-classes nested-classes]])) (defn common-subseq-score "Takes 2 seqs, and checks for common subseq. Allows any characters to be skipped between matches, and returns how many were skipped in the order of each gap in th...
f29ed24411b9bcc040f5c2e545e1d2fa5977d36d9adfa9ce588723b823636f2d
jedavidson/tutoring
List.hs
Some additional practice exercises with basics -- You can run/test your solutions using a REPL, either locally through stack once you 've installed it , or on the CSE machines using cabal : -- $ cabal repl -- <some output...> -- Prelude> :l List.hs -- <some more output...> -- *Main> mapList abs (Cons (-...
null
https://raw.githubusercontent.com/jedavidson/tutoring/4e2a2277163152d9574d54e8cc9feddec0c8fa8e/22t3/cs3161/wk1/List.hs
haskell
You can run/test your solutions using a REPL, either locally through $ cabal repl <some output...> Prelude> :l List.hs <some more output...> *Main> mapList abs (Cons (-1) (Cons (-2) (Cons (-3) Nil))) ... (replace cabal with stack if you're working locally) Remember that you can reload a file that y...
Some additional practice exercises with basics stack once you 've installed it , or on the CSE machines using cabal : Cons 1 ( Cons 2 ( Cons 3 Nil ) ) module List where data List a = Nil | Cons a (List a) deriving Show type IntList = List Int Ex . 1 : Join two integer lists tog...
6aa3c09241e63e28180f5541e26e67b835d3c40dbdf694d186284a2cf89751d9
bellissimogiorno/nominal
SubSpec.hs
module Language.Nominal.SubSpec ( spec ) where import Test.Hspec import Test.QuickCheck import Language.Nominal.Properties.SpecUtilities () import Language.Nominal.Properties.SubSpec spec :: Spec spec = do it "[n1][n1 -> n2] = [n2]" $ property prop_sub_singleton1 it "[n2][n1 -> n2] = [n2]" $ proper...
null
https://raw.githubusercontent.com/bellissimogiorno/nominal/ab3306ee349dc481d2e2e6d103d90ffdd14ccaa9/test/Language/Nominal/SubSpec.hs
haskell
module Language.Nominal.SubSpec ( spec ) where import Test.Hspec import Test.QuickCheck import Language.Nominal.Properties.SpecUtilities () import Language.Nominal.Properties.SubSpec spec :: Spec spec = do it "[n1][n1 -> n2] = [n2]" $ property prop_sub_singleton1 it "[n2][n1 -> n2] = [n2]" $ proper...
d670d95e9222da4e0c68dec5861204c14956f45f6fb02470ee0b354caf688ebb
GaloisInc/cryptol
Error.hs
# Language FlexibleInstances , DeriveGeneric , DeriveAnyClass # {-# Language OverloadedStrings #-} {-# Language Safe #-} See Note [ -Wincomplete - uni - patterns and irrefutable patterns ] in Cryptol . . TypePat # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Cryptol.TypeCheck.Error where import qualified...
null
https://raw.githubusercontent.com/GaloisInc/cryptol/f8b55439467abe3e7427b80edc37ff95a13de62b/src/Cryptol/TypeCheck/Error.hs
haskell
# Language OverloadedStrings # # Language Safe # order errors pick shortest error from each location. Then starting position Finally end position | Various errors that might happen during type checking/inference ^ Expected kind, inferred kind ^ Number of extra parameters, kind of result (which should not be of ...
# Language FlexibleInstances , DeriveGeneric , DeriveAnyClass # See Note [ -Wincomplete - uni - patterns and irrefutable patterns ] in Cryptol . . TypePat # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Cryptol.TypeCheck.Error where import qualified Data.IntMap as IntMap import qualified Data.Set as Set i...
d7bc20b0614c9f6ef11e7f9ef2bf8ec39656b02df5044f8e0391d4c40e8a24b4
couchbase/geocouch
vtree_insert.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/couchbase/geocouch/3e8040787139e3c67766ce50398860c185737b8a/vtree/src/vtree_insert.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(vtree_insert). -include("vtree.hrl"). -include("couch_db.hrl"). -export([insert/2]). -ifdef(makecheck). -compile(nowarn_export_all). -compile(exp...
e2c422e33f0747c0853c2748d3cfd762dd9a18a354ad4a5d15a7e5be0c7e10ad
jumarko/clojure-experiments
393_filename_sort.clj
(ns clojure-experiments.purely-functional.puzzles.393-filename-sort "-tv-newsletter-393-always-start-with-a-repl/" (:require [clojure.string :as str] [clojure.test :refer [deftest is testing]]) (:import (java.text Normalizer Normalizer$Form))) ;;; Write a better sorting function...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/purely_functional/puzzles/393_filename_sort.clj
clojure
Write a better sorting function that you can pass to `sort-by` that will: - be case insensitive ('a' and 'A' are the same) - sort numbers properly (not like strings, but numerical order) -> '12' is after '2' - bonus: put accented characters next to each other (e.g. 'e' and 'é') case insensitive proper number ord...
(ns clojure-experiments.purely-functional.puzzles.393-filename-sort "-tv-newsletter-393-always-start-with-a-repl/" (:require [clojure.string :as str] [clojure.test :refer [deftest is testing]]) (:import (java.text Normalizer Normalizer$Form))) (defn filename-order [filename] ...
41e544e00da0ab35d6200f4614af915becef3db7bade79e55442d2da78739cc4
ds-wizard/engine-backend
DocumentTemplateDTO.hs
module Shared.Api.Resource.DocumentTemplate.DocumentTemplateDTO where import qualified Data.UUID as U import GHC.Generics import Shared.Api.Resource.DocumentTemplate.DocumentTemplateFormatDTO import Shared.Model.DocumentTemplate.DocumentTemplate data DocumentTemplateDTO = DocumentTemplateDTO { tId :: String , na...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-shared/src/Shared/Api/Resource/DocumentTemplate/DocumentTemplateDTO.hs
haskell
module Shared.Api.Resource.DocumentTemplate.DocumentTemplateDTO where import qualified Data.UUID as U import GHC.Generics import Shared.Api.Resource.DocumentTemplate.DocumentTemplateFormatDTO import Shared.Model.DocumentTemplate.DocumentTemplate data DocumentTemplateDTO = DocumentTemplateDTO { tId :: String , na...
e4a20b4a2fcf5f3098dfc01e120840c62a2d249a09327235e7d0aacb2313c20e
tari3x/csec-modex
cprint.ml
* * Copyright ( c ) 2001 - 2003 , * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : *...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/cil-1.7.3/src/frontc/cprint.ml
ocaml
** FrontC Pretty printer stub out the old-style manual space functions we may implement some of these later sm: for some reason I couldn't just call print from frontc.... ? ** Useful primitives ** Base Type Printing print "struct foo", but with specified keyword and a list of * attributes to put between k...
* * Copyright ( c ) 2001 - 2003 , * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : *...
8d18e0a3b72613516fad39c252819c9c7022ae5e543a1f1ab848f3c1f88f0159
binsec/binsec
instr_cfg.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/ast/instr_cfg.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
cf190e541f1a45a678485571ba4c7350c138ec05c56d2bab4b1513c9cb602d1e
camoy/contract-etc
annotate.rkt
#lang racket/base ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; provide (provide (rename-out [annotate :] [define-annotated define])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; require (require (for-syntax racket/base ...
null
https://raw.githubusercontent.com/camoy/contract-etc/3758ad23c407f72b160df4969623576d661301b8/annotate.rkt
racket
provide require constants String Environment variable that determines if the test submodule will have annotated contracts enabled. String Environment variable that determines if annotated contracts are enabled. syntax [Bound-Id-Table Identifier Syntax] Table that stores contract annotations. Syntax clas...
#lang racket/base (provide (rename-out [annotate :] [define-annotated define])) (require (for-syntax racket/base racket/function racket/syntax syntax/parse syntax/strip-context syntax/id-table ...
50ebccf5ff070b926c2ea76e54f15135c38d931db7f8b235f6a44ebf8df1b47b
turion/rhine
Millisecond.hs
{- | Provides a clock that ticks at every multiple of a fixed number of milliseconds. -} # LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module FRP.Rhine.Clock.Realtime.Millisecond where -- base import Data.Maybe (fromMaybe) import Data.Time.Clock import ...
null
https://raw.githubusercontent.com/turion/rhine/3bae3ddfa1ee70b8487e214f09a80c75b34f7398/rhine/src/FRP/Rhine/Clock/Realtime/Millisecond.hs
haskell
| Provides a clock that ticks at every multiple of a fixed number of milliseconds. base fixed-vector rhine | This implementation measures the time after each tick, and waits for the remaining time until the next tick. If the next tick should already have occurred, the tag is set to 'False', representing ...
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module FRP.Rhine.Clock.Realtime.Millisecond where import Data.Maybe (fromMaybe) import Data.Time.Clock import Control.Concurrent (threadDelay) import GHC.TypeLits import Data.Vector.Sized (Vector, fromList)...
2dd793a395a2694af3b75d5920b01b12e6bf716cb359b14d90f1e7d240399899
jacobobryant/eelchat
subscriptions.clj
(ns com.eelchat.feat.subscriptions (:require [com.biffweb :as biff :refer [q]] [remus :as remus]) (:import [org.jsoup Jsoup])) (defn every-n-minutes [n] (iterate #(biff/add-seconds % (* n 60)) (java.util.Date.))) (defn subs-to-update [db] (q db '{:find (pull sub [*]) :in [t] :wh...
null
https://raw.githubusercontent.com/jacobobryant/eelchat/20d2bdb51ca44260d5b55a41c0d1b9cb483cfc25/src/com/eelchat/feat/subscriptions.clj
clojure
(ns com.eelchat.feat.subscriptions (:require [com.biffweb :as biff :refer [q]] [remus :as remus]) (:import [org.jsoup Jsoup])) (defn every-n-minutes [n] (iterate #(biff/add-seconds % (* n 60)) (java.util.Date.))) (defn subs-to-update [db] (q db '{:find (pull sub [*]) :in [t] :wh...
cb18e6a6e06ff091419d7843092c398f1b04f1b83684a35a1d970cb08844022d
maximedenes/native-coq
decls.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/library/decls.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * This module registers tables for s...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Si...
04a89e5d9058615738b532eadfce1556a10849ae807ed9f0caab27db2396f174
ConsenSysMesh/Fae
HelloWorld2.hs
body :: Transaction Void () body _ = newContract [] c where c :: Contract () String c _ = spend "Hello, world!"
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/demos/HelloWorld2/HelloWorld2.hs
haskell
body :: Transaction Void () body _ = newContract [] c where c :: Contract () String c _ = spend "Hello, world!"
eeaed0a1653ab531b59e78c58081a30c46acd7b9871306329368a12c535a76a0
kupl/LearnML
original.ml
type var = string type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) let check (e : lambda) : bool = true
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub58/original.ml
ocaml
type var = string type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) let check (e : lambda) : bool = true
94e1d166146fcb88ea140c8e82d554bc2ec797bca48fefd59750fffaa27086c3
WorksHub/client
views.cljs
(ns wh.logged-in.notifications.settings.views (:require [re-frame.core :refer [dispatch]] [wh.components.common :refer [link]] [wh.components.forms.views :refer [select-field status-button]] [wh.logged-in.notifications.settings.events :as events] [wh.logged-in.notifications.settings.subs :as subs]...
null
https://raw.githubusercontent.com/WorksHub/client/38b0a4e28820477937190f012c6a94b9e2ebc511/client/src/wh/logged_in/notifications/settings/views.cljs
clojure
(ns wh.logged-in.notifications.settings.views (:require [re-frame.core :refer [dispatch]] [wh.components.common :refer [link]] [wh.components.forms.views :refer [select-field status-button]] [wh.logged-in.notifications.settings.events :as events] [wh.logged-in.notifications.settings.subs :as subs]...
8df2756d31ff9b72425fb641f699bf97fd349ff73b7d700f849ba22fc7346a08
crategus/cl-cffi-gtk
rtest-gtk-tree-view-drag-and-drop.lisp
(def-suite gtk-tree-view-drag-and-drop :in gtk-suite) (in-suite gtk-tree-view-drag-and-drop) ;;; --- Types and Values ------------------------------------------------------- ;;; GtkTreeDragSource (test gtk-tree-drag-source ;; Type check (is (g-type-is-interface "GtkTreeDragSource")) ;; Check the registered...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gtk-tree-view-drag-and-drop.lisp
lisp
--- Types and Values ------------------------------------------------------- GtkTreeDragSource Type check Check the registered name Check the type initializer Get the names of the interface properties. Get the interface definition GtkTreeDragDest Type check Check the registered name Check the type in...
(def-suite gtk-tree-view-drag-and-drop :in gtk-suite) (in-suite gtk-tree-view-drag-and-drop) (test gtk-tree-drag-source (is (g-type-is-interface "GtkTreeDragSource")) (is (eq 'gtk-tree-drag-source (registered-object-type-by-name "GtkTreeDragSource"))) (is (eq (gtype "GtkTreeDragSource") (gt...
4ce69f9f3d1836a6e7e6b13c1977e7465a2d31f2c22b41e927f7d284ac5a735d
arsalan0c/cdp-hs
Debugger.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # {- | = Debugger Debugger domain exposes JavaScript debugging capabil...
null
https://raw.githubusercontent.com/arsalan0c/cdp-hs/f946d706485b0dd16360a753321c46d6f098649d/src/CDP/Domains/Debugger.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections # | = Debugger Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc. Call frame identifier. | Type 'Debugger.Location'. Location in the source ...
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # module CDP.Domains.Debugger (module CDP.Domains.Debugger) where import Control.Applicative ((<$>)) import Contro...
e3b65e0bfe1a5aa54cb3f01557309534a3daa1e39cc89ff6f0621d3d95e41006
lamdu/lamdu
Eval.hs
# LANGUAGE TemplateHaskell , TypeApplications , RecordWildCards , ScopedTypeVariables , KindSignatures # # LANGUAGE MultiParamTypeClasses , FlexibleInstances , DefaultSignatures # module Lamdu.Sugar.Eval ( addEvaluationResults ) where import Control.Applicative (Alternative(..)) import qualified Con...
null
https://raw.githubusercontent.com/lamdu/lamdu/8c4b60d42f980f3e03c7e88b01c4437e31cf1cb1/src/Lamdu/Sugar/Eval.hs
haskell
# LANGUAGE TemplateHaskell , TypeApplications , RecordWildCards , ScopedTypeVariables , KindSignatures # # LANGUAGE MultiParamTypeClasses , FlexibleInstances , DefaultSignatures # module Lamdu.Sugar.Eval ( addEvaluationResults ) where import Control.Applicative (Alternative(..)) import qualified Con...
4478d50d16a30d6b6be70c1363150c66fdf0a881bfd3622dc6a556cf6ce9e1be
ulricha/dsh
GroupJoin.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} -- FIXME TODO * Use same infrastructure to introduce GroupAggr -- * Special case: duplicate elimination -> CountDistinct | Introduce GroupJoin operators for combinations of NestJoin and aggregation o...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/CL/Opt/GroupJoin.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # FIXME TODO * Special case: duplicate elimination -> CountDistinct aggregation and avoids materialization of the groups. ------------------------------------------------------------------------------ guard. searches for eligible aggregates both i...
# LANGUAGE MultiParamTypeClasses # * Use same infrastructure to introduce GroupAggr | Introduce GroupJoin operators for combinations of NestJoin and aggregation of the groups created by NestJoin . This effectively fuses group creation and module Database.DSH.CL.Opt.GroupJoin ( groupjoinR , sidewaysR , opt...
336e1c67cb4d52bc946a02f5d30cb6d387df8f740f0b234c820091078611a86c
amuletml/amulet
NameyMT.hs
{-# LANGUAGE DeriveFunctor, TupleSections #-} module AmuletLsp.NameyMT ( NameyMT , evalNameyMT ) where import Control.Concurrent.STM import Control.Monad.IO.Class import Control.Monad.Namey import Syntax.Var | A thread - safe version of NameyT. -- Internally , this reserves a block of names from the ' TVar ...
null
https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/bin/AmuletLsp/NameyMT.hs
haskell
# LANGUAGE DeriveFunctor, TupleSections # them. This avoids having to perform an atomic operation for every single fresh variable usage. # INLINE (<*>) # # INLINE (>>=) #
module AmuletLsp.NameyMT ( NameyMT , evalNameyMT ) where import Control.Concurrent.STM import Control.Monad.IO.Class import Control.Monad.Namey import Syntax.Var | A thread - safe version of NameyT. Internally , this reserves a block of names from the ' TVar ' , and then uses newtype NameyMT a = NameyMT {...
98b132ed755cd01b06c8eba61dd4767de7bad1b34b629e75854c6075f110dddb
li-clutter-org/http2-test
Pipes.hs
{-# LANGUAGE OverloadedStrings #-} module Rede.MainLoop.Pipes ( showFrames ,inputToFrames ,framesToOutput ,outputConsumer ,chunkProducer) where import Data.Binary.Put (runPut) import qualified Data.ByteString as B import qualified Data.Byt...
null
https://raw.githubusercontent.com/li-clutter-org/http2-test/38d6706511f93af875273f7702fa0ea8582d5d8e/hs-src/Rede/MainLoop/Pipes.hs
haskell
# LANGUAGE OverloadedStrings # Generator Left-overs For debugging
module Rede.MainLoop.Pipes ( showFrames ,inputToFrames ,framesToOutput ,outputConsumer ,chunkProducer) where import Data.Binary.Put (runPut) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as ...
0b13c62cfca505445f248dc0687c4ba3eb906dbc5d0bdfd65e75d026db7243f3
spechub/Hets
Shellout.hs
| Module : ./Maude / Shellout.hs Description : Maude Development Graphs Copyright : ( c ) , Facultad de Informatica UCM 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Module : ./Maude/Shellout.hs...
null
https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/Maude/Shellout.hs
haskell
| extracts the signature and the sentences from a specification | extracts the string corresponding to a specification
| Module : ./Maude / Shellout.hs Description : Maude Development Graphs Copyright : ( c ) , Facultad de Informatica UCM 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Module : ./Maude/Shellout.hs...
bc383ea2330186ef69fdf5d48a9b5088893c8e87178b483a26871c20a55be4bf
dcastro/twenty48
Control.hs
module Utils.Control where import qualified Data.Strict.Maybe as M import Import whenJust' :: Applicative f => M.Maybe a -> (a -> f ()) -> f () whenJust' M.Nothing _ = pure () whenJust' (M.Just x) f = f x
null
https://raw.githubusercontent.com/dcastro/twenty48/d4a58bfa389bb247525fd18f80ef428d84ef5fe9/src/Utils/Control.hs
haskell
module Utils.Control where import qualified Data.Strict.Maybe as M import Import whenJust' :: Applicative f => M.Maybe a -> (a -> f ()) -> f () whenJust' M.Nothing _ = pure () whenJust' (M.Just x) f = f x
3886e2d6b160f4e2ababdd2e46f22104c8fa3d96484ebea6ce4de6719484d5d6
Erlang-Openid/oidcc
oidcc_openid_provider_mgr_test.erl
-module(oidcc_openid_provider_mgr_test). -include_lib("eunit/include/eunit.hrl"). start_stop_test() -> {ok, Pid} = oidcc_openid_provider_mgr:start_link(), ok = oidcc_openid_provider_mgr:stop(), ok = test_util:wait_for_process_to_die(Pid, 100), ok. simple_add_test() -> Config = #{name => <...
null
https://raw.githubusercontent.com/Erlang-Openid/oidcc/afa7786033ca7161dd3c599e72c2df81ed1aad59/test/oidcc_openid_provider_mgr_test.erl
erlang
-module(oidcc_openid_provider_mgr_test). -include_lib("eunit/include/eunit.hrl"). start_stop_test() -> {ok, Pid} = oidcc_openid_provider_mgr:start_link(), ok = oidcc_openid_provider_mgr:stop(), ok = test_util:wait_for_process_to_die(Pid, 100), ok. simple_add_test() -> Config = #{name => <...
3dd81b8ec0312525660273da2d89e197d1a14dc789524192d2add3f07796ab86
EveryTian/Haskell-Codewars
easy-line.hs
-- -line module Codewars.Kata.Easyline where easyLine :: Integer -> Integer easyLine n = product [n + 1 .. 2 * n] `div` product [2 .. n]
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/7kyu/easy-line.hs
haskell
-line
module Codewars.Kata.Easyline where easyLine :: Integer -> Integer easyLine n = product [n + 1 .. 2 * n] `div` product [2 .. n]
35f621c808dac577a848725053f51f1a8944e2af3ac078a91bf278bb6ced391e
kouphax/flic
project.clj
(defproject flic "0.0.1" :description "A simple feature toggle library" :url "" :license { :name "Eclipse Public License" :url "-v10.html" } :dependencies [[org.clojure/clojure "1.5.1"] [biscuit "1.0.0"]] :plugins [[lein-midje "3.0.0"]] :profiles { :dev { :dependencies [[mid...
null
https://raw.githubusercontent.com/kouphax/flic/f94b686afe2bcceefa1af0dbe90050bc43bd7a7c/project.clj
clojure
(defproject flic "0.0.1" :description "A simple feature toggle library" :url "" :license { :name "Eclipse Public License" :url "-v10.html" } :dependencies [[org.clojure/clojure "1.5.1"] [biscuit "1.0.0"]] :plugins [[lein-midje "3.0.0"]] :profiles { :dev { :dependencies [[mid...
079c897e462aed8f51f76a5ebb7a39614e72f8b0c07c52ff345bd580c4ca814a
qoocku/erleos
erleos_ds_srv_tests.erl
%%% ========================================================================== @author < > @since 25 - 11 - 2010 %%% @doc TODO: Add description to erleos_ds_srv_tests %%% @end %%% ========================================================================== -module (erleos_ds_srv_tests). -author ("Damian T. Dobroc...
null
https://raw.githubusercontent.com/qoocku/erleos/ce14d2cfeea81053307b1fab815e0fbe3b9d1133/test/erleos_ds_srv_tests.erl
erlang
========================================================================== @doc TODO: Add description to erleos_ds_srv_tests @end ========================================================================== ----------------------------------------------------------------------------- @doc Tests Runner. @end -----...
@author < > @since 25 - 11 - 2010 -module (erleos_ds_srv_tests). -author ("Damian T. Dobroczy\\'nski <>"). -compile (export_all). -include_lib ("eunit/include/eunit.hrl"). -record (ctx, {mod, srv, samples}). setup1 () -> #ctx{mod = create_callback_module()}. tear_down1 (#ctx{mod = Mod}) -> meck:unload...
20f1a9c3c754d41272ddd296cf6bfaec4de75c5dc1ccb6e9032f07d455ac51ed
ninjakoala/cidr
project.clj
(defproject com.ninjakoala/cidr "1.0.7-SNAPSHOT" :description "Working with CIDR ranges" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :profiles {:dev {:dependencies [[org.clojure/clojure "1.11.1"]]}} :eastwood {:namespaces [:source-paths]} :release-tasks [["vcs" "assert-com...
null
https://raw.githubusercontent.com/ninjakoala/cidr/96bceb915771cb7f6ef0953070b4881161232495/project.clj
clojure
(defproject com.ninjakoala/cidr "1.0.7-SNAPSHOT" :description "Working with CIDR ranges" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :profiles {:dev {:dependencies [[org.clojure/clojure "1.11.1"]]}} :eastwood {:namespaces [:source-paths]} :release-tasks [["vcs" "assert-com...
6bfc7c6ce8bb8502be994df03515633b0edc7957ced2a92bd5147488fc453e1c
soegaard/sketching
bezier.rkt
#lang sketching ; -docs/blob/master/content/examples/Basics/Form/Bezier/Bezier.pde . ; The first two parameters for the bezier ( ) function specify the first point in the curve and the last two parameters specify ; the last point. The middle parameters set the control points ; that define the shape of the ...
null
https://raw.githubusercontent.com/soegaard/sketching/94e114ac6e92ede3b85481df755b673be24b226e/sketching-doc/sketching-doc/manual-examples/basics/form/bezier.rkt
racket
-docs/blob/master/content/examples/Basics/Form/Bezier/Bezier.pde the last point. The middle parameters set the control points that define the shape of the curve.
#lang sketching . The first two parameters for the bezier ( ) function specify the first point in the curve and the last two parameters specify (define (setup) (size 640 360) (stroke 255) (no-fill)) (define (draw) (background 0) (for ([i (in-range 0. 200 20)]) (bezier (- mouse-x (* 1/2 i)) (+ i...
327daf2c2363f3684bcfb63e7808f05c3933ba8fdfcc1eeb15828f3904f45305
stassats/lisp-bots
lisppaste.lisp
$ I d : , v 1.31 2010 - 05 - 29 14:19:47 lisppaste Exp $ $ Source : /project / lisppaste / cvsroot / / lisppaste.lisp , v $ ;;;; See the LICENSE file for licensing information. (in-package :lisppaste) (defun start-lisppaste () "Start accepting web requests." (if *no-channel-pastes* (pushnew "None" *c...
null
https://raw.githubusercontent.com/stassats/lisp-bots/09bfce724afd20c91a08acde8816be6faf5f54b2/lisppaste.lisp
lisp
See the LICENSE file for licensing information.
$ I d : , v 1.31 2010 - 05 - 29 14:19:47 lisppaste Exp $ $ Source : /project / lisppaste / cvsroot / / lisppaste.lisp , v $ (in-package :lisppaste) (defun start-lisppaste () "Start accepting web requests." (if *no-channel-pastes* (pushnew "None" *channels* :test #'string-equal)) (read-xml-pastes) ...
5461b69b4ce50a23df4c0280c1aa095efa88a83c71eac27f8a28d26cb700fbe2
koji-kojiro/lem-pygments-colorthemes
arduino.lisp
(in-package :lem-user) (define-color-theme "arduino" () (foreground "#000000") (background "#ffffff") (cursor :foreground "#ffffff" :background "#000000") (syntax-warning-attribute :foreground "#af0000" :background "#ffffff") (syntax-string-attribute :foreground "#878787" :background "#ffffff") (syntax-com...
null
https://raw.githubusercontent.com/koji-kojiro/lem-pygments-colorthemes/f7de93ca7a68be7fb99ec48cc571e132292a6712/themes/arduino.lisp
lisp
(in-package :lem-user) (define-color-theme "arduino" () (foreground "#000000") (background "#ffffff") (cursor :foreground "#ffffff" :background "#000000") (syntax-warning-attribute :foreground "#af0000" :background "#ffffff") (syntax-string-attribute :foreground "#878787" :background "#ffffff") (syntax-com...
f1e61c2c823d20f0c1574de1bdc804fdb3b01f1faa7d12bfb1f7e4b7cb2b8a47
erlang/otp
heart_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/70376ac14180f5311798dc7202a891d5025cb052/lib/kernel/test/heart_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(heart_SUITE). -include_lib("common_test/include/ct.hrl"). -export([ all/0, suite/0, init_per_suite/...
c838783976a7724f30fcf39559880b723f093e5ed00ac2297f7f284b3fdf58ee
Ubspy/Haskell-Tetris
MatrixController.hs
module MatrixController where import Data.Time.Clock import System.Random import Data.List import Debug.Trace import Graphics.Blank import Data.Time.Clock.POSIX data SquareState = Empty | Set | Falling | Shadow deriving Eq data Piece = None | Line | Square | T | OrangeL | BlueL | RedZ | GreenZ data Rotation = Clockw...
null
https://raw.githubusercontent.com/Ubspy/Haskell-Tetris/5b5b371b0680949316d514ea217137032af4353a/src/MatrixController.hs
haskell
This is what the board will be storing, each square in a grid will have a state and a piece type Piece is basically just what color is it TODO: Remove, this is for debugging Matrix type declaration Functions to give the size of the board Replace the cleared row with a blank row at the top Check this row again in...
module MatrixController where import Data.Time.Clock import System.Random import Data.List import Debug.Trace import Graphics.Blank import Data.Time.Clock.POSIX data SquareState = Empty | Set | Falling | Shadow deriving Eq data Piece = None | Line | Square | T | OrangeL | BlueL | RedZ | GreenZ data Rotation = Clockw...
da843ae277c9aa0a329440be7903609323a52ad35d36cfe1d13eb4f2f7f159fd
amnh/poy5
annchrom.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/annchrom.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
85616f8ef31edd24ddec399f6d0a94ceb893104c04f8b953698ed02db3d228f9
jdormit/looped-in
logging.cljs
Copyright © 2018 ;; ;; This file is part of Looped In. ;; ;; Looped In is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your option) any later version. ;; ;; Loo...
null
https://raw.githubusercontent.com/jdormit/looped-in/aac2f909e5ccebac9516536dcd1bb725b2cf2278/src/lib/looped_in/logging.cljs
clojure
This file is part of Looped In. Looped In is free software: you can redistribute it and/or modify (at your option) any later version. Looped In 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. ...
Copyright © 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (ns looped-in.logging) (defn info [& args] (apply js/console.info "[Looped In]" (map c...
991f2c167d7fe995089dec87e383c0d5555de3f7abcb5d337b3fd5a5db55b78e
awolven/cl-vulkan
package.lisp
(in-package :cl-user) (defpackage :cl-vulkan-demo (:use :cl :vk :3d-matrices :3d-vectors :cffi :%vk :$glfw))
null
https://raw.githubusercontent.com/awolven/cl-vulkan/e408c86cb8d99a0cd13013b64f8ef7155399a615/examples/package.lisp
lisp
(in-package :cl-user) (defpackage :cl-vulkan-demo (:use :cl :vk :3d-matrices :3d-vectors :cffi :%vk :$glfw))
22e806edbc0d38b5c9f69bb504b236b3f88d2e6451eb3f432a4f98a9936e3be7
roehst/tapl-implementations
core.ml
open Format open Syntax open Support.Error open Support.Pervasive (* ------------------------ EVALUATION ------------------------ *) let rec isval ctx t = match t with TmTrue(_) -> true | TmFalse(_) -> true | TmAbs(_,_,_,_) -> true | TmRecord(_,fields) -> List.for_all (fun (l,ti) -> isval ctx ti) fields...
null
https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/joinexercise/core.ml
ocaml
------------------------ EVALUATION ------------------------ ------------------------ SUBTYPING ------------------------ Write me Write me ------------------------ TYPING ------------------------ write me
open Format open Syntax open Support.Error open Support.Pervasive let rec isval ctx t = match t with TmTrue(_) -> true | TmFalse(_) -> true | TmAbs(_,_,_,_) -> true | TmRecord(_,fields) -> List.for_all (fun (l,ti) -> isval ctx ti) fields | _ -> false exception NoRuleApplies let rec eval1 ctx t = match ...
995787f36167700c309b0235ece6f07215ad6b23ab09ab64ff2636fbd61bd02a
spurious/chibi-scheme-mirror
ffi-tests.scm
(import (chibi) (chibi ast) (chibi match) (chibi process) (chibi filesystem) (chibi test)) (test-begin "ffi") (define-syntax test-ffi (syntax-rules () ((test-ffi name-expr decls tests ...) (let* ((name name-expr) (stub-file (string-append "tests/ffi/" name ".stub")) (c-file...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/ffi/ffi-tests.scm
scheme
on any failure leave the stub and c file for reference framework are working. More detailed tests on integer conversions and overflow. static cast pass and return a signed bignum pass and return an unsigned bignum booleans int types String passing, returning and mutation. lo++ , hi-- ) { ...
(import (chibi) (chibi ast) (chibi match) (chibi process) (chibi filesystem) (chibi test)) (test-begin "ffi") (define-syntax test-ffi (syntax-rules () ((test-ffi name-expr decls tests ...) (let* ((name name-expr) (stub-file (string-append "tests/ffi/" name ".stub")) (c-file...
6ebfb4ce328b58ab2e095786811a4de5af0641c397ff93b334b77263b05cb131
GaloisInc/daedalus
Ops.hs
# Language TemplateHaskell , TypeApplications # module Daedalus.Core.TH.Ops where import qualified Data.Text as Text import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import Data.List(sort) import Data.Maybe(fromJust) import GHC.Records(getField) import qualified Daedalus.RTS ...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/d02dda2e149ffa0e7bcca59cddc4991b875006e4/daedalus-core/src/Daedalus/Core/TH/Ops.hs
haskell
# Language TemplateHaskell , TypeApplications # module Daedalus.Core.TH.Ops where import qualified Data.Text as Text import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import Data.List(sort) import Data.Maybe(fromJust) import GHC.Records(getField) import qualified Daedalus.RTS ...
c193b1eb9d06daffd2dbd0d8de8c5da54ff83faf8ccc444ea2f7ab78736e3e67
ocaml/odoc
val.mli
val documented : unit * . val undocumented : unit (** Bar. *) val documented_above : unit
null
https://raw.githubusercontent.com/ocaml/odoc/65074eeee3fe8478c4df5099cf83a95326484105/test/generators/cases/val.mli
ocaml
* Bar.
val documented : unit * . val undocumented : unit val documented_above : unit
87bb2c0d2769e889f085c2a0b6b13b5fdd2328f3d77d53492b54b46575c371f2
simonmar/parconc-examples
sudoku-par2.hs
import Sudoku import Control.Exception import System.Environment import Data.Maybe import Control.Monad.Par.Scheds.Trace main :: IO () main = do [f] <- getArgs grids <- fmap lines $ readFile f let (as,bs) = splitAt (length grids `div` 2) grids print $ length $ filter isJust $ runPar $ do i1 <-...
null
https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/sudoku-par2.hs
haskell
import Sudoku import Control.Exception import System.Environment import Data.Maybe import Control.Monad.Par.Scheds.Trace main :: IO () main = do [f] <- getArgs grids <- fmap lines $ readFile f let (as,bs) = splitAt (length grids `div` 2) grids print $ length $ filter isJust $ runPar $ do i1 <-...
81669273afc23dfa5b2ea4e105ce964376282bef97ddfaf51d9148cfb9f28e11
cndreisbach/clojure-web-dev-workshop
debts.clj
(ns we-owe.debts (:require [validateur.validation :refer :all])) (defn valid-debt? [debt] (not-any? nil? (map (juxt :from :to :amount) debt))) (defn- transform-debts-to-vecs [debts] (map #(vector [(:to %) (:from %)] (:amount %)) debts)) (defn- merge-debts "Merge debts where person=person and owes=owes." ...
null
https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/03-hiccup/src/we_owe/debts.clj
clojure
(ns we-owe.debts (:require [validateur.validation :refer :all])) (defn valid-debt? [debt] (not-any? nil? (map (juxt :from :to :amount) debt))) (defn- transform-debts-to-vecs [debts] (map #(vector [(:to %) (:from %)] (:amount %)) debts)) (defn- merge-debts "Merge debts where person=person and owes=owes." ...
2a0410ac9e17fc2d9883efee55cb5a11e4a68f2404241fdb6ef1bd5e13f995ae
Kalimehtar/gtk-cffi
label.lisp
;;; label.lisp -- GtkLabel ;;; Copyright ( C ) 2007 , < > ;;; (in-package :gtk-cffi) (defclass label (misc) ()) (defcenum justification :left :right :center :fill) (defcfun gtk-label-new :pointer (text :string)) (defmethod gconstructor ((label label) &key text &allow-other-keys)...
null
https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gtk/label.lisp
lisp
taken from cells-gtk
label.lisp -- GtkLabel Copyright ( C ) 2007 , < > (in-package :gtk-cffi) (defclass label (misc) ()) (defcenum justification :left :right :center :fill) (defcfun gtk-label-new :pointer (text :string)) (defmethod gconstructor ((label label) &key text &allow-other-keys) (gtk-labe...
7b92edcbac79353097421fd4a435a8bd946c90491fdf0f87488dff82f5ef2089
evrim/core-server
core.lisp
(in-package :core-server.test) (defparameter *core-server* (make-instance 'core-server)) (describe *core-server*) (start *core-server*) (setf ucw::*default-server* core-server.test::*core-server*) (defclass my-app2 (ucw-web-application apache-web-application) () (:default-initargs :fqdn "www.myweb.com" :ad...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/t/core.lisp
lisp
(in-package :core-server.test) (defparameter *core-server* (make-instance 'core-server)) (describe *core-server*) (start *core-server*) (setf ucw::*default-server* core-server.test::*core-server*) (defclass my-app2 (ucw-web-application apache-web-application) () (:default-initargs :fqdn "www.myweb.com" :ad...
f49ecf3266a4bc3f03c031b5090d56bf742ec0c7986c9c5d12b76e79f78599fe
paulosuzart/clact
storage.clj
(ns clacts.storage (:use [clojure.java.jdbc :only [create-table with-connection insert-record with-query-results]] [clojure.java.io] [datomic.api :only [q db] :as d] [clojure.pprint])) (defprotocol StorageMediumP (setup [this]) (put-fact [this author via fact]) (find-by-au...
null
https://raw.githubusercontent.com/paulosuzart/clact/9eeae62494075434a1ce4d647554eb47e6f1684c/src/clacts/storage.clj
clojure
Simple query to warm the database setup sqlite insert a fact into sqlite find fact by author. * means all authors =============== Datomic Auxiliary function to generation a connection before the Storage itself =============== The rest
(ns clacts.storage (:use [clojure.java.jdbc :only [create-table with-connection insert-record with-query-results]] [clojure.java.io] [datomic.api :only [q db] :as d] [clojure.pprint])) (defprotocol StorageMediumP (setup [this]) (put-fact [this author via fact]) (find-by-au...
9b3832fa12de7190099ec809fb37231bf45d697193edeb7f0b1cf316ffa4cf05
ghcjs/jsaddle-dom
CSSKeyframesRule.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.CSSKeyframesRule (insertRule, appendRule, deleteRule, findRule, findRule_, findRuleUnsafe, findRuleUnchecke...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/CSSKeyframesRule.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.CSSKeyframesRule (insertRule, appendRule, deleteRule, findRule, findRule_, findRuleUnsafe, findRuleUnchecked, get, get_, setName, getName, getCssRules, CSSKeyframesRule(..), gTypeCSSKeyframesRule) ...
1b69e69ae50a8d3cadc263cb2f2d05300dfe8fbbe457a09727137c2ce2234ca5
evdubs/zacks-estimates-financial-statements
dump-dolt-estimates.rkt
#lang racket/base (require db gregor racket/cmdline racket/string racket/system) (define base-folder (make-parameter "/var/tmp/dolt/earnings")) (define start-date (make-parameter (~t (today) "yyyy-MM-dd"))) (define end-date (make-parameter (~t (today) "yyyy-MM-dd"))) (define db-...
null
https://raw.githubusercontent.com/evdubs/zacks-estimates-financial-statements/5afa123fbba2b8ef4b8ba16571cb73d85fc098c8/dump-dolt-estimates.rkt
racket
rank-score eps-estimate sales-estimate
#lang racket/base (require db gregor racket/cmdline racket/string racket/system) (define base-folder (make-parameter "/var/tmp/dolt/earnings")) (define start-date (make-parameter (~t (today) "yyyy-MM-dd"))) (define end-date (make-parameter (~t (today) "yyyy-MM-dd"))) (define db-...
517f9d0f3e4ffac9bd5cecb6acef846dc2ab3e3c048aff55c7ac9f9c31878e4e
reborg/clojure-essential-reference
6.clj
< 1 > (first (keep-indexed #(when (= %2 x) %1) coll))) < 2 > 4 (first-index-of 11 (list 3 9 1 0 2 3 2)) ; <3> ;; nil
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialProcessing/keepandkeep-indexed/6.clj
clojure
<3> nil
< 1 > (first (keep-indexed #(when (= %2 x) %1) coll))) < 2 > 4
ba8bc46da650588c227d5b0fff9b30ade156be093f585d8ce29ca4e5ad46e903
offby1/anagrams
bag.scm
(define-module (bag)) (define primes #(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101)) (define char->index #f) (define char->factor #f) (let ((a-code (char->integer #\a))) (set! char->index (lambda ( c) (- (char->integer (char-downcase c)) ...
null
https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/guile/bag.scm
scheme
unit tests creating a bag from a string needn't be all that fast, since we'll reading a dictionary of words), whereas subtracting bags needs to be *really* fast, since I suspect we do this O(n!) times where n is the length of the string being anagrammed.
(define-module (bag)) (define primes #(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101)) (define char->index #f) (define char->factor #f) (let ((a-code (char->integer #\a))) (set! char->index (lambda ( c) (- (char->integer (char-downcase c)) ...
2659109915e331e14b7c0b1c077f595526a284850057d924ff5d3c1deca99828
janestreet/ocaml_plugin
test_with_sexp_dep.mli
open! Core type t [@@deriving sexp] val sexped : Sexp.t val first : t
null
https://raw.githubusercontent.com/janestreet/ocaml_plugin/7edff57f62e1d0039719f8f29c3e9d0aa85568a2/test/test_with_sexp_dep.mli
ocaml
open! Core type t [@@deriving sexp] val sexped : Sexp.t val first : t
067c9fdfaea4f26dbb9afcae3abd9decd1065a88796aaf693198a6d66156fb6a
chunsj/TH
gench-lstm.lisp
(defpackage :gench-lstm (:use #:common-lisp #:mu #:th)) (in-package :gench-lstm) ;; 1 - layer lstm ;; (defparameter *data-lines* (read-lines-from "data/tinyshakespeare.txt")) (defparameter *data* (format nil "~{~A~^~%~}" *data-lines*)) (defparameter *chars* (remove-duplicates (coerce *data* 'list...
null
https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/genchars/gench-lstm.lisp
lisp
for test
(defpackage :gench-lstm (:use #:common-lisp #:mu #:th)) (in-package :gench-lstm) 1 - layer lstm (defparameter *data-lines* (read-lines-from "data/tinyshakespeare.txt")) (defparameter *data* (format nil "~{~A~^~%~}" *data-lines*)) (defparameter *chars* (remove-duplicates (coerce *data* 'list))) (d...
a3382551158afe18cee56a8d05a3a348dbbe6c1a467713c3c864db25f9c6eaaa
chef/sqerl
sqerl_adhoc_tests.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*- %% ex: ts=4 sw=4 et @author < > Copyright 2011 - 2012 Opscode , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in comp...
null
https://raw.githubusercontent.com/chef/sqerl/a27e3e58da53240dc9925ec03ecdb894b8231cf9/test/sqerl_adhoc_tests.erl
erlang
ex: ts=4 sw=4 et Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. select test...
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*- @author < > Copyright 2011 - 2012 Opscode , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the Licen...
4392c9e023cfee6342171a1eac6bd8de02aaf791a7c2d46f9ebb160487397796
sacerdot/MiniErlangBlockchain
ch_rec_handler.erl
-module(ch_rec_handler). -import(proof_of_work , [check/2]). -export([chain_reconstruction_actor/5]). Codice dell'attore che ha la catena chain_reconstruction_actor(PID_bl_handler, PID_get_previous, Sender, Block, Bl_list) -> io : format("Attore ricostruzione catena : ~p ~ n " , [ self ( ) ] ) , Blocks_to_ad...
null
https://raw.githubusercontent.com/sacerdot/MiniErlangBlockchain/46713c579204994a528d2e642c8f7c0670c2a832/CappelliRossi-Node/ch_rec_handler.erl
erlang
io:format("Catena ricostruita:~n~p~n", [New_bl_list]), richiedo al Sender il blocco che non conosco il blocco arrivato è quello che stavo aspettando (fino al blocco in comune). Output: true se Bl_list è più lunga, indice del comune) e Bl_list è più lunga blocco di Bl_list, esso è comune alle due catene non c'è u...
-module(ch_rec_handler). -import(proof_of_work , [check/2]). -export([chain_reconstruction_actor/5]). Codice dell'attore che ha la catena chain_reconstruction_actor(PID_bl_handler, PID_get_previous, Sender, Block, Bl_list) -> io : format("Attore ricostruzione catena : ~p ~ n " , [ self ( ) ] ) , Blocks_to_ad...
9953b14de3802336d8376a304c0093727d68511f540f78ddaed6707c72c2d67c
jacekschae/learn-reitit-course-files
auth0.clj
(ns cheffy.auth0 (:require [clj-http.client :as http] [muuntaja.core :as m])) (defn get-test-token [] (->> {:content-type :json :cookie-policy :standard :body (m/encode "application/json" {:client_id "ts5NfJYbsIZ6rvhmbKykF9TkWz0tKcGS" :audience "-reiti...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/35-favorite-recipe/src/cheffy/auth0.clj
clojure
(ns cheffy.auth0 (:require [clj-http.client :as http] [muuntaja.core :as m])) (defn get-test-token [] (->> {:content-type :json :cookie-policy :standard :body (m/encode "application/json" {:client_id "ts5NfJYbsIZ6rvhmbKykF9TkWz0tKcGS" :audience "-reiti...
d521e796918a4102deed83cad702dc7b1296c23227e2a71830c2f89690e8d6bf
dakrone/clojure-opennlp
project.clj
(defproject clojure-opennlp "0.5.1-SNAPSHOT" :description "Natural Language Processing with Clojure, library for opennlp." :url "-opennlp" :min-lein-version "2.0.0" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.apache.opennlp/opennlp-tools "1.9.0"] ...
null
https://raw.githubusercontent.com/dakrone/clojure-opennlp/17627c13fe261e62e6c7ff0521fba2b6d92ec091/project.clj
clojure
(defproject clojure-opennlp "0.5.1-SNAPSHOT" :description "Natural Language Processing with Clojure, library for opennlp." :url "-opennlp" :min-lein-version "2.0.0" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.apache.opennlp/opennlp-tools "1.9.0"] ...
26ae69cb850578fb8c551f5524b826f8e4e16c24946a2422d3922bc4a58dae65
eschulte/software-evolution
package.lisp
(defpackage :software-evolution-example (:use :common-lisp :software-evolution :software-evolution-utility))
null
https://raw.githubusercontent.com/eschulte/software-evolution/dbf5900d1eef834b93eeb00eca34eb7c80e701b6/examples/package.lisp
lisp
(defpackage :software-evolution-example (:use :common-lisp :software-evolution :software-evolution-utility))
1092173ece6f1269f44e4a3cf60920a2c594a3446ffe4896932620f7eb037129
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.TimeGrain.HE.Rules ( rules ) whe...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/TimeGrain/HE/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.TimeGrain.HE.Rules ( rules ) where import Data.String import Data.Text (Text) import Prelude import Duckling.Dimensions.Types import Duckling.Types import qualified Duckling.TimeGrain.Types as TG grains :: [(Text, String, TG.Grain)] grains = [ ("...
08aef1b408bdcff4badd0e98d33a7363609dbcd9a50e974901d63858e77c67af
bishboria/learnyouahaskell
11_backwards_1.hs
main = do line <- getLine let line' = reverse line putStrLn $ "You said " ++ line' ++ " backwards!" putStrLn $ "Yes, you said " ++ line' ++ " backwards!"
null
https://raw.githubusercontent.com/bishboria/learnyouahaskell/d8c7b41398e9672db18c1b1360372fc4a4adefa8/11/11_backwards_1.hs
haskell
main = do line <- getLine let line' = reverse line putStrLn $ "You said " ++ line' ++ " backwards!" putStrLn $ "Yes, you said " ++ line' ++ " backwards!"
604bdaffc89d9c316e04887e6962295ac23991ebb2780924fd14f25acf11e20d
tatut/tuck
core.clj
(ns tuck.core) (comment (define-event ToggleDate [date] {:doc "Docstring" :path [:route :dates] ;; route in app state, defaults to root :app dates ;; defaults to "app" :pre [(t/after? date (t/now))] ;; normal clojure pre/post conditions :post [(not (nil? %))]} ;; body, can use ...
null
https://raw.githubusercontent.com/tatut/tuck/f053d3ac50bc623cbd44397cea2387a28c0cf82e/src/tuck/core.clj
clojure
route in app state, defaults to root defaults to "app" normal clojure pre/post conditions body, can use all parameters by name and the app state by name must return new app state Define an event that runs on a worker The send-main! can be used to send a message back to main UI the worker has its own app state...
(ns tuck.core) (comment (define-event ToggleDate [date] {:doc "Docstring" :post [(not (nil? %))]} (conj dates date)) (define-event DoSomeLongCalculation [things] {:worker :long-calculation} (let [long-result (long-function things)] (tuck/send-main! (->LongCalculationResult l...
1ecbd0a132b3a97eb087cb1d7b36d3d88f01bd74aba991b8ed28d625c4c0fe4c
dfinity/motoko
nameRel.ml
(* A data structure for binary relations on names *) module M = Env.Make(String) module S = Set.Make(String) type t = S.t M.t let empty : t = M.empty let cardinal : t -> int = fun m -> M.fold (fun _ s c -> S.cardinal s + c) m 0 let iter : (string -> string -> unit) -> t -> unit = fun f -> M.iter (fun x -> S.it...
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/lang_utils/nameRel.ml
ocaml
A data structure for binary relations on names dom R = { x | (x,y) ∈ R } range R = { y | (x,y) ∈ R } remove_range R S = { (x,y) | (x,y) ∈ R ∧ y ∉ S } union R1 R2 = R1 ∪ R2 = { (x,y) | (x,y) ∈ R1 ∨ (x,y) ∈ R2 } prod S1 S2 = S1 × S2 Just a utility function comp R1 R2 = R1 ∘ R2 = { (x,z) | (x,y) ∈ R1 ∧ (y,z...
module M = Env.Make(String) module S = Set.Make(String) type t = S.t M.t let empty : t = M.empty let cardinal : t -> int = fun m -> M.fold (fun _ s c -> S.cardinal s + c) m 0 let iter : (string -> string -> unit) -> t -> unit = fun f -> M.iter (fun x -> S.iter (f x)) let diag : string list -> t = List.fold_...
cc40be1c7b865d0c10de46cec833d996de5989cadab0f4c26786964b6b11f314
mozilla/medusa
config.clj
(ns clj.medusa.config (:require [clojure.java.io :as io] [clojure.edn :as edn] [taoensso.timbre :as timbre])) (timbre/refer-timbre) (def state (atom {})) (defn initialize [] (info "Loading configuration...") (with-open [rdr (java.io.PushbackReader. (io/reader "resources/config.edn"))] ,...
null
https://raw.githubusercontent.com/mozilla/medusa/213e712af2d7bb5580ba97d7770c1db140d457ee/src/clj/medusa/config.clj
clojure
(ns clj.medusa.config (:require [clojure.java.io :as io] [clojure.edn :as edn] [taoensso.timbre :as timbre])) (timbre/refer-timbre) (def state (atom {})) (defn initialize [] (info "Loading configuration...") (with-open [rdr (java.io.PushbackReader. (io/reader "resources/config.edn"))] ,...
2318e424d75108550f9670f65e8b779465aab411a5378e5b8363e07559218ef6
xapi-project/xen-api
cumulative_time.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/50c8a2edfd1c78eb35ec75348738f8ae9ccf5f3e/ocaml/perftest/cumulative_time.ml
ocaml
Plot a line for (a) elapsed time and (b) this particular duration
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
92499c292edc072f40d30e1f893bf34654a402de39bfc5684deadb3a88e9ee05
brunjlar/protop
Exponentials.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE TypeFamilies # module Protop.Core.Exponentials ( (:->)(..) , Curry(..) , Uncurry(..) , UNCC(..) , CUNC(..) , Eval , eval ) where im...
null
https://raw.githubusercontent.com/brunjlar/protop/9f520aeb4dd9baf9ebed8751584e33e3a3e23df6/src/Protop/Core/Exponentials.hs
haskell
# LANGUAGE GADTs # # LANGUAGE ConstraintKinds #
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # module Protop.Core.Exponentials ( (:->)(..) , Curry(..) , Uncurry(..) , UNCC(..) , CUNC(..) , Eval , eval ) where import Data.Proxy (Proxy(..)) import Protop.Co...
84f9e6e4f90d7ef55233ff0a0d5e304c8d1e39e633a66a0e90c39041de3a76fd
spawnfest/eep49ers
erl_compile.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/src/erl_compile.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1997 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erl_compile). -include("erl_compile.hrl"). -include("file.hrl"). -export([compile_cmdline/0, compile/2]). ...
e0e6533b509261bdf74e792f6ed9dd20f856853eb90d8c8cd68c04d3a47191f8
fpco/stackage-curator
CheckBuildPlan.hs
# LANGUAGE TupleSections # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # # LANGUAGE TypeFamilies ...
null
https://raw.githubusercontent.com/fpco/stackage-curator/c25cf6959a1d1b3129b18855ddbc7974324cc422/src/Stackage/CheckBuildPlan.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE NoImplicitPrelude # # LANGUAGE OverloadedStrings # | Confirm that a build plan has a consistent set of dependencies. Only looking at libraries and executables, benchmarks and tests are allowed to create cycles (e.g. test-framework depends on text,...
# LANGUAGE TupleSections # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # # LANGUAGE TypeFamilies # module Stackage.CheckBuildPlan ( checkBuildPlan , BadBuildPlan ) where import Control.Monad.Writer.Strict (...
0b59e6e1bc7d6cbf3d934e522ed68a5276998f26f230fe11d3914c5cfd4cb4e0
dhleong/wish
nav.cljs
(ns wish.sheets.dnd5e.subs.nav (:require [re-frame.core :as rf :refer [reg-sub]] [wish.sheets.dnd5e.subs.spells :as spells])) ; ======= 5e-specific nav ================================= (reg-sub :5e/page :5e/page) (reg-sub :5e/actions-page :5e/actions-page) (defn- page-specific-sheet [[sheet->page sh...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/sheets/dnd5e/subs/nav.cljs
clojure
======= 5e-specific nav ================================= but not have spells; in that case, fall back to :actions normal case fallback
(ns wish.sheets.dnd5e.subs.nav (:require [re-frame.core :as rf :refer [reg-sub]] [wish.sheets.dnd5e.subs.spells :as spells])) (reg-sub :5e/page :5e/page) (reg-sub :5e/actions-page :5e/actions-page) (defn- page-specific-sheet [[sheet->page sheet-id] [_ default]] (get sheet->page sheet-id default)) ...
af790d6054760f971a7ff924ea496d06a0d031bd420d0081bcc0b84c912e75b8
leo-project/leo_gateway
leo_nfs_mount3_svc.erl
%% %% src/leo_nfs_mount3_svc was generated by erpcgen (do not edit) %% -module(leo_nfs_mount3_svc). -include("leo_nfs_mount3.hrl"). -export([mountprog_3/5]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). init(Args) -> leo_nfs_mount3_server:init(Args). handle_call(Req, From...
null
https://raw.githubusercontent.com/leo-project/leo_gateway/7bac8912b762688f0ef237b31fee17e30e3888a3/src/leo_nfs_mount3_svc.erl
erlang
src/leo_nfs_mount3_svc was generated by erpcgen (do not edit)
-module(leo_nfs_mount3_svc). -include("leo_nfs_mount3.hrl"). -export([mountprog_3/5]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). init(Args) -> leo_nfs_mount3_server:init(Args). handle_call(Req, From, S) -> leo_nfs_mount3_server:handle_call(Req, From, S). handle_ca...
b7277b485114fdab86b9ec0fda9aae6cd5ca91ee80da5e447446aa11ba487f58
ocaml-multicore/parafuzz
inside_out.ml
(* TEST * expect *) type ('a, 'b) eq = Refl : ('a, 'a) eq type empty = (int, string) eq type ('a, 'b) t = Left : 'a -> ('a, 'b) t | Right : 'b -> ('a, 'b) t;; [%%expect{| type ('a, 'b) eq = Refl : ('a, 'a) eq type empty = (int, string) eq type ('a, 'b) t = Left : 'a -> ('a, 'b) t | Right : 'b -> ('a, 'b) t |}] ...
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/typing-misc/inside_out.ml
ocaml
TEST * expect
type ('a, 'b) eq = Refl : ('a, 'a) eq type empty = (int, string) eq type ('a, 'b) t = Left : 'a -> ('a, 'b) t | Right : 'b -> ('a, 'b) t;; [%%expect{| type ('a, 'b) eq = Refl : ('a, 'a) eq type empty = (int, string) eq type ('a, 'b) t = Left : 'a -> ('a, 'b) t | Right : 'b -> ('a, 'b) t |}] let f1 x = match x wi...
d047736d757f97a6fd74c6ac266b7bfb2ae753f3b55c40c96a12ed5a5b339670
erlangonrails/devdb
scgi.erl
Copyright ( c ) 2007 % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights % to use, copy, modify, merge, publish, distribute, s...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ringo/ringogw/src/scgi.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2007 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIA...
b763e26481afc5bd50ba29dc30cad2231e45902a91a3ecec45876d34586265dc
Clozure/ccl-tests
type.lsp
;-*- Mode: Lisp -*- Author : Created : Sun May 29 08:25:46 2005 ;;;; Contains: Tests of TYPE declarations (in-package :cl-test) ;;; Also of implicit type declarations (deftest type.1 (let ((x 1)) (declare (type (integer 0 1) x)) (values x (setq x 0) (1+ x))) 1 0 1) (deftest...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/type.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of TYPE declarations Also of implicit type declarations Free TYPE declaration It should not apply to the occurence of X in the form whose value is being bound to Y.
Author : Created : Sun May 29 08:25:46 2005 (in-package :cl-test) (deftest type.1 (let ((x 1)) (declare (type (integer 0 1) x)) (values x (setq x 0) (1+ x))) 1 0 1) (deftest type.2 (let ((x 1)) (declare (type (integer -1 1) x)) (locally (declare (type (integer 0 2) x)...
13f40cce87335bd4ba54b6779f8ad359740320d03baa4ebfe2efb6558b12c250
ocurrent/mirage-ci
git_context.mli
include Opam_0install.S.CONTEXT val read_packages : Git_unix.Store.t -> Git_unix.Store.Hash.t -> OpamFile.OPAM.t OpamPackage.Version.Map.t OpamPackage.Name.Map.t Lwt.t (** [read_packages store commit] is an index of the opam files in [store] at [commit]. *) val create : ?test:OpamPackage.Name.Set.t -> ?...
null
https://raw.githubusercontent.com/ocurrent/mirage-ci/855223ba8dffb153964e0df4f0f1b76713e77199/src/solver/git_context.mli
ocaml
* [read_packages store commit] is an index of the opam files in [store] at [commit].
include Opam_0install.S.CONTEXT val read_packages : Git_unix.Store.t -> Git_unix.Store.Hash.t -> OpamFile.OPAM.t OpamPackage.Version.Map.t OpamPackage.Name.Map.t Lwt.t val create : ?test:OpamPackage.Name.Set.t -> ?pins:(OpamPackage.Version.t * OpamFile.OPAM.t) OpamPackage.Name.Map.t -> constraints:OpamFor...
babc14a5e1306a092acae3530a40a274a4097e98d6acdbedefc9ed7353309cf8
pixlsus/registry.gimp.org_static
sample_avg_colour.scm
; sample_avg_colour.scm by ; Version 1.3 ( 20100625 ) ; ; Changes: 1.1 - added respect for selection , and layer alpha . 1.2 - code clean - up 1.3 - fixes " bug " created by bug fix for gimp 2.6.9 in gimp - histogram ; Description ; ; gets the average colour and allows setting of the fo...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/sample_avg_colour.scm
scheme
sample_avg_colour.scm Changes: Description gets the average colour and allows setting of the foreground, the background, or adding to the active palette the average colour License: This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at...
by Version 1.3 ( 20100625 ) 1.1 - added respect for selection , and layer alpha . 1.2 - code clean - up 1.3 - fixes " bug " created by bug fix for gimp 2.6.9 in gimp - histogram it under the terms of the GNU General Public License as published by The GNU Public License is available at ...
7cbdc5688f35022f1d0ee7d202cfa8956036dd385f96c4d0384129b7f8690793
nodew/haskell-realworld-example
Environment.hs
{-# LANGUAGE RankNTypes #-} module Conduit.Environment where import Hasql.Pool (Pool) import Crypto.JOSE (JWK) import RIO (MonadReader, ask, (<&>)) class HasDbPool env where getDbPool :: env -> Pool class HasJwtKey env where getJwtKey :: env -> JWK getDbPool' :: (HasDbPool env, MonadReader env m) => m Pool getD...
null
https://raw.githubusercontent.com/nodew/haskell-realworld-example/f7b467c8ee442383e4b6467d28e7dbab540471af/src/Conduit/Environment.hs
haskell
# LANGUAGE RankNTypes #
module Conduit.Environment where import Hasql.Pool (Pool) import Crypto.JOSE (JWK) import RIO (MonadReader, ask, (<&>)) class HasDbPool env where getDbPool :: env -> Pool class HasJwtKey env where getJwtKey :: env -> JWK getDbPool' :: (HasDbPool env, MonadReader env m) => m Pool getDbPool' = ask <&> getDbPool ...
c914ba73050f499dcd7290657e77d9e9845dbbe1de1211cf6ccd748026ddbed2
scalar-labs/scalar-jepsen
elle_append_2pc.clj
(ns scalardb.elle-append-2pc (:require [clojure.string :as str] [clojure.tools.logging :refer [info]] [jepsen.client :as client] [jepsen.generator :as gen] [jepsen.independent :as independent] [jepsen.tests.cycle.append :as append] [cassandra.con...
null
https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/cb7d6485d654b093c74ddeb26090c6af75c1ccb9/scalardb/src/scalardb/elle_append_2pc.clj
clojure
add tables for the next sequence
(ns scalardb.elle-append-2pc (:require [clojure.string :as str] [clojure.tools.logging :refer [info]] [jepsen.client :as client] [jepsen.generator :as gen] [jepsen.independent :as independent] [jepsen.tests.cycle.append :as append] [cassandra.con...
b2904593fcbef58ed9811d48d05f45634c9446a7a857185cea2244fd8357815f
alex-hhh/geoid
geodesy.rkt
#lang typed/racket/base SPDX - License - Identifier : LGPL-3.0 - or - later ;; geodesy.rkt -- calculate distances on the earth ellipsoid ;; This file is part of geoid -- work efficiently with geographic data Copyright ( c ) 2022 < > ;; ;; This program is free software: you can redistribute it and/or modify it...
null
https://raw.githubusercontent.com/alex-hhh/geoid/b78a3cb08fd0dd99c0c6bee5eff231cb6f00cce6/geodesy.rkt
racket
geodesy.rkt -- calculate distances on the earth ellipsoid This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT witho...
#lang typed/racket/base SPDX - License - Identifier : LGPL-3.0 - or - later This file is part of geoid -- work efficiently with geographic data Copyright ( c ) 2022 < > the Free Software Foundation , either version 3 of the License , or ( at your You should have received a copy of the GNU Lesser General P...
c4a721dc2d0a8270d796b8e5037111b4de48fde28f7fee2e9a7b304218f33309
philschonholzer/co2db
Edit.hs
module Web.View.Co2Producers.Edit where import Web.View.Prelude data EditView = EditView {co2Producer :: Co2Producer, categories :: [Category]} instance View EditView where html EditView {..} = [hsx| <header> <nav> <ol class="breadcrumb"> <li class="breadcrumb-item">...
null
https://raw.githubusercontent.com/philschonholzer/co2db/9b4e1a2fc877bd430b82bae9cec9cb03010bc928/Web/View/Co2Producers/Edit.hs
haskell
module Web.View.Co2Producers.Edit where import Web.View.Prelude data EditView = EditView {co2Producer :: Co2Producer, categories :: [Category]} instance View EditView where html EditView {..} = [hsx| <header> <nav> <ol class="breadcrumb"> <li class="breadcrumb-item">...
e86b8e4f24037774c182aee07a9599fadbc9c8d41319b6e4953c25c8e6bb1b8e
fractalide/fractalide
exception-raiser.rkt
#!/usr/bin/env racket #lang racket (require fractalide/modules/rkt/rkt-fbp/agent) (define-agent #:input '("in") (define msg (or (try-recv (input "option")) "mistakes were made")) (recv (input "in")) (error msg)) (module+ main (require syntax/location) (require fractalide/modules/rkt/rkt-fbp/graph) (...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/exception-raiser.rkt
racket
#!/usr/bin/env racket #lang racket (require fractalide/modules/rkt/rkt-fbp/agent) (define-agent #:input '("in") (define msg (or (try-recv (input "option")) "mistakes were made")) (recv (input "in")) (error msg)) (module+ main (require syntax/location) (require fractalide/modules/rkt/rkt-fbp/graph) (...
0ea27264745ae520e59a49487f53a9100f3db63e0ab535eea6745cf10b5626d6
input-output-hk/cardano-sl
StateLock.hs
module Pos.Infra.StateLock ( module X ) where import Pos.DB.GState.Lock as X
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/StateLock.hs
haskell
module Pos.Infra.StateLock ( module X ) where import Pos.DB.GState.Lock as X
834eeb271912e92e4c018eb8d6e3467f93b497016878193ad8fec3db6224e02e
tweag/asterius
cgrun003.hs
main = print (id2 (id2 id2) (42::Int)) -- where -- id2 = s k k -- id2 x = s k k x id2 = s k k s x y z = x z (y z) k x y = x
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/cgrun003.hs
haskell
where id2 = s k k id2 x = s k k x
main = print (id2 (id2 id2) (42::Int)) id2 = s k k s x y z = x z (y z) k x y = x
2901a15bb8ae2d900de4101610920a8e7a90f486dc96cd5de199bbc2641d1e43
chrisdone/ircbrowse
Linkify.hs
-- | Render some text to HTML, replacing any URIs with actual links. module Text.Blaze.Linkify where import Data.Text (Text) import Text.Blaze.Html5 import Text.Blaze.Html5.Attributes import Text.Links import Data.String.Extra -- | Render some text to HTML, replacing any URIs with actual links. linkify :: Text -> H...
null
https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/src/Text/Blaze/Linkify.hs
haskell
| Render some text to HTML, replacing any URIs with actual links. | Render some text to HTML, replacing any URIs with actual links.
module Text.Blaze.Linkify where import Data.Text (Text) import Text.Blaze.Html5 import Text.Blaze.Html5.Attributes import Text.Links import Data.String.Extra linkify :: Text -> Html linkify = mapM_ renderOrLeave . explodeLinks where renderOrLeave (Right text) = toHtml text renderOrLeave (Left uri) = a ! href (t...
7cdaefa2810b31f1244f0934776ff80ae0a24a3deb454e2a7aa325b06eaee1ef
floybix/cppnx
webgl_trace.cljs
(ns org.nfrac.cppnx.webgl-trace (:require [org.nfrac.cppnx.core :as cppnx] [org.nfrac.cppnx.compile-webgl :as glsl] [goog.webgl :as ggl])) (def start-cppn {:domain :trace :inputs #{:bias :t :z} :outputs #{:y} :nodes {:i0 :gaussian} :edges {:i0 {:z 1.0 :t 1.0 ...
null
https://raw.githubusercontent.com/floybix/cppnx/4acde1c249f3a978d6eab1226aeaa5d7c54ddfc2/src/org/nfrac/cppnx/webgl_trace.cljs
clojure
"
(ns org.nfrac.cppnx.webgl-trace (:require [org.nfrac.cppnx.core :as cppnx] [org.nfrac.cppnx.compile-webgl :as glsl] [goog.webgl :as ggl])) (def start-cppn {:domain :trace :inputs #{:bias :t :z} :outputs #{:y} :nodes {:i0 :gaussian} :edges {:i0 {:z 1.0 :t 1.0 ...
7f9d8d078498ddff147f7f2f64a8c7fe6689aaf028ce99c3e393671d875690a2
deadpendency/deadpendency
TheMain.hs
module EP.TheMain ( theMain, ) where import Common.Loader.CommonConfigLoader (loadCommonConfig) import Common.Loader.GoogleEnvLoader (loadGoogleEnv) import Common.Loader.HttpManagerLoader (loadHttpManager) import Common.Loader.InstanceConfigLoader (loadInstanceConfig) import EP.AppGoogleScopes (AppGoogleScopes) im...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/error-processor/src/EP/TheMain.hs
haskell
module EP.TheMain ( theMain, ) where import Common.Loader.CommonConfigLoader (loadCommonConfig) import Common.Loader.GoogleEnvLoader (loadGoogleEnv) import Common.Loader.HttpManagerLoader (loadHttpManager) import Common.Loader.InstanceConfigLoader (loadInstanceConfig) import EP.AppGoogleScopes (AppGoogleScopes) im...
d14592c68142995bc12863f8bf0fa3f5fe674f59277f47f222de569548ed3f48
jeromesimeon/Galax
wsdl_printer.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/wsdl/wsdl_printer.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : , v 1.2 2007/02/01 22:08:55 simeon Exp $ * @(#)wsdl_printer.ml Prints a wsdl description file from a WSDL AST . @author @(#)wsdl_printer.ml Prints a wsdl description file from a WSDL AST. @author Nicola Ono...
35449a89918e967956b30dbd3de702a0fc9e9bc75762c45bbe94a2aa4345d2bf
rtoy/ansi-cl-tests
print-length.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Jul 27 08:27:37 2004 ;;;; Contains: Tests involving *PRINT-LENGTH* (in-package :cl-test) (compile-and-load "printer-aux.lsp") (def-print-test print-length.1 '(1) "(...)" (*print-length* 0)) (def-print-test print-length.2 '(1) "(1)" (*print-length...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/print-length.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests involving *PRINT-LENGTH* The next test tacitly assumes issue STRUCTURE-READ-PRINT-SYNTAX
Author : Created : Tue Jul 27 08:27:37 2004 (in-package :cl-test) (compile-and-load "printer-aux.lsp") (def-print-test print-length.1 '(1) "(...)" (*print-length* 0)) (def-print-test print-length.2 '(1) "(1)" (*print-length* nil)) (def-print-test print-length.3 '(1) "(1)" (*print-lengt...
e57f36bcb8593e01444ebc775a1fce2b8f7e10f2fb38f4a9561b0c8719b13a6b
forked-from-1kasper/anders
token.ml
open Parser let tokenToString : token -> string = function | IDENT s -> Printf.sprintf "IDENT %s" s | PRE u -> Printf.sprintf "PRE %s" (Z.to_string u) | KAN u -> Printf.sprintf "KAN %s" (Z.to_string u) | EXT s -> Printf.sprintf "EXT «%s»" s | PREOMEGA u -> Printf.sprintf "PREOMEGA %s" (Z.to...
null
https://raw.githubusercontent.com/forked-from-1kasper/anders/4846f5b93c8979ff10e64061973ed681e2b8fa8c/src/frontend/token.ml
ocaml
open Parser let tokenToString : token -> string = function | IDENT s -> Printf.sprintf "IDENT %s" s | PRE u -> Printf.sprintf "PRE %s" (Z.to_string u) | KAN u -> Printf.sprintf "KAN %s" (Z.to_string u) | EXT s -> Printf.sprintf "EXT «%s»" s | PREOMEGA u -> Printf.sprintf "PREOMEGA %s" (Z.to...
856b672dd8842b770d570fcc74c8e9cf8a2b03eeca15eed14b125dd83c4904e0
candidtim/tempo
CLI.hs
module CLI ( submitLogInteractive ) where import Control.Monad import Text.Printf import Config import Jira askToConfirm :: [WorkLog] -> IO Bool askToConfirm workLog = do putStrLn "Will log following items:" mapM_ (putStrLn . sitem) workLog putStrLn "OK? (y/n)" r <- getLine return $ r == "y" sitem :: Wor...
null
https://raw.githubusercontent.com/candidtim/tempo/cc48c69188342f5674b2746f2e1873df5cb497dc/src/CLI.hs
haskell
module CLI ( submitLogInteractive ) where import Control.Monad import Text.Printf import Config import Jira askToConfirm :: [WorkLog] -> IO Bool askToConfirm workLog = do putStrLn "Will log following items:" mapM_ (putStrLn . sitem) workLog putStrLn "OK? (y/n)" r <- getLine return $ r == "y" sitem :: Wor...