_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 |
|---|---|---|---|---|---|---|---|---|
61e8271d5eebe2508ea2d21778e77550f28020a6ac5cd274755b80bab9f82287 | multimodalrouting/osm-fulcro | osm_helper.cljs | (ns app.model.osm-helper
(:require
[app.model.osm :as osm]
[clojure.string :as string]
[clojure.core.reducers :as r]
["d3" :as d3]
))
(defn closest [{:keys [lat lon]} nodes]
"find the closest node from the given latitude and longitude that has a tag"
(->> (vec nodes)
(map val)
(... | null | https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/model/osm_helper.cljs | clojure | (ns app.model.osm-helper
(:require
[app.model.osm :as osm]
[clojure.string :as string]
[clojure.core.reducers :as r]
["d3" :as d3]
))
(defn closest [{:keys [lat lon]} nodes]
"find the closest node from the given latitude and longitude that has a tag"
(->> (vec nodes)
(map val)
(... | |
9936b4cb07498424b638e07f995930a7850b793404014a3de36855c801bee8b9 | ghedamat/reagent-react-router | project.clj | (defproject reagent-react-router-demo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[cljsjs/react "0.12.2-5"]
... | null | https://raw.githubusercontent.com/ghedamat/reagent-react-router/4eb082847a9fde3a3232f4dbb70e2c96a1435df6/react-router-example/project.clj | clojure | :externs ["react/externs/react.js"] | (defproject reagent-react-router-demo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[cljsjs/react "0.12.2-5"]
... |
ecd02cdf0a416c2a9a0a60fcb84c695cdf8845704c5f23e317088b5efdf4c9ee | Bogdanp/racket-gui-extra | extra.rkt | #lang racket/base
(require "extra/private/platform.rkt")
(provide (all-from-out "extra/private/platform.rkt"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-gui-extra/0760650cc1968db396e175c042e97ca597927739/gui-extra-lib/gui/extra.rkt | racket | #lang racket/base
(require "extra/private/platform.rkt")
(provide (all-from-out "extra/private/platform.rkt"))
| |
0ac419dbdb4fa0806243dda5ef267d8051812c84145970b2cfa571934078ffc0 | weblocks-framework/weblocks | sandbox.lisp |
(in-package :employer-employee)
;;; Custom copying from stores to sandbox users
(defun init-sandbox-store ()
"Copies the fixtures from the disk store to a sandbox store (to
ensure users have their own non-peristant sandboxes)."
(let ((sandbox-store (open-store :memory))
(fixtures-store (open-store :preval... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/yarek/examples/employer-employee/src/sandbox.lisp | lisp | Custom copying from stores to sandbox users
Instances of our model should be obtained from the sandbox store |
(in-package :employer-employee)
(defun init-sandbox-store ()
"Copies the fixtures from the disk store to a sandbox store (to
ensure users have their own non-peristant sandboxes)."
(let ((sandbox-store (open-store :memory))
(fixtures-store (open-store :prevalence
(merge-... |
b7d9c89993ab2f59885d441eb55877afc0fd3ab3e80a6fe0fc28da72d0ec2188 | haskell-servant/servant-quickcheck | QuickCheck.hs | | @Servant . QuickCheck@ provides utilities related to using QuickCheck over an API .
-- Rather than specifying properties that individual handlers must satisfy,
-- you can state properties that ought to hold true of the entire API.
--
-- While the API must be described with @servant@ types, the server being
-- teste... | null | https://raw.githubusercontent.com/haskell-servant/servant-quickcheck/0535413b1a1e3f3e3f4dfdc3199761774513cce6/src/Servant/QuickCheck.hs | haskell | Rather than specifying properties that individual handlers must satisfy,
you can state properties that ought to hold true of the entire API.
While the API must be described with @servant@ types, the server being
tested itself need not be implemented with @servant-server@ (or indeed,
The documentation of the <#us... | | @Servant . QuickCheck@ provides utilities related to using QuickCheck over an API .
written in ) .
module Servant.QuickCheck
(
serverSatisfies
, not500
, notLongerThan
, onlyJsonObjects
, honoursAcceptHeader
, notAllowedContainsAllowHeader
, unauthorizedContainsWWWAuthenticate
, getsHaveLast... |
a6b07d9502358485c54194450171c8fc56cfd11ad70253764ad7f734c9a4c012 | mirage/irmin | test.ml |
* Copyright ( c ) 2020 < >
* Copyright ( c ) 2020 Anirudh Sunder Raj < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
* ... | null | https://raw.githubusercontent.com/mirage/irmin/09c0226673906c738e8036e7f58ecb8dce6848ba/test/irmin-containers/test.ml | ocaml |
* Copyright ( c ) 2020 < >
* Copyright ( c ) 2020 Anirudh Sunder Raj < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
* ... | |
e0b6cf7d8285fbbce3e2a275bd0a30545f95e0912045aa6eb0ca2beddd67622f | nikita-volkov/rebase | Contravariant.hs | module Rebase.Data.Functor.Contravariant
(
module Data.Functor.Contravariant
)
where
import Data.Functor.Contravariant
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Functor/Contravariant.hs | haskell | module Rebase.Data.Functor.Contravariant
(
module Data.Functor.Contravariant
)
where
import Data.Functor.Contravariant
| |
2033cebc69e5cdb9411fb0dcdb24f64779ac36051734cf2c79cae12a204668bc | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-securitycenter/gen/Gogol/SecurityCenter/Organizations/NotificationConfigs/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Lists notification configs.
* Resource
** Constructing a Request
| A resource alias for @securitycenter.organizations.notificationConfigs.list@ method which the
| Lists notification configs.
/See:/ 'newSecurityCenterOrganiz... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
19ac20f312df9ecaead38d435a981d1c2550825c55da9506dc8c3ba33fe662da | graninas/Functional-Design-and-Architecture | LogicControlSpec.hs | module Andromeda.LogicControlSpec where
import Test.Hspec
import Andromeda
import Andromeda.Assets (createBoosters, aaaController86Name)
import Andromeda.Assets.Vendors.AAA.HardwareService (aaaHardwareService)
import qualified Andromeda.Hardware.Impl.Device.Types as TImpl
import qualified Andromeda.Hardware.Impl.Se... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/f19c1fc5c28014545d4098edf8fc438d93e66048/Second-Edition-Manning-Publications/BookSamples/CH06/Section6p2/test/Andromeda/LogicControlSpec.hs | haskell | module Andromeda.LogicControlSpec where
import Test.Hspec
import Andromeda
import Andromeda.Assets (createBoosters, aaaController86Name)
import Andromeda.Assets.Vendors.AAA.HardwareService (aaaHardwareService)
import qualified Andromeda.Hardware.Impl.Device.Types as TImpl
import qualified Andromeda.Hardware.Impl.Se... | |
faa86c1ce242252acf7dbfde073f97311c3f1f636b1959152dde31ecb2cb0bbc | roblaing/erlang-webapp-howto | webutil.erl | %% @doc Helper functions for my simple templating system.
-module(webutil).
-export([template/2]).
-spec template(FileName :: file:filename(), ArgList :: [string()]) -> Html :: chars().
%% @doc Reads an html file from its complete path name, and inserts strings without escaping `<' or `>'.
template(FileName, ArgList) ... | null | https://raw.githubusercontent.com/roblaing/erlang-webapp-howto/e1731dfc4e2cfdfee88e982d67155b83acd5cc04/unit2/apps/unit2/src/webutil.erl | erlang | @doc Helper functions for my simple templating system.
@doc Reads an html file from its complete path name, and inserts strings without escaping `<' or `>'. | -module(webutil).
-export([template/2]).
-spec template(FileName :: file:filename(), ArgList :: [string()]) -> Html :: chars().
template(FileName, ArgList) ->
{ok, Binary} = file:read_file(FileName),
io_lib:format(Binary, ArgList).
|
9d502d93129c6b98b5ee95e2ac7e27dba0e583c43355cd087f69099f23229130 | simmone/racket-simple-xlsx | freeze-test.rkt | #lang racket
(require rackunit/text-ui rackunit)
(require "../../../../main.rkt")
(require racket/runtime-path)
(define-runtime-path freeze_file "freeze.xlsx")
(define-runtime-path freeze_read_and_write_file "freeze_read_and_write.xlsx")
(define test-writer
(test-suite
"test-writer"
(test-case
"test-fr... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/write-and-read/style/freeze/freeze-test.rkt | racket | (void) | #lang racket
(require rackunit/text-ui rackunit)
(require "../../../../main.rkt")
(require racket/runtime-path)
(define-runtime-path freeze_file "freeze.xlsx")
(define-runtime-path freeze_read_and_write_file "freeze_read_and_write.xlsx")
(define test-writer
(test-suite
"test-writer"
(test-case
"test-fr... |
56e166e9d17cd58c6ab8e72e1624e46184584fbab4e577f39596b26022e4246c | robrix/Manifold | Env.hs | # LANGUAGE DeriveFunctor , ExistentialQuantification , FlexibleContexts , GADTs , PolyKinds , StandaloneDeriving , TypeOperators #
module Manifold.Abstract.Env where
import qualified Data.Set as Set
import Manifold.Constraint
import Manifold.Context
import Manifold.Abstract.Evaluator
import Manifold.Name
import Manifo... | null | https://raw.githubusercontent.com/robrix/Manifold/3cc7a49c90b9cc7d1da61c532d0ee526ccdd3474/src/Manifold/Abstract/Env.hs | haskell | # LANGUAGE DeriveFunctor , ExistentialQuantification , FlexibleContexts , GADTs , PolyKinds , StandaloneDeriving , TypeOperators #
module Manifold.Abstract.Env where
import qualified Data.Set as Set
import Manifold.Constraint
import Manifold.Context
import Manifold.Abstract.Evaluator
import Manifold.Name
import Manifo... | |
a730fec747df8ef9e6c48ce33bef0ef231258c84737255d1e9993e8b537e0f47 | nd/sicp | 3.3.scm | (define (make-account balance pswd)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount))
balance)
"Not enough money"))
(define (deposit amount)
(set! balance (+ balance amount))
balance)
(define (dispatch m p)
(if (eq? p pswd)
... | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch03/3.3.scm | scheme | (define (make-account balance pswd)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount))
balance)
"Not enough money"))
(define (deposit amount)
(set! balance (+ balance amount))
balance)
(define (dispatch m p)
(if (eq? p pswd)
... | |
de54e4ea9a5be4c14677587d4512e4eea2d353ce7e90494e8906734e13522a9c | Smoltbob/Caml-Est-Belle | sierpinsky_ocaml.ml | open Printf
let rec for3 x y size =
let a = "* " in
let b = " " in
let c = x land y in
if x < size then
if c = 0 then printf "%s" a else printf "%s" b
else ();
let x = x + 1 in
let test = x + y in
if test < size then for3 x y size else ()
let rec for2 i y size =
if y > 0... | null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/Sierpinsky/sierpinsky_ocaml.ml | ocaml | open Printf
let rec for3 x y size =
let a = "* " in
let b = " " in
let c = x land y in
if x < size then
if c = 0 then printf "%s" a else printf "%s" b
else ();
let x = x + 1 in
let test = x + y in
if test < size then for3 x y size else ()
let rec for2 i y size =
if y > 0... | |
ef8f1c9c72ad738780b088107cefc4da68d53913c09374ec684aa249fb0075d1 | Odie/gd-edit | db_utils.clj | (ns gd-edit.db-utils
"Collection of functions that deals with fetching and interpreting game data."
(:require [clojure.string :as str]
[gd-edit.utils :as u]
[gd-edit.globals :as globals]
[clojure.set :as set]
[com.rpl.specter :as s]
[me.raynes.fs :as fs]
... | null | https://raw.githubusercontent.com/Odie/gd-edit/d1ac46fd6eb89c9571199641d9cc2f95e68d139b/src/gd_edit/db_utils.clj | clojure | Collect all values in the record that look like a db record
Retrieve all related records by name
If we can't find a base name for the item, this is not a valid item
We can't generate a name for an invalid item
If we've found an item with a unique name, just return the name without any
prefix or suffix
Otherwise,... | (ns gd-edit.db-utils
"Collection of functions that deals with fetching and interpreting game data."
(:require [clojure.string :as str]
[gd-edit.utils :as u]
[gd-edit.globals :as globals]
[clojure.set :as set]
[com.rpl.specter :as s]
[me.raynes.fs :as fs]
... |
bda9d4628dea97a1d09b17f0811cf05b8f3fda542f31cca66293840ff17f5358 | erlyaws/yaws | copy_error_log_SUITE.erl | -module(copy_error_log_SUITE).
-include("testsuite.hrl").
-compile(export_all).
all() ->
[
error_log_handler
].
groups() ->
[
].
%%====================================================================
init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
ok.
init_per_group(_Grou... | null | https://raw.githubusercontent.com/erlyaws/yaws/9de3b06306698ff7b7d33d42e0a98438c22f6f88/testsuite/copy_error_log_SUITE.erl | erlang | ====================================================================
==================================================================== | -module(copy_error_log_SUITE).
-include("testsuite.hrl").
-compile(export_all).
all() ->
[
error_log_handler
].
groups() ->
[
].
init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
ok.
init_per_group(_Group, Config) ->
Config.
end_per_group(_Group, _Config) ->
ok.
i... |
7009f77e5848f68f779162ab6a4ae16d0cebf9845028f10f3678a4f3c29cff4d | CodyReichert/qi | regex-class.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - ppcre / regex - class.lisp , v 1.44 2009/10/28 07:36:15 edi Exp $
;;; This file defines the REGEX class. REGEX objects are used to
;;; represent the (transformed) parse trees internally
Copyr... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-ppcre-master/regex-class.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
This file defines the REGEX class. REGEX objects are used to
represent the (transformed) parse trees internally
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are m... | $ Header : /usr / local / cvsrep / cl - ppcre / regex - class.lisp , v 1.44 2009/10/28 07:36:15 edi Exp $
Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-... |
775bde3875cfb9f2d03ae95ef59ace31bd1c4eb7b8f40fa9cc6dca12619d8cac | bsansouci/bsb-native | ocamldep.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/tools/ocamldep.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Compenv
open Parsetree
let ppf = ... |
006d0b8a4a2f442cc60fdc5d0c2e0a92877784ed8646cf7b74035a52f8fc18bd | KaroshiBee/weevil | mdb_stepper.ml | TODO use lib_mockup one ?
module Client_context_unix = Tezos_client_base_unix.Client_context_unix
module Client_context = Tezos_client_base.Client_context
open Mdb_import.Tez
type code_trace = (Ctxt.Script.expr * Prot.Apply_internal_results.packed_internal_operation trace * Ctxt.Lazy_storage.diffs option)
type t =... | null | https://raw.githubusercontent.com/KaroshiBee/weevil/8565bf833db5114654495b361db5a4d53879e48b/bin/weevil_mdb_015/src/mdb_stepper.ml | ocaml | taken from proto_XXX.../lib_plugin/RPC.ml Scripts.register()
Constants.hard_gas_limit_per_operation ctxt
let*! () = Logs_lwt.debug (fun m -> m "doing client config init mockup - ONLY NEEDED FOR DISK BASED MOCKS")
unix_mockup
protocol_hash
bootstrap_accounts_filename
protocol_constants_file... | TODO use lib_mockup one ?
module Client_context_unix = Tezos_client_base_unix.Client_context_unix
module Client_context = Tezos_client_base.Client_context
open Mdb_import.Tez
type code_trace = (Ctxt.Script.expr * Prot.Apply_internal_results.packed_internal_operation trace * Ctxt.Lazy_storage.diffs option)
type t =... |
1f88e50939f108be5f903edbb5de89048cfdf50d004b165b863d976d2583d898 | dradtke/Lisp-Text-Editor | init.lisp | ;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; init.lisp --- GLUT Initialization API.
;;;
Copyright ( c ) 2006 ,
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;;... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/cl-opengl-20120107-git/glut/init.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
init.lisp --- GLUT Initialization API.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
o Redistributions of source code must retain the above copyri... | Copyright ( c ) 2006 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(in-package #:cl-glut... |
8f0850058a69379c9132ca13e647fbaf6b12af65cc4ba491614620e40d03e232 | SimonHauguel/Paso | Program.hs | module Paso.Program.Program where
import Paso.Parser.AST.Function
import Paso.Parser.AST.Define
import Paso.Parser.AST.TypesRepresentation
data Program = Program [PasoTypeDec] [Define] [TypedFunction ]
deriving Show
| null | https://raw.githubusercontent.com/SimonHauguel/Paso/6ee509749bf28b5823a7be946ce855eef13dc54d/src/Paso/Program/Program.hs | haskell | module Paso.Program.Program where
import Paso.Parser.AST.Function
import Paso.Parser.AST.Define
import Paso.Parser.AST.TypesRepresentation
data Program = Program [PasoTypeDec] [Define] [TypedFunction ]
deriving Show
| |
881b82e44700cb64fff4c63a4e70ce8bd4498d565da33bc4efdec1ccbd126ff2 | let-def/cuite | qt.ml | type -'a qt
type -'a qt_class
type 'a qflags = 'a QFlags.t
type qRect = { rx: int; ry: int; rw: int; rh: int }
type qRectF = { rxf: float; ryf: float; rwf: float; rhf: float }
type qPoint = { px: int; py: int }
type qPointF = { pxf: float; pyf: float }
type qSize = { sx: int ; sy: int }
type qSizeF = { sxf: flo... | null | https://raw.githubusercontent.com/let-def/cuite/42629a91c573ecbf1b01f213f1bf35a456d2b1af/lib/qt.ml | ocaml | Deterministic memory management
external trigger_slot
: 'a qt -> ('a, 'b, _) slot -> 'b -> unit
= "cuite_trigger_slot0"
Object hierarchy
A Qt driven select function
: Unix.file_descr list -> Unix.file_descr list -> float -> Unix.file_descr list * Unix.file_descr list | type -'a qt
type -'a qt_class
type 'a qflags = 'a QFlags.t
type qRect = { rx: int; ry: int; rw: int; rh: int }
type qRectF = { rxf: float; ryf: float; rwf: float; rhf: float }
type qPoint = { px: int; py: int }
type qPointF = { pxf: float; pyf: float }
type qSize = { sx: int ; sy: int }
type qSizeF = { sxf: flo... |
beb39fd071bf281b2d1b37d3642228499cdcdf19cfc2891f6bbef8fe48cd38aa | rurban/clisp | defseq.lisp | ;; Definitions for the standard sequence types
;; (in conjunction with SEQUENCE.D)
9.7.1989 , 1.8.1989 , 2.8.1989
(in-package "SYSTEM")
(%defseq
(vector
'LIST
#'identity
#'list-upd
#'list-endtest
#'list-fe-init
#'list-upd
#'list-endtest
#'list-access
#'list-access-set
#'i... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/defseq.lisp | lisp | Definitions for the standard sequence types
(in conjunction with SEQUENCE.D) | 9.7.1989 , 1.8.1989 , 2.8.1989
(in-package "SYSTEM")
(%defseq
(vector
'LIST
#'identity
#'list-upd
#'list-endtest
#'list-fe-init
#'list-upd
#'list-endtest
#'list-access
#'list-access-set
#'identity
#'ext::list-length-proper
#'make-list
#'list-elt
#'list-set... |
9b0ce2ef1c8c7e7aa745046fec33f69b3f560f6d6ec9ee2b13a75472500158c0 | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Duration.EN.Tests
( tests
) where
import Prelude
import Data.String
import Test.Tasty
i... | null | https://raw.githubusercontent.com/facebook/duckling/c6a48a1d0678a389f86d17db2676e1a289e355ce/tests/Duckling/Duration/EN/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Duration.EN.Tests
( tests
) where
import Prelude
import Data.String
import Test.Tasty
import Test.Tasty.HUnit
import Duckling.Dimensions.Types
import Duckling.Duration.EN.Corpus
import Duckling.Testing.Asserts
import Duckling.Testing.Types hidin... |
a908f250a3422cf9cbdb3accf9191f4f1eaae50b0092fb2aeb32d523383556bc | sosy-lab/tbf | cabs.inferred.mli | type cabsloc = {
lineno : int;
filename : string;
byteno : int;
ident : int;
}
type typeSpecifier =
Tvoid
| Tchar
| Tbool
| Tshort
| Tint
| Tlong
| Tint64
| Tfloat
| Tdouble
| Tsigned
| Tsizet
| Tunsigned
| Tnamed of string
| Tstruct of string * field_group list option * attribute ... | null | https://raw.githubusercontent.com/sosy-lab/tbf/18d08d6cee6fbfbad4d4ebfa7aed235521edec2b/tbf/tools/crest/cil/_build/src/frontc/cabs.inferred.mli | ocaml | type cabsloc = {
lineno : int;
filename : string;
byteno : int;
ident : int;
}
type typeSpecifier =
Tvoid
| Tchar
| Tbool
| Tshort
| Tint
| Tlong
| Tint64
| Tfloat
| Tdouble
| Tsigned
| Tsizet
| Tunsigned
| Tnamed of string
| Tstruct of string * field_group list option * attribute ... | |
631ad4c398d4012d871a40acb537bf0eccb18200af08ce0ddff4c1ae3b190a0b | pfdietz/ansi-test | call-arguments-limit.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Oct 10 22:39:25 2002
;;;; Contains: Tests for CALL-ARGUMENTS-LIMIT
(deftest call-arguments-limit.1
(notnot-mv (constantp 'call-arguments-limit))
t)
(deftest call-arguments-limit.2
(notnot-mv (typep call-arguments-limit 'integer))
t)
(deftest call-ar... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/data-and-control-flow/call-arguments-limit.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for CALL-ARGUMENTS-LIMIT | Author :
Created : Thu Oct 10 22:39:25 2002
(deftest call-arguments-limit.1
(notnot-mv (constantp 'call-arguments-limit))
t)
(deftest call-arguments-limit.2
(notnot-mv (typep call-arguments-limit 'integer))
t)
(deftest call-arguments-limit.3
(< call-arguments-limit 50)
nil)
(deftest call-ar... |
866c16d1f7d350dcb4671d206078430ba188851e3eaa0d525c9c4fc59ff6c553 | 2600hz-archive/whistle | cb_events_sup.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP INC
%%% @doc
Manage the event listeners for Crossbar clients
%%% @end
Created : 4 Sep 2011 by < >
%%%-------------------------------------------------------------------
-module(cb_events_sup).
-behavio... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/crossbar/src/modules/cb_events_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
==============================================================... | @author < >
( C ) 2011 , VoIP INC
Manage the event listeners for Crossbar clients
Created : 4 Sep 2011 by < >
-module(cb_events_sup).
-behaviour(supervisor).
-export([start_link/0, find_srv/2, start_srv/2]).
-export([init/1]).
-include_lib("whistle/include/wh_types.hrl").
-define(SERVER, ?MODULE).... |
a7b333b925b030c6c107ec00ea9f4b656e2b3f1403584013ab434d233b94437c | aistrate/Okasaki | Set.hs | # LANGUAGE MultiParamTypeClasses #
module Set where
class Set s a where
emptySet :: s a
insertSet :: a -> s a -> s a
memberSet :: a -> s a -> Bool
fromList :: Set s a => [a] -> s a
fromList = foldl (flip insertSet) emptySet
| null | https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch03/Set.hs | haskell | # LANGUAGE MultiParamTypeClasses #
module Set where
class Set s a where
emptySet :: s a
insertSet :: a -> s a -> s a
memberSet :: a -> s a -> Bool
fromList :: Set s a => [a] -> s a
fromList = foldl (flip insertSet) emptySet
| |
1bd331b1e33a877fc01d73828e2dc2e50411b07a003de45f3413291ed02652f5 | i-am-tom/learn-me-a-haskell | OneOf.hs | |
Module : OneOf
Description : A generalised @Either@ type .
Copyright : ( c ) , 2018
License : MIT
Maintainer :
Stability : experimental
The @Either@ type has two constructors – @Left@ and @Right@ – to represent one
of two possible options . If we wanted to represent three possib... | null | https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/src/OneOf.hs | haskell | * Convenience functions
We can work with a @OneOf@ directly using its constructors, but this
becomes a pain as we generalise to larger sets of types. Consequently, | |
Module : OneOf
Description : A generalised @Either@ type .
Copyright : ( c ) , 2018
License : MIT
Maintainer :
Stability : experimental
The @Either@ type has two constructors – @Left@ and @Right@ – to represent one
of two possible options . If we wanted to represent three possib... |
ead4c2171164a440bf26276f8ca1d9ed15abe412447eaadc5423c7f513f35eda | xh4/web-toolkit | conditions.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - UNICODE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - unicode / conditions.lisp , v 1.4 2012 - 05 - 04 21:17:44 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cl-unicode-20190521-git/conditions.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - UNICODE ; Base : 10 -*-
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 ... | $ Header : /usr / local / cvsrep / cl - unicode / conditions.lisp , v 1.4 2012 - 05 - 04 21:17:44 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in... |
6f531cbf5c7e6d3369f5dfb01536356312e110a8cd5fd49a317feb44b5a196e9 | cwearl/fulmar | standard-chunk.rkt | #lang typed/racket
(require "private/core-chunk.rkt"
"private/doc/document.rkt")
; from core-chunk
(provide
flatten*
literal
space
new-line
empty
concat
immediate
speculative
position-indent
indent
comment-env-chunk)
(provide
(all-defined-out))
;;;;;;;;;;;;;;;;;;;;;;
;basic chunks;;;;;;;;;
;;;... | null | https://raw.githubusercontent.com/cwearl/fulmar/4cf60699558b3bb28fa813443456993d1563bfb2/standard-chunk.rkt | racket | from core-chunk
basic chunks;;;;;;;;;
list chunks;;;;;;;;;;
b; c\"")
b; c;\"")
preprocessor chunks;;
\ " ) " )
\") "
general chunks;;;;;;;
template chunks;;;;;;
function chunks;;;;;;
class/struct chunks;;
\" \"float b;\")"
template struct definition
statement chunks;;;;;
| #lang typed/racket
(require "private/core-chunk.rkt"
"private/doc/document.rkt")
(provide
flatten*
literal
space
new-line
empty
concat
immediate
speculative
position-indent
indent
comment-env-chunk)
(provide
(all-defined-out))
(document empty*?
"Mostly a helper for other standard chunks. Take... |
db8ed907296cc554effa855d1cde670b8b8e5ab52a054e50350c6de33080aa77 | well-typed/large-records | R060.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
{-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}
module Experiment.ParseJSON.Sized.R060 where
import Data.Aeson (Value,)
import Data.A... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/ParseJSON/Sized/R060.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ParseJSON.Sized.R060 where
import Data.Aeson (Value,)
import Data.Aeson.Types (parseMaybe)
import Data.Maybe (fromJust)
import Data.Record.Anon.Simple (Record)
import Data.Record.Generic.JSON (gparseJSON)
import Common.RowOfSize.Row060
recFrom... |
3447fd21e5934ff7b2ffa2b0c1a91329c61889b41f0642d946867bcb0284261c | alesaccoia/festival_flinger | tilt.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;;; ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/tilt.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission is hereby granted, free of charge, to use and distribute ;;
this softwar... | Author : , ,
Date : April 1999
Dusterhoff , K. and Black , A. ( 1997 ) . " Generating F0 contours for
Proceedings of ESCA Workshop of Intonation , pp 107 - 110 , September ,
Athens , Greece .
Intonation_Tilt assigns accents and boundaries by a CART tree
Int_Targets_Tilt ... |
bc5ca0a7ecf47283a561e64f57208ec981f260d4a17c5c80ba0038df5b2eff52 | CDPcode/a-code-of-ice-and-fire | Tokens.hs | module Westeros.SouthOfTheWall.Tokens (
Token(..)
, AbstractToken(..)
, Position(..)
, Error(..)
) where
{- Relevant tokens datatypes -}
newtype Error = Error { lexerError :: String }
deriving (Show)
data Position = Position {
row :: Int,
col :: Int
}
deriving (Eq,Sh... | null | https://raw.githubusercontent.com/CDPcode/a-code-of-ice-and-fire/a52f925d55e955ff9252090ce3b8cb211214b9b8/src/Westeros/SouthOfTheWall/Tokens.hs | haskell | Relevant tokens datatypes
Program Start
Type Declaration
Simple Types
Literals
Composite Types
Type conversion
Composite types operators
Exit Statement
IO
Empty Statement
Procedures definition
Blocks
Procedure Call
Determinate Repetition
Undeterminate Repetition
Simple Selection
Identifiers
Atoms
A... | module Westeros.SouthOfTheWall.Tokens (
Token(..)
, AbstractToken(..)
, Position(..)
, Error(..)
) where
newtype Error = Error { lexerError :: String }
deriving (Show)
data Position = Position {
row :: Int,
col :: Int
}
deriving (Eq,Show)
data Token = Token
{ aT... |
dfd19164532283dfbb04354aeeae73889e402ed4e33c17ae380c2ce8f93ade89 | rumblesan/improviz | ColourOps.hs | module Language.Interpreter.StdLib.ColourOps
( addColourStdLib
) where
import Control.Monad.Except
import Data.Maybe ( listToMaybe
, maybe
)
import Gfx.Context ... | null | https://raw.githubusercontent.com/rumblesan/improviz/23e16ae7b2d55d2204417ec60c7cb6673a93df7d/src/Language/Interpreter/StdLib/ColourOps.hs | haskell | module Language.Interpreter.StdLib.ColourOps
( addColourStdLib
) where
import Control.Monad.Except
import Data.Maybe ( listToMaybe
, maybe
)
import Gfx.Context ... | |
7026e6690f9f378b5888e6b92ad9acac335f6648185864018aa50338794adf55 | casperschipper/ocaml-cisp | cisp4.ml | open Cisp
open Midi
let intervArr = [|50;53;55;57;60;62;64;67;69|]
let copy = Array.copy intervArr
let maxidx = Array.length intervArr
let writer =
let idx = rv (st 0) (st maxidx) in
let f old original =
let nw = old + (pickOne [|-2;2|]) in
pickOne [|nw;original|]
in
idx |> Seq.map (fun i -> in... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/euclidMulti/cisp4.ml | ocaml | type walkmind direction is state
a walk that updates boundaries only when hit | open Cisp
open Midi
let intervArr = [|50;53;55;57;60;62;64;67;69|]
let copy = Array.copy intervArr
let maxidx = Array.length intervArr
let writer =
let idx = rv (st 0) (st maxidx) in
let f old original =
let nw = old + (pickOne [|-2;2|]) in
pickOne [|nw;original|]
in
idx |> Seq.map (fun i -> in... |
fa8303357eff80ca3106b59d6e69802e331eb3f2f757427352e40130ae2f7e10 | SuYi1995/game_server | log.erl | %%%-------------------------------------------------------------------
%%% @author sy
( C ) 2019 , < COMPANY >
%%% @doc
%%% 错误日志模块
%%% @end
Created : 29 . 9月 2019 20:34
%%%-------------------------------------------------------------------
-module(log).
-include("common.hrl").
-export([
log/5,
errlog/2
]... | null | https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/util/log.erl | erlang | -------------------------------------------------------------------
@author sy
@doc
错误日志模块
@end
-------------------------------------------------------------------
@doc 系统运行日志
首次打开
已经打开
需要切换
@log 日志打印
首次打开
已经打开
需要切换 | ( C ) 2019 , < COMPANY >
Created : 29 . 9月 2019 20:34
-module(log).
-include("common.hrl").
-export([
log/5,
errlog/2
]).
log(Type, Format, Args, Mod, Line) ->
{{Year, Month, Day}, {Hour, Min, Sec}} = erlang:localtime(),
File =
case get("errlog") of
undefined ->
DateStr = t... |
367974344c2943229b7162da634b383090f2196730dfecff07f7767b16895b38 | alaisi/postgres.async | json.clj | (ns postgres.async.json
(:require [postgres.async :refer [from-pg-value IPgParameter]]
[cheshire.core :as json]
[cheshire.parse])
(:import [java.nio.charset StandardCharsets]))
(defn- json->coll [^bytes value]
(binding [cheshire.parse/*use-bigdecimals?* true]
(json/parse-string (Strin... | null | https://raw.githubusercontent.com/alaisi/postgres.async/fd27ecc504f29c033da3cb12bd8e8a61539026b7/src/postgres/async/json.clj | clojure | (ns postgres.async.json
(:require [postgres.async :refer [from-pg-value IPgParameter]]
[cheshire.core :as json]
[cheshire.parse])
(:import [java.nio.charset StandardCharsets]))
(defn- json->coll [^bytes value]
(binding [cheshire.parse/*use-bigdecimals?* true]
(json/parse-string (Strin... | |
e45ea9fa96f6fa4f7ad380d45e8c7b0654bfdebe00574cfdcc776eb5451ed986 | webyrd/n-grams-for-synthesis | srfi-130-test.scm | Copyright ( C ) ( 2016 ) .
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without limitation the rights to use,
;;; copy, modify, merge,... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-130/srfi-130-test.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
Software is furnished to do so, subject to the following
conditions... | Copyright ( C ) ( 2016 ) .
files ( the " Software " ) , to deal in the Software without
sell copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
Tests for SRFI 130 ... |
9c16bd863138369bc95557f6b58b82ce7274fc0830b3af7a5ae50387c342ecbc | defndaines/meiro | wilson.clj | (ns meiro.wilson
"Wilson's algorithm uses a loop-erasing random walk to generate an unbiased
maze. Because it randomly navigates to the next cell without regard to
cells it has already visited, it can take an excessively long time to
generate, especially on large mazes."
(:require [meiro.core :as m]))
(defn... | null | https://raw.githubusercontent.com/defndaines/meiro/f91d4dee2842c056a162c861baf8b71bb4fb140c/src/meiro/wilson.clj | clojure | (ns meiro.wilson
"Wilson's algorithm uses a loop-erasing random walk to generate an unbiased
maze. Because it randomly navigates to the next cell without regard to
cells it has already visited, it can take an excessively long time to
generate, especially on large mazes."
(:require [meiro.core :as m]))
(defn... | |
76f664df6d4104b62ae2edfe6803061c57b2c2f988fb0e5a729cd52da192b757 | poscat0x04/telegram-types | SetChatPermissions.hs | module Web.Telegram.Types.Internal.API.SetChatPermissions where
import Common
import Web.Telegram.Types.Internal.API.ChatId
import Web.Telegram.Types.Internal.ChatPermissions
data SetChatPermissions = SetChatPermissions
{ chatId :: ChatId,
permissions :: ChatPermissions
}
deriving stock (Show, Eq)
mkLabel ... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/SetChatPermissions.hs | haskell | module Web.Telegram.Types.Internal.API.SetChatPermissions where
import Common
import Web.Telegram.Types.Internal.API.ChatId
import Web.Telegram.Types.Internal.ChatPermissions
data SetChatPermissions = SetChatPermissions
{ chatId :: ChatId,
permissions :: ChatPermissions
}
deriving stock (Show, Eq)
mkLabel ... | |
ff8f208230845723eca6c1b8662f605d727635218cf23e620e82a208c6e1f1a1 | janestreet/krb | cursor_intf.ml | open! Core
open Async
module type Arg = sig
module Container : sig
type raw
type t
val tag : t -> Sexp.t
val to_raw : t -> raw
end
module Item : sig
type raw
type t
val of_raw : raw -> t Deferred.Or_error.t
val free : Context.t -> raw -> unit
end
module Cursor : sig
ty... | null | https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/cursor_intf.ml | ocaml | open! Core
open Async
module type Arg = sig
module Container : sig
type raw
type t
val tag : t -> Sexp.t
val to_raw : t -> raw
end
module Item : sig
type raw
type t
val of_raw : raw -> t Deferred.Or_error.t
val free : Context.t -> raw -> unit
end
module Cursor : sig
ty... | |
649832645f3a18fb679b751dd80a585faf953af18f20c0e40ad98d7b2d0bd401 | jfeser/castor | subst.ml | open Core
open Ast
let rec shift = function
| `Name n -> `Name (Name.incr n)
| p -> Visitors.Map.pred Fun.id shift p
let incr ctx =
Map.to_alist ctx
|> List.map ~f:(fun (n, p) -> (Name.incr n, shift p))
|> Map.of_alist_exn (module Name)
let rec subst ctx r = { r with node = subst_query ctx r.node }
and su... | null | https://raw.githubusercontent.com/jfeser/castor/e9f394e9c0984300f71dc77b5a457ae4e4faa226/lib/subst.ml | ocaml | open Core
open Ast
let rec shift = function
| `Name n -> `Name (Name.incr n)
| p -> Visitors.Map.pred Fun.id shift p
let incr ctx =
Map.to_alist ctx
|> List.map ~f:(fun (n, p) -> (Name.incr n, shift p))
|> Map.of_alist_exn (module Name)
let rec subst ctx r = { r with node = subst_query ctx r.node }
and su... | |
4611a66c36b2c61fbacddc7cb297e4247d7f243719b37ac67ffafb777c6bc4da | tfausak/rattletrap | CompressedWordVector.hs | module Rattletrap.Type.CompressedWordVector where
import qualified Rattletrap.BitGet as BitGet
import qualified Rattletrap.BitPut as BitPut
import qualified Rattletrap.Schema as Schema
import qualified Rattletrap.Type.CompressedWord as CompressedWord
import qualified Rattletrap.Utility.Json as Json
data CompressedWor... | null | https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/Type/CompressedWordVector.hs | haskell | module Rattletrap.Type.CompressedWordVector where
import qualified Rattletrap.BitGet as BitGet
import qualified Rattletrap.BitPut as BitPut
import qualified Rattletrap.Schema as Schema
import qualified Rattletrap.Type.CompressedWord as CompressedWord
import qualified Rattletrap.Utility.Json as Json
data CompressedWor... | |
944c3d9799929f69759b2efa9a4e804fca59816192a933670b53733aae59ae7a | craigl64/clim-ccl | item-list-manager.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-internals)
" Copyright ( c ) 1989 , 1990 International Lisp Associates . All rights reserved . "
(defclass item-lis... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/item-list-manager.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
This is sort of kludgy. We really need to keep a per-stream cache of display-records. |
(in-package :clim-internals)
" Copyright ( c ) 1989 , 1990 International Lisp Associates . All rights reserved . "
(defclass item-list-manager ()
((item-list :initarg :item-list :accessor ilm-item-list)
(display-record :initform nil))
(:default-initargs :item-list nil))
(defmethod clear-items ((ilm i... |
2d21ed9b5b8e57eca3292e34ac8e56ef14327e7030142bbf1c177616ce55d680 | tonyvanriet/clj-slack-client | chat.clj | (ns clj-slack-client.chat
(:require [clj-slack-client.web :as web])
(:refer-clojure :exclude [update]))
(defn delete
"Deletes a message. Accessible by bots, workspaces, and users.
When used by a bot, may delete only messages posted by that
bot user."
([token channel time-stamp]
(delete token channel ti... | null | https://raw.githubusercontent.com/tonyvanriet/clj-slack-client/6783f003ab93adae057890421622eb5e61ab033d/src/clj_slack_client/chat.clj | clojure | (ns clj-slack-client.chat
(:require [clj-slack-client.web :as web])
(:refer-clojure :exclude [update]))
(defn delete
"Deletes a message. Accessible by bots, workspaces, and users.
When used by a bot, may delete only messages posted by that
bot user."
([token channel time-stamp]
(delete token channel ti... | |
fbd5efb95ef3b2b44600d7e311f8ddd4e63a095174d954773d03321bb4a83b90 | picty/parsifal | dns4.ml | open Parsifal
open BasePTypes
open PTypes
enum rr_type (16, UnknownVal UnknownQueryType) =
| 1 -> RRT_A, "A"
| 2 -> RRT_NS, "NS"
| 3 -> RRT_MD, "MD"
| 4 -> RRT_MF, "MF"
| 5 -> RRT_CNAME, "CNAME"
| 6 -> RRT_SOA, "SOA"
| 7 -> RRT_MB, "MB"
| 8 -> RRT_MG, "MG"
| 9 -> RRT_MR, "MR"
| 10 -> RRT_NULL, "NU... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/tutorial/dns-steps/dns4.ml | ocaml | | 4 -> RRT_MF, "MF"
| 6 -> RRT_SOA, "SOA"
| 7 -> RRT_MB, "MB"
| 9 -> RRT_MR, "MR"
| 10 -> RRT_NULL, "NULL"
| 14 -> RRT_MINFO, "MINFO" | open Parsifal
open BasePTypes
open PTypes
enum rr_type (16, UnknownVal UnknownQueryType) =
| 1 -> RRT_A, "A"
| 2 -> RRT_NS, "NS"
| 3 -> RRT_MD, "MD"
| 4 -> RRT_MF, "MF"
| 5 -> RRT_CNAME, "CNAME"
| 6 -> RRT_SOA, "SOA"
| 7 -> RRT_MB, "MB"
| 8 -> RRT_MG, "MG"
| 9 -> RRT_MR, "MR"
| 10 -> RRT_NULL, "NU... |
233cd429f861ad853fd37b54b51d8bee169507e36716372d69b73bc29eca89fa | snoyberg/mono-traversable | NonNull.hs | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts , FlexibleInstances #
# LANGUAGE DefaultSignatures #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
-- | "Data.NonNull" extends the concepts from
" Data . List . NonEmpty " to any ' Mono... | null | https://raw.githubusercontent.com/snoyberg/mono-traversable/224e4c014310e93877b39fa8c22a9d76492d42c4/mono-traversable/src/Data/NonNull.hs | haskell | # LANGUAGE DeriveDataTypeable #
| "Data.NonNull" extends the concepts from
| A monomorphic container that is not null.
^ __Safely__ convert from a non-null monomorphic container to a nullable monomorphic container.
| This function is unsafe, and must not be exposed from this module.
| __Safely__ convert from an _... | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts , FlexibleInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
" Data . List . NonEmpty " to any ' MonoFoldable ' .
' NonNull ' is a newtype wrapper for a container with 1 or more ele... |
983b29a3be3a383a4a927d02df1bf5dfab708549b7bc1df3c25719cfc146c2f8 | dalaing/little-languages | site.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend, mempty)
import Hakyll
import Image.LaTeX.Render
import Image.LaTeX.Render.Pandoc
import Hakyll.Contrib.LaTeX
---------------... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/blog/site.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | import Data.Monoid (mappend, mempty)
import Hakyll
import Image.LaTeX.Render
import Image.LaTeX.Render.Pandoc
import Hakyll.Contrib.LaTeX
formulaOptionsWithPkgs :: [String] -> FormulaOptions -> FormulaOptions
formulaOptionsWithPkgs pkgs fo =
let
p = preamble fo
... |
f85847b0bd3dbb30320e6726cfd40498f089b6f5457338eb3f3a38072fff1d5f | freckle/graphula | Node.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# L... | null | https://raw.githubusercontent.com/freckle/graphula/0ce199368436b346a217f23556ac5a9744eb5714/src/Graphula/Node.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
* Generating
* Exceptions
| Options for generating an individual node
# INLINE (<>) #
# INLINE (<>) #
| Modify the node after it's been generated
| Require a node to satisfy the specified predicate
N.B. ensuring a condition that is in... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE RecordWildCards #
# LANGU... |
a3b3c8fa87615ee788478ec3ef1a7c909fc004dbf3ebaa2a757d78c4a2deba0a | matterhorn-chat/matterhorn | Common.hs | module Matterhorn.State.Common
(
-- * System interface
openFilePath
, openWithOpener
, runLoggedCommand
, fetchFile
, fetchFileAtPath
-- * Posts
, installMessagesFromPosts
, updatePostMap
-- * Utilities
, postInfoMessage
, postErrorMessageIO
, postErrorMessage'
, addEmoteFormatting
,... | null | https://raw.githubusercontent.com/matterhorn-chat/matterhorn/23b93cb14a6be6e71f3fee5f2e3f4e9b652fc75a/src/Matterhorn/State/Common.hs | haskell | * System interface
* Posts
* Utilities
* Client Messages
| Given a collection of posts from the server, save the posts in the
and return them along with the set of all usernames mentioned in the
text of the resulting messages.
This also sets the mFlagged field of each message based on whether
its post ID is a... | module Matterhorn.State.Common
(
openFilePath
, openWithOpener
, runLoggedCommand
, fetchFile
, fetchFileAtPath
, installMessagesFromPosts
, updatePostMap
, postInfoMessage
, postErrorMessageIO
, postErrorMessage'
, addEmoteFormatting
, removeEmoteFormatting
, toggleMouseMode
, fetchM... |
b2c5f6c41fb63b2e6530cfa3a1aff948762cf783b890a8e5a132e54d2d458b73 | klarna/mnesia_pg | mnesia_pg_util.erl | %%%
Copyright ( c ) 2014 - 2015 Klarna AB
%%%
This file is provided to you under the Apache License ,
%%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%%% a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or agreed ... | null | https://raw.githubusercontent.com/klarna/mnesia_pg/c4b3fce570e06630d2984b6c61b2e439726259f8/src/mnesia_pg_util.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
stop(),
psql(SQL) ->
Co... | Copyright ( c ) 2014 - 2015 Klarna AB
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(mnesia_pg_util).
-export([init_... |
f328d128f9504e808abd0772f4593072c2dd965438a412e688655b6370f3a73d | basho/riak_kv | riak_kv_console.erl | %% -------------------------------------------------------------------
%%
riak_console : interface for admin commands
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this fi... | null | https://raw.githubusercontent.com/basho/riak_kv/159df407282e67b57cb7a43f36ed375324fcb035/src/riak_kv_console.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | riak_console : interface for admin commands
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BA... |
6a073ef993a3f43a0c589d039e2187ddd4fb32f481dd223bd74c12dc5a63f348 | imrehg/ypsilon | debug.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon debug)
(export debug-expand debug-compile)
(import (core))
(define pretty-form
(lambda (form)
(define ht-symbols (make-eq-h... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/debug.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon debug)
(export debug-expand debug-compile)
(import (core))
(define pretty-form
(lambda (form)
(define ht-symbols (make-eq-h... |
248ba946cfaff72804464e3fc348452d4696996fcc4962bbef15cbb80d995eea | johnwhitington/ocamli | ocamliutil.mli | exception RuntimeTypeError of string
(* For writing evalutors with *)
val setify : 'a list -> 'a list
type 'a result =
Next of 'a
| IsValue
| Malformed of string
| Unimplemented of string
val typecheck : bool ref
exception ExnUnimplemented of string
exception ExnMalformed of string
type last_op =
Ar... | null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/ocamliutil.mli | ocaml | For writing evalutors with | exception RuntimeTypeError of string
val setify : 'a list -> 'a list
type 'a result =
Next of 'a
| IsValue
| Malformed of string
| Unimplemented of string
val typecheck : bool ref
exception ExnUnimplemented of string
exception ExnMalformed of string
type last_op =
Arith
| Boolean
| Comparison
... |
c91db3de04838bf4873baec7b6f70104f2a9f7d283eaea6c0d5dfbed52f962a9 | tweag/asterius | cgrun002.hs | main = print ((f id2) (10 + thirty_two))
where
f x = g x
where
g x = h x
where
h x = x
thirty_two :: Int
thirty_two = 32
id2 x = x
| null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/cgrun002.hs | haskell | main = print ((f id2) (10 + thirty_two))
where
f x = g x
where
g x = h x
where
h x = x
thirty_two :: Int
thirty_two = 32
id2 x = x
| |
3a2e5fc0976245addc39eb4e145db2366361392c29f981b2699a5837ae93b524 | psg-mit/twist-popl22 | args.ml | let convert = ref true
let sim = ref true
let no_sep = ref false
let no_print = ref false
let bench = ref false
let no_static = ref false
let mixed = ref false
let speclist =
[ "-bench", Arg.Set bench, "Run in benchmark mode. Outputs timing statistics for 10 runs."
; "-no_print", Arg.Set no_print, "Do not print ... | null | https://raw.githubusercontent.com/psg-mit/twist-popl22/fa495479ff021fb8793ae20d8cf786ed048f503d/src/args.ml | ocaml | let convert = ref true
let sim = ref true
let no_sep = ref false
let no_print = ref false
let bench = ref false
let no_static = ref false
let mixed = ref false
let speclist =
[ "-bench", Arg.Set bench, "Run in benchmark mode. Outputs timing statistics for 10 runs."
; "-no_print", Arg.Set no_print, "Do not print ... | |
0491bf32c5642be71919ec8f5d561c6693dee93bc2fce258e893e02f6e0cf4e2 | ashinkarov/heh | compile_sac.ml |
* Copyright ( c ) 2017 - 2018 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS ... | null | https://raw.githubusercontent.com/ashinkarov/heh/42866803b2ffacdc42b8f06203bf4e5bd18e03b0/compile_sac.ml | ocaml | | SacBinop of sac_binop * sac_expr * sac_expr
Default element, size
and sac_binop =
| SacOpPlus
| SacOpMinus
| SacOpMul
| SacOpDiv
Helper mk_ functions.
Print sac program.
Generate a fresh pointer name.
XXX we assume that there are no higher-order
* functions anymore. If t... |
* Copyright ( c ) 2017 - 2018 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS ... |
c2db86d901343e57138aa45447515129074decd81a01b43f000781e04f302289 | rm-hull/project-euler | euler018.clj | ;; EULER #020
;; ==========
;; By starting at the top of the triangle below and moving to adjacent
numbers on the row below , the maximum total from top to bottom is 23 .
;;
3
7 4
2 4 6
;; 8 5 9 3
;;
That is , 3 + 7 + 4 + 9 = 23 .
;;
;; Find the maximum total from top to bottom of the triangl... | null | https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/euler018.clj | clojure | EULER #020
==========
By starting at the top of the triangle below and moving to adjacent
8 5 9 3
Find the maximum total from top to bottom of the triangle below:
75
17 47 82
99 65 04 28 06 16 70 92
41 48 72 33 47 32 37 16 94 29
it can not be
solved by... | numbers on the row below , the maximum total from top to bottom is 23 .
3
7 4
2 4 6
That is , 3 + 7 + 4 + 9 = 23 .
95 64
18 35 87 10
20 04 82 47 65
19 01 23 75 03 34
88 02 77 73 07 63 67
41 41 26 56 83 40 80 70 33
... |
ddae03201ea8d408803f3367f19cae911fbe468123b0213432f6833380710752 | pqwy/notty | keys.ml | Copyright ( c ) 2016 - 2017 . All rights reserved .
See LICENSE.md .
See LICENSE.md. *)
(**
* Demonstrates input parsing.
*)
open Notty
open Common
let pps = Format.pp_print_string
let ppi = Format.pp_print_int
let pp_special fmt = function
| `Escape -> pps fmt "ESCAPE"
| `Enter -> pp... | null | https://raw.githubusercontent.com/pqwy/notty/389366c023396017aa21efcdbb07ade5ba0974c5/examples/keys.ml | ocaml | *
* Demonstrates input parsing.
| Copyright ( c ) 2016 - 2017 . All rights reserved .
See LICENSE.md .
See LICENSE.md. *)
open Notty
open Common
let pps = Format.pp_print_string
let ppi = Format.pp_print_int
let pp_special fmt = function
| `Escape -> pps fmt "ESCAPE"
| `Enter -> pps fmt "ENTER"
| `Tab -> pps ... |
a5ffa5540a01db4421e2541dedd3971fa9652ea0381441541bf06fb4339bb25a | mcgizzle/haxchange | Types.hs | {-# LANGUAGE OverloadedStrings #-}
module Haxchange.Bittrex.Types where
import Haxchange.Types (Currency (..), Market (..), Ticker (..))
import qualified Haxchange.Types as T
import Data.Aeson
import Data.Monoid ((<>))
import Data.Text as Text
import Pre... | null | https://raw.githubusercontent.com/mcgizzle/haxchange/620a4c93ae28abdd637b7c1fd8b018628b3bd0e9/src/Haxchange/Bittrex/Types.hs | haskell | # LANGUAGE OverloadedStrings # | module Haxchange.Bittrex.Types where
import Haxchange.Types (Currency (..), Market (..), Ticker (..))
import qualified Haxchange.Types as T
import Data.Aeson
import Data.Monoid ((<>))
import Data.Text as Text
import Prelude as P
type Params = [(Text... |
1ac0dfead8f65a5f7a3871350d69e1e1f94e80483a334aca29c8c4a083da1f83 | mikeizbicki/HLearn | Unsafe.hs | -- | This module let's us tune the cover tree's expansion ratio.
You might be able to get around 5 % better performance by tuning this value to your specific application .
-- But you probably don't want to do this.
module HLearn.Data.SpaceTree.CoverTree.Unsafe
( setExprat
, getExprat
)
where
import S... | null | https://raw.githubusercontent.com/mikeizbicki/HLearn/c6c0f5e7593be3867f20c56c79b998e7d7ded9fc/src/HLearn/Data/SpaceTree/CoverTree/Unsafe.hs | haskell | | This module let's us tune the cover tree's expansion ratio.
But you probably don't want to do this.
------------------------------------------------------------------------------ | You might be able to get around 5 % better performance by tuning this value to your specific application .
module HLearn.Data.SpaceTree.CoverTree.Unsafe
( setExprat
, getExprat
)
where
import SubHask
import System.IO.Unsafe
import Data.IORef
# NOINLINE expratIORef #
expratIORef = unsafePerformIO $ ... |
c51d379ec48fe27f9e2ecccf0c9435bc1a390266605db18f983a6b2a07610c87 | privet-kitty/cl-competitive | suffix-array.lisp | (defpackage :cp/test/suffix-array
(:use :cl :fiveam :cp/suffix-array)
(:import-from :cp/test/base #:base-suite)
(:import-from :cp/suffix-array #:%sa-is))
(in-package :cp/test/suffix-array)
(in-suite base-suite)
(defun %sa-naive (vector)
(declare (optimize (speed 3))
(sa-vector vector)
(in... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/2c4d4e82af2a1672eef334a0a229c67d4fb37188/module/test/suffix-array.lisp | lisp | (defpackage :cp/test/suffix-array
(:use :cl :fiveam :cp/suffix-array)
(:import-from :cp/test/base #:base-suite)
(:import-from :cp/suffix-array #:%sa-is))
(in-package :cp/test/suffix-array)
(in-suite base-suite)
(defun %sa-naive (vector)
(declare (optimize (speed 3))
(sa-vector vector)
(in... | |
6327b0b963833990370a2c0bff98c8224d00b8a7c4cb5e87f8a3cf9721bff0a8 | phadej/boring | Instances.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE Trustworthy #-}
# LANGUAGE UndecidableInstances #
module Data.Boring.Instances () where
import Data.Boring (Absurd (..), Boring (..))
import Data . Constraint ( Dict ( .. ) )
import Data . Stream . Infinite ( Stream ( .. ) )
import qualifi... | null | https://raw.githubusercontent.com/phadej/boring/6bee86d76ce403230ef154afdfd9dbc1c4dfbebd/boring-instances/src/Data/Boring/Instances.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
generics-sop
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
rep... | # LANGUAGE UndecidableInstances #
module Data.Boring.Instances () where
import Data.Boring (Absurd (..), Boring (..))
import Data . Constraint ( Dict ( .. ) )
import Data . Stream . Infinite ( Stream ( .. ) )
import qualified Generics.SOP as SOP
instance Boring a => Boring (SOP.I a) where
bor... |
ae9ee2428ecfd8a03ddc86b6cd0eb1fa22ef606374574e03b196c765dc83d3c6 | wenkokke/dep2con | TestConversion.hs | # LANGUAGE FlexibleContexts #
import Control.Applicative ((<$>),(<*>))
import Control.Monad (when, forM_)
import Data.IORef
import qualified Language.Conversion.Con2Bin as Con2Bin
import qualified Language.Conversion.Dep2Bin as Dep2Bin
import qualified Language.Conversion.Dep2Con as Dep2C... | null | https://raw.githubusercontent.com/wenkokke/dep2con/cd6cc985a9dbedd6b2991a85197481804a2a0d95/test/TestConversion.hs | haskell | # LANGUAGE FlexibleContexts #
import Control.Applicative ((<$>),(<*>))
import Control.Monad (when, forM_)
import Data.IORef
import qualified Language.Conversion.Con2Bin as Con2Bin
import qualified Language.Conversion.Dep2Bin as Dep2Bin
import qualified Language.Conversion.Dep2Con as Dep2C... | |
cdd414a43e5db917dfdeda7b1add88dcad264ecd84618dac89637e2896ab838b | input-output-hk/cardano-sl | Context.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS -fno-warn-unused-top-binds #-} -- for lenses
-- | Runtime context of node.
module Pos.Context.Context
( HasNodeContext(..)
, HasSscContext(..)
, NodeContext (..... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Context/Context.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# OPTIONS -fno-warn-unused-top-binds #
for lenses
| Runtime context of node.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
^ Context ne... | # LANGUAGE ExistentialQuantification #
module Pos.Context.Context
( HasNodeContext(..)
, HasSscContext(..)
, NodeContext (..)
, NodeParams(..)
, BaseParams(..)
, TxpGlobalSettings
, StartTime(..)
, BlockRetrievalQueueTag
, BlockRetrievalQueue
, C... |
531f84118477457637b4560480655647aebdb1790ef4c2e76f56591967c831bf | ekmett/ad | Mode.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternGuards #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
{-# LANGUAGE Rank2Types #-}
# LANGU... | null | https://raw.githubusercontent.com/ekmett/ad/5481c1ca3a02092156ab9e00fa46813ed1b2ff7a/src/Numeric/AD/Mode.hs | haskell | # LANGUAGE Rank2Types #
---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
* AD modes
| Embed a constant
| Scalar-vector multiplication
| Vector... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternGuards #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# LANGUAGE TypeFamilies #
# LANGUAG... |
2c65d1bdb6165824f6035e5ef9d7c23eee3120377eb4af8f335deae7bd8f31b3 | racket/gui | color-scheme.rkt | #lang racket
(require framework rackunit racket/draw)
;; just makes sure the contract is okay.
(check-true
(symbol? (color-prefs:get-current-color-scheme-name)))
(define-values (color-names style-names)
(color-prefs:get-color-scheme-names))
(check-true
(for/and ([color-name (in-set color-names)])
(color-pref... | null | https://raw.githubusercontent.com/racket/gui/590b069f6bff5e479503b9d3f9a5542fddcce64c/gui-test/framework/tests/color-scheme.rkt | racket | just makes sure the contract is okay.
try to clear out the callback, it should be retained because of `proc`
make a call here to `proc` so that sfs doesn't clear it
clear it and now gc should remove the callback | #lang racket
(require framework rackunit racket/draw)
(check-true
(symbol? (color-prefs:get-current-color-scheme-name)))
(define-values (color-names style-names)
(color-prefs:get-color-scheme-names))
(check-true
(for/and ([color-name (in-set color-names)])
(color-prefs:color-scheme-color-name? color-name)))
... |
6a41f6cb31ed8e29c9e56198f9fcb08dcea70049f1aa1e88912b6f2b448823f4 | cstar/erldis | erldis_app.erl | % japerk: do an erlang application with supervisor for client so that there
is only one connection . Otherwise was getting issues with gen_tcp hanging
on connect , even with a Timeout given .
-module(erldis_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_Type, _Args) -> erldis_sup:start_link().... | null | https://raw.githubusercontent.com/cstar/erldis/375260795e6a3de2600e297658f364deedbe6f1b/src/erldis_app.erl | erlang | japerk: do an erlang application with supervisor for client so that there | is only one connection . Otherwise was getting issues with gen_tcp hanging
on connect , even with a Timeout given .
-module(erldis_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_Type, _Args) -> erldis_sup:start_link().
stop(Client) when is_pid(Client) ->
erldis:quit(Client);
stop(_State) ->
... |
71cdcd69432c889e992182952c4acd796e89bc0025fc26c159a5d2bfd373a2b4 | clojurebook/ClojureProgramming | ch12-patterns-repl-interactions.clj | ;-----
(defn- update-status*
[service-name service-endpoint-url request-data-fn]
(fn [new-status]
(log (format "Updating status @ %s to %s" service-name new-status))
(let [http-request-data (request-data-fn new-status)
connection (-> service-endpoint-url java.net.URL. .openConnection)]
;; ..... | null | https://raw.githubusercontent.com/clojurebook/ClojureProgramming/bcc7c58862982a5793e22788fc11a9ed7ffc548f/ch12-patterns-repl-interactions.clj | clojure | -----
...set request method, parameters, body on `connection`
...perform actual request
...return result based on HTTP response status
-----
-----
-----
-----
= Woof!
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
-----
---... | (defn- update-status*
[service-name service-endpoint-url request-data-fn]
(fn [new-status]
(log (format "Updating status @ %s to %s" service-name new-status))
(let [http-request-data (request-data-fn new-status)
connection (-> service-endpoint-url java.net.URL. .openConnection)]
)))
(def up... |
fa6f7ac4eea7acdd1a90ffbc1ed4540cba33eb05a1a7389bc333770fc5caaf91 | onedata/op-worker | od_storage.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This model serves as cache for od_... | null | https://raw.githubusercontent.com/onedata/op-worker/b09f05b6928121cec4d6b41ce8037fe056e6b4b3/src/modules/datastore/models/onedata/od_storage.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This model serves as cache for od_storage records
@end
-------------------------------------------------------------------
API
datastore_model callbacks
===============... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
synchronized via Graph Sync .
-module(od_storage).
-author("Michal Stanisz").
-include("modules/datastore/datastore_models.hrl").
-include("modules/datastore/datastore_runner.hrl").
-include("pro... |
a89749f3e18e482721e259511b8f9821a798d289226fc8f149456996e1ace835 | eryx67/vk-api-example | Views.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
-- |
module VK.App.Widgets.AudioPlayer.Views where
import Control.Error.Util (bool)
import Data.Aeson ... | null | https://raw.githubusercontent.com/eryx67/vk-api-example/4ce634e2f72cf0ab6ef3b80387ad489de9d8c0ee/src/VK/App/Widgets/AudioPlayer/Views.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
| | # LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
module VK.App.Widgets.AudioPlayer.Views where
import Control.Error.Util (bool)
import Data.Aeson ((.=))
import qualified Data.Aeson as A
import Data.Fraction... |
4084c9bb5561b0de54d48d675642943a68f52e3cf856e5ac10c0168a4862bf55 | stchang/macrotypes | racket-prog.rkt | #lang racket
| null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/load-time-tests/racket-prog.rkt | racket | #lang racket
| |
0ce2ca878caba378038bd678e363de93a17733f5aeba909b360bb4f1fe589382 | astampoulis/makam | uChannel.mli | open Batteries;;
type loc = { description : string ; lineno : int ; charno : int ; offset : int } ;;
type realspan = { startloc : loc ; endloc : loc } ;;
type span = realspan option ;;
val string_of_loc : loc -> string ;;
val string_of_span : span -> string ;;
val span_end : span -> span ;... | null | https://raw.githubusercontent.com/astampoulis/makam/bf7ed7592c21e0439484d7464e659eca5be3b2f9/utils/uChannel.mli | ocaml | open Batteries;;
type loc = { description : string ; lineno : int ; charno : int ; offset : int } ;;
type realspan = { startloc : loc ; endloc : loc } ;;
type span = realspan option ;;
val string_of_loc : loc -> string ;;
val string_of_span : span -> string ;;
val span_end : span -> span ;... | |
8b97cab9d5aedec77534e3313956ee01c6debbb24966f003a297e24af984cfd7 | Bogdanp/racket-wasm | core.rkt | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
racket/function
racket/generic
racket/match
syntax/parse
syntax/parse/define)
;; values ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide
type-unify)
(define-gen... | null | https://raw.githubusercontent.com/Bogdanp/racket-wasm/9d84041f8de1ad4d9c6ac6e80c381ee525a1d30a/wasm-lib/private/core.rkt | racket | values ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
records ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
instructions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
racket/function
racket/generic
racket/match
syntax/parse
syntax/parse/define)
(provide
type-unify)
(define-generics type
(type-unify type other))
(struct valtype (id)
#:transpare... |
a8b81b2f8f1460d2dd8b6d7c5bbe664c749bc36033197aec7f4139bc6a54a1c8 | stackbuilders/hapistrano | HapistranoSpec.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module System.HapistranoSpec
( spec
) where
import Control.Monad
import Control.Monad.Reader
import Data.List (isPrefixOf)
import Data.Maybe ... | null | https://raw.githubusercontent.com/stackbuilders/hapistrano/caf471f478690478c6ab49a4b7cccd33099f44a1/spec/System/HapistranoSpec.hs | haskell | # LANGUAGE OverloadedStrings #
let's check that the dir exists and contains the right files
let's check that the dir exists and contains the right files
let's check that the dir exists and contains the right files
This fails if the opened branch is not testBranchName
This fails if there are unstaged changes
The l... | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module System.HapistranoSpec
( spec
) where
import Control.Monad
import Control.Monad.Reader
import Data.List (isPrefixOf)
import Data.Maybe (fromJust, mapMaybe)
import ... |
116062b5fbe4251e5d0d040f3a75102f4bf4e9ed64d6d21dfb1255093a98dea8 | jacekschae/learn-reitit-course-files | db.clj | (ns cheffy.recipe.db
(:require [next.jdbc.sql :as sql]))
(defn find-all-recipes
[db]
(let [public (sql/find-by-keys db :recipe {:public true})]
{:public public})) | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/17-list-all-recipes-refactor/src/cheffy/recipe/db.clj | clojure | (ns cheffy.recipe.db
(:require [next.jdbc.sql :as sql]))
(defn find-all-recipes
[db]
(let [public (sql/find-by-keys db :recipe {:public true})]
{:public public})) | |
d7ed7bb944d0efa9d71f912327282ab0bc5a1076c2aca13ac06e91aab5afced0 | moby/datakit | selfCI.ml | open! Astring
open Datakit_ci
let minute = 60.
let pool = Monitored_pool.create "Docker" 10
module Dockerfile = struct
(* [v ~timeout file] is a caching builder for [file]. *)
let v ?label ~timeout file =
let label = label |> Utils.default file in
Docker.create ~logs ~pool ~timeout ~label file
let cli... | null | https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/ci/self-ci/selfCI.ml | ocaml | [v ~timeout file] is a caching builder for [file].
[datakit repo target] is the set of tests to run on [target].
Don't try to build the gh-pages branch
We live behind an nginx proxy.
Command-line parsing
Running locally with docker-compose
The "--profile=PROFILE" option | open! Astring
open Datakit_ci
let minute = 60.
let pool = Monitored_pool.create "Docker" 10
module Dockerfile = struct
let v ?label ~timeout file =
let label = label |> Utils.default file in
Docker.create ~logs ~pool ~timeout ~label file
let client = v ~timeout:(30. *. minute) "Dockerfile.client"
let... |
58547b633a54807e41a1943cd8a015ff0113e185b2ba5d02a2d1f1f2cf3aa8dc | GingertronMk1/Dissertation | Input.hs | -- | Module: Frogger.Input
module Input where
import Graphics.Gloss.Interface.Pure.Game
import System.Random (next)
import Type
-- | The gap between lanes
laneDiff :: Float
laneDiff = lanes !! 1 - head lanes
-- | The base speed of the player while jumping
baseSpeed :: Float
baseSpeed = laneDiff / 5
-- | The boosted... | null | https://raw.githubusercontent.com/GingertronMk1/Dissertation/c3b5e253c557adb9678790b542227a009d45c1ae/Code/src/Input.hs | haskell | | Module: Frogger.Input
| The gap between lanes
| The base speed of the player while jumping
| The boosted speed of the player while jumping
| A routing function of sorts: it takes the event and the current Env and, based on the current gameState, determines which function to call to give the correct result.
| Th... | module Input where
import Graphics.Gloss.Interface.Pure.Game
import System.Random (next)
import Type
laneDiff :: Float
laneDiff = lanes !! 1 - head lanes
baseSpeed :: Float
baseSpeed = laneDiff / 5
boostSpeed :: Float
boostSpeed = laneDiff / 3
gameInput :: Event -> Env -> Env
gameInput ev en@E {gameState = gs} = c... |
495782b0b4daec3515003381826a7859d31baef932c9f4d57794b708cd952a42 | UU-ComputerScience/uhc | ShowInteger1.hs | ----------------------------------------------------------------------------------------
what : show of Integer values
expected : ok
----------------------------------------------------------------------------------------
what : show of Integer values
expected: ok
----------------------------... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/ShowInteger1.hs | haskell | --------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------- -} | what : show of Integer values
expected : ok
what : show of Integer values
expected: ok
module ShowInteger1 where
main
= do putStrLn (show (0::Integer))
putStrLn (show (1::Integer))
putStrLn (show ((-1)::Integer))
putStrLn (show (123456789012345678901234567890::Integer))
... |
6fed22609e790f15c832eb88594dc796177a025c4b12d891d7da01e471174dac | codahale/totp-clj | core_test.clj | (ns totp-clj.core-test
(:require [clojure.test :refer :all]
[totp-clj.core :refer :all]))
(deftest generate-secrets-test
(is (= 1000 (count (set (for [_ (range 0 1000)]
(let [secret (generate-secret)]
(is (re-matches #"[A-Z0-9]{52}" secret))
... | null | https://raw.githubusercontent.com/codahale/totp-clj/6e052e4ceb91e4344b52adf132d563c3ef07f50b/test/totp_clj/core_test.clj | clojure | (ns totp-clj.core-test
(:require [clojure.test :refer :all]
[totp-clj.core :refer :all]))
(deftest generate-secrets-test
(is (= 1000 (count (set (for [_ (range 0 1000)]
(let [secret (generate-secret)]
(is (re-matches #"[A-Z0-9]{52}" secret))
... | |
eb045c9627855e00f4fe86ef4b96d15771c3056b63c08ef5ddf6823d7cf6e270 | co-log/co-log | Pure.hs | |
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Pure implementation of logging action .
Copyright: (c) 2018-2022 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
Pure implementation of logging action.
-}
module Colog.Pure
( Pure... | null | https://raw.githubusercontent.com/co-log/co-log/ba32023230ce8d54641a412754d7df475bb4cd4b/src/Colog/Pure.hs | haskell | | Pure monad transformer for logging. Can log any @msg@ messages. Allows to
log messages by storing them in the internal state.
| Returns result value of 'PureLoggerT' and list of logged messages.
| 'PureLoggerT' specialized to 'Identity'
| Returns result value of 'PureLogger' and list of logged messages. | |
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Pure implementation of logging action .
Copyright: (c) 2018-2022 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
Pure implementation of logging action.
-}
module Colog.Pure
( Pure... |
e8334eab8a47e085ba723e047551a48f08ba7fecb204b5ec3dfb286f5ed7e933 | antono/guix-debian | mpd.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 >
Copyright © 2014 < >
Copyright © 2014 < >
;;;
;;; 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... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/mpd.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 >
Copyright © 2014 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages mpd)
#:use-module (srfi srfi-1)
... |
abb34902bac6db138dd784e738b6b1a6b039161ae0ef6e6a1d3227c669c3fb92 | digikar99/polymorphic-functions | parameters.lisp | (in-package :polymorphic-functions)
(5am:def-suite lambda-list :in :polymorphic-functions)
;;; FIXME: Even though this file does a good amount of lambda-list processing
;;; it does not do some things, and not quite validation yet.
(5am:def-suite effective-lambda-list :in lambda-list)
(defun polymorphic-function-mak... | null | https://raw.githubusercontent.com/digikar99/polymorphic-functions/d2218753428144db2450961bda7dd207369bdf75/src/lambda-lists/parameters.lisp | lisp | FIXME: Even though this file does a good amount of lambda-list processing
it does not do some things, and not quite validation yet.
The length of the typed and untyped lambda list need not match.
But we are guaranteed that typed-lambda-list is at least as long as
untyped-lambda-list
:do (print (list parameter-spe... | (in-package :polymorphic-functions)
(5am:def-suite lambda-list :in :polymorphic-functions)
(5am:def-suite effective-lambda-list :in lambda-list)
(defun polymorphic-function-make-effective-lambda-list (untyped-lambda-list)
(check-type untyped-lambda-list untyped-lambda-list)
(let ((optional-position (position '&... |
695cdca53903107053fe394a5e837e11c0fa77808c456de9fa7b9fa9e7f9ebe7 | aryx/xix | datagen.mli |
uses only sizes.data_size
val gen:
Types.symbol_table2 -> Types.addr (* init_data *) -> Types.sections_size ->
Types5.data list ->
Types.byte array
| null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/linker/datagen.mli | ocaml | init_data |
uses only sizes.data_size
val gen:
Types5.data list ->
Types.byte array
|
002923bfea21d328ec318faa86abbf6337141086806ce2912aabfea98ac996f2 | Vincibean/real-world-haskell | ex07.hs | -- Modify the type signature of namesMatching so that it encodes the possibility of a bad pattern,
-- and make it use your rewritten globToRegex function.
--
-- You may find the amount of work involved to be surprisingly large.
-- Don’t worry; we will introduce more concise and sophisticated ways of dealing with err... | null | https://raw.githubusercontent.com/Vincibean/real-world-haskell/705a1e75eca318fa71d1bb44c16c7c7e2912f8cc/ch08/ex07.hs | haskell | Modify the type signature of namesMatching so that it encodes the possibility of a bad pattern,
and make it use your rewritten globToRegex function.
You may find the amount of work involved to be surprisingly large.
Don’t worry; we will introduce more concise and sophisticated ways of dealing with errors in lat... |
import System.Directory (
doesDirectoryExist,
doesFileExist,
getCurrentDirectory,
getDirectoryContents)
import System.FilePath (
dropTrailingPathSeparator,
splitFileName,
(</>),
isPathSeparator)
import Control.Exception (handle)
import Control.Monad (forM... |
a1cb5835a18357bcb3eed77aa50079e633b6801d4da943ace189ad2ce50fadde | pfdietz/ansi-test | array-rank.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Jan 21 20:32:57 2003
;;;; Contains: Tests for ARRAY-RANK
;;; Most tests for ARRAY-RANK are in make-array.lsp
(deftest array-rank.1
(array-rank #0aNIL)
0)
(deftest array-rank.2
(check-predicate #'(lambda (e) (or (not (typep e 'vector))
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/arrays/array-rank.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for ARRAY-RANK
Most tests for ARRAY-RANK are in make-array.lsp
Error tests | Author :
Created : Tue Jan 21 20:32:57 2003
(deftest array-rank.1
(array-rank #0aNIL)
0)
(deftest array-rank.2
(check-predicate #'(lambda (e) (or (not (typep e 'vector))
(eql (array-rank e) 1))))
nil)
(deftest array-rank.3
(macrolet ((%m (z) z)) (array-ran... |
1423b12397d3d03d384e055bab982b4f6734b8654dc47fa290add43fe9ccb31f | UU-ComputerScience/uhc | Sieve.hs | data [] a = ''[]'' | a : [a]
data Bool = False | True
foreign import ccall "primAddInt" (+) :: Int -> Int -> Int
foreign import ccall "primDivInt" (/) :: Int -> Int -> Int
foreign import ccall "primMulInt" (*) :: Int -> Int -> Int
foreign import ccall "primSubInt" (-) :: Int -> Int -> Int
foreign import ccall "primGtI... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/grinc/Sieve.hs | haskell | data [] a = ''[]'' | a : [a]
data Bool = False | True
foreign import ccall "primAddInt" (+) :: Int -> Int -> Int
foreign import ccall "primDivInt" (/) :: Int -> Int -> Int
foreign import ccall "primMulInt" (*) :: Int -> Int -> Int
foreign import ccall "primSubInt" (-) :: Int -> Int -> Int
foreign import ccall "primGtI... | |
01538b8bdbfd6c9a9cfa7dd045de01928f16f56b26ab522934c4107ef37f24c5 | status-im/status-electron | react_native_web.cljs | (ns status-desktop-front.react-native-web
(:require [reagent.core :as reagent]))
(def react-native-web (js/require "react-native-web"))
(defn get-react-property [name]
(aget react-native-web name))
(defn adapt-class [class]
(when class
(reagent/adapt-react-class class)))
(defn get-class [name]
(adapt-cl... | null | https://raw.githubusercontent.com/status-im/status-electron/aad18c34c0ee0304071e984f21d5622735ec5bef/src_front/status_desktop_front/react_native_web.cljs | clojure | (ns status-desktop-front.react-native-web
(:require [reagent.core :as reagent]))
(def react-native-web (js/require "react-native-web"))
(defn get-react-property [name]
(aget react-native-web name))
(defn adapt-class [class]
(when class
(reagent/adapt-react-class class)))
(defn get-class [name]
(adapt-cl... | |
bf89f03c8d104c9c3961e8378112cc34fbeb5c831eef204d414bf9ddd8647fad | JoelSanchez/ventas | edit.cljs | (ns ventas.themes.admin.taxes.edit
(:require
[re-frame.core :as rf]
[ventas.components.base :as base]
[ventas.events :as events]
[ventas.i18n :refer [i18n]]
[ventas.themes.admin.skeleton :as admin.skeleton]
[ventas.routes :as routes]
[ventas.components.crud-form :as crud-form :include-macros true... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/themes/admin/taxes/edit.cljs | clojure | (ns ventas.themes.admin.taxes.edit
(:require
[re-frame.core :as rf]
[ventas.components.base :as base]
[ventas.events :as events]
[ventas.i18n :refer [i18n]]
[ventas.themes.admin.skeleton :as admin.skeleton]
[ventas.routes :as routes]
[ventas.components.crud-form :as crud-form :include-macros true... | |
17e540e753eea7060af4abef169cc4354e455240251906068af99fc0f924bed2 | janegca/htdp2e | 0407-SP-AutomaticDoor.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 0407-SP-AutomaticDoor) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (l... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/0407-SP-AutomaticDoor.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design a world program that simulates the working of a door with an
automatic door closer. If this kind of door is locked, you can unlock
it with a key. An unlocked door is closed but someone pushing at the
door opens it. Once th... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 0407-SP-AutomaticDoor) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-dec... |
e5ded286e20c054e0b3c19f3090acdd51d947105b539b3d3c0b64ee08336e8d0 | CSVdB/pinky | Utils.hs | module Pinky.Utils
( module Pinky.CreateRandom
, module Pinky.Utils.PositiveDouble
, module Pinky.Utils.PositiveInt
, module Pinky.Utils.ProperFraction
, module Pinky.Utils.Proxy
, module Pinky.Utils.MyVec
) where
import Pinky.CreateRandom
import Pinky.Utils.MyVec
import Pinky.Utils.Positiv... | null | https://raw.githubusercontent.com/CSVdB/pinky/e77a4c0812ceb4b8548c41a7652fb247c2ab39e0/pinky/src/Pinky/Utils.hs | haskell | module Pinky.Utils
( module Pinky.CreateRandom
, module Pinky.Utils.PositiveDouble
, module Pinky.Utils.PositiveInt
, module Pinky.Utils.ProperFraction
, module Pinky.Utils.Proxy
, module Pinky.Utils.MyVec
) where
import Pinky.CreateRandom
import Pinky.Utils.MyVec
import Pinky.Utils.Positiv... | |
bb5771d0192b0562724a9b181d51b158ce72c0209826f31f829c4b139af79f7a | nobutaka/nanopass | emu.scm | (use srfi-1)
(use util.match)
(define *directive* "")
(define x86
(lambda (program)
(x86-assemble program "t.s")
(unless (zero? (sys-system #"gcc -m32 -Wl,-no_pie -g ~*directive* startup.c call_scheme.s t.s -o a.out"))
(error "could not build target"))))
(define x86-assemble
(lambda (code file)
... | null | https://raw.githubusercontent.com/nobutaka/nanopass/80e0344a1f143832a75d798be903e05b5dbdd079/emu.scm | scheme | (use srfi-1)
(use util.match)
(define *directive* "")
(define x86
(lambda (program)
(x86-assemble program "t.s")
(unless (zero? (sys-system #"gcc -m32 -Wl,-no_pie -g ~*directive* startup.c call_scheme.s t.s -o a.out"))
(error "could not build target"))))
(define x86-assemble
(lambda (code file)
... | |
fd5ab113bc64852345d440b23c3bfb9e1caf323ca6e16aed51478fd08e92d17a | synrc/nitro | element_html.erl | -module(element_html).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#html.show_if==false -> [<<>>];
render_element(Record) ->
List = [
%global
{<<"accesskey">>, Record#html.accesskey},
{<<"class">>, Record#html... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/group/element_html.erl | erlang | global
spec | -module(element_html).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#html.show_if==false -> [<<>>];
render_element(Record) ->
List = [
{<<"accesskey">>, Record#html.accesskey},
{<<"class">>, Record#html.class},
... |
e45bf5ecc86c0362f9ccc11f5057ee1d6d74a399f70f871606c18193f95dd8b5 | YoshikuniJujo/test_haskell | Flatten.hs | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
{-# LANGUAGE KindSignatures, TypeOperators #-}
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Vulkan.Pipeline.VertexInputState.Flatten where
import GHC.Generics
import Data.Kind
type family GetType (x :: Type -> Type) :: Type where
... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/11ec8391cee1218d14eb2f43b44853a7bd3de1f8/themes/gui/vulkan/try-my-vulkan/src/Vulkan/Pipeline/VertexInputState/Flatten.hs | haskell | # LANGUAGE KindSignatures, TypeOperators # | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Vulkan.Pipeline.VertexInputState.Flatten where
import GHC.Generics
import Data.Kind
type family GetType (x :: Type -> Type) :: Type where
GetType (K1 i a) = a
GetType (M1 m i a) = GetT... |
ea6964eba72c2d5d76d2d80db3c8cf83500efc2d0f1405ebb565f084e49cd080 | dwayne/eopl3 | interpreter.test.rkt | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/LET-3.6/interpreter.test.rkt | racket | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | |
3413717f5e7720ff55bacc6b11e48c21f2abd9276e7bb1c8e9fda6a4f8d3d047 | elaforge/karya | AppendList.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Also known as a conc - list or a merge - list . In the ghc source it 's called
-- OrdList.
module Util.AppendList (
AppendList, empty, singleton, cons, snoc, append
, from_l... | null | https://raw.githubusercontent.com/elaforge/karya/255a8f7553b33aeb5c401668202816c4e14c7f55/Util/AppendList.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
OrdList.
possibly more efficient if the list is built with 'snoc'?
length (Pair xs ys) = let leny = length ys in leny `seq` leny + length xs | Copyright 2013
| Also known as a conc - list or a merge - list . In the ghc source it 's called
module Util.AppendList (
AppendList, empty, singleton, cons, snoc, append
, from_list, to_list
, length, view, head, last
) where
import Prelude hiding (length, head, last)
import Control.Monad
import qu... |
ee5ade8c5f8760300e53172eae1f3421454d313c26a88761ceacab53f1d532fc | AntidoteDB/antidote_aql | ipa.erl | %%%-------------------------------------------------------------------
@author ,
@doc A module to handle Invariant - Preserving Applications
properties . The IPA approach is based upon the use of
%%% visibility tokens.
%%% @end
%%%-------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/AntidoteDB/antidote_aql/e7ef4913d233c2fee8ebff582d91fe3e2e95786c/src/ipa.erl | erlang | -------------------------------------------------------------------
visibility tokens.
@end
-------------------------------------------------------------------
if X and Y are the same, both prevail
if Z is not X or Y, find next
if both not found, error
=========================================================... | @author ,
@doc A module to handle Invariant - Preserving Applications
properties . The IPA approach is based upon the use of
-module(ipa).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-include("aql.hrl").
-export([new/0,
touch/0, touch_cascade/0, insert/0,
delete/0, delete_casca... |
aa19ff06b040f6ad36c9d9e19ea067e7e8970ae92e1353b6d92d6b3accf2c342 | seandepagnier/cruisingplot | leastsquares.scm | Copyright ( C ) 2010 < >
;;
This Program is free software ; you can redistribute it and/or
;; modify it under the terms of the GNU General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
(declare (unit leastsquares))
(... | null | https://raw.githubusercontent.com/seandepagnier/cruisingplot/d3d83e7372e2c5ce1a8e8071286e30c2028088cf/leastsquares.scm | scheme |
you can redistribute it and/or
modify it under the terms of the GNU General Public
either
return (HH')^-1*H'Z'
the functions build build-jacobian-row takes state and measurements
least squares to fit data
use y = a
derivative
residual
use y = a*x + b
use y = a*x^2 + b*x + c
y = a*x^3 + b*x^2 + c*x + d
y = a... | Copyright ( C ) 2010 < >
version 3 of the License , or ( at your option ) any later version .
(declare (unit leastsquares))
(declare (uses matrix vector))
(define (least-squares-apply H Z)
(let ((i (matrix* (matrix-transpose H) H)))
(let ((ii (matrix-inverse i)))
(if ii
(matrix* ii (matri... |
1fdcddede6551307f7c9222f20b1f9b5fd9070985feda1295d8e9e7b958d8a08 | eigenhombre/clj-org | core.clj | (ns clj-org.core)
| null | https://raw.githubusercontent.com/eigenhombre/clj-org/05bef5a0a45c4e60006ac94e75306368ad365aa5/src/clj_org/core.clj | clojure | (ns clj-org.core)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.