_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 |
|---|---|---|---|---|---|---|---|---|
52cc94722affd426ca8d178fe8783f62e049cde99b5aee38ad6a0c2b88e1929e | binghe/PCL | pcl-env.lisp | -*-Mode : LISP ; Package:(PCL ( LISP WALKER ) ) ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of de... | null | https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/impl/xerox/pcl-env.lisp | lisp | Package:(PCL ( LISP WALKER ) ) ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export contr... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( or send ... |
2ad8fdeb581d42f83f8fb75807b0aa91e480301efbd1272f93a5d9753f429283 | kappamodeler/kappa | ode_print.ml | open Data_structures
open Arithmetics
open Ode_print_sig
open Xml
open Tools
open Error_handler
let stdprint =
{
print_string = print_string ;
print_int = print_int ;
print_newline = print_newline ;
print_float = print_float ;
chan = [stdout]
}
let error x i =
unsafe_frozen (Some x) (Some... | null | https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/complx_rep/ODE/ode_print.ml | ocaml | **********************
PRINTING PRIMITIVES
********************** | open Data_structures
open Arithmetics
open Ode_print_sig
open Xml
open Tools
open Error_handler
let stdprint =
{
print_string = print_string ;
print_int = print_int ;
print_newline = print_newline ;
print_float = print_float ;
chan = [stdout]
}
let error x i =
unsafe_frozen (Some x) (Some... |
e5a41cc866d1c6113caf4ddb7c2ccf4afd097a432670ddb8726a132b56e4c2c1 | binaryage/chromex | wallpaper.clj | (ns chromex.ext.wallpaper
"Use the chrome.wallpaper API to change the ChromeOS wallpaper.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/wallpaper.clj | clojure | -- convenience ------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-- API TABLE --------------------------------------------------------... | (ns chromex.ext.wallpaper
"Use the chrome.wallpaper API to change the ChromeOS wallpaper.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-... |
64daec5cb965bc75f942b5d323643c2d994b1007b2497c5d42ec41b8d7e8a377 | NorfairKing/mergeless | CollectionSpec.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.Mergeless.CollectionSpec
( spec,
)
where
import Autodocodec
import Autodocodec.Yaml
import Control.Monad.State
... | null | https://raw.githubusercontent.com/NorfairKing/mergeless/b6bfcca1ae17e5ac662c6aa9128ed0b293b1f9c8/genvalidity-mergeless/test/Data/Mergeless/CollectionSpec.hs | haskell | # LANGUAGE RankNTypes #
Client B is empty
The server is empty
Client A merges the response
pPrint cBstore2
Client B merges the response
Client A and Client B now have the same store
Client A has a synced item.
Client B had synced that same item, but has since deleted it.
The server still has the undeleted ite... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.Mergeless.CollectionSpec
( spec,
)
where
import Autodocodec
import Autodocodec.Yaml
import Control.Monad.State
import Data.Data
import Data... |
d81662e88c300c1d7c59faf3ee356510618e4a4f6ca85e571619107b508b16de | witan-org/witan | options.mli | (*************************************************************************)
This file is part of Witan .
(* *)
Copyright ( C ) 2017
CEA ( Commi... | null | https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/bin/options.mli | ocaml | ***********************************************************************
alternatives)
Automatique)
... | This file is part of Witan .
Copyright ( C ) 2017
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en
CNRS ( Centre nation... |
efd035f8f4329981d17d2497f0c51b571a45ed1e212a299829ef884afdc83735 | PeterDWhite/Osker | UtilOut.hs | Copyright ( c ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module UtilOut where
testOut :: String -> IO ()
testOut s = putStrLn ("~~~[Test Script]...\t\t" ++ s)
fail :: Int -> IO ()
fail n = putStrLn ("\nTest " ++ show n ++ " fails\n")
pass :: Int -> IO ()
pass n = putStrLn ("\nTest " ++ s... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Support/UtilOut.hs | haskell | Copyright ( c ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module UtilOut where
testOut :: String -> IO ()
testOut s = putStrLn ("~~~[Test Script]...\t\t" ++ s)
fail :: Int -> IO ()
fail n = putStrLn ("\nTest " ++ show n ++ " fails\n")
pass :: Int -> IO ()
pass n = putStrLn ("\nTest " ++ s... | |
806e851fa9fde91f9926135c1ac1c6c5fc1808712c607b6fdd4bc08aea336270 | khinsen/leibniz | operators.rkt | #lang racket
(provide
(struct-out signature)
(contract-out
[regular? (signature? . -> . boolean?)]
[non-regular-op-example
(signature? . -> .
(or/c #f
(list/c symbol?
(listof symbol?)
... | null | https://raw.githubusercontent.com/khinsen/leibniz/881955b4c642114fbdc2f36ecc99582ae2371238/leibniz/operators.rkt | racket | Define a simple sort graph for testing
Meseguer, an operator is defined by a symbol (its name), its arity
(a list of sort constraints, one for each argument), and its sort
(the sort of the term defined by the operator). The combination
(arity, sort) is called the rank of the operator. A signature is a
operat... | #lang racket
(provide
(struct-out signature)
(contract-out
[regular? (signature? . -> . boolean?)]
[non-regular-op-example
(signature? . -> .
(or/c #f
(list/c symbol?
(listof symbol?)
... |
6375379946a9525ac05a6eba9e455370b989e823d5ca27b2f85f1795616b943a | snowleopard/hadrian | Type.hs | module Context.Type where
import Development.Shake.Classes
import GHC.Generics
import Hadrian.Package
import Stage
import Way.Type
| Build context for a currently built ' Target ' . We generate potentially
-- different build rules for each 'Context'.
data Context = Context
{ stage :: Stage -- ^ Currently b... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Context/Type.hs | haskell | different build rules for each 'Context'.
^ Currently build Stage
^ Currently build Package | module Context.Type where
import Development.Shake.Classes
import GHC.Generics
import Hadrian.Package
import Stage
import Way.Type
| Build context for a currently built ' Target ' . We generate potentially
data Context = Context
^ Currently build Way ( usually ' vanilla ' )
} deriving (Eq, Generic, Show)
in... |
ffbbdba189e934554147a56b8506a9bff14f11dd577d489650a36c67fb9b55a0 | jordwalke/rehp | regexp.ml | Js_of_ocaml library
* /
* Copyright ( C ) 2010 ,
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , with link... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/lib/js_of_ocaml/regexp.ml | ocaml | More constructors | Js_of_ocaml library
* /
* Copyright ( C ) 2010 ,
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , with link... |
8861120dfe844ec30b2c3c629a4415359db20c2becf937a3d1c77be8b567d3ff | mkoppmann/eselsohr | Collection.hs | module Lib.Domain.Repo.Collection
( CollectionRepo (..)
) where
import Lib.Domain.Capability (Capability)
import Lib.Domain.Collection (Collection)
import Lib.Domain.Id (Id)
class (Monad m) => CollectionRepo m where
exists :: Id Collection -> m Bool
createCollection :: Id Collection -> Id Capability -... | null | https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/src/Lib/Domain/Repo/Collection.hs | haskell | module Lib.Domain.Repo.Collection
( CollectionRepo (..)
) where
import Lib.Domain.Capability (Capability)
import Lib.Domain.Collection (Collection)
import Lib.Domain.Id (Id)
class (Monad m) => CollectionRepo m where
exists :: Id Collection -> m Bool
createCollection :: Id Collection -> Id Capability -... | |
e65ea8d0202cd8c25dececb085ef49b923317b788afae9661ca0d5fef5ea8665 | cartazio/tlaps | m_elab.mli |
* mod / elab.ml --- elaboration
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* mod/elab.ml --- elaboration
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
(** Elaborate modules *)
open Proof.T
open M_t
val normalize : modctx -> Expr.T.hyp Deque.dq -> mule ... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/module/m_elab.mli | ocaml | * Elaborate modules |
* mod / elab.ml --- elaboration
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* mod/elab.ml --- elaboration
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
open Proof.T
open M_t
val normalize : modctx -> Expr.T.hyp Deque.dq -> mule -> modctx * mule * summar... |
6b6f51073b3597e5d224b32b44183014cb5c1645cdd4664aaafd02efb3a64707 | VisionsGlobalEmpowerment/webchange | state.cljs | (ns webchange.admin.widgets.navigation.state
(:require
[re-frame.core :as re-frame]
[webchange.admin.state :as parent-state]
[webchange.admin.widgets.navigation.utils :refer [set-navigation-items-active
hide-navigation-items-by-user-type]]))
(re-frame... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/4b246803b3d53b963ceffe0e23f52f0dd5143e65/src/cljs/webchange/admin/widgets/navigation/state.cljs | clojure | (ns webchange.admin.widgets.navigation.state
(:require
[re-frame.core :as re-frame]
[webchange.admin.state :as parent-state]
[webchange.admin.widgets.navigation.utils :refer [set-navigation-items-active
hide-navigation-items-by-user-type]]))
(re-frame... | |
2d71fa8aa27489749d7c5862135b5f6c165550e2130eeb25f5fefbe20d360238 | wlitwin/graphv | main.ml | open Tgles2
module NVG = Graphv_gles2
module GLFWExtras = struct
open Ctypes
open Foreign
let glfwSetErrorCallback : (int -> string -> unit) -> (int -> string -> unit) =
let errorfun = int @-> string @-> returning void in
foreign "glfwSetErrorCallback" (funptr errorfun @-> returning (funp... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/examples/native/main.ml | ocaml | Make the window's context current | open Tgles2
module NVG = Graphv_gles2
module GLFWExtras = struct
open Ctypes
open Foreign
let glfwSetErrorCallback : (int -> string -> unit) -> (int -> string -> unit) =
let errorfun = int @-> string @-> returning void in
foreign "glfwSetErrorCallback" (funptr errorfun @-> returning (funp... |
4976e5b54dd5072c9c83fc339156005aa33ca94720e832fa0f899c5187b960d8 | scrintal/heroicons-reagent | cloud_arrow_up.cljs | (ns com.scrintal.heroicons.mini.cloud-arrow-up)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M5.5 17a4.5 4.5 0 01-1.44-8.765 4.5 4.5 0 018.302-3.046 3.5 3.5 0 014.504 4.... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/cloud_arrow_up.cljs | clojure | (ns com.scrintal.heroicons.mini.cloud-arrow-up)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M5.5 17a4.5 4.5 0 01-1.44-8.765 4.5 4.5 0 018.302-3.046 3.5 3.5 0 014.504 4.... | |
76e6ff4401853c2548d6d18d4947791d6b3afd5984d54cda8fc62d3572b51dbf | haskell/parsec | Parsec.hs | {-# LANGUAGE Safe #-}
|
Module : Text . Parsec
Copyright : ( c ) 1999 - 2001 , ( c ) 2007
License : BSD - style ( see the LICENSE file )
Maintainer :
Stability : provisional
Portability : portable
This module includes everything you need to get started writing a
pa... | null | https://raw.githubusercontent.com/haskell/parsec/38dfc545874dd44c26382d8dd692eb533396c6f5/src/Text/Parsec.hs | haskell | # LANGUAGE Safe #
* Combinators
* Character Parsing
* Error messages
* Position
* Debugging
there's also the [parsec-free](-free)
package.
* Low-level operations
* Other stuff |
|
Module : Text . Parsec
Copyright : ( c ) 1999 - 2001 , ( c ) 2007
License : BSD - style ( see the LICENSE file )
Maintainer :
Stability : provisional
Portability : portable
This module includes everything you need to get started writing a
parser .
By default t... |
65600b9c9444135e9882a79bb96a262b34fc7543df71902d7bcabe59af9ed283 | composewell/streaming-benchmarks | ByteStringLazy.hs | -- |
-- Module : Benchmarks.ByteStringLazy
Copyright : ( c ) 2019
--
License : MIT
-- Maintainer :
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Benchmarks.ByteStringLazy where
import Benchmarks.DefaultMain (defaultMain)
import Benchmarks . Common ( value , maxValue , )... | null | https://raw.githubusercontent.com/composewell/streaming-benchmarks/c31fa9d2d20c9b4e8e85be19ac1e7a41a88b4945/Benchmarks/ByteStringLazy.hs | haskell | |
Module : Benchmarks.ByteStringLazy
Maintainer :
for lazy bytestring
-----------------------------------------------------------------------------
Stream generation and elimination
-----------------------------------------------------------------------------
-----------------------------------------------... | Copyright : ( c ) 2019
License : MIT
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Benchmarks.ByteStringLazy where
import Benchmarks.DefaultMain (defaultMain)
import Benchmarks . Common ( value , maxValue , )
import Prelude (Int, (+), id, ($), (.), even, (>), (<=), subtract, u... |
9e1f18039177bbda7776eae8dbb016c27c4bb81f5f3cf1047ea67de28f7c4753 | rabbitmq/erlando | identity_m.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/rabbitmq/erlando/1c1ef25a9bc228671b32b4a6ee30c7525314b1fd/src/identity_m.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
| The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is Erlando .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2011 - 2013 VMware , Inc. All rights reserved .
-module(identi... |
88f2ac910db5fb56c191cfd9ac9c37ea491ba2f05647bbc6993c12a64fe18217 | kronkltd/jiksnu | auth_routes.clj | (ns jiksnu.modules.web.routes.auth-routes
(:require [cemerick.friend :as friend]
[jiksnu.modules.core.actions.auth-actions :as actions.auth]
[jiksnu.modules.core.actions.user-actions :as actions.user]
[jiksnu.modules.http.resources :refer [add-group! defresource defgroup]]
... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/web/routes/auth_routes.clj | clojure | (ns jiksnu.modules.web.routes.auth-routes
(:require [cemerick.friend :as friend]
[jiksnu.modules.core.actions.auth-actions :as actions.auth]
[jiksnu.modules.core.actions.user-actions :as actions.user]
[jiksnu.modules.http.resources :refer [add-group! defresource defgroup]]
... | |
9c5b5df608ae49832952d0e8bbb6494c2570a9ca526fd95779636cdb39f86255 | alanzplus/EOPL | 1.30-test.rkt | #lang eopl
(require rackunit "1.30.rkt")
(require rackunit/text-ui)
(define sort-test
(test-suite
"Tests for (sort/predict pred loi)"
(check-equal? (sort < '(8 2 5 2 3)) '(2 2 3 5 8))
(check-equal? (sort > '(8 2 5 2 3)) '(8 5 3 2 2))))
(run-tests sort-test)
| null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/1.30-test.rkt | racket | #lang eopl
(require rackunit "1.30.rkt")
(require rackunit/text-ui)
(define sort-test
(test-suite
"Tests for (sort/predict pred loi)"
(check-equal? (sort < '(8 2 5 2 3)) '(2 2 3 5 8))
(check-equal? (sort > '(8 2 5 2 3)) '(8 5 3 2 2))))
(run-tests sort-test)
| |
1d2c068c6c34600b5a9dfe6c1a425348e7730b7b5494d477744f837d13204fa0 | paulrzcz/hquantlib | QuantLib.hs | module QuantLib ( module Q ) where
import QuantLib.Stochastic as Q
import QuantLib.Money as Q
import QuantLib.Position as Q
import QuantLib.TimeSeries as Q
import QuantLib.Prices as Q
import QuantLib.Math as Q
import QuantLib.Time as Q | null | https://raw.githubusercontent.com/paulrzcz/hquantlib/7689b93fa9724b44755148b104ec6c6916d241c3/src/QuantLib.hs | haskell | module QuantLib ( module Q ) where
import QuantLib.Stochastic as Q
import QuantLib.Money as Q
import QuantLib.Position as Q
import QuantLib.TimeSeries as Q
import QuantLib.Prices as Q
import QuantLib.Math as Q
import QuantLib.Time as Q | |
64065d3d2d9f1d71bfa3b91ff054b57cc6f08215709923800ca3b70991b95582 | f-me/carma-public | SQL.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeOperators #
# LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleContexts #
|
SQL helpers used during VIN import process .
SQL helpers used during VIN import process.
-}
module Carma.VIN.SQL
where
import qualified Blaze.ByteString.Bui... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/tools/vinnie/src/Carma/VIN/SQL.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
| Internal field name for a CSV column. It is neither external
column title, nor Contract field name.
| Name of a field in Contract model.
and append as many fields as needed:
> () :* f1 :* f2 :* f3
Initial `()` saves the type hassle.
| Produce uniqu... | # LANGUAGE TypeOperators #
# LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleContexts #
|
SQL helpers used during VIN import process .
SQL helpers used during VIN import process.
-}
module Carma.VIN.SQL
where
import qualified Blaze.ByteString.Builder.Char8 as BZ
import Control.Monad.IO.Class
import ... |
293da03310f16366a0d5b75b7f026c8b7926a55dfc3f11098b53e50746c5325a | MyDataFlow/ttalk-server | mod_mam_con_ca_arch.erl | %%%-------------------------------------------------------------------
@author Michael < >
( C ) 2013 , Uvarov Michael
@doc ODBC backend for Message Archive Management .
%%% @end
%%%-------------------------------------------------------------------
-module(mod_mam_con_ca_arch).
%% ---------------------------... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_mam_con_ca_arch.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
----------------------------------------------------------------------
Exports
gen_mod handlers
Helpers
Internal exports
gen_server callbacks
-----------------------------... | @author Michael < >
( C ) 2013 , Uvarov Michael
@doc ODBC backend for Message Archive Management .
-module(mod_mam_con_ca_arch).
-export([start/2, stop/1]).
MAM hook handlers
-export([archive_size/4,
safe_archive_message/9,
safe_lookup_messages/14,
remove_archive/3,
pur... |
ea59d11f63c4e60ff4563b7d64b71e68cff7ebe0f4efe397046fd50c44cbc860 | unclebob/more-speech | bech32_spec.clj | (ns more-speech.bech32-spec
(:require [speclj.core :refer :all]
[more-speech.bech32 :refer :all]
[more-speech.nostr.util :as util]))
(describe "bech32"
(context "charset translations"
(it "should translate charset chars to five bit numbers"
(should= 0 (to-n \q))
(should= 31 ... | null | https://raw.githubusercontent.com/unclebob/more-speech/f3943cb7492de31d4872e6fe81aa997c17b6704f/spec/more_speech/bech32_spec.clj | clojure | (ns more-speech.bech32-spec
(:require [speclj.core :refer :all]
[more-speech.bech32 :refer :all]
[more-speech.nostr.util :as util]))
(describe "bech32"
(context "charset translations"
(it "should translate charset chars to five bit numbers"
(should= 0 (to-n \q))
(should= 31 ... | |
356b1b6f1f18e29af80301f31bdc315fd33b8cdb7e90c99787f52ae898579ef2 | project-oak/hafnium-verification | NullabilitySuggest.mli |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/nullsafe/NullabilitySuggest.mli | ocaml | Module that suggest adding nullability annotations |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
d0982a1c5a5e0827193b005dcb0a29daf8c1c4ab703127875d8b9f4b7e1c56fd | sweirich/pi-forall | Syntax.hs | {- pi-forall language -}
-- | The abstract syntax of the simple dependently typed language
See comment at the top of ' Parser ' for the concrete syntax of this language
module Syntax where
import Data.Function (on)
import Data.Maybe (fromMaybe)
import Data.Set (Set)
import Data.Set qualified as Set
import Data.Type... | null | https://raw.githubusercontent.com/sweirich/pi-forall/69419e84d0495336ca133c1c1298b88b57cd62fa/version1/src/Syntax.hs | haskell | pi-forall language
| The abstract syntax of the simple dependently typed language
---------------------------------------
* Names
---------------------------------------
automatically generate free variable, substitution,
and alpha-equality function.
| module names
---------------------------------------
* Core... |
See comment at the top of ' Parser ' for the concrete syntax of this language
module Syntax where
import Data.Function (on)
import Data.Maybe (fromMaybe)
import Data.Set (Set)
import Data.Set qualified as Set
import Data.Typeable (Typeable)
import GHC.Generics (Generic, from)
import Text.ParserCombinators.Parsec.Po... |
577017597fc3d0b7eecda0e06d2123c102cb59cc1e76bbfa1d132deefdad434a | okuoku/nausicaa | read-leap-seconds-table.sps | -*- coding : utf-8 -*-
;;;
Part of : / Scheme
Contents : the script from SRFI 19 to be used to regenerate the table
Date : Fri Sep 17 , 2010
;;;
;;;Abstract
;;;
;;; Read the table of leap seconds from:
;;;
;;; <ftp-utc.dat>
;;;
;;; and print a Scheme alist to be used in the (times-and-dates
seconds ) library... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/scripts/read-leap-seconds-table.sps | scheme |
Abstract
Read the table of leap seconds from:
<ftp-utc.dat>
and print a Scheme alist to be used in the (times-and-dates
required to edit this data file, for example to break the
occurrences of "0.0011232S" into "0.0011232 S"; this is because
the script does not implement a proper parser.
This... | -*- coding : utf-8 -*-
Part of : / Scheme
Contents : the script from SRFI 19 to be used to regenerate the table
Date : Fri Sep 17 , 2010
seconds ) library . This script comes from SRFI 19 . It may be
Copyright ( C ) I / NET , Inc. ( 2000 , 2002 , 2003 ) . All Rights Reserved .
Modified by .
the Free S... |
ada891d27124485a0d6807b54ed1a21970ee3244da2215e1e8c82b66db9684d3 | chaoxu/fancy-walks | 05.hs |
myReverse :: [a] -> [a]
myReverse (x:xs) = ((myReverse xs) ++ [x])
myReverse [] = []
| null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/haskell.org/99_Problems/05.hs | haskell |
myReverse :: [a] -> [a]
myReverse (x:xs) = ((myReverse xs) ++ [x])
myReverse [] = []
| |
b1c11c67a2471e6399786822bc4a71ffb1c68b9d812f8019c33471745861d5bd | storm-framework/voltron | Reset.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
{-@ LIQUID "--no-pattern-inline" @-}
module Controllers.Reset (reset, resetPass) where
import Control.Monad.Time ( MonadTime(..) )
import Data.Text (... | null | https://raw.githubusercontent.com/storm-framework/voltron/1ccdac06802015bf97044e932c8545516eeb7225/server/src/Controllers/Reset.hs | haskell | # LANGUAGE OverloadedStrings #
@ LIQUID "--no-pattern-inline" @
-----------------------------------------------------------------------------
| Reset password : generate a random code and send to user's email
-----------------------------------------------------------------------------
@ reset :: TaggedT<{\_ -> False}... | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
module Controllers.Reset (reset, resetPass) where
import Control.Monad.Time ( MonadTime(..) )
import Data.Text ( Text(..) )
import qualified Data.Text as T
import q... |
928e58cfe10d7ad4a4a9137a50e3e3fca805458d9b7f43e6b3c1b592da4cd902 | askonomm/clarktown | empty_block_test.clj | (ns clarktown.matchers.empty-block-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.matchers.empty-block :as empty-block]))
(deftest empty-block-matcher-test
(testing "Checking an empty block"
(is (true? (empty-block/match? "")))
(is (true? (empty-block/match? " "))))) | null | https://raw.githubusercontent.com/askonomm/clarktown/dcb21ec0104cdec3ca9976374868c5837ad9d0b9/test/clarktown/matchers/empty_block_test.clj | clojure | (ns clarktown.matchers.empty-block-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.matchers.empty-block :as empty-block]))
(deftest empty-block-matcher-test
(testing "Checking an empty block"
(is (true? (empty-block/match? "")))
(is (true? (empty-block/match? " "))))) | |
a627bbc55feb705d71d7885ab72ee1ce041fd56ed46e72477d2be9b851538cf2 | kupl/LearnML | patch.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let diff ((e : aexp), (x : string)) : aexp =
let rec rev_list (lst : aexp list) (num : int) : aexp list =
match lst with
| hd :: tl ->
if List.length tl = num then [] @ rev_list tl n... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub150/patch.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let diff ((e : aexp), (x : string)) : aexp =
let rec rev_list (lst : aexp list) (num : int) : aexp list =
match lst with
| hd :: tl ->
if List.length tl = num then [] @ rev_list tl n... | |
4410f7fc1dccd83a47619290f112212ead0a7e64de2d3e2b9194d38e2eea4bd6 | haskell-opengl/OpenGL | BufferMode.hs | {-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.BufferMode
Copyright : ( c ) 2002 - 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/BufferMode.hs | haskell | # OPTIONS_HADDOCK hide #
------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.BufferMode
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
------... | Copyright : ( c ) 2002 - 2019
Maintainer : < >
This is a purely internal module for ( un-)marshaling BufferMode .
module Graphics.Rendering.OpenGL.GL.BufferMode (
BufferMode(..), marshalBufferMode, unmarshalBufferMode,
unmarshalBufferModeSafe,
maxColorAttachments,
) where
import Graphics.... |
92107e0ec147b727ab6a8cd7fdc3edf6687083d07c2078be48dade4303f30e58 | mmontone/easy-routes | easy-routes.lisp | (in-package :easy-routes)
(defparameter *routes* (make-hash-table))
(defparameter *routes-mapper* (make-instance 'routes:mapper)
"This is the cl-routes map of routes.
cl-routes implements special SWANK inspect code and prints routes mappers as a tree.
Just inspect *routes-mapper* from the Lisp listener to see.")
(d... | null | https://raw.githubusercontent.com/mmontone/easy-routes/17fc47113a793884dd86d408aee08b4f35f495fe/easy-routes.lisp | lisp | else, a route was matched
Url generation from route name
Check that template variables are provided
Redirect
Decorators
HTTP Errors | (in-package :easy-routes)
(defparameter *routes* (make-hash-table))
(defparameter *routes-mapper* (make-instance 'routes:mapper)
"This is the cl-routes map of routes.
cl-routes implements special SWANK inspect code and prints routes mappers as a tree.
Just inspect *routes-mapper* from the Lisp listener to see.")
(d... |
7f66b260f9518e2d17a618a9b1dda407e9623bb87c48aaa18e8abede69f25209 | reborg/clojure-essential-reference | 3.clj | < 1 >
odds (filter odd? input)
evens (filter even? input)]
(if (> (first odds) (first evens))
(println "ok")
(println "ko")))
.......... ok ; < 2 > | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/ReducersandTransducers/Transducers/eduction/3.clj | clojure | < 2 > | < 1 >
odds (filter odd? input)
evens (filter even? input)]
(if (> (first odds) (first evens))
(println "ok")
(println "ko"))) |
427bb0276f504267210219fa244b761ca8e3370c9f856bde1f18ac768a815864 | journeyman-cc/smeagol | parse.clj | (ns ^{:doc "Functions related to the include of markdown-paged - parsing of
include links. This namespaces is implementation detail for
smeagol.include and not inteded for direct usage."
:author "Michael Jerger"}
smeagol.include.parse
(:require
[schema.core :as s]))
(def IncludeLink
{:replace s/Str
... | null | https://raw.githubusercontent.com/journeyman-cc/smeagol/a775ef7b831a2fbcf9c98380367edc16d39c4c6c/src/smeagol/include/parse.clj | clojure | (ns ^{:doc "Functions related to the include of markdown-paged - parsing of
include links. This namespaces is implementation detail for
smeagol.include and not inteded for direct usage."
:author "Michael Jerger"}
smeagol.include.parse
(:require
[schema.core :as s]))
(def IncludeLink
{:replace s/Str
... | |
e98c6b6df160660ea901b0d54bd6e5eb2b7b2bed2a56e6cd900e5811bc8d9449 | sebastiw/otc | otc_nas_5gs_5gsm.erl | -module(otc_nas_5gs_5gsm).
-behaviour(otc_codec).
-export([spec/0,
codec/1,
next/1,
decode/1,
encode/1]).
spec() ->
"3GPP TS 24.501 version 16.10.0".
codec(Bin) when is_binary(Bin) ->
decode(Bin);
codec(Map) when is_map(Map) ->
encode(Map).
next(_) -> {ok, nas_5gs}.
... | null | https://raw.githubusercontent.com/sebastiw/otc/2ce29e3178152e2130572c6485f0ed52d5360416/src/otc_nas_5gs_5gsm.erl | erlang | -module(otc_nas_5gs_5gsm).
-behaviour(otc_codec).
-export([spec/0,
codec/1,
next/1,
decode/1,
encode/1]).
spec() ->
"3GPP TS 24.501 version 16.10.0".
codec(Bin) when is_binary(Bin) ->
decode(Bin);
codec(Map) when is_map(Map) ->
encode(Map).
next(_) -> {ok, nas_5gs}.
... | |
f13f522b5fdb63962062d961675c4584c37cdf023892a91a510538d149509fa4 | mbj/stratosphere | ModelQualityAppSpecificationProperty.hs | module Stratosphere.SageMaker.ModelQualityJobDefinition.ModelQualityAppSpecificationProperty (
ModelQualityAppSpecificationProperty(..),
mkModelQualityAppSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
im... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelQualityJobDefinition/ModelQualityAppSpecificationProperty.hs | haskell | module Stratosphere.SageMaker.ModelQualityJobDefinition.ModelQualityAppSpecificationProperty (
ModelQualityAppSpecificationProperty(..),
mkModelQualityAppSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
im... | |
3a3c26475839550aecde02430628a01ab4e07708accd2203dd188f1021e42d11 | dakra/mui-templates | routes.cljs | (ns mui-templates.routes
(:require
[re-frame.core :as rf]
[reitit.coercion.spec]
[reitit.frontend]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[mui-templates.views.sign-in :as sign-in]
[mui-templates.views.sign-in-site :as sign-in-site]
[mui-templates.views.sign-up :as... | null | https://raw.githubusercontent.com/dakra/mui-templates/68ae00822ec031cd328a4d12529bcef24c59c95b/src/mui_templates/routes.cljs | clojure | Subs
Events
Triggering navigation from events.
Routes
Do whatever initialization needed for home page
I.e (rf/dispatch [:events/load-something-with-ajax]) | (ns mui-templates.routes
(:require
[re-frame.core :as rf]
[reitit.coercion.spec]
[reitit.frontend]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[mui-templates.views.sign-in :as sign-in]
[mui-templates.views.sign-in-site :as sign-in-site]
[mui-templates.views.sign-up :as... |
f0595c4fa5ac72e561b5c643cfeef96ba66cbbe6eee93cf9166a0e60d73cfdd2 | Chadtech/elmish-wasm | Main.hs | module Main where
import qualified System.Environment as System
import qualified Data.ByteString as Byte
import Flow
import qualified Data.ByteString.Char8 as C
import qualified Data.Module as Module
import Result (Problem(..), Result(..))
import qualified Read
import qualified Write
-- MAIN --
main :: IO ()
main ... | null | https://raw.githubusercontent.com/Chadtech/elmish-wasm/001463453ffbc2a6bc21803b00b7ed242ad4ffbd/app/Main.hs | haskell | MAIN -- | module Main where
import qualified System.Environment as System
import qualified Data.ByteString as Byte
import Flow
import qualified Data.ByteString.Char8 as C
import qualified Data.Module as Module
import Result (Problem(..), Result(..))
import qualified Read
import qualified Write
main :: IO ()
main = do
ar... |
517d6e6157b29929e69e5bc5e63b320d9104a3b2dd7650cd187ca572e36789ce | jspahrsummers/RxHaskell | Scheduled.hs | {-# LANGUAGE Safe #-}
# LANGUAGE ScopedTypeVariables #
module Signal.Scheduled ( start
, subscribeOn
, deliverOn
, first
, last
, Scheduler
, SchedulerIO
... | null | https://raw.githubusercontent.com/jspahrsummers/RxHaskell/19550bb692a6a6e56314fe3aebb1303a22e577ed/Signal/Scheduled.hs | haskell | # LANGUAGE Safe #
| Starts a signal which executes @action@ on @s@.
Although we could hold onto any disposable returned from scheduling,
the complexity of managing all of them probably isn't worth the
slightly faster cancellation. | # LANGUAGE ScopedTypeVariables #
module Signal.Scheduled ( start
, subscribeOn
, deliverOn
, first
, last
, Scheduler
, SchedulerIO
, Signal
... |
7389cc5ce0aa298803e1b1cd130fa27b13c22a5cb64bbef0abd8e9da11ef5964 | mfoemmel/erlang-otp | tv_pc_graph_ctrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 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/tv/src/tv_pc_graph_ctrl.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 1997 - 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(tv_pc_graph_ctrl).
-export([crea... |
0627e08fceb4174518a85c84859ed389c8ac1f1db69d9d091ee4dba74c3c9a14 | jellelicht/guix | haskell.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/build-system/haskell.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix build-system haskell)
#:use-module (guix store)
#:use-module (guix utils)
#:use-module ... |
0a137aecdf104ea4b210b501141f0c1c0caf5f86141b3341e1174db27eedf649 | WorksHub/client | view.cljc | (ns wh.landing-new.unread-messages.view
(:require [wh.components.activities.components :as activities]
[wh.landing-new.unread-messages.styles :as styles]
[wh.routes :as routes]))
(defn unread-messages []
[:div {:class styles/card}
[:div {:class styles/wrapper}
[:div {:class styles/re... | null | https://raw.githubusercontent.com/WorksHub/client/bfee3d5aced3ceb9d4f59a8fa7a4ac4226cd1726/common-pages/src/wh/landing_new/unread_messages/view.cljc | clojure | (ns wh.landing-new.unread-messages.view
(:require [wh.components.activities.components :as activities]
[wh.landing-new.unread-messages.styles :as styles]
[wh.routes :as routes]))
(defn unread-messages []
[:div {:class styles/card}
[:div {:class styles/wrapper}
[:div {:class styles/re... | |
bc87d21c34086aa90bf9ad5ebda0ead7192b8c15032708f42e3c8adf59c91a72 | mbutterick/brag | test-wordy.rkt | #lang racket/base
(require brag/examples/wordy
brag/support
rackunit)
(check-equal?
(syntax->datum
(parse (list "hello" "world")))
'(sentence (verb (greeting "hello")) (optional-adjective) (object "world")))
(check-equal?
(syntax->datum
(parse (list "hola" "frumpy" (token 'WORLD "세계"))))
... | null | https://raw.githubusercontent.com/mbutterick/brag/6c161ae31df9b4ae7f55a14f754c0b216b60c9a6/brag-lib/brag/test/test-wordy.rkt | racket | #lang racket/base
(require brag/examples/wordy
brag/support
rackunit)
(check-equal?
(syntax->datum
(parse (list "hello" "world")))
'(sentence (verb (greeting "hello")) (optional-adjective) (object "world")))
(check-equal?
(syntax->datum
(parse (list "hola" "frumpy" (token 'WORLD "세계"))))
... | |
a973413cb13dd7dc32136ff5612ab9cc77c03a1fc1234ed72e7b10b25f7ffde4 | ocaml/merlin | typedecl.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/ocaml/merlin/d78b9d517d8b7265b4af03482252e6dfb7e9ee1e/src/ocaml/typing/typedecl.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Parsetree
open Primitive
open Types
open Typetexp
module String = Misc.String
type nati... |
dc598213b9eff26815de08c167094cb4226bf28b0bb00b1c041e416092b97b3f | nominolo/lambdachine | Shifting.hs | # LANGUAGE NoImplicitPrelude , MagicHash , BangPatterns #
module Bc.Shifting where
import GHC.Prim
import GHC.Base
up :: Word# -> Int# -> Word#
up w 0# = w
up w n =
let !w2 = w `uncheckedShiftL#` 1# in
up w2 (n -# 1#)
dn :: Word# -> Int# -> Word#
dn w 0# = w
dn w n =
let !w2 = w `uncheckedShiftRL#` 1# in
dn ... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Bc/Shifting.hs | haskell | # LANGUAGE NoImplicitPrelude , MagicHash , BangPatterns #
module Bc.Shifting where
import GHC.Prim
import GHC.Base
up :: Word# -> Int# -> Word#
up w 0# = w
up w n =
let !w2 = w `uncheckedShiftL#` 1# in
up w2 (n -# 1#)
dn :: Word# -> Int# -> Word#
dn w 0# = w
dn w n =
let !w2 = w `uncheckedShiftRL#` 1# in
dn ... | |
d924823abf73fe359b16baab9ec6058bf5429068ec00e984080c44989cbd9ed2 | techascent/tech.ml.dataset | spreadsheet.clj | (ns ^:no-doc tech.v3.dataset.io.spreadsheet
"Spreadsheets in general are stored in a cell-based format. This means that any cell
could have data of any type. Commonalities around parsing spreadsheet-type systems
are captured here."
(:require [tech.v3.dataset.io.context :as parse-context]
[tech.v3.... | null | https://raw.githubusercontent.com/techascent/tech.ml.dataset/b6f9f4e3eb051f66fd41ca00d91368e1bc7cb848/src/tech/v3/dataset/io/spreadsheet.clj | clojure | Always have to keep in mind that columns are sparse.
Fill out columns that only have missing values | (ns ^:no-doc tech.v3.dataset.io.spreadsheet
"Spreadsheets in general are stored in a cell-based format. This means that any cell
could have data of any type. Commonalities around parsing spreadsheet-type systems
are captured here."
(:require [tech.v3.dataset.io.context :as parse-context]
[tech.v3.... |
0d76c3eef8faba825c8dd1396e3bf898eade1e36a19eebba1f6206d26584879e | serioga/webapp-clojure-2020 | hugsql.clj | (ns app.database.hugsql
(:require [app.database.result-set :as rs]
[hugsql.adapter.next-jdbc :as adapter]
[lib.clojure.core :as c]
[lib.hugsql.core :as hugsql']
[mount.core :as mount])
(:import (javax.sql DataSource)))
(set! *warn-on-reflection* true)
••••••••••••••... | null | https://raw.githubusercontent.com/serioga/webapp-clojure-2020/d66b0f77abaef9ec5bd8f9e71a03087fcdffdc77/src/app/database/hugsql.clj | clojure | (ns app.database.hugsql
(:require [app.database.result-set :as rs]
[hugsql.adapter.next-jdbc :as adapter]
[lib.clojure.core :as c]
[lib.hugsql.core :as hugsql']
[mount.core :as mount])
(:import (javax.sql DataSource)))
(set! *warn-on-reflection* true)
••••••••••••••... | |
7b7f57ac9912650b555e80027c4a1bfaf975a6aedd1bec66e254927360d1ace8 | static-analysis-engineering/codehawk | jCHCostModelUtil.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchcost/jCHCostModelUtil.mli | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
2d41165cc9263168eff7026348207cd2acef4f64b2a68aea11d735acdaefc357 | racket/expeditor | object.rkt | #lang racket/base
(require racket/class
racket/gui/base
framework
syntax-color/default-lexer
syntax-color/module-lexer
expeditor/private/param
expeditor/private/object
scribble/private/indentation)
;; Check that `like-text%` simulates `color:text%`,
base... | null | https://raw.githubusercontent.com/racket/expeditor/2cd0a74a378e13e90cbdefe6f346ccda64fa8f2c/expeditor-test/tests/object.rkt | racket | Check that `like-text%` simulates `color:text%`,
Test that our implementations of {forward backward}-match are
equivalent to those of color:text%.
Test that we supply enough entire color-text% methods, and that
they behave equivalently to from racket-text%, as needed by a
lang-supplied drracket:indentation
funct... | #lang racket/base
(require racket/class
racket/gui/base
framework
syntax-color/default-lexer
syntax-color/module-lexer
expeditor/private/param
expeditor/private/object
scribble/private/indentation)
based on tests from
(define (insert t str)
(define ... |
425c7a554a84af3ac4aa96a2bb5753b951e28bb8dbcc14b3e748de021d0f4f7e | KirinDave/clj-time | format_test.clj | (ns clj-time.format-test
(:use clojure.test
(clj-time core format)))
(deftest test-formatter
(let [fmt (formatter "yyyyMMdd")]
(is (= (date-time 2010 3 11)
(parse fmt "20100311")))))
(deftest test-parse
(let [fmt (formatters :date)]
(is (= (date-time 2010 3 11)
(parse fmt "... | null | https://raw.githubusercontent.com/KirinDave/clj-time/41259ac14f4604d54e6561fde4a52867e6834b79/test/clj_time/format_test.clj | clojure | (ns clj-time.format-test
(:use clojure.test
(clj-time core format)))
(deftest test-formatter
(let [fmt (formatter "yyyyMMdd")]
(is (= (date-time 2010 3 11)
(parse fmt "20100311")))))
(deftest test-parse
(let [fmt (formatters :date)]
(is (= (date-time 2010 3 11)
(parse fmt "... | |
05d3c4f5b9b832bf8db3fced099e33f3d4709852f769b0da168cf875199e30fa | jordwalke/rehp | planet.ml | Js_of_ocaml example
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 2 of ... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/examples/planet/planet.ml | ocaml | **
**
Assumes that m is orthogonal
**
**
-pi/2 <= theta <= pi/2
**
**
**
**
**
**
let o = octahedron >> divide true >> divide true >> divide true
m_obliq := xy_rotation (-. o);
if true then Lwt.return () else
| Js_of_ocaml example
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 2 of ... |
a1e705d721e58cce3680225a16b74946a6b2adf8e66b17401bfd00303ae8470f | jimcrayne/jhc | tc197.hs | {-# OPTIONS -fglasgow-exts #-}
-- Another dependency analysis test
-- Notice that 'a' and 'b' are mutually recursive,
-- but have different contexts.
--
This is the program submitted by [ ]
-- to motivate the refined dependency analysis.
module ShouldCompile where
import Data.IORef
class MyReader r v | r -> ... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc197.hs | haskell | # OPTIONS -fglasgow-exts #
Another dependency analysis test
Notice that 'a' and 'b' are mutually recursive,
but have different contexts.
to motivate the refined dependency analysis. |
This is the program submitted by [ ]
module ShouldCompile where
import Data.IORef
class MyReader r v | r -> v where
myRead :: r -> IO v
data R v = R (IORef v)
instance MyReader (R v) v where
myRead (R v) =
do v <- readIORef v
return v
a :: IO ()
a =
do r <- createReader
b r
b :: MyRea... |
fd8e400065e79eccf977d01ae2046d0d8975d7c377c7fb1244f5b8fe8f33f078 | niquola/json-schema.clj | v6_test.clj | (ns json-schema.v6-test
(:refer-clojure :exclude [compile])
(:require
[json-schema.core :refer :all]
[json-schema.utils :as u]
[clojure.test :refer :all]
[clojure.string :as str]))
(def re-filter #"^.*$")
(deftest custom-6-test
;; const validation
(let [validator (compile {:const 2})
res (... | null | https://raw.githubusercontent.com/niquola/json-schema.clj/85ca313d1b64b0005b4f783c2f58c0a47ec8d009/test/json_schema/v6_test.clj | clojure | const validation
propertyNames validation
validation of URIs
validation of URIs
if and then without else
"validation of URIs"
"format: uri-template"
"validation of URI References" | (ns json-schema.v6-test
(:refer-clojure :exclude [compile])
(:require
[json-schema.core :refer :all]
[json-schema.utils :as u]
[clojure.test :refer :all]
[clojure.string :as str]))
(def re-filter #"^.*$")
(deftest custom-6-test
(let [validator (compile {:const 2})
res (validator "a")]
(i... |
ef4f5ced63d269a2741fab48baf3cb943979db6e9f73d2def0283bfcf04fee6c | ocaml-flambda/flambda-backend | print_fexpr.ml | open! Fexpr
let pp_list ~sep f ppf =
Format.pp_print_list f ~pp_sep:(fun ppf () -> Format.fprintf ppf sep) ppf
let pp_star_list f = pp_list ~sep:" *@ " f
let pp_comma_list f = pp_list ~sep:",@ " f
let pp_semi_list f = pp_list ~sep:";@ " f
let pp_pipe_list f = pp_list ~sep:"@ |" f
let empty_fmt : (unit, Format.f... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/e2711acd740fb85b2672c8c72e07d3558edd1b57/middle_end/flambda2/parser/print_fexpr.ml | ocaml | Empty variant? Sure, whatever
Align first | in line with opening [
Somewhat clumsily reuse the logic in [symbol_bindings] | open! Fexpr
let pp_list ~sep f ppf =
Format.pp_print_list f ~pp_sep:(fun ppf () -> Format.fprintf ppf sep) ppf
let pp_star_list f = pp_list ~sep:" *@ " f
let pp_comma_list f = pp_list ~sep:",@ " f
let pp_semi_list f = pp_list ~sep:";@ " f
let pp_pipe_list f = pp_list ~sep:"@ |" f
let empty_fmt : (unit, Format.f... |
08fac175617f5944155737f18d10401f97c2d9bed3895a7a7c366cdffaf0fa2e | JeffreyBenjaminBrown/hode | TLookup.hs | # LANGUAGE ScopedTypeVariables #
module Hode.Test.Rslt.TLookup where
import Data.Either
import qualified Data.Map as M
import qualified Data.Set as S
import Test.HUnit
import Hode.Rslt.Lookup hiding (exprToAddr)
import qualified Hode.Rslt.Edit.Initial as R
import H... | null | https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode-test/Hode/Test/Rslt/TLookup.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Hode.Test.Rslt.TLookup where
import Data.Either
import qualified Data.Map as M
import qualified Data.Set as S
import Test.HUnit
import Hode.Rslt.Lookup hiding (exprToAddr)
import qualified Hode.Rslt.Edit.Initial as R
import H... | |
ad5ee2c77f210e87766883774a41d814dca22584064dd64bfb1b52dd15753953 | gpwwjr/LISA | pkgdecl.lisp | This file is part of LISA , the Lisp - based Intelligent Software
;;; Agents platform.
Copyright ( C ) 2000 ( )
;;; 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 versi... | null | https://raw.githubusercontent.com/gpwwjr/LISA/bc7f54b3a9b901d5648d7e9de358e29d3b794c78/src/packages/pkgdecl.lisp | lisp | Agents platform.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FI... | This file is part of LISA , the Lisp - based Intelligent Software
Copyright ( C ) 2000 ( )
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 59 T... |
9b4c5736215f1cb2f200c8a8a8a2c3e463b8a86a4bac8cef83277dc348a6de55 | zotonic/zotonic | zotonic_cmd_compilefile.erl | @author < >
2019
%% @doc Let zotonic compile a single file.
Copyright 2019
%%
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 appl... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_launcher/src/command/zotonic_cmd_compilefile.erl | erlang | @doc Let zotonic compile a single file.
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... | @author < >
2019
Copyright 2019
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_cmd_compilefile).
-author("Marc Worrell").
-export([info/0, run/1]).
info() ->
"Compile a specific erlang f... |
364492fa18a2c9857f8413b3f88e6cadaff7a65bf2a8216105937de8bf380cb3 | jacekschae/learn-reitit-course-files | db.clj | (ns cheffy.conversation.db
(:require [next.jdbc.sql :as sql]
[next.jdbc :as jdbc])
(:import (java.util UUID)))
(defmulti dispatch (fn [[name _db _data]] name))
(defmethod dispatch :find-conversation-by-uid
[[_ db {:keys [uid]}]]
(with-open [conn (jdbc/get-connection db)]
(let [conn-opts (jdbc/... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/55-clear-notifications/src/cheffy/conversation/db.clj | clojure | (ns cheffy.conversation.db
(:require [next.jdbc.sql :as sql]
[next.jdbc :as jdbc])
(:import (java.util UUID)))
(defmulti dispatch (fn [[name _db _data]] name))
(defmethod dispatch :find-conversation-by-uid
[[_ db {:keys [uid]}]]
(with-open [conn (jdbc/get-connection db)]
(let [conn-opts (jdbc/... | |
519f096f38710f266dfcd860af70394d0668c740b03999847f27ba0975c7975d | craigfe/sink | sink.ml | include Toplevel
* @inline
* { 1 Standard types }
Utility modules for basic types , many of which shadow similar ones from the
OCaml standard library .
Utility modules for basic types, many of which shadow similar ones from the
OCaml standard library. *)
module Unit = Unit
module Bool = Bool
mod... | null | https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/sink.ml | ocaml | * Module types [T], [T1], [T2] ... etc. just wrap a single type [t] with an
increasing number of type parameters. We export them into the global
name-space.
* @closed
* {1 Containers}
* Types with an equality operation.
* Types with a partial order.
* Types with a minimum and maximum value.
* Numeric type... | include Toplevel
* @inline
* { 1 Standard types }
Utility modules for basic types , many of which shadow similar ones from the
OCaml standard library .
Utility modules for basic types, many of which shadow similar ones from the
OCaml standard library. *)
module Unit = Unit
module Bool = Bool
mod... |
2d5ded41ee73dc5500eac96ab8eb3f6c4886ea1888dbdca1b6f880d8b94ea438 | epiccastle/bbssh | agent.clj | (ns pod.epiccastle.bbssh.pod.agent
(:require [bbssh.impl.references :as references]
[bbssh.impl.utils :as utils]
[clojure.java.io :as io])
(:import [com.jcraft.jsch JSch Logger
IdentityRepository HostKeyRepository
ConfigRepository Identity]
[java.io InputSt... | null | https://raw.githubusercontent.com/epiccastle/bbssh/9e851095650d76c997f7fa73639b74bfb8043bad/src/clj/pod/epiccastle/bbssh/pod/agent.clj | clojure | pod.epiccastle.bbssh.pod.* are invoked on pod side. | (ns pod.epiccastle.bbssh.pod.agent
(:require [bbssh.impl.references :as references]
[bbssh.impl.utils :as utils]
[clojure.java.io :as io])
(:import [com.jcraft.jsch JSch Logger
IdentityRepository HostKeyRepository
ConfigRepository Identity]
[java.io InputSt... |
a82b907ad8cda0a94f3bec190a3cbdeb7fb985e3317e388a13bce23cba5ba373 | simmone/racket-simple-xlsx | ser-val-test.rkt | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../../../xlsx/xlsx.rkt")
(require "../../../../../sheet/sheet.rkt")
(require "../../../../../lib/lib.rkt")
(require"../../../../../xl/charts/lib.rkt")
(require racket/runtime-path)
(define-runtime-path ser_val_file "ser_val.xml")
... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/charts/lib/ser_val/ser-val-test.rkt | racket | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../../../xlsx/xlsx.rkt")
(require "../../../../../sheet/sheet.rkt")
(require "../../../../../lib/lib.rkt")
(require"../../../../../xl/charts/lib.rkt")
(require racket/runtime-path)
(define-runtime-path ser_val_file "ser_val.xml")
... | |
8d0e30256a79e54dee0dc0d030bf23494facf9fad95fe9ff0a1c48f349f8abb2 | msgpack/msgpack-haskell | Cpp.hs | {-# LANGUAGE QuasiQuotes, RecordWildCards, OverloadedStrings #-}
module Language.MessagePack.IDL.CodeGen.Cpp (
Config(..),
generate,
) where
import Data.Char
import Data.List
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import qualified Data.Text.Lazy.IO as LT
import System.FilePath
imp... | null | https://raw.githubusercontent.com/msgpack/msgpack-haskell/f52a5d2db620a7be70810eca648fd152141f8b14/msgpack-idl/Language/MessagePack/IDL/CodeGen/Cpp.hs | haskell | # LANGUAGE QuasiQuotes, RecordWildCards, OverloadedStrings #
TODO: FIX IT!
TODO: FIX |
module Language.MessagePack.IDL.CodeGen.Cpp (
Config(..),
generate,
) where
import Data.Char
import Data.List
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import qualified Data.Text.Lazy.IO as LT
import System.FilePath
import Text.Shakespeare.Text
import Language.MessagePack.IDL.Syntax... |
f8f00be932596572ecbb96243c3483e81e7e55ac12455a222b4fdc77edde2f96 | hgoes/vvt | LispKarr.hs | # LANGUAGE OverloadedStrings , ViewPatterns , GADTs #
module Realization.LispKarr where
import Karr
import Realization.Lisp
import qualified Data.Text as T
import qualified Data.AttoLisp as L
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Fix
import Language.SMTLib2
import Language.SMTLib2.Internal... | null | https://raw.githubusercontent.com/hgoes/vvt/dd2809753d7e5059d9103ea578f36afa8294cd84/Realization/LispKarr.hs | haskell | >>= namedDebugBackend "karr" | # LANGUAGE OverloadedStrings , ViewPatterns , GADTs #
module Realization.LispKarr where
import Karr
import Realization.Lisp
import qualified Data.Text as T
import qualified Data.AttoLisp as L
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Fix
import Language.SMTLib2
import Language.SMTLib2.Internal... |
86c6bc275f17eb1e92b19309ef2d59f8d61160bb6e4c841717025e422436a8fe | dyzsr/ocaml-selectml | norm2.ml | (* TEST
*)
let () = set_binary_mode_out stdout true in
(* ocamltest must normalise the \r\n *)
print_string "line1\r\nline2\r\n"; flush stdout
| null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocamltest/norm2.ml | ocaml | TEST
ocamltest must normalise the \r\n | let () = set_binary_mode_out stdout true in
print_string "line1\r\nline2\r\n"; flush stdout
|
4548d916255b66b3b0a9011287aa97f913d9a5021d9f1a225c2bac1dd52b24f2 | OCamlPro/typerex-lint | web_warnings_content.mli | (**************************************************************************)
(* *)
(* OCamlPro Typerex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-web/src/web_warnings_content.mli | ocaml | ************************************************************************
OCamlPro Typerex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU General Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
97cec541daa9f2c2b68234bfc3758e9f1297af8e55a935749904b522c982f107 | racket/web-server | use-redirect.rkt | #lang web-server/insta
;; A roster is a (roster names)
;; where names is a list of string.
(struct roster (names) #:mutable)
;; roster-add-name!: roster string -> void
;; Given a roster and a name, adds the name
to the end of the roster .
(define (roster-add-name! a-roster a-name)
(set-roster-names! a-roster
... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-doc/web-server/scribblings/tutorial/examples/use-redirect.rkt | racket | A roster is a (roster names)
where names is a list of string.
roster-add-name!: roster string -> void
Given a roster and a name, adds the name
start: request -> doesn't return
show-roster: request -> doesn't return | #lang web-server/insta
(struct roster (names) #:mutable)
to the end of the roster .
(define (roster-add-name! a-roster a-name)
(set-roster-names! a-roster
(append (roster-names a-roster)
(list a-name))))
(define ROSTER (roster '("kathi" "shriram" "dan")))
(define... |
b1f402b38720972ef4eb942e6c40c521c173a33a20c8208e372ad0a5ecef2181 | RefactoringTools/HaRe | LiftInLambda.hs | module LiftToToplevel.LiftInLambda where
foo :: IO [(Char,[Int])]
foo = do
let
xx = map (\b -> (b,uses declaredPns [b])) ['a','b']
return xx
where
uses pns t2 = everythingStaged pns [1..10]
declaredPns = undefined
everythingStaged = undefined
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftToToplevel/LiftInLambda.hs | haskell | module LiftToToplevel.LiftInLambda where
foo :: IO [(Char,[Int])]
foo = do
let
xx = map (\b -> (b,uses declaredPns [b])) ['a','b']
return xx
where
uses pns t2 = everythingStaged pns [1..10]
declaredPns = undefined
everythingStaged = undefined
| |
f091d549114c107fac43528553821edd2f75ebfc52f686f4cff534a6e410025e | billstclair/trubanc-lisp | lists.lisp | (in-package :alexandria)
(declaim (inline safe-endp))
(defun safe-endp (x)
(declare (optimize safety))
(endp x))
(defun alist-plist (alist)
"Returns a property list containing the same keys and values as the
association list ALIST in the same order."
(let (plist)
(dolist (pair alist)
(push (car pair... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/alexandria/lists.lisp | lisp | elements -- and this is WAY faster on most implementations then declaring
could return the tail without consing up a new list.
FIXME: should not cons | (in-package :alexandria)
(declaim (inline safe-endp))
(defun safe-endp (x)
(declare (optimize safety))
(endp x))
(defun alist-plist (alist)
"Returns a property list containing the same keys and values as the
association list ALIST in the same order."
(let (plist)
(dolist (pair alist)
(push (car pair... |
37f83f5f0354f490fdcbdc51d6b8e5d357ce8f9499411c0e40eb1af75b812aa9 | cloudant/chttpd | mock_request.erl | Copyright 2011 Cloudant
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
%% use this file except in compliance with the License. You may obtain a copy of
%% the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under t... | null | https://raw.githubusercontent.com/cloudant/chttpd/d20e9b66b9e51ac400f468aa442af461fc85a96f/test/mock_request.erl | erlang |
use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitation... | Copyright 2011 Cloudant
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(mock_request, [Socket, Method, RawPath, Version, Headers]).
-compile(export_all).
get_header_value(_) ->
undefined.
... |
a1853f8a6f6900c0dc1a3b7c695eb4ffbd3578dbb4dbddd026ac3add28ad4a88 | TerrorJack/ghc-alter | IOError002.hs | ! ! ! IOErrors should have defined
import System.IO
main = print (userError "urk" == userError "urk")
| null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/IOError002.hs | haskell | ! ! ! IOErrors should have defined
import System.IO
main = print (userError "urk" == userError "urk")
| |
61f2c2d419b869dda695182a8074f97ab08ac13e1fb8178008840a28b7f6e716 | cram-code/cram_core | test-condition.lisp | Copyright ( c ) 2012 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list o... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_process_modules/test/test-condition.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Red... | Copyright ( c ) 2012 , < >
* Neither the name of the Intelligent Autonomous Systems Group/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
d4ab9292776be5626e847bc3820345f523258b11ba5e0ff860506f73469de933 | binghe/cl-net-snmp | network.lisp | ;;;; -*- Mode: Lisp -*-
$ Id$
(in-package :snmp)
SOCKET - SYNC ( from old - UDP )
(defparameter *socket-sync-timeout* 2 "in seconds")
(defparameter *socket-sync-retries* 3 "in seconds")
(defun default-rtt-function (message) (values message 0))
(defun socket-sync (socket message &key
(max-r... | null | https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/network.lisp | lisp | -*- Mode: Lisp -*-
Define basic network operations
Work cycles
normal message
trap message: only send once
normal message
send again when got a snmp report
trap message: only send once | $ Id$
(in-package :snmp)
SOCKET - SYNC ( from old - UDP )
(defparameter *socket-sync-timeout* 2 "in seconds")
(defparameter *socket-sync-retries* 3 "in seconds")
(defun default-rtt-function (message) (values message 0))
(defun socket-sync (socket message &key
(max-receive-length +max-snmp-... |
907406fb3e3561cbf9b14d42ac9423cb7b9a5f07bb88d369dfafa2893e033da1 | keera-studios/keera-hails | HLintMain.hs | -----------------------------------------------------------------------------
-- |
-- Module : Main (hlint)
Copyright : ( C ) 2013
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : provisional
-- Portability : portable
--
-- This module runs HLint on the lens... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/demos/keera-hails-demos-gtk/tests/HLintMain.hs | haskell | ---------------------------------------------------------------------------
|
Module : Main (hlint)
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
This module runs HLint on the lens source tree.
------------------------------------------------------------... | Copyright : ( C ) 2013
Maintainer : < >
module Main where
import Control.Monad
import Language.Haskell.HLint
import System.Environment
import System.Exit
main :: IO ()
main = do
args <- getArgs
hints <- hlint $ ["src", "--cross", "--hint=tests/HLint.hs" ] ++ args
unless (null hints) exit... |
e8be4900705a0dacb26481176f4e193703687b86a360a78795a8ae2e8e4575c5 | kdltr/chicken-core | scrutinizer-tests.scm | ;;; scrutinizer unit tests
(import-for-syntax
(chicken format)
(chicken compiler scrutinizer))
(define-for-syntax success #t)
(define-syntax test
(er-macro-transformer
(lambda (expr rename _)
(define extra-fail-info '())
(define (add-fail-info msg)
(set! extra-fail-info (cons (string-append... | null | https://raw.githubusercontent.com/kdltr/chicken-core/b2e6c5243dd469064bec947cb3b49dafaa1514e5/tests/scrutinizer-tests.scm | scheme | scrutinizer unit tests
invert test
subtype or type equality
subtype
type equality
fuzzy match (both directions)
fuzzy non-match (both directions)
strict non-match (both directions)
A refined with B gives C
wildcards
structs
undefined
noreturn
booleans
numbers
vectors
pairs
lists
ports
unions
negati... |
(import-for-syntax
(chicken format)
(chicken compiler scrutinizer))
(define-for-syntax success #t)
(define-syntax test
(er-macro-transformer
(lambda (expr rename _)
(define extra-fail-info '())
(define (add-fail-info msg)
(set! extra-fail-info (cons (string-append " " msg) extra-fail-info)... |
caa5062974beb5ebda04919907117611df165039b6666dc30e7f12f010493778 | simmone/racket-simple-xlsx | sharedStrings-test.rkt | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../xlsx/xlsx.rkt")
(require "../../../lib/lib.rkt")
(require "../../../lib/sheet-lib.rkt")
(require"../../../xl/sharedStrings.rkt")
(require racket/runtime-path)
(define-runtime-path shared_strings_file "sharedStrings_test.xml")
(... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/sharedStrings/sharedStrings-test.rkt | racket | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../xlsx/xlsx.rkt")
(require "../../../lib/lib.rkt")
(require "../../../lib/sheet-lib.rkt")
(require"../../../xl/sharedStrings.rkt")
(require racket/runtime-path)
(define-runtime-path shared_strings_file "sharedStrings_test.xml")
(... | |
c77e5082e5a81120b2ab278b300edb5c4fe0c16f4b3f858c75bbc2103da7f957 | tweag/ormolu | comments-inside-imports.hs | import -- x
Foo
import -- x
qualified Bar
import qualified
-- x
Baz
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/import/comments-inside-imports.hs | haskell | x
x
x | Foo
qualified Bar
import qualified
Baz
|
dc77f13f5204afc48edfe7df6d1be2fa0597ddfee26a2784a618aaeb605bb2f4 | zgbjgg/dasherl | dasherl_gunicorn_worker.erl | -module(dasherl_gunicorn_worker).
-behaviour(gen_server).
%% API
-export([start_link/1,
stop/1,
run_server/1,
setup_callback/4]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-include("dasherl.hrl").
% the values... | null | https://raw.githubusercontent.com/zgbjgg/dasherl/78c0345bded3ef263d276774fcb308976056d227/src/dasherl_gunicorn_worker.erl | erlang | API
gen_server callbacks
the values can be override during initialization
actually settings can be set from config but also can be passed as an
argument of init gen_server
start the py process and initializes its importing modules
initialize gunicorn with dasherl and hold in a process
before run server.
from p... | -module(dasherl_gunicorn_worker).
-behaviour(gen_server).
-export([start_link/1,
stop/1,
run_server/1,
setup_callback/4]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-include("dasherl.hrl").
-record(state, {py_pid = undefined :: pid()... |
49a02bbdc9f39d41210a38f586a945519f237ca7c0220bca5bc8c4d81e3be44b | tuhlmann/permissions | permissions.cljc | (ns agynamix.permissions
(:require [clojure.string :as str]))
(def wildcard-token "*")
(def empty-permission-token "")
(def part-divider ":")
(def subpart-divider ",")
(defrecord Permission [domain ;; a keyword
actions ;; a set of string
entities] ;; a set of string... | null | https://raw.githubusercontent.com/tuhlmann/permissions/80636384aaf488073ef0e648b60139dbb1fa5e0c/src/agynamix/permissions.cljc | clojure | a keyword
a set of string
a set of string | (ns agynamix.permissions
(:require [clojure.string :as str]))
(def wildcard-token "*")
(def empty-permission-token "")
(def part-divider ":")
(def subpart-divider ",")
Object
(toString [_] (str (name domain) ":" (str/join "," (map name actions)) ":" (str/join "," (map name entities)))))
(def wildcard-permissio... |
94c88dd0f96ee8c07951429d24157ad6547cb18c8b0c06d63823ac27c5397a40 | yminsky/core-hello-world | common.ml | open Core
open Async
let port =
let open Command.Let_syntax in
let%map_open port =
flag "-port" (optional_with_default 8124 int) ~doc:" Broker's port"
in
port
let host_port_pair =
let open Command.Let_syntax in
let%map_open port = port
and host = flag "-hostname" (optional_with_default "127.0.0.1" s... | null | https://raw.githubusercontent.com/yminsky/core-hello-world/48449ddb9e1d7abf103d128eb984f1f9429a1c6f/broker/common.ml | ocaml | open Core
open Async
let port =
let open Command.Let_syntax in
let%map_open port =
flag "-port" (optional_with_default 8124 int) ~doc:" Broker's port"
in
port
let host_port_pair =
let open Command.Let_syntax in
let%map_open port = port
and host = flag "-hostname" (optional_with_default "127.0.0.1" s... | |
47b0418771f5163e768a6861c5471fcbb79749c48b9c132a7d855e53ecae8a07 | cedlemo/OCaml-GObject-Introspection | gi_repository.ml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection 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 o... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/samples/gi_repository.ml | ocaml | print_endline ("Shared library: " ^ shared_lib);
let dependencies = Repository.get_immediate_dependencies (Some repo) namespace in
List.iter (fun x -> print_endline ("\t dep. : " ^ x)) dependencies; |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection 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 o... |
d40c93bcfbb67c8ed9104779986facf7e73652def2d918ae839f53f1d738e076 | g000001/arc-compat | readtable-setup.lisp | (cl:in-package :cl-user)
(let ((*readtable* (named-readtables:find-readtable :arc)))
(map nil
(lambda (c)
(set-macro-character c
#'arc-compat.internal::compose-reader-macro-reader
t ))
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst... | null | https://raw.githubusercontent.com/g000001/arc-compat/2506c0717ba5564695af5bd216d6d88236b3b6cd/readtable-setup.lisp | lisp | (cl:in-package :cl-user)
(let ((*readtable* (named-readtables:find-readtable :arc)))
(map nil
(lambda (c)
(set-macro-character c
#'arc-compat.internal::compose-reader-macro-reader
t ))
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst... | |
253db121e957f51372245f06a08f3cbdb0d0fca5baa1fcbcadd54e25fb37bbcd | sdiehl/llvm-codegen | Intrinsics.hs | # LANGUAGE NoImplicitPrelude #
module LLVM.Codegen.Intrinsics where
import LLVM.General.AST
import LLVM.Codegen.Types
import LLVM.Codegen.Module
-------------------------------------------------------------------------------
Math Intrinsics
--------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/llvm-codegen/6a88ecb4bc5af53491e5013d6a61181a2eeb41df/src/LLVM/Codegen/Intrinsics.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
| Math intrinsics
-----------------------------------------------------------------------------
Memory Intrinsics
------------------------------------------------... | # LANGUAGE NoImplicitPrelude #
module LLVM.Codegen.Intrinsics where
import LLVM.General.AST
import LLVM.Codegen.Types
import LLVM.Codegen.Module
Math Intrinsics
sin = intrinsic f64 "llvm.sin.f64" [f64]
cos = intrinsic f64 "llvm.cos.f64" [f64]
tan = intrinsic f64 "llvm.tan.f64" [f64]
sqrt = intrinsic f64 "... |
162875955f84122e499dc9a4191bd7b94fa3b0f9372bf62b7366ac9e15982638 | ocamllabs/ocaml-modular-implicits | api.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-dynlink-native/sub/api.mli | ocaml | *********************************************************************
OCaml
... | , LexiFi
Copyright 2007 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 .
val f : int -> int
|
34aee81b9e90678741de6a1506320989ed9cf30fbf42ef56076d7896a9518bf1 | informatimago/lisp | intersection-cl-r5rs.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : intersection-cl-r5rs.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
An intersection of R5RS and Commo... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/intersection-cl-r5rs.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
programs using only operators in the intersection with Common
LEGAL
GPL
This program is free software; you can redistribute it and/o... | FILE : intersection-cl-r5rs.lisp
USER - INTERFACE :
An intersection of R5RS and Common Lisp .
This is a Common - Lisp program that let one load scheme
.
< PJB > < >
MODIFICATIONS
2009 - 07 - 26 < PJB > Created
Copyright 2009 - 2016
modify it under the te... |
c18128e7187c37122a5afd316e83a5fe64501fb626bccdcc635dfe40507f3108 | amitayh/elm-cljs | project.clj | (defproject elm-cljs "0.1.0-SNAPSHOT"
:description "Attempting to implement The Elm Architecture™ in ClojureScript"
:url "-cljs"
:license {:name "MIT License"
:url ""}
:min-lein-version "2.7.1"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.854"]
... | null | https://raw.githubusercontent.com/amitayh/elm-cljs/a451962844f8d96adc0d7bbcab8ddc97f6e8209e/project.clj | clojure | The presence of a :figwheel configuration here
will cause figwheel to inject the figwheel client
into your build
:on-jsload "elm-cljs.app/on-js-reload"
:open-urls will pop open your application
started and compiled your application.
Comment this out once it no longer serves you.
-devtools
This next build is a ... | (defproject elm-cljs "0.1.0-SNAPSHOT"
:description "Attempting to implement The Elm Architecture™ in ClojureScript"
:url "-cljs"
:license {:name "MIT License"
:url ""}
:min-lein-version "2.7.1"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.854"]
... |
00dce8b1091ad74952c7d33d3fda14fc84cd972399151aa82dc3475d0d01e7bd | sirherrbatka/clusters | generics.lisp | (cl:in-package #:clusters)
(defgeneric parallel-p (parameters))
(defgeneric parameters (result))
(defgeneric cluster-contents (result))
(defgeneric silhouette (result))
(defgeneric data (result))
(defgeneric key-function (parameters))
(defgeneric algorithm-state-initialization-list
(parameters data &rest argument... | null | https://raw.githubusercontent.com/sirherrbatka/clusters/20b8b60005ac8e27d12d05d277b26d8b5ca5c238/source/common/generics.lisp | lisp | (cl:in-package #:clusters)
(defgeneric parallel-p (parameters))
(defgeneric parameters (result))
(defgeneric cluster-contents (result))
(defgeneric silhouette (result))
(defgeneric data (result))
(defgeneric key-function (parameters))
(defgeneric algorithm-state-initialization-list
(parameters data &rest argument... | |
6bb21af8290cdefe98df26d36a67c479aa452430f51b55bb21dba40997149b36 | metasoarous/odum | start.cljs | (ns odum.start
(:require [odum.app :as app]
[dat.view :as view]
[taoensso.timbre :as log :include-macros true]))
(defn on-js-reload []
(log/info "------ Figwheel Has Reloaded ------"))
;(do
;;;(app/main)
;(view/dispatch! (:app app/system) [:figwheel/reload nil])))
;(app/main)
| null | https://raw.githubusercontent.com/metasoarous/odum/92965d14c8f5702a1bdbfcfb2e44ebbfa41c8cab/dev/cljs/odum/start.cljs | clojure | (do
(app/main)
(view/dispatch! (:app app/system) [:figwheel/reload nil])))
(app/main) | (ns odum.start
(:require [odum.app :as app]
[dat.view :as view]
[taoensso.timbre :as log :include-macros true]))
(defn on-js-reload []
(log/info "------ Figwheel Has Reloaded ------"))
|
9488a587eef77d7733912116905f0f7c40d3b23ad253f6c5bd67fb5e2522d878 | cram2/cram | occupancy-grid.lisp | Copyright ( c ) 2010 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list o... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_common/cram_location_costmap/src/occupancy-grid.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Red... | Copyright ( c ) 2010 , < >
* Neither the name of the Intelligent Autonomous Systems Group/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
22826a9f880214fac1b34b0765d34ca8bf5a7e1de0c0eae3c4a7124fb77dff36 | BardurArantsson/cqrs | Migrations.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.CQRS.PostgreSQL.Migrations
( Schema(..) -- Re-export
, migrate
, migrateKVStore
) where
import qualified Database.Peregrin as P
import Database.Peregrin (QP(..))
import Database.Peregrin.Metadata (Schema(..))
import Database.P... | null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-postgresql/src/Data/CQRS/PostgreSQL/Migrations.hs | haskell | # LANGUAGE OverloadedStrings #
Re-export
functionality.
| Apply all necessary migrations to use a key-value store. It is
functionality; doing so is not supported. | module Data.CQRS.PostgreSQL.Migrations
, migrate
, migrateKVStore
) where
import qualified Database.Peregrin as P
import Database.Peregrin (QP(..))
import Database.Peregrin.Metadata (Schema(..))
import Database.PostgreSQL.Simple (Connection, Only(..))
import Data.CQR... |
397106ad245156cc092c6dc43765c68c5bd3b94499080dc4634b3ff9f0d94ff7 | alaricsp/chicken-scheme | irregex.scm | irregex.scm -- IrRegular Expressions
;;
Copyright ( c ) 2005 - 2008 . All rights reserved .
;; BSD-style license:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; At this moment there was a loud ring at the bell, and I could
hear Mrs. , our landlady , raising her voice in a wail ... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/irregex.scm | scheme |
BSD-style license:
At this moment there was a loud ring at the bell, and I could
expostulation and dismay.
they are really after us."
"No, it's not quite so bad as that. It is the unofficial
History
friendlier error messages in parsing, \Q..\E support
normal strin... | irregex.scm -- IrRegular Expressions
Copyright ( c ) 2005 - 2008 . All rights reserved .
hear Mrs. , our landlady , raising her voice in a wail of
" By heaven , , " I said , half rising , " I believe that
force , -- the Baker Street irregulars . "
0.6.2 : 2008/07/26 - minor bugfixes , allow global d... |
6858dc18e14f63c50adc85f040fbba19247b7ec8f5f700c38a6e22b1a3193bb9 | huangz1990/real-world-haskell-cn | BloomFilter.hs | module BloomFilter
(
Bloom
, length
, elem
, notElem
, fromList
) where
import BloomFilter.Internal
import BloomFilter.Mutable (insert, new)
import Data.Array.ST (runSTUArray)
import Data.Array.IArray ((!), bounds)
import Data.Word (Word32)
import Prelude hiding (elem, length, notElem)
length :: Bloom a -> Int... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch26/BloomFilter.hs | haskell | family of hash functions to use
number of bits in filter
values to populate with | module BloomFilter
(
Bloom
, length
, elem
, notElem
, fromList
) where
import BloomFilter.Internal
import BloomFilter.Mutable (insert, new)
import Data.Array.ST (runSTUArray)
import Data.Array.IArray ((!), bounds)
import Data.Word (Word32)
import Prelude hiding (elem, length, notElem)
length :: Bloom a -> Int... |
536239a55d1e241f2f35b2754bcb69a4999c73eae4e9e2628070ce847ff6d230 | lem-project/lem | main.lisp | (defpackage :lem-jsonrpc
(:use :cl :lem)
(:export :notify
:params
:define-notification-method))
(in-package :lem-jsonrpc)
(defclass jsonrpc (implementation)
()
(:default-initargs
:name :jsonrpc
:native-scroll-support t
:redraw-after-modifying-floating-window nil))
(defvar *mode*... | null | https://raw.githubusercontent.com/lem-project/lem/7308ae9e77f558b7c040300b00b2764d88bd5158/frontends/jsonrpc/main.lisp | lisp | (defpackage :lem-jsonrpc
(:use :cl :lem)
(:export :notify
:params
:define-notification-method))
(in-package :lem-jsonrpc)
(defclass jsonrpc (implementation)
()
(:default-initargs
:name :jsonrpc
:native-scroll-support t
:redraw-after-modifying-floating-window nil))
(defvar *mode*... | |
7316c2c5595a324ff528996326d6581fef0acd5c1eaceabd637a418df0edab4b | binaryage/chromex | identity_private.cljs | (ns chromex.app.identity-private (:require-macros [chromex.app.identity-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn set-consent-result* [config result window-id]
(gen-wr... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/identity_private.cljs | clojure | -- events ----------------------------------------------------------------------------------------------------------------- | (ns chromex.app.identity-private (:require-macros [chromex.app.identity-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn set-consent-result* [config result window-id]
(gen-wr... |
c32293d15024a21314a46d63a6b4d6c4f7edd2c3fe9840be8cc791cc946395c7 | yetanalytics/flint | path.cljc | (ns com.yetanalytics.flint.format.path
(:require [clojure.string :as cstr]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]))
(defmethod f/format-ast-node :path/op [_ [_ op]] (keyword op))
(defmethod f/format-ast-node :path/paths [_ [_ paths]] paths)
(defn- parens... | null | https://raw.githubusercontent.com/yetanalytics/flint/787636a10ab7763faa8c481d7b543a8022e73f8e/src/main/com/yetanalytics/flint/format/path.cljc | clojure | (ns com.yetanalytics.flint.format.path
(:require [clojure.string :as cstr]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]))
(defmethod f/format-ast-node :path/op [_ [_ op]] (keyword op))
(defmethod f/format-ast-node :path/paths [_ [_ paths]] paths)
(defn- parens... | |
b1989394c3bf97b4fc89afdd5012628fd2edf5eb3a14af41192fe0ae7e6929bb | spechub/Hets | PatternEq.hascasl.hs |
types :
A__s : : ( * , data )
A__t : : ( * , data )
values :
a : : : : : : A__t
x : : : : A__t
A__s : : A__t
scope :
Prelude . > Prelude . A__s , Type [ A__s ] [ ]
Prelude . > Prelude . A__s , con of A__s
Prelude . A__t |- > Prelude . A__t , Type [ A__t ] [ ]
Prelude . A__t ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/ToHaskell/test/PatternEq.hascasl.hs | haskell | A__t |
types :
A__s : : ( * , data )
A__t : : ( * , data )
values :
a : : : : : : A__t
x : : : : A__t
A__s : : A__t
scope :
Prelude . > Prelude . A__s , Type [ A__s ] [ ]
Prelude . > Prelude . A__s , con of A__s
Prelude . A__t |- > Prelude . A__t , Type [ A__t ] [ ]
Prelude . A__t ... |
1c0e71d04d92f8c5eab398c4b5d9cd729fa7a902e72790b3ae37c79eeb41852a | MercuryTechnologies/slack-web | PagerSpec.hs | module Web.Slack.PagerSpec (spec) where
import Data.Text qualified as Text
-- time
import Data.Time.Clock (addUTCTime, nominalDay)
import Test.Pull.Fake.IO (FakeStream, newFakeStream, pull)
import TestImport
import Web.Slack.Common
( Message (..),
MessageType (..),
SlackMessageText (..),
mkSlackTimestamp... | null | https://raw.githubusercontent.com/MercuryTechnologies/slack-web/21741b958474d7221edd9ebd00c1213b454bdaa5/tests/Web/Slack/PagerSpec.hs | haskell | time
According to ,
The last page's cursor can be either an empty string, null, or non-exisitent in the object.
| Runs the given action repeatedly until it returns an empty list. | module Web.Slack.PagerSpec (spec) where
import Data.Text qualified as Text
import Data.Time.Clock (addUTCTime, nominalDay)
import Test.Pull.Fake.IO (FakeStream, newFakeStream, pull)
import TestImport
import Web.Slack.Common
( Message (..),
MessageType (..),
SlackMessageText (..),
mkSlackTimestamp,
)
im... |
bc43c3bc4007d138d526b855e809c442c2aaf41f3a8b35bd4e4369ec34c11134 | google-research/dex-lang | API.hs | Copyright 2020 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
module Dex.Foreign.API where
import Foreign.Ptr
import Foreign.C
import Dex.Foreign.Context
import Dex.Foreign.Serialize
import Dex.Foreign.JIT
-- Publi... | null | https://raw.githubusercontent.com/google-research/dex-lang/d9f66ff4b32d1f94dd472aacc6555fb8daafd05c/src/Dex/Foreign/API.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
Public API (commented out exports are defined in rts.c)
Initialization and basic runtime
foreign export ccall "dexInit" _ :: IO ()
foreign export ccall "dexFini" _ :: IO ()
foreig... | Copyright 2020 Google LLC
module Dex.Foreign.API where
import Foreign.Ptr
import Foreign.C
import Dex.Foreign.Context
import Dex.Foreign.Serialize
import Dex.Foreign.JIT
foreign export ccall "dexCreateContext" dexCreateContext :: IO (Ptr Context)
foreign export ccall "dexDestroyContext" dexDestroyContext :: P... |
b65b2373fbafb663346cb9285df34fd6040c56f3393554baa384ac23fe08b326 | footprintanalytics/footprint-web | view_log.clj | (ns metabase.models.view-log
"The ViewLog is used to log an event where a given User views a given object such as a Table or Card (Question)."
(:require [metabase.models.interface :as mi]
[metabase.util :as u]
[toucan.models :as models]))
(models/defmodel ViewLog :view_log)
(doto ViewLog
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/models/view_log.clj | clojure | (ns metabase.models.view-log
"The ViewLog is used to log an event where a given User views a given object such as a Table or Card (Question)."
(:require [metabase.models.interface :as mi]
[metabase.util :as u]
[toucan.models :as models]))
(models/defmodel ViewLog :view_log)
(doto ViewLog
... | |
98350c7e0ac91cfcd4e20b2f9138a1be0aee76a648cd252e4136c61d62bd8bdb | drewt/scmus | display.scm | ;;
Copyright 2014 - 2020
;;
;; 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 2 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in ... | null | https://raw.githubusercontent.com/drewt/scmus/5041ec376cb17db463117b8fa212b16b23fe770d/src/tui/display.scm | scheme |
This program is free software; you can redistribute it and/or
either version 2 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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright 2014 - 2020
modify it under the terms of the GNU General Public License as
You should have received a copy of the GNU General Public License
(module (scmus tui display)
(current-cursed
color->number
safe-color->number
attr->number
call-with-cursed
with-cursed
palette... |
f5afb5bcd168b857a41c68d01b95bf53d8cc985240434f26665fc3c51853cfab | msp-strath/ask | HardwiredRules.hs | module Ask.Src.HardwiredRules where
import qualified Data.Map as M
import Ask.Src.Bwd
import Ask.Src.Tm
import Ask.Src.RawAsk
import Ask.Src.Context
myFixities :: FixityTable
myFixities = M.fromList
[ ("=", (4, NAsso))
, ("&", (3, RAsso))
, ("|", (2, RAsso))
, ("->", (1, RAsso))
]
myPreamble :: Context
my... | null | https://raw.githubusercontent.com/msp-strath/ask/96f3e8a0ae577cdb4633a30924a16c95b4e09bc0/Src/HardwiredRules.hs | haskell | boo! hiss! | module Ask.Src.HardwiredRules where
import qualified Data.Map as M
import Ask.Src.Bwd
import Ask.Src.Tm
import Ask.Src.RawAsk
import Ask.Src.Context
myFixities :: FixityTable
myFixities = M.fromList
[ ("=", (4, NAsso))
, ("&", (3, RAsso))
, ("|", (2, RAsso))
, ("->", (1, RAsso))
]
myPreamble :: Context
my... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.