_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
4431bc98fc1498192bd2544f94dba94a9ccaaa1f36318129b7102474e70f4e44
JacquesCarette/Drasil
Definitions.hs
module Drasil.NoPCM.Definitions where --whole file is used import Language.Drasil --Common Terms htTrans :: NamedChunk htTrans = nc "heat transfer" (cn "heat transfer") --Not really a nounphase, just a hack to get RefSec to work srsSWHS :: CommonConcept -- Used to make the title of the paper srsSWHS = dcc' "srsSWHS"...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/cb52c5f5978b92c27c05c06458231774232a174a/code/drasil-example/nopcm/lib/Drasil/NoPCM/Definitions.hs
haskell
whole file is used Common Terms Not really a nounphase, Used to make the title of the paper
import Language.Drasil htTrans :: NamedChunk just a hack to get RefSec to work srsSWHS = dcc' "srsSWHS" (nounPhraseSP "Solar Water Heating Systems") "SWHS" "NoPCM"
d4878f5c5e0e15f1688dac9d8f6ddde42a57fc22c00f6ace0e4fbe799f236b5e
nowl/detome
log.lisp
(in-package #:blacker) (defparameter *log-levels* '(:error :warning :info :debug)) (defparameter *log-types-to-print* *log-levels*) (defun set-log-level (level) (setf *log-types-to-print* (loop for lev in *log-levels* collect lev until (eq lev level)))) (defmacro log (level &rest params) #...
null
https://raw.githubusercontent.com/nowl/detome/108ed05427a34a7d42de8ecac384aca63a8ab9e0/blacker/log.lisp
lisp
(in-package #:blacker) (defparameter *log-levels* '(:error :warning :info :debug)) (defparameter *log-types-to-print* *log-levels*) (defun set-log-level (level) (setf *log-types-to-print* (loop for lev in *log-levels* collect lev until (eq lev level)))) (defmacro log (level &rest params) #...
0dc938dd2b430c8079d7b5989b8b4b57828ec20e62e18b6cf5afa780dbd2c4fe
cyverse-archive/DiscoveryEnvironmentBackend
c193_2015010601.clj
(ns facepalm.c193-2015010601 (:use korma.core)) (def ^:private version "The destination database version." "1.9.3:20150106.01") (defn fix-negative-parameter-ordering [] (println "\t* fixing negative parameter ordering...") (exec-raw "UPDATE parameters SET ordering = 0 WHERE id IN (SELECT id FROM ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/databases/de-database-schema/src/main/conversions/v1.9.3/c193_2015010601.clj
clojure
(ns facepalm.c193-2015010601 (:use korma.core)) (def ^:private version "The destination database version." "1.9.3:20150106.01") (defn fix-negative-parameter-ordering [] (println "\t* fixing negative parameter ordering...") (exec-raw "UPDATE parameters SET ordering = 0 WHERE id IN (SELECT id FROM ...
63786eea8aa66696ca94081ee2aea03e03ac02b54f950bde8b1e7be533f875aa
chrisdone/prana
Complex.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE Trustworthy # # LANGUAGE StandaloneDeriving # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Complex Copyright : ( c ) The University of Glasgow...
null
https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/Data/Complex.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveTraversable # --------------------------------------------------------------------------- | Module : Data.Complex License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable Complex numb...
# LANGUAGE Trustworthy # # LANGUAGE StandaloneDeriving # # LANGUAGE DeriveGeneric # Copyright : ( c ) The University of Glasgow 2001 module Data.Complex ( Complex((:+)) , realPart , imagPart , mkPolar , cis , polar , magnitude , phase ...
bd3a5f467c283afdb52069ac1ab865c67f85c97b04c8b12146c50060591a6f9f
nuvla/api-server
credential_template_infrastructure_service_openstack.cljc
(ns sixsq.nuvla.server.resources.spec.credential-template-infrastructure-service-openstack (:require [clojure.spec.alpha :as s] [sixsq.nuvla.server.resources.spec.credential-template :as ct] [sixsq.nuvla.server.util.spec :as su] [spec-tools.core :as st])) (s/def ::openstack-username (-> (st/spec s...
null
https://raw.githubusercontent.com/nuvla/api-server/b45a97801f7225e3a5b8cd0c31bb971b42b2c90e/code/src/sixsq/nuvla/server/resources/spec/credential_template_infrastructure_service_openstack.cljc
clojure
Defines the contents of the openstack template used in a create resource.
(ns sixsq.nuvla.server.resources.spec.credential-template-infrastructure-service-openstack (:require [clojure.spec.alpha :as s] [sixsq.nuvla.server.resources.spec.credential-template :as ct] [sixsq.nuvla.server.util.spec :as su] [spec-tools.core :as st])) (s/def ::openstack-username (-> (st/spec s...
3336944325cc3bbe4f17e44adeeded5d9d99f77f9e8343c3bdba02473776e215
hugoduncan/makejack
tag_version.clj
(ns makejack.tasks.tag-version (:require [makejack.defaults.api :as defaults] [makejack.git.api :as git] [makejack.project-data.api :as project-data] [makejack.verbose.api :as v])) (defn tag-version "Tag the HEAD sha with the project version." [params] (v/println params "Tag version...") (let [pa...
null
https://raw.githubusercontent.com/hugoduncan/makejack/6968c6c8f2433d5a618acf8820eaa27f41464b95/bases/tasks/src/makejack/tasks/tag_version.clj
clojure
(ns makejack.tasks.tag-version (:require [makejack.defaults.api :as defaults] [makejack.git.api :as git] [makejack.project-data.api :as project-data] [makejack.verbose.api :as v])) (defn tag-version "Tag the HEAD sha with the project version." [params] (v/println params "Tag version...") (let [pa...
16929ab8914a835bd68b805225a6dd1e583b4f2e4eb195fbf8fe008e709a37df
serokell/edna
Connection.hs
SPDX - FileCopyrightText : 2021 > -- SPDX - License - Identifier : AGPL-3.0 - or - later module Edna.DB.Connection ( PostgresConn(..) , createConnPool , destroyConnPool , postgresConnPooled , postgresConnSingle , withPostgresConn ) where import Universum import Control.Concurrent (threadDelay) i...
null
https://raw.githubusercontent.com/serokell/edna/ffd08c85ed876edcd42d6df93c065ec28da7153e/backend/src/Edna/DB/Connection.hs
haskell
by multiple threads, so we need a pool of connections to allow for simultaneous DB queries. | Creates a @ConnPool@ with PostgreSQL connections which use given connection string. connection creation action connection destroy action number of individual pools (just one is fine) maximum time the connection should...
SPDX - FileCopyrightText : 2021 > SPDX - License - Identifier : AGPL-3.0 - or - later module Edna.DB.Connection ( PostgresConn(..) , createConnPool , destroyConnPool , postgresConnPooled , postgresConnSingle , withPostgresConn ) where import Universum import Control.Concurrent (threadDelay) impo...
b6a2895bc97ab6a36e0322111ae78ef1be931c496fad0875c28e9cbf4104c342
facebook/pyre-check
features.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/d4eaca974accf7755e5d3eafb949774e5e55ee57/source/interprocedural_analyses/taint/features.ml
ocaml
Features: implements features, which are bits of informations carried on a * taint. Those are essential to help users triage issues. * These features are used to build the taint representation in `Domains`. Via f"{something}" Declared breadcrumbs Type constraint A special value that disables collapsing, whi...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
62646db42858486d60af79a96ab9f54469320667b3cb1d3cd3abfab6660a3277
ygrek/ocaml-extlib
extString.mli
* ExtString - Additional functions for string manipulations . * Copyright ( C ) 2003 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 of the...
null
https://raw.githubusercontent.com/ygrek/ocaml-extlib/0779f7a881c76f9aca3d5445e2f063ba38a76167/src/extString.mli
ocaml
* Additional functions for string manipulations. * [init l f] returns the string of length [l] with the chars f 0 , f 1 , f 2 ... f (l-1). * [find s x] returns the starting index of the string [x] within the string [s] or raises [Invalid_string] if [x] is not a substring of [s]. * [find s i x] retu...
* ExtString - Additional functions for string manipulations . * Copyright ( C ) 2003 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 of the...
d4e622de4f0004777f74d4c89731a0159a02d35175679062449b400dc3ccd646
GNOME/gimp-tiny-fu
script-fu-util-setpt.scm
; GIMP - The GNU Image Manipulation Program Copyright ( C ) 1995 and ; ; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ; (at your option) any later ve...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/script-fu-util-setpt.scm
scheme
GIMP - The GNU Image Manipulation Program This program is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (define (script-fu-set-pt a index x y) (aset a (* index 2) x) (aset a (+ (* index 2) 1) y) )
e2386a650d9d1116099f1caffc09bbd53a632a4304333560a788a897fc41e187
ledger/ledger4
Text.hs
{-# LANGUAGE OverloadedStrings #-} module Ledger.Parser.Text ( parseJournalFile , RawJournal(..) , RawEntity(..) , RawEntityInSitu(..) , RawPosting(..) , RawTransaction(..) , RawAutoTxn(..) , RawPeriodTxn(..) -- , main ) where import Cont...
null
https://raw.githubusercontent.com/ledger/ledger4/0dd4d772dbd6a94ef83398e79e9acab2029a5a3a/ledger-parse/Ledger/Parser/Text.hs
haskell
# LANGUAGE OverloadedStrings # , main testme :: IO (Result [RawEntityInSitu]) testme = in parseJournalFile (fromText (T.pack file)) <$> B.readFile file instance NFData (Result a) bs <- B.readFile file defaultMain [ bench "main" $ nf (parseJournalFile (fromText (T.pack file))) b...
module Ledger.Parser.Text ( parseJournalFile , RawJournal(..) , RawEntity(..) , RawEntityInSitu(..) , RawPosting(..) , RawTransaction(..) , RawAutoTxn(..) , RawPeriodTxn(..) ) where import Control.Applicative import Data.ByteString as ...
96408ff0d3c961636bfc50d3abadad7a55a1fb94ab56724b5f6bf8e68ddb4949
Novus-School/novus
account_tests.clj
(ns novus.account-tests (:require [clojure.test :refer :all] [novus.test-system :as ts] [datomic.client.api :as d] [integrant.repl.state :as state])) (def db (-> state/system :db/datomic)) (def conn (:conn db)) (defn account-fixture [f] (ts/create-auth0-test-user {:connec...
null
https://raw.githubusercontent.com/Novus-School/novus/c65b37a654173df52084253651edc87033409f4b/novus/src/test/novus/account_tests.clj
clojure
(ns novus.account-tests (:require [clojure.test :refer :all] [novus.test-system :as ts] [datomic.client.api :as d] [integrant.repl.state :as state])) (def db (-> state/system :db/datomic)) (def conn (:conn db)) (defn account-fixture [f] (ts/create-auth0-test-user {:connec...
ec6afeaf74c5df6fc2596c52fec0ec611bcb44b7e8c02210faa0d14a8bff5fb3
dselsam/arc
Ordering.hs
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE StrictData #-} module Lib.Ordering where i...
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Lib/Ordering.hs
haskell
# LANGUAGE StrictData # better way to do this? [(0,0),(1,0),(2,0),(3,0),(4,0),(0,1),(1,1),(2,1),(3,1),(4,1)]
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # module Lib.Ordering where import qualified Data.List as...
12eaf8e02457774276ac012792d56e833afe6ea95151206115ec7293b9d2a789
startalkIM/ejabberd
readmark.erl
-module(readmark). -export([readmark_message/3]). -include("jlib.hrl"). -include("logger.hrl"). readmark_message(From, To, Packet) -> send_push_message(From, To, Packet), case fxml:get_tag_attr_s(<<"read_type">>, Packet) of ...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/readmark.erl
erlang
-module(readmark). -export([readmark_message/3]). -include("jlib.hrl"). -include("logger.hrl"). readmark_message(From, To, Packet) -> send_push_message(From, To, Packet), case fxml:get_tag_attr_s(<<"read_type">>, Packet) of ...
ee46357f51f1823a1c34f1b588d7abdd79c37c6047fc8f690571c380841f28f8
poscat0x04/telegram-types
UpdateType.hs
module Web.Telegram.Types.Internal.UpdateType where import Common data UpdateType = TMessage | TEditedMessage | TChannelPost | TEditedChannelPost | TInlineQuery | TChosenInlineResult | TCallbackQuery | TShippingQuery | TPreCheckoutQuery | TPollUpdate | TPollAnswer deriving stock (Show, Eq, Enu...
null
https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/UpdateType.hs
haskell
module Web.Telegram.Types.Internal.UpdateType where import Common data UpdateType = TMessage | TEditedMessage | TChannelPost | TEditedChannelPost | TInlineQuery | TChosenInlineResult | TCallbackQuery | TShippingQuery | TPreCheckoutQuery | TPollUpdate | TPollAnswer deriving stock (Show, Eq, Enu...
d75df99e588d51f73ac39c4f17967ede3dfef25486d8b6ebcc8b107fa141b9f6
gsakkas/rite
20060420-13:26:40-295f6dadefdff9931a5b54c5f40a9631.seminal.ml
exception Unimplemented exception RuntimeTypeError exception DoesNotTypecheck of string (****** Syntax for our language, including types (do not change) *****) type exp = Var of string | Lam of string * typ * exp | Apply of exp * exp | Closure of string * exp * (env ref) | Int of int | Pl...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060420-13%3A26%3A40-295f6dadefdff9931a5b54c5f40a9631.seminal.ml
ocaml
***** Syntax for our language, including types (do not change) **** ***** Interpreter for our language (do not change) **** **** helper functions provided to you (do not change) **** ********* examples and testing **********
exception Unimplemented exception RuntimeTypeError exception DoesNotTypecheck of string type exp = Var of string | Lam of string * typ * exp | Apply of exp * exp | Closure of string * exp * (env ref) | Int of int | Plus of exp * exp | If of exp * exp * exp | RecordE of (string * exp)...
4d9740a0a556a9a7b2e7c8bfb5fe8d14a65934e308197622eeab44b41c4bf210
jordanthayer/ocaml-search
coatcheck.mli
$ I d : coatcheck.mli , v 1.1 2005/04/03 19:17:46 ruml Exp ruml $ coatcheck - mapping objects to and from non - negative integers The Strtab module is a version of this optimized for strings . coatcheck - mapping objects to and from non-negative integers The Strtab module is a version of this op...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/coatcheck.mli
ocaml
* returns a unique and repeatable integer 'coatcheck tag' corresponding to the argument * given an integer 'coatcheck tag', returns the corresponding object. Does not actually remove the object from the coatcheck. * number of items currently interned * calls [f] on tag and object. Probably best not to rely ...
$ I d : coatcheck.mli , v 1.1 2005/04/03 19:17:46 ruml Exp ruml $ coatcheck - mapping objects to and from non - negative integers The Strtab module is a version of this optimized for strings . coatcheck - mapping objects to and from non-negative integers The Strtab module is a version of this op...
a27b6416a2127d91a7c8a06987974d74e6f76c78e1548d955aadca6c73079914
riak-core-lite/riak_core_lite_util
riak_core_console.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2011 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 may ob...
null
https://raw.githubusercontent.com/riak-core-lite/riak_core_lite_util/c294504eeb5f4320cf4e3b73a37157056d0b0f07/src/riak_core_console.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 ) 2011 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 -module...
da19f4be153946e28d36dbdbcefd0332f833b7b855f6aac7dd75dcd23021f621
mhayashi1120/Gauche-net-twitter
help.scm
(define-module net.twitter.help (extend net.twitter.base) (use net.twitter.core) (export configuration/json languages/json rate-limit-status/json tos/json privacy/json)) (select-module net.twitter.help) ;;; ;;; JSON api ;;; (define (configuration/json cred . _keys) (call/oauth->json cred 'get "...
null
https://raw.githubusercontent.com/mhayashi1120/Gauche-net-twitter/b9f4be3ca8459fc662f9c79481411aac03b51133/src/net/twitter/help.scm
scheme
JSON api
(define-module net.twitter.help (extend net.twitter.base) (use net.twitter.core) (export configuration/json languages/json rate-limit-status/json tos/json privacy/json)) (select-module net.twitter.help) (define (configuration/json cred . _keys) (call/oauth->json cred 'get "/1.1/help/configurati...
56a0a1b6aa3085a8d439b539a8c7c1ecc387977e9ea2cd2bb2527808f1f9a719
input-output-hk/cardano-ledger
Scriptic.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Test.Cardano.Ledger.Generic.Scriptic where import Cardano.Ledger.Alleg...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/064acb8e7ab7b2aeef138ec0c821f8c5f1402621/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Scriptic.hs
haskell
# LANGUAGE OverloadedStrings # ============================================= always False always True always True always False always True always True always False always True always True ================================= always False always True always True ================================= always Fals...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Test.Cardano.Ledger.Generic.Scriptic where import Cardano.Ledger.Allegra.Scripts (Timelock (..)) import C...
9f3e1ce177908bccc512e47dae8aae0dc43a45d69de699dd402de819dc473411
jackfirth/rebellion
base.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [reducer? predicate/c] [reducer/c (-> contract? contract? contract?)] [make-reducer (->* (#:starter (-> reduction-state/c) #:consumer (-> any/c any/c reduction-state/c) #:finisher (-> any/c any/c) #:early-finisher (...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/streaming/reducer/private/base.rkt
racket
@---------------------------------------------------------------------------------------------------- @------------------------------------------------------------------------------ Contracts
#lang racket/base (require racket/contract/base) (provide (contract-out [reducer? predicate/c] [reducer/c (-> contract? contract? contract?)] [make-reducer (->* (#:starter (-> reduction-state/c) #:consumer (-> any/c any/c reduction-state/c) #:finisher (-> any/c any/c) #:early-finisher (...
f1bf8bbe53150302daf64e58bde89dc2223765b9ba3ef25ce5adbd8999417c90
froggey/Mezzano
array.lisp
;;;; Low-level support functions for arrays. (in-package :mezzano.runtime) (declaim (inline sys.int::simple-character-array-p)) (defun sys.int::simple-character-array-p (object) (sys.int::%object-of-type-p object sys.int::+object-tag-simple-string+)) (declaim (inline sys.int::%simple-1d-array-p)) (defun sys.int::%...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/runtime/array.lisp
lisp
Low-level support functions for arrays. Access to complex array slots. Simple vectors.
(in-package :mezzano.runtime) (declaim (inline sys.int::simple-character-array-p)) (defun sys.int::simple-character-array-p (object) (sys.int::%object-of-type-p object sys.int::+object-tag-simple-string+)) (declaim (inline sys.int::%simple-1d-array-p)) (defun sys.int::%simple-1d-array-p (object) (sys.int::%objec...
48db1f78a8bb876db240a16443ccd129f13607c9ef73532744c88d403a4760bc
rwstauner/jirazzz
assign_test.clj
(ns jirazzz.assign-test (:require [clojure.test :refer [deftest is] :as t] [jirazzz.test-util :refer [jirazzz] :as tu])) (t/use-fixtures :each tu/with-server-reset) (deftest assign (tu/respond (:meta tu/responses)) (tu/respond (:sprint tu/responses)) (tu/respond (:assignee tu/responses)) (let [r ...
null
https://raw.githubusercontent.com/rwstauner/jirazzz/539388cd943935c1a60bca36ddfab1e243474f1e/test/jirazzz/assign_test.clj
clojure
(ns jirazzz.assign-test (:require [clojure.test :refer [deftest is] :as t] [jirazzz.test-util :refer [jirazzz] :as tu])) (t/use-fixtures :each tu/with-server-reset) (deftest assign (tu/respond (:meta tu/responses)) (tu/respond (:sprint tu/responses)) (tu/respond (:assignee tu/responses)) (let [r ...
c0e4f4cfaf8a1626cba157bc1c5a4f7a68d8e54b31ce88a69a17c90ba159663c
maranget/hevea
element.ml
(***********************************************************************) (* *) (* HEVEA *) (* *) , projet PARA , INR...
null
https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/element.ml
ocaml
********************************************************************* HEVEA ...
, projet PARA , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . type text = Style of string | Font of int | Color of string | StyleAttr of string * string let pretty_text = f...
bb211a5d51f447a2427220936935fc7d81accf337e5ca98e49f27e9dda53dfb1
tek/polysemy-hasql
WhereTest.hs
# options_ghc -Wno - redundant - constraints # module Polysemy.Hasql.Test.WhereTest where import Fcf (Eval) import Polysemy.Db.Data.FieldId (FieldId (NamedField, NumberedField)) import Polysemy.Db.Data.Rep (Auto, Flatten, Product) import Polysemy.Test (UnitTest) import Polysemy.Hasql.Tree.Table (DbQueryRoot, TableRo...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/test/Polysemy/Hasql/Test/WhereTest.hs
haskell
# options_ghc -Wno - redundant - constraints # module Polysemy.Hasql.Test.WhereTest where import Fcf (Eval) import Polysemy.Db.Data.FieldId (FieldId (NamedField, NumberedField)) import Polysemy.Db.Data.Rep (Auto, Flatten, Product) import Polysemy.Test (UnitTest) import Polysemy.Hasql.Tree.Table (DbQueryRoot, TableRo...
5e6908ef3f7725e6777bf11df9cbd493b55316fe41a435e31f48b79fdbe27a9d
goldfirere/cs380
Arith.hs
Arith.hs -- Defines algebraic datatypes for storing numerical arithmetic expressions # LANGUAGE GADTSyntax # module Arith where data Sum where Plus :: Sum -> Sum -> Sum Minus :: Sum -> Sum -> Sum Term :: Term -> Sum deriving Show data Term where Mult :: Term -> Term -> Term Div :: Term -> Term ...
null
https://raw.githubusercontent.com/goldfirere/cs380/a9e2d2e610eb4e9e082cef0559b6e29a6d82a253/06_trees/Arith.hs
haskell
Defines algebraic datatypes for storing numerical arithmetic expressions These instances tell GHCi to pretty - print the types above Remove the ( deriving Show ) lines to allow these to work These instances tell GHCi to pretty-print the types above Remove the (deriving Show) lines to allow these to work
Arith.hs # LANGUAGE GADTSyntax # module Arith where data Sum where Plus :: Sum -> Sum -> Sum Minus :: Sum -> Sum -> Sum Term :: Term -> Sum deriving Show data Term where Mult :: Term -> Term -> Term Div :: Term -> Term -> Term Factor :: Factor -> Term deriving Show data Factor where Lit ...
e714835f52ca28b243643cc2536860a8a237faa63c7ab801a0b058788ae228ad
GaloisInc/haskell-tor
Credentials.hs
|Credential management for a Tor node . # LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Tor.State.Credentials( Credentials , createCertificate , generateKeyPair , newCredentials , getSigningKey , getOnionKey ,...
null
https://raw.githubusercontent.com/GaloisInc/haskell-tor/e5bfe82f63722292df5634686195f85e3a7857b2/src/Tor/State/Credentials.hs
haskell
# LANGUAGE OverloadedStrings # |A snapshot of the current credential state for the system. |The current credentials held by the node. |Generate new credentials fora fresh node. |Get the public signing certificate and its associated private key. |Get the public onion certificate and its associated private key. |Ge...
|Credential management for a Tor node . # LANGUAGE CPP # # LANGUAGE RecordWildCards # module Tor.State.Credentials( Credentials , createCertificate , generateKeyPair , newCredentials , getSigningKey , getOnionKey , getNTorOnionKey , getTLSKey...
aca4b5ade52844c941936df6cd54ccbafca6c4d44000649cac9ddd8562d42a11
zotonic/zotonic
filter_content_type_label.erl
@author < > %% @doc Get human-readable label for a content (MIME) type -module(filter_content_type_label). -export([ content_type_label/2 ]). -include_lib("zotonic_core/include/zotonic.hrl"). -spec content_type_label(undefined | string() | binary() | tuple(), #context{}) -> binary(). content_type_label(unde...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_content_type_label.erl
erlang
@doc Get human-readable label for a content (MIME) type
@author < > -module(filter_content_type_label). -export([ content_type_label/2 ]). -include_lib("zotonic_core/include/zotonic.hrl"). -spec content_type_label(undefined | string() | binary() | tuple(), #context{}) -> binary(). content_type_label(undefined, _Context) -> undefined; content_type_label(Conte...
07bb71e6f486a35828f402167e377f756f36a05b821bede4d2c51d916d1c8cf4
jtza8/interact
sprite.lisp
; Use of this source code is governed by a BSD-style license that can be found in the license.txt file ; in the root directory of this project. (in-package :interact) (defparameter *sprites* '()) (defclass sprite () ((width :initarg :width :initform (error "No width given.") :reader width) ...
null
https://raw.githubusercontent.com/jtza8/interact/ea2121d7e900dac4fe2a085bd5f2783a640e71f8/src/sprite.lisp
lisp
Use of this source code is governed by a BSD-style in the root directory of this project.
license that can be found in the license.txt file (in-package :interact) (defparameter *sprites* '()) (defclass sprite () ((width :initarg :width :initform (error "No width given.") :reader width) (height :initarg :height :initform (error "No height given.") :reader h...
88b62bbc2a45f8f81eae45ee7cea0e469507223765b25e06e45692ff2913dbc0
aryx/lfs
pair.ml
* The product of the domains and languages of 2 sub - logics . module Make (L1 : Logic.T) (L2 : Logic.T) = struct include Logic.Default type t = L1.t * L2.t let isvalue (x1,x2) = L1.isvalue x1 & L2.isvalue x2 let top () = L1.top (), L2.top () let entails (x1,x2) (y1,y2) = L1.entails x1 y1 & L...
null
https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/src/pair.ml
ocaml
* The product of the domains and languages of 2 sub - logics . module Make (L1 : Logic.T) (L2 : Logic.T) = struct include Logic.Default type t = L1.t * L2.t let isvalue (x1,x2) = L1.isvalue x1 & L2.isvalue x2 let top () = L1.top (), L2.top () let entails (x1,x2) (y1,y2) = L1.entails x1 y1 & L...
39185c8ca3f4264ba9fcb6b854f1a785ff9dff928ed28f1dcaca71ab3837ab6e
polyfy/polylith
cant_execute_test_test.clj
(ns polylith.clj.core.command.cmd-validator.cant-execute-test-test (:require [clojure.test :refer :all] [polylith.clj.core.command.cmd-validator.executable :as executable])) (deftest when-executed-outside-the-workspace (is (= true (executable/cant-execute-test? nil "test" nil false)))) (defte...
null
https://raw.githubusercontent.com/polyfy/polylith/76936c752fb5b729c216b23d92c8a8d71cfdc92f/components/command/test/polylith/clj/core/command/cmd_validator/cant_execute_test_test.clj
clojure
(ns polylith.clj.core.command.cmd-validator.cant-execute-test-test (:require [clojure.test :refer :all] [polylith.clj.core.command.cmd-validator.executable :as executable])) (deftest when-executed-outside-the-workspace (is (= true (executable/cant-execute-test? nil "test" nil false)))) (defte...
dce0db149cf834f3bd8e5220082e6b8152a30289789de44f44f47ed486b43eab
thheller/shadow-grove
server.clj
(ns shadow.grove.server (:require [clojure.spec.alpha :as s]) (:import [java.io StringWriter])) (s/def ::defc-args (s/cat :comp-name simple-symbol? :docstring (s/? string?) :opts (s/? map?) FIXME : core.specs for destructure help :hook-bindings vector? :body (s/* any?))) (s/fdef defc :args...
null
https://raw.githubusercontent.com/thheller/shadow-grove/2398f30b89aadd38f1c18081b9290bacf5f7d0e0/src/main/shadow/grove/server.clj
clojure
FIXME: html encode FIXME: properly encode k/v
(ns shadow.grove.server (:require [clojure.spec.alpha :as s]) (:import [java.io StringWriter])) (s/def ::defc-args (s/cat :comp-name simple-symbol? :docstring (s/? string?) :opts (s/? map?) FIXME : core.specs for destructure help :hook-bindings vector? :body (s/* any?))) (s/fdef defc :args...
466e548f8840c15237410fb829c174277aa7aede5613546315de64ab6cc86436
ocamllabs/ocaml-effects
includemod.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/typing/includemod.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Misc open Path open Typedtree ope...
0b9ad75c571610210ca9925ba58d74550840f073cc69f407af5e62f19bf0b48e
zxymike93/SICP
118.rkt
#lang sicp (define (double n) (+ n n)) (define (halve n) (/ n 2)) (define (even? n) (= (remainder n 2) 0)) * even : p + 2a * ;; odd: (p+a) + a * (b-1) 计算结果记录在 p 里面 (define (* a b) (define (iter product a b) (cond [(= b 0) product] [(even? b) (iter product (double a) (halve b))] ...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter1/118.rkt
racket
odd: (p+a) + a * (b-1) tests
#lang sicp (define (double n) (+ n n)) (define (halve n) (/ n 2)) (define (even? n) (= (remainder n 2) 0)) * even : p + 2a * 计算结果记录在 p 里面 (define (* a b) (define (iter product a b) (cond [(= b 0) product] [(even? b) (iter product (double a) (halve b))] [(odd? b) (iter (+ prod...
bc70180513c792324dc053d8c2cf74b2598e303659a2c051001f8cf2ec61d61f
deadcode/Learning-CL--David-Touretzky
13.1.lisp
(defun subprop (sym elem prop) (setf (get sym prop) (delete elem (get sym prop)))) (let ((test1 '(setf (get 'alpha 'fooprop) '(a b c d e))) (test2 '(subprop 'alpha 'd 'fooprop)) (test3 '(get 'alpha 'fooprop))) (format t "~&~s = ~s" test3 (eval test3)) (format t "~&Setting: ~s" test1) (eval ...
null
https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%2013/13.1.lisp
lisp
(defun subprop (sym elem prop) (setf (get sym prop) (delete elem (get sym prop)))) (let ((test1 '(setf (get 'alpha 'fooprop) '(a b c d e))) (test2 '(subprop 'alpha 'd 'fooprop)) (test3 '(get 'alpha 'fooprop))) (format t "~&~s = ~s" test3 (eval test3)) (format t "~&Setting: ~s" test1) (eval ...
c2ee54ab521cf7e85ead84808b3162cce775b074b9918712b1db7710d6adb1c2
fumieval/yojijukugo
Logic.hs
# LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Logic ( Library(..) , Character(..) , Jukugo(..) , Scoreboard , Board(..) , Position , swap , generateBoard , checkFinish , newLibrary , prop_no_stuck) where import Control.Lens hiding (Prefixed) impor...
null
https://raw.githubusercontent.com/fumieval/yojijukugo/c1125ca95f3892f7fe72b6a20c9ba0f66869d0fd/src/Logic.hs
haskell
XXX 完成した熟語には触れないようにする | 難易度で重みづけ、四字熟語のインデックスを返す pick a candidate reject if it can be created from the existing set 色即是空 空即是色
# LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Logic ( Library(..) , Character(..) , Jukugo(..) , Scoreboard , Board(..) , Position , swap , generateBoard , checkFinish , newLibrary , prop_no_stuck) where import Control.Lens hiding (Prefixed) impor...
28280da500b24604918fca237b4d5e6149b7f0f1f674a0796c8a6c4628c4ec81
2600hz/kazoo
kz_globals_pqc.erl
%%%----------------------------------------------------------------------------- ( C ) 2011 - 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_globals/test/kz_globals_pqc.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- test helpers Local Node State Changes Local Node Changes
( C ) 2011 - 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(kz_globals_pqc). -ifdef(PROPER). -include_lib("proper/include/proper.hrl"). -behaviour(proper_statem). ...
6f129e0a3fc71fb60552cdb452f846b7037048df8014f15b28a0470ac54c38be
grin-compiler/ghc-wpc-sample-programs
extract-changes.hs
#!/usr/bin/env stack -- stack --stack-yaml=stack.yaml runghc --package pandoc-types -- Extract changes from latest version in changelog. import Text.Pandoc.JSON main = toJSONFilter extractFirst extractFirst :: Pandoc -> Pandoc extractFirst (Pandoc meta bs) = let bs' = dropWhile (not . isSubhead) bs in Pandoc me...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/tools/extract-changes.hs
haskell
stack --stack-yaml=stack.yaml runghc --package pandoc-types Extract changes from latest version in changelog.
#!/usr/bin/env stack import Text.Pandoc.JSON main = toJSONFilter extractFirst extractFirst :: Pandoc -> Pandoc extractFirst (Pandoc meta bs) = let bs' = dropWhile (not . isSubhead) bs in Pandoc meta (takeWhile (not . isSubhead) (drop 1 bs')) isSubhead (Header 2 _ _) = True isSubhead _ = False
280016e4538df87cc3f88e69c51edb596538b194d99593db4a6d420321974dd1
HugoPeters1024/hs-sleuth
FoldLines.hs
-- | Read a file line-by-line using handles, and perform a fold over the lines. -- The fold is used here to calculate the number of lines in the file. -- -- Tested in this benchmark: -- * Buffered , line - based IO -- {-# LANGUAGE BangPatterns #-} module Benchmarks.FoldLines ( benchmark ) where import Criter...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.3.2/benchmarks/haskell/Benchmarks/FoldLines.hs
haskell
| Read a file line-by-line using handles, and perform a fold over the lines. The fold is used here to calculate the number of lines in the file. Tested in this benchmark: # LANGUAGE BangPatterns # | Text line fold | ByteString line fold
* Buffered , line - based IO module Benchmarks.FoldLines ( benchmark ) where import Criterion (Benchmark, bgroup, bench, whnfIO) import System.IO import qualified Data.ByteString as B import qualified Data.Text as T import qualified Data.Text.IO as T benchmark :: FilePath -> IO Benchmark benchmark fp = retu...
e7f73f18d63400cbc4df7444b0f4d56cb46f0534bbe09a0a245d6f683d54dec4
philipcmonk/phlisped
write-to-file.rkt
#lang racket (require "../core/common.rkt") (require "../core/extractdata.rkt") (require "../core/gnode.rkt") (provide data) (define (write-g-to-file event) (graph->file G)) (define data (list '(f2 write w) write-g-to-file))
null
https://raw.githubusercontent.com/philipcmonk/phlisped/ded1be5d9e7206cd3c71db49ccd250fa4381cf99/commands/write-to-file.rkt
racket
#lang racket (require "../core/common.rkt") (require "../core/extractdata.rkt") (require "../core/gnode.rkt") (provide data) (define (write-g-to-file event) (graph->file G)) (define data (list '(f2 write w) write-g-to-file))
1ed278a86f257ddea3a036a62a50b96ece23520fa1a1c2456e567ca807f4acae
svenpanne/EOPL3
exercise-3-20.rkt
#lang eopl ; ------------------------------------------------------------------------------ Exercise 3.20 ; let sum = proc(x) proc(y) -(x,-(0,y)) in ( ( sum 10 ) 3 )
null
https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter3/exercise-3-20.rkt
racket
------------------------------------------------------------------------------ let sum = proc(x) proc(y) -(x,-(0,y))
#lang eopl Exercise 3.20 in ( ( sum 10 ) 3 )
429e54599dd403e2c8b87ed1a038942622d737f48f3911d5733b040a4ed05015
weldr/bdcs
Depsolve.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # -- | -- Module: BDCS.Depsolve Copyright : ( c ) 2016 - 2017 Red Hat , Inc. -- License: LGPL -- Maintainer : -- Stability: alpha -- Portability: portable -- -- Manage 'Builds' records in the database. module BDCS.Depsolve(Formula(..), CNFLiteral(...
null
https://raw.githubusercontent.com/weldr/bdcs/cf360c3240644b4847336b9d58b2067f3aa1ec50/src/BDCS/Depsolve.hs
haskell
| Module: BDCS.Depsolve License: LGPL Stability: alpha Portability: portable Manage 'Builds' records in the database. export private symbols for testing A logical proposition in negation normal form (i.e., NOT is applied only to atoms, not sub-formulas) Conjunctive Normal Form (CNF) is, essentially, and AND...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # Copyright : ( c ) 2016 - 2017 Red Hat , Inc. Maintainer : module BDCS.Depsolve(Formula(..), CNFLiteral(..), CNFAtom(..), CNFFormula, DepAssignment, formulaToCNF,...
81a42c1131caec7acda14f360b11c8c9f4dfffc05b22def6bc5f94b8d25e69af
jakemcc/sicp-study
2_23.clj
Exercise 2.23 ; for-each is a procedure which takes a list and procedure ; as arguments. The procedure is applied for each element ; in the list. Nothing is done with return values. ; ; Implement for-each Not sure if I like how this handles emtpy lists (defn for-each [p l] (letfn [(iter [x xs] (p ...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section2.2/2_23.clj
clojure
for-each is a procedure which takes a list and procedure as arguments. The procedure is applied for each element in the list. Nothing is done with return values. Implement for-each
Exercise 2.23 Not sure if I like how this handles emtpy lists (defn for-each [p l] (letfn [(iter [x xs] (p x) (if (empty? xs) true (recur (first xs) (rest xs))))] (iter (first l) (rest l)))) (for-each (fn [x] (println x)) (list 57 321 88)) (for-each (fn [x...
5db9ffed3f0fc8ad369b4b401c863fafb3c8c79fa398f67b0801137439c67554
bennn/dissertation
unix.rkt
#lang racket/base (require racket/file racket/match racket/path racket/string "env.rkt") (provide detect-tzid/unix) (define (detect-tzid/unix zoneinfo-dir default-zoneinfo-dir all-tzids) (or (tzid-from-env) (and zoneinfo-dir (tzid-from-/etc/localtime zoneinfo-di...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/gregor/base/tzinfo/private/os/unix.rkt
racket
#lang racket/base (require racket/file racket/match racket/path racket/string "env.rkt") (provide detect-tzid/unix) (define (detect-tzid/unix zoneinfo-dir default-zoneinfo-dir all-tzids) (or (tzid-from-env) (and zoneinfo-dir (tzid-from-/etc/localtime zoneinfo-di...
7ce2eb52ef476ffe006916ee07e2411f7235143573bc227b93771585b49aff4b
hexlet-boilerplates/sicp-racket
info.rkt
#lang info (define name "sicp-racket-boilerplate") #| (define blurb |# #| (list '(p "Write RESTful web apps in Racket."))) |# #| (define release-notes |# #| (list '(ul (li "Support for serve/servlet args") |# #| (li "Customizable response handlers")))) |# #| (define primary-file "main.rkt") |# #| (...
null
https://raw.githubusercontent.com/hexlet-boilerplates/sicp-racket/c3af61fbdf318c00641429f9e29fe155c677bf44/info.rkt
racket
(define blurb (list '(p "Write RESTful web apps in Racket."))) (define release-notes (list '(ul (li "Support for serve/servlet args") (li "Customizable response handlers")))) (define primary-file "main.rkt") (define categories '(net)) (define repositories (list "4.x"))
#lang info (define name "sicp-racket-boilerplate") (define homepage "-racket-boilerplate") ( define version " 1.3 " ) ( define required - core - version " 5.2 " )
8f83657738f1881da09194ed5445e378f06107b3472e46cd8f615f4a6fa10d2d
gethop-dev/hop-cli
util.clj
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 / (ns hop-cli.util (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.walk :as walk])) (defn cli-stdi...
null
https://raw.githubusercontent.com/gethop-dev/hop-cli/480c288c52f1f6884f390c723d2163981b827ea1/src/hop_cli/util.clj
clojure
file, You can obtain one at / NOTE: for testing during development.
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 (ns hop-cli.util (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.walk :as walk])) (defn cli-stdin-map->map [stdin-parameters] ...
a3c78b4600abd7a140a69b7ad5bda5c144737e6563bcc197cb2439fc6bc241c3
graphql-erlang/graphql
graphql_type_schema.erl
-module(graphql_type_schema). %% API -export([ new/1, new/2 ]). -type t() :: #{ query => map(), mutation => map() | null }. -spec new(map()) -> t(). new(Schema) -> new(Schema, true). -spec new(map(), boolean()) -> t(). new(Schema, InjectIntrospection) -> Query = case {maps:get(query, Schema, null), InjectI...
null
https://raw.githubusercontent.com/graphql-erlang/graphql/feef75d955e3404c3c8e4500b1e2c4d4821c1dc6/src/types/graphql_type_schema.erl
erlang
API
-module(graphql_type_schema). -export([ new/1, new/2 ]). -type t() :: #{ query => map(), mutation => map() | null }. -spec new(map()) -> t(). new(Schema) -> new(Schema, true). -spec new(map(), boolean()) -> t(). new(Schema, InjectIntrospection) -> Query = case {maps:get(query, Schema, null), InjectIntrospe...
f2c7adc41797de20965fc817b381e5710277b26ae17655b5d0cb89eff19829ca
RamV13/scrabble
ai_test.ml
open OUnit2 open Ai (* Functions that need to be thoroughly tested: * ------------------------------------------- * find_slots (DONE) * get_surroundings (DONE) * valid_chars (DONE) * makes_move (DONE) * makes_prefix (DONE) * out_of_bounds (DONE) * reverse_str (DONE) * find_anchors (DONE) * invalid_pos (DONE)...
null
https://raw.githubusercontent.com/RamV13/scrabble/07731680eaadf51c6b5cb3fc329056743f015215/server/ai_test.ml
ocaml
Functions that need to be thoroughly tested: * ------------------------------------------- * find_slots (DONE) * get_surroundings (DONE) * valid_chars (DONE) * makes_move (DONE) * makes_prefix (DONE) * out_of_bounds (DONE) * reverse_str (DONE) * find_anchors (DONE) * invalid_pos (DONE) * get_next (DONE) * ...
open OUnit2 open Ai let empty_board = Grid.empty let apple_board = [[None;None;None;None;None;None;None;None;None;None;None;None;None;None;None]; [None;None;None;None;None;None;None;None;None;None;None;None;None;None;None]; [None;None;None;None;None;None;None;None;None;None;None...
c5665424253bef739c45751eba091616bbfe4a86a70df5f0c5abf280cb67924a
tisnik/clojure-examples
main.clj
(ns main) (require '[time-utils :as t]) (require '[matrix :as m]) (defn -main [] (println "Hello world, the time is" (t/time-str (t/now))) (m/matrix-tests))
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/clojure9-project2/main/src/main.clj
clojure
(ns main) (require '[time-utils :as t]) (require '[matrix :as m]) (defn -main [] (println "Hello world, the time is" (t/time-str (t/now))) (m/matrix-tests))
424b074b5198670e10483c8735c0bc67963d4886ce300c329e2b727e05b17cd7
mfoemmel/erlang-otp
dets_v9.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2001 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/stdlib/src/dets_v9.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(dets_v9). Dets files , implement...
5971bfb74ea78aece03eea03e71205e9836726067b0f39ee04b59b08c08d11a1
rabbitmq/rabbitmq-management
rabbit_mgmt_wm_queues.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_wm_queues). -export([init/2,...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_queues.erl
erlang
-------------------------------------------------------------------- -------------------------------------------------------------------- Exported functions -------------------------------------------------------------------- Private helpers
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_wm_queues). -export([init/2, to_js...
27dcb07ae0057bf0b360453f8c10b9d96eb6a9ae1ca4f397e24ba3badd4b70af
elldritch/hipsterfy
UpdateUser.hs
module Hipsterfy.Jobs.UpdateUser ( handleUpdateUser, enqueueUpdateUser, forceEnqueueUpdateUser, updateUserQueue, ) where import qualified Control.Monad.Parallel as Parallel (mapM_) import Control.Monad.Parallel (MonadParallel (..)) import Data.Aeson (FromJSON, ToJSON) import Faktory.Job (perform, queue...
null
https://raw.githubusercontent.com/elldritch/hipsterfy/7d455697c1146d89fc6b2f78effe6694efe69120/src/Hipsterfy/Jobs/UpdateUser.hs
haskell
Get user. Get artists. TODO: how do we make this streaming? As soon as new artists come in, we want to immediately insert and enqueue their update jobs, rather than waiting for the whole batch to finish. Create artists. Update followed artists. Set the update status.
module Hipsterfy.Jobs.UpdateUser ( handleUpdateUser, enqueueUpdateUser, forceEnqueueUpdateUser, updateUserQueue, ) where import qualified Control.Monad.Parallel as Parallel (mapM_) import Control.Monad.Parallel (MonadParallel (..)) import Data.Aeson (FromJSON, ToJSON) import Faktory.Job (perform, queue...
5c580a843d5de3c7d0b0134dd518bd522cc96b6a572422f21484618a421a39f8
brawnski/git-annex
DropUnused.hs
git - annex command - - Copyright 2010 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2010 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.DropUnused where import Control.Monad.State (liftIO) import qualified Data.Map as M import Syst...
null
https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Command/DropUnused.hs
haskell
Read unused logs once, and pass the maps to each start action. force drop
git - annex command - - Copyright 2010 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2010 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.DropUnused where import Control.Monad.State (liftIO) import qualified Data.Map as M import Syst...
34d06b1a601f34bab581e4d2c4e3e5937066047d881366833770e12cf7198a2d
gsakkas/rite
3136.ml
let l1 = [0; 0; 9; 9];; let l2 = [1; 0; 0; 2];; let x = (3, 3) :: (List.rev (List.combine l1 l2));; let clone x n = let rec helper x n acc = if n <= 0 then acc else helper x (n - 1) (x :: acc) in helper x n [];; let padZero l1 l2 = if (List.length l1) < (List.length l2) then ((List.append (clone 0 ((Li...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/3136.ml
ocaml
let l1 = [0; 0; 9; 9];; let l2 = [1; 0; 0; 2];; let x = (3, 3) :: (List.rev (List.combine l1 l2));; let clone x n = let rec helper x n acc = if n <= 0 then acc else helper x (n - 1) (x :: acc) in helper x n [];; let padZero l1 l2 = if (List.length l1) < (List.length l2) then ((List.append (clone 0 ((Li...
c037e37073c432a15530eb7641a17d87bc9524594ff67042fed7c8da526adf66
amir343/avlang
avl_anno.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2015 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/amir343/avlang/36b14f476327c38d7fb75a787e1e8fd89f25919e/src/avl_anno.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2015 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(avl_anno). -export([new/1, is_anno/1]). -export([column/1, end_location/1, file/1, generated/1, li...
f7de798f86778be9c6722a9e75fa74b8d297823db3d90efe3aac363c8ebbe5f4
ultralisp/ultralisp
moderator.lisp
(defpackage #:ultralisp/models/moderator (:use #:cl) (:import-from #:reblocks-auth/models #:user #:get-email #:get-nickname) (:import-from #:ultralisp/models/project #:project) (:import-from #:mito #:dao-table-class) (:import-from...
null
https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/models/moderator.lisp
lisp
(defpackage #:ultralisp/models/moderator (:use #:cl) (:import-from #:reblocks-auth/models #:user #:get-email #:get-nickname) (:import-from #:ultralisp/models/project #:project) (:import-from #:mito #:dao-table-class) (:import-from...
797b295e5b8a56ea056a2311d4ea4bd8758d12ce16e86b22a6a57b39c4027cb6
camlspotter/ocamloscope.2
ocamldoc.mli
* Tools for Docstrings , aka OCamlDoc comments val get_doc : Typedtree.attributes -> (string * Location.t) list (** Extract Docstrings from attributes *) val extract_structure : Typedtree.structure -> (string * Location.t) list (** Extract Docstrings from structure *) val extract_signature : Typedtree.signature ->...
null
https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/ocamldoc.mli
ocaml
* Extract Docstrings from attributes * Extract Docstrings from structure * Extract Docstrings from signature
* Tools for Docstrings , aka OCamlDoc comments val get_doc : Typedtree.attributes -> (string * Location.t) list val extract_structure : Typedtree.structure -> (string * Location.t) list val extract_signature : Typedtree.signature -> (string * Location.t) list module DocSet : Set.S with type elt = (string * Locati...
b798fcb5dcb410653e504451e8266b4bafe6517208debaf656a5e5b7fc295396
rowangithub/DOrder
invmine.ml
let transl_samples samples tbl = try List.map (fun sample -> List.map (fun (name, value) -> (Hashtbl.find tbl name, Predicate.PInt value)) sample ) samples with _ -> assert false let genTemplate plains coeffs ds flag = if flag then let d = Predicate.Var (Path.mk_ident "d") in let _ = Hashtbl.replace ds d...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/invmine.ml
ocaml
* Try to return all solutions dranges must be no less than 0 * Go to the constraint solving system And we want to bound the constants that appears in the template Post-condition requires the existence ofr 'r' let _ = Format.fprintf Format.std_formatter "enforcements = %a@." Predicate.pprint enforcements in G...
let transl_samples samples tbl = try List.map (fun sample -> List.map (fun (name, value) -> (Hashtbl.find tbl name, Predicate.PInt value)) sample ) samples with _ -> assert false let genTemplate plains coeffs ds flag = if flag then let d = Predicate.Var (Path.mk_ident "d") in let _ = Hashtbl.replace ds d...
6b8ebd3ccbcb2a0b18f456e355c4bdc8acfeb8ddb786e4a5660378b666475030
startalkIM/ejabberd
brod_group_subscriber.erl
%%% Copyright ( c ) 2016 - 2017 Klarna AB %%% 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 ...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/brod/src/brod_group_subscriber.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 g...
Copyright ( c ) 2016 - 2017 Klarna AB Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , ( poller ) and calls the user - defined callback functions for message 1 . Start a consumer group coordinator to manage the c...
8baadbc4fc5e10107494141d73a496e68869288bb37ecb4619475ac46f33fffb
darioteixeira/ccss
ccss.ml
(********************************************************************************) Ccss.ml Copyright ( c ) 2010 - 2022 < > This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free ...
null
https://raw.githubusercontent.com/darioteixeira/ccss/c946d19bc3c0b4e1d1bda095ddfd392869c60e55/src/ccss.ml
ocaml
****************************************************************************** ****************************************************************************** ****************************************************************************** ****************************************************************************** ****...
Ccss.ml Copyright ( c ) 2010 - 2022 < > This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation , with the special exception on linking described in the ...
fb1f5f6b3a3370406c16191a01a25d34cca468a75b41644c26a09319da608247
junjihashimoto/hspec-server
CommandStatus.hs
module Test.Hspec.Server.CommandStatus ( CommandStatus , exit , stdout , stderr , getStdout , getStderr , command ) where import System.Exit import Control.Monad.IO.Class import Data.Monoid import Test.Hspec.Server.Core import Test.Hspec.Server.Util import qualified Data.Set as S type CommandStatus = S.Set CommandS...
null
https://raw.githubusercontent.com/junjihashimoto/hspec-server/473058fa4ca17abbe110d9f273d3c6726d5f1365/Test/Hspec/Server/CommandStatus.hs
haskell
module Test.Hspec.Server.CommandStatus ( CommandStatus , exit , stdout , stderr , getStdout , getStderr , command ) where import System.Exit import Control.Monad.IO.Class import Data.Monoid import Test.Hspec.Server.Core import Test.Hspec.Server.Util import qualified Data.Set as S type CommandStatus = S.Set CommandS...
bef8bda8bd19da92072573dd1d3c16c2744652418a404f2c5b14ad5008b89ae1
otherjoel/splitflap
info.rkt
#lang info (define collection "splitflap") (define version "1.2") (define deps '(["base" #:version "8.1"] "gregor-lib")) (define compile-omit-paths '("private/build.rkt")) (define pkg-desc "implementation part of \"splitflap\"") (define license 'BlueOak-1.0.0)
null
https://raw.githubusercontent.com/otherjoel/splitflap/a48bb18ac4b21a7d97ba8a7ba1827403bd5f8537/splitflap-lib/info.rkt
racket
#lang info (define collection "splitflap") (define version "1.2") (define deps '(["base" #:version "8.1"] "gregor-lib")) (define compile-omit-paths '("private/build.rkt")) (define pkg-desc "implementation part of \"splitflap\"") (define license 'BlueOak-1.0.0)
b5066d96dbfbf075d132ecdcd132a96109d4ede381ff4a94b537008b36bfe3f5
tonyg/kali-scheme
loophole.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . (define-syntax loophole (syntax-rules () ((loophole ?type ?form) (begin (lambda () ?type) ;Elicit unbound-variable warnings, etc. ?form))))
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/alt/loophole.scm
scheme
Elicit unbound-variable warnings, etc.
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . (define-syntax loophole (syntax-rules () ((loophole ?type ?form) ?form))))
813b05022be76eb048e3f61859df7b50115decb422b6fff8d797c78fd3f53fd4
tomjridge/imp_fs
imp_disk_ops.ml
(** Interface to the block device; currently backed by single fd *) open Imp_pervasives open Tjr_btree.Disk_on_fd open Tjr_btree.Disk_ops open Tjr_btree.Base_types open Imp_state let with_world = Tjr_monad.State_passing_instance.with_world let fd_ops = { get=(fun () -> with_world (fun t -> t.fd,t)); set=(fun fd...
null
https://raw.githubusercontent.com/tomjridge/imp_fs/ba86e8e9204c59b18f041bf21332a2a4846ae20b/_src_TODO/a_base/imp_disk_ops.ml
ocaml
* Interface to the block device; currently backed by single fd FIXME do we want to specialize the monad? from the above it looks like we have already specialized to state passing monad
open Imp_pervasives open Tjr_btree.Disk_on_fd open Tjr_btree.Disk_ops open Tjr_btree.Base_types open Imp_state let with_world = Tjr_monad.State_passing_instance.with_world let fd_ops = { get=(fun () -> with_world (fun t -> t.fd,t)); set=(fun fd -> failwith "Don't use!"); } let disk_ops : 't block_device = T...
de46563a5145252a565673731dbbc67d103ca69f4010408b8e9ec733665b983d
HunterYIboHu/htdp2-solution
ex516-changed-undeclareds.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex516-changed-undeclareds) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t co...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter6/Section33/ex516-changed-undeclareds.rkt
racket
about the language level of this file in a form that our tools can easily process. definitions - a Symbol data examples functions Lam -> Lam replace all symbols s in le with '*undeclared if they do not occur within the body of a λ expression whose parameter is s path from le0 to le. Lam -> Lam replace all...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex516-changed-undeclareds) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) A is one of : - ( list ' λ ( l...
60c9e9648582f73cdf05df57d1fce53e32892a4c1cdcbcf38c736a2d861bb32a
jarvinet/scheme
section23.scm
Structure and Interpretation of Computer Programs , 1st edition ;------------------------------------------------------------- This code is from the second edition of the book section 2.3.1 K (define (add-complex z1 z2) (make-from-real-imag (+ (real-part z1) (real-part z2)) (+ (ima...
null
https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/Book/Edition1/section23.scm
scheme
------------------------------------------------------------- Constructors for complex numbers
Structure and Interpretation of Computer Programs , 1st edition This code is from the second edition of the book section 2.3.1 K (define (add-complex z1 z2) (make-from-real-imag (+ (real-part z1) (real-part z2)) (+ (imag-part z1) (imag-part z2)))) (define (sub-complex z1 z2) (ma...
11b2eb3c03f617f85b128baf85ac78a416c1b702dfdb04922a4d5355b1e198a8
ocheron/cryptostore
Instances.hs
{-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # -- | Orphan instances. module CMS.Instances ( arbitraryPassword , arbitraryAttributes , arbitraryIntegrityDigest , arbitrarySigVer , arbitraryEnvDev ) where import Data.ASN1.Types import qualified Data.ByteArray ...
null
https://raw.githubusercontent.com/ocheron/cryptostore/a9c5ad06bdc4197663ba933b0a62c3c33cf92a17/tests/CMS/Instances.hs
haskell
# LANGUAGE OverloadedStrings # | Orphan instances. key wrapping in PWRIKEK is incompatible with CTR mode so we must never generate this combination
# OPTIONS_GHC -fno - warn - orphans # module CMS.Instances ( arbitraryPassword , arbitraryAttributes , arbitraryIntegrityDigest , arbitrarySigVer , arbitraryEnvDev ) where import Data.ASN1.Types import qualified Data.ByteArray as B import Data.ByteString (ByteString) import ...
7f6cde88b518acc25c874170c6f436c68effee8f0db0f6acb58968d7dd089425
haskell-compat/base-compat
Batteries.hs
{-# LANGUAGE PackageImports #-} # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # -- | Reexports "Foreign.Marshal.Utils.Compat" -- from a globally unique namespace. module Foreign.Marshal.Utils.Compat.Repl.Batteries ( module Foreign.Marshal.Utils.Compat ) where import "this" Foreign.Marshal...
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Foreign/Marshal/Utils/Compat/Repl/Batteries.hs
haskell
# LANGUAGE PackageImports # | Reexports "Foreign.Marshal.Utils.Compat" from a globally unique namespace.
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # module Foreign.Marshal.Utils.Compat.Repl.Batteries ( module Foreign.Marshal.Utils.Compat ) where import "this" Foreign.Marshal.Utils.Compat
8a4bc1f8e9083fa726321aca42a2fd091d8f85692f4b8fd469e93d8bef5a5d58
JoelSanchez/ventas
menu.clj
(ns ventas.entities.menu (:require [ventas.database.entity :as entity] [ventas.entities.i18n :as entities.i18n] [ventas.utils :as utils] [ventas.database.generators :as generators] [clojure.spec.alpha :as spec])) (spec/def :menu/name ::entities.i18n/ref) (spec/def :menu/items (spec/with-gen ::entit...
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/entities/menu.clj
clojure
(ns ventas.entities.menu (:require [ventas.database.entity :as entity] [ventas.entities.i18n :as entities.i18n] [ventas.utils :as utils] [ventas.database.generators :as generators] [clojure.spec.alpha :as spec])) (spec/def :menu/name ::entities.i18n/ref) (spec/def :menu/items (spec/with-gen ::entit...
9f4f225f592dacf73f313dc6ef528c01c647818fb09016f89cefd7438eec3226
jimrthy/frereth
web.clj
(ns frewreb.web (:require [compojure.handler :as handler] [frewreb.router :as r] [frewreb.system :as s])) (defn make-handler "Main app entry point that gets called during reset (aka reload-frodo!)" [] (throw (RuntimeException. "Pretty sure this is obsolete")) (handler/api (r/all-route...
null
https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/frewreb/src/clj/frewreb/web.clj
clojure
(ns frewreb.web (:require [compojure.handler :as handler] [frewreb.router :as r] [frewreb.system :as s])) (defn make-handler "Main app entry point that gets called during reset (aka reload-frodo!)" [] (throw (RuntimeException. "Pretty sure this is obsolete")) (handler/api (r/all-route...
2404ed7ca92d435962fbc289ed6b6f5cd137bd700f59a72c27ed9ffd7294dc39
LdBeth/keim
literal.lisp
-*- Syntax : Common - Lisp ; Package : KEIM ; Base : 10 ; Mode : LISP -*- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Copyright ( C ) 1993 by AG Siekmann , , ; ; Universitaet des Sa...
null
https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/resolution/literal.lisp
lisp
Package : KEIM ; Base : 10 ; Mode : LISP -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ; ; All rights reserved. ;; For information about this program...
(IN-PACKAGE "KEIM") (mod~defmod lit :uses (appl env fo keim mod pos post term termc top ) :documentation "Abstract datatype for literals." :exports ( lit+literal lit~literal-create lit~literal-p lit~clause lit~set-clause! lit~positive-p lit~set-polari...
52ff0b9c21d8b3b2b8cd2d5809b1bc328a900c349d90f5e375e0ba7a69d649d4
input-output-hk/cardano-ledger-byron
Json.hs
# LANGUAGE TemplateHaskell # module Test.Cardano.Crypto.Json ( tests ) where import Cardano.Prelude import Test.Cardano.Prelude import Hedgehog (Property) import qualified Hedgehog as H import Test.Cardano.Crypto.Example ( exampleProtocolMagic3 , exampleProtocolMagic4 ) ----------------------------------...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/crypto/test/Test/Cardano/Crypto/Json.hs
haskell
------------------------------------------------------------------------------ ProtocolMagic ------------------------------------------------------------------------------ Legacy JSON encoding where requiresNetworkMagic was encoded as "NMMustBeNothing" or "NMMustBeJust"
# LANGUAGE TemplateHaskell # module Test.Cardano.Crypto.Json ( tests ) where import Cardano.Prelude import Test.Cardano.Prelude import Hedgehog (Property) import qualified Hedgehog as H import Test.Cardano.Crypto.Example ( exampleProtocolMagic3 , exampleProtocolMagic4 ) goldenProtocolMagic3AesonDec_NMM...
aaf2eef1b62dd948fe519c5f12ba539dc077b5d66044a1d0fa54a3b759e92bcb
ml-in-barcelona/server-reason-react
rescript-jsx-v4.ml
open Ast_helper open Ast_mapper open Asttypes open Parsetree open Longident type jsxConfig = { mutable version : int ; mutable module_ : string ; mutable mode : string ; mutable nestedModules : string list ; mutable hasReactComponent : bool } let getPayloadFields payload = match payload with | PStr ...
null
https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/02950c3028b994efe7291e747b5ec29f0d150d1f/arch/rescript-jsx-v4.ml
ocaml
Helper method to look up the [@react.component] attribute Iterate over the attributes and try to find the [@react.component] attribute if children is a list, convert it to an array while mapping each element. If not, just map over it, as usual no children provided? Place a placeholder list Helper method to fil...
open Ast_helper open Ast_mapper open Asttypes open Parsetree open Longident type jsxConfig = { mutable version : int ; mutable module_ : string ; mutable mode : string ; mutable nestedModules : string list ; mutable hasReactComponent : bool } let getPayloadFields payload = match payload with | PStr ...
7c6381b39bb4cb24ddf901e19cc40ef1ff452e2c8ee6fb10bee73d6b10aa317f
futurice/haskell-futurice-prelude
Orphans.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveLift #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MultiP...
null
https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/0e31a26c7ad23d88ba79dd2d89dca1507c6aa7ef/src/Futurice/Orphans.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveLift # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeOperators # # LAN...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # #if __GLASGOW_HASKELL__ >= 800 a ) THQ works on cross - compilers a...
a2eeac18105d73f2f873536fa4f5d367e8eb6c4658218a37f36625b2336ff52b
coq/coq
arguments_renaming.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/b35628733a0131a9cc648793c1e33e222d7958c5/pretyping/arguments_renaming.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
d7348417b95f22b2e96c536e901776236ddcaf93459bbf5827c4fd23882a6ff2
halgari/odin
spec.clj
(ns com.tbaldridge.odin.contexts.spec (:require [clojure.spec :as s] [com.tbaldridge.odin.contexts.data :as d] [com.tbaldridge.odin :as o])) (s/def ::name-spec-pair (s/cat ::name keyword? ::spec any?)) (s/def ::or-spec (s/cat ...
null
https://raw.githubusercontent.com/halgari/odin/cd2c02a7e53dbc9b3a23a40598e2c326f14d8398/src/com/tbaldridge/odin/contexts/spec.clj
clojure
(ns com.tbaldridge.odin.contexts.spec (:require [clojure.spec :as s] [com.tbaldridge.odin.contexts.data :as d] [com.tbaldridge.odin :as o])) (s/def ::name-spec-pair (s/cat ::name keyword? ::spec any?)) (s/def ::or-spec (s/cat ...
dec73d0439855319ef26b7dacab4012d241b18999ee55a9a2152e3ab20c02198
chenyukang/eopl
environments.scm
(module environments (lib "eopl.ss" "eopl") (require "data-structures.scm") (require "store.scm") (provide init-env empty-env extend-env apply-env) ;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;; ;; init-env : () -> Env ;; (init-env) builds an environment in which: i is bound to a lo...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter4/implicit-refs/environments.scm
scheme
initial environment ;;;;;;;;;;;;;;;; init-env : () -> Env (init-env) builds an environment in which: environment constructors and observers ;;;;;;;;;;;;;;;; n : (maybe int) location : Sym * Listof(Sym) -> Maybe(Int) else (location sym syms) = #f
(module environments (lib "eopl.ss" "eopl") (require "data-structures.scm") (require "store.scm") (provide init-env empty-env extend-env apply-env) i is bound to a location containing the expressed value 1 , v is bound to a location containing the expressed value 5 , and x is bound to a l...
7c8df003da51175ddce04ad3abb8d9294f52b5995133b289d257dcabfc78ce29
xapi-project/xen-api
xapi_cluster_host.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/xapi_cluster_host.ml
ocaml
TODO: update allowed_operations on boot/toolstack-restart We can't fix _all_ of the prerequisites, as we can't automatically create an IP address. So what we do here is to at least plug the thing in and ensure it has disallow unplug set. parallel join: some hosts may not have an IP yet no clusters exist ...
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
db2127c48a13c61ca030cc6b053f27be221541457e87f667ed3c221b82731d8e
andreasabel/miniagda
SCTParser.hs
module SCTParser where import qualified Lexer as T import SCTSyntax -- parser produced by Happy Version 1.18.2 data HappyAbsSyn = HappyTerminal (T.Token) | HappyErrorToken Int | HappyAbsSyn4 (Defs) | HappyAbsSyn5 ([Def]) | HappyAbsSyn6 (Def) | HappyAbsSyn7 (LHS) ...
null
https://raw.githubusercontent.com/andreasabel/miniagda/140f14e523c07f89f95cfb9cf5b0d0b0c24cf69b/src/SCTParser.hs
haskell
parser produced by Happy Version 1.18.2 # LINE 1 "templates/GenericTemplate.hs" # # LINE 1 "templates/GenericTemplate.hs" # # LINE 1 "<built-in>" # # LINE 1 "<command line>" # # LINE 1 "templates/GenericTemplate.hs" # # LINE 28 "templates/GenericTemplate.hs" # # LINE 68 "templates/GenericTemplate.hs" # ---------------...
module SCTParser where import qualified Lexer as T import SCTSyntax data HappyAbsSyn = HappyTerminal (T.Token) | HappyErrorToken Int | HappyAbsSyn4 (Defs) | HappyAbsSyn5 ([Def]) | HappyAbsSyn6 (Def) | HappyAbsSyn7 (LHS) | HappyAbsSyn8 ([Param]) | HappyA...
1ec3b427f89731987144baa32315615824e213e6bc2914e7394bbbff6bb68826
essen/egs
egs_zones_sup.erl
@author < > 2011 . %% @doc Supervisor for the egs_zones gen_server. %% This file is part of EGS . %% EGS is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the %% Licens...
null
https://raw.githubusercontent.com/essen/egs/ceea04c3b438cee9a8470f2abc6297429bf347c5/apps/egs/src/egs_zones_sup.erl
erlang
@doc Supervisor for the egs_zones gen_server. License, or (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. API. supervisor. API. supervisor.
@author < > 2011 . This file is part of EGS . EGS is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the EGS is distributed in the hope that it will be useful , You ...
c6c5f3d660c7f5328f6057e8a75f153ce06dc4789e4d714d053aa51ece3e5b00
cirodrig/triolet
Type.hs
| Most type - related definitions are here . Some definitions that use Template Haskell have been moved into " Type . BuiltinVar " . Some definitions that use Template Haskell have been moved into "Type.BuiltinVar". -} # LANGUAGE FlexibleContexts , UndecidableInstances # # OPTIONS_GHC -no - auto # module Type.Typ...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Type/Type.hs
haskell
* Construction and deconstruction helper routines * Kinds * Pretty-printing | Create a type application | A type annotated with its base kind ----------------------------------------------------------------------------- Convenience functions for kinds | Convert a kind to a base kind. Raises an error if the argu...
| Most type - related definitions are here . Some definitions that use Template Haskell have been moved into " Type . BuiltinVar " . Some definitions that use Template Haskell have been moved into "Type.BuiltinVar". -} # LANGUAGE FlexibleContexts , UndecidableInstances # # OPTIONS_GHC -no - auto # module Type.Typ...
b641e8d443ef18aac40c841500a12cda983907fbef686d82c09b7b0a228fd4eb
aigarashi/copl-tools
pp.ml
open Format open Core let g = "TypingMLvi" let pr = fprintf let is_negative i = (i < 0) (* generic functions to generate parens depending on precedence *) let with_paren lt ppf_e e_up ppf e = let (<) = lt in if e < e_up then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e let (>) p_up p = match p_up, p with ...
null
https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/TypingML6/pp.ml
ocaml
generic functions to generate parens depending on precedence precedence for expressions if e is the left operand of e_up, do you need parentheses for e? mult associates stronger than plus, minus, lt, and cons plus and minus associates stronger than cons and lt cons associates to the right and stron...
open Format open Core let g = "TypingMLvi" let pr = fprintf let is_negative i = (i < 0) let with_paren lt ppf_e e_up ppf e = let (<) = lt in if e < e_up then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e let (>) p_up p = match p_up, p with CnstrPi(_,_), CnstrPii(_,_,_) -> true | CnstrPi(_,_), CnstrPiii(...
448287a81ee8b19393183488149a230ed4ce960cc34eba1fb3e4cf4629f24251
UBTECH-Walker/WalkerSimulationFor2020WAIC
CollisionDetectionState.lisp
; Auto-generated. Do not edit! (cl:in-package baxter_core_msgs-msg) // ! \htmlinclude (cl:defclass <CollisionDetectionState> (roslisp-msg-protocol:ros-message) ((header :reader header :initarg :header :type std_msgs-msg:Header :initform (cl:make-instance 'std_msgs-msg:Header)) (collision_stat...
null
https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/baxter_core_msgs/msg/CollisionDetectionState.lisp
lisp
Auto-generated. Do not edit!
(cl:in-package baxter_core_msgs-msg) // ! \htmlinclude (cl:defclass <CollisionDetectionState> (roslisp-msg-protocol:ros-message) ((header :reader header :initarg :header :type std_msgs-msg:Header :initform (cl:make-instance 'std_msgs-msg:Header)) (collision_state :reader collision_state ...
1b0798f24f396552a7a0155f125b36584ccb7ff5bfa071132824c4e8e7d97f97
eudoxia0/eco
compiler.lisp
;;; eco-template: The package where templates are compiled (defpackage eco-template (:use :cl) (:export :deftemplate :e)) (in-package :eco-template) (defun e (string) "Escape a string." (who:escape-string string)) (defmacro deftemplate (name args (&key (escape-html t)) &rest body) `(progn ...
null
https://raw.githubusercontent.com/eudoxia0/eco/0052f5e5d456f389fbfc4d1a92846217cf533285/src/compiler.lisp
lisp
eco-template: The package where templates are compiled
(defpackage eco-template (:use :cl) (:export :deftemplate :e)) (in-package :eco-template) (defun e (string) "Escape a string." (who:escape-string string)) (defmacro deftemplate (name args (&key (escape-html t)) &rest body) `(progn (defun ,name ,args (with-output-to-string (%eco-stre...
a8b010de80dacf8ef661cfe1f208f44083077f8fdb64b7c9dac3324a61286bc5
paurkedal/ocaml-prime
prime_accretion_map.ml
Copyright ( C ) 2015 - -2022 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-prime/14d27f45bed83a323a07de32cfd9d3327fe33643/lib/prime_accretion_map.ml
ocaml
Copyright ( C ) 2015 - -2022 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
501c2dc3c74bba20a2dabb64641a831cc87a30a0df7e3639e144d583d36aec90
typedclojure/typedclojure
recur_utils.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.checker/src/typed/cljc/checker/check/recur_utils.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns ^:no-doc typed.cljc.checker.check.recur-utils (:require [typed.cljc.checker.utils :as u] [typed.cljc.checker.type-rep :as r])) (u/def-type RecurTarget [dom rest drest kws] "A target for recur" [(every? r/Type? dom) ((some-fn nil? r/Type?) rest) (...
bc09acb1a6c951ba25cc32ac09109e5c252d1b279bac649e854bbcf09fc40cd2
macchiato-framework/macchiato-core
session_timeout.cljs
(ns macchiato.middleware.session.session-timeout) (defn- current-time [] (quot (.getTime (js/Date.)) 1000)) (defn wrap-idle-session-timeout "Middleware that times out idle sessions after a specified number of seconds. If a session is timed out, the timeout-response option is returned. This is usually a redire...
null
https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/src/macchiato/middleware/session/session_timeout.cljs
clojure
(ns macchiato.middleware.session.session-timeout) (defn- current-time [] (quot (.getTime (js/Date.)) 1000)) (defn wrap-idle-session-timeout "Middleware that times out idle sessions after a specified number of seconds. If a session is timed out, the timeout-response option is returned. This is usually a redire...
56d165f31edcf7c9f00fbaef89e82bd4e9b0676e903fc1469de82719868d9409
erikd/haskell-big-integer-experiment
multiply-split.hs
# LANGUAGE BangPatterns , CPP , MagicHash , NoImplicitPrelude , ScopedTypeVariables , Strict , UnboxedTuples # # OPTIONS_GHC -fno - warn - orphans # #include "MachDeps.h" import Prelude hiding (Integer) import Control.Monad (forM_, when) import GHC.Word (Word) import Test.Hspec import Test.Hspec.QuickCheck import Te...
null
https://raw.githubusercontent.com/erikd/haskell-big-integer-experiment/7841ec3fcc5be219fa16963849bd12137112f8a9/wip/multiply-split.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Stage 0. Stage1. Stage 2. ------------------------------------------------------------------------------
# LANGUAGE BangPatterns , CPP , MagicHash , NoImplicitPrelude , ScopedTypeVariables , Strict , UnboxedTuples # # OPTIONS_GHC -fno - warn - orphans # #include "MachDeps.h" import Prelude hiding (Integer) import Control.Monad (forM_, when) import GHC.Word (Word) import Test.Hspec import Test.Hspec.QuickCheck import Te...
8bb98e83f59e4809e22883121b76d3b29d36e8711f1ffe9d9c48076c728cb234
lspitzner/brittany
Test195.hs
instance MyClass Int where myMethod :: Int -> Int myMethod x = x + 1
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test195.hs
haskell
instance MyClass Int where myMethod :: Int -> Int myMethod x = x + 1
3a4415939f4da1768f5d522c890274663755b28cfcbcdf8983dc854e707ee3be
bazurbat/chicken-scheme
extras.scm
;;; extras.scm - Optional non-standard extensions ; Copyright ( c ) 2008 - 2016 , The CHICKEN Team Copyright ( c ) 2000 - 2007 , ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redist...
null
https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/extras.scm
scheme
extras.scm - Optional non-standard extensions All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and t...
Copyright ( c ) 2008 - 2016 , The CHICKEN Team Copyright ( c ) 2000 - 2007 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIM...
8da465cb91007d6cf7627c5b6876704a98c31be60db4a4dbaed4b4ce5fe723c9
mchaver/example-servant-partial-client
V1.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} module Models.V1 where import Data.Aeson import Data.Text import GHC.Generics data User = User { userIdent :: Text -- | a unique username/handler/persona. , name :: Text -- | the user's name, not required to be unique. , age :: Int -- |...
null
https://raw.githubusercontent.com/mchaver/example-servant-partial-client/f19bf6b091673a3e6834cb7bc1491a238603ed87/src/Models/V1.hs
haskell
# LANGUAGE OverloadedStrings # | a unique username/handler/persona. | the user's name, not required to be unique. | the user's age.
# LANGUAGE DeriveGeneric # module Models.V1 where import Data.Aeson import Data.Text import GHC.Generics data User = User { } deriving (Eq,Show,Generic) instance ToJSON User instance FromJSON User
2537eb111f77409192cce07626e0abdc8e6006f6114af6cb4541ceb1f2800d17
nikodemus/fsdb
file-locks.lisp
; -*- mode: lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Read-write locks ;;; (in-package :fsdb) (defvar *file-locks-lock* (make-lock "*file-locks-lock*")) (defvar *file-locks* (make-hash-table :test 'equal)) (defun clear-file-locks () (clrhash *file-locks*)) ;(add...
null
https://raw.githubusercontent.com/nikodemus/fsdb/a364eb90fbff8f1e8cd2194c4996955b0b01680f/src/file-locks.lisp
lisp
-*- mode: lisp -*- Read-write locks (add-startup-function 'clear-file-locks) 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,...
(in-package :fsdb) (defvar *file-locks-lock* (make-lock "*file-locks-lock*")) (defvar *file-locks* (make-hash-table :test 'equal)) (defun clear-file-locks () (clrhash *file-locks*)) (defclass file-lock () ((syslock :initarg :syslock :accessor lock-syslock) (filename :initarg :filename ...
9d82b7f15ad7f957b0bfa66a52580618002e85f8d28c33c6bb0987ead2d3284f
taffybar/taffybar
AutoSizeImage.hs
{-# LANGUAGE OverloadedStrings #-} module System.Taffybar.Widget.Generic.AutoSizeImage where import qualified Control.Concurrent.MVar as MV import Control.Monad import Control.Monad.IO.Class import Data.Int import Data.Maybe import qualified Data.Text as T import qualified GI.Gd...
null
https://raw.githubusercontent.com/taffybar/taffybar/4d3227e9cd8308c1e43846496a8a7ab417ef8e5b/src/System/Taffybar/Widget/Generic/AutoSizeImage.hs
haskell
# LANGUAGE OverloadedStrings # | Get the total size of the border (the sum of its assigned margin, border | Get the actual allocation for a "Gtk.Widget", accounting for the size of its CSS assined margin, border and padding values. action whenever the "Gtk.Image" is allocated. Returns an action that forces a refre...
module System.Taffybar.Widget.Generic.AutoSizeImage where import qualified Control.Concurrent.MVar as MV import Control.Monad import Control.Monad.IO.Class import Data.Int import Data.Maybe import qualified Data.Text as T import qualified GI.Gdk as Gdk import GI.GdkPix...
4337e59a82c355ee50481295b979dc48cef643bac9445a771070b0b78cff4718
acieroid/scala-am
loop2.scm
Taken from Expected result : 550 (letrec ((lp1 (lambda (i x) (letrec ((a (= 0 i ))) (if a x (letrec ((lp2 (lambda (j f y) (letrec ((b (= 0 j ))) (if b ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/loop2.scm
scheme
Taken from Expected result : 550 (letrec ((lp1 (lambda (i x) (letrec ((a (= 0 i ))) (if a x (letrec ((lp2 (lambda (j f y) (letrec ((b (= 0 j ))) (if b ...
0fc571243ae7f54d9a774ceff2822821af383a5831dd18e5923a42f9e781ab9d
aryx/xix
load5.ml
Copyright 2016 , see copyright.txt open Common open Ast_asm5 module T = Types module T5 = Types5 (* "Names", modifies global, modifies h *) let process_global global h idfile = (match global.priv with | Some _ -> global.priv <- Some idfile | None -> () ); populate symbol table with SXref if new entity ...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/linker/load5.ml
ocaml
"Names", modifies global, modifies h values to return todo: if lib file! object loading is so much easier in ocaml :) naming and populating symbol table h less: set curtext for better error managment less: adjust autosize?
Copyright 2016 , see copyright.txt open Common open Ast_asm5 module T = Types module T5 = Types5 let process_global global h idfile = (match global.priv with | Some _ -> global.priv <- Some idfile | None -> () ); populate symbol table with SXref if new entity T5.lookup_global global h |> ignore Vis...
526fad1d031abc1e0b22eb9796b9dde36efd0924016781110dbe7063bb9abcbd
tmattio/js-bindings
es2017.ml
[@@@js.dummy "!! This code has been generated by gen_js_api !!"] [@@@ocaml.warning "-7-32-39"] [@@@ocaml.warning "-7-11-32-33-39"] include struct include Es2016 end include struct include Es2017_object end include struct include Es2017_sharedmemory end include struct include Es2017_string end include struct include Es2...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/es2017/es2017.ml
ocaml
[@@@js.dummy "!! This code has been generated by gen_js_api !!"] [@@@ocaml.warning "-7-32-39"] [@@@ocaml.warning "-7-11-32-33-39"] include struct include Es2016 end include struct include Es2017_object end include struct include Es2017_sharedmemory end include struct include Es2017_string end include struct include Es2...
9d25a133d0743d6a5f7d3ed26b6d0e3a4e2ca1265ecba10fbf75e2931fe11add
ichistmeinname/free-theorems
ParserPrettyPrinterTests.hs
module ParserPrettyPrinterTests (tests) where import Control.Monad (liftM, replicateM) import Control.Monad.Writer (runWriter) import Data.Generics (everywhere, mkT) import Test.QuickCheck import Text.PrettyPrint (vcat) import Language.Haskell.FreeTheorems.Syntax import qualified Language.Haskell.FreeTheorems.Pa...
null
https://raw.githubusercontent.com/ichistmeinname/free-theorems/55f8b7366d960859f303ee81f326428a6ba4976b/free-theorems/src/ParserPrettyPrinterTests.hs
haskell
| All test cases. | Property: Parsing a pretty-printed declaration results in the same declaration. This property is based on the Haskell98 parser. type expressions have to be modified because arbitrary type expressions may contain FixedTypeExpressions, explicit type abstractions and type constructors applied t...
module ParserPrettyPrinterTests (tests) where import Control.Monad (liftM, replicateM) import Control.Monad.Writer (runWriter) import Data.Generics (everywhere, mkT) import Test.QuickCheck import Text.PrettyPrint (vcat) import Language.Haskell.FreeTheorems.Syntax import qualified Language.Haskell.FreeTheorems.Pa...
873ac8f7e206c4abc6fe3f4ab7a934edb3ad9e2afaefd203923581b5c34274a7
Metaxal/bazaar
date.rkt
#lang racket/base (require define2 racket/format racket/date) (provide (all-defined-out) (all-from-out racket/date)) ;; Returns the string of the current date with the specified date-display-format. ;; Just saves the use of a parameterize and date->string and (current-date) (define (date->...
null
https://raw.githubusercontent.com/Metaxal/bazaar/2968178aa62288c8ff41018a42dd306afb458046/date.rkt
racket
Returns the string of the current date with the specified date-display-format. Just saves the use of a parameterize and date->string and (current-date) Returns the date string with the numbers in iso order (lexicographical order) Separators can be modified. The default format is like `date-iso' without the "T" An...
#lang racket/base (require define2 racket/format racket/date) (provide (all-defined-out) (all-from-out racket/date)) (define (date->format [d (current-date)] [format (date-display-format)] #:time? [time? #t]) (parameterize ([date-display-format format]) ...
2e248b1dae45de6fca4df2b4e97fe09e2868aeaecff8e19072ba8fec4c5aab22
robashton/cravendb
indexengine.clj
(ns cravendb.indexengine (:use [cravendb.core] [clojure.pprint] [clojure.tools.logging :only (info debug error)]) (:import (java.io File File PushbackReader IOException FileNotFoundException )) (:require [cravendb.lucene :as lucene] [cravendb.storage :as s] [clojure.core.incuba...
null
https://raw.githubusercontent.com/robashton/cravendb/461e80c7c028478adb4287922db6ee4d2593a880/src/cravendb/indexengine.clj
clojure
Don't bleed async details to rest of app (yet) There is hopefully a better way
(ns cravendb.indexengine (:use [cravendb.core] [clojure.pprint] [clojure.tools.logging :only (info debug error)]) (:import (java.io File File PushbackReader IOException FileNotFoundException )) (:require [cravendb.lucene :as lucene] [cravendb.storage :as s] [clojure.core.incuba...
9705d5ce3bbf0be05fe886a42aad36d7eed5eebdba0a24fe1f89214fcb016330
garrigue/lablgl
lesson2.ml
* This code was created by 99 * If you 've found this code useful , please let me know . * * Visit Jeff at / * * Ported to O'Caml / lablglut by 8/02 * For port - specific issues , comments , etc . , please * contact * This code was created by Jeff Molofee '99 * If you've found this c...
null
https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/nehe/lesson2.ml
ocaml
Draw the triangle Draw the square Handle window reshape events Handle keyboard events
* This code was created by 99 * If you 've found this code useful , please let me know . * * Visit Jeff at / * * Ported to O'Caml / lablglut by 8/02 * For port - specific issues , comments , etc . , please * contact * This code was created by Jeff Molofee '99 * If you've found this c...