_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
710e63178bb0b7cd190454896f57cfe2092c51d0ea27219b7af0dbf397775a50
open-company/open-company-storage
access.clj
(ns oc.storage.api.access "Access control functions for storage API." (:require [if-let.core :refer (if-let*)] [defun.core :refer (defun)] [taoensso.timbre :as timbre] [oc.lib.schema :as lib-schema] [oc.lib.slugify :as slugify] [oc.storage.resources.org :a...
null
https://raw.githubusercontent.com/open-company/open-company-storage/ae4bbe6245f8736f3c1813c3048448035aff5815/src/oc/storage/api/access.clj
clojure
----- Validation ----- ----- Authorization ----- Access to org Will fail existence checks later With org slug, check if it exists Will fail existence checks later With org resource, return the access level an admin of this org's team a named author of this org a team member of this org no access Will fail e...
(ns oc.storage.api.access "Access control functions for storage API." (:require [if-let.core :refer (if-let*)] [defun.core :refer (defun)] [taoensso.timbre :as timbre] [oc.lib.schema :as lib-schema] [oc.lib.slugify :as slugify] [oc.storage.resources.org :a...
990adaee9c94996cfd641681ca11c0976954003df713e3087a916438be223478
CSCfi/rems
fix_userid.clj
(ns rems.db.fix-userid (:require rems.service.dependencies [rems.db.api-key] [rems.db.applications] [rems.db.attachments] [rems.db.blacklist] [rems.db.core] [rems.db.events] [rems.db.form] [rems.db.invitation] ...
null
https://raw.githubusercontent.com/CSCfi/rems/490087c4d58339c908da792111029fbaf817a26f/src/clj/rems/db/fix_userid.clj
clojure
nothing to fix in external_application_id nothing to fix in form_template nothing to fix in license nothing to fix in license_attachment nothing to fix in license_localization nothing to fix in outbox nothing to fix in resource nothing to fix in resource_licenses referential constraints will force this to exis...
(ns rems.db.fix-userid (:require rems.service.dependencies [rems.db.api-key] [rems.db.applications] [rems.db.attachments] [rems.db.blacklist] [rems.db.core] [rems.db.events] [rems.db.form] [rems.db.invitation] ...
135aadaa35b1980d487bafa5549cc6468ceeba0df2bc1433640d182321704fa9
haskell/cabal
ParseUtils.hs
# LANGUAGE CPP # ----------------------------------------------------------------------------- -- | -- Module : Distribution.Deprecated.ParseUtils Copyright : ( c ) The University of Glasgow 2004 -- License : BSD3 -- -- Maintainer : -- Portability : portable -- Utilities for parsing ' PackageDes...
null
https://raw.githubusercontent.com/haskell/cabal/32259a1518d45723b0bbf989088bee61b07d4bb6/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Deprecated.ParseUtils License : BSD3 Maintainer : Portability : portable The @.cabal@ file format is not trivial, especially with the introduction of configurations and the section syntax that go...
# LANGUAGE CPP # Copyright : ( c ) The University of Glasgow 2004 Utilities for parsing ' PackageDescription ' and ' InstalledPackageInfo ' . module Distribution.Deprecated.ParseUtils ( LineNo, PError(..), PWarning(..), locatedErrorMsg, syntaxError, warning, runP, runE, ParseResult(..), parse...
0a13312a826ed4e39e9860f317b201ec08d20a2122737c6b6064bed827678869
static-analysis-engineering/codehawk
bCHByteUtilities.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/dd2c3b9f84b4b5f3c88898505ee912e1e461e809/CodeHawk/CHB/bchlib/bCHByteUtilities.ml
ocaml
chutil bchlib
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
ceaebc05451fb5522ad59aac15834a6f4bcba7b098cc3db20133b2f628e9b63f
na4zagin3/satyrographos
command_lint__missing_file.ml
open Core open Satyrographos_testlib let satysfi_package_opam = "satysfi-package.opam", TestLib.opam_file_for_test ~name:"satysfi-package" ~version:"0.1" () let satysfi_package_doc_opam = "satysfi-package-doc.opam", TestLib.opam_file_for_test ~name:"satysfi-package-doc" ~version:"0.1" ~dep...
null
https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/test/testcases/command_lint__missing_file.ml
ocaml
open Core open Satyrographos_testlib let satysfi_package_opam = "satysfi-package.opam", TestLib.opam_file_for_test ~name:"satysfi-package" ~version:"0.1" () let satysfi_package_doc_opam = "satysfi-package-doc.opam", TestLib.opam_file_for_test ~name:"satysfi-package-doc" ~version:"0.1" ~dep...
56b25a3cee337a9a6a0da1663ac21c65a735c30e29bd70b25323bdae71fcc214
2600hz/kazoo
kazoo_media_maintenance.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_media/src/kazoo_media_maintenance.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc Only delete original attributes when the original doc is NOT delet...
( C ) 2010 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kazoo_media_maintenance). -export([remove_empty_media_docs/0 ,remove_empty_media_docs/1 ,...
86ee537ff5e19e2cca9e1e3a4f23949a7797b1ef7a8a837a9201c550619cce62
greglook/clj-cbor
simple_test.clj
(ns clj-cbor.data.simple-test (:require [clj-cbor.data.simple :refer [->Undefined ->SimpleValue]] [clojure.test :refer [deftest testing is]])) (deftest undefined-values (let [undefined (->Undefined nil)] (testing "representation" (is (= "undefined" (str undefined)))) (testing "equality" ...
null
https://raw.githubusercontent.com/greglook/clj-cbor/ff3ec660fe40789e2bf97b87b6a5e9be0361b0b2/test/clj_cbor/data/simple_test.clj
clojure
(ns clj-cbor.data.simple-test (:require [clj-cbor.data.simple :refer [->Undefined ->SimpleValue]] [clojure.test :refer [deftest testing is]])) (deftest undefined-values (let [undefined (->Undefined nil)] (testing "representation" (is (= "undefined" (str undefined)))) (testing "equality" ...
ced645fa3659dbb10aa450652835a77524f461cf6e58fcf1f451a5d8a0b38c65
haskell-tools/haskell-tools
RangeToRangeTemplate.hs
# LANGUAGE ScopedTypeVariables # -- | Transform a syntax tree with ranges to a syntax tree that has range templates. Cuts the ranges of children -- from the ranges of their parents and replaces it with placeholders. module Language.Haskell.Tools.PrettyPrint.Prepare.RangeToRangeTemplate (cutUpRanges, fixRanges, BreakUp...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/prettyprint/Language/Haskell/Tools/PrettyPrint/Prepare/RangeToRangeTemplate.hs
haskell
| Transform a syntax tree with ranges to a syntax tree that has range templates. Cuts the ranges of children from the ranges of their parents and replaces it with placeholders. | Creates a source template from the ranges and the input file. All source ranges must be good ranges. keep the stack to contain the child...
# LANGUAGE ScopedTypeVariables # module Language.Haskell.Tools.PrettyPrint.Prepare.RangeToRangeTemplate (cutUpRanges, fixRanges, BreakUpProblem(..)) where import Language.Haskell.Tools.AST import Control.Exception (Exception, throw) import Control.Monad.State import Control.Reference ((^.)) import Data.List import D...
88b8c9880090d60763dfe0f68a23d1acaa938921899d1d44535cf2ebdebe9ec1
haskell-repa/repa
InstMaybe.hs
# LANGUAGE UndecidableInstances , IncoherentInstances # # OPTIONS_GHC -fno - warn - orphans # module Data.Repa.Array.Material.Auto.InstMaybe ( A (..) , Name (..) , Array (..)) where import Data.Repa.Array.Material.Auto.Base as A import Data.Repa.Array.Mater...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-array/Data/Repa/Array/Material/Auto/InstMaybe.hs
haskell
# INLINE_ARRAY unsafeNewBuffer # # INLINE_ARRAY unsafeThawBuffer # # INLINE_ARRAY unsafeSliceBuffer # # INLINE_ARRAY bufferLayout #
# LANGUAGE UndecidableInstances , IncoherentInstances # # OPTIONS_GHC -fno - warn - orphans # module Data.Repa.Array.Material.Auto.InstMaybe ( A (..) , Name (..) , Array (..)) where import Data.Repa.Array.Material.Auto.Base as A import Data.Repa.Array.Mater...
0f30ff800ef06d9c9dbc8772d893bc46dc89feedf7a0846758a69682fbbfbb68
fission-codes/fission
Token.hs
module Fission.Web.Server.Auth.Token ( get , handler , module Fission.Web.Server.Auth.Token.Types ) where import Network.Wai import Servant.API import qualified Web.UCAN.Resolver as UCAN import Fission.Prelude import Fission.Authorization.ServerDI...
null
https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-web-server/library/Fission/Web/Server/Auth/Token.hs
haskell
| Higher order auth handler Uses basic auth for "Basic" tokens
module Fission.Web.Server.Auth.Token ( get , handler , module Fission.Web.Server.Auth.Token.Types ) where import Network.Wai import Servant.API import qualified Web.UCAN.Resolver as UCAN import Fission.Prelude import Fission.Authorization.ServerDI...
6a3cd87e3910ee79096fce5127f8afc76cd93b2fe50720ec58cd70842f74df36
jgrodziski/set-game
core_test.clj
(ns set-game.core-test (:require [clojure.test :refer :all] [set-game.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/jgrodziski/set-game/4f918f53f26fe1b7744773cf1786ccf7272a121d/frontend/test/set_game/core_test.clj
clojure
(ns set-game.core-test (:require [clojure.test :refer :all] [set-game.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
ebcaa1bd28149f3479d3c9df28473ad294e70cd1554ee372cafd52bf2e5fa29d
retrogradeorbit/cloud-fighter
boss.cljs
(ns cloud-fighter.boss (:require [infinitelives.utils.vec2 :as vec2] [infinitelives.utils.events :as e] [infinitelives.utils.boid :as b] [infinitelives.utils.math :as math] [infinitelives.utils.console :refer [log]] [infinitelives.utils.spatial :as spatial] ...
null
https://raw.githubusercontent.com/retrogradeorbit/cloud-fighter/4c4d30fc2d9b14ce4c73f3d252be519daaa09d51/src/cloud_fighter/boss.cljs
clojure
shoot & missile check for collision final-shot! key no longer in set alive! shot not shot
(ns cloud-fighter.boss (:require [infinitelives.utils.vec2 :as vec2] [infinitelives.utils.events :as e] [infinitelives.utils.boid :as b] [infinitelives.utils.math :as math] [infinitelives.utils.console :refer [log]] [infinitelives.utils.spatial :as spatial] ...
b6469f3f96cde069d33441f7e7599e5dc681bc35d75e0a7d5694c75ce31c986c
bgusach/exercises-htdp2e
ex-112.rkt
#lang htdp/bsl (require test-engine/racket-tests) (check-expect (missile-or-not? #true) #false) (check-expect (missile-or-not? #false) #true) (check-expect (missile-or-not? (make-posn 0 0)) #true) (check-expect (missile-or-not? "lol") #false) (define (missile-or-not? v) (or (false? v) (posn? v) )) (...
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-112.rkt
racket
#lang htdp/bsl (require test-engine/racket-tests) (check-expect (missile-or-not? #true) #false) (check-expect (missile-or-not? #false) #true) (check-expect (missile-or-not? (make-posn 0 0)) #true) (check-expect (missile-or-not? "lol") #false) (define (missile-or-not? v) (or (false? v) (posn? v) )) (...
1e7cd2a2990fe06d4ed82452542d4c1979f8ef5a65b5eef8948fcdb3131212e1
wilbowma/compiler-theory
serve.rkt
#lang racket/base (require web-server/dispatchers/dispatch web-server/servlet-env) (serve/servlet (lambda (_) (next-dispatcher)) #:servlet-path "/index.html" #:extra-files-paths (list "compiler-theory") #:port 8000 #:listen-ip #f #:launch-br...
null
https://raw.githubusercontent.com/wilbowma/compiler-theory/3facf11302e0f6051b1175e7cf3e3a8bcd30e982/serve.rkt
racket
#lang racket/base (require web-server/dispatchers/dispatch web-server/servlet-env) (serve/servlet (lambda (_) (next-dispatcher)) #:servlet-path "/index.html" #:extra-files-paths (list "compiler-theory") #:port 8000 #:listen-ip #f #:launch-br...
da43190052b14e40fe7d81e1347faae4c8aa315f5cdbbe9676fe53801211916b
homegrownlabs/sim-template
model.clj
(ns {{namespace}}.model "This namespace describes potential agent interactions with a system, as well as functions for realizing that non-deterministic behavior into a fixed simulant 'test'." (:require [simulant.util :refer [tx-ent]] [datomic.api :as d] [causatum.event-streams :as es] ...
null
https://raw.githubusercontent.com/homegrownlabs/sim-template/2ddba7c1a3c2a17aff1e1ed30bada941bcb938a3/src/leiningen/new/sim_test/src/model.clj
clojure
from-state to-state weight max-delay (ms)
(ns {{namespace}}.model "This namespace describes potential agent interactions with a system, as well as functions for realizing that non-deterministic behavior into a fixed simulant 'test'." (:require [simulant.util :refer [tx-ent]] [datomic.api :as d] [causatum.event-streams :as es] ...
b15c15ad1eaa39565d5c9d14e686996f659f0af9219a4473f28f0ab9d05a310b
altsun/My-Lisps
(SW) Continue Polyline.lsp
(defun C:SW (/ dat c elst wid ename pend pt) (vl-load-com) (setvar "cmdecho" 0) (setq plw (getvar "plinewid")) (if (and (setq dat (entsel "\nSelect source polyline: ")) (wcmatch (cdadr (setq elst (entget (setq ename (car dat))))) "*POLYLINE*")) (progn (setq wid (cdr (assoc 40 elst))) (prompt (strcat "\nWidth is " (rtos...
null
https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Common/(SW)%20Continue%20Polyline.lsp
lisp
(defun C:SW (/ dat c elst wid ename pend pt) (vl-load-com) (setvar "cmdecho" 0) (setq plw (getvar "plinewid")) (if (and (setq dat (entsel "\nSelect source polyline: ")) (wcmatch (cdadr (setq elst (entget (setq ename (car dat))))) "*POLYLINE*")) (progn (setq wid (cdr (assoc 40 elst))) (prompt (strcat "\nWidth is " (rtos...
5b4e2715063fe17f5e719c40fbe24bb876991e8e9626fab68e29449d8450febf
ocurrent/ocurrent
current_ssh.ml
open Current.Syntax module R = Current_cache.Output(Run) let run ~schedule ~key host args = Current.component "ssh@,%s" host |> let> args = args in R.set ~schedule host key { Run.Value.args }
null
https://raw.githubusercontent.com/ocurrent/ocurrent/ffc6e710d9d3735e747539701de4a14228a1f9a5/plugins/ssh/current_ssh.ml
ocaml
open Current.Syntax module R = Current_cache.Output(Run) let run ~schedule ~key host args = Current.component "ssh@,%s" host |> let> args = args in R.set ~schedule host key { Run.Value.args }
d01376c0a58f07de9b8506b2c27dd5f16a6a77af7da8b89b66c20b2b9ecece4a
cbaggers/cepl
proxy.lisp
;; rather than interfaces make proxies ;; a proxy is defined as a list of functions the object must adhere to a proxy is then a struct that has a field for the object and then one ;; for each function (defgeneric defproxy-impl (proxy-name target-type-name)) (defstruct proxy (target (error "All proxies must be i...
null
https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/protocode/_/proxy.lisp
lisp
rather than interfaces make proxies a proxy is defined as a list of functions the object must adhere to for each function def-proxy-impl is a macro that lets you define a implementation for a proxy for a given type you can then use (make-*-proxy x) where * is the type (proxy *) which is generic and specialized o...
a proxy is then a struct that has a field for the object and then one (defgeneric defproxy-impl (proxy-name target-type-name)) (defstruct proxy (target (error "All proxies must be initialized with a target") :type t)) (defmacro defproxy (name &body func-descriptions) `(progn (defstruct (,(symb name 'pro...
bac2a4830587876f5696bbda1907a974b9a396d031e8ea74acde27f41dabb8d3
deusdat/waller
ragtime.clj
(ns waller.ragtime "This ns implements the features required by Ragtime." (:require [ragtime.protocols :as p] [waller.core :refer [create-context,ensure-track-store!]] [travesedo.document :as tdoc] [clojure.edn :as edn] [clojure.string :as cstr] [clojure.j...
null
https://raw.githubusercontent.com/deusdat/waller/bf003cf328defe73fc6189c0d7912eea687af6f9/src/waller/ragtime.clj
clojure
Shameless stealing from Ragtime JDBC to load files. Migration functions
(ns waller.ragtime "This ns implements the features required by Ragtime." (:require [ragtime.protocols :as p] [waller.core :refer [create-context,ensure-track-store!]] [travesedo.document :as tdoc] [clojure.edn :as edn] [clojure.string :as cstr] [clojure.j...
f47e998d547560cd2896289ed54da47e7f14b74e7ede0035262325ef6726685b
damianfral/BrainHask
Parser.hs
module Language.BrainHask.Parser (parseBF) where import Control.Applicative hiding (optional) import Language.BrainHask.Types import Text.Parsec hiding (many) type Parser = Parsec String () toOpParser :: String -> BFOp -> Parser BFOp toOpParser s p = p <$ string s programParser :: Parser BFProgram programParser = m...
null
https://raw.githubusercontent.com/damianfral/BrainHask/64b4cb0ba2c3ee85b647b578a4165b7e38d55dce/src/Language/BrainHask/Parser.hs
haskell
module Language.BrainHask.Parser (parseBF) where import Control.Applicative hiding (optional) import Language.BrainHask.Types import Text.Parsec hiding (many) type Parser = Parsec String () toOpParser :: String -> BFOp -> Parser BFOp toOpParser s p = p <$ string s programParser :: Parser BFProgram programParser = m...
49cc1f40feade8dae2f5e888e1e66c128535c6ad671dc2adb064b1aa0c6f0825
basho/machi
machi_lifecycle_mgr_test.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2014 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 in compliance with the License . You...
null
https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/test/machi_lifecycle_mgr_test.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2007 - 2014 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 ...
61381d36c870b96ca4150ae37c2ed598ffa2157d70835e5ef2a7f9115ea382c1
sellout/yaya
Retrofit.hs
# LANGUAGE CPP # # LANGUAGE TemplateHaskell # | This module re - exports a subset of ` . Fold ` , intended for when you want -- to define recursion scheme instances for your existing recursive types. -- This is /not/ the recommended way to use , but it solves some real -- problems: 1 . you have existing ...
null
https://raw.githubusercontent.com/sellout/yaya/8ec5afb3481b2fc3bcec7b7f8db63f867027e0d2/core/src/Yaya/Retrofit.hs
haskell
to define recursion scheme instances for your existing recursive types. problems: advantage of recursion schemes without having to rewrite your existing code, or and you want to take advantage of recursion schemes. instance). If you don't have control, then you /may/ need to generate all insta...
# LANGUAGE CPP # # LANGUAGE TemplateHaskell # | This module re - exports a subset of ` . Fold ` , intended for when you want This is /not/ the recommended way to use , but it solves some real 1 . you have existing directly - recursive types and you want to start taking 2 . a directly - recursive type has b...
22d4a8c6cf1eb61cb4ebf8eed78a6f3b17ea45af4134e5767a82f016932ae521
McCLIM/McCLIM
puzzle.lisp
$ fiHeader : puzzle.lisp , v 1.23 1993/07/27 01:46:05 (in-package #:clim-demo) "Copyright (c) 1989, 1990, 1991, 1992 Symbolics, Inc. All rights reserved." (define-application-frame puzzle () ((puzzle :initform (make-array '(4 4)) :accessor puzzle-puzzle)) (:panes (display :application ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/282753392aab1d1c25e9f61a8285647387ae1c70/Examples/puzzle.lisp
lisp
check row
$ fiHeader : puzzle.lisp , v 1.23 1993/07/27 01:46:05 (in-package #:clim-demo) "Copyright (c) 1989, 1990, 1991, 1992 Symbolics, Inc. All rights reserved." (define-application-frame puzzle () ((puzzle :initform (make-array '(4 4)) :accessor puzzle-puzzle)) (:panes (display :application ...
5cd304e9d0f75bb43de152edca26f1e410350ba55671fce2173ce4adc1e84a4b
factisresearch/large-hashable
Intern.hs
-- | Generic, low-level data types for hashing. This is an internal module. -- -- You should only import this module if you write your own hash algorithm -- or if you need access to low-level hashing functions when defining -- instances of 'LargeHash'. -- -- Regular users should not import this module. Import 'Data.Lar...
null
https://raw.githubusercontent.com/factisresearch/large-hashable/7b7c2ed6ac6e096478e8ee00160fa9d220df853a/src/Data/LargeHashable/Intern.hs
haskell
| Generic, low-level data types for hashing. This is an internal module. You should only import this module if you write your own hash algorithm or if you need access to low-level hashing functions when defining instances of 'LargeHash'. Regular users should not import this module. Import 'Data.LargeHashable' i...
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # module Data.LargeHashable.Intern ( HashUpdates(..), HashAlgorithm(..), LH , hashUpdates, ioInLH, runLH, updateXorHash ) where keep imports in alphabetic order ( in Emacs , use " M - x sort - lines " ) import Control.Monad import Data.Word imp...
b060a84bdcf029dfc24bbb8240a5f3a28b1e4cfeddf45d34b8aede1a59792fad
dpiponi/Wattage
ex4.hs
import Prelude hiding (iterate) import Formal as F main = do let x = F.var :: Formal Q let n = 10 let f = sum [(1 + x)^i | i <- [0 .. n - 1]] - fromIntegral n -- A054474 Number of walks on square lattice that start and end at origin after 2n steps , not touching origin at intermediate stages . -- # of...
null
https://raw.githubusercontent.com/dpiponi/Wattage/c4b9c30fa42cf5d134d83b490bed77d0a29c16af/examples/ex4.hs
haskell
A054474 Number of walks on square lattice that start and end at
import Prelude hiding (iterate) import Formal as F main = do let x = F.var :: Formal Q let n = 10 let f = sum [(1 + x)^i | i <- [0 .. n - 1]] - fromIntegral n origin after 2n steps , not touching origin at intermediate stages . # of valid terms doubles with each iteration so 10 is good enough for 1000 te...
1923d2115919d400d4e5e6c95a032f97367377c1ba4cd84176bfd54f0d58d818
fulcrologic/fulcro
user.clj
(ns user (:require [clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs]])) (set-refresh-dirs "src/main" "src/test" "src/dev" "src/todomvc")
null
https://raw.githubusercontent.com/fulcrologic/fulcro/3d6442da84d240f0dbbe2338aa43349dcaca6f03/src/dev/user.clj
clojure
(ns user (:require [clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs]])) (set-refresh-dirs "src/main" "src/test" "src/dev" "src/todomvc")
e47bf6dcb1b050b798b4037830bcad7cd7c1a9caf55aa2353a1c8d5cb9209992
crclark/foundationdb-haskell
Directory.hs
-- | The directory layer provides tools for creating a hierarchy of ' 's , which can be operated on efficiently with a -- directory-like API. This is one of the official layers supported by all -- language bindings. See the -- <-guide.html#directories official FoundationDB documentation> -- for more information. -- ...
null
https://raw.githubusercontent.com/crclark/foundationdb-haskell/c8c9527ffa02dd2d08c15e23b09dd982a0b2a0ec/src/FoundationDB/Layer/Directory.hs
haskell
| The directory layer provides tools for creating a directory-like API. This is one of the official layers supported by all language bindings. See the <-guide.html#directories official FoundationDB documentation> for more information. This implementation of the directory layer does not yet support directory par...
hierarchy of ' 's , which can be operated on efficiently with a module FoundationDB.Layer.Directory ( DirectoryLayer, defaultDirLayer, newDirectoryLayer, Directory, Path, dirSubspace, dirPath, dirLayer, open, createOrOpen, move, remove, exists, list, open', ...
a736161cc09b7da131890ca48dfd4b884666cb4d2bdcf051ed03b450c17018b7
Enecuum/Node
PoASpec.hs
module Enecuum.Tests.Scenarios.PoASpec where import qualified Data.Map as M import Data.Typeable import qualified Enecuum.Domain as D import qualified Enecuum.Interpreters as I import qualified Enecuum.Language ...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/spec/Enecuum/Tests/Scenarios/PoASpec.hs
haskell
Generate and send transactions to graph node Check transaction pending on graph node Get last kblock from graph node Check transaction pending on graph node, it must to be empty now
module Enecuum.Tests.Scenarios.PoASpec where import qualified Data.Map as M import Data.Typeable import qualified Enecuum.Domain as D import qualified Enecuum.Interpreters as I import qualified Enecuum.Language ...
de3656bf7d9bfa64dee5b1b182c7e66915911f8fd57dd9297b16062ebc04b1c9
wgnet/fox
fox_pub_pool.erl
-module(fox_pub_pool). -behavior(gen_server). -export([start_link/2, get_channel/1, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("otp_types.hrl"). -include("fox.hrl"). -record(state, { connection :: pid() | undefined, connection_ref :: referen...
null
https://raw.githubusercontent.com/wgnet/fox/da2b45640b9feb2c3f43a926cec791dfeba38a1e/src/publish/fox_pub_pool.erl
erlang
module API gen_server API internal functions
-module(fox_pub_pool). -behavior(gen_server). -export([start_link/2, get_channel/1, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("otp_types.hrl"). -include("fox.hrl"). -record(state, { connection :: pid() | undefined, connection_ref :: referen...
76c4965c26aead348e7be25c2df8efe9c6a5efd9dc34a245db1b0e55f807c2b1
dextroamphetamine/nuko
Driver.hs
module Nuko.Driver (compile, mainMod) where import Relude import Nuko.Names (Attribute (..), Label (Label), ModName, NameKind (TyName), genIdent, mkModName, mkName, mkQualifiedWithPos, mkTyName) import Nuko.Report.Message (Diagno...
null
https://raw.githubusercontent.com/dextroamphetamine/nuko/1b6f960eeeebbfcbfb5700279c39758f82e7df28/src/Nuko/Driver.hs
haskell
module Nuko.Driver (compile, mainMod) where import Relude import Nuko.Names (Attribute (..), Label (Label), ModName, NameKind (TyName), genIdent, mkModName, mkName, mkQualifiedWithPos, mkTyName) import Nuko.Report.Message (Diagno...
19388daf85ed94d17c8b831bcc7f558d37e5530c56e278055bccff39b2836de8
wdebeaum/step
clock.lisp
;;;; ;;;; W::clock ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::clock (SENSES ((meta-data :origin calo-ontology :entry-date 20060123 :change-date nil :wn ("clock%1:06:00") :comment caloy3) (LF-PARENT ONT::DEVICE) (example "the clock on the wall") ) ) ) )) (define-w...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/clock.lisp
lisp
W::clock
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::clock (SENSES ((meta-data :origin calo-ontology :entry-date 20060123 :change-date nil :wn ("clock%1:06:00") :comment caloy3) (LF-PARENT ONT::DEVICE) (example "the clock on the wall") ) ) ) )) (define-words :pos W::n :templ CO...
c0eaa8cd0dcb64b648cee0fb5a34fcd8020455736913241f97171467e020b944
tonsky/advent2018
stub.clj
(ns advent2018.stub (:require [clojure.string :as str] [clojure.set :as set] [clojure.walk :as walk] [advent2018.core :refer :all])) (set! *warn-on-reflection* true) (def input (slurp "inputs/stub")) (def lines (str/split input #"\n")) (defn part1 [] ) #_(time (part1)) (defn part2 [] ) #_(tim...
null
https://raw.githubusercontent.com/tonsky/advent2018/6f8d15bf37a150a288e3447df7766c362f7086e9/src/advent2018/stub.clj
clojure
(ns advent2018.stub (:require [clojure.string :as str] [clojure.set :as set] [clojure.walk :as walk] [advent2018.core :refer :all])) (set! *warn-on-reflection* true) (def input (slurp "inputs/stub")) (def lines (str/split input #"\n")) (defn part1 [] ) #_(time (part1)) (defn part2 [] ) #_(tim...
2876dbb27c379af42ddd24050d7332e4288cf89ab670d2559ad4eaee63950fc1
embecosm/cgen
cos-pprint.scm
;;;; cos-pprint.scm --- pretty-print definitions for COS Copyright ( C ) 2005 , 2009 Red Hat , Inc. This file is part of CGEN . ;;;; See file COPYING.CGEN for details. ;;; To use this with pprint.scm: ;;; ;;; (load "pprint.scm") ;;; (load "cos-pprint.scm") ;;; You must load this file second , so it can redef...
null
https://raw.githubusercontent.com/embecosm/cgen/3fa8809c015376cd0e80018a655d372df3678bc6/cgen/cos-pprint.scm
scheme
cos-pprint.scm --- pretty-print definitions for COS See file COPYING.CGEN for details. To use this with pprint.scm: (load "pprint.scm") (load "cos-pprint.scm") ELIDED-NAME hooks. See the documentation in pprint.scm for details.
Copyright ( C ) 2005 , 2009 Red Hat , Inc. This file is part of CGEN . You must load this file second , so it can redefine the ELIDE ? and (define (elide? obj) (or (object? obj) (class? obj))) (define (elided-name obj) (cond ((class? obj) `(class ,(class-name obj))) ((object? obj) `(object ,(class-name ...
c0daa75dd9d0b4a440512353860aee9de7c3a51a9fa9dbc6036702914ea1abfe
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
PaymentMethodBoleto.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 PaymentMethodBoleto module StripeAPI.Types.PaymentMethodBoleto where import...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentMethodBoleto.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Defines the object schema located at @components.schemas.payment_method_boleto@ in the specification. Constraints: | 'paymentMethodBoletoTaxId'
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . | Contains the types generated from the schema PaymentMethodBoleto module StripeAPI.Types.PaymentMethodBoleto where import qualified Control.Monad.Fail import qualified Data.Aeson impor...
de02c550fba035b0d321256c3b5dc816e3c9fe0098b6622b5302ef4d1271c014
freuk/obandit
delegate.ml
#!/usr/bin/env ocaml #use "topfind" #require "bos.setup" #require "topkg" #require "topkg.care" --------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % %...
null
https://raw.githubusercontent.com/freuk/obandit/0d8222c9e8dbb4b7f324290121bc45892620c783/delegate.ml
ocaml
Publish documentation need some file Publish releases Publish delegations Issue delegations Delegation requests Delegate tool commands Cli interface
#!/usr/bin/env ocaml #use "topfind" #require "bos.setup" #require "topkg" #require "topkg.care" --------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % %...
414b40ee57b68f32a10ef614113af9464557eef13f6145170ca1bf6b2dba7755
keera-studios/keera-posture
Detector.hs
-- | Determine whether the detector is executing module Model.ReactiveModel.Detector where -- Internal imports import Model.Model import Model.ReactiveModel.ReactiveModelInternals -- | Set whether the detector should be running setDetector :: ReactiveModel -> Bool -> ReactiveModel setDetector rm n -- Nothing has cha...
null
https://raw.githubusercontent.com/keera-studios/keera-posture/9de5095a4a10c0cb54f6191f1a448e96645193ae/src/Model/ReactiveModel/Detector.hs
haskell
| Determine whether the detector is executing Internal imports | Set whether the detector should be running Nothing has changed Ok | Get whether the detector is running
module Model.ReactiveModel.Detector where import Model.Model import Model.ReactiveModel.ReactiveModelInternals setDetector :: ReactiveModel -> Bool -> ReactiveModel setDetector rm n | getDetector rm == n = rm | otherwise = rm `onBasicModel` (\b -> b { detectorRunning = n }) getDetector :: ReactiveModel -> Bool ge...
1f331d9b320c794af78e3be2d827147ce47b1d19b0a82cab139bc8a28b7beab9
domainlanguage/time-count
a_representations.clj
(ns time-count.explainer.a-representations (:require [time-count.iso8601 :refer [to-iso from-iso t-> t->>]] [time-count.metajoda :refer [map->MetaJodaTime from-place-values]] [time-count.core :refer [place-values]] [midje.sweet :refer :all]) (:import [org.joda.time DateTime LocalDateTime DateTimeZon...
null
https://raw.githubusercontent.com/domainlanguage/time-count/f2d26a1e5fe1a137f5d1a01be295dde0385cc31e/explainers/time_count/explainer/a_representations.clj
clojure
and a representation that implements the basic protocols in particular time-count.core/CountableTime. MetaJodaTime (the provided default implementation) uses combined with some metadata about nested scales. Some other representation could be used, so long as it could Where, instead of identity, you could have an...
(ns time-count.explainer.a-representations (:require [time-count.iso8601 :refer [to-iso from-iso t-> t->>]] [time-count.metajoda :refer [map->MetaJodaTime from-place-values]] [time-count.core :refer [place-values]] [midje.sweet :refer :all]) (:import [org.joda.time DateTime LocalDateTime DateTimeZon...
40bff7ea970caa436451f4a0f6e13ce27ff9409f4b13db796038cc64fce98242
input-output-hk/plutus
SkewBinarySlab.hs
-- editorconfig-checker-disable-file {-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatterns # module Data.RandomAccessList.SkewBinarySlab ( RAList(Cons,Nil...
null
https://raw.githubusercontent.com/input-output-hk/plutus/c8d4364d0e639fef4d5b93f7d6c0912d992b54f9/plutus-core/index-envs/src/Data/RandomAccessList/SkewBinarySlab.hs
haskell
editorconfig-checker-disable-file # LANGUAGE BangPatterns # # LANGUAGE PatternSynonyms # # LANGUAGE TypeFamilies # vectors? The answer is that using only vectors makes simple consing significantly slower, and doesn't obviously make the other code paths faster. | The values that can be stored in...
# LANGUAGE LambdaCase # # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatterns # module Data.RandomAccessList.SkewBinarySlab ( RAList(Cons,Nil) , safeIndexZero , unsafeIndexZero , Data.RandomAccessList.SkewBinarySlab.null , uncons , consSlab ) where import Data.Bits (...
9ad4f2ef10fc6a2ac41daabd22137090096354a0ebfbe516522451a7b5deaa12
shnarazk/mios
Stat.hs
# LANGUAGE RecordWildCards , TupleSections # RecordWildCards , TupleSections #-} {-# LANGUAGE Safe #-} module SAT.Mios.Util.Stat ( Dumpable (..) , MiosDump (..) , MergedDump (..) , merge , parseBy , fromDump , fromStat , fromCSV , fromMergedCSV , toMerge ) where import Data.Bit...
null
https://raw.githubusercontent.com/shnarazk/mios/d032d761d73224f981a07ec2ea90936db6f495e8/MultiConflict/SAT/Mios/Util/Stat.hs
haskell
# LANGUAGE Safe # higher level functions over Monoid methods solver configuration = key number of problems | | read a token separated by commas | read a string separated by commas solver vardecayrace propagationlimit parameter1 parameter2 file nvar satisfiability npropagation nlearning nbackjump nres...
# LANGUAGE RecordWildCards , TupleSections # RecordWildCards , TupleSections #-} module SAT.Mios.Util.Stat ( Dumpable (..) , MiosDump (..) , MergedDump (..) , merge , parseBy , fromDump , fromStat , fromCSV , fromMergedCSV , toMerge ) where import Data.Bits import qualified Dat...
800fad9d2a90aca8ab9d27d62a22dc6effa84c39fd37c5ec93afc7862a5afa2f
pjones/openid-connect
Main.hs
{-| Copyright: This file is part of the package openid-connect. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at: -connect No part of this package, including this file, may be copied, modified, propagated, or distributed except accord...
null
https://raw.githubusercontent.com/pjones/openid-connect/23b03940613a1b0a633747b5fecaf61b3fbd8a09/test/Main.hs
haskell
| Copyright: This file is part of the package openid-connect. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at: -connect No part of this package, including this file, may be copied, modified, propagated, or distributed except accordin...
module Main (main) where import Test.Tasty import qualified Client import qualified DiscoveryTest main :: IO () main = defaultMain $ testGroup "Tests" [ Client.test , DiscoveryTest.test ]
2f3ee31d4ad31c954dd1cfce04b7c7449fa6b960cc469a227e9c19de83e48a4e
stevenvar/OMicroB
arduboy.ml
open Avr let cs = PIN12 let dc = PIN4 let rst = PIN6 let button_left = PINA2 let button_right = PINA1 let button_down = PINA3 let button_up = PINA0 let button_a = PIN7 let button_b = PIN8 let g = PIN9 let r = PIN10 let b = PIN11 let init_rgb r g b = digital_write r HIGH; digital_write g HIGH; digital_write b HI...
null
https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/tests/snake-mustard/arduboy.ml
ocaml
open Avr let cs = PIN12 let dc = PIN4 let rst = PIN6 let button_left = PINA2 let button_right = PINA1 let button_down = PINA3 let button_up = PINA0 let button_a = PIN7 let button_b = PIN8 let g = PIN9 let r = PIN10 let b = PIN11 let init_rgb r g b = digital_write r HIGH; digital_write g HIGH; digital_write b HI...
69d5770a6dc59554b5734a7ed31ec39040a316554d95008f66dbc81d6cdda70a
mbutterick/pollen
whitespace.rkt
#lang racket/base (require racket/match) (provide (all-defined-out)) (define (whitespace-base x #:nbsp-is-white? nbsp-white?) (define white-pat (pregexp (format "^[\\s~a]+$" (if nbsp-white? #\u00A0 "")))) (let loop ([x x]) (match x ["" #true] ; empty string is deemed whitespace [(pregexp white-pat)...
null
https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/private/whitespace.rkt
racket
empty string is deemed whitespace
#lang racket/base (require racket/match) (provide (all-defined-out)) (define (whitespace-base x #:nbsp-is-white? nbsp-white?) (define white-pat (pregexp (format "^[\\s~a]+$" (if nbsp-white? #\u00A0 "")))) (let loop ([x x]) (match x [(pregexp white-pat) #true] [(? symbol?) (loop (symbol->string x))...
9915284d13fb455c636ad3daf73388d030fa52d00197f717e73f77683cbbfa28
racketscript/racketscript
simple-provide.rkt
#lang racket (provide say-hello (rename-out [say-hola say-ahoy])) (define (say-hello msg) (displayln (list "Hello" msg))) (define (say-hola msg) (displayln (list "Hola" msg)))
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/modules/private/simple-provide.rkt
racket
#lang racket (provide say-hello (rename-out [say-hola say-ahoy])) (define (say-hello msg) (displayln (list "Hello" msg))) (define (say-hola msg) (displayln (list "Hola" msg)))
0a7c69ac0ff2a0ebf042bc8452ffffe4805fd06166f68f1c1dc088a9dee9b192
wellposed/numerical
Range.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE CPP # # LANGUAGE FunctionalDependencies # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveFunctor , DeriveGeneric , DeriveFunctor # {-# LANGUAGE DeriveFoldable,DeriveTraversable #-} module Numerical.Array.Range ( Range(..) ,AffineRange(..) ,HasRange(..) ,a...
null
https://raw.githubusercontent.com/wellposed/numerical/bf61926a854586b9707b88798887d7a72beeed13/src/Numerical/Array/Range.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFoldable,DeriveTraversable # not quite the right module for this notion of range, but lets fix that later | whenever you are tempted to do a (lo,hi) tuple, use this instead This should perhaps be made lazy, but strict for now. # INLINE _rangeMin# | this is uniform...
# LANGUAGE CPP # # LANGUAGE FunctionalDependencies # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveFunctor , DeriveGeneric , DeriveFunctor # module Numerical.Array.Range ( Range(..) ,AffineRange(..) ,HasRange(..) ,affineRangeStride) where import Data.Data import GHC.Generics #if defined(__GLASGOW_HA...
683ad7b08451b10df8f684cd794b9866579c734b3fd3eb25c2894d49417e7e10
softlab-ntua/bencherl
class_WasteTransport.erl
Copyright ( C ) 2012 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify % it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/mock-simulators/city-example/src/class_WasteTransport.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. Class modelling an abstract waste transport. Determines what are the mother classes of this class (if any): ...
Copyright ( C ) 2012 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
6b04d836d46fc2c72c3ab057339172dd8a3a3240c4134fbaca0135b11d4fe1f2
oliyh/pedestal-api
error_handling.clj
(ns pedestal-api.error-handling (:require [route-swagger.interceptor :as sw.int] [route-swagger.doc :as sw.doc] [ring.swagger.middleware :refer [stringify-error]] [io.pedestal.interceptor.error :as error] [ring.util.http-status :as status] [io.pedestal.http....
null
https://raw.githubusercontent.com/oliyh/pedestal-api/1a90c29e97c3cccfe59a1f9d114765c104f70c13/src/pedestal_api/error_handling.clj
clojure
(ns pedestal-api.error-handling (:require [route-swagger.interceptor :as sw.int] [route-swagger.doc :as sw.doc] [ring.swagger.middleware :refer [stringify-error]] [io.pedestal.interceptor.error :as error] [ring.util.http-status :as status] [io.pedestal.http....
ca5f543fe55ce4728738d494f9916e622b5856681507afa127f5616a2bb48451
typelead/etlas
Legacy.hs
# LANGUAGE RecordWildCards , NamedFieldPuns , DeriveGeneric # -- | Project configuration, implementation in terms of legacy types. -- module Distribution.Client.ProjectConfig.Legacy ( -- * Project config in terms of legacy types LegacyProjectConfig, parseLegacyProjectConfig, showLegacyProjectConfig, ...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/ProjectConfig/Legacy.hs
haskell
| Project configuration, implementation in terms of legacy types. * Project config in terms of legacy types * Conversion to and from legacy config types * Internals, just for tests ---------------------------------------------------------------- Representing the project config file in terms of legacy types proj...
# LANGUAGE RecordWildCards , NamedFieldPuns , DeriveGeneric # module Distribution.Client.ProjectConfig.Legacy ( LegacyProjectConfig, parseLegacyProjectConfig, showLegacyProjectConfig, commandLineFlagsToProjectConfig, convertLegacyProjectConfig, convertLegacyGlobalConfig, convertToLegacyPr...
8b126c24e259171075111281ecff48b747b437d082ddb7c0832485a984211c03
fetburner/Coq2SML
inductiveops.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/pretyping/inductiveops.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Return type as quoted by the user ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Dec...
28ed10ff0422e1f4bb2ea60b021b45bfc0e92504ad9600a5fbad66ff3a00bc4c
MaskRay/OJHaskell
RPI.hs
import Control.Monad import Control.Monad.Instances main = do cases <- liftM read getLine forM_ [1..cases] $ \cc -> do n <- liftM read getLine schedule <- forM [1..n] (const getLine) let total = map (\x -> (fromIntegral $ length $ filter (/='.') $ schedule!!x)) [0..n-1] wins = map (\x -> (fromI...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Google%20Code%20Jam/2011/round1b/RPI.hs
haskell
import Control.Monad import Control.Monad.Instances main = do cases <- liftM read getLine forM_ [1..cases] $ \cc -> do n <- liftM read getLine schedule <- forM [1..n] (const getLine) let total = map (\x -> (fromIntegral $ length $ filter (/='.') $ schedule!!x)) [0..n-1] wins = map (\x -> (fromI...
603d6ddb00d63bd779216c8c591f72c8bd362ab82ba06d2a3c16be38f8505078
codedownio/sandwich
Before.hs
# LANGUAGE DataKinds # module Before where import Control.Exception.Safe import Control.Monad.IO.Class import Control.Monad.Trans.Writer import qualified Data.List as L import GHC.Stack import Test.Sandwich import TestUtil tests :: MonadIO m => WriterT [SomeException] m () tests = do run beforeExceptionSafety r...
null
https://raw.githubusercontent.com/codedownio/sandwich/9c8f56b5aee94ba65c70b3e52bde8959010aecc1/sandwich/test/Before.hs
haskell
* Tests
# LANGUAGE DataKinds # module Before where import Control.Exception.Safe import Control.Monad.IO.Class import Control.Monad.Trans.Writer import qualified Data.List as L import GHC.Stack import Test.Sandwich import TestUtil tests :: MonadIO m => WriterT [SomeException] m () tests = do run beforeExceptionSafety r...
eed59f55bd4f3176070da7bb39359adbef946e6a9901442282cabff294e5d4b4
sanette/bogue
b_border.ml
(* draw fancy borders to arbitrary shapes *) (* f : parameterize the boundary *) h : distance from boundary ( < 0 inside ) open Tsdl open B_utils module Theme = B_theme module Draw = B_draw type physicalpoint = Sdl.point type logicalpoint = { x:float; y:float } (* points or vectors *) (* for both, origin is top-le...
null
https://raw.githubusercontent.com/sanette/bogue/be44317b2314c64a4b1d80756435092e434cc147/lib/b_border.ml
ocaml
draw fancy borders to arbitrary shapes f : parameterize the boundary points or vectors for both, origin is top-left normal unit vector unit normal vector at parameter t box size draw (rectangular) pixels various shapes Warning t is not the arc length coordinate if a <> b about 50ms here let cente...
h : distance from boundary ( < 0 inside ) open Tsdl open B_utils module Theme = B_theme module Draw = B_draw type physicalpoint = Sdl.point type boundary = float -> logicalpoint type distance = logicalpoint -> float type shape = { parameterize the boundary from t in [ 0,1 ] , ideally ...
f7556b4f62528f767aaa99f4b4cff95923c1627907242364e58950007cdb8e74
discus-lang/ddc
Label.hs
module DDC.Data.Label ( Label , labelOfText , hashOfLabel, nameOfLabel) where import Control.DeepSeq import Data.Bits import qualified "cryptohash-sha256" Crypto.Hash.SHA256 as Sha256 import qualified Data.ByteString as BS import qualified Data.Text as T import qualified...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Data/Label.hs
haskell
| Label type. # INLINE (/=) # | Construct a label from a text string. | Get the hash code of a label. | Get the name of a label. | Get a short hash code for a text string. We use this as a (most likely) unique key for names.
module DDC.Data.Label ( Label , labelOfText , hashOfLabel, nameOfLabel) where import Control.DeepSeq import Data.Bits import qualified "cryptohash-sha256" Crypto.Hash.SHA256 as Sha256 import qualified Data.ByteString as BS import qualified Data.Text as T import qualified...
25a0f2fc69161988a9c32dd8028843385c383c495154506f9224c8e8adbf3472
protojure/protoc-plugin
oneof.clj
(ns protojure.plugin.parse.oneof (:require [protojure.plugin.util :as util])) (declare adjust-fields) ;;------------------------------------------------------------------- ;; Move oneof fields to a parent container named with the oneof name ;;------------------------------------------------------------------- ;; ;;...
null
https://raw.githubusercontent.com/protojure/protoc-plugin/d14311c67cb21656a3ae8b8cbe3d742b8ad7e1af/src/protojure/plugin/parse/oneof.clj
clojure
------------------------------------------------------------------- Move oneof fields to a parent container named with the oneof name ------------------------------------------------------------------- Understanding the flow of this parsing code benefits from a familiarity with the protoc CodeGeneratorRequest oneof...
(ns protojure.plugin.parse.oneof (:require [protojure.plugin.util :as util])) (declare adjust-fields) { : name " " : oneof - index 0 , single ( protobuf ) tag handler capable of deserializing any one that only a single type will appear in the single one -...
1255bf779ae8a173f3b4b2ec84265e95c86433bab9d4ea87513d3ddf6d31a1b4
josefs/Gradualizer
lint_errors.erl
%% This module doesn't even compile. The errors here are caught by erl_lint. -module(lint_errors). -export([local_type/0, local_call/0, one_more_for_the_record/0, local_record/1, record_field/1, illegal_binary_segment/1, invalid_record_info/0, illegal_patte...
null
https://raw.githubusercontent.com/josefs/Gradualizer/0657d76e7de893a2bd7e49e0fac186b732fea434/test/misc/lint_errors.erl
erlang
This module doesn't even compile. The errors here are caught by erl_lint. The number of expected errors are the number of exported functions, so we create a function without errors, to account for the error in the record definition above.
-module(lint_errors). -export([local_type/0, local_call/0, one_more_for_the_record/0, local_record/1, record_field/1, illegal_binary_segment/1, invalid_record_info/0, illegal_pattern/1]). -spec local_type() -> undefined_type(). local_type() -> ok. -spec l...
93bd1880b35ff3db328844ccebbda9e42c7bcf8f8eadce9a3c68b8ff80ce72a0
ninjudd/cake
servlet.clj
(ns servlet (:gen-class)) (defn speak [& _] (println "woof!")) (speak)
null
https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/examples/servlet/src/servlet.clj
clojure
(ns servlet (:gen-class)) (defn speak [& _] (println "woof!")) (speak)
ceac84f2f3431e14e1f7b83353b312e777fc34d0167ee1566f8daff92c1fe343
karlhof26/gimp-scheme
AutoColorize_flavor0_02.scm
This script was tested with Gimp 2.10.24 ;; ;; New versions will be distributed from </> only ;; ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License ...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/58757c144e7a6f8f9797cdfe927f9caffa7c62a7/AutoColorize_flavor0_02.scm
scheme
New versions will be distributed from </> only This program is free software; you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the impli...
This script was tested with Gimp 2.10.24 it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License author : date : 2015 (define (script-fu-auto-colorize-flavor0 simage slayer hatches ...
79747293278bd9aaaae36dda3b1371ba0fcf2fa73f394c42bc49249c585d0ecf
voxoz/emqttd
emqttd_gen_mod.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2013 - 2017 EMQ Enterprise , Inc. ( ) %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% ...
null
https://raw.githubusercontent.com/voxoz/emqttd/2be612e0e7a00a866cd9af350a030966d73fbc09/src/emqttd_gen_mod.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2013 - 2017 EMQ Enterprise , Inc. ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqttd_gen_mod). -author("Feng Lee <>"). -include("emqttd.hrl"). -ifdef(use_specs). -callback(load(Opts ::...
216064bdafc15e707ee214afeb82757d1b74e82dcfd872b2d0df315386bfb6d5
postspectacular/devart-codefactory
tooltips.cljs
(ns codefactory.editor.tooltips (:require-macros [cljs.core.async.macros :refer [go]] [thi.ng.macromath.core :as mm]) (:require [cljs.core.async :refer [<! alts! timeout]] [codefactory.config :as config] [thi.ng.cljs.async :as async] [thi.ng.cljs.log :refer [debug info warn]] [thi.ng.cljs.route...
null
https://raw.githubusercontent.com/postspectacular/devart-codefactory/9bccdc10e58fa4861a69767e9ae4be0bb8d7f650/src-cljs/codefactory/editor/tooltips.cljs
clojure
(ns codefactory.editor.tooltips (:require-macros [cljs.core.async.macros :refer [go]] [thi.ng.macromath.core :as mm]) (:require [cljs.core.async :refer [<! alts! timeout]] [codefactory.config :as config] [thi.ng.cljs.async :as async] [thi.ng.cljs.log :refer [debug info warn]] [thi.ng.cljs.route...
acc6c1ecca3e840e4595bd5e2bcfb3104b70da4c0d2d4de0ba315dd0f1d3f5eb
HunterYIboHu/htdp2-solution
ex77-point-in-time.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex77-point-in-time) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib ...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section5/ex77-point-in-time.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex77-point-in-time) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #...
1c890fe3b50aa360cec6bf2df0727e48fef6701c13303c0bf88c19bb3054de83
sebashack/servantRestfulAPI
API.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOper...
null
https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/Domains/UserDomain/User/API.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # module Domains.UserDomain.User.API ( UserAPI ) where import Domains.UserDomain.User.DataTypes impo...
20cd1c891ed08ae7f674d673f581cc69be15d9124e11eadbf1d4c28eee3e6c36
realworldocaml/book
expansion.ml
open! Base module Abstract = struct type t [@@deriving_inline sexp] let _ = fun (_ : t) -> () let t_of_sexp = (let error_source__002_ = "expansion.ml.Abstract.t" in fun x__003_ -> Sexplib0.Sexp_conv_error.empty_type error_source__002_ x__003_ : Sexplib0.Sexp.t -> t) ;; let _ =...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_sexp_conv/test/expansion.ml
ocaml
open! Base module Abstract = struct type t [@@deriving_inline sexp] let _ = fun (_ : t) -> () let t_of_sexp = (let error_source__002_ = "expansion.ml.Abstract.t" in fun x__003_ -> Sexplib0.Sexp_conv_error.empty_type error_source__002_ x__003_ : Sexplib0.Sexp.t -> t) ;; let _ =...
fc91ad16c8e07cf93fa74567e126b2fe6eac8a4d857decbc9aea479ebc8be6ed
rd--/hsc3
lores.help.hs
-- lores X.lores (whiteNoiseId 'α' ar * 0.5) 880 0.5 -- lores ; modulate param let src = whiteNoiseId 'α' ar * 0.3 freq = lfNoise0Id 'β' ar 4 * 500 + 600 res = 0.9 in X.lores src freq res
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/lores.help.hs
haskell
lores lores ; modulate param
X.lores (whiteNoiseId 'α' ar * 0.5) 880 0.5 let src = whiteNoiseId 'α' ar * 0.3 freq = lfNoise0Id 'β' ar 4 * 500 + 600 res = 0.9 in X.lores src freq res
aeb6165caa777caa4a6edc077a304f05cdefbaca23c7cca33821829b65a3e898
aristidb/aws
RemoveUserFromGroup.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Aws.Iam.Commands.RemoveUserFromGroup ( RemoveUserFromGroup(..) , RemoveUserFromGroupResponse(..) ) where import Aws.Core import Aws.Iam.Core import Aws.Iam.Interna...
null
https://raw.githubusercontent.com/aristidb/aws/a99113ed7768f9758346052c0d8939b66c6efa87/Aws/Iam/Commands/RemoveUserFromGroup.hs
haskell
| Removes the specified user from the specified group. <> ^ Name of the group to update. ^ The of the user to add.
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Aws.Iam.Commands.RemoveUserFromGroup ( RemoveUserFromGroup(..) , RemoveUserFromGroupResponse(..) ) where import Aws.Core import Aws.Iam.Core import Aws.Iam.Interna...
bd2378e18eacf251003225a7f5f6b7bc32fe6e4db113f26b624c7140c1e10e8f
tweag/webauthn
Identifier.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE StandaloneDeriving # -- | Stability: experimental -- This module concerns identification of authenticatiors, notably 'AAGUID', -- 'SubjectKeyIdentifier' and a generic identifier type 'AuthenticatorIdentifier' module Crypto.WebAuthn.Mo...
null
https://raw.githubusercontent.com/tweag/webauthn/65ac63aa000e565d1e5de334b39597a61dcae75f/src/Crypto/WebAuthn/Model/Identifier.hs
haskell
# LANGUAGE GADTs # | Stability: experimental This module concerns identification of authenticatiors, notably 'AAGUID', 'SubjectKeyIdentifier' and a generic identifier type 'AuthenticatorIdentifier' | A way to identify an authenticator | [(spec)](-metadata-statement-v3.0-ps-20210518.html#dom-metadatastatement-aagui...
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE StandaloneDeriving # module Crypto.WebAuthn.Model.Identifier ( AuthenticatorIdentifier (..), AAGUID (..), SubjectKeyIdentifier (..), ) where import Crypto.Hash (Digest, SHA1) import Crypto.WebAuthn.Internal.ToJSONOrphans () import qualified Cry...
85190583077c46e812a25a93875119482c038529d549bff177d6ce6b469eec7a
ghcjs/ghcjs
conc006.hs
module Main where import Control.Concurrent -- This test hopefully exercises the black hole code. The main thread -- forks off another thread and starts on a large computation. -- The child thread attempts to get the result of the same large -- computation (and should get blocked doing so, because the parent -- wo...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/concurrent/conc006.hs
haskell
This test hopefully exercises the black hole code. The main thread forks off another thread and starts on a large computation. The child thread attempts to get the result of the same large computation (and should get blocked doing so, because the parent won't have evaluated it yet). When the result is availabl...
module Main where import Control.Concurrent test = sum [1..10000] main = do x <- newEmptyMVar forkIO (if test > 0 then putMVar x test else error "proc" ) then do result <- takeMVar x print result else error "main"
f7ec0ab69fa544c2da715ec011eca82a0b1ca2150a0d8aa7d3caae44f2f97963
BinRoot/Haskell-Data-Analysis-Cookbook
Main.hs
import Data.Geohash -- Hashing latitude/longitude pairs main = do let geohash1 = encode 10 (37.775, -122.419) putStrLn $ "geohash1 is " ++ (show geohash1) case geohash1 of Just g -> putStrLn $ "decoding geohash1: " ++ (show.decode) g Nothing -> putStrLn "error encoding" let geohash2 = encode 10 (3...
null
https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch04/Code08_geo/Main.hs
haskell
Hashing latitude/longitude pairs
import Data.Geohash main = do let geohash1 = encode 10 (37.775, -122.419) putStrLn $ "geohash1 is " ++ (show geohash1) case geohash1 of Just g -> putStrLn $ "decoding geohash1: " ++ (show.decode) g Nothing -> putStrLn "error encoding" let geohash2 = encode 10 (37.175, -125.419) putStrLn $ "geoha...
5e69ed323f74bf5f631d0b74dcbd809907e89b718b5a66f81cbae67ea50050ed
shiguredo/eryngii
formatter.ml
open Core.Std open Located module Op = struct type desc = | Nop | Text of string | Comment of string | Space of int | Newline of int | Lparen | Rparen | Lbrack | Rbrack | Lbrace | Rbrace | Lbin (* << *) | Rbin (* >> *) | Leveled_indent | Aligned_indent ...
null
https://raw.githubusercontent.com/shiguredo/eryngii/6c70d9b28a45ed786c4847ee51bb03bfef35ac8d/formatter.ml
ocaml
<< >> -module -export -import -include -include_lib -define -spec tag spec_clauses TODO: guard tag -compile
open Core.Std open Located module Op = struct type desc = | Nop | Text of string | Comment of string | Space of int | Newline of int | Lparen | Rparen | Lbrack | Rbrack | Lbrace | Rbrace | Leveled_indent | Aligned_indent | Label of [`Fun] * int | Labeled_i...
99fc26c0f2de8e83b6d5518aac6ae1113b2e51c55be5fb5a5933c08da8ccb119
JeffreyBenjaminBrown/digraphs-with-text
relevant-types.hs
dwtDfs_unlim :: RSLT -> (SearchVar,QRelspec) -> [Node] -> Either String [Node] insRelspec :: QRelspec -> RSLT -> Either DwtErr RSLT type QRelspec = Map.Map RelRole QNodeOrVar the others are flexible , but the TpltRole must map to a QNodeSpec data QNodeOrVar = QVarSpec SearchVar | QNodeSpec Node deriving(Show,Read,Eq,...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/digraphs-with-text/34e47a52aa9abb6fd42028deba1623a92e278aae/howto/search%2Crecursive/relevant-types.hs
haskell
dwtDfs_unlim :: RSLT -> (SearchVar,QRelspec) -> [Node] -> Either String [Node] insRelspec :: QRelspec -> RSLT -> Either DwtErr RSLT type QRelspec = Map.Map RelRole QNodeOrVar the others are flexible , but the TpltRole must map to a QNodeSpec data QNodeOrVar = QVarSpec SearchVar | QNodeSpec Node deriving(Show,Read,Eq,...
ecaaa857ec23de69c98271b0f27a490a2bd0bf863a7713c080e4179236441072
andrenth/routemachine
rtm_sup.erl
-module(rtm_sup). -include_lib("routemachine.hrl"). -include_lib("session.hrl"). -export([start_link/2]). -export([init/1]). start_link(Config, Sessions) -> supervisor:start_link({local, ?MODULE}, ?MODULE, {Config, Sessions}). init({Config, Sessions}) -> ListenPort = rtm_config:get(listen_port, Config, ?DEFAULT...
null
https://raw.githubusercontent.com/andrenth/routemachine/97fbc4997ac9bbe7d14c2b174aa84bc4a2fd5d20/src/rtm_sup.erl
erlang
-module(rtm_sup). -include_lib("routemachine.hrl"). -include_lib("session.hrl"). -export([start_link/2]). -export([init/1]). start_link(Config, Sessions) -> supervisor:start_link({local, ?MODULE}, ?MODULE, {Config, Sessions}). init({Config, Sessions}) -> ListenPort = rtm_config:get(listen_port, Config, ?DEFAULT...
cfc4982ca1a1be11408ff2d5706efb8ade128d4ed04e75f6d7691513ac2fc39d
sosy-lab/tbf
llvmgen.inferred.mli
module H = Hashtbl module S = String exception NotConstant type llvmBlock = { lblabel : string; mutable lbbody : llvmInstruction list; mutable lbterminator : llvmTerminator; mutable lbpreds : llvmBlock list; } and llvmInstruction = { mutable liresult : llvmLocal option; liop : llvmOp; mutable liargs : llv...
null
https://raw.githubusercontent.com/sosy-lab/tbf/18d08d6cee6fbfbad4d4ebfa7aed235521edec2b/tbf/tools/crest/cil/_build/src/ext/llvmgen.inferred.mli
ocaml
module H = Hashtbl module S = String exception NotConstant type llvmBlock = { lblabel : string; mutable lbbody : llvmInstruction list; mutable lbterminator : llvmTerminator; mutable lbpreds : llvmBlock list; } and llvmInstruction = { mutable liresult : llvmLocal option; liop : llvmOp; mutable liargs : llv...
66452e7a5b204340b2b222c108275397b833ad2b56af1883b7cc5c48f5085bc5
ucsd-progsys/liquidhaskell
ListAnd.hs
module ListAnd where {-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} import Prelude hiding (and, all) import Language.Haskell.Liquid.ProofCombinators {-@ infix : @-} type Elm = Int {-@ reflect and @-} @ and : : x : Bool - > y : Bool - > { z : | z < = > x & & y } @ and :: Bool -> Bool -> Bool and True y = y ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/56f72d6d8d8106fda4e35645e5f0bcab7bc10eee/tests/ple/pos/ListAnd.hs
haskell
@ LIQUID "--reflection" @ @ LIQUID "--ple" @ @ infix : @ @ reflect and @ @ reflect lte @ @ reflect all @ @ simple :: x : Elm -> y : Elm -> ys : [Elm] -> {v : () | and (lte y x) (all (gte x) ys) = all (gte x) (y:ys) } @ = = = ( gte x y ) ` and ` all ( gte x ) ys === (gte x y) `and` all (gte x ) ys
module ListAnd where import Prelude hiding (and, all) import Language.Haskell.Liquid.ProofCombinators type Elm = Int @ and : : x : Bool - > y : Bool - > { z : | z < = > x & & y } @ and :: Bool -> Bool -> Bool and True y = y and False _ = False @ reflect @ @ gte : : x : Elm - > y : Elm - > { z : | z < = > x > ...
f714b48fdaa628465ead64684ee0011b6c426ad86a03befca780b093dd94dc17
metosin/reagent-dev-tools
core.cljs
(ns reagent-dev-tools.core (:require [reagent.core :as r] [reagent.dom :as rdom] [reagent-dev-tools.styles :as s] [reagent-dev-tools.state-tree :as state-tree] [reagent-dev-tools.state :as state] [reagent-dev-tools.utils :refer [window-event-listener]] ...
null
https://raw.githubusercontent.com/metosin/reagent-dev-tools/9fd5b7d0788c0df6def883bbc8bb9eb578119701/src/reagent_dev_tools/core.cljs
clojure
Bottom bottom bottom Just diplay the button to toggle to the other state. Allow the panel component to access panel-options through React context E.g. to access the panel :key or :label NOTE: sync the option changes to README.
(ns reagent-dev-tools.core (:require [reagent.core :as r] [reagent.dom :as rdom] [reagent-dev-tools.styles :as s] [reagent-dev-tools.state-tree :as state-tree] [reagent-dev-tools.state :as state] [reagent-dev-tools.utils :refer [window-event-listener]] ...
6398791172eb099d3751d662e0c3fd9d86d3e26c2906eb4544bbb31840cd9e19
camfort/camfort
InferenceBackendSpec.hs
module Camfort.Specification.Stencils.InferenceBackendSpec (spec) where import Camfort.Specification.Stencils.InferenceBackend import Camfort.Specification.Stencils.Syntax import Camfort.Specification.Stencils.Model import qualified Camfort.Helpers.Vec as V import Test.Hspec spec :: Spec spec = describe "Inference...
null
https://raw.githubusercontent.com/camfort/camfort/3421e85f6fbbcaa6503a266b3fae029a09d2ff24/tests/Camfort/Specification/Stencils/InferenceBackendSpec.hs
haskell
module Camfort.Specification.Stencils.InferenceBackendSpec (spec) where import Camfort.Specification.Stencils.InferenceBackend import Camfort.Specification.Stencils.Syntax import Camfort.Specification.Stencils.Model import qualified Camfort.Helpers.Vec as V import Test.Hspec spec :: Spec spec = describe "Inference...
190cc1dc943b38deaa3a53a7d65d1510a825d28d054c65763db35e87e5a5369d
MLstate/opalang
surfaceAstPasses.mli
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/passes/surfaceAstPasses.mli
ocaml
* This pass looks for Package declaration of each file, and loads these dependencies The node Package is removed from the code and never appears afterwards
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
ba33e2bf12cb383f44df3bc8cb434cb8bb823ef08b2f85c35372cc011d7ac7e1
diagrams/SVGFonts
WriteFont.hs
module Graphics.SVGFonts.WriteFont where import Numeric ( showHex ) import Data.String ( fromString ) import Data.Char ( ord ) import Data.List ( intercalate ) import qualified Data.Set as Set import qualified Data.Map as M import Control.Monad ( forM_ ) import Text.Blaze.Svg11 ((!), toValue) import qualified Text...
null
https://raw.githubusercontent.com/diagrams/SVGFonts/66fa56c5a80f1aaaddf5c3e938ee844f90b60b9d/src/Graphics/SVGFonts/WriteFont.hs
haskell
Font meta information Insert the 'missing-glyph' Insert all other glyphs => (S.AttributeValue -> S.Attribute) -> (FontData n -> Maybe a) maybeString :: (S.AttributeValue -> S.Attribute) -> (FontData n -> String)
module Graphics.SVGFonts.WriteFont where import Numeric ( showHex ) import Data.String ( fromString ) import Data.Char ( ord ) import Data.List ( intercalate ) import qualified Data.Set as Set import qualified Data.Map as M import Control.Monad ( forM_ ) import Text.Blaze.Svg11 ((!), toValue) import qualified Text...
110b038c8247a678ecfebfbd828d68a591d72ece6fb4311c8c0dceec82985fbc
pallix/tikkba
xml.clj
Copyright © 2010 Fraunhofer Gesellschaft Licensed under the EPL V.1.0 (ns ^{:doc "Utilities function to manipulate the XML vector representation"} tikkba.utils.xml) (defn style-str "Returns a string representing the properties as a SVG style" [& props] (reduce (fn [s [k v]] (str s " " (name...
null
https://raw.githubusercontent.com/pallix/tikkba/86fda7f97c3b1ff835f02c2b1c0337f3e134fd2c/src/tikkba/utils/xml.clj
clojure
Copyright © 2010 Fraunhofer Gesellschaft Licensed under the EPL V.1.0 (ns ^{:doc "Utilities function to manipulate the XML vector representation"} tikkba.utils.xml) (defn style-str "Returns a string representing the properties as a SVG style" [& props] (reduce (fn [s [k v]] (str s " " (name...
12357c6ce46fd88e26d045f5c004d448c4ec03bc9b02f6cd8dfbf96aae03b91b
Opetushallitus/ataru
accessibility_util.cljs
(ns ataru.application-common.accessibility-util) (defn is-enter-or-space? [event] (or (= 13 (.-keyCode event)) (= 32 (.-keyCode event))))
null
https://raw.githubusercontent.com/Opetushallitus/ataru/acc274bfdb583877a2dd2ea56ff4cea0649f96ca/src/cljs/ataru/application_common/accessibility_util.cljs
clojure
(ns ataru.application-common.accessibility-util) (defn is-enter-or-space? [event] (or (= 13 (.-keyCode event)) (= 32 (.-keyCode event))))
05b1d08ee00f3945f14626743d0a1e8b7710d8ffde7d02c59b8660d537d83614
HealthSamurai/re-form
repl.clj
(ns re-form.repl (:require [figwheel-sidecar.repl-api :as repl])) (defn start-fw [] (repl/start-figwheel!) (repl/cljs-repl "app"))
null
https://raw.githubusercontent.com/HealthSamurai/re-form/810321d67e3946876c834998e3472d0693846953/env/dev/clj/re_form/repl.clj
clojure
(ns re-form.repl (:require [figwheel-sidecar.repl-api :as repl])) (defn start-fw [] (repl/start-figwheel!) (repl/cljs-repl "app"))
c6efc0b2684ce65bd2536ed7056292e5f742f82d813299a018d8f96ec0d4b9db
paddymul/css-lite
paren-css-lite.lisp
#+parenscript (ps:defpsmacro px (val) `(ps:+ ,val "px")) #+parenscript (ps:defpsmacro % (val) `(ps:+ ,val "%")) #+parenscript (ps:defpsmacro pt (val) `(ps:+ ,val "pt")) #+parenscript (ps:defpsmacro css (&body rules) (cons 'ps:+ (ps::concat-constant-str...
null
https://raw.githubusercontent.com/paddymul/css-lite/3a27bdb62ed2ba5861e4dbe503f8b061954f6753/paren-css-lite.lisp
lisp
#+parenscript (ps:defpsmacro px (val) `(ps:+ ,val "px")) #+parenscript (ps:defpsmacro % (val) `(ps:+ ,val "%")) #+parenscript (ps:defpsmacro pt (val) `(ps:+ ,val "pt")) #+parenscript (ps:defpsmacro css (&body rules) (cons 'ps:+ (ps::concat-constant-str...
e693a1b9c0b9efee2c1c79590ecf8fe264ae36b0e30de5746365e8f6ed2b4754
okeuday/erlbench
shuffle.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et : -module(shuffle). -export([shuffle/1]). Fisher - Yates shuffle shuffle(Array) -> shuffle(array:size(Array) - 1, Array). shuffle(0, Array) -> Array; shuffle(I, Array) ->...
null
https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/shuffle.erl
erlang
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et : -module(shuffle). -export([shuffle/1]). Fisher - Yates shuffle shuffle(Array) -> shuffle(array:size(Array) - 1, Array). shuffle(0, Array) -> Array; shuffle(I, Array) ->...
9de21d77f20fd6b6e4ef620a90c567baedb1eb0c740b96b00286a25037139c9c
tonyg/racket-abnf
postal-address.rkt
#lang racket/base (require abnf) (require abnf/rfc5234/core) (require racket/match) (define-abnf-parser parse-postal-address/cst "postal-address-rules.rkt" postal-address values) (struct postal-address (name street area) #:prefab) (struct name (personal-parts last-name suffix) #:prefab) (struct initial (str) #:prefa...
null
https://raw.githubusercontent.com/tonyg/racket-abnf/1079bc5b30a227f52ac00a84dc3fcd539da5f8db/abnf/scribblings/postal-address.rkt
racket
#lang racket/base (require abnf) (require abnf/rfc5234/core) (require racket/match) (define-abnf-parser parse-postal-address/cst "postal-address-rules.rkt" postal-address values) (struct postal-address (name street area) #:prefab) (struct name (personal-parts last-name suffix) #:prefab) (struct initial (str) #:prefa...
1ce9d95b3d5f7f6921eec110bc980a8242bd1694397ee877bff113886ceaf071
vernemq/vernemq
vmq_tracer.erl
Copyright 2018 Erlio GmbH Basel Switzerland ( ) %% 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, sof...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_server/src/vmq_tracer.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2018 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , from fantastic ` recon ' tool and we gratefully -module(vmq_tracer). -include_lib("stdlib/include/ms_transform.hrl"). -i...
7e35448a7c03fff1f382b886293fb7af83e81c657be161ab5ccb1551b27bdaf1
craigfe/oskel
main.ml
let main () = Binary.main () |> print_endline open Cmdliner let setup_log = let init style_renderer level = Fmt_tty.setup_std_outputs ?style_renderer (); Logs.set_level level; Logs.set_reporter (Logs_fmt.reporter ()) in Term.(const init $ Fmt_cli.style_renderer () $ Logs_cli.level ()) let term = ...
null
https://raw.githubusercontent.com/craigfe/oskel/057129faaf8171ff4ed49022346e9179b04735b2/examples/binary/bin/main.ml
ocaml
let main () = Binary.main () |> print_endline open Cmdliner let setup_log = let init style_renderer level = Fmt_tty.setup_std_outputs ?style_renderer (); Logs.set_level level; Logs.set_reporter (Logs_fmt.reporter ()) in Term.(const init $ Fmt_cli.style_renderer () $ Logs_cli.level ()) let term = ...
9738f0fb0f0da6a1a96a16b681687c3e948bc554a479bb2ca82dbd14158b9b5e
haskell/haskell-language-server
Cabal.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE DuplicateRecordFields # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE LambdaCase #-} # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE TupleSecti...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/d7690c500f204ff3804b1ec7af70a6194c4a9908/plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # | Helper function to restart the shake session, specifically for modifying .cabal files. No special logic, just group up a bunch of functions you need for the base Notification ...
# LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # module Ide.Plugin.Cabal (descriptor, Log(..)) where import Control.Concurrent.STM import ...
c8df57b92849174bec30ac6200e1049221e1ea33f2baa40d652dd1530ee3a19b
rtrusso/scp
read11.scm
(define s (call-with-input-file "tests/read-namedchar.scm" (lambda (x) (read x)))) (display "read: ") (newline) (write s) (newline) (for-each (lambda (x) (display " ") (write x) (display " -> #x") (display (number->string (char->integer x) 16)) ...
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/read11.scm
scheme
(define s (call-with-input-file "tests/read-namedchar.scm" (lambda (x) (read x)))) (display "read: ") (newline) (write s) (newline) (for-each (lambda (x) (display " ") (write x) (display " -> #x") (display (number->string (char->integer x) 16)) ...
c56ddb8e6c98bdbfaa41d2104455638f0b47c3c61c6297683d131ce09bcdccd2
SparkFund/sails-forth
datomic.clj
(ns sails-forth.datomic "Provides fns to assert the results of salesforce queries as datoms." (:require [clj-time.coerce :as tc] [clojure.set :as set] [clojure.string :as s] [sails-forth.client :as c] [sails-forth.clojurify :as clj] [sails-forth.query :as ...
null
https://raw.githubusercontent.com/SparkFund/sails-forth/acc97f01d5d1bf21ee7139eee9360d363515d737/src/sails_forth/datomic.clj
clojure
More field metadata could come along for the ride
(ns sails-forth.datomic "Provides fns to assert the results of salesforce queries as datoms." (:require [clj-time.coerce :as tc] [clojure.set :as set] [clojure.string :as s] [sails-forth.client :as c] [sails-forth.clojurify :as clj] [sails-forth.query :as ...
e15650e96317279f387c5b59c809f02b1861d2af035522db59118f8f7108f0f3
amosr/folderol
Zip.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Folderol.Process.Zip where import Folderol.Process.Map import Folderol.Typed import qualified Folderol.Typed.Process as Proc import P import qualified Folderol.Internal.Haskell as Haskell zip :: Monad m => Channel a -> Channel b -> Network m (Channe...
null
https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/src/Folderol/Process/Zip.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Folderol.Process.Zip where import Folderol.Process.Map import Folderol.Typed import qualified Folderol.Typed.Process as Proc import P import qualified Folderol.Internal.Haskell as Haskell zip :: Monad m => Channel a -> Channel b -> Network m (Channe...
2bbabad8033110da5d39a28e7c732ca36e9e61fc51396ea9e0fe6164ba5a0e9b
plkrueger/CocoaInterface
ccl-additions-for-cocoa-tools.lisp
;; ccl-additions-for-cocoa-tools ;; This file includes additional functions and methods that arguably should be located ;; elsewhere. Given my reluctance to mess with the standard files they are here instead. should be in cocoa-editor.lisp ;; This is needed because the IDE search function tries to discover what the...
null
https://raw.githubusercontent.com/plkrueger/CocoaInterface/169490ba6649b5a6e8973bfa3d3ee99c824ddcbd/Cocoa%20Dev/ccl-additions-for-cocoa-tools.lisp
lisp
ccl-additions-for-cocoa-tools This file includes additional functions and methods that arguably should be located elsewhere. Given my reluctance to mess with the standard files they are here instead. This is needed because the IDE search function tries to discover what the default directory should be by looking at...
should be in cocoa-editor.lisp This should be defined in cocoa-editor.lisp with other versions of this method . (defmethod gui::document-pathname ((doc ns:ns-document)) nil) should be in l1-clos-boot.lisp or maybe in objc-clos.lisp (defmethod ccl::class-prototype ((class objc::objc-class-object)) (or (cc...
133e7a17268d82f2cfe7b7064b1bee26d15da2237711d600f369d76fd05db24b
korya/efuns
wX_filesel.mli
(***********************************************************************) (* *) (* ____ *) (* *) Fabrice Le Fessa...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_filesel.mli
ocaml
********************************************************************* ____ ...
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . type info = { filter: string; current_selection: string; predicat: info -> bool; mutab...
6eb3576a93e5f0cf603e0bf9aabcdb34facd3016a40c85bc07d2dfa1bd4075fe
Mercerenies/eulers-melting-pot
bwgen.lisp
;;; Beeswax code generator (defgeneric to-code (code)) beeswax - code is a wrapper around a 2 - dimensional array that ;; provides automatic adjustment to the size when needed. (defclass beeswax-code () ((raw-code :accessor raw-code :initform (make-array '(0 0) :e...
null
https://raw.githubusercontent.com/Mercerenies/eulers-melting-pot/68bcb9b1d46278c0bab4ab6200bcba09be8e4930/etc/bwgen.lisp
lisp
Beeswax code generator provides automatic adjustment to the size when needed. So we use boxed arrays to avoid those nonsense warnings :P beeswax-program is a higher-level abstraction that's used to generate the actual code. Actual commands Packs lstack[1,2] into lstack[1] Modulo value Modulo value Modulo valu...
(defgeneric to-code (code)) beeswax - code is a wrapper around a 2 - dimensional array that (defclass beeswax-code () ((raw-code :accessor raw-code :initform (make-array '(0 0) :element-type 'standard-char :initial-element #\SPAC...
5bacf8d210badde01c0419f0b6e4cd4f091c83fcce55c1372841307f44cbad3c
hakaru-dev/hakaru
Types.hs
# LANGUAGE CPP , GADTs , KindSignatures , , PolyKinds , TypeOperators , Rank2Types , BangPatterns , FlexibleContexts , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances ...
null
https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Evaluation/Types.hs
haskell
# OPTIONS_GHC -Wall -fwarn-tabs # -------------------------------------------------------------- 2016.04.28 | Module : Language.Hakaru.Evaluation.Types License : BSD3 Maintainer : Stability : experimental BUG: completely gave up on structure s...
# LANGUAGE CPP , GADTs , KindSignatures , , PolyKinds , TypeOperators , Rank2Types , BangPatterns , FlexibleContexts , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances ...
3e861699289e8a64b25381de8b8df49b87383e0f132a84435c25817eef5e8199
DavidAlphaFox/RabbitMQ
rabbit_web_dispatch.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-web-dispatch/src/rabbit_web_dispatch.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Handler Registr...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2010 - 2014 GoPivotal , Inc. All rights reserved . -module...
5fc84161c170c0e0377878f49fa78904b9c96daeb5be514fba740f355b57a1fe
rm-hull/big-bang
config.cljs
(ns big-bang.examples.pacman.config (:require [cljs.core.async :refer [chan <!] :as async] [big-bang.examples.pacman.util :refer [into-channel proxy-request]] [dataview.loader :refer [fetch-image fetch-text]]) (:require-macros [cljs.core.async.macros :refer [go]])) (def canvas (.getElementB...
null
https://raw.githubusercontent.com/rm-hull/big-bang/2825e7f0bb7615e1158a72d58f426bc1e33bd9ef/examples/pacman/src/config.cljs
clojure
(ns big-bang.examples.pacman.config (:require [cljs.core.async :refer [chan <!] :as async] [big-bang.examples.pacman.util :refer [into-channel proxy-request]] [dataview.loader :refer [fetch-image fetch-text]]) (:require-macros [cljs.core.async.macros :refer [go]])) (def canvas (.getElementB...
f861df65420ae4f4454a2bf9a5c97a0c6ca5524355bdadab949ddd476d9e88cd
haskell-tools/haskell-tools
Removed.hs
module Refactor.OrganizeImports.Removed where import Control.Monad ()
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/OrganizeImports/Removed.hs
haskell
module Refactor.OrganizeImports.Removed where import Control.Monad ()
b9598a8adf5d6230b33e5d90550e0e98d3c1ab719ab07066a5441870b60d3d9f
igorhvr/bedlam
template-util.scm
(load "util.scm") (import string-io) (define-java-classes <java.util.hashtable> <java.util.vector>) (define-generic-java-methods put add) ;;convert scheme data structure into template data structure (define (->template data) (cond [(java-object? data) ;pass through data] [(list...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/servlets/examples/web/scheme/template-util.scm
scheme
convert scheme data structure into template data structure pass through convert to hashtable convert to vector convert to string
(load "util.scm") (import string-io) (define-java-classes <java.util.hashtable> <java.util.vector>) (define-generic-java-methods put add) (define (->template data) (cond data] (let ([ht (java-new <java.util.hashtable>)]) (for-each (lambda (e) (put ht (->template (car e)...
7eb548d130e94cec179f8a5d680fc2b1fa87b73a9b6ac4209d1fb51b8b481232
kupl/FixML
sub24.ml
type metro = STATION of name | AREA of name * metro | CONNECT of metro * metro and name = string let rec checkArea n e = match e with AREA(a, b) -> (checkArea (n @ [a]) b) | CONNECT(a, b) -> ((checkArea n a) && (checkArea n b)) | STATION a -> List.exists (fun x -> x = a) n let rec checkMetro e = ...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness1/submissions/sub24.ml
ocaml
type metro = STATION of name | AREA of name * metro | CONNECT of metro * metro and name = string let rec checkArea n e = match e with AREA(a, b) -> (checkArea (n @ [a]) b) | CONNECT(a, b) -> ((checkArea n a) && (checkArea n b)) | STATION a -> List.exists (fun x -> x = a) n let rec checkMetro e = ...
884bd4af25af76343b1e920abbcbee6da4af6ce96602e9aba7760a1b3596eab7
kappelmann/engaging-large-scale-functional-programming
Exercise05.hs
# LANGUAGE TupleSections # module Exercise05 where import Data.Array (Array, array, bounds, (!), (//)) type Pos = (Int, Int) data E = Blank | Rock | Me | Flag | Old | Pass deriving (Eq) showMaze :: Int -> Int -> [Pos] -> Pos -> Pos -> String showMaze h w rocks start flag = unlines [[showPos i j | j <- [0 .. w - ...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/05/uploads/artemishatesleadingdigits/Exercise05.hs
haskell
# LANGUAGE TupleSections # module Exercise05 where import Data.Array (Array, array, bounds, (!), (//)) type Pos = (Int, Int) data E = Blank | Rock | Me | Flag | Old | Pass deriving (Eq) showMaze :: Int -> Int -> [Pos] -> Pos -> Pos -> String showMaze h w rocks start flag = unlines [[showPos i j | j <- [0 .. w - ...
64b96b221226dd0a0d638329de1258c9d61165caf0e4177778477fdfd23a4c33
bennn/dissertation
2019-05-17.rkt
#lang racket (require plot) added by (require racket/gui) (define f (new frame% [parent #f] [label "3D Graph"] [min-width 400] [min-height 400])) (define ec (new editor-canvas% [parent f])) (define t (new text%)) (send ec set-editor t) (define ((make-current-value-renderer fn) snip event x y) (define overlays ...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/transient-expressive/plot/2019-05-17.rkt
racket
#lang racket (require plot) added by (require racket/gui) (define f (new frame% [parent #f] [label "3D Graph"] [min-width 400] [min-height 400])) (define ec (new editor-canvas% [parent f])) (define t (new text%)) (send ec set-editor t) (define ((make-current-value-renderer fn) snip event x y) (define overlays ...
227b9c5523dbb141b3d79ed642ef293a97c737f0b8124a73544f16a7d7ff23a2
upgradingdave/cljs
lock.cljs
(ns up.auth0.lock (:require [cljsjs.auth0-lock] [clojure.walk :as w] [up.cookies.core :as c])) (def default-domain "upgradingdave.auth0.com") (def default-client-id "zxaleUBMxSvDbCCXPjidSCWnljd9ulmF") (def lock-opts {:languageDictionary {:title "Clojure Bingo!"} :theme {:logo "" ...
null
https://raw.githubusercontent.com/upgradingdave/cljs/1026b6db905214586fb7e04800df078da19b37cc/src/cljs/up/auth0/lock.cljs
clojure
Example of profile response "-7266-pp-madmen_fullbody_normal.jpg", [#js {:provider "twitter", :user_id "185300550", :connection "Sr7Qhh1h7VLJYdAOPBMKRtcfHboLomNL"}
(ns up.auth0.lock (:require [cljsjs.auth0-lock] [clojure.walk :as w] [up.cookies.core :as c])) (def default-domain "upgradingdave.auth0.com") (def default-client-id "zxaleUBMxSvDbCCXPjidSCWnljd9ulmF") (def lock-opts {:languageDictionary {:title "Clojure Bingo!"} :theme {:logo "" ...
ee424b30556de40c296d1800789046f1f2467d47eb6039affbe252579625c959
dbuenzli/vg
rhtmlc.ml
--------------------------------------------------------------------------- Copyright ( c ) 2013 The vg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/vg/0d84bca1c9dc689f64f923dcd20a7dda7c552011/test/rhtmlc.ml
ocaml
PDF font resolver. Resolution Persistent ui state. selected image id. selected tags. selected renderer. white background. render resolution. check id still exists. Render User interface Does this have to be so ugly ? adjust height to baseline from the style sheet..., getting dynamically ...
--------------------------------------------------------------------------- Copyright ( c ) 2013 The vg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...